@squidcloud/backend 1.0.471 → 1.0.472
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.
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={243(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,c=128,f=1/0,l=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",_="[object Array]",y="[object Boolean]",v="[object Date]",m="[object Error]",b="[object Function]",k="[object GeneratorFunction]",T="[object Map]",O="[object Number]",A="[object Object]",C="[object Promise]",w="[object RegExp]",I="[object Set]",E="[object String]",R="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",G="[object Int16Array]",j="[object Int32Array]",Y="[object Uint8Array]",Q="[object Uint8ClampedArray]",P="[object Uint16Array]",B="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,V=RegExp(F.source),z=RegExp($.source),H=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Tt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ot="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",wt="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Et="["+kt+"]",Rt="["+It+"]",xt="["+Tt+"]",St="\\d+",Nt="["+Ot+"]",Mt="["+At+"]",Dt="[^"+kt+It+St+Ot+At+Ct+"]",Lt="\\ud83c[\\udffb-\\udfff]",Gt="[^"+kt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Qt="["+Ct+"]",Pt="\\u200d",Bt="(?:"+Mt+"|"+Dt+")",qt="(?:"+Qt+"|"+Dt+")",Ut="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ft="(?:"+xt+"|"+Lt+")?",$t="["+wt+"]?",Vt=$t+Ft+"(?:"+Pt+"(?:"+[Gt,jt,Yt].join("|")+")"+$t+Ft+")*",zt="(?:"+[Nt,jt,Yt].join("|")+")"+Vt,Ht="(?:"+[Gt+xt+"?",xt,jt,Yt,Et].join("|")+")",Kt=RegExp("['’]","g"),Zt=RegExp(xt,"g"),Jt=RegExp(Lt+"(?="+Lt+")|"+Ht+Vt,"g"),Xt=RegExp([Qt+"?"+Mt+"+"+Ut+"(?="+[Rt,Qt,"$"].join("|")+")",qt+"+"+Wt+"(?="+[Rt,Qt+Bt,"$"].join("|")+")",Qt+"?"+Bt+"+"+Ut,Qt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",St,zt].join("|"),"g"),te=RegExp("["+Pt+kt+Tt+wt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,oe={};oe[M]=oe[D]=oe[L]=oe[G]=oe[j]=oe[Y]=oe[Q]=oe[P]=oe[B]=!0,oe[g]=oe[_]=oe[S]=oe[y]=oe[N]=oe[v]=oe[m]=oe[b]=oe[T]=oe[O]=oe[A]=oe[w]=oe[I]=oe[E]=oe[x]=!1;var ie={};ie[g]=ie[_]=ie[S]=ie[N]=ie[y]=ie[v]=ie[M]=ie[D]=ie[L]=ie[G]=ie[j]=ie[T]=ie[O]=ie[A]=ie[w]=ie[I]=ie[E]=ie[R]=ie[Y]=ie[Q]=ie[P]=ie[B]=!0,ie[m]=ie[b]=ie[x]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,se=parseInt,ce="object"==typeof global&&global&&global.Object===Object&&global,fe="object"==typeof self&&self&&self.Object===Object&&self,le=ce||fe||Function("return this")(),pe=e&&!e.nodeType&&e,de=pe&&t&&!t.nodeType&&t,he=de&&de.exports===pe,ge=he&&ce.process,_e=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=_e&&_e.isArrayBuffer,ve=_e&&_e.isDate,me=_e&&_e.isMap,be=_e&&_e.isRegExp,ke=_e&&_e.isSet,Te=_e&&_e.isTypedArray;function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r}function Ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ee(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}function Re(t,e){return!(null==t||!t.length)&&Qe(t,e,0)>-1}function xe(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Se(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Ne(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Me(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function De(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ge=Ue("length");function je(t,e,n){var r;return n(t,function(t,n,o){if(e(t,n,o))return r=n,!1}),r}function Ye(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Qe(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Be,n)}function Pe(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function qe(t,e){var n=null==t?0:t.length;return n?$e(t,e)/n:p}function Ue(t){return function(e){return null==e?o:e[t]}}function We(t){return function(e){return null==t?o:t[e]}}function Fe(t,e,n,r,o){return o(t,function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)}),n}function $e(t,e){for(var n,r=-1,i=t.length;++r<i;){var u=e(t[r]);u!==o&&(n=n===o?u:n+u)}return n}function Ve(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function ze(t){return t?t.slice(0,pn(t)+1).replace(rt,""):t}function He(t){return function(e){return t(e)}}function Ke(t,e){return Se(e,function(e){return t[e]})}function Ze(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Qe(e,t[n],0)>-1;);return n}function Xe(t,e){for(var n=t.length;n--&&Qe(e,t[n],0)>-1;);return n}var tn=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+ue[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function un(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==a||(t[n]=a,i[o++]=n)}return i}function sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function fn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Ge(t)}function ln(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var dn=We({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function t(e){var n,r=(e=null==e?le:hn.defaults(le.Object(),e,hn.pick(le,ne))).Array,ot=e.Date,kt=e.Error,Tt=e.Function,Ot=e.Math,At=e.Object,Ct=e.RegExp,wt=e.String,It=e.TypeError,Et=r.prototype,Rt=Tt.prototype,xt=At.prototype,St=e["__core-js_shared__"],Nt=Rt.toString,Mt=xt.hasOwnProperty,Dt=0,Lt=(n=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Gt=xt.toString,jt=Nt.call(At),Yt=le._,Qt=Ct("^"+Nt.call(Mt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=he?e.Buffer:o,Bt=e.Symbol,qt=e.Uint8Array,Ut=Pt?Pt.allocUnsafe:o,Wt=un(At.getPrototypeOf,At),Ft=At.create,$t=xt.propertyIsEnumerable,Vt=Et.splice,zt=Bt?Bt.isConcatSpreadable:o,Ht=Bt?Bt.iterator:o,Jt=Bt?Bt.toStringTag:o,te=function(){try{var t=ci(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,ce=ot&&ot.now!==le.Date.now&&ot.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,pe=Ot.ceil,de=Ot.floor,ge=At.getOwnPropertySymbols,_e=Pt?Pt.isBuffer:o,Ge=e.isFinite,We=Et.join,gn=un(At.keys,At),_n=Ot.max,yn=Ot.min,vn=ot.now,mn=e.parseInt,bn=Ot.random,kn=Et.reverse,Tn=ci(e,"DataView"),On=ci(e,"Map"),An=ci(e,"Promise"),Cn=ci(e,"Set"),wn=ci(e,"WeakMap"),In=ci(At,"create"),En=wn&&new wn,Rn={},xn=ji(Tn),Sn=ji(On),Nn=ji(An),Mn=ji(Cn),Dn=ji(wn),Ln=Bt?Bt.prototype:o,Gn=Ln?Ln.valueOf:o,jn=Ln?Ln.toString:o;function Yn(t){if(ta(t)&&!Uu(t)&&!(t instanceof qn)){if(t instanceof Bn)return t;if(Mt.call(t,"__wrapped__"))return Yi(t)}return new Bn(t)}var Qn=function(){function t(){}return function(e){if(!Xu(e))return{};if(Ft)return Ft(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Pn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $n(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}function Vn(t){var e=this.__data__=new Wn(t);this.size=e.size}function zn(t,e){var n=Uu(t),r=!n&&qu(t),o=!n&&!r&&Vu(t),i=!n&&!r&&!o&&sa(t),u=n||r||o||i,a=u?Ve(t.length,wt):[],s=a.length;for(var c in t)!e&&!Mt.call(t,c)||u&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_i(c,s))||a.push(c);return a}function Hn(t){var e=t.length;return e?t[Fr(0,e-1)]:o}function Kn(t,e){return Ni(Io(t),ir(e,0,t.length))}function Zn(t){return Ni(Io(t))}function Jn(t,e,n){(n!==o&&!Qu(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Xn(t,e,n){var r=t[e];Mt.call(t,e)&&Qu(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Qu(t[n][0],e))return n;return-1}function er(t,e,n,r){return fr(t,function(t,o,i){e(r,t,n(t),i)}),r}function nr(t,e){return t&&Eo(e,xa(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,u=r(i),a=null==t;++n<i;)u[n]=a?o:Ca(t,e[n]);return u}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ur(t,e,n,r,i,u){var a,s=1&e,c=2&e,f=4&e;if(n&&(a=i?n(t,r,i,u):n(t)),a!==o)return a;if(!Xu(t))return t;var l=Uu(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Io(t,a)}else{var p=pi(t),d=p==b||p==k;if(Vu(t))return ko(t,s);if(p==A||p==g||d&&!i){if(a=c||d?{}:hi(t),!s)return c?function(t,e){return Eo(t,li(t),e)}(t,function(t,e){return t&&Eo(e,Sa(e),t)}(a,t)):function(t,e){return Eo(t,fi(t),e)}(t,nr(a,t))}else{if(!ie[p])return i?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case S:return To(t);case y:case v:return new o(+t);case N:return function(t,e){var n=e?To(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case M:case D:case L:case G:case j:case Y:case Q:case P:case B:return Oo(t,n);case T:return new o;case O:case E:return new o(t);case w:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new o;case R:return r=t,Gn?At(Gn.call(r)):{}}}(t,p,s)}}u||(u=new Vn);var h=u.get(t);if(h)return h;u.set(t,a),ia(t)?t.forEach(function(r){a.add(ur(r,e,n,r,t,u))}):ea(t)&&t.forEach(function(r,o){a.set(o,ur(r,e,n,o,t,u))});var _=l?o:(f?c?ni:ei:c?Sa:xa)(t);return Ce(_||t,function(r,o){_&&(r=t[o=r]),Xn(a,o,ur(r,e,n,o,t,u))}),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=At(t);r--;){var i=n[r],u=e[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function sr(t,e,n){if("function"!=typeof t)throw new It(i);return Ei(function(){t.apply(o,n)},e)}function cr(t,e,n,r){var o=-1,i=Re,u=!0,a=t.length,s=[],c=e.length;if(!a)return s;n&&(e=Se(e,He(n))),r?(i=xe,u=!1):e.length>=200&&(i=Ze,u=!1,e=new $n(e));t:for(;++o<a;){var f=t[o],l=null==n?f:n(f);if(f=r||0!==f?f:0,u&&l==l){for(var p=c;p--;)if(e[p]===l)continue t;s.push(f)}else i(e,l,r)||s.push(f)}return s}Yn.templateSettings={escape:H,evaluate:K,interpolate:Z,variable:"",imports:{_:Yn}},Yn.prototype=Pn.prototype,Yn.prototype.constructor=Yn,Bn.prototype=Qn(Pn.prototype),Bn.prototype.constructor=Bn,qn.prototype=Qn(Pn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(t){var e=this.__data__;if(In){var n=e[t];return n===u?o:n}return Mt.call(e,t)?e[t]:o},Un.prototype.has=function(t){var e=this.__data__;return In?e[t]!==o:Mt.call(e,t)},Un.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=In&&e===o?u:e,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Vt.call(e,n,1),--this.size,0))},Wn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Wn.prototype.has=function(t){return tr(this.__data__,t)>-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(On||Wn),string:new Un}},Fn.prototype.delete=function(t){var e=ai(this,t).delete(t);return this.size-=e?1:0,e},Fn.prototype.get=function(t){return ai(this,t).get(t)},Fn.prototype.has=function(t){return ai(this,t).has(t)},Fn.prototype.set=function(t,e){var n=ai(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(t){return this.__data__.set(t,u),this},$n.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Vn.prototype.get=function(t){return this.__data__.get(t)},Vn.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this};var fr=So(vr),lr=So(mr,!0);function pr(t,e){var n=!0;return fr(t,function(t,r,o){return n=!!e(t,r,o)}),n}function dr(t,e,n){for(var r=-1,i=t.length;++r<i;){var u=t[r],a=e(u);if(null!=a&&(s===o?a==a&&!aa(a):n(a,s)))var s=a,c=u}return c}function hr(t,e){var n=[];return fr(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}function gr(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=gi),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?gr(a,e-1,n,r,o):Ne(o,a):r||(o[o.length]=a)}return o}var _r=No(),yr=No(!0);function vr(t,e){return t&&_r(t,e,xa)}function mr(t,e){return t&&yr(t,e,xa)}function br(t,e){return Ee(e,function(e){return Ku(t[e])})}function kr(t,e){for(var n=0,r=(e=yo(e,t)).length;null!=t&&n<r;)t=t[Gi(e[n++])];return n&&n==r?t:o}function Tr(t,e,n){var r=e(t);return Uu(t)?r:Ne(r,n(t))}function Or(t){return null==t?t===o?"[object Undefined]":"[object Null]":Jt&&Jt in At(t)?function(t){var e=Mt.call(t,Jt),n=t[Jt];try{t[Jt]=o;var r=!0}catch(t){}var i=Gt.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),i}(t):function(t){return Gt.call(t)}(t)}function Ar(t,e){return t>e}function Cr(t,e){return null!=t&&Mt.call(t,e)}function wr(t,e){return null!=t&&e in At(t)}function Ir(t,e,n){for(var i=n?xe:Re,u=t[0].length,a=t.length,s=a,c=r(a),f=1/0,l=[];s--;){var p=t[s];s&&e&&(p=Se(p,He(e))),f=yn(p.length,f),c[s]=!n&&(e||u>=120&&p.length>=120)?new $n(s&&p):o}p=t[0];var d=-1,h=c[0];t:for(;++d<u&&l.length<f;){var g=p[d],_=e?e(g):g;if(g=n||0!==g?g:0,!(h?Ze(h,_):i(l,_,n))){for(s=a;--s;){var y=c[s];if(!(y?Ze(y,_):i(t[s],_,n)))continue t}h&&h.push(_),l.push(g)}}return l}function Er(t,e,n){var r=null==(t=Ci(t,e=yo(e,t)))?t:t[Gi(Hi(e))];return null==r?o:Oe(r,t,n)}function Rr(t){return ta(t)&&Or(t)==g}function xr(t,e,n,r,i){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,i,u){var a=Uu(t),s=Uu(e),c=a?_:pi(t),f=s?_:pi(e),l=(c=c==g?A:c)==A,p=(f=f==g?A:f)==A,d=c==f;if(d&&Vu(t)){if(!Vu(e))return!1;a=!0,l=!1}if(d&&!l)return u||(u=new Vn),a||sa(t)?Xo(t,e,n,r,i,u):function(t,e,n,r,o,i,u){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case O:return Qu(+t,+e);case m:return t.name==e.name&&t.message==e.message;case w:case E:return t==e+"";case T:var a=on;case I:var s=1&r;if(a||(a=sn),t.size!=e.size&&!s)return!1;var c=u.get(t);if(c)return c==e;r|=2,u.set(t,e);var f=Xo(a(t),a(e),r,o,i,u);return u.delete(t),f;case R:if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,c,n,r,i,u);if(!(1&n)){var h=l&&Mt.call(t,"__wrapped__"),b=p&&Mt.call(e,"__wrapped__");if(h||b){var k=h?t.value():t,C=b?e.value():e;return u||(u=new Vn),i(k,C,n,r,u)}}return!!d&&(u||(u=new Vn),function(t,e,n,r,i,u){var a=1&n,s=ei(t),c=s.length;if(c!=ei(e).length&&!a)return!1;for(var f=c;f--;){var l=s[f];if(!(a?l in e:Mt.call(e,l)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var h=!0;u.set(t,e),u.set(e,t);for(var g=a;++f<c;){var _=t[l=s[f]],y=e[l];if(r)var v=a?r(y,_,l,e,t,u):r(_,y,l,t,e,u);if(!(v===o?_===y||i(_,y,n,r,u):v)){h=!1;break}g||(g="constructor"==l)}if(h&&!g){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(h=!1)}return u.delete(t),u.delete(e),h}(t,e,n,r,i,u))}(t,e,n,r,xr,i))}function Sr(t,e,n,r){var i=n.length,u=i,a=!r;if(null==t)return!u;for(t=At(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<u;){var c=(s=n[i])[0],f=t[c],l=s[1];if(a&&s[2]){if(f===o&&!(c in t))return!1}else{var p=new Vn;if(r)var d=r(f,l,c,t,e,p);if(!(d===o?xr(l,f,3,r,p):d))return!1}}return!0}function Nr(t){return!(!Xu(t)||(e=t,Lt&&Lt in e))&&(Ku(t)?Qt:gt).test(ji(t));var e}function Mr(t){return"function"==typeof t?t:null==t?ns:"object"==typeof t?Uu(t)?Yr(t[0],t[1]):jr(t):ls(t)}function Dr(t){if(!ki(t))return gn(t);var e=[];for(var n in At(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t,e){return t<e}function Gr(t,e){var n=-1,o=Fu(t)?r(t.length):[];return fr(t,function(t,r,i){o[++n]=e(t,r,i)}),o}function jr(t){var e=si(t);return 1==e.length&&e[0][2]?Oi(e[0][0],e[0][1]):function(n){return n===t||Sr(n,t,e)}}function Yr(t,e){return vi(t)&&Ti(e)?Oi(Gi(t),e):function(n){var r=Ca(n,t);return r===o&&r===e?wa(n,t):xr(e,r,3)}}function Qr(t,e,n,r,i){t!==e&&_r(e,function(u,a){if(i||(i=new Vn),Xu(u))!function(t,e,n,r,i,u,a){var s=wi(t,n),c=wi(e,n),f=a.get(c);if(f)Jn(t,n,f);else{var l=u?u(s,c,n+"",t,e,a):o,p=l===o;if(p){var d=Uu(c),h=!d&&Vu(c),g=!d&&!h&&sa(c);l=c,d||h||g?Uu(s)?l=s:$u(s)?l=Io(s):h?(p=!1,l=ko(c,!0)):g?(p=!1,l=Oo(c,!0)):l=[]:ra(c)||qu(c)?(l=s,qu(s)?l=_a(s):Xu(s)&&!Ku(s)||(l=hi(c))):p=!1}p&&(a.set(c,l),i(l,c,r,u,a),a.delete(c)),Jn(t,n,l)}}(t,e,a,n,Qr,r,i);else{var s=r?r(wi(t,a),u,a+"",t,e,i):o;s===o&&(s=u),Jn(t,a,s)}},Sa)}function Pr(t,e){var n=t.length;if(n)return _i(e+=e<0?n:0,n)?t[e]:o}function Br(t,e,n){e=e.length?Se(e,function(t){return Uu(t)?function(e){return kr(e,1===t.length?t[0]:t)}:t}):[ns];var r=-1;e=Se(e,He(ui()));var o=Gr(t,function(t,n,o){var i=Se(e,function(e){return e(t)});return{criteria:i,index:++r,value:t}});return function(t){var e=t.length;for(t.sort(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var s=Ao(o[r],i[r]);if(s)return r>=a?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)});e--;)t[e]=t[e].value;return t}(o)}function qr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=kr(t,u);n(a,u)&&Kr(i,yo(u,t),a)}return i}function Ur(t,e,n,r){var o=r?Pe:Qe,i=-1,u=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Se(t,He(n)));++i<u;)for(var s=0,c=e[i],f=n?n(c):c;(s=o(a,f,s,r))>-1;)a!==t&&Vt.call(a,s,1),Vt.call(t,s,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;_i(o)?Vt.call(t,o,1):so(t,o)}}return t}function Fr(t,e){return t+de(bn()*(e-t+1))}function $r(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Vr(t,e){return Ri(Ai(t,e,ns),t+"")}function zr(t){return Hn(Qa(t))}function Hr(t,e){var n=Qa(t);return Ni(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Xu(t))return t;for(var i=-1,u=(e=yo(e,t)).length,a=u-1,s=t;null!=s&&++i<u;){var c=Gi(e[i]),f=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=a){var l=s[c];(f=r?r(l,c,s):o)===o&&(f=Xu(l)?l:_i(e[i+1])?[]:{})}Xn(s,c,f),s=s[c]}return t}var Zr=En?function(t,e){return En.set(t,e),t}:ns,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Xa(e),writable:!0})}:ns;function Xr(t){return Ni(Qa(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var u=r(i);++o<i;)u[o]=t[o+e];return u}function eo(t,e){var n;return fr(t,function(t,r,o){return!(n=e(t,r,o))}),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!aa(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return ro(t,e,ns,n)}function ro(t,e,n,r){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=n(e))!=e,s=null===e,c=aa(e),f=e===o;i<u;){var l=de((i+u)/2),p=n(t[l]),d=p!==o,h=null===p,g=p==p,_=aa(p);if(a)var y=r||g;else y=f?g&&(r||d):s?g&&d&&(r||!h):c?g&&d&&!h&&(r||!_):!h&&!_&&(r?p<=e:p<e);y?i=l+1:u=l}return yn(u,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Qu(a,s)){var s=a;i[o++]=0===u?0:u}}return i}function io(t){return"number"==typeof t?t:aa(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(Uu(t))return Se(t,uo)+"";if(aa(t))return jn?jn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ao(t,e,n){var r=-1,o=Re,i=t.length,u=!0,a=[],s=a;if(n)u=!1,o=xe;else if(i>=200){var c=e?null:Vo(t);if(c)return sn(c);u=!1,o=Ze,s=new $n}else s=e?[]:a;t:for(;++r<i;){var f=t[r],l=e?e(f):f;if(f=n||0!==f?f:0,u&&l==l){for(var p=s.length;p--;)if(s[p]===l)continue t;e&&s.push(l),a.push(f)}else o(s,l,n)||(s!==a&&s.push(l),a.push(f))}return a}function so(t,e){var n=-1,r=(e=yo(e,t)).length;if(!r)return!0;for(;++n<r;){var o=Gi(e[n]);if("__proto__"===o&&!Mt.call(t,"__proto__"))return!1;if(("constructor"===o||"prototype"===o)&&n<r-1)return!1}var i=Ci(t,e);return null==i||delete i[Gi(Hi(e))]}function co(t,e,n,r){return Kr(t,e,n(kr(t,e)),r)}function fo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function lo(t,e){var n=t;return n instanceof qn&&(n=n.value()),Me(e,function(t,e){return e.func.apply(e.thisArg,Ne([t],e.args))},n)}function po(t,e,n){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,u=r(o);++i<o;)for(var a=t[i],s=-1;++s<o;)s!=i&&(u[i]=cr(u[i]||a,t[s],e,n));return ao(gr(u,1),e,n)}function ho(t,e,n){for(var r=-1,i=t.length,u=e.length,a={};++r<i;){var s=r<u?e[r]:o;n(a,t[r],s)}return a}function go(t){return $u(t)?t:[]}function _o(t){return"function"==typeof t?t:ns}function yo(t,e){return Uu(t)?t:vi(t,e)?[t]:Li(ya(t))}var vo=Vr;function mo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var bo=ue||function(t){return le.clearTimeout(t)};function ko(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function To(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Oo(t,e){var n=e?To(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ao(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,u=aa(t),a=e!==o,s=null===e,c=e==e,f=aa(e);if(!s&&!f&&!u&&t>e||u&&a&&c&&!s&&!f||r&&a&&c||!n&&c||!i)return 1;if(!r&&!u&&!f&&t<e||f&&n&&i&&!r&&!u||s&&n&&i||!a&&i||!c)return-1}return 0}function Co(t,e,n,o){for(var i=-1,u=t.length,a=n.length,s=-1,c=e.length,f=_n(u-a,0),l=r(c+f),p=!o;++s<c;)l[s]=e[s];for(;++i<a;)(p||i<u)&&(l[n[i]]=t[i]);for(;f--;)l[s++]=t[i++];return l}function wo(t,e,n,o){for(var i=-1,u=t.length,a=-1,s=n.length,c=-1,f=e.length,l=_n(u-s,0),p=r(l+f),d=!o;++i<l;)p[i]=t[i];for(var h=i;++c<f;)p[h+c]=e[c];for(;++a<s;)(d||i<u)&&(p[h+n[a]]=t[i++]);return p}function Io(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Eo(t,e,n,r){var i=!n;n||(n={});for(var u=-1,a=e.length;++u<a;){var s=e[u],c=r?r(n[s],t[s],s,n,t):o;c===o&&(c=t[s]),i?rr(n,s,c):Xn(n,s,c)}return n}function Ro(t,e){return function(n,r){var o=Uu(n)?Ae:er,i=e?e():{};return o(n,t,ui(r,2),i)}}function xo(t){return Vr(function(e,n){var r=-1,i=n.length,u=i>1?n[i-1]:o,a=i>2?n[2]:o;for(u=t.length>3&&"function"==typeof u?(i--,u):o,a&&yi(n[0],n[1],a)&&(u=i<3?o:u,i=1),e=At(e);++r<i;){var s=n[r];s&&t(e,s,r,u)}return e})}function So(t,e){return function(n,r){if(null==n)return n;if(!Fu(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=At(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}}function No(t){return function(e,n,r){for(var o=-1,i=At(e),u=r(e),a=u.length;a--;){var s=u[t?a:++o];if(!1===n(i[s],s,i))break}return e}}function Mo(t){return function(e){var n=rn(e=ya(e))?ln(e):o,r=n?n[0]:e.charAt(0),i=n?mo(n,1).join(""):e.slice(1);return r[t]()+i}}function Do(t){return function(e){return Me(Ka(qa(e).replace(Kt,"")),t,"")}}function Lo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Qn(t.prototype),r=t.apply(n,e);return Xu(r)?r:n}}function Go(t){return function(e,n,r){var i=At(e);if(!Fu(e)){var u=ui(n,3);e=xa(e),n=function(t){return u(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[u?e[a]:a]:o}}function jo(t){return ti(function(e){var n=e.length,r=n,u=Bn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(i);if(u&&!s&&"wrapper"==oi(a))var s=new Bn([],!0)}for(r=s?r:n;++r<n;){var c=oi(a=e[r]),f="wrapper"==c?ri(a):o;s=f&&mi(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?s[oi(f[0])].apply(s,f[3]):1==a.length&&mi(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&Uu(r))return s.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}})}function Yo(t,e,n,i,u,a,s,f,l,p){var d=e&c,h=1&e,g=2&e,_=24&e,y=512&e,v=g?o:Lo(t);return function c(){for(var m=arguments.length,b=r(m),k=m;k--;)b[k]=arguments[k];if(_)var T=ii(c),O=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,T);if(i&&(b=Co(b,i,u,_)),a&&(b=wo(b,a,s,_)),m-=O,_&&m<p){var A=an(b,T);return Fo(t,e,Yo,c.placeholder,n,b,A,f,l,p-m)}var C=h?n:this,w=g?C[t]:t;return m=b.length,f?b=function(t,e){for(var n=t.length,r=yn(e.length,n),i=Io(t);r--;){var u=e[r];t[r]=_i(u,n)?i[u]:o}return t}(b,f):y&&m>1&&b.reverse(),d&&l<m&&(b.length=l),this&&this!==le&&this instanceof c&&(w=v||Lo(w)),w.apply(C,b)}}function Qo(t,e){return function(n,r){return function(t,e,n,r){return vr(t,function(t,o,i){e(r,n(t),o,i)}),r}(n,t,e(r),{})}}function Po(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=uo(n),r=uo(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Bo(t){return ti(function(e){return e=Se(e,He(ui())),Vr(function(n){var r=this;return t(e,function(t){return Oe(t,r,n)})})})}function qo(t,e){var n=(e=e===o?" ":uo(e)).length;if(n<2)return n?$r(e,t):e;var r=$r(e,pe(t/fn(e)));return rn(e)?mo(ln(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,i){return i&&"number"!=typeof i&&yi(e,n,i)&&(n=i=o),e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n,o){for(var i=-1,u=_n(pe((e-t)/(n||1)),0),a=r(u);u--;)a[o?u:++i]=t,t+=n;return a}(e,n,i=i===o?e<n?1:-1:pa(i),t)}}function Wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ga(e),n=ga(n)),t(e,n)}}function Fo(t,e,n,r,i,u,a,c,f,l){var p=8&e;e|=p?s:64,4&(e&=~(p?64:s))||(e&=-4);var d=[t,e,i,p?u:o,p?a:o,p?o:u,p?o:a,c,f,l],h=n.apply(o,d);return mi(t)&&Ii(h,d),h.placeholder=r,xi(h,t,e)}function $o(t){var e=Ot[t];return function(t,n){if(t=ga(t),(n=null==n?0:yn(da(n),292))&&Ge(t)){var r=(ya(t)+"e").split("e");return+((r=(ya(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Vo=Cn&&1/sn(new Cn([,-0]))[1]==f?function(t){return new Cn(t)}:as;function zo(t){return function(e){var n=pi(e);return n==T?on(e):n==I?cn(e):function(t,e){return Se(e,function(e){return[e,t[e]]})}(e,t(e))}}function Ho(t,e,n,u,f,l,p,d){var h=2&e;if(!h&&"function"!=typeof t)throw new It(i);var g=u?u.length:0;if(g||(e&=-97,u=f=o),p=p===o?p:_n(da(p),0),d=d===o?d:da(d),g-=f?f.length:0,64&e){var _=u,y=f;u=f=o}var v=h?o:ri(t),m=[t,e,n,u,f,_,y,l,p,d];if(v&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var s=e[3];if(s){var f=t[3];t[3]=f?Co(f,s,e[4]):s,t[4]=f?an(t[3],a):e[4]}(s=e[5])&&(f=t[5],t[5]=f?wo(f,s,e[6]):s,t[6]=f?an(t[5],a):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(m,v),t=m[0],e=m[1],n=m[2],u=m[3],f=m[4],!(d=m[9]=m[9]===o?h?0:t.length:_n(m[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var i=Lo(t);return function u(){for(var a=arguments.length,s=r(a),c=a,f=ii(u);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==f&&s[a-1]!==f?[]:an(s,f);return(a-=l.length)<n?Fo(t,e,Yo,u.placeholder,o,s,l,o,o,n-a):Oe(this&&this!==le&&this instanceof u?i:t,this,s)}}(t,e,d):e!=s&&33!=e||f.length?Yo.apply(o,m):function(t,e,n,o){var i=1&e,u=Lo(t);return function e(){for(var a=-1,s=arguments.length,c=-1,f=o.length,l=r(f+s),p=this&&this!==le&&this instanceof e?u:t;++c<f;)l[c]=o[c];for(;s--;)l[c++]=arguments[++a];return Oe(p,i?n:this,l)}}(t,e,n,u);else var b=function(t,e,n){var r=1&e,o=Lo(t);return function e(){return(this&&this!==le&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return xi((v?Zr:Ii)(b,m),t,e)}function Ko(t,e,n,r){return t===o||Qu(t,xt[n])&&!Mt.call(r,n)?e:t}function Zo(t,e,n,r,i,u){return Xu(t)&&Xu(e)&&(u.set(e,t),Qr(t,e,o,Zo,u),u.delete(e)),t}function Jo(t){return ra(t)?o:t}function Xo(t,e,n,r,i,u){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var f=u.get(t),l=u.get(e);if(f&&l)return f==e&&l==t;var p=-1,d=!0,h=2&n?new $n:o;for(u.set(t,e),u.set(e,t);++p<s;){var g=t[p],_=e[p];if(r)var y=a?r(_,g,p,e,t,u):r(g,_,p,t,e,u);if(y!==o){if(y)continue;d=!1;break}if(h){if(!Le(e,function(t,e){if(!Ze(h,e)&&(g===t||i(g,t,n,r,u)))return h.push(e)})){d=!1;break}}else if(g!==_&&!i(g,_,n,r,u)){d=!1;break}}return u.delete(t),u.delete(e),d}function ti(t){return Ri(Ai(t,o,Wi),t+"")}function ei(t){return Tr(t,xa,fi)}function ni(t){return Tr(t,Sa,li)}var ri=En?function(t){return En.get(t)}:as;function oi(t){for(var e=t.name+"",n=Rn[e],r=Mt.call(Rn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Mt.call(Yn,"placeholder")?Yn:t).placeholder}function ui(){var t=Yn.iteratee||rs;return t=t===rs?Mr:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function si(t){for(var e=xa(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Ti(o)]}return e}function ci(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Nr(n)?n:o}var fi=ge?function(t){return null==t?[]:(t=At(t),Ee(ge(t),function(e){return $t.call(t,e)}))}:hs,li=ge?function(t){for(var e=[];t;)Ne(e,fi(t)),t=Wt(t);return e}:hs,pi=Or;function di(t,e,n){for(var r=-1,o=(e=yo(e,t)).length,i=!1;++r<o;){var u=Gi(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ju(o)&&_i(u,o)&&(Uu(t)||qu(t))}function hi(t){return"function"!=typeof t.constructor||ki(t)?{}:Qn(Wt(t))}function gi(t){return Uu(t)||qu(t)||!!(zt&&t&&t[zt])}function _i(t,e){var n=typeof t;return!!(e=e??l)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yi(t,e,n){if(!Xu(n))return!1;var r=typeof e;return!!("number"==r?Fu(n)&&_i(e,n.length):"string"==r&&e in n)&&Qu(n[e],t)}function vi(t,e){if(Uu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||X.test(t)||!J.test(t)||null!=e&&t in At(e)}function mi(t){var e=oi(t),n=Yn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(Tn&&pi(new Tn(new ArrayBuffer(1)))!=N||On&&pi(new On)!=T||An&&pi(An.resolve())!=C||Cn&&pi(new Cn)!=I||wn&&pi(new wn)!=x)&&(pi=function(t){var e=Or(t),n=e==A?t.constructor:o,r=n?ji(n):"";if(r)switch(r){case xn:return N;case Sn:return T;case Nn:return C;case Mn:return I;case Dn:return x}return e});var bi=St?Ku:gs;function ki(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function Ti(t){return t==t&&!Xu(t)}function Oi(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in At(n))}}function Ai(t,e,n){return e=_n(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=_n(o.length-e,0),a=r(u);++i<u;)a[i]=o[e+i];i=-1;for(var s=r(e+1);++i<e;)s[i]=o[i];return s[e]=n(a),Oe(t,this,s)}}function Ci(t,e){return e.length<2?t:kr(t,to(e,0,-1))}function wi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Si(Zr),Ei=fe||function(t,e){return le.setTimeout(t,e)},Ri=Si(Jr);function xi(t,e,n){var r=e+"";return Ri(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(h,function(n){var r="_."+n[0];e&n[1]&&!Re(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(at):[]}(r),n)))}function Si(t){var e=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ni(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var u=Fr(n,i),a=t[u];t[u]=t[n],t[n]=a}return t.length=e,t}var Mi,Di,Li=(Mi=Mu(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,function(t,n,r,o){e.push(r?o.replace(ft,"$1"):n||t)}),e},function(t){return 500===Di.size&&Di.clear(),t}),Di=Mi.cache,Mi);function Gi(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ji(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yi(t){if(t instanceof qn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Qi=Vr(function(t,e){return $u(t)?cr(t,gr(e,1,$u,!0)):[]}),Pi=Vr(function(t,e){var n=Hi(e);return $u(n)&&(n=o),$u(t)?cr(t,gr(e,1,$u,!0),ui(n,2)):[]}),Bi=Vr(function(t,e){var n=Hi(e);return $u(n)&&(n=o),$u(t)?cr(t,gr(e,1,$u,!0),o,n):[]});function qi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:da(n);return o<0&&(o=_n(r+o,0)),Ye(t,ui(e,3),o)}function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=da(n),i=n<0?_n(r+i,0):yn(i,r-1)),Ye(t,ui(e,3),i,!0)}function Wi(t){return null!=t&&t.length?gr(t,1):[]}function Fi(t){return t&&t.length?t[0]:o}var $i=Vr(function(t){var e=Se(t,go);return e.length&&e[0]===t[0]?Ir(e):[]}),Vi=Vr(function(t){var e=Hi(t),n=Se(t,go);return e===Hi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Ir(n,ui(e,2)):[]}),zi=Vr(function(t){var e=Hi(t),n=Se(t,go);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Ir(n,o,e):[]});function Hi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ki=Vr(Zi);function Zi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Ji=ti(function(t,e){var n=null==t?0:t.length,r=or(t,e);return Wr(t,Se(e,function(t){return _i(t,n)?+t:t}).sort(Ao)),r});function Xi(t){return null==t?t:kn.call(t)}var tu=Vr(function(t){return ao(gr(t,1,$u,!0))}),eu=Vr(function(t){var e=Hi(t);return $u(e)&&(e=o),ao(gr(t,1,$u,!0),ui(e,2))}),nu=Vr(function(t){var e=Hi(t);return e="function"==typeof e?e:o,ao(gr(t,1,$u,!0),o,e)});function ru(t){if(!t||!t.length)return[];var e=0;return t=Ee(t,function(t){if($u(t))return e=_n(t.length,e),!0}),Ve(e,function(e){return Se(t,Ue(e))})}function ou(t,e){if(!t||!t.length)return[];var n=ru(t);return null==e?n:Se(n,function(t){return Oe(e,o,t)})}var iu=Vr(function(t,e){return $u(t)?cr(t,e):[]}),uu=Vr(function(t){return po(Ee(t,$u))}),au=Vr(function(t){var e=Hi(t);return $u(e)&&(e=o),po(Ee(t,$u),ui(e,2))}),su=Vr(function(t){var e=Hi(t);return e="function"==typeof e?e:o,po(Ee(t,$u),o,e)}),cu=Vr(ru),fu=Vr(function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ou(t,n)});function lu(t){var e=Yn(t);return e.__chain__=!0,e}function pu(t,e){return e(t)}var du=ti(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof qn&&_i(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pu,args:[i],thisArg:o}),new Bn(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)}),hu=Ro(function(t,e,n){Mt.call(t,n)?++t[n]:rr(t,n,1)}),gu=Go(qi),_u=Go(Ui);function yu(t,e){return(Uu(t)?Ce:fr)(t,ui(e,3))}function vu(t,e){return(Uu(t)?we:lr)(t,ui(e,3))}var mu=Ro(function(t,e,n){Mt.call(t,n)?t[n].push(e):rr(t,n,[e])}),bu=Vr(function(t,e,n){var o=-1,i="function"==typeof e,u=Fu(t)?r(t.length):[];return fr(t,function(t){u[++o]=i?Oe(e,t,n):Er(t,e,n)}),u}),ku=Ro(function(t,e,n){rr(t,n,e)});function Tu(t,e){return(Uu(t)?Se:Gr)(t,ui(e,3))}var Ou=Ro(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Au=Vr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&yi(t,e[0],e[1])?e=[]:n>2&&yi(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,gr(e,1),[])}),Cu=ce||function(){return le.Date.now()};function wu(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Ho(t,c,o,o,o,o,e)}function Iu(t,e){var n;if("function"!=typeof e)throw new It(i);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Eu=Vr(function(t,e,n){var r=1;if(n.length){var o=an(n,ii(Eu));r|=s}return Ho(t,r,e,n,o)}),Ru=Vr(function(t,e,n){var r=3;if(n.length){var o=an(n,ii(Ru));r|=s}return Ho(e,r,t,n,o)});function xu(t,e,n){var r,u,a,s,c,f,l=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new It(i);function g(e){var n=r,i=u;return r=u=o,l=e,s=t.apply(i,n)}function _(t){var n=t-f;return f===o||n>=e||n<0||d&&t-l>=a}function y(){var t=Cu();if(_(t))return v(t);c=Ei(y,function(t){var n=e-(t-f);return d?yn(n,a-(t-l)):n}(t))}function v(t){return c=o,h&&r?g(t):(r=u=o,s)}function m(){var t=Cu(),n=_(t);if(r=arguments,u=this,f=t,n){if(c===o)return function(t){return l=t,c=Ei(y,e),p?g(t):s}(f);if(d)return bo(c),c=Ei(y,e),g(f)}return c===o&&(c=Ei(y,e)),s}return e=ga(e)||0,Xu(n)&&(p=!!n.leading,a=(d="maxWait"in n)?_n(ga(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),m.cancel=function(){c!==o&&bo(c),l=0,r=f=u=c=o},m.flush=function(){return c===o?s:v(Cu())},m}var Su=Vr(function(t,e){return sr(t,1,e)}),Nu=Vr(function(t,e,n){return sr(t,ga(e)||0,n)});function Mu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Mu.Cache||Fn),n}function Du(t){if("function"!=typeof t)throw new It(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Mu.Cache=Fn;var Lu=vo(function(t,e){var n=(e=1==e.length&&Uu(e[0])?Se(e[0],He(ui())):Se(gr(e,1),He(ui()))).length;return Vr(function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Oe(t,this,r)})}),Gu=Vr(function(t,e){var n=an(e,ii(Gu));return Ho(t,s,o,e,n)}),ju=Vr(function(t,e){var n=an(e,ii(ju));return Ho(t,64,o,e,n)}),Yu=ti(function(t,e){return Ho(t,256,o,o,o,e)});function Qu(t,e){return t===e||t!=t&&e!=e}var Pu=Wo(Ar),Bu=Wo(function(t,e){return t>=e}),qu=Rr(function(){return arguments}())?Rr:function(t){return ta(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},Uu=r.isArray,Wu=ye?He(ye):function(t){return ta(t)&&Or(t)==S};function Fu(t){return null!=t&&Ju(t.length)&&!Ku(t)}function $u(t){return ta(t)&&Fu(t)}var Vu=_e||gs,zu=ve?He(ve):function(t){return ta(t)&&Or(t)==v};function Hu(t){if(!ta(t))return!1;var e=Or(t);return e==m||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Ku(t){if(!Xu(t))return!1;var e=Or(t);return e==b||e==k||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zu(t){return"number"==typeof t&&t==da(t)}function Ju(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Xu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=me?He(me):function(t){return ta(t)&&pi(t)==T};function na(t){return"number"==typeof t||ta(t)&&Or(t)==O}function ra(t){if(!ta(t)||Or(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==jt}var oa=be?He(be):function(t){return ta(t)&&Or(t)==w},ia=ke?He(ke):function(t){return ta(t)&&pi(t)==I};function ua(t){return"string"==typeof t||!Uu(t)&&ta(t)&&Or(t)==E}function aa(t){return"symbol"==typeof t||ta(t)&&Or(t)==R}var sa=Te?He(Te):function(t){return ta(t)&&Ju(t.length)&&!!oe[Or(t)]},ca=Wo(Lr),fa=Wo(function(t,e){return t<=e});function la(t){if(!t)return[];if(Fu(t))return ua(t)?ln(t):Io(t);if(Ht&&t[Ht])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ht]());var e=pi(t);return(e==T?on:e==I?sn:Qa)(t)}function pa(t){return t?(t=ga(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=pa(t),n=e%1;return e==e?n?e-n:e:0}function ha(t){return t?ir(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return p;if(Xu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ze(t);var n=ht.test(t);return n||_t.test(t)?se(t.slice(2),n?2:8):dt.test(t)?p:+t}function _a(t){return Eo(t,Sa(t))}function ya(t){return null==t?"":uo(t)}var va=xo(function(t,e){if(ki(e)||Fu(e))Eo(e,xa(e),t);else for(var n in e)Mt.call(e,n)&&Xn(t,n,e[n])}),ma=xo(function(t,e){Eo(e,Sa(e),t)}),ba=xo(function(t,e,n,r){Eo(e,Sa(e),t,r)}),ka=xo(function(t,e,n,r){Eo(e,xa(e),t,r)}),Ta=ti(or),Oa=Vr(function(t,e){t=At(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&yi(e[0],e[1],i)&&(r=1);++n<r;)for(var u=e[n],a=Sa(u),s=-1,c=a.length;++s<c;){var f=a[s],l=t[f];(l===o||Qu(l,xt[f])&&!Mt.call(t,f))&&(t[f]=u[f])}return t}),Aa=Vr(function(t){return t.push(o,Zo),Oe(Ma,o,t)});function Ca(t,e,n){var r=null==t?o:kr(t,e);return r===o?n:r}function wa(t,e){return null!=t&&di(t,e,wr)}var Ia=Qo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Gt.call(e)),t[e]=n},Xa(ns)),Ea=Qo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Gt.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]},ui),Ra=Vr(Er);function xa(t){return Fu(t)?zn(t):Dr(t)}function Sa(t){return Fu(t)?zn(t,!0):function(t){if(!Xu(t))return function(t){var e=[];if(null!=t)for(var n in At(t))e.push(n);return e}(t);var e=ki(t),n=[];for(var r in t)("constructor"!=r||!e&&Mt.call(t,r))&&n.push(r);return n}(t)}var Na=xo(function(t,e,n){Qr(t,e,n)}),Ma=xo(function(t,e,n,r){Qr(t,e,n,r)}),Da=ti(function(t,e){var n={};if(null==t)return n;var r=!1;e=Se(e,function(e){return e=yo(e,t),r||(r=e.length>1),e}),Eo(t,ni(t),n),r&&(n=ur(n,7,Jo));for(var o=e.length;o--;)so(n,e[o]);return n}),La=ti(function(t,e){return null==t?{}:function(t,e){return qr(t,e,function(e,n){return wa(t,n)})}(t,e)});function Ga(t,e){if(null==t)return{};var n=Se(ni(t),function(t){return[t]});return e=ui(e),qr(t,n,function(t,n){return e(t,n[0])})}var ja=zo(xa),Ya=zo(Sa);function Qa(t){return null==t?[]:Ke(t,xa(t))}var Pa=Do(function(t,e,n){return e=e.toLowerCase(),t+(n?Ba(e):e)});function Ba(t){return Ha(ya(t).toLowerCase())}function qa(t){return(t=ya(t))&&t.replace(vt,tn).replace(Zt,"")}var Ua=Do(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Wa=Do(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Fa=Mo("toLowerCase"),$a=Do(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Va=Do(function(t,e,n){return t+(n?" ":"")+Ha(e)}),za=Do(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ha=Mo("toUpperCase");function Ka(t,e,n){return t=ya(t),(e=n?o:e)===o?function(t){return ee.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Za=Vr(function(t,e){try{return Oe(t,o,e)}catch(t){return Hu(t)?t:new kt(t)}}),Ja=ti(function(t,e){return Ce(e,function(e){e=Gi(e),rr(t,e,Eu(t[e],t))}),t});function Xa(t){return function(){return t}}var ts=jo(),es=jo(!0);function ns(t){return t}function rs(t){return Mr("function"==typeof t?t:ur(t,1))}var os=Vr(function(t,e){return function(n){return Er(n,t,e)}}),is=Vr(function(t,e){return function(n){return Er(t,n,e)}});function us(t,e,n){var r=xa(e),o=br(e,r);null!=n||Xu(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=br(e,xa(e)));var i=!(Xu(n)&&"chain"in n&&!n.chain),u=Ku(t);return Ce(o,function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__);return(n.__actions__=Io(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ne([this.value()],arguments))})}),t}function as(){}var ss=Bo(Se),cs=Bo(Ie),fs=Bo(Le);function ls(t){return vi(t)?Ue(Gi(t)):function(t){return function(e){return kr(e,t)}}(t)}var ps=Uo(),ds=Uo(!0);function hs(){return[]}function gs(){return!1}var _s,ys=Po(function(t,e){return t+e},0),vs=$o("ceil"),ms=Po(function(t,e){return t/e},1),bs=$o("floor"),ks=Po(function(t,e){return t*e},1),Ts=$o("round"),Os=Po(function(t,e){return t-e},0);return Yn.after=function(t,e){if("function"!=typeof e)throw new It(i);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=wu,Yn.assign=va,Yn.assignIn=ma,Yn.assignInWith=ba,Yn.assignWith=ka,Yn.at=Ta,Yn.before=Iu,Yn.bind=Eu,Yn.bindAll=Ja,Yn.bindKey=Ru,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Uu(t)?t:[t]},Yn.chain=lu,Yn.chunk=function(t,e,n){e=(n?yi(t,e,n):e===o)?1:_n(da(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var u=0,a=0,s=r(pe(i/e));u<i;)s[a++]=to(t,u,u+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Ne(Uu(n)?Io(n):[n],gr(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=ui();return t=e?Se(t,function(t){if("function"!=typeof t[1])throw new It(i);return[n(t[0]),t[1]]}):[],Vr(function(n){for(var r=-1;++r<e;){var o=t[r];if(Oe(o[0],this,n))return Oe(o[1],this,n)}})},Yn.conforms=function(t){return function(t){var e=xa(t);return function(n){return ar(n,t,e)}}(ur(t,1))},Yn.constant=Xa,Yn.countBy=hu,Yn.create=function(t,e){var n=Qn(t);return null==e?n:nr(n,e)},Yn.curry=function t(e,n,r){var i=Ho(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Yn.curryRight=function t(e,n,r){var i=Ho(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Yn.debounce=xu,Yn.defaults=Oa,Yn.defaultsDeep=Aa,Yn.defer=Su,Yn.delay=Nu,Yn.difference=Qi,Yn.differenceBy=Pi,Yn.differenceWith=Bi,Yn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:da(e))<0?0:e,r):[]},Yn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:da(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!0):[]},Yn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&yi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=da(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:da(r))<0&&(r+=i),r=n>r?0:ha(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Yn.filter=function(t,e){return(Uu(t)?Ee:hr)(t,ui(e,3))},Yn.flatMap=function(t,e){return gr(Tu(t,e),1)},Yn.flatMapDeep=function(t,e){return gr(Tu(t,e),f)},Yn.flatMapDepth=function(t,e,n){return n=n===o?1:da(n),gr(Tu(t,e),n)},Yn.flatten=Wi,Yn.flattenDeep=function(t){return null!=t&&t.length?gr(t,f):[]},Yn.flattenDepth=function(t,e){return null!=t&&t.length?gr(t,e=e===o?1:da(e)):[]},Yn.flip=function(t){return Ho(t,512)},Yn.flow=ts,Yn.flowRight=es,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];rr(r,o[0],o[1])}return r},Yn.functions=function(t){return null==t?[]:br(t,xa(t))},Yn.functionsIn=function(t){return null==t?[]:br(t,Sa(t))},Yn.groupBy=mu,Yn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Yn.intersection=$i,Yn.intersectionBy=Vi,Yn.intersectionWith=zi,Yn.invert=Ia,Yn.invertBy=Ea,Yn.invokeMap=bu,Yn.iteratee=rs,Yn.keyBy=ku,Yn.keys=xa,Yn.keysIn=Sa,Yn.map=Tu,Yn.mapKeys=function(t,e){var n={};return e=ui(e,3),vr(t,function(t,r,o){rr(n,e(t,r,o),t)}),n},Yn.mapValues=function(t,e){var n={};return e=ui(e,3),vr(t,function(t,r,o){rr(n,r,e(t,r,o))}),n},Yn.matches=function(t){return jr(ur(t,1))},Yn.matchesProperty=function(t,e){return Yr(t,ur(e,1))},Yn.memoize=Mu,Yn.merge=Na,Yn.mergeWith=Ma,Yn.method=os,Yn.methodOf=is,Yn.mixin=us,Yn.negate=Du,Yn.nthArg=function(t){return t=da(t),Vr(function(e){return Pr(e,t)})},Yn.omit=Da,Yn.omitBy=function(t,e){return Ga(t,Du(ui(e)))},Yn.once=function(t){return Iu(2,t)},Yn.orderBy=function(t,e,n,r){return null==t?[]:(Uu(e)||(e=null==e?[]:[e]),Uu(n=r?o:n)||(n=null==n?[]:[n]),Br(t,e,n))},Yn.over=ss,Yn.overArgs=Lu,Yn.overEvery=cs,Yn.overSome=fs,Yn.partial=Gu,Yn.partialRight=ju,Yn.partition=Ou,Yn.pick=La,Yn.pickBy=Ga,Yn.property=ls,Yn.propertyOf=function(t){return function(e){return null==t?o:kr(t,e)}},Yn.pull=Ki,Yn.pullAll=Zi,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,ui(n,2)):t},Yn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,o,n):t},Yn.pullAt=Ji,Yn.range=ps,Yn.rangeRight=ds,Yn.rearg=Yu,Yn.reject=function(t,e){return(Uu(t)?Ee:hr)(t,Du(ui(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ui(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return Wr(t,o),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new It(i);return Vr(t,e=e===o?e:da(e))},Yn.reverse=Xi,Yn.sampleSize=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:da(e),(Uu(t)?Kn:Hr)(t,e)},Yn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},Yn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Kr(t,e,n,r)},Yn.shuffle=function(t){return(Uu(t)?Zn:Xr)(t)},Yn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&yi(t,e,n)?(e=0,n=r):(e=null==e?0:da(e),n=n===o?r:da(n)),to(t,e,n)):[]},Yn.sortBy=Au,Yn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,ui(e,2)):[]},Yn.split=function(t,e,n){return n&&"number"!=typeof n&&yi(t,e,n)&&(e=n=o),(n=n===o?d:n>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=uo(e))&&rn(t)?mo(ln(t),0,n):t.split(e,n):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new It(i);return e=null==e?0:_n(da(e),0),Vr(function(n){var r=n[e],o=mo(n,0,e);return r&&Ne(o,r),Oe(t,this,o)})},Yn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Yn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:da(e))<0?0:e):[]},Yn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:da(e)))<0?0:e,r):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?fo(t,ui(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new It(i);return Xu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),xu(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=pu,Yn.toArray=la,Yn.toPairs=ja,Yn.toPairsIn=Ya,Yn.toPath=function(t){return Uu(t)?Se(t,Gi):aa(t)?[t]:Io(Li(ya(t)))},Yn.toPlainObject=_a,Yn.transform=function(t,e,n){var r=Uu(t),o=r||Vu(t)||sa(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Xu(t)&&Ku(i)?Qn(Wt(t)):{}}return(o?Ce:vr)(t,function(t,r,o){return e(n,t,r,o)}),n},Yn.unary=function(t){return wu(t,1)},Yn.union=tu,Yn.unionBy=eu,Yn.unionWith=nu,Yn.uniq=function(t){return t&&t.length?ao(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?ao(t,ui(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ao(t,o,e):[]},Yn.unset=function(t,e){return null==t||so(t,e)},Yn.unzip=ru,Yn.unzipWith=ou,Yn.update=function(t,e,n){return null==t?t:co(t,e,_o(n))},Yn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:co(t,e,_o(n),r)},Yn.values=Qa,Yn.valuesIn=function(t){return null==t?[]:Ke(t,Sa(t))},Yn.without=iu,Yn.words=Ka,Yn.wrap=function(t,e){return Gu(_o(e),t)},Yn.xor=uu,Yn.xorBy=au,Yn.xorWith=su,Yn.zip=cu,Yn.zipObject=function(t,e){return ho(t||[],e||[],Xn)},Yn.zipObjectDeep=function(t,e){return ho(t||[],e||[],Kr)},Yn.zipWith=fu,Yn.entries=ja,Yn.entriesIn=Ya,Yn.extend=ma,Yn.extendWith=ba,us(Yn,Yn),Yn.add=ys,Yn.attempt=Za,Yn.camelCase=Pa,Yn.capitalize=Ba,Yn.ceil=vs,Yn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ga(n))==n?n:0),e!==o&&(e=(e=ga(e))==e?e:0),ir(ga(t),e,n)},Yn.clone=function(t){return ur(t,4)},Yn.cloneDeep=function(t){return ur(t,5)},Yn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:o)},Yn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:o)},Yn.conformsTo=function(t,e){return null==e||ar(t,e,xa(e))},Yn.deburr=qa,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=ms,Yn.endsWith=function(t,e,n){t=ya(t),e=uo(e);var r=t.length,i=n=n===o?r:ir(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Yn.eq=Qu,Yn.escape=function(t){return(t=ya(t))&&z.test(t)?t.replace($,en):t},Yn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Yn.every=function(t,e,n){var r=Uu(t)?Ie:pr;return n&&yi(t,e,n)&&(e=o),r(t,ui(e,3))},Yn.find=gu,Yn.findIndex=qi,Yn.findKey=function(t,e){return je(t,ui(e,3),vr)},Yn.findLast=_u,Yn.findLastIndex=Ui,Yn.findLastKey=function(t,e){return je(t,ui(e,3),mr)},Yn.floor=bs,Yn.forEach=yu,Yn.forEachRight=vu,Yn.forIn=function(t,e){return null==t?t:_r(t,ui(e,3),Sa)},Yn.forInRight=function(t,e){return null==t?t:yr(t,ui(e,3),Sa)},Yn.forOwn=function(t,e){return t&&vr(t,ui(e,3))},Yn.forOwnRight=function(t,e){return t&&mr(t,ui(e,3))},Yn.get=Ca,Yn.gt=Pu,Yn.gte=Bu,Yn.has=function(t,e){return null!=t&&di(t,e,Cr)},Yn.hasIn=wa,Yn.head=Fi,Yn.identity=ns,Yn.includes=function(t,e,n,r){t=Fu(t)?t:Qa(t),n=n&&!r?da(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ua(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Qe(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:da(n);return o<0&&(o=_n(r+o,0)),Qe(t,e,o)},Yn.inRange=function(t,e,n){return e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n){return t>=yn(e,n)&&t<_n(e,n)}(t=ga(t),e,n)},Yn.invoke=Ra,Yn.isArguments=qu,Yn.isArray=Uu,Yn.isArrayBuffer=Wu,Yn.isArrayLike=Fu,Yn.isArrayLikeObject=$u,Yn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Or(t)==y},Yn.isBuffer=Vu,Yn.isDate=zu,Yn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Fu(t)&&(Uu(t)||"string"==typeof t||"function"==typeof t.splice||Vu(t)||sa(t)||qu(t)))return!t.length;var e=pi(t);if(e==T||e==I)return!t.size;if(ki(t))return!Dr(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return xr(t,e)},Yn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?xr(t,e,o,n):!!r},Yn.isError=Hu,Yn.isFinite=function(t){return"number"==typeof t&&Ge(t)},Yn.isFunction=Ku,Yn.isInteger=Zu,Yn.isLength=Ju,Yn.isMap=ea,Yn.isMatch=function(t,e){return t===e||Sr(t,e,si(e))},Yn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Sr(t,e,si(e),n)},Yn.isNaN=function(t){return na(t)&&t!=+t},Yn.isNative=function(t){if(bi(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=na,Yn.isObject=Xu,Yn.isObjectLike=ta,Yn.isPlainObject=ra,Yn.isRegExp=oa,Yn.isSafeInteger=function(t){return Zu(t)&&t>=-9007199254740991&&t<=l},Yn.isSet=ia,Yn.isString=ua,Yn.isSymbol=aa,Yn.isTypedArray=sa,Yn.isUndefined=function(t){return t===o},Yn.isWeakMap=function(t){return ta(t)&&pi(t)==x},Yn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Or(t)},Yn.join=function(t,e){return null==t?"":We.call(t,e)},Yn.kebabCase=Ua,Yn.last=Hi,Yn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=da(n))<0?_n(r+i,0):yn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ye(t,Be,i,!0)},Yn.lowerCase=Wa,Yn.lowerFirst=Fa,Yn.lt=ca,Yn.lte=fa,Yn.max=function(t){return t&&t.length?dr(t,ns,Ar):o},Yn.maxBy=function(t,e){return t&&t.length?dr(t,ui(e,2),Ar):o},Yn.mean=function(t){return qe(t,ns)},Yn.meanBy=function(t,e){return qe(t,ui(e,2))},Yn.min=function(t){return t&&t.length?dr(t,ns,Lr):o},Yn.minBy=function(t,e){return t&&t.length?dr(t,ui(e,2),Lr):o},Yn.stubArray=hs,Yn.stubFalse=gs,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=ks,Yn.nth=function(t,e){return t&&t.length?Pr(t,da(e)):o},Yn.noConflict=function(){return le._===this&&(le._=Yt),this},Yn.noop=as,Yn.now=Cu,Yn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return qo(de(o),n)+t+qo(pe(o),n)},Yn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;return e&&r<e?t+qo(e-r,n):t},Yn.padStart=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;return e&&r<e?qo(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),mn(ya(t).replace(rt,""),e||0)},Yn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&yi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=pa(t),e===o?(e=t,t=0):e=pa(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=bn();return yn(t+i*(e-t+ae("1e-"+((i+"").length-1))),e)}return Fr(t,e)},Yn.reduce=function(t,e,n){var r=Uu(t)?Me:Fe,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Yn.reduceRight=function(t,e,n){var r=Uu(t)?De:Fe,o=arguments.length<3;return r(t,ui(e,4),n,o,lr)},Yn.repeat=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:da(e),$r(ya(t),e)},Yn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,n){var r=-1,i=(e=yo(e,t)).length;for(i||(i=1,t=o);++r<i;){var u=null==t?o:t[Gi(e[r])];u===o&&(r=i,u=n),t=Ku(u)?u.call(t):u}return t},Yn.round=Ts,Yn.runInContext=t,Yn.sample=function(t){return(Uu(t)?Hn:zr)(t)},Yn.size=function(t){if(null==t)return 0;if(Fu(t))return ua(t)?fn(t):t.length;var e=pi(t);return e==T||e==I?t.size:Dr(t).length},Yn.snakeCase=$a,Yn.some=function(t,e,n){var r=Uu(t)?Le:eo;return n&&yi(t,e,n)&&(e=o),r(t,ui(e,3))},Yn.sortedIndex=function(t,e){return no(t,e)},Yn.sortedIndexBy=function(t,e,n){return ro(t,e,ui(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Qu(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return no(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return ro(t,e,ui(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Qu(t[n],e))return n}return-1},Yn.startCase=Va,Yn.startsWith=function(t,e,n){return t=ya(t),n=null==n?0:ir(da(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Yn.subtract=Os,Yn.sum=function(t){return t&&t.length?$e(t,ns):0},Yn.sumBy=function(t,e){return t&&t.length?$e(t,ui(e,2)):0},Yn.template=function(t,e,n){var r=Yn.templateSettings;n&&yi(t,e,n)&&(e=o),t=ya(t),e=ka({},e,r,Ko);var i=ka({},e.imports,r.imports,Ko),u=xa(i),a=Ke(i,u);Ce(u,function(t){if(ct.test(t))throw new kt("Invalid `imports` option passed into `_.template`")});var s,c,f=0,l=e.interpolate||mt,p="__p += '",d=Ct((e.escape||mt).source+"|"+l.source+"|"+(l===Z?lt:mt).source+"|"+(e.evaluate||mt).source+"|$","g"),h="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,function(e,n,r,o,i,u){return r||(r=o),p+=t.slice(f,u).replace(bt,nn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),i&&(c=!0,p+="';\n"+i+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e}),p+="';\n";var g=Mt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new kt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(c?p.replace(q,""):p).replace(U,"$1").replace(W,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var _=Za(function(){return Tt(u,h+"return "+p).apply(o,a)});if(_.source=p,Hu(_))throw _;return _},Yn.times=function(t,e){if((t=da(t))<1||t>l)return[];var n=d,r=yn(t,d);e=ui(e),t-=d;for(var o=Ve(r,e);++n<t;)e(n);return o},Yn.toFinite=pa,Yn.toInteger=da,Yn.toLength=ha,Yn.toLower=function(t){return ya(t).toLowerCase()},Yn.toNumber=ga,Yn.toSafeInteger=function(t){return t?ir(da(t),-9007199254740991,l):0===t?t:0},Yn.toString=ya,Yn.toUpper=function(t){return ya(t).toUpperCase()},Yn.trim=function(t,e,n){if((t=ya(t))&&(n||e===o))return ze(t);if(!t||!(e=uo(e)))return t;var r=ln(t),i=ln(e);return mo(r,Je(r,i),Xe(r,i)+1).join("")},Yn.trimEnd=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.slice(0,pn(t)+1);if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,0,Xe(r,ln(e))+1).join("")},Yn.trimStart=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,Je(r,ln(e))).join("")},Yn.truncate=function(t,e){var n=30,r="...";if(Xu(e)){var i="separator"in e?e.separator:i;n="length"in e?da(e.length):n,r="omission"in e?uo(e.omission):r}var u=(t=ya(t)).length;if(rn(t)){var a=ln(t);u=a.length}if(n>=u)return t;var s=n-fn(r);if(s<1)return r;var c=a?mo(a,0,s).join(""):t.slice(0,s);if(i===o)return c+r;if(a&&(s+=c.length-s),oa(i)){if(t.slice(s).search(i)){var f,l=c;for(i.global||(i=Ct(i.source,ya(pt.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var p=f.index;c=c.slice(0,p===o?s:p)}}else if(t.indexOf(uo(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Yn.unescape=function(t){return(t=ya(t))&&V.test(t)?t.replace(F,dn):t},Yn.uniqueId=function(t){var e=++Dt;return ya(t)+e},Yn.upperCase=za,Yn.upperFirst=Ha,Yn.each=yu,Yn.eachRight=vu,Yn.first=Fi,us(Yn,(_s={},vr(Yn,function(t,e){Mt.call(Yn.prototype,e)||(_s[e]=t)}),_s),{chain:!1}),Yn.VERSION="4.18.1",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Yn[t].placeholder=Yn}),Ce(["drop","take"],function(t,e){qn.prototype[t]=function(n){n=n===o?1:_n(da(n),0);var r=this.__filtered__&&!e?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ce(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ui(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ce(["head","last"],function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}}),Ce(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}}),qn.prototype.compact=function(){return this.filter(ns)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Vr(function(t,e){return"function"==typeof t?new qn(this):this.map(function(n){return Er(n,t,e)})}),qn.prototype.reject=function(t){return this.filter(Du(ui(t)))},qn.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new qn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(d)},vr(qn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Yn[r?"take"+("last"==e?"Right":""):e],u=r||/^find/.test(e);i&&(Yn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof qn,c=a[0],f=s||Uu(e),l=function(t){var e=i.apply(Yn,Ne([t],a));return r&&p?e[0]:e};f&&n&&"function"==typeof c&&1!=c.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,h=u&&!p,g=s&&!d;if(!u&&f){e=g?e:new qn(this);var _=t.apply(e,a);return _.__actions__.push({func:pu,args:[l],thisArg:o}),new Bn(_,p)}return h&&g?t.apply(this,a):(_=this.thru(l),h?r?_.value()[0]:_.value():_)})}),Ce(["pop","push","shift","sort","splice","unshift"],function(t){var e=Et[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Uu(o)?o:[],t)}return this[n](function(n){return e.apply(Uu(n)?n:[],t)})}}),vr(qn.prototype,function(t,e){var n=Yn[e];if(n){var r=n.name+"";Mt.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}}),Rn[Yo(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Uu(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=yn(e,t+u);break;case"takeRight":t=_n(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,s=a-u,c=r?a:u-1,f=this.__iteratees__,l=f.length,p=0,d=yn(s,this.__takeCount__);if(!n||!r&&o==s&&d==s)return lo(t,this.__actions__);var h=[];t:for(;s--&&p<d;){for(var g=-1,_=t[c+=e];++g<l;){var y=f[g],v=y.iteratee,m=y.type,b=v(_);if(2==m)_=b;else if(!b){if(1==m)continue t;break t}}h[p++]=_}return h},Yn.prototype.at=du,Yn.prototype.chain=function(){return lu(this)},Yn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===o&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,n=this;n instanceof Pn;){var r=Yi(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var e=t;return this.__actions__.length&&(e=new qn(this)),(e=e.reverse()).__actions__.push({func:pu,args:[Xi],thisArg:o}),new Bn(e,this.__chain__)}return this.thru(Xi)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return lo(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Ht&&(Yn.prototype[Ht]=function(){return this}),Yn}();le._=hn,(r=function(){return hn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.r(r),n.d(r,{ApiCallContext:()=>Qt,CronExpression:()=>Pt,DistributedLockContext:()=>Bt,GraphqlContext:()=>qt,MUTATION_TYPES:()=>Ut,Meta:()=>h,MutationContext:()=>Wt,QueryContext:()=>kt,SecureAiAgentContext:()=>Yt,SquidLlmService:()=>Gt,SquidProject:()=>jt,SquidService:()=>Rt,USER_CODE_MODULE_ID:()=>F,USER_CODE_PYTHON_MODULE_ID:()=>$,aiFunction:()=>I,aiFunctionsConfigurator:()=>E,clientConnectionStateHandler:()=>B,createWebhookResponse:()=>Ft,executable:()=>w,getPassiveSquid:()=>Lt,getSquid:()=>Dt,getSquidService:()=>St,limiterConfigToOptions:()=>U,limits:()=>L,llmAsk:()=>j,llmService:()=>G,mcpAuthorizer:()=>P,mcpServer:()=>Y,mcpTool:()=>Q,metadata:()=>_,onQueueMessage:()=>C,scheduler:()=>x,secureAiAgent:()=>D,secureAiQuery:()=>v,secureApi:()=>O,secureCollection:()=>m,secureDatabase:()=>y,secureDistributedLock:()=>M,secureGraphQL:()=>A,secureMetric:()=>T,secureNativeQuery:()=>N,secureStorage:()=>b,secureTopic:()=>k,squidInject:()=>Nt,trigger:()=>R,webhook:()=>S});const t=require("@squidcloud/client");let e=t=>new Error(t);function o(t,n,...r){t||function(t,...n){const r=u(t);if("object"==typeof r)throw r;throw e(r||"Assertion error",...n)}(n,...r)}function i(t,e,...n){return o(t,e,...n),t}function u(t){return void 0===t?"":"string"==typeof t?t:t()}const a=(t,e=void 0)=>{o(function(t){return"string"==typeof t}(t),()=>function(t,e,n){const r=u(t);if("object"==typeof r)throw r;return`${r?`${r}: `:""}${e} ${function(t){return void 0===t?"<undefined>":"symbol"==typeof t?t.toString():null===t?"<null>":`<${typeof t}:${t}>`}(n)}`}(e,"Not a string",t))};function s(t){const e=t.split(":");return o(2===e.length,`Invalid service function name: ${t}`),e[1]}var c=n(243);const f=["gpt-5.4-mini","gpt-5.4-nano","gpt-5.5","gpt-5.5-pro","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o1","o3","o3-mini","o4-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.2","gpt-5.2-pro","gpt-5.4","claude-haiku-4-5-20251001","claude-opus-4-8","claude-sonnet-4-6","claude-3-7-sonnet-latest","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","gemini-3.1-pro","gemini-3.5-flash","gemini-3.1-flash-lite","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-3-flash","gemini-3-pro","grok-4","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-3","grok-3-fast","grok-3-mini","grok-3-mini-fast","grok-4-fast-reasoning","grok-4-fast-non-reasoning","bedrock-claude-sonnet-4-5"];function l(t){return f.includes(t)}const p={"gpt-4o":{name:"gpt-4o",displayName:"GPT-4o",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-4o-mini":{name:"gpt-4o-mini",displayName:"GPT-4o Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-4.1":{name:"gpt-4.1",displayName:"GPT-4.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-4.1-mini":{name:"gpt-4.1-mini",displayName:"GPT-4.1 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-4.1-nano":{name:"gpt-4.1-nano",displayName:"GPT-4.1 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-nano"},o1:{name:"o1",displayName:"GPT-o1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},o3:{name:"o3",displayName:"GPT-o3",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"o3-mini":{name:"o3-mini",displayName:"GPT-o3 Mini",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"o4-mini":{name:"o4-mini",displayName:"GPT-o4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-5":{name:"gpt-5",displayName:"GPT-5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-5-mini":{name:"gpt-5-mini",displayName:"GPT-5 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.4-mini"},"gpt-5-nano":{name:"gpt-5-nano",displayName:"GPT-5 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.4-nano"},"gpt-5.1":{name:"gpt-5.1",displayName:"GPT-5.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.2":{name:"gpt-5.2",displayName:"GPT-5.2",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.2-pro":{name:"gpt-5.2-pro",displayName:"GPT-5.2 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5-pro"},"gpt-5.4":{name:"gpt-5.4",displayName:"GPT-5.4",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.4-mini":{name:"gpt-5.4-mini",displayName:"GPT-5.4 Mini",description:"Fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.4-nano":{name:"gpt-5.4-nano",displayName:"GPT-5.4 Nano",description:"Lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.5":{name:"gpt-5.5",displayName:"GPT-5.5",description:"Powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.5-pro":{name:"gpt-5.5-pro",displayName:"GPT-5.5 Pro",description:"Most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"claude-sonnet-4-6":{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6",description:"Balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!0},"claude-sonnet-4-5-20250929":{name:"claude-sonnet-4-5-20250929",displayName:"Claude Sonnet 4.5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-sonnet-4-6"},"claude-3-7-sonnet-latest":{name:"claude-3-7-sonnet-latest",displayName:"Claude Sonnet 3.7",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-4-6",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-haiku-4-5-20251001":{name:"claude-haiku-4-5-20251001",displayName:"Claude Haiku 4.5",description:"Fastest responses",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-opus-4-20250514":{name:"claude-opus-4-20250514",displayName:"Claude Opus 4",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-4-8",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-opus-4-1-20250805":{name:"claude-opus-4-1-20250805",displayName:"Claude Opus 4.1",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-4-8",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"claude-opus-4-5-20251101":{name:"claude-opus-4-5-20251101",displayName:"Claude Opus 4.5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-6":{name:"claude-opus-4-6",displayName:"Claude Opus 4.6",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-7":{name:"claude-opus-4-7",displayName:"Claude Opus 4.7",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,usesAdaptiveThinking:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-8":{name:"claude-opus-4-8",displayName:"Claude Opus 4.8",description:"Most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,usesAdaptiveThinking:!0},"claude-sonnet-4-20250514":{name:"claude-sonnet-4-20250514",displayName:"Claude Sonnet 4",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-4-6",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"bedrock-claude-sonnet-4-5":{name:"bedrock-claude-sonnet-4-5",vendorModelName:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",displayName:"Claude Sonnet 4.5 (Bedrock)",description:"Claude Sonnet hosted on AWS Bedrock",providerType:"bedrock",requiresExplicitAvailability:!0,maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-2.5-flash":{name:"gemini-2.5-flash",displayName:"Gemini Flash 2.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.5-flash"},"gemini-2.5-pro":{name:"gemini-2.5-pro",displayName:"Gemini Pro 2.5",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.1-pro"},"gemini-2.5-flash-lite":{name:"gemini-2.5-flash-lite",displayName:"Gemini Flash 2.5 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.1-flash-lite"},"gemini-3-flash":{name:"gemini-3-flash",vendorModelName:"gemini-3-flash-preview",displayName:"Gemini Flash 3",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gemini-3.5-flash"},"gemini-3.1-flash-lite":{name:"gemini-3.1-flash-lite",displayName:"Gemini Flash 3.1 Lite",description:"Lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-3.5-flash":{name:"gemini-3.5-flash",displayName:"Gemini Flash 3.5",description:"Fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-3-pro":{name:"gemini-3-pro",vendorModelName:"gemini-3-pro-preview",displayName:"Gemini Pro 3",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gemini-3.1-pro"},"gemini-3.1-pro":{name:"gemini-3.1-pro",vendorModelName:"gemini-3.1-pro-preview",displayName:"Gemini Pro 3.1",description:"Most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"grok-3":{name:"grok-3",displayName:"Grok-3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-fast":{name:"grok-3-fast",displayName:"Grok-3 Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-mini":{name:"grok-3-mini",displayName:"Grok-3 Mini",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-mini-fast":{name:"grok-3-mini-fast",displayName:"Grok-3 Mini Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4":{name:"grok-4",displayName:"Grok-4",description:"Most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-fast-reasoning":{name:"grok-4-fast-reasoning",displayName:"Grok-4 Fast Reasoning",description:"Legacy optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-reasoning",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-fast-non-reasoning":{name:"grok-4-fast-non-reasoning",displayName:"Grok-4 Fast Non-Reasoning",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-1-fast-reasoning":{name:"grok-4-1-fast-reasoning",displayName:"Grok-4.1 Fast Reasoning",description:"Optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-1-fast-non-reasoning":{name:"grok-4-1-fast-non-reasoning",displayName:"Grok-4.1 Fast Non-Reasoning",description:"Fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1}};for(const t of Object.values(p))o(!t.replacedBy||!p[t.replacedBy]?.replacedBy,`Model ${t.name} is replaced by ${t.replacedBy}, which is also marked as replaced (is not active).`),o(!t.replacedBy||t.description.startsWith("Legacy"),`Model ${t.name} is deprecated and its description must start with 'Legacy': '${t.description}'.`);const d=(t,e)=>Array.isArray(t)?t.concat(e):void 0;class h{constructor(){this.data={codeChecksum:"initial",databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},queueMessageHandlers:{},metrics:{security:{write:[],all:[]}},limits:{},llms:{},mcp:{},integrationLifecycleHooks:{onIntegrationCreated:!1,onIntegrationDeleted:!1,onIntegrationChanged:!1}}}secureDatabase(e,n,r=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[r]:{security:{[e]:[n]}}}})}secureAiQuery(e,n=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[n]:{security:{aiQuery:[e]}}}})}secureCollection(e,n,r,o=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[o]:{collections:{[e]:{security:{[n]:[r]}}}}}})}secureStorage(e,n,r=t.BUILT_IN_STORAGE_INTEGRATION_ID){g(this.data,{storage:{[r]:{security:{[e]:[n]}}}})}secureTopic(e,n,r,o=t.BUILT_IN_QUEUE_INTEGRATION_ID){g(this.data,{queues:{[o]:{topics:{[e]:{security:{[n]:[r]}}}}}})}queueMessage(e,n,r=t.BUILT_IN_QUEUE_INTEGRATION_ID){g(this.data,{queueMessageHandlers:{[r]:{[e]:[n]}}})}secureMetric(t,e,n){g(this.data,{metrics:{security:{[e]:[{namePrefix:t,serviceFunction:n}]}}})}secureApi(t,e,n){g(this.data,e?{apis:{[t]:{endpoints:{[e]:{security:[n]}}}}}:{apis:{[t]:{security:[n]}}})}secureGraphQL(t,e){g(this.data,{graphql:{[t]:{security:[e]}}})}transformDatabase(e,n,r=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[r]:{transform:{[e]:{type:e,serviceFunction:n}}}}})}transformCollection(e,n,r,o=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[o]:{collections:{[e]:{transform:{[n]:{type:n,serviceFunction:r}}}}}}})}executable(t){const e=t.split(":")[1],n={serviceFunction:t},r=this.data.executables[e];r&&r.serviceFunction!==t&&console.warn(`Executable name collision: "${e}" is registered by both "${r.serviceFunction}" and "${t}". Use qualified names to avoid ambiguity.`),g(this.data,{executables:{[e]:n,[t]:n}})}aiFunction(t,{id:e,description:n,promptId:r,params:o,attributes:i,categories:u,internal:a}){const s={aiFunctions:{[e]:{serviceFunction:t,description:n,promptId:r,params:o,attributes:i,categories:u,internal:a}}};g(this.data,s)}aiFunctionsConfigurator(t,{id:e,integrationTypes:n}){const r={aiFunctionsConfigurators:{[e]:{serviceFunction:t,integrationTypes:n}}};g(this.data,r)}trigger(t,e,n,r,i){o(!this.data.triggers[t],`Duplicate Trigger IDs: ${t}`),this.data.triggers[t]={integrationId:r,collectionName:e,functionName:n,mutationTypes:i}}scheduler(t,e,n,r){o(!this.data.schedulers[t],`Duplicate Scheduler IDs: ${t}`),this.data.schedulers[t]={cronExpression:e,functionName:n,exclusive:r}}webhook(t,e){o(!this.data.webhooks[t],`Duplicate Webhook IDs: ${t}`),this.data.webhooks[t]={functionName:e}}secureNativeQuery(t,e){g(this.data,{nativeQueries:{[t]:[e]}})}secureDistributedLock(t,e){g(this.data,t?{distributedLocks:{mutexes:{[t]:{security:[e]}}}}:{distributedLocks:{security:[e]}})}secureAiAgent(e,n){g(this.data,e?{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{profiles:{[e]:{security:{chat:[n]}}}}}}:{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[n]}}}})}limits(t,e){g(this.data,{limits:{[t]:e}})}clientConnectionChangeHandler(t){g(this.data,{clientConnectionStateChangeHandlers:[t]})}llmService(t,e){const n=e.models;o(void 0===this.data.llms?.[t]?.models,`LLM service '${t}' is already registered.`);const r=Object.keys(n);o(r.length>0,`LLM service '${t}' must declare at least one model.`);for(const e of r)o(!l(e),`LLM service '${t}' cannot declare an already-defined model: '${e}'.`);const i=Object.values(this.data.llms??{}).flatMap(t=>Object.keys(t.models??{}));for(const t of r)o(!i.includes(t),`Model '${t}' is already defined by another LLM service.`);g(this.data,{llms:{[t]:{models:n,...void 0!==e.supportsFunctions&&{supportsFunctions:e.supportsFunctions}}}})}llmAsk(t){const e=t.split(":")[0];o(void 0===this.data.llms?.[e]?.ask,`LLM service '${e}' already has an 'ask' function defined.`),g(this.data,{llms:{[e]:{ask:t}}})}mcpServer(t,e){const n=e.id;o(void 0===Object.values(this.data.mcp||{}).find(t=>t.options?.id===n),`MCP server with id ${n} already exists (${t}).`),g(this.data,{mcp:{[t]:{options:e,tools:[]}}})}mcpAuthorizer(t){const[e,n]=t.split(":");o(!this.data.mcp?.[e]?.authorizer,`MCP server '${e}' already has authorizer: ${n}.`),g(this.data,{mcp:{[e]:{authorizer:t}}})}mcpTool(t,e){const[n,r]=t.split(":");o(void 0===this.data.mcp?.[n]?.tools?.find(e=>e.serviceFunctionName===t),`MCP server '${n}' already has tool ${r}.`),g(this.data,{mcp:{[n]:{tools:[{serviceFunctionName:t,description:e.description,inputSchema:e.inputSchema,outputSchema:e.outputSchema}]}}})}setIntegrationLifecycleHooks(t){this.data.integrationLifecycleHooks={onIntegrationCreated:t.onIntegrationCreated,onIntegrationChanged:t.onIntegrationChanged,onIntegrationDeleted:t.onIntegrationDeleted}}}function g(t,e){(0,c.mergeWith)(t,e,d)}const _=new h;function y(t,e){return function(n,r,o){return _.secureDatabase(t,q(n,r),e),o}}function v(t){return function(e,n,r){return _.secureAiQuery(q(e,n),t),r}}function m(t,e,n){return function(r,o,i){return _.secureCollection(t,e,q(r,o),n),i}}function b(t,e){return function(n,r,o){return _.secureStorage(t,q(n,r),e),o}}function k(t,e,n){return function(r,o,i){return _.secureTopic(t,e,q(r,o),n),i}}function T(t){return function(e,n,r){return _.secureMetric(t.metricNamePrefix||"",t.type,q(e,n)),r}}function O(t,e){return function(n,r,o){return _.secureApi(t,e,q(n,r)),o}}function A(t){return function(e,n,r){return _.secureGraphQL(t,q(e,n)),r}}function C(t,e){return function(n,r,o){return _.queueMessage(t,q(n,r),e),o}}function w(){return function(t,e,n){return _.executable(q(t,e)),n}}function I(t,e=[],n={},r=[],o=!1){return function(u,a,c){const f=q(u,a),l=s(f);let p;return"object"==typeof t?(i(t.description??t.promptId,`AI function definition requires either "description" or "promptId" to be defined: ${a}`),p={id:t.id||l,description:t.description,promptId:t.promptId,params:i(t.params,`AI function definition requires "params" to be defined: ${a}`),attributes:t.attributes||{},categories:t.categories||[],internal:t.internal||!1}):p={id:l,description:t,promptId:void 0,params:e,attributes:n,categories:r,internal:o},_.aiFunction(f,p),c}}function E(t){return function(e,n,r){const o=q(e,n),i={id:t.id||s(o),integrationTypes:t.integrationTypes};return _.aiFunctionsConfigurator(o,i),r}}function R(e,n="",r){const i="object"==typeof e?{...e}:{id:e,collection:n,integrationId:r};return o(i.collection,"Collection name can't be empty"),function(e,n,r){return i.id||(i.id=q(e,n)),_.trigger(i.id,i.collection,q(e,n),i.integrationId||t.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function x(t,e,n=!0){return function(r,o,u){const a=q(r,o);let s;return s="object"==typeof t?{cron:t.cron,id:t.id||a,exclusive:t.exclusive??!0}:{id:t,cron:i(e,"cronExpression must be defined"),exclusive:n},_.scheduler(s.id,s.cron,a,s.exclusive),u}}function S(t){return function(e,n,r){return _.webhook(t,q(e,n)),r}}function N(t){return function(e,n,r){return _.secureNativeQuery(t,q(e,n)),r}}function M(t){return function(e,n,r){return _.secureDistributedLock(t,q(e,n)),r}}function D(t){return function(e,n,r){return _.secureAiAgent(t,q(e,n)),r}}function L(t){return function(e,n,r){return _.limits(q(e,n),U(t)),r}}function G(t){return e=>{_.llmService(e.name,t)}}function j(){return function(t,e,n){return _.llmAsk(q(t,e)),n}}function Y(t){return e=>{_.mcpServer(e.name,t)}}function Q(t){return function(e,n,r){return _.mcpTool(q(e,n),t),r}}function P(){return function(t,e,n){return _.mcpAuthorizer(q(t,e)),n}}function B(){return function(t,e,n){return _.clientConnectionChangeHandler(q(t,e)),n}}function q(t,e){return`${t.constructor.name}:${e}`}function U(t){return void 0!==t.rateLimit&&("number"==typeof t.rateLimit?t.rateLimit=[{value:t.rateLimit,scope:"global"}]:"object"!=typeof t.rateLimit||Array.isArray(t.rateLimit)||(t.rateLimit=[t.rateLimit]),t.rateLimit.forEach(t=>{void 0===t.scope&&(t.scope="global")})),void 0!==t.quotaLimit&&("number"==typeof t.quotaLimit?t.quotaLimit=[{value:t.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof t.quotaLimit||Array.isArray(t.quotaLimit)||(t.quotaLimit=[t.quotaLimit]),t.quotaLimit.forEach(t=>{void 0===t.scope&&(t.scope="global"),void 0===t.renewPeriod&&(t.renewPeriod="monthly")})),t}const W=require("path"),F="user-code",$="user-code-python";function V(t){a(t,"Invalid application ID");const[e,n,r,i]=t.split("-");return o(!i,`Invalid application ID: ${t}`),{appId:e,environmentId:n??"prod",squidDeveloperId:r}}const z=["api","application","auth","mutation","native-query","query","queue","notification"];const H=require("node:async_hooks"),K=(require("node:stream"),"__docId__"),Z=/[.\[\]]/;function J(t,e){if(!t)return;const n=e.split(Z);let r,o=t;for(;o&&n.length;){const t=n.shift();if(t){if("object"!=typeof o||!(t in o))return;r=o[t],o=r}}return r}function X(t){return null==t}function tt(t,e){if(t===e)return!0;if(null===t||null===e)return!1;const n=typeof t;if(n!==typeof e)return!1;if("object"!==n)return t===e;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(const n of r)if(!o.includes(n)||!tt(t[n],e[n]))return!1;return!0}function et(t,e){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=nt(t[r],e);return n}function nt(t,e){const n=e?e(t):void 0;if(void 0!==n)return n;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return et(t,e);if(t instanceof Map)return new Map(et(Array.from(t),e));if(t instanceof Set)return new Set(et(Array.from(t),e));if(ArrayBuffer.isView(t))return r=t,"undefined"!=typeof Buffer&&r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length);var r;const o={};for(const n in t)Object.hasOwnProperty.call(t,n)&&(o[n]=nt(t[n],e));return o}function rt(t){if(Array.isArray(t))return t.map(t=>rt(t));if("object"!=typeof t||null===t||t instanceof Date)return t;const e=Object.keys(t),n={};return e.sort().forEach(e=>{n[e]=rt(t[e])}),n}function ot(t){return function(t){if(void 0===t)return null;const e=nt(t,t=>function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?{$date:t.toISOString()}:void 0);return JSON.stringify(e)}(rt(t))}function it(t){return nt(JSON.parse(t),t=>{if(null===t||"object"!=typeof t)return;const e=t,n=e.$date;return n&&1===Object.keys(e).length?new Date(n):void 0})}function ut(t,e,n){if(t=t instanceof Date?t.getTime():t??null,e=e instanceof Date?e.getTime():e??null,"=="===n)return tt(t,e);if("!="===n)return!tt(t,e);switch(n){case"<":return!X(t)&&(!!X(e)||e<t);case"<=":return!!X(e)||!X(t)&&e<=t;case">":return!X(e)&&(!!X(t)||e>t);case">=":return!!X(t)||!X(e)&&e>=t;case"like":return"string"==typeof e&&"string"==typeof t&&at(e,t,!1);case"not like":return!("string"==typeof e&&"string"==typeof t&&at(e,t,!1));case"like_cs":return"string"==typeof e&&"string"==typeof t&&at(e,t,!0);case"not like_cs":return!("string"==typeof e&&"string"==typeof t&&at(e,t,!0));case"array_includes_some":{const n=e;return Array.isArray(e)&&Array.isArray(t)&&t.some(t=>i(n,"VALUE_CANNOT_BE_NULL").some(e=>tt(e,t)))}case"array_includes_all":{const n=e;return Array.isArray(t)&&Array.isArray(e)&&t.every(t=>i(n,"VALUE_CANNOT_BE_NULL").some(e=>tt(e,t)))}case"array_not_includes":{const n=e;return Array.isArray(e)&&Array.isArray(t)&&t.every(t=>!i(n,"VALUE_CANNOT_BE_NULL").some(e=>tt(e,t)))}default:throw new Error(`Unsupported operator comparison: ${n}`)}}function at(t,e,n){n||(t=t.toLowerCase(),e=e.toLowerCase());const r=function(t){let e="";for(let n=0;n<t.length;++n)"\\"===t[n]?n+1<t.length&&["%","_"].includes(t[n+1])?(e+=t[n+1],n++):n+1<t.length&&"\\"===t[n+1]?(e+="\\\\",n++):e+="\\":"%"===t[n]?e+="[\\s\\S]*":"_"===t[n]?e+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(t[n])&&(e+="\\"),e+=t[n]);return e}(e);return new RegExp(`^${r}$`).test(t)}function st(t){return"fieldName"in t}function ct(t){return"docIds"in t}function ft(t,e,n){const r=t.docIds.some(t=>Object.entries(t).every(([t,r])=>ut(r,n(e,t)??null,"==")));switch(t.operator){case"==":case"in":return r;case"!=":case"not in":return!r}}function lt(t,e,n,r){const o=t,i=r(e,K);if("string"!=typeof i)return ut(o,i??null,n);let u;try{u=it(i)}catch{return ut(o,i,n)}if(!u||"object"!=typeof u||Array.isArray(u))return ut(o,i,n);const a=Object.keys(u);if(1===a.length&&"__id"===a[0]){const t=u.__id,e=function(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){const e=Object.keys(t);return 1===e.length&&"__id"===e[0]?t.__id:ot(t)}if("string"==typeof t)try{const e=it(t);if(e&&"object"==typeof e&&!Array.isArray(e)){const t=Object.keys(e);if(1===t.length&&"__id"===t[0])return e.__id}}catch{}return t}(o);return ut(e,t,n)}if(1===a.length){const t=function(t,e){if("object"==typeof t&&null!==t&&!Array.isArray(t)){const n=Object.keys(t);if(1===n.length&&n[0]===e)return t[e]}if("string"==typeof t)try{const n=it(t);if(n&&"object"==typeof n&&!Array.isArray(n)){const t=Object.keys(n);if(1===t.length&&t[0]===e)return n[e]}}catch{}return t}(o,a[0]);return ut(t,u[a[0]],n)}return"object"!=typeof o||null===o||Array.isArray(o)?ut(o,i,n):ut(ot(o),i,n)}const pt={"in:in":(t,e)=>t.every(t=>e.includes(t)),"in:not in":(t,e)=>t.every(t=>!e.includes(t)),"not in:not in":(t,e)=>e.every(e=>t.includes(e)),">:not in":(t,e)=>e.every(e=>t>=e),">=:not in":(t,e)=>e.every(e=>t>e),"<:not in":(t,e)=>e.every(e=>t<=e),"<=:not in":(t,e)=>e.every(e=>t<e),">:>":(t,e)=>t>=e,">=:>":(t,e)=>t>e,"in:>":(t,e)=>t.every(t=>t>e),">:>=":(t,e)=>t>=e,">=:>=":(t,e)=>t>=e,"in:>=":(t,e)=>t.every(t=>t>=e),"<:<":(t,e)=>t<=e,"<=:<":(t,e)=>t<e,"in:<":(t,e)=>t.every(t=>t<e),"<:<=":(t,e)=>t<=e,"<=:<=":(t,e)=>t<=e,"in:<=":(t,e)=>t.every(t=>t<=e),"like:like":(t,e)=>dt(t.toLowerCase(),e.toLowerCase()),"like_cs:like":(t,e)=>dt(t.toLowerCase(),e.toLowerCase()),"like:like_cs":(t,e)=>dt(t,e)&>(e),"like_cs:like_cs":(t,e)=>dt(t,e),"like:not like":(t,e)=>!ht(t.toLowerCase(),e.toLowerCase()),"like_cs:not like":(t,e)=>!ht(t.toLowerCase(),e.toLowerCase()),"like:not like_cs":(t,e)=>!ht(t.toLowerCase(),e.toLowerCase()),"like_cs:not like_cs":(t,e)=>!ht(t,e),"not like:like":(t,e)=>yt(t,e),"not like_cs:like":(t,e)=>yt(t,e),"not like:like_cs":(t,e)=>yt(t,e),"not like_cs:like_cs":(t,e)=>yt(t,e),"not like:not like":(t,e)=>dt(e.toLowerCase(),t.toLowerCase()),"not like_cs:not like":(t,e)=>dt(e,t)&>(t),"not like:not like_cs":(t,e)=>dt(e.toLowerCase(),t.toLowerCase()),"not like_cs:not like_cs":(t,e)=>dt(e,t),"in:like":(t,e)=>t.every(t=>ut(e,t,"like")),"in:like_cs":(t,e)=>t.every(t=>ut(e,t,"like_cs")),"in:not like":(t,e)=>t.every(t=>ut(e,t,"not like")),"in:not like_cs":(t,e)=>t.every(t=>ut(e,t,"not like_cs")),"like:in":(t,e)=>!t.includes("%")&&!t.includes("_")&&!!e.find(e=>e.toLowerCase()===t.toLowerCase()),"like_cs:in":(t,e)=>!t.includes("%")&&!t.includes("_")&&e.includes(t),"not like:in":(t,e)=>t.length>0&&_t(t)||vt(t)&&e.includes(""),"not like_cs:in":(t,e)=>t.length>0&&_t(t)||vt(t)&&e.includes(""),"not in:like":(t,e)=>e.length>0&&_t(e)||vt(e)&&t.includes(""),"not in:like_cs":(t,e)=>e.length>0&&_t(e)||vt(e)&&t.includes(""),"not in:not like":(t,e)=>!e.includes("%")&&!e.includes("_")&&!!t.find(t=>t.toLowerCase()===e.toLowerCase()),"not in:not like_cs":(t,e)=>!e.includes("%")&&!e.includes("_")&&t.includes(e),"like:not in":(t,e)=>e.every(e=>ut(t,e,"not like")),"like_cs:not in":(t,e)=>e.every(e=>ut(t,e,"not like_cs")),"not like:not in":(t,e)=>e.every(e=>ut(t,e,"like")),"not like_cs:not in":(t,e)=>e.every(e=>ut(t,e,"like_cs")),"array_includes_some:array_includes_some":(t,e)=>t.every(t=>e.includes(t)),"array_includes_all:array_includes_all":(t,e)=>t.every(t=>e.includes(t)),"array_not_includes:array_not_includes":(t,e)=>e.every(e=>t.includes(e)),"array_includes_some:array_not_includes":(t,e)=>t.every(t=>!e.includes(t)),"array_not_includes:array_includes_some":(t,e)=>e.every(e=>!t.includes(e)),"array_includes_all:array_includes_some":(t,e)=>t.every(t=>e.includes(t)),"array_includes_some:array_includes_all":(t,e)=>t.every(t=>e.includes(t)),"array_not_includes:array_includes_all":(t,e)=>e.every(e=>!t.includes(e)),"array_includes_all:array_not_includes":(t,e)=>t.every(t=>!e.includes(t))};function dt(t,e,n=0,r=0){if(r>=e.length)return n>=t.length;if(n>=t.length)return _t(e.substring(r));const o=t[n],i=e[r];return"%"===o&&"%"===i?dt(t,e,n+1,r+1)||dt(t,e,n+1,r):"%"!==o&&("%"===i?dt(t,e,n,r+1)||dt(t,e,n+1,r):(o===i||"_"===i)&&dt(t,e,n+1,r+1))}function ht(t,e,n=0,r=0){if(n>=t.length&&r>=e.length)return!0;if(n>=t.length)return _t(e.substring(r));if(r>=e.length)return _t(t.substring(n));const o=n<t.length?t[n]:"",i=r<e.length?e[r]:"";return"%"===o&&"%"===i?ht(t,e,n+1,r+1)||ht(t,e,n,r+1)||ht(t,e,n+1,r):"%"===o||"%"===i?ht(t,e,n,r+1)||ht(t,e,n+1,r):(o===i||"_"===o||"_"===i)&&ht(t,e,n+1,r+1)}function gt(t){return!/[a-zA-Z]/.test(t)}function _t(t){return t.split("").every(t=>"%"===t)}function yt(t,e){return t.length>0&&_t(t)||e.length>0&&_t(e)||vt(t)&&0===e.length}function vt(t){let e=!1,n=!1;for(const r of t)switch(r){case"%":e=!0;break;case"_":if(n)return!1;n=!0;break;default:return!1}return e&&n}function mt(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!tt(t[r],e[r]))return!1}return!0}function bt(t,e){return e.every(e=>{const n=Object.keys(e).sort();if(n.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(n[e]!==t[e])return!1;return!0})}class kt{constructor(t){this.query=t,this.query=t;const e=this.query.conditions.filter(st),n=this.query.conditions.filter(ct),r=n.flatMap(t=>function(t){if("=="!==t.operator&&"in"!==t.operator)return[];if(0===t.docIds.length)return[];const e=[],n=t.docIds[0];for(const r of Object.keys(n)){const o=n[r];t.docIds.every(t=>Object.prototype.hasOwnProperty.call(t,r)&&tt(t[r],o))&&e.push({fieldName:r,operator:"==",value:o})}return e}(t));this.exactSimpleConditions=this.parseConditions(e),this.exactDocIdConditions=n,this.subqueryConditions=this.parseConditions([...e,...r])}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}get projectFields(){return this.query.projectFields}sortedBy(t){return!t.find((t,e)=>!tt(this.query.sortOrder[e],{...t,asc:t.asc??!0}))}sortedByExact(t){return t.length===this.query.sortOrder.length&&this.sortedBy(t)}isSubqueryOf(t,e,n){return this.isSubqueryOfCondition({fieldName:t,operator:e,value:n})}isSubqueryOfCondition(t){return!!this.subqueryConditions.filter(e=>e.fieldName===t.fieldName).find(e=>this.evaluateSubset(e,t))}isSubqueryOfConditions(t){return this.parseConditions(t).every(t=>this.isSubqueryOfCondition(t))}isSubqueryOfQuery(t){if(t.collectionName!==this.collectionName||t.integrationId!==this.integrationId)return!1;for(const e of t.conditions.filter(ct))if(!this.childImpliesParentDocIdCondition(e))return!1;const e=t.conditions.filter(st),n=this.isSubqueryOfConditions(e),r=this.sortedBy(t.sortOrder),o=-1===t.limit||this.limit>-1&&this.limit<t.limit,i=this.isProjectFieldsSubset(this.query.projectFields,t.projectFields);return n&&r&&o&&i}childImpliesParentDocIdCondition(t){const e=t.docIds;if(0===e.length)return!1;const n="=="===t.operator||"in"===t.operator,r=Object.keys(e[0]).sort(),o=[];for(const t of this.query.conditions)ct(t)&&o.push(...t.docIds);if(!bt(r,e)||!bt(r,o))return!1;const i=this.buildChildEffectiveTupleSet();return n?void 0!==i.allowed&&i.allowed.every(t=>e.some(e=>mt(t,e))):void 0!==i.allowed?i.allowed.every(t=>!e.some(e=>mt(t,e))):e.every(t=>i.excluded.some(e=>mt(t,e)))}buildChildEffectiveTupleSet(){let t;const e=[];for(const n of this.query.conditions)if(ct(n))if("=="===n.operator||"in"===n.operator)t=void 0===t?[...n.docIds]:t.filter(t=>n.docIds.some(e=>mt(t,e)));else for(const t of n.docIds)e.some(e=>mt(e,t))||e.push(t);return void 0!==t&&e.length>0&&(t=t.filter(t=>!e.some(e=>mt(t,e)))),{allowed:t,excluded:e}}isProjectFieldsSubset(t,e){if(!e)return!0;if(!t)return!1;const n=new Set(e);return t.every(t=>n.has(t))}getConditionsFor(...t){return this.subqueryConditions.filter(e=>t.includes(e.fieldName))}getConditionsForField(t){return this.subqueryConditions.filter(e=>e.fieldName===t)}documentMatchesQuery(t){for(const e of this.exactSimpleConditions){const n=e.fieldName,r=e.operator;if(n===K){const n=e.value;if("in"===r||"not in"===r){const e=(Array.isArray(n)?n:[n]).some(e=>lt(e,t,"==",J));if(!("in"===r?e:!e))return!1;continue}if(!lt(n,t,r,J))return!1;continue}const o=J(t,n);if("in"===r){if(e.value.includes(o))continue;return!1}if("not in"!==r){if(!ut(e.value,o,r))return!1}else if(e.value.includes(o))return!1}for(const e of this.exactDocIdConditions)if(!ft(e,t,J))return!1;return!0}evaluateSubset(t,e){const{operator:n,value:r}=t,{operator:o,value:i}=this.parseConditions([e])[0],u=pt[`${n}:${o}`];return!!u&&u(r,i)}parseConditions(t){const e=[],n=new Map,r=new Map;return t.forEach(t=>{switch(t.operator){case"==":case"in":n.set(t.fieldName,(n.get(t.fieldName)||[]).concat(t.value));break;case"!=":case"not in":r.set(t.fieldName,(r.get(t.fieldName)||[]).concat(t.value));break;default:e.push(t)}}),n.forEach((t,n)=>{e.push({fieldName:n,operator:"in",value:t})}),r.forEach((t,n)=>{e.push({fieldName:n,operator:"not in",value:t})}),e}}function Tt(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}void 0===Tt()?.SQUID_LOG_DEBUG_ENABLED&&function(t=!0){Tt().SQUID_LOG_DEBUG_ENABLED=t}(function(){let t="";return"undefined"!=typeof window&&window.location?t=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(t=process.env.SQUID_DEBUG||""),"1"===t||"true"===t}());const Ot="__squidMetadata",At="CIRCULAR_DEPENDENCY",Ct=(new H.AsyncLocalStorage,[]);function wt(t,e,n){const r=Et();r.codeDirByServiceClassName.set(t.name,n);let i=r.serviceInstanceByCtor.get(t);if(!i||function(t){return t[Ot]||{version:0}}(i).version<=1){const n=Et(),r={...n,...e};o(!Ct.includes(t),()=>`${At}: ${Ct[Ct.length-1]?.name} => ${t.name}`),Ct.push(t);try{i=n.requestLocalStorage.run(e,()=>new t(r))}finally{Ct.pop()}n.serviceInstanceByCtor.set(t,i)}else(function(t,e){o(t.backendApiKey===e.backendApiKey,"backendApiKey does not match."),o(t.requestLocalStorage===e.requestLocalStorage,"requestLocalStorage does not match"),o(t.environmentId===e.environmentId,"environmentId does not match"),o(t.squidDeveloperId===e.squidDeveloperId,"squidDeveloperId does not match");const n=V(t.appId),r=V(e.appId);o(n.appId===r.appId,`appId does not match! Before: ${n.appId}, after ${r.appId}`)})(i.config,r),i.config.secrets=r.secrets,i.config.apiKeys=r.apiKeys;return i}const It="SQUID_GLOBAL_CONFIG";function Et(){return i(Tt()[It],"Squid global config is not defined! Make sure you are not trying to use Squid at module load time.")}class Rt{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=Et(),this[Ot]={version:2},this.backendBaseUrl=function(t,e,n,r,o,i){let u="https",a=`${r||e}.${o||t}.${new URL("https://squid.cloud").host}`,s="";if(/^local/.test(t)){if(u="http",s=i||function(t){const e=t.replace(/^\/+/,"").split("/"),n=e[0]||"";return"ws"===n?"squidlet"===e[1]:z.includes(n)}(n)?"8001":"8000","undefined"!=typeof process){const t=i?void 0:process.env.SQUID_LOCAL_WS_FORCE_PORT;t&&n.replace(/^\/+/,"").startsWith("ws/general")&&(s=t)}/android$/.test(t)?a="10.0.2.2":/ios$/.test(t)&&(a="localhost")}const c=u+"://"+a+(s?`:${s}`:""),f=n.replace(/^\/+/,"");return f?`${c}/${f}`:c}(this.region,this.config.appId,"")}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}get squid(){return Dt()}get assetsDirectory(){const t=Object.getPrototypeOf(this).constructor.name,e=this.config.codeDir||this.config.codeDirByServiceClassName.get(t);return o(e,()=>`No codeDir found for service: ${t}`),W.resolve(e,"public")}getApiKey(){return this.config.backendApiKey}getUserAuth(){const{auth:t}=this.getRequestConfig();return"Bearer"===t?.type?t:void 0}getApiKeyAuth(){const{auth:t}=this.getRequestConfig();return"ApiKey"===t?.type?t:void 0}isAuthenticated(){const{auth:t}=this.getRequestConfig();return!!t}assertIsAuthenticated(){this.assertInRequestScope(),o(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){o(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){o(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(t,e,n){return{body:t||"",statusCode:e||(t?200:204),headers:n||{},__isWebhookResponse__:!0}}throwWebhookResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isWebhookResponse__:!0}}createOpenApiResponse(t,e,n){return{body:t||"",statusCode:e||(t?200:204),headers:n||{},__isOpenApiResponse__:!0}}throwOpenApiResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isOpenApiResponse__:!0}}async convertToSquidFile(t){return{__isSquidFile__:!0,data:new Uint8Array(await t.arrayBuffer()),fieldName:t.name,mimetype:t.type,originalName:t.name,size:t.size,encoding:t.type}}async publishAiStatusUpdate(t,e){const n={type:"aiStatus",agentId:t.agentId,messageId:t.messageId,chatId:t.chatId,jobId:t.jobId,payload:{title:t.title,body:t.body,parentStatusUpdateId:t.parentStatusUpdateId,tags:t.tags}};await this.squid.getNotificationClient().publishSystemNotification(n,[e])}getRequestConfig(){return this.assertInRequestScope(),i(this.config.requestLocalStorage.getStore(),"Failed to access request data outside of the request's scope")}}function xt(t,e){return wt(t,{},e)}function St(t,e){const n=Object.getPrototypeOf(e).constructor.name,r=Et().codeDirByServiceClassName.get(n);return o(r,()=>`Caller class codeDir is not set: ${n}`),xt(t,r)}function Nt(t,e=F){return xt(t,i(Et().moduleById.get(e),"Module not found: "+e).codeDir)}function Mt(){const t=Et(),e=process.env.SQUID_REGION||"local",n=process.env.SQUID_CONSOLE_REGION,r=V(t.appId);return{appId:r.appId,apiKey:t.backendApiKey,squidDeveloperId:r.squidDeveloperId,environmentId:r.environmentId,region:e,consoleRegion:n}}function Dt(){return t.Squid.getInstance(Mt())}function Lt(){return t.Squid.getInstance({...Mt(),isPassiveMode:!0})}class Gt extends Rt{}class jt{constructor(){_.setIntegrationLifecycleHooks({onIntegrationCreated:this.onIntegrationCreated!==jt.prototype.onIntegrationCreated,onIntegrationDeleted:this.onIntegrationDeleted!==jt.prototype.onIntegrationDeleted,onIntegrationChanged:this.onIntegrationChanged!==jt.prototype.onIntegrationChanged})}get squid(){return Dt()}metadata(){return _.data}async onIntegrationCreated(t){}async onIntegrationChanged(t){}async onIntegrationDeleted(t){}async cleanup(){for(const e of t.Squid.getInstances())await e.destruct()}}class Yt{constructor(t){this.agentId=t.agentId,this.prompt=t.prompt,this.options=t.options}}class Qt{constructor(t){this.integrationId=t.integrationId,this.endpointId=t.endpointId,this.url=t.url,this.method=t.method,this.body=t.body,this.options=t.options}}var Pt;!function(t){t.EVERY_SECOND="* * * * * *",t.EVERY_5_SECONDS="*/5 * * * * *",t.EVERY_10_SECONDS="*/10 * * * * *",t.EVERY_30_SECONDS="*/30 * * * * *",t.EVERY_MINUTE="*/1 * * * *",t.EVERY_5_MINUTES="0 */5 * * * *",t.EVERY_10_MINUTES="0 */10 * * * *",t.EVERY_30_MINUTES="0 */30 * * * *",t.EVERY_HOUR="0 0-23/1 * * *",t.EVERY_2_HOURS="0 0-23/2 * * *",t.EVERY_3_HOURS="0 0-23/3 * * *",t.EVERY_4_HOURS="0 0-23/4 * * *",t.EVERY_5_HOURS="0 0-23/5 * * *",t.EVERY_6_HOURS="0 0-23/6 * * *",t.EVERY_7_HOURS="0 0-23/7 * * *",t.EVERY_8_HOURS="0 0-23/8 * * *",t.EVERY_9_HOURS="0 0-23/9 * * *",t.EVERY_10_HOURS="0 0-23/10 * * *",t.EVERY_11_HOURS="0 0-23/11 * * *",t.EVERY_12_HOURS="0 0-23/12 * * *",t.EVERY_DAY_AT_1AM="0 01 * * *",t.EVERY_DAY_AT_2AM="0 02 * * *",t.EVERY_DAY_AT_3AM="0 03 * * *",t.EVERY_DAY_AT_4AM="0 04 * * *",t.EVERY_DAY_AT_5AM="0 05 * * *",t.EVERY_DAY_AT_6AM="0 06 * * *",t.EVERY_DAY_AT_7AM="0 07 * * *",t.EVERY_DAY_AT_8AM="0 08 * * *",t.EVERY_DAY_AT_9AM="0 09 * * *",t.EVERY_DAY_AT_10AM="0 10 * * *",t.EVERY_DAY_AT_11AM="0 11 * * *",t.EVERY_DAY_AT_NOON="0 12 * * *",t.EVERY_DAY_AT_1PM="0 13 * * *",t.EVERY_DAY_AT_2PM="0 14 * * *",t.EVERY_DAY_AT_3PM="0 15 * * *",t.EVERY_DAY_AT_4PM="0 16 * * *",t.EVERY_DAY_AT_5PM="0 17 * * *",t.EVERY_DAY_AT_6PM="0 18 * * *",t.EVERY_DAY_AT_7PM="0 19 * * *",t.EVERY_DAY_AT_8PM="0 20 * * *",t.EVERY_DAY_AT_9PM="0 21 * * *",t.EVERY_DAY_AT_10PM="0 22 * * *",t.EVERY_DAY_AT_11PM="0 23 * * *",t.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",t.EVERY_WEEK="0 0 * * 7",t.EVERY_WEEKDAY="0 0 * * 1-5",t.EVERY_WEEKEND="0 0 * * 6,7",t.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",t.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",t.EVERY_2ND_HOUR="0 */2 * * *",t.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",t.EVERY_2ND_MONTH="0 0 1 */2 *",t.EVERY_QUARTER="0 0 1 */3 *",t.EVERY_6_MONTHS="0 0 1 */6 *",t.EVERY_YEAR="0 0 1 1 *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",t.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",t.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",t.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(Pt||(Pt={}));class Bt{constructor(t){this.mutex=t}}class qt{constructor(t){this.isGraphiQL=t.isGraphiQL,this.query=t.query,this.operationName=t.operationName,this.variables=t.variables}}const Ut=["insert","update","delete"];class Wt{constructor(t,e,n){this.mutation=t,this.beforeAndAfterDocs=e,this.serverTimeStamp=n}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}getMutationType(){return this.mutation.type}affectsPath(t){return!tt(J(this.before,t),J(this.after,t))}affectedPaths(t=""){o("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const e=[];return this.checkPath(t,e),e}checkPath(t,e){const n=J(this.before,t),r=J(this.after,t);if(!tt(n,r)&&(""!==t&&e.push(t),"object"==typeof n&&null!==n&&"object"==typeof r&&null!==r)){const o=Object.keys(n),i=Object.keys(r);new Set([...o,...i]).forEach(n=>{const r=t?`${t}.${n}`:n;this.checkPath(r,e)})}}}function Ft(t){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...t}}})();var o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{var t={243(t,e,n){var r;t=n.nmd(t),function(){var o,i="Expected a function",u="__lodash_hash_undefined__",a="__lodash_placeholder__",s=32,c=128,f=1/0,l=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",s],["partialRight",64],["rearg",256]],g="[object Arguments]",_="[object Array]",y="[object Boolean]",v="[object Date]",m="[object Error]",b="[object Function]",k="[object GeneratorFunction]",T="[object Map]",O="[object Number]",A="[object Object]",C="[object Promise]",w="[object RegExp]",I="[object Set]",E="[object String]",R="[object Symbol]",x="[object WeakMap]",S="[object ArrayBuffer]",N="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",G="[object Int16Array]",j="[object Int32Array]",Y="[object Uint8Array]",Q="[object Uint8ClampedArray]",P="[object Uint16Array]",B="[object Uint32Array]",q=/\b__p \+= '';/g,U=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,$=/[&<>"']/g,V=RegExp(F.source),z=RegExp($.source),H=/<%-([\s\S]+?)%>/g,K=/<%([\s\S]+?)%>/g,Z=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(et.source),rt=/^\s+/,ot=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ut=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,lt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pt=/\w*$/,dt=/^[-+]0x[0-9a-f]+$/i,ht=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,vt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mt=/($^)/,bt=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Tt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ot="\\u2700-\\u27bf",At="a-z\\xdf-\\xf6\\xf8-\\xff",Ct="A-Z\\xc0-\\xd6\\xd8-\\xde",wt="\\ufe0e\\ufe0f",It="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Et="["+kt+"]",Rt="["+It+"]",xt="["+Tt+"]",St="\\d+",Nt="["+Ot+"]",Mt="["+At+"]",Dt="[^"+kt+It+St+Ot+At+Ct+"]",Lt="\\ud83c[\\udffb-\\udfff]",Gt="[^"+kt+"]",jt="(?:\\ud83c[\\udde6-\\uddff]){2}",Yt="[\\ud800-\\udbff][\\udc00-\\udfff]",Qt="["+Ct+"]",Pt="\\u200d",Bt="(?:"+Mt+"|"+Dt+")",qt="(?:"+Qt+"|"+Dt+")",Ut="(?:['’](?:d|ll|m|re|s|t|ve))?",Wt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ft="(?:"+xt+"|"+Lt+")?",$t="["+wt+"]?",Vt=$t+Ft+"(?:"+Pt+"(?:"+[Gt,jt,Yt].join("|")+")"+$t+Ft+")*",zt="(?:"+[Nt,jt,Yt].join("|")+")"+Vt,Ht="(?:"+[Gt+xt+"?",xt,jt,Yt,Et].join("|")+")",Kt=RegExp("['’]","g"),Zt=RegExp(xt,"g"),Jt=RegExp(Lt+"(?="+Lt+")|"+Ht+Vt,"g"),Xt=RegExp([Qt+"?"+Mt+"+"+Ut+"(?="+[Rt,Qt,"$"].join("|")+")",qt+"+"+Wt+"(?="+[Rt,Qt+Bt,"$"].join("|")+")",Qt+"?"+Bt+"+"+Ut,Qt+"+"+Wt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",St,zt].join("|"),"g"),te=RegExp("["+Pt+kt+Tt+wt+"]"),ee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],re=-1,oe={};oe[M]=oe[D]=oe[L]=oe[G]=oe[j]=oe[Y]=oe[Q]=oe[P]=oe[B]=!0,oe[g]=oe[_]=oe[S]=oe[y]=oe[N]=oe[v]=oe[m]=oe[b]=oe[T]=oe[O]=oe[A]=oe[w]=oe[I]=oe[E]=oe[x]=!1;var ie={};ie[g]=ie[_]=ie[S]=ie[N]=ie[y]=ie[v]=ie[M]=ie[D]=ie[L]=ie[G]=ie[j]=ie[T]=ie[O]=ie[A]=ie[w]=ie[I]=ie[E]=ie[R]=ie[Y]=ie[Q]=ie[P]=ie[B]=!0,ie[m]=ie[b]=ie[x]=!1;var ue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ae=parseFloat,se=parseInt,ce="object"==typeof global&&global&&global.Object===Object&&global,fe="object"==typeof self&&self&&self.Object===Object&&self,le=ce||fe||Function("return this")(),pe=e&&!e.nodeType&&e,de=pe&&t&&!t.nodeType&&t,he=de&&de.exports===pe,ge=he&&ce.process,_e=function(){try{return de&&de.require&&de.require("util").types||ge&&ge.binding&&ge.binding("util")}catch(t){}}(),ye=_e&&_e.isArrayBuffer,ve=_e&&_e.isDate,me=_e&&_e.isMap,be=_e&&_e.isRegExp,ke=_e&&_e.isSet,Te=_e&&_e.isTypedArray;function Oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ae(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r}function Ce(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function we(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ee(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}function Re(t,e){return!(null==t||!t.length)&&Qe(t,e,0)>-1}function xe(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Se(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function Ne(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Me(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function De(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Le(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var Ge=Ue("length");function je(t,e,n){var r;return n(t,function(t,n,o){if(e(t,n,o))return r=n,!1}),r}function Ye(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Qe(t,e,n){return e==e?function(t,e,n){for(var r=n-1,o=t.length;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Ye(t,Be,n)}function Pe(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function Be(t){return t!=t}function qe(t,e){var n=null==t?0:t.length;return n?$e(t,e)/n:p}function Ue(t){return function(e){return null==e?o:e[t]}}function We(t){return function(e){return null==t?o:t[e]}}function Fe(t,e,n,r,o){return o(t,function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)}),n}function $e(t,e){for(var n,r=-1,i=t.length;++r<i;){var u=e(t[r]);u!==o&&(n=n===o?u:n+u)}return n}function Ve(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function ze(t){return t?t.slice(0,pn(t)+1).replace(rt,""):t}function He(t){return function(e){return t(e)}}function Ke(t,e){return Se(e,function(e){return t[e]})}function Ze(t,e){return t.has(e)}function Je(t,e){for(var n=-1,r=t.length;++n<r&&Qe(e,t[n],0)>-1;);return n}function Xe(t,e){for(var n=t.length;n--&&Qe(e,t[n],0)>-1;);return n}var tn=We({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),en=We({"&":"&","<":"<",">":">",'"':""","'":"'"});function nn(t){return"\\"+ue[t]}function rn(t){return te.test(t)}function on(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function un(t,e){return function(n){return t(e(n))}}function an(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n];u!==e&&u!==a||(t[n]=a,i[o++]=n)}return i}function sn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function cn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function fn(t){return rn(t)?function(t){for(var e=Jt.lastIndex=0;Jt.test(t);)++e;return e}(t):Ge(t)}function ln(t){return rn(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function pn(t){for(var e=t.length;e--&&ot.test(t.charAt(e)););return e}var dn=We({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hn=function t(e){var n,r=(e=null==e?le:hn.defaults(le.Object(),e,hn.pick(le,ne))).Array,ot=e.Date,kt=e.Error,Tt=e.Function,Ot=e.Math,At=e.Object,Ct=e.RegExp,wt=e.String,It=e.TypeError,Et=r.prototype,Rt=Tt.prototype,xt=At.prototype,St=e["__core-js_shared__"],Nt=Rt.toString,Mt=xt.hasOwnProperty,Dt=0,Lt=(n=/[^.]+$/.exec(St&&St.keys&&St.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Gt=xt.toString,jt=Nt.call(At),Yt=le._,Qt=Ct("^"+Nt.call(Mt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pt=he?e.Buffer:o,Bt=e.Symbol,qt=e.Uint8Array,Ut=Pt?Pt.allocUnsafe:o,Wt=un(At.getPrototypeOf,At),Ft=At.create,$t=xt.propertyIsEnumerable,Vt=Et.splice,zt=Bt?Bt.isConcatSpreadable:o,Ht=Bt?Bt.iterator:o,Jt=Bt?Bt.toStringTag:o,te=function(){try{var t=ci(At,"defineProperty");return t({},"",{}),t}catch(t){}}(),ue=e.clearTimeout!==le.clearTimeout&&e.clearTimeout,ce=ot&&ot.now!==le.Date.now&&ot.now,fe=e.setTimeout!==le.setTimeout&&e.setTimeout,pe=Ot.ceil,de=Ot.floor,ge=At.getOwnPropertySymbols,_e=Pt?Pt.isBuffer:o,Ge=e.isFinite,We=Et.join,gn=un(At.keys,At),_n=Ot.max,yn=Ot.min,vn=ot.now,mn=e.parseInt,bn=Ot.random,kn=Et.reverse,Tn=ci(e,"DataView"),On=ci(e,"Map"),An=ci(e,"Promise"),Cn=ci(e,"Set"),wn=ci(e,"WeakMap"),In=ci(At,"create"),En=wn&&new wn,Rn={},xn=ji(Tn),Sn=ji(On),Nn=ji(An),Mn=ji(Cn),Dn=ji(wn),Ln=Bt?Bt.prototype:o,Gn=Ln?Ln.valueOf:o,jn=Ln?Ln.toString:o;function Yn(t){if(ta(t)&&!Uu(t)&&!(t instanceof qn)){if(t instanceof Bn)return t;if(Mt.call(t,"__wrapped__"))return Yi(t)}return new Bn(t)}var Qn=function(){function t(){}return function(e){if(!Xu(e))return{};if(Ft)return Ft(e);t.prototype=e;var n=new t;return t.prototype=o,n}}();function Pn(){}function Bn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=o}function qn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Un(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Wn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function $n(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}function Vn(t){var e=this.__data__=new Wn(t);this.size=e.size}function zn(t,e){var n=Uu(t),r=!n&&qu(t),o=!n&&!r&&Vu(t),i=!n&&!r&&!o&&sa(t),u=n||r||o||i,a=u?Ve(t.length,wt):[],s=a.length;for(var c in t)!e&&!Mt.call(t,c)||u&&("length"==c||o&&("offset"==c||"parent"==c)||i&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||_i(c,s))||a.push(c);return a}function Hn(t){var e=t.length;return e?t[Fr(0,e-1)]:o}function Kn(t,e){return Ni(Io(t),ir(e,0,t.length))}function Zn(t){return Ni(Io(t))}function Jn(t,e,n){(n!==o&&!Qu(t[e],n)||n===o&&!(e in t))&&rr(t,e,n)}function Xn(t,e,n){var r=t[e];Mt.call(t,e)&&Qu(r,n)&&(n!==o||e in t)||rr(t,e,n)}function tr(t,e){for(var n=t.length;n--;)if(Qu(t[n][0],e))return n;return-1}function er(t,e,n,r){return fr(t,function(t,o,i){e(r,t,n(t),i)}),r}function nr(t,e){return t&&Eo(e,xa(e),t)}function rr(t,e,n){"__proto__"==e&&te?te(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function or(t,e){for(var n=-1,i=e.length,u=r(i),a=null==t;++n<i;)u[n]=a?o:Ca(t,e[n]);return u}function ir(t,e,n){return t==t&&(n!==o&&(t=t<=n?t:n),e!==o&&(t=t>=e?t:e)),t}function ur(t,e,n,r,i,u){var a,s=1&e,c=2&e,f=4&e;if(n&&(a=i?n(t,r,i,u):n(t)),a!==o)return a;if(!Xu(t))return t;var l=Uu(t);if(l){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Mt.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return Io(t,a)}else{var p=pi(t),d=p==b||p==k;if(Vu(t))return ko(t,s);if(p==A||p==g||d&&!i){if(a=c||d?{}:hi(t),!s)return c?function(t,e){return Eo(t,li(t),e)}(t,function(t,e){return t&&Eo(e,Sa(e),t)}(a,t)):function(t,e){return Eo(t,fi(t),e)}(t,nr(a,t))}else{if(!ie[p])return i?t:{};a=function(t,e,n){var r,o=t.constructor;switch(e){case S:return To(t);case y:case v:return new o(+t);case N:return function(t,e){var n=e?To(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case M:case D:case L:case G:case j:case Y:case Q:case P:case B:return Oo(t,n);case T:return new o;case O:case E:return new o(t);case w:return function(t){var e=new t.constructor(t.source,pt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case I:return new o;case R:return r=t,Gn?At(Gn.call(r)):{}}}(t,p,s)}}u||(u=new Vn);var h=u.get(t);if(h)return h;u.set(t,a),ia(t)?t.forEach(function(r){a.add(ur(r,e,n,r,t,u))}):ea(t)&&t.forEach(function(r,o){a.set(o,ur(r,e,n,o,t,u))});var _=l?o:(f?c?ni:ei:c?Sa:xa)(t);return Ce(_||t,function(r,o){_&&(r=t[o=r]),Xn(a,o,ur(r,e,n,o,t,u))}),a}function ar(t,e,n){var r=n.length;if(null==t)return!r;for(t=At(t);r--;){var i=n[r],u=e[i],a=t[i];if(a===o&&!(i in t)||!u(a))return!1}return!0}function sr(t,e,n){if("function"!=typeof t)throw new It(i);return Ei(function(){t.apply(o,n)},e)}function cr(t,e,n,r){var o=-1,i=Re,u=!0,a=t.length,s=[],c=e.length;if(!a)return s;n&&(e=Se(e,He(n))),r?(i=xe,u=!1):e.length>=200&&(i=Ze,u=!1,e=new $n(e));t:for(;++o<a;){var f=t[o],l=null==n?f:n(f);if(f=r||0!==f?f:0,u&&l==l){for(var p=c;p--;)if(e[p]===l)continue t;s.push(f)}else i(e,l,r)||s.push(f)}return s}Yn.templateSettings={escape:H,evaluate:K,interpolate:Z,variable:"",imports:{_:Yn}},Yn.prototype=Pn.prototype,Yn.prototype.constructor=Yn,Bn.prototype=Qn(Pn.prototype),Bn.prototype.constructor=Bn,qn.prototype=Qn(Pn.prototype),qn.prototype.constructor=qn,Un.prototype.clear=function(){this.__data__=In?In(null):{},this.size=0},Un.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Un.prototype.get=function(t){var e=this.__data__;if(In){var n=e[t];return n===u?o:n}return Mt.call(e,t)?e[t]:o},Un.prototype.has=function(t){var e=this.__data__;return In?e[t]!==o:Mt.call(e,t)},Un.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=In&&e===o?u:e,this},Wn.prototype.clear=function(){this.__data__=[],this.size=0},Wn.prototype.delete=function(t){var e=this.__data__,n=tr(e,t);return!(n<0||(n==e.length-1?e.pop():Vt.call(e,n,1),--this.size,0))},Wn.prototype.get=function(t){var e=this.__data__,n=tr(e,t);return n<0?o:e[n][1]},Wn.prototype.has=function(t){return tr(this.__data__,t)>-1},Wn.prototype.set=function(t,e){var n=this.__data__,r=tr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Un,map:new(On||Wn),string:new Un}},Fn.prototype.delete=function(t){var e=ai(this,t).delete(t);return this.size-=e?1:0,e},Fn.prototype.get=function(t){return ai(this,t).get(t)},Fn.prototype.has=function(t){return ai(this,t).has(t)},Fn.prototype.set=function(t,e){var n=ai(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},$n.prototype.add=$n.prototype.push=function(t){return this.__data__.set(t,u),this},$n.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.clear=function(){this.__data__=new Wn,this.size=0},Vn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Vn.prototype.get=function(t){return this.__data__.get(t)},Vn.prototype.has=function(t){return this.__data__.has(t)},Vn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Wn){var r=n.__data__;if(!On||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this};var fr=So(vr),lr=So(mr,!0);function pr(t,e){var n=!0;return fr(t,function(t,r,o){return n=!!e(t,r,o)}),n}function dr(t,e,n){for(var r=-1,i=t.length;++r<i;){var u=t[r],a=e(u);if(null!=a&&(s===o?a==a&&!aa(a):n(a,s)))var s=a,c=u}return c}function hr(t,e){var n=[];return fr(t,function(t,r,o){e(t,r,o)&&n.push(t)}),n}function gr(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=gi),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?gr(a,e-1,n,r,o):Ne(o,a):r||(o[o.length]=a)}return o}var _r=No(),yr=No(!0);function vr(t,e){return t&&_r(t,e,xa)}function mr(t,e){return t&&yr(t,e,xa)}function br(t,e){return Ee(e,function(e){return Ku(t[e])})}function kr(t,e){for(var n=0,r=(e=yo(e,t)).length;null!=t&&n<r;)t=t[Gi(e[n++])];return n&&n==r?t:o}function Tr(t,e,n){var r=e(t);return Uu(t)?r:Ne(r,n(t))}function Or(t){return null==t?t===o?"[object Undefined]":"[object Null]":Jt&&Jt in At(t)?function(t){var e=Mt.call(t,Jt),n=t[Jt];try{t[Jt]=o;var r=!0}catch(t){}var i=Gt.call(t);return r&&(e?t[Jt]=n:delete t[Jt]),i}(t):function(t){return Gt.call(t)}(t)}function Ar(t,e){return t>e}function Cr(t,e){return null!=t&&Mt.call(t,e)}function wr(t,e){return null!=t&&e in At(t)}function Ir(t,e,n){for(var i=n?xe:Re,u=t[0].length,a=t.length,s=a,c=r(a),f=1/0,l=[];s--;){var p=t[s];s&&e&&(p=Se(p,He(e))),f=yn(p.length,f),c[s]=!n&&(e||u>=120&&p.length>=120)?new $n(s&&p):o}p=t[0];var d=-1,h=c[0];t:for(;++d<u&&l.length<f;){var g=p[d],_=e?e(g):g;if(g=n||0!==g?g:0,!(h?Ze(h,_):i(l,_,n))){for(s=a;--s;){var y=c[s];if(!(y?Ze(y,_):i(t[s],_,n)))continue t}h&&h.push(_),l.push(g)}}return l}function Er(t,e,n){var r=null==(t=Ci(t,e=yo(e,t)))?t:t[Gi(Hi(e))];return null==r?o:Oe(r,t,n)}function Rr(t){return ta(t)&&Or(t)==g}function xr(t,e,n,r,i){return t===e||(null==t||null==e||!ta(t)&&!ta(e)?t!=t&&e!=e:function(t,e,n,r,i,u){var a=Uu(t),s=Uu(e),c=a?_:pi(t),f=s?_:pi(e),l=(c=c==g?A:c)==A,p=(f=f==g?A:f)==A,d=c==f;if(d&&Vu(t)){if(!Vu(e))return!1;a=!0,l=!1}if(d&&!l)return u||(u=new Vn),a||sa(t)?Xo(t,e,n,r,i,u):function(t,e,n,r,o,i,u){switch(n){case N:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case S:return!(t.byteLength!=e.byteLength||!i(new qt(t),new qt(e)));case y:case v:case O:return Qu(+t,+e);case m:return t.name==e.name&&t.message==e.message;case w:case E:return t==e+"";case T:var a=on;case I:var s=1&r;if(a||(a=sn),t.size!=e.size&&!s)return!1;var c=u.get(t);if(c)return c==e;r|=2,u.set(t,e);var f=Xo(a(t),a(e),r,o,i,u);return u.delete(t),f;case R:if(Gn)return Gn.call(t)==Gn.call(e)}return!1}(t,e,c,n,r,i,u);if(!(1&n)){var h=l&&Mt.call(t,"__wrapped__"),b=p&&Mt.call(e,"__wrapped__");if(h||b){var k=h?t.value():t,C=b?e.value():e;return u||(u=new Vn),i(k,C,n,r,u)}}return!!d&&(u||(u=new Vn),function(t,e,n,r,i,u){var a=1&n,s=ei(t),c=s.length;if(c!=ei(e).length&&!a)return!1;for(var f=c;f--;){var l=s[f];if(!(a?l in e:Mt.call(e,l)))return!1}var p=u.get(t),d=u.get(e);if(p&&d)return p==e&&d==t;var h=!0;u.set(t,e),u.set(e,t);for(var g=a;++f<c;){var _=t[l=s[f]],y=e[l];if(r)var v=a?r(y,_,l,e,t,u):r(_,y,l,t,e,u);if(!(v===o?_===y||i(_,y,n,r,u):v)){h=!1;break}g||(g="constructor"==l)}if(h&&!g){var m=t.constructor,b=e.constructor;m==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof m&&m instanceof m&&"function"==typeof b&&b instanceof b||(h=!1)}return u.delete(t),u.delete(e),h}(t,e,n,r,i,u))}(t,e,n,r,xr,i))}function Sr(t,e,n,r){var i=n.length,u=i,a=!r;if(null==t)return!u;for(t=At(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<u;){var c=(s=n[i])[0],f=t[c],l=s[1];if(a&&s[2]){if(f===o&&!(c in t))return!1}else{var p=new Vn;if(r)var d=r(f,l,c,t,e,p);if(!(d===o?xr(l,f,3,r,p):d))return!1}}return!0}function Nr(t){return!(!Xu(t)||(e=t,Lt&&Lt in e))&&(Ku(t)?Qt:gt).test(ji(t));var e}function Mr(t){return"function"==typeof t?t:null==t?ns:"object"==typeof t?Uu(t)?Yr(t[0],t[1]):jr(t):ls(t)}function Dr(t){if(!ki(t))return gn(t);var e=[];for(var n in At(t))Mt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Lr(t,e){return t<e}function Gr(t,e){var n=-1,o=Fu(t)?r(t.length):[];return fr(t,function(t,r,i){o[++n]=e(t,r,i)}),o}function jr(t){var e=si(t);return 1==e.length&&e[0][2]?Oi(e[0][0],e[0][1]):function(n){return n===t||Sr(n,t,e)}}function Yr(t,e){return vi(t)&&Ti(e)?Oi(Gi(t),e):function(n){var r=Ca(n,t);return r===o&&r===e?wa(n,t):xr(e,r,3)}}function Qr(t,e,n,r,i){t!==e&&_r(e,function(u,a){if(i||(i=new Vn),Xu(u))!function(t,e,n,r,i,u,a){var s=wi(t,n),c=wi(e,n),f=a.get(c);if(f)Jn(t,n,f);else{var l=u?u(s,c,n+"",t,e,a):o,p=l===o;if(p){var d=Uu(c),h=!d&&Vu(c),g=!d&&!h&&sa(c);l=c,d||h||g?Uu(s)?l=s:$u(s)?l=Io(s):h?(p=!1,l=ko(c,!0)):g?(p=!1,l=Oo(c,!0)):l=[]:ra(c)||qu(c)?(l=s,qu(s)?l=_a(s):Xu(s)&&!Ku(s)||(l=hi(c))):p=!1}p&&(a.set(c,l),i(l,c,r,u,a),a.delete(c)),Jn(t,n,l)}}(t,e,a,n,Qr,r,i);else{var s=r?r(wi(t,a),u,a+"",t,e,i):o;s===o&&(s=u),Jn(t,a,s)}},Sa)}function Pr(t,e){var n=t.length;if(n)return _i(e+=e<0?n:0,n)?t[e]:o}function Br(t,e,n){e=e.length?Se(e,function(t){return Uu(t)?function(e){return kr(e,1===t.length?t[0]:t)}:t}):[ns];var r=-1;e=Se(e,He(ui()));var o=Gr(t,function(t,n,o){var i=Se(e,function(e){return e(t)});return{criteria:i,index:++r,value:t}});return function(t){var e=t.length;for(t.sort(function(t,e){return function(t,e,n){for(var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;++r<u;){var s=Ao(o[r],i[r]);if(s)return r>=a?s:s*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)});e--;)t[e]=t[e].value;return t}(o)}function qr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=kr(t,u);n(a,u)&&Kr(i,yo(u,t),a)}return i}function Ur(t,e,n,r){var o=r?Pe:Qe,i=-1,u=e.length,a=t;for(t===e&&(e=Io(e)),n&&(a=Se(t,He(n)));++i<u;)for(var s=0,c=e[i],f=n?n(c):c;(s=o(a,f,s,r))>-1;)a!==t&&Vt.call(a,s,1),Vt.call(t,s,1);return t}function Wr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;_i(o)?Vt.call(t,o,1):so(t,o)}}return t}function Fr(t,e){return t+de(bn()*(e-t+1))}function $r(t,e){var n="";if(!t||e<1||e>l)return n;do{e%2&&(n+=t),(e=de(e/2))&&(t+=t)}while(e);return n}function Vr(t,e){return Ri(Ai(t,e,ns),t+"")}function zr(t){return Hn(Qa(t))}function Hr(t,e){var n=Qa(t);return Ni(n,ir(e,0,n.length))}function Kr(t,e,n,r){if(!Xu(t))return t;for(var i=-1,u=(e=yo(e,t)).length,a=u-1,s=t;null!=s&&++i<u;){var c=Gi(e[i]),f=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(i!=a){var l=s[c];(f=r?r(l,c,s):o)===o&&(f=Xu(l)?l:_i(e[i+1])?[]:{})}Xn(s,c,f),s=s[c]}return t}var Zr=En?function(t,e){return En.set(t,e),t}:ns,Jr=te?function(t,e){return te(t,"toString",{configurable:!0,enumerable:!1,value:Xa(e),writable:!0})}:ns;function Xr(t){return Ni(Qa(t))}function to(t,e,n){var o=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var u=r(i);++o<i;)u[o]=t[o+e];return u}function eo(t,e){var n;return fr(t,function(t,r,o){return!(n=e(t,r,o))}),!!n}function no(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!aa(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return ro(t,e,ns,n)}function ro(t,e,n,r){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=n(e))!=e,s=null===e,c=aa(e),f=e===o;i<u;){var l=de((i+u)/2),p=n(t[l]),d=p!==o,h=null===p,g=p==p,_=aa(p);if(a)var y=r||g;else y=f?g&&(r||d):s?g&&d&&(r||!h):c?g&&d&&!h&&(r||!_):!h&&!_&&(r?p<=e:p<e);y?i=l+1:u=l}return yn(u,4294967294)}function oo(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Qu(a,s)){var s=a;i[o++]=0===u?0:u}}return i}function io(t){return"number"==typeof t?t:aa(t)?p:+t}function uo(t){if("string"==typeof t)return t;if(Uu(t))return Se(t,uo)+"";if(aa(t))return jn?jn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ao(t,e,n){var r=-1,o=Re,i=t.length,u=!0,a=[],s=a;if(n)u=!1,o=xe;else if(i>=200){var c=e?null:Vo(t);if(c)return sn(c);u=!1,o=Ze,s=new $n}else s=e?[]:a;t:for(;++r<i;){var f=t[r],l=e?e(f):f;if(f=n||0!==f?f:0,u&&l==l){for(var p=s.length;p--;)if(s[p]===l)continue t;e&&s.push(l),a.push(f)}else o(s,l,n)||(s!==a&&s.push(l),a.push(f))}return a}function so(t,e){var n=-1,r=(e=yo(e,t)).length;if(!r)return!0;for(;++n<r;){var o=Gi(e[n]);if("__proto__"===o&&!Mt.call(t,"__proto__"))return!1;if(("constructor"===o||"prototype"===o)&&n<r-1)return!1}var i=Ci(t,e);return null==i||delete i[Gi(Hi(e))]}function co(t,e,n,r){return Kr(t,e,n(kr(t,e)),r)}function fo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?to(t,r?0:i,r?i+1:o):to(t,r?i+1:0,r?o:i)}function lo(t,e){var n=t;return n instanceof qn&&(n=n.value()),Me(e,function(t,e){return e.func.apply(e.thisArg,Ne([t],e.args))},n)}function po(t,e,n){var o=t.length;if(o<2)return o?ao(t[0]):[];for(var i=-1,u=r(o);++i<o;)for(var a=t[i],s=-1;++s<o;)s!=i&&(u[i]=cr(u[i]||a,t[s],e,n));return ao(gr(u,1),e,n)}function ho(t,e,n){for(var r=-1,i=t.length,u=e.length,a={};++r<i;){var s=r<u?e[r]:o;n(a,t[r],s)}return a}function go(t){return $u(t)?t:[]}function _o(t){return"function"==typeof t?t:ns}function yo(t,e){return Uu(t)?t:vi(t,e)?[t]:Li(ya(t))}var vo=Vr;function mo(t,e,n){var r=t.length;return n=n===o?r:n,!e&&n>=r?t:to(t,e,n)}var bo=ue||function(t){return le.clearTimeout(t)};function ko(t,e){if(e)return t.slice();var n=t.length,r=Ut?Ut(n):new t.constructor(n);return t.copy(r),r}function To(t){var e=new t.constructor(t.byteLength);return new qt(e).set(new qt(t)),e}function Oo(t,e){var n=e?To(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Ao(t,e){if(t!==e){var n=t!==o,r=null===t,i=t==t,u=aa(t),a=e!==o,s=null===e,c=e==e,f=aa(e);if(!s&&!f&&!u&&t>e||u&&a&&c&&!s&&!f||r&&a&&c||!n&&c||!i)return 1;if(!r&&!u&&!f&&t<e||f&&n&&i&&!r&&!u||s&&n&&i||!a&&i||!c)return-1}return 0}function Co(t,e,n,o){for(var i=-1,u=t.length,a=n.length,s=-1,c=e.length,f=_n(u-a,0),l=r(c+f),p=!o;++s<c;)l[s]=e[s];for(;++i<a;)(p||i<u)&&(l[n[i]]=t[i]);for(;f--;)l[s++]=t[i++];return l}function wo(t,e,n,o){for(var i=-1,u=t.length,a=-1,s=n.length,c=-1,f=e.length,l=_n(u-s,0),p=r(l+f),d=!o;++i<l;)p[i]=t[i];for(var h=i;++c<f;)p[h+c]=e[c];for(;++a<s;)(d||i<u)&&(p[h+n[a]]=t[i++]);return p}function Io(t,e){var n=-1,o=t.length;for(e||(e=r(o));++n<o;)e[n]=t[n];return e}function Eo(t,e,n,r){var i=!n;n||(n={});for(var u=-1,a=e.length;++u<a;){var s=e[u],c=r?r(n[s],t[s],s,n,t):o;c===o&&(c=t[s]),i?rr(n,s,c):Xn(n,s,c)}return n}function Ro(t,e){return function(n,r){var o=Uu(n)?Ae:er,i=e?e():{};return o(n,t,ui(r,2),i)}}function xo(t){return Vr(function(e,n){var r=-1,i=n.length,u=i>1?n[i-1]:o,a=i>2?n[2]:o;for(u=t.length>3&&"function"==typeof u?(i--,u):o,a&&yi(n[0],n[1],a)&&(u=i<3?o:u,i=1),e=At(e);++r<i;){var s=n[r];s&&t(e,s,r,u)}return e})}function So(t,e){return function(n,r){if(null==n)return n;if(!Fu(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=At(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}}function No(t){return function(e,n,r){for(var o=-1,i=At(e),u=r(e),a=u.length;a--;){var s=u[t?a:++o];if(!1===n(i[s],s,i))break}return e}}function Mo(t){return function(e){var n=rn(e=ya(e))?ln(e):o,r=n?n[0]:e.charAt(0),i=n?mo(n,1).join(""):e.slice(1);return r[t]()+i}}function Do(t){return function(e){return Me(Ka(qa(e).replace(Kt,"")),t,"")}}function Lo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Qn(t.prototype),r=t.apply(n,e);return Xu(r)?r:n}}function Go(t){return function(e,n,r){var i=At(e);if(!Fu(e)){var u=ui(n,3);e=xa(e),n=function(t){return u(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[u?e[a]:a]:o}}function jo(t){return ti(function(e){var n=e.length,r=n,u=Bn.prototype.thru;for(t&&e.reverse();r--;){var a=e[r];if("function"!=typeof a)throw new It(i);if(u&&!s&&"wrapper"==oi(a))var s=new Bn([],!0)}for(r=s?r:n;++r<n;){var c=oi(a=e[r]),f="wrapper"==c?ri(a):o;s=f&&mi(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?s[oi(f[0])].apply(s,f[3]):1==a.length&&mi(a)?s[c]():s.thru(a)}return function(){var t=arguments,r=t[0];if(s&&1==t.length&&Uu(r))return s.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}})}function Yo(t,e,n,i,u,a,s,f,l,p){var d=e&c,h=1&e,g=2&e,_=24&e,y=512&e,v=g?o:Lo(t);return function c(){for(var m=arguments.length,b=r(m),k=m;k--;)b[k]=arguments[k];if(_)var T=ii(c),O=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(b,T);if(i&&(b=Co(b,i,u,_)),a&&(b=wo(b,a,s,_)),m-=O,_&&m<p){var A=an(b,T);return Fo(t,e,Yo,c.placeholder,n,b,A,f,l,p-m)}var C=h?n:this,w=g?C[t]:t;return m=b.length,f?b=function(t,e){for(var n=t.length,r=yn(e.length,n),i=Io(t);r--;){var u=e[r];t[r]=_i(u,n)?i[u]:o}return t}(b,f):y&&m>1&&b.reverse(),d&&l<m&&(b.length=l),this&&this!==le&&this instanceof c&&(w=v||Lo(w)),w.apply(C,b)}}function Qo(t,e){return function(n,r){return function(t,e,n,r){return vr(t,function(t,o,i){e(r,n(t),o,i)}),r}(n,t,e(r),{})}}function Po(t,e){return function(n,r){var i;if(n===o&&r===o)return e;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=uo(n),r=uo(r)):(n=io(n),r=io(r)),i=t(n,r)}return i}}function Bo(t){return ti(function(e){return e=Se(e,He(ui())),Vr(function(n){var r=this;return t(e,function(t){return Oe(t,r,n)})})})}function qo(t,e){var n=(e=e===o?" ":uo(e)).length;if(n<2)return n?$r(e,t):e;var r=$r(e,pe(t/fn(e)));return rn(e)?mo(ln(r),0,t).join(""):r.slice(0,t)}function Uo(t){return function(e,n,i){return i&&"number"!=typeof i&&yi(e,n,i)&&(n=i=o),e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n,o){for(var i=-1,u=_n(pe((e-t)/(n||1)),0),a=r(u);u--;)a[o?u:++i]=t,t+=n;return a}(e,n,i=i===o?e<n?1:-1:pa(i),t)}}function Wo(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ga(e),n=ga(n)),t(e,n)}}function Fo(t,e,n,r,i,u,a,c,f,l){var p=8&e;e|=p?s:64,4&(e&=~(p?64:s))||(e&=-4);var d=[t,e,i,p?u:o,p?a:o,p?o:u,p?o:a,c,f,l],h=n.apply(o,d);return mi(t)&&Ii(h,d),h.placeholder=r,xi(h,t,e)}function $o(t){var e=Ot[t];return function(t,n){if(t=ga(t),(n=null==n?0:yn(da(n),292))&&Ge(t)){var r=(ya(t)+"e").split("e");return+((r=(ya(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Vo=Cn&&1/sn(new Cn([,-0]))[1]==f?function(t){return new Cn(t)}:as;function zo(t){return function(e){var n=pi(e);return n==T?on(e):n==I?cn(e):function(t,e){return Se(e,function(e){return[e,t[e]]})}(e,t(e))}}function Ho(t,e,n,u,f,l,p,d){var h=2&e;if(!h&&"function"!=typeof t)throw new It(i);var g=u?u.length:0;if(g||(e&=-97,u=f=o),p=p===o?p:_n(da(p),0),d=d===o?d:da(d),g-=f?f.length:0,64&e){var _=u,y=f;u=f=o}var v=h?o:ri(t),m=[t,e,n,u,f,_,y,l,p,d];if(v&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,u=r==c&&8==n||r==c&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var s=e[3];if(s){var f=t[3];t[3]=f?Co(f,s,e[4]):s,t[4]=f?an(t[3],a):e[4]}(s=e[5])&&(f=t[5],t[5]=f?wo(f,s,e[6]):s,t[6]=f?an(t[5],a):e[6]),(s=e[7])&&(t[7]=s),r&c&&(t[8]=null==t[8]?e[8]:yn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=o}(m,v),t=m[0],e=m[1],n=m[2],u=m[3],f=m[4],!(d=m[9]=m[9]===o?h?0:t.length:_n(m[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)b=8==e||16==e?function(t,e,n){var i=Lo(t);return function u(){for(var a=arguments.length,s=r(a),c=a,f=ii(u);c--;)s[c]=arguments[c];var l=a<3&&s[0]!==f&&s[a-1]!==f?[]:an(s,f);return(a-=l.length)<n?Fo(t,e,Yo,u.placeholder,o,s,l,o,o,n-a):Oe(this&&this!==le&&this instanceof u?i:t,this,s)}}(t,e,d):e!=s&&33!=e||f.length?Yo.apply(o,m):function(t,e,n,o){var i=1&e,u=Lo(t);return function e(){for(var a=-1,s=arguments.length,c=-1,f=o.length,l=r(f+s),p=this&&this!==le&&this instanceof e?u:t;++c<f;)l[c]=o[c];for(;s--;)l[c++]=arguments[++a];return Oe(p,i?n:this,l)}}(t,e,n,u);else var b=function(t,e,n){var r=1&e,o=Lo(t);return function e(){return(this&&this!==le&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return xi((v?Zr:Ii)(b,m),t,e)}function Ko(t,e,n,r){return t===o||Qu(t,xt[n])&&!Mt.call(r,n)?e:t}function Zo(t,e,n,r,i,u){return Xu(t)&&Xu(e)&&(u.set(e,t),Qr(t,e,o,Zo,u),u.delete(e)),t}function Jo(t){return ra(t)?o:t}function Xo(t,e,n,r,i,u){var a=1&n,s=t.length,c=e.length;if(s!=c&&!(a&&c>s))return!1;var f=u.get(t),l=u.get(e);if(f&&l)return f==e&&l==t;var p=-1,d=!0,h=2&n?new $n:o;for(u.set(t,e),u.set(e,t);++p<s;){var g=t[p],_=e[p];if(r)var y=a?r(_,g,p,e,t,u):r(g,_,p,t,e,u);if(y!==o){if(y)continue;d=!1;break}if(h){if(!Le(e,function(t,e){if(!Ze(h,e)&&(g===t||i(g,t,n,r,u)))return h.push(e)})){d=!1;break}}else if(g!==_&&!i(g,_,n,r,u)){d=!1;break}}return u.delete(t),u.delete(e),d}function ti(t){return Ri(Ai(t,o,Wi),t+"")}function ei(t){return Tr(t,xa,fi)}function ni(t){return Tr(t,Sa,li)}var ri=En?function(t){return En.get(t)}:as;function oi(t){for(var e=t.name+"",n=Rn[e],r=Mt.call(Rn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function ii(t){return(Mt.call(Yn,"placeholder")?Yn:t).placeholder}function ui(){var t=Yn.iteratee||rs;return t=t===rs?Mr:t,arguments.length?t(arguments[0],arguments[1]):t}function ai(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function si(t){for(var e=xa(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Ti(o)]}return e}function ci(t,e){var n=function(t,e){return null==t?o:t[e]}(t,e);return Nr(n)?n:o}var fi=ge?function(t){return null==t?[]:(t=At(t),Ee(ge(t),function(e){return $t.call(t,e)}))}:hs,li=ge?function(t){for(var e=[];t;)Ne(e,fi(t)),t=Wt(t);return e}:hs,pi=Or;function di(t,e,n){for(var r=-1,o=(e=yo(e,t)).length,i=!1;++r<o;){var u=Gi(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&Ju(o)&&_i(u,o)&&(Uu(t)||qu(t))}function hi(t){return"function"!=typeof t.constructor||ki(t)?{}:Qn(Wt(t))}function gi(t){return Uu(t)||qu(t)||!!(zt&&t&&t[zt])}function _i(t,e){var n=typeof t;return!!(e=e??l)&&("number"==n||"symbol"!=n&&yt.test(t))&&t>-1&&t%1==0&&t<e}function yi(t,e,n){if(!Xu(n))return!1;var r=typeof e;return!!("number"==r?Fu(n)&&_i(e,n.length):"string"==r&&e in n)&&Qu(n[e],t)}function vi(t,e){if(Uu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!aa(t))||X.test(t)||!J.test(t)||null!=e&&t in At(e)}function mi(t){var e=oi(t),n=Yn[e];if("function"!=typeof n||!(e in qn.prototype))return!1;if(t===n)return!0;var r=ri(n);return!!r&&t===r[0]}(Tn&&pi(new Tn(new ArrayBuffer(1)))!=N||On&&pi(new On)!=T||An&&pi(An.resolve())!=C||Cn&&pi(new Cn)!=I||wn&&pi(new wn)!=x)&&(pi=function(t){var e=Or(t),n=e==A?t.constructor:o,r=n?ji(n):"";if(r)switch(r){case xn:return N;case Sn:return T;case Nn:return C;case Mn:return I;case Dn:return x}return e});var bi=St?Ku:gs;function ki(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||xt)}function Ti(t){return t==t&&!Xu(t)}function Oi(t,e){return function(n){return null!=n&&n[t]===e&&(e!==o||t in At(n))}}function Ai(t,e,n){return e=_n(e===o?t.length-1:e,0),function(){for(var o=arguments,i=-1,u=_n(o.length-e,0),a=r(u);++i<u;)a[i]=o[e+i];i=-1;for(var s=r(e+1);++i<e;)s[i]=o[i];return s[e]=n(a),Oe(t,this,s)}}function Ci(t,e){return e.length<2?t:kr(t,to(e,0,-1))}function wi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Ii=Si(Zr),Ei=fe||function(t,e){return le.setTimeout(t,e)},Ri=Si(Jr);function xi(t,e,n){var r=e+"";return Ri(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ce(h,function(n){var r="_."+n[0];e&n[1]&&!Re(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(ut);return e?e[1].split(at):[]}(r),n)))}function Si(t){var e=0,n=0;return function(){var r=vn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(o,arguments)}}function Ni(t,e){var n=-1,r=t.length,i=r-1;for(e=e===o?r:e;++n<e;){var u=Fr(n,i),a=t[u];t[u]=t[n],t[n]=a}return t.length=e,t}var Mi,Di,Li=(Mi=Mu(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,function(t,n,r,o){e.push(r?o.replace(ft,"$1"):n||t)}),e},function(t){return 500===Di.size&&Di.clear(),t}),Di=Mi.cache,Mi);function Gi(t){if("string"==typeof t||aa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ji(t){if(null!=t){try{return Nt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Yi(t){if(t instanceof qn)return t.clone();var e=new Bn(t.__wrapped__,t.__chain__);return e.__actions__=Io(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Qi=Vr(function(t,e){return $u(t)?cr(t,gr(e,1,$u,!0)):[]}),Pi=Vr(function(t,e){var n=Hi(e);return $u(n)&&(n=o),$u(t)?cr(t,gr(e,1,$u,!0),ui(n,2)):[]}),Bi=Vr(function(t,e){var n=Hi(e);return $u(n)&&(n=o),$u(t)?cr(t,gr(e,1,$u,!0),o,n):[]});function qi(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:da(n);return o<0&&(o=_n(r+o,0)),Ye(t,ui(e,3),o)}function Ui(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return n!==o&&(i=da(n),i=n<0?_n(r+i,0):yn(i,r-1)),Ye(t,ui(e,3),i,!0)}function Wi(t){return null!=t&&t.length?gr(t,1):[]}function Fi(t){return t&&t.length?t[0]:o}var $i=Vr(function(t){var e=Se(t,go);return e.length&&e[0]===t[0]?Ir(e):[]}),Vi=Vr(function(t){var e=Hi(t),n=Se(t,go);return e===Hi(n)?e=o:n.pop(),n.length&&n[0]===t[0]?Ir(n,ui(e,2)):[]}),zi=Vr(function(t){var e=Hi(t),n=Se(t,go);return(e="function"==typeof e?e:o)&&n.pop(),n.length&&n[0]===t[0]?Ir(n,o,e):[]});function Hi(t){var e=null==t?0:t.length;return e?t[e-1]:o}var Ki=Vr(Zi);function Zi(t,e){return t&&t.length&&e&&e.length?Ur(t,e):t}var Ji=ti(function(t,e){var n=null==t?0:t.length,r=or(t,e);return Wr(t,Se(e,function(t){return _i(t,n)?+t:t}).sort(Ao)),r});function Xi(t){return null==t?t:kn.call(t)}var tu=Vr(function(t){return ao(gr(t,1,$u,!0))}),eu=Vr(function(t){var e=Hi(t);return $u(e)&&(e=o),ao(gr(t,1,$u,!0),ui(e,2))}),nu=Vr(function(t){var e=Hi(t);return e="function"==typeof e?e:o,ao(gr(t,1,$u,!0),o,e)});function ru(t){if(!t||!t.length)return[];var e=0;return t=Ee(t,function(t){if($u(t))return e=_n(t.length,e),!0}),Ve(e,function(e){return Se(t,Ue(e))})}function ou(t,e){if(!t||!t.length)return[];var n=ru(t);return null==e?n:Se(n,function(t){return Oe(e,o,t)})}var iu=Vr(function(t,e){return $u(t)?cr(t,e):[]}),uu=Vr(function(t){return po(Ee(t,$u))}),au=Vr(function(t){var e=Hi(t);return $u(e)&&(e=o),po(Ee(t,$u),ui(e,2))}),su=Vr(function(t){var e=Hi(t);return e="function"==typeof e?e:o,po(Ee(t,$u),o,e)}),cu=Vr(ru),fu=Vr(function(t){var e=t.length,n=e>1?t[e-1]:o;return n="function"==typeof n?(t.pop(),n):o,ou(t,n)});function lu(t){var e=Yn(t);return e.__chain__=!0,e}function pu(t,e){return e(t)}var du=ti(function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return or(e,t)};return!(e>1||this.__actions__.length)&&r instanceof qn&&_i(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:pu,args:[i],thisArg:o}),new Bn(r,this.__chain__).thru(function(t){return e&&!t.length&&t.push(o),t})):this.thru(i)}),hu=Ro(function(t,e,n){Mt.call(t,n)?++t[n]:rr(t,n,1)}),gu=Go(qi),_u=Go(Ui);function yu(t,e){return(Uu(t)?Ce:fr)(t,ui(e,3))}function vu(t,e){return(Uu(t)?we:lr)(t,ui(e,3))}var mu=Ro(function(t,e,n){Mt.call(t,n)?t[n].push(e):rr(t,n,[e])}),bu=Vr(function(t,e,n){var o=-1,i="function"==typeof e,u=Fu(t)?r(t.length):[];return fr(t,function(t){u[++o]=i?Oe(e,t,n):Er(t,e,n)}),u}),ku=Ro(function(t,e,n){rr(t,n,e)});function Tu(t,e){return(Uu(t)?Se:Gr)(t,ui(e,3))}var Ou=Ro(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]}),Au=Vr(function(t,e){if(null==t)return[];var n=e.length;return n>1&&yi(t,e[0],e[1])?e=[]:n>2&&yi(e[0],e[1],e[2])&&(e=[e[0]]),Br(t,gr(e,1),[])}),Cu=ce||function(){return le.Date.now()};function wu(t,e,n){return e=n?o:e,e=t&&null==e?t.length:e,Ho(t,c,o,o,o,o,e)}function Iu(t,e){var n;if("function"!=typeof e)throw new It(i);return t=da(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=o),n}}var Eu=Vr(function(t,e,n){var r=1;if(n.length){var o=an(n,ii(Eu));r|=s}return Ho(t,r,e,n,o)}),Ru=Vr(function(t,e,n){var r=3;if(n.length){var o=an(n,ii(Ru));r|=s}return Ho(e,r,t,n,o)});function xu(t,e,n){var r,u,a,s,c,f,l=0,p=!1,d=!1,h=!0;if("function"!=typeof t)throw new It(i);function g(e){var n=r,i=u;return r=u=o,l=e,s=t.apply(i,n)}function _(t){var n=t-f;return f===o||n>=e||n<0||d&&t-l>=a}function y(){var t=Cu();if(_(t))return v(t);c=Ei(y,function(t){var n=e-(t-f);return d?yn(n,a-(t-l)):n}(t))}function v(t){return c=o,h&&r?g(t):(r=u=o,s)}function m(){var t=Cu(),n=_(t);if(r=arguments,u=this,f=t,n){if(c===o)return function(t){return l=t,c=Ei(y,e),p?g(t):s}(f);if(d)return bo(c),c=Ei(y,e),g(f)}return c===o&&(c=Ei(y,e)),s}return e=ga(e)||0,Xu(n)&&(p=!!n.leading,a=(d="maxWait"in n)?_n(ga(n.maxWait)||0,e):a,h="trailing"in n?!!n.trailing:h),m.cancel=function(){c!==o&&bo(c),l=0,r=f=u=c=o},m.flush=function(){return c===o?s:v(Cu())},m}var Su=Vr(function(t,e){return sr(t,1,e)}),Nu=Vr(function(t,e,n){return sr(t,ga(e)||0,n)});function Mu(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new It(i);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Mu.Cache||Fn),n}function Du(t){if("function"!=typeof t)throw new It(i);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Mu.Cache=Fn;var Lu=vo(function(t,e){var n=(e=1==e.length&&Uu(e[0])?Se(e[0],He(ui())):Se(gr(e,1),He(ui()))).length;return Vr(function(r){for(var o=-1,i=yn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Oe(t,this,r)})}),Gu=Vr(function(t,e){var n=an(e,ii(Gu));return Ho(t,s,o,e,n)}),ju=Vr(function(t,e){var n=an(e,ii(ju));return Ho(t,64,o,e,n)}),Yu=ti(function(t,e){return Ho(t,256,o,o,o,e)});function Qu(t,e){return t===e||t!=t&&e!=e}var Pu=Wo(Ar),Bu=Wo(function(t,e){return t>=e}),qu=Rr(function(){return arguments}())?Rr:function(t){return ta(t)&&Mt.call(t,"callee")&&!$t.call(t,"callee")},Uu=r.isArray,Wu=ye?He(ye):function(t){return ta(t)&&Or(t)==S};function Fu(t){return null!=t&&Ju(t.length)&&!Ku(t)}function $u(t){return ta(t)&&Fu(t)}var Vu=_e||gs,zu=ve?He(ve):function(t){return ta(t)&&Or(t)==v};function Hu(t){if(!ta(t))return!1;var e=Or(t);return e==m||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!ra(t)}function Ku(t){if(!Xu(t))return!1;var e=Or(t);return e==b||e==k||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Zu(t){return"number"==typeof t&&t==da(t)}function Ju(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=l}function Xu(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ta(t){return null!=t&&"object"==typeof t}var ea=me?He(me):function(t){return ta(t)&&pi(t)==T};function na(t){return"number"==typeof t||ta(t)&&Or(t)==O}function ra(t){if(!ta(t)||Or(t)!=A)return!1;var e=Wt(t);if(null===e)return!0;var n=Mt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Nt.call(n)==jt}var oa=be?He(be):function(t){return ta(t)&&Or(t)==w},ia=ke?He(ke):function(t){return ta(t)&&pi(t)==I};function ua(t){return"string"==typeof t||!Uu(t)&&ta(t)&&Or(t)==E}function aa(t){return"symbol"==typeof t||ta(t)&&Or(t)==R}var sa=Te?He(Te):function(t){return ta(t)&&Ju(t.length)&&!!oe[Or(t)]},ca=Wo(Lr),fa=Wo(function(t,e){return t<=e});function la(t){if(!t)return[];if(Fu(t))return ua(t)?ln(t):Io(t);if(Ht&&t[Ht])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ht]());var e=pi(t);return(e==T?on:e==I?sn:Qa)(t)}function pa(t){return t?(t=ga(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function da(t){var e=pa(t),n=e%1;return e==e?n?e-n:e:0}function ha(t){return t?ir(da(t),0,d):0}function ga(t){if("number"==typeof t)return t;if(aa(t))return p;if(Xu(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xu(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=ze(t);var n=ht.test(t);return n||_t.test(t)?se(t.slice(2),n?2:8):dt.test(t)?p:+t}function _a(t){return Eo(t,Sa(t))}function ya(t){return null==t?"":uo(t)}var va=xo(function(t,e){if(ki(e)||Fu(e))Eo(e,xa(e),t);else for(var n in e)Mt.call(e,n)&&Xn(t,n,e[n])}),ma=xo(function(t,e){Eo(e,Sa(e),t)}),ba=xo(function(t,e,n,r){Eo(e,Sa(e),t,r)}),ka=xo(function(t,e,n,r){Eo(e,xa(e),t,r)}),Ta=ti(or),Oa=Vr(function(t,e){t=At(t);var n=-1,r=e.length,i=r>2?e[2]:o;for(i&&yi(e[0],e[1],i)&&(r=1);++n<r;)for(var u=e[n],a=Sa(u),s=-1,c=a.length;++s<c;){var f=a[s],l=t[f];(l===o||Qu(l,xt[f])&&!Mt.call(t,f))&&(t[f]=u[f])}return t}),Aa=Vr(function(t){return t.push(o,Zo),Oe(Ma,o,t)});function Ca(t,e,n){var r=null==t?o:kr(t,e);return r===o?n:r}function wa(t,e){return null!=t&&di(t,e,wr)}var Ia=Qo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Gt.call(e)),t[e]=n},Xa(ns)),Ea=Qo(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Gt.call(e)),Mt.call(t,e)?t[e].push(n):t[e]=[n]},ui),Ra=Vr(Er);function xa(t){return Fu(t)?zn(t):Dr(t)}function Sa(t){return Fu(t)?zn(t,!0):function(t){if(!Xu(t))return function(t){var e=[];if(null!=t)for(var n in At(t))e.push(n);return e}(t);var e=ki(t),n=[];for(var r in t)("constructor"!=r||!e&&Mt.call(t,r))&&n.push(r);return n}(t)}var Na=xo(function(t,e,n){Qr(t,e,n)}),Ma=xo(function(t,e,n,r){Qr(t,e,n,r)}),Da=ti(function(t,e){var n={};if(null==t)return n;var r=!1;e=Se(e,function(e){return e=yo(e,t),r||(r=e.length>1),e}),Eo(t,ni(t),n),r&&(n=ur(n,7,Jo));for(var o=e.length;o--;)so(n,e[o]);return n}),La=ti(function(t,e){return null==t?{}:function(t,e){return qr(t,e,function(e,n){return wa(t,n)})}(t,e)});function Ga(t,e){if(null==t)return{};var n=Se(ni(t),function(t){return[t]});return e=ui(e),qr(t,n,function(t,n){return e(t,n[0])})}var ja=zo(xa),Ya=zo(Sa);function Qa(t){return null==t?[]:Ke(t,xa(t))}var Pa=Do(function(t,e,n){return e=e.toLowerCase(),t+(n?Ba(e):e)});function Ba(t){return Ha(ya(t).toLowerCase())}function qa(t){return(t=ya(t))&&t.replace(vt,tn).replace(Zt,"")}var Ua=Do(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),Wa=Do(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),Fa=Mo("toLowerCase"),$a=Do(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}),Va=Do(function(t,e,n){return t+(n?" ":"")+Ha(e)}),za=Do(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),Ha=Mo("toUpperCase");function Ka(t,e,n){return t=ya(t),(e=n?o:e)===o?function(t){return ee.test(t)}(t)?function(t){return t.match(Xt)||[]}(t):function(t){return t.match(st)||[]}(t):t.match(e)||[]}var Za=Vr(function(t,e){try{return Oe(t,o,e)}catch(t){return Hu(t)?t:new kt(t)}}),Ja=ti(function(t,e){return Ce(e,function(e){e=Gi(e),rr(t,e,Eu(t[e],t))}),t});function Xa(t){return function(){return t}}var ts=jo(),es=jo(!0);function ns(t){return t}function rs(t){return Mr("function"==typeof t?t:ur(t,1))}var os=Vr(function(t,e){return function(n){return Er(n,t,e)}}),is=Vr(function(t,e){return function(n){return Er(t,n,e)}});function us(t,e,n){var r=xa(e),o=br(e,r);null!=n||Xu(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=br(e,xa(e)));var i=!(Xu(n)&&"chain"in n&&!n.chain),u=Ku(t);return Ce(o,function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__);return(n.__actions__=Io(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Ne([this.value()],arguments))})}),t}function as(){}var ss=Bo(Se),cs=Bo(Ie),fs=Bo(Le);function ls(t){return vi(t)?Ue(Gi(t)):function(t){return function(e){return kr(e,t)}}(t)}var ps=Uo(),ds=Uo(!0);function hs(){return[]}function gs(){return!1}var _s,ys=Po(function(t,e){return t+e},0),vs=$o("ceil"),ms=Po(function(t,e){return t/e},1),bs=$o("floor"),ks=Po(function(t,e){return t*e},1),Ts=$o("round"),Os=Po(function(t,e){return t-e},0);return Yn.after=function(t,e){if("function"!=typeof e)throw new It(i);return t=da(t),function(){if(--t<1)return e.apply(this,arguments)}},Yn.ary=wu,Yn.assign=va,Yn.assignIn=ma,Yn.assignInWith=ba,Yn.assignWith=ka,Yn.at=Ta,Yn.before=Iu,Yn.bind=Eu,Yn.bindAll=Ja,Yn.bindKey=Ru,Yn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Uu(t)?t:[t]},Yn.chain=lu,Yn.chunk=function(t,e,n){e=(n?yi(t,e,n):e===o)?1:_n(da(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var u=0,a=0,s=r(pe(i/e));u<i;)s[a++]=to(t,u,u+=e);return s},Yn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},Yn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],o=t;o--;)e[o-1]=arguments[o];return Ne(Uu(n)?Io(n):[n],gr(e,1))},Yn.cond=function(t){var e=null==t?0:t.length,n=ui();return t=e?Se(t,function(t){if("function"!=typeof t[1])throw new It(i);return[n(t[0]),t[1]]}):[],Vr(function(n){for(var r=-1;++r<e;){var o=t[r];if(Oe(o[0],this,n))return Oe(o[1],this,n)}})},Yn.conforms=function(t){return function(t){var e=xa(t);return function(n){return ar(n,t,e)}}(ur(t,1))},Yn.constant=Xa,Yn.countBy=hu,Yn.create=function(t,e){var n=Qn(t);return null==e?n:nr(n,e)},Yn.curry=function t(e,n,r){var i=Ho(e,8,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Yn.curryRight=function t(e,n,r){var i=Ho(e,16,o,o,o,o,o,n=r?o:n);return i.placeholder=t.placeholder,i},Yn.debounce=xu,Yn.defaults=Oa,Yn.defaultsDeep=Aa,Yn.defer=Su,Yn.delay=Nu,Yn.difference=Qi,Yn.differenceBy=Pi,Yn.differenceWith=Bi,Yn.drop=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=n||e===o?1:da(e))<0?0:e,r):[]},Yn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,0,(e=r-(e=n||e===o?1:da(e)))<0?0:e):[]},Yn.dropRightWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!0,!0):[]},Yn.dropWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!0):[]},Yn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&yi(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=da(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:da(r))<0&&(r+=i),r=n>r?0:ha(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Yn.filter=function(t,e){return(Uu(t)?Ee:hr)(t,ui(e,3))},Yn.flatMap=function(t,e){return gr(Tu(t,e),1)},Yn.flatMapDeep=function(t,e){return gr(Tu(t,e),f)},Yn.flatMapDepth=function(t,e,n){return n=n===o?1:da(n),gr(Tu(t,e),n)},Yn.flatten=Wi,Yn.flattenDeep=function(t){return null!=t&&t.length?gr(t,f):[]},Yn.flattenDepth=function(t,e){return null!=t&&t.length?gr(t,e=e===o?1:da(e)):[]},Yn.flip=function(t){return Ho(t,512)},Yn.flow=ts,Yn.flowRight=es,Yn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];rr(r,o[0],o[1])}return r},Yn.functions=function(t){return null==t?[]:br(t,xa(t))},Yn.functionsIn=function(t){return null==t?[]:br(t,Sa(t))},Yn.groupBy=mu,Yn.initial=function(t){return null!=t&&t.length?to(t,0,-1):[]},Yn.intersection=$i,Yn.intersectionBy=Vi,Yn.intersectionWith=zi,Yn.invert=Ia,Yn.invertBy=Ea,Yn.invokeMap=bu,Yn.iteratee=rs,Yn.keyBy=ku,Yn.keys=xa,Yn.keysIn=Sa,Yn.map=Tu,Yn.mapKeys=function(t,e){var n={};return e=ui(e,3),vr(t,function(t,r,o){rr(n,e(t,r,o),t)}),n},Yn.mapValues=function(t,e){var n={};return e=ui(e,3),vr(t,function(t,r,o){rr(n,r,e(t,r,o))}),n},Yn.matches=function(t){return jr(ur(t,1))},Yn.matchesProperty=function(t,e){return Yr(t,ur(e,1))},Yn.memoize=Mu,Yn.merge=Na,Yn.mergeWith=Ma,Yn.method=os,Yn.methodOf=is,Yn.mixin=us,Yn.negate=Du,Yn.nthArg=function(t){return t=da(t),Vr(function(e){return Pr(e,t)})},Yn.omit=Da,Yn.omitBy=function(t,e){return Ga(t,Du(ui(e)))},Yn.once=function(t){return Iu(2,t)},Yn.orderBy=function(t,e,n,r){return null==t?[]:(Uu(e)||(e=null==e?[]:[e]),Uu(n=r?o:n)||(n=null==n?[]:[n]),Br(t,e,n))},Yn.over=ss,Yn.overArgs=Lu,Yn.overEvery=cs,Yn.overSome=fs,Yn.partial=Gu,Yn.partialRight=ju,Yn.partition=Ou,Yn.pick=La,Yn.pickBy=Ga,Yn.property=ls,Yn.propertyOf=function(t){return function(e){return null==t?o:kr(t,e)}},Yn.pull=Ki,Yn.pullAll=Zi,Yn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,ui(n,2)):t},Yn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Ur(t,e,o,n):t},Yn.pullAt=Ji,Yn.range=ps,Yn.rangeRight=ds,Yn.rearg=Yu,Yn.reject=function(t,e){return(Uu(t)?Ee:hr)(t,Du(ui(e,3)))},Yn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=ui(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return Wr(t,o),n},Yn.rest=function(t,e){if("function"!=typeof t)throw new It(i);return Vr(t,e=e===o?e:da(e))},Yn.reverse=Xi,Yn.sampleSize=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:da(e),(Uu(t)?Kn:Hr)(t,e)},Yn.set=function(t,e,n){return null==t?t:Kr(t,e,n)},Yn.setWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:Kr(t,e,n,r)},Yn.shuffle=function(t){return(Uu(t)?Zn:Xr)(t)},Yn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&yi(t,e,n)?(e=0,n=r):(e=null==e?0:da(e),n=n===o?r:da(n)),to(t,e,n)):[]},Yn.sortBy=Au,Yn.sortedUniq=function(t){return t&&t.length?oo(t):[]},Yn.sortedUniqBy=function(t,e){return t&&t.length?oo(t,ui(e,2)):[]},Yn.split=function(t,e,n){return n&&"number"!=typeof n&&yi(t,e,n)&&(e=n=o),(n=n===o?d:n>>>0)?(t=ya(t))&&("string"==typeof e||null!=e&&!oa(e))&&!(e=uo(e))&&rn(t)?mo(ln(t),0,n):t.split(e,n):[]},Yn.spread=function(t,e){if("function"!=typeof t)throw new It(i);return e=null==e?0:_n(da(e),0),Vr(function(n){var r=n[e],o=mo(n,0,e);return r&&Ne(o,r),Oe(t,this,o)})},Yn.tail=function(t){var e=null==t?0:t.length;return e?to(t,1,e):[]},Yn.take=function(t,e,n){return t&&t.length?to(t,0,(e=n||e===o?1:da(e))<0?0:e):[]},Yn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?to(t,(e=r-(e=n||e===o?1:da(e)))<0?0:e,r):[]},Yn.takeRightWhile=function(t,e){return t&&t.length?fo(t,ui(e,3),!1,!0):[]},Yn.takeWhile=function(t,e){return t&&t.length?fo(t,ui(e,3)):[]},Yn.tap=function(t,e){return e(t),t},Yn.throttle=function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new It(i);return Xu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),xu(t,e,{leading:r,maxWait:e,trailing:o})},Yn.thru=pu,Yn.toArray=la,Yn.toPairs=ja,Yn.toPairsIn=Ya,Yn.toPath=function(t){return Uu(t)?Se(t,Gi):aa(t)?[t]:Io(Li(ya(t)))},Yn.toPlainObject=_a,Yn.transform=function(t,e,n){var r=Uu(t),o=r||Vu(t)||sa(t);if(e=ui(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:Xu(t)&&Ku(i)?Qn(Wt(t)):{}}return(o?Ce:vr)(t,function(t,r,o){return e(n,t,r,o)}),n},Yn.unary=function(t){return wu(t,1)},Yn.union=tu,Yn.unionBy=eu,Yn.unionWith=nu,Yn.uniq=function(t){return t&&t.length?ao(t):[]},Yn.uniqBy=function(t,e){return t&&t.length?ao(t,ui(e,2)):[]},Yn.uniqWith=function(t,e){return e="function"==typeof e?e:o,t&&t.length?ao(t,o,e):[]},Yn.unset=function(t,e){return null==t||so(t,e)},Yn.unzip=ru,Yn.unzipWith=ou,Yn.update=function(t,e,n){return null==t?t:co(t,e,_o(n))},Yn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:o,null==t?t:co(t,e,_o(n),r)},Yn.values=Qa,Yn.valuesIn=function(t){return null==t?[]:Ke(t,Sa(t))},Yn.without=iu,Yn.words=Ka,Yn.wrap=function(t,e){return Gu(_o(e),t)},Yn.xor=uu,Yn.xorBy=au,Yn.xorWith=su,Yn.zip=cu,Yn.zipObject=function(t,e){return ho(t||[],e||[],Xn)},Yn.zipObjectDeep=function(t,e){return ho(t||[],e||[],Kr)},Yn.zipWith=fu,Yn.entries=ja,Yn.entriesIn=Ya,Yn.extend=ma,Yn.extendWith=ba,us(Yn,Yn),Yn.add=ys,Yn.attempt=Za,Yn.camelCase=Pa,Yn.capitalize=Ba,Yn.ceil=vs,Yn.clamp=function(t,e,n){return n===o&&(n=e,e=o),n!==o&&(n=(n=ga(n))==n?n:0),e!==o&&(e=(e=ga(e))==e?e:0),ir(ga(t),e,n)},Yn.clone=function(t){return ur(t,4)},Yn.cloneDeep=function(t){return ur(t,5)},Yn.cloneDeepWith=function(t,e){return ur(t,5,e="function"==typeof e?e:o)},Yn.cloneWith=function(t,e){return ur(t,4,e="function"==typeof e?e:o)},Yn.conformsTo=function(t,e){return null==e||ar(t,e,xa(e))},Yn.deburr=qa,Yn.defaultTo=function(t,e){return null==t||t!=t?e:t},Yn.divide=ms,Yn.endsWith=function(t,e,n){t=ya(t),e=uo(e);var r=t.length,i=n=n===o?r:ir(da(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Yn.eq=Qu,Yn.escape=function(t){return(t=ya(t))&&z.test(t)?t.replace($,en):t},Yn.escapeRegExp=function(t){return(t=ya(t))&&nt.test(t)?t.replace(et,"\\$&"):t},Yn.every=function(t,e,n){var r=Uu(t)?Ie:pr;return n&&yi(t,e,n)&&(e=o),r(t,ui(e,3))},Yn.find=gu,Yn.findIndex=qi,Yn.findKey=function(t,e){return je(t,ui(e,3),vr)},Yn.findLast=_u,Yn.findLastIndex=Ui,Yn.findLastKey=function(t,e){return je(t,ui(e,3),mr)},Yn.floor=bs,Yn.forEach=yu,Yn.forEachRight=vu,Yn.forIn=function(t,e){return null==t?t:_r(t,ui(e,3),Sa)},Yn.forInRight=function(t,e){return null==t?t:yr(t,ui(e,3),Sa)},Yn.forOwn=function(t,e){return t&&vr(t,ui(e,3))},Yn.forOwnRight=function(t,e){return t&&mr(t,ui(e,3))},Yn.get=Ca,Yn.gt=Pu,Yn.gte=Bu,Yn.has=function(t,e){return null!=t&&di(t,e,Cr)},Yn.hasIn=wa,Yn.head=Fi,Yn.identity=ns,Yn.includes=function(t,e,n,r){t=Fu(t)?t:Qa(t),n=n&&!r?da(n):0;var o=t.length;return n<0&&(n=_n(o+n,0)),ua(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Qe(t,e,n)>-1},Yn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:da(n);return o<0&&(o=_n(r+o,0)),Qe(t,e,o)},Yn.inRange=function(t,e,n){return e=pa(e),n===o?(n=e,e=0):n=pa(n),function(t,e,n){return t>=yn(e,n)&&t<_n(e,n)}(t=ga(t),e,n)},Yn.invoke=Ra,Yn.isArguments=qu,Yn.isArray=Uu,Yn.isArrayBuffer=Wu,Yn.isArrayLike=Fu,Yn.isArrayLikeObject=$u,Yn.isBoolean=function(t){return!0===t||!1===t||ta(t)&&Or(t)==y},Yn.isBuffer=Vu,Yn.isDate=zu,Yn.isElement=function(t){return ta(t)&&1===t.nodeType&&!ra(t)},Yn.isEmpty=function(t){if(null==t)return!0;if(Fu(t)&&(Uu(t)||"string"==typeof t||"function"==typeof t.splice||Vu(t)||sa(t)||qu(t)))return!t.length;var e=pi(t);if(e==T||e==I)return!t.size;if(ki(t))return!Dr(t).length;for(var n in t)if(Mt.call(t,n))return!1;return!0},Yn.isEqual=function(t,e){return xr(t,e)},Yn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:o)?n(t,e):o;return r===o?xr(t,e,o,n):!!r},Yn.isError=Hu,Yn.isFinite=function(t){return"number"==typeof t&&Ge(t)},Yn.isFunction=Ku,Yn.isInteger=Zu,Yn.isLength=Ju,Yn.isMap=ea,Yn.isMatch=function(t,e){return t===e||Sr(t,e,si(e))},Yn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:o,Sr(t,e,si(e),n)},Yn.isNaN=function(t){return na(t)&&t!=+t},Yn.isNative=function(t){if(bi(t))throw new kt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},Yn.isNil=function(t){return null==t},Yn.isNull=function(t){return null===t},Yn.isNumber=na,Yn.isObject=Xu,Yn.isObjectLike=ta,Yn.isPlainObject=ra,Yn.isRegExp=oa,Yn.isSafeInteger=function(t){return Zu(t)&&t>=-9007199254740991&&t<=l},Yn.isSet=ia,Yn.isString=ua,Yn.isSymbol=aa,Yn.isTypedArray=sa,Yn.isUndefined=function(t){return t===o},Yn.isWeakMap=function(t){return ta(t)&&pi(t)==x},Yn.isWeakSet=function(t){return ta(t)&&"[object WeakSet]"==Or(t)},Yn.join=function(t,e){return null==t?"":We.call(t,e)},Yn.kebabCase=Ua,Yn.last=Hi,Yn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=da(n))<0?_n(r+i,0):yn(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Ye(t,Be,i,!0)},Yn.lowerCase=Wa,Yn.lowerFirst=Fa,Yn.lt=ca,Yn.lte=fa,Yn.max=function(t){return t&&t.length?dr(t,ns,Ar):o},Yn.maxBy=function(t,e){return t&&t.length?dr(t,ui(e,2),Ar):o},Yn.mean=function(t){return qe(t,ns)},Yn.meanBy=function(t,e){return qe(t,ui(e,2))},Yn.min=function(t){return t&&t.length?dr(t,ns,Lr):o},Yn.minBy=function(t,e){return t&&t.length?dr(t,ui(e,2),Lr):o},Yn.stubArray=hs,Yn.stubFalse=gs,Yn.stubObject=function(){return{}},Yn.stubString=function(){return""},Yn.stubTrue=function(){return!0},Yn.multiply=ks,Yn.nth=function(t,e){return t&&t.length?Pr(t,da(e)):o},Yn.noConflict=function(){return le._===this&&(le._=Yt),this},Yn.noop=as,Yn.now=Cu,Yn.pad=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return qo(de(o),n)+t+qo(pe(o),n)},Yn.padEnd=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;return e&&r<e?t+qo(e-r,n):t},Yn.padStart=function(t,e,n){t=ya(t);var r=(e=da(e))?fn(t):0;return e&&r<e?qo(e-r,n)+t:t},Yn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),mn(ya(t).replace(rt,""),e||0)},Yn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&yi(t,e,n)&&(e=n=o),n===o&&("boolean"==typeof e?(n=e,e=o):"boolean"==typeof t&&(n=t,t=o)),t===o&&e===o?(t=0,e=1):(t=pa(t),e===o?(e=t,t=0):e=pa(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=bn();return yn(t+i*(e-t+ae("1e-"+((i+"").length-1))),e)}return Fr(t,e)},Yn.reduce=function(t,e,n){var r=Uu(t)?Me:Fe,o=arguments.length<3;return r(t,ui(e,4),n,o,fr)},Yn.reduceRight=function(t,e,n){var r=Uu(t)?De:Fe,o=arguments.length<3;return r(t,ui(e,4),n,o,lr)},Yn.repeat=function(t,e,n){return e=(n?yi(t,e,n):e===o)?1:da(e),$r(ya(t),e)},Yn.replace=function(){var t=arguments,e=ya(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Yn.result=function(t,e,n){var r=-1,i=(e=yo(e,t)).length;for(i||(i=1,t=o);++r<i;){var u=null==t?o:t[Gi(e[r])];u===o&&(r=i,u=n),t=Ku(u)?u.call(t):u}return t},Yn.round=Ts,Yn.runInContext=t,Yn.sample=function(t){return(Uu(t)?Hn:zr)(t)},Yn.size=function(t){if(null==t)return 0;if(Fu(t))return ua(t)?fn(t):t.length;var e=pi(t);return e==T||e==I?t.size:Dr(t).length},Yn.snakeCase=$a,Yn.some=function(t,e,n){var r=Uu(t)?Le:eo;return n&&yi(t,e,n)&&(e=o),r(t,ui(e,3))},Yn.sortedIndex=function(t,e){return no(t,e)},Yn.sortedIndexBy=function(t,e,n){return ro(t,e,ui(n,2))},Yn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=no(t,e);if(r<n&&Qu(t[r],e))return r}return-1},Yn.sortedLastIndex=function(t,e){return no(t,e,!0)},Yn.sortedLastIndexBy=function(t,e,n){return ro(t,e,ui(n,2),!0)},Yn.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=no(t,e,!0)-1;if(Qu(t[n],e))return n}return-1},Yn.startCase=Va,Yn.startsWith=function(t,e,n){return t=ya(t),n=null==n?0:ir(da(n),0,t.length),e=uo(e),t.slice(n,n+e.length)==e},Yn.subtract=Os,Yn.sum=function(t){return t&&t.length?$e(t,ns):0},Yn.sumBy=function(t,e){return t&&t.length?$e(t,ui(e,2)):0},Yn.template=function(t,e,n){var r=Yn.templateSettings;n&&yi(t,e,n)&&(e=o),t=ya(t),e=ka({},e,r,Ko);var i=ka({},e.imports,r.imports,Ko),u=xa(i),a=Ke(i,u);Ce(u,function(t){if(ct.test(t))throw new kt("Invalid `imports` option passed into `_.template`")});var s,c,f=0,l=e.interpolate||mt,p="__p += '",d=Ct((e.escape||mt).source+"|"+l.source+"|"+(l===Z?lt:mt).source+"|"+(e.evaluate||mt).source+"|$","g"),h="//# sourceURL="+(Mt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++re+"]")+"\n";t.replace(d,function(e,n,r,o,i,u){return r||(r=o),p+=t.slice(f,u).replace(bt,nn),n&&(s=!0,p+="' +\n__e("+n+") +\n'"),i&&(c=!0,p+="';\n"+i+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),f=u+e.length,e}),p+="';\n";var g=Mt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new kt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(c?p.replace(q,""):p).replace(U,"$1").replace(W,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var _=Za(function(){return Tt(u,h+"return "+p).apply(o,a)});if(_.source=p,Hu(_))throw _;return _},Yn.times=function(t,e){if((t=da(t))<1||t>l)return[];var n=d,r=yn(t,d);e=ui(e),t-=d;for(var o=Ve(r,e);++n<t;)e(n);return o},Yn.toFinite=pa,Yn.toInteger=da,Yn.toLength=ha,Yn.toLower=function(t){return ya(t).toLowerCase()},Yn.toNumber=ga,Yn.toSafeInteger=function(t){return t?ir(da(t),-9007199254740991,l):0===t?t:0},Yn.toString=ya,Yn.toUpper=function(t){return ya(t).toUpperCase()},Yn.trim=function(t,e,n){if((t=ya(t))&&(n||e===o))return ze(t);if(!t||!(e=uo(e)))return t;var r=ln(t),i=ln(e);return mo(r,Je(r,i),Xe(r,i)+1).join("")},Yn.trimEnd=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.slice(0,pn(t)+1);if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,0,Xe(r,ln(e))+1).join("")},Yn.trimStart=function(t,e,n){if((t=ya(t))&&(n||e===o))return t.replace(rt,"");if(!t||!(e=uo(e)))return t;var r=ln(t);return mo(r,Je(r,ln(e))).join("")},Yn.truncate=function(t,e){var n=30,r="...";if(Xu(e)){var i="separator"in e?e.separator:i;n="length"in e?da(e.length):n,r="omission"in e?uo(e.omission):r}var u=(t=ya(t)).length;if(rn(t)){var a=ln(t);u=a.length}if(n>=u)return t;var s=n-fn(r);if(s<1)return r;var c=a?mo(a,0,s).join(""):t.slice(0,s);if(i===o)return c+r;if(a&&(s+=c.length-s),oa(i)){if(t.slice(s).search(i)){var f,l=c;for(i.global||(i=Ct(i.source,ya(pt.exec(i))+"g")),i.lastIndex=0;f=i.exec(l);)var p=f.index;c=c.slice(0,p===o?s:p)}}else if(t.indexOf(uo(i),s)!=s){var d=c.lastIndexOf(i);d>-1&&(c=c.slice(0,d))}return c+r},Yn.unescape=function(t){return(t=ya(t))&&V.test(t)?t.replace(F,dn):t},Yn.uniqueId=function(t){var e=++Dt;return ya(t)+e},Yn.upperCase=za,Yn.upperFirst=Ha,Yn.each=yu,Yn.eachRight=vu,Yn.first=Fi,us(Yn,(_s={},vr(Yn,function(t,e){Mt.call(Yn.prototype,e)||(_s[e]=t)}),_s),{chain:!1}),Yn.VERSION="4.18.1",Ce(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){Yn[t].placeholder=Yn}),Ce(["drop","take"],function(t,e){qn.prototype[t]=function(n){n=n===o?1:_n(da(n),0);var r=this.__filtered__&&!e?new qn(this):this.clone();return r.__filtered__?r.__takeCount__=yn(n,r.__takeCount__):r.__views__.push({size:yn(n,d),type:t+(r.__dir__<0?"Right":"")}),r},qn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),Ce(["filter","map","takeWhile"],function(t,e){var n=e+1,r=1==n||3==n;qn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:ui(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),Ce(["head","last"],function(t,e){var n="take"+(e?"Right":"");qn.prototype[t]=function(){return this[n](1).value()[0]}}),Ce(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");qn.prototype[t]=function(){return this.__filtered__?new qn(this):this[n](1)}}),qn.prototype.compact=function(){return this.filter(ns)},qn.prototype.find=function(t){return this.filter(t).head()},qn.prototype.findLast=function(t){return this.reverse().find(t)},qn.prototype.invokeMap=Vr(function(t,e){return"function"==typeof t?new qn(this):this.map(function(n){return Er(n,t,e)})}),qn.prototype.reject=function(t){return this.filter(Du(ui(t)))},qn.prototype.slice=function(t,e){t=da(t);var n=this;return n.__filtered__&&(t>0||e<0)?new qn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==o&&(n=(e=da(e))<0?n.dropRight(-e):n.take(e-t)),n)},qn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},qn.prototype.toArray=function(){return this.take(d)},vr(qn.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Yn[r?"take"+("last"==e?"Right":""):e],u=r||/^find/.test(e);i&&(Yn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,s=e instanceof qn,c=a[0],f=s||Uu(e),l=function(t){var e=i.apply(Yn,Ne([t],a));return r&&p?e[0]:e};f&&n&&"function"==typeof c&&1!=c.length&&(s=f=!1);var p=this.__chain__,d=!!this.__actions__.length,h=u&&!p,g=s&&!d;if(!u&&f){e=g?e:new qn(this);var _=t.apply(e,a);return _.__actions__.push({func:pu,args:[l],thisArg:o}),new Bn(_,p)}return h&&g?t.apply(this,a):(_=this.thru(l),h?r?_.value()[0]:_.value():_)})}),Ce(["pop","push","shift","sort","splice","unshift"],function(t){var e=Et[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Yn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Uu(o)?o:[],t)}return this[n](function(n){return e.apply(Uu(n)?n:[],t)})}}),vr(qn.prototype,function(t,e){var n=Yn[e];if(n){var r=n.name+"";Mt.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:e,func:n})}}),Rn[Yo(o,2).name]=[{name:"wrapper",func:o}],qn.prototype.clone=function(){var t=new qn(this.__wrapped__);return t.__actions__=Io(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Io(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Io(this.__views__),t},qn.prototype.reverse=function(){if(this.__filtered__){var t=new qn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},qn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Uu(t),r=e<0,o=n?t.length:0,i=function(t,e,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=yn(e,t+u);break;case"takeRight":t=_n(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,s=a-u,c=r?a:u-1,f=this.__iteratees__,l=f.length,p=0,d=yn(s,this.__takeCount__);if(!n||!r&&o==s&&d==s)return lo(t,this.__actions__);var h=[];t:for(;s--&&p<d;){for(var g=-1,_=t[c+=e];++g<l;){var y=f[g],v=y.iteratee,m=y.type,b=v(_);if(2==m)_=b;else if(!b){if(1==m)continue t;break t}}h[p++]=_}return h},Yn.prototype.at=du,Yn.prototype.chain=function(){return lu(this)},Yn.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},Yn.prototype.next=function(){this.__values__===o&&(this.__values__=la(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?o:this.__values__[this.__index__++]}},Yn.prototype.plant=function(t){for(var e,n=this;n instanceof Pn;){var r=Yi(n);r.__index__=0,r.__values__=o,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Yn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof qn){var e=t;return this.__actions__.length&&(e=new qn(this)),(e=e.reverse()).__actions__.push({func:pu,args:[Xi],thisArg:o}),new Bn(e,this.__chain__)}return this.thru(Xi)},Yn.prototype.toJSON=Yn.prototype.valueOf=Yn.prototype.value=function(){return lo(this.__wrapped__,this.__actions__)},Yn.prototype.first=Yn.prototype.head,Ht&&(Yn.prototype[Ht]=function(){return this}),Yn}();le._=hn,(r=function(){return hn}.call(e,n,e,t))===o||(t.exports=r)}.call(this)}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n.r(r),n.d(r,{ApiCallContext:()=>Pt,CronExpression:()=>Bt,DistributedLockContext:()=>qt,GraphqlContext:()=>Ut,MUTATION_TYPES:()=>Wt,Meta:()=>h,MutationContext:()=>Ft,QueryContext:()=>Tt,SecureAiAgentContext:()=>Qt,SquidLlmService:()=>jt,SquidProject:()=>Yt,SquidService:()=>xt,USER_CODE_MODULE_ID:()=>$,USER_CODE_PYTHON_MODULE_ID:()=>V,aiFunction:()=>E,aiFunctionsConfigurator:()=>R,clientConnectionStateHandler:()=>q,createWebhookResponse:()=>$t,eventHandler:()=>w,executable:()=>I,getPassiveSquid:()=>Gt,getSquid:()=>Lt,getSquidService:()=>Nt,limiterConfigToOptions:()=>W,limits:()=>G,llmAsk:()=>Y,llmService:()=>j,mcpAuthorizer:()=>B,mcpServer:()=>Q,mcpTool:()=>P,metadata:()=>_,onQueueMessage:()=>C,scheduler:()=>S,secureAiAgent:()=>L,secureAiQuery:()=>v,secureApi:()=>O,secureCollection:()=>m,secureDatabase:()=>y,secureDistributedLock:()=>D,secureGraphQL:()=>A,secureMetric:()=>T,secureNativeQuery:()=>M,secureStorage:()=>b,secureTopic:()=>k,squidInject:()=>Mt,trigger:()=>x,webhook:()=>N});const t=require("@squidcloud/client");let e=t=>new Error(t);function o(t,n,...r){t||function(t,...n){const r=u(t);if("object"==typeof r)throw r;throw e(r||"Assertion error",...n)}(n,...r)}function i(t,e,...n){return o(t,e,...n),t}function u(t){return void 0===t?"":"string"==typeof t?t:t()}const a=(t,e=void 0)=>{o(function(t){return"string"==typeof t}(t),()=>function(t,e,n){const r=u(t);if("object"==typeof r)throw r;return`${r?`${r}: `:""}${e} ${function(t){return void 0===t?"<undefined>":"symbol"==typeof t?t.toString():null===t?"<null>":`<${typeof t}:${t}>`}(n)}`}(e,"Not a string",t))};function s(t){const e=t.split(":");return o(2===e.length,`Invalid service function name: ${t}`),e[1]}var c=n(243);const f=["gpt-5.4-mini","gpt-5.4-nano","gpt-5.5","gpt-5.5-pro","gpt-4o","gpt-4o-mini","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","o1","o3","o3-mini","o4-mini","gpt-5","gpt-5-mini","gpt-5-nano","gpt-5.1","gpt-5.2","gpt-5.2-pro","gpt-5.4","claude-haiku-4-5-20251001","claude-opus-4-8","claude-sonnet-4-6","claude-3-7-sonnet-latest","claude-opus-4-1-20250805","claude-opus-4-20250514","claude-opus-4-5-20251101","claude-opus-4-6","claude-opus-4-7","claude-sonnet-4-20250514","claude-sonnet-4-5-20250929","gemini-3.1-pro","gemini-3.5-flash","gemini-3.1-flash-lite","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-3-flash","gemini-3-pro","grok-4","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-3","grok-3-fast","grok-3-mini","grok-3-mini-fast","grok-4-fast-reasoning","grok-4-fast-non-reasoning","bedrock-claude-sonnet-4-5"];function l(t){return f.includes(t)}const p={"gpt-4o":{name:"gpt-4o",displayName:"GPT-4o",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-4o-mini":{name:"gpt-4o-mini",displayName:"GPT-4o Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:16384,contextWindowTokens:128e3,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-4.1":{name:"gpt-4.1",displayName:"GPT-4.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-4.1-mini":{name:"gpt-4.1-mini",displayName:"GPT-4.1 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-4.1-nano":{name:"gpt-4.1-nano",displayName:"GPT-4.1 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:32768,contextWindowTokens:1047576,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-nano"},o1:{name:"o1",displayName:"GPT-o1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},o3:{name:"o3",displayName:"GPT-o3",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"o3-mini":{name:"o3-mini",displayName:"GPT-o3 Mini",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"o4-mini":{name:"o4-mini",displayName:"GPT-o4 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:1e5,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!0,supportsStructuredOutput:!1,replacedBy:"gpt-5.4-mini"},"gpt-5":{name:"gpt-5",displayName:"GPT-5",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gpt-5.5"},"gpt-5-mini":{name:"gpt-5-mini",displayName:"GPT-5 Mini",description:"Legacy fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.4-mini"},"gpt-5-nano":{name:"gpt-5-nano",displayName:"GPT-5 Nano",description:"Legacy lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.4-nano"},"gpt-5.1":{name:"gpt-5.1",displayName:"GPT-5.1",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.2":{name:"gpt-5.2",displayName:"GPT-5.2",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.2-pro":{name:"gpt-5.2-pro",displayName:"GPT-5.2 Pro",description:"Legacy most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5-pro"},"gpt-5.4":{name:"gpt-5.4",displayName:"GPT-5.4",description:"Legacy powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gpt-5.5"},"gpt-5.4-mini":{name:"gpt-5.4-mini",displayName:"GPT-5.4 Mini",description:"Fast and efficient",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.4-nano":{name:"gpt-5.4-nano",displayName:"GPT-5.4 Nano",description:"Lightweight and quick",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:4e5,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.5":{name:"gpt-5.5",displayName:"GPT-5.5",description:"Powerful and versatile",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"gpt-5.5-pro":{name:"gpt-5.5-pro",displayName:"GPT-5.5 Pro",description:"Most advanced OpenAI model",providerType:"openai",maxOutputTokens:128e3,contextWindowTokens:105e4,tokenQuotaCategory:"numberOfGpt4Tokens",chatQuotaCategory:"numberOfGpt4Chats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!0},"claude-sonnet-4-6":{name:"claude-sonnet-4-6",displayName:"Claude Sonnet 4.6",description:"Balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!0,supportsStructuredOutput:!0},"claude-sonnet-4-5-20250929":{name:"claude-sonnet-4-5-20250929",displayName:"Claude Sonnet 4.5",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-sonnet-4-6"},"claude-3-7-sonnet-latest":{name:"claude-3-7-sonnet-latest",displayName:"Claude Sonnet 3.7",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-4-6",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-haiku-4-5-20251001":{name:"claude-haiku-4-5-20251001",displayName:"Claude Haiku 4.5",description:"Fastest responses",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-opus-4-20250514":{name:"claude-opus-4-20250514",displayName:"Claude Opus 4",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-4-8",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"claude-opus-4-1-20250805":{name:"claude-opus-4-1-20250805",displayName:"Claude Opus 4.1",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:32e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-opus-4-8",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"claude-opus-4-5-20251101":{name:"claude-opus-4-5-20251101",displayName:"Claude Opus 4.5",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-6":{name:"claude-opus-4-6",displayName:"Claude Opus 4.6",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-7":{name:"claude-opus-4-7",displayName:"Claude Opus 4.7",description:"Legacy most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,usesAdaptiveThinking:!0,replacedBy:"claude-opus-4-8"},"claude-opus-4-8":{name:"claude-opus-4-8",displayName:"Claude Opus 4.8",description:"Most capable Anthropic model",providerType:"anthropic",maxOutputTokens:128e3,contextWindowTokens:1e6,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,usesAdaptiveThinking:!0},"claude-sonnet-4-20250514":{name:"claude-sonnet-4-20250514",displayName:"Claude Sonnet 4",description:"Legacy balanced performance",providerType:"anthropic",maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",replacedBy:"claude-sonnet-4-6",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"bedrock-claude-sonnet-4-5":{name:"bedrock-claude-sonnet-4-5",vendorModelName:"us.anthropic.claude-sonnet-4-5-20250929-v1:0",displayName:"Claude Sonnet 4.5 (Bedrock)",description:"Claude Sonnet hosted on AWS Bedrock",providerType:"bedrock",requiresExplicitAvailability:!0,maxOutputTokens:64e3,contextWindowTokens:2e5,tokenQuotaCategory:"numberOfClaude2Tokens",chatQuotaCategory:"numberOfClaude2Chats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-2.5-flash":{name:"gemini-2.5-flash",displayName:"Gemini Flash 2.5",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.5-flash"},"gemini-2.5-pro":{name:"gemini-2.5-pro",displayName:"Gemini Pro 2.5",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.1-pro"},"gemini-2.5-flash-lite":{name:"gemini-2.5-flash-lite",displayName:"Gemini Flash 2.5 Lite",description:"Legacy lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1,replacedBy:"gemini-3.1-flash-lite"},"gemini-3-flash":{name:"gemini-3-flash",vendorModelName:"gemini-3-flash-preview",displayName:"Gemini Flash 3",description:"Legacy fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gemini-3.5-flash"},"gemini-3.1-flash-lite":{name:"gemini-3.1-flash-lite",displayName:"Gemini Flash 3.1 Lite",description:"Lightweight Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-3.5-flash":{name:"gemini-3.5-flash",displayName:"Gemini Flash 3.5",description:"Fast and efficient",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"gemini-3-pro":{name:"gemini-3-pro",vendorModelName:"gemini-3-pro-preview",displayName:"Gemini Pro 3",description:"Legacy most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0,replacedBy:"gemini-3.1-pro"},"gemini-3.1-pro":{name:"gemini-3.1-pro",vendorModelName:"gemini-3.1-pro-preview",displayName:"Gemini Pro 3.1",description:"Most capable Gemini model",providerType:"gemini",maxOutputTokens:65535,contextWindowTokens:1048576,tokenQuotaCategory:"numberOfGeminiProTokens",chatQuotaCategory:"numberOfGeminiProChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!0},"grok-3":{name:"grok-3",displayName:"Grok-3",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-fast":{name:"grok-3-fast",displayName:"Grok-3 Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-mini":{name:"grok-3-mini",displayName:"Grok-3 Mini",description:"Legacy most capable Grok model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-3-mini-fast":{name:"grok-3-mini-fast",displayName:"Grok-3 Mini Fast",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:16e3,contextWindowTokens:131072,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4":{name:"grok-4",displayName:"Grok-4",description:"Most capable Grok model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-fast-reasoning":{name:"grok-4-fast-reasoning",displayName:"Grok-4 Fast Reasoning",description:"Legacy optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-reasoning",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-fast-non-reasoning":{name:"grok-4-fast-non-reasoning",displayName:"Grok-4 Fast Non-Reasoning",description:"Legacy fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:256e3,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",replacedBy:"grok-4-1-fast-non-reasoning",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-1-fast-reasoning":{name:"grok-4-1-fast-reasoning",displayName:"Grok-4.1 Fast Reasoning",description:"Optimized for reasoning tasks",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!0,supportsTemperature:!1,supportsStructuredOutput:!1},"grok-4-1-fast-non-reasoning":{name:"grok-4-1-fast-non-reasoning",displayName:"Grok-4.1 Fast Non-Reasoning",description:"Fast general-purpose model",providerType:"grok",maxOutputTokens:3e4,contextWindowTokens:2e6,tokenQuotaCategory:"numberOfGrokTokens",chatQuotaCategory:"numberOfGrokChats",isReasoningModel:!1,supportsTemperature:!1,supportsStructuredOutput:!1}};for(const t of Object.values(p))o(!t.replacedBy||!p[t.replacedBy]?.replacedBy,`Model ${t.name} is replaced by ${t.replacedBy}, which is also marked as replaced (is not active).`),o(!t.replacedBy||t.description.startsWith("Legacy"),`Model ${t.name} is deprecated and its description must start with 'Legacy': '${t.description}'.`);const d=(t,e)=>Array.isArray(t)?t.concat(e):void 0;class h{constructor(){this.data={codeChecksum:"initial",databases:{},storage:{},executables:{},apis:{},graphql:{},triggers:{},schedulers:{},webhooks:{},nativeQueries:{},distributedLocks:{},aiChatbots:{},clientConnectionStateChangeHandlers:[],aiFunctions:{},openApiControllersMap:{},queues:{},queueMessageHandlers:{},eventHandlers:{},metrics:{security:{write:[],all:[]}},limits:{},llms:{},mcp:{},integrationLifecycleHooks:{onIntegrationCreated:!1,onIntegrationDeleted:!1,onIntegrationChanged:!1}}}secureDatabase(e,n,r=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[r]:{security:{[e]:[n]}}}})}secureAiQuery(e,n=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[n]:{security:{aiQuery:[e]}}}})}secureCollection(e,n,r,o=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[o]:{collections:{[e]:{security:{[n]:[r]}}}}}})}secureStorage(e,n,r=t.BUILT_IN_STORAGE_INTEGRATION_ID){g(this.data,{storage:{[r]:{security:{[e]:[n]}}}})}secureTopic(e,n,r,o=t.BUILT_IN_QUEUE_INTEGRATION_ID){g(this.data,{queues:{[o]:{topics:{[e]:{security:{[n]:[r]}}}}}})}queueMessage(e,n,r=t.BUILT_IN_QUEUE_INTEGRATION_ID){g(this.data,{queueMessageHandlers:{[r]:{[e]:[n]}}})}eventHandler(t,e){g(this.data,{eventHandlers:{[t]:[e]}})}secureMetric(t,e,n){g(this.data,{metrics:{security:{[e]:[{namePrefix:t,serviceFunction:n}]}}})}secureApi(t,e,n){g(this.data,e?{apis:{[t]:{endpoints:{[e]:{security:[n]}}}}}:{apis:{[t]:{security:[n]}}})}secureGraphQL(t,e){g(this.data,{graphql:{[t]:{security:[e]}}})}transformDatabase(e,n,r=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[r]:{transform:{[e]:{type:e,serviceFunction:n}}}}})}transformCollection(e,n,r,o=t.BUILT_IN_DB_INTEGRATION_ID){g(this.data,{databases:{[o]:{collections:{[e]:{transform:{[n]:{type:n,serviceFunction:r}}}}}}})}executable(t){const e=t.split(":")[1],n={serviceFunction:t},r=this.data.executables[e];r&&r.serviceFunction!==t&&console.warn(`Executable name collision: "${e}" is registered by both "${r.serviceFunction}" and "${t}". Use qualified names to avoid ambiguity.`),g(this.data,{executables:{[e]:n,[t]:n}})}aiFunction(t,{id:e,description:n,promptId:r,params:o,attributes:i,categories:u,internal:a}){const s={aiFunctions:{[e]:{serviceFunction:t,description:n,promptId:r,params:o,attributes:i,categories:u,internal:a}}};g(this.data,s)}aiFunctionsConfigurator(t,{id:e,integrationTypes:n}){const r={aiFunctionsConfigurators:{[e]:{serviceFunction:t,integrationTypes:n}}};g(this.data,r)}trigger(t,e,n,r,i){o(!this.data.triggers[t],`Duplicate Trigger IDs: ${t}`),this.data.triggers[t]={integrationId:r,collectionName:e,functionName:n,mutationTypes:i}}scheduler(t,e,n,r){o(!this.data.schedulers[t],`Duplicate Scheduler IDs: ${t}`),this.data.schedulers[t]={cronExpression:e,functionName:n,exclusive:r}}webhook(t,e){o(!this.data.webhooks[t],`Duplicate Webhook IDs: ${t}`),this.data.webhooks[t]={functionName:e}}secureNativeQuery(t,e){g(this.data,{nativeQueries:{[t]:[e]}})}secureDistributedLock(t,e){g(this.data,t?{distributedLocks:{mutexes:{[t]:{security:[e]}}}}:{distributedLocks:{security:[e]}})}secureAiAgent(e,n){g(this.data,e?{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{profiles:{[e]:{security:{chat:[n]}}}}}}:{aiChatbots:{[t.AI_AGENTS_INTEGRATION_ID]:{security:{chat:[n]}}}})}limits(t,e){g(this.data,{limits:{[t]:e}})}clientConnectionChangeHandler(t){g(this.data,{clientConnectionStateChangeHandlers:[t]})}llmService(t,e){const n=e.models;o(void 0===this.data.llms?.[t]?.models,`LLM service '${t}' is already registered.`);const r=Object.keys(n);o(r.length>0,`LLM service '${t}' must declare at least one model.`);for(const e of r)o(!l(e),`LLM service '${t}' cannot declare an already-defined model: '${e}'.`);const i=Object.values(this.data.llms??{}).flatMap(t=>Object.keys(t.models??{}));for(const t of r)o(!i.includes(t),`Model '${t}' is already defined by another LLM service.`);g(this.data,{llms:{[t]:{models:n,...void 0!==e.supportsFunctions&&{supportsFunctions:e.supportsFunctions}}}})}llmAsk(t){const e=t.split(":")[0];o(void 0===this.data.llms?.[e]?.ask,`LLM service '${e}' already has an 'ask' function defined.`),g(this.data,{llms:{[e]:{ask:t}}})}mcpServer(t,e){const n=e.id;o(void 0===Object.values(this.data.mcp||{}).find(t=>t.options?.id===n),`MCP server with id ${n} already exists (${t}).`),g(this.data,{mcp:{[t]:{options:e,tools:[]}}})}mcpAuthorizer(t){const[e,n]=t.split(":");o(!this.data.mcp?.[e]?.authorizer,`MCP server '${e}' already has authorizer: ${n}.`),g(this.data,{mcp:{[e]:{authorizer:t}}})}mcpTool(t,e){const[n,r]=t.split(":");o(void 0===this.data.mcp?.[n]?.tools?.find(e=>e.serviceFunctionName===t),`MCP server '${n}' already has tool ${r}.`),g(this.data,{mcp:{[n]:{tools:[{serviceFunctionName:t,description:e.description,inputSchema:e.inputSchema,outputSchema:e.outputSchema}]}}})}setIntegrationLifecycleHooks(t){this.data.integrationLifecycleHooks={onIntegrationCreated:t.onIntegrationCreated,onIntegrationChanged:t.onIntegrationChanged,onIntegrationDeleted:t.onIntegrationDeleted}}}function g(t,e){(0,c.mergeWith)(t,e,d)}const _=new h;function y(t,e){return function(n,r,o){return _.secureDatabase(t,U(n,r),e),o}}function v(t){return function(e,n,r){return _.secureAiQuery(U(e,n),t),r}}function m(t,e,n){return function(r,o,i){return _.secureCollection(t,e,U(r,o),n),i}}function b(t,e){return function(n,r,o){return _.secureStorage(t,U(n,r),e),o}}function k(t,e,n){return function(r,o,i){return _.secureTopic(t,e,U(r,o),n),i}}function T(t){return function(e,n,r){return _.secureMetric(t.metricNamePrefix||"",t.type,U(e,n)),r}}function O(t,e){return function(n,r,o){return _.secureApi(t,e,U(n,r)),o}}function A(t){return function(e,n,r){return _.secureGraphQL(t,U(e,n)),r}}function C(t,e){return function(n,r,o){return _.queueMessage(t,U(n,r),e),o}}function w(t){return function(e,n,r){return _.eventHandler(t,U(e,n)),r}}function I(){return function(t,e,n){return _.executable(U(t,e)),n}}function E(t,e=[],n={},r=[],o=!1){return function(u,a,c){const f=U(u,a),l=s(f);let p;return"object"==typeof t?(i(t.description??t.promptId,`AI function definition requires either "description" or "promptId" to be defined: ${a}`),p={id:t.id||l,description:t.description,promptId:t.promptId,params:i(t.params,`AI function definition requires "params" to be defined: ${a}`),attributes:t.attributes||{},categories:t.categories||[],internal:t.internal||!1}):p={id:l,description:t,promptId:void 0,params:e,attributes:n,categories:r,internal:o},_.aiFunction(f,p),c}}function R(t){return function(e,n,r){const o=U(e,n),i={id:t.id||s(o),integrationTypes:t.integrationTypes};return _.aiFunctionsConfigurator(o,i),r}}function x(e,n="",r){const i="object"==typeof e?{...e}:{id:e,collection:n,integrationId:r};return o(i.collection,"Collection name can't be empty"),function(e,n,r){return i.id||(i.id=U(e,n)),_.trigger(i.id,i.collection,U(e,n),i.integrationId||t.BUILT_IN_DB_INTEGRATION_ID,i.mutationTypes),r}}function S(t,e,n=!0){return function(r,o,u){const a=U(r,o);let s;return s="object"==typeof t?{cron:t.cron,id:t.id||a,exclusive:t.exclusive??!0}:{id:t,cron:i(e,"cronExpression must be defined"),exclusive:n},_.scheduler(s.id,s.cron,a,s.exclusive),u}}function N(t){return function(e,n,r){return _.webhook(t,U(e,n)),r}}function M(t){return function(e,n,r){return _.secureNativeQuery(t,U(e,n)),r}}function D(t){return function(e,n,r){return _.secureDistributedLock(t,U(e,n)),r}}function L(t){return function(e,n,r){return _.secureAiAgent(t,U(e,n)),r}}function G(t){return function(e,n,r){return _.limits(U(e,n),W(t)),r}}function j(t){return e=>{_.llmService(e.name,t)}}function Y(){return function(t,e,n){return _.llmAsk(U(t,e)),n}}function Q(t){return e=>{_.mcpServer(e.name,t)}}function P(t){return function(e,n,r){return _.mcpTool(U(e,n),t),r}}function B(){return function(t,e,n){return _.mcpAuthorizer(U(t,e)),n}}function q(){return function(t,e,n){return _.clientConnectionChangeHandler(U(t,e)),n}}function U(t,e){return`${t.constructor.name}:${e}`}function W(t){return void 0!==t.rateLimit&&("number"==typeof t.rateLimit?t.rateLimit=[{value:t.rateLimit,scope:"global"}]:"object"!=typeof t.rateLimit||Array.isArray(t.rateLimit)||(t.rateLimit=[t.rateLimit]),t.rateLimit.forEach(t=>{void 0===t.scope&&(t.scope="global")})),void 0!==t.quotaLimit&&("number"==typeof t.quotaLimit?t.quotaLimit=[{value:t.quotaLimit,scope:"global",renewPeriod:"monthly"}]:"object"!=typeof t.quotaLimit||Array.isArray(t.quotaLimit)||(t.quotaLimit=[t.quotaLimit]),t.quotaLimit.forEach(t=>{void 0===t.scope&&(t.scope="global"),void 0===t.renewPeriod&&(t.renewPeriod="monthly")})),t}const F=require("path"),$="user-code",V="user-code-python";function z(t){a(t,"Invalid application ID");const[e,n,r,i]=t.split("-");return o(!i,`Invalid application ID: ${t}`),{appId:e,environmentId:n??"prod",squidDeveloperId:r}}const H=["api","application","auth","mutation","native-query","query","queue","notification"];const K=require("node:async_hooks"),Z=(require("node:stream"),"__docId__"),J=/[.\[\]]/;function X(t,e){if(!t)return;const n=e.split(J);let r,o=t;for(;o&&n.length;){const t=n.shift();if(t){if("object"!=typeof o||!(t in o))return;r=o[t],o=r}}return r}function tt(t){return null==t}function et(t,e){if(t===e)return!0;if(null===t||null===e)return!1;const n=typeof t;if(n!==typeof e)return!1;if("object"!==n)return t===e;if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const r=Object.keys(t),o=Object.keys(e);if(r.length!==o.length)return!1;for(const n of r)if(!o.includes(n)||!et(t[n],e[n]))return!1;return!0}function nt(t,e){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=rt(t[r],e);return n}function rt(t,e){const n=e?e(t):void 0;if(void 0!==n)return n;if("object"!=typeof t||null===t)return t;if(t instanceof Date)return new Date(t);if(Array.isArray(t))return nt(t,e);if(t instanceof Map)return new Map(nt(Array.from(t),e));if(t instanceof Set)return new Set(nt(Array.from(t),e));if(ArrayBuffer.isView(t))return r=t,"undefined"!=typeof Buffer&&r instanceof Buffer?Buffer.from(r):new r.constructor(r.buffer.slice(),r.byteOffset,r.length);var r;const o={};for(const n in t)Object.hasOwnProperty.call(t,n)&&(o[n]=rt(t[n],e));return o}function ot(t){if(Array.isArray(t))return t.map(t=>ot(t));if("object"!=typeof t||null===t||t instanceof Date)return t;const e=Object.keys(t),n={};return e.sort().forEach(e=>{n[e]=ot(t[e])}),n}function it(t){return function(t){if(void 0===t)return null;const e=rt(t,t=>function(t){return"[object Date]"===Object.prototype.toString.call(t)}(t)?{$date:t.toISOString()}:void 0);return JSON.stringify(e)}(ot(t))}function ut(t){return rt(JSON.parse(t),t=>{if(null===t||"object"!=typeof t)return;const e=t,n=e.$date;return n&&1===Object.keys(e).length?new Date(n):void 0})}function at(t,e,n){if(t=t instanceof Date?t.getTime():t??null,e=e instanceof Date?e.getTime():e??null,"=="===n)return et(t,e);if("!="===n)return!et(t,e);switch(n){case"<":return!tt(t)&&(!!tt(e)||e<t);case"<=":return!!tt(e)||!tt(t)&&e<=t;case">":return!tt(e)&&(!!tt(t)||e>t);case">=":return!!tt(t)||!tt(e)&&e>=t;case"like":return"string"==typeof e&&"string"==typeof t&&st(e,t,!1);case"not like":return!("string"==typeof e&&"string"==typeof t&&st(e,t,!1));case"like_cs":return"string"==typeof e&&"string"==typeof t&&st(e,t,!0);case"not like_cs":return!("string"==typeof e&&"string"==typeof t&&st(e,t,!0));case"array_includes_some":{const n=e;return Array.isArray(e)&&Array.isArray(t)&&t.some(t=>i(n,"VALUE_CANNOT_BE_NULL").some(e=>et(e,t)))}case"array_includes_all":{const n=e;return Array.isArray(t)&&Array.isArray(e)&&t.every(t=>i(n,"VALUE_CANNOT_BE_NULL").some(e=>et(e,t)))}case"array_not_includes":{const n=e;return Array.isArray(e)&&Array.isArray(t)&&t.every(t=>!i(n,"VALUE_CANNOT_BE_NULL").some(e=>et(e,t)))}default:throw new Error(`Unsupported operator comparison: ${n}`)}}function st(t,e,n){n||(t=t.toLowerCase(),e=e.toLowerCase());const r=function(t){let e="";for(let n=0;n<t.length;++n)"\\"===t[n]?n+1<t.length&&["%","_"].includes(t[n+1])?(e+=t[n+1],n++):n+1<t.length&&"\\"===t[n+1]?(e+="\\\\",n++):e+="\\":"%"===t[n]?e+="[\\s\\S]*":"_"===t[n]?e+="[\\s\\S]":("/-\\^$*+?.()[]{}|".includes(t[n])&&(e+="\\"),e+=t[n]);return e}(e);return new RegExp(`^${r}$`).test(t)}function ct(t){return"fieldName"in t}function ft(t){return"docIds"in t}function lt(t,e,n){const r=t.docIds.some(t=>Object.entries(t).every(([t,r])=>at(r,n(e,t)??null,"==")));switch(t.operator){case"==":case"in":return r;case"!=":case"not in":return!r}}function pt(t,e,n,r){const o=t,i=r(e,Z);if("string"!=typeof i)return at(o,i??null,n);let u;try{u=ut(i)}catch{return at(o,i,n)}if(!u||"object"!=typeof u||Array.isArray(u))return at(o,i,n);const a=Object.keys(u);if(1===a.length&&"__id"===a[0]){const t=u.__id,e=function(t){if("object"==typeof t&&null!==t&&!Array.isArray(t)){const e=Object.keys(t);return 1===e.length&&"__id"===e[0]?t.__id:it(t)}if("string"==typeof t)try{const e=ut(t);if(e&&"object"==typeof e&&!Array.isArray(e)){const t=Object.keys(e);if(1===t.length&&"__id"===t[0])return e.__id}}catch{}return t}(o);return at(e,t,n)}if(1===a.length){const t=function(t,e){if("object"==typeof t&&null!==t&&!Array.isArray(t)){const n=Object.keys(t);if(1===n.length&&n[0]===e)return t[e]}if("string"==typeof t)try{const n=ut(t);if(n&&"object"==typeof n&&!Array.isArray(n)){const t=Object.keys(n);if(1===t.length&&t[0]===e)return n[e]}}catch{}return t}(o,a[0]);return at(t,u[a[0]],n)}return"object"!=typeof o||null===o||Array.isArray(o)?at(o,i,n):at(it(o),i,n)}const dt={"in:in":(t,e)=>t.every(t=>e.includes(t)),"in:not in":(t,e)=>t.every(t=>!e.includes(t)),"not in:not in":(t,e)=>e.every(e=>t.includes(e)),">:not in":(t,e)=>e.every(e=>t>=e),">=:not in":(t,e)=>e.every(e=>t>e),"<:not in":(t,e)=>e.every(e=>t<=e),"<=:not in":(t,e)=>e.every(e=>t<e),">:>":(t,e)=>t>=e,">=:>":(t,e)=>t>e,"in:>":(t,e)=>t.every(t=>t>e),">:>=":(t,e)=>t>=e,">=:>=":(t,e)=>t>=e,"in:>=":(t,e)=>t.every(t=>t>=e),"<:<":(t,e)=>t<=e,"<=:<":(t,e)=>t<e,"in:<":(t,e)=>t.every(t=>t<e),"<:<=":(t,e)=>t<=e,"<=:<=":(t,e)=>t<=e,"in:<=":(t,e)=>t.every(t=>t<=e),"like:like":(t,e)=>ht(t.toLowerCase(),e.toLowerCase()),"like_cs:like":(t,e)=>ht(t.toLowerCase(),e.toLowerCase()),"like:like_cs":(t,e)=>ht(t,e)&&_t(e),"like_cs:like_cs":(t,e)=>ht(t,e),"like:not like":(t,e)=>!gt(t.toLowerCase(),e.toLowerCase()),"like_cs:not like":(t,e)=>!gt(t.toLowerCase(),e.toLowerCase()),"like:not like_cs":(t,e)=>!gt(t.toLowerCase(),e.toLowerCase()),"like_cs:not like_cs":(t,e)=>!gt(t,e),"not like:like":(t,e)=>vt(t,e),"not like_cs:like":(t,e)=>vt(t,e),"not like:like_cs":(t,e)=>vt(t,e),"not like_cs:like_cs":(t,e)=>vt(t,e),"not like:not like":(t,e)=>ht(e.toLowerCase(),t.toLowerCase()),"not like_cs:not like":(t,e)=>ht(e,t)&&_t(t),"not like:not like_cs":(t,e)=>ht(e.toLowerCase(),t.toLowerCase()),"not like_cs:not like_cs":(t,e)=>ht(e,t),"in:like":(t,e)=>t.every(t=>at(e,t,"like")),"in:like_cs":(t,e)=>t.every(t=>at(e,t,"like_cs")),"in:not like":(t,e)=>t.every(t=>at(e,t,"not like")),"in:not like_cs":(t,e)=>t.every(t=>at(e,t,"not like_cs")),"like:in":(t,e)=>!t.includes("%")&&!t.includes("_")&&!!e.find(e=>e.toLowerCase()===t.toLowerCase()),"like_cs:in":(t,e)=>!t.includes("%")&&!t.includes("_")&&e.includes(t),"not like:in":(t,e)=>t.length>0&&yt(t)||mt(t)&&e.includes(""),"not like_cs:in":(t,e)=>t.length>0&&yt(t)||mt(t)&&e.includes(""),"not in:like":(t,e)=>e.length>0&&yt(e)||mt(e)&&t.includes(""),"not in:like_cs":(t,e)=>e.length>0&&yt(e)||mt(e)&&t.includes(""),"not in:not like":(t,e)=>!e.includes("%")&&!e.includes("_")&&!!t.find(t=>t.toLowerCase()===e.toLowerCase()),"not in:not like_cs":(t,e)=>!e.includes("%")&&!e.includes("_")&&t.includes(e),"like:not in":(t,e)=>e.every(e=>at(t,e,"not like")),"like_cs:not in":(t,e)=>e.every(e=>at(t,e,"not like_cs")),"not like:not in":(t,e)=>e.every(e=>at(t,e,"like")),"not like_cs:not in":(t,e)=>e.every(e=>at(t,e,"like_cs")),"array_includes_some:array_includes_some":(t,e)=>t.every(t=>e.includes(t)),"array_includes_all:array_includes_all":(t,e)=>t.every(t=>e.includes(t)),"array_not_includes:array_not_includes":(t,e)=>e.every(e=>t.includes(e)),"array_includes_some:array_not_includes":(t,e)=>t.every(t=>!e.includes(t)),"array_not_includes:array_includes_some":(t,e)=>e.every(e=>!t.includes(e)),"array_includes_all:array_includes_some":(t,e)=>t.every(t=>e.includes(t)),"array_includes_some:array_includes_all":(t,e)=>t.every(t=>e.includes(t)),"array_not_includes:array_includes_all":(t,e)=>e.every(e=>!t.includes(e)),"array_includes_all:array_not_includes":(t,e)=>t.every(t=>!e.includes(t))};function ht(t,e,n=0,r=0){if(r>=e.length)return n>=t.length;if(n>=t.length)return yt(e.substring(r));const o=t[n],i=e[r];return"%"===o&&"%"===i?ht(t,e,n+1,r+1)||ht(t,e,n+1,r):"%"!==o&&("%"===i?ht(t,e,n,r+1)||ht(t,e,n+1,r):(o===i||"_"===i)&&ht(t,e,n+1,r+1))}function gt(t,e,n=0,r=0){if(n>=t.length&&r>=e.length)return!0;if(n>=t.length)return yt(e.substring(r));if(r>=e.length)return yt(t.substring(n));const o=n<t.length?t[n]:"",i=r<e.length?e[r]:"";return"%"===o&&"%"===i?gt(t,e,n+1,r+1)||gt(t,e,n,r+1)||gt(t,e,n+1,r):"%"===o||"%"===i?gt(t,e,n,r+1)||gt(t,e,n+1,r):(o===i||"_"===o||"_"===i)&>(t,e,n+1,r+1)}function _t(t){return!/[a-zA-Z]/.test(t)}function yt(t){return t.split("").every(t=>"%"===t)}function vt(t,e){return t.length>0&&yt(t)||e.length>0&&yt(e)||mt(t)&&0===e.length}function mt(t){let e=!1,n=!1;for(const r of t)switch(r){case"%":e=!0;break;case"_":if(n)return!1;n=!0;break;default:return!1}return e&&n}function bt(t,e){const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const r of n){if(!Object.prototype.hasOwnProperty.call(e,r))return!1;if(!et(t[r],e[r]))return!1}return!0}function kt(t,e){return e.every(e=>{const n=Object.keys(e).sort();if(n.length!==t.length)return!1;for(let e=0;e<t.length;e++)if(n[e]!==t[e])return!1;return!0})}class Tt{constructor(t){this.query=t,this.query=t;const e=this.query.conditions.filter(ct),n=this.query.conditions.filter(ft),r=n.flatMap(t=>function(t){if("=="!==t.operator&&"in"!==t.operator)return[];if(0===t.docIds.length)return[];const e=[],n=t.docIds[0];for(const r of Object.keys(n)){const o=n[r];t.docIds.every(t=>Object.prototype.hasOwnProperty.call(t,r)&&et(t[r],o))&&e.push({fieldName:r,operator:"==",value:o})}return e}(t));this.exactSimpleConditions=this.parseConditions(e),this.exactDocIdConditions=n,this.subqueryConditions=this.parseConditions([...e,...r])}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}get projectFields(){return this.query.projectFields}sortedBy(t){return!t.find((t,e)=>!et(this.query.sortOrder[e],{...t,asc:t.asc??!0}))}sortedByExact(t){return t.length===this.query.sortOrder.length&&this.sortedBy(t)}isSubqueryOf(t,e,n){return this.isSubqueryOfCondition({fieldName:t,operator:e,value:n})}isSubqueryOfCondition(t){return!!this.subqueryConditions.filter(e=>e.fieldName===t.fieldName).find(e=>this.evaluateSubset(e,t))}isSubqueryOfConditions(t){return this.parseConditions(t).every(t=>this.isSubqueryOfCondition(t))}isSubqueryOfQuery(t){if(t.collectionName!==this.collectionName||t.integrationId!==this.integrationId)return!1;for(const e of t.conditions.filter(ft))if(!this.childImpliesParentDocIdCondition(e))return!1;const e=t.conditions.filter(ct),n=this.isSubqueryOfConditions(e),r=this.sortedBy(t.sortOrder),o=-1===t.limit||this.limit>-1&&this.limit<t.limit,i=this.isProjectFieldsSubset(this.query.projectFields,t.projectFields);return n&&r&&o&&i}childImpliesParentDocIdCondition(t){const e=t.docIds;if(0===e.length)return!1;const n="=="===t.operator||"in"===t.operator,r=Object.keys(e[0]).sort(),o=[];for(const t of this.query.conditions)ft(t)&&o.push(...t.docIds);if(!kt(r,e)||!kt(r,o))return!1;const i=this.buildChildEffectiveTupleSet();return n?void 0!==i.allowed&&i.allowed.every(t=>e.some(e=>bt(t,e))):void 0!==i.allowed?i.allowed.every(t=>!e.some(e=>bt(t,e))):e.every(t=>i.excluded.some(e=>bt(t,e)))}buildChildEffectiveTupleSet(){let t;const e=[];for(const n of this.query.conditions)if(ft(n))if("=="===n.operator||"in"===n.operator)t=void 0===t?[...n.docIds]:t.filter(t=>n.docIds.some(e=>bt(t,e)));else for(const t of n.docIds)e.some(e=>bt(e,t))||e.push(t);return void 0!==t&&e.length>0&&(t=t.filter(t=>!e.some(e=>bt(t,e)))),{allowed:t,excluded:e}}isProjectFieldsSubset(t,e){if(!e)return!0;if(!t)return!1;const n=new Set(e);return t.every(t=>n.has(t))}getConditionsFor(...t){return this.subqueryConditions.filter(e=>t.includes(e.fieldName))}getConditionsForField(t){return this.subqueryConditions.filter(e=>e.fieldName===t)}documentMatchesQuery(t){for(const e of this.exactSimpleConditions){const n=e.fieldName,r=e.operator;if(n===Z){const n=e.value;if("in"===r||"not in"===r){const e=(Array.isArray(n)?n:[n]).some(e=>pt(e,t,"==",X));if(!("in"===r?e:!e))return!1;continue}if(!pt(n,t,r,X))return!1;continue}const o=X(t,n);if("in"===r){if(e.value.includes(o))continue;return!1}if("not in"!==r){if(!at(e.value,o,r))return!1}else if(e.value.includes(o))return!1}for(const e of this.exactDocIdConditions)if(!lt(e,t,X))return!1;return!0}evaluateSubset(t,e){const{operator:n,value:r}=t,{operator:o,value:i}=this.parseConditions([e])[0],u=dt[`${n}:${o}`];return!!u&&u(r,i)}parseConditions(t){const e=[],n=new Map,r=new Map;return t.forEach(t=>{switch(t.operator){case"==":case"in":n.set(t.fieldName,(n.get(t.fieldName)||[]).concat(t.value));break;case"!=":case"not in":r.set(t.fieldName,(r.get(t.fieldName)||[]).concat(t.value));break;default:e.push(t)}}),n.forEach((t,n)=>{e.push({fieldName:n,operator:"in",value:t})}),r.forEach((t,n)=>{e.push({fieldName:n,operator:"not in",value:t})}),e}}function Ot(){if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;if("undefined"!=typeof self)return self;throw new Error("Unable to locate global object")}void 0===Ot()?.SQUID_LOG_DEBUG_ENABLED&&function(t=!0){Ot().SQUID_LOG_DEBUG_ENABLED=t}(function(){let t="";return"undefined"!=typeof window&&window.location?t=new URLSearchParams(window.location.search).get("SQUID_DEBUG")||"":"undefined"!=typeof process&&process.env&&(t=process.env.SQUID_DEBUG||""),"1"===t||"true"===t}());const At="__squidMetadata",Ct="CIRCULAR_DEPENDENCY",wt=(new K.AsyncLocalStorage,[]);function It(t,e,n){const r=Rt();r.codeDirByServiceClassName.set(t.name,n);let i=r.serviceInstanceByCtor.get(t);if(!i||function(t){return t[At]||{version:0}}(i).version<=1){const n=Rt(),r={...n,...e};o(!wt.includes(t),()=>`${Ct}: ${wt[wt.length-1]?.name} => ${t.name}`),wt.push(t);try{i=n.requestLocalStorage.run(e,()=>new t(r))}finally{wt.pop()}n.serviceInstanceByCtor.set(t,i)}else(function(t,e){o(t.backendApiKey===e.backendApiKey,"backendApiKey does not match."),o(t.requestLocalStorage===e.requestLocalStorage,"requestLocalStorage does not match"),o(t.environmentId===e.environmentId,"environmentId does not match"),o(t.squidDeveloperId===e.squidDeveloperId,"squidDeveloperId does not match");const n=z(t.appId),r=z(e.appId);o(n.appId===r.appId,`appId does not match! Before: ${n.appId}, after ${r.appId}`)})(i.config,r),i.config.secrets=r.secrets,i.config.apiKeys=r.apiKeys;return i}const Et="SQUID_GLOBAL_CONFIG";function Rt(){return i(Ot()[Et],"Squid global config is not defined! Make sure you are not trying to use Squid at module load time.")}class xt{constructor(){this.region=process.env.SQUID_REGION||"local",this.config=Rt(),this[At]={version:2},this.backendBaseUrl=function(t,e,n,r,o,i){let u="https",a=`${r||e}.${o||t}.${new URL("https://squid.cloud").host}`,s="";if(/^local/.test(t)){if(u="http",s=i||function(t){const e=t.replace(/^\/+/,"").split("/"),n=e[0]||"";return"ws"===n?"squidlet"===e[1]:H.includes(n)}(n)?"8001":"8000","undefined"!=typeof process){const t=i?void 0:process.env.SQUID_LOCAL_WS_FORCE_PORT;t&&n.replace(/^\/+/,"").startsWith("ws/general")&&(s=t)}/android$/.test(t)?a="10.0.2.2":/ios$/.test(t)&&(a="localhost")}const c=u+"://"+a+(s?`:${s}`:""),f=n.replace(/^\/+/,"");return f?`${c}/${f}`:c}(this.region,this.config.appId,"")}get secrets(){return this.config.secrets}get apiKeys(){return this.config.apiKeys}get context(){return this.getRequestConfig().context}get squid(){return Lt()}get assetsDirectory(){const t=Object.getPrototypeOf(this).constructor.name,e=this.config.codeDir||this.config.codeDirByServiceClassName.get(t);return o(e,()=>`No codeDir found for service: ${t}`),F.resolve(e,"public")}getApiKey(){return this.config.backendApiKey}getUserAuth(){const{auth:t}=this.getRequestConfig();return"Bearer"===t?.type?t:void 0}getApiKeyAuth(){const{auth:t}=this.getRequestConfig();return"ApiKey"===t?.type?t:void 0}isAuthenticated(){const{auth:t}=this.getRequestConfig();return!!t}assertIsAuthenticated(){this.assertInRequestScope(),o(this.isAuthenticated(),"UNAUTHORIZED")}assertInRequestScope(){o(this.config.requestLocalStorage.getStore(),"This method can only be called with a valid request scope.")}assertApiKeyCall(){o(this.getApiKeyAuth(),"This method can only be called with API key")}createWebhookResponse(t,e,n){return{body:t||"",statusCode:e||(t?200:204),headers:n||{},__isWebhookResponse__:!0}}throwWebhookResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isWebhookResponse__:!0}}createOpenApiResponse(t,e,n){return{body:t||"",statusCode:e||(t?200:204),headers:n||{},__isOpenApiResponse__:!0}}throwOpenApiResponse(t){throw{body:t.body||"",statusCode:t.statusCode||500,headers:t.headers||{},__isOpenApiResponse__:!0}}async convertToSquidFile(t){return{__isSquidFile__:!0,data:new Uint8Array(await t.arrayBuffer()),fieldName:t.name,mimetype:t.type,originalName:t.name,size:t.size,encoding:t.type}}async publishAiStatusUpdate(t,e){const n={type:"aiStatus",agentId:t.agentId,messageId:t.messageId,chatId:t.chatId,jobId:t.jobId,payload:{title:t.title,body:t.body,parentStatusUpdateId:t.parentStatusUpdateId,tags:t.tags}};await this.squid.getNotificationClient().publishSystemNotification(n,[e])}getRequestConfig(){return this.assertInRequestScope(),i(this.config.requestLocalStorage.getStore(),"Failed to access request data outside of the request's scope")}}function St(t,e){return It(t,{},e)}function Nt(t,e){const n=Object.getPrototypeOf(e).constructor.name,r=Rt().codeDirByServiceClassName.get(n);return o(r,()=>`Caller class codeDir is not set: ${n}`),St(t,r)}function Mt(t,e=$){return St(t,i(Rt().moduleById.get(e),"Module not found: "+e).codeDir)}function Dt(){const t=Rt(),e=process.env.SQUID_REGION||"local",n=process.env.SQUID_CONSOLE_REGION,r=z(t.appId);return{appId:r.appId,apiKey:t.backendApiKey,squidDeveloperId:r.squidDeveloperId,environmentId:r.environmentId,region:e,consoleRegion:n}}function Lt(){return t.Squid.getInstance(Dt())}function Gt(){return t.Squid.getInstance({...Dt(),isPassiveMode:!0})}class jt extends xt{}class Yt{constructor(){_.setIntegrationLifecycleHooks({onIntegrationCreated:this.onIntegrationCreated!==Yt.prototype.onIntegrationCreated,onIntegrationDeleted:this.onIntegrationDeleted!==Yt.prototype.onIntegrationDeleted,onIntegrationChanged:this.onIntegrationChanged!==Yt.prototype.onIntegrationChanged})}get squid(){return Lt()}metadata(){return _.data}async onIntegrationCreated(t){}async onIntegrationChanged(t){}async onIntegrationDeleted(t){}async cleanup(){for(const e of t.Squid.getInstances())await e.destruct()}}class Qt{constructor(t){this.agentId=t.agentId,this.prompt=t.prompt,this.options=t.options}}class Pt{constructor(t){this.integrationId=t.integrationId,this.endpointId=t.endpointId,this.url=t.url,this.method=t.method,this.body=t.body,this.options=t.options}}var Bt;!function(t){t.EVERY_SECOND="* * * * * *",t.EVERY_5_SECONDS="*/5 * * * * *",t.EVERY_10_SECONDS="*/10 * * * * *",t.EVERY_30_SECONDS="*/30 * * * * *",t.EVERY_MINUTE="*/1 * * * *",t.EVERY_5_MINUTES="0 */5 * * * *",t.EVERY_10_MINUTES="0 */10 * * * *",t.EVERY_30_MINUTES="0 */30 * * * *",t.EVERY_HOUR="0 0-23/1 * * *",t.EVERY_2_HOURS="0 0-23/2 * * *",t.EVERY_3_HOURS="0 0-23/3 * * *",t.EVERY_4_HOURS="0 0-23/4 * * *",t.EVERY_5_HOURS="0 0-23/5 * * *",t.EVERY_6_HOURS="0 0-23/6 * * *",t.EVERY_7_HOURS="0 0-23/7 * * *",t.EVERY_8_HOURS="0 0-23/8 * * *",t.EVERY_9_HOURS="0 0-23/9 * * *",t.EVERY_10_HOURS="0 0-23/10 * * *",t.EVERY_11_HOURS="0 0-23/11 * * *",t.EVERY_12_HOURS="0 0-23/12 * * *",t.EVERY_DAY_AT_1AM="0 01 * * *",t.EVERY_DAY_AT_2AM="0 02 * * *",t.EVERY_DAY_AT_3AM="0 03 * * *",t.EVERY_DAY_AT_4AM="0 04 * * *",t.EVERY_DAY_AT_5AM="0 05 * * *",t.EVERY_DAY_AT_6AM="0 06 * * *",t.EVERY_DAY_AT_7AM="0 07 * * *",t.EVERY_DAY_AT_8AM="0 08 * * *",t.EVERY_DAY_AT_9AM="0 09 * * *",t.EVERY_DAY_AT_10AM="0 10 * * *",t.EVERY_DAY_AT_11AM="0 11 * * *",t.EVERY_DAY_AT_NOON="0 12 * * *",t.EVERY_DAY_AT_1PM="0 13 * * *",t.EVERY_DAY_AT_2PM="0 14 * * *",t.EVERY_DAY_AT_3PM="0 15 * * *",t.EVERY_DAY_AT_4PM="0 16 * * *",t.EVERY_DAY_AT_5PM="0 17 * * *",t.EVERY_DAY_AT_6PM="0 18 * * *",t.EVERY_DAY_AT_7PM="0 19 * * *",t.EVERY_DAY_AT_8PM="0 20 * * *",t.EVERY_DAY_AT_9PM="0 21 * * *",t.EVERY_DAY_AT_10PM="0 22 * * *",t.EVERY_DAY_AT_11PM="0 23 * * *",t.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",t.EVERY_WEEK="0 0 * * 7",t.EVERY_WEEKDAY="0 0 * * 1-5",t.EVERY_WEEKEND="0 0 * * 6,7",t.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",t.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",t.EVERY_2ND_HOUR="0 */2 * * *",t.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",t.EVERY_2ND_MONTH="0 0 1 */2 *",t.EVERY_QUARTER="0 0 1 */3 *",t.EVERY_6_MONTHS="0 0 1 */6 *",t.EVERY_YEAR="0 0 1 1 *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",t.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",t.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",t.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",t.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",t.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",t.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",t.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",t.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",t.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",t.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",t.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",t.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",t.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",t.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",t.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"}(Bt||(Bt={}));class qt{constructor(t){this.mutex=t}}class Ut{constructor(t){this.isGraphiQL=t.isGraphiQL,this.query=t.query,this.operationName=t.operationName,this.variables=t.variables}}const Wt=["insert","update","delete"];class Ft{constructor(t,e,n){this.mutation=t,this.beforeAndAfterDocs=e,this.serverTimeStamp=n}get before(){return this.beforeAndAfterDocs.before}get after(){return this.beforeAndAfterDocs.after}getMutationType(){return this.mutation.type}affectsPath(t){return!et(X(this.before,t),X(this.after,t))}affectedPaths(t=""){o("update"===this.mutation.type,"affectedPaths can only be used with update mutations");const e=[];return this.checkPath(t,e),e}checkPath(t,e){const n=X(this.before,t),r=X(this.after,t);if(!et(n,r)&&(""!==t&&e.push(t),"object"==typeof n&&null!==n&&"object"==typeof r&&null!==r)){const o=Object.keys(n),i=Object.keys(r);new Set([...o,...i]).forEach(n=>{const r=t?`${t}.${n}`:n;this.checkPath(r,e)})}}}function $t(t){return{__isWebhookResponse__:!0,body:"",statusCode:204,headers:{},...t}}})();var o=exports;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|