@superglue/cli 1.1.56 → 1.1.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "superglue",
|
|
3
3
|
"description": "Build, test, and manage superglue tools via the sg CLI. Use when working with superglue tools, systems, APIs, SDKs, or the sg command.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.58",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "superglue",
|
|
7
7
|
"email": "hello@superglue.cloud"
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";var hS=Object.create;var al=Object.defineProperty;var fS=Object.getOwnPropertyDescriptor;var bS=Object.getOwnPropertyNames;var yS=Object.getPrototypeOf,kS=Object.prototype.hasOwnProperty;var he=(o,e)=>()=>(o&&(e=o(o=0)),e);var y=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),zv=(o,e)=>{for(var t in e)al(o,t,{get:e[t],enumerable:!0})},qv=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bS(e))!kS.call(o,i)&&i!==t&&al(o,i,{get:()=>e[i],enumerable:!(a=fS(e,i))||a.enumerable});return o};var $=(o,e,t)=>(t=o!=null?hS(yS(o)):{},qv(e||!o||!o.__esModule?al(t,"default",{value:o,enumerable:!0}):t,o)),Qp=o=>qv(al({},"__esModule",{value:!0}),o);var Qv=y((ole,jv)=>{"use strict";var Ev=9007199254740991,AS="[object Arguments]",wS="[object Function]",vS="[object GeneratorFunction]",xS=/^(?:0|[1-9]\d*)$/;function zS(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function qS(o,e){return function(t){return o(e(t))}}var il=Object.prototype,Bp=il.hasOwnProperty,Iv=il.toString,ES=il.propertyIsEnumerable,IS=qS(Object.keys,Object);function CS(o,e){var t=DS(o)||SS(o)?zS(o.length,String):[],a=t.length,i=!!a;for(var s in o)(e||Bp.call(o,s))&&!(i&&(s=="length"||QS(s,a)))&&t.push(s);return t}function jS(o){if(!BS(o))return IS(o);var e=[];for(var t in Object(o))Bp.call(o,t)&&t!="constructor"&&e.push(t);return e}function QS(o,e){return e=e??Ev,!!e&&(typeof o=="number"||xS.test(o))&&o>-1&&o%1==0&&o<e}function BS(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||il;return o===t}function SS(o){return RS(o)&&Bp.call(o,"callee")&&(!ES.call(o,"callee")||Iv.call(o)==AS)}var DS=Array.isArray;function Cv(o){return o!=null&&NS(o.length)&&!TS(o)}function RS(o){return MS(o)&&Cv(o)}function TS(o){var e=US(o)?Iv.call(o):"";return e==wS||e==vS}function NS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Ev}function US(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function MS(o){return!!o&&typeof o=="object"}function OS(o){return Cv(o)?CS(o):jS(o)}jv.exports=OS});var sx=y((Pn,ir)=>{"use strict";var _S=200,_v="__lodash_hash_undefined__",FS=800,LS=16,Fv=9007199254740991,Lv="[object Arguments]",PS="[object Array]",HS="[object AsyncFunction]",YS="[object Boolean]",GS="[object Date]",VS="[object Error]",Pv="[object Function]",WS="[object GeneratorFunction]",$S="[object Map]",JS="[object Number]",KS="[object Null]",Hv="[object Object]",ZS="[object Proxy]",XS="[object RegExp]",e7="[object Set]",o7="[object String]",t7="[object Undefined]",a7="[object WeakMap]",i7="[object ArrayBuffer]",s7="[object DataView]",r7="[object Float32Array]",n7="[object Float64Array]",c7="[object Int8Array]",m7="[object Int16Array]",l7="[object Int32Array]",u7="[object Uint8Array]",d7="[object Uint8ClampedArray]",g7="[object Uint16Array]",p7="[object Uint32Array]",h7=/[\\^$.*+?()[\]{}|]/g,f7=/^\[object .+?Constructor\]$/,b7=/^(?:0|[1-9]\d*)$/,ye={};ye[r7]=ye[n7]=ye[c7]=ye[m7]=ye[l7]=ye[u7]=ye[d7]=ye[g7]=ye[p7]=!0;ye[Lv]=ye[PS]=ye[i7]=ye[YS]=ye[s7]=ye[GS]=ye[VS]=ye[Pv]=ye[$S]=ye[JS]=ye[Hv]=ye[XS]=ye[e7]=ye[o7]=ye[a7]=!1;var Yv=typeof global=="object"&&global&&global.Object===Object&&global,y7=typeof self=="object"&&self&&self.Object===Object&&self,Gn=Yv||y7||Function("return this")(),Gv=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,Hn=Gv&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,Vv=Hn&&Hn.exports===Gv,Sp=Vv&&Yv.process,Bv=(function(){try{var o=Hn&&Hn.require&&Hn.require("util").types;return o||Sp&&Sp.binding&&Sp.binding("util")}catch{}})(),Sv=Bv&&Bv.isTypedArray;function k7(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function A7(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function w7(o){return function(e){return o(e)}}function v7(o,e){return o?.[e]}function x7(o,e){return function(t){return o(e(t))}}var z7=Array.prototype,q7=Function.prototype,nl=Object.prototype,Dp=Gn["__core-js_shared__"],cl=q7.toString,fa=nl.hasOwnProperty,Dv=(function(){var o=/[^.]+$/.exec(Dp&&Dp.keys&&Dp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Wv=nl.toString,E7=cl.call(Object),I7=RegExp("^"+cl.call(fa).replace(h7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sl=Vv?Gn.Buffer:void 0,Rv=Gn.Symbol,Tv=Gn.Uint8Array,Nv=sl?sl.allocUnsafe:void 0,$v=x7(Object.getPrototypeOf,Object),Uv=Object.create,C7=nl.propertyIsEnumerable,j7=z7.splice,$i=Rv?Rv.toStringTag:void 0,rl=(function(){try{var o=Op(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Q7=sl?sl.isBuffer:void 0,Mv=Math.max,B7=Date.now,Jv=Op(Gn,"Map"),Yn=Op(Object,"create"),S7=(function(){function o(){}return function(e){if(!Ki(e))return{};if(Uv)return Uv(e);o.prototype=e;var t=new o;return o.prototype=void 0,t}})();function Ji(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function D7(){this.__data__=Yn?Yn(null):{},this.size=0}function R7(o){var e=this.has(o)&&delete this.__data__[o];return this.size-=e?1:0,e}function T7(o){var e=this.__data__;if(Yn){var t=e[o];return t===_v?void 0:t}return fa.call(e,o)?e[o]:void 0}function N7(o){var e=this.__data__;return Yn?e[o]!==void 0:fa.call(e,o)}function U7(o,e){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Yn&&e===void 0?_v:e,this}Ji.prototype.clear=D7;Ji.prototype.delete=R7;Ji.prototype.get=T7;Ji.prototype.has=N7;Ji.prototype.set=U7;function ba(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function M7(){this.__data__=[],this.size=0}function O7(o){var e=this.__data__,t=ml(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():j7.call(e,t,1),--this.size,!0}function _7(o){var e=this.__data__,t=ml(e,o);return t<0?void 0:e[t][1]}function F7(o){return ml(this.__data__,o)>-1}function L7(o,e){var t=this.__data__,a=ml(t,o);return a<0?(++this.size,t.push([o,e])):t[a][1]=e,this}ba.prototype.clear=M7;ba.prototype.delete=O7;ba.prototype.get=_7;ba.prototype.has=F7;ba.prototype.set=L7;function sr(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function P7(){this.size=0,this.__data__={hash:new Ji,map:new(Jv||ba),string:new Ji}}function H7(o){var e=ul(this,o).delete(o);return this.size-=e?1:0,e}function Y7(o){return ul(this,o).get(o)}function G7(o){return ul(this,o).has(o)}function V7(o,e){var t=ul(this,o),a=t.size;return t.set(o,e),this.size+=t.size==a?0:1,this}sr.prototype.clear=P7;sr.prototype.delete=H7;sr.prototype.get=Y7;sr.prototype.has=G7;sr.prototype.set=V7;function rr(o){var e=this.__data__=new ba(o);this.size=e.size}function W7(){this.__data__=new ba,this.size=0}function $7(o){var e=this.__data__,t=e.delete(o);return this.size=e.size,t}function J7(o){return this.__data__.get(o)}function K7(o){return this.__data__.has(o)}function Z7(o,e){var t=this.__data__;if(t instanceof ba){var a=t.__data__;if(!Jv||a.length<_S-1)return a.push([o,e]),this.size=++t.size,this;t=this.__data__=new sr(a)}return t.set(o,e),this.size=t.size,this}rr.prototype.clear=W7;rr.prototype.delete=$7;rr.prototype.get=J7;rr.prototype.has=K7;rr.prototype.set=Z7;function X7(o,e){var t=Up(o),a=!t&&Np(o),i=!t&&!a&&ex(o),s=!t&&!a&&!i&&tx(o),r=t||a||i||s,n=r?A7(o.length,String):[],c=n.length;for(var m in o)(e||fa.call(o,m))&&!(r&&(m=="length"||i&&(m=="offset"||m=="parent")||s&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Zv(m,c)))&&n.push(m);return n}function Rp(o,e,t){(t!==void 0&&!dl(o[e],t)||t===void 0&&!(e in o))&&Mp(o,e,t)}function eD(o,e,t){var a=o[e];(!(fa.call(o,e)&&dl(a,t))||t===void 0&&!(e in o))&&Mp(o,e,t)}function ml(o,e){for(var t=o.length;t--;)if(dl(o[t][0],e))return t;return-1}function Mp(o,e,t){e=="__proto__"&&rl?rl(o,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[e]=t}var oD=pD();function ll(o){return o==null?o===void 0?t7:KS:$i&&$i in Object(o)?hD(o):wD(o)}function Ov(o){return Vn(o)&&ll(o)==Lv}function tD(o){if(!Ki(o)||kD(o))return!1;var e=Fp(o)?I7:f7;return e.test(qD(o))}function aD(o){return Vn(o)&&ox(o.length)&&!!ye[ll(o)]}function iD(o){if(!Ki(o))return AD(o);var e=Xv(o),t=[];for(var a in o)a=="constructor"&&(e||!fa.call(o,a))||t.push(a);return t}function Kv(o,e,t,a,i){o!==e&&oD(e,function(s,r){if(i||(i=new rr),Ki(s))sD(o,e,r,t,Kv,a,i);else{var n=a?a(Tp(o,r),s,r+"",o,e,i):void 0;n===void 0&&(n=s),Rp(o,r,n)}},ax)}function sD(o,e,t,a,i,s,r){var n=Tp(o,t),c=Tp(e,t),m=r.get(c);if(m){Rp(o,t,m);return}var l=s?s(n,c,t+"",o,e,r):void 0,u=l===void 0;if(u){var d=Up(c),g=!d&&ex(c),p=!d&&!g&&tx(c);l=c,d||g||p?Up(n)?l=n:ED(n)?l=uD(n):g?(u=!1,l=cD(c,!0)):p?(u=!1,l=lD(c,!0)):l=[]:ID(c)||Np(c)?(l=n,Np(n)?l=CD(n):(!Ki(n)||Fp(n))&&(l=fD(c))):u=!1}u&&(r.set(c,l),i(l,c,a,s,r),r.delete(c)),Rp(o,t,l)}function rD(o,e){return xD(vD(o,e,ix),o+"")}var nD=rl?function(o,e){return rl(o,"toString",{configurable:!0,enumerable:!1,value:QD(e),writable:!0})}:ix;function cD(o,e){if(e)return o.slice();var t=o.length,a=Nv?Nv(t):new o.constructor(t);return o.copy(a),a}function mD(o){var e=new o.constructor(o.byteLength);return new Tv(e).set(new Tv(o)),e}function lD(o,e){var t=e?mD(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function uD(o,e){var t=-1,a=o.length;for(e||(e=Array(a));++t<a;)e[t]=o[t];return e}function dD(o,e,t,a){var i=!t;t||(t={});for(var s=-1,r=e.length;++s<r;){var n=e[s],c=a?a(t[n],o[n],n,t,o):void 0;c===void 0&&(c=o[n]),i?Mp(t,n,c):eD(t,n,c)}return t}function gD(o){return rD(function(e,t){var a=-1,i=t.length,s=i>1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(s=o.length>3&&typeof s=="function"?(i--,s):void 0,r&&bD(t[0],t[1],r)&&(s=i<3?void 0:s,i=1),e=Object(e);++a<i;){var n=t[a];n&&o(e,n,a,s)}return e})}function pD(o){return function(e,t,a){for(var i=-1,s=Object(e),r=a(e),n=r.length;n--;){var c=r[o?n:++i];if(t(s[c],c,s)===!1)break}return e}}function ul(o,e){var t=o.__data__;return yD(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Op(o,e){var t=v7(o,e);return tD(t)?t:void 0}function hD(o){var e=fa.call(o,$i),t=o[$i];try{o[$i]=void 0;var a=!0}catch{}var i=Wv.call(o);return a&&(e?o[$i]=t:delete o[$i]),i}function fD(o){return typeof o.constructor=="function"&&!Xv(o)?S7($v(o)):{}}function Zv(o,e){var t=typeof o;return e=e??Fv,!!e&&(t=="number"||t!="symbol"&&b7.test(o))&&o>-1&&o%1==0&&o<e}function bD(o,e,t){if(!Ki(t))return!1;var a=typeof e;return(a=="number"?_p(t)&&Zv(e,t.length):a=="string"&&e in t)?dl(t[e],o):!1}function yD(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function kD(o){return!!Dv&&Dv in o}function Xv(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||nl;return o===t}function AD(o){var e=[];if(o!=null)for(var t in Object(o))e.push(t);return e}function wD(o){return Wv.call(o)}function vD(o,e,t){return e=Mv(e===void 0?o.length-1:e,0),function(){for(var a=arguments,i=-1,s=Mv(a.length-e,0),r=Array(s);++i<s;)r[i]=a[e+i];i=-1;for(var n=Array(e+1);++i<e;)n[i]=a[i];return n[e]=t(r),k7(o,this,n)}}function Tp(o,e){if(!(e==="constructor"&&typeof o[e]=="function")&&e!="__proto__")return o[e]}var xD=zD(nD);function zD(o){var e=0,t=0;return function(){var a=B7(),i=LS-(a-t);if(t=a,i>0){if(++e>=FS)return arguments[0]}else e=0;return o.apply(void 0,arguments)}}function qD(o){if(o!=null){try{return cl.call(o)}catch{}try{return o+""}catch{}}return""}function dl(o,e){return o===e||o!==o&&e!==e}var Np=Ov((function(){return arguments})())?Ov:function(o){return Vn(o)&&fa.call(o,"callee")&&!C7.call(o,"callee")},Up=Array.isArray;function _p(o){return o!=null&&ox(o.length)&&!Fp(o)}function ED(o){return Vn(o)&&_p(o)}var ex=Q7||BD;function Fp(o){if(!Ki(o))return!1;var e=ll(o);return e==Pv||e==WS||e==HS||e==ZS}function ox(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Fv}function Ki(o){var e=typeof o;return o!=null&&(e=="object"||e=="function")}function Vn(o){return o!=null&&typeof o=="object"}function ID(o){if(!Vn(o)||ll(o)!=Hv)return!1;var e=$v(o);if(e===null)return!0;var t=fa.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&cl.call(t)==E7}var tx=Sv?w7(Sv):aD;function CD(o){return dD(o,ax(o))}function ax(o){return _p(o)?X7(o,!0):iD(o)}var jD=gD(function(o,e,t){Kv(o,e,t)});function QD(o){return function(){return o}}function ix(o){return o}function BD(){return!1}ir.exports=jD});var kx=y((tle,yx)=>{"use strict";var mx=200,Hp="__lodash_hash_undefined__",SD=1/0,DD=9007199254740991,RD="[object Function]",TD="[object GeneratorFunction]",ND=/[\\^$.*+?()[\]{}|]/g,UD=/^\[object .+?Constructor\]$/,MD=typeof global=="object"&&global&&global.Object===Object&&global,OD=typeof self=="object"&&self&&self.Object===Object&&self,Yp=MD||OD||Function("return this")();function _D(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function FD(o,e){for(var t=-1,a=o?o.length:0,i=0,s=[];++t<a;){var r=o[t];e(r,t,o)&&(s[i++]=r)}return s}function lx(o,e){var t=o?o.length:0;return!!t&&YD(o,e,0)>-1}function ux(o,e,t){for(var a=-1,i=o?o.length:0;++a<i;)if(t(e,o[a]))return!0;return!1}function LD(o,e){for(var t=-1,a=o?o.length:0,i=Array(a);++t<a;)i[t]=e(o[t],t,o);return i}function PD(o,e){for(var t=-1,a=e.length,i=o.length;++t<a;)o[i+t]=e[t];return o}function HD(o,e,t,a){for(var i=o.length,s=t+(a?1:-1);a?s--:++s<i;)if(e(o[s],s,o))return s;return-1}function YD(o,e,t){if(e!==e)return HD(o,GD,t);for(var a=t-1,i=o.length;++a<i;)if(o[a]===e)return a;return-1}function GD(o){return o!==o}function VD(o){return function(e){return o(e)}}function dx(o,e){return o.has(e)}function WD(o,e){return o?.[e]}function $D(o){var e=!1;if(o!=null&&typeof o.toString!="function")try{e=!!(o+"")}catch{}return e}function gx(o){var e=-1,t=Array(o.size);return o.forEach(function(a){t[++e]=a}),t}var JD=Array.prototype,KD=Function.prototype,px=Object.prototype,Lp=Yp["__core-js_shared__"],rx=(function(){var o=/[^.]+$/.exec(Lp&&Lp.keys&&Lp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),hx=KD.toString,Gp=px.hasOwnProperty,ZD=px.toString,XD=RegExp("^"+hx.call(Gp).replace(ND,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eR=JD.splice,nx=Math.max,oR=Vp(Yp,"Map"),Pp=Vp(Yp,"Set"),Wn=Vp(Object,"create");function Zi(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function tR(){this.__data__=Wn?Wn(null):{}}function aR(o){return this.has(o)&&delete this.__data__[o]}function iR(o){var e=this.__data__;if(Wn){var t=e[o];return t===Hp?void 0:t}return Gp.call(e,o)?e[o]:void 0}function sR(o){var e=this.__data__;return Wn?e[o]!==void 0:Gp.call(e,o)}function rR(o,e){var t=this.__data__;return t[o]=Wn&&e===void 0?Hp:e,this}Zi.prototype.clear=tR;Zi.prototype.delete=aR;Zi.prototype.get=iR;Zi.prototype.has=sR;Zi.prototype.set=rR;function nr(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function nR(){this.__data__=[]}function cR(o){var e=this.__data__,t=gl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():eR.call(e,t,1),!0}function mR(o){var e=this.__data__,t=gl(e,o);return t<0?void 0:e[t][1]}function lR(o){return gl(this.__data__,o)>-1}function uR(o,e){var t=this.__data__,a=gl(t,o);return a<0?t.push([o,e]):t[a][1]=e,this}nr.prototype.clear=nR;nr.prototype.delete=cR;nr.prototype.get=mR;nr.prototype.has=lR;nr.prototype.set=uR;function cr(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function dR(){this.__data__={hash:new Zi,map:new(oR||nr),string:new Zi}}function gR(o){return pl(this,o).delete(o)}function pR(o){return pl(this,o).get(o)}function hR(o){return pl(this,o).has(o)}function fR(o,e){return pl(this,o).set(o,e),this}cr.prototype.clear=dR;cr.prototype.delete=gR;cr.prototype.get=pR;cr.prototype.has=hR;cr.prototype.set=fR;function $n(o){var e=-1,t=o?o.length:0;for(this.__data__=new cr;++e<t;)this.add(o[e])}function bR(o){return this.__data__.set(o,Hp),this}function yR(o){return this.__data__.has(o)}$n.prototype.add=$n.prototype.push=bR;$n.prototype.has=yR;function gl(o,e){for(var t=o.length;t--;)if(CR(o[t][0],e))return t;return-1}function cx(o,e,t,a){var i=-1,s=lx,r=!0,n=o.length,c=[],m=e.length;if(!n)return c;t&&(e=LD(e,VD(t))),a?(s=ux,r=!1):e.length>=mx&&(s=dx,r=!1,e=new $n(e));e:for(;++i<n;){var l=o[i],u=t?t(l):l;if(l=a||l!==0?l:0,r&&u===u){for(var d=m;d--;)if(e[d]===u)continue e;c.push(l)}else s(e,u,a)||c.push(l)}return c}function kR(o){if(!bx(o)||qR(o))return!1;var e=fx(o)||$D(o)?XD:UD;return e.test(ER(o))}function AR(o,e){return e=nx(e===void 0?o.length-1:e,0),function(){for(var t=arguments,a=-1,i=nx(t.length-e,0),s=Array(i);++a<i;)s[a]=t[e+a];a=-1;for(var r=Array(e+1);++a<e;)r[a]=t[a];return r[e]=s,_D(o,this,r)}}function wR(o,e,t){var a=-1,i=lx,s=o.length,r=!0,n=[],c=n;if(t)r=!1,i=ux;else if(s>=mx){var m=e?null:xR(o);if(m)return gx(m);r=!1,i=dx,c=new $n}else c=e?[]:n;e:for(;++a<s;){var l=o[a],u=e?e(l):l;if(l=t||l!==0?l:0,r&&u===u){for(var d=c.length;d--;)if(c[d]===u)continue e;e&&c.push(u),n.push(l)}else i(c,u,t)||(c!==n&&c.push(u),n.push(l))}return n}function vR(o,e,t){for(var a=-1,i=o.length;++a<i;)var s=s?PD(cx(s,o[a],e,t),cx(o[a],s,e,t)):o[a];return s&&s.length?wR(s,e,t):[]}var xR=Pp&&1/gx(new Pp([,-0]))[1]==SD?function(o){return new Pp(o)}:DR;function pl(o,e){var t=o.__data__;return zR(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Vp(o,e){var t=WD(o,e);return kR(t)?t:void 0}function zR(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function qR(o){return!!rx&&rx in o}function ER(o){if(o!=null){try{return hx.call(o)}catch{}try{return o+""}catch{}}return""}var IR=AR(function(o){return vR(FD(o,QR))});function CR(o,e){return o===e||o!==o&&e!==e}function jR(o){return o!=null&&BR(o.length)&&!fx(o)}function QR(o){return SR(o)&&jR(o)}function fx(o){var e=bx(o)?ZD.call(o):"";return e==RD||e==TD}function BR(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=DD}function bx(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function SR(o){return!!o&&typeof o=="object"}function DR(){}yx.exports=IR});var fl=y(ya=>{"use strict";var Kp=ya&&ya.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ya,"__esModule",{value:!0});ya.toJsonSchema=OR;ya.convertRequiredToArray=Jn;ya.generateDefaultFromSchema=Kn;ya.parseJsonSafe=hl;ya.normalizeToolSchemas=_R;var Wp=Kp(Qv()),$p=Kp(sx()),RR=Kp(kx());function mr(o,e){if(o===e)return!0;if(o===null||e===null||typeof o!="object"||typeof e!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t=Object.keys(o),a=Object.keys(e);if(t.length!==a.length)return!1;let i=e;return t.every(s=>s in i&&mr(o[s],i[s]))}var TR={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},NR={string:function(e){return typeof e=="string"},number:function(e){return typeof e=="number"&&isFinite(e)},integer:function(e){return typeof e=="number"&&e%1===0},boolean:function(e){return typeof e=="boolean"},array:function(e){return e instanceof Array},null:function(e){return e===null},date:function(e){return e instanceof Date},any:function(e){return!0},object:function(e){return e&&typeof e=="object"&&!(e instanceof Array)&&!(e instanceof Date)}},lr={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(o){return lr.typeNames.find(e=>NR[e](o))},mergeSchemaObjs(o,e){if(!o||!e)return null;let t=(0,Wp.default)(o),a=(0,Wp.default)(e);if(!mr(t,a)){if(o.type==="array"&&e.type==="array"&&mr((0,RR.default)(t,a),["items"])){let s=t.length>a.length?e:o,r=t.length>a.length?o:e;if((0,Wp.default)(s).reduce((c,m)=>mr(s[m],r[m])&&c,!0))return s}if(o.type!=="object"||e.type!=="object")return null}let i={};for(let s=0,{length:r}=t;s<r;s++){let n=t[s];if(lr.getType(o[n])==="object"){let c=lr.mergeSchemaObjs(o[n],e[n]);if(c)i[n]=c;else{if(o.type==="object"||e.type==="object")return{type:"object"};if(n!=="items"||o.type!=="array"||e.type!=="array")return null}}else if(n==="type")if(o[n]!==e[n])if(o[n]==="integer"&&e[n]==="number"||o[n]==="number"&&e[n]==="integer")i[n]="number";else return null;else i[n]=o[n];else{if(!mr(o[n],e[n]))return null;i[n]=o[n]}}return i}};function UR(o){let e;for(let t=0,{length:a}=o;t<a;t++){let i=o[t];if(t>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function MR(o){return UR(o.map(e=>lr.getType(e)))}var Jp=class{constructor(e){this.options=(0,$p.default)({},TR,e),this.depth=0,this.getObjectSchemaDefault=this.getObjectSchemaDefault.bind(this),this.getStringSchemaDefault=this.getStringSchemaDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this),this.commmonPostProcessDefault=this.commmonPostProcessDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this)}getCommonArrayItemSchema(e){let t=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i});return t.reduce((a,i)=>lr.mergeSchemaObjs(a,i),t.pop())}getObjectSchemaDefault(e){let t={type:"object"},a=Object.keys(e);return a.length>0&&(t.properties=a.reduce((i,s)=>(this.depth++,i[s]=this.getSchema(e[s]),this.depth--,i),{})),t}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let t={type:"array"},a=MR(e);if(a)if(t.items={type:a},a!=="integer"&&a!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(t.items=i)}else this.options.required&&(t.items.required=!0);return t}getArraySchemaNoMerging(e){let t={type:"array"};return e.length>0&&(this.depth++,t.items=this.getSchema(e[0]),this.depth--),t}getArraySchemaTuple(e){let t={type:"array"};return e.length>0&&(t.items=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i})),t}getArraySchemaUniform(e){let t=this.getArraySchemaNoMerging(e);if(e.length>1)for(let a=1;a<e.length;a++){this.depth++;let i=this.getSchema(e[a]);if(this.depth--,!mr(t.items,i))throw new Error("Invalid schema, incompatible array items")}return t}getArraySchema(e){if(e.length===0)return{type:"array"};switch(this.options.arrays.mode){case"all":return this.getArraySchemaMerging(e);case"first":return this.getArraySchemaNoMerging(e);case"uniform":return this.getArraySchemaUniform(e);case"tuple":return this.getArraySchemaTuple(e);default:throw new Error(`Unknown array mode option '${this.options.arrays.mode}'`)}}getStringSchemaDefault(e){return{type:"string"}}getStringSchema(e){return this.options.strings.preProcessFnc?this.options.strings.preProcessFnc(e,this.getStringSchemaDefault):this.getStringSchemaDefault(e)}commmonPostProcessDefault(e,t,a){return this.options.required&&this.depth<=this.options.requiredDepth?(0,$p.default)({},t,{required:!0}):t}objectPostProcessDefault(e,t){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(t).length>0?(0,$p.default)({},e,{additionalProperties:!1}):e}getSchema(e){let t=lr.getType(e);t||(t="null");let a;switch(t){case"object":a=this.getObjectSchema(e);break;case"array":a=this.getArraySchema(e);break;case"string":a=this.getStringSchema(e);break;default:a={type:t}}return this.options.postProcessFnc?a=this.options.postProcessFnc(t,a,e,this.commmonPostProcessDefault):a=this.commmonPostProcessDefault(t,a,e),t==="object"&&(this.options.objects.postProcessFnc?a=this.options.objects.postProcessFnc(a,e,this.objectPostProcessDefault):a=this.objectPostProcessDefault(a,e)),a}};function OR(o,e){return new Jp(e).getSchema(o)}function Jn(o){if(!o||typeof o!="object")return o;if(Array.isArray(o))return o.map(t=>Jn(t));let e={...o};if(delete e.required,e.properties&&typeof e.properties=="object"){let t=[],a={};for(let[i,s]of Object.entries(e.properties)){let r=s;if(r&&typeof r=="object"&&r.required===!0){t.push(i);let{required:n,...c}=r;a[i]=Jn(c)}else a[i]=Jn(r)}e.properties=a,t.length>0&&(e.required=t)}return e.items&&(e.items=Jn(e.items)),e}function Kn(o){if(!o||typeof o!="object")return null;if(o.const!==void 0)return o.const;if(o.enum&&Array.isArray(o.enum)&&o.enum.length>0)return o.enum[0];if(o.default!==void 0)return o.default;if(o.oneOf&&Array.isArray(o.oneOf)&&o.oneOf.length>0)return Kn(o.oneOf[0]);if(o.anyOf&&Array.isArray(o.anyOf)&&o.anyOf.length>0)return Kn(o.anyOf[0]);switch(Array.isArray(o.type)?o.type[0]:o.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return o.items?[]:[];case"object":let t={};if(o.properties&&typeof o.properties=="object"){let a=o.required||[];for(let[i,s]of Object.entries(o.properties))t[i]=Kn(s)}return t;default:if(o.properties&&typeof o.properties=="object"){let a={};for(let[i,s]of Object.entries(o.properties))a[i]=Kn(s);return a}return null}}function hl(o){if(typeof o!="string")return o;try{return JSON.parse(o)}catch{return o}}function _R(o){let e={...o};return e.inputSchema&&(e.inputSchema=hl(e.inputSchema)),e.outputSchema&&(e.outputSchema=hl(e.outputSchema)),e.responseSchema&&(e.responseSchema=hl(e.responseSchema)),e}});var at=y(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.PLAYBOOK_LIMITS=q.DEFAULT_PROJECT_ID=q.PROJECT_LIMITS=q.PROJECT_RESOURCE_TYPES=q.MCP_SERVER_AUTH_MODES=q.OAUTH_CONTINUATION_REASON_MAX_CHARS=q.AGENT_REQUEST_BUSY_STATUSES=q.AGENT_SESSION_SCOPE_PATTERN=q.AGENT_MESSAGE_SCHEMA_VERSION=q.AGENT_APPROVAL_MODES=q.ConfirmationAction=q.SKILL_GATED_TOOLS=q.LOADABLE_MARKDOWN_NAMES=q.SKILL_REFERENCE_NAMES=q.SKILL_BODY_NAMES=q.AGENT_CHECKLIST_MAX_LABEL_CHARS=q.AGENT_CHECKLIST_MAX_ITEMS=q.AGENT_CHECKLIST_MIN_ITEMS=q.DYNAMIC_AGENT_TOOLS=q.AGENT_TOOLS=q.AGENT_BASE_TOOLS=q.AGENT_GLOBAL_TOOLS=q.ARTIFACT_PROPOSAL_ID_PREFIX=q.ARTIFACT_PLAYGROUND_DRAFT_ID=q.PLAYBOOK_PLAYGROUND_DRAFT_ID=q.PLAYGROUND_TOOL_DRAFT_ID=q.AgentType=q.FileStatus=q.MAX_BULK_RESOURCE_SHARE_OPERATIONS=q.MAX_BULK_MUTATION_IDS=q.RunExecutionKind=q.RequestSource=q.RunStatus=q.CredentialMode=q.UpsertMode=q.LogLevel=q.PaginationType=q.DecompressionMethod=q.AuthType=q.FileType=q.CacheMode=q.HttpMethod=q.SupportedFileType=q.ARTIFACT_EXPORT_FORMATS=q.MAX_HTML_ARTIFACT_BYTES=void 0;q.isArtifactExportFormat=FR;q.isRequestConfig=LR;q.isTransformConfig=PR;q.getDefaultProjectDisplayName=HR;q.projectResourceKey=ur;q.parseProjectResourceKey=YR;q.normalizeProjectResourceRefs=GR;q.uniqueProjectResourceRefs=VR;q.mergeProjectResourceRefs=WR;q.MAX_HTML_ARTIFACT_BYTES=128*1024;q.ARTIFACT_EXPORT_FORMATS=["html","pdf","docx"];function FR(o){return q.ARTIFACT_EXPORT_FORMATS.some(e=>e===o)}var Ax;(function(o){o.JSON="JSON",o.CSV="CSV",o.XML="XML",o.HTML="HTML",o.YAML="YAML",o.EXCEL="EXCEL",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.GZIP="GZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(Ax||(q.SupportedFileType=Ax={}));var wx;(function(o){o.GET="GET",o.POST="POST",o.PUT="PUT",o.DELETE="DELETE",o.PATCH="PATCH",o.HEAD="HEAD",o.OPTIONS="OPTIONS"})(wx||(q.HttpMethod=wx={}));var vx;(function(o){o.ENABLED="ENABLED",o.READONLY="READONLY",o.WRITEONLY="WRITEONLY",o.DISABLED="DISABLED"})(vx||(q.CacheMode=vx={}));var xx;(function(o){o.CSV="CSV",o.JSON="JSON",o.XML="XML",o.YAML="YAML",o.EXCEL="EXCEL",o.HTML="HTML",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(xx||(q.FileType=xx={}));var zx;(function(o){o.NONE="NONE",o.OAUTH2="OAUTH2",o.HEADER="HEADER",o.QUERY_PARAM="QUERY_PARAM"})(zx||(q.AuthType=zx={}));var qx;(function(o){o.GZIP="GZIP",o.DEFLATE="DEFLATE",o.NONE="NONE",o.AUTO="AUTO",o.ZIP="ZIP"})(qx||(q.DecompressionMethod=qx={}));var Ex;(function(o){o.OFFSET_BASED="OFFSET_BASED",o.PAGE_BASED="PAGE_BASED",o.CURSOR_BASED="CURSOR_BASED",o.DISABLED="DISABLED"})(Ex||(q.PaginationType=Ex={}));var Ix;(function(o){o.DEBUG="DEBUG",o.INFO="INFO",o.WARN="WARN",o.ERROR="ERROR"})(Ix||(q.LogLevel=Ix={}));var Cx;(function(o){o.CREATE="CREATE",o.UPDATE="UPDATE",o.UPSERT="UPSERT"})(Cx||(q.UpsertMode=Cx={}));var jx;(function(o){o.MERGE="MERGE",o.REPLACE="REPLACE"})(jx||(q.CredentialMode=jx={}));var Qx;(function(o){o.RUNNING="RUNNING",o.SUCCESS="SUCCESS",o.FAILED="FAILED",o.ABORTED="ABORTED"})(Qx||(q.RunStatus=Qx={}));var Bx;(function(o){o.API="api",o.FRONTEND="frontend",o.AGENT="agent",o.SCHEDULER="scheduler",o.MCP="mcp",o.TOOL_CHAIN="tool-chain",o.WEBHOOK="webhook",o.CLI="cli"})(Bx||(q.RequestSource=Bx={}));var Sx;(function(o){o.FULL="full",o.DRAFT="draft",o.SINGLE_STEP="single-step"})(Sx||(q.RunExecutionKind=Sx={}));q.MAX_BULK_MUTATION_IDS=100;q.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function LR(o){return!o||typeof o!="object"?!1:o.type==="request"||!("type"in o)||o.type===void 0}function PR(o){return o?.type==="transform"}var Dx;(function(o){o.PENDING="PENDING",o.UPLOADING="UPLOADING",o.PROCESSING="PROCESSING",o.COMPLETED="COMPLETED",o.FAILED="FAILED"})(Dx||(q.FileStatus=Dx={}));var ka;(function(o){o.MAIN="main",o.BACKGROUND_ARTIFACT="background_artifact",o.PLAYGROUND="playground",o.SYSTEM_PLAYGROUND="system_playground",o.PLAYBOOK_PLAYGROUND="playbook_playground",o.ARTIFACT_PLAYGROUND="artifact_playground",o.ACCESS_RULES="access_rules"})(ka||(q.AgentType=ka={}));q.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";q.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";q.ARTIFACT_PLAYGROUND_DRAFT_ID="@playground-draft";q.ARTIFACT_PROPOSAL_ID_PREFIX="artifact_proposal_";q.AGENT_GLOBAL_TOOLS=["run_command","load_skill"];q.AGENT_BASE_TOOLS=[...q.AGENT_GLOBAL_TOOLS,"call_system","run_tool","share_resource","use_checklist"];q.AGENT_TOOLS={[ka.MAIN]:[...q.AGENT_BASE_TOOLS],[ka.BACKGROUND_ARTIFACT]:["run_command","create_artifact"],[ka.PLAYGROUND]:[...q.AGENT_BASE_TOOLS,"edit_tool"],[ka.SYSTEM_PLAYGROUND]:[...q.AGENT_GLOBAL_TOOLS,"call_system","create_system","edit_system","set_credentials","authenticate_oauth","share_resource","use_checklist"],[ka.PLAYBOOK_PLAYGROUND]:[...q.AGENT_GLOBAL_TOOLS,"call_system","run_tool","create_playbook","edit_playbook","save_playbook","share_resource","use_checklist"],[ka.ARTIFACT_PLAYGROUND]:[...q.AGENT_BASE_TOOLS],[ka.ACCESS_RULES]:[...q.AGENT_GLOBAL_TOOLS,"create_role","edit_role","use_checklist"]};q.DYNAMIC_AGENT_TOOLS=["web_search"];q.AGENT_CHECKLIST_MIN_ITEMS=4;q.AGENT_CHECKLIST_MAX_ITEMS=15;q.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;q.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","file-handling"];q.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","file-runtime","tunnel-handling"];q.LOADABLE_MARKDOWN_NAMES=[...q.SKILL_BODY_NAMES,...q.SKILL_REFERENCE_NAMES];q.SKILL_GATED_TOOLS={"tool-building":["build_tool","set_tool_state"],"tool-editing":["edit_tool","save_tool","set_tool_state"],"system-setup":["create_system","edit_system","set_credentials","authenticate_oauth"],"tool-deployment":["create_schedule","edit_schedule","create_mcp_server","edit_mcp_server","show_mcp_server"],"access-management":["create_role","edit_role","share_resource"],playbooks:["create_playbook","edit_playbook"],projects:["create_project","edit_project"],artifacts:["create_artifact","start_background_agent","edit_artifact","share_artifact_externally"]};var Rx;(function(o){o.CONFIRMED="confirmed",o.CONFIRMED_AND_SAVE="confirmed_and_save",o.DECLINED="declined",o.OAUTH_SUCCESS="oauth_success",o.OAUTH_FAILURE="oauth_failure"})(Rx||(q.ConfirmationAction=Rx={}));q.AGENT_APPROVAL_MODES=["ask","act"];q.AGENT_MESSAGE_SCHEMA_VERSION=1;q.AGENT_SESSION_SCOPE_PATTERN=/^(tool|system|playbook|artifact):[\w-]+$/;q.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];q.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;q.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];q.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];q.PROJECT_LIMITS={name:80,description:500};q.DEFAULT_PROJECT_ID="default";function HR(o){return o.trim()||"Your workspace"}function ur(o){return`${o.type}:${o.id}`}function YR(o){let e=o.indexOf(":");return{type:o.slice(0,e),id:o.slice(e+1)}}function GR({value:o,field:e="resourceRefs"}){if(o===void 0)return{refs:[]};if(!Array.isArray(o))return{error:`${e} must be an array`};let t=[],a=new Set;for(let[i,s]of o.entries()){if(!s||typeof s!="object"||Array.isArray(s))return{error:`${e}[${i}] must be shaped as { type, id }`};let r=s,n=typeof r.type=="string"?r.type.trim():"",c=typeof r.id=="string"?r.id.trim():"";if(!q.PROJECT_RESOURCE_TYPES.includes(n))return{error:`${e}[${i}].type is unsupported`};if(!c||c.length>255)return{error:`${e}[${i}].id must contain between 1 and 255 characters`};let m={type:n,id:c},l=ur(m);a.has(l)||t.push(m),a.add(l)}return{refs:t}}function VR(o){return[...new Map(o.map(e=>[ur(e),e])).values()]}function WR({current:o,add:e,remove:t}){let a=new Map(o.map(i=>[ur(i),i]));for(let i of t)a.delete(ur(i));for(let i of e)a.set(ur(i),i);return[...a.values()]}q.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:2e3,instructions:8e3,completionCriteria:2e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:24e3}});var $R,Nx,Tx,JR,KR,ZR,XR,Ux=he(()=>{"use strict";$R=o=>{let e=Tx(o,0);if(e===void 0||!KR(o[e]))return;let t=Tx(o,e+1);if(t!==void 0)return ZR(o,e,t)},Nx=$R,Tx=(o,e)=>{for(let t=e;t<o.length;t+=1){let a=o[t];if(!JR(a))return t}},JR=o=>o===" "||o===" "||o===`
|
|
2
|
+
"use strict";var hS=Object.create;var al=Object.defineProperty;var fS=Object.getOwnPropertyDescriptor;var bS=Object.getOwnPropertyNames;var yS=Object.getPrototypeOf,kS=Object.prototype.hasOwnProperty;var he=(o,e)=>()=>(o&&(e=o(o=0)),e);var y=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),zv=(o,e)=>{for(var t in e)al(o,t,{get:e[t],enumerable:!0})},qv=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bS(e))!kS.call(o,i)&&i!==t&&al(o,i,{get:()=>e[i],enumerable:!(a=fS(e,i))||a.enumerable});return o};var $=(o,e,t)=>(t=o!=null?hS(yS(o)):{},qv(e||!o||!o.__esModule?al(t,"default",{value:o,enumerable:!0}):t,o)),Qp=o=>qv(al({},"__esModule",{value:!0}),o);var Qv=y((ole,jv)=>{"use strict";var Ev=9007199254740991,AS="[object Arguments]",wS="[object Function]",vS="[object GeneratorFunction]",xS=/^(?:0|[1-9]\d*)$/;function zS(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function qS(o,e){return function(t){return o(e(t))}}var il=Object.prototype,Bp=il.hasOwnProperty,Iv=il.toString,ES=il.propertyIsEnumerable,IS=qS(Object.keys,Object);function CS(o,e){var t=DS(o)||SS(o)?zS(o.length,String):[],a=t.length,i=!!a;for(var s in o)(e||Bp.call(o,s))&&!(i&&(s=="length"||QS(s,a)))&&t.push(s);return t}function jS(o){if(!BS(o))return IS(o);var e=[];for(var t in Object(o))Bp.call(o,t)&&t!="constructor"&&e.push(t);return e}function QS(o,e){return e=e??Ev,!!e&&(typeof o=="number"||xS.test(o))&&o>-1&&o%1==0&&o<e}function BS(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||il;return o===t}function SS(o){return RS(o)&&Bp.call(o,"callee")&&(!ES.call(o,"callee")||Iv.call(o)==AS)}var DS=Array.isArray;function Cv(o){return o!=null&&NS(o.length)&&!TS(o)}function RS(o){return MS(o)&&Cv(o)}function TS(o){var e=US(o)?Iv.call(o):"";return e==wS||e==vS}function NS(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Ev}function US(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function MS(o){return!!o&&typeof o=="object"}function OS(o){return Cv(o)?CS(o):jS(o)}jv.exports=OS});var sx=y((Pn,ir)=>{"use strict";var _S=200,_v="__lodash_hash_undefined__",FS=800,LS=16,Fv=9007199254740991,Lv="[object Arguments]",PS="[object Array]",HS="[object AsyncFunction]",YS="[object Boolean]",GS="[object Date]",VS="[object Error]",Pv="[object Function]",WS="[object GeneratorFunction]",$S="[object Map]",JS="[object Number]",KS="[object Null]",Hv="[object Object]",ZS="[object Proxy]",XS="[object RegExp]",e7="[object Set]",o7="[object String]",t7="[object Undefined]",a7="[object WeakMap]",i7="[object ArrayBuffer]",s7="[object DataView]",r7="[object Float32Array]",n7="[object Float64Array]",c7="[object Int8Array]",m7="[object Int16Array]",l7="[object Int32Array]",u7="[object Uint8Array]",d7="[object Uint8ClampedArray]",g7="[object Uint16Array]",p7="[object Uint32Array]",h7=/[\\^$.*+?()[\]{}|]/g,f7=/^\[object .+?Constructor\]$/,b7=/^(?:0|[1-9]\d*)$/,ye={};ye[r7]=ye[n7]=ye[c7]=ye[m7]=ye[l7]=ye[u7]=ye[d7]=ye[g7]=ye[p7]=!0;ye[Lv]=ye[PS]=ye[i7]=ye[YS]=ye[s7]=ye[GS]=ye[VS]=ye[Pv]=ye[$S]=ye[JS]=ye[Hv]=ye[XS]=ye[e7]=ye[o7]=ye[a7]=!1;var Yv=typeof global=="object"&&global&&global.Object===Object&&global,y7=typeof self=="object"&&self&&self.Object===Object&&self,Gn=Yv||y7||Function("return this")(),Gv=typeof Pn=="object"&&Pn&&!Pn.nodeType&&Pn,Hn=Gv&&typeof ir=="object"&&ir&&!ir.nodeType&&ir,Vv=Hn&&Hn.exports===Gv,Sp=Vv&&Yv.process,Bv=(function(){try{var o=Hn&&Hn.require&&Hn.require("util").types;return o||Sp&&Sp.binding&&Sp.binding("util")}catch{}})(),Sv=Bv&&Bv.isTypedArray;function k7(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function A7(o,e){for(var t=-1,a=Array(o);++t<o;)a[t]=e(t);return a}function w7(o){return function(e){return o(e)}}function v7(o,e){return o?.[e]}function x7(o,e){return function(t){return o(e(t))}}var z7=Array.prototype,q7=Function.prototype,nl=Object.prototype,Dp=Gn["__core-js_shared__"],cl=q7.toString,fa=nl.hasOwnProperty,Dv=(function(){var o=/[^.]+$/.exec(Dp&&Dp.keys&&Dp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),Wv=nl.toString,E7=cl.call(Object),I7=RegExp("^"+cl.call(fa).replace(h7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),sl=Vv?Gn.Buffer:void 0,Rv=Gn.Symbol,Tv=Gn.Uint8Array,Nv=sl?sl.allocUnsafe:void 0,$v=x7(Object.getPrototypeOf,Object),Uv=Object.create,C7=nl.propertyIsEnumerable,j7=z7.splice,$i=Rv?Rv.toStringTag:void 0,rl=(function(){try{var o=Op(Object,"defineProperty");return o({},"",{}),o}catch{}})(),Q7=sl?sl.isBuffer:void 0,Mv=Math.max,B7=Date.now,Jv=Op(Gn,"Map"),Yn=Op(Object,"create"),S7=(function(){function o(){}return function(e){if(!Ki(e))return{};if(Uv)return Uv(e);o.prototype=e;var t=new o;return o.prototype=void 0,t}})();function Ji(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function D7(){this.__data__=Yn?Yn(null):{},this.size=0}function R7(o){var e=this.has(o)&&delete this.__data__[o];return this.size-=e?1:0,e}function T7(o){var e=this.__data__;if(Yn){var t=e[o];return t===_v?void 0:t}return fa.call(e,o)?e[o]:void 0}function N7(o){var e=this.__data__;return Yn?e[o]!==void 0:fa.call(e,o)}function U7(o,e){var t=this.__data__;return this.size+=this.has(o)?0:1,t[o]=Yn&&e===void 0?_v:e,this}Ji.prototype.clear=D7;Ji.prototype.delete=R7;Ji.prototype.get=T7;Ji.prototype.has=N7;Ji.prototype.set=U7;function ba(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function M7(){this.__data__=[],this.size=0}function O7(o){var e=this.__data__,t=ml(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():j7.call(e,t,1),--this.size,!0}function _7(o){var e=this.__data__,t=ml(e,o);return t<0?void 0:e[t][1]}function F7(o){return ml(this.__data__,o)>-1}function L7(o,e){var t=this.__data__,a=ml(t,o);return a<0?(++this.size,t.push([o,e])):t[a][1]=e,this}ba.prototype.clear=M7;ba.prototype.delete=O7;ba.prototype.get=_7;ba.prototype.has=F7;ba.prototype.set=L7;function sr(o){var e=-1,t=o==null?0:o.length;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function P7(){this.size=0,this.__data__={hash:new Ji,map:new(Jv||ba),string:new Ji}}function H7(o){var e=ul(this,o).delete(o);return this.size-=e?1:0,e}function Y7(o){return ul(this,o).get(o)}function G7(o){return ul(this,o).has(o)}function V7(o,e){var t=ul(this,o),a=t.size;return t.set(o,e),this.size+=t.size==a?0:1,this}sr.prototype.clear=P7;sr.prototype.delete=H7;sr.prototype.get=Y7;sr.prototype.has=G7;sr.prototype.set=V7;function rr(o){var e=this.__data__=new ba(o);this.size=e.size}function W7(){this.__data__=new ba,this.size=0}function $7(o){var e=this.__data__,t=e.delete(o);return this.size=e.size,t}function J7(o){return this.__data__.get(o)}function K7(o){return this.__data__.has(o)}function Z7(o,e){var t=this.__data__;if(t instanceof ba){var a=t.__data__;if(!Jv||a.length<_S-1)return a.push([o,e]),this.size=++t.size,this;t=this.__data__=new sr(a)}return t.set(o,e),this.size=t.size,this}rr.prototype.clear=W7;rr.prototype.delete=$7;rr.prototype.get=J7;rr.prototype.has=K7;rr.prototype.set=Z7;function X7(o,e){var t=Up(o),a=!t&&Np(o),i=!t&&!a&&ex(o),s=!t&&!a&&!i&&tx(o),r=t||a||i||s,n=r?A7(o.length,String):[],c=n.length;for(var m in o)(e||fa.call(o,m))&&!(r&&(m=="length"||i&&(m=="offset"||m=="parent")||s&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||Zv(m,c)))&&n.push(m);return n}function Rp(o,e,t){(t!==void 0&&!dl(o[e],t)||t===void 0&&!(e in o))&&Mp(o,e,t)}function eD(o,e,t){var a=o[e];(!(fa.call(o,e)&&dl(a,t))||t===void 0&&!(e in o))&&Mp(o,e,t)}function ml(o,e){for(var t=o.length;t--;)if(dl(o[t][0],e))return t;return-1}function Mp(o,e,t){e=="__proto__"&&rl?rl(o,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):o[e]=t}var oD=pD();function ll(o){return o==null?o===void 0?t7:KS:$i&&$i in Object(o)?hD(o):wD(o)}function Ov(o){return Vn(o)&&ll(o)==Lv}function tD(o){if(!Ki(o)||kD(o))return!1;var e=Fp(o)?I7:f7;return e.test(qD(o))}function aD(o){return Vn(o)&&ox(o.length)&&!!ye[ll(o)]}function iD(o){if(!Ki(o))return AD(o);var e=Xv(o),t=[];for(var a in o)a=="constructor"&&(e||!fa.call(o,a))||t.push(a);return t}function Kv(o,e,t,a,i){o!==e&&oD(e,function(s,r){if(i||(i=new rr),Ki(s))sD(o,e,r,t,Kv,a,i);else{var n=a?a(Tp(o,r),s,r+"",o,e,i):void 0;n===void 0&&(n=s),Rp(o,r,n)}},ax)}function sD(o,e,t,a,i,s,r){var n=Tp(o,t),c=Tp(e,t),m=r.get(c);if(m){Rp(o,t,m);return}var l=s?s(n,c,t+"",o,e,r):void 0,u=l===void 0;if(u){var d=Up(c),g=!d&&ex(c),p=!d&&!g&&tx(c);l=c,d||g||p?Up(n)?l=n:ED(n)?l=uD(n):g?(u=!1,l=cD(c,!0)):p?(u=!1,l=lD(c,!0)):l=[]:ID(c)||Np(c)?(l=n,Np(n)?l=CD(n):(!Ki(n)||Fp(n))&&(l=fD(c))):u=!1}u&&(r.set(c,l),i(l,c,a,s,r),r.delete(c)),Rp(o,t,l)}function rD(o,e){return xD(vD(o,e,ix),o+"")}var nD=rl?function(o,e){return rl(o,"toString",{configurable:!0,enumerable:!1,value:QD(e),writable:!0})}:ix;function cD(o,e){if(e)return o.slice();var t=o.length,a=Nv?Nv(t):new o.constructor(t);return o.copy(a),a}function mD(o){var e=new o.constructor(o.byteLength);return new Tv(e).set(new Tv(o)),e}function lD(o,e){var t=e?mD(o.buffer):o.buffer;return new o.constructor(t,o.byteOffset,o.length)}function uD(o,e){var t=-1,a=o.length;for(e||(e=Array(a));++t<a;)e[t]=o[t];return e}function dD(o,e,t,a){var i=!t;t||(t={});for(var s=-1,r=e.length;++s<r;){var n=e[s],c=a?a(t[n],o[n],n,t,o):void 0;c===void 0&&(c=o[n]),i?Mp(t,n,c):eD(t,n,c)}return t}function gD(o){return rD(function(e,t){var a=-1,i=t.length,s=i>1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(s=o.length>3&&typeof s=="function"?(i--,s):void 0,r&&bD(t[0],t[1],r)&&(s=i<3?void 0:s,i=1),e=Object(e);++a<i;){var n=t[a];n&&o(e,n,a,s)}return e})}function pD(o){return function(e,t,a){for(var i=-1,s=Object(e),r=a(e),n=r.length;n--;){var c=r[o?n:++i];if(t(s[c],c,s)===!1)break}return e}}function ul(o,e){var t=o.__data__;return yD(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Op(o,e){var t=v7(o,e);return tD(t)?t:void 0}function hD(o){var e=fa.call(o,$i),t=o[$i];try{o[$i]=void 0;var a=!0}catch{}var i=Wv.call(o);return a&&(e?o[$i]=t:delete o[$i]),i}function fD(o){return typeof o.constructor=="function"&&!Xv(o)?S7($v(o)):{}}function Zv(o,e){var t=typeof o;return e=e??Fv,!!e&&(t=="number"||t!="symbol"&&b7.test(o))&&o>-1&&o%1==0&&o<e}function bD(o,e,t){if(!Ki(t))return!1;var a=typeof e;return(a=="number"?_p(t)&&Zv(e,t.length):a=="string"&&e in t)?dl(t[e],o):!1}function yD(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function kD(o){return!!Dv&&Dv in o}function Xv(o){var e=o&&o.constructor,t=typeof e=="function"&&e.prototype||nl;return o===t}function AD(o){var e=[];if(o!=null)for(var t in Object(o))e.push(t);return e}function wD(o){return Wv.call(o)}function vD(o,e,t){return e=Mv(e===void 0?o.length-1:e,0),function(){for(var a=arguments,i=-1,s=Mv(a.length-e,0),r=Array(s);++i<s;)r[i]=a[e+i];i=-1;for(var n=Array(e+1);++i<e;)n[i]=a[i];return n[e]=t(r),k7(o,this,n)}}function Tp(o,e){if(!(e==="constructor"&&typeof o[e]=="function")&&e!="__proto__")return o[e]}var xD=zD(nD);function zD(o){var e=0,t=0;return function(){var a=B7(),i=LS-(a-t);if(t=a,i>0){if(++e>=FS)return arguments[0]}else e=0;return o.apply(void 0,arguments)}}function qD(o){if(o!=null){try{return cl.call(o)}catch{}try{return o+""}catch{}}return""}function dl(o,e){return o===e||o!==o&&e!==e}var Np=Ov((function(){return arguments})())?Ov:function(o){return Vn(o)&&fa.call(o,"callee")&&!C7.call(o,"callee")},Up=Array.isArray;function _p(o){return o!=null&&ox(o.length)&&!Fp(o)}function ED(o){return Vn(o)&&_p(o)}var ex=Q7||BD;function Fp(o){if(!Ki(o))return!1;var e=ll(o);return e==Pv||e==WS||e==HS||e==ZS}function ox(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=Fv}function Ki(o){var e=typeof o;return o!=null&&(e=="object"||e=="function")}function Vn(o){return o!=null&&typeof o=="object"}function ID(o){if(!Vn(o)||ll(o)!=Hv)return!1;var e=$v(o);if(e===null)return!0;var t=fa.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&cl.call(t)==E7}var tx=Sv?w7(Sv):aD;function CD(o){return dD(o,ax(o))}function ax(o){return _p(o)?X7(o,!0):iD(o)}var jD=gD(function(o,e,t){Kv(o,e,t)});function QD(o){return function(){return o}}function ix(o){return o}function BD(){return!1}ir.exports=jD});var kx=y((tle,yx)=>{"use strict";var mx=200,Hp="__lodash_hash_undefined__",SD=1/0,DD=9007199254740991,RD="[object Function]",TD="[object GeneratorFunction]",ND=/[\\^$.*+?()[\]{}|]/g,UD=/^\[object .+?Constructor\]$/,MD=typeof global=="object"&&global&&global.Object===Object&&global,OD=typeof self=="object"&&self&&self.Object===Object&&self,Yp=MD||OD||Function("return this")();function _D(o,e,t){switch(t.length){case 0:return o.call(e);case 1:return o.call(e,t[0]);case 2:return o.call(e,t[0],t[1]);case 3:return o.call(e,t[0],t[1],t[2])}return o.apply(e,t)}function FD(o,e){for(var t=-1,a=o?o.length:0,i=0,s=[];++t<a;){var r=o[t];e(r,t,o)&&(s[i++]=r)}return s}function lx(o,e){var t=o?o.length:0;return!!t&&YD(o,e,0)>-1}function ux(o,e,t){for(var a=-1,i=o?o.length:0;++a<i;)if(t(e,o[a]))return!0;return!1}function LD(o,e){for(var t=-1,a=o?o.length:0,i=Array(a);++t<a;)i[t]=e(o[t],t,o);return i}function PD(o,e){for(var t=-1,a=e.length,i=o.length;++t<a;)o[i+t]=e[t];return o}function HD(o,e,t,a){for(var i=o.length,s=t+(a?1:-1);a?s--:++s<i;)if(e(o[s],s,o))return s;return-1}function YD(o,e,t){if(e!==e)return HD(o,GD,t);for(var a=t-1,i=o.length;++a<i;)if(o[a]===e)return a;return-1}function GD(o){return o!==o}function VD(o){return function(e){return o(e)}}function dx(o,e){return o.has(e)}function WD(o,e){return o?.[e]}function $D(o){var e=!1;if(o!=null&&typeof o.toString!="function")try{e=!!(o+"")}catch{}return e}function gx(o){var e=-1,t=Array(o.size);return o.forEach(function(a){t[++e]=a}),t}var JD=Array.prototype,KD=Function.prototype,px=Object.prototype,Lp=Yp["__core-js_shared__"],rx=(function(){var o=/[^.]+$/.exec(Lp&&Lp.keys&&Lp.keys.IE_PROTO||"");return o?"Symbol(src)_1."+o:""})(),hx=KD.toString,Gp=px.hasOwnProperty,ZD=px.toString,XD=RegExp("^"+hx.call(Gp).replace(ND,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),eR=JD.splice,nx=Math.max,oR=Vp(Yp,"Map"),Pp=Vp(Yp,"Set"),Wn=Vp(Object,"create");function Zi(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function tR(){this.__data__=Wn?Wn(null):{}}function aR(o){return this.has(o)&&delete this.__data__[o]}function iR(o){var e=this.__data__;if(Wn){var t=e[o];return t===Hp?void 0:t}return Gp.call(e,o)?e[o]:void 0}function sR(o){var e=this.__data__;return Wn?e[o]!==void 0:Gp.call(e,o)}function rR(o,e){var t=this.__data__;return t[o]=Wn&&e===void 0?Hp:e,this}Zi.prototype.clear=tR;Zi.prototype.delete=aR;Zi.prototype.get=iR;Zi.prototype.has=sR;Zi.prototype.set=rR;function nr(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function nR(){this.__data__=[]}function cR(o){var e=this.__data__,t=gl(e,o);if(t<0)return!1;var a=e.length-1;return t==a?e.pop():eR.call(e,t,1),!0}function mR(o){var e=this.__data__,t=gl(e,o);return t<0?void 0:e[t][1]}function lR(o){return gl(this.__data__,o)>-1}function uR(o,e){var t=this.__data__,a=gl(t,o);return a<0?t.push([o,e]):t[a][1]=e,this}nr.prototype.clear=nR;nr.prototype.delete=cR;nr.prototype.get=mR;nr.prototype.has=lR;nr.prototype.set=uR;function cr(o){var e=-1,t=o?o.length:0;for(this.clear();++e<t;){var a=o[e];this.set(a[0],a[1])}}function dR(){this.__data__={hash:new Zi,map:new(oR||nr),string:new Zi}}function gR(o){return pl(this,o).delete(o)}function pR(o){return pl(this,o).get(o)}function hR(o){return pl(this,o).has(o)}function fR(o,e){return pl(this,o).set(o,e),this}cr.prototype.clear=dR;cr.prototype.delete=gR;cr.prototype.get=pR;cr.prototype.has=hR;cr.prototype.set=fR;function $n(o){var e=-1,t=o?o.length:0;for(this.__data__=new cr;++e<t;)this.add(o[e])}function bR(o){return this.__data__.set(o,Hp),this}function yR(o){return this.__data__.has(o)}$n.prototype.add=$n.prototype.push=bR;$n.prototype.has=yR;function gl(o,e){for(var t=o.length;t--;)if(CR(o[t][0],e))return t;return-1}function cx(o,e,t,a){var i=-1,s=lx,r=!0,n=o.length,c=[],m=e.length;if(!n)return c;t&&(e=LD(e,VD(t))),a?(s=ux,r=!1):e.length>=mx&&(s=dx,r=!1,e=new $n(e));e:for(;++i<n;){var l=o[i],u=t?t(l):l;if(l=a||l!==0?l:0,r&&u===u){for(var d=m;d--;)if(e[d]===u)continue e;c.push(l)}else s(e,u,a)||c.push(l)}return c}function kR(o){if(!bx(o)||qR(o))return!1;var e=fx(o)||$D(o)?XD:UD;return e.test(ER(o))}function AR(o,e){return e=nx(e===void 0?o.length-1:e,0),function(){for(var t=arguments,a=-1,i=nx(t.length-e,0),s=Array(i);++a<i;)s[a]=t[e+a];a=-1;for(var r=Array(e+1);++a<e;)r[a]=t[a];return r[e]=s,_D(o,this,r)}}function wR(o,e,t){var a=-1,i=lx,s=o.length,r=!0,n=[],c=n;if(t)r=!1,i=ux;else if(s>=mx){var m=e?null:xR(o);if(m)return gx(m);r=!1,i=dx,c=new $n}else c=e?[]:n;e:for(;++a<s;){var l=o[a],u=e?e(l):l;if(l=t||l!==0?l:0,r&&u===u){for(var d=c.length;d--;)if(c[d]===u)continue e;e&&c.push(u),n.push(l)}else i(c,u,t)||(c!==n&&c.push(u),n.push(l))}return n}function vR(o,e,t){for(var a=-1,i=o.length;++a<i;)var s=s?PD(cx(s,o[a],e,t),cx(o[a],s,e,t)):o[a];return s&&s.length?wR(s,e,t):[]}var xR=Pp&&1/gx(new Pp([,-0]))[1]==SD?function(o){return new Pp(o)}:DR;function pl(o,e){var t=o.__data__;return zR(e)?t[typeof e=="string"?"string":"hash"]:t.map}function Vp(o,e){var t=WD(o,e);return kR(t)?t:void 0}function zR(o){var e=typeof o;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?o!=="__proto__":o===null}function qR(o){return!!rx&&rx in o}function ER(o){if(o!=null){try{return hx.call(o)}catch{}try{return o+""}catch{}}return""}var IR=AR(function(o){return vR(FD(o,QR))});function CR(o,e){return o===e||o!==o&&e!==e}function jR(o){return o!=null&&BR(o.length)&&!fx(o)}function QR(o){return SR(o)&&jR(o)}function fx(o){var e=bx(o)?ZD.call(o):"";return e==RD||e==TD}function BR(o){return typeof o=="number"&&o>-1&&o%1==0&&o<=DD}function bx(o){var e=typeof o;return!!o&&(e=="object"||e=="function")}function SR(o){return!!o&&typeof o=="object"}function DR(){}yx.exports=IR});var fl=y(ya=>{"use strict";var Kp=ya&&ya.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(ya,"__esModule",{value:!0});ya.toJsonSchema=OR;ya.convertRequiredToArray=Jn;ya.generateDefaultFromSchema=Kn;ya.parseJsonSafe=hl;ya.normalizeToolSchemas=_R;var Wp=Kp(Qv()),$p=Kp(sx()),RR=Kp(kx());function mr(o,e){if(o===e)return!0;if(o===null||e===null||typeof o!="object"||typeof e!="object"||Array.isArray(o)!==Array.isArray(e))return!1;let t=Object.keys(o),a=Object.keys(e);if(t.length!==a.length)return!1;let i=e;return t.every(s=>s in i&&mr(o[s],i[s]))}var TR={required:!1,requiredDepth:Number.POSITIVE_INFINITY,postProcessFnc:null,strings:{preProcessFnc:null},arrays:{mode:"all"},objects:{preProcessFnc:null,postProcessFnc:null,additionalProperties:!0}},NR={string:function(e){return typeof e=="string"},number:function(e){return typeof e=="number"&&isFinite(e)},integer:function(e){return typeof e=="number"&&e%1===0},boolean:function(e){return typeof e=="boolean"},array:function(e){return e instanceof Array},null:function(e){return e===null},date:function(e){return e instanceof Date},any:function(e){return!0},object:function(e){return e&&typeof e=="object"&&!(e instanceof Array)&&!(e instanceof Date)}},lr={typeNames:["integer","number","string","array","object","boolean","null","date"],getType(o){return lr.typeNames.find(e=>NR[e](o))},mergeSchemaObjs(o,e){if(!o||!e)return null;let t=(0,Wp.default)(o),a=(0,Wp.default)(e);if(!mr(t,a)){if(o.type==="array"&&e.type==="array"&&mr((0,RR.default)(t,a),["items"])){let s=t.length>a.length?e:o,r=t.length>a.length?o:e;if((0,Wp.default)(s).reduce((c,m)=>mr(s[m],r[m])&&c,!0))return s}if(o.type!=="object"||e.type!=="object")return null}let i={};for(let s=0,{length:r}=t;s<r;s++){let n=t[s];if(lr.getType(o[n])==="object"){let c=lr.mergeSchemaObjs(o[n],e[n]);if(c)i[n]=c;else{if(o.type==="object"||e.type==="object")return{type:"object"};if(n!=="items"||o.type!=="array"||e.type!=="array")return null}}else if(n==="type")if(o[n]!==e[n])if(o[n]==="integer"&&e[n]==="number"||o[n]==="number"&&e[n]==="integer")i[n]="number";else return null;else i[n]=o[n];else{if(!mr(o[n],e[n]))return null;i[n]=o[n]}}return i}};function UR(o){let e;for(let t=0,{length:a}=o;t<a;t++){let i=o[t];if(t>0&&(i==="integer"&&e==="number"?i="number":i==="number"&&e==="integer"&&(e="number"),e!==i))return null;e=i}return e}function MR(o){return UR(o.map(e=>lr.getType(e)))}var Jp=class{constructor(e){this.options=(0,$p.default)({},TR,e),this.depth=0,this.getObjectSchemaDefault=this.getObjectSchemaDefault.bind(this),this.getStringSchemaDefault=this.getStringSchemaDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this),this.commmonPostProcessDefault=this.commmonPostProcessDefault.bind(this),this.objectPostProcessDefault=this.objectPostProcessDefault.bind(this)}getCommonArrayItemSchema(e){let t=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i});return t.reduce((a,i)=>lr.mergeSchemaObjs(a,i),t.pop())}getObjectSchemaDefault(e){let t={type:"object"},a=Object.keys(e);return a.length>0&&(t.properties=a.reduce((i,s)=>(this.depth++,i[s]=this.getSchema(e[s]),this.depth--,i),{})),t}getObjectSchema(e){return this.options.objects.preProcessFnc?this.options.objects.preProcessFnc(e,this.getObjectSchemaDefault):this.getObjectSchemaDefault(e)}getArraySchemaMerging(e){let t={type:"array"},a=MR(e);if(a)if(t.items={type:a},a!=="integer"&&a!=="number"){let i=this.getCommonArrayItemSchema(e);i&&(t.items=i)}else this.options.required&&(t.items.required=!0);return t}getArraySchemaNoMerging(e){let t={type:"array"};return e.length>0&&(this.depth++,t.items=this.getSchema(e[0]),this.depth--),t}getArraySchemaTuple(e){let t={type:"array"};return e.length>0&&(t.items=e.map(a=>{this.depth++;let i=this.getSchema(a);return this.depth--,i})),t}getArraySchemaUniform(e){let t=this.getArraySchemaNoMerging(e);if(e.length>1)for(let a=1;a<e.length;a++){this.depth++;let i=this.getSchema(e[a]);if(this.depth--,!mr(t.items,i))throw new Error("Invalid schema, incompatible array items")}return t}getArraySchema(e){if(e.length===0)return{type:"array"};switch(this.options.arrays.mode){case"all":return this.getArraySchemaMerging(e);case"first":return this.getArraySchemaNoMerging(e);case"uniform":return this.getArraySchemaUniform(e);case"tuple":return this.getArraySchemaTuple(e);default:throw new Error(`Unknown array mode option '${this.options.arrays.mode}'`)}}getStringSchemaDefault(e){return{type:"string"}}getStringSchema(e){return this.options.strings.preProcessFnc?this.options.strings.preProcessFnc(e,this.getStringSchemaDefault):this.getStringSchemaDefault(e)}commmonPostProcessDefault(e,t,a){return this.options.required&&this.depth<=this.options.requiredDepth?(0,$p.default)({},t,{required:!0}):t}objectPostProcessDefault(e,t){return this.options.objects.additionalProperties===!1&&Object.getOwnPropertyNames(t).length>0?(0,$p.default)({},e,{additionalProperties:!1}):e}getSchema(e){let t=lr.getType(e);t||(t="null");let a;switch(t){case"object":a=this.getObjectSchema(e);break;case"array":a=this.getArraySchema(e);break;case"string":a=this.getStringSchema(e);break;default:a={type:t}}return this.options.postProcessFnc?a=this.options.postProcessFnc(t,a,e,this.commmonPostProcessDefault):a=this.commmonPostProcessDefault(t,a,e),t==="object"&&(this.options.objects.postProcessFnc?a=this.options.objects.postProcessFnc(a,e,this.objectPostProcessDefault):a=this.objectPostProcessDefault(a,e)),a}};function OR(o,e){return new Jp(e).getSchema(o)}function Jn(o){if(!o||typeof o!="object")return o;if(Array.isArray(o))return o.map(t=>Jn(t));let e={...o};if(delete e.required,e.properties&&typeof e.properties=="object"){let t=[],a={};for(let[i,s]of Object.entries(e.properties)){let r=s;if(r&&typeof r=="object"&&r.required===!0){t.push(i);let{required:n,...c}=r;a[i]=Jn(c)}else a[i]=Jn(r)}e.properties=a,t.length>0&&(e.required=t)}return e.items&&(e.items=Jn(e.items)),e}function Kn(o){if(!o||typeof o!="object")return null;if(o.const!==void 0)return o.const;if(o.enum&&Array.isArray(o.enum)&&o.enum.length>0)return o.enum[0];if(o.default!==void 0)return o.default;if(o.oneOf&&Array.isArray(o.oneOf)&&o.oneOf.length>0)return Kn(o.oneOf[0]);if(o.anyOf&&Array.isArray(o.anyOf)&&o.anyOf.length>0)return Kn(o.anyOf[0]);switch(Array.isArray(o.type)?o.type[0]:o.type){case"string":case"number":case"integer":case"boolean":return null;case"null":return null;case"array":return o.items?[]:[];case"object":let t={};if(o.properties&&typeof o.properties=="object"){let a=o.required||[];for(let[i,s]of Object.entries(o.properties))t[i]=Kn(s)}return t;default:if(o.properties&&typeof o.properties=="object"){let a={};for(let[i,s]of Object.entries(o.properties))a[i]=Kn(s);return a}return null}}function hl(o){if(typeof o!="string")return o;try{return JSON.parse(o)}catch{return o}}function _R(o){let e={...o};return e.inputSchema&&(e.inputSchema=hl(e.inputSchema)),e.outputSchema&&(e.outputSchema=hl(e.outputSchema)),e.responseSchema&&(e.responseSchema=hl(e.responseSchema)),e}});var at=y(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.PLAYBOOK_LIMITS=q.DEFAULT_PROJECT_ID=q.PROJECT_LIMITS=q.PROJECT_RESOURCE_TYPES=q.MCP_SERVER_AUTH_MODES=q.OAUTH_CONTINUATION_REASON_MAX_CHARS=q.AGENT_REQUEST_BUSY_STATUSES=q.AGENT_SESSION_SCOPE_PATTERN=q.AGENT_MESSAGE_SCHEMA_VERSION=q.AGENT_APPROVAL_MODES=q.ConfirmationAction=q.SKILL_GATED_TOOLS=q.LOADABLE_MARKDOWN_NAMES=q.SKILL_REFERENCE_NAMES=q.SKILL_BODY_NAMES=q.AGENT_CHECKLIST_MAX_LABEL_CHARS=q.AGENT_CHECKLIST_MAX_ITEMS=q.AGENT_CHECKLIST_MIN_ITEMS=q.DYNAMIC_AGENT_TOOLS=q.AGENT_TOOLS=q.AGENT_BASE_TOOLS=q.AGENT_GLOBAL_TOOLS=q.ARTIFACT_PROPOSAL_ID_PREFIX=q.ARTIFACT_PLAYGROUND_DRAFT_ID=q.PLAYBOOK_PLAYGROUND_DRAFT_ID=q.PLAYGROUND_TOOL_DRAFT_ID=q.AgentType=q.FileStatus=q.MAX_BULK_RESOURCE_SHARE_OPERATIONS=q.MAX_BULK_MUTATION_IDS=q.RunExecutionKind=q.RequestSource=q.RunStatus=q.CredentialMode=q.UpsertMode=q.LogLevel=q.PaginationType=q.DecompressionMethod=q.AuthType=q.FileType=q.CacheMode=q.HttpMethod=q.SupportedFileType=q.ARTIFACT_EXPORT_FORMATS=q.MAX_HTML_ARTIFACT_BYTES=void 0;q.isArtifactExportFormat=FR;q.isRequestConfig=LR;q.isTransformConfig=PR;q.getDefaultProjectDisplayName=HR;q.projectResourceKey=ur;q.parseProjectResourceKey=YR;q.normalizeProjectResourceRefs=GR;q.uniqueProjectResourceRefs=VR;q.mergeProjectResourceRefs=WR;q.MAX_HTML_ARTIFACT_BYTES=128*1024;q.ARTIFACT_EXPORT_FORMATS=["html","pdf","docx"];function FR(o){return q.ARTIFACT_EXPORT_FORMATS.some(e=>e===o)}var Ax;(function(o){o.JSON="JSON",o.CSV="CSV",o.XML="XML",o.HTML="HTML",o.YAML="YAML",o.EXCEL="EXCEL",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.GZIP="GZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(Ax||(q.SupportedFileType=Ax={}));var wx;(function(o){o.GET="GET",o.POST="POST",o.PUT="PUT",o.DELETE="DELETE",o.PATCH="PATCH",o.HEAD="HEAD",o.OPTIONS="OPTIONS"})(wx||(q.HttpMethod=wx={}));var vx;(function(o){o.ENABLED="ENABLED",o.READONLY="READONLY",o.WRITEONLY="WRITEONLY",o.DISABLED="DISABLED"})(vx||(q.CacheMode=vx={}));var xx;(function(o){o.CSV="CSV",o.JSON="JSON",o.XML="XML",o.YAML="YAML",o.EXCEL="EXCEL",o.HTML="HTML",o.PDF="PDF",o.DOCX="DOCX",o.PPTX="PPTX",o.ZIP="ZIP",o.BINARY="BINARY",o.RAW="RAW",o.AUTO="AUTO"})(xx||(q.FileType=xx={}));var zx;(function(o){o.NONE="NONE",o.OAUTH2="OAUTH2",o.HEADER="HEADER",o.QUERY_PARAM="QUERY_PARAM"})(zx||(q.AuthType=zx={}));var qx;(function(o){o.GZIP="GZIP",o.DEFLATE="DEFLATE",o.NONE="NONE",o.AUTO="AUTO",o.ZIP="ZIP"})(qx||(q.DecompressionMethod=qx={}));var Ex;(function(o){o.OFFSET_BASED="OFFSET_BASED",o.PAGE_BASED="PAGE_BASED",o.CURSOR_BASED="CURSOR_BASED",o.DISABLED="DISABLED"})(Ex||(q.PaginationType=Ex={}));var Ix;(function(o){o.DEBUG="DEBUG",o.INFO="INFO",o.WARN="WARN",o.ERROR="ERROR"})(Ix||(q.LogLevel=Ix={}));var Cx;(function(o){o.CREATE="CREATE",o.UPDATE="UPDATE",o.UPSERT="UPSERT"})(Cx||(q.UpsertMode=Cx={}));var jx;(function(o){o.MERGE="MERGE",o.REPLACE="REPLACE"})(jx||(q.CredentialMode=jx={}));var Qx;(function(o){o.RUNNING="RUNNING",o.SUCCESS="SUCCESS",o.FAILED="FAILED",o.ABORTED="ABORTED"})(Qx||(q.RunStatus=Qx={}));var Bx;(function(o){o.API="api",o.FRONTEND="frontend",o.AGENT="agent",o.SCHEDULER="scheduler",o.MCP="mcp",o.TOOL_CHAIN="tool-chain",o.WEBHOOK="webhook",o.CLI="cli"})(Bx||(q.RequestSource=Bx={}));var Sx;(function(o){o.FULL="full",o.DRAFT="draft",o.SINGLE_STEP="single-step"})(Sx||(q.RunExecutionKind=Sx={}));q.MAX_BULK_MUTATION_IDS=100;q.MAX_BULK_RESOURCE_SHARE_OPERATIONS=1e3;function LR(o){return!o||typeof o!="object"?!1:o.type==="request"||!("type"in o)||o.type===void 0}function PR(o){return o?.type==="transform"}var Dx;(function(o){o.PENDING="PENDING",o.UPLOADING="UPLOADING",o.PROCESSING="PROCESSING",o.COMPLETED="COMPLETED",o.FAILED="FAILED"})(Dx||(q.FileStatus=Dx={}));var ka;(function(o){o.MAIN="main",o.BACKGROUND_ARTIFACT="background_artifact",o.PLAYGROUND="playground",o.SYSTEM_PLAYGROUND="system_playground",o.PLAYBOOK_PLAYGROUND="playbook_playground",o.ARTIFACT_PLAYGROUND="artifact_playground",o.ACCESS_RULES="access_rules"})(ka||(q.AgentType=ka={}));q.PLAYGROUND_TOOL_DRAFT_ID="@playground-draft";q.PLAYBOOK_PLAYGROUND_DRAFT_ID="@playground-draft";q.ARTIFACT_PLAYGROUND_DRAFT_ID="@playground-draft";q.ARTIFACT_PROPOSAL_ID_PREFIX="artifact_proposal_";q.AGENT_GLOBAL_TOOLS=["run_command","load_skill"];q.AGENT_BASE_TOOLS=[...q.AGENT_GLOBAL_TOOLS,"call_system","run_tool","share_resource","use_checklist"];q.AGENT_TOOLS={[ka.MAIN]:[...q.AGENT_BASE_TOOLS],[ka.BACKGROUND_ARTIFACT]:["run_command","create_artifact"],[ka.PLAYGROUND]:[...q.AGENT_BASE_TOOLS,"edit_tool"],[ka.SYSTEM_PLAYGROUND]:[...q.AGENT_GLOBAL_TOOLS,"call_system","create_system","edit_system","set_credentials","authenticate_oauth","share_resource","use_checklist"],[ka.PLAYBOOK_PLAYGROUND]:[...q.AGENT_GLOBAL_TOOLS,"call_system","run_tool","create_playbook","edit_playbook","save_playbook","share_resource","use_checklist"],[ka.ARTIFACT_PLAYGROUND]:[...q.AGENT_BASE_TOOLS],[ka.ACCESS_RULES]:[...q.AGENT_GLOBAL_TOOLS,"create_role","edit_role","use_checklist"]};q.DYNAMIC_AGENT_TOOLS=["web_search"];q.AGENT_CHECKLIST_MIN_ITEMS=4;q.AGENT_CHECKLIST_MAX_ITEMS=15;q.AGENT_CHECKLIST_MAX_LABEL_CHARS=120;q.SKILL_BODY_NAMES=["superglue-info","tool-building","tool-editing","system-setup","access-management","tool-deployment","notifications","artifacts","playbooks","projects","file-handling"];q.SKILL_REFERENCE_NAMES=["http","graphql","postgres","mssql","odbc","redis","mongodb","sftp-smb","file-runtime","tunnel-handling"];q.LOADABLE_MARKDOWN_NAMES=[...q.SKILL_BODY_NAMES,...q.SKILL_REFERENCE_NAMES];q.SKILL_GATED_TOOLS={"tool-building":["build_tool","set_tool_state"],"tool-editing":["edit_tool","save_tool","set_tool_state"],"system-setup":["create_system","edit_system","set_credentials","authenticate_oauth"],"tool-deployment":["create_schedule","edit_schedule","create_mcp_server","edit_mcp_server","show_mcp_server"],"access-management":["create_role","edit_role","share_resource"],playbooks:["create_playbook","edit_playbook"],projects:["create_project","edit_project"],artifacts:["create_artifact","start_background_agent","edit_artifact"]};var Rx;(function(o){o.CONFIRMED="confirmed",o.CONFIRMED_AND_SAVE="confirmed_and_save",o.DECLINED="declined",o.OAUTH_SUCCESS="oauth_success",o.OAUTH_FAILURE="oauth_failure"})(Rx||(q.ConfirmationAction=Rx={}));q.AGENT_APPROVAL_MODES=["ask","act"];q.AGENT_MESSAGE_SCHEMA_VERSION=1;q.AGENT_SESSION_SCOPE_PATTERN=/^(tool|system|playbook|artifact):[\w-]+$/;q.AGENT_REQUEST_BUSY_STATUSES=["queued","claimed","running","cancelling"];q.OAUTH_CONTINUATION_REASON_MAX_CHARS=500;q.MCP_SERVER_AUTH_MODES=["oauth","creator_api_key"];q.PROJECT_RESOURCE_TYPES=["system","playbook","artifact","file","tool"];q.PROJECT_LIMITS={name:80,description:500};q.DEFAULT_PROJECT_ID="default";function HR(o){return o.trim()||"Your workspace"}function ur(o){return`${o.type}:${o.id}`}function YR(o){let e=o.indexOf(":");return{type:o.slice(0,e),id:o.slice(e+1)}}function GR({value:o,field:e="resourceRefs"}){if(o===void 0)return{refs:[]};if(!Array.isArray(o))return{error:`${e} must be an array`};let t=[],a=new Set;for(let[i,s]of o.entries()){if(!s||typeof s!="object"||Array.isArray(s))return{error:`${e}[${i}] must be shaped as { type, id }`};let r=s,n=typeof r.type=="string"?r.type.trim():"",c=typeof r.id=="string"?r.id.trim():"";if(!q.PROJECT_RESOURCE_TYPES.includes(n))return{error:`${e}[${i}].type is unsupported`};if(!c||c.length>255)return{error:`${e}[${i}].id must contain between 1 and 255 characters`};let m={type:n,id:c},l=ur(m);a.has(l)||t.push(m),a.add(l)}return{refs:t}}function VR(o){return[...new Map(o.map(e=>[ur(e),e])).values()]}function WR({current:o,add:e,remove:t}){let a=new Map(o.map(i=>[ur(i),i]));for(let i of t)a.delete(ur(i));for(let i of e)a.set(ur(i),i);return[...a.values()]}q.PLAYBOOK_LIMITS={name:120,whenToRun:500,inputs:2e3,instructions:8e3,completionCriteria:2e3,systemRefs:10,toolRefs:25,credentialRefs:10,fileRefs:15,compiledRender:24e3}});var $R,Nx,Tx,JR,KR,ZR,XR,Ux=he(()=>{"use strict";$R=o=>{let e=Tx(o,0);if(e===void 0||!KR(o[e]))return;let t=Tx(o,e+1);if(t!==void 0)return ZR(o,e,t)},Nx=$R,Tx=(o,e)=>{for(let t=e;t<o.length;t+=1){let a=o[t];if(!JR(a))return t}},JR=o=>o===" "||o===" "||o===`
|
|
3
3
|
`||o==="\r",KR=o=>o==="{"||o==="[",ZR=(o,e,t)=>{let a;for(let i=t-1;i>e;i-=1){let s=o[i];if(s==="\r")return;if(s===`
|
|
4
4
|
`)return XR(a);if(a===void 0)a=s;else if(a[0]===s)a+=s;else return}},XR=o=>o===void 0?0:o[0]===" "?o.length:o});var Mx,Zp,eT,oT,Ox=he(()=>{"use strict";Mx=(o,e)=>{let t=Zp(o,"toPrecision",e,e);return t===void 0?Zp(o,"toExponential",e,e):t},Zp=(o,e,t,a)=>{let s=o[e](a).replace(eT,"$1").replace(oT,"$1");return s.length<=t?s:a===1?void 0:Zp(o,e,t,a-1)},eT=/(e)\+/iu,oT=/\.?0*($|e)/iu});var Fx,tT,aT,_x,Lx=he(()=>{"use strict";Fx=(o,e)=>{if(typeof o!="string")throw new TypeError(`Input must be a JSON string: ${o}`);tT(e)},tT=o=>{if(aT(o),o<0)throw new TypeError(`"maxSize" argument must be positive: ${o}`);if(o<_x)throw new TypeError(`"maxSize" argument must be at least ${_x}: ${o}`)},aT=o=>{if(o===void 0)throw new TypeError('"maxSize" argument must be defined');if(!Number.isInteger(o))throw new TypeError(`"maxSize" argument must be an integer: ${o}`)},_x=7});var bl,Px,yl,iT,sT,rT,nT,Hx,cT,mT,lT,uT,dT,gT,Xp=he(()=>{"use strict";bl=(o,e,t)=>{let a=Hx(e,t);return Px(o,e,a)},Px=(o,e,t)=>{if(t>=e)return t;let a=o[t];return a>=dT&&a<=gT?Px(o,e,t+1):t},yl=(o,e,t)=>{if(t===void 0)return t;let a=Hx(e,t);return iT(o,a)},iT=(o,e)=>sT(o,e)?e-3:rT(o,e)?e-2:nT(o,e)?e-1:e,sT=(o,e)=>e>=3&&o[e-3]>=cT&&o[e-3]<=mT,rT=(o,e)=>e>=2&&o[e-2]>=lT,nT=(o,e)=>e>=1&&o[e-1]>=uT,Hx=(o,e)=>e<0||Object.is(e,-0)?Math.max(o+e,0):e,cT=240,mT=244,lT=224,uT=194,dT=128,gT=191});var Yx,Gx=he(()=>{"use strict";Xp();Yx=(o,e,t)=>{let a=globalThis.Buffer.from(o),i=bl(a,a.length,e),s=yl(a,a.length,t);return i===0&&s>=a.length?a.toString():a.toString("utf8",i,s)}});var Vx,Wx=he(()=>{"use strict";Vx=/[\uD800-\uDFFF]/gu});var kl,hT,th=he(()=>{"use strict";Wx();kl=o=>hT(o)?o.replace(Vx,"\uFFFD"):o,hT=o=>{for(let e=0;e<o.length;e+=1){let t=o.codePointAt(e);if(t>=55296&&t<=57343)return!0}return!1}});var ah,$x=he(()=>{"use strict";ah=({input:o,targetByteCount:e,firstStartSurrogate:t,lastStartSurrogate:a,firstEndSurrogate:i,lastEndSurrogate:s,increment:r,canBacktrack:n,shift:c,charIndexInit:m})=>{let l=m,u=l,d=0;for(;d<e;l+=r){u=l;let p=o.charCodeAt(l);if(Number.isNaN(p))break;if(p<=127){d+=1;continue}if(p<=2047){d+=2;continue}if(d+=3,p<t||p>a)continue;let b=o.charCodeAt(l+r);Number.isNaN(b)||b<i||b>s||(d+=1,l+=r)}return(n&&d>e?u:l)+c}});var ih,AT,wT,Jx=he(()=>{"use strict";$x();ih=(o,e,t)=>e<0||Object.is(e,-0)?wT(o,e,t):AT(o,e,t),AT=(o,e,t)=>ah({input:o,targetByteCount:e,firstStartSurrogate:55296,lastStartSurrogate:56319,firstEndSurrogate:56320,lastEndSurrogate:57343,increment:1,canBacktrack:t,shift:0,charIndexInit:0}),wT=(o,e,t)=>ah({input:o,targetByteCount:-e,firstStartSurrogate:56320,lastStartSurrogate:57343,firstEndSurrogate:55296,lastEndSurrogate:56319,increment:-1,canBacktrack:!t,shift:1,charIndexInit:o.length-1})});var Al,vT,Kx=he(()=>{"use strict";th();Jx();Al=(o,e,t)=>{let a=ih(o,e,!1),i=vT(o,t),s=a===0&&i===void 0?o:o.slice(a,i);return kl(s)},vT=(o,e)=>{if(e===void 0)return e;let t=ih(o,e,!0);return t===o.length?void 0:t}});var Xx,xT,sh,Zx,zT,qT,wl,ez=he(()=>{"use strict";Xp();Xx=(o,e,t)=>{let{textEncoder:a,textDecoder:i}=xT(),s=zT(o),{written:r}=a.encodeInto(o,s),n=bl(s,r,e),c=yl(s,r,t),m=c===void 0?r:Math.min(c,r),l=s.subarray(n,m);return i.decode(l)},xT=()=>(sh===void 0&&(sh=new globalThis.TextEncoder,Zx=new globalThis.TextDecoder("utf8",{fatal:!1})),{textEncoder:sh,textDecoder:Zx}),zT=o=>{let e=o.length*3;return e>qT?new Uint8Array(e):((wl===void 0||wl.length<e)&&(wl=new Uint8Array(e)),wl)},qT=1e5});var oz,rh,tz,az=he(()=>{"use strict";oz=(o,e)=>{if(e===void 0)return e;let t=rh(o,e);return t>=o.length*tz?void 0:t},rh=(o,e)=>e<=o.length*-tz?0:e,tz=4});var iz,ET,IT,sz,rz=he(()=>{"use strict";iz=(o,e,t)=>{if(typeof o!="string")throw new TypeError(`First argument must be a string: ${o}`);ET(e),IT(t)},ET=o=>{if(o===void 0)throw new TypeError("Second argument is required.");sz("Second",o)},IT=o=>{o!==void 0&&sz("Third",o)},sz=(o,e)=>{if(!Number.isInteger(e))throw new TypeError(`${o} argument must be an integer: ${e}`)}});var nz,CT,nh,cz=he(()=>{"use strict";nz=o=>{let e=!0,t=0;for(let a=0;a<nh;a+=1){let i=CT(o,a);i<=127||(e&&(e=!1),i>2047&&(t+=1))}return{asciiOnly:e,longCharsPercentage:t/nh}},CT=(o,e)=>{let t=nh-1,a=1-(t-e)/t,i=Math.round(a*(o.length-1));return o.charCodeAt(i)},nh=50});var jT,mz,QT,BT,ST,DT,lz,uz=he(()=>{"use strict";Gx();Kx();ez();az();th();rz();cz();jT=(o,e,t)=>{if(iz(o,e,t),o==="")return o;let a=rh(o,e),i=oz(o,t);return i===void 0&&Object.is(a,0)?kl(o):QT(o,a,i)},mz=jT,QT=(o,e,t)=>{if(o.length<=BT)return Al(o,e,t);let{asciiOnly:a,longCharsPercentage:i}=nz(o);return a?DT(o,e,t):i>=ST?Al(o,e,t):lz(o,e,t)},BT=200,ST=.4,DT=(o,e,t)=>"Buffer"in globalThis&&"from"in globalThis.Buffer?Yx(o,e,t):lz(o,e,t),lz=(o,e,t)=>"TextEncoder"in globalThis?Xx(o,e,t):Al(o,e,t)});var gz,RT,TT,NT,UT,Zn,dz,pz=he(()=>{"use strict";uz();gz=(o,e)=>{let t=JSON.stringify(o),a=NT(t),i=mz(a,0,e-dz.length-Zn.length*2),r=`${RT(i)}${dz}`;return UT(r)},RT=o=>o.replace(TT,""),TT=/(\\|\\u[0-9a-fA-F]{0,3})$/u,NT=o=>o.slice(Zn.length,-Zn.length),UT=o=>`${Zn}${o}${Zn}`,Zn='"',dz="..."});var hz,fz=he(()=>{"use strict";hz=o=>globalThis.Buffer.byteLength(o)});var ch,MT,OT,_T,FT,LT,PT,bz=he(()=>{"use strict";ch=o=>{let e=o.length,t=e;for(let a=0;a<e;a+=1){let i=o.charCodeAt(a);if(i<=MT)continue;if(i<=OT){t+=1;continue}if(t+=2,i<_T||i>FT)continue;let s=o.charCodeAt(a+1);s<LT||s>PT||(a+=1)}return t},MT=127,OT=2047,_T=55296,FT=56319,LT=56320,PT=57343});var yz,HT,YT,GT,vl,kz=he(()=>{"use strict";yz=()=>HT.bind(void 0,new TextEncoder),HT=(o,e)=>{let t=YT(e);return o.encodeInto(e,t).written},YT=o=>{let e=o.length*3;return e>GT?new Uint8Array(e):((vl===void 0||vl.length<e)&&(vl=new Uint8Array(e)),vl)},GT=1e5});var WT,$T,Az,wz=he(()=>{"use strict";fz();bz();kz();WT=()=>"Buffer"in globalThis&&"byteLength"in globalThis.Buffer?hz:"TextEncoder"in globalThis?$T.bind(void 0,yz()):ch,$T=(o,e)=>e.length<100?ch(e):o(e),Az=WT()});var vz,JT,KT,ZT,XT,mh,xz=he(()=>{"use strict";wz();vz=o=>{if(o===null)return JT;if(o===!0)return KT;if(o===!1)return ZT;let e=typeof o;return e==="object"?XT:e==="number"?JSON.stringify(o).length:mh(o)},JT=4,KT=4,ZT=5,XT=2,mh=o=>Az(JSON.stringify(o))});var xl,qz,Ez,Iz,eN,Cz,zz,jz,oN,Xn=he(()=>{"use strict";xz();xl=({size:o,increment:e,maxSize:t,truncatedProps:a,path:i,value:s})=>{let r=o+e,n=r>t;return n?{size:o,stop:n,truncatedProps:[...a,{path:i,value:s}]}:{size:r,stop:n,truncatedProps:a}},qz=o=>vz(o),Ez=(o,e,t)=>{let a=Cz({empty:o,indent:e,depth:t,keySpaceSize:0}),i=jz(o);return a+i},Iz=({key:o,empty:e,indent:t,depth:a})=>{let i=Cz({empty:e,indent:t,depth:a,keySpaceSize:1}),s=mh(o),r=jz(e);return i+s+eN+r},eN=1,Cz=({empty:o,indent:e,depth:t,keySpaceSize:a})=>{if(e===void 0)return 0;let i=zz+e*(t+1),s=o?zz+e*t:0;return a+i+s},zz=1,jz=o=>o?0:oN,oN=1});var zl,tN,lh=he(()=>{"use strict";Xn();zl=({parent:o,truncatedProps:e,path:t,increment:a,maxSize:i,key:s,empty:r,size:n,truncateValue:c,indent:m,depth:l})=>{let u=o[s],d=[...t,s],{size:g,stop:p,truncatedProps:b}=xl({size:n,increment:a,maxSize:i,truncatedProps:e,path:d,value:u});return p?{empty:r,size:g,truncatedProps:b}:tN({value:u,truncatedProps:e,path:d,maxSize:i,empty:r,size:n,newSize:g,truncateValue:c,indent:m,depth:l})},tN=({value:o,truncatedProps:e,path:t,maxSize:a,empty:i,size:s,newSize:r,truncateValue:n,indent:c,depth:m})=>{let{value:l,size:u,truncatedProps:d}=n({value:o,truncatedProps:e,path:t,size:r,maxSize:a,indent:c,depth:m+1});return l===void 0?{empty:i,size:s,truncatedProps:d}:{empty:!1,size:u,value:l,truncatedProps:d}}});var Qz,Bz=he(()=>{"use strict";lh();Xn();Qz=({array:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:s,indent:r,depth:n})=>{let c=[],m={empty:!0,size:a,truncatedProps:e};for(let l=0;l<o.length;l+=1){let u=Ez(m.empty,r,n);m=zl({parent:o,truncatedProps:m.truncatedProps,path:t,increment:u,maxSize:i,key:l,empty:m.empty,size:m.size,truncateValue:s,indent:r,depth:n}),m.value!==void 0&&c.push(m.value)}return{value:c,size:m.size,truncatedProps:m.truncatedProps}}});var Sz,Dz=he(()=>{"use strict";lh();Xn();Sz=({object:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:s,indent:r,depth:n})=>{let c={},m={empty:!0,size:a,truncatedProps:e};for(let l in o){let u=Iz({key:l,empty:m.empty,indent:r,depth:n});m=zl({parent:o,truncatedProps:m.truncatedProps,path:t,increment:u,maxSize:i,key:l,empty:m.empty,size:m.size,truncateValue:s,indent:r,depth:n}),m.value!==void 0&&(c[l]=m.value)}return{value:c,size:m.size,truncatedProps:m.truncatedProps}}});var ql,aN,Rz=he(()=>{"use strict";Bz();Dz();Xn();ql=({value:o,truncatedProps:e,path:t,size:a,maxSize:i,indent:s,depth:r})=>{let n=qz(o),{size:c,stop:m,truncatedProps:l}=xl({size:a,increment:n,maxSize:i,truncatedProps:e,path:t,value:o});return m?{value:void 0,size:c,truncatedProps:l}:aN({value:o,truncatedProps:l,path:t,size:c,maxSize:i,indent:s,depth:r})},aN=({value:o,truncatedProps:e,path:t,size:a,maxSize:i,indent:s,depth:r})=>typeof o!="object"||o===null?{value:o,size:a,truncatedProps:e}:Array.isArray(o)?Qz({array:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:ql,indent:s,depth:r}):Sz({object:o,truncatedProps:e,path:t,size:a,maxSize:i,truncateValue:ql,indent:s,depth:r})});var Tz={};zv(Tz,{default:()=>sN});var iN,sN,rN,nN,cN,Nz=he(()=>{"use strict";Ux();Ox();Lx();pz();Rz();iN=(o,e)=>{Fx(o,e);let t=rN(o),a=nN(o),{value:i,truncatedProps:s}=ql({value:a,truncatedProps:[],path:[],size:0,maxSize:e,indent:t,depth:0});return{jsonString:cN({newValue:i,value:a,maxSize:e,indent:t}),truncatedProps:s}},sN=iN,rN=o=>{let e=Nx(o);return typeof e=="string"?e.length:e},nN=o=>{try{return JSON.parse(o)}catch(e){throw new TypeError(`Invalid JSON string: "${o}"
|
|
5
5
|
${e.message}`)}},cN=({newValue:o,value:e,maxSize:t,indent:a})=>o!==void 0?JSON.stringify(o,void 0,a):typeof e=="number"?Mx(e,t):gz(e,t)});var Mz=y(Uz=>{"use strict";Object.defineProperty(Uz,"__esModule",{value:!0})});var Xa=y(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});El.CronField=void 0;var uh=class o{#e=!1;#o=!1;#a=!1;#i=[];options={rawValue:""};static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}constructor(e,t={rawValue:""}){if(!Array.isArray(e))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(e.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...t,rawValue:t.rawValue??""},this.#i=e.sort(o.sorter),this.#a=this.options.wildcard!==void 0?this.options.wildcard:this.#s(),this.#e=this.options.rawValue.includes("L")||e.includes("L"),this.#o=this.options.rawValue.includes("?")||e.includes("?")}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return this.#e}get hasQuestionMarkChar(){return this.#o}get isWildcard(){return this.#a}get values(){return this.#i}static sorter(e,t){let a=typeof e=="number",i=typeof t=="number";return a&&i?e-t:!a&&!i?e.localeCompare(t):a?-1:1}static findNearestValueInList(e,t,a=!1){if(a){for(let i=e.length-1;i>=0;i--)if(e[i]<t)return e[i];return null}for(let i=0;i<e.length;i++)if(e[i]>t)return e[i];return null}findNearestValue(e,t=!1){return this.constructor.findNearestValueInList(this.values,e,t)}serialize(){return{wildcard:this.#a,values:this.#i}}validate(){let e,t=this.chars.length>0?` or chars ${this.chars.join("")}`:"",a=n=>c=>new RegExp(`^\\d{0,2}${c}$`).test(n),i=n=>(e=n,typeof n=="number"?n>=this.min&&n<=this.max:this.chars.some(a(n)));if(!this.#i.every(i))throw new Error(`${this.constructor.name} Validation error, got value ${e} expected range ${this.min}-${this.max}${t}`);let r=this.#i.find((n,c)=>this.#i.indexOf(n)!==c);if(r)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${r}`)}#s(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(e,t)=>t+this.min).every(e=>this.#i.includes(e))}};El.CronField=uh});var Oz=y(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});Il.CronDayOfMonth=void 0;var mN=Xa(),lN=1,uN=31,dN=Object.freeze(["L"]),dh=class extends mN.CronField{static get min(){return lN}static get max(){return uN}static get chars(){return dN}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Il.CronDayOfMonth=dh});var _z=y(Cl=>{"use strict";Object.defineProperty(Cl,"__esModule",{value:!0});Cl.CronDayOfWeek=void 0;var gN=Xa(),pN=0,hN=7,fN=Object.freeze(["L"]),gh=class extends gN.CronField{static get min(){return pN}static get max(){return hN}static get chars(){return fN}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};Cl.CronDayOfWeek=gh});var Fz=y(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.CronHour=void 0;var bN=Xa(),yN=0,kN=23,AN=Object.freeze([]),ph=class extends bN.CronField{static get min(){return yN}static get max(){return kN}static get chars(){return AN}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};jl.CronHour=ph});var Lz=y(Ql=>{"use strict";Object.defineProperty(Ql,"__esModule",{value:!0});Ql.CronMinute=void 0;var wN=Xa(),vN=0,xN=59,zN=Object.freeze([]),hh=class extends wN.CronField{static get min(){return vN}static get max(){return xN}static get chars(){return zN}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Ql.CronMinute=hh});var yq=y(Oo=>{"use strict";Object.defineProperty(Oo,"__esModule",{value:!0});var wa=class extends Error{},qh=class extends wa{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Eh=class extends wa{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Ih=class extends wa{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},ti=class extends wa{},Ml=class extends wa{constructor(e){super(`Invalid unit ${e}`)}},Ve=class extends wa{},Lt=class extends wa{constructor(){super("Zone is an abstract class")}},Q="numeric",Ct="short",Uo="long",Ol={year:Q,month:Q,day:Q},k0={year:Q,month:Ct,day:Q},qN={year:Q,month:Ct,day:Q,weekday:Ct},A0={year:Q,month:Uo,day:Q},w0={year:Q,month:Uo,day:Q,weekday:Uo},v0={hour:Q,minute:Q},x0={hour:Q,minute:Q,second:Q},z0={hour:Q,minute:Q,second:Q,timeZoneName:Ct},q0={hour:Q,minute:Q,second:Q,timeZoneName:Uo},E0={hour:Q,minute:Q,hourCycle:"h23"},I0={hour:Q,minute:Q,second:Q,hourCycle:"h23"},C0={hour:Q,minute:Q,second:Q,hourCycle:"h23",timeZoneName:Ct},j0={hour:Q,minute:Q,second:Q,hourCycle:"h23",timeZoneName:Uo},Q0={year:Q,month:Q,day:Q,hour:Q,minute:Q},B0={year:Q,month:Q,day:Q,hour:Q,minute:Q,second:Q},S0={year:Q,month:Ct,day:Q,hour:Q,minute:Q},D0={year:Q,month:Ct,day:Q,hour:Q,minute:Q,second:Q},EN={year:Q,month:Ct,day:Q,weekday:Ct,hour:Q,minute:Q},R0={year:Q,month:Uo,day:Q,hour:Q,minute:Q,timeZoneName:Ct},T0={year:Q,month:Uo,day:Q,hour:Q,minute:Q,second:Q,timeZoneName:Ct},N0={year:Q,month:Uo,day:Q,weekday:Uo,hour:Q,minute:Q,timeZoneName:Uo},U0={year:Q,month:Uo,day:Q,weekday:Uo,hour:Q,minute:Q,second:Q,timeZoneName:Uo},ii=class{get type(){throw new Lt}get name(){throw new Lt}get ianaName(){return this.name}get isUniversal(){throw new Lt}offsetName(e,t){throw new Lt}formatOffset(e,t){throw new Lt}offset(e){throw new Lt}equals(e){throw new Lt}get isValid(){throw new Lt}},fh=null,sc=class o extends ii{static get instance(){return fh===null&&(fh=new o),fh}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:a}){return W0(e,t,a)}formatOffset(e,t){return ic(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},Ch=new Map;function IN(o){let e=Ch.get(o);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:o,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Ch.set(o,e)),e}var CN={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function jN(o,e){let t=o.format(e).replace(/\u200E/g,""),a=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,s,r,n,c,m,l]=a;return[r,i,s,n,c,m,l]}function QN(o,e){let t=o.formatToParts(e),a=[];for(let i=0;i<t.length;i++){let{type:s,value:r}=t[i],n=CN[s];s==="era"?a[n]=r:G(n)||(a[n]=parseInt(r,10))}return a}var bh=new Map,va=class o extends ii{static create(e){let t=bh.get(e);return t===void 0&&bh.set(e,t=new o(e)),t}static resetCache(){bh.clear(),Ch.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=o.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:a}){return W0(e,t,a,this.name)}formatOffset(e,t){return ic(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let a=IN(this.name),[i,s,r,n,c,m,l]=a.formatToParts?QN(a,t):jN(a,t);n==="BC"&&(i=-Math.abs(i)+1);let d=Gl({year:i,month:s,day:r,hour:c===24?0:c,minute:m,second:l,millisecond:0}),g=+t,p=g%1e3;return g-=p>=0?p:1e3+p,(d-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Pz={};function BN(o,e={}){let t=JSON.stringify([o,e]),a=Pz[t];return a||(a=new Intl.ListFormat(o,e),Pz[t]=a),a}var jh=new Map;function Qh(o,e={}){let t=JSON.stringify([o,e]),a=jh.get(t);return a===void 0&&(a=new Intl.DateTimeFormat(o,e),jh.set(t,a)),a}var Bh=new Map;function SN(o,e={}){let t=JSON.stringify([o,e]),a=Bh.get(t);return a===void 0&&(a=new Intl.NumberFormat(o,e),Bh.set(t,a)),a}var Sh=new Map;function DN(o,e={}){let{base:t,...a}=e,i=JSON.stringify([o,a]),s=Sh.get(i);return s===void 0&&(s=new Intl.RelativeTimeFormat(o,e),Sh.set(i,s)),s}var oc=null;function RN(){return oc||(oc=new Intl.DateTimeFormat().resolvedOptions().locale,oc)}var Dh=new Map;function M0(o){let e=Dh.get(o);return e===void 0&&(e=new Intl.DateTimeFormat(o).resolvedOptions(),Dh.set(o,e)),e}var Rh=new Map;function TN(o){let e=Rh.get(o);if(!e){let t=new Intl.Locale(o);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...O0,...e}),Rh.set(o,e)}return e}function NN(o){let e=o.indexOf("-x-");e!==-1&&(o=o.substring(0,e));let t=o.indexOf("-u-");if(t===-1)return[o];{let a,i;try{a=Qh(o).resolvedOptions(),i=o}catch{let c=o.substring(0,t);a=Qh(c).resolvedOptions(),i=c}let{numberingSystem:s,calendar:r}=a;return[i,s,r]}}function UN(o,e,t){return(t||e)&&(o.includes("-u-")||(o+="-u"),t&&(o+=`-ca-${t}`),e&&(o+=`-nu-${e}`)),o}function MN(o){let e=[];for(let t=1;t<=12;t++){let a=qe.utc(2009,t,1);e.push(o(a))}return e}function ON(o){let e=[];for(let t=1;t<=7;t++){let a=qe.utc(2016,11,13+t);e.push(o(a))}return e}function Bl(o,e,t,a){let i=o.listingMode();return i==="error"?null:i==="en"?t(e):a(e)}function _N(o){return o.numberingSystem&&o.numberingSystem!=="latn"?!1:o.numberingSystem==="latn"||!o.locale||o.locale.startsWith("en")||M0(o.locale).numberingSystem==="latn"}var Th=class{constructor(e,t,a){this.padTo=a.padTo||0,this.floor=a.floor||!1;let{padTo:i,floor:s,...r}=a;if(!t||Object.keys(r).length>0){let n={useGrouping:!1,...a};a.padTo>0&&(n.minimumIntegerDigits=a.padTo),this.inf=SN(e,n)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):Gh(e,3);return Ne(t,this.padTo)}}},Nh=class{constructor(e,t,a){this.opts=a,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let r=-1*(e.offset/60),n=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;e.offset!==0&&va.create(n).valid?(i=n,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=Qh(t,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let a=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:a}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},Uh=class{constructor(e,t,a){this.opts={style:"long",...a},!t&&G0()&&(this.rtf=DN(e,a))}format(e,t){return this.rtf?this.rtf.format(e,t):nU(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},O0={firstDay:1,minimalDays:4,weekend:[6,7]},fe=class o{static fromOpts(e){return o.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,a,i,s=!1){let r=e||ke.defaultLocale,n=r||(s?"en-US":RN()),c=t||ke.defaultNumberingSystem,m=a||ke.defaultOutputCalendar,l=Oh(i)||ke.defaultWeekSettings;return new o(n,c,m,l,r)}static resetCache(){oc=null,jh.clear(),Bh.clear(),Sh.clear(),Dh.clear(),Rh.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:a,weekSettings:i}={}){return o.create(e,t,a,i)}constructor(e,t,a,i,s){let[r,n,c]=NN(e);this.locale=r,this.numberingSystem=t||n||null,this.outputCalendar=a||c||null,this.weekSettings=i,this.intl=UN(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=_N(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:o.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Oh(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Bl(this,e,K0,()=>{let a=this.intl==="ja"||this.intl.startsWith("ja-");t&=!a;let i=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){let r=a?n=>this.dtFormatter(n,i).format():n=>this.extract(n,i,"month");this.monthsCache[s][e]=MN(r)}return this.monthsCache[s][e]})}weekdays(e,t=!1){return Bl(this,e,eq,()=>{let a=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=ON(s=>this.extract(s,a,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Bl(this,void 0,()=>oq,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[qe.utc(2016,11,13,9),qe.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Bl(this,e,tq,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[qe.utc(-40,1,1),qe.utc(2017,1,1)].map(a=>this.extract(a,t,"era"))),this.eraCache[e]})}extract(e,t,a){let i=this.dtFormatter(e,t),s=i.formatToParts(),r=s.find(n=>n.type.toLowerCase()===a);return r?r.value:null}numberFormatter(e={}){return new Th(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Nh(e,this.intl,t)}relFormatter(e={}){return new Uh(this.intl,this.isEnglish(),e)}listFormatter(e={}){return BN(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||M0(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:V0()?TN(this.locale):O0}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},yh=null,Mo=class o extends ii{static get utcInstance(){return yh===null&&(yh=new o(0)),yh}static instance(e){return e===0?o.utcInstance:new o(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new o(Vl(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ic(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ic(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ic(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},_l=class extends ii{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function oi(o,e){if(G(o)||o===null)return e;if(o instanceof ii)return o;if(GN(o)){let t=o.toLowerCase();return t==="default"?e:t==="local"||t==="system"?sc.instance:t==="utc"||t==="gmt"?Mo.utcInstance:Mo.parseSpecifier(t)||va.create(o)}else return ai(o)?Mo.instance(o):typeof o=="object"&&"offset"in o&&typeof o.offset=="function"?o:new _l(o)}var Lh={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Hz={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},FN=Lh.hanidec.replace(/[\[|\]]/g,"").split("");function LN(o){let e=parseInt(o,10);if(isNaN(e)){e="";for(let t=0;t<o.length;t++){let a=o.charCodeAt(t);if(o[t].search(Lh.hanidec)!==-1)e+=FN.indexOf(o[t]);else for(let i in Hz){let[s,r]=Hz[i];a>=s&&a<=r&&(e+=a-s)}}return parseInt(e,10)}else return e}var Mh=new Map;function PN(){Mh.clear()}function Et({numberingSystem:o},e=""){let t=o||"latn",a=Mh.get(t);a===void 0&&(a=new Map,Mh.set(t,a));let i=a.get(e);return i===void 0&&(i=new RegExp(`${Lh[t]}${e}`),a.set(e,i)),i}var Yz=()=>Date.now(),Gz="system",Vz=null,Wz=null,$z=null,Jz=60,Kz,Zz=null,ke=class{static get now(){return Yz}static set now(e){Yz=e}static set defaultZone(e){Gz=e}static get defaultZone(){return oi(Gz,sc.instance)}static get defaultLocale(){return Vz}static set defaultLocale(e){Vz=e}static get defaultNumberingSystem(){return Wz}static set defaultNumberingSystem(e){Wz=e}static get defaultOutputCalendar(){return $z}static set defaultOutputCalendar(e){$z=e}static get defaultWeekSettings(){return Zz}static set defaultWeekSettings(e){Zz=Oh(e)}static get twoDigitCutoffYear(){return Jz}static set twoDigitCutoffYear(e){Jz=e%100}static get throwOnInvalid(){return Kz}static set throwOnInvalid(e){Kz=e}static resetCaches(){fe.resetCache(),va.resetCache(),qe.resetCache(),PN()}},No=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},_0=[0,31,59,90,120,151,181,212,243,273,304,334],F0=[0,31,60,91,121,152,182,213,244,274,305,335];function st(o,e){return new No("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${o}, which is invalid`)}function Ph(o,e,t){let a=new Date(Date.UTC(o,e-1,t));o<100&&o>=0&&a.setUTCFullYear(a.getUTCFullYear()-1900);let i=a.getUTCDay();return i===0?7:i}function L0(o,e,t){return t+(nc(o)?F0:_0)[e-1]}function P0(o,e){let t=nc(o)?F0:_0,a=t.findIndex(s=>s<e),i=e-t[a];return{month:a+1,day:i}}function Hh(o,e){return(o-e+7)%7+1}function Fl(o,e=4,t=1){let{year:a,month:i,day:s}=o,r=L0(a,i,s),n=Hh(Ph(a,i,s),t),c=Math.floor((r-n+14-e)/7),m;return c<1?(m=a-1,c=rc(m,e,t)):c>rc(a,e,t)?(m=a+1,c=1):m=a,{weekYear:m,weekNumber:c,weekday:n,...Wl(o)}}function Xz(o,e=4,t=1){let{weekYear:a,weekNumber:i,weekday:s}=o,r=Hh(Ph(a,1,e),t),n=hr(a),c=i*7+s-r-7+e,m;c<1?(m=a-1,c+=hr(m)):c>n?(m=a+1,c-=hr(a)):m=a;let{month:l,day:u}=P0(m,c);return{year:m,month:l,day:u,...Wl(o)}}function kh(o){let{year:e,month:t,day:a}=o,i=L0(e,t,a);return{year:e,ordinal:i,...Wl(o)}}function e0(o){let{year:e,ordinal:t}=o,{month:a,day:i}=P0(e,t);return{year:e,month:a,day:i,...Wl(o)}}function o0(o,e){if(!G(o.localWeekday)||!G(o.localWeekNumber)||!G(o.localWeekYear)){if(!G(o.weekday)||!G(o.weekNumber)||!G(o.weekYear))throw new ti("Cannot mix locale-based week fields with ISO-based week fields");return G(o.localWeekday)||(o.weekday=o.localWeekday),G(o.localWeekNumber)||(o.weekNumber=o.localWeekNumber),G(o.localWeekYear)||(o.weekYear=o.localWeekYear),delete o.localWeekday,delete o.localWeekNumber,delete o.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function HN(o,e=4,t=1){let a=Yl(o.weekYear),i=rt(o.weekNumber,1,rc(o.weekYear,e,t)),s=rt(o.weekday,1,7);return a?i?s?!1:st("weekday",o.weekday):st("week",o.weekNumber):st("weekYear",o.weekYear)}function YN(o){let e=Yl(o.year),t=rt(o.ordinal,1,hr(o.year));return e?t?!1:st("ordinal",o.ordinal):st("year",o.year)}function H0(o){let e=Yl(o.year),t=rt(o.month,1,12),a=rt(o.day,1,Ll(o.year,o.month));return e?t?a?!1:st("day",o.day):st("month",o.month):st("year",o.year)}function Y0(o){let{hour:e,minute:t,second:a,millisecond:i}=o,s=rt(e,0,23)||e===24&&t===0&&a===0&&i===0,r=rt(t,0,59),n=rt(a,0,59),c=rt(i,0,999);return s?r?n?c?!1:st("millisecond",i):st("second",a):st("minute",t):st("hour",e)}function G(o){return typeof o>"u"}function ai(o){return typeof o=="number"}function Yl(o){return typeof o=="number"&&o%1===0}function GN(o){return typeof o=="string"}function VN(o){return Object.prototype.toString.call(o)==="[object Date]"}function G0(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function V0(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function WN(o){return Array.isArray(o)?o:[o]}function t0(o,e,t){if(o.length!==0)return o.reduce((a,i)=>{let s=[e(i),i];return a&&t(a[0],s[0])===a[0]?a:s},null)[1]}function $N(o,e){return e.reduce((t,a)=>(t[a]=o[a],t),{})}function br(o,e){return Object.prototype.hasOwnProperty.call(o,e)}function Oh(o){if(o==null)return null;if(typeof o!="object")throw new Ve("Week settings must be an object");if(!rt(o.firstDay,1,7)||!rt(o.minimalDays,1,7)||!Array.isArray(o.weekend)||o.weekend.some(e=>!rt(e,1,7)))throw new Ve("Invalid week settings");return{firstDay:o.firstDay,minimalDays:o.minimalDays,weekend:Array.from(o.weekend)}}function rt(o,e,t){return Yl(o)&&o>=e&&o<=t}function JN(o,e){return o-e*Math.floor(o/e)}function Ne(o,e=2){let t=o<0,a;return t?a="-"+(""+-o).padStart(e,"0"):a=(""+o).padStart(e,"0"),a}function ei(o){if(!(G(o)||o===null||o===""))return parseInt(o,10)}function Xi(o){if(!(G(o)||o===null||o===""))return parseFloat(o)}function Yh(o){if(!(G(o)||o===null||o==="")){let e=parseFloat("0."+o)*1e3;return Math.floor(e)}}function Gh(o,e,t="round"){let a=10**e;switch(t){case"expand":return o>0?Math.ceil(o*a)/a:Math.floor(o*a)/a;case"trunc":return Math.trunc(o*a)/a;case"round":return Math.round(o*a)/a;case"floor":return Math.floor(o*a)/a;case"ceil":return Math.ceil(o*a)/a;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function nc(o){return o%4===0&&(o%100!==0||o%400===0)}function hr(o){return nc(o)?366:365}function Ll(o,e){let t=JN(e-1,12)+1,a=o+(e-t)/12;return t===2?nc(a)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Gl(o){let e=Date.UTC(o.year,o.month-1,o.day,o.hour,o.minute,o.second,o.millisecond);return o.year<100&&o.year>=0&&(e=new Date(e),e.setUTCFullYear(o.year,o.month-1,o.day)),+e}function a0(o,e,t){return-Hh(Ph(o,1,e),t)+e-1}function rc(o,e=4,t=1){let a=a0(o,e,t),i=a0(o+1,e,t);return(hr(o)-a+i)/7}function _h(o){return o>99?o:o>ke.twoDigitCutoffYear?1900+o:2e3+o}function W0(o,e,t,a=null){let i=new Date(o),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};a&&(s.timeZone=a);let r={timeZoneName:e,...s},n=new Intl.DateTimeFormat(t,r).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return n?n.value:null}function Vl(o,e){let t=parseInt(o,10);Number.isNaN(t)&&(t=0);let a=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-a:a;return t*60+i}function $0(o){let e=Number(o);if(typeof o=="boolean"||o===""||!Number.isFinite(e))throw new Ve(`Invalid unit value ${o}`);return e}function Pl(o,e){let t={};for(let a in o)if(br(o,a)){let i=o[a];if(i==null)continue;t[e(a)]=$0(i)}return t}function ic(o,e){let t=Math.trunc(Math.abs(o/60)),a=Math.trunc(Math.abs(o%60)),i=o>=0?"+":"-";switch(e){case"short":return`${i}${Ne(t,2)}:${Ne(a,2)}`;case"narrow":return`${i}${t}${a>0?`:${a}`:""}`;case"techie":return`${i}${Ne(t,2)}${Ne(a,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Wl(o){return $N(o,["hour","minute","second","millisecond"])}var KN=["January","February","March","April","May","June","July","August","September","October","November","December"],J0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ZN=["J","F","M","A","M","J","J","A","S","O","N","D"];function K0(o){switch(o){case"narrow":return[...ZN];case"short":return[...J0];case"long":return[...KN];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Z0=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],X0=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],XN=["M","T","W","T","F","S","S"];function eq(o){switch(o){case"narrow":return[...XN];case"short":return[...X0];case"long":return[...Z0];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var oq=["AM","PM"],eU=["Before Christ","Anno Domini"],oU=["BC","AD"],tU=["B","A"];function tq(o){switch(o){case"narrow":return[...tU];case"short":return[...oU];case"long":return[...eU];default:return null}}function aU(o){return oq[o.hour<12?0:1]}function iU(o,e){return eq(e)[o.weekday-1]}function sU(o,e){return K0(e)[o.month-1]}function rU(o,e){return tq(e)[o.year<0?0:1]}function nU(o,e,t="always",a=!1){let i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(o)===-1;if(t==="auto"&&s){let u=o==="days";switch(e){case 1:return u?"tomorrow":`next ${i[o][0]}`;case-1:return u?"yesterday":`last ${i[o][0]}`;case 0:return u?"today":`this ${i[o][0]}`}}let r=Object.is(e,-0)||e<0,n=Math.abs(e),c=n===1,m=i[o],l=a?c?m[1]:m[2]||m[1]:c?i[o][0]:o;return r?`${n} ${l} ago`:`in ${n} ${l}`}function i0(o,e){let t="";for(let a of o)a.literal?t+=a.val:t+=e(a.val);return t}var cU={D:Ol,DD:k0,DDD:A0,DDDD:w0,t:v0,tt:x0,ttt:z0,tttt:q0,T:E0,TT:I0,TTT:C0,TTTT:j0,f:Q0,ff:S0,fff:R0,ffff:N0,F:B0,FF:D0,FFF:T0,FFFF:U0},To=class o{static create(e,t={}){return new o(e,t)}static parseFormat(e){let t=null,a="",i=!1,s=[];for(let r=0;r<e.length;r++){let n=e.charAt(r);n==="'"?((a.length>0||i)&&s.push({literal:i||/^\s+$/.test(a),val:a===""?"'":a}),t=null,a="",i=!i):i||n===t?a+=n:(a.length>0&&s.push({literal:/^\s+$/.test(a),val:a}),a=n,t=n)}return a.length>0&&s.push({literal:i||/^\s+$/.test(a),val:a}),s}static macroTokenToFormatOpts(e){return cU[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,a=void 0){if(this.opts.forceSimple)return Ne(e,t);let i={...this.opts};return t>0&&(i.padTo=t),a&&(i.signDisplay=a),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let a=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(g,p)=>this.loc.extract(e,g,p),r=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",n=()=>a?aU(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(g,p)=>a?sU(e,g):s(p?{month:g}:{month:g,day:"numeric"},"month"),m=(g,p)=>a?iU(e,g):s(p?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),l=g=>{let p=o.macroTokenToFormatOpts(g);return p?this.formatWithSystemDefault(e,p):g},u=g=>a?rU(e,g):s({era:g},"era"),d=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return n();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return m("short",!0);case"cccc":return m("long",!0);case"ccccc":return m("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return m("short",!1);case"EEEE":return m("long",!1);case"EEEEE":return m("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(g)}};return i0(o.parseFormat(t),d)}formatDurationFromString(e,t){let a=this.opts.signMode==="negativeLargestOnly"?-1:1,i=l=>{switch(l[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(l,u)=>d=>{let g=i(d);if(g){let p=u.isNegativeDuration&&g!==u.largestUnit?a:1,b;return this.opts.signMode==="negativeLargestOnly"&&g!==u.largestUnit?b="never":this.opts.signMode==="all"?b="always":b="auto",this.num(l.get(g)*p,d.length,b)}else return d},r=o.parseFormat(t),n=r.reduce((l,{literal:u,val:d})=>u?l:l.concat(d),[]),c=e.shiftTo(...n.map(i).filter(l=>l)),m={isNegativeDuration:c<0,largestUnit:Object.keys(c.values)[0]};return i0(r,s(c,m))}},aq=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function yr(...o){let e=o.reduce((t,a)=>t+a.source,"");return RegExp(`^${e}$`)}function kr(...o){return e=>o.reduce(([t,a,i],s)=>{let[r,n,c]=s(e,i);return[{...t,...r},n||a,c]},[{},null,1]).slice(0,2)}function Ar(o,...e){if(o==null)return[null,null];for(let[t,a]of e){let i=t.exec(o);if(i)return a(i)}return[null,null]}function iq(...o){return(e,t)=>{let a={},i;for(i=0;i<o.length;i++)a[o[i]]=ei(e[t+i]);return[a,null,t+i]}}var sq=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mU=`(?:${sq.source}?(?:\\[(${aq.source})\\])?)?`,Vh=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rq=RegExp(`${Vh.source}${mU}`),Wh=RegExp(`(?:[Tt]${rq.source})?`),lU=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,uU=/(\d{4})-?W(\d\d)(?:-?(\d))?/,dU=/(\d{4})-?(\d{3})/,gU=iq("weekYear","weekNumber","weekDay"),pU=iq("year","ordinal"),hU=/(\d{4})-(\d\d)-(\d\d)/,nq=RegExp(`${Vh.source} ?(?:${sq.source}|(${aq.source}))?`),fU=RegExp(`(?: ${nq.source})?`);function fr(o,e,t){let a=o[e];return G(a)?t:ei(a)}function bU(o,e){return[{year:fr(o,e),month:fr(o,e+1,1),day:fr(o,e+2,1)},null,e+3]}function wr(o,e){return[{hours:fr(o,e,0),minutes:fr(o,e+1,0),seconds:fr(o,e+2,0),milliseconds:Yh(o[e+3])},null,e+4]}function cc(o,e){let t=!o[e]&&!o[e+1],a=Vl(o[e+1],o[e+2]),i=t?null:Mo.instance(a);return[{},i,e+3]}function mc(o,e){let t=o[e]?va.create(o[e]):null;return[{},t,e+1]}var yU=RegExp(`^T?${Vh.source}$`),kU=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function AU(o){let[e,t,a,i,s,r,n,c,m]=o,l=e[0]==="-",u=c&&c[0]==="-",d=(g,p=!1)=>g!==void 0&&(p||g&&l)?-g:g;return[{years:d(Xi(t)),months:d(Xi(a)),weeks:d(Xi(i)),days:d(Xi(s)),hours:d(Xi(r)),minutes:d(Xi(n)),seconds:d(Xi(c),c==="-0"),milliseconds:d(Yh(m),u)}]}var wU={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function $h(o,e,t,a,i,s,r){let n={year:e.length===2?_h(ei(e)):ei(e),month:J0.indexOf(t)+1,day:ei(a),hour:ei(i),minute:ei(s)};return r&&(n.second=ei(r)),o&&(n.weekday=o.length>3?Z0.indexOf(o)+1:X0.indexOf(o)+1),n}var vU=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function xU(o){let[,e,t,a,i,s,r,n,c,m,l,u]=o,d=$h(e,i,a,t,s,r,n),g;return c?g=wU[c]:m?g=0:g=Vl(l,u),[d,new Mo(g)]}function zU(o){return o.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var qU=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,EU=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,IU=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function s0(o){let[,e,t,a,i,s,r,n]=o;return[$h(e,i,a,t,s,r,n),Mo.utcInstance]}function CU(o){let[,e,t,a,i,s,r,n]=o;return[$h(e,n,t,a,i,s,r),Mo.utcInstance]}var jU=yr(lU,Wh),QU=yr(uU,Wh),BU=yr(dU,Wh),SU=yr(rq),cq=kr(bU,wr,cc,mc),DU=kr(gU,wr,cc,mc),RU=kr(pU,wr,cc,mc),TU=kr(wr,cc,mc);function NU(o){return Ar(o,[jU,cq],[QU,DU],[BU,RU],[SU,TU])}function UU(o){return Ar(zU(o),[vU,xU])}function MU(o){return Ar(o,[qU,s0],[EU,s0],[IU,CU])}function OU(o){return Ar(o,[kU,AU])}var _U=kr(wr);function FU(o){return Ar(o,[yU,_U])}var LU=yr(hU,fU),PU=yr(nq),HU=kr(wr,cc,mc);function YU(o){return Ar(o,[LU,cq],[PU,HU])}var r0="Invalid Duration",mq={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},GU={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...mq},it=146097/400,dr=146097/4800,VU={years:{quarters:4,months:12,weeks:it/7,days:it,hours:it*24,minutes:it*24*60,seconds:it*24*60*60,milliseconds:it*24*60*60*1e3},quarters:{months:3,weeks:it/28,days:it/4,hours:it*24/4,minutes:it*24*60/4,seconds:it*24*60*60/4,milliseconds:it*24*60*60*1e3/4},months:{weeks:dr/7,days:dr,hours:dr*24,minutes:dr*24*60,seconds:dr*24*60*60,milliseconds:dr*24*60*60*1e3},...mq},os=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],WU=os.slice(0).reverse();function Aa(o,e,t=!1){let a={values:t?e.values:{...o.values,...e.values||{}},loc:o.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||o.conversionAccuracy,matrix:e.matrix||o.matrix};return new Fe(a)}function lq(o,e){var t;let a=(t=e.milliseconds)!=null?t:0;for(let i of WU.slice(1))e[i]&&(a+=e[i]*o[i].milliseconds);return a}function n0(o,e){let t=lq(o,e)<0?-1:1;os.reduceRight((a,i)=>{if(G(e[i]))return a;if(a){let s=e[a]*t,r=o[i][a],n=Math.floor(s/r);e[i]+=n*t,e[a]-=n*r*t}return i},null),os.reduce((a,i)=>{if(G(e[i]))return a;if(a){let s=e[a]%1;e[a]-=s,e[i]+=s*o[a][i]}return i},null)}function c0(o){let e={};for(let[t,a]of Object.entries(o))a!==0&&(e[t]=a);return e}var Fe=class o{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,a=t?VU:GU;e.matrix&&(a=e.matrix),this.values=e.values,this.loc=e.loc||fe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=a,this.isLuxonDuration=!0}static fromMillis(e,t){return o.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Ve(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new o({values:Pl(e,o.normalizeUnit),loc:fe.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ai(e))return o.fromMillis(e);if(o.isDuration(e))return e;if(typeof e=="object")return o.fromObject(e);throw new Ve(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[a]=OU(e);return a?o.fromObject(a,t):o.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[a]=FU(e);return a?o.fromObject(a,t):o.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Ve("need to specify a reason the Duration is invalid");let a=e instanceof No?e:new No(e,t);if(ke.throwOnInvalid)throw new Ih(a);return new o({invalid:a})}static normalizeUnit(e){let t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Ml(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let a={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?To.create(this.loc,a).formatDurationFromString(this,e):r0}toHuman(e={}){if(!this.isValid)return r0;let t=e.showZeros!==!1,a=os.map(i=>{let s=this.values[i];return G(s)||s===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(a)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Gh(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},qe.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?lq(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=o.fromDurationLike(e),a={};for(let i of os)(br(t.values,i)||br(this.values,i))&&(a[i]=t.get(i)+this.get(i));return Aa(this,{values:a},!0)}minus(e){if(!this.isValid)return this;let t=o.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let a of Object.keys(this.values))t[a]=$0(e(this.values[a],a));return Aa(this,{values:t},!0)}get(e){return this[o.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...Pl(e,o.normalizeUnit)};return Aa(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:a,matrix:i}={}){let r={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:a};return Aa(this,r)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return n0(this.matrix,e),Aa(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=c0(this.normalize().shiftToAll().toObject());return Aa(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(r=>o.normalizeUnit(r));let t={},a={},i=this.toObject(),s;for(let r of os)if(e.indexOf(r)>=0){s=r;let n=0;for(let m in a)n+=this.matrix[m][r]*a[m],a[m]=0;ai(i[r])&&(n+=i[r]);let c=Math.trunc(n);t[r]=c,a[r]=(n*1e3-c*1e3)/1e3}else ai(i[r])&&(a[r]=i[r]);for(let r in a)a[r]!==0&&(t[s]+=r===s?a[r]:a[r]/this.matrix[s][r]);return n0(this.matrix,t),Aa(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Aa(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=c0(this.values);return Aa(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(a,i){return a===void 0||a===0?i===void 0||i===0:a===i}for(let a of os)if(!t(this.values[a],e.values[a]))return!1;return!0}},gr="Invalid Interval";function $U(o,e){return!o||!o.isValid?as.invalid("missing or invalid start"):!e||!e.isValid?as.invalid("missing or invalid end"):e<o?as.invalid("end before start",`The end of an interval must be after its start, but you had start=${o.toISO()} and end=${e.toISO()}`):null}var as=class o{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Ve("need to specify a reason the Interval is invalid");let a=e instanceof No?e:new No(e,t);if(ke.throwOnInvalid)throw new Eh(a);return new o({invalid:a})}static fromDateTimes(e,t){let a=ec(e),i=ec(t),s=$U(a,i);return s??new o({start:a,end:i})}static after(e,t){let a=Fe.fromDurationLike(t),i=ec(e);return o.fromDateTimes(i,i.plus(a))}static before(e,t){let a=Fe.fromDurationLike(t),i=ec(e);return o.fromDateTimes(i.minus(a),i)}static fromISO(e,t){let[a,i]=(e||"").split("/",2);if(a&&i){let s,r;try{s=qe.fromISO(a,t),r=s.isValid}catch{r=!1}let n,c;try{n=qe.fromISO(i,t),c=n.isValid}catch{c=!1}if(r&&c)return o.fromDateTimes(s,n);if(r){let m=Fe.fromISO(i,t);if(m.isValid)return o.after(s,m)}else if(c){let m=Fe.fromISO(a,t);if(m.isValid)return o.before(n,m)}}return o.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;let a=this.start.startOf(e,t),i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:a.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(a,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?o.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(ec).filter(r=>this.contains(r)).sort((r,n)=>r.toMillis()-n.toMillis()),a=[],{s:i}=this,s=0;for(;i<this.e;){let r=t[s]||this.e,n=+r>+this.e?this.e:r;a.push(o.fromDateTimes(i,n)),i=n,s+=1}return a}splitBy(e){let t=Fe.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:a}=this,i=1,s,r=[];for(;a<this.e;){let n=this.start.plus(t.mapUnits(c=>c*i));s=+n>+this.e?this.e:n,r.push(o.fromDateTimes(a,s)),a=s,i+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,a=this.e<e.e?this.e:e.e;return t>=a?null:o.fromDateTimes(t,a)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,a=this.e>e.e?this.e:e.e;return o.fromDateTimes(t,a)}static merge(e){let[t,a]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],r)=>s?s.overlaps(r)||s.abutsStart(r)?[i,s.union(r)]:[i.concat([s]),r]:[i,r],[[],null]);return a&&t.push(a),t}static xor(e){let t=null,a=0,i=[],s=e.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),r=Array.prototype.concat(...s),n=r.sort((c,m)=>c.time-m.time);for(let c of n)a+=c.type==="s"?1:-1,a===1?t=c.time:(t&&+t!=+c.time&&i.push(o.fromDateTimes(t,c.time)),t=null);return o.merge(i)}difference(...e){return o.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:gr}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ol,t={}){return this.isValid?To.create(this.s.loc.clone(t),e).formatInterval(this):gr}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:gr}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:gr}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:gr}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:gr}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Fe.invalid(this.invalidReason)}mapEndpoints(e){return o.fromDateTimes(e(this.s),e(this.e))}},ts=class{static hasDST(e=ke.defaultZone){let t=qe.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return va.isValidZone(e)}static normalizeZone(e){return oi(e,ke.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||fe.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||fe.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||fe.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||fe.create(t,a,s)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||fe.create(t,a,s)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null}={}){return(i||fe.create(t,a,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:a=null,locObj:i=null}={}){return(i||fe.create(t,a,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return fe.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return fe.create(t,null,"gregory").eras(e)}static features(){return{relative:G0(),localeWeek:V0()}}};function m0(o,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),a=t(e)-t(o);return Math.floor(Fe.fromMillis(a).as("days"))}function JU(o,e,t){let a=[["years",(c,m)=>m.year-c.year],["quarters",(c,m)=>m.quarter-c.quarter+(m.year-c.year)*4],["months",(c,m)=>m.month-c.month+(m.year-c.year)*12],["weeks",(c,m)=>{let l=m0(c,m);return(l-l%7)/7}],["days",m0]],i={},s=o,r,n;for(let[c,m]of a)t.indexOf(c)>=0&&(r=c,i[c]=m(o,e),n=s.plus(i),n>e?(i[c]--,o=s.plus(i),o>e&&(n=o,i[c]--,o=s.plus(i))):o=n);return[o,i,n,r]}function KU(o,e,t,a){let[i,s,r,n]=JU(o,e,t),c=e-i,m=t.filter(u=>["hours","minutes","seconds","milliseconds"].indexOf(u)>=0);m.length===0&&(r<e&&(r=i.plus({[n]:1})),r!==i&&(s[n]=(s[n]||0)+c/(r-i)));let l=Fe.fromObject(s,a);return m.length>0?Fe.fromMillis(c,a).shiftTo(...m).plus(l):l}var ZU="missing Intl.DateTimeFormat.formatToParts support";function me(o,e=t=>t){return{regex:o,deser:([t])=>e(LN(t))}}var XU="\xA0",uq=`[ ${XU}]`,dq=new RegExp(uq,"g");function eM(o){return o.replace(/\./g,"\\.?").replace(dq,uq)}function l0(o){return o.replace(/\./g,"").replace(dq," ").toLowerCase()}function It(o,e){return o===null?null:{regex:RegExp(o.map(eM).join("|")),deser:([t])=>o.findIndex(a=>l0(t)===l0(a))+e}}function u0(o,e){return{regex:o,deser:([,t,a])=>Vl(t,a),groups:e}}function Sl(o){return{regex:o,deser:([e])=>e}}function oM(o){return o.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function tM(o,e){let t=Et(e),a=Et(e,"{2}"),i=Et(e,"{3}"),s=Et(e,"{4}"),r=Et(e,"{6}"),n=Et(e,"{1,2}"),c=Et(e,"{1,3}"),m=Et(e,"{1,6}"),l=Et(e,"{1,9}"),u=Et(e,"{2,4}"),d=Et(e,"{4,6}"),g=w=>({regex:RegExp(oM(w.val)),deser:([k])=>k,literal:!0}),b=(w=>{if(o.literal)return g(w);switch(w.val){case"G":return It(e.eras("short"),0);case"GG":return It(e.eras("long"),0);case"y":return me(m);case"yy":return me(u,_h);case"yyyy":return me(s);case"yyyyy":return me(d);case"yyyyyy":return me(r);case"M":return me(n);case"MM":return me(a);case"MMM":return It(e.months("short",!0),1);case"MMMM":return It(e.months("long",!0),1);case"L":return me(n);case"LL":return me(a);case"LLL":return It(e.months("short",!1),1);case"LLLL":return It(e.months("long",!1),1);case"d":return me(n);case"dd":return me(a);case"o":return me(c);case"ooo":return me(i);case"HH":return me(a);case"H":return me(n);case"hh":return me(a);case"h":return me(n);case"mm":return me(a);case"m":return me(n);case"q":return me(n);case"qq":return me(a);case"s":return me(n);case"ss":return me(a);case"S":return me(c);case"SSS":return me(i);case"u":return Sl(l);case"uu":return Sl(n);case"uuu":return me(t);case"a":return It(e.meridiems(),0);case"kkkk":return me(s);case"kk":return me(u,_h);case"W":return me(n);case"WW":return me(a);case"E":case"c":return me(t);case"EEE":return It(e.weekdays("short",!1),1);case"EEEE":return It(e.weekdays("long",!1),1);case"ccc":return It(e.weekdays("short",!0),1);case"cccc":return It(e.weekdays("long",!0),1);case"Z":case"ZZ":return u0(new RegExp(`([+-]${n.source})(?::(${a.source}))?`),2);case"ZZZ":return u0(new RegExp(`([+-]${n.source})(${a.source})?`),2);case"z":return Sl(/[a-z_+-/]{1,256}?/i);case" ":return Sl(/[^\S\n\r]/);default:return g(w)}})(o)||{invalidReason:ZU};return b.token=o,b}var aM={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function iM(o,e,t){let{type:a,value:i}=o;if(a==="literal"){let c=/^\s+$/.test(i);return{literal:!c,val:c?" ":i}}let s=e[a],r=a;a==="hour"&&(e.hour12!=null?r=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?r="hour12":r="hour24":r=t.hour12?"hour12":"hour24");let n=aM[r];if(typeof n=="object"&&(n=n[s]),n)return{literal:!1,val:n}}function sM(o){return[`^${o.map(t=>t.regex).reduce((t,a)=>`${t}(${a.source})`,"")}$`,o]}function rM(o,e,t){let a=o.match(e);if(a){let i={},s=1;for(let r in t)if(br(t,r)){let n=t[r],c=n.groups?n.groups+1:1;!n.literal&&n.token&&(i[n.token.val[0]]=n.deser(a.slice(s,s+c))),s+=c}return[a,i]}else return[a,{}]}function nM(o){let e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},t=null,a;return G(o.z)||(t=va.create(o.z)),G(o.Z)||(t||(t=new Mo(o.Z)),a=o.Z),G(o.q)||(o.M=(o.q-1)*3+1),G(o.h)||(o.h<12&&o.a===1?o.h+=12:o.h===12&&o.a===0&&(o.h=0)),o.G===0&&o.y&&(o.y=-o.y),G(o.u)||(o.S=Yh(o.u)),[Object.keys(o).reduce((s,r)=>{let n=e(r);return n&&(s[n]=o[r]),s},{}),t,a]}var Ah=null;function cM(){return Ah||(Ah=qe.fromMillis(1555555555555)),Ah}function mM(o,e){if(o.literal)return o;let t=To.macroTokenToFormatOpts(o.val),a=hq(t,e);return a==null||a.includes(void 0)?o:a}function gq(o,e){return Array.prototype.concat(...o.map(t=>mM(t,e)))}var Hl=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=gq(To.parseFormat(t),e),this.units=this.tokens.map(a=>tM(a,e)),this.disqualifyingUnit=this.units.find(a=>a.invalidReason),!this.disqualifyingUnit){let[a,i]=sM(this.units);this.regex=RegExp(a,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,a]=rM(e,this.regex,this.handlers),[i,s,r]=a?nM(a):[null,null,void 0];if(br(a,"a")&&br(a,"H"))throw new ti("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:a,result:i,zone:s,specificOffset:r}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function pq(o,e,t){return new Hl(o,t).explainFromTokens(e)}function lM(o,e,t){let{result:a,zone:i,specificOffset:s,invalidReason:r}=pq(o,e,t);return[a,i,s,r]}function hq(o,e){if(!o)return null;let a=To.create(e,o).dtFormatter(cM()),i=a.formatToParts(),s=a.resolvedOptions();return i.map(r=>iM(r,o,s))}var wh="Invalid DateTime",d0=864e13;function tc(o){return new No("unsupported zone",`the zone "${o.name}" is not supported`)}function vh(o){return o.weekData===null&&(o.weekData=Fl(o.c)),o.weekData}function xh(o){return o.localWeekData===null&&(o.localWeekData=Fl(o.c,o.loc.getMinDaysInFirstWeek(),o.loc.getStartOfWeek())),o.localWeekData}function es(o,e){let t={ts:o.ts,zone:o.zone,c:o.c,o:o.o,loc:o.loc,invalid:o.invalid};return new qe({...t,...e,old:t})}function fq(o,e,t){let a=o-e*60*1e3,i=t.offset(a);if(e===i)return[a,e];a-=(i-e)*60*1e3;let s=t.offset(a);return i===s?[a,i]:[o-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Dl(o,e){o+=e*60*1e3;let t=new Date(o);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Tl(o,e,t){return fq(Gl(o),e,t)}function g0(o,e){let t=o.o,a=o.c.year+Math.trunc(e.years),i=o.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...o.c,year:a,month:i,day:Math.min(o.c.day,Ll(a,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},r=Fe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),n=Gl(s),[c,m]=fq(n,t,o.zone);return r!==0&&(c+=r,m=o.zone.offset(c)),{ts:c,o:m}}function pr(o,e,t,a,i,s){let{setZone:r,zone:n}=t;if(o&&Object.keys(o).length!==0||e){let c=e||n,m=qe.fromObject(o,{...t,zone:c,specificOffset:s});return r?m:m.setZone(n)}else return qe.invalid(new No("unparsable",`the input "${i}" can't be parsed as ${a}`))}function Rl(o,e,t=!0){return o.isValid?To.create(fe.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(o,e):null}function zh(o,e,t){let a=o.c.year>9999||o.c.year<0,i="";if(a&&o.c.year>=0&&(i+="+"),i+=Ne(o.c.year,a?6:4),t==="year")return i;if(e){if(i+="-",i+=Ne(o.c.month),t==="month")return i;i+="-"}else if(i+=Ne(o.c.month),t==="month")return i;return i+=Ne(o.c.day),i}function p0(o,e,t,a,i,s,r){let n=!t||o.c.millisecond!==0||o.c.second!==0,c="";switch(r){case"day":case"month":case"year":break;default:if(c+=Ne(o.c.hour),r==="hour")break;if(e){if(c+=":",c+=Ne(o.c.minute),r==="minute")break;n&&(c+=":",c+=Ne(o.c.second))}else{if(c+=Ne(o.c.minute),r==="minute")break;n&&(c+=Ne(o.c.second))}if(r==="second")break;n&&(!a||o.c.millisecond!==0)&&(c+=".",c+=Ne(o.c.millisecond,3))}return i&&(o.isOffsetFixed&&o.offset===0&&!s?c+="Z":o.o<0?(c+="-",c+=Ne(Math.trunc(-o.o/60)),c+=":",c+=Ne(Math.trunc(-o.o%60))):(c+="+",c+=Ne(Math.trunc(o.o/60)),c+=":",c+=Ne(Math.trunc(o.o%60)))),s&&(c+="["+o.zone.ianaName+"]"),c}var bq={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uM={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},dM={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Nl=["year","month","day","hour","minute","second","millisecond"],gM=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],pM=["year","ordinal","hour","minute","second","millisecond"];function Ul(o){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[o.toLowerCase()];if(!e)throw new Ml(o);return e}function h0(o){switch(o.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ul(o)}}function hM(o){if(ac===void 0&&(ac=ke.now()),o.type!=="iana")return o.offset(ac);let e=o.name,t=Fh.get(e);return t===void 0&&(t=o.offset(ac),Fh.set(e,t)),t}function f0(o,e){let t=oi(e.zone,ke.defaultZone);if(!t.isValid)return qe.invalid(tc(t));let a=fe.fromObject(e),i,s;if(G(o.year))i=ke.now();else{for(let c of Nl)G(o[c])&&(o[c]=bq[c]);let r=H0(o)||Y0(o);if(r)return qe.invalid(r);let n=hM(t);[i,s]=Tl(o,n,t)}return new qe({ts:i,zone:t,loc:a,o:s})}function b0(o,e,t){let a=G(t.round)?!0:t.round,i=G(t.rounding)?"trunc":t.rounding,s=(n,c)=>(n=Gh(n,a||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(n,c)),r=n=>t.calendary?e.hasSame(o,n)?0:e.startOf(n).diff(o.startOf(n),n).get(n):e.diff(o,n).get(n);if(t.unit)return s(r(t.unit),t.unit);for(let n of t.units){let c=r(n);if(Math.abs(c)>=1)return s(c,n)}return s(o>e?-0:0,t.units[t.units.length-1])}function y0(o){let e={},t;return o.length>0&&typeof o[o.length-1]=="object"?(e=o[o.length-1],t=Array.from(o).slice(0,o.length-1)):t=Array.from(o),[e,t]}var ac,Fh=new Map,qe=class o{constructor(e){let t=e.zone||ke.defaultZone,a=e.invalid||(Number.isNaN(e.ts)?new No("invalid input"):null)||(t.isValid?null:tc(t));this.ts=G(e.ts)?ke.now():e.ts;let i=null,s=null;if(!a)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,s]=[e.old.c,e.old.o];else{let n=ai(e.o)&&!e.old?e.o:t.offset(this.ts);i=Dl(this.ts,n),a=Number.isNaN(i.year)?new No("invalid input"):null,i=a?null:i,s=a?null:n}this._zone=t,this.loc=e.loc||fe.create(),this.invalid=a,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new o({})}static local(){let[e,t]=y0(arguments),[a,i,s,r,n,c,m]=t;return f0({year:a,month:i,day:s,hour:r,minute:n,second:c,millisecond:m},e)}static utc(){let[e,t]=y0(arguments),[a,i,s,r,n,c,m]=t;return e.zone=Mo.utcInstance,f0({year:a,month:i,day:s,hour:r,minute:n,second:c,millisecond:m},e)}static fromJSDate(e,t={}){let a=VN(e)?e.valueOf():NaN;if(Number.isNaN(a))return o.invalid("invalid input");let i=oi(t.zone,ke.defaultZone);return i.isValid?new o({ts:a,zone:i,loc:fe.fromObject(t)}):o.invalid(tc(i))}static fromMillis(e,t={}){if(ai(e))return e<-d0||e>d0?o.invalid("Timestamp out of range"):new o({ts:e,zone:oi(t.zone,ke.defaultZone),loc:fe.fromObject(t)});throw new Ve(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(ai(e))return new o({ts:e*1e3,zone:oi(t.zone,ke.defaultZone),loc:fe.fromObject(t)});throw new Ve("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let a=oi(t.zone,ke.defaultZone);if(!a.isValid)return o.invalid(tc(a));let i=fe.fromObject(t),s=Pl(e,h0),{minDaysInFirstWeek:r,startOfWeek:n}=o0(s,i),c=ke.now(),m=G(t.specificOffset)?a.offset(c):t.specificOffset,l=!G(s.ordinal),u=!G(s.year),d=!G(s.month)||!G(s.day),g=u||d,p=s.weekYear||s.weekNumber;if((g||l)&&p)throw new ti("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&l)throw new ti("Can't mix ordinal dates with month/day");let b=p||s.weekday&&!g,w,k,x=Dl(c,m);b?(w=gM,k=uM,x=Fl(x,r,n)):l?(w=pM,k=dM,x=kh(x)):(w=Nl,k=bq);let v=!1;for(let oe of w){let te=s[oe];G(te)?v?s[oe]=k[oe]:s[oe]=x[oe]:v=!0}let j=b?HN(s,r,n):l?YN(s):H0(s),I=j||Y0(s);if(I)return o.invalid(I);let R=b?Xz(s,r,n):l?e0(s):s,[D,M]=Tl(R,m,a),S=new o({ts:D,zone:a,o:M,loc:i});return s.weekday&&g&&e.weekday!==S.weekday?o.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${S.toISO()}`):S.isValid?S:o.invalid(S.invalid)}static fromISO(e,t={}){let[a,i]=NU(e);return pr(a,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[a,i]=UU(e);return pr(a,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[a,i]=MU(e);return pr(a,i,t,"HTTP",t)}static fromFormat(e,t,a={}){if(G(e)||G(t))throw new Ve("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:s=null}=a,r=fe.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[n,c,m,l]=lM(r,e,t);return l?o.invalid(l):pr(n,c,a,`format ${t}`,e,m)}static fromString(e,t,a={}){return o.fromFormat(e,t,a)}static fromSQL(e,t={}){let[a,i]=YU(e);return pr(a,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Ve("need to specify a reason the DateTime is invalid");let a=e instanceof No?e:new No(e,t);if(ke.throwOnInvalid)throw new qh(a);return new o({invalid:a})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let a=hq(e,fe.fromObject(t));return a?a.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return gq(To.parseFormat(e),fe.fromObject(t)).map(i=>i.val).join("")}static resetCache(){ac=void 0,Fh.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?vh(this).weekYear:NaN}get weekNumber(){return this.isValid?vh(this).weekNumber:NaN}get weekday(){return this.isValid?vh(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?xh(this).weekday:NaN}get localWeekNumber(){return this.isValid?xh(this).weekNumber:NaN}get localWeekYear(){return this.isValid?xh(this).weekYear:NaN}get ordinal(){return this.isValid?kh(this.c).ordinal:NaN}get monthShort(){return this.isValid?ts.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ts.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ts.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ts.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,a=Gl(this.c),i=this.zone.offset(a-e),s=this.zone.offset(a+e),r=this.zone.offset(a-i*t),n=this.zone.offset(a-s*t);if(r===n)return[this];let c=a-r*t,m=a-n*t,l=Dl(c,r),u=Dl(m,n);return l.hour===u.hour&&l.minute===u.minute&&l.second===u.second&&l.millisecond===u.millisecond?[es(this,{ts:c}),es(this,{ts:m})]:[this]}get isInLeapYear(){return nc(this.year)}get daysInMonth(){return Ll(this.year,this.month)}get daysInYear(){return this.isValid?hr(this.year):NaN}get weeksInWeekYear(){return this.isValid?rc(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?rc(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:a,calendar:i}=To.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:a,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(Mo.instance(e),t)}toLocal(){return this.setZone(ke.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:a=!1}={}){if(e=oi(e,ke.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||a){let s=e.offset(this.ts),r=this.toObject();[i]=Tl(r,s,e)}return es(this,{ts:i,zone:e})}else return o.invalid(tc(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:a}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:a});return es(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Pl(e,h0),{minDaysInFirstWeek:a,startOfWeek:i}=o0(t,this.loc),s=!G(t.weekYear)||!G(t.weekNumber)||!G(t.weekday),r=!G(t.ordinal),n=!G(t.year),c=!G(t.month)||!G(t.day),m=n||c,l=t.weekYear||t.weekNumber;if((m||r)&&l)throw new ti("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&r)throw new ti("Can't mix ordinal dates with month/day");let u;s?u=Xz({...Fl(this.c,a,i),...t},a,i):G(t.ordinal)?(u={...this.toObject(),...t},G(t.day)&&(u.day=Math.min(Ll(u.year,u.month),u.day))):u=e0({...kh(this.c),...t});let[d,g]=Tl(u,this.o,this.zone);return es(this,{ts:d,o:g})}plus(e){if(!this.isValid)return this;let t=Fe.fromDurationLike(e);return es(this,g0(this,t))}minus(e){if(!this.isValid)return this;let t=Fe.fromDurationLike(e).negate();return es(this,g0(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let a={},i=Fe.normalizeUnit(e);switch(i){case"years":a.month=1;case"quarters":case"months":a.day=1;case"weeks":case"days":a.hour=0;case"hours":a.minute=0;case"minutes":a.second=0;case"seconds":a.millisecond=0;break}if(i==="weeks")if(t){let s=this.loc.getStartOfWeek(),{weekday:r}=this;r<s&&(a.weekNumber=this.weekNumber-1),a.weekday=s}else a.weekday=1;if(i==="quarters"){let s=Math.ceil(this.month/3);a.month=(s-1)*3+1}return this.set(a)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?To.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):wh}toLocaleString(e=Ol,t={}){return this.isValid?To.create(this.loc.clone(t),e).formatDateTime(this):wh}toLocaleParts(e={}){return this.isValid?To.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:a=!1,includeOffset:i=!0,extendedZone:s=!1,precision:r="milliseconds"}={}){if(!this.isValid)return null;r=Ul(r);let n=e==="extended",c=zh(this,n,r);return Nl.indexOf(r)>=3&&(c+="T"),c+=p0(this,n,t,a,i,s,r),c}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?zh(this,e==="extended",Ul(t)):null}toISOWeekDate(){return Rl(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:a=!0,includePrefix:i=!1,extendedZone:s=!1,format:r="extended",precision:n="milliseconds"}={}){return this.isValid?(n=Ul(n),(i&&Nl.indexOf(n)>=3?"T":"")+p0(this,r==="extended",t,e,a,s,n)):null}toRFC2822(){return Rl(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Rl(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?zh(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:a=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(a&&(i+=" "),t?i+="z":e&&(i+="ZZ")),Rl(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():wh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",a={}){if(!this.isValid||!e.isValid)return Fe.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...a},s=WN(t).map(Fe.normalizeUnit),r=e.valueOf()>this.valueOf(),n=r?this:e,c=r?e:this,m=KU(n,c,s,i);return r?m.negate():m}diffNow(e="milliseconds",t={}){return this.diff(o.now(),e,t)}until(e){return this.isValid?as.fromDateTimes(this,e):this}hasSame(e,t,a){if(!this.isValid)return!1;let i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,a)<=i&&i<=s.endOf(t,a)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let t=e.base||o.fromObject({},{zone:this.zone}),a=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),b0(t,this.plus(a),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?b0(e.base||o.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(o.isDateTime))throw new Ve("min requires all arguments be DateTimes");return t0(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(o.isDateTime))throw new Ve("max requires all arguments be DateTimes");return t0(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,a={}){let{locale:i=null,numberingSystem:s=null}=a,r=fe.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return pq(r,e,t)}static fromStringExplain(e,t,a={}){return o.fromFormatExplain(e,t,a)}static buildFormatParser(e,t={}){let{locale:a=null,numberingSystem:i=null}=t,s=fe.fromOpts({locale:a,numberingSystem:i,defaultToEN:!0});return new Hl(s,e)}static fromFormatParser(e,t,a={}){if(G(e)||G(t))throw new Ve("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:s=null}=a,r=fe.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!r.equals(t.locale))throw new Ve(`fromFormatParser called with a locale of ${r}, but the format parser was created for ${t.locale}`);let{result:n,zone:c,specificOffset:m,invalidReason:l}=t.explainFromTokens(e);return l?o.invalid(l):pr(n,c,a,`format ${t.format}`,e,m)}static get DATE_SHORT(){return Ol}static get DATE_MED(){return k0}static get DATE_MED_WITH_WEEKDAY(){return qN}static get DATE_FULL(){return A0}static get DATE_HUGE(){return w0}static get TIME_SIMPLE(){return v0}static get TIME_WITH_SECONDS(){return x0}static get TIME_WITH_SHORT_OFFSET(){return z0}static get TIME_WITH_LONG_OFFSET(){return q0}static get TIME_24_SIMPLE(){return E0}static get TIME_24_WITH_SECONDS(){return I0}static get TIME_24_WITH_SHORT_OFFSET(){return C0}static get TIME_24_WITH_LONG_OFFSET(){return j0}static get DATETIME_SHORT(){return Q0}static get DATETIME_SHORT_WITH_SECONDS(){return B0}static get DATETIME_MED(){return S0}static get DATETIME_MED_WITH_SECONDS(){return D0}static get DATETIME_MED_WITH_WEEKDAY(){return EN}static get DATETIME_FULL(){return R0}static get DATETIME_FULL_WITH_SECONDS(){return T0}static get DATETIME_HUGE(){return N0}static get DATETIME_HUGE_WITH_SECONDS(){return U0}};function ec(o){if(qe.isDateTime(o))return o;if(o&&o.valueOf&&ai(o.valueOf()))return qe.fromJSDate(o);if(o&&typeof o=="object")return qe.fromObject(o);throw new Ve(`Unknown datetime argument: ${o}, of type ${typeof o}`)}var fM="3.7.2";Oo.DateTime=qe;Oo.Duration=Fe;Oo.FixedOffsetZone=Mo;Oo.IANAZone=va;Oo.Info=ts;Oo.Interval=as;Oo.InvalidZone=_l;Oo.Settings=ke;Oo.SystemZone=sc;Oo.VERSION=fM;Oo.Zone=ii});var Kl=y(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.CronDate=go.DAYS_IN_MONTH=go.DateMathOp=go.TimeUnit=void 0;var is=yq(),ao;(function(o){o.Second="Second",o.Minute="Minute",o.Hour="Hour",o.Day="Day",o.Month="Month",o.Year="Year"})(ao||(go.TimeUnit=ao={}));var $l;(function(o){o.Add="Add",o.Subtract="Subtract"})($l||(go.DateMathOp=$l={}));go.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);var Jl=class o{#e;#o=null;#a=null;#i={add:{[ao.Year]:this.addYear.bind(this),[ao.Month]:this.addMonth.bind(this),[ao.Day]:this.addDay.bind(this),[ao.Hour]:this.addHour.bind(this),[ao.Minute]:this.addMinute.bind(this),[ao.Second]:this.addSecond.bind(this)},subtract:{[ao.Year]:this.subtractYear.bind(this),[ao.Month]:this.subtractMonth.bind(this),[ao.Day]:this.subtractDay.bind(this),[ao.Hour]:this.subtractHour.bind(this),[ao.Minute]:this.subtractMinute.bind(this),[ao.Second]:this.subtractSecond.bind(this)}};constructor(e,t){let a={zone:t};if(e?e instanceof o?(this.#e=e.#e,this.#o=e.#o,this.#a=e.#a):e instanceof Date?this.#e=is.DateTime.fromJSDate(e,a):typeof e=="number"?this.#e=is.DateTime.fromMillis(e,a):(this.#e=is.DateTime.fromISO(e,a),this.#e.isValid||(this.#e=is.DateTime.fromRFC2822(e,a)),this.#e.isValid||(this.#e=is.DateTime.fromSQL(e,a)),this.#e.isValid||(this.#e=is.DateTime.fromFormat(e,"EEE, d MMM yyyy HH:mm:ss",a))):this.#e=is.DateTime.local(),!this.#e.isValid)throw new Error(`CronDate: unhandled timestamp: ${e}`);t&&t!==this.#e.zoneName&&(this.#e=this.#e.setZone(t))}static#s(e){return e%4===0&&e%100!==0||e%400===0}get dstStart(){return this.#o}set dstStart(e){this.#o=e}get dstEnd(){return this.#a}set dstEnd(e){this.#a=e}addYear(){this.#e=this.#e.plus({years:1})}addMonth(){this.#e=this.#e.plus({months:1}).startOf("month")}addDay(){this.#e=this.#e.plus({days:1}).startOf("day")}addHour(){this.#e=this.#e.plus({hours:1}).startOf("hour")}addMinute(){this.#e=this.#e.plus({minutes:1}).startOf("minute")}addSecond(){this.#e=this.#e.plus({seconds:1})}subtractYear(){this.#e=this.#e.minus({years:1})}subtractMonth(){this.#e=this.#e.minus({months:1}).endOf("month").startOf("second")}subtractDay(){this.#e=this.#e.minus({days:1}).endOf("day").startOf("second")}subtractHour(){this.#e=this.#e.minus({hours:1}).endOf("hour").startOf("second")}subtractMinute(){this.#e=this.#e.minus({minutes:1}).endOf("minute").startOf("second")}subtractSecond(){this.#e=this.#e.minus({seconds:1})}addUnit(e){this.#i.add[e]()}subtractUnit(e){this.#i.subtract[e]()}invokeDateOperation(e,t){if(e===$l.Add){this.addUnit(t);return}if(e===$l.Subtract){this.subtractUnit(t);return}throw new Error(`Invalid verb: ${e}`)}getDate(){return this.#e.day}getFullYear(){return this.#e.year}getDay(){let e=this.#e.weekday;return e===7?0:e}getMonth(){return this.#e.month-1}getHours(){return this.#e.hour}getMinutes(){return this.#e.minute}getSeconds(){return this.#e.second}getMilliseconds(){return this.#e.millisecond}getUTCOffset(){return this.#e.offset}setStartOfDay(){this.#e=this.#e.startOf("day")}setEndOfDay(){this.#e=this.#e.endOf("day")}getTime(){return this.#e.valueOf()}getUTCDate(){return this.#t().day}getUTCFullYear(){return this.#t().year}getUTCDay(){let e=this.#t().weekday;return e===7?0:e}getUTCMonth(){return this.#t().month-1}getUTCHours(){return this.#t().hour}getUTCMinutes(){return this.#t().minute}getUTCSeconds(){return this.#t().second}toISOString(){return this.#e.toUTC().toISO()}toJSON(){return this.#e.toJSON()}setDate(e){this.#e=this.#e.set({day:e})}setFullYear(e){this.#e=this.#e.set({year:e})}setDay(e){this.#e=this.#e.set({weekday:e})}setMonth(e){this.#e=this.#e.set({month:e+1})}setHours(e){this.#e=this.#e.set({hour:e})}setMinutes(e){this.#e=this.#e.set({minute:e})}setSeconds(e){this.#e=this.#e.set({second:e})}setMilliseconds(e){this.#e=this.#e.set({millisecond:e})}toString(){return this.toDate().toString()}toDate(){return this.#e.toJSDate()}isLastDayOfMonth(){let{day:e,month:t}=this.#e;if(t===2){let a=o.#s(this.#e.year);return e===go.DAYS_IN_MONTH[t-1]-(a?0:1)}return e===go.DAYS_IN_MONTH[t-1]}isLastWeekdayOfMonth(){let{day:e,month:t}=this.#e,a;return t===2?a=go.DAYS_IN_MONTH[t-1]-(o.#s(this.#e.year)?0:1):a=go.DAYS_IN_MONTH[t-1],e>a-7}applyDateOperation(e,t,a){if(t===ao.Month||t===ao.Day){this.invokeDateOperation(e,t);return}let i=this.getHours();this.invokeDateOperation(e,t);let s=this.getHours(),r=s-i;r===2?a!==24&&(this.dstStart=s):r===0&&this.getMinutes()===0&&this.getSeconds()===0&&a!==24&&(this.dstEnd=s)}#t(){return this.#e.toUTC()}};go.CronDate=Jl;go.default=Jl});var kq=y(Zl=>{"use strict";Object.defineProperty(Zl,"__esModule",{value:!0});Zl.CronMonth=void 0;var bM=Kl(),yM=Xa(),kM=1,AM=12,wM=Object.freeze([]),Jh=class extends yM.CronField{static get min(){return kM}static get max(){return AM}static get chars(){return wM}static get daysInMonth(){return bM.DAYS_IN_MONTH}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Zl.CronMonth=Jh});var Aq=y(Xl=>{"use strict";Object.defineProperty(Xl,"__esModule",{value:!0});Xl.CronSecond=void 0;var vM=Xa(),xM=0,zM=59,qM=Object.freeze([]),Kh=class extends vM.CronField{static get min(){return xM}static get max(){return zM}static get chars(){return qM}constructor(e,t){super(e,t),this.validate()}get values(){return super.values}};Xl.CronSecond=Kh});var eu=y(vo=>{"use strict";var EM=vo&&vo.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),si=vo&&vo.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&EM(e,o,t)};Object.defineProperty(vo,"__esModule",{value:!0});si(Mz(),vo);si(Oz(),vo);si(_z(),vo);si(Xa(),vo);si(Fz(),vo);si(Lz(),vo);si(kq(),vo);si(Aq(),vo)});var Xh=y(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.CronFieldCollection=void 0;var nt=eu(),Zh=class o{#e;#o;#a;#i;#s;#t;static from(e,t){return new o({second:this.resolveField(nt.CronSecond,e.second,t.second),minute:this.resolveField(nt.CronMinute,e.minute,t.minute),hour:this.resolveField(nt.CronHour,e.hour,t.hour),dayOfMonth:this.resolveField(nt.CronDayOfMonth,e.dayOfMonth,t.dayOfMonth),month:this.resolveField(nt.CronMonth,e.month,t.month),dayOfWeek:this.resolveField(nt.CronDayOfWeek,e.dayOfWeek,t.dayOfWeek)})}static resolveField(e,t,a){return a?a instanceof nt.CronField?a:new e(a):t}constructor({second:e,minute:t,hour:a,dayOfMonth:i,month:s,dayOfWeek:r}){if(!e)throw new Error("Validation error, Field second is missing");if(!t)throw new Error("Validation error, Field minute is missing");if(!a)throw new Error("Validation error, Field hour is missing");if(!i)throw new Error("Validation error, Field dayOfMonth is missing");if(!s)throw new Error("Validation error, Field month is missing");if(!r)throw new Error("Validation error, Field dayOfWeek is missing");if(s.values.length===1&&!i.hasLastChar&&!(parseInt(i.values[0],10)<=nt.CronMonth.daysInMonth[s.values[0]-1]))throw new Error("Invalid explicit day of month definition");this.#e=e,this.#o=t,this.#a=a,this.#s=s,this.#t=r,this.#i=i}get second(){return this.#e}get minute(){return this.#o}get hour(){return this.#a}get dayOfMonth(){return this.#i}get month(){return this.#s}get dayOfWeek(){return this.#t}static compactField(e){if(e.length===0)return[];let t=[],a;return e.forEach((i,s,r)=>{if(a===void 0){a={start:i,count:1};return}let n=r[s-1]||a.start,c=r[s+1];if(i==="L"||i==="W"){t.push(a),t.push({start:i,count:1}),a=void 0;return}if(a.step===void 0&&c!==void 0){let m=i-n,l=c-i;if(m<=l){a={...a,count:2,end:i,step:m};return}a.step=1}i-(a.end??0)===a.step?(a.count++,a.end=i):(a.count===1?t.push({start:a.start,count:1}):a.count===2?(t.push({start:a.start,count:1}),t.push({start:a.end??n,count:1})):t.push(a),a={start:i,count:1})}),a&&t.push(a),t}static#c(e,t,a){let i=t.step;return i?i===1&&t.start===e.min&&t.end&&t.end>=a?e.hasQuestionMarkChar?"?":"*":i!==1&&t.start===e.min&&t.end&&t.end>=a-i+1?`*/${i}`:null:null}static#r(e,t){let a=e.step;if(a===1)return`${e.start}-${e.end}`;let i=e.start===0?e.count-1:e.count;if(!a)throw new Error("Unexpected range step");if(!e.end)throw new Error("Unexpected range end");if(a*i>e.end){let s=(n,c)=>{if(typeof e.start!="number")throw new Error("Unexpected range start");return c%a===0?e.start+c:null};if(typeof e.start!="number")throw new Error("Unexpected range start");let r={length:e.end-e.start+1};return Array.from(r,s).filter(n=>n!==null).join(",")}return e.end===t-a+1?`${e.start}/${a}`:`${e.start}-${e.end}/${a}`}stringifyField(e){let t=e.max,a=e.values;if(e instanceof nt.CronDayOfWeek){t=6;let s=this.#t.values;a=s[s.length-1]===7?s.slice(0,-1):s}e instanceof nt.CronDayOfMonth&&(t=this.#s.values.length===1?nt.CronMonth.daysInMonth[this.#s.values[0]-1]:e.max);let i=o.compactField(a);if(i.length===1){let s=o.#c(e,i[0],t);if(s)return s}return i.map(s=>{let r=s.count===1?s.start.toString():o.#r(s,t);return e instanceof nt.CronDayOfWeek&&e.nthDay>0?`${r}#${e.nthDay}`:r}).join(",")}stringify(e=!1){let t=[];return e&&t.push(this.stringifyField(this.#e)),t.push(this.stringifyField(this.#o),this.stringifyField(this.#a),this.stringifyField(this.#i),this.stringifyField(this.#s),this.stringifyField(this.#t)),t.join(" ")}serialize(){return{second:this.#e.serialize(),minute:this.#o.serialize(),hour:this.#a.serialize(),dayOfMonth:this.#i.serialize(),month:this.#s.serialize(),dayOfWeek:this.#t.serialize()}}};ou.CronFieldCollection=Zh});var ef=y(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.CronExpression=ct.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=ct.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;var je=Kl();ct.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range";ct.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";var wq=1e4,tu=class o{#e;#o;#a;#i;#s;#t;#c=null;#r=!1;constructor(e,t){this.#e=t,this.#o=t.tz,this.#i=t.startDate?new je.CronDate(t.startDate,this.#o):null,this.#s=t.endDate?new je.CronDate(t.endDate,this.#o):null;let a=t.currentDate??t.startDate;if(a){let i=new je.CronDate(a,this.#o);this.#i&&i.getTime()<this.#i.getTime()?a=this.#i:this.#s&&i.getTime()>this.#s.getTime()&&(a=this.#s)}this.#a=new je.CronDate(a,this.#o),this.#t=e}get fields(){return this.#t}static fieldsToExpression(e,t){return new o(e,t||{})}static#n(e,t){return t.some(a=>a===e)}#m(e,t){return e[t?e.length-1:0]}#u(e){let t=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`;if(this.#c===t)return this.#r;let a=new je.CronDate(e);a.setStartOfDay();let i=new je.CronDate(e);return i.setEndOfDay(),this.#c=t,this.#r=a.getUTCOffset()!==i.getUTCOffset(),this.#r}#l(e,t,a){let i=this.#t.second.values,s=e.getSeconds(),r=this.#t.second.findNearestValue(s,a);if(r!==null){e.setSeconds(r);return}e.applyDateOperation(t,je.TimeUnit.Minute,this.#t.hour.values.length),e.setSeconds(this.#m(i,a))}#d(e,t,a){let i=this.#t.minute.values,s=this.#t.second.values,r=e.getMinutes(),n=this.#t.minute.findNearestValue(r,a);if(n!==null){e.setMinutes(n),e.setSeconds(this.#m(s,a));return}e.applyDateOperation(t,je.TimeUnit.Hour,this.#t.hour.values.length),e.setMinutes(this.#m(i,a)),e.setSeconds(this.#m(s,a))}static#p(e,t){let a=t.isLastWeekdayOfMonth();return e.some(i=>{let s=parseInt(i.toString().charAt(0),10)%7;if(Number.isNaN(s))throw new Error(`Invalid last weekday of the month expression: ${i}`);return t.getDay()===s&&a})}next(){return this.#f()}prev(){return this.#f(!0)}hasNext(){let e=this.#a;try{return this.#f(),!0}catch{return!1}finally{this.#a=e}}hasPrev(){let e=this.#a;try{return this.#f(!0),!0}catch{return!1}finally{this.#a=e}}take(e){let t=[];if(e>=0)for(let a=0;a<e;a++)try{t.push(this.next())}catch{return t}else for(let a=0;a>e;a--)try{t.push(this.prev())}catch{return t}return t}reset(e){this.#a=new je.CronDate(e||this.#e.currentDate)}stringify(e=!1){return this.#t.stringify(e)}includesDate(e){let{second:t,minute:a,hour:i,month:s}=this.#t,r=new je.CronDate(e,this.#o);return!(!t.values.includes(r.getSeconds())||!a.values.includes(r.getMinutes())||!i.values.includes(r.getHours())||!s.values.includes(r.getMonth()+1)||!this.#g(r)||this.#t.dayOfWeek.nthDay>0&&Math.ceil(r.getDate()/7)!==this.#t.dayOfWeek.nthDay)}toString(){return this.#e.expression||this.stringify(!0)}#g(e){let t=this.#t.dayOfMonth.isWildcard,a=!t,i=this.#t.dayOfWeek.isWildcard,s=!i,r=o.#n(e.getDate(),this.#t.dayOfMonth.values)||this.#t.dayOfMonth.hasLastChar&&e.isLastDayOfMonth(),n=o.#n(e.getDay(),this.#t.dayOfWeek.values)||this.#t.dayOfWeek.hasLastChar&&o.#p(this.#t.dayOfWeek.values,e);return!!(a&&s&&(r||n)||r&&!s||t&&!i&&n)}#b(e,t,a){let i=this.#t.hour.values,s=i,r=e.getHours(),n=o.#n(r,i),c=e.dstStart===r,m=e.dstEnd===r;if(c)return o.#n(r-1,i)?!0:(e.invokeDateOperation(t,je.TimeUnit.Hour),!1);if(m&&!a)return e.dstEnd=null,e.applyDateOperation(je.DateMathOp.Add,je.TimeUnit.Hour,s.length),!1;if(n)return!0;e.dstStart=null;let l=this.#t.hour.findNearestValue(r,a);if(l===null)return e.applyDateOperation(t,je.TimeUnit.Day,s.length),!1;if(this.#u(e)){let u=a?r-l:l-r;for(let d=0;d<u;d++)e.applyDateOperation(t,je.TimeUnit.Hour,s.length)}else e.setHours(l);return e.setMinutes(this.#m(this.#t.minute.values,a)),e.setSeconds(this.#m(this.#t.second.values,a)),!1}#h(e){if(!this.#i&&!this.#s)return;let t=e.getTime();if(this.#i&&t<this.#i.getTime())throw new Error(ct.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(this.#s&&t>this.#s.getTime())throw new Error(ct.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)}#f(e=!1){let t=e?je.DateMathOp.Subtract:je.DateMathOp.Add,a=new je.CronDate(this.#a),i=a.getTime(),s=0;for(;++s<wq;){if(this.#h(a),!this.#g(a)){a.applyDateOperation(t,je.TimeUnit.Day,this.#t.hour.values.length);continue}if(!(this.#t.dayOfWeek.nthDay<=0||Math.ceil(a.getDate()/7)===this.#t.dayOfWeek.nthDay)){a.applyDateOperation(t,je.TimeUnit.Day,this.#t.hour.values.length);continue}if(!o.#n(a.getMonth()+1,this.#t.month.values)){a.applyDateOperation(t,je.TimeUnit.Month,this.#t.hour.values.length);continue}if(this.#b(a,t,e)){if(!o.#n(a.getMinutes(),this.#t.minute.values)){this.#d(a,t,e);continue}if(!o.#n(a.getSeconds(),this.#t.second.values)){this.#l(a,t,e);continue}if(i===a.getTime()){(t==="Add"||a.getMilliseconds()===0)&&a.applyDateOperation(t,je.TimeUnit.Second,this.#t.hour.values.length);continue}break}}if(s>wq)throw new Error(ct.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return a.getMilliseconds()!==0&&a.setMilliseconds(0),this.#a=a,a}[Symbol.iterator](){return{next:()=>({value:this.#f(),done:!this.hasNext()})}}};ct.CronExpression=tu;ct.default=tu});var vq=y(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.seededRandom=jM;function IM(o){let e=2166136261;for(let t=0;t<o.length;t++)e^=o.charCodeAt(t),e=Math.imul(e,16777619);return()=>e>>>0}function CM(o){return()=>{let e=o+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function jM(o){let e=o?IM(o)():Math.floor(Math.random()*1e10);return CM(e)}});var au=y(ut=>{"use strict";Object.defineProperty(ut,"__esModule",{value:!0});ut.CronExpressionParser=ut.DayOfWeek=ut.Months=ut.CronUnit=ut.PredefinedExpressions=void 0;var QM=Xh(),BM=ef(),SM=vq(),mt=eu(),tf;(function(o){o["@yearly"]="0 0 0 1 1 *",o["@annually"]="0 0 0 1 1 *",o["@monthly"]="0 0 0 1 * *",o["@weekly"]="0 0 0 * * 0",o["@daily"]="0 0 0 * * *",o["@hourly"]="0 0 * * * *",o["@minutely"]="0 * * * * *",o["@secondly"]="* * * * * *",o["@weekdays"]="0 0 0 * * 1-5",o["@weekends"]="0 0 0 * * 0,6"})(tf||(ut.PredefinedExpressions=tf={}));var lt;(function(o){o.Second="Second",o.Minute="Minute",o.Hour="Hour",o.DayOfMonth="DayOfMonth",o.Month="Month",o.DayOfWeek="DayOfWeek"})(lt||(ut.CronUnit=lt={}));var af;(function(o){o[o.jan=1]="jan",o[o.feb=2]="feb",o[o.mar=3]="mar",o[o.apr=4]="apr",o[o.may=5]="may",o[o.jun=6]="jun",o[o.jul=7]="jul",o[o.aug=8]="aug",o[o.sep=9]="sep",o[o.oct=10]="oct",o[o.nov=11]="nov",o[o.dec=12]="dec"})(af||(ut.Months=af={}));var sf;(function(o){o[o.sun=0]="sun",o[o.mon=1]="mon",o[o.tue=2]="tue",o[o.wed=3]="wed",o[o.thu=4]="thu",o[o.fri=5]="fri",o[o.sat=6]="sat"})(sf||(ut.DayOfWeek=sf={}));var rf=class o{static parse(e,t={}){let{strict:a=!1,hashSeed:i}=t,s=(0,SM.seededRandom)(i);e=tf[e]||e;let r=o.#e(e,a);if(!(r.dayOfMonth==="*"||r.dayOfWeek==="*"||!a))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");let n=o.#o(lt.Second,r.second,mt.CronSecond.constraints,s),c=o.#o(lt.Minute,r.minute,mt.CronMinute.constraints,s),m=o.#o(lt.Hour,r.hour,mt.CronHour.constraints,s),l=o.#o(lt.Month,r.month,mt.CronMonth.constraints,s),u=o.#o(lt.DayOfMonth,r.dayOfMonth,mt.CronDayOfMonth.constraints,s),{dayOfWeek:d,nthDayOfWeek:g}=o.#u(r.dayOfWeek),p=o.#o(lt.DayOfWeek,d,mt.CronDayOfWeek.constraints,s),b=new QM.CronFieldCollection({second:new mt.CronSecond(n,{rawValue:r.second}),minute:new mt.CronMinute(c,{rawValue:r.minute}),hour:new mt.CronHour(m,{rawValue:r.hour}),dayOfMonth:new mt.CronDayOfMonth(u,{rawValue:r.dayOfMonth}),month:new mt.CronMonth(l,{rawValue:r.month}),dayOfWeek:new mt.CronDayOfWeek(p,{rawValue:r.dayOfWeek,nthDayOfWeek:g})});return new BM.CronExpression(b,{...t,expression:e})}static#e(e,t){if(t&&!e.length)throw new Error("Invalid cron expression");e=e||"0 * * * * *";let a=e.trim().split(/\s+/);if(t&&a.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(a.length>6)throw new Error("Invalid cron expression, too many fields");let i=["*","*","*","*","*","0"];a.length<i.length&&a.unshift(...i.slice(a.length));let[s,r,n,c,m,l]=a;return{second:s,minute:r,hour:n,dayOfMonth:c,month:m,dayOfWeek:l}}static#o(e,t,a,i){if((e===lt.Month||e===lt.DayOfWeek)&&(t=t.replace(/[a-z]{3}/gi,s=>{s=s.toLowerCase();let r=af[s]||sf[s];if(r===void 0)throw new Error(`Validation error, cannot resolve alias "${s}"`);return r.toString()})),!a.validChars.test(t))throw new Error(`Invalid characters, got value: ${t}`);return t=this.#a(t,a),t=this.#i(t,a,i),this.#s(e,t,a)}static#a(e,t){return e.replace(/[*?]/g,t.min+"-"+t.max)}static#i(e,t,a){let i=a();return e.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(s,r,n,c)=>{if(r&&n&&c){let m=parseInt(r,10),l=parseInt(n,10),u=parseInt(c,10);if(m>l)throw new Error(`Invalid range: ${m}-${l}, min > max`);if(u<=0)throw new Error(`Invalid step: ${u}, must be positive`);let d=Math.max(m,t.min),g=Math.floor(i*u),p=[];for(let b=Math.floor(d/u)*u+g;b<=l;b+=u)b>=d&&p.push(b);return p.join(",")}else if(r&&n){let m=parseInt(r,10),l=parseInt(n,10);if(m>l)throw new Error(`Invalid range: ${m}-${l}, min > max`);return String(Math.floor(i*(l-m+1))+m)}else if(c){let m=parseInt(c,10);if(m<=0)throw new Error(`Invalid step: ${m}, must be positive`);let l=Math.floor(i*m),u=[];for(let d=Math.floor(t.min/m)*m+l;d<=t.max;d+=m)d>=t.min&&u.push(d);return u.join(",")}else return String(Math.floor(i*(t.max-t.min+1)+t.min))})}static#s(e,t,a){let i=[];function s(n,c){if(Array.isArray(n))i.push(...n);else if(o.#l(c,n))i.push(n);else{let m=parseInt(n.toString(),10);if(!(m>=c.min&&m<=c.max))throw new Error(`Constraint error, got value ${n} expected range ${c.min}-${c.max}`);i.push(e===lt.DayOfWeek?m%7:n)}}return t.split(",").forEach(n=>{if(!(n.length>0))throw new Error("Invalid list value format");s(o.#t(e,n,a),a)}),i}static#t(e,t,a){let i=t.split("/");if(i.length>2)throw new Error(`Invalid repeat: ${t}`);return i.length===2?(isNaN(parseInt(i[0],10))||(i[0]=`${i[0]}-${a.max}`),o.#m(e,i[0],parseInt(i[1],10),a)):o.#m(e,t,1,a)}static#c(e,t,a){if(!(!isNaN(e)&&!isNaN(t)&&e>=a.min&&t<=a.max))throw new Error(`Constraint error, got range ${e}-${t} expected range ${a.min}-${a.max}`);if(e>t)throw new Error(`Invalid range: ${e}-${t}, min(${e}) > max(${t})`)}static#r(e){if(!(!isNaN(e)&&e>0))throw new Error(`Constraint error, cannot repeat at every ${e} time.`)}static#n(e,t,a,i){let s=[];e===lt.DayOfWeek&&a%7===0&&s.push(0);for(let r=t;r<=a;r+=i)s.indexOf(r)===-1&&s.push(r);return s}static#m(e,t,a,i){let s=t.split("-");if(s.length<=1)return isNaN(+t)?t:+t;let[r,n]=s.map(c=>parseInt(c,10));return this.#c(r,n,i),this.#r(a),this.#n(e,r,n,a)}static#u(e){let t=e.split("#");if(t.length<=1)return{dayOfWeek:t[0]};let a=+t[t.length-1],i=e.match(/([,-/])/);if(i!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${i?.[0]}\` special characters are incompatible`);if(!(t.length<=2&&!isNaN(a)&&a>=1&&a<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:t[0],nthDayOfWeek:a}}static#l(e,t){return e.chars.some(a=>t.toString().includes(a))}};ut.CronExpressionParser=rf});var xq=y(Pt=>{"use strict";var DM=Pt&&Pt.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),RM=Pt&&Pt.__setModuleDefault||(Object.create?(function(o,e){Object.defineProperty(o,"default",{enumerable:!0,value:e})}):function(o,e){o.default=e}),TM=Pt&&Pt.__importStar||(function(){var o=function(e){return o=Object.getOwnPropertyNames||function(t){var a=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(a[a.length]=i);return a},o(e)};return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var a=o(e),i=0;i<a.length;i++)a[i]!=="default"&&DM(t,e,a[i]);return RM(t,e),t}})();Object.defineProperty(Pt,"__esModule",{value:!0});Pt.CronFileParser=void 0;var NM=au(),nf=class o{static async parseFile(e){let{readFile:t}=await Promise.resolve().then(()=>TM(require("fs/promises"))),a=await t(e,"utf8");return o.#e(a)}static parseFileSync(e){let{readFileSync:t}=require("fs"),a=t(e,"utf8");return o.#e(a)}static#e(e){let t=e.split(`
|
|
@@ -1401,7 +1401,7 @@ ${s}`;break;case"retry":f5(s)&&(t[i]=s);break;case"id":b5(s)&&(t[i]=s);break;cas
|
|
|
1401
1401
|
`);o.stack=t?`${t}
|
|
1402
1402
|
${s}`:i.stack}B.exports.fetch=function(e,t=void 0){return Tce(e,t).catch(a=>{throw C5?S5(a,C5):a&&typeof a=="object"&&Error.captureStackTrace(a,B.exports.fetch),a})};B.exports.Headers=Gs().Headers;B.exports.Response=Om().Response;B.exports.Request=fn().Request;B.exports.FormData=md().FormData;var{setGlobalOrigin:Nce,getGlobalOrigin:Uce}=ky();B.exports.setGlobalOrigin=Nce;B.exports.getGlobalOrigin=Uce;var{CacheStorage:Mce}=p9(),{kConstruct:Oce}=de();B.exports.caches=new Mce(Oce);var{deleteCookie:_ce,getCookies:Fce,getSetCookies:Lce,setCookie:Pce,parseCookie:Hce}=E9();B.exports.deleteCookie=_ce;B.exports.getCookies=Fce;B.exports.getSetCookies=Lce;B.exports.setCookie=Pce;B.exports.parseCookie=Hce;var{parseMIMEType:Yce,serializeAMimeType:Gce}=ht();B.exports.parseMIMEType=Yce;B.exports.serializeAMimeType=Gce;var{CloseEvent:Vce,ErrorEvent:Wce,MessageEvent:$ce}=Cg(),{WebSocket:Jce,ping:Kce}=s5();B.exports.WebSocket=Jce;B.exports.CloseEvent=Vce;B.exports.ErrorEvent=Wce;B.exports.MessageEvent=$ce;B.exports.ping=Kce;B.exports.WebSocketStream=g5().WebSocketStream;B.exports.WebSocketError=$w().WebSocketError;B.exports.request=Km(In.request);B.exports.stream=Km(In.stream);B.exports.pipeline=Km(In.pipeline);B.exports.connect=Km(In.connect);B.exports.upgrade=Km(In.upgrade);B.exports.MockClient=xce;B.exports.MockCallHistory=zce;B.exports.MockCallHistoryLog=qce;B.exports.MockPool=Ice;B.exports.MockAgent=Ece;B.exports.SnapshotAgent=Cce;B.exports.mockErrors=jce;var{EventSource:Zce}=I5();B.exports.EventSource=Zce;function Xce(){globalThis.fetch=B.exports.fetch,globalThis.Headers=B.exports.Headers,globalThis.Response=B.exports.Response,globalThis.Request=B.exports.Request,globalThis.FormData=B.exports.FormData,globalThis.WebSocket=B.exports.WebSocket,globalThis.CloseEvent=B.exports.CloseEvent,globalThis.ErrorEvent=B.exports.ErrorEvent,globalThis.MessageEvent=B.exports.MessageEvent,globalThis.EventSource=B.exports.EventSource}B.exports.install=Xce});var R5=y(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.SuperglueClient=jn.SuperglueHttpError=void 0;var Cn=at(),Ha=Yf(),eme=hb(),ome=G2(),tme=Wt(),Ya=Er(),ame=bu(),Lg=14400*1e3,Zm;if(typeof globalThis.process<"u"&&globalThis.process.versions?.node)try{let{Agent:o}=D5();Zm=new o({headersTimeout:Lg,bodyTimeout:Lg})}catch{}var Pg=class extends Error{constructor(e,t,a,i){super(e),this.status=t,this.code=a,this.details=i,this.name="SuperglueHttpError"}};jn.SuperglueHttpError=Pg;var ov=class{constructor({apiKey:e,apiEndpoint:t,onInfrastructureError:a,sseTokenProvider:i,tokenProvider:s}){if(!e&&!s)throw new Error("SuperglueClient requires either apiKey or tokenProvider");this.tokenProvider=s??(async()=>e),this.apiEndpoint=t??"https://api.superglue.cloud",this.sseManager=new eme.SSELogSubscriptionManager(this.apiEndpoint,i??this.tokenProvider),this.onInfrastructureError=a}async getApiKey(){return this.tokenProvider()}isInfrastructureError(e){return(0,tme.isAbortError)(e)?!1:!!(e instanceof TypeError&&e.message.toLowerCase().includes("fetch")||e instanceof Error&&e.name==="TimeoutError")}async restRequest(e,t,a,i,s){let n=await(await this.restResponse({method:e,path:t,body:a,extraHeaders:i,requestInit:s})).text();if(n)return JSON.parse(n)}async restResponse({method:e,path:t,body:a,extraHeaders:i,requestInit:s}){let r=`${this.apiEndpoint.replace(/\/$/,"")}${t}`,c={Authorization:`Bearer ${await this.getApiKey()}`,...i};a&&e!=="GET"&&(c["Content-Type"]="application/json");let m;try{m=await fetch(r,{...s,method:e,headers:c,body:a?JSON.stringify(a):void 0,signal:s?.signal??AbortSignal.timeout(Lg),...Zm?{dispatcher:Zm}:{}})}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}if(!m.ok)throw await this.buildHttpError(m);return m}async buildHttpError(e){e.status>=500&&this.onInfrastructureError?.();let t=await e.text(),a=`HTTP ${e.status}: ${t}`,i,s;try{let r=JSON.parse(t);r&&typeof r=="object"&&!Array.isArray(r)&&(s=r),typeof r?.code=="string"&&(i=r.code);let n=r.error;typeof n=="string"?a=n:n&&typeof n=="object"&&(a=n.message||JSON.stringify(n))}catch{}return new Pg(a,e.status,i,s)}async streamRequest(e,t,a){let i=e.includes("?")?"&":"?",s=`${this.apiEndpoint.replace(/\/$/,"")}${e}${i}stream=true`,n={Authorization:`Bearer ${await this.getApiKey()}`,Accept:"text/event-stream","Content-Type":"application/json"},c;try{c=await fetch(s,{method:"POST",headers:n,body:JSON.stringify(t),signal:a??AbortSignal.timeout(Lg),...Zm?{dispatcher:Zm}:{}})}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}if(!c.ok)throw await this.buildHttpError(c);if(!(c.headers.get("content-type")||"").includes("text/event-stream")){let l=await c.text();return l?JSON.parse(l):void 0}try{return await(0,ome.consumeEventStreamResult)(c)}catch(l){throw this.isInfrastructureError(l)&&this.onInfrastructureError?.(),l}}async subscribeToLogsSSE(e={}){return this.sseManager.subscribeToLogs(e)}async disconnect(){await this.sseManager.disconnect()}async getMe(){return this.restRequest("GET","/v1/me")}async runTool(e){let t=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e.toolId)}/run`,{inputs:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture},void 0,e.signal?{signal:e.signal}:void 0);return{success:t.status==="success",data:t.data,error:t.error,tool:t.tool,stepResults:t.stepResults?.map(a=>({...a}))||[],...t.fileArtifacts&&t.fileArtifacts.length>0?{fileArtifacts:t.fileArtifacts}:{},...t.metadata?.warnings?.length?{warnings:t.metadata.warnings}:{}}}async runToolConfig(e){let t=e.createRun?"/v1/tools/run?createRun=true":"/v1/tools/run",a=await this.restRequest("POST",t,{tool:e.tool,payload:e.payload,files:e.files,credentials:e.credentials,includeStepResultData:e.includeStepResultData,options:e.options,runId:e.runId,stateFixture:e.stateFixture,executionKind:e.executionKind,parentToolId:e.parentToolId,draftId:e.draftId},e.traceId?{"X-Trace-Id":e.traceId}:void 0,e.signal?{signal:e.signal}:void 0);return{success:a.status?a.status==="success":a.success??!1,data:a.data,error:a.error,tool:a.tool||e.tool,stepResults:a.stepResults?.map(s=>({...s}))||[],...a.fileArtifacts&&a.fileArtifacts.length>0?{fileArtifacts:a.fileArtifacts}:{},...a.metadata?.warnings?.length?{warnings:a.metadata.warnings}:{}}}async abortToolExecution(e){return{success:!0,runId:(await this.restRequest("POST",`/v1/runs/${encodeURIComponent(e)}/cancel`)).runId}}async executeStep({step:e,payload:t,files:a,previousResults:i,credentials:s,options:r,runId:n,systemIds:c,createRun:m,parentToolId:l,stepIndex:u,stepId:d,signal:g,stream:p}){let b={step:e,payload:t,files:a,previousResults:i,credentials:s,options:r,runId:n,systemIds:c,createRun:m,parentToolId:l,stepIndex:u,stepId:d};return p?this.streamRequest("/v1/tools/step/run",b,g):this.restRequest("POST","/v1/tools/step/run",b,void 0,g?{signal:g}:void 0)}async abortStep(e){return this.restRequest("POST","/v1/tools/step/abort",{runId:e})}async executeTransformOnly({outputTransform:e,outputSchema:t,inputSchema:a,payload:i,files:s,stepResults:r,options:n,runId:c,createRun:m,parentToolId:l,stepId:u,signal:d,stream:g}){let p={outputTransform:e,outputSchema:t,inputSchema:a,payload:i,files:s,stepResults:r,options:n,runId:c,createRun:m,parentToolId:l,stepId:u};return g?this.streamRequest("/v1/tools/transform/run",p,d):this.restRequest("POST","/v1/tools/transform/run",p,void 0,d?{signal:d}:void 0)}async createRun({toolId:e,toolConfig:t,toolResult:a,stepResults:i,toolPayload:s,status:r,error:n,startedAt:c,completedAt:m,executionKind:l,parentToolId:u,draftId:d}){return this.restRequest("POST","/v1/runs",{toolId:e,toolConfig:t,toolResult:a,stepResults:i,toolPayload:s,status:r,error:n,startedAt:(0,Ya.toUTCISOString)(c,"run.startedAt"),completedAt:(0,Ya.toUTCISOString)(m,"run.completedAt"),executionKind:l,parentToolId:u,draftId:d})}async checkRunLimit(){return(await this.restRequest("POST","/v1/runs/check-limit")).data}async extract({file:e,envelope:t}){if(!e)throw new Error("File must be provided for extract.");let a=new FormData;a.append("file",e);let i=new URL(`${this.apiEndpoint.replace(/\/$/,"")}/v1/extract`);t&&i.searchParams.set("envelope","true");let s=i.toString(),r=await this.getApiKey(),n=await fetch(s,{method:"POST",headers:{Authorization:`Bearer ${r}`},body:a});if(!n.ok){let c=await n.text(),m=`HTTP ${n.status}: ${c}`;try{let l=JSON.parse(c);l.error&&(m=l.error)}catch{}throw new Error(m)}return n.json()}mapOpenAPIRunToRun(e){let t={running:Cn.RunStatus.RUNNING,success:Cn.RunStatus.SUCCESS,failed:Cn.RunStatus.FAILED,aborted:Cn.RunStatus.ABORTED};return{runId:e.runId??e.id,toolId:e.toolId,tool:e.tool,systemIds:e.systemIds,status:t[e.status]??Cn.RunStatus.FAILED,toolPayload:e.toolPayload,data:e.data,toolResult:e.data,error:e.error,stepResults:e.stepResults,options:e.options,requestSource:e.requestSource,traceId:e.traceId,resultStorageUri:e.resultStorageUri,userId:e.userId,userEmail:e.userEmail,userName:e.userName,metadata:{...e.metadata,executionKind:e.metadata?.executionKind??Cn.RunExecutionKind.FULL},fileArtifacts:e.fileArtifacts}}mapOpenAPIScheduleToToolSchedule(e){return{...e,lastRunAt:e.lastRunAt?(0,Ya.requireUTCDate)(e.lastRunAt,"schedule.lastRunAt"):void 0,nextRunAt:(0,Ya.requireUTCDate)(e.nextRunAt,"schedule.nextRunAt"),createdAt:(0,Ya.requireUTCDate)(e.createdAt,"schedule.createdAt"),updatedAt:(0,Ya.requireUTCDate)(e.updatedAt,"schedule.updatedAt")}}async listRuns(e={}){let t=(0,Ha.createSearchListQueryParams)(e);e.toolId!==void 0&&t.set("toolId",e.toolId),e.searchUserIds?.length&&t.set("searchUserIds",e.searchUserIds.join(",")),e.includeTotal!==void 0&&t.set("includeTotal",String(e.includeTotal)),e.startedAfter!==void 0&&t.set("startedAfter",e.startedAfter instanceof Date?(0,Ya.toUTCISOString)(e.startedAfter,"run.startedAfter"):e.startedAfter),e.statuses!==void 0?t.set("status",e.statuses.join(",")):e.status!==void 0&&t.set("status",e.status),e.requestSources!==void 0&&t.set("requestSources",e.requestSources.join(",")),e.executionKinds!==void 0&&t.set("executionKinds",e.executionKinds.join(",")),e.userId!==void 0&&t.set("userId",e.userId),e.systemId!==void 0&&t.set("systemId",e.systemId),e.systemIds!==void 0&&t.set("systemIds",e.systemIds.join(","));let a=t.size>0?`?${t.toString()}`:"",i=await this.restRequest("GET",`/v1/runs${a}`,void 0,void 0,{signal:e.signal});return{data:i.data.map(s=>this.mapOpenAPIRunToRun(s)),total:i.total,page:i.page,limit:i.limit,hasMore:i.hasMore}}async getActivityCounts(e){let t=new URLSearchParams;e?.from&&t.set("from",e.from instanceof Date?(0,Ya.toUTCISOString)(e.from,"activity.from"):e.from),e?.to&&t.set("to",e.to instanceof Date?(0,Ya.toUTCISOString)(e.to,"activity.to"):e.to);let a=t.toString();return(await this.restRequest("GET",`/v1/activity/counts${a?`?${a}`:""}`,void 0,void 0,{signal:e?.signal})).counts}async getRun(e){try{let t=await this.restRequest("GET",`/v1/runs/${encodeURIComponent(e)}`);return this.mapOpenAPIRunToRun(t)}catch(t){if(t.message?.includes("404")||t.message?.includes("not found"))return null;throw t}}async getTool(e){try{return await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}`)}catch(t){if(t.message?.includes("404")||t.message?.includes("not found")||t.message?.includes("403")||t.message?.includes("not allowed"))return null;throw t}}async getToolState(e){return(await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/state`)).state}async setToolState(e,t){await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/state`,{state:t})}async deleteToolState(e){return(await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/state`)).deletedKeys}async archiveTool(e,t=!0){return this.updateTool(e,{archived:t})}async bulkArchiveTools(e,t=!0){return this.restRequest("POST","/v1/tools/bulk/archive",{ids:e,archived:t})}async bulkDeleteTools(e){return this.restRequest("POST","/v1/tools/bulk/delete",{ids:e})}async listTools(e={}){let t=(0,Ha.createListQueryParams)(e);e.includeArchived!==void 0&&t.set("includeArchived",String(e.includeArchived));let a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/tools${a}`)}async listAllTools(e={}){return(0,Ha.listAllPages)((t,a)=>this.listTools({...e,page:t,limit:a}))}async createTool(e,t){return this.restRequest("POST","/v1/tools",{...t,id:e})}async updateTool(e,t){return this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}`,t)}async deleteTool(e){try{return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}`),!0}catch(t){if(t.message?.includes("404"))return!1;throw t}}async renameTool(e,t){return this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/rename`,{newId:t})}async getWorkflow(e){return this.getTool(e)}async archiveWorkflow(e,t=!0){return this.upsertWorkflow(e,{archived:t})}async createWorkflow(e,t){return this.createTool(e,t)}async updateWorkflow(e,t){return this.updateTool(e,t)}async upsertWorkflow(e,t){return await this.getTool(e)?this.updateTool(e,t):this.createTool(e,t)}async deleteWorkflow(e){return this.deleteTool(e)}async renameWorkflow(e,t){return this.renameTool(e,t)}async listSchedules(e={}){let t=(0,Ha.createListQueryParams)(e),a=t.size>0?`?${t.toString()}`:"",i=e.toolId?`/v1/tools/${encodeURIComponent(e.toolId)}/schedules${a}`:`/v1/schedules${a}`,s=await this.restRequest("GET",i);return{...s,data:s.data.map(r=>this.mapOpenAPIScheduleToToolSchedule(r))}}async listAllSchedules(e={}){return(0,Ha.listAllPages)((t,a)=>this.listSchedules({...e,page:t,limit:a}))}async getToolSchedule(e,t){try{let a=await this.restRequest("GET",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`);return this.mapOpenAPIScheduleToToolSchedule(a)}catch(a){if(a.message?.includes("404")||a.message?.includes("not found"))return null;throw a}}async createToolSchedule(e,t){let a=await this.restRequest("POST",`/v1/tools/${encodeURIComponent(e)}/schedules`,{...t,timezone:t.timezone||(0,ame.getRuntimeTimezone)()});return this.mapOpenAPIScheduleToToolSchedule(a)}async updateToolSchedule(e,t,a){let i=await this.restRequest("PUT",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`,a);return this.mapOpenAPIScheduleToToolSchedule(i)}async deleteToolSchedule(e,t){return await this.restRequest("DELETE",`/v1/tools/${encodeURIComponent(e)}/schedules/${encodeURIComponent(t)}`),!0}async bulkSetSchedulesEnabled(e,t){return this.restRequest("POST","/v1/schedules/bulk/enable",{ids:e,enabled:t})}async bulkDeleteSchedules(e){return this.restRequest("POST","/v1/schedules/bulk/delete",{ids:e})}async listCredentials(e={}){let t=(0,Ha.createListQueryParams)(e);e.systemId!==void 0&&t.set("systemId",e.systemId);let a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/credentials${a}`)}async listAllCredentials(e={}){return(0,Ha.listAllPages)((t,a)=>this.listCredentials({...e,page:t,limit:a}))}async createCredentials(e){return(await this.restRequest("POST","/v1/credentials",e)).data}async replaceCredentials(e,t){return(await this.restRequest("PUT",`/v1/credentials/${encodeURIComponent(e)}`,{credentials:t})).data}async updateCredentials(e,t){return(await this.restRequest("PATCH",`/v1/credentials/${encodeURIComponent(e)}`,t)).data}async deleteCredentials(e){await this.restRequest("DELETE",`/v1/credentials/${encodeURIComponent(e)}`)}async setDefaultCredentials(e){await this.restRequest("POST",`/v1/credentials/${encodeURIComponent(e)}/default`)}async listSystems(e={}){let t=(0,Ha.createListQueryParams)(e),a=t.size>0?`?${t.toString()}`:"";return this.restRequest("GET",`/v1/systems${a}`)}async listAllSystems(e={}){return(0,Ha.listAllPages)((t,a)=>this.listSystems({...e,page:t,limit:a}))}async getSystem(e){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}`)).data}async createSystem(e){return(await this.restRequest("POST","/v1/systems",e)).data}async updateSystem(e,t){return(await this.restRequest("PATCH",`/v1/systems/${encodeURIComponent(e)}`,t)).data}async deleteSystem(e){return await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}`),!0}async bulkDeleteSystems(e){return this.restRequest("POST","/v1/systems/bulk/delete",{ids:e})}async createOAuthExchange(e){return(await this.restRequest("POST","/v1/oauth/exchanges",e)).data}async completeOAuthExchange(e,t){return(await this.restRequest("POST",`/v1/oauth/exchanges/${encodeURIComponent(e)}/complete`,t)).data}async searchSystemDocumentation(e,t){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/search`,{keywords:t})).data}async triggerSystemDocumentationScrapeJob(e,t){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/scrape`,t)).data}async fetchOpenApiSpec(e,t,a){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/openapi`,{url:t,link:a?.link})).data}async createSystemDocumentationFileUploadUrls(e,t,a){return(await this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files`,{files:t.map(s=>({fileName:s.fileName,metadata:{contentType:s.contentType,contentLength:s.contentLength}})),link:a?.link})).data.files}async uploadSystemDocumentationFiles(e,t,a){if(t.length===0)return[];let i=await this.createSystemDocumentationFileUploadUrls(e,t.map(n=>({fileName:n.fileName,contentType:n.contentType,contentLength:n.contentLength})),{link:a?.link}),r=(await Promise.allSettled(i.map(async(n,c)=>{let m=t[c],l=await fetch(n.uploadUrl,{method:"PUT",body:m.content,headers:m.contentType?{"Content-Type":m.contentType}:void 0});if(!l.ok)throw new Error(`Upload failed for ${m.fileName}: ${l.status} ${l.statusText}`);return this.completeSystemDocumentationFileUpload(e,n.id).catch(()=>{}),n.id}))).map((n,c)=>{let m=t[c],l=i[c].id;return n.status==="fulfilled"?{id:l,fileName:m.fileName,contentLength:m.contentLength,status:"uploaded"}:(this.deleteSystemDocumentationFile(e,l).catch(()=>{}),{id:l,fileName:m.fileName,contentLength:m.contentLength,status:"failed",error:n.reason instanceof Error?n.reason.message:"Upload failed"})});if(!a?.settle){let n=r.filter(c=>c.status==="failed");if(n.length>0)throw new Error(n.map(c=>c.error).join("; "))}return r}async completeSystemDocumentationFileUpload(e,t){return this.restRequest("POST",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(t)}/complete`)}async listSystemDocumentationFiles(e,t){let a=new URLSearchParams;t?.length&&a.set("fileIds",t.join(","));let i=a.size>0?`?${a.toString()}`:"";return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files${i}`)).data}async getSystemDocumentationFileContent(e,t){return(await this.restRequest("GET",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(t)}/content`)).data}async deleteSystemDocumentationFile(e,t){await this.restRequest("DELETE",`/v1/systems/${encodeURIComponent(e)}/documentation/files/${encodeURIComponent(t)}`)}async generateCredentialsLink(e){try{return{success:!0,credentialsUrl:(await this.restRequest("POST","/v1/authenticate",e||{})).data.credentialsUrl}}catch(t){return{success:!1,error:t.message}}}};jn.SuperglueClient=ov});var N5=y(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.UnquotedKeyStrategy=Ce.TripleQuoteStrategy=Ce.TrailingCommaStrategy=Ce.SingleQuoteStrategy=Ce.PythonLiteralStrategy=Ce.CommentStrategy=Ce.ResilientJsonParser=Ce.RepairStrategy=void 0;Ce.parseJsonResilient=ime;Ce.parseJSON=sme;Ce.isValidJson=rme;Ce.prettyPrintJson=nme;Ce.minifyJson=cme;var Ft=class{validate(e){try{return JSON.parse(e),!0}catch{return!1}}};Ce.RepairStrategy=Ft;var Hg=class extends Ft{constructor(){super(...arguments),this.name="TripleQuoteRepair",this.description="Converts triple-quoted strings to proper JSON, parsing nested JSON content"}canApply(e){return/"""/.test(e)}apply(e){return e.replace(/"""([\s\S]*?)"""/g,(t,a)=>{let i=a.trim();if(i.startsWith("{")&&i.endsWith("}")||i.startsWith("[")&&i.endsWith("]"))try{let r=JSON.parse(i);return JSON.stringify(r)}catch{return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`}return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`})}};Ce.TripleQuoteStrategy=Hg;var Yg=class extends Ft{constructor(){super(...arguments),this.name="PythonLiteralRepair",this.description="Converts Python literals to JavaScript equivalents"}canApply(e){return/\b(None|True|False)\b/.test(e)}apply(e){return e.replace(/\bNone\b/g,"null").replace(/\bTrue\b/g,"true").replace(/\bFalse\b/g,"false")}};Ce.PythonLiteralStrategy=Yg;var Gg=class extends Ft{constructor(){super(...arguments),this.name="TrailingCommaRepair",this.description="Removes trailing commas from objects and arrays"}canApply(e){return/,\s*[}\]]/.test(e)}apply(e){return e.replace(/,(\s*[}\]])/g,"$1")}};Ce.TrailingCommaStrategy=Gg;var Vg=class extends Ft{constructor(){super(...arguments),this.name="SingleQuoteRepair",this.description="Converts single quotes to double quotes"}canApply(e){return/[{,]\s*'[^']*'\s*:/.test(e)||/:\s*'[^']*'/.test(e)}apply(e){let t=e.replace(/([{,]\s*)'([^']+)'(\s*:)/g,'$1"$2"$3');return t=t.replace(/(:\s*)'([^']+)'(\s*[,}])/g,'$1"$2"$3'),t}};Ce.SingleQuoteStrategy=Vg;var Wg=class extends Ft{constructor(){super(...arguments),this.name="UnquotedKeyRepair",this.description="Adds quotes to unquoted object keys"}canApply(e){return/[{,]\s*[a-zA-Z_$][a-zA-Z0-9_$]*\s*:/.test(e)}apply(e){return e.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)(\s*:)/g,'$1"$2"$3')}};Ce.UnquotedKeyStrategy=Wg;var $g=class extends Ft{constructor(){super(...arguments),this.name="CommentRemoval",this.description="Removes JavaScript-style comments"}canApply(e){return/\/\/.*$|\/\*[\s\S]*?\*\//m.test(e)}apply(e){let t=e.replace(/\/\/.*$/gm,"");return t=t.replace(/\/\*[\s\S]*?\*\//g,""),t}};Ce.CommentStrategy=$g;var tv=class extends Ft{constructor(){super(...arguments),this.name="UnescapedControlCharactersRepair",this.description="Escapes unescaped control characters (newlines, tabs, etc.) in JSON strings"}canApply(e){try{return JSON.parse(e),!1}catch(t){let a=t.message||"";return a.includes("control character")||a.includes("Bad control")||a.includes("Unexpected token")&&/[\n\r\t]/.test(e)}}apply(e){let t="",a=!1,i=!1;for(let s=0;s<e.length;s++){let r=e[s],n=s>0?e[s-1]:"";if(i){t+=r,i=!1;continue}if(r==="\\"&&a){t+=r,i=!0;continue}if(r==='"'&&n!=="\\"){a=!a,t+=r;continue}if(a)switch(r){case`
|
|
1403
1403
|
`:t+="\\n";break;case"\r":t+="\\r";break;case" ":t+="\\t";break;case"\b":t+="\\b";break;case"\f":t+="\\f";break;default:let c=r.charCodeAt(0);c<32?t+="\\u"+("0000"+c.toString(16)).slice(-4):t+=r}else t+=r}return t}},av=class extends Ft{constructor(){super(...arguments),this.name="TrailingCharactersRepair",this.description="Removes trailing characters after valid JSON structure"}canApply(e){let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;let a=0,i=0,s=!1,r=!1;for(let n=0;n<t.length;n++){let c=t[n];if(s)r?r=!1:c==="\\"?r=!0:c==='"'&&(s=!1);else if(c==='"')s=!0;else if(c==="{")a++;else if(c==="}"){if(a--,a===0&&i===0&&n>0&&n<t.length-1)return!0}else if(c==="[")i++;else if(c==="]"&&(i--,i===0&&a===0&&n>0&&n<t.length-1))return!0}return!1}apply(e){let t=e.trim(),a=0,i=0,s=!1,r=!1,n=-1;for(let c=0;c<t.length;c++){let m=t[c];if(s)r?r=!1:m==="\\"?r=!0:m==='"'&&(s=!1);else if(m==='"')s=!0;else if(m==="{")a++;else if(m==="}"){if(a--,a===0&&i===0&&c>0){n=c;break}}else if(m==="[")i++;else if(m==="]"&&(i--,i===0&&a===0&&c>0)){n=c;break}}return n>0&&n<t.length-1?t.substring(0,n+1):e}},Qn=class{constructor(e={}){this.strategies=[],this.repairLog=[],this.options={attemptRepair:!0,maxDepth:10,preserveStringsOnFailure:!1,logRepairs:!1,...e},this.initializeDefaultStrategies(),e.customStrategies&&this.strategies.push(...e.customStrategies)}initializeDefaultStrategies(){this.strategies=[new Hg,new Vg,new tv,new av,new Yg,new Gg,new Wg,new $g]}parse(e){let t=Date.now();this.repairLog=[];let a=e instanceof Buffer?e.toString("utf8"):String(e);try{return{success:!0,data:JSON.parse(a),metadata:{parseTime:Date.now()-t,strategiesApplied:[]}}}catch(r){if(!this.options.attemptRepair)return{success:!1,error:`JSON parse error: ${r}`,metadata:{parseTime:Date.now()-t}}}let i=a,s=[];for(let r of this.strategies)if(r.canApply(i)){let n=i;if(i=r.apply(i),n!==i){s.push(r.name),this.repairLog.push(r.description),this.options.logRepairs&&console.log(`Applied ${r.name}: ${r.description}`);try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-t,strategiesApplied:s}}}catch{}}}try{return{success:!0,data:JSON.parse(i),repairs:this.repairLog,metadata:{parseTime:Date.now()-t,strategiesApplied:s}}}catch(r){let n=this.aggressiveFallback(i);return n.success?{...n,repairs:[...this.repairLog,"Applied aggressive fallback"],metadata:{parseTime:Date.now()-t,strategiesApplied:[...s,"AggressiveFallback"]}}:{success:!1,error:`Failed to parse JSON after applying ${s.length} strategies: ${r}`,repairs:this.repairLog,metadata:{parseTime:Date.now()-t,strategiesApplied:s}}}}aggressiveFallback(e){try{let t=e.indexOf("{"),a=e.indexOf("[");if(t===-1&&a===-1)return{success:!1,error:"No JSON-like structure found"};let i=t===-1?a:a===-1?t:Math.min(t,a),s=e.substring(i);for(let n of this.strategies)n.canApply(s)&&(s=n.apply(s));return{success:!0,data:JSON.parse(s)}}catch(t){return{success:!1,error:`Aggressive fallback failed: ${t}`}}}addStrategy(e){this.strategies.push(e)}removeStrategy(e){this.strategies=this.strategies.filter(t=>t.name!==e)}getStrategies(){return this.strategies.map(e=>e.name)}};Ce.ResilientJsonParser=Qn;var T5=new Qn;function ime(o,e){return(e?new Qn(e):T5).parse(o)}function sme(o){let e=T5.parse(o);if(e.success)return e.repairs&&e.repairs.length>0&&console.log("JSON parsed with repairs:",e.repairs),e.data;throw new Error(`Failed to parse JSON: ${e.error}`)}function rme(o){try{return JSON.parse(o),!0}catch{return!1}}function nme(o,e=2){return JSON.stringify(o,null,e)}function cme(o){let t=new Qn().parse(o);if(t.success)return JSON.stringify(t.data);throw new Error("Cannot minify invalid JSON")}});var et=y(L=>{"use strict";var mme=L&&L.__createBinding||(Object.create?(function(o,e,t,a){a===void 0&&(a=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(o,a,i)}):(function(o,e,t,a){a===void 0&&(a=t),o[a]=e[t]})),X=L&&L.__exportStar||function(o,e){for(var t in o)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mme(e,o,t)};Object.defineProperty(L,"__esModule",{value:!0});L.SSELogSubscriptionManager=L.SuperglueHttpError=L.SuperglueClient=void 0;X(X1(),L);X(nE(),L);X(dE(),L);X(fE(),L);X(Nc(),L);X(SE(),L);X(DE(),L);X(RE(),L);X(TE(),L);X(Yf(),L);X(UE(),L);X(ME(),L);X(OE(),L);X(FE(),L);X(LE(),L);X(HE(),L);X(fl(),L);X(GE(),L);X(VE(),L);X($E(),L);X(ZE(),L);X(e2(),L);X(r2(),L);X(c2(),L);X(l2(),L);X(w2(),L);X(x2(),L);X(sb(),L);X(D2(),L);X(db(),L);X(U2(),L);X(F2(),L);X(P2(),L);X(at(),L);X(Wt(),L);X(H2(),L);X(Y2(),L);X(Qu(),L);X(Er(),L);X(bu(),L);var U5=R5();Object.defineProperty(L,"SuperglueClient",{enumerable:!0,get:function(){return U5.SuperglueClient}});Object.defineProperty(L,"SuperglueHttpError",{enumerable:!0,get:function(){return U5.SuperglueHttpError}});var lme=hb();Object.defineProperty(L,"SSELogSubscriptionManager",{enumerable:!0,get:function(){return lme.SSELogSubscriptionManager}});X(N5(),L)});var jp=require("commander");var Do=$(require("fs")),_5=$(require("os")),Ga=$(require("path")),Xm=$(et()),M5=new Set(["runner","builder","admin"]),O5={output:{mode:"stdout",directory:".superglue/output"},preset:"admin"};function Va(o){let e=Ga.join(process.cwd(),".superglue"),t=_5.homedir();if(!t)return e;let a=Ga.join(t,".superglue");return o===!0?e:o===!1?a:Do.existsSync(Ga.join(e,"config.json"))?e:a}function iv(o){return Ga.join(Va(o),"config.json")}function Jg(o){let e=iv(o);if(!Do.existsSync(e))return{};try{return JSON.parse(Do.readFileSync(e,"utf-8"))}catch{return{}}}function Bn(o){let e=Jg(),t=o.apiKey||(0,Xm.readProcessEnvironmentValue)("SUPERGLUE_API_KEY")||e.apiKey||"",a=o.endpoint||(0,Xm.readProcessEnvironmentValue)("SUPERGLUE_API_ENDPOINT")||e.endpoint||"https://api.superglue.cloud",i=(0,Xm.readProcessEnvironmentValue)("SUPERGLUE_WEB_ENDPOINT")||e.webEndpoint||a.replace(/:3002\b/,":3001").replace(/api\.superglue/,"app.superglue"),s=(0,Xm.readProcessEnvironmentValue)("SUPERGLUE_CLI_PRESET"),r=s&&M5.has(s)?s:e.preset&&M5.has(e.preset)?e.preset:"admin";return{...O5,...e,apiKey:t,endpoint:a,webEndpoint:i,preset:r,output:{...O5.output,...e.output}}}function Kg(o,e){let t=Va(e);Do.existsSync(t)||Do.mkdirSync(t,{recursive:!0}),Do.writeFileSync(Ga.join(t,"config.json"),JSON.stringify(o,null,2)+`
|
|
1404
|
-
`,{mode:384})}function Zg(o,e){let t=Ga.join(Va(e),"drafts");if(Do.existsSync(t)||Do.mkdirSync(t,{recursive:!0}),o.output.mode==="stdout+file"){let a=Ga.resolve(o.output.directory);Do.existsSync(a)||Do.mkdirSync(a,{recursive:!0})}}var uv=$(et());var sv=$(require("readline"));var P5=require("child_process"),H5=require("util");var F5={name:"@superglue/cli",version:"1.1.
|
|
1404
|
+
`,{mode:384})}function Zg(o,e){let t=Ga.join(Va(e),"drafts");if(Do.existsSync(t)||Do.mkdirSync(t,{recursive:!0}),o.output.mode==="stdout+file"){let a=Ga.resolve(o.output.directory);Do.existsSync(a)||Do.mkdirSync(a,{recursive:!0})}}var uv=$(et());var sv=$(require("readline"));var P5=require("child_process"),H5=require("util");var F5={name:"@superglue/cli",version:"1.1.58",bin:{sg:"./dist/cli.js"},files:[".claude-plugin/","dist/","skills/","LICENSE"],dependencies:{commander:"15.0.0-0","fast-json-patch":"3.1.1"},devDependencies:{"@superglue/shared":"file:../shared","@types/node":"25.5.0",tsup:"8.5.1",typescript:"5.8.3"},scripts:{build:"tsup && (cp -r skills dist/ 2>/dev/null || true)",dev:"tsup --watch","type-check":"tsc --noEmit",prepublishOnly:"npm run build"},publishConfig:{access:"public"}};var dme=(0,H5.promisify)(P5.exec),wo=F5.version;function L5(o){let e=o.match(/^(\d+)(?:-(.+))?$/);return e?{numeric:parseInt(e[1],10),prerelease:e[2]||null}:{numeric:0,prerelease:o}}function ep(o,e){let t=o.split("."),a=e.split("."),i=Math.max(t.length,a.length);for(let s=0;s<i;s++){let r=L5(t[s]||"0"),n=L5(a[s]||"0");if(r.numeric<n.numeric)return-1;if(r.numeric>n.numeric||r.prerelease===null&&n.prerelease!==null)return 1;if(r.prerelease!==null&&n.prerelease===null)return-1;if(r.prerelease!==null&&n.prerelease!==null){if(r.prerelease<n.prerelease)return-1;if(r.prerelease>n.prerelease)return 1}}return 0}async function op(){try{let o=await fetch("https://registry.npmjs.org/@superglue/cli/latest",{signal:AbortSignal.timeout(5e3)});return o.ok&&(await o.json()).version||null}catch{return null}}var Xg=null;function Y5(){Y()&&(Xg=op())}async function G5(){if(!(!Y()||!Xg)){try{let o=new Promise(t=>{setTimeout(()=>t(null),2e3).unref()}),e=await Promise.race([Xg,o]);e&&ep(wo,e)<0&&(console.error(""),console.error(`${h.cyan}${h.bold} Update available: ${wo} \u2192 ${e}${h.reset}`),console.error(`${h.cyan} Run ${h.bold}sg update${h.reset}${h.cyan} to upgrade${h.reset}`),console.error(""))}catch{}Xg=null}}async function V5(){let o=await op();if(!o)return{success:!1,message:"Could not fetch latest version from npm"};if(ep(wo,o)>=0)return{success:!0,message:`Already on latest version (${wo})`};try{return await dme("npm install -g @superglue/cli@latest"),{success:!0,message:`Updated from ${wo} to ${o}`}}catch(e){return{success:!1,message:`Update failed: ${e.message}. Try manually: npm install -g @superglue/cli@latest`}}}var Y=()=>process.argv.includes("--table")&&process.stdout.isTTY,zt=()=>process.argv.includes("--full"),h={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",italic:"\x1B[3m",underline:"\x1B[4m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m"};function W5(o,e){let t=e||o;return`\x1B]8;;${o}\x07${h.underline}${h.cyan}${t}${h.reset}\x1B]8;;\x07`}function $5(){if(!Y())return;let o=h.reset,e=h.dim,t="\x1B[47;30m",a=[" #@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@- "," =@@@- @@@@ "," @@@ @@% "," -@@ @@@@= @@@ @@@ @@@@@#@ @@@@@@@ @@@@@@@ @@@@@@ @@@ @@@ @@@ @@@@@@* %@@ "," @@ @@@ *@ @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @% @@@ @@@ @@@ @@* @@# "," #@@ @@@# @@@ @@@ @@@ :@@ @@@ @@@ -@@ @@@ @@@ @@@ @@@ @@* @@ "," @@- @@@@= @@@ @@@ @@@@@@@ @@@@@@ @@@@@@@ @@@ @@% @@@ @@@ @@@ @@@@@. @@."," #@% .@@@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* @@ "," @@ @ @@@ @@@ @@@ @@@ @@@ @@@ -@@ @@@ @@% @@@ @@@ @@@ @@* *@@ "," -@@ @@@@= @@@@@@ @@@ @@@@@@@ @@@ -@@ @@@@@@ @@@@@@% @@@@@@. @@@@@@* #@@ "," :@@* @@@ "," %@@@ =@@@. "," :@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@% "];console.log(""),a.forEach(i=>{let s=i.search(/\S/),r=i.length-[...i].reverse().join("").search(/\S/)-1;if(s===-1)return console.log(" "+i);let n=i.slice(0,s),c=i.slice(s,r+1).split("").map(l=>l===" "?" ":"\u2588").join(""),m=i.slice(r+1);console.log(` ${n}${t}${c}${o}${m}`)}),console.log(` ${e} CLI v${wo}${o}`),console.log("")}function Ee(o){if(!Y())return{stop:()=>{},update:()=>{},log:()=>{}};let e=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],t=0,a=o,i=()=>process.stdout.write("\r\x1B[2K"),s=()=>{process.stdout.write(`\r ${h.cyan}${e[t++%e.length]}${h.reset} ${a}`)},r=setInterval(s,80);return{update:n=>{a=n},log:n=>{i(),console.log(` ${h.dim}\u2502${h.reset} ${n}`),s()},stop:n=>{clearInterval(r),i(),n&&console.log(` ${n}`)}}}function U(o){Y()?tp(o):console.log(JSON.stringify(o,null,2))}function ie(o,e){Y()?(console.log(` ${h.green}\u2713${h.reset} ${o}`),e&&tp(e,4)):console.log(JSON.stringify({success:!0,message:o,...e&&typeof e=="object"?e:{data:e}}))}function z(o,e){Y()?(console.error(` ${h.red}\u2717${h.reset} ${o}`),e&&tp(e,4)):console.error(JSON.stringify({success:!1,error:o,details:e}))}function J5(o){Y()&&console.log(` ${h.yellow}\u26A0${h.reset} ${o}`)}function lo(o){Y()&&console.log(` ${h.dim}${o}${h.reset}`)}function Wa(o){Y()&&(console.log(`
|
|
1405
1405
|
${h.bold}${h.cyan}${o}${h.reset}`),console.log(` ${h.dim}${"\u2500".repeat(o.length)}${h.reset}`))}function ua(o,e,t){if(!Y()){console.log(JSON.stringify({success:!0,total:t?.total??o.length,items:o}));return}if(o.length===0){console.log(`
|
|
1406
1406
|
${h.dim}0 results${h.reset}
|
|
1407
1407
|
`);return}let a=e||Object.keys(o[0]),i=zt()?1/0:60,s=a.map(l=>Math.min(i,Math.max(l.length,...o.map(u=>String(u[l]??"").replace(/[\n\r]+/g," ").trim().length))));console.log("");let r=a.map((l,u)=>`${h.bold}${h.cyan}${l.toUpperCase().padEnd(s[u])}${h.reset}`).join(" ");console.log(` ${r}`);let n=s.map(l=>`${h.dim}${"\u2500".repeat(l)}${h.reset}`).join(`${h.dim}\u2500\u2500${h.reset}`);console.log(` ${n}`);for(let l of o){let u=a.map((d,g)=>{let p=String(l[d]??"").replace(/[\n\r]+/g," ").trim();if(p.length>i){let w=`\u2026 (${p.length})`;p=p.slice(0,Math.max(0,i-w.length))+`${h.dim}${w}${h.reset}`}return d==="status"?`${{success:h.green,running:h.yellow,failed:h.red,aborted:h.red,error:h.red,pending:h.dim}[p.toLowerCase()]||""}${p.padEnd(s[g])}${h.reset}`:p.padEnd(s[g])}).join(" ");console.log(` ${u}`)}let c=t?.total??o.length,m=c===o.length?`${o.length} result${o.length===1?"":"s"}`:`${o.length} of ${c} result${c===1?"":"s"}`;console.log(`
|
|
@@ -94,7 +94,7 @@ Below the navigation, the sidebar shows the current organization menu. Opening i
|
|
|
94
94
|
|
|
95
95
|
- **Organization** — organization name and organization logo settings.
|
|
96
96
|
- **Run Settings** — run preferences: draft/single-step run visibility, run result storage, member run visibility, and delete-all-runs.
|
|
97
|
-
- **Notifications** —
|
|
97
|
+
- **Notifications** — run-alert channels for Slack and email (on failure, success, completion, or daily/weekly summaries). Slack setup opens `/settings/notifications/slack`; email setup opens `/settings/notifications/email`.
|
|
98
98
|
|
|
99
99
|
## Internals
|
|
100
100
|
|
package/package.json
CHANGED
|
@@ -94,7 +94,7 @@ Below the navigation, the sidebar shows the current organization menu. Opening i
|
|
|
94
94
|
|
|
95
95
|
- **Organization** — organization name and organization logo settings.
|
|
96
96
|
- **Run Settings** — run preferences: draft/single-step run visibility, run result storage, member run visibility, and delete-all-runs.
|
|
97
|
-
- **Notifications** —
|
|
97
|
+
- **Notifications** — run-alert channels for Slack and email (on failure, success, completion, or daily/weekly summaries). Slack setup opens `/settings/notifications/slack`; email setup opens `/settings/notifications/email`.
|
|
98
98
|
|
|
99
99
|
## Internals
|
|
100
100
|
|