@machinemetrics/mm-react-tools 4.0.4-0 → 4.0.4
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/mm-react-tools.es.js +148 -140
- package/dist/mm-react-tools.umd.js +8 -8
- package/package.json +1 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Zp;function rS(){return Zp||(Zp=1,process.env.NODE_ENV!=="production"&&function(){var r=he,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,I="@@iterator";function x(R){if(R===null||typeof R!="object")return null;var ue=b&&R[b]||R[I];return typeof ue=="function"?ue:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(R){{for(var ue=arguments.length,be=new Array(ue>1?ue-1:0),Pe=1;Pe<ue;Pe++)be[Pe-1]=arguments[Pe];P("error",R,be)}}function P(R,ue,be){{var Pe=_.ReactDebugCurrentFrame,Ve=Pe.getStackAddendum();Ve!==""&&(ue+="%s",be=be.concat([Ve]));var ut=be.map(function(Je){return String(Je)});ut.unshift("Warning: "+ue),Function.prototype.apply.call(console[R],console,ut)}}var M=!1,U=!1,W=!1,K=!1,X=!1,fe;fe=Symbol.for("react.module.reference");function oe(R){return!!(typeof R=="string"||typeof R=="function"||R===n||R===a||X||R===i||R===h||R===d||K||R===m||M||U||W||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===y||R.$$typeof===u||R.$$typeof===c||R.$$typeof===f||R.$$typeof===fe||R.getModuleId!==void 0))}function Ie(R,ue,be){var Pe=R.displayName;if(Pe)return Pe;var Ve=ue.displayName||ue.name||"";return Ve!==""?be+"("+Ve+")":be}function ye(R){return R.displayName||"Context"}function Ne(R){if(R==null)return null;if(typeof R.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case d:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case c:var ue=R;return ye(ue)+".Consumer";case u:var be=R;return ye(be._context)+".Provider";case f:return Ie(R,R.render,"ForwardRef");case y:var Pe=R.displayName||null;return Pe!==null?Pe:Ne(R.type)||"Memo";case g:{var Ve=R,ut=Ve._payload,Je=Ve._init;try{return Ne(Je(ut))}catch{return null}}}return null}var Ce=Object.assign,ge=0,ve,pe,te,
|
|
17
|
+
*/var Zp;function rS(){return Zp||(Zp=1,process.env.NODE_ENV!=="production"&&function(){var r=he,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),b=Symbol.iterator,I="@@iterator";function x(R){if(R===null||typeof R!="object")return null;var ue=b&&R[b]||R[I];return typeof ue=="function"?ue:null}var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(R){{for(var ue=arguments.length,be=new Array(ue>1?ue-1:0),Pe=1;Pe<ue;Pe++)be[Pe-1]=arguments[Pe];P("error",R,be)}}function P(R,ue,be){{var Pe=_.ReactDebugCurrentFrame,Ve=Pe.getStackAddendum();Ve!==""&&(ue+="%s",be=be.concat([Ve]));var ut=be.map(function(Je){return String(Je)});ut.unshift("Warning: "+ue),Function.prototype.apply.call(console[R],console,ut)}}var M=!1,U=!1,W=!1,K=!1,X=!1,fe;fe=Symbol.for("react.module.reference");function oe(R){return!!(typeof R=="string"||typeof R=="function"||R===n||R===a||X||R===i||R===h||R===d||K||R===m||M||U||W||typeof R=="object"&&R!==null&&(R.$$typeof===g||R.$$typeof===y||R.$$typeof===u||R.$$typeof===c||R.$$typeof===f||R.$$typeof===fe||R.getModuleId!==void 0))}function Ie(R,ue,be){var Pe=R.displayName;if(Pe)return Pe;var Ve=ue.displayName||ue.name||"";return Ve!==""?be+"("+Ve+")":be}function ye(R){return R.displayName||"Context"}function Ne(R){if(R==null)return null;if(typeof R.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof R=="function")return R.displayName||R.name||null;if(typeof R=="string")return R;switch(R){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case i:return"StrictMode";case h:return"Suspense";case d:return"SuspenseList"}if(typeof R=="object")switch(R.$$typeof){case c:var ue=R;return ye(ue)+".Consumer";case u:var be=R;return ye(be._context)+".Provider";case f:return Ie(R,R.render,"ForwardRef");case y:var Pe=R.displayName||null;return Pe!==null?Pe:Ne(R.type)||"Memo";case g:{var Ve=R,ut=Ve._payload,Je=Ve._init;try{return Ne(Je(ut))}catch{return null}}}return null}var Ce=Object.assign,ge=0,ve,pe,te,Ee,Le,Se,Ze;function vt(){}vt.__reactDisabledLog=!0;function Mt(){{if(ge===0){ve=console.log,pe=console.info,te=console.warn,Ee=console.error,Le=console.group,Se=console.groupCollapsed,Ze=console.groupEnd;var R={configurable:!0,enumerable:!0,value:vt,writable:!0};Object.defineProperties(console,{info:R,log:R,warn:R,error:R,group:R,groupCollapsed:R,groupEnd:R})}ge++}}function Et(){{if(ge--,ge===0){var R={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Ce({},R,{value:ve}),info:Ce({},R,{value:pe}),warn:Ce({},R,{value:te}),error:Ce({},R,{value:Ee}),group:Ce({},R,{value:Le}),groupCollapsed:Ce({},R,{value:Se}),groupEnd:Ce({},R,{value:Ze})})}ge<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Xe=_.ReactCurrentDispatcher,it;function Ot(R,ue,be){{if(it===void 0)try{throw Error()}catch(Ve){var Pe=Ve.stack.trim().match(/\n( *(at )?)/);it=Pe&&Pe[1]||""}return`
|
|
18
18
|
`+it+R}}var De=!1,He;{var B=typeof WeakMap=="function"?WeakMap:Map;He=new B}function Q(R,ue){if(!R||De)return"";{var be=He.get(R);if(be!==void 0)return be}var Pe;De=!0;var Ve=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ut;ut=Xe.current,Xe.current=null,Mt();try{if(ue){var Je=function(){throw Error()};if(Object.defineProperty(Je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Je,[])}catch(D){Pe=D}Reflect.construct(R,[],Je)}else{try{Je.call()}catch(D){Pe=D}R.call(Je.prototype)}}else{try{throw Error()}catch(D){Pe=D}R()}}catch(D){if(D&&Pe&&typeof D.stack=="string"){for(var et=D.stack.split(`
|
|
19
19
|
`),tt=Pe.stack.split(`
|
|
20
20
|
`),gt=et.length-1,w=tt.length-1;gt>=1&&w>=0&&et[gt]!==tt[w];)w--;for(;gt>=1&&w>=0;gt--,w--)if(et[gt]!==tt[w]){if(gt!==1||w!==1)do if(gt--,w--,w<0||et[gt]!==tt[w]){var k=`
|
|
@@ -81,7 +81,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
81
81
|
--`.concat(a),c="",f=LO(r),h=!0,oe.label=1;case 1:return h?[4,f.next()]:[3,3];case 2:for(d=oe.sent(),y=d.value,g=d.done,m=typeof y=="string"?y:t.decode(y),b=c.length-u.length+1,h=!g,c+=m,I=c.indexOf(u,b);I>-1;){if(x=void 0,K=[c.slice(0,I),c.slice(I+u.length)],x=K[0],c=K[1],_=x.indexOf(`\r
|
|
82
82
|
\r
|
|
83
83
|
`),A=$O(x.slice(0,_)),P=A["content-type"],P&&P.toLowerCase().indexOf("application/json")===-1)throw new Error("Unsupported patch content type: application/json is required.");if(M=x.slice(_),M){if(U=by(r,M),Object.keys(U).length>1||"data"in U||"incremental"in U||"errors"in U||"payload"in U)if(py(U)){if(W={},"payload"in U){if(Object.keys(U).length===1&&U.payload===null)return[2];W=L({},U.payload)}"errors"in U&&(W=L(L({},W),{extensions:L(L({},"extensions"in W?W.extensions:null),(X={},X[nf]=U.errors,X))})),e(W)}else e(U);else if(Object.keys(U).length===1&&"hasNext"in U&&!U.hasNext)return[2]}I=c.indexOf(u)}return[3,1];case 3:return[2]}})})}function $O(r){var e={};return r.split(`
|
|
84
|
-
`).forEach(function(t){var n=t.indexOf(":");if(n>-1){var i=t.slice(0,n).trim().toLowerCase(),a=t.slice(n+1).trim();e[i]=a}}),e}function by(r,e){if(r.status>=300){var t=function(){try{return JSON.parse(e)}catch{return e}};rf(r,t(),"Response not successful: Received status code ".concat(r.status))}try{return JSON.parse(e)}catch(i){var n=i;throw n.name="ServerParseError",n.response=r,n.statusCode=r.status,n.bodyText=e,n}}function BO(r,e){r.result&&r.result.errors&&r.result.data&&e.next(r.result),e.error(r)}function wy(r){return function(e){return e.text().then(function(t){return by(e,t)}).then(function(t){return!Array.isArray(t)&&!vy.call(t,"data")&&!vy.call(t,"errors")&&rf(e,t,"Server response was missing for query '".concat(Array.isArray(r)?r.map(function(n){return n.operationName}):r.operationName,"'.")),t})}}var Ou=function(r,e){var t;try{t=JSON.stringify(r)}catch(i){var n=Yr(40,e,i.message);throw n.parseError=i,n}return t},VO={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},WO={accept:"*/*","content-type":"application/json"},zO={method:"POST"},_y={http:VO,headers:WO,options:zO},af=function(r,e){return e(r)};function HO(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return t.unshift(e),of.apply(void 0,wr([r,af],t,!1))}function of(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i={},a={};t.forEach(function(y){i=L(L(L({},i),y.options),{headers:L(L({},i.headers),y.headers)}),y.credentials&&(i.credentials=y.credentials),a=L(L({},a),y.http)}),i.headers&&(i.headers=GO(i.headers,a.preserveHeaderCase));var u=r.operationName,c=r.extensions,f=r.variables,h=r.query,d={operationName:u,variables:f};return a.includeExtensions&&(d.extensions=c),a.includeQuery&&(d.query=e(h,Gs)),{options:i,body:d}}function GO(r,e){if(!e){var t={};return Object.keys(Object(r)).forEach(function(a){t[a.toLowerCase()]=r[a]}),t}var n={};Object.keys(Object(r)).forEach(function(a){n[a.toLowerCase()]={originalName:a,value:r[a]}});var i={};return Object.keys(n).forEach(function(a){i[n[a].originalName]=n[a].value}),i}var xy=function(r){if(!r&&typeof fetch>"u")throw Yr(38)},QO=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var r=new AbortController,e=r.signal;return{controller:r,signal:e}},Sy=function(r,e){var t=r.getContext(),n=t.uri;return n||(typeof e=="function"?e(r):e||"/graphql")};function Ey(r,e){var t=[],n=function(y,g){t.push("".concat(y,"=").concat(encodeURIComponent(g)))};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){var i=void 0;try{i=Ou(e.variables,"Variables map")}catch(y){return{parseError:y}}n("variables",i)}if(e.extensions){var a=void 0;try{a=Ou(e.extensions,"Extensions map")}catch(y){return{parseError:y}}n("extensions",a)}var u="",c=r,f=r.indexOf("#");f!==-1&&(u=r.substr(f),c=r.substr(0,f));var h=c.indexOf("?")===-1?"?":"&",d=c+h+t.join("&")+u;return{newURI:d}}var Oy=Nn(function(){return fetch}),uf=function(r){r===void 0&&(r={});var e=r.uri,t=e===void 0?"/graphql":e,n=r.fetch,i=r.print,a=i===void 0?af:i,u=r.includeExtensions,c=r.preserveHeaderCase,f=r.useGETForQueries,h=r.includeUnusedVariables,d=h===void 0?!1:h,y=on(r,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&xy(n||Oy);var g={http:{includeExtensions:u,preserveHeaderCase:c},options:y.fetchOptions,credentials:y.credentials,headers:y.headers};return new Kr(function(m){var b=Sy(m,t),I=m.getContext(),x={};if(I.clientAwareness){var _=I.clientAwareness,A=_.name,P=_.version;A&&(x["apollographql-client-name"]=A),P&&(x["apollographql-client-version"]=P)}var M=L(L({},x),I.headers),U={http:I.http,options:I.fetchOptions,credentials:I.credentials,headers:M};if(ji(["client"],m.query)){var W=$l(m.query);if(!W)return xu(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));m.query=W}var K=of(m,a,_y,g,U),X=K.options,fe=K.body;fe.variables&&!d&&(fe.variables=SO(fe.variables,m.query));var oe;!X.signal&&typeof AbortController<"u"&&(oe=new AbortController,X.signal=oe.signal);var Ie=function(Se){return Se.kind==="OperationDefinition"&&Se.operation==="mutation"},ye=function(Se){return Se.kind==="OperationDefinition"&&Se.operation==="subscription"},Ne=ye(Bi(m.query)),Ce=ji(["defer"],m.query);if(f&&!m.query.definitions.some(Ie)&&(X.method="GET"),Ce||Ne){X.headers=X.headers||{};var ge="multipart/mixed;";Ne&&Ce&&globalThis.__DEV__!==!1&&je.warn(39),Ne?ge+="boundary=graphql;subscriptionSpec=1.0,application/json":Ce&&(ge+="deferSpec=20220824,application/json"),X.headers.accept=ge}if(X.method==="GET"){var ve=Ey(b,fe),pe=ve.newURI,te=ve.parseError;if(te)return xu(te);b=pe}else try{X.body=Ou(fe,"Payload")}catch(Se){return xu(Se)}return new Nt(function(Se){var Le=n||Nn(function(){return fetch})||Oy,Ee=Se.next.bind(Se);return Le(b,X).then(function(Ze){var vt;m.setContext({response:Ze});var Mt=(vt=Ze.headers)===null||vt===void 0?void 0:vt.get("content-type");return Mt!==null&&/^multipart\/mixed/i.test(Mt)?UO(Ze,Ee):wy(m)(Ze).then(Ee)}).then(function(){oe=void 0,Se.complete()}).catch(function(Ze){oe=void 0,BO(Ze,Se)}),function(){oe&&oe.abort()}})})},Ty=function(r){Pn(e,r);function e(t){t===void 0&&(t={});var n=r.call(this,uf(t).request)||this;return n.options=t,n}return e}(Kr);const{toString:Ay,hasOwnProperty:JO}=Object.prototype,ky=Function.prototype.toString,cf=new Map;function Ft(r,e){try{return lf(r,e)}finally{cf.clear()}}function lf(r,e){if(r===e)return!0;const t=Ay.call(r),n=Ay.call(e);if(t!==n)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(Cy(r,e))return!0;const i=Iy(r),a=Iy(e),u=i.length;if(u!==a.length)return!1;for(let c=0;c<u;++c)if(!JO.call(e,i[c]))return!1;for(let c=0;c<u;++c){const f=i[c];if(!lf(r[f],e[f]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(Cy(r,e))return!0;const i=r.entries(),a=t==="[object Map]";for(;;){const u=i.next();if(u.done)break;const[c,f]=u.value;if(!e.has(c)||a&&!lf(f,e.get(c)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let i=r.byteLength;if(i===e.byteLength)for(;i--&&r[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=ky.call(r);return i!==ky.call(e)?!1:!ZO(i,KO)}}return!1}function Iy(r){return Object.keys(r).filter(YO,r)}function YO(r){return this[r]!==void 0}const KO="{ [native code] }";function ZO(r,e){const t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function Cy(r,e){let t=cf.get(r);if(t){if(t.has(e))return!0}else cf.set(r,t=new Set);return t.add(e),!1}function Py(r,e,t,n){var i=e.data,a=on(e,["data"]),u=t.data,c=on(t,["data"]);return Ft(a,c)&&Tu(Bi(r).selectionSet,i,u,{fragmentMap:Wa(Qa(r)),variables:n})}function Tu(r,e,t,n){if(e===t)return!0;var i=new Set;return r.selections.every(function(a){if(i.has(a)||(i.add(a),!Vs(a,n.variables))||Ny(a))return!0;if(gi(a)){var u=yi(a),c=e&&e[u],f=t&&t[u],h=a.selectionSet;if(!h)return Ft(c,f);var d=Array.isArray(c),y=Array.isArray(f);if(d!==y)return!1;if(d&&y){var g=c.length;if(f.length!==g)return!1;for(var m=0;m<g;++m)if(!Tu(h,c[m],f[m],n))return!1;return!0}return Tu(h,c,f,n)}else{var b=za(a,n.fragmentMap);if(b)return Ny(b)?!0:Tu(b.selectionSet,e,t,n)}})}function Ny(r){return!!r.directives&&r.directives.some(XO)}function XO(r){return r.name.value==="nonreactive"}var ff=function(){function r(){this.assumeImmutableResults=!1,this.getFragmentDoc=Ya(Am,{max:Yn["cache.fragmentQueryDocuments"]||1e3,cache:uu})}return r.prototype.batch=function(e){var t=this,n=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=e.update(t)},n),i},r.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},r.prototype.transformDocument=function(e){return e},r.prototype.transformForLink=function(e){return e},r.prototype.identify=function(e){},r.prototype.gc=function(){return[]},r.prototype.modify=function(e){return!1},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(L(L({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},r.prototype.watchFragment=function(e){var t=this,n=e.fragment,i=e.fragmentName,a=e.from,u=e.optimistic,c=u===void 0?!0:u,f=on(e,["fragment","fragmentName","from","optimistic"]),h=this.getFragmentDoc(n,i),d=L(L({},f),{returnPartialData:!0,id:typeof a>"u"||typeof a=="string"?a:this.identify(a),query:h,optimistic:c}),y;return new Nt(function(g){return t.watch(L(L({},d),{immediate:!0,callback:function(m){if(!(y&&Py(h,{data:y==null?void 0:y.result},{data:m.result}))){var b={data:m.result,complete:!!m.complete};m.missing&&(b.missing=Xa(m.missing.map(function(I){return I.missing}))),y=m,g.next(b)}}}))})},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(L(L({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},r.prototype.writeQuery=function(e){var t=e.id,n=e.data,i=on(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))},r.prototype.writeFragment=function(e){var t=e.id,n=e.data,i=e.fragment,a=e.fragmentName,u=on(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(u,{query:this.getFragmentDoc(i,a),dataId:t,result:n}))},r.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var i=n.readQuery(e),a=t(i);return a==null?i:(n.writeQuery(L(L({},e),{data:a})),a)}})},r.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var i=n.readFragment(e),a=t(i);return a==null?i:(n.writeFragment(L(L({},e),{data:a})),a)}})},r}();globalThis.__DEV__!==!1&&(ff.prototype.getMemoryInternals=cE);var hf;hf||(hf={});var df=function(r){Pn(e,r);function e(t,n,i,a){var u,c=r.call(this,t)||this;if(c.message=t,c.path=n,c.query=i,c.variables=a,Array.isArray(c.path)){c.missing=c.message;for(var f=c.path.length-1;f>=0;--f)c.missing=(u={},u[c.path[f]]=c.missing,u)}else c.missing=c.path;return c.__proto__=e.prototype,c}return e}(Error),Rr=Object.prototype.hasOwnProperty;function no(r){return r==null}function pf(r,e){var t=r.__typename,n=r.id,i=r._id;if(typeof t=="string"&&(e&&(e.keyObject=no(n)?no(i)?void 0:{_id:i}:{id:n}),no(n)&&!no(i)&&(n=i),!no(n)))return"".concat(t,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var Ry={dataIdFromObject:pf,addTypename:!0,resultCaching:!0,canonizeResults:!1};function e1(r){return Wi(Ry,r)}function My(r){var e=r.canonizeResults;return e===void 0?Ry.canonizeResults:e}function t1(r,e){return Pt(e)?r.get(e.__ref,"__typename"):e&&e.__typename}var Dy=/^[_a-z][_0-9a-z]*/i;function Hi(r){var e=r.match(Dy);return e?e[0]:r}function mf(r,e,t){return er(e)?ur(e)?e.every(function(n){return mf(r,n,t)}):r.selections.every(function(n){if(gi(n)&&Vs(n,t)){var i=yi(n);return Rr.call(e,i)&&(!n.selectionSet||mf(n.selectionSet,e[i],t))}return!0}):!1}function Ks(r){return er(r)&&!Pt(r)&&!ur(r)}function r1(){return new vi}function Fy(r,e){var t=Wa(Qa(r));return{fragmentMap:t,lookupFragment:function(n){var i=t[n];return!i&&e&&(i=e.lookup(n)),i||null}}}var Au=Object.create(null),yf=function(){return Au},Ly=Object.create(null),io=function(){function r(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return Js(Pt(i)?n.get(i.__ref,a):i&&i[a])},this.canRead=function(i){return Pt(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return $i(i);if(Pt(i))return i;var u=n.policies.identify(i)[0];if(u){var c=$i(u);return a&&n.merge(u,i),c}}}return r.prototype.toObject=function(){return L({},this.data)},r.prototype.has=function(e){return this.lookup(e,!0)!==void 0},r.prototype.get=function(e,t){if(this.group.depend(e,t),Rr.call(this.data,e)){var n=this.data[e];if(n&&Rr.call(n,t))return n[t]}if(t==="__typename"&&Rr.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof Gi)return this.parent.get(e,t)},r.prototype.lookup=function(e,t){if(t&&this.group.depend(e,"__exists"),Rr.call(this.data,e))return this.data[e];if(this instanceof Gi)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return Object.create(null)},r.prototype.merge=function(e,t){var n=this,i;Pt(e)&&(e=e.__ref),Pt(t)&&(t=t.__ref);var a=typeof e=="string"?this.lookup(i=e):e,u=typeof t=="string"?this.lookup(i=t):t;if(u){je(typeof i=="string",1);var c=new vi(i1).merge(a,u);if(this.data[i]=c,c!==a&&(delete this.refs[i],this.group.caching)){var f=Object.create(null);a||(f.__exists=1),Object.keys(u).forEach(function(h){if(!a||a[h]!==c[h]){f[h]=1;var d=Hi(h);d!==h&&!n.policies.hasKeyArgs(c.__typename,d)&&(f[d]=1),c[h]===void 0&&!(n instanceof Gi)&&delete c[h]}}),f.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===c.__typename&&delete f.__typename,Object.keys(f).forEach(function(h){return n.group.dirty(i,h)})}}},r.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var a=Object.create(null),u=!1,c=!0,f={DELETE:Au,INVALIDATE:Ly,isReference:Pt,toReference:this.toReference,canRead:this.canRead,readField:function(h,d){return n.policies.readField(typeof h=="string"?{fieldName:h,from:d||$i(e)}:h,{store:n})}};if(Object.keys(i).forEach(function(h){var d=Hi(h),y=i[h];if(y!==void 0){var g=typeof t=="function"?t:t[h]||t[d];if(g){var m=g===yf?Au:g(Js(y),L(L({},f),{fieldName:d,storeFieldName:h,storage:n.getStorage(e,h)}));if(m===Ly)n.group.dirty(e,h);else if(m===Au&&(m=void 0),m!==y&&(a[h]=m,u=!0,y=m,globalThis.__DEV__!==!1)){var b=function(U){if(n.lookup(U.__ref)===void 0)return globalThis.__DEV__!==!1&&je.warn(2,U),!0};if(Pt(m))b(m);else if(Array.isArray(m))for(var I=!1,x=void 0,_=0,A=m;_<A.length;_++){var P=A[_];if(Pt(P)){if(I=!0,b(P))break}else if(typeof P=="object"&&P){var M=n.policies.identify(P)[0];M&&(x=P)}if(I&&x!==void 0){globalThis.__DEV__!==!1&&je.warn(3,x);break}}}}y!==void 0&&(c=!1)}}),u)return this.merge(e,a),c&&(this instanceof Gi?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},r.prototype.delete=function(e,t,n){var i,a=this.lookup(e);if(a){var u=this.getFieldValue(a,"__typename"),c=t&&n?this.policies.getStoreFieldName({typename:u,fieldName:t,args:n}):t;return this.modify(e,c?(i={},i[c]=yf,i):yf)}return!1},r.prototype.evict=function(e,t){var n=!1;return e.id&&(Rr.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Gi&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},r.prototype.clear=function(){this.replace(null)},r.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){Rr.call(e.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},r.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(a){e&&Rr.call(e,a)||t.delete(a)}),e){var n=e.__META,i=on(e,["__META"]);Object.keys(i).forEach(function(a){t.merge(a,i[a])}),n&&n.extraRootIds.forEach(this.retain,this)}},r.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},r.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},r.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Gi?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},r.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(u){Rr.call(n,u)&&(Object.keys(e.findChildRefIds(u)).forEach(t.add,t),delete n[u])});var i=Object.keys(n);if(i.length){for(var a=this;a instanceof Gi;)a=a.parent;i.forEach(function(u){return a.delete(u)})}return i},r.prototype.findChildRefIds=function(e){if(!Rr.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var i=new Set([n]);i.forEach(function(a){Pt(a)&&(t[a.__ref]=!0),er(a)&&Object.keys(a).forEach(function(u){var c=a[u];er(c)&&i.add(c)})})}return this.refs[e]},r.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},r}(),qy=function(){function r(e,t){t===void 0&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return r.prototype.resetCaching=function(){this.d=this.caching?Xm():null,this.keyMaker=new Ws(gs)},r.prototype.depend=function(e,t){if(this.d){this.d(gf(e,t));var n=Hi(t);n!==t&&this.d(gf(e,n)),this.parent&&this.parent.depend(e,t)}},r.prototype.dirty=function(e,t){this.d&&this.d.dirty(gf(e,t),t==="__exists"?"forget":"setDirty")},r}();function gf(r,e){return e+"#"+r}function jy(r,e){so(r)&&r.group.depend(e,"__exists")}(function(r){var e=function(t){Pn(n,t);function n(i){var a=i.policies,u=i.resultCaching,c=u===void 0?!0:u,f=i.seed,h=t.call(this,a,new qy(c))||this;return h.stump=new n1(h),h.storageTrie=new Ws(gs),f&&h.replace(f),h}return n.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(r);r.Root=e})(io||(io={}));var Gi=function(r){Pn(e,r);function e(t,n,i,a){var u=r.call(this,n.policies,a)||this;return u.id=t,u.parent=n,u.replay=i,u.group=a,i(u),u}return e.prototype.addLayer=function(t,n){return new e(t,this,n,this.group)},e.prototype.removeLayer=function(t){var n=this,i=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var u=n.data[a],c=i.lookup(a);c?u?u!==c&&Object.keys(u).forEach(function(f){Ft(u[f],c[f])||n.group.dirty(a,f)}):(n.group.dirty(a,"__exists"),Object.keys(c).forEach(function(f){n.group.dirty(a,f)})):n.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return L(L({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Rr.call(this.data,t)?L(L({},n),r.prototype.findChildRefIds.call(this,t)):n},e.prototype.getStorage=function(){for(var t=this.parent;t.parent;)t=t.parent;return t.getStorage.apply(t,arguments)},e}(io),n1=function(r){Pn(e,r);function e(t){return r.call(this,"EntityStore.Stump",t,function(){},new qy(t.group.caching,t.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(t,n){return this.parent.merge(t,n)},e}(Gi);function i1(r,e,t){var n=r[t],i=e[t];return Ft(n,i)?n:i}function so(r){return!!(r instanceof io&&r.group.caching)}function s1(r){return er(r)?ur(r)?r.slice(0):L({__proto__:Object.getPrototypeOf(r)},r):r}var Uy=function(){function r(){this.known=new(El?WeakSet:Set),this.pool=new Ws(gs),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return r.prototype.isKnown=function(e){return er(e)&&this.known.has(e)},r.prototype.pass=function(e){if(er(e)){var t=s1(e);return this.passes.set(t,e),t}return e},r.prototype.admit=function(e){var t=this;if(er(e)){var n=this.passes.get(e);if(n)return n;var i=Object.getPrototypeOf(e);switch(i){case Array.prototype:{if(this.known.has(e))return e;var a=e.map(this.admit,this),u=this.pool.lookupArray(a);return u.array||(this.known.add(u.array=a),globalThis.__DEV__!==!1&&Object.freeze(a)),u.array}case null:case Object.prototype:{if(this.known.has(e))return e;var c=Object.getPrototypeOf(e),f=[c],h=this.sortedKeys(e);f.push(h.json);var d=f.length;h.sorted.forEach(function(m){f.push(t.admit(e[m]))});var u=this.pool.lookupArray(f);if(!u.object){var y=u.object=Object.create(c);this.known.add(y),h.sorted.forEach(function(m,b){y[m]=f[d+b]}),globalThis.__DEV__!==!1&&Object.freeze(y)}return u.object}}}return e},r.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var i=JSON.stringify(t);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:t,json:i})}return n.keys},r}();function $y(r){return[r.selectionSet,r.objectOrReference,r.context,r.context.canonizeResults]}var a1=function(){function r(e){var t=this;this.knownResults=new(gs?WeakMap:Map),this.config=Wi(e,{addTypename:e.addTypename!==!1,canonizeResults:My(e)}),this.canon=e.canon||new Uy,this.executeSelectionSet=Ya(function(n){var i,a=n.context.canonizeResults,u=$y(n);u[3]=!a;var c=(i=t.executeSelectionSet).peek.apply(i,u);return c?a?L(L({},c),{result:t.canon.admit(c.result)}):c:(jy(n.context.store,n.enclosingRef.__ref),t.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:$y,makeCacheKey:function(n,i,a,u){if(so(a.store))return a.store.makeCacheKey(n,Pt(i)?i.__ref:i,a.varString,u)}}),this.executeSubSelectedArray=Ya(function(n){return jy(n.context.store,n.enclosingRef.__ref),t.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,a=n.array,u=n.context;if(so(u.store))return u.store.makeCacheKey(i,a,u.varString)}})}return r.prototype.resetCanon=function(){this.canon=new Uy},r.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.rootId,a=i===void 0?"ROOT_QUERY":i,u=e.variables,c=e.returnPartialData,f=c===void 0?!0:c,h=e.canonizeResults,d=h===void 0?this.config.canonizeResults:h,y=this.config.cache.policies;u=L(L({},hu(Rl(n))),u);var g=$i(a),m=this.executeSelectionSet({selectionSet:Bi(n).selectionSet,objectOrReference:g,enclosingRef:g,context:L({store:t,query:n,policies:y,variables:u,varString:mi(u),canonizeResults:d},Fy(n,this.config.fragments))}),b;if(m.missing&&(b=[new df(o1(m.missing),m.missing,n,u)],!f))throw b[0];return{result:m.result,complete:!b,missing:b}},r.prototype.isFresh=function(e,t,n,i){if(so(i.store)&&this.knownResults.get(e)===n){var a=this.executeSelectionSet.peek(n,t,i,this.canon.isKnown(e));if(a&&e===a.result)return!0}return!1},r.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,u=e.context;if(Pt(i)&&!u.policies.rootTypenamesById[i.__ref]&&!u.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var c=u.variables,f=u.policies,h=u.store,d=h.getFieldValue(i,"__typename"),y=[],g,m=new vi;this.config.addTypename&&typeof d=="string"&&!f.rootIdsByTypename[d]&&y.push({__typename:d});function b(P,M){var U;return P.missing&&(g=m.merge(g,(U={},U[M]=P.missing,U))),P.result}var I=new Set(n.selections);I.forEach(function(P){var M,U;if(Vs(P,c))if(gi(P)){var W=f.readField({fieldName:P.name.value,field:P,variables:u.variables,from:i},u),K=yi(P);W===void 0?gu.added(P)||(g=m.merge(g,(M={},M[K]="Can't find field '".concat(P.name.value,"' on ").concat(Pt(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),M))):ur(W)?W.length>0&&(W=b(t.executeSubSelectedArray({field:P,array:W,enclosingRef:a,context:u}),K)):P.selectionSet?W!=null&&(W=b(t.executeSelectionSet({selectionSet:P.selectionSet,objectOrReference:W,enclosingRef:Pt(W)?W:a,context:u}),K)):u.canonizeResults&&(W=t.canon.pass(W)),W!==void 0&&y.push((U={},U[K]=W,U))}else{var X=za(P,u.lookupFragment);if(!X&&P.kind===Fe.FRAGMENT_SPREAD)throw Yr(9,P.name.value);X&&f.fragmentMatches(X,d)&&X.selectionSet.selections.forEach(I.add,I)}});var x=Xa(y),_={result:x,missing:g},A=u.canonizeResults?this.canon.admit(_):Js(_);return A.result&&this.knownResults.set(A.result,n),A},r.prototype.execSubSelectedArrayImpl=function(e){var t=this,n=e.field,i=e.array,a=e.enclosingRef,u=e.context,c,f=new vi;function h(d,y){var g;return d.missing&&(c=f.merge(c,(g={},g[y]=d.missing,g))),d.result}return n.selectionSet&&(i=i.filter(u.store.canRead)),i=i.map(function(d,y){return d===null?null:ur(d)?h(t.executeSubSelectedArray({field:n,array:d,enclosingRef:a,context:u}),y):n.selectionSet?h(t.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:d,enclosingRef:Pt(d)?d:a,context:u}),y):(globalThis.__DEV__!==!1&&u1(u.store,n,d),d)}),{result:u.canonizeResults?this.canon.admit(i):i,missing:c}},r}();function o1(r){try{JSON.stringify(r,function(e,t){if(typeof t=="string")throw t;return t})}catch(e){return e}}function u1(r,e,t){if(!e.selectionSet){var n=new Set([t]);n.forEach(function(i){er(i)&&(je(!Pt(i),10,t1(r,i),e.name.value),Object.values(i).forEach(n.add,n))})}}var vf=new $m,By=new WeakMap;function ao(r){var e=By.get(r);return e||By.set(r,e={vars:new Set,dep:Xm()}),e}function Vy(r){ao(r).vars.forEach(function(e){return e.forgetCache(r)})}function c1(r){ao(r).vars.forEach(function(e){return e.attachCache(r)})}function Wy(r){var e=new Set,t=new Set,n=function(a){if(arguments.length>0){if(r!==a){r=a,e.forEach(function(f){ao(f).dep.dirty(n),l1(f)});var u=Array.from(t);t.clear(),u.forEach(function(f){return f(r)})}}else{var c=vf.getValue();c&&(i(c),ao(c).dep(n))}return r};n.onNextChange=function(a){return t.add(a),function(){t.delete(a)}};var i=n.attachCache=function(a){return e.add(a),ao(a).vars.add(n),n};return n.forgetCache=function(a){return e.delete(a)},n}function l1(r){r.broadcastWatches&&r.broadcastWatches()}var zy=Object.create(null);function bf(r){var e=JSON.stringify(r);return zy[e]||(zy[e]=Object.create(null))}function Hy(r){var e=bf(r);return e.keyFieldsFn||(e.keyFieldsFn=function(t,n){var i=function(u,c){return n.readField(c,u)},a=n.keyObject=wf(r,function(u){var c=Zs(n.storeObject,u,i);return c===void 0&&t!==n.storeObject&&Rr.call(t,u[0])&&(c=Zs(t,u,Jy)),je(c!==void 0,4,u.join("."),t),c});return"".concat(n.typename,":").concat(JSON.stringify(a))})}function Gy(r){var e=bf(r);return e.keyArgsFn||(e.keyArgsFn=function(t,n){var i=n.field,a=n.variables,u=n.fieldName,c=wf(r,function(h){var d=h[0],y=d.charAt(0);if(y==="@"){if(i&&mn(i.directives)){var g=d.slice(1),m=i.directives.find(function(_){return _.name.value===g}),b=m&&Ga(m,a);return b&&Zs(b,h.slice(1))}return}if(y==="$"){var I=d.slice(1);if(a&&Rr.call(a,I)){var x=h.slice(0);return x[0]=I,Zs(a,x)}return}if(t)return Zs(t,h)}),f=JSON.stringify(c);return(t||f!=="{}")&&(u+=":"+f),u})}function wf(r,e){var t=new vi;return Qy(r).reduce(function(n,i){var a,u=e(i);if(u!==void 0){for(var c=i.length-1;c>=0;--c)u=(a={},a[i[c]]=u,a);n=t.merge(n,u)}return n},Object.create(null))}function Qy(r){var e=bf(r);if(!e.paths){var t=e.paths=[],n=[];r.forEach(function(i,a){ur(i)?(Qy(i).forEach(function(u){return t.push(n.concat(u))}),n.length=0):(n.push(i),ur(r[a+1])||(t.push(n.slice(0)),n.length=0))})}return e.paths}function Jy(r,e){return r[e]}function Zs(r,e,t){return t=t||Jy,Yy(e.reduce(function n(i,a){return ur(i)?i.map(function(u){return n(u,a)}):i&&t(i,a)},r))}function Yy(r){return er(r)?ur(r)?r.map(Yy):wf(Object.keys(r).sort(),function(e){return Zs(r,e)}):r}function _f(r){return r.args!==void 0?r.args:r.field?Ga(r.field,r.variables):null}var f1=function(){},Ky=function(r,e){return e.fieldName},Zy=function(r,e,t){var n=t.mergeObjects;return n(r,e)},Xy=function(r,e){return e},h1=function(){function r(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=L({dataIdFromObject:pf},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return r.prototype.identify=function(e,t){var n,i=this,a=t&&(t.typename||((n=t.storeObject)===null||n===void 0?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var u=t&&t.storeObject||e,c=L(L({},t),{typename:a,storeObject:u,readField:t&&t.readField||function(){var g=xf(arguments,u);return i.readField(g,{store:i.cache.data,variables:g.variables})}}),f,h=a&&this.getTypePolicy(a),d=h&&h.keyFn||this.config.dataIdFromObject;d;){var y=d(L(L({},e),u),c);if(ur(y))d=Hy(y);else{f=y;break}}return f=f?String(f):void 0,c.keyObject?[f,c.keyObject]:[f]},r.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var i=e[n],a=i.queryType,u=i.mutationType,c=i.subscriptionType,f=on(i,["queryType","mutationType","subscriptionType"]);a&&t.setRootTypename("Query",n),u&&t.setRootTypename("Mutation",n),c&&t.setRootTypename("Subscription",n),Rr.call(t.toBeAdded,n)?t.toBeAdded[n].push(f):t.toBeAdded[n]=[f]})},r.prototype.updateTypePolicy=function(e,t){var n=this,i=this.getTypePolicy(e),a=t.keyFields,u=t.fields;function c(f,h){f.merge=typeof h=="function"?h:h===!0?Zy:h===!1?Xy:f.merge}c(i,t.merge),i.keyFn=a===!1?f1:ur(a)?Hy(a):typeof a=="function"?a:i.keyFn,u&&Object.keys(u).forEach(function(f){var h=n.getFieldPolicy(e,f,!0),d=u[f];if(typeof d=="function")h.read=d;else{var y=d.keyArgs,g=d.read,m=d.merge;h.keyFn=y===!1?Ky:ur(y)?Gy(y):typeof y=="function"?y:h.keyFn,typeof g=="function"&&(h.read=g),c(h,m)}h.read&&h.merge&&(h.keyFn=h.keyFn||Ky)})},r.prototype.setRootTypename=function(e,t){t===void 0&&(t=e);var n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(je(!i||i===e,5,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},r.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(i){t.getSupertypeSet(i,!0).add(n);var a=i.match(Dy);(!a||a[0]!==i)&&t.fuzzySubtypes.set(i,new RegExp(i))})})},r.prototype.getTypePolicy=function(e){var t=this;if(!Rr.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(u,c){if(u.test(e)){var f=t.supertypeMap.get(c);f&&f.forEach(function(h){return i.add(h)})}})),i&&i.size&&i.forEach(function(u){var c=t.getTypePolicy(u),f=c.fields,h=on(c,["fields"]);Object.assign(n,h),Object.assign(n.fields,f)})}var a=this.toBeAdded[e];return a&&a.length&&a.splice(0).forEach(function(u){t.updateTypePolicy(e,u)}),this.typePolicies[e]},r.prototype.getFieldPolicy=function(e,t,n){if(e){var i=this.getTypePolicy(e).fields;return i[t]||n&&(i[t]=Object.create(null))}},r.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},r.prototype.fragmentMatches=function(e,t,n,i){var a=this;if(!e.typeCondition)return!0;if(!t)return!1;var u=e.typeCondition.name.value;if(t===u)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(u))for(var c=this.getSupertypeSet(t,!0),f=[c],h=function(b){var I=a.getSupertypeSet(b,!1);I&&I.size&&f.indexOf(I)<0&&f.push(I)},d=!!(n&&this.fuzzySubtypes.size),y=!1,g=0;g<f.length;++g){var m=f[g];if(m.has(u))return c.has(u)||(y&&globalThis.__DEV__!==!1&&je.warn(6,t,u),c.add(u)),!0;m.forEach(h),d&&g===f.length-1&&mf(e.selectionSet,n,i)&&(d=!1,y=!0,this.fuzzySubtypes.forEach(function(b,I){var x=t.match(b);x&&x[0]===t&&h(I)}))}return!1},r.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},r.prototype.getStoreFieldName=function(e){var t=e.typename,n=e.fieldName,i=this.getFieldPolicy(t,n,!1),a,u=i&&i.keyFn;if(u&&t)for(var c={typename:t,fieldName:n,field:e.field||null,variables:e.variables},f=_f(e);u;){var h=u(f,c);if(ur(h))u=Gy(h);else{a=h||n;break}}return a===void 0&&(a=e.field?Mm(e.field,e.variables):Nl(n,_f(e))),a===!1?n:n===Hi(a)?a:n+":"+a},r.prototype.readField=function(e,t){var n=e.from;if(n){var i=e.field||e.fieldName;if(i){if(e.typename===void 0){var a=t.store.getFieldValue(n,"__typename");a&&(e.typename=a)}var u=this.getStoreFieldName(e),c=Hi(u),f=t.store.getFieldValue(n,u),h=this.getFieldPolicy(e.typename,c,!1),d=h&&h.read;if(d){var y=eg(this,n,e,t,t.store.getStorage(Pt(n)?n.__ref:n,u));return vf.withValue(this.cache,d,[f,y])}return f}}},r.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},r.prototype.getMergeFunction=function(e,t,n){var i=this.getFieldPolicy(e,t,!1),a=i&&i.merge;return!a&&n&&(i=this.getTypePolicy(n),a=i&&i.merge),a},r.prototype.runMergeFunction=function(e,t,n,i,a){var u=n.field,c=n.typename,f=n.merge;return f===Zy?tg(i.store)(e,t):f===Xy?t:(i.overwrite&&(e=void 0),f(e,t,eg(this,void 0,{typename:c,fieldName:u.name.value,field:u,variables:i.variables},i,a||Object.create(null))))},r}();function eg(r,e,t,n,i){var a=r.getStoreFieldName(t),u=Hi(a),c=t.variables||n.variables,f=n.store,h=f.toReference,d=f.canRead;return{args:_f(t),field:t.field||null,fieldName:u,storeFieldName:a,variables:c,isReference:Pt,toReference:h,storage:i,cache:r.cache,canRead:d,readField:function(){return r.readField(xf(arguments,e,c),n)},mergeObjects:tg(n.store)}}function xf(r,e,t){var n=r[0],i=r[1],a=r.length,u;return typeof n=="string"?u={fieldName:n,from:a>1?i:e}:(u=L({},n),Rr.call(u,"from")||(u.from=e)),globalThis.__DEV__!==!1&&u.from===void 0&&globalThis.__DEV__!==!1&&je.warn(7,pl(Array.from(r))),u.variables===void 0&&(u.variables=t),u}function tg(r){return function(t,n){if(ur(t)||ur(n))throw Yr(8);if(er(t)&&er(n)){var i=r.getFieldValue(t,"__typename"),a=r.getFieldValue(n,"__typename"),u=i&&a&&i!==a;if(u)return n;if(Pt(t)&&Ks(n))return r.merge(t.__ref,n),t;if(Ks(t)&&Pt(n))return r.merge(t,n.__ref),n;if(Ks(t)&&Ks(n))return L(L({},t),n)}return n}}function Sf(r,e,t){var n="".concat(e).concat(t),i=r.flavors.get(n);return i||r.flavors.set(n,i=r.clientOnly===e&&r.deferred===t?r:L(L({},r),{clientOnly:e,deferred:t})),i}var d1=function(){function r(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return r.prototype.writeToStore=function(e,t){var n=this,i=t.query,a=t.result,u=t.dataId,c=t.variables,f=t.overwrite,h=_s(i),d=r1();c=L(L({},hu(h)),c);var y=L(L({store:e,written:Object.create(null),merge:function(m,b){return d.merge(m,b)},variables:c,varString:mi(c)},Fy(i,this.fragments)),{overwrite:!!f,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),g=this.processSelectionSet({result:a||Object.create(null),dataId:u,selectionSet:h.selectionSet,mergeTree:{map:new Map},context:y});if(!Pt(g))throw Yr(11,a);return y.incomingById.forEach(function(m,b){var I=m.storeObject,x=m.mergeTree,_=m.fieldNodeSet,A=$i(b);if(x&&x.map.size){var P=n.applyMerges(x,A,I,y);if(Pt(P))return;I=P}if(globalThis.__DEV__!==!1&&!y.overwrite){var M=Object.create(null);_.forEach(function(K){K.selectionSet&&(M[K.name.value]=!0)});var U=function(K){return M[Hi(K)]===!0},W=function(K){var X=x&&x.map.get(K);return!!(X&&X.info&&X.info.merge)};Object.keys(I).forEach(function(K){U(K)&&!W(K)&&p1(A,I,K,y.store)})}e.merge(b,I)}),e.retain(g.__ref),g},r.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,a=e.selectionSet,u=e.context,c=e.mergeTree,f=this.cache.policies,h=Object.create(null),d=n&&f.rootTypenamesById[n]||lu(i,a,u.fragmentMap)||n&&u.store.get(n,"__typename");typeof d=="string"&&(h.__typename=d);var y=function(){var P=xf(arguments,h,u.variables);if(Pt(P.from)){var M=u.incomingById.get(P.from.__ref);if(M){var U=f.readField(L(L({},P),{from:M.storeObject}),u);if(U!==void 0)return U}}return f.readField(P,u)},g=new Set;this.flattenFields(a,i,u,d).forEach(function(P,M){var U,W=yi(M),K=i[W];if(g.add(M),K!==void 0){var X=f.getStoreFieldName({typename:d,fieldName:M.name.value,field:M,variables:P.variables}),fe=ng(c,X),oe=t.processFieldValue(K,M,M.selectionSet?Sf(P,!1,!1):P,fe),Ie=void 0;M.selectionSet&&(Pt(oe)||Ks(oe))&&(Ie=y("__typename",oe));var ye=f.getMergeFunction(d,M.name.value,Ie);ye?fe.info={field:M,typename:d,merge:ye}:ig(c,X),h=P.merge(h,(U={},U[X]=oe,U))}else globalThis.__DEV__!==!1&&!P.clientOnly&&!P.deferred&&!gu.added(M)&&!f.getReadFunction(d,M.name.value)&&globalThis.__DEV__!==!1&&je.error(12,yi(M),i)});try{var m=f.identify(i,{typename:d,selectionSet:a,fragmentMap:u.fragmentMap,storeObject:h,readField:y}),b=m[0],I=m[1];n=n||b,I&&(h=u.merge(h,I))}catch(P){if(!n)throw P}if(typeof n=="string"){var x=$i(n),_=u.written[n]||(u.written[n]=[]);if(_.indexOf(a)>=0||(_.push(a),this.reader&&this.reader.isFresh(i,x,a,u)))return x;var A=u.incomingById.get(n);return A?(A.storeObject=u.merge(A.storeObject,h),A.mergeTree=Ef(A.mergeTree,c),g.forEach(function(P){return A.fieldNodeSet.add(P)})):u.incomingById.set(n,{storeObject:h,mergeTree:ku(c)?void 0:c,fieldNodeSet:g}),x}return h},r.prototype.processFieldValue=function(e,t,n,i){var a=this;return!t.selectionSet||e===null?globalThis.__DEV__!==!1?Kl(e):e:ur(e)?e.map(function(u,c){var f=a.processFieldValue(u,t,n,ng(i,c));return ig(i,c),f}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i})},r.prototype.flattenFields=function(e,t,n,i){i===void 0&&(i=lu(t,e,n.fragmentMap));var a=new Map,u=this.cache.policies,c=new Ws(!1);return function f(h,d){var y=c.lookup(h,d.clientOnly,d.deferred);y.visited||(y.visited=!0,h.selections.forEach(function(g){if(Vs(g,n.variables)){var m=d.clientOnly,b=d.deferred;if(!(m&&b)&&mn(g.directives)&&g.directives.forEach(function(_){var A=_.name.value;if(A==="client"&&(m=!0),A==="defer"){var P=Ga(_,n.variables);(!P||P.if!==!1)&&(b=!0)}}),gi(g)){var I=a.get(g);I&&(m=m&&I.clientOnly,b=b&&I.deferred),a.set(g,Sf(n,m,b))}else{var x=za(g,n.lookupFragment);if(!x&&g.kind===Fe.FRAGMENT_SPREAD)throw Yr(13,g.name.value);x&&u.fragmentMatches(x,i,t,n.variables)&&f(x.selectionSet,Sf(n,m,b))}}}))}(e,n),a},r.prototype.applyMerges=function(e,t,n,i,a){var u,c=this;if(e.map.size&&!Pt(n)){var f=!ur(n)&&(Pt(t)||Ks(t))?t:void 0,h=n;f&&!a&&(a=[Pt(f)?f.__ref:f]);var d,y=function(g,m){return ur(g)?typeof m=="number"?g[m]:void 0:i.store.getFieldValue(g,String(m))};e.map.forEach(function(g,m){var b=y(f,m),I=y(h,m);if(I!==void 0){a&&a.push(m);var x=c.applyMerges(g,b,I,i,a);x!==I&&(d=d||new Map,d.set(m,x)),a&&je(a.pop()===m)}}),d&&(n=ur(h)?h.slice(0):L({},h),d.forEach(function(g,m){n[m]=g}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,a&&(u=i.store).getStorage.apply(u,a)):n},r}(),rg=[];function ng(r,e){var t=r.map;return t.has(e)||t.set(e,rg.pop()||{map:new Map}),t.get(e)}function Ef(r,e){if(r===e||!e||ku(e))return r;if(!r||ku(r))return e;var t=r.info&&e.info?L(L({},r.info),e.info):r.info||e.info,n=r.map.size&&e.map.size,i=n?new Map:r.map.size?r.map:e.map,a={info:t,map:i};if(n){var u=new Set(e.map.keys());r.map.forEach(function(c,f){a.map.set(f,Ef(c,e.map.get(f))),u.delete(f)}),u.forEach(function(c){a.map.set(c,Ef(e.map.get(c),r.map.get(c)))})}return a}function ku(r){return!r||!(r.info||r.map.size)}function ig(r,e){var t=r.map,n=t.get(e);n&&ku(n)&&(rg.push(n),t.delete(e))}var sg=new Set;function p1(r,e,t,n){var i=function(y){var g=n.getFieldValue(y,t);return typeof g=="object"&&g},a=i(r);if(a){var u=i(e);if(u&&!Pt(a)&&!Ft(a,u)&&!Object.keys(a).every(function(y){return n.getFieldValue(u,y)!==void 0})){var c=n.getFieldValue(r,"__typename")||n.getFieldValue(e,"__typename"),f=Hi(t),h="".concat(c,".").concat(f);if(!sg.has(h)){sg.add(h);var d=[];!ur(a)&&!ur(u)&&[a,u].forEach(function(y){var g=n.getFieldValue(y,"__typename");typeof g=="string"&&!d.includes(g)&&d.push(g)}),globalThis.__DEV__!==!1&&je.warn(14,f,c,d.length?"either ensure all objects of type "+d.join(" and ")+" have an ID or a custom merge function, or ":"",h,L({},a),L({},u))}}}}var Of=function(r){Pn(e,r);function e(t){t===void 0&&(t={});var n=r.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new mu(gu),n.assumeImmutableResults=!0,n.makeVar=Wy,n.txCount=0,n.config=e1(t),n.addTypename=!!n.config.addTypename,n.policies=new h1({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return e.prototype.init=function(){var t=this.data=new io.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()},e.prototype.resetResultCache=function(t){var n=this,i=this.storeReader,a=this.config.fragments;this.storeWriter=new d1(this,this.storeReader=new a1({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:My(this.config),canon:t?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Ya(function(u,c){return n.broadcastWatch(u,c)},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(u){var c=u.optimistic?n.optimisticData:n.data;if(so(c)){var f=u.optimistic,h=u.id,d=u.variables;return c.makeCacheKey(u.query,u.callback,mi({optimistic:f,id:h,variables:d}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(u){return u.resetCaching()})},e.prototype.restore=function(t){return this.init(),t&&this.data.replace(t),this},e.prototype.extract=function(t){return t===void 0&&(t=!1),(t?this.optimisticData:this.data).extract()},e.prototype.read=function(t){var n=t.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(L(L({},t),{store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof df)return null;throw a}},e.prototype.write=function(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(t){if(Rr.call(t,"id")&&!t.id)return!1;var n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(t){return this.storeReader.diffQueryAgainstStore(L(L({},t),{store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(t){var n=this;return this.watches.size||c1(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),function(){n.watches.delete(t)&&!n.watches.size&&Vy(n),n.maybeBroadcastWatch.forget(t)}},e.prototype.gc=function(t){var n;mi.reset(),Gs.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return t&&!this.txCount&&(t.resetResultCache?this.resetResultCache(t.resetResultIdentities):t.resetResultIdentities&&this.storeReader.resetCanon()),i},e.prototype.retain=function(t,n){return(n?this.optimisticData:this.data).retain(t)},e.prototype.release=function(t,n){return(n?this.optimisticData:this.data).release(t)},e.prototype.identify=function(t){if(Pt(t))return t.__ref;try{return this.policies.identify(t)[0]}catch(n){globalThis.__DEV__!==!1&&je.warn(n)}},e.prototype.evict=function(t){if(!t.id){if(Rr.call(t,"id"))return!1;t=L(L({},t),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(t){var n=this;return this.init(),mi.reset(),t&&t.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),Vy(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(t){var n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},e.prototype.batch=function(t){var n=this,i=t.update,a=t.optimistic,u=a===void 0?!0:a,c=t.removeOptimistic,f=t.onWatchUpdated,h,d=function(g){var m=n,b=m.data,I=m.optimisticData;++n.txCount,g&&(n.data=n.optimisticData=g);try{return h=i(n)}finally{--n.txCount,n.data=b,n.optimisticData=I}},y=new Set;return f&&!this.txCount&&this.broadcastWatches(L(L({},t),{onWatchUpdated:function(g){return y.add(g),!1}})),typeof u=="string"?this.optimisticData=this.optimisticData.addLayer(u,d):u===!1?d(this.data):d(),typeof c=="string"&&(this.optimisticData=this.optimisticData.removeLayer(c)),f&&y.size?(this.broadcastWatches(L(L({},t),{onWatchUpdated:function(g,m){var b=f.call(this,g,m);return b!==!1&&y.delete(g),b}})),y.size&&y.forEach(function(g){return n.maybeBroadcastWatch.dirty(g)})):this.broadcastWatches(t),h},e.prototype.performTransaction=function(t,n){return this.batch({update:t,optimistic:n||n!==null})},e.prototype.transformDocument=function(t){return this.addTypenameToDocument(this.addFragmentsToDocument(t))},e.prototype.broadcastWatches=function(t){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,t)})},e.prototype.addFragmentsToDocument=function(t){var n=this.config.fragments;return n?n.transform(t):t},e.prototype.addTypenameToDocument=function(t){return this.addTypename?this.addTypenameTransform.transformDocument(t):t},e.prototype.broadcastWatch=function(t,n){var i=t.lastDiff,a=this.diff(t);n&&(t.optimistic&&typeof n.optimistic=="string"&&(a.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,t,a,i)===!1)||(!i||!Ft(i.result,a.result))&&t.callback(t.lastDiff=a,i)},e}(ff);globalThis.__DEV__!==!1&&(Of.prototype.getMemoryInternals=uE);var kt;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error"})(kt||(kt={}));function oo(r){return r?r<7:!1}function m1(r){return r===7||r===8}var ag=Object.assign,y1=Object.hasOwnProperty,Iu=function(r){Pn(e,r);function e(t){var n=t.queryManager,i=t.queryInfo,a=t.options,u=r.call(this,function(x){try{var _=x._subscription._observer;_&&!_.error&&(_.error=g1)}catch{}var A=!u.observers.size;u.observers.add(x);var P=u.last;return P&&P.error?x.error&&x.error(P.error):P&&P.result&&x.next&&x.next(P.result),A&&u.reobserve().catch(function(){}),function(){u.observers.delete(x)&&!u.observers.size&&u.tearDownQuery()}})||this;u.observers=new Set,u.subscriptions=new Set,u.queryInfo=i,u.queryManager=n,u.waitForOwnResult=Tf(a.fetchPolicy),u.isTornDown=!1,u.subscribeToMore=u.subscribeToMore.bind(u);var c=n.defaultOptions.watchQuery,f=c===void 0?{}:c,h=f.fetchPolicy,d=h===void 0?"cache-first":h,y=a.fetchPolicy,g=y===void 0?d:y,m=a.initialFetchPolicy,b=m===void 0?g==="standby"?d:g:m;u.options=L(L({},a),{initialFetchPolicy:b,fetchPolicy:g}),u.queryId=i.queryId||n.generateQueryId();var I=_s(u.query);return u.queryName=I&&I.name&&I.name.value,u}return Object.defineProperty(e.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var t=this;return new Promise(function(n,i){var a={next:function(c){n(c),t.observers.delete(a),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout(function(){u.unsubscribe()},0)},error:i},u=t.subscribe(a)})},e.prototype.resetDiff=function(){this.queryInfo.resetDiff()},e.prototype.getCurrentResult=function(t){t===void 0&&(t=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||kt.ready,a=L(L({},n),{loading:oo(i),networkStatus:i}),u=this.options.fetchPolicy,c=u===void 0?"cache-first":u;if(!(Tf(c)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var f=this.queryInfo.getDiff();(f.complete||this.options.returnPartialData)&&(a.data=f.result),Ft(a.data,{})&&(a.data=void 0),f.complete?(delete a.partial,f.complete&&a.networkStatus===kt.loading&&(c==="cache-first"||c==="cache-only")&&(a.networkStatus=kt.ready,a.loading=!1)):a.partial=!0,globalThis.__DEV__!==!1&&!f.complete&&!this.options.partialRefetch&&!a.loading&&!a.data&&!a.error&&ug(f.missing)}return t&&this.updateLastResult(a),a},e.prototype.isDifferentFromLastResult=function(t,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!Py(this.query,this.last.result,t,this.variables):!Ft(this.last.result,t);return i||n&&!Ft(this.last.variables,n)},e.prototype.getLast=function(t,n){var i=this.last;if(i&&i[t]&&(!n||Ft(i.variables,this.variables)))return i[t]},e.prototype.getLastResult=function(t){return this.getLast("result",t)},e.prototype.getLastError=function(t){return this.getLast("error",t)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(t){var n,i={pollInterval:0},a=this.options.fetchPolicy;if(a==="cache-and-network"?i.fetchPolicy=a:a==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&t&&y1.call(t,"variables")){var u=Rl(this.query),c=u.variableDefinitions;(!c||!c.some(function(f){return f.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&je.warn(20,t,((n=u.name)===null||n===void 0?void 0:n.value)||u)}return t&&!Ft(this.options.variables,t)&&(i.variables=this.options.variables=L(L({},this.options.variables),t)),this.queryInfo.resetLastWrite(),this.reobserve(i,kt.refetch)},e.prototype.fetchMore=function(t){var n=this,i=L(L({},t.query?t:L(L(L(L({},this.options),{query:this.options.query}),t),{variables:L(L({},this.options.variables),t.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var a=this.queryManager.generateQueryId();this.lastQuery=t.query?this.transformDocument(this.options.query):i.query;var u=this.queryInfo,c=u.networkStatus;u.networkStatus=kt.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var f=new Set,h=t==null?void 0:t.updateQuery,d=this.options.fetchPolicy!=="no-cache";return d||je(h,21),this.queryManager.fetchQuery(a,i,kt.fetchMore).then(function(y){if(n.queryManager.removeQuery(a),u.networkStatus===kt.fetchMore&&(u.networkStatus=c),d)n.queryManager.cache.batch({update:function(b){var I=t.updateQuery;I?b.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(x){return I(x,{fetchMoreResult:y.data,variables:i.variables})}):b.writeQuery({query:i.query,variables:i.variables,data:y.data})},onWatchUpdated:function(b){f.add(b.query)}});else{var g=n.getLast("result"),m=h(g.data,{fetchMoreResult:y.data,variables:i.variables});n.reportResult(L(L({},g),{data:m}),n.variables)}return y}).finally(function(){d&&!f.has(n.query)&&og(n)})},e.prototype.subscribeToMore=function(t){var n=this,i=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:function(a){var u=t.updateQuery;u&&n.updateQuery(function(c,f){var h=f.variables;return u(c,{subscriptionData:a,variables:h})})},error:function(a){if(t.onError){t.onError(a);return}globalThis.__DEV__!==!1&&je.error(22,a)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},e.prototype.setOptions=function(t){return this.reobserve(t)},e.prototype.silentSetOptions=function(t){var n=Wi(this.options,t||{});ag(this.options,n)},e.prototype.setVariables=function(t){return Ft(this.variables,t)?this.observers.size?this.result():Promise.resolve():(this.options.variables=t,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:t},kt.setVariables):Promise.resolve())},e.prototype.updateQuery=function(t){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,a=t(i,{variables:this.variables});a&&(n.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),n.broadcastQueries())},e.prototype.startPolling=function(t){this.options.pollInterval=t,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(t,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,a=i===void 0?"cache-first":i,u=n.initialFetchPolicy,c=u===void 0?a:u;a==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(a,{reason:t,options:n,observable:this,initialFetchPolicy:c}):t==="variables-changed"?n.fetchPolicy=c:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},e.prototype.fetch=function(t,n,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,t,n,i)},e.prototype.updatePolling=function(){var t=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,a=n.options.pollInterval;if(!a||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){je(a,23);var u=i||(this.pollingInfo={});u.interval=a;var c=function(){var h,d;t.pollingInfo&&(!oo(t.queryInfo.networkStatus)&&!(!((d=(h=t.options).skipPollAttempt)===null||d===void 0)&&d.call(h))?t.reobserve({fetchPolicy:t.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},kt.poll).then(f,f):f())},f=function(){var h=t.pollingInfo;h&&(clearTimeout(h.timeout),h.timeout=setTimeout(c,h.interval))};f()}}},e.prototype.updateLastResult=function(t,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!Ft(n,this.last.variables)&&(i=void 0),this.last=L({result:this.queryManager.assumeImmutableResults?t:Kl(t),variables:n},i?{error:i}:null)},e.prototype.reobserveAsConcast=function(t,n){var i=this;this.isTornDown=!1;var a=n===kt.refetch||n===kt.fetchMore||n===kt.poll,u=this.options.variables,c=this.options.fetchPolicy,f=Wi(this.options,t||{}),h=a?f:ag(this.options,f),d=this.transformDocument(h.query);this.lastQuery=d,a||(this.updatePolling(),t&&t.variables&&!Ft(t.variables,u)&&h.fetchPolicy!=="standby"&&(h.fetchPolicy===c||typeof h.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",h),n===void 0&&(n=kt.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=Tf(h.fetchPolicy));var y=function(){i.concast===b&&(i.waitForOwnResult=!1)},g=h.variables&&L({},h.variables),m=this.fetch(h,n,d),b=m.concast,I=m.fromLink,x={next:function(_){Ft(i.variables,g)&&(y(),i.reportResult(_,g))},error:function(_){Ft(i.variables,g)&&(sf(_)||(_=new yn({networkError:_})),y(),i.reportError(_,g))}};return!a&&(I||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=b,this.observer=x),b.addObserver(x),b},e.prototype.reobserve=function(t,n){return this.reobserveAsConcast(t,n).promise},e.prototype.resubscribeAfterError=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this.last;this.resetLastResults();var a=this.subscribe.apply(this,t);return this.last=i,a},e.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},e.prototype.reportResult=function(t,n){var i=this.getLastError(),a=this.isDifferentFromLastResult(t,n);(i||!t.partial||this.options.returnPartialData)&&this.updateLastResult(t,n),(i||a)&&Ys(this.observers,"next",t)},e.prototype.reportError=function(t,n){var i=L(L({},this.getLastResult()),{error:t,errors:t.graphQLErrors,networkStatus:kt.error,loading:!1});this.updateLastResult(i,n),Ys(this.observers,"error",this.last.error=t)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e.prototype.transformDocument=function(t){return this.queryManager.transform(t)},e}(Nt);Xl(Iu);function og(r){var e=r.options,t=e.fetchPolicy,n=e.nextFetchPolicy;return t==="cache-and-network"||t==="network-only"?r.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,a){return this.nextFetchPolicy=n,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,a):t}}):r.reobserve()}function g1(r){globalThis.__DEV__!==!1&&je.error(24,r.message,r.stack)}function ug(r){globalThis.__DEV__!==!1&&r&&globalThis.__DEV__!==!1&&je.debug(25,r)}function Tf(r){return r==="network-only"||r==="no-cache"||r==="standby"}var Xs=new(gs?WeakMap:Map);function Af(r,e){var t=r[e];typeof t=="function"&&(r[e]=function(){return Xs.set(r,(Xs.get(r)+1)%1e15),t.apply(this,arguments)})}function cg(r){r.notifyTimeout&&(clearTimeout(r.notifyTimeout),r.notifyTimeout=void 0)}var kf=function(){function r(e,t){t===void 0&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Xs.has(n)||(Xs.set(n,0),Af(n,"evict"),Af(n,"modify"),Af(n,"reset"))}return r.prototype.init=function(e){var t=e.networkStatus||kt.loading;return this.variables&&this.networkStatus!==kt.loading&&!Ft(this.variables,e.variables)&&(t=kt.setVariables),Ft(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},r.prototype.reset=function(){cg(this),this.dirty=!1},r.prototype.resetDiff=function(){this.lastDiff=void 0},r.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&Ft(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&t.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},r.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},r.prototype.getDiffOptions=function(e){var t;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(t=this.observableQuery)===null||t===void 0?void 0:t.options.canonizeResults}},r.prototype.setDiff=function(e){var t=this,n,i=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(!((n=this.observableQuery)===null||n===void 0)&&n.getLastError())||(this.updateLastDiff(e),!this.dirty&&!Ft(i&&i.result,e&&e.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0))))},r.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=t.getDiff();n.fromOptimisticTransaction?e.observe():og(e)})):delete this.oqListener)},r.prototype.notify=function(){var e=this;cg(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},r.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(oo(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if(e!=="cache-only"&&e!=="cache-and-network")return!1}return!0},r.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=r.prototype.cancel;var e=this.observableQuery;e&&e.stopPolling()}},r.prototype.cancel=function(){},r.prototype.updateWatch=function(e){var t=this;e===void 0&&(e=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=L(L({},this.getDiffOptions(e)),{watcher:this,callback:function(a){return t.setDiff(a)}});(!this.lastWatch||!Ft(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},r.prototype.resetLastWrite=function(){this.lastWrite=void 0},r.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Xs.get(this.cache)&&Ft(t,n.variables)&&Ft(e.data,n.result.data))},r.prototype.markResult=function(e,t,n,i){var a=this,u=new vi,c=mn(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&mn(e.incremental)){var f=ef(this.getDiff().result,e);e.data=f}else if("hasNext"in e&&e.hasNext){var h=this.getDiff();e.data=u.merge(h.result,e.data)}this.graphQLErrors=c,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(If(e,n.errorPolicy)?this.cache.performTransaction(function(d){if(a.shouldWrite(e,n.variables))d.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:i===1}),a.lastWrite={result:e,variables:n.variables,dmCount:Xs.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){e.data=a.lastDiff.diff.result;return}var y=a.getDiffOptions(n.variables),g=d.diff(y);!a.stopped&&Ft(a.variables,n.variables)&&a.updateWatch(n.variables),a.updateLastDiff(g,y),g.complete&&(e.data=g.result)}):this.lastWrite=void 0)},r.prototype.markReady=function(){return this.networkError=null,this.networkStatus=kt.ready},r.prototype.markError=function(e){return this.networkStatus=kt.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},r}();function If(r,e){e===void 0&&(e="none");var t=e==="ignore"||e==="all",n=!to(r);return!n&&t&&r.data&&(n=!0),n}var v1=Object.prototype.hasOwnProperty,lg=Object.create(null),b1=function(){function r(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new cu(Yn["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Ws(!1);var n=new mu(function(a){return t.cache.transformDocument(a)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults;var i=e.documentTransform;this.documentTransform=i?n.concat(i).concat(n):n,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return r.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(Yr(26))},r.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},r.prototype.mutate=function(e){return Li(this,arguments,void 0,function(t){var n,i,a,u,c,f,h,d=t.mutation,y=t.variables,g=t.optimisticResponse,m=t.updateQueries,b=t.refetchQueries,I=b===void 0?[]:b,x=t.awaitRefetchQueries,_=x===void 0?!1:x,A=t.update,P=t.onQueryUpdated,M=t.fetchPolicy,U=M===void 0?((f=this.defaultOptions.mutate)===null||f===void 0?void 0:f.fetchPolicy)||"network-only":M,W=t.errorPolicy,K=W===void 0?((h=this.defaultOptions.mutate)===null||h===void 0?void 0:h.errorPolicy)||"none":W,X=t.keepRootFields,fe=t.context;return qi(this,function(oe){switch(oe.label){case 0:return je(d,27),je(U==="network-only"||U==="no-cache",28),n=this.generateMutationId(),d=this.cache.transformForLink(this.transform(d)),i=this.getDocumentInfo(d).hasClientExports,y=this.getVariables(d,y),i?[4,this.localState.addExportedVariables(d,y,fe)]:[3,2];case 1:y=oe.sent(),oe.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[n]={mutation:d,variables:y,loading:!0,error:null}),u=g&&this.markMutationOptimistic(g,{mutationId:n,document:d,variables:y,fetchPolicy:U,errorPolicy:K,context:fe,updateQueries:m,update:A,keepRootFields:X}),this.broadcastQueries(),c=this,[2,new Promise(function(Ie,ye){return wu(c.getObservableFromLink(d,L(L({},fe),{optimisticResponse:u?g:void 0}),y,{},!1),function(Ne){if(to(Ne)&&K==="none")throw new yn({graphQLErrors:_u(Ne)});a&&(a.loading=!1,a.error=null);var Ce=L({},Ne);return typeof I=="function"&&(I=I(Ce)),K==="ignore"&&to(Ce)&&delete Ce.errors,c.markMutationResult({mutationId:n,result:Ce,document:d,variables:y,fetchPolicy:U,errorPolicy:K,context:fe,update:A,updateQueries:m,awaitRefetchQueries:_,refetchQueries:I,removeOptimistic:u?n:void 0,onQueryUpdated:P,keepRootFields:X})}).subscribe({next:function(Ne){c.broadcastQueries(),(!("hasNext"in Ne)||Ne.hasNext===!1)&&Ie(Ne)},error:function(Ne){a&&(a.loading=!1,a.error=Ne),u&&c.cache.removeOptimistic(n),c.broadcastQueries(),ye(Ne instanceof yn?Ne:new yn({networkError:Ne}))}})})]}})})},r.prototype.markMutationResult=function(e,t){var n=this;t===void 0&&(t=this.cache);var i=e.result,a=[],u=e.fetchPolicy==="no-cache";if(!u&&If(i,e.errorPolicy)){if(Ss(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Ss(i)&&mn(i.incremental)){var c=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),f=void 0;c.result&&(f=ef(c.result,i)),typeof f<"u"&&(i.data=f,a.push({result:f,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var h=e.updateQueries;h&&this.queries.forEach(function(y,g){var m=y.observableQuery,b=m&&m.queryName;if(!(!b||!v1.call(h,b))){var I=h[b],x=n.queries.get(g),_=x.document,A=x.variables,P=t.diff({query:_,variables:A,returnPartialData:!0,optimistic:!1}),M=P.result,U=P.complete;if(U&&M){var W=I(M,{mutationResult:i,queryName:_&&fu(_)||void 0,queryVariables:A});W&&a.push({result:W,dataId:"ROOT_QUERY",query:_,variables:A})}}})}if(a.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(y){u||a.forEach(function(I){return y.write(I)});var g=e.update,m=!dy(i)||Ss(i)&&!i.hasNext;if(g){if(!u){var b=y.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});b.complete&&(i=L(L({},i),{data:b.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}m&&g(y,i,{context:e.context,variables:e.variables})}!u&&!e.keepRootFields&&m&&y.modify({id:"ROOT_MUTATION",fields:function(I,x){var _=x.fieldName,A=x.DELETE;return _==="__typename"?I:A}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(y){return d.push(y)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return i})}return Promise.resolve(i)},r.prototype.markMutationOptimistic=function(e,t){var n=this,i=typeof e=="function"?e(t.variables,{IGNORE:lg}):e;return i===lg?!1:(this.cache.recordOptimisticTransaction(function(a){try{n.markMutationResult(L(L({},t),{result:{data:i}}),a)}catch(u){globalThis.__DEV__!==!1&&je.error(u)}},t.mutationId),!0)},r.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast.promise},r.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},r.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},r.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},r.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:_m(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:ji(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:yu([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:hu(_s(e)),asQuery:L(L({},e),{definitions:e.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?L(L({},i),{operation:"query"}):i})})};t.set(e,n)}return t.get(e)},r.prototype.getVariables=function(e,t){return L(L({},this.getDocumentInfo(e).defaultVars),t)},r.prototype.watchQuery=function(e){var t=this.transform(e.query);e=L(L({},e),{variables:this.getVariables(t,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var n=new kf(this),i=new Iu({queryManager:this,queryInfo:n,options:e});return i.lastQuery=t,this.queries.set(i.queryId,n),n.init({document:t,observableQuery:i,variables:i.variables}),i},r.prototype.query=function(e,t){var n=this;return t===void 0&&(t=this.generateQueryId()),je(e.query,29),je(e.query.kind==="Document",30),je(!e.returnPartialData,31),je(!e.pollInterval,32),this.fetchQuery(t,L(L({},e),{query:this.transform(e.query)})).finally(function(){return n.stopQuery(t)})},r.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},r.prototype.generateRequestId=function(){return this.requestIdCounter++},r.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},r.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},r.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(Yr(33)),this.queries.forEach(function(t){t.observableQuery?t.networkStatus=kt.loading:t.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},r.prototype.getObservableQueries=function(e){var t=this;e===void 0&&(e="active");var n=new Map,i=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(u){typeof u=="string"?i.set(u,!1):Rm(u)?i.set(t.transform(u),!1):er(u)&&u.query&&a.add(u)}),this.queries.forEach(function(u,c){var f=u.observableQuery,h=u.document;if(f){if(e==="all"){n.set(c,f);return}var d=f.queryName,y=f.options.fetchPolicy;if(y==="standby"||e==="active"&&!f.hasObservers())return;(e==="active"||d&&i.has(d)||h&&i.has(h))&&(n.set(c,f),d&&i.set(d,!0),h&&i.set(h,!0))}}),a.size&&a.forEach(function(u){var c=eu("legacyOneTimeQuery"),f=t.getQuery(c).init({document:u.query,variables:u.variables}),h=new Iu({queryManager:t,queryInfo:f,options:L(L({},u),{fetchPolicy:"network-only"})});je(h.queryId===c),f.setObservableQuery(h),n.set(c,h)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(u,c){u||globalThis.__DEV__!==!1&&je.warn(typeof c=="string"?34:35,c)}),n},r.prototype.reFetchObservableQueries=function(e){var t=this;e===void 0&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(i,a){var u=i.options.fetchPolicy;i.resetLastResults(),(e||u!=="standby"&&u!=="cache-only")&&n.push(i.refetch()),t.getQuery(a).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},r.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},r.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,i=e.fetchPolicy,a=e.errorPolicy,u=a===void 0?"none":a,c=e.variables,f=e.context,h=f===void 0?{}:f,d=e.extensions,y=d===void 0?{}:d;n=this.transform(n),c=this.getVariables(n,c);var g=function(b){return t.getObservableFromLink(n,h,b,y).map(function(I){i!=="no-cache"&&(If(I,u)&&t.cache.write({query:n,result:I.data,dataId:"ROOT_SUBSCRIPTION",variables:b}),t.broadcastQueries());var x=to(I),_=qO(I);if(x||_){var A={};if(x&&(A.graphQLErrors=I.errors),_&&(A.protocolErrors=I.extensions[nf]),u==="none"||_)throw new yn(A)}return u==="ignore"&&delete I.errors,I})};if(this.getDocumentInfo(n).hasClientExports){var m=this.localState.addExportedVariables(n,c,h).then(g);return new Nt(function(b){var I=null;return m.then(function(x){return I=x.subscribe(b)},b.error),function(){return I&&I.unsubscribe()}})}return g(c)},r.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},r.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},r.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},r.prototype.getLocalState=function(){return this.localState},r.prototype.getObservableFromLink=function(e,t,n,i,a){var u=this,c;a===void 0&&(a=(c=t==null?void 0:t.queryDeduplication)!==null&&c!==void 0?c:this.queryDeduplication);var f,h=this.getDocumentInfo(e),d=h.serverQuery,y=h.clientQuery;if(d){var g=this,m=g.inFlightLinkObservables,b=g.link,I={query:d,variables:n,operationName:fu(d)||void 0,context:this.prepareContext(L(L({},t),{forceFetch:!a})),extensions:i};if(t=I.context,a){var x=Gs(d),_=mi(n),A=m.lookup(x,_);if(f=A.observable,!f){var P=new xs([Eu(b,I)]);f=A.observable=P,P.beforeNext(function(){m.remove(x,_)})}}else f=new xs([Eu(b,I)])}else f=new xs([Nt.of({data:{}})]),t=this.prepareContext(t);return y&&(f=wu(f,function(M){return u.localState.runResolvers({document:y,remoteResult:M,context:t,variables:n})})),f},r.prototype.getResultsFromLink=function(e,t,n){var i=e.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(n.query);return wu(this.getObservableFromLink(a,n.context,n.variables),function(u){var c=_u(u),f=c.length>0,h=n.errorPolicy;if(i>=e.lastRequestId){if(f&&h==="none")throw e.markError(new yn({graphQLErrors:c}));e.markResult(u,a,n,t),e.markReady()}var d={data:u.data,loading:!1,networkStatus:kt.ready};return f&&h==="none"&&(d.data=void 0),f&&h!=="ignore"&&(d.errors=c,d.networkStatus=kt.error),d},function(u){var c=sf(u)?u:new yn({networkError:u});throw i>=e.lastRequestId&&e.markError(c),c})},r.prototype.fetchConcastWithInfo=function(e,t,n,i){var a=this;n===void 0&&(n=kt.loading),i===void 0&&(i=t.query);var u=this.getVariables(i,t.variables),c=this.getQuery(e),f=this.defaultOptions.watchQuery,h=t.fetchPolicy,d=h===void 0?f&&f.fetchPolicy||"cache-first":h,y=t.errorPolicy,g=y===void 0?f&&f.errorPolicy||"none":y,m=t.returnPartialData,b=m===void 0?!1:m,I=t.notifyOnNetworkStatusChange,x=I===void 0?!1:I,_=t.context,A=_===void 0?{}:_,P=Object.assign({},t,{query:i,variables:u,fetchPolicy:d,errorPolicy:g,returnPartialData:b,notifyOnNetworkStatusChange:x,context:A}),M=function(fe){P.variables=fe;var oe=a.fetchQueryByPolicy(c,P,n);return P.fetchPolicy!=="standby"&&oe.sources.length>0&&c.observableQuery&&c.observableQuery.applyNextFetchPolicy("after-fetch",t),oe},U=function(){return a.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(fe){U(),setTimeout(function(){return W.cancel(fe)})});var W,K;if(this.getDocumentInfo(P.query).hasClientExports)W=new xs(this.localState.addExportedVariables(P.query,P.variables,P.context).then(M).then(function(fe){return fe.sources})),K=!0;else{var X=M(P.variables);K=X.fromLink,W=new xs(X.sources)}return W.promise.then(U,U),{concast:W,fromLink:K}},r.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,i=e.include,a=e.optimistic,u=a===void 0?!1:a,c=e.removeOptimistic,f=c===void 0?u?eu("refetchQueries"):void 0:c,h=e.onQueryUpdated,d=new Map;i&&this.getObservableQueries(i).forEach(function(g,m){d.set(m,{oq:g,lastDiff:t.getQuery(m).getDiff()})});var y=new Map;return n&&this.cache.batch({update:n,optimistic:u&&f||!1,removeOptimistic:f,onWatchUpdated:function(g,m,b){var I=g.watcher instanceof kf&&g.watcher.observableQuery;if(I){if(h){d.delete(I.queryId);var x=h(I,m,b);return x===!0&&(x=I.refetch()),x!==!1&&y.set(I,x),x}h!==null&&d.set(I.queryId,{oq:I,lastDiff:b,diff:m})}}}),d.size&&d.forEach(function(g,m){var b=g.oq,I=g.lastDiff,x=g.diff,_;if(h){if(!x){var A=b.queryInfo;A.reset(),x=A.getDiff()}_=h(b,x,I)}(!h||_===!0)&&(_=b.refetch()),_!==!1&&y.set(b,_),m.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(m)}),f&&this.cache.removeOptimistic(f),y},r.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,a=t.query,u=t.variables,c=t.fetchPolicy,f=t.refetchWritePolicy,h=t.errorPolicy,d=t.returnPartialData,y=t.context,g=t.notifyOnNetworkStatusChange,m=e.networkStatus;e.init({document:a,variables:u,networkStatus:n});var b=function(){return e.getDiff()},I=function(M,U){U===void 0&&(U=e.networkStatus||kt.loading);var W=M.result;globalThis.__DEV__!==!1&&!d&&!Ft(W,{})&&ug(M.missing);var K=function(X){return Nt.of(L({data:X,loading:oo(U),networkStatus:U},M.complete?null:{partial:!0}))};return W&&i.getDocumentInfo(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:W},context:y,variables:u,onlyRunForcedResolvers:!0}).then(function(X){return K(X.data||void 0)}):h==="none"&&U===kt.refetch&&Array.isArray(M.missing)?K(void 0):K(W)},x=c==="no-cache"?0:n===kt.refetch&&f!=="merge"?1:2,_=function(){return i.getResultsFromLink(e,x,{query:a,variables:u,context:y,fetchPolicy:c,errorPolicy:h})},A=g&&typeof m=="number"&&m!==n&&oo(n);switch(c){default:case"cache-first":{var P=b();return P.complete?{fromLink:!1,sources:[I(P,e.markReady())]}:d||A?{fromLink:!0,sources:[I(P),_()]}:{fromLink:!0,sources:[_()]}}case"cache-and-network":{var P=b();return P.complete||d||A?{fromLink:!0,sources:[I(P),_()]}:{fromLink:!0,sources:[_()]}}case"cache-only":return{fromLink:!1,sources:[I(b(),e.markReady())]};case"network-only":return A?{fromLink:!0,sources:[I(b()),_()]}:{fromLink:!0,sources:[_()]};case"no-cache":return A?{fromLink:!0,sources:[I(e.getDiff()),_()]}:{fromLink:!0,sources:[_()]};case"standby":return{fromLink:!1,sources:[]}}},r.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new kf(this,e)),this.queries.get(e)},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.localState.prepareContext(e);return L(L(L({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},r}(),w1=function(){function r(e){var t=e.cache,n=e.client,i=e.resolvers,a=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return r.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(n){t.resolvers=Za(t.resolvers,n)}):this.resolvers=Za(this.resolvers,e)},r.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},r.prototype.getResolvers=function(){return this.resolvers||{}},r.prototype.runResolvers=function(e){return Li(this,arguments,void 0,function(t){var n=t.document,i=t.remoteResult,a=t.context,u=t.variables,c=t.onlyRunForcedResolvers,f=c===void 0?!1:c;return qi(this,function(h){return n?[2,this.resolveDocument(n,i.data,a,u,this.fragmentMatcher,f).then(function(d){return L(L({},i),{data:d.result})})]:[2,i]})})},r.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},r.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},r.prototype.clientQuery=function(e){return ji(["client"],e)&&this.resolvers?e:null},r.prototype.serverQuery=function(e){return $l(e)},r.prototype.prepareContext=function(e){var t=this.cache;return L(L({},e),{cache:t,getCacheKey:function(n){return t.identify(n)}})},r.prototype.addExportedVariables=function(e){return Li(this,arguments,void 0,function(t,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),qi(this,function(a){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,n)||{},this.prepareContext(i),n).then(function(u){return L(L({},n),u.exportedVariables)})]:[2,L({},n)]})})},r.prototype.shouldForceResolvers=function(e){var t=!1;return Rn(e,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(t=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),t))return Sl}}}),t},r.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:iy(e),variables:t,returnPartialData:!0,optimistic:!1}).result},r.prototype.resolveDocument=function(e,t){return Li(this,arguments,void 0,function(n,i,a,u,c,f){var h,d,y,g,m,b,I,x,_,A,P;return a===void 0&&(a={}),u===void 0&&(u={}),c===void 0&&(c=function(){return!0}),f===void 0&&(f=!1),qi(this,function(M){return h=Bi(n),d=Qa(n),y=Wa(d),g=this.collectSelectionsToResolve(h,y),m=h.operation,b=m?m.charAt(0).toUpperCase()+m.slice(1):"Query",I=this,x=I.cache,_=I.client,A={fragmentMap:y,context:L(L({},a),{cache:x,client:_}),variables:u,fragmentMatcher:c,defaultOperationType:b,exportedVariables:{},selectionsToResolve:g,onlyRunForcedResolvers:f},P=!1,[2,this.resolveSelectionSet(h.selectionSet,P,i,A).then(function(U){return{result:U,exportedVariables:A.exportedVariables}})]})})},r.prototype.resolveSelectionSet=function(e,t,n,i){return Li(this,void 0,void 0,function(){var a,u,c,f,h,d=this;return qi(this,function(y){return a=i.fragmentMap,u=i.context,c=i.variables,f=[n],h=function(g){return Li(d,void 0,void 0,function(){var m,b;return qi(this,function(I){return!t&&!i.selectionsToResolve.has(g)?[2]:Vs(g,c)?gi(g)?[2,this.resolveField(g,t,n,i).then(function(x){var _;typeof x<"u"&&f.push((_={},_[yi(g)]=x,_))})]:(Dm(g)?m=g:(m=a[g.name.value],je(m,18,g.name.value)),m&&m.typeCondition&&(b=m.typeCondition.name.value,i.fragmentMatcher(n,b,u))?[2,this.resolveSelectionSet(m.selectionSet,t,n,i).then(function(x){f.push(x)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(h)).then(function(){return Xa(f)})]})})},r.prototype.resolveField=function(e,t,n,i){return Li(this,void 0,void 0,function(){var a,u,c,f,h,d,y,g,m,b=this;return qi(this,function(I){return n?(a=i.variables,u=e.name.value,c=yi(e),f=u!==c,h=n[c]||n[u],d=Promise.resolve(h),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(y=n.__typename||i.defaultOperationType,g=this.resolvers&&this.resolvers[y],g&&(m=g[f?u:c],m&&(d=Promise.resolve(vf.withValue(this.cache,m,[n,Ga(e,a),i.context,{field:e,fragmentMap:i.fragmentMap}]))))),[2,d.then(function(x){var _,A;if(x===void 0&&(x=h),e.directives&&e.directives.forEach(function(M){M.name.value==="export"&&M.arguments&&M.arguments.forEach(function(U){U.name.value==="as"&&U.value.kind==="StringValue"&&(i.exportedVariables[U.value.value]=x)})}),!e.selectionSet||x==null)return x;var P=(A=(_=e.directives)===null||_===void 0?void 0:_.some(function(M){return M.name.value==="client"}))!==null&&A!==void 0?A:!1;if(Array.isArray(x))return b.resolveSubSelectedArray(e,t||P,x,i);if(e.selectionSet)return b.resolveSelectionSet(e.selectionSet,t||P,x,i)})]):[2,null]})})},r.prototype.resolveSubSelectedArray=function(e,t,n,i){var a=this;return Promise.all(n.map(function(u){if(u===null)return null;if(Array.isArray(u))return a.resolveSubSelectedArray(e,t,u,i);if(e.selectionSet)return a.resolveSelectionSet(e.selectionSet,t,u,i)}))},r.prototype.collectSelectionsToResolve=function(e,t){var n=function(u){return!Array.isArray(u)},i=this.selectionsToResolveCache;function a(u){if(!i.has(u)){var c=new Set;i.set(u,c),Rn(u,{Directive:function(f,h,d,y,g){f.name.value==="client"&&g.forEach(function(m){n(m)&&wm(m)&&c.add(m)})},FragmentSpread:function(f,h,d,y,g){var m=t[f.name.value];je(m,19,f.name.value);var b=a(m);b.size>0&&(g.forEach(function(I){n(I)&&wm(I)&&c.add(I)}),c.add(f),b.forEach(function(I){c.add(I)}))}})}return i.get(u)}return a(e)},r}(),fg=!1,Cf=function(){function r(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw Yr(15);var n=e.uri,i=e.credentials,a=e.headers,u=e.cache,c=e.documentTransform,f=e.ssrMode,h=f===void 0?!1:f,d=e.ssrForceFetchDelay,y=d===void 0?0:d,g=e.connectToDevTools,m=e.queryDeduplication,b=m===void 0?!0:m,I=e.defaultOptions,x=e.defaultContext,_=e.assumeImmutableResults,A=_===void 0?u.assumeImmutableResults:_,P=e.resolvers,M=e.typeDefs,U=e.fragmentMatcher,W=e.name,K=e.version,X=e.devtools,fe=e.link;fe||(fe=n?new Ty({uri:n,credentials:i,headers:a}):Kr.empty()),this.link=fe,this.cache=u,this.disableNetworkFetches=h||y>0,this.queryDeduplication=b,this.defaultOptions=I||Object.create(null),this.typeDefs=M,this.devtoolsConfig=L(L({},X),{enabled:(X==null?void 0:X.enabled)||g}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),y&&setTimeout(function(){return t.disableNetworkFetches=!1},y),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=hl,this.localState=new w1({cache:u,client:this,resolvers:P,fragmentMatcher:U}),this.queryManager=new b1({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:x,documentTransform:c,queryDeduplication:b,ssrMode:h,clientAwareness:{name:W,version:K},localState:this.localState,assumeImmutableResults:A,onBroadcast:this.devtoolsConfig.enabled?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return r.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!fg&&globalThis.__DEV__!==!1&&(fg=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var n=window.navigator,i=n&&n.userAgent,a=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?a="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(a="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),a&&globalThis.__DEV__!==!1&&je.log("Download the Apollo DevTools for a better development experience: %s",a)}},1e4))}},Object.defineProperty(r.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),r.prototype.stop=function(){this.queryManager.stop()},r.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=zi(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=L(L({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},r.prototype.query=function(e){return this.defaultOptions.query&&(e=zi(this.defaultOptions.query,e)),je(e.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=L(L({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},r.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=zi(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},r.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.cache.readQuery(e,t)},r.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.cache.readFragment(e,t)},r.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},r.prototype.__requestRaw=function(e){return Eu(this.link,e)},r.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(t){return t()}))}).then(function(){return e.reFetchObservableQueries()})},r.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(t){return t()}))})},r.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},r.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach(function(u,c){n.push(c),i.push(u)});var a=Promise.all(i);return a.queries=n,a.results=i,a.catch(function(u){globalThis.__DEV__!==!1&&je.debug(17,u)}),a},r.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},r.prototype.extract=function(e){return this.cache.extract(e)},r.prototype.restore=function(e){return this.cache.restore(e)},r.prototype.addResolvers=function(e){this.localState.addResolvers(e)},r.prototype.setResolvers=function(e){this.localState.setResolvers(e)},r.prototype.getResolvers=function(){return this.localState.getResolvers()},r.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},r.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(r.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),r}();globalThis.__DEV__!==!1&&(Cf.prototype.getMemoryInternals=oE);var Cu=new Map,Pf=new Map,hg=!0,Pu=!1;function dg(r){return r.replace(/[\s,]+/g," ").trim()}function _1(r){return dg(r.source.body.substring(r.start,r.end))}function x1(r){var e=new Set,t=[];return r.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,a=_1(n.loc),u=Pf.get(i);u&&!u.has(a)?hg&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
84
|
+
`).forEach(function(t){var n=t.indexOf(":");if(n>-1){var i=t.slice(0,n).trim().toLowerCase(),a=t.slice(n+1).trim();e[i]=a}}),e}function by(r,e){if(r.status>=300){var t=function(){try{return JSON.parse(e)}catch{return e}};rf(r,t(),"Response not successful: Received status code ".concat(r.status))}try{return JSON.parse(e)}catch(i){var n=i;throw n.name="ServerParseError",n.response=r,n.statusCode=r.status,n.bodyText=e,n}}function BO(r,e){r.result&&r.result.errors&&r.result.data&&e.next(r.result),e.error(r)}function wy(r){return function(e){return e.text().then(function(t){return by(e,t)}).then(function(t){return!Array.isArray(t)&&!vy.call(t,"data")&&!vy.call(t,"errors")&&rf(e,t,"Server response was missing for query '".concat(Array.isArray(r)?r.map(function(n){return n.operationName}):r.operationName,"'.")),t})}}var Ou=function(r,e){var t;try{t=JSON.stringify(r)}catch(i){var n=Yr(40,e,i.message);throw n.parseError=i,n}return t},VO={includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},WO={accept:"*/*","content-type":"application/json"},zO={method:"POST"},_y={http:VO,headers:WO,options:zO},af=function(r,e){return e(r)};function HO(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return t.unshift(e),of.apply(void 0,wr([r,af],t,!1))}function of(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i={},a={};t.forEach(function(y){i=L(L(L({},i),y.options),{headers:L(L({},i.headers),y.headers)}),y.credentials&&(i.credentials=y.credentials),a=L(L({},a),y.http)}),i.headers&&(i.headers=GO(i.headers,a.preserveHeaderCase));var u=r.operationName,c=r.extensions,f=r.variables,h=r.query,d={operationName:u,variables:f};return a.includeExtensions&&(d.extensions=c),a.includeQuery&&(d.query=e(h,Gs)),{options:i,body:d}}function GO(r,e){if(!e){var t={};return Object.keys(Object(r)).forEach(function(a){t[a.toLowerCase()]=r[a]}),t}var n={};Object.keys(Object(r)).forEach(function(a){n[a.toLowerCase()]={originalName:a,value:r[a]}});var i={};return Object.keys(n).forEach(function(a){i[n[a].originalName]=n[a].value}),i}var xy=function(r){if(!r&&typeof fetch>"u")throw Yr(38)},QO=function(){if(typeof AbortController>"u")return{controller:!1,signal:!1};var r=new AbortController,e=r.signal;return{controller:r,signal:e}},Sy=function(r,e){var t=r.getContext(),n=t.uri;return n||(typeof e=="function"?e(r):e||"/graphql")};function Ey(r,e){var t=[],n=function(y,g){t.push("".concat(y,"=").concat(encodeURIComponent(g)))};if("query"in e&&n("query",e.query),e.operationName&&n("operationName",e.operationName),e.variables){var i=void 0;try{i=Ou(e.variables,"Variables map")}catch(y){return{parseError:y}}n("variables",i)}if(e.extensions){var a=void 0;try{a=Ou(e.extensions,"Extensions map")}catch(y){return{parseError:y}}n("extensions",a)}var u="",c=r,f=r.indexOf("#");f!==-1&&(u=r.substr(f),c=r.substr(0,f));var h=c.indexOf("?")===-1?"?":"&",d=c+h+t.join("&")+u;return{newURI:d}}var Oy=Nn(function(){return fetch}),uf=function(r){r===void 0&&(r={});var e=r.uri,t=e===void 0?"/graphql":e,n=r.fetch,i=r.print,a=i===void 0?af:i,u=r.includeExtensions,c=r.preserveHeaderCase,f=r.useGETForQueries,h=r.includeUnusedVariables,d=h===void 0?!1:h,y=on(r,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);globalThis.__DEV__!==!1&&xy(n||Oy);var g={http:{includeExtensions:u,preserveHeaderCase:c},options:y.fetchOptions,credentials:y.credentials,headers:y.headers};return new Kr(function(m){var b=Sy(m,t),I=m.getContext(),x={};if(I.clientAwareness){var _=I.clientAwareness,A=_.name,P=_.version;A&&(x["apollographql-client-name"]=A),P&&(x["apollographql-client-version"]=P)}var M=L(L({},x),I.headers),U={http:I.http,options:I.fetchOptions,credentials:I.credentials,headers:M};if(ji(["client"],m.query)){var W=$l(m.query);if(!W)return xu(new Error("HttpLink: Trying to send a client-only query to the server. To send to the server, ensure a non-client field is added to the query or set the `transformOptions.removeClientFields` option to `true`."));m.query=W}var K=of(m,a,_y,g,U),X=K.options,fe=K.body;fe.variables&&!d&&(fe.variables=SO(fe.variables,m.query));var oe;!X.signal&&typeof AbortController<"u"&&(oe=new AbortController,X.signal=oe.signal);var Ie=function(Ee){return Ee.kind==="OperationDefinition"&&Ee.operation==="mutation"},ye=function(Ee){return Ee.kind==="OperationDefinition"&&Ee.operation==="subscription"},Ne=ye(Bi(m.query)),Ce=ji(["defer"],m.query);if(f&&!m.query.definitions.some(Ie)&&(X.method="GET"),Ce||Ne){X.headers=X.headers||{};var ge="multipart/mixed;";Ne&&Ce&&globalThis.__DEV__!==!1&&je.warn(39),Ne?ge+="boundary=graphql;subscriptionSpec=1.0,application/json":Ce&&(ge+="deferSpec=20220824,application/json"),X.headers.accept=ge}if(X.method==="GET"){var ve=Ey(b,fe),pe=ve.newURI,te=ve.parseError;if(te)return xu(te);b=pe}else try{X.body=Ou(fe,"Payload")}catch(Ee){return xu(Ee)}return new Nt(function(Ee){var Le=n||Nn(function(){return fetch})||Oy,Se=Ee.next.bind(Ee);return Le(b,X).then(function(Ze){var vt;m.setContext({response:Ze});var Mt=(vt=Ze.headers)===null||vt===void 0?void 0:vt.get("content-type");return Mt!==null&&/^multipart\/mixed/i.test(Mt)?UO(Ze,Se):wy(m)(Ze).then(Se)}).then(function(){oe=void 0,Ee.complete()}).catch(function(Ze){oe=void 0,BO(Ze,Ee)}),function(){oe&&oe.abort()}})})},Ty=function(r){Pn(e,r);function e(t){t===void 0&&(t={});var n=r.call(this,uf(t).request)||this;return n.options=t,n}return e}(Kr);const{toString:Ay,hasOwnProperty:JO}=Object.prototype,ky=Function.prototype.toString,cf=new Map;function Ft(r,e){try{return lf(r,e)}finally{cf.clear()}}function lf(r,e){if(r===e)return!0;const t=Ay.call(r),n=Ay.call(e);if(t!==n)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(Cy(r,e))return!0;const i=Iy(r),a=Iy(e),u=i.length;if(u!==a.length)return!1;for(let c=0;c<u;++c)if(!JO.call(e,i[c]))return!1;for(let c=0;c<u;++c){const f=i[c];if(!lf(r[f],e[f]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==`${e}`;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(Cy(r,e))return!0;const i=r.entries(),a=t==="[object Map]";for(;;){const u=i.next();if(u.done)break;const[c,f]=u.value;if(!e.has(c)||a&&!lf(f,e.get(c)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":r=new Uint8Array(r),e=new Uint8Array(e);case"[object DataView]":{let i=r.byteLength;if(i===e.byteLength)for(;i--&&r[i]===e[i];);return i===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const i=ky.call(r);return i!==ky.call(e)?!1:!ZO(i,KO)}}return!1}function Iy(r){return Object.keys(r).filter(YO,r)}function YO(r){return this[r]!==void 0}const KO="{ [native code] }";function ZO(r,e){const t=r.length-e.length;return t>=0&&r.indexOf(e,t)===t}function Cy(r,e){let t=cf.get(r);if(t){if(t.has(e))return!0}else cf.set(r,t=new Set);return t.add(e),!1}function Py(r,e,t,n){var i=e.data,a=on(e,["data"]),u=t.data,c=on(t,["data"]);return Ft(a,c)&&Tu(Bi(r).selectionSet,i,u,{fragmentMap:Wa(Qa(r)),variables:n})}function Tu(r,e,t,n){if(e===t)return!0;var i=new Set;return r.selections.every(function(a){if(i.has(a)||(i.add(a),!Vs(a,n.variables))||Ny(a))return!0;if(gi(a)){var u=yi(a),c=e&&e[u],f=t&&t[u],h=a.selectionSet;if(!h)return Ft(c,f);var d=Array.isArray(c),y=Array.isArray(f);if(d!==y)return!1;if(d&&y){var g=c.length;if(f.length!==g)return!1;for(var m=0;m<g;++m)if(!Tu(h,c[m],f[m],n))return!1;return!0}return Tu(h,c,f,n)}else{var b=za(a,n.fragmentMap);if(b)return Ny(b)?!0:Tu(b.selectionSet,e,t,n)}})}function Ny(r){return!!r.directives&&r.directives.some(XO)}function XO(r){return r.name.value==="nonreactive"}var ff=function(){function r(){this.assumeImmutableResults=!1,this.getFragmentDoc=Ya(Am,{max:Yn["cache.fragmentQueryDocuments"]||1e3,cache:uu})}return r.prototype.batch=function(e){var t=this,n=typeof e.optimistic=="string"?e.optimistic:e.optimistic===!1?null:void 0,i;return this.performTransaction(function(){return i=e.update(t)},n),i},r.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},r.prototype.transformDocument=function(e){return e},r.prototype.transformForLink=function(e){return e},r.prototype.identify=function(e){},r.prototype.gc=function(){return[]},r.prototype.modify=function(e){return!1},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(L(L({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},r.prototype.watchFragment=function(e){var t=this,n=e.fragment,i=e.fragmentName,a=e.from,u=e.optimistic,c=u===void 0?!0:u,f=on(e,["fragment","fragmentName","from","optimistic"]),h=this.getFragmentDoc(n,i),d=L(L({},f),{returnPartialData:!0,id:typeof a>"u"||typeof a=="string"?a:this.identify(a),query:h,optimistic:c}),y;return new Nt(function(g){return t.watch(L(L({},d),{immediate:!0,callback:function(m){if(!(y&&Py(h,{data:y==null?void 0:y.result},{data:m.result}))){var b={data:m.result,complete:!!m.complete};m.missing&&(b.missing=Xa(m.missing.map(function(I){return I.missing}))),y=m,g.next(b)}}}))})},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!!e.optimistic),this.read(L(L({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},r.prototype.writeQuery=function(e){var t=e.id,n=e.data,i=on(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:n}))},r.prototype.writeFragment=function(e){var t=e.id,n=e.data,i=e.fragment,a=e.fragmentName,u=on(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(u,{query:this.getFragmentDoc(i,a),dataId:t,result:n}))},r.prototype.updateQuery=function(e,t){return this.batch({update:function(n){var i=n.readQuery(e),a=t(i);return a==null?i:(n.writeQuery(L(L({},e),{data:a})),a)}})},r.prototype.updateFragment=function(e,t){return this.batch({update:function(n){var i=n.readFragment(e),a=t(i);return a==null?i:(n.writeFragment(L(L({},e),{data:a})),a)}})},r}();globalThis.__DEV__!==!1&&(ff.prototype.getMemoryInternals=cE);var hf;hf||(hf={});var df=function(r){Pn(e,r);function e(t,n,i,a){var u,c=r.call(this,t)||this;if(c.message=t,c.path=n,c.query=i,c.variables=a,Array.isArray(c.path)){c.missing=c.message;for(var f=c.path.length-1;f>=0;--f)c.missing=(u={},u[c.path[f]]=c.missing,u)}else c.missing=c.path;return c.__proto__=e.prototype,c}return e}(Error),Rr=Object.prototype.hasOwnProperty;function no(r){return r==null}function pf(r,e){var t=r.__typename,n=r.id,i=r._id;if(typeof t=="string"&&(e&&(e.keyObject=no(n)?no(i)?void 0:{_id:i}:{id:n}),no(n)&&!no(i)&&(n=i),!no(n)))return"".concat(t,":").concat(typeof n=="number"||typeof n=="string"?n:JSON.stringify(n))}var Ry={dataIdFromObject:pf,addTypename:!0,resultCaching:!0,canonizeResults:!1};function e1(r){return Wi(Ry,r)}function My(r){var e=r.canonizeResults;return e===void 0?Ry.canonizeResults:e}function t1(r,e){return Pt(e)?r.get(e.__ref,"__typename"):e&&e.__typename}var Dy=/^[_a-z][_0-9a-z]*/i;function Hi(r){var e=r.match(Dy);return e?e[0]:r}function mf(r,e,t){return er(e)?ur(e)?e.every(function(n){return mf(r,n,t)}):r.selections.every(function(n){if(gi(n)&&Vs(n,t)){var i=yi(n);return Rr.call(e,i)&&(!n.selectionSet||mf(n.selectionSet,e[i],t))}return!0}):!1}function Ks(r){return er(r)&&!Pt(r)&&!ur(r)}function r1(){return new vi}function Fy(r,e){var t=Wa(Qa(r));return{fragmentMap:t,lookupFragment:function(n){var i=t[n];return!i&&e&&(i=e.lookup(n)),i||null}}}var Au=Object.create(null),yf=function(){return Au},Ly=Object.create(null),io=function(){function r(e,t){var n=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(i,a){return Js(Pt(i)?n.get(i.__ref,a):i&&i[a])},this.canRead=function(i){return Pt(i)?n.has(i.__ref):typeof i=="object"},this.toReference=function(i,a){if(typeof i=="string")return $i(i);if(Pt(i))return i;var u=n.policies.identify(i)[0];if(u){var c=$i(u);return a&&n.merge(u,i),c}}}return r.prototype.toObject=function(){return L({},this.data)},r.prototype.has=function(e){return this.lookup(e,!0)!==void 0},r.prototype.get=function(e,t){if(this.group.depend(e,t),Rr.call(this.data,e)){var n=this.data[e];if(n&&Rr.call(n,t))return n[t]}if(t==="__typename"&&Rr.call(this.policies.rootTypenamesById,e))return this.policies.rootTypenamesById[e];if(this instanceof Gi)return this.parent.get(e,t)},r.prototype.lookup=function(e,t){if(t&&this.group.depend(e,"__exists"),Rr.call(this.data,e))return this.data[e];if(this instanceof Gi)return this.parent.lookup(e,t);if(this.policies.rootTypenamesById[e])return Object.create(null)},r.prototype.merge=function(e,t){var n=this,i;Pt(e)&&(e=e.__ref),Pt(t)&&(t=t.__ref);var a=typeof e=="string"?this.lookup(i=e):e,u=typeof t=="string"?this.lookup(i=t):t;if(u){je(typeof i=="string",1);var c=new vi(i1).merge(a,u);if(this.data[i]=c,c!==a&&(delete this.refs[i],this.group.caching)){var f=Object.create(null);a||(f.__exists=1),Object.keys(u).forEach(function(h){if(!a||a[h]!==c[h]){f[h]=1;var d=Hi(h);d!==h&&!n.policies.hasKeyArgs(c.__typename,d)&&(f[d]=1),c[h]===void 0&&!(n instanceof Gi)&&delete c[h]}}),f.__typename&&!(a&&a.__typename)&&this.policies.rootTypenamesById[i]===c.__typename&&delete f.__typename,Object.keys(f).forEach(function(h){return n.group.dirty(i,h)})}}},r.prototype.modify=function(e,t){var n=this,i=this.lookup(e);if(i){var a=Object.create(null),u=!1,c=!0,f={DELETE:Au,INVALIDATE:Ly,isReference:Pt,toReference:this.toReference,canRead:this.canRead,readField:function(h,d){return n.policies.readField(typeof h=="string"?{fieldName:h,from:d||$i(e)}:h,{store:n})}};if(Object.keys(i).forEach(function(h){var d=Hi(h),y=i[h];if(y!==void 0){var g=typeof t=="function"?t:t[h]||t[d];if(g){var m=g===yf?Au:g(Js(y),L(L({},f),{fieldName:d,storeFieldName:h,storage:n.getStorage(e,h)}));if(m===Ly)n.group.dirty(e,h);else if(m===Au&&(m=void 0),m!==y&&(a[h]=m,u=!0,y=m,globalThis.__DEV__!==!1)){var b=function(U){if(n.lookup(U.__ref)===void 0)return globalThis.__DEV__!==!1&&je.warn(2,U),!0};if(Pt(m))b(m);else if(Array.isArray(m))for(var I=!1,x=void 0,_=0,A=m;_<A.length;_++){var P=A[_];if(Pt(P)){if(I=!0,b(P))break}else if(typeof P=="object"&&P){var M=n.policies.identify(P)[0];M&&(x=P)}if(I&&x!==void 0){globalThis.__DEV__!==!1&&je.warn(3,x);break}}}}y!==void 0&&(c=!1)}}),u)return this.merge(e,a),c&&(this instanceof Gi?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},r.prototype.delete=function(e,t,n){var i,a=this.lookup(e);if(a){var u=this.getFieldValue(a,"__typename"),c=t&&n?this.policies.getStoreFieldName({typename:u,fieldName:t,args:n}):t;return this.modify(e,c?(i={},i[c]=yf,i):yf)}return!1},r.prototype.evict=function(e,t){var n=!1;return e.id&&(Rr.call(this.data,e.id)&&(n=this.delete(e.id,e.fieldName,e.args)),this instanceof Gi&&this!==t&&(n=this.parent.evict(e,t)||n),(e.fieldName||n)&&this.group.dirty(e.id,e.fieldName||"__exists")),n},r.prototype.clear=function(){this.replace(null)},r.prototype.extract=function(){var e=this,t=this.toObject(),n=[];return this.getRootIdSet().forEach(function(i){Rr.call(e.policies.rootTypenamesById,i)||n.push(i)}),n.length&&(t.__META={extraRootIds:n.sort()}),t},r.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach(function(a){e&&Rr.call(e,a)||t.delete(a)}),e){var n=e.__META,i=on(e,["__META"]);Object.keys(i).forEach(function(a){t.merge(a,i[a])}),n&&n.extraRootIds.forEach(this.retain,this)}},r.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},r.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},r.prototype.getRootIdSet=function(e){return e===void 0&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Gi?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},r.prototype.gc=function(){var e=this,t=this.getRootIdSet(),n=this.toObject();t.forEach(function(u){Rr.call(n,u)&&(Object.keys(e.findChildRefIds(u)).forEach(t.add,t),delete n[u])});var i=Object.keys(n);if(i.length){for(var a=this;a instanceof Gi;)a=a.parent;i.forEach(function(u){return a.delete(u)})}return i},r.prototype.findChildRefIds=function(e){if(!Rr.call(this.refs,e)){var t=this.refs[e]=Object.create(null),n=this.data[e];if(!n)return t;var i=new Set([n]);i.forEach(function(a){Pt(a)&&(t[a.__ref]=!0),er(a)&&Object.keys(a).forEach(function(u){var c=a[u];er(c)&&i.add(c)})})}return this.refs[e]},r.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},r}(),qy=function(){function r(e,t){t===void 0&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return r.prototype.resetCaching=function(){this.d=this.caching?Xm():null,this.keyMaker=new Ws(gs)},r.prototype.depend=function(e,t){if(this.d){this.d(gf(e,t));var n=Hi(t);n!==t&&this.d(gf(e,n)),this.parent&&this.parent.depend(e,t)}},r.prototype.dirty=function(e,t){this.d&&this.d.dirty(gf(e,t),t==="__exists"?"forget":"setDirty")},r}();function gf(r,e){return e+"#"+r}function jy(r,e){so(r)&&r.group.depend(e,"__exists")}(function(r){var e=function(t){Pn(n,t);function n(i){var a=i.policies,u=i.resultCaching,c=u===void 0?!0:u,f=i.seed,h=t.call(this,a,new qy(c))||this;return h.stump=new n1(h),h.storageTrie=new Ws(gs),f&&h.replace(f),h}return n.prototype.addLayer=function(i,a){return this.stump.addLayer(i,a)},n.prototype.removeLayer=function(){return this},n.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},n}(r);r.Root=e})(io||(io={}));var Gi=function(r){Pn(e,r);function e(t,n,i,a){var u=r.call(this,n.policies,a)||this;return u.id=t,u.parent=n,u.replay=i,u.group=a,i(u),u}return e.prototype.addLayer=function(t,n){return new e(t,this,n,this.group)},e.prototype.removeLayer=function(t){var n=this,i=this.parent.removeLayer(t);return t===this.id?(this.group.caching&&Object.keys(this.data).forEach(function(a){var u=n.data[a],c=i.lookup(a);c?u?u!==c&&Object.keys(u).forEach(function(f){Ft(u[f],c[f])||n.group.dirty(a,f)}):(n.group.dirty(a,"__exists"),Object.keys(c).forEach(function(f){n.group.dirty(a,f)})):n.delete(a)}),i):i===this.parent?this:i.addLayer(this.id,this.replay)},e.prototype.toObject=function(){return L(L({},this.parent.toObject()),this.data)},e.prototype.findChildRefIds=function(t){var n=this.parent.findChildRefIds(t);return Rr.call(this.data,t)?L(L({},n),r.prototype.findChildRefIds.call(this,t)):n},e.prototype.getStorage=function(){for(var t=this.parent;t.parent;)t=t.parent;return t.getStorage.apply(t,arguments)},e}(io),n1=function(r){Pn(e,r);function e(t){return r.call(this,"EntityStore.Stump",t,function(){},new qy(t.group.caching,t.group))||this}return e.prototype.removeLayer=function(){return this},e.prototype.merge=function(t,n){return this.parent.merge(t,n)},e}(Gi);function i1(r,e,t){var n=r[t],i=e[t];return Ft(n,i)?n:i}function so(r){return!!(r instanceof io&&r.group.caching)}function s1(r){return er(r)?ur(r)?r.slice(0):L({__proto__:Object.getPrototypeOf(r)},r):r}var Uy=function(){function r(){this.known=new(El?WeakSet:Set),this.pool=new Ws(gs),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return r.prototype.isKnown=function(e){return er(e)&&this.known.has(e)},r.prototype.pass=function(e){if(er(e)){var t=s1(e);return this.passes.set(t,e),t}return e},r.prototype.admit=function(e){var t=this;if(er(e)){var n=this.passes.get(e);if(n)return n;var i=Object.getPrototypeOf(e);switch(i){case Array.prototype:{if(this.known.has(e))return e;var a=e.map(this.admit,this),u=this.pool.lookupArray(a);return u.array||(this.known.add(u.array=a),globalThis.__DEV__!==!1&&Object.freeze(a)),u.array}case null:case Object.prototype:{if(this.known.has(e))return e;var c=Object.getPrototypeOf(e),f=[c],h=this.sortedKeys(e);f.push(h.json);var d=f.length;h.sorted.forEach(function(m){f.push(t.admit(e[m]))});var u=this.pool.lookupArray(f);if(!u.object){var y=u.object=Object.create(c);this.known.add(y),h.sorted.forEach(function(m,b){y[m]=f[d+b]}),globalThis.__DEV__!==!1&&Object.freeze(y)}return u.object}}}return e},r.prototype.sortedKeys=function(e){var t=Object.keys(e),n=this.pool.lookupArray(t);if(!n.keys){t.sort();var i=JSON.stringify(t);(n.keys=this.keysByJSON.get(i))||this.keysByJSON.set(i,n.keys={sorted:t,json:i})}return n.keys},r}();function $y(r){return[r.selectionSet,r.objectOrReference,r.context,r.context.canonizeResults]}var a1=function(){function r(e){var t=this;this.knownResults=new(gs?WeakMap:Map),this.config=Wi(e,{addTypename:e.addTypename!==!1,canonizeResults:My(e)}),this.canon=e.canon||new Uy,this.executeSelectionSet=Ya(function(n){var i,a=n.context.canonizeResults,u=$y(n);u[3]=!a;var c=(i=t.executeSelectionSet).peek.apply(i,u);return c?a?L(L({},c),{result:t.canon.admit(c.result)}):c:(jy(n.context.store,n.enclosingRef.__ref),t.execSelectionSetImpl(n))},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.executeSelectionSet"]||5e4,keyArgs:$y,makeCacheKey:function(n,i,a,u){if(so(a.store))return a.store.makeCacheKey(n,Pt(i)?i.__ref:i,a.varString,u)}}),this.executeSubSelectedArray=Ya(function(n){return jy(n.context.store,n.enclosingRef.__ref),t.execSubSelectedArrayImpl(n)},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.executeSubSelectedArray"]||1e4,makeCacheKey:function(n){var i=n.field,a=n.array,u=n.context;if(so(u.store))return u.store.makeCacheKey(i,a,u.varString)}})}return r.prototype.resetCanon=function(){this.canon=new Uy},r.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,i=e.rootId,a=i===void 0?"ROOT_QUERY":i,u=e.variables,c=e.returnPartialData,f=c===void 0?!0:c,h=e.canonizeResults,d=h===void 0?this.config.canonizeResults:h,y=this.config.cache.policies;u=L(L({},hu(Rl(n))),u);var g=$i(a),m=this.executeSelectionSet({selectionSet:Bi(n).selectionSet,objectOrReference:g,enclosingRef:g,context:L({store:t,query:n,policies:y,variables:u,varString:mi(u),canonizeResults:d},Fy(n,this.config.fragments))}),b;if(m.missing&&(b=[new df(o1(m.missing),m.missing,n,u)],!f))throw b[0];return{result:m.result,complete:!b,missing:b}},r.prototype.isFresh=function(e,t,n,i){if(so(i.store)&&this.knownResults.get(e)===n){var a=this.executeSelectionSet.peek(n,t,i,this.canon.isKnown(e));if(a&&e===a.result)return!0}return!1},r.prototype.execSelectionSetImpl=function(e){var t=this,n=e.selectionSet,i=e.objectOrReference,a=e.enclosingRef,u=e.context;if(Pt(i)&&!u.policies.rootTypenamesById[i.__ref]&&!u.store.has(i.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(i.__ref," object")};var c=u.variables,f=u.policies,h=u.store,d=h.getFieldValue(i,"__typename"),y=[],g,m=new vi;this.config.addTypename&&typeof d=="string"&&!f.rootIdsByTypename[d]&&y.push({__typename:d});function b(P,M){var U;return P.missing&&(g=m.merge(g,(U={},U[M]=P.missing,U))),P.result}var I=new Set(n.selections);I.forEach(function(P){var M,U;if(Vs(P,c))if(gi(P)){var W=f.readField({fieldName:P.name.value,field:P,variables:u.variables,from:i},u),K=yi(P);W===void 0?gu.added(P)||(g=m.merge(g,(M={},M[K]="Can't find field '".concat(P.name.value,"' on ").concat(Pt(i)?i.__ref+" object":"object "+JSON.stringify(i,null,2)),M))):ur(W)?W.length>0&&(W=b(t.executeSubSelectedArray({field:P,array:W,enclosingRef:a,context:u}),K)):P.selectionSet?W!=null&&(W=b(t.executeSelectionSet({selectionSet:P.selectionSet,objectOrReference:W,enclosingRef:Pt(W)?W:a,context:u}),K)):u.canonizeResults&&(W=t.canon.pass(W)),W!==void 0&&y.push((U={},U[K]=W,U))}else{var X=za(P,u.lookupFragment);if(!X&&P.kind===Fe.FRAGMENT_SPREAD)throw Yr(9,P.name.value);X&&f.fragmentMatches(X,d)&&X.selectionSet.selections.forEach(I.add,I)}});var x=Xa(y),_={result:x,missing:g},A=u.canonizeResults?this.canon.admit(_):Js(_);return A.result&&this.knownResults.set(A.result,n),A},r.prototype.execSubSelectedArrayImpl=function(e){var t=this,n=e.field,i=e.array,a=e.enclosingRef,u=e.context,c,f=new vi;function h(d,y){var g;return d.missing&&(c=f.merge(c,(g={},g[y]=d.missing,g))),d.result}return n.selectionSet&&(i=i.filter(u.store.canRead)),i=i.map(function(d,y){return d===null?null:ur(d)?h(t.executeSubSelectedArray({field:n,array:d,enclosingRef:a,context:u}),y):n.selectionSet?h(t.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:d,enclosingRef:Pt(d)?d:a,context:u}),y):(globalThis.__DEV__!==!1&&u1(u.store,n,d),d)}),{result:u.canonizeResults?this.canon.admit(i):i,missing:c}},r}();function o1(r){try{JSON.stringify(r,function(e,t){if(typeof t=="string")throw t;return t})}catch(e){return e}}function u1(r,e,t){if(!e.selectionSet){var n=new Set([t]);n.forEach(function(i){er(i)&&(je(!Pt(i),10,t1(r,i),e.name.value),Object.values(i).forEach(n.add,n))})}}var vf=new $m,By=new WeakMap;function ao(r){var e=By.get(r);return e||By.set(r,e={vars:new Set,dep:Xm()}),e}function Vy(r){ao(r).vars.forEach(function(e){return e.forgetCache(r)})}function c1(r){ao(r).vars.forEach(function(e){return e.attachCache(r)})}function Wy(r){var e=new Set,t=new Set,n=function(a){if(arguments.length>0){if(r!==a){r=a,e.forEach(function(f){ao(f).dep.dirty(n),l1(f)});var u=Array.from(t);t.clear(),u.forEach(function(f){return f(r)})}}else{var c=vf.getValue();c&&(i(c),ao(c).dep(n))}return r};n.onNextChange=function(a){return t.add(a),function(){t.delete(a)}};var i=n.attachCache=function(a){return e.add(a),ao(a).vars.add(n),n};return n.forgetCache=function(a){return e.delete(a)},n}function l1(r){r.broadcastWatches&&r.broadcastWatches()}var zy=Object.create(null);function bf(r){var e=JSON.stringify(r);return zy[e]||(zy[e]=Object.create(null))}function Hy(r){var e=bf(r);return e.keyFieldsFn||(e.keyFieldsFn=function(t,n){var i=function(u,c){return n.readField(c,u)},a=n.keyObject=wf(r,function(u){var c=Zs(n.storeObject,u,i);return c===void 0&&t!==n.storeObject&&Rr.call(t,u[0])&&(c=Zs(t,u,Jy)),je(c!==void 0,4,u.join("."),t),c});return"".concat(n.typename,":").concat(JSON.stringify(a))})}function Gy(r){var e=bf(r);return e.keyArgsFn||(e.keyArgsFn=function(t,n){var i=n.field,a=n.variables,u=n.fieldName,c=wf(r,function(h){var d=h[0],y=d.charAt(0);if(y==="@"){if(i&&mn(i.directives)){var g=d.slice(1),m=i.directives.find(function(_){return _.name.value===g}),b=m&&Ga(m,a);return b&&Zs(b,h.slice(1))}return}if(y==="$"){var I=d.slice(1);if(a&&Rr.call(a,I)){var x=h.slice(0);return x[0]=I,Zs(a,x)}return}if(t)return Zs(t,h)}),f=JSON.stringify(c);return(t||f!=="{}")&&(u+=":"+f),u})}function wf(r,e){var t=new vi;return Qy(r).reduce(function(n,i){var a,u=e(i);if(u!==void 0){for(var c=i.length-1;c>=0;--c)u=(a={},a[i[c]]=u,a);n=t.merge(n,u)}return n},Object.create(null))}function Qy(r){var e=bf(r);if(!e.paths){var t=e.paths=[],n=[];r.forEach(function(i,a){ur(i)?(Qy(i).forEach(function(u){return t.push(n.concat(u))}),n.length=0):(n.push(i),ur(r[a+1])||(t.push(n.slice(0)),n.length=0))})}return e.paths}function Jy(r,e){return r[e]}function Zs(r,e,t){return t=t||Jy,Yy(e.reduce(function n(i,a){return ur(i)?i.map(function(u){return n(u,a)}):i&&t(i,a)},r))}function Yy(r){return er(r)?ur(r)?r.map(Yy):wf(Object.keys(r).sort(),function(e){return Zs(r,e)}):r}function _f(r){return r.args!==void 0?r.args:r.field?Ga(r.field,r.variables):null}var f1=function(){},Ky=function(r,e){return e.fieldName},Zy=function(r,e,t){var n=t.mergeObjects;return n(r,e)},Xy=function(r,e){return e},h1=function(){function r(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=L({dataIdFromObject:pf},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return r.prototype.identify=function(e,t){var n,i=this,a=t&&(t.typename||((n=t.storeObject)===null||n===void 0?void 0:n.__typename))||e.__typename;if(a===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var u=t&&t.storeObject||e,c=L(L({},t),{typename:a,storeObject:u,readField:t&&t.readField||function(){var g=xf(arguments,u);return i.readField(g,{store:i.cache.data,variables:g.variables})}}),f,h=a&&this.getTypePolicy(a),d=h&&h.keyFn||this.config.dataIdFromObject;d;){var y=d(L(L({},e),u),c);if(ur(y))d=Hy(y);else{f=y;break}}return f=f?String(f):void 0,c.keyObject?[f,c.keyObject]:[f]},r.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach(function(n){var i=e[n],a=i.queryType,u=i.mutationType,c=i.subscriptionType,f=on(i,["queryType","mutationType","subscriptionType"]);a&&t.setRootTypename("Query",n),u&&t.setRootTypename("Mutation",n),c&&t.setRootTypename("Subscription",n),Rr.call(t.toBeAdded,n)?t.toBeAdded[n].push(f):t.toBeAdded[n]=[f]})},r.prototype.updateTypePolicy=function(e,t){var n=this,i=this.getTypePolicy(e),a=t.keyFields,u=t.fields;function c(f,h){f.merge=typeof h=="function"?h:h===!0?Zy:h===!1?Xy:f.merge}c(i,t.merge),i.keyFn=a===!1?f1:ur(a)?Hy(a):typeof a=="function"?a:i.keyFn,u&&Object.keys(u).forEach(function(f){var h=n.getFieldPolicy(e,f,!0),d=u[f];if(typeof d=="function")h.read=d;else{var y=d.keyArgs,g=d.read,m=d.merge;h.keyFn=y===!1?Ky:ur(y)?Gy(y):typeof y=="function"?y:h.keyFn,typeof g=="function"&&(h.read=g),c(h,m)}h.read&&h.merge&&(h.keyFn=h.keyFn||Ky)})},r.prototype.setRootTypename=function(e,t){t===void 0&&(t=e);var n="ROOT_"+e.toUpperCase(),i=this.rootTypenamesById[n];t!==i&&(je(!i||i===e,5,e),i&&delete this.rootIdsByTypename[i],this.rootIdsByTypename[t]=n,this.rootTypenamesById[n]=t)},r.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach(function(n){t.getSupertypeSet(n,!0),e[n].forEach(function(i){t.getSupertypeSet(i,!0).add(n);var a=i.match(Dy);(!a||a[0]!==i)&&t.fuzzySubtypes.set(i,new RegExp(i))})})},r.prototype.getTypePolicy=function(e){var t=this;if(!Rr.call(this.typePolicies,e)){var n=this.typePolicies[e]=Object.create(null);n.fields=Object.create(null);var i=this.supertypeMap.get(e);!i&&this.fuzzySubtypes.size&&(i=this.getSupertypeSet(e,!0),this.fuzzySubtypes.forEach(function(u,c){if(u.test(e)){var f=t.supertypeMap.get(c);f&&f.forEach(function(h){return i.add(h)})}})),i&&i.size&&i.forEach(function(u){var c=t.getTypePolicy(u),f=c.fields,h=on(c,["fields"]);Object.assign(n,h),Object.assign(n.fields,f)})}var a=this.toBeAdded[e];return a&&a.length&&a.splice(0).forEach(function(u){t.updateTypePolicy(e,u)}),this.typePolicies[e]},r.prototype.getFieldPolicy=function(e,t,n){if(e){var i=this.getTypePolicy(e).fields;return i[t]||n&&(i[t]=Object.create(null))}},r.prototype.getSupertypeSet=function(e,t){var n=this.supertypeMap.get(e);return!n&&t&&this.supertypeMap.set(e,n=new Set),n},r.prototype.fragmentMatches=function(e,t,n,i){var a=this;if(!e.typeCondition)return!0;if(!t)return!1;var u=e.typeCondition.name.value;if(t===u)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(u))for(var c=this.getSupertypeSet(t,!0),f=[c],h=function(b){var I=a.getSupertypeSet(b,!1);I&&I.size&&f.indexOf(I)<0&&f.push(I)},d=!!(n&&this.fuzzySubtypes.size),y=!1,g=0;g<f.length;++g){var m=f[g];if(m.has(u))return c.has(u)||(y&&globalThis.__DEV__!==!1&&je.warn(6,t,u),c.add(u)),!0;m.forEach(h),d&&g===f.length-1&&mf(e.selectionSet,n,i)&&(d=!1,y=!0,this.fuzzySubtypes.forEach(function(b,I){var x=t.match(b);x&&x[0]===t&&h(I)}))}return!1},r.prototype.hasKeyArgs=function(e,t){var n=this.getFieldPolicy(e,t,!1);return!!(n&&n.keyFn)},r.prototype.getStoreFieldName=function(e){var t=e.typename,n=e.fieldName,i=this.getFieldPolicy(t,n,!1),a,u=i&&i.keyFn;if(u&&t)for(var c={typename:t,fieldName:n,field:e.field||null,variables:e.variables},f=_f(e);u;){var h=u(f,c);if(ur(h))u=Gy(h);else{a=h||n;break}}return a===void 0&&(a=e.field?Mm(e.field,e.variables):Nl(n,_f(e))),a===!1?n:n===Hi(a)?a:n+":"+a},r.prototype.readField=function(e,t){var n=e.from;if(n){var i=e.field||e.fieldName;if(i){if(e.typename===void 0){var a=t.store.getFieldValue(n,"__typename");a&&(e.typename=a)}var u=this.getStoreFieldName(e),c=Hi(u),f=t.store.getFieldValue(n,u),h=this.getFieldPolicy(e.typename,c,!1),d=h&&h.read;if(d){var y=eg(this,n,e,t,t.store.getStorage(Pt(n)?n.__ref:n,u));return vf.withValue(this.cache,d,[f,y])}return f}}},r.prototype.getReadFunction=function(e,t){var n=this.getFieldPolicy(e,t,!1);return n&&n.read},r.prototype.getMergeFunction=function(e,t,n){var i=this.getFieldPolicy(e,t,!1),a=i&&i.merge;return!a&&n&&(i=this.getTypePolicy(n),a=i&&i.merge),a},r.prototype.runMergeFunction=function(e,t,n,i,a){var u=n.field,c=n.typename,f=n.merge;return f===Zy?tg(i.store)(e,t):f===Xy?t:(i.overwrite&&(e=void 0),f(e,t,eg(this,void 0,{typename:c,fieldName:u.name.value,field:u,variables:i.variables},i,a||Object.create(null))))},r}();function eg(r,e,t,n,i){var a=r.getStoreFieldName(t),u=Hi(a),c=t.variables||n.variables,f=n.store,h=f.toReference,d=f.canRead;return{args:_f(t),field:t.field||null,fieldName:u,storeFieldName:a,variables:c,isReference:Pt,toReference:h,storage:i,cache:r.cache,canRead:d,readField:function(){return r.readField(xf(arguments,e,c),n)},mergeObjects:tg(n.store)}}function xf(r,e,t){var n=r[0],i=r[1],a=r.length,u;return typeof n=="string"?u={fieldName:n,from:a>1?i:e}:(u=L({},n),Rr.call(u,"from")||(u.from=e)),globalThis.__DEV__!==!1&&u.from===void 0&&globalThis.__DEV__!==!1&&je.warn(7,pl(Array.from(r))),u.variables===void 0&&(u.variables=t),u}function tg(r){return function(t,n){if(ur(t)||ur(n))throw Yr(8);if(er(t)&&er(n)){var i=r.getFieldValue(t,"__typename"),a=r.getFieldValue(n,"__typename"),u=i&&a&&i!==a;if(u)return n;if(Pt(t)&&Ks(n))return r.merge(t.__ref,n),t;if(Ks(t)&&Pt(n))return r.merge(t,n.__ref),n;if(Ks(t)&&Ks(n))return L(L({},t),n)}return n}}function Sf(r,e,t){var n="".concat(e).concat(t),i=r.flavors.get(n);return i||r.flavors.set(n,i=r.clientOnly===e&&r.deferred===t?r:L(L({},r),{clientOnly:e,deferred:t})),i}var d1=function(){function r(e,t,n){this.cache=e,this.reader=t,this.fragments=n}return r.prototype.writeToStore=function(e,t){var n=this,i=t.query,a=t.result,u=t.dataId,c=t.variables,f=t.overwrite,h=_s(i),d=r1();c=L(L({},hu(h)),c);var y=L(L({store:e,written:Object.create(null),merge:function(m,b){return d.merge(m,b)},variables:c,varString:mi(c)},Fy(i,this.fragments)),{overwrite:!!f,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),g=this.processSelectionSet({result:a||Object.create(null),dataId:u,selectionSet:h.selectionSet,mergeTree:{map:new Map},context:y});if(!Pt(g))throw Yr(11,a);return y.incomingById.forEach(function(m,b){var I=m.storeObject,x=m.mergeTree,_=m.fieldNodeSet,A=$i(b);if(x&&x.map.size){var P=n.applyMerges(x,A,I,y);if(Pt(P))return;I=P}if(globalThis.__DEV__!==!1&&!y.overwrite){var M=Object.create(null);_.forEach(function(K){K.selectionSet&&(M[K.name.value]=!0)});var U=function(K){return M[Hi(K)]===!0},W=function(K){var X=x&&x.map.get(K);return!!(X&&X.info&&X.info.merge)};Object.keys(I).forEach(function(K){U(K)&&!W(K)&&p1(A,I,K,y.store)})}e.merge(b,I)}),e.retain(g.__ref),g},r.prototype.processSelectionSet=function(e){var t=this,n=e.dataId,i=e.result,a=e.selectionSet,u=e.context,c=e.mergeTree,f=this.cache.policies,h=Object.create(null),d=n&&f.rootTypenamesById[n]||lu(i,a,u.fragmentMap)||n&&u.store.get(n,"__typename");typeof d=="string"&&(h.__typename=d);var y=function(){var P=xf(arguments,h,u.variables);if(Pt(P.from)){var M=u.incomingById.get(P.from.__ref);if(M){var U=f.readField(L(L({},P),{from:M.storeObject}),u);if(U!==void 0)return U}}return f.readField(P,u)},g=new Set;this.flattenFields(a,i,u,d).forEach(function(P,M){var U,W=yi(M),K=i[W];if(g.add(M),K!==void 0){var X=f.getStoreFieldName({typename:d,fieldName:M.name.value,field:M,variables:P.variables}),fe=ng(c,X),oe=t.processFieldValue(K,M,M.selectionSet?Sf(P,!1,!1):P,fe),Ie=void 0;M.selectionSet&&(Pt(oe)||Ks(oe))&&(Ie=y("__typename",oe));var ye=f.getMergeFunction(d,M.name.value,Ie);ye?fe.info={field:M,typename:d,merge:ye}:ig(c,X),h=P.merge(h,(U={},U[X]=oe,U))}else globalThis.__DEV__!==!1&&!P.clientOnly&&!P.deferred&&!gu.added(M)&&!f.getReadFunction(d,M.name.value)&&globalThis.__DEV__!==!1&&je.error(12,yi(M),i)});try{var m=f.identify(i,{typename:d,selectionSet:a,fragmentMap:u.fragmentMap,storeObject:h,readField:y}),b=m[0],I=m[1];n=n||b,I&&(h=u.merge(h,I))}catch(P){if(!n)throw P}if(typeof n=="string"){var x=$i(n),_=u.written[n]||(u.written[n]=[]);if(_.indexOf(a)>=0||(_.push(a),this.reader&&this.reader.isFresh(i,x,a,u)))return x;var A=u.incomingById.get(n);return A?(A.storeObject=u.merge(A.storeObject,h),A.mergeTree=Ef(A.mergeTree,c),g.forEach(function(P){return A.fieldNodeSet.add(P)})):u.incomingById.set(n,{storeObject:h,mergeTree:ku(c)?void 0:c,fieldNodeSet:g}),x}return h},r.prototype.processFieldValue=function(e,t,n,i){var a=this;return!t.selectionSet||e===null?globalThis.__DEV__!==!1?Kl(e):e:ur(e)?e.map(function(u,c){var f=a.processFieldValue(u,t,n,ng(i,c));return ig(i,c),f}):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:n,mergeTree:i})},r.prototype.flattenFields=function(e,t,n,i){i===void 0&&(i=lu(t,e,n.fragmentMap));var a=new Map,u=this.cache.policies,c=new Ws(!1);return function f(h,d){var y=c.lookup(h,d.clientOnly,d.deferred);y.visited||(y.visited=!0,h.selections.forEach(function(g){if(Vs(g,n.variables)){var m=d.clientOnly,b=d.deferred;if(!(m&&b)&&mn(g.directives)&&g.directives.forEach(function(_){var A=_.name.value;if(A==="client"&&(m=!0),A==="defer"){var P=Ga(_,n.variables);(!P||P.if!==!1)&&(b=!0)}}),gi(g)){var I=a.get(g);I&&(m=m&&I.clientOnly,b=b&&I.deferred),a.set(g,Sf(n,m,b))}else{var x=za(g,n.lookupFragment);if(!x&&g.kind===Fe.FRAGMENT_SPREAD)throw Yr(13,g.name.value);x&&u.fragmentMatches(x,i,t,n.variables)&&f(x.selectionSet,Sf(n,m,b))}}}))}(e,n),a},r.prototype.applyMerges=function(e,t,n,i,a){var u,c=this;if(e.map.size&&!Pt(n)){var f=!ur(n)&&(Pt(t)||Ks(t))?t:void 0,h=n;f&&!a&&(a=[Pt(f)?f.__ref:f]);var d,y=function(g,m){return ur(g)?typeof m=="number"?g[m]:void 0:i.store.getFieldValue(g,String(m))};e.map.forEach(function(g,m){var b=y(f,m),I=y(h,m);if(I!==void 0){a&&a.push(m);var x=c.applyMerges(g,b,I,i,a);x!==I&&(d=d||new Map,d.set(m,x)),a&&je(a.pop()===m)}}),d&&(n=ur(h)?h.slice(0):L({},h),d.forEach(function(g,m){n[m]=g}))}return e.info?this.cache.policies.runMergeFunction(t,n,e.info,i,a&&(u=i.store).getStorage.apply(u,a)):n},r}(),rg=[];function ng(r,e){var t=r.map;return t.has(e)||t.set(e,rg.pop()||{map:new Map}),t.get(e)}function Ef(r,e){if(r===e||!e||ku(e))return r;if(!r||ku(r))return e;var t=r.info&&e.info?L(L({},r.info),e.info):r.info||e.info,n=r.map.size&&e.map.size,i=n?new Map:r.map.size?r.map:e.map,a={info:t,map:i};if(n){var u=new Set(e.map.keys());r.map.forEach(function(c,f){a.map.set(f,Ef(c,e.map.get(f))),u.delete(f)}),u.forEach(function(c){a.map.set(c,Ef(e.map.get(c),r.map.get(c)))})}return a}function ku(r){return!r||!(r.info||r.map.size)}function ig(r,e){var t=r.map,n=t.get(e);n&&ku(n)&&(rg.push(n),t.delete(e))}var sg=new Set;function p1(r,e,t,n){var i=function(y){var g=n.getFieldValue(y,t);return typeof g=="object"&&g},a=i(r);if(a){var u=i(e);if(u&&!Pt(a)&&!Ft(a,u)&&!Object.keys(a).every(function(y){return n.getFieldValue(u,y)!==void 0})){var c=n.getFieldValue(r,"__typename")||n.getFieldValue(e,"__typename"),f=Hi(t),h="".concat(c,".").concat(f);if(!sg.has(h)){sg.add(h);var d=[];!ur(a)&&!ur(u)&&[a,u].forEach(function(y){var g=n.getFieldValue(y,"__typename");typeof g=="string"&&!d.includes(g)&&d.push(g)}),globalThis.__DEV__!==!1&&je.warn(14,f,c,d.length?"either ensure all objects of type "+d.join(" and ")+" have an ID or a custom merge function, or ":"",h,L({},a),L({},u))}}}}var Of=function(r){Pn(e,r);function e(t){t===void 0&&(t={});var n=r.call(this)||this;return n.watches=new Set,n.addTypenameTransform=new mu(gu),n.assumeImmutableResults=!0,n.makeVar=Wy,n.txCount=0,n.config=e1(t),n.addTypename=!!n.config.addTypename,n.policies=new h1({cache:n,dataIdFromObject:n.config.dataIdFromObject,possibleTypes:n.config.possibleTypes,typePolicies:n.config.typePolicies}),n.init(),n}return e.prototype.init=function(){var t=this.data=new io.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=t.stump,this.resetResultCache()},e.prototype.resetResultCache=function(t){var n=this,i=this.storeReader,a=this.config.fragments;this.storeWriter=new d1(this,this.storeReader=new a1({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:My(this.config),canon:t?void 0:i&&i.canon,fragments:a}),a),this.maybeBroadcastWatch=Ya(function(u,c){return n.broadcastWatch(u,c)},{max:this.config.resultCacheMaxSize||Yn["inMemoryCache.maybeBroadcastWatch"]||5e3,makeCacheKey:function(u){var c=u.optimistic?n.optimisticData:n.data;if(so(c)){var f=u.optimistic,h=u.id,d=u.variables;return c.makeCacheKey(u.query,u.callback,mi({optimistic:f,id:h,variables:d}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach(function(u){return u.resetCaching()})},e.prototype.restore=function(t){return this.init(),t&&this.data.replace(t),this},e.prototype.extract=function(t){return t===void 0&&(t=!1),(t?this.optimisticData:this.data).extract()},e.prototype.read=function(t){var n=t.returnPartialData,i=n===void 0?!1:n;try{return this.storeReader.diffQueryAgainstStore(L(L({},t),{store:t.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:i})).result||null}catch(a){if(a instanceof df)return null;throw a}},e.prototype.write=function(t){try{return++this.txCount,this.storeWriter.writeToStore(this.data,t)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.modify=function(t){if(Rr.call(t,"id")&&!t.id)return!1;var n=t.optimistic?this.optimisticData:this.data;try{return++this.txCount,n.modify(t.id||"ROOT_QUERY",t.fields)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.diff=function(t){return this.storeReader.diffQueryAgainstStore(L(L({},t),{store:t.optimistic?this.optimisticData:this.data,rootId:t.id||"ROOT_QUERY",config:this.config}))},e.prototype.watch=function(t){var n=this;return this.watches.size||c1(this),this.watches.add(t),t.immediate&&this.maybeBroadcastWatch(t),function(){n.watches.delete(t)&&!n.watches.size&&Vy(n),n.maybeBroadcastWatch.forget(t)}},e.prototype.gc=function(t){var n;mi.reset(),Gs.reset(),this.addTypenameTransform.resetCache(),(n=this.config.fragments)===null||n===void 0||n.resetCaches();var i=this.optimisticData.gc();return t&&!this.txCount&&(t.resetResultCache?this.resetResultCache(t.resetResultIdentities):t.resetResultIdentities&&this.storeReader.resetCanon()),i},e.prototype.retain=function(t,n){return(n?this.optimisticData:this.data).retain(t)},e.prototype.release=function(t,n){return(n?this.optimisticData:this.data).release(t)},e.prototype.identify=function(t){if(Pt(t))return t.__ref;try{return this.policies.identify(t)[0]}catch(n){globalThis.__DEV__!==!1&&je.warn(n)}},e.prototype.evict=function(t){if(!t.id){if(Rr.call(t,"id"))return!1;t=L(L({},t),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(t,this.data)}finally{!--this.txCount&&t.broadcast!==!1&&this.broadcastWatches()}},e.prototype.reset=function(t){var n=this;return this.init(),mi.reset(),t&&t.discardWatches?(this.watches.forEach(function(i){return n.maybeBroadcastWatch.forget(i)}),this.watches.clear(),Vy(this)):this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(t){var n=this.optimisticData.removeLayer(t);n!==this.optimisticData&&(this.optimisticData=n,this.broadcastWatches())},e.prototype.batch=function(t){var n=this,i=t.update,a=t.optimistic,u=a===void 0?!0:a,c=t.removeOptimistic,f=t.onWatchUpdated,h,d=function(g){var m=n,b=m.data,I=m.optimisticData;++n.txCount,g&&(n.data=n.optimisticData=g);try{return h=i(n)}finally{--n.txCount,n.data=b,n.optimisticData=I}},y=new Set;return f&&!this.txCount&&this.broadcastWatches(L(L({},t),{onWatchUpdated:function(g){return y.add(g),!1}})),typeof u=="string"?this.optimisticData=this.optimisticData.addLayer(u,d):u===!1?d(this.data):d(),typeof c=="string"&&(this.optimisticData=this.optimisticData.removeLayer(c)),f&&y.size?(this.broadcastWatches(L(L({},t),{onWatchUpdated:function(g,m){var b=f.call(this,g,m);return b!==!1&&y.delete(g),b}})),y.size&&y.forEach(function(g){return n.maybeBroadcastWatch.dirty(g)})):this.broadcastWatches(t),h},e.prototype.performTransaction=function(t,n){return this.batch({update:t,optimistic:n||n!==null})},e.prototype.transformDocument=function(t){return this.addTypenameToDocument(this.addFragmentsToDocument(t))},e.prototype.broadcastWatches=function(t){var n=this;this.txCount||this.watches.forEach(function(i){return n.maybeBroadcastWatch(i,t)})},e.prototype.addFragmentsToDocument=function(t){var n=this.config.fragments;return n?n.transform(t):t},e.prototype.addTypenameToDocument=function(t){return this.addTypename?this.addTypenameTransform.transformDocument(t):t},e.prototype.broadcastWatch=function(t,n){var i=t.lastDiff,a=this.diff(t);n&&(t.optimistic&&typeof n.optimistic=="string"&&(a.fromOptimisticTransaction=!0),n.onWatchUpdated&&n.onWatchUpdated.call(this,t,a,i)===!1)||(!i||!Ft(i.result,a.result))&&t.callback(t.lastDiff=a,i)},e}(ff);globalThis.__DEV__!==!1&&(Of.prototype.getMemoryInternals=uE);var kt;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error"})(kt||(kt={}));function oo(r){return r?r<7:!1}function m1(r){return r===7||r===8}var ag=Object.assign,y1=Object.hasOwnProperty,Iu=function(r){Pn(e,r);function e(t){var n=t.queryManager,i=t.queryInfo,a=t.options,u=r.call(this,function(x){try{var _=x._subscription._observer;_&&!_.error&&(_.error=g1)}catch{}var A=!u.observers.size;u.observers.add(x);var P=u.last;return P&&P.error?x.error&&x.error(P.error):P&&P.result&&x.next&&x.next(P.result),A&&u.reobserve().catch(function(){}),function(){u.observers.delete(x)&&!u.observers.size&&u.tearDownQuery()}})||this;u.observers=new Set,u.subscriptions=new Set,u.queryInfo=i,u.queryManager=n,u.waitForOwnResult=Tf(a.fetchPolicy),u.isTornDown=!1,u.subscribeToMore=u.subscribeToMore.bind(u);var c=n.defaultOptions.watchQuery,f=c===void 0?{}:c,h=f.fetchPolicy,d=h===void 0?"cache-first":h,y=a.fetchPolicy,g=y===void 0?d:y,m=a.initialFetchPolicy,b=m===void 0?g==="standby"?d:g:m;u.options=L(L({},a),{initialFetchPolicy:b,fetchPolicy:g}),u.queryId=i.queryId||n.generateQueryId();var I=_s(u.query);return u.queryName=I&&I.name&&I.name.value,u}return Object.defineProperty(e.prototype,"query",{get:function(){return this.lastQuery||this.options.query},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),e.prototype.result=function(){var t=this;return new Promise(function(n,i){var a={next:function(c){n(c),t.observers.delete(a),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout(function(){u.unsubscribe()},0)},error:i},u=t.subscribe(a)})},e.prototype.resetDiff=function(){this.queryInfo.resetDiff()},e.prototype.getCurrentResult=function(t){t===void 0&&(t=!0);var n=this.getLastResult(!0),i=this.queryInfo.networkStatus||n&&n.networkStatus||kt.ready,a=L(L({},n),{loading:oo(i),networkStatus:i}),u=this.options.fetchPolicy,c=u===void 0?"cache-first":u;if(!(Tf(c)||this.queryManager.getDocumentInfo(this.query).hasForcedResolvers))if(this.waitForOwnResult)this.queryInfo.updateWatch();else{var f=this.queryInfo.getDiff();(f.complete||this.options.returnPartialData)&&(a.data=f.result),Ft(a.data,{})&&(a.data=void 0),f.complete?(delete a.partial,f.complete&&a.networkStatus===kt.loading&&(c==="cache-first"||c==="cache-only")&&(a.networkStatus=kt.ready,a.loading=!1)):a.partial=!0,globalThis.__DEV__!==!1&&!f.complete&&!this.options.partialRefetch&&!a.loading&&!a.data&&!a.error&&ug(f.missing)}return t&&this.updateLastResult(a),a},e.prototype.isDifferentFromLastResult=function(t,n){if(!this.last)return!0;var i=this.queryManager.getDocumentInfo(this.query).hasNonreactiveDirective?!Py(this.query,this.last.result,t,this.variables):!Ft(this.last.result,t);return i||n&&!Ft(this.last.variables,n)},e.prototype.getLast=function(t,n){var i=this.last;if(i&&i[t]&&(!n||Ft(i.variables,this.variables)))return i[t]},e.prototype.getLastResult=function(t){return this.getLast("result",t)},e.prototype.getLastError=function(t){return this.getLast("error",t)},e.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},e.prototype.refetch=function(t){var n,i={pollInterval:0},a=this.options.fetchPolicy;if(a==="cache-and-network"?i.fetchPolicy=a:a==="no-cache"?i.fetchPolicy="no-cache":i.fetchPolicy="network-only",globalThis.__DEV__!==!1&&t&&y1.call(t,"variables")){var u=Rl(this.query),c=u.variableDefinitions;(!c||!c.some(function(f){return f.variable.name.value==="variables"}))&&globalThis.__DEV__!==!1&&je.warn(20,t,((n=u.name)===null||n===void 0?void 0:n.value)||u)}return t&&!Ft(this.options.variables,t)&&(i.variables=this.options.variables=L(L({},this.options.variables),t)),this.queryInfo.resetLastWrite(),this.reobserve(i,kt.refetch)},e.prototype.fetchMore=function(t){var n=this,i=L(L({},t.query?t:L(L(L(L({},this.options),{query:this.options.query}),t),{variables:L(L({},this.options.variables),t.variables)})),{fetchPolicy:"no-cache"});i.query=this.transformDocument(i.query);var a=this.queryManager.generateQueryId();this.lastQuery=t.query?this.transformDocument(this.options.query):i.query;var u=this.queryInfo,c=u.networkStatus;u.networkStatus=kt.fetchMore,i.notifyOnNetworkStatusChange&&this.observe();var f=new Set,h=t==null?void 0:t.updateQuery,d=this.options.fetchPolicy!=="no-cache";return d||je(h,21),this.queryManager.fetchQuery(a,i,kt.fetchMore).then(function(y){if(n.queryManager.removeQuery(a),u.networkStatus===kt.fetchMore&&(u.networkStatus=c),d)n.queryManager.cache.batch({update:function(b){var I=t.updateQuery;I?b.updateQuery({query:n.query,variables:n.variables,returnPartialData:!0,optimistic:!1},function(x){return I(x,{fetchMoreResult:y.data,variables:i.variables})}):b.writeQuery({query:i.query,variables:i.variables,data:y.data})},onWatchUpdated:function(b){f.add(b.query)}});else{var g=n.getLast("result"),m=h(g.data,{fetchMoreResult:y.data,variables:i.variables});n.reportResult(L(L({},g),{data:m}),n.variables)}return y}).finally(function(){d&&!f.has(n.query)&&og(n)})},e.prototype.subscribeToMore=function(t){var n=this,i=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables,context:t.context}).subscribe({next:function(a){var u=t.updateQuery;u&&n.updateQuery(function(c,f){var h=f.variables;return u(c,{subscriptionData:a,variables:h})})},error:function(a){if(t.onError){t.onError(a);return}globalThis.__DEV__!==!1&&je.error(22,a)}});return this.subscriptions.add(i),function(){n.subscriptions.delete(i)&&i.unsubscribe()}},e.prototype.setOptions=function(t){return this.reobserve(t)},e.prototype.silentSetOptions=function(t){var n=Wi(this.options,t||{});ag(this.options,n)},e.prototype.setVariables=function(t){return Ft(this.variables,t)?this.observers.size?this.result():Promise.resolve():(this.options.variables=t,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:t},kt.setVariables):Promise.resolve())},e.prototype.updateQuery=function(t){var n=this.queryManager,i=n.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,a=t(i,{variables:this.variables});a&&(n.cache.writeQuery({query:this.options.query,data:a,variables:this.variables}),n.broadcastQueries())},e.prototype.startPolling=function(t){this.options.pollInterval=t,this.updatePolling()},e.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},e.prototype.applyNextFetchPolicy=function(t,n){if(n.nextFetchPolicy){var i=n.fetchPolicy,a=i===void 0?"cache-first":i,u=n.initialFetchPolicy,c=u===void 0?a:u;a==="standby"||(typeof n.nextFetchPolicy=="function"?n.fetchPolicy=n.nextFetchPolicy(a,{reason:t,options:n,observable:this,initialFetchPolicy:c}):t==="variables-changed"?n.fetchPolicy=c:n.fetchPolicy=n.nextFetchPolicy)}return n.fetchPolicy},e.prototype.fetch=function(t,n,i){return this.queryManager.setObservableQuery(this),this.queryManager.fetchConcastWithInfo(this.queryId,t,n,i)},e.prototype.updatePolling=function(){var t=this;if(!this.queryManager.ssrMode){var n=this,i=n.pollingInfo,a=n.options.pollInterval;if(!a||!this.hasObservers()){i&&(clearTimeout(i.timeout),delete this.pollingInfo);return}if(!(i&&i.interval===a)){je(a,23);var u=i||(this.pollingInfo={});u.interval=a;var c=function(){var h,d;t.pollingInfo&&(!oo(t.queryInfo.networkStatus)&&!(!((d=(h=t.options).skipPollAttempt)===null||d===void 0)&&d.call(h))?t.reobserve({fetchPolicy:t.options.initialFetchPolicy==="no-cache"?"no-cache":"network-only"},kt.poll).then(f,f):f())},f=function(){var h=t.pollingInfo;h&&(clearTimeout(h.timeout),h.timeout=setTimeout(c,h.interval))};f()}}},e.prototype.updateLastResult=function(t,n){n===void 0&&(n=this.variables);var i=this.getLastError();return i&&this.last&&!Ft(n,this.last.variables)&&(i=void 0),this.last=L({result:this.queryManager.assumeImmutableResults?t:Kl(t),variables:n},i?{error:i}:null)},e.prototype.reobserveAsConcast=function(t,n){var i=this;this.isTornDown=!1;var a=n===kt.refetch||n===kt.fetchMore||n===kt.poll,u=this.options.variables,c=this.options.fetchPolicy,f=Wi(this.options,t||{}),h=a?f:ag(this.options,f),d=this.transformDocument(h.query);this.lastQuery=d,a||(this.updatePolling(),t&&t.variables&&!Ft(t.variables,u)&&h.fetchPolicy!=="standby"&&(h.fetchPolicy===c||typeof h.nextFetchPolicy=="function")&&(this.applyNextFetchPolicy("variables-changed",h),n===void 0&&(n=kt.setVariables))),this.waitForOwnResult&&(this.waitForOwnResult=Tf(h.fetchPolicy));var y=function(){i.concast===b&&(i.waitForOwnResult=!1)},g=h.variables&&L({},h.variables),m=this.fetch(h,n,d),b=m.concast,I=m.fromLink,x={next:function(_){Ft(i.variables,g)&&(y(),i.reportResult(_,g))},error:function(_){Ft(i.variables,g)&&(sf(_)||(_=new yn({networkError:_})),y(),i.reportError(_,g))}};return!a&&(I||!this.concast)&&(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=b,this.observer=x),b.addObserver(x),b},e.prototype.reobserve=function(t,n){return this.reobserveAsConcast(t,n).promise},e.prototype.resubscribeAfterError=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var i=this.last;this.resetLastResults();var a=this.subscribe.apply(this,t);return this.last=i,a},e.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},e.prototype.reportResult=function(t,n){var i=this.getLastError(),a=this.isDifferentFromLastResult(t,n);(i||!t.partial||this.options.returnPartialData)&&this.updateLastResult(t,n),(i||a)&&Ys(this.observers,"next",t)},e.prototype.reportError=function(t,n){var i=L(L({},this.getLastResult()),{error:t,errors:t.graphQLErrors,networkStatus:kt.error,loading:!1});this.updateLastResult(i,n),Ys(this.observers,"error",this.last.error=t)},e.prototype.hasObservers=function(){return this.observers.size>0},e.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},e.prototype.transformDocument=function(t){return this.queryManager.transform(t)},e}(Nt);Xl(Iu);function og(r){var e=r.options,t=e.fetchPolicy,n=e.nextFetchPolicy;return t==="cache-and-network"||t==="network-only"?r.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(i,a){return this.nextFetchPolicy=n,typeof this.nextFetchPolicy=="function"?this.nextFetchPolicy(i,a):t}}):r.reobserve()}function g1(r){globalThis.__DEV__!==!1&&je.error(24,r.message,r.stack)}function ug(r){globalThis.__DEV__!==!1&&r&&globalThis.__DEV__!==!1&&je.debug(25,r)}function Tf(r){return r==="network-only"||r==="no-cache"||r==="standby"}var Xs=new(gs?WeakMap:Map);function Af(r,e){var t=r[e];typeof t=="function"&&(r[e]=function(){return Xs.set(r,(Xs.get(r)+1)%1e15),t.apply(this,arguments)})}function cg(r){r.notifyTimeout&&(clearTimeout(r.notifyTimeout),r.notifyTimeout=void 0)}var kf=function(){function r(e,t){t===void 0&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var n=this.cache=e.cache;Xs.has(n)||(Xs.set(n,0),Af(n,"evict"),Af(n,"modify"),Af(n,"reset"))}return r.prototype.init=function(e){var t=e.networkStatus||kt.loading;return this.variables&&this.networkStatus!==kt.loading&&!Ft(this.variables,e.variables)&&(t=kt.setVariables),Ft(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},r.prototype.reset=function(){cg(this),this.dirty=!1},r.prototype.resetDiff=function(){this.lastDiff=void 0},r.prototype.getDiff=function(){var e=this.getDiffOptions();if(this.lastDiff&&Ft(e,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables);var t=this.observableQuery;if(t&&t.options.fetchPolicy==="no-cache")return{complete:!1};var n=this.cache.diff(e);return this.updateLastDiff(n,e),n},r.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},r.prototype.getDiffOptions=function(e){var t;return e===void 0&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:(t=this.observableQuery)===null||t===void 0?void 0:t.options.canonizeResults}},r.prototype.setDiff=function(e){var t=this,n,i=this.lastDiff&&this.lastDiff.diff;e&&!e.complete&&(!((n=this.observableQuery)===null||n===void 0)&&n.getLastError())||(this.updateLastDiff(e),!this.dirty&&!Ft(i&&i.result,e&&e.result)&&(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout(function(){return t.notify()},0))))},r.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){var n=t.getDiff();n.fromOptimisticTransaction?e.observe():og(e)})):delete this.oqListener)},r.prototype.notify=function(){var e=this;cg(this),this.shouldNotify()&&this.listeners.forEach(function(t){return t(e)}),this.dirty=!1},r.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(oo(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if(e!=="cache-only"&&e!=="cache-and-network")return!1}return!0},r.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=r.prototype.cancel;var e=this.observableQuery;e&&e.stopPolling()}},r.prototype.cancel=function(){},r.prototype.updateWatch=function(e){var t=this;e===void 0&&(e=this.variables);var n=this.observableQuery;if(!(n&&n.options.fetchPolicy==="no-cache")){var i=L(L({},this.getDiffOptions(e)),{watcher:this,callback:function(a){return t.setDiff(a)}});(!this.lastWatch||!Ft(i,this.lastWatch))&&(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},r.prototype.resetLastWrite=function(){this.lastWrite=void 0},r.prototype.shouldWrite=function(e,t){var n=this.lastWrite;return!(n&&n.dmCount===Xs.get(this.cache)&&Ft(t,n.variables)&&Ft(e.data,n.result.data))},r.prototype.markResult=function(e,t,n,i){var a=this,u=new vi,c=mn(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&mn(e.incremental)){var f=ef(this.getDiff().result,e);e.data=f}else if("hasNext"in e&&e.hasNext){var h=this.getDiff();e.data=u.merge(h.result,e.data)}this.graphQLErrors=c,n.fetchPolicy==="no-cache"?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(n.variables)):i!==0&&(If(e,n.errorPolicy)?this.cache.performTransaction(function(d){if(a.shouldWrite(e,n.variables))d.writeQuery({query:t,data:e.data,variables:n.variables,overwrite:i===1}),a.lastWrite={result:e,variables:n.variables,dmCount:Xs.get(a.cache)};else if(a.lastDiff&&a.lastDiff.diff.complete){e.data=a.lastDiff.diff.result;return}var y=a.getDiffOptions(n.variables),g=d.diff(y);!a.stopped&&Ft(a.variables,n.variables)&&a.updateWatch(n.variables),a.updateLastDiff(g,y),g.complete&&(e.data=g.result)}):this.lastWrite=void 0)},r.prototype.markReady=function(){return this.networkError=null,this.networkStatus=kt.ready},r.prototype.markError=function(e){return this.networkStatus=kt.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},r}();function If(r,e){e===void 0&&(e="none");var t=e==="ignore"||e==="all",n=!to(r);return!n&&t&&r.data&&(n=!0),n}var v1=Object.prototype.hasOwnProperty,lg=Object.create(null),b1=function(){function r(e){var t=this;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new cu(Yn["queryManager.getDocumentInfo"]||2e3),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Ws(!1);var n=new mu(function(a){return t.cache.transformDocument(a)},{cache:!1});this.cache=e.cache,this.link=e.link,this.defaultOptions=e.defaultOptions,this.queryDeduplication=e.queryDeduplication,this.clientAwareness=e.clientAwareness,this.localState=e.localState,this.ssrMode=e.ssrMode,this.assumeImmutableResults=e.assumeImmutableResults;var i=e.documentTransform;this.documentTransform=i?n.concat(i).concat(n):n,this.defaultContext=e.defaultContext||Object.create(null),(this.onBroadcast=e.onBroadcast)&&(this.mutationStore=Object.create(null))}return r.prototype.stop=function(){var e=this;this.queries.forEach(function(t,n){e.stopQueryNoBroadcast(n)}),this.cancelPendingFetches(Yr(26))},r.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach(function(t){return t(e)}),this.fetchCancelFns.clear()},r.prototype.mutate=function(e){return Li(this,arguments,void 0,function(t){var n,i,a,u,c,f,h,d=t.mutation,y=t.variables,g=t.optimisticResponse,m=t.updateQueries,b=t.refetchQueries,I=b===void 0?[]:b,x=t.awaitRefetchQueries,_=x===void 0?!1:x,A=t.update,P=t.onQueryUpdated,M=t.fetchPolicy,U=M===void 0?((f=this.defaultOptions.mutate)===null||f===void 0?void 0:f.fetchPolicy)||"network-only":M,W=t.errorPolicy,K=W===void 0?((h=this.defaultOptions.mutate)===null||h===void 0?void 0:h.errorPolicy)||"none":W,X=t.keepRootFields,fe=t.context;return qi(this,function(oe){switch(oe.label){case 0:return je(d,27),je(U==="network-only"||U==="no-cache",28),n=this.generateMutationId(),d=this.cache.transformForLink(this.transform(d)),i=this.getDocumentInfo(d).hasClientExports,y=this.getVariables(d,y),i?[4,this.localState.addExportedVariables(d,y,fe)]:[3,2];case 1:y=oe.sent(),oe.label=2;case 2:return a=this.mutationStore&&(this.mutationStore[n]={mutation:d,variables:y,loading:!0,error:null}),u=g&&this.markMutationOptimistic(g,{mutationId:n,document:d,variables:y,fetchPolicy:U,errorPolicy:K,context:fe,updateQueries:m,update:A,keepRootFields:X}),this.broadcastQueries(),c=this,[2,new Promise(function(Ie,ye){return wu(c.getObservableFromLink(d,L(L({},fe),{optimisticResponse:u?g:void 0}),y,{},!1),function(Ne){if(to(Ne)&&K==="none")throw new yn({graphQLErrors:_u(Ne)});a&&(a.loading=!1,a.error=null);var Ce=L({},Ne);return typeof I=="function"&&(I=I(Ce)),K==="ignore"&&to(Ce)&&delete Ce.errors,c.markMutationResult({mutationId:n,result:Ce,document:d,variables:y,fetchPolicy:U,errorPolicy:K,context:fe,update:A,updateQueries:m,awaitRefetchQueries:_,refetchQueries:I,removeOptimistic:u?n:void 0,onQueryUpdated:P,keepRootFields:X})}).subscribe({next:function(Ne){c.broadcastQueries(),(!("hasNext"in Ne)||Ne.hasNext===!1)&&Ie(Ne)},error:function(Ne){a&&(a.loading=!1,a.error=Ne),u&&c.cache.removeOptimistic(n),c.broadcastQueries(),ye(Ne instanceof yn?Ne:new yn({networkError:Ne}))}})})]}})})},r.prototype.markMutationResult=function(e,t){var n=this;t===void 0&&(t=this.cache);var i=e.result,a=[],u=e.fetchPolicy==="no-cache";if(!u&&If(i,e.errorPolicy)){if(Ss(i)||a.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Ss(i)&&mn(i.incremental)){var c=t.diff({id:"ROOT_MUTATION",query:this.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),f=void 0;c.result&&(f=ef(c.result,i)),typeof f<"u"&&(i.data=f,a.push({result:f,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var h=e.updateQueries;h&&this.queries.forEach(function(y,g){var m=y.observableQuery,b=m&&m.queryName;if(!(!b||!v1.call(h,b))){var I=h[b],x=n.queries.get(g),_=x.document,A=x.variables,P=t.diff({query:_,variables:A,returnPartialData:!0,optimistic:!1}),M=P.result,U=P.complete;if(U&&M){var W=I(M,{mutationResult:i,queryName:_&&fu(_)||void 0,queryVariables:A});W&&a.push({result:W,dataId:"ROOT_QUERY",query:_,variables:A})}}})}if(a.length>0||(e.refetchQueries||"").length>0||e.update||e.onQueryUpdated||e.removeOptimistic){var d=[];if(this.refetchQueries({updateCache:function(y){u||a.forEach(function(I){return y.write(I)});var g=e.update,m=!dy(i)||Ss(i)&&!i.hasNext;if(g){if(!u){var b=y.diff({id:"ROOT_MUTATION",query:n.getDocumentInfo(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});b.complete&&(i=L(L({},i),{data:b.result}),"incremental"in i&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}m&&g(y,i,{context:e.context,variables:e.variables})}!u&&!e.keepRootFields&&m&&y.modify({id:"ROOT_MUTATION",fields:function(I,x){var _=x.fieldName,A=x.DELETE;return _==="__typename"?I:A}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach(function(y){return d.push(y)}),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(d).then(function(){return i})}return Promise.resolve(i)},r.prototype.markMutationOptimistic=function(e,t){var n=this,i=typeof e=="function"?e(t.variables,{IGNORE:lg}):e;return i===lg?!1:(this.cache.recordOptimisticTransaction(function(a){try{n.markMutationResult(L(L({},t),{result:{data:i}}),a)}catch(u){globalThis.__DEV__!==!1&&je.error(u)}},t.mutationId),!0)},r.prototype.fetchQuery=function(e,t,n){return this.fetchConcastWithInfo(e,t,n).concast.promise},r.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach(function(t,n){e[n]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}}),e},r.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},r.prototype.transform=function(e){return this.documentTransform.transformDocument(e)},r.prototype.getDocumentInfo=function(e){var t=this.transformCache;if(!t.has(e)){var n={hasClientExports:_m(e),hasForcedResolvers:this.localState.shouldForceResolvers(e),hasNonreactiveDirective:ji(["nonreactive"],e),clientQuery:this.localState.clientQuery(e),serverQuery:yu([{name:"client",remove:!0},{name:"connection"},{name:"nonreactive"}],e),defaultVars:hu(_s(e)),asQuery:L(L({},e),{definitions:e.definitions.map(function(i){return i.kind==="OperationDefinition"&&i.operation!=="query"?L(L({},i),{operation:"query"}):i})})};t.set(e,n)}return t.get(e)},r.prototype.getVariables=function(e,t){return L(L({},this.getDocumentInfo(e).defaultVars),t)},r.prototype.watchQuery=function(e){var t=this.transform(e.query);e=L(L({},e),{variables:this.getVariables(t,e.variables)}),typeof e.notifyOnNetworkStatusChange>"u"&&(e.notifyOnNetworkStatusChange=!1);var n=new kf(this),i=new Iu({queryManager:this,queryInfo:n,options:e});return i.lastQuery=t,this.queries.set(i.queryId,n),n.init({document:t,observableQuery:i,variables:i.variables}),i},r.prototype.query=function(e,t){var n=this;return t===void 0&&(t=this.generateQueryId()),je(e.query,29),je(e.query.kind==="Document",30),je(!e.returnPartialData,31),je(!e.pollInterval,32),this.fetchQuery(t,L(L({},e),{query:this.transform(e.query)})).finally(function(){return n.stopQuery(t)})},r.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},r.prototype.generateRequestId=function(){return this.requestIdCounter++},r.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},r.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},r.prototype.clearStore=function(e){return e===void 0&&(e={discardWatches:!0}),this.cancelPendingFetches(Yr(33)),this.queries.forEach(function(t){t.observableQuery?t.networkStatus=kt.loading:t.stop()}),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},r.prototype.getObservableQueries=function(e){var t=this;e===void 0&&(e="active");var n=new Map,i=new Map,a=new Set;return Array.isArray(e)&&e.forEach(function(u){typeof u=="string"?i.set(u,!1):Rm(u)?i.set(t.transform(u),!1):er(u)&&u.query&&a.add(u)}),this.queries.forEach(function(u,c){var f=u.observableQuery,h=u.document;if(f){if(e==="all"){n.set(c,f);return}var d=f.queryName,y=f.options.fetchPolicy;if(y==="standby"||e==="active"&&!f.hasObservers())return;(e==="active"||d&&i.has(d)||h&&i.has(h))&&(n.set(c,f),d&&i.set(d,!0),h&&i.set(h,!0))}}),a.size&&a.forEach(function(u){var c=eu("legacyOneTimeQuery"),f=t.getQuery(c).init({document:u.query,variables:u.variables}),h=new Iu({queryManager:t,queryInfo:f,options:L(L({},u),{fetchPolicy:"network-only"})});je(h.queryId===c),f.setObservableQuery(h),n.set(c,h)}),globalThis.__DEV__!==!1&&i.size&&i.forEach(function(u,c){u||globalThis.__DEV__!==!1&&je.warn(typeof c=="string"?34:35,c)}),n},r.prototype.reFetchObservableQueries=function(e){var t=this;e===void 0&&(e=!1);var n=[];return this.getObservableQueries(e?"all":"active").forEach(function(i,a){var u=i.options.fetchPolicy;i.resetLastResults(),(e||u!=="standby"&&u!=="cache-only")&&n.push(i.refetch()),t.getQuery(a).setDiff(null)}),this.broadcastQueries(),Promise.all(n)},r.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},r.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,i=e.fetchPolicy,a=e.errorPolicy,u=a===void 0?"none":a,c=e.variables,f=e.context,h=f===void 0?{}:f,d=e.extensions,y=d===void 0?{}:d;n=this.transform(n),c=this.getVariables(n,c);var g=function(b){return t.getObservableFromLink(n,h,b,y).map(function(I){i!=="no-cache"&&(If(I,u)&&t.cache.write({query:n,result:I.data,dataId:"ROOT_SUBSCRIPTION",variables:b}),t.broadcastQueries());var x=to(I),_=qO(I);if(x||_){var A={};if(x&&(A.graphQLErrors=I.errors),_&&(A.protocolErrors=I.extensions[nf]),u==="none"||_)throw new yn(A)}return u==="ignore"&&delete I.errors,I})};if(this.getDocumentInfo(n).hasClientExports){var m=this.localState.addExportedVariables(n,c,h).then(g);return new Nt(function(b){var I=null;return m.then(function(x){return I=x.subscribe(b)},b.error),function(){return I&&I.unsubscribe()}})}return g(c)},r.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},r.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},r.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach(function(e){return e.notify()})},r.prototype.getLocalState=function(){return this.localState},r.prototype.getObservableFromLink=function(e,t,n,i,a){var u=this,c;a===void 0&&(a=(c=t==null?void 0:t.queryDeduplication)!==null&&c!==void 0?c:this.queryDeduplication);var f,h=this.getDocumentInfo(e),d=h.serverQuery,y=h.clientQuery;if(d){var g=this,m=g.inFlightLinkObservables,b=g.link,I={query:d,variables:n,operationName:fu(d)||void 0,context:this.prepareContext(L(L({},t),{forceFetch:!a})),extensions:i};if(t=I.context,a){var x=Gs(d),_=mi(n),A=m.lookup(x,_);if(f=A.observable,!f){var P=new xs([Eu(b,I)]);f=A.observable=P,P.beforeNext(function(){m.remove(x,_)})}}else f=new xs([Eu(b,I)])}else f=new xs([Nt.of({data:{}})]),t=this.prepareContext(t);return y&&(f=wu(f,function(M){return u.localState.runResolvers({document:y,remoteResult:M,context:t,variables:n})})),f},r.prototype.getResultsFromLink=function(e,t,n){var i=e.lastRequestId=this.generateRequestId(),a=this.cache.transformForLink(n.query);return wu(this.getObservableFromLink(a,n.context,n.variables),function(u){var c=_u(u),f=c.length>0,h=n.errorPolicy;if(i>=e.lastRequestId){if(f&&h==="none")throw e.markError(new yn({graphQLErrors:c}));e.markResult(u,a,n,t),e.markReady()}var d={data:u.data,loading:!1,networkStatus:kt.ready};return f&&h==="none"&&(d.data=void 0),f&&h!=="ignore"&&(d.errors=c,d.networkStatus=kt.error),d},function(u){var c=sf(u)?u:new yn({networkError:u});throw i>=e.lastRequestId&&e.markError(c),c})},r.prototype.fetchConcastWithInfo=function(e,t,n,i){var a=this;n===void 0&&(n=kt.loading),i===void 0&&(i=t.query);var u=this.getVariables(i,t.variables),c=this.getQuery(e),f=this.defaultOptions.watchQuery,h=t.fetchPolicy,d=h===void 0?f&&f.fetchPolicy||"cache-first":h,y=t.errorPolicy,g=y===void 0?f&&f.errorPolicy||"none":y,m=t.returnPartialData,b=m===void 0?!1:m,I=t.notifyOnNetworkStatusChange,x=I===void 0?!1:I,_=t.context,A=_===void 0?{}:_,P=Object.assign({},t,{query:i,variables:u,fetchPolicy:d,errorPolicy:g,returnPartialData:b,notifyOnNetworkStatusChange:x,context:A}),M=function(fe){P.variables=fe;var oe=a.fetchQueryByPolicy(c,P,n);return P.fetchPolicy!=="standby"&&oe.sources.length>0&&c.observableQuery&&c.observableQuery.applyNextFetchPolicy("after-fetch",t),oe},U=function(){return a.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,function(fe){U(),setTimeout(function(){return W.cancel(fe)})});var W,K;if(this.getDocumentInfo(P.query).hasClientExports)W=new xs(this.localState.addExportedVariables(P.query,P.variables,P.context).then(M).then(function(fe){return fe.sources})),K=!0;else{var X=M(P.variables);K=X.fromLink,W=new xs(X.sources)}return W.promise.then(U,U),{concast:W,fromLink:K}},r.prototype.refetchQueries=function(e){var t=this,n=e.updateCache,i=e.include,a=e.optimistic,u=a===void 0?!1:a,c=e.removeOptimistic,f=c===void 0?u?eu("refetchQueries"):void 0:c,h=e.onQueryUpdated,d=new Map;i&&this.getObservableQueries(i).forEach(function(g,m){d.set(m,{oq:g,lastDiff:t.getQuery(m).getDiff()})});var y=new Map;return n&&this.cache.batch({update:n,optimistic:u&&f||!1,removeOptimistic:f,onWatchUpdated:function(g,m,b){var I=g.watcher instanceof kf&&g.watcher.observableQuery;if(I){if(h){d.delete(I.queryId);var x=h(I,m,b);return x===!0&&(x=I.refetch()),x!==!1&&y.set(I,x),x}h!==null&&d.set(I.queryId,{oq:I,lastDiff:b,diff:m})}}}),d.size&&d.forEach(function(g,m){var b=g.oq,I=g.lastDiff,x=g.diff,_;if(h){if(!x){var A=b.queryInfo;A.reset(),x=A.getDiff()}_=h(b,x,I)}(!h||_===!0)&&(_=b.refetch()),_!==!1&&y.set(b,_),m.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(m)}),f&&this.cache.removeOptimistic(f),y},r.prototype.fetchQueryByPolicy=function(e,t,n){var i=this,a=t.query,u=t.variables,c=t.fetchPolicy,f=t.refetchWritePolicy,h=t.errorPolicy,d=t.returnPartialData,y=t.context,g=t.notifyOnNetworkStatusChange,m=e.networkStatus;e.init({document:a,variables:u,networkStatus:n});var b=function(){return e.getDiff()},I=function(M,U){U===void 0&&(U=e.networkStatus||kt.loading);var W=M.result;globalThis.__DEV__!==!1&&!d&&!Ft(W,{})&&ug(M.missing);var K=function(X){return Nt.of(L({data:X,loading:oo(U),networkStatus:U},M.complete?null:{partial:!0}))};return W&&i.getDocumentInfo(a).hasForcedResolvers?i.localState.runResolvers({document:a,remoteResult:{data:W},context:y,variables:u,onlyRunForcedResolvers:!0}).then(function(X){return K(X.data||void 0)}):h==="none"&&U===kt.refetch&&Array.isArray(M.missing)?K(void 0):K(W)},x=c==="no-cache"?0:n===kt.refetch&&f!=="merge"?1:2,_=function(){return i.getResultsFromLink(e,x,{query:a,variables:u,context:y,fetchPolicy:c,errorPolicy:h})},A=g&&typeof m=="number"&&m!==n&&oo(n);switch(c){default:case"cache-first":{var P=b();return P.complete?{fromLink:!1,sources:[I(P,e.markReady())]}:d||A?{fromLink:!0,sources:[I(P),_()]}:{fromLink:!0,sources:[_()]}}case"cache-and-network":{var P=b();return P.complete||d||A?{fromLink:!0,sources:[I(P),_()]}:{fromLink:!0,sources:[_()]}}case"cache-only":return{fromLink:!1,sources:[I(b(),e.markReady())]};case"network-only":return A?{fromLink:!0,sources:[I(b()),_()]}:{fromLink:!0,sources:[_()]};case"no-cache":return A?{fromLink:!0,sources:[I(e.getDiff()),_()]}:{fromLink:!0,sources:[_()]};case"standby":return{fromLink:!1,sources:[]}}},r.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new kf(this,e)),this.queries.get(e)},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.localState.prepareContext(e);return L(L(L({},this.defaultContext),t),{clientAwareness:this.clientAwareness})},r}(),w1=function(){function r(e){var t=e.cache,n=e.client,i=e.resolvers,a=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,n&&(this.client=n),i&&this.addResolvers(i),a&&this.setFragmentMatcher(a)}return r.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(n){t.resolvers=Za(t.resolvers,n)}):this.resolvers=Za(this.resolvers,e)},r.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},r.prototype.getResolvers=function(){return this.resolvers||{}},r.prototype.runResolvers=function(e){return Li(this,arguments,void 0,function(t){var n=t.document,i=t.remoteResult,a=t.context,u=t.variables,c=t.onlyRunForcedResolvers,f=c===void 0?!1:c;return qi(this,function(h){return n?[2,this.resolveDocument(n,i.data,a,u,this.fragmentMatcher,f).then(function(d){return L(L({},i),{data:d.result})})]:[2,i]})})},r.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},r.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},r.prototype.clientQuery=function(e){return ji(["client"],e)&&this.resolvers?e:null},r.prototype.serverQuery=function(e){return $l(e)},r.prototype.prepareContext=function(e){var t=this.cache;return L(L({},e),{cache:t,getCacheKey:function(n){return t.identify(n)}})},r.prototype.addExportedVariables=function(e){return Li(this,arguments,void 0,function(t,n,i){return n===void 0&&(n={}),i===void 0&&(i={}),qi(this,function(a){return t?[2,this.resolveDocument(t,this.buildRootValueFromCache(t,n)||{},this.prepareContext(i),n).then(function(u){return L(L({},n),u.exportedVariables)})]:[2,L({},n)]})})},r.prototype.shouldForceResolvers=function(e){var t=!1;return Rn(e,{Directive:{enter:function(n){if(n.name.value==="client"&&n.arguments&&(t=n.arguments.some(function(i){return i.name.value==="always"&&i.value.kind==="BooleanValue"&&i.value.value===!0}),t))return Sl}}}),t},r.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:iy(e),variables:t,returnPartialData:!0,optimistic:!1}).result},r.prototype.resolveDocument=function(e,t){return Li(this,arguments,void 0,function(n,i,a,u,c,f){var h,d,y,g,m,b,I,x,_,A,P;return a===void 0&&(a={}),u===void 0&&(u={}),c===void 0&&(c=function(){return!0}),f===void 0&&(f=!1),qi(this,function(M){return h=Bi(n),d=Qa(n),y=Wa(d),g=this.collectSelectionsToResolve(h,y),m=h.operation,b=m?m.charAt(0).toUpperCase()+m.slice(1):"Query",I=this,x=I.cache,_=I.client,A={fragmentMap:y,context:L(L({},a),{cache:x,client:_}),variables:u,fragmentMatcher:c,defaultOperationType:b,exportedVariables:{},selectionsToResolve:g,onlyRunForcedResolvers:f},P=!1,[2,this.resolveSelectionSet(h.selectionSet,P,i,A).then(function(U){return{result:U,exportedVariables:A.exportedVariables}})]})})},r.prototype.resolveSelectionSet=function(e,t,n,i){return Li(this,void 0,void 0,function(){var a,u,c,f,h,d=this;return qi(this,function(y){return a=i.fragmentMap,u=i.context,c=i.variables,f=[n],h=function(g){return Li(d,void 0,void 0,function(){var m,b;return qi(this,function(I){return!t&&!i.selectionsToResolve.has(g)?[2]:Vs(g,c)?gi(g)?[2,this.resolveField(g,t,n,i).then(function(x){var _;typeof x<"u"&&f.push((_={},_[yi(g)]=x,_))})]:(Dm(g)?m=g:(m=a[g.name.value],je(m,18,g.name.value)),m&&m.typeCondition&&(b=m.typeCondition.name.value,i.fragmentMatcher(n,b,u))?[2,this.resolveSelectionSet(m.selectionSet,t,n,i).then(function(x){f.push(x)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(h)).then(function(){return Xa(f)})]})})},r.prototype.resolveField=function(e,t,n,i){return Li(this,void 0,void 0,function(){var a,u,c,f,h,d,y,g,m,b=this;return qi(this,function(I){return n?(a=i.variables,u=e.name.value,c=yi(e),f=u!==c,h=n[c]||n[u],d=Promise.resolve(h),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(y=n.__typename||i.defaultOperationType,g=this.resolvers&&this.resolvers[y],g&&(m=g[f?u:c],m&&(d=Promise.resolve(vf.withValue(this.cache,m,[n,Ga(e,a),i.context,{field:e,fragmentMap:i.fragmentMap}]))))),[2,d.then(function(x){var _,A;if(x===void 0&&(x=h),e.directives&&e.directives.forEach(function(M){M.name.value==="export"&&M.arguments&&M.arguments.forEach(function(U){U.name.value==="as"&&U.value.kind==="StringValue"&&(i.exportedVariables[U.value.value]=x)})}),!e.selectionSet||x==null)return x;var P=(A=(_=e.directives)===null||_===void 0?void 0:_.some(function(M){return M.name.value==="client"}))!==null&&A!==void 0?A:!1;if(Array.isArray(x))return b.resolveSubSelectedArray(e,t||P,x,i);if(e.selectionSet)return b.resolveSelectionSet(e.selectionSet,t||P,x,i)})]):[2,null]})})},r.prototype.resolveSubSelectedArray=function(e,t,n,i){var a=this;return Promise.all(n.map(function(u){if(u===null)return null;if(Array.isArray(u))return a.resolveSubSelectedArray(e,t,u,i);if(e.selectionSet)return a.resolveSelectionSet(e.selectionSet,t,u,i)}))},r.prototype.collectSelectionsToResolve=function(e,t){var n=function(u){return!Array.isArray(u)},i=this.selectionsToResolveCache;function a(u){if(!i.has(u)){var c=new Set;i.set(u,c),Rn(u,{Directive:function(f,h,d,y,g){f.name.value==="client"&&g.forEach(function(m){n(m)&&wm(m)&&c.add(m)})},FragmentSpread:function(f,h,d,y,g){var m=t[f.name.value];je(m,19,f.name.value);var b=a(m);b.size>0&&(g.forEach(function(I){n(I)&&wm(I)&&c.add(I)}),c.add(f),b.forEach(function(I){c.add(I)}))}})}return i.get(u)}return a(e)},r}(),fg=!1,Cf=function(){function r(e){var t=this;if(this.resetStoreCallbacks=[],this.clearStoreCallbacks=[],!e.cache)throw Yr(15);var n=e.uri,i=e.credentials,a=e.headers,u=e.cache,c=e.documentTransform,f=e.ssrMode,h=f===void 0?!1:f,d=e.ssrForceFetchDelay,y=d===void 0?0:d,g=e.connectToDevTools,m=e.queryDeduplication,b=m===void 0?!0:m,I=e.defaultOptions,x=e.defaultContext,_=e.assumeImmutableResults,A=_===void 0?u.assumeImmutableResults:_,P=e.resolvers,M=e.typeDefs,U=e.fragmentMatcher,W=e.name,K=e.version,X=e.devtools,fe=e.link;fe||(fe=n?new Ty({uri:n,credentials:i,headers:a}):Kr.empty()),this.link=fe,this.cache=u,this.disableNetworkFetches=h||y>0,this.queryDeduplication=b,this.defaultOptions=I||Object.create(null),this.typeDefs=M,this.devtoolsConfig=L(L({},X),{enabled:(X==null?void 0:X.enabled)||g}),this.devtoolsConfig.enabled===void 0&&(this.devtoolsConfig.enabled=globalThis.__DEV__!==!1),y&&setTimeout(function(){return t.disableNetworkFetches=!1},y),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.watchFragment=this.watchFragment.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),this.version=hl,this.localState=new w1({cache:u,client:this,resolvers:P,fragmentMatcher:U}),this.queryManager=new b1({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,defaultContext:x,documentTransform:c,queryDeduplication:b,ssrMode:h,clientAwareness:{name:W,version:K},localState:this.localState,assumeImmutableResults:A,onBroadcast:this.devtoolsConfig.enabled?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0}),this.devtoolsConfig.enabled&&this.connectToDevTools()}return r.prototype.connectToDevTools=function(){if(!(typeof window>"u")){var e=window,t=Symbol.for("apollo.devtools");(e[t]=e[t]||[]).push(this),e.__APOLLO_CLIENT__=this,!fg&&globalThis.__DEV__!==!1&&(fg=!0,window.document&&window.top===window.self&&/^(https?|file):$/.test(window.location.protocol)&&setTimeout(function(){if(!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__){var n=window.navigator,i=n&&n.userAgent,a=void 0;typeof i=="string"&&(i.indexOf("Chrome/")>-1?a="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":i.indexOf("Firefox/")>-1&&(a="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),a&&globalThis.__DEV__!==!1&&je.log("Download the Apollo DevTools for a better development experience: %s",a)}},1e4))}},Object.defineProperty(r.prototype,"documentTransform",{get:function(){return this.queryManager.documentTransform},enumerable:!1,configurable:!0}),r.prototype.stop=function(){this.queryManager.stop()},r.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=zi(this.defaultOptions.watchQuery,e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=L(L({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},r.prototype.query=function(e){return this.defaultOptions.query&&(e=zi(this.defaultOptions.query,e)),je(e.fetchPolicy!=="cache-and-network",16),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=L(L({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},r.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=zi(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},r.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.cache.readQuery(e,t)},r.prototype.watchFragment=function(e){return this.cache.watchFragment(e)},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.cache.readFragment(e,t)},r.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return e.broadcast!==!1&&this.queryManager.broadcastQueries(),t},r.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},r.prototype.__requestRaw=function(e){return Eu(this.link,e)},r.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!1})}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(t){return t()}))}).then(function(){return e.reFetchObservableQueries()})},r.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore({discardWatches:!0})}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(t){return t()}))})},r.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(n){return n!==e})}},r.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},r.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),n=[],i=[];t.forEach(function(u,c){n.push(c),i.push(u)});var a=Promise.all(i);return a.queries=n,a.results=i,a.catch(function(u){globalThis.__DEV__!==!1&&je.debug(17,u)}),a},r.prototype.getObservableQueries=function(e){return e===void 0&&(e="active"),this.queryManager.getObservableQueries(e)},r.prototype.extract=function(e){return this.cache.extract(e)},r.prototype.restore=function(e){return this.cache.restore(e)},r.prototype.addResolvers=function(e){this.localState.addResolvers(e)},r.prototype.setResolvers=function(e){this.localState.setResolvers(e)},r.prototype.getResolvers=function(){return this.localState.getResolvers()},r.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},r.prototype.setLink=function(e){this.link=this.queryManager.link=e},Object.defineProperty(r.prototype,"defaultContext",{get:function(){return this.queryManager.defaultContext},enumerable:!1,configurable:!0}),r}();globalThis.__DEV__!==!1&&(Cf.prototype.getMemoryInternals=oE);var Cu=new Map,Pf=new Map,hg=!0,Pu=!1;function dg(r){return r.replace(/[\s,]+/g," ").trim()}function _1(r){return dg(r.source.body.substring(r.start,r.end))}function x1(r){var e=new Set,t=[];return r.definitions.forEach(function(n){if(n.kind==="FragmentDefinition"){var i=n.name.value,a=_1(n.loc),u=Pf.get(i);u&&!u.has(a)?hg&&console.warn("Warning: fragment with name "+i+` already exists.
|
|
85
85
|
graphql-tag enforces all fragment names across your application to be unique; read more about
|
|
86
86
|
this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):u||Pf.set(i,u=new Set),u.add(a),e.has(a)||(e.add(a),t.push(n))}else t.push(n)}),L(L({},r),{definitions:t})}function S1(r){var e=new Set(r.definitions);e.forEach(function(n){n.loc&&delete n.loc,Object.keys(n).forEach(function(i){var a=n[i];a&&typeof a=="object"&&e.add(a)})});var t=r.loc;return t&&(delete t.startToken,delete t.endToken),r}function E1(r){var e=dg(r);if(!Cu.has(e)){var t=DS(r,{experimentalFragmentVariables:Pu,allowLegacyFragmentVariables:Pu});if(!t||t.kind!=="Document")throw new Error("Not a valid GraphQL document.");Cu.set(e,S1(x1(t)))}return Cu.get(e)}function Qi(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];typeof r=="string"&&(r=[r]);var n=r[0];return e.forEach(function(i,a){i&&i.kind==="Document"?n+=i.loc.source.body:n+=i,n+=r[a+1]}),E1(n)}function pg(){Cu.clear(),Pf.clear()}function mg(){hg=!1}function yg(){Pu=!0}function gg(){Pu=!1}var uo={gql:Qi,resetCaches:pg,disableFragmentWarnings:mg,enableExperimentalFragmentVariables:yg,disableExperimentalFragmentVariables:gg};(function(r){r.gql=uo.gql,r.resetCaches=uo.resetCaches,r.disableFragmentWarnings=uo.disableFragmentWarnings,r.enableExperimentalFragmentVariables=uo.enableExperimentalFragmentVariables,r.disableExperimentalFragmentVariables=uo.disableExperimentalFragmentVariables})(Qi||(Qi={})),Qi.default=Qi,tm(globalThis.__DEV__!==!1?"log":"silent");const O1=Object.freeze(Object.defineProperty({__proto__:null,ApolloCache:ff,ApolloClient:Cf,ApolloError:yn,ApolloLink:Kr,get Cache(){return hf},DocumentTransform:mu,HttpLink:Ty,InMemoryCache:Of,MissingFieldError:df,get NetworkStatus(){return kt},Observable:Nt,ObservableQuery:Iu,checkFetcher:xy,concat:AO,createHttpLink:uf,createSignalIfSupported:QO,defaultDataIdFromObject:pf,defaultPrinter:af,disableExperimentalFragmentVariables:gg,disableFragmentWarnings:mg,empty:EO,enableExperimentalFragmentVariables:yg,execute:Eu,fallbackHttpConfig:_y,from:OO,fromError:xu,fromPromise:bO,get gql(){return Qi},isApolloError:sf,isNetworkRequestSettled:m1,isReference:Pt,makeReference:$i,makeVar:Wy,mergeOptions:zi,parseAndCheckHttpResponse:wy,resetCaches:pg,rewriteURIForGET:Ey,selectHttpOptionsAndBody:HO,selectHttpOptionsAndBodyInternal:of,selectURI:Sy,serializeFetchParameter:Ou,setLogVerbosity:tm,split:TO,throwServerError:rf,toPromise:vO},Symbol.toStringTag,{value:"Module"}));var vg={exports:{}};(function(r){r.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,r.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,r.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(r.exports,he)})(vg);var ct=vg.exports;const bg=eS({__proto__:null,default:Yp(ct)},[ct]);var wg=ou?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function Nf(){je("createContext"in bg,46);var r=ct.createContext[wg];return r||(Object.defineProperty(ct.createContext,wg,{value:r=ct.createContext({}),enumerable:!1,writable:!1,configurable:!0}),r.displayName="ApolloContext"),r}var T1=function(r){var e=r.client,t=r.children,n=Nf(),i=ct.useContext(n),a=ct.useMemo(function(){return L(L({},i),{client:e||i.client})},[i,e]);return je(a.client,47),ct.createElement(n.Provider,{value:a},t)};function _g(r){var e=ct.useContext(Nf()),t=r||e.client;return je(!!t,50),t}var xg=!1,A1="useSyncExternalStore",k1=bg[A1],Sg=k1||function(r,e,t){var n=e();globalThis.__DEV__!==!1&&!xg&&n!==e()&&(xg=!0,globalThis.__DEV__!==!1&&je.error(60));var i=ct.useState({inst:{value:n,getSnapshot:e}}),a=i[0].inst,u=i[1];return Om?ct.useLayoutEffect(function(){Object.assign(a,{value:n,getSnapshot:e}),Rf(a)&&u({inst:a})},[r,n,e]):Object.assign(a,{value:n,getSnapshot:e}),ct.useEffect(function(){return Rf(a)&&u({inst:a}),r(function(){Rf(a)&&u({inst:a})})},[r]),n};function Rf(r){var e=r.value,t=r.getSnapshot;try{return e!==t()}catch{return!0}}var ui;(function(r){r[r.Query=0]="Query",r[r.Mutation=1]="Mutation",r[r.Subscription=2]="Subscription"})(ui||(ui={}));var Es;function Eg(r){var e;switch(r){case ui.Query:e="Query";break;case ui.Mutation:e="Mutation";break;case ui.Subscription:e="Subscription";break}return e}function Og(r){Es||(Es=new cu(Yn.parser||1e3));var e=Es.get(r);if(e)return e;var t,n,i;je(!!r&&!!r.kind,62,r);for(var a=[],u=[],c=[],f=[],h=0,d=r.definitions;h<d.length;h++){var y=d[h];if(y.kind==="FragmentDefinition"){a.push(y);continue}if(y.kind==="OperationDefinition")switch(y.operation){case"query":u.push(y);break;case"mutation":c.push(y);break;case"subscription":f.push(y);break}}je(!a.length||u.length||c.length||f.length,63),je(u.length+c.length+f.length<=1,64,r,u.length,f.length,c.length),n=u.length?ui.Query:ui.Mutation,!u.length&&!c.length&&(n=ui.Subscription);var g=u.length?u:c.length?c:f;je(g.length===1,65,r,g.length);var m=g[0];t=m.variableDefinitions||[],m.name&&m.name.kind==="Name"?i=m.name.value:i="data";var b={name:i,type:n,variables:t};return Es.set(r,b),b}Og.resetCache=function(){Es=void 0},globalThis.__DEV__!==!1&&Il("parser",function(){return Es?Es.size:0});function Tg(r,e){var t=Og(r),n=Eg(e),i=Eg(t.type);je(t.type===e,66,n,n,i)}function I1(r,e){var t=ct.useRef();return(!t.current||!Ft(t.current.deps,e))&&(t.current={value:r(),deps:e}),t.current.value}var Mf=Ol?ct.useLayoutEffect:ct.useEffect,C1=Object.prototype.hasOwnProperty;function Ag(){}var Nu=Symbol();function P1(r,e,t,n,i){function a(y){var g;Tg(e,ui.Query);var m={client:r,query:e,observable:n&&n.getSSRObservable(i())||r.watchQuery(Df(void 0,r,t,i())),resultData:{previousData:(g=y==null?void 0:y.resultData.current)===null||g===void 0?void 0:g.data}};return m}var u=ct.useState(a),c=u[0],f=u[1];function h(y){var g,m;Object.assign(c.observable,(g={},g[Nu]=y,g));var b=c.resultData;f(L(L({},c),{query:y.query,resultData:Object.assign(b,{previousData:((m=b.current)===null||m===void 0?void 0:m.data)||b.previousData,current:void 0})}))}if(r!==c.client||e!==c.query){var d=a(c);return f(d),[d,h]}return[c,h]}function N1(r,e){var t=_g(e.client),n=ct.useContext(Nf()).renderPromises,i=!!n,a=t.disableNetworkFetches,u=e.ssr!==!1&&!e.skip,c=e.partialRefetch,f=kg(t,r,e,i),h=P1(t,r,e,n,f),d=h[0],y=d.observable,g=d.resultData,m=h[1],b=f(y);D1(g,y,t,e,b);var I=ct.useMemo(function(){return q1(y)},[y]);M1(y,n,u);var x=R1(g,y,t,e,b,a,c,i,{onCompleted:e.onCompleted||Ag,onError:e.onError||Ag});return{result:x,obsQueryFields:I,observable:y,resultData:g,client:t,onQueryExecuted:m}}function R1(r,e,t,n,i,a,u,c,f){var h=ct.useRef(f);ct.useEffect(function(){h.current=f});var d=(c||a)&&n.ssr===!1&&!n.skip?Pg:n.skip||i.fetchPolicy==="standby"?Ng:void 0,y=r.previousData,g=ct.useMemo(function(){return d&&Ru(d,y,e,t)},[t,e,d,y]);return Sg(ct.useCallback(function(m){if(c)return function(){};var b=function(){var _=r.current,A=e.getCurrentResult();_&&_.loading===A.loading&&_.networkStatus===A.networkStatus&&Ft(_.data,A.data)||Ff(A,r,e,t,u,m,h.current)},I=function(_){if(x.current.unsubscribe(),x.current=e.resubscribeAfterError(b,I),!C1.call(_,"graphQLErrors"))throw _;var A=r.current;(!A||A&&A.loading||!Ft(_,A.error))&&Ff({data:A&&A.data,error:_,loading:!1,networkStatus:kt.error},r,e,t,u,m,h.current)},x={current:e.subscribe(b,I)};return function(){setTimeout(function(){return x.current.unsubscribe()})}},[a,c,e,r,u,t]),function(){return g||Ig(r,e,h.current,u,t)},function(){return g||Ig(r,e,h.current,u,t)})}function M1(r,e,t){e&&t&&(e.registerSSRObservable(r),r.getCurrentResult().loading&&e.addObservableQueryPromise(r))}function D1(r,e,t,n,i){var a;e[Nu]&&!Ft(e[Nu],i)&&(e.reobserve(Df(e,t,n,i)),r.previousData=((a=r.current)===null||a===void 0?void 0:a.data)||r.previousData,r.current=void 0),e[Nu]=i}function kg(r,e,t,n){t===void 0&&(t={});var i=t.skip;t.ssr,t.onCompleted,t.onError;var a=t.defaultOptions,u=on(t,["skip","ssr","onCompleted","onError","defaultOptions"]);return function(c){var f=Object.assign(u,{query:e});return n&&(f.fetchPolicy==="network-only"||f.fetchPolicy==="cache-and-network")&&(f.fetchPolicy="cache-first"),f.variables||(f.variables={}),i?(f.initialFetchPolicy=f.initialFetchPolicy||f.fetchPolicy||Lf(a,r.defaultOptions),f.fetchPolicy="standby"):f.fetchPolicy||(f.fetchPolicy=(c==null?void 0:c.options.initialFetchPolicy)||Lf(a,r.defaultOptions)),f}}function Df(r,e,t,n){var i=[],a=e.defaultOptions.watchQuery;return a&&i.push(a),t.defaultOptions&&i.push(t.defaultOptions),i.push(Wi(r&&r.options,n)),i.reduce(zi)}function Ff(r,e,t,n,i,a,u){var c=e.current;c&&c.data&&(e.previousData=c.data),!r.error&&mn(r.errors)&&(r.error=new yn({graphQLErrors:r.errors})),e.current=Ru(L1(r,t,i),e.previousData,t,n),a(),F1(r,c==null?void 0:c.networkStatus,u)}function F1(r,e,t){if(!r.loading){var n=Cg(r);Promise.resolve().then(function(){n?t.onError(n):r.data&&e!==r.networkStatus&&r.networkStatus===kt.ready&&t.onCompleted(r.data)}).catch(function(i){globalThis.__DEV__!==!1&&je.warn(i)})}}function Ig(r,e,t,n,i){return r.current||Ff(e.getCurrentResult(),r,e,i,n,function(){},t),r.current}function Lf(r,e){var t;return(r==null?void 0:r.fetchPolicy)||((t=e==null?void 0:e.watchQuery)===null||t===void 0?void 0:t.fetchPolicy)||"cache-first"}function Cg(r){return mn(r.errors)?new yn({graphQLErrors:r.errors}):r.error}function Ru(r,e,t,n){var i=r.data;r.partial;var a=on(r,["data","partial"]),u=L(L({data:i},a),{client:n,observable:t,variables:t.variables,called:r!==Pg&&r!==Ng,previousData:e});return u}function L1(r,e,t){return r.partial&&t&&!r.loading&&(!r.data||Object.keys(r.data).length===0)&&e.options.fetchPolicy!=="cache-only"?(e.refetch(),L(L({},r),{loading:!0,networkStatus:kt.refetch})):r}var Pg=Js({loading:!0,data:void 0,error:void 0,networkStatus:kt.loading}),Ng=Js({loading:!1,data:void 0,error:void 0,networkStatus:kt.ready});function q1(r){return{refetch:r.refetch.bind(r),reobserve:r.reobserve.bind(r),fetchMore:r.fetchMore.bind(r),updateQuery:r.updateQuery.bind(r),startPolling:r.startPolling.bind(r),stopPolling:r.stopPolling.bind(r),subscribeToMore:r.subscribeToMore.bind(r)}}var j1=["refetch","reobserve","fetchMore","updateQuery","startPolling","stopPolling","subscribeToMore"];function U1(r,e){var t,n=ct.useRef(),i=ct.useRef(),a=ct.useRef(),u=zi(e,n.current||{}),c=(t=u==null?void 0:u.query)!==null&&t!==void 0?t:r;i.current=e,a.current=c;var f=L(L({},u),{skip:!n.current}),h=N1(c,f),d=h.obsQueryFields,y=h.result,g=h.client,m=h.resultData,b=h.observable,I=h.onQueryExecuted,x=b.options.initialFetchPolicy||Lf(f.defaultOptions,g.defaultOptions),_=ct.useReducer(function(X){return X+1},0)[1],A=ct.useMemo(function(){for(var X={},fe=function(Ne){var Ce=d[Ne];X[Ne]=function(){return n.current||(n.current=Object.create(null),_()),Ce.apply(this,arguments)}},oe=0,Ie=j1;oe<Ie.length;oe++){var ye=Ie[oe];fe(ye)}return X},[_,d]),P=!!n.current,M=ct.useMemo(function(){return L(L(L({},y),A),{called:P})},[y,A,P]),U=ct.useCallback(function(X){n.current=X?L(L({},X),{fetchPolicy:X.fetchPolicy||x}):{fetchPolicy:x};var fe=zi(i.current,L({query:a.current},n.current)),oe=$1(m,b,g,c,L(L({},fe),{skip:!1}),I).then(function(Ie){return Object.assign(Ie,A)});return oe.catch(function(){}),oe},[g,c,A,x,b,m,I]),W=ct.useRef(U);Mf(function(){W.current=U});var K=ct.useCallback(function(){for(var X=[],fe=0;fe<arguments.length;fe++)X[fe]=arguments[fe];return W.current.apply(W,X)},[]);return[K,M]}function $1(r,e,t,n,i,a){var u=i.query||n,c=kg(t,u,i,!1)(e),f=e.reobserveAsConcast(Df(e,t,i,c));return a(c),new Promise(function(h){var d;f.subscribe({next:function(y){d=y},error:function(){h(Ru(e.getCurrentResult(),r.previousData,e,t))},complete:function(){h(Ru(d,r.previousData,e,t))}})})}function B1(r,e){e===void 0&&(e=Object.create(null));var t=ct.useRef(!1),n=_g(e.client);Tg(r,ui.Subscription),t.current||(t.current=!0,e.onSubscriptionData&&globalThis.__DEV__!==!1&&je.warn(e.onData?53:54),e.onSubscriptionComplete&&globalThis.__DEV__!==!1&&je.warn(e.onComplete?55:56));var i=e.skip,a=e.fetchPolicy,u=e.errorPolicy,c=e.shouldResubscribe,f=e.context,h=e.extensions,d=e.ignoreResults,y=I1(function(){return e.variables},[e.variables]),g=function(){return V1(n,r,y,a,u,f,h)},m=ct.useState(e.skip?null:g),b=m[0],I=m[1],x=ct.useRef(g);Mf(function(){x.current=g}),i?b&&I(b=null):(!b||(n!==b.__.client||r!==b.__.query||a!==b.__.fetchPolicy||u!==b.__.errorPolicy||!Ft(y,b.__.variables))&&(typeof c=="function"?!!c(e):c)!==!1)&&I(b=g());var _=ct.useRef(e);ct.useEffect(function(){_.current=e});var A=!i&&!d,P=ct.useMemo(function(){return{loading:A,error:void 0,data:void 0,variables:y}},[A,y]),M=ct.useRef(d);Mf(function(){M.current=d});var U=Sg(ct.useCallback(function(K){if(!b)return function(){};var X=!1,fe=b.__.variables,oe=b.__.client,Ie=b.subscribe({next:function(ye){var Ne,Ce;if(!X){var ge={loading:!1,data:ye.data,error:Cg(ye),variables:fe};b.__.setResult(ge),M.current||K(),ge.error?(Ce=(Ne=_.current).onError)===null||Ce===void 0||Ce.call(Ne,ge.error):_.current.onData?_.current.onData({client:oe,data:ge}):_.current.onSubscriptionData&&_.current.onSubscriptionData({client:oe,subscriptionData:ge})}},error:function(ye){var Ne,Ce;ye=ye instanceof yn?ye:new yn({protocolErrors:[ye]}),X||(b.__.setResult({loading:!1,data:void 0,error:ye,variables:fe}),M.current||K(),(Ce=(Ne=_.current).onError)===null||Ce===void 0||Ce.call(Ne,ye))},complete:function(){X||(_.current.onComplete?_.current.onComplete():_.current.onSubscriptionComplete&&_.current.onSubscriptionComplete())}});return function(){X=!0,setTimeout(function(){Ie.unsubscribe()})}},[b]),function(){return b&&!i&&!d?b.__.result:P},function(){return P}),W=ct.useCallback(function(){je(!_.current.skip,57),I(x.current())},[_,x]);return ct.useMemo(function(){return L(L({},U),{restart:W})},[U,W])}function V1(r,e,t,n,i,a,u){var c={query:e,variables:t,fetchPolicy:n,errorPolicy:i,context:a,extensions:u},f=L(L({},c),{client:r,result:{loading:!0,data:void 0,error:void 0,variables:t},setResult:function(d){f.result=d}}),h=null;return Object.assign(new Nt(function(d){h||(h=r.subscribe(c));var y=h.subscribe(d);return function(){return y.unsubscribe()}}),{__:f})}class Os extends Error{}class W1 extends Os{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class z1 extends Os{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class H1 extends Os{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class ea extends Os{}class Rg extends Os{constructor(e){super(`Invalid unit ${e}`)}}class Wr extends Os{}class Ji extends Os{constructor(){super("Zone is an abstract class")}}const Ae="numeric",Kn="short",gn="long",Mu={year:Ae,month:Ae,day:Ae},Mg={year:Ae,month:Kn,day:Ae},G1={year:Ae,month:Kn,day:Ae,weekday:Kn},Dg={year:Ae,month:gn,day:Ae},Fg={year:Ae,month:gn,day:Ae,weekday:gn},Lg={hour:Ae,minute:Ae},qg={hour:Ae,minute:Ae,second:Ae},jg={hour:Ae,minute:Ae,second:Ae,timeZoneName:Kn},Ug={hour:Ae,minute:Ae,second:Ae,timeZoneName:gn},$g={hour:Ae,minute:Ae,hourCycle:"h23"},Bg={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23"},Vg={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23",timeZoneName:Kn},Wg={hour:Ae,minute:Ae,second:Ae,hourCycle:"h23",timeZoneName:gn},zg={year:Ae,month:Ae,day:Ae,hour:Ae,minute:Ae},Hg={year:Ae,month:Ae,day:Ae,hour:Ae,minute:Ae,second:Ae},Gg={year:Ae,month:Kn,day:Ae,hour:Ae,minute:Ae},Qg={year:Ae,month:Kn,day:Ae,hour:Ae,minute:Ae,second:Ae},Q1={year:Ae,month:Kn,day:Ae,weekday:Kn,hour:Ae,minute:Ae},Jg={year:Ae,month:gn,day:Ae,hour:Ae,minute:Ae,timeZoneName:Kn},Yg={year:Ae,month:gn,day:Ae,hour:Ae,minute:Ae,second:Ae,timeZoneName:Kn},Kg={year:Ae,month:gn,day:Ae,weekday:gn,hour:Ae,minute:Ae,timeZoneName:gn},Zg={year:Ae,month:gn,day:Ae,weekday:gn,hour:Ae,minute:Ae,second:Ae,timeZoneName:gn};class co{get type(){throw new Ji}get name(){throw new Ji}get ianaName(){return this.name}get isUniversal(){throw new Ji}offsetName(e,t){throw new Ji}formatOffset(e,t){throw new Ji}offset(e){throw new Ji}equals(e){throw new Ji}get isValid(){throw new Ji}}let qf=null;class Du extends co{static get instance(){return qf===null&&(qf=new Du),qf}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Sv(e,t,n)}formatOffset(e,t){return po(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let Fu={};function J1(r){return Fu[r]||(Fu[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Fu[r]}const Y1={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function K1(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,a,u,c,f,h,d]=n;return[u,i,a,c,f,h,d]}function Z1(r,e){const t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){const{type:a,value:u}=t[i],c=Y1[a];a==="era"?n[c]=u:rt(c)||(n[c]=parseInt(u,10))}return n}let Lu={};class bi extends co{static create(e){return Lu[e]||(Lu[e]=new bi(e)),Lu[e]}static resetCache(){Lu={},Fu={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=bi.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return Sv(e,t,n,this.name)}formatOffset(e,t){return po(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=J1(this.name);let[i,a,u,c,f,h,d]=n.formatToParts?Z1(n,t):K1(n,t);c==="BC"&&(i=-Math.abs(i)+1);const g=Bu({year:i,month:a,day:u,hour:f===24?0:f,minute:h,second:d,millisecond:0});let m=+t;const b=m%1e3;return m-=b>=0?b:1e3+b,(g-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Xg={};function X1(r,e={}){const t=JSON.stringify([r,e]);let n=Xg[t];return n||(n=new Intl.ListFormat(r,e),Xg[t]=n),n}let jf={};function Uf(r,e={}){const t=JSON.stringify([r,e]);let n=jf[t];return n||(n=new Intl.DateTimeFormat(r,e),jf[t]=n),n}let $f={};function eT(r,e={}){const t=JSON.stringify([r,e]);let n=$f[t];return n||(n=new Intl.NumberFormat(r,e),$f[t]=n),n}let Bf={};function tT(r,e={}){const{base:t,...n}=e,i=JSON.stringify([r,n]);let a=Bf[i];return a||(a=new Intl.RelativeTimeFormat(r,e),Bf[i]=a),a}let lo=null;function rT(){return lo||(lo=new Intl.DateTimeFormat().resolvedOptions().locale,lo)}let ev={};function nT(r){let e=ev[r];if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,ev[r]=e}return e}function iT(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=Uf(r).resolvedOptions(),i=r}catch{const f=r.substring(0,t);n=Uf(f).resolvedOptions(),i=f}const{numberingSystem:a,calendar:u}=n;return[i,a,u]}}function sT(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function aT(r){const e=[];for(let t=1;t<=12;t++){const n=nt.utc(2009,t,1);e.push(r(n))}return e}function oT(r){const e=[];for(let t=1;t<=7;t++){const n=nt.utc(2016,11,13+t);e.push(r(n))}return e}function qu(r,e,t,n){const i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function uT(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||new Intl.DateTimeFormat(r.intl).resolvedOptions().numberingSystem==="latn"}class cT{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:a,...u}=n;if(!t||Object.keys(u).length>0){const c={useGrouping:!1,...n};n.padTo>0&&(c.minimumIntegerDigits=n.padTo),this.inf=eT(e,c)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Yf(e,3);return xr(t,this.padTo)}}}class lT{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const u=-1*(e.offset/60),c=u>=0?`Etc/GMT+${u}`:`Etc/GMT${u}`;e.offset!==0&&bi.create(c).valid?(i=c,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=Uf(t,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class fT{constructor(e,t,n){this.opts={style:"long",...n},!t&&bv()&&(this.rtf=tT(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):MT(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const hT={firstDay:1,minimalDays:4,weekend:[6,7]};class Lt{static fromOpts(e){return Lt.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,a=!1){const u=e||fr.defaultLocale,c=u||(a?"en-US":rT()),f=t||fr.defaultNumberingSystem,h=n||fr.defaultOutputCalendar,d=Qf(i)||fr.defaultWeekSettings;return new Lt(c,f,h,d,u)}static resetCache(){lo=null,jf={},$f={},Bf={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return Lt.create(e,t,n,i)}constructor(e,t,n,i,a){const[u,c,f]=iT(e);this.locale=u,this.numberingSystem=t||c||null,this.outputCalendar=n||f||null,this.weekSettings=i,this.intl=sT(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=uT(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:Lt.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Qf(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return qu(this,e,Tv,()=>{const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=aT(a=>this.extract(a,n,"month"))),this.monthsCache[i][e]})}weekdays(e,t=!1){return qu(this,e,Iv,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=oT(a=>this.extract(a,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return qu(this,void 0,()=>Cv,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[nt.utc(2016,11,13,9),nt.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return qu(this,e,Pv,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[nt.utc(-40,1,1),nt.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const i=this.dtFormatter(e,t),a=i.formatToParts(),u=a.find(c=>c.type.toLowerCase()===n);return u?u.value:null}numberFormatter(e={}){return new cT(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new lT(e,this.intl,t)}relFormatter(e={}){return new fT(this.intl,this.isEnglish(),e)}listFormatter(e={}){return X1(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:wv()?nT(this.locale):hT}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Vf=null;class Zr extends co{static get utcInstance(){return Vf===null&&(Vf=new Zr(0)),Vf}static instance(e){return e===0?Zr.utcInstance:new Zr(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Zr(Vu(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${po(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${po(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return po(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class dT extends co{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Yi(r,e){if(rt(r)||r===null)return e;if(r instanceof co)return r;if(bT(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Du.instance:t==="utc"||t==="gmt"?Zr.utcInstance:Zr.parseSpecifier(t)||bi.create(r)}else return Ki(r)?Zr.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new dT(r)}const Wf={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tv={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},pT=Wf.hanidec.replace(/[\[|\]]/g,"").split("");function mT(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Wf.hanidec)!==-1)e+=pT.indexOf(r[t]);else for(const i in tv){const[a,u]=tv[i];n>=a&&n<=u&&(e+=n-a)}}return parseInt(e,10)}else return e}let ta={};function yT(){ta={}}function Zn({numberingSystem:r},e=""){const t=r||"latn";return ta[t]||(ta[t]={}),ta[t][e]||(ta[t][e]=new RegExp(`${Wf[t]}${e}`)),ta[t][e]}let rv=()=>Date.now(),nv="system",iv=null,sv=null,av=null,ov=60,uv,cv=null;class fr{static get now(){return rv}static set now(e){rv=e}static set defaultZone(e){nv=e}static get defaultZone(){return Yi(nv,Du.instance)}static get defaultLocale(){return iv}static set defaultLocale(e){iv=e}static get defaultNumberingSystem(){return sv}static set defaultNumberingSystem(e){sv=e}static get defaultOutputCalendar(){return av}static set defaultOutputCalendar(e){av=e}static get defaultWeekSettings(){return cv}static set defaultWeekSettings(e){cv=Qf(e)}static get twoDigitCutoffYear(){return ov}static set twoDigitCutoffYear(e){ov=e%100}static get throwOnInvalid(){return uv}static set throwOnInvalid(e){uv=e}static resetCaches(){Lt.resetCache(),bi.resetCache(),nt.resetCache(),yT()}}class Xn{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const lv=[0,31,59,90,120,151,181,212,243,273,304,334],fv=[0,31,60,91,121,152,182,213,244,274,305,335];function Mn(r,e){return new Xn("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function zf(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return i===0?7:i}function hv(r,e,t){return t+(fo(r)?fv:lv)[e-1]}function dv(r,e){const t=fo(r)?fv:lv,n=t.findIndex(a=>a<e),i=e-t[n];return{month:n+1,day:i}}function Hf(r,e){return(r-e+7)%7+1}function ju(r,e=4,t=1){const{year:n,month:i,day:a}=r,u=hv(n,i,a),c=Hf(zf(n,i,a),t);let f=Math.floor((u-c+14-e)/7),h;return f<1?(h=n-1,f=ho(h,e,t)):f>ho(n,e,t)?(h=n+1,f=1):h=n,{weekYear:h,weekNumber:f,weekday:c,...zu(r)}}function pv(r,e=4,t=1){const{weekYear:n,weekNumber:i,weekday:a}=r,u=Hf(zf(n,1,e),t),c=na(n);let f=i*7+a-u-7+e,h;f<1?(h=n-1,f+=na(h)):f>c?(h=n+1,f-=na(n)):h=n;const{month:d,day:y}=dv(h,f);return{year:h,month:d,day:y,...zu(r)}}function Gf(r){const{year:e,month:t,day:n}=r,i=hv(e,t,n);return{year:e,ordinal:i,...zu(r)}}function mv(r){const{year:e,ordinal:t}=r,{month:n,day:i}=dv(e,t);return{year:e,month:n,day:i,...zu(r)}}function yv(r,e){if(!rt(r.localWeekday)||!rt(r.localWeekNumber)||!rt(r.localWeekYear)){if(!rt(r.weekday)||!rt(r.weekNumber)||!rt(r.weekYear))throw new ea("Cannot mix locale-based week fields with ISO-based week fields");return rt(r.localWeekday)||(r.weekday=r.localWeekday),rt(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),rt(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gT(r,e=4,t=1){const n=Uu(r.weekYear),i=Dn(r.weekNumber,1,ho(r.weekYear,e,t)),a=Dn(r.weekday,1,7);return n?i?a?!1:Mn("weekday",r.weekday):Mn("week",r.weekNumber):Mn("weekYear",r.weekYear)}function vT(r){const e=Uu(r.year),t=Dn(r.ordinal,1,na(r.year));return e?t?!1:Mn("ordinal",r.ordinal):Mn("year",r.year)}function gv(r){const e=Uu(r.year),t=Dn(r.month,1,12),n=Dn(r.day,1,$u(r.year,r.month));return e?t?n?!1:Mn("day",r.day):Mn("month",r.month):Mn("year",r.year)}function vv(r){const{hour:e,minute:t,second:n,millisecond:i}=r,a=Dn(e,0,23)||e===24&&t===0&&n===0&&i===0,u=Dn(t,0,59),c=Dn(n,0,59),f=Dn(i,0,999);return a?u?c?f?!1:Mn("millisecond",i):Mn("second",n):Mn("minute",t):Mn("hour",e)}function rt(r){return typeof r>"u"}function Ki(r){return typeof r=="number"}function Uu(r){return typeof r=="number"&&r%1===0}function bT(r){return typeof r=="string"}function wT(r){return Object.prototype.toString.call(r)==="[object Date]"}function bv(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function wv(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function _T(r){return Array.isArray(r)?r:[r]}function _v(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{const a=[e(i),i];return n&&t(n[0],a[0])===n[0]?n:a},null)[1]}function xT(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function ra(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Qf(r){if(r==null)return null;if(typeof r!="object")throw new Wr("Week settings must be an object");if(!Dn(r.firstDay,1,7)||!Dn(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!Dn(e,1,7)))throw new Wr("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function Dn(r,e,t){return Uu(r)&&r>=e&&r<=t}function ST(r,e){return r-e*Math.floor(r/e)}function xr(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function Zi(r){if(!(rt(r)||r===null||r===""))return parseInt(r,10)}function Ts(r){if(!(rt(r)||r===null||r===""))return parseFloat(r)}function Jf(r){if(!(rt(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function Yf(r,e,t=!1){const n=10**e;return(t?Math.trunc:Math.round)(r*n)/n}function fo(r){return r%4===0&&(r%100!==0||r%400===0)}function na(r){return fo(r)?366:365}function $u(r,e){const t=ST(e-1,12)+1,n=r+(e-t)/12;return t===2?fo(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Bu(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function xv(r,e,t){return-Hf(zf(r,1,e),t)+e-1}function ho(r,e=4,t=1){const n=xv(r,e,t),i=xv(r+1,e,t);return(na(r)-n+i)/7}function Kf(r){return r>99?r:r>fr.twoDigitCutoffYear?1900+r:2e3+r}function Sv(r,e,t,n=null){const i=new Date(r),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(a.timeZone=n);const u={timeZoneName:e,...a},c=new Intl.DateTimeFormat(t,u).formatToParts(i).find(f=>f.type.toLowerCase()==="timezonename");return c?c.value:null}function Vu(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function Ev(r){const e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new Wr(`Invalid unit value ${r}`);return e}function Wu(r,e){const t={};for(const n in r)if(ra(r,n)){const i=r[n];if(i==null)continue;t[e(n)]=Ev(i)}return t}function po(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${xr(t,2)}:${xr(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${xr(t,2)}${xr(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function zu(r){return xT(r,["hour","minute","second","millisecond"])}const ET=["January","February","March","April","May","June","July","August","September","October","November","December"],Ov=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],OT=["J","F","M","A","M","J","J","A","S","O","N","D"];function Tv(r){switch(r){case"narrow":return[...OT];case"short":return[...Ov];case"long":return[...ET];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Av=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],kv=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],TT=["M","T","W","T","F","S","S"];function Iv(r){switch(r){case"narrow":return[...TT];case"short":return[...kv];case"long":return[...Av];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Cv=["AM","PM"],AT=["Before Christ","Anno Domini"],kT=["BC","AD"],IT=["B","A"];function Pv(r){switch(r){case"narrow":return[...IT];case"short":return[...kT];case"long":return[...AT];default:return null}}function CT(r){return Cv[r.hour<12?0:1]}function PT(r,e){return Iv(e)[r.weekday-1]}function NT(r,e){return Tv(e)[r.month-1]}function RT(r,e){return Pv(e)[r.year<0?0:1]}function MT(r,e,t="always",n=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&a){const y=r==="days";switch(e){case 1:return y?"tomorrow":`next ${i[r][0]}`;case-1:return y?"yesterday":`last ${i[r][0]}`;case 0:return y?"today":`this ${i[r][0]}`}}const u=Object.is(e,-0)||e<0,c=Math.abs(e),f=c===1,h=i[r],d=n?f?h[1]:h[2]||h[1]:f?i[r][0]:r;return u?`${c} ${d} ago`:`in ${c} ${d}`}function Nv(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const DT={D:Mu,DD:Mg,DDD:Dg,DDDD:Fg,t:Lg,tt:qg,ttt:jg,tttt:Ug,T:$g,TT:Bg,TTT:Vg,TTTT:Wg,f:zg,ff:Gg,fff:Jg,ffff:Kg,F:Hg,FF:Qg,FFF:Yg,FFFF:Zg};class zr{static create(e,t={}){return new zr(e,t)}static parseFormat(e){let t=null,n="",i=!1;const a=[];for(let u=0;u<e.length;u++){const c=e.charAt(u);c==="'"?(n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),t=null,n="",i=!i):i||c===t?n+=c:(n.length>0&&a.push({literal:/^\s+$/.test(n),val:n}),n=c,t=c)}return n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),a}static macroTokenToFormatOpts(e){return DT[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return xr(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(m,b)=>this.loc.extract(e,m,b),u=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",c=()=>n?CT(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),f=(m,b)=>n?NT(e,m):a(b?{month:m}:{month:m,day:"numeric"},"month"),h=(m,b)=>n?PT(e,m):a(b?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),d=m=>{const b=zr.macroTokenToFormatOpts(m);return b?this.formatWithSystemDefault(e,b):m},y=m=>n?RT(e,m):a({era:m},"era"),g=m=>{switch(m){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return u({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return u({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return u({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return c();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return f("short",!0);case"LLLL":return f("long",!0);case"LLLLL":return f("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return f("short",!1);case"MMMM":return f("long",!1);case"MMMMM":return f("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return y("short");case"GG":return y("long");case"GGGGG":return y("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(m)}};return Nv(zr.parseFormat(t),g)}formatDurationFromString(e,t){const n=f=>{switch(f[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=f=>h=>{const d=n(h);return d?this.num(f.get(d),h.length):h},a=zr.parseFormat(t),u=a.reduce((f,{literal:h,val:d})=>h?f:f.concat(d),[]),c=e.shiftTo(...u.map(n).filter(f=>f));return Nv(a,i(c))}}const Rv=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ia(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function sa(...r){return e=>r.reduce(([t,n,i],a)=>{const[u,c,f]=a(e,i);return[{...t,...u},c||n,f]},[{},null,1]).slice(0,2)}function aa(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const i=t.exec(r);if(i)return n(i)}return[null,null]}function Mv(...r){return(e,t)=>{const n={};let i;for(i=0;i<r.length;i++)n[r[i]]=Zi(e[t+i]);return[n,null,t+i]}}const Dv=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,FT=`(?:${Dv.source}?(?:\\[(${Rv.source})\\])?)?`,Zf=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Fv=RegExp(`${Zf.source}${FT}`),Xf=RegExp(`(?:T${Fv.source})?`),LT=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,qT=/(\d{4})-?W(\d\d)(?:-?(\d))?/,jT=/(\d{4})-?(\d{3})/,UT=Mv("weekYear","weekNumber","weekDay"),$T=Mv("year","ordinal"),BT=/(\d{4})-(\d\d)-(\d\d)/,Lv=RegExp(`${Zf.source} ?(?:${Dv.source}|(${Rv.source}))?`),VT=RegExp(`(?: ${Lv.source})?`);function oa(r,e,t){const n=r[e];return rt(n)?t:Zi(n)}function WT(r,e){return[{year:oa(r,e),month:oa(r,e+1,1),day:oa(r,e+2,1)},null,e+3]}function ua(r,e){return[{hours:oa(r,e,0),minutes:oa(r,e+1,0),seconds:oa(r,e+2,0),milliseconds:Jf(r[e+3])},null,e+4]}function mo(r,e){const t=!r[e]&&!r[e+1],n=Vu(r[e+1],r[e+2]),i=t?null:Zr.instance(n);return[{},i,e+3]}function yo(r,e){const t=r[e]?bi.create(r[e]):null;return[{},t,e+1]}const zT=RegExp(`^T?${Zf.source}$`),HT=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function GT(r){const[e,t,n,i,a,u,c,f,h]=r,d=e[0]==="-",y=f&&f[0]==="-",g=(m,b=!1)=>m!==void 0&&(b||m&&d)?-m:m;return[{years:g(Ts(t)),months:g(Ts(n)),weeks:g(Ts(i)),days:g(Ts(a)),hours:g(Ts(u)),minutes:g(Ts(c)),seconds:g(Ts(f),f==="-0"),milliseconds:g(Jf(h),y)}]}const QT={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function eh(r,e,t,n,i,a,u){const c={year:e.length===2?Kf(Zi(e)):Zi(e),month:Ov.indexOf(t)+1,day:Zi(n),hour:Zi(i),minute:Zi(a)};return u&&(c.second=Zi(u)),r&&(c.weekday=r.length>3?Av.indexOf(r)+1:kv.indexOf(r)+1),c}const JT=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function YT(r){const[,e,t,n,i,a,u,c,f,h,d,y]=r,g=eh(e,i,n,t,a,u,c);let m;return f?m=QT[f]:h?m=0:m=Vu(d,y),[g,new Zr(m)]}function KT(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const ZT=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,XT=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,eA=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function qv(r){const[,e,t,n,i,a,u,c]=r;return[eh(e,i,n,t,a,u,c),Zr.utcInstance]}function tA(r){const[,e,t,n,i,a,u,c]=r;return[eh(e,c,t,n,i,a,u),Zr.utcInstance]}const rA=ia(LT,Xf),nA=ia(qT,Xf),iA=ia(jT,Xf),sA=ia(Fv),jv=sa(WT,ua,mo,yo),aA=sa(UT,ua,mo,yo),oA=sa($T,ua,mo,yo),uA=sa(ua,mo,yo);function cA(r){return aa(r,[rA,jv],[nA,aA],[iA,oA],[sA,uA])}function lA(r){return aa(KT(r),[JT,YT])}function fA(r){return aa(r,[ZT,qv],[XT,qv],[eA,tA])}function hA(r){return aa(r,[HT,GT])}const dA=sa(ua);function pA(r){return aa(r,[zT,dA])}const mA=ia(BT,VT),yA=ia(Lv),gA=sa(ua,mo,yo);function vA(r){return aa(r,[mA,jv],[yA,gA])}const Uv="Invalid Duration",$v={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},bA={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...$v},Fn=146097/400,ca=146097/4800,wA={years:{quarters:4,months:12,weeks:Fn/7,days:Fn,hours:Fn*24,minutes:Fn*24*60,seconds:Fn*24*60*60,milliseconds:Fn*24*60*60*1e3},quarters:{months:3,weeks:Fn/28,days:Fn/4,hours:Fn*24/4,minutes:Fn*24*60/4,seconds:Fn*24*60*60/4,milliseconds:Fn*24*60*60*1e3/4},months:{weeks:ca/7,days:ca,hours:ca*24,minutes:ca*24*60,seconds:ca*24*60*60,milliseconds:ca*24*60*60*1e3},...$v},As=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],_A=As.slice(0).reverse();function Xi(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new It(n)}function Bv(r,e){let t=e.milliseconds??0;for(const n of _A.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function Vv(r,e){const t=Bv(r,e)<0?-1:1;As.reduceRight((n,i)=>{if(rt(e[i]))return n;if(n){const a=e[n]*t,u=r[i][n],c=Math.floor(a/u);e[i]+=c*t,e[n]-=c*u*t}return i},null),As.reduce((n,i)=>{if(rt(e[i]))return n;if(n){const a=e[n]%1;e[n]-=a,e[i]+=a*r[n][i]}return i},null)}function xA(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class It{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?wA:bA;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Lt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return It.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Wr(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new It({values:Wu(e,It.normalizeUnit),loc:Lt.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ki(e))return It.fromMillis(e);if(It.isDuration(e))return e;if(typeof e=="object")return It.fromObject(e);throw new Wr(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=hA(e);return n?It.fromObject(n,t):It.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=pA(e);return n?It.fromObject(n,t):It.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Wr("need to specify a reason the Duration is invalid");const n=e instanceof Xn?e:new Xn(e,t);if(fr.throwOnInvalid)throw new H1(n);return new It({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new Rg(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?zr.create(this.loc,n).formatDurationFromString(this,e):Uv}toHuman(e={}){if(!this.isValid)return Uv;const t=As.map(n=>{const i=this.values[n];return rt(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Yf(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},nt.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Bv(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=It.fromDurationLike(e),n={};for(const i of As)(ra(t.values,i)||ra(this.values,i))&&(n[i]=t.get(i)+this.get(i));return Xi(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=It.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=Ev(e(this.values[n],n));return Xi(this,{values:t},!0)}get(e){return this[It.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...Wu(e,It.normalizeUnit)};return Xi(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){const u={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return Xi(this,u)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Vv(this.matrix,e),Xi(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=xA(this.normalize().shiftToAll().toObject());return Xi(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(u=>It.normalizeUnit(u));const t={},n={},i=this.toObject();let a;for(const u of As)if(e.indexOf(u)>=0){a=u;let c=0;for(const h in n)c+=this.matrix[h][u]*n[h],n[h]=0;Ki(i[u])&&(c+=i[u]);const f=Math.trunc(c);t[u]=f,n[u]=(c*1e3-f*1e3)/1e3}else Ki(i[u])&&(n[u]=i[u]);for(const u in n)n[u]!==0&&(t[a]+=u===a?n[u]:n[u]/this.matrix[a][u]);return Vv(this.matrix,t),Xi(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Xi(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(const n of As)if(!t(this.values[n],e.values[n]))return!1;return!0}}const la="Invalid Interval";function SA(r,e){return!r||!r.isValid?hr.invalid("missing or invalid start"):!e||!e.isValid?hr.invalid("missing or invalid end"):e<r?hr.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class hr{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Wr("need to specify a reason the Interval is invalid");const n=e instanceof Xn?e:new Xn(e,t);if(fr.throwOnInvalid)throw new z1(n);return new hr({invalid:n})}static fromDateTimes(e,t){const n=vo(e),i=vo(t),a=SA(n,i);return a??new hr({start:n,end:i})}static after(e,t){const n=It.fromDurationLike(t),i=vo(e);return hr.fromDateTimes(i,i.plus(n))}static before(e,t){const n=It.fromDurationLike(t),i=vo(e);return hr.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const[n,i]=(e||"").split("/",2);if(n&&i){let a,u;try{a=nt.fromISO(n,t),u=a.isValid}catch{u=!1}let c,f;try{c=nt.fromISO(i,t),f=c.isValid}catch{f=!1}if(u&&f)return hr.fromDateTimes(a,c);if(u){const h=It.fromISO(i,t);if(h.isValid)return hr.after(a,h)}else if(f){const h=It.fromISO(n,t);if(h.isValid)return hr.before(c,h)}}return hr.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?hr.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(vo).filter(u=>this.contains(u)).sort((u,c)=>u.toMillis()-c.toMillis()),n=[];let{s:i}=this,a=0;for(;i<this.e;){const u=t[a]||this.e,c=+u>+this.e?this.e:u;n.push(hr.fromDateTimes(i,c)),i=c,a+=1}return n}splitBy(e){const t=It.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,a;const u=[];for(;n<this.e;){const c=this.start.plus(t.mapUnits(f=>f*i));a=+c>+this.e?this.e:c,u.push(hr.fromDateTimes(n,a)),n=a,i+=1}return u}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:hr.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return hr.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],u)=>a?a.overlaps(u)||a.abutsStart(u)?[i,a.union(u)]:[i.concat([a]),u]:[i,u],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],a=e.map(f=>[{time:f.s,type:"s"},{time:f.e,type:"e"}]),u=Array.prototype.concat(...a),c=u.sort((f,h)=>f.time-h.time);for(const f of c)n+=f.type==="s"?1:-1,n===1?t=f.time:(t&&+t!=+f.time&&i.push(hr.fromDateTimes(t,f.time)),t=null);return hr.merge(i)}difference(...e){return hr.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:la}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Mu,t={}){return this.isValid?zr.create(this.s.loc.clone(t),e).formatInterval(this):la}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:la}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:la}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:la}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:la}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):It.invalid(this.invalidReason)}mapEndpoints(e){return hr.fromDateTimes(e(this.s),e(this.e))}}class Hu{static hasDST(e=fr.defaultZone){const t=nt.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return bi.isValidZone(e)}static normalizeZone(e){return Yi(e,fr.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Lt.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Lt.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Lt.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Lt.create(t,n,a)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Lt.create(t,n,a)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Lt.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Lt.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Lt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Lt.create(t,null,"gregory").eras(e)}static features(){return{relative:bv(),localeWeek:wv()}}}function Wv(r,e){const t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(It.fromMillis(n).as("days"))}function EA(r,e,t){const n=[["years",(f,h)=>h.year-f.year],["quarters",(f,h)=>h.quarter-f.quarter+(h.year-f.year)*4],["months",(f,h)=>h.month-f.month+(h.year-f.year)*12],["weeks",(f,h)=>{const d=Wv(f,h);return(d-d%7)/7}],["days",Wv]],i={},a=r;let u,c;for(const[f,h]of n)t.indexOf(f)>=0&&(u=f,i[f]=h(r,e),c=a.plus(i),c>e?(i[f]--,r=a.plus(i),r>e&&(c=r,i[f]--,r=a.plus(i))):r=c);return[r,i,c,u]}function OA(r,e,t,n){let[i,a,u,c]=EA(r,e,t);const f=e-i,h=t.filter(y=>["hours","minutes","seconds","milliseconds"].indexOf(y)>=0);h.length===0&&(u<e&&(u=i.plus({[c]:1})),u!==i&&(a[c]=(a[c]||0)+f/(u-i)));const d=It.fromObject(a,n);return h.length>0?It.fromMillis(f,n).shiftTo(...h).plus(d):d}const TA="missing Intl.DateTimeFormat.formatToParts support";function Rt(r,e=t=>t){return{regex:r,deser:([t])=>e(mT(t))}}const zv="[ ]",Hv=new RegExp(zv,"g");function AA(r){return r.replace(/\./g,"\\.?").replace(Hv,zv)}function Gv(r){return r.replace(/\./g,"").replace(Hv," ").toLowerCase()}function ei(r,e){return r===null?null:{regex:RegExp(r.map(AA).join("|")),deser:([t])=>r.findIndex(n=>Gv(t)===Gv(n))+e}}function Qv(r,e){return{regex:r,deser:([,t,n])=>Vu(t,n),groups:e}}function Gu(r){return{regex:r,deser:([e])=>e}}function kA(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function IA(r,e){const t=Zn(e),n=Zn(e,"{2}"),i=Zn(e,"{3}"),a=Zn(e,"{4}"),u=Zn(e,"{6}"),c=Zn(e,"{1,2}"),f=Zn(e,"{1,3}"),h=Zn(e,"{1,6}"),d=Zn(e,"{1,9}"),y=Zn(e,"{2,4}"),g=Zn(e,"{4,6}"),m=x=>({regex:RegExp(kA(x.val)),deser:([_])=>_,literal:!0}),I=(x=>{if(r.literal)return m(x);switch(x.val){case"G":return ei(e.eras("short"),0);case"GG":return ei(e.eras("long"),0);case"y":return Rt(h);case"yy":return Rt(y,Kf);case"yyyy":return Rt(a);case"yyyyy":return Rt(g);case"yyyyyy":return Rt(u);case"M":return Rt(c);case"MM":return Rt(n);case"MMM":return ei(e.months("short",!0),1);case"MMMM":return ei(e.months("long",!0),1);case"L":return Rt(c);case"LL":return Rt(n);case"LLL":return ei(e.months("short",!1),1);case"LLLL":return ei(e.months("long",!1),1);case"d":return Rt(c);case"dd":return Rt(n);case"o":return Rt(f);case"ooo":return Rt(i);case"HH":return Rt(n);case"H":return Rt(c);case"hh":return Rt(n);case"h":return Rt(c);case"mm":return Rt(n);case"m":return Rt(c);case"q":return Rt(c);case"qq":return Rt(n);case"s":return Rt(c);case"ss":return Rt(n);case"S":return Rt(f);case"SSS":return Rt(i);case"u":return Gu(d);case"uu":return Gu(c);case"uuu":return Rt(t);case"a":return ei(e.meridiems(),0);case"kkkk":return Rt(a);case"kk":return Rt(y,Kf);case"W":return Rt(c);case"WW":return Rt(n);case"E":case"c":return Rt(t);case"EEE":return ei(e.weekdays("short",!1),1);case"EEEE":return ei(e.weekdays("long",!1),1);case"ccc":return ei(e.weekdays("short",!0),1);case"cccc":return ei(e.weekdays("long",!0),1);case"Z":case"ZZ":return Qv(new RegExp(`([+-]${c.source})(?::(${n.source}))?`),2);case"ZZZ":return Qv(new RegExp(`([+-]${c.source})(${n.source})?`),2);case"z":return Gu(/[a-z_+-/]{1,256}?/i);case" ":return Gu(/[^\S\n\r]/);default:return m(x)}})(r)||{invalidReason:TA};return I.token=r,I}const CA={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function PA(r,e,t){const{type:n,value:i}=r;if(n==="literal"){const f=/^\s+$/.test(i);return{literal:!f,val:f?" ":i}}const a=e[n];let u=n;n==="hour"&&(e.hour12!=null?u=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?u="hour12":u="hour24":u=t.hour12?"hour12":"hour24");let c=CA[u];if(typeof c=="object"&&(c=c[a]),c)return{literal:!1,val:c}}function NA(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function RA(r,e,t){const n=r.match(e);if(n){const i={};let a=1;for(const u in t)if(ra(t,u)){const c=t[u],f=c.groups?c.groups+1:1;!c.literal&&c.token&&(i[c.token.val[0]]=c.deser(n.slice(a,a+f))),a+=f}return[n,i]}else return[n,{}]}function MA(r){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,n;return rt(r.z)||(t=bi.create(r.z)),rt(r.Z)||(t||(t=new Zr(r.Z)),n=r.Z),rt(r.q)||(r.M=(r.q-1)*3+1),rt(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),rt(r.u)||(r.S=Jf(r.u)),[Object.keys(r).reduce((a,u)=>{const c=e(u);return c&&(a[c]=r[u]),a},{}),t,n]}let th=null;function DA(){return th||(th=nt.fromMillis(1555555555555)),th}function FA(r,e){if(r.literal)return r;const t=zr.macroTokenToFormatOpts(r.val),n=Zv(t,e);return n==null||n.includes(void 0)?r:n}function Jv(r,e){return Array.prototype.concat(...r.map(t=>FA(t,e)))}class Yv{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Jv(zr.parseFormat(t),e),this.units=this.tokens.map(n=>IA(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,i]=NA(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[t,n]=RA(e,this.regex,this.handlers),[i,a,u]=n?MA(n):[null,null,void 0];if(ra(n,"a")&&ra(n,"H"))throw new ea("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:a,specificOffset:u}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Kv(r,e,t){return new Yv(r,t).explainFromTokens(e)}function LA(r,e,t){const{result:n,zone:i,specificOffset:a,invalidReason:u}=Kv(r,e,t);return[n,i,a,u]}function Zv(r,e){if(!r)return null;const n=zr.create(e,r).dtFormatter(DA()),i=n.formatToParts(),a=n.resolvedOptions();return i.map(u=>PA(u,r,a))}const rh="Invalid DateTime",Xv=864e13;function go(r){return new Xn("unsupported zone",`the zone "${r.name}" is not supported`)}function nh(r){return r.weekData===null&&(r.weekData=ju(r.c)),r.weekData}function ih(r){return r.localWeekData===null&&(r.localWeekData=ju(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function ks(r,e){const t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new nt({...t,...e,old:t})}function e0(r,e,t){let n=r-e*60*1e3;const i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;const a=t.offset(n);return i===a?[n,i]:[r-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Qu(r,e){r+=e*60*1e3;const t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function Ju(r,e,t){return e0(Bu(r),e,t)}function t0(r,e){const t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...r.c,year:n,month:i,day:Math.min(r.c.day,$u(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},u=It.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),c=Bu(a);let[f,h]=e0(c,t,r.zone);return u!==0&&(f+=u,h=r.zone.offset(f)),{ts:f,o:h}}function fa(r,e,t,n,i,a){const{setZone:u,zone:c}=t;if(r&&Object.keys(r).length!==0||e){const f=e||c,h=nt.fromObject(r,{...t,zone:f,specificOffset:a});return u?h:h.setZone(c)}else return nt.invalid(new Xn("unparsable",`the input "${i}" can't be parsed as ${n}`))}function Yu(r,e,t=!0){return r.isValid?zr.create(Lt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function sh(r,e){const t=r.c.year>9999||r.c.year<0;let n="";return t&&r.c.year>=0&&(n+="+"),n+=xr(r.c.year,t?6:4),e?(n+="-",n+=xr(r.c.month),n+="-",n+=xr(r.c.day)):(n+=xr(r.c.month),n+=xr(r.c.day)),n}function r0(r,e,t,n,i,a){let u=xr(r.c.hour);return e?(u+=":",u+=xr(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(u+=":")):u+=xr(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(u+=xr(r.c.second),(r.c.millisecond!==0||!n)&&(u+=".",u+=xr(r.c.millisecond,3))),i&&(r.isOffsetFixed&&r.offset===0&&!a?u+="Z":r.o<0?(u+="-",u+=xr(Math.trunc(-r.o/60)),u+=":",u+=xr(Math.trunc(-r.o%60))):(u+="+",u+=xr(Math.trunc(r.o/60)),u+=":",u+=xr(Math.trunc(r.o%60)))),a&&(u+="["+r.zone.ianaName+"]"),u}const n0={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},qA={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jA={ordinal:1,hour:0,minute:0,second:0,millisecond:0},i0=["year","month","day","hour","minute","second","millisecond"],UA=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],$A=["year","ordinal","hour","minute","second","millisecond"];function BA(r){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[r.toLowerCase()];if(!e)throw new Rg(r);return e}function s0(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return BA(r)}}function VA(r){return Zu[r]||(Ku===void 0&&(Ku=fr.now()),Zu[r]=r.offset(Ku)),Zu[r]}function a0(r,e){const t=Yi(e.zone,fr.defaultZone);if(!t.isValid)return nt.invalid(go(t));const n=Lt.fromObject(e);let i,a;if(rt(r.year))i=fr.now();else{for(const f of i0)rt(r[f])&&(r[f]=n0[f]);const u=gv(r)||vv(r);if(u)return nt.invalid(u);const c=VA(t);[i,a]=Ju(r,c,t)}return new nt({ts:i,zone:t,loc:n,o:a})}function o0(r,e,t){const n=rt(t.round)?!0:t.round,i=(u,c)=>(u=Yf(u,n||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(u,c)),a=u=>t.calendary?e.hasSame(r,u)?0:e.startOf(u).diff(r.startOf(u),u).get(u):e.diff(r,u).get(u);if(t.unit)return i(a(t.unit),t.unit);for(const u of t.units){const c=a(u);if(Math.abs(c)>=1)return i(c,u)}return i(r>e?-0:0,t.units[t.units.length-1])}function u0(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}let Ku,Zu={};class nt{constructor(e){const t=e.zone||fr.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Xn("invalid input"):null)||(t.isValid?null:go(t));this.ts=rt(e.ts)?fr.now():e.ts;let i=null,a=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,a]=[e.old.c,e.old.o];else{const c=Ki(e.o)&&!e.old?e.o:t.offset(this.ts);i=Qu(this.ts,c),n=Number.isNaN(i.year)?new Xn("invalid input"):null,i=n?null:i,a=n?null:c}this._zone=t,this.loc=e.loc||Lt.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new nt({})}static local(){const[e,t]=u0(arguments),[n,i,a,u,c,f,h]=t;return a0({year:n,month:i,day:a,hour:u,minute:c,second:f,millisecond:h},e)}static utc(){const[e,t]=u0(arguments),[n,i,a,u,c,f,h]=t;return e.zone=Zr.utcInstance,a0({year:n,month:i,day:a,hour:u,minute:c,second:f,millisecond:h},e)}static fromJSDate(e,t={}){const n=wT(e)?e.valueOf():NaN;if(Number.isNaN(n))return nt.invalid("invalid input");const i=Yi(t.zone,fr.defaultZone);return i.isValid?new nt({ts:n,zone:i,loc:Lt.fromObject(t)}):nt.invalid(go(i))}static fromMillis(e,t={}){if(Ki(e))return e<-Xv||e>Xv?nt.invalid("Timestamp out of range"):new nt({ts:e,zone:Yi(t.zone,fr.defaultZone),loc:Lt.fromObject(t)});throw new Wr(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Ki(e))return new nt({ts:e*1e3,zone:Yi(t.zone,fr.defaultZone),loc:Lt.fromObject(t)});throw new Wr("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=Yi(t.zone,fr.defaultZone);if(!n.isValid)return nt.invalid(go(n));const i=Lt.fromObject(t),a=Wu(e,s0),{minDaysInFirstWeek:u,startOfWeek:c}=yv(a,i),f=fr.now(),h=rt(t.specificOffset)?n.offset(f):t.specificOffset,d=!rt(a.ordinal),y=!rt(a.year),g=!rt(a.month)||!rt(a.day),m=y||g,b=a.weekYear||a.weekNumber;if((m||d)&&b)throw new ea("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(g&&d)throw new ea("Can't mix ordinal dates with month/day");const I=b||a.weekday&&!m;let x,_,A=Qu(f,h);I?(x=UA,_=qA,A=ju(A,u,c)):d?(x=$A,_=jA,A=Gf(A)):(x=i0,_=n0);let P=!1;for(const oe of x){const Ie=a[oe];rt(Ie)?P?a[oe]=_[oe]:a[oe]=A[oe]:P=!0}const M=I?gT(a,u,c):d?vT(a):gv(a),U=M||vv(a);if(U)return nt.invalid(U);const W=I?pv(a,u,c):d?mv(a):a,[K,X]=Ju(W,h,n),fe=new nt({ts:K,zone:n,o:X,loc:i});return a.weekday&&m&&e.weekday!==fe.weekday?nt.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${fe.toISO()}`):fe.isValid?fe:nt.invalid(fe.invalid)}static fromISO(e,t={}){const[n,i]=cA(e);return fa(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=lA(e);return fa(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=fA(e);return fa(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(rt(e)||rt(t))throw new Wr("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=n,u=Lt.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[c,f,h,d]=LA(u,e,t);return d?nt.invalid(d):fa(c,f,n,`format ${t}`,e,h)}static fromString(e,t,n={}){return nt.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=vA(e);return fa(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Wr("need to specify a reason the DateTime is invalid");const n=e instanceof Xn?e:new Xn(e,t);if(fr.throwOnInvalid)throw new W1(n);return new nt({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=Zv(e,Lt.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return Jv(zr.parseFormat(e),Lt.fromObject(t)).map(i=>i.val).join("")}static resetCache(){Ku=void 0,Zu={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?nh(this).weekYear:NaN}get weekNumber(){return this.isValid?nh(this).weekNumber:NaN}get weekday(){return this.isValid?nh(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ih(this).weekday:NaN}get localWeekNumber(){return this.isValid?ih(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ih(this).weekYear:NaN}get ordinal(){return this.isValid?Gf(this.c).ordinal:NaN}get monthShort(){return this.isValid?Hu.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Hu.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Hu.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Hu.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,n=Bu(this.c),i=this.zone.offset(n-e),a=this.zone.offset(n+e),u=this.zone.offset(n-i*t),c=this.zone.offset(n-a*t);if(u===c)return[this];const f=n-u*t,h=n-c*t,d=Qu(f,u),y=Qu(h,c);return d.hour===y.hour&&d.minute===y.minute&&d.second===y.second&&d.millisecond===y.millisecond?[ks(this,{ts:f}),ks(this,{ts:h})]:[this]}get isInLeapYear(){return fo(this.year)}get daysInMonth(){return $u(this.year,this.month)}get daysInYear(){return this.isValid?na(this.year):NaN}get weeksInWeekYear(){return this.isValid?ho(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ho(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=zr.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(Zr.instance(e),t)}toLocal(){return this.setZone(fr.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Yi(e,fr.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const a=e.offset(this.ts),u=this.toObject();[i]=Ju(u,a,e)}return ks(this,{ts:i,zone:e})}else return nt.invalid(go(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){const i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return ks(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=Wu(e,s0),{minDaysInFirstWeek:n,startOfWeek:i}=yv(t,this.loc),a=!rt(t.weekYear)||!rt(t.weekNumber)||!rt(t.weekday),u=!rt(t.ordinal),c=!rt(t.year),f=!rt(t.month)||!rt(t.day),h=c||f,d=t.weekYear||t.weekNumber;if((h||u)&&d)throw new ea("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new ea("Can't mix ordinal dates with month/day");let y;a?y=pv({...ju(this.c,n,i),...t},n,i):rt(t.ordinal)?(y={...this.toObject(),...t},rt(t.day)&&(y.day=Math.min($u(y.year,y.month),y.day))):y=mv({...Gf(this.c),...t});const[g,m]=Ju(y,this.o,this.zone);return ks(this,{ts:g,o:m})}plus(e){if(!this.isValid)return this;const t=It.fromDurationLike(e);return ks(this,t0(this,t))}minus(e){if(!this.isValid)return this;const t=It.fromDurationLike(e).negate();return ks(this,t0(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},i=It.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(t){const a=this.loc.getStartOfWeek(),{weekday:u}=this;u<a&&(n.weekNumber=this.weekNumber-1),n.weekday=a}else n.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?zr.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):rh}toLocaleString(e=Mu,t={}){return this.isValid?zr.create(this.loc.clone(t),e).formatDateTime(this):rh}toLocaleParts(e={}){return this.isValid?zr.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const u=e==="extended";let c=sh(this,u);return c+="T",c+=r0(this,u,t,n,i,a),c}toISODate({format:e="extended"}={}){return this.isValid?sh(this,e==="extended"):null}toISOWeekDate(){return Yu(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:a=!1,format:u="extended"}={}){return this.isValid?(i?"T":"")+r0(this,u==="extended",t,e,n,a):null}toRFC2822(){return Yu(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Yu(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sh(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),Yu(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():rh}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return It.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},a=_T(t).map(It.normalizeUnit),u=e.valueOf()>this.valueOf(),c=u?this:e,f=u?e:this,h=OA(c,f,a,i);return u?h.negate():h}diffNow(e="milliseconds",t={}){return this.diff(nt.now(),e,t)}until(e){return this.isValid?hr.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(t,n)<=i&&i<=a.endOf(t,n)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||nt.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),o0(t,this.plus(n),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?o0(e.base||nt.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(nt.isDateTime))throw new Wr("min requires all arguments be DateTimes");return _v(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(nt.isDateTime))throw new Wr("max requires all arguments be DateTimes");return _v(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:a=null}=n,u=Lt.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return Kv(u,e,t)}static fromStringExplain(e,t,n={}){return nt.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:i=null}=t,a=Lt.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Yv(a,e)}static fromFormatParser(e,t,n={}){if(rt(e)||rt(t))throw new Wr("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=n,u=Lt.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!u.equals(t.locale))throw new Wr(`fromFormatParser called with a locale of ${u}, but the format parser was created for ${t.locale}`);const{result:c,zone:f,specificOffset:h,invalidReason:d}=t.explainFromTokens(e);return d?nt.invalid(d):fa(c,f,n,`format ${t.format}`,e,h)}static get DATE_SHORT(){return Mu}static get DATE_MED(){return Mg}static get DATE_MED_WITH_WEEKDAY(){return G1}static get DATE_FULL(){return Dg}static get DATE_HUGE(){return Fg}static get TIME_SIMPLE(){return Lg}static get TIME_WITH_SECONDS(){return qg}static get TIME_WITH_SHORT_OFFSET(){return jg}static get TIME_WITH_LONG_OFFSET(){return Ug}static get TIME_24_SIMPLE(){return $g}static get TIME_24_WITH_SECONDS(){return Bg}static get TIME_24_WITH_SHORT_OFFSET(){return Vg}static get TIME_24_WITH_LONG_OFFSET(){return Wg}static get DATETIME_SHORT(){return zg}static get DATETIME_SHORT_WITH_SECONDS(){return Hg}static get DATETIME_MED(){return Gg}static get DATETIME_MED_WITH_SECONDS(){return Qg}static get DATETIME_MED_WITH_WEEKDAY(){return Q1}static get DATETIME_FULL(){return Jg}static get DATETIME_FULL_WITH_SECONDS(){return Yg}static get DATETIME_HUGE(){return Kg}static get DATETIME_HUGE_WITH_SECONDS(){return Zg}}function vo(r){if(nt.isDateTime(r))return r;if(r&&r.valueOf&&Ki(r.valueOf()))return nt.fromJSDate(r);if(r&&typeof r=="object")return nt.fromObject(r);throw new Wr(`Unknown datetime argument: ${r}, of type ${typeof r}`)}var Xu={exports:{}};/**
|
|
87
87
|
* @license
|
|
@@ -90,9 +90,9 @@ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):u
|
|
|
90
90
|
* Released under MIT license <https://lodash.com/license>
|
|
91
91
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
92
92
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
93
|
-
*/Xu.exports,function(r,e){(function(){var t,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",y=1,g=2,m=4,b=1,I=2,x=1,_=2,A=4,P=8,M=16,U=32,W=64,K=128,X=256,fe=512,oe=30,Ie="...",ye=800,Ne=16,Ce=1,ge=2,ve=3,pe=1/0,te=9007199254740991,Se=17976931348623157e292,Le=NaN,Ee=4294967295,Ze=Ee-1,vt=Ee>>>1,Mt=[["ary",K],["bind",x],["bindKey",_],["curry",P],["curryRight",M],["flip",fe],["partial",U],["partialRight",W],["rearg",X]],Et="[object Arguments]",Xe="[object Array]",it="[object AsyncFunction]",Ot="[object Boolean]",De="[object Date]",He="[object DOMException]",B="[object Error]",Q="[object Function]",q="[object GeneratorFunction]",J="[object Map]",ee="[object Number]",V="[object Null]",xe="[object Object]",We="[object Promise]",Be="[object Proxy]",se="[object RegExp]",_e="[object Set]",Ge="[object String]",pt="[object Symbol]",mt="[object Undefined]",Yt="[object WeakMap]",Tt="[object WeakSet]",Wt="[object ArrayBuffer]",Gt="[object DataView]",Er="[object Float32Array]",zt="[object Float64Array]",sr="[object Int8Array]",dr="[object Int16Array]",Ar="[object Int32Array]",Ht="[object Uint8Array]",H="[object Uint8ClampedArray]",G="[object Uint16Array]",st="[object Uint32Array]",bt=/\b__p \+= '';/g,lt=/\b(__p \+=) '' \+/g,ze=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kt=/&(?:amp|lt|gt|quot|#39);/g,Zt=/[&<>"']/g,Qt=RegExp(Kt.source),kr=RegExp(Zt.source),Hr=/<%-([\s\S]+?)%>/g,Fr=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Or=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$r=/^\w*$/,Lr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ar=/[\\^$.*+?()[\]{}|]/g,Gr=RegExp(ar.source),Tr=/^\s+/,gr=/\s/,Ir=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sn=/\{\n\/\* \[wrapped with (.+)\] \*/,Un=/,? & /,R=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,be=/\\(\\)?/g,Pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,ut=/^[-+]0x[0-9a-f]+$/i,Je=/^0b[01]+$/i,et=/^\[object .+?Constructor\]$/,tt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,w=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,k=/($^)/,T=/['\n\r\u2028\u2029\\]/g,C="\\ud800-\\udfff",D="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",de=D+$+ie,Y="\\u2700-\\u27bf",ne="a-z\\xdf-\\xf6\\xf8-\\xff",qe="\\xac\\xb1\\xd7\\xf7",wt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tr="\\u2000-\\u206f",En=" \\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",Ai="A-Z\\xc0-\\xd6\\xd8-\\xde",Nw="\\ufe0e\\ufe0f",Rw=qe+wt+tr+En,jd="['’]",UP="["+C+"]",Mw="["+Rw+"]",_c="["+de+"]",Dw="\\d+",$P="["+Y+"]",Fw="["+ne+"]",Lw="[^"+C+Rw+Dw+Y+ne+Ai+"]",Ud="\\ud83c[\\udffb-\\udfff]",BP="(?:"+_c+"|"+Ud+")",qw="[^"+C+"]",$d="(?:\\ud83c[\\udde6-\\uddff]){2}",Bd="[\\ud800-\\udbff][\\udc00-\\udfff]",Oa="["+Ai+"]",jw="\\u200d",Uw="(?:"+Fw+"|"+Lw+")",VP="(?:"+Oa+"|"+Lw+")",$w="(?:"+jd+"(?:d|ll|m|re|s|t|ve))?",Bw="(?:"+jd+"(?:D|LL|M|RE|S|T|VE))?",Vw=BP+"?",Ww="["+Nw+"]?",WP="(?:"+jw+"(?:"+[qw,$d,Bd].join("|")+")"+Ww+Vw+")*",zP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zw=Ww+Vw+WP,GP="(?:"+[$P,$d,Bd].join("|")+")"+zw,QP="(?:"+[qw+_c+"?",_c,$d,Bd,UP].join("|")+")",JP=RegExp(jd,"g"),YP=RegExp(_c,"g"),Vd=RegExp(Ud+"(?="+Ud+")|"+QP+zw,"g"),KP=RegExp([Oa+"?"+Fw+"+"+$w+"(?="+[Mw,Oa,"$"].join("|")+")",VP+"+"+Bw+"(?="+[Mw,Oa+Uw,"$"].join("|")+")",Oa+"?"+Uw+"+"+$w,Oa+"+"+Bw,HP,zP,Dw,GP].join("|"),"g"),ZP=RegExp("["+jw+C+de+Nw+"]"),XP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eN=["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"],tN=-1,rr={};rr[Er]=rr[zt]=rr[sr]=rr[dr]=rr[Ar]=rr[Ht]=rr[H]=rr[G]=rr[st]=!0,rr[Et]=rr[Xe]=rr[Wt]=rr[Ot]=rr[Gt]=rr[De]=rr[B]=rr[Q]=rr[J]=rr[ee]=rr[xe]=rr[se]=rr[_e]=rr[Ge]=rr[Yt]=!1;var Xt={};Xt[Et]=Xt[Xe]=Xt[Wt]=Xt[Gt]=Xt[Ot]=Xt[De]=Xt[Er]=Xt[zt]=Xt[sr]=Xt[dr]=Xt[Ar]=Xt[J]=Xt[ee]=Xt[xe]=Xt[se]=Xt[_e]=Xt[Ge]=Xt[pt]=Xt[Ht]=Xt[H]=Xt[G]=Xt[st]=!0,Xt[B]=Xt[Q]=Xt[Yt]=!1;var rN={À:"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"},nN={"&":"&","<":"<",">":">",'"':""","'":"'"},iN={"&":"&","<":"<",">":">",""":'"',"'":"'"},sN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},aN=parseFloat,oN=parseInt,Hw=typeof pi=="object"&&pi&&pi.Object===Object&&pi,uN=typeof self=="object"&&self&&self.Object===Object&&self,Br=Hw||uN||Function("return this")(),Wd=e&&!e.nodeType&&e,Ns=Wd&&!0&&r&&!r.nodeType&&r,Gw=Ns&&Ns.exports===Wd,zd=Gw&&Hw.process,$n=function(){try{var j=Ns&&Ns.require&&Ns.require("util").types;return j||zd&&zd.binding&&zd.binding("util")}catch{}}(),Qw=$n&&$n.isArrayBuffer,Jw=$n&&$n.isDate,Yw=$n&&$n.isMap,Kw=$n&&$n.isRegExp,Zw=$n&&$n.isSet,Xw=$n&&$n.isTypedArray;function On(j,re,Z){switch(Z.length){case 0:return j.call(re);case 1:return j.call(re,Z[0]);case 2:return j.call(re,Z[0],Z[1]);case 3:return j.call(re,Z[0],Z[1],Z[2])}return j.apply(re,Z)}function cN(j,re,Z,Me){for(var at=-1,Dt=j==null?0:j.length;++at<Dt;){var Cr=j[at];re(Me,Cr,Z(Cr),j)}return Me}function Bn(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me&&re(j[Z],Z,j)!==!1;);return j}function lN(j,re){for(var Z=j==null?0:j.length;Z--&&re(j[Z],Z,j)!==!1;);return j}function e_(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me;)if(!re(j[Z],Z,j))return!1;return!0}function as(j,re){for(var Z=-1,Me=j==null?0:j.length,at=0,Dt=[];++Z<Me;){var Cr=j[Z];re(Cr,Z,j)&&(Dt[at++]=Cr)}return Dt}function xc(j,re){var Z=j==null?0:j.length;return!!Z&&Ta(j,re,0)>-1}function Hd(j,re,Z){for(var Me=-1,at=j==null?0:j.length;++Me<at;)if(Z(re,j[Me]))return!0;return!1}function or(j,re){for(var Z=-1,Me=j==null?0:j.length,at=Array(Me);++Z<Me;)at[Z]=re(j[Z],Z,j);return at}function os(j,re){for(var Z=-1,Me=re.length,at=j.length;++Z<Me;)j[at+Z]=re[Z];return j}function Gd(j,re,Z,Me){var at=-1,Dt=j==null?0:j.length;for(Me&&Dt&&(Z=j[++at]);++at<Dt;)Z=re(Z,j[at],at,j);return Z}function fN(j,re,Z,Me){var at=j==null?0:j.length;for(Me&&at&&(Z=j[--at]);at--;)Z=re(Z,j[at],at,j);return Z}function Qd(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me;)if(re(j[Z],Z,j))return!0;return!1}var hN=Jd("length");function dN(j){return j.split("")}function pN(j){return j.match(R)||[]}function t_(j,re,Z){var Me;return Z(j,function(at,Dt,Cr){if(re(at,Dt,Cr))return Me=Dt,!1}),Me}function Sc(j,re,Z,Me){for(var at=j.length,Dt=Z+(Me?1:-1);Me?Dt--:++Dt<at;)if(re(j[Dt],Dt,j))return Dt;return-1}function Ta(j,re,Z){return re===re?TN(j,re,Z):Sc(j,r_,Z)}function mN(j,re,Z,Me){for(var at=Z-1,Dt=j.length;++at<Dt;)if(Me(j[at],re))return at;return-1}function r_(j){return j!==j}function n_(j,re){var Z=j==null?0:j.length;return Z?Kd(j,re)/Z:Le}function Jd(j){return function(re){return re==null?t:re[j]}}function Yd(j){return function(re){return j==null?t:j[re]}}function i_(j,re,Z,Me,at){return at(j,function(Dt,Cr,Jt){Z=Me?(Me=!1,Dt):re(Z,Dt,Cr,Jt)}),Z}function yN(j,re){var Z=j.length;for(j.sort(re);Z--;)j[Z]=j[Z].value;return j}function Kd(j,re){for(var Z,Me=-1,at=j.length;++Me<at;){var Dt=re(j[Me]);Dt!==t&&(Z=Z===t?Dt:Z+Dt)}return Z}function Zd(j,re){for(var Z=-1,Me=Array(j);++Z<j;)Me[Z]=re(Z);return Me}function gN(j,re){return or(re,function(Z){return[Z,j[Z]]})}function s_(j){return j&&j.slice(0,c_(j)+1).replace(Tr,"")}function Tn(j){return function(re){return j(re)}}function Xd(j,re){return or(re,function(Z){return j[Z]})}function Lo(j,re){return j.has(re)}function a_(j,re){for(var Z=-1,Me=j.length;++Z<Me&&Ta(re,j[Z],0)>-1;);return Z}function o_(j,re){for(var Z=j.length;Z--&&Ta(re,j[Z],0)>-1;);return Z}function vN(j,re){for(var Z=j.length,Me=0;Z--;)j[Z]===re&&++Me;return Me}var bN=Yd(rN),wN=Yd(nN);function _N(j){return"\\"+sN[j]}function xN(j,re){return j==null?t:j[re]}function Aa(j){return ZP.test(j)}function SN(j){return XP.test(j)}function EN(j){for(var re,Z=[];!(re=j.next()).done;)Z.push(re.value);return Z}function ep(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me,at){Z[++re]=[at,Me]}),Z}function u_(j,re){return function(Z){return j(re(Z))}}function us(j,re){for(var Z=-1,Me=j.length,at=0,Dt=[];++Z<Me;){var Cr=j[Z];(Cr===re||Cr===d)&&(j[Z]=d,Dt[at++]=Z)}return Dt}function Ec(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me){Z[++re]=Me}),Z}function ON(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me){Z[++re]=[Me,Me]}),Z}function TN(j,re,Z){for(var Me=Z-1,at=j.length;++Me<at;)if(j[Me]===re)return Me;return-1}function AN(j,re,Z){for(var Me=Z+1;Me--;)if(j[Me]===re)return Me;return Me}function ka(j){return Aa(j)?IN(j):hN(j)}function ii(j){return Aa(j)?CN(j):dN(j)}function c_(j){for(var re=j.length;re--&&gr.test(j.charAt(re)););return re}var kN=Yd(iN);function IN(j){for(var re=Vd.lastIndex=0;Vd.test(j);)++re;return re}function CN(j){return j.match(Vd)||[]}function PN(j){return j.match(KP)||[]}var NN=function j(re){re=re==null?Br:Ia.defaults(Br.Object(),re,Ia.pick(Br,eN));var Z=re.Array,Me=re.Date,at=re.Error,Dt=re.Function,Cr=re.Math,Jt=re.Object,tp=re.RegExp,RN=re.String,Vn=re.TypeError,Oc=Z.prototype,MN=Dt.prototype,Ca=Jt.prototype,Tc=re["__core-js_shared__"],Ac=MN.toString,$t=Ca.hasOwnProperty,DN=0,l_=function(){var s=/[^.]+$/.exec(Tc&&Tc.keys&&Tc.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),kc=Ca.toString,FN=Ac.call(Jt),LN=Br._,qN=tp("^"+Ac.call($t).replace(ar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ic=Gw?re.Buffer:t,cs=re.Symbol,Cc=re.Uint8Array,f_=Ic?Ic.allocUnsafe:t,Pc=u_(Jt.getPrototypeOf,Jt),h_=Jt.create,d_=Ca.propertyIsEnumerable,Nc=Oc.splice,p_=cs?cs.isConcatSpreadable:t,qo=cs?cs.iterator:t,Rs=cs?cs.toStringTag:t,Rc=function(){try{var s=qs(Jt,"defineProperty");return s({},"",{}),s}catch{}}(),jN=re.clearTimeout!==Br.clearTimeout&&re.clearTimeout,UN=Me&&Me.now!==Br.Date.now&&Me.now,$N=re.setTimeout!==Br.setTimeout&&re.setTimeout,Mc=Cr.ceil,Dc=Cr.floor,rp=Jt.getOwnPropertySymbols,BN=Ic?Ic.isBuffer:t,m_=re.isFinite,VN=Oc.join,WN=u_(Jt.keys,Jt),Pr=Cr.max,Qr=Cr.min,zN=Me.now,HN=re.parseInt,y_=Cr.random,GN=Oc.reverse,np=qs(re,"DataView"),jo=qs(re,"Map"),ip=qs(re,"Promise"),Pa=qs(re,"Set"),Uo=qs(re,"WeakMap"),$o=qs(Jt,"create"),Fc=Uo&&new Uo,Na={},QN=js(np),JN=js(jo),YN=js(ip),KN=js(Pa),ZN=js(Uo),Lc=cs?cs.prototype:t,Bo=Lc?Lc.valueOf:t,g_=Lc?Lc.toString:t;function S(s){if(pr(s)&&!ot(s)&&!(s instanceof St)){if(s instanceof Wn)return s;if($t.call(s,"__wrapped__"))return vx(s)}return new Wn(s)}var Ra=function(){function s(){}return function(o){if(!lr(o))return{};if(h_)return h_(o);s.prototype=o;var l=new s;return s.prototype=t,l}}();function qc(){}function Wn(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=t}S.templateSettings={escape:Hr,evaluate:Fr,interpolate:Ut,variable:"",imports:{_:S}},S.prototype=qc.prototype,S.prototype.constructor=S,Wn.prototype=Ra(qc.prototype),Wn.prototype.constructor=Wn;function St(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ee,this.__views__=[]}function XN(){var s=new St(this.__wrapped__);return s.__actions__=ln(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=ln(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=ln(this.__views__),s}function eR(){if(this.__filtered__){var s=new St(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function tR(){var s=this.__wrapped__.value(),o=this.__dir__,l=ot(s),p=o<0,v=l?s.length:0,O=dM(0,v,this.__views__),N=O.start,F=O.end,z=F-N,ae=p?F:N-1,ce=this.__iteratees__,me=ce.length,ke=0,$e=Qr(z,this.__takeCount__);if(!l||!p&&v==z&&$e==z)return $_(s,this.__actions__);var Ye=[];e:for(;z--&&ke<$e;){ae+=o;for(var ht=-1,Ke=s[ae];++ht<me;){var _t=ce[ht],At=_t.iteratee,In=_t.type,an=At(Ke);if(In==ge)Ke=an;else if(!an){if(In==Ce)continue e;break e}}Ye[ke++]=Ke}return Ye}St.prototype=Ra(qc.prototype),St.prototype.constructor=St;function Ms(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function rR(){this.__data__=$o?$o(null):{},this.size=0}function nR(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function iR(s){var o=this.__data__;if($o){var l=o[s];return l===f?t:l}return $t.call(o,s)?o[s]:t}function sR(s){var o=this.__data__;return $o?o[s]!==t:$t.call(o,s)}function aR(s,o){var l=this.__data__;return this.size+=this.has(s)?0:1,l[s]=$o&&o===t?f:o,this}Ms.prototype.clear=rR,Ms.prototype.delete=nR,Ms.prototype.get=iR,Ms.prototype.has=sR,Ms.prototype.set=aR;function ki(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function oR(){this.__data__=[],this.size=0}function uR(s){var o=this.__data__,l=jc(o,s);if(l<0)return!1;var p=o.length-1;return l==p?o.pop():Nc.call(o,l,1),--this.size,!0}function cR(s){var o=this.__data__,l=jc(o,s);return l<0?t:o[l][1]}function lR(s){return jc(this.__data__,s)>-1}function fR(s,o){var l=this.__data__,p=jc(l,s);return p<0?(++this.size,l.push([s,o])):l[p][1]=o,this}ki.prototype.clear=oR,ki.prototype.delete=uR,ki.prototype.get=cR,ki.prototype.has=lR,ki.prototype.set=fR;function Ii(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function hR(){this.size=0,this.__data__={hash:new Ms,map:new(jo||ki),string:new Ms}}function dR(s){var o=Kc(this,s).delete(s);return this.size-=o?1:0,o}function pR(s){return Kc(this,s).get(s)}function mR(s){return Kc(this,s).has(s)}function yR(s,o){var l=Kc(this,s),p=l.size;return l.set(s,o),this.size+=l.size==p?0:1,this}Ii.prototype.clear=hR,Ii.prototype.delete=dR,Ii.prototype.get=pR,Ii.prototype.has=mR,Ii.prototype.set=yR;function Ds(s){var o=-1,l=s==null?0:s.length;for(this.__data__=new Ii;++o<l;)this.add(s[o])}function gR(s){return this.__data__.set(s,f),this}function vR(s){return this.__data__.has(s)}Ds.prototype.add=Ds.prototype.push=gR,Ds.prototype.has=vR;function si(s){var o=this.__data__=new ki(s);this.size=o.size}function bR(){this.__data__=new ki,this.size=0}function wR(s){var o=this.__data__,l=o.delete(s);return this.size=o.size,l}function _R(s){return this.__data__.get(s)}function xR(s){return this.__data__.has(s)}function SR(s,o){var l=this.__data__;if(l instanceof ki){var p=l.__data__;if(!jo||p.length<i-1)return p.push([s,o]),this.size=++l.size,this;l=this.__data__=new Ii(p)}return l.set(s,o),this.size=l.size,this}si.prototype.clear=bR,si.prototype.delete=wR,si.prototype.get=_R,si.prototype.has=xR,si.prototype.set=SR;function v_(s,o){var l=ot(s),p=!l&&Us(s),v=!l&&!p&&ps(s),O=!l&&!p&&!v&&La(s),N=l||p||v||O,F=N?Zd(s.length,RN):[],z=F.length;for(var ae in s)(o||$t.call(s,ae))&&!(N&&(ae=="length"||v&&(ae=="offset"||ae=="parent")||O&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||Ri(ae,z)))&&F.push(ae);return F}function b_(s){var o=s.length;return o?s[mp(0,o-1)]:t}function ER(s,o){return Zc(ln(s),Fs(o,0,s.length))}function OR(s){return Zc(ln(s))}function sp(s,o,l){(l!==t&&!ai(s[o],l)||l===t&&!(o in s))&&Ci(s,o,l)}function Vo(s,o,l){var p=s[o];(!($t.call(s,o)&&ai(p,l))||l===t&&!(o in s))&&Ci(s,o,l)}function jc(s,o){for(var l=s.length;l--;)if(ai(s[l][0],o))return l;return-1}function TR(s,o,l,p){return ls(s,function(v,O,N){o(p,v,l(v),N)}),p}function w_(s,o){return s&&hi(o,qr(o),s)}function AR(s,o){return s&&hi(o,hn(o),s)}function Ci(s,o,l){o=="__proto__"&&Rc?Rc(s,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):s[o]=l}function ap(s,o){for(var l=-1,p=o.length,v=Z(p),O=s==null;++l<p;)v[l]=O?t:Up(s,o[l]);return v}function Fs(s,o,l){return s===s&&(l!==t&&(s=s<=l?s:l),o!==t&&(s=s>=o?s:o)),s}function zn(s,o,l,p,v,O){var N,F=o&y,z=o&g,ae=o&m;if(l&&(N=v?l(s,p,v,O):l(s)),N!==t)return N;if(!lr(s))return s;var ce=ot(s);if(ce){if(N=mM(s),!F)return ln(s,N)}else{var me=Jr(s),ke=me==Q||me==q;if(ps(s))return W_(s,F);if(me==xe||me==Et||ke&&!v){if(N=z||ke?{}:cx(s),!F)return z?iM(s,AR(N,s)):nM(s,w_(N,s))}else{if(!Xt[me])return v?s:{};N=yM(s,me,F)}}O||(O=new si);var $e=O.get(s);if($e)return $e;O.set(s,N),qx(s)?s.forEach(function(Ke){N.add(zn(Ke,o,l,Ke,s,O))}):Fx(s)&&s.forEach(function(Ke,_t){N.set(_t,zn(Ke,o,l,_t,s,O))});var Ye=ae?z?Tp:Op:z?hn:qr,ht=ce?t:Ye(s);return Bn(ht||s,function(Ke,_t){ht&&(_t=Ke,Ke=s[_t]),Vo(N,_t,zn(Ke,o,l,_t,s,O))}),N}function kR(s){var o=qr(s);return function(l){return __(l,s,o)}}function __(s,o,l){var p=l.length;if(s==null)return!p;for(s=Jt(s);p--;){var v=l[p],O=o[v],N=s[v];if(N===t&&!(v in s)||!O(N))return!1}return!0}function x_(s,o,l){if(typeof s!="function")throw new Vn(u);return Yo(function(){s.apply(t,l)},o)}function Wo(s,o,l,p){var v=-1,O=xc,N=!0,F=s.length,z=[],ae=o.length;if(!F)return z;l&&(o=or(o,Tn(l))),p?(O=Hd,N=!1):o.length>=i&&(O=Lo,N=!1,o=new Ds(o));e:for(;++v<F;){var ce=s[v],me=l==null?ce:l(ce);if(ce=p||ce!==0?ce:0,N&&me===me){for(var ke=ae;ke--;)if(o[ke]===me)continue e;z.push(ce)}else O(o,me,p)||z.push(ce)}return z}var ls=J_(fi),S_=J_(up,!0);function IR(s,o){var l=!0;return ls(s,function(p,v,O){return l=!!o(p,v,O),l}),l}function Uc(s,o,l){for(var p=-1,v=s.length;++p<v;){var O=s[p],N=o(O);if(N!=null&&(F===t?N===N&&!kn(N):l(N,F)))var F=N,z=O}return z}function CR(s,o,l,p){var v=s.length;for(l=ft(l),l<0&&(l=-l>v?0:v+l),p=p===t||p>v?v:ft(p),p<0&&(p+=v),p=l>p?0:Ux(p);l<p;)s[l++]=o;return s}function E_(s,o){var l=[];return ls(s,function(p,v,O){o(p,v,O)&&l.push(p)}),l}function Vr(s,o,l,p,v){var O=-1,N=s.length;for(l||(l=vM),v||(v=[]);++O<N;){var F=s[O];o>0&&l(F)?o>1?Vr(F,o-1,l,p,v):os(v,F):p||(v[v.length]=F)}return v}var op=Y_(),O_=Y_(!0);function fi(s,o){return s&&op(s,o,qr)}function up(s,o){return s&&O_(s,o,qr)}function $c(s,o){return as(o,function(l){return Mi(s[l])})}function Ls(s,o){o=hs(o,s);for(var l=0,p=o.length;s!=null&&l<p;)s=s[di(o[l++])];return l&&l==p?s:t}function T_(s,o,l){var p=o(s);return ot(s)?p:os(p,l(s))}function nn(s){return s==null?s===t?mt:V:Rs&&Rs in Jt(s)?hM(s):OM(s)}function cp(s,o){return s>o}function PR(s,o){return s!=null&&$t.call(s,o)}function NR(s,o){return s!=null&&o in Jt(s)}function RR(s,o,l){return s>=Qr(o,l)&&s<Pr(o,l)}function lp(s,o,l){for(var p=l?Hd:xc,v=s[0].length,O=s.length,N=O,F=Z(O),z=1/0,ae=[];N--;){var ce=s[N];N&&o&&(ce=or(ce,Tn(o))),z=Qr(ce.length,z),F[N]=!l&&(o||v>=120&&ce.length>=120)?new Ds(N&&ce):t}ce=s[0];var me=-1,ke=F[0];e:for(;++me<v&&ae.length<z;){var $e=ce[me],Ye=o?o($e):$e;if($e=l||$e!==0?$e:0,!(ke?Lo(ke,Ye):p(ae,Ye,l))){for(N=O;--N;){var ht=F[N];if(!(ht?Lo(ht,Ye):p(s[N],Ye,l)))continue e}ke&&ke.push(Ye),ae.push($e)}}return ae}function MR(s,o,l,p){return fi(s,function(v,O,N){o(p,l(v),O,N)}),p}function zo(s,o,l){o=hs(o,s),s=dx(s,o);var p=s==null?s:s[di(Gn(o))];return p==null?t:On(p,s,l)}function A_(s){return pr(s)&&nn(s)==Et}function DR(s){return pr(s)&&nn(s)==Wt}function FR(s){return pr(s)&&nn(s)==De}function Ho(s,o,l,p,v){return s===o?!0:s==null||o==null||!pr(s)&&!pr(o)?s!==s&&o!==o:LR(s,o,l,p,Ho,v)}function LR(s,o,l,p,v,O){var N=ot(s),F=ot(o),z=N?Xe:Jr(s),ae=F?Xe:Jr(o);z=z==Et?xe:z,ae=ae==Et?xe:ae;var ce=z==xe,me=ae==xe,ke=z==ae;if(ke&&ps(s)){if(!ps(o))return!1;N=!0,ce=!1}if(ke&&!ce)return O||(O=new si),N||La(s)?ax(s,o,l,p,v,O):lM(s,o,z,l,p,v,O);if(!(l&b)){var $e=ce&&$t.call(s,"__wrapped__"),Ye=me&&$t.call(o,"__wrapped__");if($e||Ye){var ht=$e?s.value():s,Ke=Ye?o.value():o;return O||(O=new si),v(ht,Ke,l,p,O)}}return ke?(O||(O=new si),fM(s,o,l,p,v,O)):!1}function qR(s){return pr(s)&&Jr(s)==J}function fp(s,o,l,p){var v=l.length,O=v,N=!p;if(s==null)return!O;for(s=Jt(s);v--;){var F=l[v];if(N&&F[2]?F[1]!==s[F[0]]:!(F[0]in s))return!1}for(;++v<O;){F=l[v];var z=F[0],ae=s[z],ce=F[1];if(N&&F[2]){if(ae===t&&!(z in s))return!1}else{var me=new si;if(p)var ke=p(ae,ce,z,s,o,me);if(!(ke===t?Ho(ce,ae,b|I,p,me):ke))return!1}}return!0}function k_(s){if(!lr(s)||wM(s))return!1;var o=Mi(s)?qN:et;return o.test(js(s))}function jR(s){return pr(s)&&nn(s)==se}function UR(s){return pr(s)&&Jr(s)==_e}function $R(s){return pr(s)&&il(s.length)&&!!rr[nn(s)]}function I_(s){return typeof s=="function"?s:s==null?dn:typeof s=="object"?ot(s)?N_(s[0],s[1]):P_(s):Kx(s)}function hp(s){if(!Jo(s))return WN(s);var o=[];for(var l in Jt(s))$t.call(s,l)&&l!="constructor"&&o.push(l);return o}function BR(s){if(!lr(s))return EM(s);var o=Jo(s),l=[];for(var p in s)p=="constructor"&&(o||!$t.call(s,p))||l.push(p);return l}function dp(s,o){return s<o}function C_(s,o){var l=-1,p=fn(s)?Z(s.length):[];return ls(s,function(v,O,N){p[++l]=o(v,O,N)}),p}function P_(s){var o=kp(s);return o.length==1&&o[0][2]?fx(o[0][0],o[0][1]):function(l){return l===s||fp(l,s,o)}}function N_(s,o){return Cp(s)&&lx(o)?fx(di(s),o):function(l){var p=Up(l,s);return p===t&&p===o?$p(l,s):Ho(o,p,b|I)}}function Bc(s,o,l,p,v){s!==o&&op(o,function(O,N){if(v||(v=new si),lr(O))VR(s,o,N,l,Bc,p,v);else{var F=p?p(Np(s,N),O,N+"",s,o,v):t;F===t&&(F=O),sp(s,N,F)}},hn)}function VR(s,o,l,p,v,O,N){var F=Np(s,l),z=Np(o,l),ae=N.get(z);if(ae){sp(s,l,ae);return}var ce=O?O(F,z,l+"",s,o,N):t,me=ce===t;if(me){var ke=ot(z),$e=!ke&&ps(z),Ye=!ke&&!$e&&La(z);ce=z,ke||$e||Ye?ot(F)?ce=F:vr(F)?ce=ln(F):$e?(me=!1,ce=W_(z,!0)):Ye?(me=!1,ce=z_(z,!0)):ce=[]:Ko(z)||Us(z)?(ce=F,Us(F)?ce=$x(F):(!lr(F)||Mi(F))&&(ce=cx(z))):me=!1}me&&(N.set(z,ce),v(ce,z,p,O,N),N.delete(z)),sp(s,l,ce)}function R_(s,o){var l=s.length;if(l)return o+=o<0?l:0,Ri(o,l)?s[o]:t}function M_(s,o,l){o.length?o=or(o,function(O){return ot(O)?function(N){return Ls(N,O.length===1?O[0]:O)}:O}):o=[dn];var p=-1;o=or(o,Tn(Qe()));var v=C_(s,function(O,N,F){var z=or(o,function(ae){return ae(O)});return{criteria:z,index:++p,value:O}});return yN(v,function(O,N){return rM(O,N,l)})}function WR(s,o){return D_(s,o,function(l,p){return $p(s,p)})}function D_(s,o,l){for(var p=-1,v=o.length,O={};++p<v;){var N=o[p],F=Ls(s,N);l(F,N)&&Go(O,hs(N,s),F)}return O}function zR(s){return function(o){return Ls(o,s)}}function pp(s,o,l,p){var v=p?mN:Ta,O=-1,N=o.length,F=s;for(s===o&&(o=ln(o)),l&&(F=or(s,Tn(l)));++O<N;)for(var z=0,ae=o[O],ce=l?l(ae):ae;(z=v(F,ce,z,p))>-1;)F!==s&&Nc.call(F,z,1),Nc.call(s,z,1);return s}function F_(s,o){for(var l=s?o.length:0,p=l-1;l--;){var v=o[l];if(l==p||v!==O){var O=v;Ri(v)?Nc.call(s,v,1):vp(s,v)}}return s}function mp(s,o){return s+Dc(y_()*(o-s+1))}function HR(s,o,l,p){for(var v=-1,O=Pr(Mc((o-s)/(l||1)),0),N=Z(O);O--;)N[p?O:++v]=s,s+=l;return N}function yp(s,o){var l="";if(!s||o<1||o>te)return l;do o%2&&(l+=s),o=Dc(o/2),o&&(s+=s);while(o);return l}function yt(s,o){return Rp(hx(s,o,dn),s+"")}function GR(s){return b_(qa(s))}function QR(s,o){var l=qa(s);return Zc(l,Fs(o,0,l.length))}function Go(s,o,l,p){if(!lr(s))return s;o=hs(o,s);for(var v=-1,O=o.length,N=O-1,F=s;F!=null&&++v<O;){var z=di(o[v]),ae=l;if(z==="__proto__"||z==="constructor"||z==="prototype")return s;if(v!=N){var ce=F[z];ae=p?p(ce,z,F):t,ae===t&&(ae=lr(ce)?ce:Ri(o[v+1])?[]:{})}Vo(F,z,ae),F=F[z]}return s}var L_=Fc?function(s,o){return Fc.set(s,o),s}:dn,JR=Rc?function(s,o){return Rc(s,"toString",{configurable:!0,enumerable:!1,value:Vp(o),writable:!0})}:dn;function YR(s){return Zc(qa(s))}function Hn(s,o,l){var p=-1,v=s.length;o<0&&(o=-o>v?0:v+o),l=l>v?v:l,l<0&&(l+=v),v=o>l?0:l-o>>>0,o>>>=0;for(var O=Z(v);++p<v;)O[p]=s[p+o];return O}function KR(s,o){var l;return ls(s,function(p,v,O){return l=o(p,v,O),!l}),!!l}function Vc(s,o,l){var p=0,v=s==null?p:s.length;if(typeof o=="number"&&o===o&&v<=vt){for(;p<v;){var O=p+v>>>1,N=s[O];N!==null&&!kn(N)&&(l?N<=o:N<o)?p=O+1:v=O}return v}return gp(s,o,dn,l)}function gp(s,o,l,p){var v=0,O=s==null?0:s.length;if(O===0)return 0;o=l(o);for(var N=o!==o,F=o===null,z=kn(o),ae=o===t;v<O;){var ce=Dc((v+O)/2),me=l(s[ce]),ke=me!==t,$e=me===null,Ye=me===me,ht=kn(me);if(N)var Ke=p||Ye;else ae?Ke=Ye&&(p||ke):F?Ke=Ye&&ke&&(p||!$e):z?Ke=Ye&&ke&&!$e&&(p||!ht):$e||ht?Ke=!1:Ke=p?me<=o:me<o;Ke?v=ce+1:O=ce}return Qr(O,Ze)}function q_(s,o){for(var l=-1,p=s.length,v=0,O=[];++l<p;){var N=s[l],F=o?o(N):N;if(!l||!ai(F,z)){var z=F;O[v++]=N===0?0:N}}return O}function j_(s){return typeof s=="number"?s:kn(s)?Le:+s}function An(s){if(typeof s=="string")return s;if(ot(s))return or(s,An)+"";if(kn(s))return g_?g_.call(s):"";var o=s+"";return o=="0"&&1/s==-pe?"-0":o}function fs(s,o,l){var p=-1,v=xc,O=s.length,N=!0,F=[],z=F;if(l)N=!1,v=Hd;else if(O>=i){var ae=o?null:uM(s);if(ae)return Ec(ae);N=!1,v=Lo,z=new Ds}else z=o?[]:F;e:for(;++p<O;){var ce=s[p],me=o?o(ce):ce;if(ce=l||ce!==0?ce:0,N&&me===me){for(var ke=z.length;ke--;)if(z[ke]===me)continue e;o&&z.push(me),F.push(ce)}else v(z,me,l)||(z!==F&&z.push(me),F.push(ce))}return F}function vp(s,o){return o=hs(o,s),s=dx(s,o),s==null||delete s[di(Gn(o))]}function U_(s,o,l,p){return Go(s,o,l(Ls(s,o)),p)}function Wc(s,o,l,p){for(var v=s.length,O=p?v:-1;(p?O--:++O<v)&&o(s[O],O,s););return l?Hn(s,p?0:O,p?O+1:v):Hn(s,p?O+1:0,p?v:O)}function $_(s,o){var l=s;return l instanceof St&&(l=l.value()),Gd(o,function(p,v){return v.func.apply(v.thisArg,os([p],v.args))},l)}function bp(s,o,l){var p=s.length;if(p<2)return p?fs(s[0]):[];for(var v=-1,O=Z(p);++v<p;)for(var N=s[v],F=-1;++F<p;)F!=v&&(O[v]=Wo(O[v]||N,s[F],o,l));return fs(Vr(O,1),o,l)}function B_(s,o,l){for(var p=-1,v=s.length,O=o.length,N={};++p<v;){var F=p<O?o[p]:t;l(N,s[p],F)}return N}function wp(s){return vr(s)?s:[]}function _p(s){return typeof s=="function"?s:dn}function hs(s,o){return ot(s)?s:Cp(s,o)?[s]:gx(jt(s))}var ZR=yt;function ds(s,o,l){var p=s.length;return l=l===t?p:l,!o&&l>=p?s:Hn(s,o,l)}var V_=jN||function(s){return Br.clearTimeout(s)};function W_(s,o){if(o)return s.slice();var l=s.length,p=f_?f_(l):new s.constructor(l);return s.copy(p),p}function xp(s){var o=new s.constructor(s.byteLength);return new Cc(o).set(new Cc(s)),o}function XR(s,o){var l=o?xp(s.buffer):s.buffer;return new s.constructor(l,s.byteOffset,s.byteLength)}function eM(s){var o=new s.constructor(s.source,Ve.exec(s));return o.lastIndex=s.lastIndex,o}function tM(s){return Bo?Jt(Bo.call(s)):{}}function z_(s,o){var l=o?xp(s.buffer):s.buffer;return new s.constructor(l,s.byteOffset,s.length)}function H_(s,o){if(s!==o){var l=s!==t,p=s===null,v=s===s,O=kn(s),N=o!==t,F=o===null,z=o===o,ae=kn(o);if(!F&&!ae&&!O&&s>o||O&&N&&z&&!F&&!ae||p&&N&&z||!l&&z||!v)return 1;if(!p&&!O&&!ae&&s<o||ae&&l&&v&&!p&&!O||F&&l&&v||!N&&v||!z)return-1}return 0}function rM(s,o,l){for(var p=-1,v=s.criteria,O=o.criteria,N=v.length,F=l.length;++p<N;){var z=H_(v[p],O[p]);if(z){if(p>=F)return z;var ae=l[p];return z*(ae=="desc"?-1:1)}}return s.index-o.index}function G_(s,o,l,p){for(var v=-1,O=s.length,N=l.length,F=-1,z=o.length,ae=Pr(O-N,0),ce=Z(z+ae),me=!p;++F<z;)ce[F]=o[F];for(;++v<N;)(me||v<O)&&(ce[l[v]]=s[v]);for(;ae--;)ce[F++]=s[v++];return ce}function Q_(s,o,l,p){for(var v=-1,O=s.length,N=-1,F=l.length,z=-1,ae=o.length,ce=Pr(O-F,0),me=Z(ce+ae),ke=!p;++v<ce;)me[v]=s[v];for(var $e=v;++z<ae;)me[$e+z]=o[z];for(;++N<F;)(ke||v<O)&&(me[$e+l[N]]=s[v++]);return me}function ln(s,o){var l=-1,p=s.length;for(o||(o=Z(p));++l<p;)o[l]=s[l];return o}function hi(s,o,l,p){var v=!l;l||(l={});for(var O=-1,N=o.length;++O<N;){var F=o[O],z=p?p(l[F],s[F],F,l,s):t;z===t&&(z=s[F]),v?Ci(l,F,z):Vo(l,F,z)}return l}function nM(s,o){return hi(s,Ip(s),o)}function iM(s,o){return hi(s,ox(s),o)}function zc(s,o){return function(l,p){var v=ot(l)?cN:TR,O=o?o():{};return v(l,s,Qe(p,2),O)}}function Ma(s){return yt(function(o,l){var p=-1,v=l.length,O=v>1?l[v-1]:t,N=v>2?l[2]:t;for(O=s.length>3&&typeof O=="function"?(v--,O):t,N&&sn(l[0],l[1],N)&&(O=v<3?t:O,v=1),o=Jt(o);++p<v;){var F=l[p];F&&s(o,F,p,O)}return o})}function J_(s,o){return function(l,p){if(l==null)return l;if(!fn(l))return s(l,p);for(var v=l.length,O=o?v:-1,N=Jt(l);(o?O--:++O<v)&&p(N[O],O,N)!==!1;);return l}}function Y_(s){return function(o,l,p){for(var v=-1,O=Jt(o),N=p(o),F=N.length;F--;){var z=N[s?F:++v];if(l(O[z],z,O)===!1)break}return o}}function sM(s,o,l){var p=o&x,v=Qo(s);function O(){var N=this&&this!==Br&&this instanceof O?v:s;return N.apply(p?l:this,arguments)}return O}function K_(s){return function(o){o=jt(o);var l=Aa(o)?ii(o):t,p=l?l[0]:o.charAt(0),v=l?ds(l,1).join(""):o.slice(1);return p[s]()+v}}function Da(s){return function(o){return Gd(Jx(Qx(o).replace(JP,"")),s,"")}}function Qo(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var l=Ra(s.prototype),p=s.apply(l,o);return lr(p)?p:l}}function aM(s,o,l){var p=Qo(s);function v(){for(var O=arguments.length,N=Z(O),F=O,z=Fa(v);F--;)N[F]=arguments[F];var ae=O<3&&N[0]!==z&&N[O-1]!==z?[]:us(N,z);if(O-=ae.length,O<l)return rx(s,o,Hc,v.placeholder,t,N,ae,t,t,l-O);var ce=this&&this!==Br&&this instanceof v?p:s;return On(ce,this,N)}return v}function Z_(s){return function(o,l,p){var v=Jt(o);if(!fn(o)){var O=Qe(l,3);o=qr(o),l=function(F){return O(v[F],F,v)}}var N=s(o,l,p);return N>-1?v[O?o[N]:N]:t}}function X_(s){return Ni(function(o){var l=o.length,p=l,v=Wn.prototype.thru;for(s&&o.reverse();p--;){var O=o[p];if(typeof O!="function")throw new Vn(u);if(v&&!N&&Yc(O)=="wrapper")var N=new Wn([],!0)}for(p=N?p:l;++p<l;){O=o[p];var F=Yc(O),z=F=="wrapper"?Ap(O):t;z&&Pp(z[0])&&z[1]==(K|P|U|X)&&!z[4].length&&z[9]==1?N=N[Yc(z[0])].apply(N,z[3]):N=O.length==1&&Pp(O)?N[F]():N.thru(O)}return function(){var ae=arguments,ce=ae[0];if(N&&ae.length==1&&ot(ce))return N.plant(ce).value();for(var me=0,ke=l?o[me].apply(this,ae):ce;++me<l;)ke=o[me].call(this,ke);return ke}})}function Hc(s,o,l,p,v,O,N,F,z,ae){var ce=o&K,me=o&x,ke=o&_,$e=o&(P|M),Ye=o&fe,ht=ke?t:Qo(s);function Ke(){for(var _t=arguments.length,At=Z(_t),In=_t;In--;)At[In]=arguments[In];if($e)var an=Fa(Ke),Cn=vN(At,an);if(p&&(At=G_(At,p,v,$e)),O&&(At=Q_(At,O,N,$e)),_t-=Cn,$e&&_t<ae){var br=us(At,an);return rx(s,o,Hc,Ke.placeholder,l,At,br,F,z,ae-_t)}var oi=me?l:this,Fi=ke?oi[s]:s;return _t=At.length,F?At=TM(At,F):Ye&&_t>1&&At.reverse(),ce&&z<_t&&(At.length=z),this&&this!==Br&&this instanceof Ke&&(Fi=ht||Qo(Fi)),Fi.apply(oi,At)}return Ke}function ex(s,o){return function(l,p){return MR(l,s,o(p),{})}}function Gc(s,o){return function(l,p){var v;if(l===t&&p===t)return o;if(l!==t&&(v=l),p!==t){if(v===t)return p;typeof l=="string"||typeof p=="string"?(l=An(l),p=An(p)):(l=j_(l),p=j_(p)),v=s(l,p)}return v}}function Sp(s){return Ni(function(o){return o=or(o,Tn(Qe())),yt(function(l){var p=this;return s(o,function(v){return On(v,p,l)})})})}function Qc(s,o){o=o===t?" ":An(o);var l=o.length;if(l<2)return l?yp(o,s):o;var p=yp(o,Mc(s/ka(o)));return Aa(o)?ds(ii(p),0,s).join(""):p.slice(0,s)}function oM(s,o,l,p){var v=o&x,O=Qo(s);function N(){for(var F=-1,z=arguments.length,ae=-1,ce=p.length,me=Z(ce+z),ke=this&&this!==Br&&this instanceof N?O:s;++ae<ce;)me[ae]=p[ae];for(;z--;)me[ae++]=arguments[++F];return On(ke,v?l:this,me)}return N}function tx(s){return function(o,l,p){return p&&typeof p!="number"&&sn(o,l,p)&&(l=p=t),o=Di(o),l===t?(l=o,o=0):l=Di(l),p=p===t?o<l?1:-1:Di(p),HR(o,l,p,s)}}function Jc(s){return function(o,l){return typeof o=="string"&&typeof l=="string"||(o=Qn(o),l=Qn(l)),s(o,l)}}function rx(s,o,l,p,v,O,N,F,z,ae){var ce=o&P,me=ce?N:t,ke=ce?t:N,$e=ce?O:t,Ye=ce?t:O;o|=ce?U:W,o&=~(ce?W:U),o&A||(o&=~(x|_));var ht=[s,o,v,$e,me,Ye,ke,F,z,ae],Ke=l.apply(t,ht);return Pp(s)&&px(Ke,ht),Ke.placeholder=p,mx(Ke,s,o)}function Ep(s){var o=Cr[s];return function(l,p){if(l=Qn(l),p=p==null?0:Qr(ft(p),292),p&&m_(l)){var v=(jt(l)+"e").split("e"),O=o(v[0]+"e"+(+v[1]+p));return v=(jt(O)+"e").split("e"),+(v[0]+"e"+(+v[1]-p))}return o(l)}}var uM=Pa&&1/Ec(new Pa([,-0]))[1]==pe?function(s){return new Pa(s)}:Hp;function nx(s){return function(o){var l=Jr(o);return l==J?ep(o):l==_e?ON(o):gN(o,s(o))}}function Pi(s,o,l,p,v,O,N,F){var z=o&_;if(!z&&typeof s!="function")throw new Vn(u);var ae=p?p.length:0;if(ae||(o&=~(U|W),p=v=t),N=N===t?N:Pr(ft(N),0),F=F===t?F:ft(F),ae-=v?v.length:0,o&W){var ce=p,me=v;p=v=t}var ke=z?t:Ap(s),$e=[s,o,l,p,v,ce,me,O,N,F];if(ke&&SM($e,ke),s=$e[0],o=$e[1],l=$e[2],p=$e[3],v=$e[4],F=$e[9]=$e[9]===t?z?0:s.length:Pr($e[9]-ae,0),!F&&o&(P|M)&&(o&=~(P|M)),!o||o==x)var Ye=sM(s,o,l);else o==P||o==M?Ye=aM(s,o,F):(o==U||o==(x|U))&&!v.length?Ye=oM(s,o,l,p):Ye=Hc.apply(t,$e);var ht=ke?L_:px;return mx(ht(Ye,$e),s,o)}function ix(s,o,l,p){return s===t||ai(s,Ca[l])&&!$t.call(p,l)?o:s}function sx(s,o,l,p,v,O){return lr(s)&&lr(o)&&(O.set(o,s),Bc(s,o,t,sx,O),O.delete(o)),s}function cM(s){return Ko(s)?t:s}function ax(s,o,l,p,v,O){var N=l&b,F=s.length,z=o.length;if(F!=z&&!(N&&z>F))return!1;var ae=O.get(s),ce=O.get(o);if(ae&&ce)return ae==o&&ce==s;var me=-1,ke=!0,$e=l&I?new Ds:t;for(O.set(s,o),O.set(o,s);++me<F;){var Ye=s[me],ht=o[me];if(p)var Ke=N?p(ht,Ye,me,o,s,O):p(Ye,ht,me,s,o,O);if(Ke!==t){if(Ke)continue;ke=!1;break}if($e){if(!Qd(o,function(_t,At){if(!Lo($e,At)&&(Ye===_t||v(Ye,_t,l,p,O)))return $e.push(At)})){ke=!1;break}}else if(!(Ye===ht||v(Ye,ht,l,p,O))){ke=!1;break}}return O.delete(s),O.delete(o),ke}function lM(s,o,l,p,v,O,N){switch(l){case Gt:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Wt:return!(s.byteLength!=o.byteLength||!O(new Cc(s),new Cc(o)));case Ot:case De:case ee:return ai(+s,+o);case B:return s.name==o.name&&s.message==o.message;case se:case Ge:return s==o+"";case J:var F=ep;case _e:var z=p&b;if(F||(F=Ec),s.size!=o.size&&!z)return!1;var ae=N.get(s);if(ae)return ae==o;p|=I,N.set(s,o);var ce=ax(F(s),F(o),p,v,O,N);return N.delete(s),ce;case pt:if(Bo)return Bo.call(s)==Bo.call(o)}return!1}function fM(s,o,l,p,v,O){var N=l&b,F=Op(s),z=F.length,ae=Op(o),ce=ae.length;if(z!=ce&&!N)return!1;for(var me=z;me--;){var ke=F[me];if(!(N?ke in o:$t.call(o,ke)))return!1}var $e=O.get(s),Ye=O.get(o);if($e&&Ye)return $e==o&&Ye==s;var ht=!0;O.set(s,o),O.set(o,s);for(var Ke=N;++me<z;){ke=F[me];var _t=s[ke],At=o[ke];if(p)var In=N?p(At,_t,ke,o,s,O):p(_t,At,ke,s,o,O);if(!(In===t?_t===At||v(_t,At,l,p,O):In)){ht=!1;break}Ke||(Ke=ke=="constructor")}if(ht&&!Ke){var an=s.constructor,Cn=o.constructor;an!=Cn&&"constructor"in s&&"constructor"in o&&!(typeof an=="function"&&an instanceof an&&typeof Cn=="function"&&Cn instanceof Cn)&&(ht=!1)}return O.delete(s),O.delete(o),ht}function Ni(s){return Rp(hx(s,t,_x),s+"")}function Op(s){return T_(s,qr,Ip)}function Tp(s){return T_(s,hn,ox)}var Ap=Fc?function(s){return Fc.get(s)}:Hp;function Yc(s){for(var o=s.name+"",l=Na[o],p=$t.call(Na,o)?l.length:0;p--;){var v=l[p],O=v.func;if(O==null||O==s)return v.name}return o}function Fa(s){var o=$t.call(S,"placeholder")?S:s;return o.placeholder}function Qe(){var s=S.iteratee||Wp;return s=s===Wp?I_:s,arguments.length?s(arguments[0],arguments[1]):s}function Kc(s,o){var l=s.__data__;return bM(o)?l[typeof o=="string"?"string":"hash"]:l.map}function kp(s){for(var o=qr(s),l=o.length;l--;){var p=o[l],v=s[p];o[l]=[p,v,lx(v)]}return o}function qs(s,o){var l=xN(s,o);return k_(l)?l:t}function hM(s){var o=$t.call(s,Rs),l=s[Rs];try{s[Rs]=t;var p=!0}catch{}var v=kc.call(s);return p&&(o?s[Rs]=l:delete s[Rs]),v}var Ip=rp?function(s){return s==null?[]:(s=Jt(s),as(rp(s),function(o){return d_.call(s,o)}))}:Gp,ox=rp?function(s){for(var o=[];s;)os(o,Ip(s)),s=Pc(s);return o}:Gp,Jr=nn;(np&&Jr(new np(new ArrayBuffer(1)))!=Gt||jo&&Jr(new jo)!=J||ip&&Jr(ip.resolve())!=We||Pa&&Jr(new Pa)!=_e||Uo&&Jr(new Uo)!=Yt)&&(Jr=function(s){var o=nn(s),l=o==xe?s.constructor:t,p=l?js(l):"";if(p)switch(p){case QN:return Gt;case JN:return J;case YN:return We;case KN:return _e;case ZN:return Yt}return o});function dM(s,o,l){for(var p=-1,v=l.length;++p<v;){var O=l[p],N=O.size;switch(O.type){case"drop":s+=N;break;case"dropRight":o-=N;break;case"take":o=Qr(o,s+N);break;case"takeRight":s=Pr(s,o-N);break}}return{start:s,end:o}}function pM(s){var o=s.match(Sn);return o?o[1].split(Un):[]}function ux(s,o,l){o=hs(o,s);for(var p=-1,v=o.length,O=!1;++p<v;){var N=di(o[p]);if(!(O=s!=null&&l(s,N)))break;s=s[N]}return O||++p!=v?O:(v=s==null?0:s.length,!!v&&il(v)&&Ri(N,v)&&(ot(s)||Us(s)))}function mM(s){var o=s.length,l=new s.constructor(o);return o&&typeof s[0]=="string"&&$t.call(s,"index")&&(l.index=s.index,l.input=s.input),l}function cx(s){return typeof s.constructor=="function"&&!Jo(s)?Ra(Pc(s)):{}}function yM(s,o,l){var p=s.constructor;switch(o){case Wt:return xp(s);case Ot:case De:return new p(+s);case Gt:return XR(s,l);case Er:case zt:case sr:case dr:case Ar:case Ht:case H:case G:case st:return z_(s,l);case J:return new p;case ee:case Ge:return new p(s);case se:return eM(s);case _e:return new p;case pt:return tM(s)}}function gM(s,o){var l=o.length;if(!l)return s;var p=l-1;return o[p]=(l>1?"& ":"")+o[p],o=o.join(l>2?", ":" "),s.replace(Ir,`{
|
|
93
|
+
*/Xu.exports,function(r,e){(function(){var t,n="4.17.21",i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",u="Expected a function",c="Invalid `variable` option passed into `_.template`",f="__lodash_hash_undefined__",h=500,d="__lodash_placeholder__",y=1,g=2,m=4,b=1,I=2,x=1,_=2,A=4,P=8,M=16,U=32,W=64,K=128,X=256,fe=512,oe=30,Ie="...",ye=800,Ne=16,Ce=1,ge=2,ve=3,pe=1/0,te=9007199254740991,Ee=17976931348623157e292,Le=NaN,Se=4294967295,Ze=Se-1,vt=Se>>>1,Mt=[["ary",K],["bind",x],["bindKey",_],["curry",P],["curryRight",M],["flip",fe],["partial",U],["partialRight",W],["rearg",X]],Et="[object Arguments]",Xe="[object Array]",it="[object AsyncFunction]",Ot="[object Boolean]",De="[object Date]",He="[object DOMException]",B="[object Error]",Q="[object Function]",q="[object GeneratorFunction]",J="[object Map]",ee="[object Number]",V="[object Null]",xe="[object Object]",We="[object Promise]",Be="[object Proxy]",se="[object RegExp]",_e="[object Set]",Ge="[object String]",pt="[object Symbol]",mt="[object Undefined]",Yt="[object WeakMap]",Tt="[object WeakSet]",Wt="[object ArrayBuffer]",Gt="[object DataView]",Er="[object Float32Array]",zt="[object Float64Array]",sr="[object Int8Array]",dr="[object Int16Array]",Ar="[object Int32Array]",Ht="[object Uint8Array]",H="[object Uint8ClampedArray]",G="[object Uint16Array]",st="[object Uint32Array]",bt=/\b__p \+= '';/g,lt=/\b(__p \+=) '' \+/g,ze=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Kt=/&(?:amp|lt|gt|quot|#39);/g,Zt=/[&<>"']/g,Qt=RegExp(Kt.source),kr=RegExp(Zt.source),Hr=/<%-([\s\S]+?)%>/g,Fr=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Or=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$r=/^\w*$/,Lr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ar=/[\\^$.*+?()[\]{}|]/g,Gr=RegExp(ar.source),Tr=/^\s+/,gr=/\s/,Ir=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Sn=/\{\n\/\* \[wrapped with (.+)\] \*/,Un=/,? & /,R=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ue=/[()=,{}\[\]\/\s]/,be=/\\(\\)?/g,Pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ve=/\w*$/,ut=/^[-+]0x[0-9a-f]+$/i,Je=/^0b[01]+$/i,et=/^\[object .+?Constructor\]$/,tt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,w=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,k=/($^)/,T=/['\n\r\u2028\u2029\\]/g,C="\\ud800-\\udfff",D="\\u0300-\\u036f",$="\\ufe20-\\ufe2f",ie="\\u20d0-\\u20ff",de=D+$+ie,Y="\\u2700-\\u27bf",ne="a-z\\xdf-\\xf6\\xf8-\\xff",qe="\\xac\\xb1\\xd7\\xf7",wt="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",tr="\\u2000-\\u206f",En=" \\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",Ai="A-Z\\xc0-\\xd6\\xd8-\\xde",Nw="\\ufe0e\\ufe0f",Rw=qe+wt+tr+En,jd="['’]",UP="["+C+"]",Mw="["+Rw+"]",_c="["+de+"]",Dw="\\d+",$P="["+Y+"]",Fw="["+ne+"]",Lw="[^"+C+Rw+Dw+Y+ne+Ai+"]",Ud="\\ud83c[\\udffb-\\udfff]",BP="(?:"+_c+"|"+Ud+")",qw="[^"+C+"]",$d="(?:\\ud83c[\\udde6-\\uddff]){2}",Bd="[\\ud800-\\udbff][\\udc00-\\udfff]",Oa="["+Ai+"]",jw="\\u200d",Uw="(?:"+Fw+"|"+Lw+")",VP="(?:"+Oa+"|"+Lw+")",$w="(?:"+jd+"(?:d|ll|m|re|s|t|ve))?",Bw="(?:"+jd+"(?:D|LL|M|RE|S|T|VE))?",Vw=BP+"?",Ww="["+Nw+"]?",WP="(?:"+jw+"(?:"+[qw,$d,Bd].join("|")+")"+Ww+Vw+")*",zP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",HP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",zw=Ww+Vw+WP,GP="(?:"+[$P,$d,Bd].join("|")+")"+zw,QP="(?:"+[qw+_c+"?",_c,$d,Bd,UP].join("|")+")",JP=RegExp(jd,"g"),YP=RegExp(_c,"g"),Vd=RegExp(Ud+"(?="+Ud+")|"+QP+zw,"g"),KP=RegExp([Oa+"?"+Fw+"+"+$w+"(?="+[Mw,Oa,"$"].join("|")+")",VP+"+"+Bw+"(?="+[Mw,Oa+Uw,"$"].join("|")+")",Oa+"?"+Uw+"+"+$w,Oa+"+"+Bw,HP,zP,Dw,GP].join("|"),"g"),ZP=RegExp("["+jw+C+de+Nw+"]"),XP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,eN=["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"],tN=-1,rr={};rr[Er]=rr[zt]=rr[sr]=rr[dr]=rr[Ar]=rr[Ht]=rr[H]=rr[G]=rr[st]=!0,rr[Et]=rr[Xe]=rr[Wt]=rr[Ot]=rr[Gt]=rr[De]=rr[B]=rr[Q]=rr[J]=rr[ee]=rr[xe]=rr[se]=rr[_e]=rr[Ge]=rr[Yt]=!1;var Xt={};Xt[Et]=Xt[Xe]=Xt[Wt]=Xt[Gt]=Xt[Ot]=Xt[De]=Xt[Er]=Xt[zt]=Xt[sr]=Xt[dr]=Xt[Ar]=Xt[J]=Xt[ee]=Xt[xe]=Xt[se]=Xt[_e]=Xt[Ge]=Xt[pt]=Xt[Ht]=Xt[H]=Xt[G]=Xt[st]=!0,Xt[B]=Xt[Q]=Xt[Yt]=!1;var rN={À:"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"},nN={"&":"&","<":"<",">":">",'"':""","'":"'"},iN={"&":"&","<":"<",">":">",""":'"',"'":"'"},sN={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},aN=parseFloat,oN=parseInt,Hw=typeof pi=="object"&&pi&&pi.Object===Object&&pi,uN=typeof self=="object"&&self&&self.Object===Object&&self,Br=Hw||uN||Function("return this")(),Wd=e&&!e.nodeType&&e,Ns=Wd&&!0&&r&&!r.nodeType&&r,Gw=Ns&&Ns.exports===Wd,zd=Gw&&Hw.process,$n=function(){try{var j=Ns&&Ns.require&&Ns.require("util").types;return j||zd&&zd.binding&&zd.binding("util")}catch{}}(),Qw=$n&&$n.isArrayBuffer,Jw=$n&&$n.isDate,Yw=$n&&$n.isMap,Kw=$n&&$n.isRegExp,Zw=$n&&$n.isSet,Xw=$n&&$n.isTypedArray;function On(j,re,Z){switch(Z.length){case 0:return j.call(re);case 1:return j.call(re,Z[0]);case 2:return j.call(re,Z[0],Z[1]);case 3:return j.call(re,Z[0],Z[1],Z[2])}return j.apply(re,Z)}function cN(j,re,Z,Me){for(var at=-1,Dt=j==null?0:j.length;++at<Dt;){var Cr=j[at];re(Me,Cr,Z(Cr),j)}return Me}function Bn(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me&&re(j[Z],Z,j)!==!1;);return j}function lN(j,re){for(var Z=j==null?0:j.length;Z--&&re(j[Z],Z,j)!==!1;);return j}function e_(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me;)if(!re(j[Z],Z,j))return!1;return!0}function as(j,re){for(var Z=-1,Me=j==null?0:j.length,at=0,Dt=[];++Z<Me;){var Cr=j[Z];re(Cr,Z,j)&&(Dt[at++]=Cr)}return Dt}function xc(j,re){var Z=j==null?0:j.length;return!!Z&&Ta(j,re,0)>-1}function Hd(j,re,Z){for(var Me=-1,at=j==null?0:j.length;++Me<at;)if(Z(re,j[Me]))return!0;return!1}function or(j,re){for(var Z=-1,Me=j==null?0:j.length,at=Array(Me);++Z<Me;)at[Z]=re(j[Z],Z,j);return at}function os(j,re){for(var Z=-1,Me=re.length,at=j.length;++Z<Me;)j[at+Z]=re[Z];return j}function Gd(j,re,Z,Me){var at=-1,Dt=j==null?0:j.length;for(Me&&Dt&&(Z=j[++at]);++at<Dt;)Z=re(Z,j[at],at,j);return Z}function fN(j,re,Z,Me){var at=j==null?0:j.length;for(Me&&at&&(Z=j[--at]);at--;)Z=re(Z,j[at],at,j);return Z}function Qd(j,re){for(var Z=-1,Me=j==null?0:j.length;++Z<Me;)if(re(j[Z],Z,j))return!0;return!1}var hN=Jd("length");function dN(j){return j.split("")}function pN(j){return j.match(R)||[]}function t_(j,re,Z){var Me;return Z(j,function(at,Dt,Cr){if(re(at,Dt,Cr))return Me=Dt,!1}),Me}function Sc(j,re,Z,Me){for(var at=j.length,Dt=Z+(Me?1:-1);Me?Dt--:++Dt<at;)if(re(j[Dt],Dt,j))return Dt;return-1}function Ta(j,re,Z){return re===re?TN(j,re,Z):Sc(j,r_,Z)}function mN(j,re,Z,Me){for(var at=Z-1,Dt=j.length;++at<Dt;)if(Me(j[at],re))return at;return-1}function r_(j){return j!==j}function n_(j,re){var Z=j==null?0:j.length;return Z?Kd(j,re)/Z:Le}function Jd(j){return function(re){return re==null?t:re[j]}}function Yd(j){return function(re){return j==null?t:j[re]}}function i_(j,re,Z,Me,at){return at(j,function(Dt,Cr,Jt){Z=Me?(Me=!1,Dt):re(Z,Dt,Cr,Jt)}),Z}function yN(j,re){var Z=j.length;for(j.sort(re);Z--;)j[Z]=j[Z].value;return j}function Kd(j,re){for(var Z,Me=-1,at=j.length;++Me<at;){var Dt=re(j[Me]);Dt!==t&&(Z=Z===t?Dt:Z+Dt)}return Z}function Zd(j,re){for(var Z=-1,Me=Array(j);++Z<j;)Me[Z]=re(Z);return Me}function gN(j,re){return or(re,function(Z){return[Z,j[Z]]})}function s_(j){return j&&j.slice(0,c_(j)+1).replace(Tr,"")}function Tn(j){return function(re){return j(re)}}function Xd(j,re){return or(re,function(Z){return j[Z]})}function Lo(j,re){return j.has(re)}function a_(j,re){for(var Z=-1,Me=j.length;++Z<Me&&Ta(re,j[Z],0)>-1;);return Z}function o_(j,re){for(var Z=j.length;Z--&&Ta(re,j[Z],0)>-1;);return Z}function vN(j,re){for(var Z=j.length,Me=0;Z--;)j[Z]===re&&++Me;return Me}var bN=Yd(rN),wN=Yd(nN);function _N(j){return"\\"+sN[j]}function xN(j,re){return j==null?t:j[re]}function Aa(j){return ZP.test(j)}function SN(j){return XP.test(j)}function EN(j){for(var re,Z=[];!(re=j.next()).done;)Z.push(re.value);return Z}function ep(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me,at){Z[++re]=[at,Me]}),Z}function u_(j,re){return function(Z){return j(re(Z))}}function us(j,re){for(var Z=-1,Me=j.length,at=0,Dt=[];++Z<Me;){var Cr=j[Z];(Cr===re||Cr===d)&&(j[Z]=d,Dt[at++]=Z)}return Dt}function Ec(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me){Z[++re]=Me}),Z}function ON(j){var re=-1,Z=Array(j.size);return j.forEach(function(Me){Z[++re]=[Me,Me]}),Z}function TN(j,re,Z){for(var Me=Z-1,at=j.length;++Me<at;)if(j[Me]===re)return Me;return-1}function AN(j,re,Z){for(var Me=Z+1;Me--;)if(j[Me]===re)return Me;return Me}function ka(j){return Aa(j)?IN(j):hN(j)}function ii(j){return Aa(j)?CN(j):dN(j)}function c_(j){for(var re=j.length;re--&&gr.test(j.charAt(re)););return re}var kN=Yd(iN);function IN(j){for(var re=Vd.lastIndex=0;Vd.test(j);)++re;return re}function CN(j){return j.match(Vd)||[]}function PN(j){return j.match(KP)||[]}var NN=function j(re){re=re==null?Br:Ia.defaults(Br.Object(),re,Ia.pick(Br,eN));var Z=re.Array,Me=re.Date,at=re.Error,Dt=re.Function,Cr=re.Math,Jt=re.Object,tp=re.RegExp,RN=re.String,Vn=re.TypeError,Oc=Z.prototype,MN=Dt.prototype,Ca=Jt.prototype,Tc=re["__core-js_shared__"],Ac=MN.toString,$t=Ca.hasOwnProperty,DN=0,l_=function(){var s=/[^.]+$/.exec(Tc&&Tc.keys&&Tc.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),kc=Ca.toString,FN=Ac.call(Jt),LN=Br._,qN=tp("^"+Ac.call($t).replace(ar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ic=Gw?re.Buffer:t,cs=re.Symbol,Cc=re.Uint8Array,f_=Ic?Ic.allocUnsafe:t,Pc=u_(Jt.getPrototypeOf,Jt),h_=Jt.create,d_=Ca.propertyIsEnumerable,Nc=Oc.splice,p_=cs?cs.isConcatSpreadable:t,qo=cs?cs.iterator:t,Rs=cs?cs.toStringTag:t,Rc=function(){try{var s=qs(Jt,"defineProperty");return s({},"",{}),s}catch{}}(),jN=re.clearTimeout!==Br.clearTimeout&&re.clearTimeout,UN=Me&&Me.now!==Br.Date.now&&Me.now,$N=re.setTimeout!==Br.setTimeout&&re.setTimeout,Mc=Cr.ceil,Dc=Cr.floor,rp=Jt.getOwnPropertySymbols,BN=Ic?Ic.isBuffer:t,m_=re.isFinite,VN=Oc.join,WN=u_(Jt.keys,Jt),Pr=Cr.max,Qr=Cr.min,zN=Me.now,HN=re.parseInt,y_=Cr.random,GN=Oc.reverse,np=qs(re,"DataView"),jo=qs(re,"Map"),ip=qs(re,"Promise"),Pa=qs(re,"Set"),Uo=qs(re,"WeakMap"),$o=qs(Jt,"create"),Fc=Uo&&new Uo,Na={},QN=js(np),JN=js(jo),YN=js(ip),KN=js(Pa),ZN=js(Uo),Lc=cs?cs.prototype:t,Bo=Lc?Lc.valueOf:t,g_=Lc?Lc.toString:t;function S(s){if(pr(s)&&!ot(s)&&!(s instanceof St)){if(s instanceof Wn)return s;if($t.call(s,"__wrapped__"))return vx(s)}return new Wn(s)}var Ra=function(){function s(){}return function(o){if(!lr(o))return{};if(h_)return h_(o);s.prototype=o;var l=new s;return s.prototype=t,l}}();function qc(){}function Wn(s,o){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=t}S.templateSettings={escape:Hr,evaluate:Fr,interpolate:Ut,variable:"",imports:{_:S}},S.prototype=qc.prototype,S.prototype.constructor=S,Wn.prototype=Ra(qc.prototype),Wn.prototype.constructor=Wn;function St(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Se,this.__views__=[]}function XN(){var s=new St(this.__wrapped__);return s.__actions__=ln(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=ln(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=ln(this.__views__),s}function eR(){if(this.__filtered__){var s=new St(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function tR(){var s=this.__wrapped__.value(),o=this.__dir__,l=ot(s),p=o<0,v=l?s.length:0,O=dM(0,v,this.__views__),N=O.start,F=O.end,z=F-N,ae=p?F:N-1,ce=this.__iteratees__,me=ce.length,ke=0,$e=Qr(z,this.__takeCount__);if(!l||!p&&v==z&&$e==z)return $_(s,this.__actions__);var Ye=[];e:for(;z--&&ke<$e;){ae+=o;for(var ht=-1,Ke=s[ae];++ht<me;){var _t=ce[ht],At=_t.iteratee,In=_t.type,an=At(Ke);if(In==ge)Ke=an;else if(!an){if(In==Ce)continue e;break e}}Ye[ke++]=Ke}return Ye}St.prototype=Ra(qc.prototype),St.prototype.constructor=St;function Ms(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function rR(){this.__data__=$o?$o(null):{},this.size=0}function nR(s){var o=this.has(s)&&delete this.__data__[s];return this.size-=o?1:0,o}function iR(s){var o=this.__data__;if($o){var l=o[s];return l===f?t:l}return $t.call(o,s)?o[s]:t}function sR(s){var o=this.__data__;return $o?o[s]!==t:$t.call(o,s)}function aR(s,o){var l=this.__data__;return this.size+=this.has(s)?0:1,l[s]=$o&&o===t?f:o,this}Ms.prototype.clear=rR,Ms.prototype.delete=nR,Ms.prototype.get=iR,Ms.prototype.has=sR,Ms.prototype.set=aR;function ki(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function oR(){this.__data__=[],this.size=0}function uR(s){var o=this.__data__,l=jc(o,s);if(l<0)return!1;var p=o.length-1;return l==p?o.pop():Nc.call(o,l,1),--this.size,!0}function cR(s){var o=this.__data__,l=jc(o,s);return l<0?t:o[l][1]}function lR(s){return jc(this.__data__,s)>-1}function fR(s,o){var l=this.__data__,p=jc(l,s);return p<0?(++this.size,l.push([s,o])):l[p][1]=o,this}ki.prototype.clear=oR,ki.prototype.delete=uR,ki.prototype.get=cR,ki.prototype.has=lR,ki.prototype.set=fR;function Ii(s){var o=-1,l=s==null?0:s.length;for(this.clear();++o<l;){var p=s[o];this.set(p[0],p[1])}}function hR(){this.size=0,this.__data__={hash:new Ms,map:new(jo||ki),string:new Ms}}function dR(s){var o=Kc(this,s).delete(s);return this.size-=o?1:0,o}function pR(s){return Kc(this,s).get(s)}function mR(s){return Kc(this,s).has(s)}function yR(s,o){var l=Kc(this,s),p=l.size;return l.set(s,o),this.size+=l.size==p?0:1,this}Ii.prototype.clear=hR,Ii.prototype.delete=dR,Ii.prototype.get=pR,Ii.prototype.has=mR,Ii.prototype.set=yR;function Ds(s){var o=-1,l=s==null?0:s.length;for(this.__data__=new Ii;++o<l;)this.add(s[o])}function gR(s){return this.__data__.set(s,f),this}function vR(s){return this.__data__.has(s)}Ds.prototype.add=Ds.prototype.push=gR,Ds.prototype.has=vR;function si(s){var o=this.__data__=new ki(s);this.size=o.size}function bR(){this.__data__=new ki,this.size=0}function wR(s){var o=this.__data__,l=o.delete(s);return this.size=o.size,l}function _R(s){return this.__data__.get(s)}function xR(s){return this.__data__.has(s)}function SR(s,o){var l=this.__data__;if(l instanceof ki){var p=l.__data__;if(!jo||p.length<i-1)return p.push([s,o]),this.size=++l.size,this;l=this.__data__=new Ii(p)}return l.set(s,o),this.size=l.size,this}si.prototype.clear=bR,si.prototype.delete=wR,si.prototype.get=_R,si.prototype.has=xR,si.prototype.set=SR;function v_(s,o){var l=ot(s),p=!l&&Us(s),v=!l&&!p&&ps(s),O=!l&&!p&&!v&&La(s),N=l||p||v||O,F=N?Zd(s.length,RN):[],z=F.length;for(var ae in s)(o||$t.call(s,ae))&&!(N&&(ae=="length"||v&&(ae=="offset"||ae=="parent")||O&&(ae=="buffer"||ae=="byteLength"||ae=="byteOffset")||Ri(ae,z)))&&F.push(ae);return F}function b_(s){var o=s.length;return o?s[mp(0,o-1)]:t}function ER(s,o){return Zc(ln(s),Fs(o,0,s.length))}function OR(s){return Zc(ln(s))}function sp(s,o,l){(l!==t&&!ai(s[o],l)||l===t&&!(o in s))&&Ci(s,o,l)}function Vo(s,o,l){var p=s[o];(!($t.call(s,o)&&ai(p,l))||l===t&&!(o in s))&&Ci(s,o,l)}function jc(s,o){for(var l=s.length;l--;)if(ai(s[l][0],o))return l;return-1}function TR(s,o,l,p){return ls(s,function(v,O,N){o(p,v,l(v),N)}),p}function w_(s,o){return s&&hi(o,qr(o),s)}function AR(s,o){return s&&hi(o,hn(o),s)}function Ci(s,o,l){o=="__proto__"&&Rc?Rc(s,o,{configurable:!0,enumerable:!0,value:l,writable:!0}):s[o]=l}function ap(s,o){for(var l=-1,p=o.length,v=Z(p),O=s==null;++l<p;)v[l]=O?t:Up(s,o[l]);return v}function Fs(s,o,l){return s===s&&(l!==t&&(s=s<=l?s:l),o!==t&&(s=s>=o?s:o)),s}function zn(s,o,l,p,v,O){var N,F=o&y,z=o&g,ae=o&m;if(l&&(N=v?l(s,p,v,O):l(s)),N!==t)return N;if(!lr(s))return s;var ce=ot(s);if(ce){if(N=mM(s),!F)return ln(s,N)}else{var me=Jr(s),ke=me==Q||me==q;if(ps(s))return W_(s,F);if(me==xe||me==Et||ke&&!v){if(N=z||ke?{}:cx(s),!F)return z?iM(s,AR(N,s)):nM(s,w_(N,s))}else{if(!Xt[me])return v?s:{};N=yM(s,me,F)}}O||(O=new si);var $e=O.get(s);if($e)return $e;O.set(s,N),qx(s)?s.forEach(function(Ke){N.add(zn(Ke,o,l,Ke,s,O))}):Fx(s)&&s.forEach(function(Ke,_t){N.set(_t,zn(Ke,o,l,_t,s,O))});var Ye=ae?z?Tp:Op:z?hn:qr,ht=ce?t:Ye(s);return Bn(ht||s,function(Ke,_t){ht&&(_t=Ke,Ke=s[_t]),Vo(N,_t,zn(Ke,o,l,_t,s,O))}),N}function kR(s){var o=qr(s);return function(l){return __(l,s,o)}}function __(s,o,l){var p=l.length;if(s==null)return!p;for(s=Jt(s);p--;){var v=l[p],O=o[v],N=s[v];if(N===t&&!(v in s)||!O(N))return!1}return!0}function x_(s,o,l){if(typeof s!="function")throw new Vn(u);return Yo(function(){s.apply(t,l)},o)}function Wo(s,o,l,p){var v=-1,O=xc,N=!0,F=s.length,z=[],ae=o.length;if(!F)return z;l&&(o=or(o,Tn(l))),p?(O=Hd,N=!1):o.length>=i&&(O=Lo,N=!1,o=new Ds(o));e:for(;++v<F;){var ce=s[v],me=l==null?ce:l(ce);if(ce=p||ce!==0?ce:0,N&&me===me){for(var ke=ae;ke--;)if(o[ke]===me)continue e;z.push(ce)}else O(o,me,p)||z.push(ce)}return z}var ls=J_(fi),S_=J_(up,!0);function IR(s,o){var l=!0;return ls(s,function(p,v,O){return l=!!o(p,v,O),l}),l}function Uc(s,o,l){for(var p=-1,v=s.length;++p<v;){var O=s[p],N=o(O);if(N!=null&&(F===t?N===N&&!kn(N):l(N,F)))var F=N,z=O}return z}function CR(s,o,l,p){var v=s.length;for(l=ft(l),l<0&&(l=-l>v?0:v+l),p=p===t||p>v?v:ft(p),p<0&&(p+=v),p=l>p?0:Ux(p);l<p;)s[l++]=o;return s}function E_(s,o){var l=[];return ls(s,function(p,v,O){o(p,v,O)&&l.push(p)}),l}function Vr(s,o,l,p,v){var O=-1,N=s.length;for(l||(l=vM),v||(v=[]);++O<N;){var F=s[O];o>0&&l(F)?o>1?Vr(F,o-1,l,p,v):os(v,F):p||(v[v.length]=F)}return v}var op=Y_(),O_=Y_(!0);function fi(s,o){return s&&op(s,o,qr)}function up(s,o){return s&&O_(s,o,qr)}function $c(s,o){return as(o,function(l){return Mi(s[l])})}function Ls(s,o){o=hs(o,s);for(var l=0,p=o.length;s!=null&&l<p;)s=s[di(o[l++])];return l&&l==p?s:t}function T_(s,o,l){var p=o(s);return ot(s)?p:os(p,l(s))}function nn(s){return s==null?s===t?mt:V:Rs&&Rs in Jt(s)?hM(s):OM(s)}function cp(s,o){return s>o}function PR(s,o){return s!=null&&$t.call(s,o)}function NR(s,o){return s!=null&&o in Jt(s)}function RR(s,o,l){return s>=Qr(o,l)&&s<Pr(o,l)}function lp(s,o,l){for(var p=l?Hd:xc,v=s[0].length,O=s.length,N=O,F=Z(O),z=1/0,ae=[];N--;){var ce=s[N];N&&o&&(ce=or(ce,Tn(o))),z=Qr(ce.length,z),F[N]=!l&&(o||v>=120&&ce.length>=120)?new Ds(N&&ce):t}ce=s[0];var me=-1,ke=F[0];e:for(;++me<v&&ae.length<z;){var $e=ce[me],Ye=o?o($e):$e;if($e=l||$e!==0?$e:0,!(ke?Lo(ke,Ye):p(ae,Ye,l))){for(N=O;--N;){var ht=F[N];if(!(ht?Lo(ht,Ye):p(s[N],Ye,l)))continue e}ke&&ke.push(Ye),ae.push($e)}}return ae}function MR(s,o,l,p){return fi(s,function(v,O,N){o(p,l(v),O,N)}),p}function zo(s,o,l){o=hs(o,s),s=dx(s,o);var p=s==null?s:s[di(Gn(o))];return p==null?t:On(p,s,l)}function A_(s){return pr(s)&&nn(s)==Et}function DR(s){return pr(s)&&nn(s)==Wt}function FR(s){return pr(s)&&nn(s)==De}function Ho(s,o,l,p,v){return s===o?!0:s==null||o==null||!pr(s)&&!pr(o)?s!==s&&o!==o:LR(s,o,l,p,Ho,v)}function LR(s,o,l,p,v,O){var N=ot(s),F=ot(o),z=N?Xe:Jr(s),ae=F?Xe:Jr(o);z=z==Et?xe:z,ae=ae==Et?xe:ae;var ce=z==xe,me=ae==xe,ke=z==ae;if(ke&&ps(s)){if(!ps(o))return!1;N=!0,ce=!1}if(ke&&!ce)return O||(O=new si),N||La(s)?ax(s,o,l,p,v,O):lM(s,o,z,l,p,v,O);if(!(l&b)){var $e=ce&&$t.call(s,"__wrapped__"),Ye=me&&$t.call(o,"__wrapped__");if($e||Ye){var ht=$e?s.value():s,Ke=Ye?o.value():o;return O||(O=new si),v(ht,Ke,l,p,O)}}return ke?(O||(O=new si),fM(s,o,l,p,v,O)):!1}function qR(s){return pr(s)&&Jr(s)==J}function fp(s,o,l,p){var v=l.length,O=v,N=!p;if(s==null)return!O;for(s=Jt(s);v--;){var F=l[v];if(N&&F[2]?F[1]!==s[F[0]]:!(F[0]in s))return!1}for(;++v<O;){F=l[v];var z=F[0],ae=s[z],ce=F[1];if(N&&F[2]){if(ae===t&&!(z in s))return!1}else{var me=new si;if(p)var ke=p(ae,ce,z,s,o,me);if(!(ke===t?Ho(ce,ae,b|I,p,me):ke))return!1}}return!0}function k_(s){if(!lr(s)||wM(s))return!1;var o=Mi(s)?qN:et;return o.test(js(s))}function jR(s){return pr(s)&&nn(s)==se}function UR(s){return pr(s)&&Jr(s)==_e}function $R(s){return pr(s)&&il(s.length)&&!!rr[nn(s)]}function I_(s){return typeof s=="function"?s:s==null?dn:typeof s=="object"?ot(s)?N_(s[0],s[1]):P_(s):Kx(s)}function hp(s){if(!Jo(s))return WN(s);var o=[];for(var l in Jt(s))$t.call(s,l)&&l!="constructor"&&o.push(l);return o}function BR(s){if(!lr(s))return EM(s);var o=Jo(s),l=[];for(var p in s)p=="constructor"&&(o||!$t.call(s,p))||l.push(p);return l}function dp(s,o){return s<o}function C_(s,o){var l=-1,p=fn(s)?Z(s.length):[];return ls(s,function(v,O,N){p[++l]=o(v,O,N)}),p}function P_(s){var o=kp(s);return o.length==1&&o[0][2]?fx(o[0][0],o[0][1]):function(l){return l===s||fp(l,s,o)}}function N_(s,o){return Cp(s)&&lx(o)?fx(di(s),o):function(l){var p=Up(l,s);return p===t&&p===o?$p(l,s):Ho(o,p,b|I)}}function Bc(s,o,l,p,v){s!==o&&op(o,function(O,N){if(v||(v=new si),lr(O))VR(s,o,N,l,Bc,p,v);else{var F=p?p(Np(s,N),O,N+"",s,o,v):t;F===t&&(F=O),sp(s,N,F)}},hn)}function VR(s,o,l,p,v,O,N){var F=Np(s,l),z=Np(o,l),ae=N.get(z);if(ae){sp(s,l,ae);return}var ce=O?O(F,z,l+"",s,o,N):t,me=ce===t;if(me){var ke=ot(z),$e=!ke&&ps(z),Ye=!ke&&!$e&&La(z);ce=z,ke||$e||Ye?ot(F)?ce=F:vr(F)?ce=ln(F):$e?(me=!1,ce=W_(z,!0)):Ye?(me=!1,ce=z_(z,!0)):ce=[]:Ko(z)||Us(z)?(ce=F,Us(F)?ce=$x(F):(!lr(F)||Mi(F))&&(ce=cx(z))):me=!1}me&&(N.set(z,ce),v(ce,z,p,O,N),N.delete(z)),sp(s,l,ce)}function R_(s,o){var l=s.length;if(l)return o+=o<0?l:0,Ri(o,l)?s[o]:t}function M_(s,o,l){o.length?o=or(o,function(O){return ot(O)?function(N){return Ls(N,O.length===1?O[0]:O)}:O}):o=[dn];var p=-1;o=or(o,Tn(Qe()));var v=C_(s,function(O,N,F){var z=or(o,function(ae){return ae(O)});return{criteria:z,index:++p,value:O}});return yN(v,function(O,N){return rM(O,N,l)})}function WR(s,o){return D_(s,o,function(l,p){return $p(s,p)})}function D_(s,o,l){for(var p=-1,v=o.length,O={};++p<v;){var N=o[p],F=Ls(s,N);l(F,N)&&Go(O,hs(N,s),F)}return O}function zR(s){return function(o){return Ls(o,s)}}function pp(s,o,l,p){var v=p?mN:Ta,O=-1,N=o.length,F=s;for(s===o&&(o=ln(o)),l&&(F=or(s,Tn(l)));++O<N;)for(var z=0,ae=o[O],ce=l?l(ae):ae;(z=v(F,ce,z,p))>-1;)F!==s&&Nc.call(F,z,1),Nc.call(s,z,1);return s}function F_(s,o){for(var l=s?o.length:0,p=l-1;l--;){var v=o[l];if(l==p||v!==O){var O=v;Ri(v)?Nc.call(s,v,1):vp(s,v)}}return s}function mp(s,o){return s+Dc(y_()*(o-s+1))}function HR(s,o,l,p){for(var v=-1,O=Pr(Mc((o-s)/(l||1)),0),N=Z(O);O--;)N[p?O:++v]=s,s+=l;return N}function yp(s,o){var l="";if(!s||o<1||o>te)return l;do o%2&&(l+=s),o=Dc(o/2),o&&(s+=s);while(o);return l}function yt(s,o){return Rp(hx(s,o,dn),s+"")}function GR(s){return b_(qa(s))}function QR(s,o){var l=qa(s);return Zc(l,Fs(o,0,l.length))}function Go(s,o,l,p){if(!lr(s))return s;o=hs(o,s);for(var v=-1,O=o.length,N=O-1,F=s;F!=null&&++v<O;){var z=di(o[v]),ae=l;if(z==="__proto__"||z==="constructor"||z==="prototype")return s;if(v!=N){var ce=F[z];ae=p?p(ce,z,F):t,ae===t&&(ae=lr(ce)?ce:Ri(o[v+1])?[]:{})}Vo(F,z,ae),F=F[z]}return s}var L_=Fc?function(s,o){return Fc.set(s,o),s}:dn,JR=Rc?function(s,o){return Rc(s,"toString",{configurable:!0,enumerable:!1,value:Vp(o),writable:!0})}:dn;function YR(s){return Zc(qa(s))}function Hn(s,o,l){var p=-1,v=s.length;o<0&&(o=-o>v?0:v+o),l=l>v?v:l,l<0&&(l+=v),v=o>l?0:l-o>>>0,o>>>=0;for(var O=Z(v);++p<v;)O[p]=s[p+o];return O}function KR(s,o){var l;return ls(s,function(p,v,O){return l=o(p,v,O),!l}),!!l}function Vc(s,o,l){var p=0,v=s==null?p:s.length;if(typeof o=="number"&&o===o&&v<=vt){for(;p<v;){var O=p+v>>>1,N=s[O];N!==null&&!kn(N)&&(l?N<=o:N<o)?p=O+1:v=O}return v}return gp(s,o,dn,l)}function gp(s,o,l,p){var v=0,O=s==null?0:s.length;if(O===0)return 0;o=l(o);for(var N=o!==o,F=o===null,z=kn(o),ae=o===t;v<O;){var ce=Dc((v+O)/2),me=l(s[ce]),ke=me!==t,$e=me===null,Ye=me===me,ht=kn(me);if(N)var Ke=p||Ye;else ae?Ke=Ye&&(p||ke):F?Ke=Ye&&ke&&(p||!$e):z?Ke=Ye&&ke&&!$e&&(p||!ht):$e||ht?Ke=!1:Ke=p?me<=o:me<o;Ke?v=ce+1:O=ce}return Qr(O,Ze)}function q_(s,o){for(var l=-1,p=s.length,v=0,O=[];++l<p;){var N=s[l],F=o?o(N):N;if(!l||!ai(F,z)){var z=F;O[v++]=N===0?0:N}}return O}function j_(s){return typeof s=="number"?s:kn(s)?Le:+s}function An(s){if(typeof s=="string")return s;if(ot(s))return or(s,An)+"";if(kn(s))return g_?g_.call(s):"";var o=s+"";return o=="0"&&1/s==-pe?"-0":o}function fs(s,o,l){var p=-1,v=xc,O=s.length,N=!0,F=[],z=F;if(l)N=!1,v=Hd;else if(O>=i){var ae=o?null:uM(s);if(ae)return Ec(ae);N=!1,v=Lo,z=new Ds}else z=o?[]:F;e:for(;++p<O;){var ce=s[p],me=o?o(ce):ce;if(ce=l||ce!==0?ce:0,N&&me===me){for(var ke=z.length;ke--;)if(z[ke]===me)continue e;o&&z.push(me),F.push(ce)}else v(z,me,l)||(z!==F&&z.push(me),F.push(ce))}return F}function vp(s,o){return o=hs(o,s),s=dx(s,o),s==null||delete s[di(Gn(o))]}function U_(s,o,l,p){return Go(s,o,l(Ls(s,o)),p)}function Wc(s,o,l,p){for(var v=s.length,O=p?v:-1;(p?O--:++O<v)&&o(s[O],O,s););return l?Hn(s,p?0:O,p?O+1:v):Hn(s,p?O+1:0,p?v:O)}function $_(s,o){var l=s;return l instanceof St&&(l=l.value()),Gd(o,function(p,v){return v.func.apply(v.thisArg,os([p],v.args))},l)}function bp(s,o,l){var p=s.length;if(p<2)return p?fs(s[0]):[];for(var v=-1,O=Z(p);++v<p;)for(var N=s[v],F=-1;++F<p;)F!=v&&(O[v]=Wo(O[v]||N,s[F],o,l));return fs(Vr(O,1),o,l)}function B_(s,o,l){for(var p=-1,v=s.length,O=o.length,N={};++p<v;){var F=p<O?o[p]:t;l(N,s[p],F)}return N}function wp(s){return vr(s)?s:[]}function _p(s){return typeof s=="function"?s:dn}function hs(s,o){return ot(s)?s:Cp(s,o)?[s]:gx(jt(s))}var ZR=yt;function ds(s,o,l){var p=s.length;return l=l===t?p:l,!o&&l>=p?s:Hn(s,o,l)}var V_=jN||function(s){return Br.clearTimeout(s)};function W_(s,o){if(o)return s.slice();var l=s.length,p=f_?f_(l):new s.constructor(l);return s.copy(p),p}function xp(s){var o=new s.constructor(s.byteLength);return new Cc(o).set(new Cc(s)),o}function XR(s,o){var l=o?xp(s.buffer):s.buffer;return new s.constructor(l,s.byteOffset,s.byteLength)}function eM(s){var o=new s.constructor(s.source,Ve.exec(s));return o.lastIndex=s.lastIndex,o}function tM(s){return Bo?Jt(Bo.call(s)):{}}function z_(s,o){var l=o?xp(s.buffer):s.buffer;return new s.constructor(l,s.byteOffset,s.length)}function H_(s,o){if(s!==o){var l=s!==t,p=s===null,v=s===s,O=kn(s),N=o!==t,F=o===null,z=o===o,ae=kn(o);if(!F&&!ae&&!O&&s>o||O&&N&&z&&!F&&!ae||p&&N&&z||!l&&z||!v)return 1;if(!p&&!O&&!ae&&s<o||ae&&l&&v&&!p&&!O||F&&l&&v||!N&&v||!z)return-1}return 0}function rM(s,o,l){for(var p=-1,v=s.criteria,O=o.criteria,N=v.length,F=l.length;++p<N;){var z=H_(v[p],O[p]);if(z){if(p>=F)return z;var ae=l[p];return z*(ae=="desc"?-1:1)}}return s.index-o.index}function G_(s,o,l,p){for(var v=-1,O=s.length,N=l.length,F=-1,z=o.length,ae=Pr(O-N,0),ce=Z(z+ae),me=!p;++F<z;)ce[F]=o[F];for(;++v<N;)(me||v<O)&&(ce[l[v]]=s[v]);for(;ae--;)ce[F++]=s[v++];return ce}function Q_(s,o,l,p){for(var v=-1,O=s.length,N=-1,F=l.length,z=-1,ae=o.length,ce=Pr(O-F,0),me=Z(ce+ae),ke=!p;++v<ce;)me[v]=s[v];for(var $e=v;++z<ae;)me[$e+z]=o[z];for(;++N<F;)(ke||v<O)&&(me[$e+l[N]]=s[v++]);return me}function ln(s,o){var l=-1,p=s.length;for(o||(o=Z(p));++l<p;)o[l]=s[l];return o}function hi(s,o,l,p){var v=!l;l||(l={});for(var O=-1,N=o.length;++O<N;){var F=o[O],z=p?p(l[F],s[F],F,l,s):t;z===t&&(z=s[F]),v?Ci(l,F,z):Vo(l,F,z)}return l}function nM(s,o){return hi(s,Ip(s),o)}function iM(s,o){return hi(s,ox(s),o)}function zc(s,o){return function(l,p){var v=ot(l)?cN:TR,O=o?o():{};return v(l,s,Qe(p,2),O)}}function Ma(s){return yt(function(o,l){var p=-1,v=l.length,O=v>1?l[v-1]:t,N=v>2?l[2]:t;for(O=s.length>3&&typeof O=="function"?(v--,O):t,N&&sn(l[0],l[1],N)&&(O=v<3?t:O,v=1),o=Jt(o);++p<v;){var F=l[p];F&&s(o,F,p,O)}return o})}function J_(s,o){return function(l,p){if(l==null)return l;if(!fn(l))return s(l,p);for(var v=l.length,O=o?v:-1,N=Jt(l);(o?O--:++O<v)&&p(N[O],O,N)!==!1;);return l}}function Y_(s){return function(o,l,p){for(var v=-1,O=Jt(o),N=p(o),F=N.length;F--;){var z=N[s?F:++v];if(l(O[z],z,O)===!1)break}return o}}function sM(s,o,l){var p=o&x,v=Qo(s);function O(){var N=this&&this!==Br&&this instanceof O?v:s;return N.apply(p?l:this,arguments)}return O}function K_(s){return function(o){o=jt(o);var l=Aa(o)?ii(o):t,p=l?l[0]:o.charAt(0),v=l?ds(l,1).join(""):o.slice(1);return p[s]()+v}}function Da(s){return function(o){return Gd(Jx(Qx(o).replace(JP,"")),s,"")}}function Qo(s){return function(){var o=arguments;switch(o.length){case 0:return new s;case 1:return new s(o[0]);case 2:return new s(o[0],o[1]);case 3:return new s(o[0],o[1],o[2]);case 4:return new s(o[0],o[1],o[2],o[3]);case 5:return new s(o[0],o[1],o[2],o[3],o[4]);case 6:return new s(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new s(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var l=Ra(s.prototype),p=s.apply(l,o);return lr(p)?p:l}}function aM(s,o,l){var p=Qo(s);function v(){for(var O=arguments.length,N=Z(O),F=O,z=Fa(v);F--;)N[F]=arguments[F];var ae=O<3&&N[0]!==z&&N[O-1]!==z?[]:us(N,z);if(O-=ae.length,O<l)return rx(s,o,Hc,v.placeholder,t,N,ae,t,t,l-O);var ce=this&&this!==Br&&this instanceof v?p:s;return On(ce,this,N)}return v}function Z_(s){return function(o,l,p){var v=Jt(o);if(!fn(o)){var O=Qe(l,3);o=qr(o),l=function(F){return O(v[F],F,v)}}var N=s(o,l,p);return N>-1?v[O?o[N]:N]:t}}function X_(s){return Ni(function(o){var l=o.length,p=l,v=Wn.prototype.thru;for(s&&o.reverse();p--;){var O=o[p];if(typeof O!="function")throw new Vn(u);if(v&&!N&&Yc(O)=="wrapper")var N=new Wn([],!0)}for(p=N?p:l;++p<l;){O=o[p];var F=Yc(O),z=F=="wrapper"?Ap(O):t;z&&Pp(z[0])&&z[1]==(K|P|U|X)&&!z[4].length&&z[9]==1?N=N[Yc(z[0])].apply(N,z[3]):N=O.length==1&&Pp(O)?N[F]():N.thru(O)}return function(){var ae=arguments,ce=ae[0];if(N&&ae.length==1&&ot(ce))return N.plant(ce).value();for(var me=0,ke=l?o[me].apply(this,ae):ce;++me<l;)ke=o[me].call(this,ke);return ke}})}function Hc(s,o,l,p,v,O,N,F,z,ae){var ce=o&K,me=o&x,ke=o&_,$e=o&(P|M),Ye=o&fe,ht=ke?t:Qo(s);function Ke(){for(var _t=arguments.length,At=Z(_t),In=_t;In--;)At[In]=arguments[In];if($e)var an=Fa(Ke),Cn=vN(At,an);if(p&&(At=G_(At,p,v,$e)),O&&(At=Q_(At,O,N,$e)),_t-=Cn,$e&&_t<ae){var br=us(At,an);return rx(s,o,Hc,Ke.placeholder,l,At,br,F,z,ae-_t)}var oi=me?l:this,Fi=ke?oi[s]:s;return _t=At.length,F?At=TM(At,F):Ye&&_t>1&&At.reverse(),ce&&z<_t&&(At.length=z),this&&this!==Br&&this instanceof Ke&&(Fi=ht||Qo(Fi)),Fi.apply(oi,At)}return Ke}function ex(s,o){return function(l,p){return MR(l,s,o(p),{})}}function Gc(s,o){return function(l,p){var v;if(l===t&&p===t)return o;if(l!==t&&(v=l),p!==t){if(v===t)return p;typeof l=="string"||typeof p=="string"?(l=An(l),p=An(p)):(l=j_(l),p=j_(p)),v=s(l,p)}return v}}function Sp(s){return Ni(function(o){return o=or(o,Tn(Qe())),yt(function(l){var p=this;return s(o,function(v){return On(v,p,l)})})})}function Qc(s,o){o=o===t?" ":An(o);var l=o.length;if(l<2)return l?yp(o,s):o;var p=yp(o,Mc(s/ka(o)));return Aa(o)?ds(ii(p),0,s).join(""):p.slice(0,s)}function oM(s,o,l,p){var v=o&x,O=Qo(s);function N(){for(var F=-1,z=arguments.length,ae=-1,ce=p.length,me=Z(ce+z),ke=this&&this!==Br&&this instanceof N?O:s;++ae<ce;)me[ae]=p[ae];for(;z--;)me[ae++]=arguments[++F];return On(ke,v?l:this,me)}return N}function tx(s){return function(o,l,p){return p&&typeof p!="number"&&sn(o,l,p)&&(l=p=t),o=Di(o),l===t?(l=o,o=0):l=Di(l),p=p===t?o<l?1:-1:Di(p),HR(o,l,p,s)}}function Jc(s){return function(o,l){return typeof o=="string"&&typeof l=="string"||(o=Qn(o),l=Qn(l)),s(o,l)}}function rx(s,o,l,p,v,O,N,F,z,ae){var ce=o&P,me=ce?N:t,ke=ce?t:N,$e=ce?O:t,Ye=ce?t:O;o|=ce?U:W,o&=~(ce?W:U),o&A||(o&=~(x|_));var ht=[s,o,v,$e,me,Ye,ke,F,z,ae],Ke=l.apply(t,ht);return Pp(s)&&px(Ke,ht),Ke.placeholder=p,mx(Ke,s,o)}function Ep(s){var o=Cr[s];return function(l,p){if(l=Qn(l),p=p==null?0:Qr(ft(p),292),p&&m_(l)){var v=(jt(l)+"e").split("e"),O=o(v[0]+"e"+(+v[1]+p));return v=(jt(O)+"e").split("e"),+(v[0]+"e"+(+v[1]-p))}return o(l)}}var uM=Pa&&1/Ec(new Pa([,-0]))[1]==pe?function(s){return new Pa(s)}:Hp;function nx(s){return function(o){var l=Jr(o);return l==J?ep(o):l==_e?ON(o):gN(o,s(o))}}function Pi(s,o,l,p,v,O,N,F){var z=o&_;if(!z&&typeof s!="function")throw new Vn(u);var ae=p?p.length:0;if(ae||(o&=~(U|W),p=v=t),N=N===t?N:Pr(ft(N),0),F=F===t?F:ft(F),ae-=v?v.length:0,o&W){var ce=p,me=v;p=v=t}var ke=z?t:Ap(s),$e=[s,o,l,p,v,ce,me,O,N,F];if(ke&&SM($e,ke),s=$e[0],o=$e[1],l=$e[2],p=$e[3],v=$e[4],F=$e[9]=$e[9]===t?z?0:s.length:Pr($e[9]-ae,0),!F&&o&(P|M)&&(o&=~(P|M)),!o||o==x)var Ye=sM(s,o,l);else o==P||o==M?Ye=aM(s,o,F):(o==U||o==(x|U))&&!v.length?Ye=oM(s,o,l,p):Ye=Hc.apply(t,$e);var ht=ke?L_:px;return mx(ht(Ye,$e),s,o)}function ix(s,o,l,p){return s===t||ai(s,Ca[l])&&!$t.call(p,l)?o:s}function sx(s,o,l,p,v,O){return lr(s)&&lr(o)&&(O.set(o,s),Bc(s,o,t,sx,O),O.delete(o)),s}function cM(s){return Ko(s)?t:s}function ax(s,o,l,p,v,O){var N=l&b,F=s.length,z=o.length;if(F!=z&&!(N&&z>F))return!1;var ae=O.get(s),ce=O.get(o);if(ae&&ce)return ae==o&&ce==s;var me=-1,ke=!0,$e=l&I?new Ds:t;for(O.set(s,o),O.set(o,s);++me<F;){var Ye=s[me],ht=o[me];if(p)var Ke=N?p(ht,Ye,me,o,s,O):p(Ye,ht,me,s,o,O);if(Ke!==t){if(Ke)continue;ke=!1;break}if($e){if(!Qd(o,function(_t,At){if(!Lo($e,At)&&(Ye===_t||v(Ye,_t,l,p,O)))return $e.push(At)})){ke=!1;break}}else if(!(Ye===ht||v(Ye,ht,l,p,O))){ke=!1;break}}return O.delete(s),O.delete(o),ke}function lM(s,o,l,p,v,O,N){switch(l){case Gt:if(s.byteLength!=o.byteLength||s.byteOffset!=o.byteOffset)return!1;s=s.buffer,o=o.buffer;case Wt:return!(s.byteLength!=o.byteLength||!O(new Cc(s),new Cc(o)));case Ot:case De:case ee:return ai(+s,+o);case B:return s.name==o.name&&s.message==o.message;case se:case Ge:return s==o+"";case J:var F=ep;case _e:var z=p&b;if(F||(F=Ec),s.size!=o.size&&!z)return!1;var ae=N.get(s);if(ae)return ae==o;p|=I,N.set(s,o);var ce=ax(F(s),F(o),p,v,O,N);return N.delete(s),ce;case pt:if(Bo)return Bo.call(s)==Bo.call(o)}return!1}function fM(s,o,l,p,v,O){var N=l&b,F=Op(s),z=F.length,ae=Op(o),ce=ae.length;if(z!=ce&&!N)return!1;for(var me=z;me--;){var ke=F[me];if(!(N?ke in o:$t.call(o,ke)))return!1}var $e=O.get(s),Ye=O.get(o);if($e&&Ye)return $e==o&&Ye==s;var ht=!0;O.set(s,o),O.set(o,s);for(var Ke=N;++me<z;){ke=F[me];var _t=s[ke],At=o[ke];if(p)var In=N?p(At,_t,ke,o,s,O):p(_t,At,ke,s,o,O);if(!(In===t?_t===At||v(_t,At,l,p,O):In)){ht=!1;break}Ke||(Ke=ke=="constructor")}if(ht&&!Ke){var an=s.constructor,Cn=o.constructor;an!=Cn&&"constructor"in s&&"constructor"in o&&!(typeof an=="function"&&an instanceof an&&typeof Cn=="function"&&Cn instanceof Cn)&&(ht=!1)}return O.delete(s),O.delete(o),ht}function Ni(s){return Rp(hx(s,t,_x),s+"")}function Op(s){return T_(s,qr,Ip)}function Tp(s){return T_(s,hn,ox)}var Ap=Fc?function(s){return Fc.get(s)}:Hp;function Yc(s){for(var o=s.name+"",l=Na[o],p=$t.call(Na,o)?l.length:0;p--;){var v=l[p],O=v.func;if(O==null||O==s)return v.name}return o}function Fa(s){var o=$t.call(S,"placeholder")?S:s;return o.placeholder}function Qe(){var s=S.iteratee||Wp;return s=s===Wp?I_:s,arguments.length?s(arguments[0],arguments[1]):s}function Kc(s,o){var l=s.__data__;return bM(o)?l[typeof o=="string"?"string":"hash"]:l.map}function kp(s){for(var o=qr(s),l=o.length;l--;){var p=o[l],v=s[p];o[l]=[p,v,lx(v)]}return o}function qs(s,o){var l=xN(s,o);return k_(l)?l:t}function hM(s){var o=$t.call(s,Rs),l=s[Rs];try{s[Rs]=t;var p=!0}catch{}var v=kc.call(s);return p&&(o?s[Rs]=l:delete s[Rs]),v}var Ip=rp?function(s){return s==null?[]:(s=Jt(s),as(rp(s),function(o){return d_.call(s,o)}))}:Gp,ox=rp?function(s){for(var o=[];s;)os(o,Ip(s)),s=Pc(s);return o}:Gp,Jr=nn;(np&&Jr(new np(new ArrayBuffer(1)))!=Gt||jo&&Jr(new jo)!=J||ip&&Jr(ip.resolve())!=We||Pa&&Jr(new Pa)!=_e||Uo&&Jr(new Uo)!=Yt)&&(Jr=function(s){var o=nn(s),l=o==xe?s.constructor:t,p=l?js(l):"";if(p)switch(p){case QN:return Gt;case JN:return J;case YN:return We;case KN:return _e;case ZN:return Yt}return o});function dM(s,o,l){for(var p=-1,v=l.length;++p<v;){var O=l[p],N=O.size;switch(O.type){case"drop":s+=N;break;case"dropRight":o-=N;break;case"take":o=Qr(o,s+N);break;case"takeRight":s=Pr(s,o-N);break}}return{start:s,end:o}}function pM(s){var o=s.match(Sn);return o?o[1].split(Un):[]}function ux(s,o,l){o=hs(o,s);for(var p=-1,v=o.length,O=!1;++p<v;){var N=di(o[p]);if(!(O=s!=null&&l(s,N)))break;s=s[N]}return O||++p!=v?O:(v=s==null?0:s.length,!!v&&il(v)&&Ri(N,v)&&(ot(s)||Us(s)))}function mM(s){var o=s.length,l=new s.constructor(o);return o&&typeof s[0]=="string"&&$t.call(s,"index")&&(l.index=s.index,l.input=s.input),l}function cx(s){return typeof s.constructor=="function"&&!Jo(s)?Ra(Pc(s)):{}}function yM(s,o,l){var p=s.constructor;switch(o){case Wt:return xp(s);case Ot:case De:return new p(+s);case Gt:return XR(s,l);case Er:case zt:case sr:case dr:case Ar:case Ht:case H:case G:case st:return z_(s,l);case J:return new p;case ee:case Ge:return new p(s);case se:return eM(s);case _e:return new p;case pt:return tM(s)}}function gM(s,o){var l=o.length;if(!l)return s;var p=l-1;return o[p]=(l>1?"& ":"")+o[p],o=o.join(l>2?", ":" "),s.replace(Ir,`{
|
|
94
94
|
/* [wrapped with `+o+`] */
|
|
95
|
-
`)}function vM(s){return ot(s)||Us(s)||!!(p_&&s&&s[p_])}function Ri(s,o){var l=typeof s;return o=o??te,!!o&&(l=="number"||l!="symbol"&>.test(s))&&s>-1&&s%1==0&&s<o}function sn(s,o,l){if(!lr(l))return!1;var p=typeof o;return(p=="number"?fn(l)&&Ri(o,l.length):p=="string"&&o in l)?ai(l[o],s):!1}function Cp(s,o){if(ot(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||kn(s)?!0:$r.test(s)||!Or.test(s)||o!=null&&s in Jt(o)}function bM(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function Pp(s){var o=Yc(s),l=S[o];if(typeof l!="function"||!(o in St.prototype))return!1;if(s===l)return!0;var p=Ap(l);return!!p&&s===p[0]}function wM(s){return!!l_&&l_ in s}var _M=Tc?Mi:Qp;function Jo(s){var o=s&&s.constructor,l=typeof o=="function"&&o.prototype||Ca;return s===l}function lx(s){return s===s&&!lr(s)}function fx(s,o){return function(l){return l==null?!1:l[s]===o&&(o!==t||s in Jt(l))}}function xM(s){var o=rl(s,function(p){return l.size===h&&l.clear(),p}),l=o.cache;return o}function SM(s,o){var l=s[1],p=o[1],v=l|p,O=v<(x|_|K),N=p==K&&l==P||p==K&&l==X&&s[7].length<=o[8]||p==(K|X)&&o[7].length<=o[8]&&l==P;if(!(O||N))return s;p&x&&(s[2]=o[2],v|=l&x?0:A);var F=o[3];if(F){var z=s[3];s[3]=z?G_(z,F,o[4]):F,s[4]=z?us(s[3],d):o[4]}return F=o[5],F&&(z=s[5],s[5]=z?Q_(z,F,o[6]):F,s[6]=z?us(s[5],d):o[6]),F=o[7],F&&(s[7]=F),p&K&&(s[8]=s[8]==null?o[8]:Qr(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=v,s}function EM(s){var o=[];if(s!=null)for(var l in Jt(s))o.push(l);return o}function OM(s){return kc.call(s)}function hx(s,o,l){return o=Pr(o===t?s.length-1:o,0),function(){for(var p=arguments,v=-1,O=Pr(p.length-o,0),N=Z(O);++v<O;)N[v]=p[o+v];v=-1;for(var F=Z(o+1);++v<o;)F[v]=p[v];return F[o]=l(N),On(s,this,F)}}function dx(s,o){return o.length<2?s:Ls(s,Hn(o,0,-1))}function TM(s,o){for(var l=s.length,p=Qr(o.length,l),v=ln(s);p--;){var O=o[p];s[p]=Ri(O,l)?v[O]:t}return s}function Np(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var px=yx(L_),Yo=$N||function(s,o){return Br.setTimeout(s,o)},Rp=yx(JR);function mx(s,o,l){var p=o+"";return Rp(s,gM(p,AM(pM(p),l)))}function yx(s){var o=0,l=0;return function(){var p=zN(),v=Ne-(p-l);if(l=p,v>0){if(++o>=ye)return arguments[0]}else o=0;return s.apply(t,arguments)}}function Zc(s,o){var l=-1,p=s.length,v=p-1;for(o=o===t?p:o;++l<o;){var O=mp(l,v),N=s[O];s[O]=s[l],s[l]=N}return s.length=o,s}var gx=xM(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(Lr,function(l,p,v,O){o.push(v?O.replace(be,"$1"):p||l)}),o});function di(s){if(typeof s=="string"||kn(s))return s;var o=s+"";return o=="0"&&1/s==-pe?"-0":o}function js(s){if(s!=null){try{return Ac.call(s)}catch{}try{return s+""}catch{}}return""}function AM(s,o){return Bn(Mt,function(l){var p="_."+l[0];o&l[1]&&!xc(s,p)&&s.push(p)}),s.sort()}function vx(s){if(s instanceof St)return s.clone();var o=new Wn(s.__wrapped__,s.__chain__);return o.__actions__=ln(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function kM(s,o,l){(l?sn(s,o,l):o===t)?o=1:o=Pr(ft(o),0);var p=s==null?0:s.length;if(!p||o<1)return[];for(var v=0,O=0,N=Z(Mc(p/o));v<p;)N[O++]=Hn(s,v,v+=o);return N}function IM(s){for(var o=-1,l=s==null?0:s.length,p=0,v=[];++o<l;){var O=s[o];O&&(v[p++]=O)}return v}function CM(){var s=arguments.length;if(!s)return[];for(var o=Z(s-1),l=arguments[0],p=s;p--;)o[p-1]=arguments[p];return os(ot(l)?ln(l):[l],Vr(o,1))}var PM=yt(function(s,o){return vr(s)?Wo(s,Vr(o,1,vr,!0)):[]}),NM=yt(function(s,o){var l=Gn(o);return vr(l)&&(l=t),vr(s)?Wo(s,Vr(o,1,vr,!0),Qe(l,2)):[]}),RM=yt(function(s,o){var l=Gn(o);return vr(l)&&(l=t),vr(s)?Wo(s,Vr(o,1,vr,!0),t,l):[]});function MM(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),Hn(s,o<0?0:o,p)):[]}function DM(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),o=p-o,Hn(s,0,o<0?0:o)):[]}function FM(s,o){return s&&s.length?Wc(s,Qe(o,3),!0,!0):[]}function LM(s,o){return s&&s.length?Wc(s,Qe(o,3),!0):[]}function qM(s,o,l,p){var v=s==null?0:s.length;return v?(l&&typeof l!="number"&&sn(s,o,l)&&(l=0,p=v),CR(s,o,l,p)):[]}function bx(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=l==null?0:ft(l);return v<0&&(v=Pr(p+v,0)),Sc(s,Qe(o,3),v)}function wx(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=p-1;return l!==t&&(v=ft(l),v=l<0?Pr(p+v,0):Qr(v,p-1)),Sc(s,Qe(o,3),v,!0)}function _x(s){var o=s==null?0:s.length;return o?Vr(s,1):[]}function jM(s){var o=s==null?0:s.length;return o?Vr(s,pe):[]}function UM(s,o){var l=s==null?0:s.length;return l?(o=o===t?1:ft(o),Vr(s,o)):[]}function $M(s){for(var o=-1,l=s==null?0:s.length,p={};++o<l;){var v=s[o];p[v[0]]=v[1]}return p}function xx(s){return s&&s.length?s[0]:t}function BM(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=l==null?0:ft(l);return v<0&&(v=Pr(p+v,0)),Ta(s,o,v)}function VM(s){var o=s==null?0:s.length;return o?Hn(s,0,-1):[]}var WM=yt(function(s){var o=or(s,wp);return o.length&&o[0]===s[0]?lp(o):[]}),zM=yt(function(s){var o=Gn(s),l=or(s,wp);return o===Gn(l)?o=t:l.pop(),l.length&&l[0]===s[0]?lp(l,Qe(o,2)):[]}),HM=yt(function(s){var o=Gn(s),l=or(s,wp);return o=typeof o=="function"?o:t,o&&l.pop(),l.length&&l[0]===s[0]?lp(l,t,o):[]});function GM(s,o){return s==null?"":VN.call(s,o)}function Gn(s){var o=s==null?0:s.length;return o?s[o-1]:t}function QM(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=p;return l!==t&&(v=ft(l),v=v<0?Pr(p+v,0):Qr(v,p-1)),o===o?AN(s,o,v):Sc(s,r_,v,!0)}function JM(s,o){return s&&s.length?R_(s,ft(o)):t}var YM=yt(Sx);function Sx(s,o){return s&&s.length&&o&&o.length?pp(s,o):s}function KM(s,o,l){return s&&s.length&&o&&o.length?pp(s,o,Qe(l,2)):s}function ZM(s,o,l){return s&&s.length&&o&&o.length?pp(s,o,t,l):s}var XM=Ni(function(s,o){var l=s==null?0:s.length,p=ap(s,o);return F_(s,or(o,function(v){return Ri(v,l)?+v:v}).sort(H_)),p});function eD(s,o){var l=[];if(!(s&&s.length))return l;var p=-1,v=[],O=s.length;for(o=Qe(o,3);++p<O;){var N=s[p];o(N,p,s)&&(l.push(N),v.push(p))}return F_(s,v),l}function Mp(s){return s==null?s:GN.call(s)}function tD(s,o,l){var p=s==null?0:s.length;return p?(l&&typeof l!="number"&&sn(s,o,l)?(o=0,l=p):(o=o==null?0:ft(o),l=l===t?p:ft(l)),Hn(s,o,l)):[]}function rD(s,o){return Vc(s,o)}function nD(s,o,l){return gp(s,o,Qe(l,2))}function iD(s,o){var l=s==null?0:s.length;if(l){var p=Vc(s,o);if(p<l&&ai(s[p],o))return p}return-1}function sD(s,o){return Vc(s,o,!0)}function aD(s,o,l){return gp(s,o,Qe(l,2),!0)}function oD(s,o){var l=s==null?0:s.length;if(l){var p=Vc(s,o,!0)-1;if(ai(s[p],o))return p}return-1}function uD(s){return s&&s.length?q_(s):[]}function cD(s,o){return s&&s.length?q_(s,Qe(o,2)):[]}function lD(s){var o=s==null?0:s.length;return o?Hn(s,1,o):[]}function fD(s,o,l){return s&&s.length?(o=l||o===t?1:ft(o),Hn(s,0,o<0?0:o)):[]}function hD(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),o=p-o,Hn(s,o<0?0:o,p)):[]}function dD(s,o){return s&&s.length?Wc(s,Qe(o,3),!1,!0):[]}function pD(s,o){return s&&s.length?Wc(s,Qe(o,3)):[]}var mD=yt(function(s){return fs(Vr(s,1,vr,!0))}),yD=yt(function(s){var o=Gn(s);return vr(o)&&(o=t),fs(Vr(s,1,vr,!0),Qe(o,2))}),gD=yt(function(s){var o=Gn(s);return o=typeof o=="function"?o:t,fs(Vr(s,1,vr,!0),t,o)});function vD(s){return s&&s.length?fs(s):[]}function bD(s,o){return s&&s.length?fs(s,Qe(o,2)):[]}function wD(s,o){return o=typeof o=="function"?o:t,s&&s.length?fs(s,t,o):[]}function Dp(s){if(!(s&&s.length))return[];var o=0;return s=as(s,function(l){if(vr(l))return o=Pr(l.length,o),!0}),Zd(o,function(l){return or(s,Jd(l))})}function Ex(s,o){if(!(s&&s.length))return[];var l=Dp(s);return o==null?l:or(l,function(p){return On(o,t,p)})}var _D=yt(function(s,o){return vr(s)?Wo(s,o):[]}),xD=yt(function(s){return bp(as(s,vr))}),SD=yt(function(s){var o=Gn(s);return vr(o)&&(o=t),bp(as(s,vr),Qe(o,2))}),ED=yt(function(s){var o=Gn(s);return o=typeof o=="function"?o:t,bp(as(s,vr),t,o)}),OD=yt(Dp);function TD(s,o){return B_(s||[],o||[],Vo)}function AD(s,o){return B_(s||[],o||[],Go)}var kD=yt(function(s){var o=s.length,l=o>1?s[o-1]:t;return l=typeof l=="function"?(s.pop(),l):t,Ex(s,l)});function Ox(s){var o=S(s);return o.__chain__=!0,o}function ID(s,o){return o(s),s}function Xc(s,o){return o(s)}var CD=Ni(function(s){var o=s.length,l=o?s[0]:0,p=this.__wrapped__,v=function(O){return ap(O,s)};return o>1||this.__actions__.length||!(p instanceof St)||!Ri(l)?this.thru(v):(p=p.slice(l,+l+(o?1:0)),p.__actions__.push({func:Xc,args:[v],thisArg:t}),new Wn(p,this.__chain__).thru(function(O){return o&&!O.length&&O.push(t),O}))});function PD(){return Ox(this)}function ND(){return new Wn(this.value(),this.__chain__)}function RD(){this.__values__===t&&(this.__values__=jx(this.value()));var s=this.__index__>=this.__values__.length,o=s?t:this.__values__[this.__index__++];return{done:s,value:o}}function MD(){return this}function DD(s){for(var o,l=this;l instanceof qc;){var p=vx(l);p.__index__=0,p.__values__=t,o?v.__wrapped__=p:o=p;var v=p;l=l.__wrapped__}return v.__wrapped__=s,o}function FD(){var s=this.__wrapped__;if(s instanceof St){var o=s;return this.__actions__.length&&(o=new St(this)),o=o.reverse(),o.__actions__.push({func:Xc,args:[Mp],thisArg:t}),new Wn(o,this.__chain__)}return this.thru(Mp)}function LD(){return $_(this.__wrapped__,this.__actions__)}var qD=zc(function(s,o,l){$t.call(s,l)?++s[l]:Ci(s,l,1)});function jD(s,o,l){var p=ot(s)?e_:IR;return l&&sn(s,o,l)&&(o=t),p(s,Qe(o,3))}function UD(s,o){var l=ot(s)?as:E_;return l(s,Qe(o,3))}var $D=Z_(bx),BD=Z_(wx);function VD(s,o){return Vr(el(s,o),1)}function WD(s,o){return Vr(el(s,o),pe)}function zD(s,o,l){return l=l===t?1:ft(l),Vr(el(s,o),l)}function Tx(s,o){var l=ot(s)?Bn:ls;return l(s,Qe(o,3))}function Ax(s,o){var l=ot(s)?lN:S_;return l(s,Qe(o,3))}var HD=zc(function(s,o,l){$t.call(s,l)?s[l].push(o):Ci(s,l,[o])});function GD(s,o,l,p){s=fn(s)?s:qa(s),l=l&&!p?ft(l):0;var v=s.length;return l<0&&(l=Pr(v+l,0)),sl(s)?l<=v&&s.indexOf(o,l)>-1:!!v&&Ta(s,o,l)>-1}var QD=yt(function(s,o,l){var p=-1,v=typeof o=="function",O=fn(s)?Z(s.length):[];return ls(s,function(N){O[++p]=v?On(o,N,l):zo(N,o,l)}),O}),JD=zc(function(s,o,l){Ci(s,l,o)});function el(s,o){var l=ot(s)?or:C_;return l(s,Qe(o,3))}function YD(s,o,l,p){return s==null?[]:(ot(o)||(o=o==null?[]:[o]),l=p?t:l,ot(l)||(l=l==null?[]:[l]),M_(s,o,l))}var KD=zc(function(s,o,l){s[l?0:1].push(o)},function(){return[[],[]]});function ZD(s,o,l){var p=ot(s)?Gd:i_,v=arguments.length<3;return p(s,Qe(o,4),l,v,ls)}function XD(s,o,l){var p=ot(s)?fN:i_,v=arguments.length<3;return p(s,Qe(o,4),l,v,S_)}function eF(s,o){var l=ot(s)?as:E_;return l(s,nl(Qe(o,3)))}function tF(s){var o=ot(s)?b_:GR;return o(s)}function rF(s,o,l){(l?sn(s,o,l):o===t)?o=1:o=ft(o);var p=ot(s)?ER:QR;return p(s,o)}function nF(s){var o=ot(s)?OR:YR;return o(s)}function iF(s){if(s==null)return 0;if(fn(s))return sl(s)?ka(s):s.length;var o=Jr(s);return o==J||o==_e?s.size:hp(s).length}function sF(s,o,l){var p=ot(s)?Qd:KR;return l&&sn(s,o,l)&&(o=t),p(s,Qe(o,3))}var aF=yt(function(s,o){if(s==null)return[];var l=o.length;return l>1&&sn(s,o[0],o[1])?o=[]:l>2&&sn(o[0],o[1],o[2])&&(o=[o[0]]),M_(s,Vr(o,1),[])}),tl=UN||function(){return Br.Date.now()};function oF(s,o){if(typeof o!="function")throw new Vn(u);return s=ft(s),function(){if(--s<1)return o.apply(this,arguments)}}function kx(s,o,l){return o=l?t:o,o=s&&o==null?s.length:o,Pi(s,K,t,t,t,t,o)}function Ix(s,o){var l;if(typeof o!="function")throw new Vn(u);return s=ft(s),function(){return--s>0&&(l=o.apply(this,arguments)),s<=1&&(o=t),l}}var Fp=yt(function(s,o,l){var p=x;if(l.length){var v=us(l,Fa(Fp));p|=U}return Pi(s,p,o,l,v)}),Cx=yt(function(s,o,l){var p=x|_;if(l.length){var v=us(l,Fa(Cx));p|=U}return Pi(o,p,s,l,v)});function Px(s,o,l){o=l?t:o;var p=Pi(s,P,t,t,t,t,t,o);return p.placeholder=Px.placeholder,p}function Nx(s,o,l){o=l?t:o;var p=Pi(s,M,t,t,t,t,t,o);return p.placeholder=Nx.placeholder,p}function Rx(s,o,l){var p,v,O,N,F,z,ae=0,ce=!1,me=!1,ke=!0;if(typeof s!="function")throw new Vn(u);o=Qn(o)||0,lr(l)&&(ce=!!l.leading,me="maxWait"in l,O=me?Pr(Qn(l.maxWait)||0,o):O,ke="trailing"in l?!!l.trailing:ke);function $e(br){var oi=p,Fi=v;return p=v=t,ae=br,N=s.apply(Fi,oi),N}function Ye(br){return ae=br,F=Yo(_t,o),ce?$e(br):N}function ht(br){var oi=br-z,Fi=br-ae,Zx=o-oi;return me?Qr(Zx,O-Fi):Zx}function Ke(br){var oi=br-z,Fi=br-ae;return z===t||oi>=o||oi<0||me&&Fi>=O}function _t(){var br=tl();if(Ke(br))return At(br);F=Yo(_t,ht(br))}function At(br){return F=t,ke&&p?$e(br):(p=v=t,N)}function In(){F!==t&&V_(F),ae=0,p=z=v=F=t}function an(){return F===t?N:At(tl())}function Cn(){var br=tl(),oi=Ke(br);if(p=arguments,v=this,z=br,oi){if(F===t)return Ye(z);if(me)return V_(F),F=Yo(_t,o),$e(z)}return F===t&&(F=Yo(_t,o)),N}return Cn.cancel=In,Cn.flush=an,Cn}var uF=yt(function(s,o){return x_(s,1,o)}),cF=yt(function(s,o,l){return x_(s,Qn(o)||0,l)});function lF(s){return Pi(s,fe)}function rl(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new Vn(u);var l=function(){var p=arguments,v=o?o.apply(this,p):p[0],O=l.cache;if(O.has(v))return O.get(v);var N=s.apply(this,p);return l.cache=O.set(v,N)||O,N};return l.cache=new(rl.Cache||Ii),l}rl.Cache=Ii;function nl(s){if(typeof s!="function")throw new Vn(u);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function fF(s){return Ix(2,s)}var hF=ZR(function(s,o){o=o.length==1&&ot(o[0])?or(o[0],Tn(Qe())):or(Vr(o,1),Tn(Qe()));var l=o.length;return yt(function(p){for(var v=-1,O=Qr(p.length,l);++v<O;)p[v]=o[v].call(this,p[v]);return On(s,this,p)})}),Lp=yt(function(s,o){var l=us(o,Fa(Lp));return Pi(s,U,t,o,l)}),Mx=yt(function(s,o){var l=us(o,Fa(Mx));return Pi(s,W,t,o,l)}),dF=Ni(function(s,o){return Pi(s,X,t,t,t,o)});function pF(s,o){if(typeof s!="function")throw new Vn(u);return o=o===t?o:ft(o),yt(s,o)}function mF(s,o){if(typeof s!="function")throw new Vn(u);return o=o==null?0:Pr(ft(o),0),yt(function(l){var p=l[o],v=ds(l,0,o);return p&&os(v,p),On(s,this,v)})}function yF(s,o,l){var p=!0,v=!0;if(typeof s!="function")throw new Vn(u);return lr(l)&&(p="leading"in l?!!l.leading:p,v="trailing"in l?!!l.trailing:v),Rx(s,o,{leading:p,maxWait:o,trailing:v})}function gF(s){return kx(s,1)}function vF(s,o){return Lp(_p(o),s)}function bF(){if(!arguments.length)return[];var s=arguments[0];return ot(s)?s:[s]}function wF(s){return zn(s,m)}function _F(s,o){return o=typeof o=="function"?o:t,zn(s,m,o)}function xF(s){return zn(s,y|m)}function SF(s,o){return o=typeof o=="function"?o:t,zn(s,y|m,o)}function EF(s,o){return o==null||__(s,o,qr(o))}function ai(s,o){return s===o||s!==s&&o!==o}var OF=Jc(cp),TF=Jc(function(s,o){return s>=o}),Us=A_(function(){return arguments}())?A_:function(s){return pr(s)&&$t.call(s,"callee")&&!d_.call(s,"callee")},ot=Z.isArray,AF=Qw?Tn(Qw):DR;function fn(s){return s!=null&&il(s.length)&&!Mi(s)}function vr(s){return pr(s)&&fn(s)}function kF(s){return s===!0||s===!1||pr(s)&&nn(s)==Ot}var ps=BN||Qp,IF=Jw?Tn(Jw):FR;function CF(s){return pr(s)&&s.nodeType===1&&!Ko(s)}function PF(s){if(s==null)return!0;if(fn(s)&&(ot(s)||typeof s=="string"||typeof s.splice=="function"||ps(s)||La(s)||Us(s)))return!s.length;var o=Jr(s);if(o==J||o==_e)return!s.size;if(Jo(s))return!hp(s).length;for(var l in s)if($t.call(s,l))return!1;return!0}function NF(s,o){return Ho(s,o)}function RF(s,o,l){l=typeof l=="function"?l:t;var p=l?l(s,o):t;return p===t?Ho(s,o,t,l):!!p}function qp(s){if(!pr(s))return!1;var o=nn(s);return o==B||o==He||typeof s.message=="string"&&typeof s.name=="string"&&!Ko(s)}function MF(s){return typeof s=="number"&&m_(s)}function Mi(s){if(!lr(s))return!1;var o=nn(s);return o==Q||o==q||o==it||o==Be}function Dx(s){return typeof s=="number"&&s==ft(s)}function il(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=te}function lr(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function pr(s){return s!=null&&typeof s=="object"}var Fx=Yw?Tn(Yw):qR;function DF(s,o){return s===o||fp(s,o,kp(o))}function FF(s,o,l){return l=typeof l=="function"?l:t,fp(s,o,kp(o),l)}function LF(s){return Lx(s)&&s!=+s}function qF(s){if(_M(s))throw new at(a);return k_(s)}function jF(s){return s===null}function UF(s){return s==null}function Lx(s){return typeof s=="number"||pr(s)&&nn(s)==ee}function Ko(s){if(!pr(s)||nn(s)!=xe)return!1;var o=Pc(s);if(o===null)return!0;var l=$t.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&Ac.call(l)==FN}var jp=Kw?Tn(Kw):jR;function $F(s){return Dx(s)&&s>=-te&&s<=te}var qx=Zw?Tn(Zw):UR;function sl(s){return typeof s=="string"||!ot(s)&&pr(s)&&nn(s)==Ge}function kn(s){return typeof s=="symbol"||pr(s)&&nn(s)==pt}var La=Xw?Tn(Xw):$R;function BF(s){return s===t}function VF(s){return pr(s)&&Jr(s)==Yt}function WF(s){return pr(s)&&nn(s)==Tt}var zF=Jc(dp),HF=Jc(function(s,o){return s<=o});function jx(s){if(!s)return[];if(fn(s))return sl(s)?ii(s):ln(s);if(qo&&s[qo])return EN(s[qo]());var o=Jr(s),l=o==J?ep:o==_e?Ec:qa;return l(s)}function Di(s){if(!s)return s===0?s:0;if(s=Qn(s),s===pe||s===-pe){var o=s<0?-1:1;return o*Se}return s===s?s:0}function ft(s){var o=Di(s),l=o%1;return o===o?l?o-l:o:0}function Ux(s){return s?Fs(ft(s),0,Ee):0}function Qn(s){if(typeof s=="number")return s;if(kn(s))return Le;if(lr(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=lr(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=s_(s);var l=Je.test(s);return l||tt.test(s)?oN(s.slice(2),l?2:8):ut.test(s)?Le:+s}function $x(s){return hi(s,hn(s))}function GF(s){return s?Fs(ft(s),-te,te):s===0?s:0}function jt(s){return s==null?"":An(s)}var QF=Ma(function(s,o){if(Jo(o)||fn(o)){hi(o,qr(o),s);return}for(var l in o)$t.call(o,l)&&Vo(s,l,o[l])}),Bx=Ma(function(s,o){hi(o,hn(o),s)}),al=Ma(function(s,o,l,p){hi(o,hn(o),s,p)}),JF=Ma(function(s,o,l,p){hi(o,qr(o),s,p)}),YF=Ni(ap);function KF(s,o){var l=Ra(s);return o==null?l:w_(l,o)}var ZF=yt(function(s,o){s=Jt(s);var l=-1,p=o.length,v=p>2?o[2]:t;for(v&&sn(o[0],o[1],v)&&(p=1);++l<p;)for(var O=o[l],N=hn(O),F=-1,z=N.length;++F<z;){var ae=N[F],ce=s[ae];(ce===t||ai(ce,Ca[ae])&&!$t.call(s,ae))&&(s[ae]=O[ae])}return s}),XF=yt(function(s){return s.push(t,sx),On(Vx,t,s)});function e2(s,o){return t_(s,Qe(o,3),fi)}function t2(s,o){return t_(s,Qe(o,3),up)}function r2(s,o){return s==null?s:op(s,Qe(o,3),hn)}function n2(s,o){return s==null?s:O_(s,Qe(o,3),hn)}function i2(s,o){return s&&fi(s,Qe(o,3))}function s2(s,o){return s&&up(s,Qe(o,3))}function a2(s){return s==null?[]:$c(s,qr(s))}function o2(s){return s==null?[]:$c(s,hn(s))}function Up(s,o,l){var p=s==null?t:Ls(s,o);return p===t?l:p}function u2(s,o){return s!=null&&ux(s,o,PR)}function $p(s,o){return s!=null&&ux(s,o,NR)}var c2=ex(function(s,o,l){o!=null&&typeof o.toString!="function"&&(o=kc.call(o)),s[o]=l},Vp(dn)),l2=ex(function(s,o,l){o!=null&&typeof o.toString!="function"&&(o=kc.call(o)),$t.call(s,o)?s[o].push(l):s[o]=[l]},Qe),f2=yt(zo);function qr(s){return fn(s)?v_(s):hp(s)}function hn(s){return fn(s)?v_(s,!0):BR(s)}function h2(s,o){var l={};return o=Qe(o,3),fi(s,function(p,v,O){Ci(l,o(p,v,O),p)}),l}function d2(s,o){var l={};return o=Qe(o,3),fi(s,function(p,v,O){Ci(l,v,o(p,v,O))}),l}var p2=Ma(function(s,o,l){Bc(s,o,l)}),Vx=Ma(function(s,o,l,p){Bc(s,o,l,p)}),m2=Ni(function(s,o){var l={};if(s==null)return l;var p=!1;o=or(o,function(O){return O=hs(O,s),p||(p=O.length>1),O}),hi(s,Tp(s),l),p&&(l=zn(l,y|g|m,cM));for(var v=o.length;v--;)vp(l,o[v]);return l});function y2(s,o){return Wx(s,nl(Qe(o)))}var g2=Ni(function(s,o){return s==null?{}:WR(s,o)});function Wx(s,o){if(s==null)return{};var l=or(Tp(s),function(p){return[p]});return o=Qe(o),D_(s,l,function(p,v){return o(p,v[0])})}function v2(s,o,l){o=hs(o,s);var p=-1,v=o.length;for(v||(v=1,s=t);++p<v;){var O=s==null?t:s[di(o[p])];O===t&&(p=v,O=l),s=Mi(O)?O.call(s):O}return s}function b2(s,o,l){return s==null?s:Go(s,o,l)}function w2(s,o,l,p){return p=typeof p=="function"?p:t,s==null?s:Go(s,o,l,p)}var zx=nx(qr),Hx=nx(hn);function _2(s,o,l){var p=ot(s),v=p||ps(s)||La(s);if(o=Qe(o,4),l==null){var O=s&&s.constructor;v?l=p?new O:[]:lr(s)?l=Mi(O)?Ra(Pc(s)):{}:l={}}return(v?Bn:fi)(s,function(N,F,z){return o(l,N,F,z)}),l}function x2(s,o){return s==null?!0:vp(s,o)}function S2(s,o,l){return s==null?s:U_(s,o,_p(l))}function E2(s,o,l,p){return p=typeof p=="function"?p:t,s==null?s:U_(s,o,_p(l),p)}function qa(s){return s==null?[]:Xd(s,qr(s))}function O2(s){return s==null?[]:Xd(s,hn(s))}function T2(s,o,l){return l===t&&(l=o,o=t),l!==t&&(l=Qn(l),l=l===l?l:0),o!==t&&(o=Qn(o),o=o===o?o:0),Fs(Qn(s),o,l)}function A2(s,o,l){return o=Di(o),l===t?(l=o,o=0):l=Di(l),s=Qn(s),RR(s,o,l)}function k2(s,o,l){if(l&&typeof l!="boolean"&&sn(s,o,l)&&(o=l=t),l===t&&(typeof o=="boolean"?(l=o,o=t):typeof s=="boolean"&&(l=s,s=t)),s===t&&o===t?(s=0,o=1):(s=Di(s),o===t?(o=s,s=0):o=Di(o)),s>o){var p=s;s=o,o=p}if(l||s%1||o%1){var v=y_();return Qr(s+v*(o-s+aN("1e-"+((v+"").length-1))),o)}return mp(s,o)}var I2=Da(function(s,o,l){return o=o.toLowerCase(),s+(l?Gx(o):o)});function Gx(s){return Bp(jt(s).toLowerCase())}function Qx(s){return s=jt(s),s&&s.replace(w,bN).replace(YP,"")}function C2(s,o,l){s=jt(s),o=An(o);var p=s.length;l=l===t?p:Fs(ft(l),0,p);var v=l;return l-=o.length,l>=0&&s.slice(l,v)==o}function P2(s){return s=jt(s),s&&kr.test(s)?s.replace(Zt,wN):s}function N2(s){return s=jt(s),s&&Gr.test(s)?s.replace(ar,"\\$&"):s}var R2=Da(function(s,o,l){return s+(l?"-":"")+o.toLowerCase()}),M2=Da(function(s,o,l){return s+(l?" ":"")+o.toLowerCase()}),D2=K_("toLowerCase");function F2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;if(!o||p>=o)return s;var v=(o-p)/2;return Qc(Dc(v),l)+s+Qc(Mc(v),l)}function L2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;return o&&p<o?s+Qc(o-p,l):s}function q2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;return o&&p<o?Qc(o-p,l)+s:s}function j2(s,o,l){return l||o==null?o=0:o&&(o=+o),HN(jt(s).replace(Tr,""),o||0)}function U2(s,o,l){return(l?sn(s,o,l):o===t)?o=1:o=ft(o),yp(jt(s),o)}function $2(){var s=arguments,o=jt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var B2=Da(function(s,o,l){return s+(l?"_":"")+o.toLowerCase()});function V2(s,o,l){return l&&typeof l!="number"&&sn(s,o,l)&&(o=l=t),l=l===t?Ee:l>>>0,l?(s=jt(s),s&&(typeof o=="string"||o!=null&&!jp(o))&&(o=An(o),!o&&Aa(s))?ds(ii(s),0,l):s.split(o,l)):[]}var W2=Da(function(s,o,l){return s+(l?" ":"")+Bp(o)});function z2(s,o,l){return s=jt(s),l=l==null?0:Fs(ft(l),0,s.length),o=An(o),s.slice(l,l+o.length)==o}function H2(s,o,l){var p=S.templateSettings;l&&sn(s,o,l)&&(o=t),s=jt(s),o=al({},o,p,ix);var v=al({},o.imports,p.imports,ix),O=qr(v),N=Xd(v,O),F,z,ae=0,ce=o.interpolate||k,me="__p += '",ke=tp((o.escape||k).source+"|"+ce.source+"|"+(ce===Ut?Pe:k).source+"|"+(o.evaluate||k).source+"|$","g"),$e="//# sourceURL="+($t.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tN+"]")+`
|
|
95
|
+
`)}function vM(s){return ot(s)||Us(s)||!!(p_&&s&&s[p_])}function Ri(s,o){var l=typeof s;return o=o??te,!!o&&(l=="number"||l!="symbol"&>.test(s))&&s>-1&&s%1==0&&s<o}function sn(s,o,l){if(!lr(l))return!1;var p=typeof o;return(p=="number"?fn(l)&&Ri(o,l.length):p=="string"&&o in l)?ai(l[o],s):!1}function Cp(s,o){if(ot(s))return!1;var l=typeof s;return l=="number"||l=="symbol"||l=="boolean"||s==null||kn(s)?!0:$r.test(s)||!Or.test(s)||o!=null&&s in Jt(o)}function bM(s){var o=typeof s;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?s!=="__proto__":s===null}function Pp(s){var o=Yc(s),l=S[o];if(typeof l!="function"||!(o in St.prototype))return!1;if(s===l)return!0;var p=Ap(l);return!!p&&s===p[0]}function wM(s){return!!l_&&l_ in s}var _M=Tc?Mi:Qp;function Jo(s){var o=s&&s.constructor,l=typeof o=="function"&&o.prototype||Ca;return s===l}function lx(s){return s===s&&!lr(s)}function fx(s,o){return function(l){return l==null?!1:l[s]===o&&(o!==t||s in Jt(l))}}function xM(s){var o=rl(s,function(p){return l.size===h&&l.clear(),p}),l=o.cache;return o}function SM(s,o){var l=s[1],p=o[1],v=l|p,O=v<(x|_|K),N=p==K&&l==P||p==K&&l==X&&s[7].length<=o[8]||p==(K|X)&&o[7].length<=o[8]&&l==P;if(!(O||N))return s;p&x&&(s[2]=o[2],v|=l&x?0:A);var F=o[3];if(F){var z=s[3];s[3]=z?G_(z,F,o[4]):F,s[4]=z?us(s[3],d):o[4]}return F=o[5],F&&(z=s[5],s[5]=z?Q_(z,F,o[6]):F,s[6]=z?us(s[5],d):o[6]),F=o[7],F&&(s[7]=F),p&K&&(s[8]=s[8]==null?o[8]:Qr(s[8],o[8])),s[9]==null&&(s[9]=o[9]),s[0]=o[0],s[1]=v,s}function EM(s){var o=[];if(s!=null)for(var l in Jt(s))o.push(l);return o}function OM(s){return kc.call(s)}function hx(s,o,l){return o=Pr(o===t?s.length-1:o,0),function(){for(var p=arguments,v=-1,O=Pr(p.length-o,0),N=Z(O);++v<O;)N[v]=p[o+v];v=-1;for(var F=Z(o+1);++v<o;)F[v]=p[v];return F[o]=l(N),On(s,this,F)}}function dx(s,o){return o.length<2?s:Ls(s,Hn(o,0,-1))}function TM(s,o){for(var l=s.length,p=Qr(o.length,l),v=ln(s);p--;){var O=o[p];s[p]=Ri(O,l)?v[O]:t}return s}function Np(s,o){if(!(o==="constructor"&&typeof s[o]=="function")&&o!="__proto__")return s[o]}var px=yx(L_),Yo=$N||function(s,o){return Br.setTimeout(s,o)},Rp=yx(JR);function mx(s,o,l){var p=o+"";return Rp(s,gM(p,AM(pM(p),l)))}function yx(s){var o=0,l=0;return function(){var p=zN(),v=Ne-(p-l);if(l=p,v>0){if(++o>=ye)return arguments[0]}else o=0;return s.apply(t,arguments)}}function Zc(s,o){var l=-1,p=s.length,v=p-1;for(o=o===t?p:o;++l<o;){var O=mp(l,v),N=s[O];s[O]=s[l],s[l]=N}return s.length=o,s}var gx=xM(function(s){var o=[];return s.charCodeAt(0)===46&&o.push(""),s.replace(Lr,function(l,p,v,O){o.push(v?O.replace(be,"$1"):p||l)}),o});function di(s){if(typeof s=="string"||kn(s))return s;var o=s+"";return o=="0"&&1/s==-pe?"-0":o}function js(s){if(s!=null){try{return Ac.call(s)}catch{}try{return s+""}catch{}}return""}function AM(s,o){return Bn(Mt,function(l){var p="_."+l[0];o&l[1]&&!xc(s,p)&&s.push(p)}),s.sort()}function vx(s){if(s instanceof St)return s.clone();var o=new Wn(s.__wrapped__,s.__chain__);return o.__actions__=ln(s.__actions__),o.__index__=s.__index__,o.__values__=s.__values__,o}function kM(s,o,l){(l?sn(s,o,l):o===t)?o=1:o=Pr(ft(o),0);var p=s==null?0:s.length;if(!p||o<1)return[];for(var v=0,O=0,N=Z(Mc(p/o));v<p;)N[O++]=Hn(s,v,v+=o);return N}function IM(s){for(var o=-1,l=s==null?0:s.length,p=0,v=[];++o<l;){var O=s[o];O&&(v[p++]=O)}return v}function CM(){var s=arguments.length;if(!s)return[];for(var o=Z(s-1),l=arguments[0],p=s;p--;)o[p-1]=arguments[p];return os(ot(l)?ln(l):[l],Vr(o,1))}var PM=yt(function(s,o){return vr(s)?Wo(s,Vr(o,1,vr,!0)):[]}),NM=yt(function(s,o){var l=Gn(o);return vr(l)&&(l=t),vr(s)?Wo(s,Vr(o,1,vr,!0),Qe(l,2)):[]}),RM=yt(function(s,o){var l=Gn(o);return vr(l)&&(l=t),vr(s)?Wo(s,Vr(o,1,vr,!0),t,l):[]});function MM(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),Hn(s,o<0?0:o,p)):[]}function DM(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),o=p-o,Hn(s,0,o<0?0:o)):[]}function FM(s,o){return s&&s.length?Wc(s,Qe(o,3),!0,!0):[]}function LM(s,o){return s&&s.length?Wc(s,Qe(o,3),!0):[]}function qM(s,o,l,p){var v=s==null?0:s.length;return v?(l&&typeof l!="number"&&sn(s,o,l)&&(l=0,p=v),CR(s,o,l,p)):[]}function bx(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=l==null?0:ft(l);return v<0&&(v=Pr(p+v,0)),Sc(s,Qe(o,3),v)}function wx(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=p-1;return l!==t&&(v=ft(l),v=l<0?Pr(p+v,0):Qr(v,p-1)),Sc(s,Qe(o,3),v,!0)}function _x(s){var o=s==null?0:s.length;return o?Vr(s,1):[]}function jM(s){var o=s==null?0:s.length;return o?Vr(s,pe):[]}function UM(s,o){var l=s==null?0:s.length;return l?(o=o===t?1:ft(o),Vr(s,o)):[]}function $M(s){for(var o=-1,l=s==null?0:s.length,p={};++o<l;){var v=s[o];p[v[0]]=v[1]}return p}function xx(s){return s&&s.length?s[0]:t}function BM(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=l==null?0:ft(l);return v<0&&(v=Pr(p+v,0)),Ta(s,o,v)}function VM(s){var o=s==null?0:s.length;return o?Hn(s,0,-1):[]}var WM=yt(function(s){var o=or(s,wp);return o.length&&o[0]===s[0]?lp(o):[]}),zM=yt(function(s){var o=Gn(s),l=or(s,wp);return o===Gn(l)?o=t:l.pop(),l.length&&l[0]===s[0]?lp(l,Qe(o,2)):[]}),HM=yt(function(s){var o=Gn(s),l=or(s,wp);return o=typeof o=="function"?o:t,o&&l.pop(),l.length&&l[0]===s[0]?lp(l,t,o):[]});function GM(s,o){return s==null?"":VN.call(s,o)}function Gn(s){var o=s==null?0:s.length;return o?s[o-1]:t}function QM(s,o,l){var p=s==null?0:s.length;if(!p)return-1;var v=p;return l!==t&&(v=ft(l),v=v<0?Pr(p+v,0):Qr(v,p-1)),o===o?AN(s,o,v):Sc(s,r_,v,!0)}function JM(s,o){return s&&s.length?R_(s,ft(o)):t}var YM=yt(Sx);function Sx(s,o){return s&&s.length&&o&&o.length?pp(s,o):s}function KM(s,o,l){return s&&s.length&&o&&o.length?pp(s,o,Qe(l,2)):s}function ZM(s,o,l){return s&&s.length&&o&&o.length?pp(s,o,t,l):s}var XM=Ni(function(s,o){var l=s==null?0:s.length,p=ap(s,o);return F_(s,or(o,function(v){return Ri(v,l)?+v:v}).sort(H_)),p});function eD(s,o){var l=[];if(!(s&&s.length))return l;var p=-1,v=[],O=s.length;for(o=Qe(o,3);++p<O;){var N=s[p];o(N,p,s)&&(l.push(N),v.push(p))}return F_(s,v),l}function Mp(s){return s==null?s:GN.call(s)}function tD(s,o,l){var p=s==null?0:s.length;return p?(l&&typeof l!="number"&&sn(s,o,l)?(o=0,l=p):(o=o==null?0:ft(o),l=l===t?p:ft(l)),Hn(s,o,l)):[]}function rD(s,o){return Vc(s,o)}function nD(s,o,l){return gp(s,o,Qe(l,2))}function iD(s,o){var l=s==null?0:s.length;if(l){var p=Vc(s,o);if(p<l&&ai(s[p],o))return p}return-1}function sD(s,o){return Vc(s,o,!0)}function aD(s,o,l){return gp(s,o,Qe(l,2),!0)}function oD(s,o){var l=s==null?0:s.length;if(l){var p=Vc(s,o,!0)-1;if(ai(s[p],o))return p}return-1}function uD(s){return s&&s.length?q_(s):[]}function cD(s,o){return s&&s.length?q_(s,Qe(o,2)):[]}function lD(s){var o=s==null?0:s.length;return o?Hn(s,1,o):[]}function fD(s,o,l){return s&&s.length?(o=l||o===t?1:ft(o),Hn(s,0,o<0?0:o)):[]}function hD(s,o,l){var p=s==null?0:s.length;return p?(o=l||o===t?1:ft(o),o=p-o,Hn(s,o<0?0:o,p)):[]}function dD(s,o){return s&&s.length?Wc(s,Qe(o,3),!1,!0):[]}function pD(s,o){return s&&s.length?Wc(s,Qe(o,3)):[]}var mD=yt(function(s){return fs(Vr(s,1,vr,!0))}),yD=yt(function(s){var o=Gn(s);return vr(o)&&(o=t),fs(Vr(s,1,vr,!0),Qe(o,2))}),gD=yt(function(s){var o=Gn(s);return o=typeof o=="function"?o:t,fs(Vr(s,1,vr,!0),t,o)});function vD(s){return s&&s.length?fs(s):[]}function bD(s,o){return s&&s.length?fs(s,Qe(o,2)):[]}function wD(s,o){return o=typeof o=="function"?o:t,s&&s.length?fs(s,t,o):[]}function Dp(s){if(!(s&&s.length))return[];var o=0;return s=as(s,function(l){if(vr(l))return o=Pr(l.length,o),!0}),Zd(o,function(l){return or(s,Jd(l))})}function Ex(s,o){if(!(s&&s.length))return[];var l=Dp(s);return o==null?l:or(l,function(p){return On(o,t,p)})}var _D=yt(function(s,o){return vr(s)?Wo(s,o):[]}),xD=yt(function(s){return bp(as(s,vr))}),SD=yt(function(s){var o=Gn(s);return vr(o)&&(o=t),bp(as(s,vr),Qe(o,2))}),ED=yt(function(s){var o=Gn(s);return o=typeof o=="function"?o:t,bp(as(s,vr),t,o)}),OD=yt(Dp);function TD(s,o){return B_(s||[],o||[],Vo)}function AD(s,o){return B_(s||[],o||[],Go)}var kD=yt(function(s){var o=s.length,l=o>1?s[o-1]:t;return l=typeof l=="function"?(s.pop(),l):t,Ex(s,l)});function Ox(s){var o=S(s);return o.__chain__=!0,o}function ID(s,o){return o(s),s}function Xc(s,o){return o(s)}var CD=Ni(function(s){var o=s.length,l=o?s[0]:0,p=this.__wrapped__,v=function(O){return ap(O,s)};return o>1||this.__actions__.length||!(p instanceof St)||!Ri(l)?this.thru(v):(p=p.slice(l,+l+(o?1:0)),p.__actions__.push({func:Xc,args:[v],thisArg:t}),new Wn(p,this.__chain__).thru(function(O){return o&&!O.length&&O.push(t),O}))});function PD(){return Ox(this)}function ND(){return new Wn(this.value(),this.__chain__)}function RD(){this.__values__===t&&(this.__values__=jx(this.value()));var s=this.__index__>=this.__values__.length,o=s?t:this.__values__[this.__index__++];return{done:s,value:o}}function MD(){return this}function DD(s){for(var o,l=this;l instanceof qc;){var p=vx(l);p.__index__=0,p.__values__=t,o?v.__wrapped__=p:o=p;var v=p;l=l.__wrapped__}return v.__wrapped__=s,o}function FD(){var s=this.__wrapped__;if(s instanceof St){var o=s;return this.__actions__.length&&(o=new St(this)),o=o.reverse(),o.__actions__.push({func:Xc,args:[Mp],thisArg:t}),new Wn(o,this.__chain__)}return this.thru(Mp)}function LD(){return $_(this.__wrapped__,this.__actions__)}var qD=zc(function(s,o,l){$t.call(s,l)?++s[l]:Ci(s,l,1)});function jD(s,o,l){var p=ot(s)?e_:IR;return l&&sn(s,o,l)&&(o=t),p(s,Qe(o,3))}function UD(s,o){var l=ot(s)?as:E_;return l(s,Qe(o,3))}var $D=Z_(bx),BD=Z_(wx);function VD(s,o){return Vr(el(s,o),1)}function WD(s,o){return Vr(el(s,o),pe)}function zD(s,o,l){return l=l===t?1:ft(l),Vr(el(s,o),l)}function Tx(s,o){var l=ot(s)?Bn:ls;return l(s,Qe(o,3))}function Ax(s,o){var l=ot(s)?lN:S_;return l(s,Qe(o,3))}var HD=zc(function(s,o,l){$t.call(s,l)?s[l].push(o):Ci(s,l,[o])});function GD(s,o,l,p){s=fn(s)?s:qa(s),l=l&&!p?ft(l):0;var v=s.length;return l<0&&(l=Pr(v+l,0)),sl(s)?l<=v&&s.indexOf(o,l)>-1:!!v&&Ta(s,o,l)>-1}var QD=yt(function(s,o,l){var p=-1,v=typeof o=="function",O=fn(s)?Z(s.length):[];return ls(s,function(N){O[++p]=v?On(o,N,l):zo(N,o,l)}),O}),JD=zc(function(s,o,l){Ci(s,l,o)});function el(s,o){var l=ot(s)?or:C_;return l(s,Qe(o,3))}function YD(s,o,l,p){return s==null?[]:(ot(o)||(o=o==null?[]:[o]),l=p?t:l,ot(l)||(l=l==null?[]:[l]),M_(s,o,l))}var KD=zc(function(s,o,l){s[l?0:1].push(o)},function(){return[[],[]]});function ZD(s,o,l){var p=ot(s)?Gd:i_,v=arguments.length<3;return p(s,Qe(o,4),l,v,ls)}function XD(s,o,l){var p=ot(s)?fN:i_,v=arguments.length<3;return p(s,Qe(o,4),l,v,S_)}function eF(s,o){var l=ot(s)?as:E_;return l(s,nl(Qe(o,3)))}function tF(s){var o=ot(s)?b_:GR;return o(s)}function rF(s,o,l){(l?sn(s,o,l):o===t)?o=1:o=ft(o);var p=ot(s)?ER:QR;return p(s,o)}function nF(s){var o=ot(s)?OR:YR;return o(s)}function iF(s){if(s==null)return 0;if(fn(s))return sl(s)?ka(s):s.length;var o=Jr(s);return o==J||o==_e?s.size:hp(s).length}function sF(s,o,l){var p=ot(s)?Qd:KR;return l&&sn(s,o,l)&&(o=t),p(s,Qe(o,3))}var aF=yt(function(s,o){if(s==null)return[];var l=o.length;return l>1&&sn(s,o[0],o[1])?o=[]:l>2&&sn(o[0],o[1],o[2])&&(o=[o[0]]),M_(s,Vr(o,1),[])}),tl=UN||function(){return Br.Date.now()};function oF(s,o){if(typeof o!="function")throw new Vn(u);return s=ft(s),function(){if(--s<1)return o.apply(this,arguments)}}function kx(s,o,l){return o=l?t:o,o=s&&o==null?s.length:o,Pi(s,K,t,t,t,t,o)}function Ix(s,o){var l;if(typeof o!="function")throw new Vn(u);return s=ft(s),function(){return--s>0&&(l=o.apply(this,arguments)),s<=1&&(o=t),l}}var Fp=yt(function(s,o,l){var p=x;if(l.length){var v=us(l,Fa(Fp));p|=U}return Pi(s,p,o,l,v)}),Cx=yt(function(s,o,l){var p=x|_;if(l.length){var v=us(l,Fa(Cx));p|=U}return Pi(o,p,s,l,v)});function Px(s,o,l){o=l?t:o;var p=Pi(s,P,t,t,t,t,t,o);return p.placeholder=Px.placeholder,p}function Nx(s,o,l){o=l?t:o;var p=Pi(s,M,t,t,t,t,t,o);return p.placeholder=Nx.placeholder,p}function Rx(s,o,l){var p,v,O,N,F,z,ae=0,ce=!1,me=!1,ke=!0;if(typeof s!="function")throw new Vn(u);o=Qn(o)||0,lr(l)&&(ce=!!l.leading,me="maxWait"in l,O=me?Pr(Qn(l.maxWait)||0,o):O,ke="trailing"in l?!!l.trailing:ke);function $e(br){var oi=p,Fi=v;return p=v=t,ae=br,N=s.apply(Fi,oi),N}function Ye(br){return ae=br,F=Yo(_t,o),ce?$e(br):N}function ht(br){var oi=br-z,Fi=br-ae,Zx=o-oi;return me?Qr(Zx,O-Fi):Zx}function Ke(br){var oi=br-z,Fi=br-ae;return z===t||oi>=o||oi<0||me&&Fi>=O}function _t(){var br=tl();if(Ke(br))return At(br);F=Yo(_t,ht(br))}function At(br){return F=t,ke&&p?$e(br):(p=v=t,N)}function In(){F!==t&&V_(F),ae=0,p=z=v=F=t}function an(){return F===t?N:At(tl())}function Cn(){var br=tl(),oi=Ke(br);if(p=arguments,v=this,z=br,oi){if(F===t)return Ye(z);if(me)return V_(F),F=Yo(_t,o),$e(z)}return F===t&&(F=Yo(_t,o)),N}return Cn.cancel=In,Cn.flush=an,Cn}var uF=yt(function(s,o){return x_(s,1,o)}),cF=yt(function(s,o,l){return x_(s,Qn(o)||0,l)});function lF(s){return Pi(s,fe)}function rl(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new Vn(u);var l=function(){var p=arguments,v=o?o.apply(this,p):p[0],O=l.cache;if(O.has(v))return O.get(v);var N=s.apply(this,p);return l.cache=O.set(v,N)||O,N};return l.cache=new(rl.Cache||Ii),l}rl.Cache=Ii;function nl(s){if(typeof s!="function")throw new Vn(u);return function(){var o=arguments;switch(o.length){case 0:return!s.call(this);case 1:return!s.call(this,o[0]);case 2:return!s.call(this,o[0],o[1]);case 3:return!s.call(this,o[0],o[1],o[2])}return!s.apply(this,o)}}function fF(s){return Ix(2,s)}var hF=ZR(function(s,o){o=o.length==1&&ot(o[0])?or(o[0],Tn(Qe())):or(Vr(o,1),Tn(Qe()));var l=o.length;return yt(function(p){for(var v=-1,O=Qr(p.length,l);++v<O;)p[v]=o[v].call(this,p[v]);return On(s,this,p)})}),Lp=yt(function(s,o){var l=us(o,Fa(Lp));return Pi(s,U,t,o,l)}),Mx=yt(function(s,o){var l=us(o,Fa(Mx));return Pi(s,W,t,o,l)}),dF=Ni(function(s,o){return Pi(s,X,t,t,t,o)});function pF(s,o){if(typeof s!="function")throw new Vn(u);return o=o===t?o:ft(o),yt(s,o)}function mF(s,o){if(typeof s!="function")throw new Vn(u);return o=o==null?0:Pr(ft(o),0),yt(function(l){var p=l[o],v=ds(l,0,o);return p&&os(v,p),On(s,this,v)})}function yF(s,o,l){var p=!0,v=!0;if(typeof s!="function")throw new Vn(u);return lr(l)&&(p="leading"in l?!!l.leading:p,v="trailing"in l?!!l.trailing:v),Rx(s,o,{leading:p,maxWait:o,trailing:v})}function gF(s){return kx(s,1)}function vF(s,o){return Lp(_p(o),s)}function bF(){if(!arguments.length)return[];var s=arguments[0];return ot(s)?s:[s]}function wF(s){return zn(s,m)}function _F(s,o){return o=typeof o=="function"?o:t,zn(s,m,o)}function xF(s){return zn(s,y|m)}function SF(s,o){return o=typeof o=="function"?o:t,zn(s,y|m,o)}function EF(s,o){return o==null||__(s,o,qr(o))}function ai(s,o){return s===o||s!==s&&o!==o}var OF=Jc(cp),TF=Jc(function(s,o){return s>=o}),Us=A_(function(){return arguments}())?A_:function(s){return pr(s)&&$t.call(s,"callee")&&!d_.call(s,"callee")},ot=Z.isArray,AF=Qw?Tn(Qw):DR;function fn(s){return s!=null&&il(s.length)&&!Mi(s)}function vr(s){return pr(s)&&fn(s)}function kF(s){return s===!0||s===!1||pr(s)&&nn(s)==Ot}var ps=BN||Qp,IF=Jw?Tn(Jw):FR;function CF(s){return pr(s)&&s.nodeType===1&&!Ko(s)}function PF(s){if(s==null)return!0;if(fn(s)&&(ot(s)||typeof s=="string"||typeof s.splice=="function"||ps(s)||La(s)||Us(s)))return!s.length;var o=Jr(s);if(o==J||o==_e)return!s.size;if(Jo(s))return!hp(s).length;for(var l in s)if($t.call(s,l))return!1;return!0}function NF(s,o){return Ho(s,o)}function RF(s,o,l){l=typeof l=="function"?l:t;var p=l?l(s,o):t;return p===t?Ho(s,o,t,l):!!p}function qp(s){if(!pr(s))return!1;var o=nn(s);return o==B||o==He||typeof s.message=="string"&&typeof s.name=="string"&&!Ko(s)}function MF(s){return typeof s=="number"&&m_(s)}function Mi(s){if(!lr(s))return!1;var o=nn(s);return o==Q||o==q||o==it||o==Be}function Dx(s){return typeof s=="number"&&s==ft(s)}function il(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=te}function lr(s){var o=typeof s;return s!=null&&(o=="object"||o=="function")}function pr(s){return s!=null&&typeof s=="object"}var Fx=Yw?Tn(Yw):qR;function DF(s,o){return s===o||fp(s,o,kp(o))}function FF(s,o,l){return l=typeof l=="function"?l:t,fp(s,o,kp(o),l)}function LF(s){return Lx(s)&&s!=+s}function qF(s){if(_M(s))throw new at(a);return k_(s)}function jF(s){return s===null}function UF(s){return s==null}function Lx(s){return typeof s=="number"||pr(s)&&nn(s)==ee}function Ko(s){if(!pr(s)||nn(s)!=xe)return!1;var o=Pc(s);if(o===null)return!0;var l=$t.call(o,"constructor")&&o.constructor;return typeof l=="function"&&l instanceof l&&Ac.call(l)==FN}var jp=Kw?Tn(Kw):jR;function $F(s){return Dx(s)&&s>=-te&&s<=te}var qx=Zw?Tn(Zw):UR;function sl(s){return typeof s=="string"||!ot(s)&&pr(s)&&nn(s)==Ge}function kn(s){return typeof s=="symbol"||pr(s)&&nn(s)==pt}var La=Xw?Tn(Xw):$R;function BF(s){return s===t}function VF(s){return pr(s)&&Jr(s)==Yt}function WF(s){return pr(s)&&nn(s)==Tt}var zF=Jc(dp),HF=Jc(function(s,o){return s<=o});function jx(s){if(!s)return[];if(fn(s))return sl(s)?ii(s):ln(s);if(qo&&s[qo])return EN(s[qo]());var o=Jr(s),l=o==J?ep:o==_e?Ec:qa;return l(s)}function Di(s){if(!s)return s===0?s:0;if(s=Qn(s),s===pe||s===-pe){var o=s<0?-1:1;return o*Ee}return s===s?s:0}function ft(s){var o=Di(s),l=o%1;return o===o?l?o-l:o:0}function Ux(s){return s?Fs(ft(s),0,Se):0}function Qn(s){if(typeof s=="number")return s;if(kn(s))return Le;if(lr(s)){var o=typeof s.valueOf=="function"?s.valueOf():s;s=lr(o)?o+"":o}if(typeof s!="string")return s===0?s:+s;s=s_(s);var l=Je.test(s);return l||tt.test(s)?oN(s.slice(2),l?2:8):ut.test(s)?Le:+s}function $x(s){return hi(s,hn(s))}function GF(s){return s?Fs(ft(s),-te,te):s===0?s:0}function jt(s){return s==null?"":An(s)}var QF=Ma(function(s,o){if(Jo(o)||fn(o)){hi(o,qr(o),s);return}for(var l in o)$t.call(o,l)&&Vo(s,l,o[l])}),Bx=Ma(function(s,o){hi(o,hn(o),s)}),al=Ma(function(s,o,l,p){hi(o,hn(o),s,p)}),JF=Ma(function(s,o,l,p){hi(o,qr(o),s,p)}),YF=Ni(ap);function KF(s,o){var l=Ra(s);return o==null?l:w_(l,o)}var ZF=yt(function(s,o){s=Jt(s);var l=-1,p=o.length,v=p>2?o[2]:t;for(v&&sn(o[0],o[1],v)&&(p=1);++l<p;)for(var O=o[l],N=hn(O),F=-1,z=N.length;++F<z;){var ae=N[F],ce=s[ae];(ce===t||ai(ce,Ca[ae])&&!$t.call(s,ae))&&(s[ae]=O[ae])}return s}),XF=yt(function(s){return s.push(t,sx),On(Vx,t,s)});function e2(s,o){return t_(s,Qe(o,3),fi)}function t2(s,o){return t_(s,Qe(o,3),up)}function r2(s,o){return s==null?s:op(s,Qe(o,3),hn)}function n2(s,o){return s==null?s:O_(s,Qe(o,3),hn)}function i2(s,o){return s&&fi(s,Qe(o,3))}function s2(s,o){return s&&up(s,Qe(o,3))}function a2(s){return s==null?[]:$c(s,qr(s))}function o2(s){return s==null?[]:$c(s,hn(s))}function Up(s,o,l){var p=s==null?t:Ls(s,o);return p===t?l:p}function u2(s,o){return s!=null&&ux(s,o,PR)}function $p(s,o){return s!=null&&ux(s,o,NR)}var c2=ex(function(s,o,l){o!=null&&typeof o.toString!="function"&&(o=kc.call(o)),s[o]=l},Vp(dn)),l2=ex(function(s,o,l){o!=null&&typeof o.toString!="function"&&(o=kc.call(o)),$t.call(s,o)?s[o].push(l):s[o]=[l]},Qe),f2=yt(zo);function qr(s){return fn(s)?v_(s):hp(s)}function hn(s){return fn(s)?v_(s,!0):BR(s)}function h2(s,o){var l={};return o=Qe(o,3),fi(s,function(p,v,O){Ci(l,o(p,v,O),p)}),l}function d2(s,o){var l={};return o=Qe(o,3),fi(s,function(p,v,O){Ci(l,v,o(p,v,O))}),l}var p2=Ma(function(s,o,l){Bc(s,o,l)}),Vx=Ma(function(s,o,l,p){Bc(s,o,l,p)}),m2=Ni(function(s,o){var l={};if(s==null)return l;var p=!1;o=or(o,function(O){return O=hs(O,s),p||(p=O.length>1),O}),hi(s,Tp(s),l),p&&(l=zn(l,y|g|m,cM));for(var v=o.length;v--;)vp(l,o[v]);return l});function y2(s,o){return Wx(s,nl(Qe(o)))}var g2=Ni(function(s,o){return s==null?{}:WR(s,o)});function Wx(s,o){if(s==null)return{};var l=or(Tp(s),function(p){return[p]});return o=Qe(o),D_(s,l,function(p,v){return o(p,v[0])})}function v2(s,o,l){o=hs(o,s);var p=-1,v=o.length;for(v||(v=1,s=t);++p<v;){var O=s==null?t:s[di(o[p])];O===t&&(p=v,O=l),s=Mi(O)?O.call(s):O}return s}function b2(s,o,l){return s==null?s:Go(s,o,l)}function w2(s,o,l,p){return p=typeof p=="function"?p:t,s==null?s:Go(s,o,l,p)}var zx=nx(qr),Hx=nx(hn);function _2(s,o,l){var p=ot(s),v=p||ps(s)||La(s);if(o=Qe(o,4),l==null){var O=s&&s.constructor;v?l=p?new O:[]:lr(s)?l=Mi(O)?Ra(Pc(s)):{}:l={}}return(v?Bn:fi)(s,function(N,F,z){return o(l,N,F,z)}),l}function x2(s,o){return s==null?!0:vp(s,o)}function S2(s,o,l){return s==null?s:U_(s,o,_p(l))}function E2(s,o,l,p){return p=typeof p=="function"?p:t,s==null?s:U_(s,o,_p(l),p)}function qa(s){return s==null?[]:Xd(s,qr(s))}function O2(s){return s==null?[]:Xd(s,hn(s))}function T2(s,o,l){return l===t&&(l=o,o=t),l!==t&&(l=Qn(l),l=l===l?l:0),o!==t&&(o=Qn(o),o=o===o?o:0),Fs(Qn(s),o,l)}function A2(s,o,l){return o=Di(o),l===t?(l=o,o=0):l=Di(l),s=Qn(s),RR(s,o,l)}function k2(s,o,l){if(l&&typeof l!="boolean"&&sn(s,o,l)&&(o=l=t),l===t&&(typeof o=="boolean"?(l=o,o=t):typeof s=="boolean"&&(l=s,s=t)),s===t&&o===t?(s=0,o=1):(s=Di(s),o===t?(o=s,s=0):o=Di(o)),s>o){var p=s;s=o,o=p}if(l||s%1||o%1){var v=y_();return Qr(s+v*(o-s+aN("1e-"+((v+"").length-1))),o)}return mp(s,o)}var I2=Da(function(s,o,l){return o=o.toLowerCase(),s+(l?Gx(o):o)});function Gx(s){return Bp(jt(s).toLowerCase())}function Qx(s){return s=jt(s),s&&s.replace(w,bN).replace(YP,"")}function C2(s,o,l){s=jt(s),o=An(o);var p=s.length;l=l===t?p:Fs(ft(l),0,p);var v=l;return l-=o.length,l>=0&&s.slice(l,v)==o}function P2(s){return s=jt(s),s&&kr.test(s)?s.replace(Zt,wN):s}function N2(s){return s=jt(s),s&&Gr.test(s)?s.replace(ar,"\\$&"):s}var R2=Da(function(s,o,l){return s+(l?"-":"")+o.toLowerCase()}),M2=Da(function(s,o,l){return s+(l?" ":"")+o.toLowerCase()}),D2=K_("toLowerCase");function F2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;if(!o||p>=o)return s;var v=(o-p)/2;return Qc(Dc(v),l)+s+Qc(Mc(v),l)}function L2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;return o&&p<o?s+Qc(o-p,l):s}function q2(s,o,l){s=jt(s),o=ft(o);var p=o?ka(s):0;return o&&p<o?Qc(o-p,l)+s:s}function j2(s,o,l){return l||o==null?o=0:o&&(o=+o),HN(jt(s).replace(Tr,""),o||0)}function U2(s,o,l){return(l?sn(s,o,l):o===t)?o=1:o=ft(o),yp(jt(s),o)}function $2(){var s=arguments,o=jt(s[0]);return s.length<3?o:o.replace(s[1],s[2])}var B2=Da(function(s,o,l){return s+(l?"_":"")+o.toLowerCase()});function V2(s,o,l){return l&&typeof l!="number"&&sn(s,o,l)&&(o=l=t),l=l===t?Se:l>>>0,l?(s=jt(s),s&&(typeof o=="string"||o!=null&&!jp(o))&&(o=An(o),!o&&Aa(s))?ds(ii(s),0,l):s.split(o,l)):[]}var W2=Da(function(s,o,l){return s+(l?" ":"")+Bp(o)});function z2(s,o,l){return s=jt(s),l=l==null?0:Fs(ft(l),0,s.length),o=An(o),s.slice(l,l+o.length)==o}function H2(s,o,l){var p=S.templateSettings;l&&sn(s,o,l)&&(o=t),s=jt(s),o=al({},o,p,ix);var v=al({},o.imports,p.imports,ix),O=qr(v),N=Xd(v,O),F,z,ae=0,ce=o.interpolate||k,me="__p += '",ke=tp((o.escape||k).source+"|"+ce.source+"|"+(ce===Ut?Pe:k).source+"|"+(o.evaluate||k).source+"|$","g"),$e="//# sourceURL="+($t.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++tN+"]")+`
|
|
96
96
|
`;s.replace(ke,function(Ke,_t,At,In,an,Cn){return At||(At=In),me+=s.slice(ae,Cn).replace(T,_N),_t&&(F=!0,me+=`' +
|
|
97
97
|
__e(`+_t+`) +
|
|
98
98
|
'`),an&&(z=!0,me+=`';
|
|
@@ -109,7 +109,7 @@ __p += '`),At&&(me+=`' +
|
|
|
109
109
|
function print() { __p += __j.call(arguments, '') }
|
|
110
110
|
`:`;
|
|
111
111
|
`)+me+`return __p
|
|
112
|
-
}`;var ht=Yx(function(){return Dt(O,$e+"return "+me).apply(t,N)});if(ht.source=me,qp(ht))throw ht;return ht}function G2(s){return jt(s).toLowerCase()}function Q2(s){return jt(s).toUpperCase()}function J2(s,o,l){if(s=jt(s),s&&(l||o===t))return s_(s);if(!s||!(o=An(o)))return s;var p=ii(s),v=ii(o),O=a_(p,v),N=o_(p,v)+1;return ds(p,O,N).join("")}function Y2(s,o,l){if(s=jt(s),s&&(l||o===t))return s.slice(0,c_(s)+1);if(!s||!(o=An(o)))return s;var p=ii(s),v=o_(p,ii(o))+1;return ds(p,0,v).join("")}function K2(s,o,l){if(s=jt(s),s&&(l||o===t))return s.replace(Tr,"");if(!s||!(o=An(o)))return s;var p=ii(s),v=a_(p,ii(o));return ds(p,v).join("")}function Z2(s,o){var l=oe,p=Ie;if(lr(o)){var v="separator"in o?o.separator:v;l="length"in o?ft(o.length):l,p="omission"in o?An(o.omission):p}s=jt(s);var O=s.length;if(Aa(s)){var N=ii(s);O=N.length}if(l>=O)return s;var F=l-ka(p);if(F<1)return p;var z=N?ds(N,0,F).join(""):s.slice(0,F);if(v===t)return z+p;if(N&&(F+=z.length-F),jp(v)){if(s.slice(F).search(v)){var ae,ce=z;for(v.global||(v=tp(v.source,jt(Ve.exec(v))+"g")),v.lastIndex=0;ae=v.exec(ce);)var me=ae.index;z=z.slice(0,me===t?F:me)}}else if(s.indexOf(An(v),F)!=F){var ke=z.lastIndexOf(v);ke>-1&&(z=z.slice(0,ke))}return z+p}function X2(s){return s=jt(s),s&&Qt.test(s)?s.replace(Kt,kN):s}var eL=Da(function(s,o,l){return s+(l?" ":"")+o.toUpperCase()}),Bp=K_("toUpperCase");function Jx(s,o,l){return s=jt(s),o=l?t:o,o===t?SN(s)?PN(s):pN(s):s.match(o)||[]}var Yx=yt(function(s,o){try{return On(s,t,o)}catch(l){return qp(l)?l:new at(l)}}),tL=Ni(function(s,o){return Bn(o,function(l){l=di(l),Ci(s,l,Fp(s[l],s))}),s});function rL(s){var o=s==null?0:s.length,l=Qe();return s=o?or(s,function(p){if(typeof p[1]!="function")throw new Vn(u);return[l(p[0]),p[1]]}):[],yt(function(p){for(var v=-1;++v<o;){var O=s[v];if(On(O[0],this,p))return On(O[1],this,p)}})}function nL(s){return kR(zn(s,y))}function Vp(s){return function(){return s}}function iL(s,o){return s==null||s!==s?o:s}var sL=X_(),aL=X_(!0);function dn(s){return s}function Wp(s){return I_(typeof s=="function"?s:zn(s,y))}function oL(s){return P_(zn(s,y))}function uL(s,o){return N_(s,zn(o,y))}var cL=yt(function(s,o){return function(l){return zo(l,s,o)}}),lL=yt(function(s,o){return function(l){return zo(s,l,o)}});function zp(s,o,l){var p=qr(o),v=$c(o,p);l==null&&!(lr(o)&&(v.length||!p.length))&&(l=o,o=s,s=this,v=$c(o,qr(o)));var O=!(lr(l)&&"chain"in l)||!!l.chain,N=Mi(s);return Bn(v,function(F){var z=o[F];s[F]=z,N&&(s.prototype[F]=function(){var ae=this.__chain__;if(O||ae){var ce=s(this.__wrapped__),me=ce.__actions__=ln(this.__actions__);return me.push({func:z,args:arguments,thisArg:s}),ce.__chain__=ae,ce}return z.apply(s,os([this.value()],arguments))})}),s}function fL(){return Br._===this&&(Br._=LN),this}function Hp(){}function hL(s){return s=ft(s),yt(function(o){return R_(o,s)})}var dL=Sp(or),pL=Sp(e_),mL=Sp(Qd);function Kx(s){return Cp(s)?Jd(di(s)):zR(s)}function yL(s){return function(o){return s==null?t:Ls(s,o)}}var gL=tx(),vL=tx(!0);function Gp(){return[]}function Qp(){return!1}function bL(){return{}}function wL(){return""}function _L(){return!0}function xL(s,o){if(s=ft(s),s<1||s>te)return[];var l=Ee,p=Qr(s,Ee);o=Qe(o),s-=Ee;for(var v=Zd(p,o);++l<s;)o(l);return v}function SL(s){return ot(s)?or(s,di):kn(s)?[s]:ln(gx(jt(s)))}function EL(s){var o=++DN;return jt(s)+o}var OL=Gc(function(s,o){return s+o},0),TL=Ep("ceil"),AL=Gc(function(s,o){return s/o},1),kL=Ep("floor");function IL(s){return s&&s.length?Uc(s,dn,cp):t}function CL(s,o){return s&&s.length?Uc(s,Qe(o,2),cp):t}function PL(s){return n_(s,dn)}function NL(s,o){return n_(s,Qe(o,2))}function RL(s){return s&&s.length?Uc(s,dn,dp):t}function ML(s,o){return s&&s.length?Uc(s,Qe(o,2),dp):t}var DL=Gc(function(s,o){return s*o},1),FL=Ep("round"),LL=Gc(function(s,o){return s-o},0);function qL(s){return s&&s.length?Kd(s,dn):0}function jL(s,o){return s&&s.length?Kd(s,Qe(o,2)):0}return S.after=oF,S.ary=kx,S.assign=QF,S.assignIn=Bx,S.assignInWith=al,S.assignWith=JF,S.at=YF,S.before=Ix,S.bind=Fp,S.bindAll=tL,S.bindKey=Cx,S.castArray=bF,S.chain=Ox,S.chunk=kM,S.compact=IM,S.concat=CM,S.cond=rL,S.conforms=nL,S.constant=Vp,S.countBy=qD,S.create=KF,S.curry=Px,S.curryRight=Nx,S.debounce=Rx,S.defaults=ZF,S.defaultsDeep=XF,S.defer=uF,S.delay=cF,S.difference=PM,S.differenceBy=NM,S.differenceWith=RM,S.drop=MM,S.dropRight=DM,S.dropRightWhile=FM,S.dropWhile=LM,S.fill=qM,S.filter=UD,S.flatMap=VD,S.flatMapDeep=WD,S.flatMapDepth=zD,S.flatten=_x,S.flattenDeep=jM,S.flattenDepth=UM,S.flip=lF,S.flow=sL,S.flowRight=aL,S.fromPairs=$M,S.functions=a2,S.functionsIn=o2,S.groupBy=HD,S.initial=VM,S.intersection=WM,S.intersectionBy=zM,S.intersectionWith=HM,S.invert=c2,S.invertBy=l2,S.invokeMap=QD,S.iteratee=Wp,S.keyBy=JD,S.keys=qr,S.keysIn=hn,S.map=el,S.mapKeys=h2,S.mapValues=d2,S.matches=oL,S.matchesProperty=uL,S.memoize=rl,S.merge=p2,S.mergeWith=Vx,S.method=cL,S.methodOf=lL,S.mixin=zp,S.negate=nl,S.nthArg=hL,S.omit=m2,S.omitBy=y2,S.once=fF,S.orderBy=YD,S.over=dL,S.overArgs=hF,S.overEvery=pL,S.overSome=mL,S.partial=Lp,S.partialRight=Mx,S.partition=KD,S.pick=g2,S.pickBy=Wx,S.property=Kx,S.propertyOf=yL,S.pull=YM,S.pullAll=Sx,S.pullAllBy=KM,S.pullAllWith=ZM,S.pullAt=XM,S.range=gL,S.rangeRight=vL,S.rearg=dF,S.reject=eF,S.remove=eD,S.rest=pF,S.reverse=Mp,S.sampleSize=rF,S.set=b2,S.setWith=w2,S.shuffle=nF,S.slice=tD,S.sortBy=aF,S.sortedUniq=uD,S.sortedUniqBy=cD,S.split=V2,S.spread=mF,S.tail=lD,S.take=fD,S.takeRight=hD,S.takeRightWhile=dD,S.takeWhile=pD,S.tap=ID,S.throttle=yF,S.thru=Xc,S.toArray=jx,S.toPairs=zx,S.toPairsIn=Hx,S.toPath=SL,S.toPlainObject=$x,S.transform=_2,S.unary=gF,S.union=mD,S.unionBy=yD,S.unionWith=gD,S.uniq=vD,S.uniqBy=bD,S.uniqWith=wD,S.unset=x2,S.unzip=Dp,S.unzipWith=Ex,S.update=S2,S.updateWith=E2,S.values=qa,S.valuesIn=O2,S.without=_D,S.words=Jx,S.wrap=vF,S.xor=xD,S.xorBy=SD,S.xorWith=ED,S.zip=OD,S.zipObject=TD,S.zipObjectDeep=AD,S.zipWith=kD,S.entries=zx,S.entriesIn=Hx,S.extend=Bx,S.extendWith=al,zp(S,S),S.add=OL,S.attempt=Yx,S.camelCase=I2,S.capitalize=Gx,S.ceil=TL,S.clamp=T2,S.clone=wF,S.cloneDeep=xF,S.cloneDeepWith=SF,S.cloneWith=_F,S.conformsTo=EF,S.deburr=Qx,S.defaultTo=iL,S.divide=AL,S.endsWith=C2,S.eq=ai,S.escape=P2,S.escapeRegExp=N2,S.every=jD,S.find=$D,S.findIndex=bx,S.findKey=e2,S.findLast=BD,S.findLastIndex=wx,S.findLastKey=t2,S.floor=kL,S.forEach=Tx,S.forEachRight=Ax,S.forIn=r2,S.forInRight=n2,S.forOwn=i2,S.forOwnRight=s2,S.get=Up,S.gt=OF,S.gte=TF,S.has=u2,S.hasIn=$p,S.head=xx,S.identity=dn,S.includes=GD,S.indexOf=BM,S.inRange=A2,S.invoke=f2,S.isArguments=Us,S.isArray=ot,S.isArrayBuffer=AF,S.isArrayLike=fn,S.isArrayLikeObject=vr,S.isBoolean=kF,S.isBuffer=ps,S.isDate=IF,S.isElement=CF,S.isEmpty=PF,S.isEqual=NF,S.isEqualWith=RF,S.isError=qp,S.isFinite=MF,S.isFunction=Mi,S.isInteger=Dx,S.isLength=il,S.isMap=Fx,S.isMatch=DF,S.isMatchWith=FF,S.isNaN=LF,S.isNative=qF,S.isNil=UF,S.isNull=jF,S.isNumber=Lx,S.isObject=lr,S.isObjectLike=pr,S.isPlainObject=Ko,S.isRegExp=jp,S.isSafeInteger=$F,S.isSet=qx,S.isString=sl,S.isSymbol=kn,S.isTypedArray=La,S.isUndefined=BF,S.isWeakMap=VF,S.isWeakSet=WF,S.join=GM,S.kebabCase=R2,S.last=Gn,S.lastIndexOf=QM,S.lowerCase=M2,S.lowerFirst=D2,S.lt=zF,S.lte=HF,S.max=IL,S.maxBy=CL,S.mean=PL,S.meanBy=NL,S.min=RL,S.minBy=ML,S.stubArray=Gp,S.stubFalse=Qp,S.stubObject=bL,S.stubString=wL,S.stubTrue=_L,S.multiply=DL,S.nth=JM,S.noConflict=fL,S.noop=Hp,S.now=tl,S.pad=F2,S.padEnd=L2,S.padStart=q2,S.parseInt=j2,S.random=k2,S.reduce=ZD,S.reduceRight=XD,S.repeat=U2,S.replace=$2,S.result=v2,S.round=FL,S.runInContext=j,S.sample=tF,S.size=iF,S.snakeCase=B2,S.some=sF,S.sortedIndex=rD,S.sortedIndexBy=nD,S.sortedIndexOf=iD,S.sortedLastIndex=sD,S.sortedLastIndexBy=aD,S.sortedLastIndexOf=oD,S.startCase=W2,S.startsWith=z2,S.subtract=LL,S.sum=qL,S.sumBy=jL,S.template=H2,S.times=xL,S.toFinite=Di,S.toInteger=ft,S.toLength=Ux,S.toLower=G2,S.toNumber=Qn,S.toSafeInteger=GF,S.toString=jt,S.toUpper=Q2,S.trim=J2,S.trimEnd=Y2,S.trimStart=K2,S.truncate=Z2,S.unescape=X2,S.uniqueId=EL,S.upperCase=eL,S.upperFirst=Bp,S.each=Tx,S.eachRight=Ax,S.first=xx,zp(S,function(){var s={};return fi(S,function(o,l){$t.call(S.prototype,l)||(s[l]=o)}),s}(),{chain:!1}),S.VERSION=n,Bn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){S[s].placeholder=S}),Bn(["drop","take"],function(s,o){St.prototype[s]=function(l){l=l===t?1:Pr(ft(l),0);var p=this.__filtered__&&!o?new St(this):this.clone();return p.__filtered__?p.__takeCount__=Qr(l,p.__takeCount__):p.__views__.push({size:Qr(l,Ee),type:s+(p.__dir__<0?"Right":"")}),p},St.prototype[s+"Right"]=function(l){return this.reverse()[s](l).reverse()}}),Bn(["filter","map","takeWhile"],function(s,o){var l=o+1,p=l==Ce||l==ve;St.prototype[s]=function(v){var O=this.clone();return O.__iteratees__.push({iteratee:Qe(v,3),type:l}),O.__filtered__=O.__filtered__||p,O}}),Bn(["head","last"],function(s,o){var l="take"+(o?"Right":"");St.prototype[s]=function(){return this[l](1).value()[0]}}),Bn(["initial","tail"],function(s,o){var l="drop"+(o?"":"Right");St.prototype[s]=function(){return this.__filtered__?new St(this):this[l](1)}}),St.prototype.compact=function(){return this.filter(dn)},St.prototype.find=function(s){return this.filter(s).head()},St.prototype.findLast=function(s){return this.reverse().find(s)},St.prototype.invokeMap=yt(function(s,o){return typeof s=="function"?new St(this):this.map(function(l){return zo(l,s,o)})}),St.prototype.reject=function(s){return this.filter(nl(Qe(s)))},St.prototype.slice=function(s,o){s=ft(s);var l=this;return l.__filtered__&&(s>0||o<0)?new St(l):(s<0?l=l.takeRight(-s):s&&(l=l.drop(s)),o!==t&&(o=ft(o),l=o<0?l.dropRight(-o):l.take(o-s)),l)},St.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},St.prototype.toArray=function(){return this.take(Ee)},fi(St.prototype,function(s,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),v=S[p?"take"+(o=="last"?"Right":""):o],O=p||/^find/.test(o);v&&(S.prototype[o]=function(){var N=this.__wrapped__,F=p?[1]:arguments,z=N instanceof St,ae=F[0],ce=z||ot(N),me=function(_t){var At=v.apply(S,os([_t],F));return p&&ke?At[0]:At};ce&&l&&typeof ae=="function"&&ae.length!=1&&(z=ce=!1);var ke=this.__chain__,$e=!!this.__actions__.length,Ye=O&&!ke,ht=z&&!$e;if(!O&&ce){N=ht?N:new St(this);var Ke=s.apply(N,F);return Ke.__actions__.push({func:Xc,args:[me],thisArg:t}),new Wn(Ke,ke)}return Ye&&ht?s.apply(this,F):(Ke=this.thru(me),Ye?p?Ke.value()[0]:Ke.value():Ke)})}),Bn(["pop","push","shift","sort","splice","unshift"],function(s){var o=Oc[s],l=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",p=/^(?:pop|shift)$/.test(s);S.prototype[s]=function(){var v=arguments;if(p&&!this.__chain__){var O=this.value();return o.apply(ot(O)?O:[],v)}return this[l](function(N){return o.apply(ot(N)?N:[],v)})}}),fi(St.prototype,function(s,o){var l=S[o];if(l){var p=l.name+"";$t.call(Na,p)||(Na[p]=[]),Na[p].push({name:o,func:l})}}),Na[Hc(t,_).name]=[{name:"wrapper",func:t}],St.prototype.clone=XN,St.prototype.reverse=eR,St.prototype.value=tR,S.prototype.at=CD,S.prototype.chain=PD,S.prototype.commit=ND,S.prototype.next=RD,S.prototype.plant=DD,S.prototype.reverse=FD,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=LD,S.prototype.first=S.prototype.head,qo&&(S.prototype[qo]=MD),S},Ia=NN();Ns?((Ns.exports=Ia)._=Ia,Wd._=Ia):Br._=Ia}).call(pi)}(Xu,Xu.exports);var WA=Xu.exports;const ci=Yp(WA),c0=he.createContext(),l0=he.createContext(),f0=he.createContext(),zA=({children:r})=>{const[e,t]=pn.useSearchParams(),[n,i]=he.useState({});he.useEffect(()=>{Object.keys(n).length>0&&(t(c=>{const f=new URLSearchParams(c);return Object.entries(n).forEach(([h,d])=>{d==null||d===""?f.delete(h):f.set(h,d)}),f}),i({}))},[n,t]);const a=c=>{i(f=>({...f,...c}))},u=he.useMemo(()=>[Object.fromEntries(e.entries()),a],[e]);return nr.jsx(f0.Provider,{value:u,children:r})},es=he.createContext(),HA=(r,e,t=i=>i,n=i=>i)=>{const[i,a]=he.useContext(f0),u=i[r];return[u?t(u):e,h=>{if(typeof h=="function"){const y=i[r];h=h(y?t(y):e)}const d=n(h);a({[r]:d})}]},bo=async(r,e,t)=>{he.useEffect(()=>{const n=new window.AbortController;async function i(){return await r(n.signal)}return i(),()=>{n.abort(),t&&t()}},[...e])},GA=(r,e,t)=>{const n=he.useRef(r);he.useEffect(()=>{n.current=r},[r]);const i=he.useCallback(ci.throttle(()=>{n.current()},e),[]);he.useEffect(i,[...t])},wo=(r,e=null,t)=>{const n=he.useRef(r);he.useEffect(()=>{n.current=r},[r]),bo(async i=>{let a;const u=async()=>{await n.current(i),e!==null&&(a=setTimeout(u,e))};return u(),()=>a&&clearTimeout(a)},[e,...t])},h0=(r,e,t)=>{const[n,i]=he.useState(),[a,u]=he.useState(!0),[c,f]=he.useState(),{urls:h,request:d}=ti();return wo(async y=>{try{const g={signal:y,...e||{}};if(g.skip)return;const m=await d(`${h.apiUrl}${r}`,g);i(m)}catch(g){f(g)}u(!1)},t,[r,e]),{data:n,error:c,loading:a}},QA=(r,e)=>{const[t,n]=he.useState(),[i,a]=he.useState(!0),[u,c]=he.useState(null),[f,h]=he.useState(),{urls:d,request:y}=ti();return he.useEffect(()=>{a(u===null||u>0)},[u]),wo(async g=>{try{if(!r)return;c(b=>(b||0)+1);const m=await y(`${d.apiUrl}/reports/production`,{method:"POST",body:r,signal:g});h(null),n(m)}catch(m){m.name!=="AbortError"&&h(m)}c(m=>m-1)},e,[r]),{data:t,error:f,loading:i}},JA=({machineRef:r,key:e,skip:t})=>{const[n,i]=he.useState(),[a,u]=he.useState(),[c,f]=he.useState(),[h,d]=he.useState(),[y,g]=he.useState(),[m,b]=he.useState(),I=Qi`
|
|
112
|
+
}`;var ht=Yx(function(){return Dt(O,$e+"return "+me).apply(t,N)});if(ht.source=me,qp(ht))throw ht;return ht}function G2(s){return jt(s).toLowerCase()}function Q2(s){return jt(s).toUpperCase()}function J2(s,o,l){if(s=jt(s),s&&(l||o===t))return s_(s);if(!s||!(o=An(o)))return s;var p=ii(s),v=ii(o),O=a_(p,v),N=o_(p,v)+1;return ds(p,O,N).join("")}function Y2(s,o,l){if(s=jt(s),s&&(l||o===t))return s.slice(0,c_(s)+1);if(!s||!(o=An(o)))return s;var p=ii(s),v=o_(p,ii(o))+1;return ds(p,0,v).join("")}function K2(s,o,l){if(s=jt(s),s&&(l||o===t))return s.replace(Tr,"");if(!s||!(o=An(o)))return s;var p=ii(s),v=a_(p,ii(o));return ds(p,v).join("")}function Z2(s,o){var l=oe,p=Ie;if(lr(o)){var v="separator"in o?o.separator:v;l="length"in o?ft(o.length):l,p="omission"in o?An(o.omission):p}s=jt(s);var O=s.length;if(Aa(s)){var N=ii(s);O=N.length}if(l>=O)return s;var F=l-ka(p);if(F<1)return p;var z=N?ds(N,0,F).join(""):s.slice(0,F);if(v===t)return z+p;if(N&&(F+=z.length-F),jp(v)){if(s.slice(F).search(v)){var ae,ce=z;for(v.global||(v=tp(v.source,jt(Ve.exec(v))+"g")),v.lastIndex=0;ae=v.exec(ce);)var me=ae.index;z=z.slice(0,me===t?F:me)}}else if(s.indexOf(An(v),F)!=F){var ke=z.lastIndexOf(v);ke>-1&&(z=z.slice(0,ke))}return z+p}function X2(s){return s=jt(s),s&&Qt.test(s)?s.replace(Kt,kN):s}var eL=Da(function(s,o,l){return s+(l?" ":"")+o.toUpperCase()}),Bp=K_("toUpperCase");function Jx(s,o,l){return s=jt(s),o=l?t:o,o===t?SN(s)?PN(s):pN(s):s.match(o)||[]}var Yx=yt(function(s,o){try{return On(s,t,o)}catch(l){return qp(l)?l:new at(l)}}),tL=Ni(function(s,o){return Bn(o,function(l){l=di(l),Ci(s,l,Fp(s[l],s))}),s});function rL(s){var o=s==null?0:s.length,l=Qe();return s=o?or(s,function(p){if(typeof p[1]!="function")throw new Vn(u);return[l(p[0]),p[1]]}):[],yt(function(p){for(var v=-1;++v<o;){var O=s[v];if(On(O[0],this,p))return On(O[1],this,p)}})}function nL(s){return kR(zn(s,y))}function Vp(s){return function(){return s}}function iL(s,o){return s==null||s!==s?o:s}var sL=X_(),aL=X_(!0);function dn(s){return s}function Wp(s){return I_(typeof s=="function"?s:zn(s,y))}function oL(s){return P_(zn(s,y))}function uL(s,o){return N_(s,zn(o,y))}var cL=yt(function(s,o){return function(l){return zo(l,s,o)}}),lL=yt(function(s,o){return function(l){return zo(s,l,o)}});function zp(s,o,l){var p=qr(o),v=$c(o,p);l==null&&!(lr(o)&&(v.length||!p.length))&&(l=o,o=s,s=this,v=$c(o,qr(o)));var O=!(lr(l)&&"chain"in l)||!!l.chain,N=Mi(s);return Bn(v,function(F){var z=o[F];s[F]=z,N&&(s.prototype[F]=function(){var ae=this.__chain__;if(O||ae){var ce=s(this.__wrapped__),me=ce.__actions__=ln(this.__actions__);return me.push({func:z,args:arguments,thisArg:s}),ce.__chain__=ae,ce}return z.apply(s,os([this.value()],arguments))})}),s}function fL(){return Br._===this&&(Br._=LN),this}function Hp(){}function hL(s){return s=ft(s),yt(function(o){return R_(o,s)})}var dL=Sp(or),pL=Sp(e_),mL=Sp(Qd);function Kx(s){return Cp(s)?Jd(di(s)):zR(s)}function yL(s){return function(o){return s==null?t:Ls(s,o)}}var gL=tx(),vL=tx(!0);function Gp(){return[]}function Qp(){return!1}function bL(){return{}}function wL(){return""}function _L(){return!0}function xL(s,o){if(s=ft(s),s<1||s>te)return[];var l=Se,p=Qr(s,Se);o=Qe(o),s-=Se;for(var v=Zd(p,o);++l<s;)o(l);return v}function SL(s){return ot(s)?or(s,di):kn(s)?[s]:ln(gx(jt(s)))}function EL(s){var o=++DN;return jt(s)+o}var OL=Gc(function(s,o){return s+o},0),TL=Ep("ceil"),AL=Gc(function(s,o){return s/o},1),kL=Ep("floor");function IL(s){return s&&s.length?Uc(s,dn,cp):t}function CL(s,o){return s&&s.length?Uc(s,Qe(o,2),cp):t}function PL(s){return n_(s,dn)}function NL(s,o){return n_(s,Qe(o,2))}function RL(s){return s&&s.length?Uc(s,dn,dp):t}function ML(s,o){return s&&s.length?Uc(s,Qe(o,2),dp):t}var DL=Gc(function(s,o){return s*o},1),FL=Ep("round"),LL=Gc(function(s,o){return s-o},0);function qL(s){return s&&s.length?Kd(s,dn):0}function jL(s,o){return s&&s.length?Kd(s,Qe(o,2)):0}return S.after=oF,S.ary=kx,S.assign=QF,S.assignIn=Bx,S.assignInWith=al,S.assignWith=JF,S.at=YF,S.before=Ix,S.bind=Fp,S.bindAll=tL,S.bindKey=Cx,S.castArray=bF,S.chain=Ox,S.chunk=kM,S.compact=IM,S.concat=CM,S.cond=rL,S.conforms=nL,S.constant=Vp,S.countBy=qD,S.create=KF,S.curry=Px,S.curryRight=Nx,S.debounce=Rx,S.defaults=ZF,S.defaultsDeep=XF,S.defer=uF,S.delay=cF,S.difference=PM,S.differenceBy=NM,S.differenceWith=RM,S.drop=MM,S.dropRight=DM,S.dropRightWhile=FM,S.dropWhile=LM,S.fill=qM,S.filter=UD,S.flatMap=VD,S.flatMapDeep=WD,S.flatMapDepth=zD,S.flatten=_x,S.flattenDeep=jM,S.flattenDepth=UM,S.flip=lF,S.flow=sL,S.flowRight=aL,S.fromPairs=$M,S.functions=a2,S.functionsIn=o2,S.groupBy=HD,S.initial=VM,S.intersection=WM,S.intersectionBy=zM,S.intersectionWith=HM,S.invert=c2,S.invertBy=l2,S.invokeMap=QD,S.iteratee=Wp,S.keyBy=JD,S.keys=qr,S.keysIn=hn,S.map=el,S.mapKeys=h2,S.mapValues=d2,S.matches=oL,S.matchesProperty=uL,S.memoize=rl,S.merge=p2,S.mergeWith=Vx,S.method=cL,S.methodOf=lL,S.mixin=zp,S.negate=nl,S.nthArg=hL,S.omit=m2,S.omitBy=y2,S.once=fF,S.orderBy=YD,S.over=dL,S.overArgs=hF,S.overEvery=pL,S.overSome=mL,S.partial=Lp,S.partialRight=Mx,S.partition=KD,S.pick=g2,S.pickBy=Wx,S.property=Kx,S.propertyOf=yL,S.pull=YM,S.pullAll=Sx,S.pullAllBy=KM,S.pullAllWith=ZM,S.pullAt=XM,S.range=gL,S.rangeRight=vL,S.rearg=dF,S.reject=eF,S.remove=eD,S.rest=pF,S.reverse=Mp,S.sampleSize=rF,S.set=b2,S.setWith=w2,S.shuffle=nF,S.slice=tD,S.sortBy=aF,S.sortedUniq=uD,S.sortedUniqBy=cD,S.split=V2,S.spread=mF,S.tail=lD,S.take=fD,S.takeRight=hD,S.takeRightWhile=dD,S.takeWhile=pD,S.tap=ID,S.throttle=yF,S.thru=Xc,S.toArray=jx,S.toPairs=zx,S.toPairsIn=Hx,S.toPath=SL,S.toPlainObject=$x,S.transform=_2,S.unary=gF,S.union=mD,S.unionBy=yD,S.unionWith=gD,S.uniq=vD,S.uniqBy=bD,S.uniqWith=wD,S.unset=x2,S.unzip=Dp,S.unzipWith=Ex,S.update=S2,S.updateWith=E2,S.values=qa,S.valuesIn=O2,S.without=_D,S.words=Jx,S.wrap=vF,S.xor=xD,S.xorBy=SD,S.xorWith=ED,S.zip=OD,S.zipObject=TD,S.zipObjectDeep=AD,S.zipWith=kD,S.entries=zx,S.entriesIn=Hx,S.extend=Bx,S.extendWith=al,zp(S,S),S.add=OL,S.attempt=Yx,S.camelCase=I2,S.capitalize=Gx,S.ceil=TL,S.clamp=T2,S.clone=wF,S.cloneDeep=xF,S.cloneDeepWith=SF,S.cloneWith=_F,S.conformsTo=EF,S.deburr=Qx,S.defaultTo=iL,S.divide=AL,S.endsWith=C2,S.eq=ai,S.escape=P2,S.escapeRegExp=N2,S.every=jD,S.find=$D,S.findIndex=bx,S.findKey=e2,S.findLast=BD,S.findLastIndex=wx,S.findLastKey=t2,S.floor=kL,S.forEach=Tx,S.forEachRight=Ax,S.forIn=r2,S.forInRight=n2,S.forOwn=i2,S.forOwnRight=s2,S.get=Up,S.gt=OF,S.gte=TF,S.has=u2,S.hasIn=$p,S.head=xx,S.identity=dn,S.includes=GD,S.indexOf=BM,S.inRange=A2,S.invoke=f2,S.isArguments=Us,S.isArray=ot,S.isArrayBuffer=AF,S.isArrayLike=fn,S.isArrayLikeObject=vr,S.isBoolean=kF,S.isBuffer=ps,S.isDate=IF,S.isElement=CF,S.isEmpty=PF,S.isEqual=NF,S.isEqualWith=RF,S.isError=qp,S.isFinite=MF,S.isFunction=Mi,S.isInteger=Dx,S.isLength=il,S.isMap=Fx,S.isMatch=DF,S.isMatchWith=FF,S.isNaN=LF,S.isNative=qF,S.isNil=UF,S.isNull=jF,S.isNumber=Lx,S.isObject=lr,S.isObjectLike=pr,S.isPlainObject=Ko,S.isRegExp=jp,S.isSafeInteger=$F,S.isSet=qx,S.isString=sl,S.isSymbol=kn,S.isTypedArray=La,S.isUndefined=BF,S.isWeakMap=VF,S.isWeakSet=WF,S.join=GM,S.kebabCase=R2,S.last=Gn,S.lastIndexOf=QM,S.lowerCase=M2,S.lowerFirst=D2,S.lt=zF,S.lte=HF,S.max=IL,S.maxBy=CL,S.mean=PL,S.meanBy=NL,S.min=RL,S.minBy=ML,S.stubArray=Gp,S.stubFalse=Qp,S.stubObject=bL,S.stubString=wL,S.stubTrue=_L,S.multiply=DL,S.nth=JM,S.noConflict=fL,S.noop=Hp,S.now=tl,S.pad=F2,S.padEnd=L2,S.padStart=q2,S.parseInt=j2,S.random=k2,S.reduce=ZD,S.reduceRight=XD,S.repeat=U2,S.replace=$2,S.result=v2,S.round=FL,S.runInContext=j,S.sample=tF,S.size=iF,S.snakeCase=B2,S.some=sF,S.sortedIndex=rD,S.sortedIndexBy=nD,S.sortedIndexOf=iD,S.sortedLastIndex=sD,S.sortedLastIndexBy=aD,S.sortedLastIndexOf=oD,S.startCase=W2,S.startsWith=z2,S.subtract=LL,S.sum=qL,S.sumBy=jL,S.template=H2,S.times=xL,S.toFinite=Di,S.toInteger=ft,S.toLength=Ux,S.toLower=G2,S.toNumber=Qn,S.toSafeInteger=GF,S.toString=jt,S.toUpper=Q2,S.trim=J2,S.trimEnd=Y2,S.trimStart=K2,S.truncate=Z2,S.unescape=X2,S.uniqueId=EL,S.upperCase=eL,S.upperFirst=Bp,S.each=Tx,S.eachRight=Ax,S.first=xx,zp(S,function(){var s={};return fi(S,function(o,l){$t.call(S.prototype,l)||(s[l]=o)}),s}(),{chain:!1}),S.VERSION=n,Bn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){S[s].placeholder=S}),Bn(["drop","take"],function(s,o){St.prototype[s]=function(l){l=l===t?1:Pr(ft(l),0);var p=this.__filtered__&&!o?new St(this):this.clone();return p.__filtered__?p.__takeCount__=Qr(l,p.__takeCount__):p.__views__.push({size:Qr(l,Se),type:s+(p.__dir__<0?"Right":"")}),p},St.prototype[s+"Right"]=function(l){return this.reverse()[s](l).reverse()}}),Bn(["filter","map","takeWhile"],function(s,o){var l=o+1,p=l==Ce||l==ve;St.prototype[s]=function(v){var O=this.clone();return O.__iteratees__.push({iteratee:Qe(v,3),type:l}),O.__filtered__=O.__filtered__||p,O}}),Bn(["head","last"],function(s,o){var l="take"+(o?"Right":"");St.prototype[s]=function(){return this[l](1).value()[0]}}),Bn(["initial","tail"],function(s,o){var l="drop"+(o?"":"Right");St.prototype[s]=function(){return this.__filtered__?new St(this):this[l](1)}}),St.prototype.compact=function(){return this.filter(dn)},St.prototype.find=function(s){return this.filter(s).head()},St.prototype.findLast=function(s){return this.reverse().find(s)},St.prototype.invokeMap=yt(function(s,o){return typeof s=="function"?new St(this):this.map(function(l){return zo(l,s,o)})}),St.prototype.reject=function(s){return this.filter(nl(Qe(s)))},St.prototype.slice=function(s,o){s=ft(s);var l=this;return l.__filtered__&&(s>0||o<0)?new St(l):(s<0?l=l.takeRight(-s):s&&(l=l.drop(s)),o!==t&&(o=ft(o),l=o<0?l.dropRight(-o):l.take(o-s)),l)},St.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},St.prototype.toArray=function(){return this.take(Se)},fi(St.prototype,function(s,o){var l=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),v=S[p?"take"+(o=="last"?"Right":""):o],O=p||/^find/.test(o);v&&(S.prototype[o]=function(){var N=this.__wrapped__,F=p?[1]:arguments,z=N instanceof St,ae=F[0],ce=z||ot(N),me=function(_t){var At=v.apply(S,os([_t],F));return p&&ke?At[0]:At};ce&&l&&typeof ae=="function"&&ae.length!=1&&(z=ce=!1);var ke=this.__chain__,$e=!!this.__actions__.length,Ye=O&&!ke,ht=z&&!$e;if(!O&&ce){N=ht?N:new St(this);var Ke=s.apply(N,F);return Ke.__actions__.push({func:Xc,args:[me],thisArg:t}),new Wn(Ke,ke)}return Ye&&ht?s.apply(this,F):(Ke=this.thru(me),Ye?p?Ke.value()[0]:Ke.value():Ke)})}),Bn(["pop","push","shift","sort","splice","unshift"],function(s){var o=Oc[s],l=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",p=/^(?:pop|shift)$/.test(s);S.prototype[s]=function(){var v=arguments;if(p&&!this.__chain__){var O=this.value();return o.apply(ot(O)?O:[],v)}return this[l](function(N){return o.apply(ot(N)?N:[],v)})}}),fi(St.prototype,function(s,o){var l=S[o];if(l){var p=l.name+"";$t.call(Na,p)||(Na[p]=[]),Na[p].push({name:o,func:l})}}),Na[Hc(t,_).name]=[{name:"wrapper",func:t}],St.prototype.clone=XN,St.prototype.reverse=eR,St.prototype.value=tR,S.prototype.at=CD,S.prototype.chain=PD,S.prototype.commit=ND,S.prototype.next=RD,S.prototype.plant=DD,S.prototype.reverse=FD,S.prototype.toJSON=S.prototype.valueOf=S.prototype.value=LD,S.prototype.first=S.prototype.head,qo&&(S.prototype[qo]=MD),S},Ia=NN();Ns?((Ns.exports=Ia)._=Ia,Wd._=Ia):Br._=Ia}).call(pi)}(Xu,Xu.exports);var WA=Xu.exports;const ci=Yp(WA),c0=he.createContext(),l0=he.createContext(),f0=he.createContext(),zA=({children:r})=>{const[e,t]=pn.useSearchParams(),[n,i]=he.useState({});he.useEffect(()=>{Object.keys(n).length>0&&(t(c=>{const f=new URLSearchParams(c);return Object.entries(n).forEach(([h,d])=>{d==null||d===""?f.delete(h):f.set(h,d)}),f}),i({}))},[n,t]);const a=c=>{i(f=>({...f,...c}))},u=he.useMemo(()=>[Object.fromEntries(e.entries()),a],[e]);return nr.jsx(f0.Provider,{value:u,children:r})},es=he.createContext(),HA=(r,e,t=i=>i,n=i=>i)=>{const[i,a]=he.useContext(f0),u=i[r];return[u?t(u):e,h=>{if(typeof h=="function"){const y=i[r];h=h(y?t(y):e)}const d=n(h);a({[r]:d})}]},bo=async(r,e,t)=>{he.useEffect(()=>{const n=new window.AbortController;async function i(){return await r(n.signal)}return i(),()=>{n.abort(),t&&t()}},[...e])},GA=(r,e,t)=>{const n=he.useRef(r);he.useEffect(()=>{n.current=r},[r]);const i=he.useCallback(ci.throttle(()=>{n.current()},e),[]);he.useEffect(i,[...t])},wo=(r,e=null,t)=>{const n=he.useRef(r);he.useEffect(()=>{n.current=r},[r]),bo(async i=>{let a;const u=async()=>{await n.current(i),e!==null&&(a=setTimeout(u,e))};return u(),()=>a&&clearTimeout(a)},[e,...t])},h0=(r,e,t)=>{const[n,i]=he.useState(),[a,u]=he.useState(!0),[c,f]=he.useState(),{urls:h,request:d}=ti();return wo(async y=>{try{const g={signal:y,...e||{}};if(g.skip)return;const m=await d(`${h.apiUrl}${r}`,g);i(m)}catch(g){f(g)}u(!1)},t,[r,e]),{data:n,error:c,loading:a}},QA=(r,e)=>{const[t,n]=he.useState(),[i,a]=he.useState(!0),[u,c]=he.useState(null),[f,h]=he.useState(),{urls:d,request:y}=ti();return he.useEffect(()=>{a(u===null||u>0)},[u]),wo(async g=>{try{if(!r)return;c(b=>(b||0)+1);const m=await y(`${d.apiUrl}/reports/production`,{method:"POST",body:r,signal:g});h(null),n(m)}catch(m){m.name!=="AbortError"&&h(m)}c(m=>m-1)},e,[r]),{data:t,error:f,loading:i}},JA=({machineRef:r,key:e,skip:t})=>{const[n,i]=he.useState(),[a,u]=he.useState(),[c,f]=he.useState(),[h,d]=he.useState(),[y,g]=he.useState(),[m,b]=he.useState(),I=Qi`
|
|
113
113
|
subscription MMToolsQuantityStreamSubscription {
|
|
114
114
|
currentQuantities(
|
|
115
115
|
where: { machineRef: { _eq: ${y} }, key: { _eq: "${m}" } }
|
|
@@ -125,10 +125,10 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
125
125
|
eventTime
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
`;A(K)},[y,m,h]),he.useEffect(()=>{_&&P()},[_,x]);const[P,{data:M,loading:U}]=U1(_,{fetchPolicy:"no-cache"});return he.useEffect(()=>{if(!M||!M.quantities)return;const W=ci.last(M.quantities);if(W&&d(W.eventTime),!n)i(M.quantities);else{const K=ci.drop(M.quantities);i([...n,...K])}},[M]),{data:n,error:c,loading:a}},YA=r=>{const[e,t]=he.useState(),[n,i]=he.useState(!0),[a,u]=he.useState(),{urls:c,request:f}=ti();return bo(async h=>{try{i(!0);const d=await f(`${c.apiUrl}/reports/downtime`,{method:"POST",body:r,signal:h});u(null),t(d)}catch(d){u(d)}i(!1)},[r]),{data:e,error:a,loading:n}},KA=r=>{const[e,t]=he.useState(),{urls:n,request:i,clientId:a}=ti(),u=`lab:${a}:${r}`,{data:c,loading:f,error:h}=h0("/templates");return he.useEffect(()=>{if(!c)return;const m=ci.filter(c.templates,{namespace:u});t(m)},[c]),[async({name:m,public:b,config:I})=>{const x={name:m,public:b,namespace:u,config:JSON.stringify(I)},_=JSON.stringify(x),A=await i(`${n.apiUrl}/templates`,{method:"POST",body:_});return t([...e,A.template]),A.template},async(m,{name:b,public:I,config:x})=>{const _={name:b,public:I,namespace:u,config:JSON.stringify(x)},A=JSON.stringify(_),P=await i(`${n.apiUrl}/templates/${m}`,{method:"PUT",body:A}),M=ci.findIndex(e,{id:m}),U=e.slice(0,M),W=e.slice(M+1);return t([...U,P.template,...W]),P.template},async m=>{await i(`${n.apiUrl}/templates/${m}`,{method:"DELETE"}),t(ci.reject(e,{id:m}))},{templates:e,loading:f,error:h}]},ZA=()=>{const[r,e]=he.useState(),[t,n]=he.useState(),{urls:i}=ti();return he.useEffect(()=>{window===window.top?(n(window.location.hash.substring(1)),e(!0)):(window.addEventListener("message",a=>{switch(a.data.event){case"init":n(a.data.hash.substring(1)),e(!0);break}}),window.top.postMessage({event:"ready"},i.appUrl))},[i]),he.useEffect(()=>{r&&(window===window.top?window.location.hash=t:window.top.postMessage({event:"set-hash",hash:t},i.appUrl))},[r,t,i]),[n,{ready:r,hash:t}]},ti=()=>he.useContext(l0),XA=()=>{throw new Error("useMMEmbeddedApp is deprecated. Use useMMAppTools and useMMAppContext.")},ek=()=>{throw new Error("useMMAppTools is deprecated. Use useMMAppParams and useMMAppCommands.")},tk=()=>{const{context:r}=he.useContext(es);return r},d0=()=>{const{params:r}=he.useContext(es);return r},ah=()=>{const{commands:r}=he.useContext(es);return r},rk=(r,e,t=[])=>{const{addSetting:n}=he.useContext(es);he.useEffect(()=>{n(r,e)},[...t])},nk=(r,e=[])=>{const{registerHandler:t}=he.useContext(es);he.useEffect(()=>{t({requestType:"custom-input-open",func:r})},[...e])},ik=(r,e=[])=>{const{registerHandler:t}=he.useContext(es);he.useEffect(()=>{t({requestType:"custom-input-save",func:r})},[...e])},sk=(r,e=[])=>{const{registerHandler:t}=he.useContext(es),{setLoaded:n}=ah();he.useEffect(()=>{t({requestType:"custom-input-label",func:r})},[...e]),he.useEffect(()=>{n()},[])},ak=()=>he.useContext(c0),ok=()=>{const{login:r,isAuthenticated:e}=ti();return bo(async()=>{e===!1&&await r()},[e]),e?nr.jsx(pn.Outlet,{}):nr.jsx("div",{})},p0="%[a-f0-9]{2}",m0=new RegExp("("+p0+")|([^%]+?)","gi"),y0=new RegExp("("+p0+")+","gi");function oh(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;const t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],oh(t),oh(n))}function uk(r){try{return decodeURIComponent(r)}catch{let e=r.match(m0)||[];for(let t=1;t<e.length;t++)r=oh(e,t).join(""),e=r.match(m0)||[];return r}}function ck(r){const e={"%FE%FF":"��","%FF%FE":"��"};let t=y0.exec(r);for(;t;){try{e[t[0]]=decodeURIComponent(t[0])}catch{const i=uk(t[0]);i!==t[0]&&(e[t[0]]=i)}t=y0.exec(r)}e["%C2"]="�";const n=Object.keys(e);for(const i of n)r=r.replace(new RegExp(i,"g"),e[i]);return r}function lk(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return ck(r)}}function fk(r,e){const t={};if(Array.isArray(e))for(const n of e){const i=Object.getOwnPropertyDescriptor(r,n);i!=null&&i.enumerable&&Object.defineProperty(t,n,i)}else for(const n of Reflect.ownKeys(r)){const i=Object.getOwnPropertyDescriptor(r,n);if(i.enumerable){const a=r[n];e(n,a,r)&&Object.defineProperty(t,n,i)}}return t}function g0(r,e){if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||e==="")return[];const t=r.indexOf(e);return t===-1?[]:[r.slice(0,t),r.slice(t+e.length)]}const hk=r=>r==null,dk=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),uh=Symbol("encodeFragmentIdentifier");function pk(r){switch(r.arrayFormat){case"index":return e=>(t,n)=>{const i=t.length;return n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),"[",i,"]"].join("")]:[...t,[Sr(e,r),"[",Sr(i,r),"]=",Sr(n,r)].join("")]};case"bracket":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),"[]"].join("")]:[...t,[Sr(e,r),"[]=",Sr(n,r)].join("")];case"colon-list-separator":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),":list="].join("")]:[...t,[Sr(e,r),":list=",Sr(n,r)].join("")];case"comma":case"separator":case"bracket-separator":{const e=r.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,i)=>i===void 0||r.skipNull&&i===null||r.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Sr(t,r),e,Sr(i,r)].join("")]:[[n,Sr(i,r)].join(r.arrayFormatSeparator)])}default:return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,Sr(e,r)]:[...t,[Sr(e,r),"=",Sr(n,r)].join("")]}}function mk(r){let e;switch(r.arrayFormat){case"index":return(t,n,i)=>{if(e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!e){i[t]=n;return}i[t]===void 0&&(i[t]={}),i[t][e[1]]=n};case"bracket":return(t,n,i)=>{if(e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"colon-list-separator":return(t,n,i)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"comma":case"separator":return(t,n,i)=>{const a=typeof n=="string"&&n.includes(r.arrayFormatSeparator),u=typeof n=="string"&&!a&&wi(n,r).includes(r.arrayFormatSeparator);n=u?wi(n,r):n;const c=a||u?n.split(r.arrayFormatSeparator).map(f=>wi(f,r)):n===null?n:wi(n,r);i[t]=c};case"bracket-separator":return(t,n,i)=>{const a=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!a){i[t]=n&&wi(n,r);return}const u=n===null?[]:wi(n,r).split(r.arrayFormatSeparator);if(i[t]===void 0){i[t]=u;return}i[t]=[...i[t],...u]};default:return(t,n,i)=>{if(i[t]===void 0){i[t]=n;return}i[t]=[...[i[t]].flat(),n]}}}function v0(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Sr(r,e){return e.encode?e.strict?dk(r):encodeURIComponent(r):r}function wi(r,e){return e.decode?lk(r):r}function b0(r){return Array.isArray(r)?r.sort():typeof r=="object"?b0(Object.keys(r)).sort((e,t)=>Number(e)-Number(t)).map(e=>r[e]):r}function w0(r){const e=r.indexOf("#");return e!==-1&&(r=r.slice(0,e)),r}function yk(r){let e="";const t=r.indexOf("#");return t!==-1&&(e=r.slice(t)),e}function _0(r,e,t){return t==="string"&&typeof r=="string"?r:typeof t=="function"&&typeof r=="string"?t(r):e.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":t==="number"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""||e.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):r}function ch(r){r=w0(r);const e=r.indexOf("?");return e===-1?"":r.slice(e+1)}function lh(r,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...e},v0(e.arrayFormatSeparator);const t=mk(e),n=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return n;for(const i of r.split("&")){if(i==="")continue;const a=e.decode?i.replaceAll("+"," "):i;let[u,c]=g0(a,"=");u===void 0&&(u=a),c=c===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?c:wi(c,e),t(wi(u,e),c,n)}for(const[i,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&e.types[i]!=="string")for(const[u,c]of Object.entries(a)){const f=e.types[i]?e.types[i].replace("[]",""):void 0;a[u]=_0(c,e,f)}else typeof a=="object"&&a!==null&&e.types[i]==="string"?n[i]=Object.values(a).join(e.arrayFormatSeparator):n[i]=_0(a,e,e.types[i]);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,a)=>{const u=n[a];return i[a]=u&&typeof u=="object"&&!Array.isArray(u)?b0(u):u,i},Object.create(null))}function x0(r,e){if(!r)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},v0(e.arrayFormatSeparator);const t=u=>e.skipNull&&hk(r[u])||e.skipEmptyString&&r[u]==="",n=pk(e),i={};for(const[u,c]of Object.entries(r))t(u)||(i[u]=c);const a=Object.keys(i);return e.sort!==!1&&a.sort(e.sort),a.map(u=>{const c=r[u];return c===void 0?"":c===null?Sr(u,e):Array.isArray(c)?c.length===0&&e.arrayFormat==="bracket-separator"?Sr(u,e)+"[]":c.reduce(n(u),[]).join("&"):Sr(u,e)+"="+Sr(c,e)}).filter(u=>u.length>0).join("&")}function S0(r,e){var i;e={decode:!0,...e};let[t,n]=g0(r,"#");return t===void 0&&(t=r),{url:((i=t==null?void 0:t.split("?"))==null?void 0:i[0])??"",query:lh(ch(r),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:wi(n,e)}:{}}}function E0(r,e){e={encode:!0,strict:!0,[uh]:!0,...e};const t=w0(r.url).split("?")[0]||"",n=ch(r.url),i={...lh(n,{sort:!1}),...r.query};let a=x0(i,e);a&&(a=`?${a}`);let u=yk(r.url);if(typeof r.fragmentIdentifier=="string"){const c=new URL(t);c.hash=r.fragmentIdentifier,u=e[uh]?c.hash:`#${r.fragmentIdentifier}`}return`${t}${a}${u}`}function O0(r,e,t){t={parseFragmentIdentifier:!0,[uh]:!1,...t};const{url:n,query:i,fragmentIdentifier:a}=S0(r,t);return E0({url:n,query:fk(i,e),fragmentIdentifier:a},t)}function gk(r,e,t){const n=Array.isArray(e)?i=>!e.includes(i):(i,a)=>!e(i,a);return O0(r,n,t)}const vk=Object.freeze(Object.defineProperty({__proto__:null,exclude:gk,extract:ch,parse:lh,parseUrl:S0,pick:O0,stringify:x0,stringifyUrl:E0},Symbol.toStringTag,{value:"Module"})),Ur=[];for(let r=0;r<256;++r)Ur.push((r+256).toString(16).slice(1));function bk(r,e=0){return(Ur[r[e+0]]+Ur[r[e+1]]+Ur[r[e+2]]+Ur[r[e+3]]+"-"+Ur[r[e+4]]+Ur[r[e+5]]+"-"+Ur[r[e+6]]+Ur[r[e+7]]+"-"+Ur[r[e+8]]+Ur[r[e+9]]+"-"+Ur[r[e+10]]+Ur[r[e+11]]+Ur[r[e+12]]+Ur[r[e+13]]+Ur[r[e+14]]+Ur[r[e+15]]).toLowerCase()}let fh;const wk=new Uint8Array(16);function _k(){if(!fh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fh=crypto.getRandomValues.bind(crypto)}return fh(wk)}const T0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function A0(r,e,t){if(T0.randomUUID&&!e&&!r)return T0.randomUUID();r=r||{};const n=r.random||(r.rng||_k)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,bk(n)}const hh="mm-auth-state",dh="mm-auth-destination",ph="mm-auth-access-token",_i=window.localStorage,xk=()=>_i.getItem(ph),Sk=r=>{r?_i.setItem(ph,r):_i.removeItem(ph)},Ek=()=>_i.getItem(dh),k0=r=>{r?_i.setItem(dh,r):_i.removeItem(dh)},Ok=()=>_i.getItem(hh),I0=r=>{r?_i.setItem(hh,r):_i.removeItem(hh)},C0=async(r,e)=>{const t=await window.fetch(r,e),n=await t.text(),i=n&&JSON.parse(n);return t.status>=200&&t.status<300?i:{...i,error:{message:t.statusText,status:t.status}}};function Tk(r){return er(r)&&"code"in r&&"reason"in r}function Ak(r){var e;return er(r)&&((e=r.target)===null||e===void 0?void 0:e.readyState)===WebSocket.CLOSED}var kk=function(r){Pn(e,r);function e(t){var n=r.call(this)||this;return n.client=t,n}return e.prototype.request=function(t){var n=this;return new Nt(function(i){return n.client.subscribe(L(L({},t),{query:Gs(t.query)}),{next:i.next.bind(i),complete:i.complete.bind(i),error:function(a){if(a instanceof Error)return i.error(a);var u=Tk(a);return u||Ak(a)?i.error(new Error("Socket closed".concat(u?" with event ".concat(a.code):"").concat(u?" ".concat(a.reason):""))):i.error(new yn({graphQLErrors:Array.isArray(a)?a:[a]}))}})})},e}(Kr);function un(r){return r===null?"null":Array.isArray(r)?"array":typeof r}function Is(r){return un(r)==="object"}function Ik(r){return Array.isArray(r)&&r.length>0&&r.every(e=>"message"in e)}function P0(r,e){return r.length<124?r:e}const Ck="graphql-transport-ws";var vn;(function(r){r[r.InternalServerError=4500]="InternalServerError",r[r.InternalClientError=4005]="InternalClientError",r[r.BadRequest=4400]="BadRequest",r[r.BadResponse=4004]="BadResponse",r[r.Unauthorized=4401]="Unauthorized",r[r.Forbidden=4403]="Forbidden",r[r.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",r[r.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",r[r.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",r[r.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",r[r.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(vn||(vn={}));var mr;(function(r){r.ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete"})(mr||(mr={}));function N0(r){if(!Is(r))throw new Error(`Message is expected to be an object, but got ${un(r)}`);if(!r.type)throw new Error("Message is missing the 'type' property");if(typeof r.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${un(r.type)}`);switch(r.type){case mr.ConnectionInit:case mr.ConnectionAck:case mr.Ping:case mr.Pong:{if(r.payload!=null&&!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${r.payload}"`);break}case mr.Subscribe:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${un(r.payload)}`);if(typeof r.payload.query!="string")throw new Error(`"${r.type}" message payload expects the 'query' property to be a string, but got ${un(r.payload.query)}`);if(r.payload.variables!=null&&!Is(r.payload.variables))throw new Error(`"${r.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${un(r.payload.variables)}`);if(r.payload.operationName!=null&&un(r.payload.operationName)!=="string")throw new Error(`"${r.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${un(r.payload.operationName)}`);if(r.payload.extensions!=null&&!Is(r.payload.extensions))throw new Error(`"${r.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${un(r.payload.extensions)}`);break}case mr.Next:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${un(r.payload)}`);break}case mr.Error:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Ik(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(r.payload)}`);break}case mr.Complete:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${r.type}"`)}return r}function Pk(r,e){return N0(typeof r=="string"?JSON.parse(r,e):r)}function _o(r,e){return N0(r),JSON.stringify(r,e)}var ha=function(r){return this instanceof ha?(this.v=r,this):new ha(r)},Nk=function(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,a=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(g){n[g]&&(i[g]=function(m){return new Promise(function(b,I){a.push([g,m,b,I])>1||c(g,m)})})}function c(g,m){try{f(n[g](m))}catch(b){y(a[0][3],b)}}function f(g){g.value instanceof ha?Promise.resolve(g.value.v).then(h,d):y(a[0][2],g)}function h(g){c("next",g)}function d(g){c("throw",g)}function y(g,m){g(m),a.shift(),a.length&&c(a[0][0],a[0][1])}};function Rk(r){const{url:e,connectionParams:t,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:u=0,disablePong:c,connectionAckWaitTimeout:f=0,retryAttempts:h=5,retryWait:d=async function(ve){let pe=1e3;for(let te=0;te<ve;te++)pe*=2;await new Promise(te=>setTimeout(te,pe+Math.floor(Math.random()*2700+300)))},shouldRetry:y=mh,isFatalConnectionProblem:g,on:m,webSocketImpl:b,generateID:I=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ve=>{const pe=Math.random()*16|0;return(ve=="x"?pe:pe&3|8).toString(16)})},jsonMessageReplacer:x,jsonMessageReviver:_}=r;let A;if(b){if(!Dk(b))throw new Error("Invalid WebSocket implementation provided");A=b}else typeof WebSocket<"u"?A=WebSocket:typeof global<"u"?A=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(A=window.WebSocket||window.MozWebSocket);if(!A)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const P=A,M=(()=>{const ge=(()=>{const pe={};return{on(te,Se){return pe[te]=Se,()=>{delete pe[te]}},emit(te){var Se;"id"in te&&((Se=pe[te.id])===null||Se===void 0||Se.call(pe,te))}}})(),ve={connecting:m!=null&&m.connecting?[m.connecting]:[],opened:m!=null&&m.opened?[m.opened]:[],connected:m!=null&&m.connected?[m.connected]:[],ping:m!=null&&m.ping?[m.ping]:[],pong:m!=null&&m.pong?[m.pong]:[],message:m!=null&&m.message?[ge.emit,m.message]:[ge.emit],closed:m!=null&&m.closed?[m.closed]:[],error:m!=null&&m.error?[m.error]:[]};return{onMessage:ge.on,on(pe,te){const Se=ve[pe];return Se.push(te),()=>{Se.splice(Se.indexOf(te),1)}},emit(pe,...te){for(const Se of[...ve[pe]])Se(...te)}}})();function U(ge){const ve=[M.on("error",pe=>{ve.forEach(te=>te()),ge(pe)}),M.on("closed",pe=>{ve.forEach(te=>te()),ge(pe)})]}let W,K=0,X,fe=!1,oe=0,Ie=!1;async function ye(){clearTimeout(X);const[ge,ve]=await(W??(W=new Promise((Se,Le)=>(async()=>{if(fe){if(await d(oe),!K)return W=void 0,Le({code:1e3,reason:"All Subscriptions Gone"});oe++}M.emit("connecting",fe);const Ee=new P(typeof e=="function"?await e():e,Ck);let Ze,vt;function Mt(){isFinite(u)&&u>0&&(clearTimeout(vt),vt=setTimeout(()=>{Ee.readyState===P.OPEN&&(Ee.send(_o({type:mr.Ping})),M.emit("ping",!1,void 0))},u))}U(Xe=>{W=void 0,clearTimeout(Ze),clearTimeout(vt),Le(Xe),Xe instanceof R0&&(Ee.close(4499,"Terminated"),Ee.onerror=null,Ee.onclose=null)}),Ee.onerror=Xe=>M.emit("error",Xe),Ee.onclose=Xe=>M.emit("closed",Xe),Ee.onopen=async()=>{try{M.emit("opened",Ee);const Xe=typeof t=="function"?await t():t;if(Ee.readyState!==P.OPEN)return;Ee.send(_o(Xe?{type:mr.ConnectionInit,payload:Xe}:{type:mr.ConnectionInit},x)),isFinite(f)&&f>0&&(Ze=setTimeout(()=>{Ee.close(vn.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},f)),Mt()}catch(Xe){M.emit("error",Xe),Ee.close(vn.InternalClientError,P0(Xe instanceof Error?Xe.message:new Error(Xe).message,"Internal client error"))}};let Et=!1;Ee.onmessage=({data:Xe})=>{try{const it=Pk(Xe,_);if(M.emit("message",it),it.type==="ping"||it.type==="pong"){M.emit(it.type,!0,it.payload),it.type==="pong"?Mt():c||(Ee.send(_o(it.payload?{type:mr.Pong,payload:it.payload}:{type:mr.Pong})),M.emit("pong",!1,it.payload));return}if(Et)return;if(it.type!==mr.ConnectionAck)throw new Error(`First message cannot be of type ${it.type}`);clearTimeout(Ze),Et=!0,M.emit("connected",Ee,it.payload,fe),fe=!1,oe=0,Se([Ee,new Promise((Ot,De)=>U(De))])}catch(it){Ee.onmessage=null,M.emit("error",it),Ee.close(vn.BadResponse,P0(it instanceof Error?it.message:new Error(it).message,"Bad response"))}}})())));ge.readyState===P.CLOSING&&await ve;let pe=()=>{};const te=new Promise(Se=>pe=Se);return[ge,pe,Promise.race([te.then(()=>{if(!K){const Se=()=>ge.close(1e3,"Normal Closure");isFinite(a)&&a>0?X=setTimeout(()=>{ge.readyState===P.OPEN&&Se()},a):Se()}}),ve])]}function Ne(ge){if(mh(ge)&&(Mk(ge.code)||[vn.InternalServerError,vn.InternalClientError,vn.BadRequest,vn.BadResponse,vn.Unauthorized,vn.SubprotocolNotAcceptable,vn.SubscriberAlreadyExists,vn.TooManyInitialisationRequests].includes(ge.code)))throw ge;if(Ie)return!1;if(mh(ge)&&ge.code===1e3)return K>0;if(!h||oe>=h||!y(ge)||g!=null&&g(ge))throw ge;return fe=!0}n||(async()=>{for(K++;;)try{const[,,ge]=await ye();await ge}catch(ge){try{if(!Ne(ge))return}catch(ve){return i==null?void 0:i(ve)}}})();function Ce(ge,ve){const pe=I(ge);let te=!1,Se=!1,Le=()=>{K--,te=!0};return(async()=>{for(K++;;)try{const[Ee,Ze,vt]=await ye();if(te)return Ze();const Mt=M.onMessage(pe,Et=>{switch(Et.type){case mr.Next:{ve.next(Et.payload);return}case mr.Error:{Se=!0,te=!0,ve.error(Et.payload),Le();return}case mr.Complete:{te=!0,Le();return}}});Ee.send(_o({id:pe,type:mr.Subscribe,payload:ge},x)),Le=()=>{!te&&Ee.readyState===P.OPEN&&Ee.send(_o({id:pe,type:mr.Complete},x)),K--,te=!0,Ze()},await vt.finally(Mt);return}catch(Ee){if(!Ne(Ee))return}})().then(()=>{Se||ve.complete()}).catch(Ee=>{ve.error(Ee)}),()=>{te||Le()}}return{on:M.on,subscribe:Ce,iterate(ge){const ve=[],pe={done:!1,error:null,resolve:()=>{}},te=Ce(ge,{next(Le){ve.push(Le),pe.resolve()},error(Le){pe.done=!0,pe.error=Le,pe.resolve()},complete(){pe.done=!0,pe.resolve()}}),Se=function(){return Nk(this,arguments,function*(){for(;;){for(ve.length||(yield ha(new Promise(Ze=>pe.resolve=Ze)));ve.length;)yield yield ha(ve.shift());if(pe.error)throw pe.error;if(pe.done)return yield ha(void 0)}})}();return Se.throw=async Le=>(pe.done||(pe.done=!0,pe.error=Le,pe.resolve()),{done:!0,value:void 0}),Se.return=async()=>(te(),{done:!0,value:void 0}),Se},async dispose(){if(Ie=!0,W){const[ge]=await W;ge.close(1e3,"Normal Closure")}},terminate(){W&&M.emit("closed",new R0)}}}class R0 extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function mh(r){return Is(r)&&"code"in r&&"reason"in r}function Mk(r){return[1e3,1001,1006,1005,1012,1013,1014].includes(r)?!1:r>=1e3&&r<=1999}function Dk(r){return typeof r=="function"&&"constructor"in r&&"CLOSED"in r&&"CLOSING"in r&&"CONNECTING"in r&&"OPEN"in r}function M0(r){return new Kr(function(e,t){var n=on(e,[]);return new Nt(function(i){var a,u=!1;return Promise.resolve(n).then(function(c){return r(c,e.getContext())}).then(e.setContext).then(function(){u||(a=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){u=!0,a&&a.unsubscribe()}})})}function D0(r){return new Kr(function(e,t){return new Nt(function(n){var i,a,u;try{i=t(e).subscribe({next:function(c){if(c.errors&&(u=r({graphQLErrors:c.errors,response:c,operation:e,forward:t}),u)){a=u.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(c)},error:function(c){if(u=r({operation:e,networkError:c,graphQLErrors:c&&c.result&&c.result.errors||void 0,forward:t}),u){a=u.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(c)},complete:function(){u||n.complete.bind(n)()}})}catch(c){r({networkError:c,operation:e,forward:t}),n.error(c)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(r){Pn(e,r);function e(t){var n=r.call(this)||this;return n.link=D0(t),n}return e.prototype.request=function(t,n){return this.link.request(t,n)},e})(Kr);var yh={exports:{}};const Fk=ol(O1),Lk=ol(gO);var gh,F0;function da(){return F0||(F0=1,gh=TypeError),gh}const qk=ol(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var vh,L0;function ec(){if(L0)return vh;L0=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=r&&e&&typeof e.get=="function"?e.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&a&&typeof a.get=="function"?a.get:null,c=i&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,h=f?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,y=d?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,m=g?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,I=Object.prototype.toString,x=Function.prototype.toString,_=String.prototype.match,A=String.prototype.slice,P=String.prototype.replace,M=String.prototype.toUpperCase,U=String.prototype.toLowerCase,W=RegExp.prototype.test,K=Array.prototype.concat,X=Array.prototype.join,fe=Array.prototype.slice,oe=Math.floor,Ie=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ye=Object.getOwnPropertySymbols,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ge=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ce||!0)?Symbol.toStringTag:null,ve=Object.prototype.propertyIsEnumerable,pe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function te(H,G){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||W.call(/e/,G))return G;var st=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var bt=H<0?-oe(-H):oe(H);if(bt!==H){var lt=String(bt),ze=A.call(G,lt.length+1);return P.call(lt,st,"$&_")+"."+P.call(P.call(ze,/([0-9]{3})/g,"$&_"),/_$/,"")}}return P.call(G,st,"$&_")}var Se=qk,Le=Se.custom,Ee=q(Le)?Le:null,Ze={__proto__:null,double:'"',single:"'"},vt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};vh=function H(G,st,bt,lt){var ze=st||{};if(V(ze,"quoteStyle")&&!V(Ze,ze.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(ze,"maxStringLength")&&(typeof ze.maxStringLength=="number"?ze.maxStringLength<0&&ze.maxStringLength!==1/0:ze.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Kt=V(ze,"customInspect")?ze.customInspect:!0;if(typeof Kt!="boolean"&&Kt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(ze,"indent")&&ze.indent!==null&&ze.indent!==" "&&!(parseInt(ze.indent,10)===ze.indent&&ze.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(ze,"numericSeparator")&&typeof ze.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Zt=ze.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return Tt(G,ze);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var Qt=String(G);return Zt?te(G,Qt):Qt}if(typeof G=="bigint"){var kr=String(G)+"n";return Zt?te(G,kr):kr}var Hr=typeof ze.depth>"u"?5:ze.depth;if(typeof bt>"u"&&(bt=0),bt>=Hr&&Hr>0&&typeof G=="object")return Xe(G)?"[Array]":"[Object]";var Fr=dr(ze,bt);if(typeof lt>"u")lt=[];else if(Be(lt,G)>=0)return"[Circular]";function Ut(Je,et,tt){if(et&&(lt=fe.call(lt),lt.push(et)),tt){var gt={depth:ze.depth};return V(ze,"quoteStyle")&&(gt.quoteStyle=ze.quoteStyle),H(Je,gt,bt+1,lt)}return H(Je,ze,bt+1,lt)}if(typeof G=="function"&&!Ot(G)){var Or=We(G),$r=Ht(G,Ut);return"[Function"+(Or?": "+Or:" (anonymous)")+"]"+($r.length>0?" { "+X.call($r,", ")+" }":"")}if(q(G)){var Lr=Ce?P.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ne.call(G);return typeof G=="object"&&!Ce?Gt(Lr):Lr}if(Yt(G)){for(var ar="<"+U.call(String(G.nodeName)),Gr=G.attributes||[],Tr=0;Tr<Gr.length;Tr++)ar+=" "+Gr[Tr].name+"="+Mt(Et(Gr[Tr].value),"double",ze);return ar+=">",G.childNodes&&G.childNodes.length&&(ar+="..."),ar+="</"+U.call(String(G.nodeName))+">",ar}if(Xe(G)){if(G.length===0)return"[]";var gr=Ht(G,Ut);return Fr&&!sr(gr)?"["+Ar(gr,Fr)+"]":"[ "+X.call(gr,", ")+" ]"}if(De(G)){var Ir=Ht(G,Ut);return!("cause"in Error.prototype)&&"cause"in G&&!ve.call(G,"cause")?"{ ["+String(G)+"] "+X.call(K.call("[cause]: "+Ut(G.cause),Ir),", ")+" }":Ir.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+X.call(Ir,", ")+" }"}if(typeof G=="object"&&Kt){if(Ee&&typeof G[Ee]=="function"&&Se)return Se(G,{depth:Hr-bt});if(Kt!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(se(G)){var Sn=[];return n&&n.call(G,function(Je,et){Sn.push(Ut(et,G,!0)+" => "+Ut(Je,G))}),zt("Map",t.call(G),Sn,Fr)}if(pt(G)){var Un=[];return c&&c.call(G,function(Je){Un.push(Ut(Je,G))}),zt("Set",u.call(G),Un,Fr)}if(_e(G))return Er("WeakMap");if(mt(G))return Er("WeakSet");if(Ge(G))return Er("WeakRef");if(B(G))return Gt(Ut(Number(G)));if(J(G))return Gt(Ut(Ie.call(G)));if(Q(G))return Gt(b.call(G));if(He(G))return Gt(Ut(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof pi<"u"&&G===pi)return"{ [object globalThis] }";if(!it(G)&&!Ot(G)){var R=Ht(G,Ut),ue=pe?pe(G)===Object.prototype:G instanceof Object||G.constructor===Object,be=G instanceof Object?"":"null prototype",Pe=!ue&&ge&&Object(G)===G&&ge in G?A.call(xe(G),8,-1):be?"Object":"",Ve=ue||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",ut=Ve+(Pe||be?"["+X.call(K.call([],Pe||[],be||[]),": ")+"] ":"");return R.length===0?ut+"{}":Fr?ut+"{"+Ar(R,Fr)+"}":ut+"{ "+X.call(R,", ")+" }"}return String(G)};function Mt(H,G,st){var bt=st.quoteStyle||G,lt=Ze[bt];return lt+H+lt}function Et(H){return P.call(String(H),/"/g,""")}function Xe(H){return xe(H)==="[object Array]"&&(!ge||!(typeof H=="object"&&ge in H))}function it(H){return xe(H)==="[object Date]"&&(!ge||!(typeof H=="object"&&ge in H))}function Ot(H){return xe(H)==="[object RegExp]"&&(!ge||!(typeof H=="object"&&ge in H))}function De(H){return xe(H)==="[object Error]"&&(!ge||!(typeof H=="object"&&ge in H))}function He(H){return xe(H)==="[object String]"&&(!ge||!(typeof H=="object"&&ge in H))}function B(H){return xe(H)==="[object Number]"&&(!ge||!(typeof H=="object"&&ge in H))}function Q(H){return xe(H)==="[object Boolean]"&&(!ge||!(typeof H=="object"&&ge in H))}function q(H){if(Ce)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!Ne)return!1;try{return Ne.call(H),!0}catch{}return!1}function J(H){if(!H||typeof H!="object"||!Ie)return!1;try{return Ie.call(H),!0}catch{}return!1}var ee=Object.prototype.hasOwnProperty||function(H){return H in this};function V(H,G){return ee.call(H,G)}function xe(H){return I.call(H)}function We(H){if(H.name)return H.name;var G=_.call(x.call(H),/^function\s*([\w$]+)/);return G?G[1]:null}function Be(H,G){if(H.indexOf)return H.indexOf(G);for(var st=0,bt=H.length;st<bt;st++)if(H[st]===G)return st;return-1}function se(H){if(!t||!H||typeof H!="object")return!1;try{t.call(H);try{u.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function _e(H){if(!h||!H||typeof H!="object")return!1;try{h.call(H,h);try{y.call(H,y)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function Ge(H){if(!m||!H||typeof H!="object")return!1;try{return m.call(H),!0}catch{}return!1}function pt(H){if(!u||!H||typeof H!="object")return!1;try{u.call(H);try{t.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function mt(H){if(!y||!H||typeof H!="object")return!1;try{y.call(H,y);try{h.call(H,h)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Yt(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function Tt(H,G){if(H.length>G.maxStringLength){var st=H.length-G.maxStringLength,bt="... "+st+" more character"+(st>1?"s":"");return Tt(A.call(H,0,G.maxStringLength),G)+bt}var lt=vt[G.quoteStyle||"single"];lt.lastIndex=0;var ze=P.call(P.call(H,lt,"\\$1"),/[\x00-\x1f]/g,Wt);return Mt(ze,"single",G)}function Wt(H){var G=H.charCodeAt(0),st={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return st?"\\"+st:"\\x"+(G<16?"0":"")+M.call(G.toString(16))}function Gt(H){return"Object("+H+")"}function Er(H){return H+" { ? }"}function zt(H,G,st,bt){var lt=bt?Ar(st,bt):X.call(st,", ");return H+" ("+G+") {"+lt+"}"}function sr(H){for(var G=0;G<H.length;G++)if(Be(H[G],`
|
|
128
|
+
`;A(K)},[y,m,h]),he.useEffect(()=>{_&&P()},[_,x]);const[P,{data:M,loading:U}]=U1(_,{fetchPolicy:"no-cache"});return he.useEffect(()=>{if(!M||!M.quantities)return;const W=ci.last(M.quantities);if(W&&d(W.eventTime),!n)i(M.quantities);else{const K=ci.drop(M.quantities);i([...n,...K])}},[M]),{data:n,error:c,loading:a}},YA=r=>{const[e,t]=he.useState(),[n,i]=he.useState(!0),[a,u]=he.useState(),{urls:c,request:f}=ti();return bo(async h=>{try{i(!0);const d=await f(`${c.apiUrl}/reports/downtime`,{method:"POST",body:r,signal:h});u(null),t(d)}catch(d){u(d)}i(!1)},[r]),{data:e,error:a,loading:n}},KA=r=>{const[e,t]=he.useState(),{urls:n,request:i,clientId:a}=ti(),u=`lab:${a}:${r}`,{data:c,loading:f,error:h}=h0("/templates");return he.useEffect(()=>{if(!c)return;const m=ci.filter(c.templates,{namespace:u});t(m)},[c]),[async({name:m,public:b,config:I})=>{const x={name:m,public:b,namespace:u,config:JSON.stringify(I)},_=JSON.stringify(x),A=await i(`${n.apiUrl}/templates`,{method:"POST",body:_});return t([...e,A.template]),A.template},async(m,{name:b,public:I,config:x})=>{const _={name:b,public:I,namespace:u,config:JSON.stringify(x)},A=JSON.stringify(_),P=await i(`${n.apiUrl}/templates/${m}`,{method:"PUT",body:A}),M=ci.findIndex(e,{id:m}),U=e.slice(0,M),W=e.slice(M+1);return t([...U,P.template,...W]),P.template},async m=>{await i(`${n.apiUrl}/templates/${m}`,{method:"DELETE"}),t(ci.reject(e,{id:m}))},{templates:e,loading:f,error:h}]},ZA=()=>{const[r,e]=he.useState(),[t,n]=he.useState(),{urls:i}=ti();return he.useEffect(()=>{window===window.top?(n(window.location.hash.substring(1)),e(!0)):(window.addEventListener("message",a=>{switch(a.data.event){case"init":n(a.data.hash.substring(1)),e(!0);break}}),window.top.postMessage({event:"ready"},i.appUrl))},[i]),he.useEffect(()=>{r&&(window===window.top?window.location.hash=t:window.top.postMessage({event:"set-hash",hash:t},i.appUrl))},[r,t,i]),[n,{ready:r,hash:t}]},ti=()=>he.useContext(l0),XA=()=>{throw new Error("useMMEmbeddedApp is deprecated. Use useMMAppTools and useMMAppContext.")},ek=()=>{throw new Error("useMMAppTools is deprecated. Use useMMAppParams and useMMAppCommands.")},tk=()=>{const{context:r}=he.useContext(es);return r},d0=()=>{const{params:r}=he.useContext(es);return r},ah=()=>{const{commands:r}=he.useContext(es);return r},rk=(r,e,t=[])=>{const{addSetting:n}=he.useContext(es);he.useEffect(()=>{n(r,e)},[...t])},nk=(r,e=[])=>{const{registerHandler:t}=he.useContext(es);he.useEffect(()=>t({requestType:"custom-input-open",func:r}),[...e])},ik=(r,e=[])=>{const{registerHandler:t}=he.useContext(es);he.useEffect(()=>t({requestType:"custom-input-save",func:r}),[...e])},sk=(r,e=[])=>{const{registerHandler:t}=he.useContext(es),{setLoaded:n}=ah();he.useEffect(()=>t({requestType:"custom-input-label",func:r}),[...e]),he.useEffect(()=>{n()},[])},ak=()=>he.useContext(c0),ok=()=>{const{login:r,isAuthenticated:e}=ti();return bo(async()=>{e===!1&&await r()},[e]),e?nr.jsx(pn.Outlet,{}):nr.jsx("div",{})},p0="%[a-f0-9]{2}",m0=new RegExp("("+p0+")|([^%]+?)","gi"),y0=new RegExp("("+p0+")+","gi");function oh(r,e){try{return[decodeURIComponent(r.join(""))]}catch{}if(r.length===1)return r;e=e||1;const t=r.slice(0,e),n=r.slice(e);return Array.prototype.concat.call([],oh(t),oh(n))}function uk(r){try{return decodeURIComponent(r)}catch{let e=r.match(m0)||[];for(let t=1;t<e.length;t++)r=oh(e,t).join(""),e=r.match(m0)||[];return r}}function ck(r){const e={"%FE%FF":"��","%FF%FE":"��"};let t=y0.exec(r);for(;t;){try{e[t[0]]=decodeURIComponent(t[0])}catch{const i=uk(t[0]);i!==t[0]&&(e[t[0]]=i)}t=y0.exec(r)}e["%C2"]="�";const n=Object.keys(e);for(const i of n)r=r.replace(new RegExp(i,"g"),e[i]);return r}function lk(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return ck(r)}}function fk(r,e){const t={};if(Array.isArray(e))for(const n of e){const i=Object.getOwnPropertyDescriptor(r,n);i!=null&&i.enumerable&&Object.defineProperty(t,n,i)}else for(const n of Reflect.ownKeys(r)){const i=Object.getOwnPropertyDescriptor(r,n);if(i.enumerable){const a=r[n];e(n,a,r)&&Object.defineProperty(t,n,i)}}return t}function g0(r,e){if(!(typeof r=="string"&&typeof e=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r===""||e==="")return[];const t=r.indexOf(e);return t===-1?[]:[r.slice(0,t),r.slice(t+e.length)]}const hk=r=>r==null,dk=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),uh=Symbol("encodeFragmentIdentifier");function pk(r){switch(r.arrayFormat){case"index":return e=>(t,n)=>{const i=t.length;return n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),"[",i,"]"].join("")]:[...t,[Sr(e,r),"[",Sr(i,r),"]=",Sr(n,r)].join("")]};case"bracket":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),"[]"].join("")]:[...t,[Sr(e,r),"[]=",Sr(n,r)].join("")];case"colon-list-separator":return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,[Sr(e,r),":list="].join("")]:[...t,[Sr(e,r),":list=",Sr(n,r)].join("")];case"comma":case"separator":case"bracket-separator":{const e=r.arrayFormat==="bracket-separator"?"[]=":"=";return t=>(n,i)=>i===void 0||r.skipNull&&i===null||r.skipEmptyString&&i===""?n:(i=i===null?"":i,n.length===0?[[Sr(t,r),e,Sr(i,r)].join("")]:[[n,Sr(i,r)].join(r.arrayFormatSeparator)])}default:return e=>(t,n)=>n===void 0||r.skipNull&&n===null||r.skipEmptyString&&n===""?t:n===null?[...t,Sr(e,r)]:[...t,[Sr(e,r),"=",Sr(n,r)].join("")]}}function mk(r){let e;switch(r.arrayFormat){case"index":return(t,n,i)=>{if(e=/\[(\d*)]$/.exec(t),t=t.replace(/\[\d*]$/,""),!e){i[t]=n;return}i[t]===void 0&&(i[t]={}),i[t][e[1]]=n};case"bracket":return(t,n,i)=>{if(e=/(\[])$/.exec(t),t=t.replace(/\[]$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"colon-list-separator":return(t,n,i)=>{if(e=/(:list)$/.exec(t),t=t.replace(/:list$/,""),!e){i[t]=n;return}if(i[t]===void 0){i[t]=[n];return}i[t]=[...i[t],n]};case"comma":case"separator":return(t,n,i)=>{const a=typeof n=="string"&&n.includes(r.arrayFormatSeparator),u=typeof n=="string"&&!a&&wi(n,r).includes(r.arrayFormatSeparator);n=u?wi(n,r):n;const c=a||u?n.split(r.arrayFormatSeparator).map(f=>wi(f,r)):n===null?n:wi(n,r);i[t]=c};case"bracket-separator":return(t,n,i)=>{const a=/(\[])$/.test(t);if(t=t.replace(/\[]$/,""),!a){i[t]=n&&wi(n,r);return}const u=n===null?[]:wi(n,r).split(r.arrayFormatSeparator);if(i[t]===void 0){i[t]=u;return}i[t]=[...i[t],...u]};default:return(t,n,i)=>{if(i[t]===void 0){i[t]=n;return}i[t]=[...[i[t]].flat(),n]}}}function v0(r){if(typeof r!="string"||r.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function Sr(r,e){return e.encode?e.strict?dk(r):encodeURIComponent(r):r}function wi(r,e){return e.decode?lk(r):r}function b0(r){return Array.isArray(r)?r.sort():typeof r=="object"?b0(Object.keys(r)).sort((e,t)=>Number(e)-Number(t)).map(e=>r[e]):r}function w0(r){const e=r.indexOf("#");return e!==-1&&(r=r.slice(0,e)),r}function yk(r){let e="";const t=r.indexOf("#");return t!==-1&&(e=r.slice(t)),e}function _0(r,e,t){return t==="string"&&typeof r=="string"?r:typeof t=="function"&&typeof r=="string"?t(r):e.parseBooleans&&r!==null&&(r.toLowerCase()==="true"||r.toLowerCase()==="false")?r.toLowerCase()==="true":t==="number"&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""||e.parseNumbers&&!Number.isNaN(Number(r))&&typeof r=="string"&&r.trim()!==""?Number(r):r}function ch(r){r=w0(r);const e=r.indexOf("?");return e===-1?"":r.slice(e+1)}function lh(r,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...e},v0(e.arrayFormatSeparator);const t=mk(e),n=Object.create(null);if(typeof r!="string"||(r=r.trim().replace(/^[?#&]/,""),!r))return n;for(const i of r.split("&")){if(i==="")continue;const a=e.decode?i.replaceAll("+"," "):i;let[u,c]=g0(a,"=");u===void 0&&(u=a),c=c===void 0?null:["comma","separator","bracket-separator"].includes(e.arrayFormat)?c:wi(c,e),t(wi(u,e),c,n)}for(const[i,a]of Object.entries(n))if(typeof a=="object"&&a!==null&&e.types[i]!=="string")for(const[u,c]of Object.entries(a)){const f=e.types[i]?e.types[i].replace("[]",""):void 0;a[u]=_0(c,e,f)}else typeof a=="object"&&a!==null&&e.types[i]==="string"?n[i]=Object.values(a).join(e.arrayFormatSeparator):n[i]=_0(a,e,e.types[i]);return e.sort===!1?n:(e.sort===!0?Object.keys(n).sort():Object.keys(n).sort(e.sort)).reduce((i,a)=>{const u=n[a];return i[a]=u&&typeof u=="object"&&!Array.isArray(u)?b0(u):u,i},Object.create(null))}function x0(r,e){if(!r)return"";e={encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:",",...e},v0(e.arrayFormatSeparator);const t=u=>e.skipNull&&hk(r[u])||e.skipEmptyString&&r[u]==="",n=pk(e),i={};for(const[u,c]of Object.entries(r))t(u)||(i[u]=c);const a=Object.keys(i);return e.sort!==!1&&a.sort(e.sort),a.map(u=>{const c=r[u];return c===void 0?"":c===null?Sr(u,e):Array.isArray(c)?c.length===0&&e.arrayFormat==="bracket-separator"?Sr(u,e)+"[]":c.reduce(n(u),[]).join("&"):Sr(u,e)+"="+Sr(c,e)}).filter(u=>u.length>0).join("&")}function S0(r,e){var i;e={decode:!0,...e};let[t,n]=g0(r,"#");return t===void 0&&(t=r),{url:((i=t==null?void 0:t.split("?"))==null?void 0:i[0])??"",query:lh(ch(r),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:wi(n,e)}:{}}}function E0(r,e){e={encode:!0,strict:!0,[uh]:!0,...e};const t=w0(r.url).split("?")[0]||"",n=ch(r.url),i={...lh(n,{sort:!1}),...r.query};let a=x0(i,e);a&&(a=`?${a}`);let u=yk(r.url);if(typeof r.fragmentIdentifier=="string"){const c=new URL(t);c.hash=r.fragmentIdentifier,u=e[uh]?c.hash:`#${r.fragmentIdentifier}`}return`${t}${a}${u}`}function O0(r,e,t){t={parseFragmentIdentifier:!0,[uh]:!1,...t};const{url:n,query:i,fragmentIdentifier:a}=S0(r,t);return E0({url:n,query:fk(i,e),fragmentIdentifier:a},t)}function gk(r,e,t){const n=Array.isArray(e)?i=>!e.includes(i):(i,a)=>!e(i,a);return O0(r,n,t)}const vk=Object.freeze(Object.defineProperty({__proto__:null,exclude:gk,extract:ch,parse:lh,parseUrl:S0,pick:O0,stringify:x0,stringifyUrl:E0},Symbol.toStringTag,{value:"Module"})),Ur=[];for(let r=0;r<256;++r)Ur.push((r+256).toString(16).slice(1));function bk(r,e=0){return(Ur[r[e+0]]+Ur[r[e+1]]+Ur[r[e+2]]+Ur[r[e+3]]+"-"+Ur[r[e+4]]+Ur[r[e+5]]+"-"+Ur[r[e+6]]+Ur[r[e+7]]+"-"+Ur[r[e+8]]+Ur[r[e+9]]+"-"+Ur[r[e+10]]+Ur[r[e+11]]+Ur[r[e+12]]+Ur[r[e+13]]+Ur[r[e+14]]+Ur[r[e+15]]).toLowerCase()}let fh;const wk=new Uint8Array(16);function _k(){if(!fh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");fh=crypto.getRandomValues.bind(crypto)}return fh(wk)}const T0={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function A0(r,e,t){if(T0.randomUUID&&!e&&!r)return T0.randomUUID();r=r||{};const n=r.random||(r.rng||_k)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,bk(n)}const hh="mm-auth-state",dh="mm-auth-destination",ph="mm-auth-access-token",_i=window.localStorage,xk=()=>_i.getItem(ph),Sk=r=>{r?_i.setItem(ph,r):_i.removeItem(ph)},Ek=()=>_i.getItem(dh),k0=r=>{r?_i.setItem(dh,r):_i.removeItem(dh)},Ok=()=>_i.getItem(hh),I0=r=>{r?_i.setItem(hh,r):_i.removeItem(hh)},C0=async(r,e)=>{const t=await window.fetch(r,e),n=await t.text(),i=n&&JSON.parse(n);return t.status>=200&&t.status<300?i:{...i,error:{message:t.statusText,status:t.status}}};function Tk(r){return er(r)&&"code"in r&&"reason"in r}function Ak(r){var e;return er(r)&&((e=r.target)===null||e===void 0?void 0:e.readyState)===WebSocket.CLOSED}var kk=function(r){Pn(e,r);function e(t){var n=r.call(this)||this;return n.client=t,n}return e.prototype.request=function(t){var n=this;return new Nt(function(i){return n.client.subscribe(L(L({},t),{query:Gs(t.query)}),{next:i.next.bind(i),complete:i.complete.bind(i),error:function(a){if(a instanceof Error)return i.error(a);var u=Tk(a);return u||Ak(a)?i.error(new Error("Socket closed".concat(u?" with event ".concat(a.code):"").concat(u?" ".concat(a.reason):""))):i.error(new yn({graphQLErrors:Array.isArray(a)?a:[a]}))}})})},e}(Kr);function un(r){return r===null?"null":Array.isArray(r)?"array":typeof r}function Is(r){return un(r)==="object"}function Ik(r){return Array.isArray(r)&&r.length>0&&r.every(e=>"message"in e)}function P0(r,e){return r.length<124?r:e}const Ck="graphql-transport-ws";var vn;(function(r){r[r.InternalServerError=4500]="InternalServerError",r[r.InternalClientError=4005]="InternalClientError",r[r.BadRequest=4400]="BadRequest",r[r.BadResponse=4004]="BadResponse",r[r.Unauthorized=4401]="Unauthorized",r[r.Forbidden=4403]="Forbidden",r[r.SubprotocolNotAcceptable=4406]="SubprotocolNotAcceptable",r[r.ConnectionInitialisationTimeout=4408]="ConnectionInitialisationTimeout",r[r.ConnectionAcknowledgementTimeout=4504]="ConnectionAcknowledgementTimeout",r[r.SubscriberAlreadyExists=4409]="SubscriberAlreadyExists",r[r.TooManyInitialisationRequests=4429]="TooManyInitialisationRequests"})(vn||(vn={}));var mr;(function(r){r.ConnectionInit="connection_init",r.ConnectionAck="connection_ack",r.Ping="ping",r.Pong="pong",r.Subscribe="subscribe",r.Next="next",r.Error="error",r.Complete="complete"})(mr||(mr={}));function N0(r){if(!Is(r))throw new Error(`Message is expected to be an object, but got ${un(r)}`);if(!r.type)throw new Error("Message is missing the 'type' property");if(typeof r.type!="string")throw new Error(`Message is expects the 'type' property to be a string, but got ${un(r.type)}`);switch(r.type){case mr.ConnectionInit:case mr.ConnectionAck:case mr.Ping:case mr.Pong:{if(r.payload!=null&&!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object or nullish or missing, but got "${r.payload}"`);break}case mr.Subscribe:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${un(r.payload)}`);if(typeof r.payload.query!="string")throw new Error(`"${r.type}" message payload expects the 'query' property to be a string, but got ${un(r.payload.query)}`);if(r.payload.variables!=null&&!Is(r.payload.variables))throw new Error(`"${r.type}" message payload expects the 'variables' property to be a an object or nullish or missing, but got ${un(r.payload.variables)}`);if(r.payload.operationName!=null&&un(r.payload.operationName)!=="string")throw new Error(`"${r.type}" message payload expects the 'operationName' property to be a string or nullish or missing, but got ${un(r.payload.operationName)}`);if(r.payload.extensions!=null&&!Is(r.payload.extensions))throw new Error(`"${r.type}" message payload expects the 'extensions' property to be a an object or nullish or missing, but got ${un(r.payload.extensions)}`);break}case mr.Next:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Is(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an object, but got ${un(r.payload)}`);break}case mr.Error:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);if(!Ik(r.payload))throw new Error(`"${r.type}" message expects the 'payload' property to be an array of GraphQL errors, but got ${JSON.stringify(r.payload)}`);break}case mr.Complete:{if(typeof r.id!="string")throw new Error(`"${r.type}" message expects the 'id' property to be a string, but got ${un(r.id)}`);if(!r.id)throw new Error(`"${r.type}" message requires a non-empty 'id' property`);break}default:throw new Error(`Invalid message 'type' property "${r.type}"`)}return r}function Pk(r,e){return N0(typeof r=="string"?JSON.parse(r,e):r)}function _o(r,e){return N0(r),JSON.stringify(r,e)}var ha=function(r){return this instanceof ha?(this.v=r,this):new ha(r)},Nk=function(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,a=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(g){n[g]&&(i[g]=function(m){return new Promise(function(b,I){a.push([g,m,b,I])>1||c(g,m)})})}function c(g,m){try{f(n[g](m))}catch(b){y(a[0][3],b)}}function f(g){g.value instanceof ha?Promise.resolve(g.value.v).then(h,d):y(a[0][2],g)}function h(g){c("next",g)}function d(g){c("throw",g)}function y(g,m){g(m),a.shift(),a.length&&c(a[0][0],a[0][1])}};function Rk(r){const{url:e,connectionParams:t,lazy:n=!0,onNonLazyError:i=console.error,lazyCloseTimeout:a=0,keepAlive:u=0,disablePong:c,connectionAckWaitTimeout:f=0,retryAttempts:h=5,retryWait:d=async function(ve){let pe=1e3;for(let te=0;te<ve;te++)pe*=2;await new Promise(te=>setTimeout(te,pe+Math.floor(Math.random()*2700+300)))},shouldRetry:y=mh,isFatalConnectionProblem:g,on:m,webSocketImpl:b,generateID:I=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,ve=>{const pe=Math.random()*16|0;return(ve=="x"?pe:pe&3|8).toString(16)})},jsonMessageReplacer:x,jsonMessageReviver:_}=r;let A;if(b){if(!Dk(b))throw new Error("Invalid WebSocket implementation provided");A=b}else typeof WebSocket<"u"?A=WebSocket:typeof global<"u"?A=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(A=window.WebSocket||window.MozWebSocket);if(!A)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const P=A,M=(()=>{const ge=(()=>{const pe={};return{on(te,Ee){return pe[te]=Ee,()=>{delete pe[te]}},emit(te){var Ee;"id"in te&&((Ee=pe[te.id])===null||Ee===void 0||Ee.call(pe,te))}}})(),ve={connecting:m!=null&&m.connecting?[m.connecting]:[],opened:m!=null&&m.opened?[m.opened]:[],connected:m!=null&&m.connected?[m.connected]:[],ping:m!=null&&m.ping?[m.ping]:[],pong:m!=null&&m.pong?[m.pong]:[],message:m!=null&&m.message?[ge.emit,m.message]:[ge.emit],closed:m!=null&&m.closed?[m.closed]:[],error:m!=null&&m.error?[m.error]:[]};return{onMessage:ge.on,on(pe,te){const Ee=ve[pe];return Ee.push(te),()=>{Ee.splice(Ee.indexOf(te),1)}},emit(pe,...te){for(const Ee of[...ve[pe]])Ee(...te)}}})();function U(ge){const ve=[M.on("error",pe=>{ve.forEach(te=>te()),ge(pe)}),M.on("closed",pe=>{ve.forEach(te=>te()),ge(pe)})]}let W,K=0,X,fe=!1,oe=0,Ie=!1;async function ye(){clearTimeout(X);const[ge,ve]=await(W??(W=new Promise((Ee,Le)=>(async()=>{if(fe){if(await d(oe),!K)return W=void 0,Le({code:1e3,reason:"All Subscriptions Gone"});oe++}M.emit("connecting",fe);const Se=new P(typeof e=="function"?await e():e,Ck);let Ze,vt;function Mt(){isFinite(u)&&u>0&&(clearTimeout(vt),vt=setTimeout(()=>{Se.readyState===P.OPEN&&(Se.send(_o({type:mr.Ping})),M.emit("ping",!1,void 0))},u))}U(Xe=>{W=void 0,clearTimeout(Ze),clearTimeout(vt),Le(Xe),Xe instanceof R0&&(Se.close(4499,"Terminated"),Se.onerror=null,Se.onclose=null)}),Se.onerror=Xe=>M.emit("error",Xe),Se.onclose=Xe=>M.emit("closed",Xe),Se.onopen=async()=>{try{M.emit("opened",Se);const Xe=typeof t=="function"?await t():t;if(Se.readyState!==P.OPEN)return;Se.send(_o(Xe?{type:mr.ConnectionInit,payload:Xe}:{type:mr.ConnectionInit},x)),isFinite(f)&&f>0&&(Ze=setTimeout(()=>{Se.close(vn.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},f)),Mt()}catch(Xe){M.emit("error",Xe),Se.close(vn.InternalClientError,P0(Xe instanceof Error?Xe.message:new Error(Xe).message,"Internal client error"))}};let Et=!1;Se.onmessage=({data:Xe})=>{try{const it=Pk(Xe,_);if(M.emit("message",it),it.type==="ping"||it.type==="pong"){M.emit(it.type,!0,it.payload),it.type==="pong"?Mt():c||(Se.send(_o(it.payload?{type:mr.Pong,payload:it.payload}:{type:mr.Pong})),M.emit("pong",!1,it.payload));return}if(Et)return;if(it.type!==mr.ConnectionAck)throw new Error(`First message cannot be of type ${it.type}`);clearTimeout(Ze),Et=!0,M.emit("connected",Se,it.payload,fe),fe=!1,oe=0,Ee([Se,new Promise((Ot,De)=>U(De))])}catch(it){Se.onmessage=null,M.emit("error",it),Se.close(vn.BadResponse,P0(it instanceof Error?it.message:new Error(it).message,"Bad response"))}}})())));ge.readyState===P.CLOSING&&await ve;let pe=()=>{};const te=new Promise(Ee=>pe=Ee);return[ge,pe,Promise.race([te.then(()=>{if(!K){const Ee=()=>ge.close(1e3,"Normal Closure");isFinite(a)&&a>0?X=setTimeout(()=>{ge.readyState===P.OPEN&&Ee()},a):Ee()}}),ve])]}function Ne(ge){if(mh(ge)&&(Mk(ge.code)||[vn.InternalServerError,vn.InternalClientError,vn.BadRequest,vn.BadResponse,vn.Unauthorized,vn.SubprotocolNotAcceptable,vn.SubscriberAlreadyExists,vn.TooManyInitialisationRequests].includes(ge.code)))throw ge;if(Ie)return!1;if(mh(ge)&&ge.code===1e3)return K>0;if(!h||oe>=h||!y(ge)||g!=null&&g(ge))throw ge;return fe=!0}n||(async()=>{for(K++;;)try{const[,,ge]=await ye();await ge}catch(ge){try{if(!Ne(ge))return}catch(ve){return i==null?void 0:i(ve)}}})();function Ce(ge,ve){const pe=I(ge);let te=!1,Ee=!1,Le=()=>{K--,te=!0};return(async()=>{for(K++;;)try{const[Se,Ze,vt]=await ye();if(te)return Ze();const Mt=M.onMessage(pe,Et=>{switch(Et.type){case mr.Next:{ve.next(Et.payload);return}case mr.Error:{Ee=!0,te=!0,ve.error(Et.payload),Le();return}case mr.Complete:{te=!0,Le();return}}});Se.send(_o({id:pe,type:mr.Subscribe,payload:ge},x)),Le=()=>{!te&&Se.readyState===P.OPEN&&Se.send(_o({id:pe,type:mr.Complete},x)),K--,te=!0,Ze()},await vt.finally(Mt);return}catch(Se){if(!Ne(Se))return}})().then(()=>{Ee||ve.complete()}).catch(Se=>{ve.error(Se)}),()=>{te||Le()}}return{on:M.on,subscribe:Ce,iterate(ge){const ve=[],pe={done:!1,error:null,resolve:()=>{}},te=Ce(ge,{next(Le){ve.push(Le),pe.resolve()},error(Le){pe.done=!0,pe.error=Le,pe.resolve()},complete(){pe.done=!0,pe.resolve()}}),Ee=function(){return Nk(this,arguments,function*(){for(;;){for(ve.length||(yield ha(new Promise(Ze=>pe.resolve=Ze)));ve.length;)yield yield ha(ve.shift());if(pe.error)throw pe.error;if(pe.done)return yield ha(void 0)}})}();return Ee.throw=async Le=>(pe.done||(pe.done=!0,pe.error=Le,pe.resolve()),{done:!0,value:void 0}),Ee.return=async()=>(te(),{done:!0,value:void 0}),Ee},async dispose(){if(Ie=!0,W){const[ge]=await W;ge.close(1e3,"Normal Closure")}},terminate(){W&&M.emit("closed",new R0)}}}class R0 extends Error{constructor(){super(...arguments),this.name="TerminatedCloseEvent",this.message="4499: Terminated",this.code=4499,this.reason="Terminated",this.wasClean=!1}}function mh(r){return Is(r)&&"code"in r&&"reason"in r}function Mk(r){return[1e3,1001,1006,1005,1012,1013,1014].includes(r)?!1:r>=1e3&&r<=1999}function Dk(r){return typeof r=="function"&&"constructor"in r&&"CLOSED"in r&&"CLOSING"in r&&"CONNECTING"in r&&"OPEN"in r}function M0(r){return new Kr(function(e,t){var n=on(e,[]);return new Nt(function(i){var a,u=!1;return Promise.resolve(n).then(function(c){return r(c,e.getContext())}).then(e.setContext).then(function(){u||(a=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)}))}).catch(i.error.bind(i)),function(){u=!0,a&&a.unsubscribe()}})})}function D0(r){return new Kr(function(e,t){return new Nt(function(n){var i,a,u;try{i=t(e).subscribe({next:function(c){if(c.errors&&(u=r({graphQLErrors:c.errors,response:c,operation:e,forward:t}),u)){a=u.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.next(c)},error:function(c){if(u=r({operation:e,networkError:c,graphQLErrors:c&&c.result&&c.result.errors||void 0,forward:t}),u){a=u.subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return}n.error(c)},complete:function(){u||n.complete.bind(n)()}})}catch(c){r({networkError:c,operation:e,forward:t}),n.error(c)}return function(){i&&i.unsubscribe(),a&&i.unsubscribe()}})})}(function(r){Pn(e,r);function e(t){var n=r.call(this)||this;return n.link=D0(t),n}return e.prototype.request=function(t,n){return this.link.request(t,n)},e})(Kr);var yh={exports:{}};const Fk=ol(O1),Lk=ol(gO);var gh,F0;function da(){return F0||(F0=1,gh=TypeError),gh}const qk=ol(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var vh,L0;function ec(){if(L0)return vh;L0=1;var r=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=r&&e&&typeof e.get=="function"?e.get:null,n=r&&Map.prototype.forEach,i=typeof Set=="function"&&Set.prototype,a=Object.getOwnPropertyDescriptor&&i?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=i&&a&&typeof a.get=="function"?a.get:null,c=i&&Set.prototype.forEach,f=typeof WeakMap=="function"&&WeakMap.prototype,h=f?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,y=d?WeakSet.prototype.has:null,g=typeof WeakRef=="function"&&WeakRef.prototype,m=g?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,I=Object.prototype.toString,x=Function.prototype.toString,_=String.prototype.match,A=String.prototype.slice,P=String.prototype.replace,M=String.prototype.toUpperCase,U=String.prototype.toLowerCase,W=RegExp.prototype.test,K=Array.prototype.concat,X=Array.prototype.join,fe=Array.prototype.slice,oe=Math.floor,Ie=typeof BigInt=="function"?BigInt.prototype.valueOf:null,ye=Object.getOwnPropertySymbols,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ge=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ce||!0)?Symbol.toStringTag:null,ve=Object.prototype.propertyIsEnumerable,pe=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(H){return H.__proto__}:null);function te(H,G){if(H===1/0||H===-1/0||H!==H||H&&H>-1e3&&H<1e3||W.call(/e/,G))return G;var st=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var bt=H<0?-oe(-H):oe(H);if(bt!==H){var lt=String(bt),ze=A.call(G,lt.length+1);return P.call(lt,st,"$&_")+"."+P.call(P.call(ze,/([0-9]{3})/g,"$&_"),/_$/,"")}}return P.call(G,st,"$&_")}var Ee=qk,Le=Ee.custom,Se=q(Le)?Le:null,Ze={__proto__:null,double:'"',single:"'"},vt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};vh=function H(G,st,bt,lt){var ze=st||{};if(V(ze,"quoteStyle")&&!V(Ze,ze.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(ze,"maxStringLength")&&(typeof ze.maxStringLength=="number"?ze.maxStringLength<0&&ze.maxStringLength!==1/0:ze.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Kt=V(ze,"customInspect")?ze.customInspect:!0;if(typeof Kt!="boolean"&&Kt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(ze,"indent")&&ze.indent!==null&&ze.indent!==" "&&!(parseInt(ze.indent,10)===ze.indent&&ze.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(ze,"numericSeparator")&&typeof ze.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Zt=ze.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return Tt(G,ze);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var Qt=String(G);return Zt?te(G,Qt):Qt}if(typeof G=="bigint"){var kr=String(G)+"n";return Zt?te(G,kr):kr}var Hr=typeof ze.depth>"u"?5:ze.depth;if(typeof bt>"u"&&(bt=0),bt>=Hr&&Hr>0&&typeof G=="object")return Xe(G)?"[Array]":"[Object]";var Fr=dr(ze,bt);if(typeof lt>"u")lt=[];else if(Be(lt,G)>=0)return"[Circular]";function Ut(Je,et,tt){if(et&&(lt=fe.call(lt),lt.push(et)),tt){var gt={depth:ze.depth};return V(ze,"quoteStyle")&&(gt.quoteStyle=ze.quoteStyle),H(Je,gt,bt+1,lt)}return H(Je,ze,bt+1,lt)}if(typeof G=="function"&&!Ot(G)){var Or=We(G),$r=Ht(G,Ut);return"[Function"+(Or?": "+Or:" (anonymous)")+"]"+($r.length>0?" { "+X.call($r,", ")+" }":"")}if(q(G)){var Lr=Ce?P.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ne.call(G);return typeof G=="object"&&!Ce?Gt(Lr):Lr}if(Yt(G)){for(var ar="<"+U.call(String(G.nodeName)),Gr=G.attributes||[],Tr=0;Tr<Gr.length;Tr++)ar+=" "+Gr[Tr].name+"="+Mt(Et(Gr[Tr].value),"double",ze);return ar+=">",G.childNodes&&G.childNodes.length&&(ar+="..."),ar+="</"+U.call(String(G.nodeName))+">",ar}if(Xe(G)){if(G.length===0)return"[]";var gr=Ht(G,Ut);return Fr&&!sr(gr)?"["+Ar(gr,Fr)+"]":"[ "+X.call(gr,", ")+" ]"}if(De(G)){var Ir=Ht(G,Ut);return!("cause"in Error.prototype)&&"cause"in G&&!ve.call(G,"cause")?"{ ["+String(G)+"] "+X.call(K.call("[cause]: "+Ut(G.cause),Ir),", ")+" }":Ir.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+X.call(Ir,", ")+" }"}if(typeof G=="object"&&Kt){if(Se&&typeof G[Se]=="function"&&Ee)return Ee(G,{depth:Hr-bt});if(Kt!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(se(G)){var Sn=[];return n&&n.call(G,function(Je,et){Sn.push(Ut(et,G,!0)+" => "+Ut(Je,G))}),zt("Map",t.call(G),Sn,Fr)}if(pt(G)){var Un=[];return c&&c.call(G,function(Je){Un.push(Ut(Je,G))}),zt("Set",u.call(G),Un,Fr)}if(_e(G))return Er("WeakMap");if(mt(G))return Er("WeakSet");if(Ge(G))return Er("WeakRef");if(B(G))return Gt(Ut(Number(G)));if(J(G))return Gt(Ut(Ie.call(G)));if(Q(G))return Gt(b.call(G));if(He(G))return Gt(Ut(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof pi<"u"&&G===pi)return"{ [object globalThis] }";if(!it(G)&&!Ot(G)){var R=Ht(G,Ut),ue=pe?pe(G)===Object.prototype:G instanceof Object||G.constructor===Object,be=G instanceof Object?"":"null prototype",Pe=!ue&&ge&&Object(G)===G&&ge in G?A.call(xe(G),8,-1):be?"Object":"",Ve=ue||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",ut=Ve+(Pe||be?"["+X.call(K.call([],Pe||[],be||[]),": ")+"] ":"");return R.length===0?ut+"{}":Fr?ut+"{"+Ar(R,Fr)+"}":ut+"{ "+X.call(R,", ")+" }"}return String(G)};function Mt(H,G,st){var bt=st.quoteStyle||G,lt=Ze[bt];return lt+H+lt}function Et(H){return P.call(String(H),/"/g,""")}function Xe(H){return xe(H)==="[object Array]"&&(!ge||!(typeof H=="object"&&ge in H))}function it(H){return xe(H)==="[object Date]"&&(!ge||!(typeof H=="object"&&ge in H))}function Ot(H){return xe(H)==="[object RegExp]"&&(!ge||!(typeof H=="object"&&ge in H))}function De(H){return xe(H)==="[object Error]"&&(!ge||!(typeof H=="object"&&ge in H))}function He(H){return xe(H)==="[object String]"&&(!ge||!(typeof H=="object"&&ge in H))}function B(H){return xe(H)==="[object Number]"&&(!ge||!(typeof H=="object"&&ge in H))}function Q(H){return xe(H)==="[object Boolean]"&&(!ge||!(typeof H=="object"&&ge in H))}function q(H){if(Ce)return H&&typeof H=="object"&&H instanceof Symbol;if(typeof H=="symbol")return!0;if(!H||typeof H!="object"||!Ne)return!1;try{return Ne.call(H),!0}catch{}return!1}function J(H){if(!H||typeof H!="object"||!Ie)return!1;try{return Ie.call(H),!0}catch{}return!1}var ee=Object.prototype.hasOwnProperty||function(H){return H in this};function V(H,G){return ee.call(H,G)}function xe(H){return I.call(H)}function We(H){if(H.name)return H.name;var G=_.call(x.call(H),/^function\s*([\w$]+)/);return G?G[1]:null}function Be(H,G){if(H.indexOf)return H.indexOf(G);for(var st=0,bt=H.length;st<bt;st++)if(H[st]===G)return st;return-1}function se(H){if(!t||!H||typeof H!="object")return!1;try{t.call(H);try{u.call(H)}catch{return!0}return H instanceof Map}catch{}return!1}function _e(H){if(!h||!H||typeof H!="object")return!1;try{h.call(H,h);try{y.call(H,y)}catch{return!0}return H instanceof WeakMap}catch{}return!1}function Ge(H){if(!m||!H||typeof H!="object")return!1;try{return m.call(H),!0}catch{}return!1}function pt(H){if(!u||!H||typeof H!="object")return!1;try{u.call(H);try{t.call(H)}catch{return!0}return H instanceof Set}catch{}return!1}function mt(H){if(!y||!H||typeof H!="object")return!1;try{y.call(H,y);try{h.call(H,h)}catch{return!0}return H instanceof WeakSet}catch{}return!1}function Yt(H){return!H||typeof H!="object"?!1:typeof HTMLElement<"u"&&H instanceof HTMLElement?!0:typeof H.nodeName=="string"&&typeof H.getAttribute=="function"}function Tt(H,G){if(H.length>G.maxStringLength){var st=H.length-G.maxStringLength,bt="... "+st+" more character"+(st>1?"s":"");return Tt(A.call(H,0,G.maxStringLength),G)+bt}var lt=vt[G.quoteStyle||"single"];lt.lastIndex=0;var ze=P.call(P.call(H,lt,"\\$1"),/[\x00-\x1f]/g,Wt);return Mt(ze,"single",G)}function Wt(H){var G=H.charCodeAt(0),st={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return st?"\\"+st:"\\x"+(G<16?"0":"")+M.call(G.toString(16))}function Gt(H){return"Object("+H+")"}function Er(H){return H+" { ? }"}function zt(H,G,st,bt){var lt=bt?Ar(st,bt):X.call(st,", ");return H+" ("+G+") {"+lt+"}"}function sr(H){for(var G=0;G<H.length;G++)if(Be(H[G],`
|
|
129
129
|
`)>=0)return!1;return!0}function dr(H,G){var st;if(H.indent===" ")st=" ";else if(typeof H.indent=="number"&&H.indent>0)st=X.call(Array(H.indent+1)," ");else return null;return{base:st,prev:X.call(Array(G+1),st)}}function Ar(H,G){if(H.length===0)return"";var st=`
|
|
130
130
|
`+G.prev+G.base;return st+X.call(H,","+st)+`
|
|
131
|
-
`+G.prev}function Ht(H,G){var st=Xe(H),bt=[];if(st){bt.length=H.length;for(var lt=0;lt<H.length;lt++)bt[lt]=V(H,lt)?G(H[lt],H):""}var ze=typeof ye=="function"?ye(H):[],Kt;if(Ce){Kt={};for(var Zt=0;Zt<ze.length;Zt++)Kt["$"+ze[Zt]]=ze[Zt]}for(var Qt in H)V(H,Qt)&&(st&&String(Number(Qt))===Qt&&Qt<H.length||Ce&&Kt["$"+Qt]instanceof Symbol||(W.call(/[^\w$]/,Qt)?bt.push(G(Qt,H)+": "+G(H[Qt],H)):bt.push(Qt+": "+G(H[Qt],H))));if(typeof ye=="function")for(var kr=0;kr<ze.length;kr++)ve.call(H,ze[kr])&&bt.push("["+G(ze[kr])+"]: "+G(H[ze[kr]],H));return bt}return vh}var bh,q0;function jk(){if(q0)return bh;q0=1;var r=ec(),e=da(),t=function(c,f,h){for(var d=c,y;(y=d.next)!=null;d=y)if(y.key===f)return d.next=y.next,h||(y.next=c.next,c.next=y),y},n=function(c,f){if(c){var h=t(c,f);return h&&h.value}},i=function(c,f,h){var d=t(c,f);d?d.value=h:c.next={key:f,next:c.next,value:h}},a=function(c,f){return c?!!t(c,f):!1},u=function(c,f){if(c)return t(c,f,!0)};return bh=function(){var f,h={assert:function(d){if(!h.has(d))throw new e("Side channel does not contain "+r(d))},delete:function(d){var y=f&&f.next,g=u(f,d);return g&&y&&y===g&&(f=void 0),!!g},get:function(d){return n(f,d)},has:function(d){return a(f,d)},set:function(d,y){f||(f={next:void 0}),i(f,d,y)}};return h},bh}var wh,j0;function U0(){return j0||(j0=1,wh=Object),wh}var _h,$0;function Uk(){return $0||($0=1,_h=Error),_h}var xh,B0;function $k(){return B0||(B0=1,xh=EvalError),xh}var Sh,V0;function Bk(){return V0||(V0=1,Sh=RangeError),Sh}var Eh,W0;function Vk(){return W0||(W0=1,Eh=ReferenceError),Eh}var Oh,z0;function Wk(){return z0||(z0=1,Oh=SyntaxError),Oh}var Th,H0;function zk(){return H0||(H0=1,Th=URIError),Th}var Ah,G0;function Hk(){return G0||(G0=1,Ah=Math.abs),Ah}var kh,Q0;function Gk(){return Q0||(Q0=1,kh=Math.floor),kh}var Ih,J0;function Qk(){return J0||(J0=1,Ih=Math.max),Ih}var Ch,Y0;function Jk(){return Y0||(Y0=1,Ch=Math.min),Ch}var Ph,K0;function Yk(){return K0||(K0=1,Ph=Math.pow),Ph}var Nh,Z0;function Kk(){return Z0||(Z0=1,Nh=Math.round),Nh}var Rh,X0;function Zk(){return X0||(X0=1,Rh=Number.isNaN||function(e){return e!==e}),Rh}var Mh,eb;function Xk(){if(eb)return Mh;eb=1;var r=Zk();return Mh=function(t){return r(t)||t===0?t:t<0?-1:1},Mh}var Dh,tb;function eI(){return tb||(tb=1,Dh=Object.getOwnPropertyDescriptor),Dh}var Fh,rb;function nb(){if(rb)return Fh;rb=1;var r=eI();if(r)try{r([],"length")}catch{r=null}return Fh=r,Fh}var Lh,ib;function tI(){if(ib)return Lh;ib=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Lh=r,Lh}var qh,sb;function rI(){return sb||(sb=1,qh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,t);if(c.value!==i||c.enumerable!==!0)return!1}return!0}),qh}var jh,ab;function nI(){if(ab)return jh;ab=1;var r=typeof Symbol<"u"&&Symbol,e=rI();return jh=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},jh}var Uh,ob;function ub(){return ob||(ob=1,Uh=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Uh}var $h,cb;function lb(){if(cb)return $h;cb=1;var r=U0();return $h=r.getPrototypeOf||null,$h}var Bh,fb;function iI(){if(fb)return Bh;fb=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(f,h){for(var d=[],y=0;y<f.length;y+=1)d[y]=f[y];for(var g=0;g<h.length;g+=1)d[g+f.length]=h[g];return d},a=function(f,h){for(var d=[],y=h,g=0;y<f.length;y+=1,g+=1)d[g]=f[y];return d},u=function(c,f){for(var h="",d=0;d<c.length;d+=1)h+=c[d],d+1<c.length&&(h+=f);return h};return Bh=function(f){var h=this;if(typeof h!="function"||e.apply(h)!==n)throw new TypeError(r+h);for(var d=a(arguments,1),y,g=function(){if(this instanceof y){var _=h.apply(this,i(d,arguments));return Object(_)===_?_:this}return h.apply(f,i(d,arguments))},m=t(0,h.length-d.length),b=[],I=0;I<m;I++)b[I]="$"+I;if(y=Function("binder","return function ("+u(b,",")+"){ return binder.apply(this,arguments); }")(g),h.prototype){var x=function(){};x.prototype=h.prototype,y.prototype=new x,x.prototype=null}return y},Bh}var Vh,hb;function tc(){if(hb)return Vh;hb=1;var r=iI();return Vh=Function.prototype.bind||r,Vh}var Wh,db;function zh(){return db||(db=1,Wh=Function.prototype.call),Wh}var Hh,pb;function mb(){return pb||(pb=1,Hh=Function.prototype.apply),Hh}var Gh,yb;function sI(){return yb||(yb=1,Gh=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gh}var Qh,gb;function aI(){if(gb)return Qh;gb=1;var r=tc(),e=mb(),t=zh(),n=sI();return Qh=n||r.call(t,e),Qh}var Jh,vb;function bb(){if(vb)return Jh;vb=1;var r=tc(),e=da(),t=zh(),n=aI();return Jh=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(r,t,a)},Jh}var Yh,wb;function oI(){if(wb)return Yh;wb=1;var r=bb(),e=nb(),t;try{t=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Yh=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(c){return a(c==null?c:i(c))}:!1,Yh}var Kh,_b;function uI(){if(_b)return Kh;_b=1;var r=ub(),e=lb(),t=oI();return Kh=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,Kh}var Zh,xb;function cI(){if(xb)return Zh;xb=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=tc();return Zh=t.call(r,e),Zh}var Xh,Sb;function ed(){if(Sb)return Xh;Sb=1;var r,e=U0(),t=Uk(),n=$k(),i=Bk(),a=Vk(),u=Wk(),c=da(),f=zk(),h=Hk(),d=Gk(),y=Qk(),g=Jk(),m=Yk(),b=Kk(),I=Xk(),x=Function,_=function(De){try{return x('"use strict"; return ('+De+").constructor;")()}catch{}},A=nb(),P=tI(),M=function(){throw new c},U=A?function(){try{return arguments.callee,M}catch{try{return A(arguments,"callee").get}catch{return M}}}():M,W=nI()(),K=uI(),X=lb(),fe=ub(),oe=mb(),Ie=zh(),ye={},Ne=typeof Uint8Array>"u"||!K?r:K(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":W&&K?K([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":ye,"%AsyncGenerator%":ye,"%AsyncGeneratorFunction%":ye,"%AsyncIteratorPrototype%":ye,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":ye,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":W&&K?K(K([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!W||!K?r:K(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!W||!K?r:K(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":W&&K?K(""[Symbol.iterator]()):r,"%Symbol%":W?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":U,"%TypedArray%":Ne,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":Ie,"%Function.prototype.apply%":oe,"%Object.defineProperty%":P,"%Object.getPrototypeOf%":X,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":y,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":b,"%Math.sign%":I,"%Reflect.getPrototypeOf%":fe};if(K)try{null.error}catch(De){var ge=K(K(De));Ce["%Error.prototype%"]=ge}var ve=function De(He){var B;if(He==="%AsyncFunction%")B=_("async function () {}");else if(He==="%GeneratorFunction%")B=_("function* () {}");else if(He==="%AsyncGeneratorFunction%")B=_("async function* () {}");else if(He==="%AsyncGenerator%"){var Q=De("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(He==="%AsyncIteratorPrototype%"){var q=De("%AsyncGenerator%");q&&K&&(B=K(q.prototype))}return Ce[He]=B,B},pe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},te=tc(),Se=cI(),Le=te.call(Ie,Array.prototype.concat),Ee=te.call(oe,Array.prototype.splice),Ze=te.call(Ie,String.prototype.replace),vt=te.call(Ie,String.prototype.slice),Mt=te.call(Ie,RegExp.prototype.exec),Et=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xe=/\\(\\)?/g,it=function(He){var B=vt(He,0,1),Q=vt(He,-1);if(B==="%"&&Q!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(Q==="%"&&B!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var q=[];return Ze(He,Et,function(J,ee,V,xe){q[q.length]=V?Ze(xe,Xe,"$1"):ee||J}),q},Ot=function(He,B){var Q=He,q;if(Se(pe,Q)&&(q=pe[Q],Q="%"+q[0]+"%"),Se(Ce,Q)){var J=Ce[Q];if(J===ye&&(J=ve(Q)),typeof J>"u"&&!B)throw new c("intrinsic "+He+" exists, but is not available. Please file an issue!");return{alias:q,name:Q,value:J}}throw new u("intrinsic "+He+" does not exist!")};return Xh=function(He,B){if(typeof He!="string"||He.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Mt(/^%?[^%]*%?$/,He)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Q=it(He),q=Q.length>0?Q[0]:"",J=Ot("%"+q+"%",B),ee=J.name,V=J.value,xe=!1,We=J.alias;We&&(q=We[0],Ee(Q,Le([0,1],We)));for(var Be=1,se=!0;Be<Q.length;Be+=1){var _e=Q[Be],Ge=vt(_e,0,1),pt=vt(_e,-1);if((Ge==='"'||Ge==="'"||Ge==="`"||pt==='"'||pt==="'"||pt==="`")&&Ge!==pt)throw new u("property names with quotes must have matching quotes");if((_e==="constructor"||!se)&&(xe=!0),q+="."+_e,ee="%"+q+"%",Se(Ce,ee))V=Ce[ee];else if(V!=null){if(!(_e in V)){if(!B)throw new c("base intrinsic for "+He+" exists, but the property is not available.");return}if(A&&Be+1>=Q.length){var mt=A(V,_e);se=!!mt,se&&"get"in mt&&!("originalValue"in mt.get)?V=mt.get:V=V[_e]}else se=Se(V,_e),V=V[_e];se&&!xe&&(Ce[ee]=V)}}return V},Xh}var td,Eb;function Ob(){if(Eb)return td;Eb=1;var r=ed(),e=bb(),t=e([r("%String.prototype.indexOf%")]);return td=function(i,a){var u=r(i,!!a);return typeof u=="function"&&t(i,".prototype.")>-1?e([u]):u},td}var rd,Tb;function Ab(){if(Tb)return rd;Tb=1;var r=ed(),e=Ob(),t=ec(),n=da(),i=r("%Map%",!0),a=e("Map.prototype.get",!0),u=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),f=e("Map.prototype.delete",!0),h=e("Map.prototype.size",!0);return rd=!!i&&function(){var y,g={assert:function(m){if(!g.has(m))throw new n("Side channel does not contain "+t(m))},delete:function(m){if(y){var b=f(y,m);return h(y)===0&&(y=void 0),b}return!1},get:function(m){if(y)return a(y,m)},has:function(m){return y?c(y,m):!1},set:function(m,b){y||(y=new i),u(y,m,b)}};return g},rd}var nd,kb;function lI(){if(kb)return nd;kb=1;var r=ed(),e=Ob(),t=ec(),n=Ab(),i=da(),a=r("%WeakMap%",!0),u=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),f=e("WeakMap.prototype.has",!0),h=e("WeakMap.prototype.delete",!0);return nd=a?function(){var y,g,m={assert:function(b){if(!m.has(b))throw new i("Side channel does not contain "+t(b))},delete:function(b){if(a&&b&&(typeof b=="object"||typeof b=="function")){if(y)return h(y,b)}else if(n&&g)return g.delete(b);return!1},get:function(b){return a&&b&&(typeof b=="object"||typeof b=="function")&&y?u(y,b):g&&g.get(b)},has:function(b){return a&&b&&(typeof b=="object"||typeof b=="function")&&y?f(y,b):!!g&&g.has(b)},set:function(b,I){a&&b&&(typeof b=="object"||typeof b=="function")?(y||(y=new a),c(y,b,I)):n&&(g||(g=n()),g.set(b,I))}};return m}:n,nd}var id,Ib;function fI(){if(Ib)return id;Ib=1;var r=da(),e=ec(),t=jk(),n=Ab(),i=lI(),a=i||n||t;return id=function(){var c,f={assert:function(h){if(!f.has(h))throw new r("Side channel does not contain "+e(h))},delete:function(h){return!!c&&c.delete(h)},get:function(h){return c&&c.get(h)},has:function(h){return!!c&&c.has(h)},set:function(h,d){c||(c=a()),c.set(h,d)}};return f},id}var sd,Cb;function ad(){if(Cb)return sd;Cb=1;var r=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return sd={default:t.RFC3986,formatters:{RFC1738:function(n){return r.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},sd}var od,Pb;function Nb(){if(Pb)return od;Pb=1;var r=ad(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var x=[],_=0;_<256;++_)x.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return x}(),i=function(_){for(;_.length>1;){var A=_.pop(),P=A.obj[A.prop];if(t(P)){for(var M=[],U=0;U<P.length;++U)typeof P[U]<"u"&&M.push(P[U]);A.obj[A.prop]=M}}},a=function(_,A){for(var P=A&&A.plainObjects?Object.create(null):{},M=0;M<_.length;++M)typeof _[M]<"u"&&(P[M]=_[M]);return P},u=function x(_,A,P){if(!A)return _;if(typeof A!="object"){if(t(_))_.push(A);else if(_&&typeof _=="object")(P&&(P.plainObjects||P.allowPrototypes)||!e.call(Object.prototype,A))&&(_[A]=!0);else return[_,A];return _}if(!_||typeof _!="object")return[_].concat(A);var M=_;return t(_)&&!t(A)&&(M=a(_,P)),t(_)&&t(A)?(A.forEach(function(U,W){if(e.call(_,W)){var K=_[W];K&&typeof K=="object"&&U&&typeof U=="object"?_[W]=x(K,U,P):_.push(U)}else _[W]=U}),_):Object.keys(A).reduce(function(U,W){var K=A[W];return e.call(U,W)?U[W]=x(U[W],K,P):U[W]=K,U},M)},c=function(_,A){return Object.keys(A).reduce(function(P,M){return P[M]=A[M],P},_)},f=function(x,_,A){var P=x.replace(/\+/g," ");if(A==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,d=function(_,A,P,M,U){if(_.length===0)return _;var W=_;if(typeof _=="symbol"?W=Symbol.prototype.toString.call(_):typeof _!="string"&&(W=String(_)),P==="iso-8859-1")return escape(W).replace(/%u[0-9a-f]{4}/gi,function(Ne){return"%26%23"+parseInt(Ne.slice(2),16)+"%3B"});for(var K="",X=0;X<W.length;X+=h){for(var fe=W.length>=h?W.slice(X,X+h):W,oe=[],Ie=0;Ie<fe.length;++Ie){var ye=fe.charCodeAt(Ie);if(ye===45||ye===46||ye===95||ye===126||ye>=48&&ye<=57||ye>=65&&ye<=90||ye>=97&&ye<=122||U===r.RFC1738&&(ye===40||ye===41)){oe[oe.length]=fe.charAt(Ie);continue}if(ye<128){oe[oe.length]=n[ye];continue}if(ye<2048){oe[oe.length]=n[192|ye>>6]+n[128|ye&63];continue}if(ye<55296||ye>=57344){oe[oe.length]=n[224|ye>>12]+n[128|ye>>6&63]+n[128|ye&63];continue}Ie+=1,ye=65536+((ye&1023)<<10|fe.charCodeAt(Ie)&1023),oe[oe.length]=n[240|ye>>18]+n[128|ye>>12&63]+n[128|ye>>6&63]+n[128|ye&63]}K+=oe.join("")}return K},y=function(_){for(var A=[{obj:{o:_},prop:"o"}],P=[],M=0;M<A.length;++M)for(var U=A[M],W=U.obj[U.prop],K=Object.keys(W),X=0;X<K.length;++X){var fe=K[X],oe=W[fe];typeof oe=="object"&&oe!==null&&P.indexOf(oe)===-1&&(A.push({obj:W,prop:fe}),P.push(oe))}return i(A),_},g=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},m=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},b=function(_,A){return[].concat(_,A)},I=function(_,A){if(t(_)){for(var P=[],M=0;M<_.length;M+=1)P.push(A(_[M]));return P}return A(_)};return od={arrayToObject:a,assign:c,combine:b,compact:y,decode:f,encode:d,isBuffer:m,isRegExp:g,maybeMap:I,merge:u},od}var ud,Rb;function hI(){if(Rb)return ud;Rb=1;var r=fI(),e=Nb(),t=ad(),n=Object.prototype.hasOwnProperty,i={brackets:function(x){return x+"[]"},comma:"comma",indices:function(x,_){return x+"["+_+"]"},repeat:function(x){return x}},a=Array.isArray,u=Array.prototype.push,c=function(I,x){u.apply(I,a(x)?x:[x])},f=Date.prototype.toISOString,h=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,format:h,formatter:t.formatters[h],indices:!1,serializeDate:function(x){return f.call(x)},skipNulls:!1,strictNullHandling:!1},y=function(x){return typeof x=="string"||typeof x=="number"||typeof x=="boolean"||typeof x=="symbol"||typeof x=="bigint"},g={},m=function I(x,_,A,P,M,U,W,K,X,fe,oe,Ie,ye,Ne,Ce,ge,ve,pe){for(var te=x,Se=pe,Le=0,Ee=!1;(Se=Se.get(g))!==void 0&&!Ee;){var Ze=Se.get(x);if(Le+=1,typeof Ze<"u"){if(Ze===Le)throw new RangeError("Cyclic object value");Ee=!0}typeof Se.get(g)>"u"&&(Le=0)}if(typeof fe=="function"?te=fe(_,te):te instanceof Date?te=ye(te):A==="comma"&&a(te)&&(te=e.maybeMap(te,function(ee){return ee instanceof Date?ye(ee):ee})),te===null){if(U)return X&&!ge?X(_,d.encoder,ve,"key",Ne):_;te=""}if(y(te)||e.isBuffer(te)){if(X){var vt=ge?_:X(_,d.encoder,ve,"key",Ne);return[Ce(vt)+"="+Ce(X(te,d.encoder,ve,"value",Ne))]}return[Ce(_)+"="+Ce(String(te))]}var Mt=[];if(typeof te>"u")return Mt;var Et;if(A==="comma"&&a(te))ge&&X&&(te=e.maybeMap(te,X)),Et=[{value:te.length>0?te.join(",")||null:void 0}];else if(a(fe))Et=fe;else{var Xe=Object.keys(te);Et=oe?Xe.sort(oe):Xe}var it=K?_.replace(/\./g,"%2E"):_,Ot=P&&a(te)&&te.length===1?it+"[]":it;if(M&&a(te)&&te.length===0)return Ot+"[]";for(var De=0;De<Et.length;++De){var He=Et[De],B=typeof He=="object"&&typeof He.value<"u"?He.value:te[He];if(!(W&&B===null)){var Q=Ie&&K?He.replace(/\./g,"%2E"):He,q=a(te)?typeof A=="function"?A(Ot,Q):Ot:Ot+(Ie?"."+Q:"["+Q+"]");pe.set(x,Le);var J=r();J.set(g,pe),c(Mt,I(B,q,A,P,M,U,W,K,A==="comma"&&ge&&a(te)?null:X,fe,oe,Ie,ye,Ne,Ce,ge,ve,J))}}return Mt},b=function(x){if(!x)return d;if(typeof x.allowEmptyArrays<"u"&&typeof x.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof x.encodeDotInKeys<"u"&&typeof x.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(x.encoder!==null&&typeof x.encoder<"u"&&typeof x.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=x.charset||d.charset;if(typeof x.charset<"u"&&x.charset!=="utf-8"&&x.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=t.default;if(typeof x.format<"u"){if(!n.call(t.formatters,x.format))throw new TypeError("Unknown format option provided.");A=x.format}var P=t.formatters[A],M=d.filter;(typeof x.filter=="function"||a(x.filter))&&(M=x.filter);var U;if(x.arrayFormat in i?U=x.arrayFormat:"indices"in x?U=x.indices?"indices":"repeat":U=d.arrayFormat,"commaRoundTrip"in x&&typeof x.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var W=typeof x.allowDots>"u"?x.encodeDotInKeys===!0?!0:d.allowDots:!!x.allowDots;return{addQueryPrefix:typeof x.addQueryPrefix=="boolean"?x.addQueryPrefix:d.addQueryPrefix,allowDots:W,allowEmptyArrays:typeof x.allowEmptyArrays=="boolean"?!!x.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:U,charset:_,charsetSentinel:typeof x.charsetSentinel=="boolean"?x.charsetSentinel:d.charsetSentinel,commaRoundTrip:x.commaRoundTrip,delimiter:typeof x.delimiter>"u"?d.delimiter:x.delimiter,encode:typeof x.encode=="boolean"?x.encode:d.encode,encodeDotInKeys:typeof x.encodeDotInKeys=="boolean"?x.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof x.encoder=="function"?x.encoder:d.encoder,encodeValuesOnly:typeof x.encodeValuesOnly=="boolean"?x.encodeValuesOnly:d.encodeValuesOnly,filter:M,format:A,formatter:P,serializeDate:typeof x.serializeDate=="function"?x.serializeDate:d.serializeDate,skipNulls:typeof x.skipNulls=="boolean"?x.skipNulls:d.skipNulls,sort:typeof x.sort=="function"?x.sort:null,strictNullHandling:typeof x.strictNullHandling=="boolean"?x.strictNullHandling:d.strictNullHandling}};return ud=function(I,x){var _=I,A=b(x),P,M;typeof A.filter=="function"?(M=A.filter,_=M("",_)):a(A.filter)&&(M=A.filter,P=M);var U=[];if(typeof _!="object"||_===null)return"";var W=i[A.arrayFormat],K=W==="comma"&&A.commaRoundTrip;P||(P=Object.keys(_)),A.sort&&P.sort(A.sort);for(var X=r(),fe=0;fe<P.length;++fe){var oe=P[fe];A.skipNulls&&_[oe]===null||c(U,m(_[oe],oe,W,K,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,X))}var Ie=U.join(A.delimiter),ye=A.addQueryPrefix===!0?"?":"";return A.charsetSentinel&&(A.charset==="iso-8859-1"?ye+="utf8=%26%2310003%3B&":ye+="utf8=%E2%9C%93&"),Ie.length>0?ye+Ie:""},ud}var cd,Mb;function dI(){if(Mb)return cd;Mb=1;var r=Nb(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(g){return g.replace(/&#(\d+);/g,function(m,b){return String.fromCharCode(parseInt(b,10))})},a=function(g,m){return g&&typeof g=="string"&&m.comma&&g.indexOf(",")>-1?g.split(","):g},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",f=function(m,b){var I={__proto__:null},x=b.ignoreQueryPrefix?m.replace(/^\?/,""):m;x=x.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var _=b.parameterLimit===1/0?void 0:b.parameterLimit,A=x.split(b.delimiter,_),P=-1,M,U=b.charset;if(b.charsetSentinel)for(M=0;M<A.length;++M)A[M].indexOf("utf8=")===0&&(A[M]===c?U="utf-8":A[M]===u&&(U="iso-8859-1"),P=M,M=A.length);for(M=0;M<A.length;++M)if(M!==P){var W=A[M],K=W.indexOf("]="),X=K===-1?W.indexOf("="):K+1,fe,oe;X===-1?(fe=b.decoder(W,n.decoder,U,"key"),oe=b.strictNullHandling?null:""):(fe=b.decoder(W.slice(0,X),n.decoder,U,"key"),oe=r.maybeMap(a(W.slice(X+1),b),function(ye){return b.decoder(ye,n.decoder,U,"value")})),oe&&b.interpretNumericEntities&&U==="iso-8859-1"&&(oe=i(oe)),W.indexOf("[]=")>-1&&(oe=t(oe)?[oe]:oe);var Ie=e.call(I,fe);Ie&&b.duplicates==="combine"?I[fe]=r.combine(I[fe],oe):(!Ie||b.duplicates==="last")&&(I[fe]=oe)}return I},h=function(g,m,b,I){for(var x=I?m:a(m,b),_=g.length-1;_>=0;--_){var A,P=g[_];if(P==="[]"&&b.parseArrays)A=b.allowEmptyArrays&&(x===""||b.strictNullHandling&&x===null)?[]:[].concat(x);else{A=b.plainObjects?Object.create(null):{};var M=P.charAt(0)==="["&&P.charAt(P.length-1)==="]"?P.slice(1,-1):P,U=b.decodeDotInKeys?M.replace(/%2E/g,"."):M,W=parseInt(U,10);!b.parseArrays&&U===""?A={0:x}:!isNaN(W)&&P!==U&&String(W)===U&&W>=0&&b.parseArrays&&W<=b.arrayLimit?(A=[],A[W]=x):U!=="__proto__"&&(A[U]=x)}x=A}return x},d=function(m,b,I,x){if(m){var _=I.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,A=/(\[[^[\]]*])/,P=/(\[[^[\]]*])/g,M=I.depth>0&&A.exec(_),U=M?_.slice(0,M.index):_,W=[];if(U){if(!I.plainObjects&&e.call(Object.prototype,U)&&!I.allowPrototypes)return;W.push(U)}for(var K=0;I.depth>0&&(M=P.exec(_))!==null&&K<I.depth;){if(K+=1,!I.plainObjects&&e.call(Object.prototype,M[1].slice(1,-1))&&!I.allowPrototypes)return;W.push(M[1])}if(M){if(I.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+I.depth+" and strictDepth is true");W.push("["+_.slice(M.index)+"]")}return h(W,b,I,x)}},y=function(m){if(!m)return n;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.decodeDotInKeys<"u"&&typeof m.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(m.decoder!==null&&typeof m.decoder<"u"&&typeof m.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=typeof m.charset>"u"?n.charset:m.charset,I=typeof m.duplicates>"u"?n.duplicates:m.duplicates;if(I!=="combine"&&I!=="first"&&I!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var x=typeof m.allowDots>"u"?m.decodeDotInKeys===!0?!0:n.allowDots:!!m.allowDots;return{allowDots:x,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof m.allowPrototypes=="boolean"?m.allowPrototypes:n.allowPrototypes,allowSparse:typeof m.allowSparse=="boolean"?m.allowSparse:n.allowSparse,arrayLimit:typeof m.arrayLimit=="number"?m.arrayLimit:n.arrayLimit,charset:b,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:n.charsetSentinel,comma:typeof m.comma=="boolean"?m.comma:n.comma,decodeDotInKeys:typeof m.decodeDotInKeys=="boolean"?m.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof m.decoder=="function"?m.decoder:n.decoder,delimiter:typeof m.delimiter=="string"||r.isRegExp(m.delimiter)?m.delimiter:n.delimiter,depth:typeof m.depth=="number"||m.depth===!1?+m.depth:n.depth,duplicates:I,ignoreQueryPrefix:m.ignoreQueryPrefix===!0,interpretNumericEntities:typeof m.interpretNumericEntities=="boolean"?m.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof m.parameterLimit=="number"?m.parameterLimit:n.parameterLimit,parseArrays:m.parseArrays!==!1,plainObjects:typeof m.plainObjects=="boolean"?m.plainObjects:n.plainObjects,strictDepth:typeof m.strictDepth=="boolean"?!!m.strictDepth:n.strictDepth,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:n.strictNullHandling}};return cd=function(g,m){var b=y(m);if(g===""||g===null||typeof g>"u")return b.plainObjects?Object.create(null):{};for(var I=typeof g=="string"?f(g,b):g,x=b.plainObjects?Object.create(null):{},_=Object.keys(I),A=0;A<_.length;++A){var P=_[A],M=d(P,I[P],b,typeof g=="string");x=r.merge(x,M,b)}return b.allowSparse===!0?x:r.compact(x)},cd}var ld,Db;function pI(){if(Db)return ld;Db=1;var r=hI(),e=dI(),t=ad();return ld={formats:t,parse:e,stringify:r},ld}(function(r,e){(function(t,n){n(e,Fk,Lk,pI())})(pi,function(t,n,i,a){var u=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(xe){xe(V)})}return new(q||(q=Promise))(function(V,xe){function We(_e){try{se(J.next(_e))}catch(Ge){xe(Ge)}}function Be(_e){try{se(J.throw(_e))}catch(Ge){xe(Ge)}}function se(_e){_e.done?V(_e.value):ee(_e.value).then(We,Be)}se((J=J.apply(B,Q||[])).next())})},c=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,xe;return xe={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function We(se){return function(_e){return Be([se,_e])}}function Be(se){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=se[0]&2?ee.return:se[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,se[1])).done)return V;switch(ee=0,V&&(se=[se[0]&2,V.value]),se[0]){case 0:case 1:V=se;break;case 4:return q.label++,{value:se[1],done:!1};case 5:q.label++,ee=se[1],se=[0];continue;case 7:se=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(se[0]===6||se[0]===2)){q=0;continue}if(se[0]===3&&(!V||se[1]>V[0]&&se[1]<V[3])){q.label=se[1];break}if(se[0]===6&&q.label<V[1]){q.label=V[1],V=se;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(se);break}V[2]&&q.ops.pop(),q.trys.pop();continue}se=Q.call(B,q)}catch(_e){se=[6,_e],ee=0}finally{J=V=0}if(se[0]&5)throw se[1];return{value:se[0]?se[1]:void 0,done:!0}}};function f(B,Q){if(B.directives&&B.directives.length){var q={};return B.directives.forEach(function(J){q[J.name.value]=i.argumentsObjectFromField(J,Q)}),q}return null}var h=Object.prototype.hasOwnProperty;function d(B,Q){Q!==null&&typeof Q=="object"&&Object.keys(Q).forEach(function(q){var J=Q[q];h.call(B,q)?d(B[q],J):B[q]=J})}function y(B,Q,q,J,ee,V){V===void 0&&(V={});var xe=i.getMainDefinition(Q),We=i.getFragmentDefinitions(Q),Be=i.createFragmentMap(We),se=V.resultMapper,_e=V.fragmentMatcher||function(){return!0},Ge={fragmentMap:Be,contextValue:J,variableValues:ee,resultMapper:se,resolver:B,fragmentMatcher:_e};return g(xe.selectionSet,q,Ge)}function g(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,xe,We,Be=this;return c(this,function(se){switch(se.label){case 0:return J=q.fragmentMap,ee=q.contextValue,V=q.variableValues,xe={},We=function(_e){return u(Be,void 0,void 0,function(){var Ge,pt,mt,Yt,Tt;return c(this,function(Wt){switch(Wt.label){case 0:return i.shouldInclude(_e,V)?i.isField(_e)?[4,m(_e,Q,q)]:[3,2]:[2];case 1:return Ge=Wt.sent(),pt=i.resultKeyNameFromField(_e),Ge!==void 0&&(xe[pt]===void 0?xe[pt]=Ge:d(xe[pt],Ge)),[2];case 2:if(i.isInlineFragment(_e))mt=_e;else if(mt=J[_e.name.value],!mt)throw new Error("No fragment named "+_e.name.value);return Yt=mt.typeCondition.name.value,q.fragmentMatcher(Q,Yt,ee)?[4,g(mt.selectionSet,Q,q)]:[3,4];case 3:Tt=Wt.sent(),d(xe,Tt),Wt.label=4;case 4:return[2]}})})},[4,Promise.all(B.selections.map(We))];case 1:return se.sent(),q.resultMapper?[2,q.resultMapper(xe,Q)]:[2,xe]}})})}function m(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,xe,We,Be,se;return c(this,function(_e){switch(_e.label){case 0:return J=q.variableValues,ee=q.contextValue,V=q.resolver,xe=B.name.value,We=i.argumentsObjectFromField(B,J),Be={isLeaf:!B.selectionSet,resultKey:i.resultKeyNameFromField(B),directives:f(B,J),field:B},[4,V(xe,Q,We,ee,Be)];case 1:return se=_e.sent(),B.selectionSet?se==null?[2,se]:Array.isArray(se)?[2,b(B,se,q)]:[2,g(B.selectionSet,se,q)]:[2,se]}})})}function b(B,Q,q){return Promise.all(Q.map(function(J){return J===null?null:Array.isArray(J)?b(B,J,q):g(B.selectionSet,J,q)}))}var I=function(){var B=function(Q,q){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var V in ee)ee.hasOwnProperty(V)&&(J[V]=ee[V])},B(Q,q)};return function(Q,q){B(Q,q);function J(){this.constructor=Q}Q.prototype=q===null?Object.create(q):(J.prototype=q.prototype,new J)}}(),x=function(){return x=Object.assign||function(B){for(var Q,q=1,J=arguments.length;q<J;q++){Q=arguments[q];for(var ee in Q)Object.prototype.hasOwnProperty.call(Q,ee)&&(B[ee]=Q[ee])}return B},x.apply(this,arguments)},_=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(xe){xe(V)})}return new(q||(q=Promise))(function(V,xe){function We(_e){try{se(J.next(_e))}catch(Ge){xe(Ge)}}function Be(_e){try{se(J.throw(_e))}catch(Ge){xe(Ge)}}function se(_e){_e.done?V(_e.value):ee(_e.value).then(We,Be)}se((J=J.apply(B,Q||[])).next())})},A=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,xe;return xe={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function We(se){return function(_e){return Be([se,_e])}}function Be(se){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=se[0]&2?ee.return:se[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,se[1])).done)return V;switch(ee=0,V&&(se=[se[0]&2,V.value]),se[0]){case 0:case 1:V=se;break;case 4:return q.label++,{value:se[1],done:!1};case 5:q.label++,ee=se[1],se=[0];continue;case 7:se=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(se[0]===6||se[0]===2)){q=0;continue}if(se[0]===3&&(!V||se[1]>V[0]&&se[1]<V[3])){q.label=se[1];break}if(se[0]===6&&q.label<V[1]){q.label=V[1],V=se;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(se);break}V[2]&&q.ops.pop(),q.trys.pop();continue}se=Q.call(B,q)}catch(_e){se=[6,_e],ee=0}finally{J=V=0}if(se[0]&5)throw se[1];return{value:se[0]?se[1]:void 0,done:!0}}},P=function(){for(var B=0,Q=0,q=arguments.length;Q<q;Q++)B+=arguments[Q].length;for(var J=Array(B),ee=0,Q=0;Q<q;Q++)for(var V=arguments[Q],xe=0,We=V.length;xe<We;xe++,ee++)J[ee]=V[xe];return J},M=function(B){var Q=B.replace(/\s/g,""),q=Q.replace(/\[(.*)\]/,function(J,ee,V,xe){return((ee!=null&&ee.length)>0?ee:null)||Q});return q},U=function(B,Q,q,J){if(Array.isArray(B)){var ee=M(Q);return B.map(function(V){return U(V,ee,q,J)})}return B==null||typeof B=="number"||typeof B=="boolean"||typeof B=="string"?B:q(B,Q,q,J)},W=function(B){return B.directives&&B.directives.length?B.directives.find(function(Q){return Q.name.value==="rest"}):null};function K(B,Q,q,J,ee){return ee==null||Q==null||typeof Q=="number"||typeof Q=="boolean"||typeof Q=="string"||ee.selections.forEach(function(V){if(i.isInlineFragment(V))K(B,Q,q,J,V.selectionSet);else if(V.kind==="FragmentSpread"){var xe=J[V.name.value];K(B,Q,q,J,xe.selectionSet)}else if(i.isField(V)){var We=i.resultKeyNameFromField(V);We===B&&W(V)!=null?X(Q,q,J,V.selectionSet):K(B,Q,q,J,V.selectionSet)}else return function(Be){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()}),Q}function X(B,Q,q,J){if(!(B==null||typeof B=="number"||typeof B=="boolean"||typeof B=="string")){if(Array.isArray(B)){B.forEach(function(ee){return X(ee,Q,q,J)});return}J.selections.forEach(function(ee){if(i.isInlineFragment(ee))X(B,Q,q,ee.selectionSet);else if(ee.kind==="FragmentSpread"){var V=q[ee.name.value];X(B,Q,q,V.selectionSet)}else if(i.isField(ee)){var xe=B[ee.name.value];ee.name.value==="__typename"||(typeof xe>"u"?B[ee.name.value]=null:xe!=null&&typeof xe=="object"&&ee.selectionSet!=null&&X(xe,Q,q,ee.selectionSet))}else return function(We){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()})}}var fe=function(B,Q){var q=B[Q||Xe]||B[Xe];return typeof q=="string"?{uri:q}:x({responseTransformer:null},q)},oe=function(B,Q,q){return q===void 0||Q===void 0?B:B.replace(":"+Q,q)},Ie=function(){function B(){}return B.replacerForPath=function(Q){if(Q in B.cache)return B.cache[Q];var q=Q.indexOf("?"),J=Q.split(B.argReplacement),ee=[],V=!1;J.reduce(function(We,Be){if(Be===""||Be==="{}")return We+Be.length;var se=We+Be.length;if(Be[0]==="{"&&Be[Be.length-1]==="}"){var _e=Be.slice(1,Be.length-1).split(".");ee.push(function(Ge,pt){try{var mt=ye(Ge,_e);return!pt||typeof mt!="object"||mt==null?String(mt):a.stringify(mt)}catch{var Yt=[Q,_e.join(".")].join("|");return Yt in B.warnTable||(console.warn("Warning: RestLink caught an error while unpacking",Yt,"This tends to happen if you forgot to pass a parameter needed for creating an @rest(path, or if RestLink was configured to deeply unpack a path parameter that wasn't provided. This message will only log once per detected instance. Trouble-shooting hint: check @rest(path: and the variables provided to this query."),B.warnTable[Yt]=!0),""}})}else ee.push(Be),!V&&se>=q&&(V=!0,ee.push(!0));return se},0);var xe=function(We){var Be=!1,se=ee.reduce(function(_e,Ge){return typeof Ge=="string"?_e+Ge:typeof Ge=="boolean"?(Be=!0,_e):_e+Ge(We,Be)},"");return se};return B.cache[Q]=xe},B.cache={},B.warnTable={},B.argReplacement=/({[._a-zA-Z0-9]*})/,B}();function ye(B,Q){if(Q.length===0)return B;var q=P(Q),J=q.shift();return ye(B[J],q)}var Ne=["__typename"],Ce=typeof globalThis=="object"&&globalThis||pi,ge=function(B,Q,q){q===void 0&&(q=[]);var J=null;return Q.length!=2?J=function(ee,V){return Q(ee)}:J=Q,Array.isArray(B)?B.map(function(ee,V){return ge(ee,J,P(q,[String(V)]))}):B==null||typeof B!="object"||B.constructor!==Object||Ce.FileList&&B instanceof FileList||Ce.File&&B instanceof File?B:Object.keys(B).reduce(function(ee,V){var xe=B[V];if(Ne.indexOf(V)!==-1)return ee[V]=xe,ee;var We=P(q,[V]);return ee[J(V,We)]=ge(xe,J,We),ee},{})},ve=function(B){return B},pe=function(B){return B instanceof Headers?B:new Headers(B||{})},te=function(){for(var B=[],Q=0;Q<arguments.length;Q++)B[Q]=arguments[Q];return B.reduce(function(q,J){return J&&(J.forEach||(J=pe(J)),J.forEach(function(ee,V){q.append(V,ee)})),q},new Headers)},Se=function(B,Q,q){var J=new Headers;return B.forEach(function(ee,V){Q.indexOf(V)===-1&&J.append(V,ee)}),te(J,q||new Headers)},Le=function(B){return function(Q,q){return Se(Q,B,q)}},Ee=["GET","POST","PUT","PATCH","DELETE"],Ze=function(B,Q){switch(Q){case"query":if(Ee.indexOf(B.toUpperCase())!==-1)return;throw new Error('A "query" operation can only support "GET" requests but got "'+B+'".');case"mutation":if(Ee.indexOf(B.toUpperCase())!==-1)return;throw new Error('"mutation" operations do not support that HTTP-verb');case"subscription":throw new Error('A "subscription" operation is not supported yet.');default:var q=Q;return q}},vt=function(B,Q,q){var J=new Error(q);throw J.response=B,J.statusCode=B.status,J.result=Q,J},Mt=function(B,Q){return B==null||typeof B!="object"?B:Array.isArray(B)?B.map(function(q){return Mt(q,Q)}):(B.__typename=Q,B)},Et=function(B,Q,q,J,ee){return _(void 0,void 0,void 0,function(){var V,xe,We,Be,se,_e,Ge,pt,mt,Yt,Tt,Wt,Gt,Er,zt,sr,dr,Ar,Ht,H,G,st,bt,lt,ze,Kt,Zt,Qt,kr,Hr,Fr,Ut,Or,$r,Lr,ar,Gr,Tr,gr,Ir,Sn,Un,R,ue,be,Pe,Ve,ut,Je,et;return A(this,function(tt){switch(tt.label){case 0:if(V=ee.directives,xe=ee.isLeaf,We=ee.resultKey,Be=J.exportVariablesByNode,se=Be.get(Q)||{},_e=function(gt){return gt instanceof Array?gt.forEach(_e):Be.set(gt,x({},se)),gt},Ge=(Q||{})[We],pt=(Q||{})[B],Q&&V&&V.export&&(se[V.export.as]=pt),mt=V&&V.type,!xe&&mt){if(V.rest)throw new Error("Invalid use of @type(name: ...) directive on a call that also has @rest(...)");return _e(pt),[2,Mt(pt,V.type.name)]}if(Yt=!V||!V.rest,Yt)return[2,_e(Ge||pt)];if(Tt=J.credentials,Wt=J.endpoints,Gt=J.headers,Er=J.customFetch,zt=J.operationType,sr=J.typePatcher,dr=J.mainDefinition,Ar=J.fragmentDefinitions,Ht=J.fieldNameNormalizer,H=J.fieldNameDenormalizer,G=J.serializers,st=J.responseTransformer,bt=i.createFragmentMap(Ar),lt=V.rest,ze=lt.path,Kt=lt.endpoint,Zt=lt.pathBuilder,Qt=fe(Wt,Kt),kr=ze==null&&Zt==null,kr)throw new Error('One of ("path" | "pathBuilder") must be set in the @rest() directive. This request had neither, please add one');if(Zt||(ze.includes(":")?(console.warn("Deprecated: '@rest(path:' contains a ':' colon, this format will be removed in future versions"),Zt=function(gt){var w=gt.args,k=gt.exportVariables,T=x(x({},w),k),C=Object.keys(T).reduce(function(D,$){return oe(D,$,T[$])},ze);if(C.includes(":"))throw new Error('Missing parameters to run query, specify it in the query params or use an export directive. (If you need to use ":" inside a variable string make sure to encode the variables properly using `encodeURIComponent`. Alternatively see documentation about using pathBuilder.)');return C}):Zt=Ie.replacerForPath(ze)),Hr={args:q,exportVariables:se,context:J,"@rest":V.rest,replacer:Zt},Fr=Zt(Hr),Ut=V.rest,Or=Ut.method,$r=Ut.type,Lr=Ut.bodyBuilder,ar=Ut.bodyKey,Gr=Ut.fieldNameDenormalizer,Tr=Ut.fieldNameNormalizer,gr=Ut.bodySerializer,Or||(Or="GET"),ar||(ar="input"),Ir=void 0,Sn=void 0,["GET","DELETE"].indexOf(Or)===-1){if(!Lr){if(Un=Hr.exportVariables[ar]||Hr.args&&Hr.args[ar],!Un)throw new Error("[GraphQL "+Or+" "+zt+" using a REST call without a body]. No `"+ar+"` was detected. Pass bodyKey, or bodyBuilder to the @rest() directive to resolve this.");Lr=function(gt){return Un}}if(Ir=ge(Lr(Hr),Gr||H||ve),R=void 0,typeof gr=="string"){if(!G.hasOwnProperty(gr))throw new Error('"bodySerializer" must correspond to configured serializer. '+("Please make sure to specify a serializer called "+gr+' in the "bodySerializers" property of the RestLink.'));R=G[gr](Ir,Gt)}else R=gr?gr(Ir,Gt):G[it](Ir,Gt);Ir=R.body,Sn=new Headers(R.headers)}return Ze(Or,zt||"query"),ue=x({method:Or,headers:Sn||Gt,body:Ir},Tt?{credentials:Tt}:{}),be=""+Qt.uri+Fr,[4,(Er||fetch)(be,ue)];case 1:return Pe=tt.sent(),J.responses.push(Pe),Pe.ok?(Pe.status===204||Pe.headers.get("Content-Length")==="0"?Ve={}:Ve=Pe,[3,9]):[3,2];case 2:return Pe.status!==404?[3,3]:(Ve=null,[3,9]);case 3:ut=void 0,tt.label=4;case 4:return tt.trys.push([4,6,,8]),[4,Pe.clone().json()];case 5:return ut=tt.sent(),[3,8];case 6:return tt.sent(),[4,Pe.clone().text()];case 7:return ut=tt.sent(),[3,8];case 8:vt(Pe,ut,"Response not successful: Received status code "+Pe.status),tt.label=9;case 9:if(Je=Qt.responseTransformer||st,!Je)return[3,14];tt.label=10;case 10:return tt.trys.push([10,12,,13]),[4,Je(Ve,$r)];case 11:return Ve=tt.sent(),[3,13];case 12:throw et=tt.sent(),console.warn("An error occurred in a responseTransformer:"),et;case 13:return[3,16];case 14:return Ve&&Ve.json?[4,Ve.json()]:[3,16];case 15:Ve=tt.sent(),tt.label=16;case 16:return Ve=ge(Ve,Tr||Ht||ve),Ve=K(We,Ve,dr,bt,dr.selectionSet),Ve=U(Ve,$r,sr,{resolverParams:{fieldName:B,root:Q,args:q,context:J,info:ee}}),[2,_e(Ve)]}})})},Xe="",it="",Ot=function(B,Q){return Q.has("content-type")||Q.append("Content-Type","application/json"),{body:JSON.stringify(B),headers:Q}},De={test:function(B){return B.name.value==="rest"},remove:!0},He=function(B){I(Q,B);function Q(q){var J,ee=q.uri,V=q.endpoints,xe=q.headers,We=q.fieldNameNormalizer,Be=q.fieldNameDenormalizer,se=q.typePatcher,_e=q.customFetch,Ge=q.credentials,pt=q.bodySerializers,mt=q.defaultSerializer,Yt=q.responseTransformer,Tt=B.call(this)||this,Wt={};if(Wt[Xe]=ee||"",Tt.endpoints=Object.assign({},V||Wt),ee==null&&V==null)throw new Error("A RestLink must be initialized with either 1 uri, or a map of keyed-endpoints");if(ee!=null){var Gt=(V||{})[Xe];if(Gt!=null&&Gt!=ee)throw new Error("RestLink was configured with a default uri that doesn't match what's passed in to the endpoints map.");Tt.endpoints[Xe]=ee}if(Tt.endpoints[Xe]==null&&console.warn("RestLink configured without a default URI. All @rest(…) directives must provide an endpoint key!"),se==null)Tt.typePatcher=function(zt,sr,dr){return x({__typename:sr},zt)};else if(!Array.isArray(se)&&typeof se=="object"&&Object.keys(se).map(function(zt){return se[zt]}).reduce(function(zt,sr){return zt&&typeof sr=="function"},!0)){var Er=se;Tt.typePatcher=function(zt,sr,dr,Ar){var Ht=zt.__typename||sr;if(Array.isArray(zt))return zt.map(function(G){return dr(G,Ht,dr,Ar)});var H=Er[Ht]||function(G){return G};return x({__typename:Ht},H(zt,Ht,dr,Ar))}}else throw new Error("RestLink was configured with a typePatcher of invalid type!");return pt&&pt.hasOwnProperty(it)&&console.warn("RestLink was configured to override the default serializer! This may result in unexpected behavior"),Tt.responseTransformer=Yt||null,Tt.fieldNameNormalizer=We||null,Tt.fieldNameDenormalizer=Be||null,Tt.headers=pe(xe),Tt.credentials=Ge||null,Tt.customFetch=_e,Tt.serializers=x((J={},J[it]=mt||Ot,J),pt||{}),Tt.processedDocuments=new Map,Tt}return Q.prototype.removeRestSetsFromDocument=function(q){var J=this.processedDocuments.get(q);if(J)return J;i.checkDocument(q);var ee=i.removeDirectivesFromDocument([De],q);return this.processedDocuments.set(q,ee),ee},Q.prototype.request=function(q,J){var ee=q.query,V=q.variables,xe=q.getContext,We=q.setContext,Be=xe(),se=i.hasDirectives(["rest"],ee);if(!se)return J(q);var _e=this.removeRestSetsFromDocument(ee),Ge=Be.headersMergePolicy;Ge==null&&Array.isArray(Be.headersToOverride)?Ge=Le(Be.headersToOverride):Ge==null&&(Ge=te);var pt=Ge(this.headers,Be.headers);pt.has("Accept")||pt.append("Accept","application/json");var mt=Be.credentials||this.credentials,Yt=i.addTypenameToDocument(ee),Tt=i.getMainDefinition(ee),Wt=i.getFragmentDefinitions(ee),Gt=(Tt||{}).operation||"query",Er={headers:pt,endpoints:this.endpoints,exportVariablesByNode:new Map,credentials:mt,customFetch:this.customFetch,operationType:Gt,fieldNameNormalizer:this.fieldNameNormalizer,fieldNameDenormalizer:this.fieldNameDenormalizer,mainDefinition:Tt,fragmentDefinitions:Wt,typePatcher:this.typePatcher,serializers:this.serializers,responses:[],responseTransformer:this.responseTransformer},zt={},sr;return _e&&J?(q.query=_e,sr=J(q)):sr=n.Observable.of({data:{}}),sr.flatMap(function(dr){var Ar=dr.data,Ht=dr.errors;return new n.Observable(function(H){y(Et,Yt,Ar,Er,V,zt).then(function(G){We({restResponses:(Be.restResponses||[]).concat(Er.responses)}),H.next({data:G,errors:Ht}),H.complete()}).catch(function(G){G.name!=="AbortError"&&(G.result&&G.result.errors&&H.next(G.result),H.error(G))})})})},Q}(n.ApolloLink);t.RestLink=He,t.PathBuilder=Ie,Object.defineProperty(t,"__esModule",{value:!0})})})(yh,yh.exports);var mI=yh.exports;const rc=he.createContext(),yI=()=>{const{isAuthenticated:r,login:e}=ti(),{children:t,isEmbedded:n,setIsEmbedded:i,authError:a}=he.useContext(rc),u=pn.useNavigate(),c=pn.useLocation(),[f,h]=he.useState(!1),[d,y]=he.useState(),[g,m]=he.useState(),[b,I]=he.useState({}),x=he.useRef({}),_=he.useRef({}),[A,P]=he.useState(!1),[M,U]=he.useState({});he.useEffect(()=>{var ve;if(!(!c||c.pathname!=="/mm-embedded-login")){if(r||a)if(((ve=new URL(origin))==null?void 0:ve.protocol)==="http:"){window.close();return}else{const te=new URLSearchParams(c.search),Se=te.get("id"),Le=te.get("origin");a?window.parent.postMessage({type:"authorize-failed",instanceId:Se,error:a,authUrl:window.location.href},Le):window.parent.postMessage({type:"authorized",instanceId:Se,authUrl:window.location.href},Le);return}r===!1&&e()}},[c]),he.useEffect(()=>{var Se,Le;if(r===null||!c||c.pathname!=="/mm-embedded-interop")return;const ve=new URLSearchParams(c.search),pe=ve.get("id"),te=ve.get("origin");if(te){const Ee=(Se=new URL(te))==null?void 0:Se.hostname;if(/^(?:[\w-]+\.)*(?:machinemetrics\.com|machinemetrics-us-gov\.com|m12s\.com)$/.test(Ee))y(te);else{alert("Invalid Embeddable Zone Host");return}}if(r===!1){if(te){const Ee={instanceId:pe,authUrl:`${window.location.protocol}//${window.location.host}/mm-embedded-login?id=${pe}&origin=${te}`,origin:te};if(((Le=new URL(te))==null?void 0:Le.protocol)==="http:"){window.parent.postMessage({type:"login",...Ee},te);return}e({mm_instanceId:Ee.instanceId,mm_authUrl:encodeURIComponent(Ee.authUrl),mm_origin:Ee.origin});return}e();return}pe&&m(pe),pe&&te&&i(!0)},[c,r]),pn.useBlocker(({nextLocation:ve})=>{var pe;return n?(pe=ve.state)!=null&&pe.fromParent?(h(!0),!1):(W(`${ve.pathname}${ve.search}`),!0):!1}),he.useEffect(()=>{if(!n||!d)return;const ve=pe=>{pe.metaKey&&pe.key==="k"&&window.parent.postMessage({type:"open-search",instanceId:g},d)};return window.addEventListener("keydown",ve),()=>{window.removeEventListener("keydown",ve)}},[n,d]),he.useEffect(()=>{if(!n||!d)return;const ve=({origin:pe,data:te})=>{var Se,Le,Ee,Ze,vt,Mt,Et,Xe;if(pe===d)switch(te.type){case"navigate":u(te.path,{replace:!0,state:{fromParent:!0}});break;case"set-context":I(te.context||{});break;case"set-configuring":P(te.isConfiguring);break;case"set-params":U(te.params);break;case"load-options":(Le=(Se=x.current)[`option-${te.name}`])==null||Le.call(Se,{filter:te.filter});break;case"validate":(Ze=(Ee=x.current)[`validate-${te.name}`])==null||Ze.call(Ee,{value:te.value});break;case"request":(Mt=(vt=_.current)[te.requestType])==null||Mt.call(vt,te);break;case"response":(Xe=(Et=x.current)[te.callbackId])==null||Xe.call(Et,te.response);break}};return window.addEventListener("message",ve),!f&&r&&window.parent.postMessage({type:"ready",instanceId:g},d),()=>{window.removeEventListener("message",ve)}},[u,f,n,r,d]);const W=(ve,pe)=>{!f&&!r||window.parent.postMessage({type:"set-path",instanceId:g,path:ve,...pe},d)},K=ve=>{f&&window.parent.postMessage({type:"set-summary",instanceId:g,summary:ve},d)},X=ve=>{f&&window.parent.postMessage({type:"toast",instanceId:g,message:ve},d)},fe=ve=>{f&&window.parent.postMessage({type:"popup",instanceId:g,message:ve},d)},oe=()=>{f&&window.parent.postMessage({type:"loaded",instanceId:g},d)},Ie=async({header:ve,body:pe,choices:te})=>f?new Promise(Se=>{const Le=A0(),Ee=async Ze=>{delete x.current[Le],Se(Ze)};x.current[Le]=Ee,window.parent.postMessage({type:"confirm",instanceId:g,header:ve,body:pe,choices:te,callbackId:Le},d)}):Promise.reject(new Error("Not ready")),ye=({requestType:ve,func:pe})=>{const te=async({callbackId:Se,data:Le})=>{const Ee=await pe(Le);window.parent.postMessage({callbackId:Se,type:"response",instanceId:g,response:Ee},d)};_.current[ve]=te},Ne=({callbackId:ve,func:pe,responseType:te="response",responseKey:Se="response",props:Le={},callOnRegister:Ee=!1})=>{const Ze=async Mt=>{const Et=await pe(Mt);window.parent.postMessage({type:te,instanceId:g,...Le,[Se]:Et,callbackId:ve},d)},vt=x.current[ve];x.current[ve]=Ze,vt&&Ee&&Ze(Le)},Ce=(ve,pe)=>{if(f){if(pe.validate&&typeof pe.validate=="function"&&Ne({callbackId:`validate-${ve}`,func:pe.validate,responseType:"set-validation",responseKey:"validation",props:{name:ve}}),pe.options){const te=typeof pe.options=="function"?pe.options:()=>pe.options;Ne({callbackId:`option-${ve}`,func:te,responseType:"set-options",responseKey:"options",props:{name:ve},callOnRegister:!0})}window.parent.postMessage({type:"add-setting",instanceId:g,setting:{name:ve,...pe,options:void 0,validate:void 0}},d)}},ge=he.useMemo(()=>({commands:{navigateParent:W,setSummary:K,toast:X,popup:fe,confirm:Ie,setLoaded:oe},context:{...b,get colorMode(){throw new Error("colorMode has been moved to useMMAppParams")},get isFullScreen(){throw new Error("isFullScreen has been moved to useMMAppParams")}},params:{isEmbedded:n,isConfiguring:A,colorMode:b.colorMode,isFullScreen:b.isFullScreen,...M},addSetting:Ce,registerHandler:ye}),[n,A,W,K,X,fe,Ie,oe,b,M,Ce,ye]);return nr.jsx(es.Provider,{value:ge,children:c.pathname!=="/mm-embedded-interop"&&c.pathname!=="/mm-embedded-login"&&c.pathname!=="/mm-embedded-print"?t:nr.jsx(nr.Fragment,{})})},gI=()=>{const{urls:r,jwtRef:e,accessToken:t}=ti(),{graphQLRoleOverride:n,children:i}=he.useContext(rc),[a,u]=he.useState(),[c,f]=he.useState(),h=()=>{const g=new URL(r.graphQLUrl);return`//${g.host}${g.pathname}`},d=()=>n?{"X-Hasura-Role":n}:{};he.useEffect(()=>{const g=new kk(Rk({url:`wss:${h()}`,lazy:!0,reconnect:!0,connectionParams:async()=>({headers:{Authorization:`Bearer ${e.current}`,...d()}})})),m=D0(({operation:P,networkError:M,forward:U})=>(Bi(P.query).operation==="subscription"&&M&&g.client.terminate(),U(P))),I=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${e.current}`,...d()}})).concat(uf({uri:`https:${h()}`,fetch:window.fetch})),x=m.split(({query:P})=>{const M=Bi(P);return M.kind==="OperationDefinition"&&M.operation==="subscription"},g,I),A=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${t}`}})).concat(new mI.RestLink({uri:r.apiUrl}));f(Kr.from([A,x]))},[]),he.useEffect(()=>{c&&u(new Cf({link:c,cache:new Of}))},[c]);const y=he.useMemo(()=>({link:c}),[c]);return nr.jsx(c0.Provider,{value:y,children:a?nr.jsx(T1,{client:a,children:nr.jsx(zA,{children:nr.jsx(yI,{children:i})})}):nr.jsx(nr.Fragment,{})})},vI=Jp.div`
|
|
131
|
+
`+G.prev}function Ht(H,G){var st=Xe(H),bt=[];if(st){bt.length=H.length;for(var lt=0;lt<H.length;lt++)bt[lt]=V(H,lt)?G(H[lt],H):""}var ze=typeof ye=="function"?ye(H):[],Kt;if(Ce){Kt={};for(var Zt=0;Zt<ze.length;Zt++)Kt["$"+ze[Zt]]=ze[Zt]}for(var Qt in H)V(H,Qt)&&(st&&String(Number(Qt))===Qt&&Qt<H.length||Ce&&Kt["$"+Qt]instanceof Symbol||(W.call(/[^\w$]/,Qt)?bt.push(G(Qt,H)+": "+G(H[Qt],H)):bt.push(Qt+": "+G(H[Qt],H))));if(typeof ye=="function")for(var kr=0;kr<ze.length;kr++)ve.call(H,ze[kr])&&bt.push("["+G(ze[kr])+"]: "+G(H[ze[kr]],H));return bt}return vh}var bh,q0;function jk(){if(q0)return bh;q0=1;var r=ec(),e=da(),t=function(c,f,h){for(var d=c,y;(y=d.next)!=null;d=y)if(y.key===f)return d.next=y.next,h||(y.next=c.next,c.next=y),y},n=function(c,f){if(c){var h=t(c,f);return h&&h.value}},i=function(c,f,h){var d=t(c,f);d?d.value=h:c.next={key:f,next:c.next,value:h}},a=function(c,f){return c?!!t(c,f):!1},u=function(c,f){if(c)return t(c,f,!0)};return bh=function(){var f,h={assert:function(d){if(!h.has(d))throw new e("Side channel does not contain "+r(d))},delete:function(d){var y=f&&f.next,g=u(f,d);return g&&y&&y===g&&(f=void 0),!!g},get:function(d){return n(f,d)},has:function(d){return a(f,d)},set:function(d,y){f||(f={next:void 0}),i(f,d,y)}};return h},bh}var wh,j0;function U0(){return j0||(j0=1,wh=Object),wh}var _h,$0;function Uk(){return $0||($0=1,_h=Error),_h}var xh,B0;function $k(){return B0||(B0=1,xh=EvalError),xh}var Sh,V0;function Bk(){return V0||(V0=1,Sh=RangeError),Sh}var Eh,W0;function Vk(){return W0||(W0=1,Eh=ReferenceError),Eh}var Oh,z0;function Wk(){return z0||(z0=1,Oh=SyntaxError),Oh}var Th,H0;function zk(){return H0||(H0=1,Th=URIError),Th}var Ah,G0;function Hk(){return G0||(G0=1,Ah=Math.abs),Ah}var kh,Q0;function Gk(){return Q0||(Q0=1,kh=Math.floor),kh}var Ih,J0;function Qk(){return J0||(J0=1,Ih=Math.max),Ih}var Ch,Y0;function Jk(){return Y0||(Y0=1,Ch=Math.min),Ch}var Ph,K0;function Yk(){return K0||(K0=1,Ph=Math.pow),Ph}var Nh,Z0;function Kk(){return Z0||(Z0=1,Nh=Math.round),Nh}var Rh,X0;function Zk(){return X0||(X0=1,Rh=Number.isNaN||function(e){return e!==e}),Rh}var Mh,eb;function Xk(){if(eb)return Mh;eb=1;var r=Zk();return Mh=function(t){return r(t)||t===0?t:t<0?-1:1},Mh}var Dh,tb;function eI(){return tb||(tb=1,Dh=Object.getOwnPropertyDescriptor),Dh}var Fh,rb;function nb(){if(rb)return Fh;rb=1;var r=eI();if(r)try{r([],"length")}catch{r=null}return Fh=r,Fh}var Lh,ib;function tI(){if(ib)return Lh;ib=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Lh=r,Lh}var qh,sb;function rI(){return sb||(sb=1,qh=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var u=Object.getOwnPropertySymbols(e);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(e,t);if(c.value!==i||c.enumerable!==!0)return!1}return!0}),qh}var jh,ab;function nI(){if(ab)return jh;ab=1;var r=typeof Symbol<"u"&&Symbol,e=rI();return jh=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},jh}var Uh,ob;function ub(){return ob||(ob=1,Uh=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Uh}var $h,cb;function lb(){if(cb)return $h;cb=1;var r=U0();return $h=r.getPrototypeOf||null,$h}var Bh,fb;function iI(){if(fb)return Bh;fb=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(f,h){for(var d=[],y=0;y<f.length;y+=1)d[y]=f[y];for(var g=0;g<h.length;g+=1)d[g+f.length]=h[g];return d},a=function(f,h){for(var d=[],y=h,g=0;y<f.length;y+=1,g+=1)d[g]=f[y];return d},u=function(c,f){for(var h="",d=0;d<c.length;d+=1)h+=c[d],d+1<c.length&&(h+=f);return h};return Bh=function(f){var h=this;if(typeof h!="function"||e.apply(h)!==n)throw new TypeError(r+h);for(var d=a(arguments,1),y,g=function(){if(this instanceof y){var _=h.apply(this,i(d,arguments));return Object(_)===_?_:this}return h.apply(f,i(d,arguments))},m=t(0,h.length-d.length),b=[],I=0;I<m;I++)b[I]="$"+I;if(y=Function("binder","return function ("+u(b,",")+"){ return binder.apply(this,arguments); }")(g),h.prototype){var x=function(){};x.prototype=h.prototype,y.prototype=new x,x.prototype=null}return y},Bh}var Vh,hb;function tc(){if(hb)return Vh;hb=1;var r=iI();return Vh=Function.prototype.bind||r,Vh}var Wh,db;function zh(){return db||(db=1,Wh=Function.prototype.call),Wh}var Hh,pb;function mb(){return pb||(pb=1,Hh=Function.prototype.apply),Hh}var Gh,yb;function sI(){return yb||(yb=1,Gh=typeof Reflect<"u"&&Reflect&&Reflect.apply),Gh}var Qh,gb;function aI(){if(gb)return Qh;gb=1;var r=tc(),e=mb(),t=zh(),n=sI();return Qh=n||r.call(t,e),Qh}var Jh,vb;function bb(){if(vb)return Jh;vb=1;var r=tc(),e=da(),t=zh(),n=aI();return Jh=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(r,t,a)},Jh}var Yh,wb;function oI(){if(wb)return Yh;wb=1;var r=bb(),e=nb(),t;try{t=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return Yh=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(c){return a(c==null?c:i(c))}:!1,Yh}var Kh,_b;function uI(){if(_b)return Kh;_b=1;var r=ub(),e=lb(),t=oI();return Kh=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,Kh}var Zh,xb;function cI(){if(xb)return Zh;xb=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=tc();return Zh=t.call(r,e),Zh}var Xh,Sb;function ed(){if(Sb)return Xh;Sb=1;var r,e=U0(),t=Uk(),n=$k(),i=Bk(),a=Vk(),u=Wk(),c=da(),f=zk(),h=Hk(),d=Gk(),y=Qk(),g=Jk(),m=Yk(),b=Kk(),I=Xk(),x=Function,_=function(De){try{return x('"use strict"; return ('+De+").constructor;")()}catch{}},A=nb(),P=tI(),M=function(){throw new c},U=A?function(){try{return arguments.callee,M}catch{try{return A(arguments,"callee").get}catch{return M}}}():M,W=nI()(),K=uI(),X=lb(),fe=ub(),oe=mb(),Ie=zh(),ye={},Ne=typeof Uint8Array>"u"||!K?r:K(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":W&&K?K([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":ye,"%AsyncGenerator%":ye,"%AsyncGeneratorFunction%":ye,"%AsyncIteratorPrototype%":ye,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":ye,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":W&&K?K(K([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!W||!K?r:K(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":A,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!W||!K?r:K(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":W&&K?K(""[Symbol.iterator]()):r,"%Symbol%":W?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":U,"%TypedArray%":Ne,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":f,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":Ie,"%Function.prototype.apply%":oe,"%Object.defineProperty%":P,"%Object.getPrototypeOf%":X,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":y,"%Math.min%":g,"%Math.pow%":m,"%Math.round%":b,"%Math.sign%":I,"%Reflect.getPrototypeOf%":fe};if(K)try{null.error}catch(De){var ge=K(K(De));Ce["%Error.prototype%"]=ge}var ve=function De(He){var B;if(He==="%AsyncFunction%")B=_("async function () {}");else if(He==="%GeneratorFunction%")B=_("function* () {}");else if(He==="%AsyncGeneratorFunction%")B=_("async function* () {}");else if(He==="%AsyncGenerator%"){var Q=De("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(He==="%AsyncIteratorPrototype%"){var q=De("%AsyncGenerator%");q&&K&&(B=K(q.prototype))}return Ce[He]=B,B},pe={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},te=tc(),Ee=cI(),Le=te.call(Ie,Array.prototype.concat),Se=te.call(oe,Array.prototype.splice),Ze=te.call(Ie,String.prototype.replace),vt=te.call(Ie,String.prototype.slice),Mt=te.call(Ie,RegExp.prototype.exec),Et=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Xe=/\\(\\)?/g,it=function(He){var B=vt(He,0,1),Q=vt(He,-1);if(B==="%"&&Q!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(Q==="%"&&B!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var q=[];return Ze(He,Et,function(J,ee,V,xe){q[q.length]=V?Ze(xe,Xe,"$1"):ee||J}),q},Ot=function(He,B){var Q=He,q;if(Ee(pe,Q)&&(q=pe[Q],Q="%"+q[0]+"%"),Ee(Ce,Q)){var J=Ce[Q];if(J===ye&&(J=ve(Q)),typeof J>"u"&&!B)throw new c("intrinsic "+He+" exists, but is not available. Please file an issue!");return{alias:q,name:Q,value:J}}throw new u("intrinsic "+He+" does not exist!")};return Xh=function(He,B){if(typeof He!="string"||He.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof B!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Mt(/^%?[^%]*%?$/,He)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Q=it(He),q=Q.length>0?Q[0]:"",J=Ot("%"+q+"%",B),ee=J.name,V=J.value,xe=!1,We=J.alias;We&&(q=We[0],Se(Q,Le([0,1],We)));for(var Be=1,se=!0;Be<Q.length;Be+=1){var _e=Q[Be],Ge=vt(_e,0,1),pt=vt(_e,-1);if((Ge==='"'||Ge==="'"||Ge==="`"||pt==='"'||pt==="'"||pt==="`")&&Ge!==pt)throw new u("property names with quotes must have matching quotes");if((_e==="constructor"||!se)&&(xe=!0),q+="."+_e,ee="%"+q+"%",Ee(Ce,ee))V=Ce[ee];else if(V!=null){if(!(_e in V)){if(!B)throw new c("base intrinsic for "+He+" exists, but the property is not available.");return}if(A&&Be+1>=Q.length){var mt=A(V,_e);se=!!mt,se&&"get"in mt&&!("originalValue"in mt.get)?V=mt.get:V=V[_e]}else se=Ee(V,_e),V=V[_e];se&&!xe&&(Ce[ee]=V)}}return V},Xh}var td,Eb;function Ob(){if(Eb)return td;Eb=1;var r=ed(),e=bb(),t=e([r("%String.prototype.indexOf%")]);return td=function(i,a){var u=r(i,!!a);return typeof u=="function"&&t(i,".prototype.")>-1?e([u]):u},td}var rd,Tb;function Ab(){if(Tb)return rd;Tb=1;var r=ed(),e=Ob(),t=ec(),n=da(),i=r("%Map%",!0),a=e("Map.prototype.get",!0),u=e("Map.prototype.set",!0),c=e("Map.prototype.has",!0),f=e("Map.prototype.delete",!0),h=e("Map.prototype.size",!0);return rd=!!i&&function(){var y,g={assert:function(m){if(!g.has(m))throw new n("Side channel does not contain "+t(m))},delete:function(m){if(y){var b=f(y,m);return h(y)===0&&(y=void 0),b}return!1},get:function(m){if(y)return a(y,m)},has:function(m){return y?c(y,m):!1},set:function(m,b){y||(y=new i),u(y,m,b)}};return g},rd}var nd,kb;function lI(){if(kb)return nd;kb=1;var r=ed(),e=Ob(),t=ec(),n=Ab(),i=da(),a=r("%WeakMap%",!0),u=e("WeakMap.prototype.get",!0),c=e("WeakMap.prototype.set",!0),f=e("WeakMap.prototype.has",!0),h=e("WeakMap.prototype.delete",!0);return nd=a?function(){var y,g,m={assert:function(b){if(!m.has(b))throw new i("Side channel does not contain "+t(b))},delete:function(b){if(a&&b&&(typeof b=="object"||typeof b=="function")){if(y)return h(y,b)}else if(n&&g)return g.delete(b);return!1},get:function(b){return a&&b&&(typeof b=="object"||typeof b=="function")&&y?u(y,b):g&&g.get(b)},has:function(b){return a&&b&&(typeof b=="object"||typeof b=="function")&&y?f(y,b):!!g&&g.has(b)},set:function(b,I){a&&b&&(typeof b=="object"||typeof b=="function")?(y||(y=new a),c(y,b,I)):n&&(g||(g=n()),g.set(b,I))}};return m}:n,nd}var id,Ib;function fI(){if(Ib)return id;Ib=1;var r=da(),e=ec(),t=jk(),n=Ab(),i=lI(),a=i||n||t;return id=function(){var c,f={assert:function(h){if(!f.has(h))throw new r("Side channel does not contain "+e(h))},delete:function(h){return!!c&&c.delete(h)},get:function(h){return c&&c.get(h)},has:function(h){return!!c&&c.has(h)},set:function(h,d){c||(c=a()),c.set(h,d)}};return f},id}var sd,Cb;function ad(){if(Cb)return sd;Cb=1;var r=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return sd={default:t.RFC3986,formatters:{RFC1738:function(n){return r.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},sd}var od,Pb;function Nb(){if(Pb)return od;Pb=1;var r=ad(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var x=[],_=0;_<256;++_)x.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return x}(),i=function(_){for(;_.length>1;){var A=_.pop(),P=A.obj[A.prop];if(t(P)){for(var M=[],U=0;U<P.length;++U)typeof P[U]<"u"&&M.push(P[U]);A.obj[A.prop]=M}}},a=function(_,A){for(var P=A&&A.plainObjects?Object.create(null):{},M=0;M<_.length;++M)typeof _[M]<"u"&&(P[M]=_[M]);return P},u=function x(_,A,P){if(!A)return _;if(typeof A!="object"){if(t(_))_.push(A);else if(_&&typeof _=="object")(P&&(P.plainObjects||P.allowPrototypes)||!e.call(Object.prototype,A))&&(_[A]=!0);else return[_,A];return _}if(!_||typeof _!="object")return[_].concat(A);var M=_;return t(_)&&!t(A)&&(M=a(_,P)),t(_)&&t(A)?(A.forEach(function(U,W){if(e.call(_,W)){var K=_[W];K&&typeof K=="object"&&U&&typeof U=="object"?_[W]=x(K,U,P):_.push(U)}else _[W]=U}),_):Object.keys(A).reduce(function(U,W){var K=A[W];return e.call(U,W)?U[W]=x(U[W],K,P):U[W]=K,U},M)},c=function(_,A){return Object.keys(A).reduce(function(P,M){return P[M]=A[M],P},_)},f=function(x,_,A){var P=x.replace(/\+/g," ");if(A==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,d=function(_,A,P,M,U){if(_.length===0)return _;var W=_;if(typeof _=="symbol"?W=Symbol.prototype.toString.call(_):typeof _!="string"&&(W=String(_)),P==="iso-8859-1")return escape(W).replace(/%u[0-9a-f]{4}/gi,function(Ne){return"%26%23"+parseInt(Ne.slice(2),16)+"%3B"});for(var K="",X=0;X<W.length;X+=h){for(var fe=W.length>=h?W.slice(X,X+h):W,oe=[],Ie=0;Ie<fe.length;++Ie){var ye=fe.charCodeAt(Ie);if(ye===45||ye===46||ye===95||ye===126||ye>=48&&ye<=57||ye>=65&&ye<=90||ye>=97&&ye<=122||U===r.RFC1738&&(ye===40||ye===41)){oe[oe.length]=fe.charAt(Ie);continue}if(ye<128){oe[oe.length]=n[ye];continue}if(ye<2048){oe[oe.length]=n[192|ye>>6]+n[128|ye&63];continue}if(ye<55296||ye>=57344){oe[oe.length]=n[224|ye>>12]+n[128|ye>>6&63]+n[128|ye&63];continue}Ie+=1,ye=65536+((ye&1023)<<10|fe.charCodeAt(Ie)&1023),oe[oe.length]=n[240|ye>>18]+n[128|ye>>12&63]+n[128|ye>>6&63]+n[128|ye&63]}K+=oe.join("")}return K},y=function(_){for(var A=[{obj:{o:_},prop:"o"}],P=[],M=0;M<A.length;++M)for(var U=A[M],W=U.obj[U.prop],K=Object.keys(W),X=0;X<K.length;++X){var fe=K[X],oe=W[fe];typeof oe=="object"&&oe!==null&&P.indexOf(oe)===-1&&(A.push({obj:W,prop:fe}),P.push(oe))}return i(A),_},g=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},m=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},b=function(_,A){return[].concat(_,A)},I=function(_,A){if(t(_)){for(var P=[],M=0;M<_.length;M+=1)P.push(A(_[M]));return P}return A(_)};return od={arrayToObject:a,assign:c,combine:b,compact:y,decode:f,encode:d,isBuffer:m,isRegExp:g,maybeMap:I,merge:u},od}var ud,Rb;function hI(){if(Rb)return ud;Rb=1;var r=fI(),e=Nb(),t=ad(),n=Object.prototype.hasOwnProperty,i={brackets:function(x){return x+"[]"},comma:"comma",indices:function(x,_){return x+"["+_+"]"},repeat:function(x){return x}},a=Array.isArray,u=Array.prototype.push,c=function(I,x){u.apply(I,a(x)?x:[x])},f=Date.prototype.toISOString,h=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,format:h,formatter:t.formatters[h],indices:!1,serializeDate:function(x){return f.call(x)},skipNulls:!1,strictNullHandling:!1},y=function(x){return typeof x=="string"||typeof x=="number"||typeof x=="boolean"||typeof x=="symbol"||typeof x=="bigint"},g={},m=function I(x,_,A,P,M,U,W,K,X,fe,oe,Ie,ye,Ne,Ce,ge,ve,pe){for(var te=x,Ee=pe,Le=0,Se=!1;(Ee=Ee.get(g))!==void 0&&!Se;){var Ze=Ee.get(x);if(Le+=1,typeof Ze<"u"){if(Ze===Le)throw new RangeError("Cyclic object value");Se=!0}typeof Ee.get(g)>"u"&&(Le=0)}if(typeof fe=="function"?te=fe(_,te):te instanceof Date?te=ye(te):A==="comma"&&a(te)&&(te=e.maybeMap(te,function(ee){return ee instanceof Date?ye(ee):ee})),te===null){if(U)return X&&!ge?X(_,d.encoder,ve,"key",Ne):_;te=""}if(y(te)||e.isBuffer(te)){if(X){var vt=ge?_:X(_,d.encoder,ve,"key",Ne);return[Ce(vt)+"="+Ce(X(te,d.encoder,ve,"value",Ne))]}return[Ce(_)+"="+Ce(String(te))]}var Mt=[];if(typeof te>"u")return Mt;var Et;if(A==="comma"&&a(te))ge&&X&&(te=e.maybeMap(te,X)),Et=[{value:te.length>0?te.join(",")||null:void 0}];else if(a(fe))Et=fe;else{var Xe=Object.keys(te);Et=oe?Xe.sort(oe):Xe}var it=K?_.replace(/\./g,"%2E"):_,Ot=P&&a(te)&&te.length===1?it+"[]":it;if(M&&a(te)&&te.length===0)return Ot+"[]";for(var De=0;De<Et.length;++De){var He=Et[De],B=typeof He=="object"&&typeof He.value<"u"?He.value:te[He];if(!(W&&B===null)){var Q=Ie&&K?He.replace(/\./g,"%2E"):He,q=a(te)?typeof A=="function"?A(Ot,Q):Ot:Ot+(Ie?"."+Q:"["+Q+"]");pe.set(x,Le);var J=r();J.set(g,pe),c(Mt,I(B,q,A,P,M,U,W,K,A==="comma"&&ge&&a(te)?null:X,fe,oe,Ie,ye,Ne,Ce,ge,ve,J))}}return Mt},b=function(x){if(!x)return d;if(typeof x.allowEmptyArrays<"u"&&typeof x.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof x.encodeDotInKeys<"u"&&typeof x.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(x.encoder!==null&&typeof x.encoder<"u"&&typeof x.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=x.charset||d.charset;if(typeof x.charset<"u"&&x.charset!=="utf-8"&&x.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var A=t.default;if(typeof x.format<"u"){if(!n.call(t.formatters,x.format))throw new TypeError("Unknown format option provided.");A=x.format}var P=t.formatters[A],M=d.filter;(typeof x.filter=="function"||a(x.filter))&&(M=x.filter);var U;if(x.arrayFormat in i?U=x.arrayFormat:"indices"in x?U=x.indices?"indices":"repeat":U=d.arrayFormat,"commaRoundTrip"in x&&typeof x.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var W=typeof x.allowDots>"u"?x.encodeDotInKeys===!0?!0:d.allowDots:!!x.allowDots;return{addQueryPrefix:typeof x.addQueryPrefix=="boolean"?x.addQueryPrefix:d.addQueryPrefix,allowDots:W,allowEmptyArrays:typeof x.allowEmptyArrays=="boolean"?!!x.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:U,charset:_,charsetSentinel:typeof x.charsetSentinel=="boolean"?x.charsetSentinel:d.charsetSentinel,commaRoundTrip:x.commaRoundTrip,delimiter:typeof x.delimiter>"u"?d.delimiter:x.delimiter,encode:typeof x.encode=="boolean"?x.encode:d.encode,encodeDotInKeys:typeof x.encodeDotInKeys=="boolean"?x.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof x.encoder=="function"?x.encoder:d.encoder,encodeValuesOnly:typeof x.encodeValuesOnly=="boolean"?x.encodeValuesOnly:d.encodeValuesOnly,filter:M,format:A,formatter:P,serializeDate:typeof x.serializeDate=="function"?x.serializeDate:d.serializeDate,skipNulls:typeof x.skipNulls=="boolean"?x.skipNulls:d.skipNulls,sort:typeof x.sort=="function"?x.sort:null,strictNullHandling:typeof x.strictNullHandling=="boolean"?x.strictNullHandling:d.strictNullHandling}};return ud=function(I,x){var _=I,A=b(x),P,M;typeof A.filter=="function"?(M=A.filter,_=M("",_)):a(A.filter)&&(M=A.filter,P=M);var U=[];if(typeof _!="object"||_===null)return"";var W=i[A.arrayFormat],K=W==="comma"&&A.commaRoundTrip;P||(P=Object.keys(_)),A.sort&&P.sort(A.sort);for(var X=r(),fe=0;fe<P.length;++fe){var oe=P[fe];A.skipNulls&&_[oe]===null||c(U,m(_[oe],oe,W,K,A.allowEmptyArrays,A.strictNullHandling,A.skipNulls,A.encodeDotInKeys,A.encode?A.encoder:null,A.filter,A.sort,A.allowDots,A.serializeDate,A.format,A.formatter,A.encodeValuesOnly,A.charset,X))}var Ie=U.join(A.delimiter),ye=A.addQueryPrefix===!0?"?":"";return A.charsetSentinel&&(A.charset==="iso-8859-1"?ye+="utf8=%26%2310003%3B&":ye+="utf8=%E2%9C%93&"),Ie.length>0?ye+Ie:""},ud}var cd,Mb;function dI(){if(Mb)return cd;Mb=1;var r=Nb(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:r.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},i=function(g){return g.replace(/&#(\d+);/g,function(m,b){return String.fromCharCode(parseInt(b,10))})},a=function(g,m){return g&&typeof g=="string"&&m.comma&&g.indexOf(",")>-1?g.split(","):g},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",f=function(m,b){var I={__proto__:null},x=b.ignoreQueryPrefix?m.replace(/^\?/,""):m;x=x.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var _=b.parameterLimit===1/0?void 0:b.parameterLimit,A=x.split(b.delimiter,_),P=-1,M,U=b.charset;if(b.charsetSentinel)for(M=0;M<A.length;++M)A[M].indexOf("utf8=")===0&&(A[M]===c?U="utf-8":A[M]===u&&(U="iso-8859-1"),P=M,M=A.length);for(M=0;M<A.length;++M)if(M!==P){var W=A[M],K=W.indexOf("]="),X=K===-1?W.indexOf("="):K+1,fe,oe;X===-1?(fe=b.decoder(W,n.decoder,U,"key"),oe=b.strictNullHandling?null:""):(fe=b.decoder(W.slice(0,X),n.decoder,U,"key"),oe=r.maybeMap(a(W.slice(X+1),b),function(ye){return b.decoder(ye,n.decoder,U,"value")})),oe&&b.interpretNumericEntities&&U==="iso-8859-1"&&(oe=i(oe)),W.indexOf("[]=")>-1&&(oe=t(oe)?[oe]:oe);var Ie=e.call(I,fe);Ie&&b.duplicates==="combine"?I[fe]=r.combine(I[fe],oe):(!Ie||b.duplicates==="last")&&(I[fe]=oe)}return I},h=function(g,m,b,I){for(var x=I?m:a(m,b),_=g.length-1;_>=0;--_){var A,P=g[_];if(P==="[]"&&b.parseArrays)A=b.allowEmptyArrays&&(x===""||b.strictNullHandling&&x===null)?[]:[].concat(x);else{A=b.plainObjects?Object.create(null):{};var M=P.charAt(0)==="["&&P.charAt(P.length-1)==="]"?P.slice(1,-1):P,U=b.decodeDotInKeys?M.replace(/%2E/g,"."):M,W=parseInt(U,10);!b.parseArrays&&U===""?A={0:x}:!isNaN(W)&&P!==U&&String(W)===U&&W>=0&&b.parseArrays&&W<=b.arrayLimit?(A=[],A[W]=x):U!=="__proto__"&&(A[U]=x)}x=A}return x},d=function(m,b,I,x){if(m){var _=I.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,A=/(\[[^[\]]*])/,P=/(\[[^[\]]*])/g,M=I.depth>0&&A.exec(_),U=M?_.slice(0,M.index):_,W=[];if(U){if(!I.plainObjects&&e.call(Object.prototype,U)&&!I.allowPrototypes)return;W.push(U)}for(var K=0;I.depth>0&&(M=P.exec(_))!==null&&K<I.depth;){if(K+=1,!I.plainObjects&&e.call(Object.prototype,M[1].slice(1,-1))&&!I.allowPrototypes)return;W.push(M[1])}if(M){if(I.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+I.depth+" and strictDepth is true");W.push("["+_.slice(M.index)+"]")}return h(W,b,I,x)}},y=function(m){if(!m)return n;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.decodeDotInKeys<"u"&&typeof m.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(m.decoder!==null&&typeof m.decoder<"u"&&typeof m.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var b=typeof m.charset>"u"?n.charset:m.charset,I=typeof m.duplicates>"u"?n.duplicates:m.duplicates;if(I!=="combine"&&I!=="first"&&I!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var x=typeof m.allowDots>"u"?m.decodeDotInKeys===!0?!0:n.allowDots:!!m.allowDots;return{allowDots:x,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:n.allowEmptyArrays,allowPrototypes:typeof m.allowPrototypes=="boolean"?m.allowPrototypes:n.allowPrototypes,allowSparse:typeof m.allowSparse=="boolean"?m.allowSparse:n.allowSparse,arrayLimit:typeof m.arrayLimit=="number"?m.arrayLimit:n.arrayLimit,charset:b,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:n.charsetSentinel,comma:typeof m.comma=="boolean"?m.comma:n.comma,decodeDotInKeys:typeof m.decodeDotInKeys=="boolean"?m.decodeDotInKeys:n.decodeDotInKeys,decoder:typeof m.decoder=="function"?m.decoder:n.decoder,delimiter:typeof m.delimiter=="string"||r.isRegExp(m.delimiter)?m.delimiter:n.delimiter,depth:typeof m.depth=="number"||m.depth===!1?+m.depth:n.depth,duplicates:I,ignoreQueryPrefix:m.ignoreQueryPrefix===!0,interpretNumericEntities:typeof m.interpretNumericEntities=="boolean"?m.interpretNumericEntities:n.interpretNumericEntities,parameterLimit:typeof m.parameterLimit=="number"?m.parameterLimit:n.parameterLimit,parseArrays:m.parseArrays!==!1,plainObjects:typeof m.plainObjects=="boolean"?m.plainObjects:n.plainObjects,strictDepth:typeof m.strictDepth=="boolean"?!!m.strictDepth:n.strictDepth,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:n.strictNullHandling}};return cd=function(g,m){var b=y(m);if(g===""||g===null||typeof g>"u")return b.plainObjects?Object.create(null):{};for(var I=typeof g=="string"?f(g,b):g,x=b.plainObjects?Object.create(null):{},_=Object.keys(I),A=0;A<_.length;++A){var P=_[A],M=d(P,I[P],b,typeof g=="string");x=r.merge(x,M,b)}return b.allowSparse===!0?x:r.compact(x)},cd}var ld,Db;function pI(){if(Db)return ld;Db=1;var r=hI(),e=dI(),t=ad();return ld={formats:t,parse:e,stringify:r},ld}(function(r,e){(function(t,n){n(e,Fk,Lk,pI())})(pi,function(t,n,i,a){var u=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(xe){xe(V)})}return new(q||(q=Promise))(function(V,xe){function We(_e){try{se(J.next(_e))}catch(Ge){xe(Ge)}}function Be(_e){try{se(J.throw(_e))}catch(Ge){xe(Ge)}}function se(_e){_e.done?V(_e.value):ee(_e.value).then(We,Be)}se((J=J.apply(B,Q||[])).next())})},c=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,xe;return xe={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function We(se){return function(_e){return Be([se,_e])}}function Be(se){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=se[0]&2?ee.return:se[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,se[1])).done)return V;switch(ee=0,V&&(se=[se[0]&2,V.value]),se[0]){case 0:case 1:V=se;break;case 4:return q.label++,{value:se[1],done:!1};case 5:q.label++,ee=se[1],se=[0];continue;case 7:se=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(se[0]===6||se[0]===2)){q=0;continue}if(se[0]===3&&(!V||se[1]>V[0]&&se[1]<V[3])){q.label=se[1];break}if(se[0]===6&&q.label<V[1]){q.label=V[1],V=se;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(se);break}V[2]&&q.ops.pop(),q.trys.pop();continue}se=Q.call(B,q)}catch(_e){se=[6,_e],ee=0}finally{J=V=0}if(se[0]&5)throw se[1];return{value:se[0]?se[1]:void 0,done:!0}}};function f(B,Q){if(B.directives&&B.directives.length){var q={};return B.directives.forEach(function(J){q[J.name.value]=i.argumentsObjectFromField(J,Q)}),q}return null}var h=Object.prototype.hasOwnProperty;function d(B,Q){Q!==null&&typeof Q=="object"&&Object.keys(Q).forEach(function(q){var J=Q[q];h.call(B,q)?d(B[q],J):B[q]=J})}function y(B,Q,q,J,ee,V){V===void 0&&(V={});var xe=i.getMainDefinition(Q),We=i.getFragmentDefinitions(Q),Be=i.createFragmentMap(We),se=V.resultMapper,_e=V.fragmentMatcher||function(){return!0},Ge={fragmentMap:Be,contextValue:J,variableValues:ee,resultMapper:se,resolver:B,fragmentMatcher:_e};return g(xe.selectionSet,q,Ge)}function g(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,xe,We,Be=this;return c(this,function(se){switch(se.label){case 0:return J=q.fragmentMap,ee=q.contextValue,V=q.variableValues,xe={},We=function(_e){return u(Be,void 0,void 0,function(){var Ge,pt,mt,Yt,Tt;return c(this,function(Wt){switch(Wt.label){case 0:return i.shouldInclude(_e,V)?i.isField(_e)?[4,m(_e,Q,q)]:[3,2]:[2];case 1:return Ge=Wt.sent(),pt=i.resultKeyNameFromField(_e),Ge!==void 0&&(xe[pt]===void 0?xe[pt]=Ge:d(xe[pt],Ge)),[2];case 2:if(i.isInlineFragment(_e))mt=_e;else if(mt=J[_e.name.value],!mt)throw new Error("No fragment named "+_e.name.value);return Yt=mt.typeCondition.name.value,q.fragmentMatcher(Q,Yt,ee)?[4,g(mt.selectionSet,Q,q)]:[3,4];case 3:Tt=Wt.sent(),d(xe,Tt),Wt.label=4;case 4:return[2]}})})},[4,Promise.all(B.selections.map(We))];case 1:return se.sent(),q.resultMapper?[2,q.resultMapper(xe,Q)]:[2,xe]}})})}function m(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,xe,We,Be,se;return c(this,function(_e){switch(_e.label){case 0:return J=q.variableValues,ee=q.contextValue,V=q.resolver,xe=B.name.value,We=i.argumentsObjectFromField(B,J),Be={isLeaf:!B.selectionSet,resultKey:i.resultKeyNameFromField(B),directives:f(B,J),field:B},[4,V(xe,Q,We,ee,Be)];case 1:return se=_e.sent(),B.selectionSet?se==null?[2,se]:Array.isArray(se)?[2,b(B,se,q)]:[2,g(B.selectionSet,se,q)]:[2,se]}})})}function b(B,Q,q){return Promise.all(Q.map(function(J){return J===null?null:Array.isArray(J)?b(B,J,q):g(B.selectionSet,J,q)}))}var I=function(){var B=function(Q,q){return B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(J,ee){J.__proto__=ee}||function(J,ee){for(var V in ee)ee.hasOwnProperty(V)&&(J[V]=ee[V])},B(Q,q)};return function(Q,q){B(Q,q);function J(){this.constructor=Q}Q.prototype=q===null?Object.create(q):(J.prototype=q.prototype,new J)}}(),x=function(){return x=Object.assign||function(B){for(var Q,q=1,J=arguments.length;q<J;q++){Q=arguments[q];for(var ee in Q)Object.prototype.hasOwnProperty.call(Q,ee)&&(B[ee]=Q[ee])}return B},x.apply(this,arguments)},_=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(xe){xe(V)})}return new(q||(q=Promise))(function(V,xe){function We(_e){try{se(J.next(_e))}catch(Ge){xe(Ge)}}function Be(_e){try{se(J.throw(_e))}catch(Ge){xe(Ge)}}function se(_e){_e.done?V(_e.value):ee(_e.value).then(We,Be)}se((J=J.apply(B,Q||[])).next())})},A=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,xe;return xe={next:We(0),throw:We(1),return:We(2)},typeof Symbol=="function"&&(xe[Symbol.iterator]=function(){return this}),xe;function We(se){return function(_e){return Be([se,_e])}}function Be(se){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=se[0]&2?ee.return:se[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,se[1])).done)return V;switch(ee=0,V&&(se=[se[0]&2,V.value]),se[0]){case 0:case 1:V=se;break;case 4:return q.label++,{value:se[1],done:!1};case 5:q.label++,ee=se[1],se=[0];continue;case 7:se=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(se[0]===6||se[0]===2)){q=0;continue}if(se[0]===3&&(!V||se[1]>V[0]&&se[1]<V[3])){q.label=se[1];break}if(se[0]===6&&q.label<V[1]){q.label=V[1],V=se;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(se);break}V[2]&&q.ops.pop(),q.trys.pop();continue}se=Q.call(B,q)}catch(_e){se=[6,_e],ee=0}finally{J=V=0}if(se[0]&5)throw se[1];return{value:se[0]?se[1]:void 0,done:!0}}},P=function(){for(var B=0,Q=0,q=arguments.length;Q<q;Q++)B+=arguments[Q].length;for(var J=Array(B),ee=0,Q=0;Q<q;Q++)for(var V=arguments[Q],xe=0,We=V.length;xe<We;xe++,ee++)J[ee]=V[xe];return J},M=function(B){var Q=B.replace(/\s/g,""),q=Q.replace(/\[(.*)\]/,function(J,ee,V,xe){return((ee!=null&&ee.length)>0?ee:null)||Q});return q},U=function(B,Q,q,J){if(Array.isArray(B)){var ee=M(Q);return B.map(function(V){return U(V,ee,q,J)})}return B==null||typeof B=="number"||typeof B=="boolean"||typeof B=="string"?B:q(B,Q,q,J)},W=function(B){return B.directives&&B.directives.length?B.directives.find(function(Q){return Q.name.value==="rest"}):null};function K(B,Q,q,J,ee){return ee==null||Q==null||typeof Q=="number"||typeof Q=="boolean"||typeof Q=="string"||ee.selections.forEach(function(V){if(i.isInlineFragment(V))K(B,Q,q,J,V.selectionSet);else if(V.kind==="FragmentSpread"){var xe=J[V.name.value];K(B,Q,q,J,xe.selectionSet)}else if(i.isField(V)){var We=i.resultKeyNameFromField(V);We===B&&W(V)!=null?X(Q,q,J,V.selectionSet):K(B,Q,q,J,V.selectionSet)}else return function(Be){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()}),Q}function X(B,Q,q,J){if(!(B==null||typeof B=="number"||typeof B=="boolean"||typeof B=="string")){if(Array.isArray(B)){B.forEach(function(ee){return X(ee,Q,q,J)});return}J.selections.forEach(function(ee){if(i.isInlineFragment(ee))X(B,Q,q,ee.selectionSet);else if(ee.kind==="FragmentSpread"){var V=q[ee.name.value];X(B,Q,q,V.selectionSet)}else if(i.isField(ee)){var xe=B[ee.name.value];ee.name.value==="__typename"||(typeof xe>"u"?B[ee.name.value]=null:xe!=null&&typeof xe=="object"&&ee.selectionSet!=null&&X(xe,Q,q,ee.selectionSet))}else return function(We){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()})}}var fe=function(B,Q){var q=B[Q||Xe]||B[Xe];return typeof q=="string"?{uri:q}:x({responseTransformer:null},q)},oe=function(B,Q,q){return q===void 0||Q===void 0?B:B.replace(":"+Q,q)},Ie=function(){function B(){}return B.replacerForPath=function(Q){if(Q in B.cache)return B.cache[Q];var q=Q.indexOf("?"),J=Q.split(B.argReplacement),ee=[],V=!1;J.reduce(function(We,Be){if(Be===""||Be==="{}")return We+Be.length;var se=We+Be.length;if(Be[0]==="{"&&Be[Be.length-1]==="}"){var _e=Be.slice(1,Be.length-1).split(".");ee.push(function(Ge,pt){try{var mt=ye(Ge,_e);return!pt||typeof mt!="object"||mt==null?String(mt):a.stringify(mt)}catch{var Yt=[Q,_e.join(".")].join("|");return Yt in B.warnTable||(console.warn("Warning: RestLink caught an error while unpacking",Yt,"This tends to happen if you forgot to pass a parameter needed for creating an @rest(path, or if RestLink was configured to deeply unpack a path parameter that wasn't provided. This message will only log once per detected instance. Trouble-shooting hint: check @rest(path: and the variables provided to this query."),B.warnTable[Yt]=!0),""}})}else ee.push(Be),!V&&se>=q&&(V=!0,ee.push(!0));return se},0);var xe=function(We){var Be=!1,se=ee.reduce(function(_e,Ge){return typeof Ge=="string"?_e+Ge:typeof Ge=="boolean"?(Be=!0,_e):_e+Ge(We,Be)},"");return se};return B.cache[Q]=xe},B.cache={},B.warnTable={},B.argReplacement=/({[._a-zA-Z0-9]*})/,B}();function ye(B,Q){if(Q.length===0)return B;var q=P(Q),J=q.shift();return ye(B[J],q)}var Ne=["__typename"],Ce=typeof globalThis=="object"&&globalThis||pi,ge=function(B,Q,q){q===void 0&&(q=[]);var J=null;return Q.length!=2?J=function(ee,V){return Q(ee)}:J=Q,Array.isArray(B)?B.map(function(ee,V){return ge(ee,J,P(q,[String(V)]))}):B==null||typeof B!="object"||B.constructor!==Object||Ce.FileList&&B instanceof FileList||Ce.File&&B instanceof File?B:Object.keys(B).reduce(function(ee,V){var xe=B[V];if(Ne.indexOf(V)!==-1)return ee[V]=xe,ee;var We=P(q,[V]);return ee[J(V,We)]=ge(xe,J,We),ee},{})},ve=function(B){return B},pe=function(B){return B instanceof Headers?B:new Headers(B||{})},te=function(){for(var B=[],Q=0;Q<arguments.length;Q++)B[Q]=arguments[Q];return B.reduce(function(q,J){return J&&(J.forEach||(J=pe(J)),J.forEach(function(ee,V){q.append(V,ee)})),q},new Headers)},Ee=function(B,Q,q){var J=new Headers;return B.forEach(function(ee,V){Q.indexOf(V)===-1&&J.append(V,ee)}),te(J,q||new Headers)},Le=function(B){return function(Q,q){return Ee(Q,B,q)}},Se=["GET","POST","PUT","PATCH","DELETE"],Ze=function(B,Q){switch(Q){case"query":if(Se.indexOf(B.toUpperCase())!==-1)return;throw new Error('A "query" operation can only support "GET" requests but got "'+B+'".');case"mutation":if(Se.indexOf(B.toUpperCase())!==-1)return;throw new Error('"mutation" operations do not support that HTTP-verb');case"subscription":throw new Error('A "subscription" operation is not supported yet.');default:var q=Q;return q}},vt=function(B,Q,q){var J=new Error(q);throw J.response=B,J.statusCode=B.status,J.result=Q,J},Mt=function(B,Q){return B==null||typeof B!="object"?B:Array.isArray(B)?B.map(function(q){return Mt(q,Q)}):(B.__typename=Q,B)},Et=function(B,Q,q,J,ee){return _(void 0,void 0,void 0,function(){var V,xe,We,Be,se,_e,Ge,pt,mt,Yt,Tt,Wt,Gt,Er,zt,sr,dr,Ar,Ht,H,G,st,bt,lt,ze,Kt,Zt,Qt,kr,Hr,Fr,Ut,Or,$r,Lr,ar,Gr,Tr,gr,Ir,Sn,Un,R,ue,be,Pe,Ve,ut,Je,et;return A(this,function(tt){switch(tt.label){case 0:if(V=ee.directives,xe=ee.isLeaf,We=ee.resultKey,Be=J.exportVariablesByNode,se=Be.get(Q)||{},_e=function(gt){return gt instanceof Array?gt.forEach(_e):Be.set(gt,x({},se)),gt},Ge=(Q||{})[We],pt=(Q||{})[B],Q&&V&&V.export&&(se[V.export.as]=pt),mt=V&&V.type,!xe&&mt){if(V.rest)throw new Error("Invalid use of @type(name: ...) directive on a call that also has @rest(...)");return _e(pt),[2,Mt(pt,V.type.name)]}if(Yt=!V||!V.rest,Yt)return[2,_e(Ge||pt)];if(Tt=J.credentials,Wt=J.endpoints,Gt=J.headers,Er=J.customFetch,zt=J.operationType,sr=J.typePatcher,dr=J.mainDefinition,Ar=J.fragmentDefinitions,Ht=J.fieldNameNormalizer,H=J.fieldNameDenormalizer,G=J.serializers,st=J.responseTransformer,bt=i.createFragmentMap(Ar),lt=V.rest,ze=lt.path,Kt=lt.endpoint,Zt=lt.pathBuilder,Qt=fe(Wt,Kt),kr=ze==null&&Zt==null,kr)throw new Error('One of ("path" | "pathBuilder") must be set in the @rest() directive. This request had neither, please add one');if(Zt||(ze.includes(":")?(console.warn("Deprecated: '@rest(path:' contains a ':' colon, this format will be removed in future versions"),Zt=function(gt){var w=gt.args,k=gt.exportVariables,T=x(x({},w),k),C=Object.keys(T).reduce(function(D,$){return oe(D,$,T[$])},ze);if(C.includes(":"))throw new Error('Missing parameters to run query, specify it in the query params or use an export directive. (If you need to use ":" inside a variable string make sure to encode the variables properly using `encodeURIComponent`. Alternatively see documentation about using pathBuilder.)');return C}):Zt=Ie.replacerForPath(ze)),Hr={args:q,exportVariables:se,context:J,"@rest":V.rest,replacer:Zt},Fr=Zt(Hr),Ut=V.rest,Or=Ut.method,$r=Ut.type,Lr=Ut.bodyBuilder,ar=Ut.bodyKey,Gr=Ut.fieldNameDenormalizer,Tr=Ut.fieldNameNormalizer,gr=Ut.bodySerializer,Or||(Or="GET"),ar||(ar="input"),Ir=void 0,Sn=void 0,["GET","DELETE"].indexOf(Or)===-1){if(!Lr){if(Un=Hr.exportVariables[ar]||Hr.args&&Hr.args[ar],!Un)throw new Error("[GraphQL "+Or+" "+zt+" using a REST call without a body]. No `"+ar+"` was detected. Pass bodyKey, or bodyBuilder to the @rest() directive to resolve this.");Lr=function(gt){return Un}}if(Ir=ge(Lr(Hr),Gr||H||ve),R=void 0,typeof gr=="string"){if(!G.hasOwnProperty(gr))throw new Error('"bodySerializer" must correspond to configured serializer. '+("Please make sure to specify a serializer called "+gr+' in the "bodySerializers" property of the RestLink.'));R=G[gr](Ir,Gt)}else R=gr?gr(Ir,Gt):G[it](Ir,Gt);Ir=R.body,Sn=new Headers(R.headers)}return Ze(Or,zt||"query"),ue=x({method:Or,headers:Sn||Gt,body:Ir},Tt?{credentials:Tt}:{}),be=""+Qt.uri+Fr,[4,(Er||fetch)(be,ue)];case 1:return Pe=tt.sent(),J.responses.push(Pe),Pe.ok?(Pe.status===204||Pe.headers.get("Content-Length")==="0"?Ve={}:Ve=Pe,[3,9]):[3,2];case 2:return Pe.status!==404?[3,3]:(Ve=null,[3,9]);case 3:ut=void 0,tt.label=4;case 4:return tt.trys.push([4,6,,8]),[4,Pe.clone().json()];case 5:return ut=tt.sent(),[3,8];case 6:return tt.sent(),[4,Pe.clone().text()];case 7:return ut=tt.sent(),[3,8];case 8:vt(Pe,ut,"Response not successful: Received status code "+Pe.status),tt.label=9;case 9:if(Je=Qt.responseTransformer||st,!Je)return[3,14];tt.label=10;case 10:return tt.trys.push([10,12,,13]),[4,Je(Ve,$r)];case 11:return Ve=tt.sent(),[3,13];case 12:throw et=tt.sent(),console.warn("An error occurred in a responseTransformer:"),et;case 13:return[3,16];case 14:return Ve&&Ve.json?[4,Ve.json()]:[3,16];case 15:Ve=tt.sent(),tt.label=16;case 16:return Ve=ge(Ve,Tr||Ht||ve),Ve=K(We,Ve,dr,bt,dr.selectionSet),Ve=U(Ve,$r,sr,{resolverParams:{fieldName:B,root:Q,args:q,context:J,info:ee}}),[2,_e(Ve)]}})})},Xe="",it="",Ot=function(B,Q){return Q.has("content-type")||Q.append("Content-Type","application/json"),{body:JSON.stringify(B),headers:Q}},De={test:function(B){return B.name.value==="rest"},remove:!0},He=function(B){I(Q,B);function Q(q){var J,ee=q.uri,V=q.endpoints,xe=q.headers,We=q.fieldNameNormalizer,Be=q.fieldNameDenormalizer,se=q.typePatcher,_e=q.customFetch,Ge=q.credentials,pt=q.bodySerializers,mt=q.defaultSerializer,Yt=q.responseTransformer,Tt=B.call(this)||this,Wt={};if(Wt[Xe]=ee||"",Tt.endpoints=Object.assign({},V||Wt),ee==null&&V==null)throw new Error("A RestLink must be initialized with either 1 uri, or a map of keyed-endpoints");if(ee!=null){var Gt=(V||{})[Xe];if(Gt!=null&&Gt!=ee)throw new Error("RestLink was configured with a default uri that doesn't match what's passed in to the endpoints map.");Tt.endpoints[Xe]=ee}if(Tt.endpoints[Xe]==null&&console.warn("RestLink configured without a default URI. All @rest(…) directives must provide an endpoint key!"),se==null)Tt.typePatcher=function(zt,sr,dr){return x({__typename:sr},zt)};else if(!Array.isArray(se)&&typeof se=="object"&&Object.keys(se).map(function(zt){return se[zt]}).reduce(function(zt,sr){return zt&&typeof sr=="function"},!0)){var Er=se;Tt.typePatcher=function(zt,sr,dr,Ar){var Ht=zt.__typename||sr;if(Array.isArray(zt))return zt.map(function(G){return dr(G,Ht,dr,Ar)});var H=Er[Ht]||function(G){return G};return x({__typename:Ht},H(zt,Ht,dr,Ar))}}else throw new Error("RestLink was configured with a typePatcher of invalid type!");return pt&&pt.hasOwnProperty(it)&&console.warn("RestLink was configured to override the default serializer! This may result in unexpected behavior"),Tt.responseTransformer=Yt||null,Tt.fieldNameNormalizer=We||null,Tt.fieldNameDenormalizer=Be||null,Tt.headers=pe(xe),Tt.credentials=Ge||null,Tt.customFetch=_e,Tt.serializers=x((J={},J[it]=mt||Ot,J),pt||{}),Tt.processedDocuments=new Map,Tt}return Q.prototype.removeRestSetsFromDocument=function(q){var J=this.processedDocuments.get(q);if(J)return J;i.checkDocument(q);var ee=i.removeDirectivesFromDocument([De],q);return this.processedDocuments.set(q,ee),ee},Q.prototype.request=function(q,J){var ee=q.query,V=q.variables,xe=q.getContext,We=q.setContext,Be=xe(),se=i.hasDirectives(["rest"],ee);if(!se)return J(q);var _e=this.removeRestSetsFromDocument(ee),Ge=Be.headersMergePolicy;Ge==null&&Array.isArray(Be.headersToOverride)?Ge=Le(Be.headersToOverride):Ge==null&&(Ge=te);var pt=Ge(this.headers,Be.headers);pt.has("Accept")||pt.append("Accept","application/json");var mt=Be.credentials||this.credentials,Yt=i.addTypenameToDocument(ee),Tt=i.getMainDefinition(ee),Wt=i.getFragmentDefinitions(ee),Gt=(Tt||{}).operation||"query",Er={headers:pt,endpoints:this.endpoints,exportVariablesByNode:new Map,credentials:mt,customFetch:this.customFetch,operationType:Gt,fieldNameNormalizer:this.fieldNameNormalizer,fieldNameDenormalizer:this.fieldNameDenormalizer,mainDefinition:Tt,fragmentDefinitions:Wt,typePatcher:this.typePatcher,serializers:this.serializers,responses:[],responseTransformer:this.responseTransformer},zt={},sr;return _e&&J?(q.query=_e,sr=J(q)):sr=n.Observable.of({data:{}}),sr.flatMap(function(dr){var Ar=dr.data,Ht=dr.errors;return new n.Observable(function(H){y(Et,Yt,Ar,Er,V,zt).then(function(G){We({restResponses:(Be.restResponses||[]).concat(Er.responses)}),H.next({data:G,errors:Ht}),H.complete()}).catch(function(G){G.name!=="AbortError"&&(G.result&&G.result.errors&&H.next(G.result),H.error(G))})})})},Q}(n.ApolloLink);t.RestLink=He,t.PathBuilder=Ie,Object.defineProperty(t,"__esModule",{value:!0})})})(yh,yh.exports);var mI=yh.exports;const rc=he.createContext(),yI=()=>{const{isAuthenticated:r,login:e}=ti(),{children:t,isEmbedded:n,setIsEmbedded:i,authError:a}=he.useContext(rc),u=pn.useNavigate(),c=pn.useLocation(),[f,h]=he.useState(!1),[d,y]=he.useState(),[g,m]=he.useState(),[b,I]=he.useState({}),x=he.useRef({}),_=he.useRef({}),[A,P]=he.useState(!1),[M,U]=he.useState({});he.useEffect(()=>{var ve;if(!(!c||c.pathname!=="/mm-embedded-login")){if(r||a)if(((ve=new URL(origin))==null?void 0:ve.protocol)==="http:"){window.close();return}else{const te=new URLSearchParams(c.search),Ee=te.get("id"),Le=te.get("origin");a?window.parent.postMessage({type:"authorize-failed",instanceId:Ee,error:a,authUrl:window.location.href},Le):window.parent.postMessage({type:"authorized",instanceId:Ee,authUrl:window.location.href},Le);return}r===!1&&e()}},[c]),he.useEffect(()=>{var Ee,Le;if(r===null||!c||c.pathname!=="/mm-embedded-interop")return;const ve=new URLSearchParams(c.search),pe=ve.get("id"),te=ve.get("origin");if(te){const Se=(Ee=new URL(te))==null?void 0:Ee.hostname;if(/^(?:[\w-]+\.)*(?:machinemetrics\.com|machinemetrics-us-gov\.com|m12s\.com)$/.test(Se))y(te);else{alert("Invalid Embeddable Zone Host");return}}if(r===!1){if(te){const Se={instanceId:pe,authUrl:`${window.location.protocol}//${window.location.host}/mm-embedded-login?id=${pe}&origin=${te}`,origin:te};if(((Le=new URL(te))==null?void 0:Le.protocol)==="http:"){window.parent.postMessage({type:"login",...Se},te);return}e({mm_instanceId:Se.instanceId,mm_authUrl:encodeURIComponent(Se.authUrl),mm_origin:Se.origin});return}e();return}pe&&m(pe),pe&&te&&i(!0)},[c,r]),pn.useBlocker(({nextLocation:ve})=>{var pe;return n?(pe=ve.state)!=null&&pe.fromParent?(h(!0),!1):(W(`${ve.pathname}${ve.search}`),!0):!1}),he.useEffect(()=>{if(!n||!d)return;const ve=pe=>{pe.metaKey&&pe.key==="k"&&window.parent.postMessage({type:"open-search",instanceId:g},d)};return window.addEventListener("keydown",ve),()=>{window.removeEventListener("keydown",ve)}},[n,d]),he.useEffect(()=>{if(!n||!d)return;const ve=({origin:pe,data:te})=>{var Ee,Le,Se,Ze,vt,Mt,Et,Xe;if(pe===d)switch(te.type){case"navigate":u(te.path,{replace:!0,state:{fromParent:!0}});break;case"set-context":I(te.context||{});break;case"set-configuring":P(te.isConfiguring);break;case"set-params":U(te.params);break;case"load-options":(Le=(Ee=x.current)[`option-${te.name}`])==null||Le.call(Ee,{filter:te.filter});break;case"validate":(Ze=(Se=x.current)[`validate-${te.name}`])==null||Ze.call(Se,{value:te.value});break;case"request":(Mt=(vt=_.current)[te.requestType])==null||Mt.call(vt,te);break;case"response":(Xe=(Et=x.current)[te.callbackId])==null||Xe.call(Et,te.response);break}};return window.addEventListener("message",ve),!f&&r&&window.parent.postMessage({type:"ready",instanceId:g},d),()=>{window.removeEventListener("message",ve)}},[u,f,n,r,d]);const W=(ve,pe)=>{!f&&!r||window.parent.postMessage({type:"set-path",instanceId:g,path:ve,...pe},d)},K=ve=>{f&&window.parent.postMessage({type:"set-summary",instanceId:g,summary:ve},d)},X=ve=>{f&&window.parent.postMessage({type:"toast",instanceId:g,message:ve},d)},fe=ve=>{f&&window.parent.postMessage({type:"popup",instanceId:g,message:ve},d)},oe=()=>{f&&window.parent.postMessage({type:"loaded",instanceId:g},d)},Ie=async({header:ve,body:pe,choices:te})=>f?new Promise(Ee=>{const Le=A0(),Se=async Ze=>{delete x.current[Le],Ee(Ze)};x.current[Le]=Se,window.parent.postMessage({type:"confirm",instanceId:g,header:ve,body:pe,choices:te,callbackId:Le},d)}):Promise.reject(new Error("Not ready")),ye=({requestType:ve,func:pe})=>{const te=async({callbackId:Ee,data:Le})=>{try{const Se=await pe(Le);window.parent.postMessage({callbackId:Ee,type:"response",instanceId:g,response:Se},d)}catch(Se){window.parent.postMessage({callbackId:Ee,type:"response",instanceId:g,error:Se.message},d)}};return _.current[ve]=te,()=>{delete _.current[ve]}},Ne=({callbackId:ve,func:pe,responseType:te="response",responseKey:Ee="response",props:Le={},callOnRegister:Se=!1})=>{const Ze=async Mt=>{const Et=await pe(Mt);window.parent.postMessage({type:te,instanceId:g,...Le,[Ee]:Et,callbackId:ve},d)},vt=x.current[ve];x.current[ve]=Ze,vt&&Se&&Ze(Le)},Ce=(ve,pe)=>{if(f){if(pe.validate&&typeof pe.validate=="function"&&Ne({callbackId:`validate-${ve}`,func:pe.validate,responseType:"set-validation",responseKey:"validation",props:{name:ve}}),pe.options){const te=typeof pe.options=="function"?pe.options:()=>pe.options;Ne({callbackId:`option-${ve}`,func:te,responseType:"set-options",responseKey:"options",props:{name:ve},callOnRegister:!0})}window.parent.postMessage({type:"add-setting",instanceId:g,setting:{name:ve,...pe,options:void 0,validate:void 0}},d)}},ge=he.useMemo(()=>({commands:{navigateParent:W,setSummary:K,toast:X,popup:fe,confirm:Ie,setLoaded:oe},context:{...b,get colorMode(){throw new Error("colorMode has been moved to useMMAppParams")},get isFullScreen(){throw new Error("isFullScreen has been moved to useMMAppParams")}},params:{isEmbedded:n,isConfiguring:A,colorMode:b.colorMode,isFullScreen:b.isFullScreen,...M},addSetting:Ce,registerHandler:ye}),[n,A,W,K,X,fe,Ie,oe,b,M,Ce,ye]);return nr.jsx(es.Provider,{value:ge,children:c.pathname!=="/mm-embedded-interop"&&c.pathname!=="/mm-embedded-login"&&c.pathname!=="/mm-embedded-print"?t:nr.jsx(nr.Fragment,{})})},gI=()=>{const{urls:r,jwtRef:e,accessToken:t}=ti(),{graphQLRoleOverride:n,children:i}=he.useContext(rc),[a,u]=he.useState(),[c,f]=he.useState(),h=()=>{const g=new URL(r.graphQLUrl);return`//${g.host}${g.pathname}`},d=()=>n?{"X-Hasura-Role":n}:{};he.useEffect(()=>{const g=new kk(Rk({url:`wss:${h()}`,lazy:!0,reconnect:!0,connectionParams:async()=>({headers:{Authorization:`Bearer ${e.current}`,...d()}})})),m=D0(({operation:P,networkError:M,forward:U})=>(Bi(P.query).operation==="subscription"&&M&&g.client.terminate(),U(P))),I=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${e.current}`,...d()}})).concat(uf({uri:`https:${h()}`,fetch:window.fetch})),x=m.split(({query:P})=>{const M=Bi(P);return M.kind==="OperationDefinition"&&M.operation==="subscription"},g,I),A=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${t}`}})).concat(new mI.RestLink({uri:r.apiUrl}));f(Kr.from([A,x]))},[]),he.useEffect(()=>{c&&u(new Cf({link:c,cache:new Of}))},[c]);const y=he.useMemo(()=>({link:c}),[c]);return nr.jsx(c0.Provider,{value:y,children:a?nr.jsx(T1,{client:a,children:nr.jsx(zA,{children:nr.jsx(yI,{children:i})})}):nr.jsx(nr.Fragment,{})})},vI=Jp.div`
|
|
132
132
|
text-align: center;
|
|
133
133
|
padding-top: 200px;
|
|
134
134
|
`,Fb=({loadError:r})=>{const e=Ek();return r&&(!e||e.indexOf("mm-embedded-login")===-1)?nr.jsx(vI,{children:r}):(k0(),nr.jsx(pn.Navigate,{replace:!0,to:e||"/"}))};Jp.div`
|
|
@@ -146,7 +146,7 @@ ${t}: ${n[i]}`;return`${e}\r
|
|
|
146
146
|
${this.ctx.stack}`),this.cancel(t)):(this.callback(null,n),this.opts.strategy===ri.Count&&(this.max--,this.max===0&&this.cancel()),this.opts.strategy===ri.JitterTimer&&(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.cancel()},this.opts.jitter||300)),this.opts.strategy===ri.SentinelMsg&&n&&n.data.length===0&&this.cancel())}}class rw extends tw{constructor(t,n,i={timeout:1e3},a=!0){super(t,n,a);E(this,"deferred");E(this,"timer");this.deferred=ir(),this.timer=ma(i.timeout,a)}resolver(t,n){this.timer&&this.timer.cancel(),t?(this.ctx&&(t.stack+=`
|
|
147
147
|
|
|
148
148
|
${this.ctx.stack}`),this.deferred.reject(t)):this.deferred.resolve(n),this.cancel()}cancel(t){this.timer&&this.timer.cancel(),this.mux.cancel(this),this.deferred.reject(t||Re.errorForCode(we.Cancelled))}}const GI="$JS.API";function QI(r){return r=r||{},r.domain&&(r.apiPrefix=`$JS.${r.domain}.API`,delete r.domain),ac({apiPrefix:GI,timeout:5e3},r)}class ko{constructor(e,t){E(this,"nc");E(this,"opts");E(this,"prefix");E(this,"timeout");E(this,"jc");this.nc=e,this.opts=QI(t),this._parseOpts(),this.prefix=this.opts.apiPrefix,this.timeout=this.opts.timeout,this.jc=Ln()}getOptions(){return Object.assign({},this.opts)}_parseOpts(){let e=this.opts.apiPrefix;if(!e||e.length===0)throw new Error("invalid empty prefix");e[e.length-1]==="."&&(e=e.substr(0,e.length-1)),this.opts.apiPrefix=e}async _request(e,t=null,n){n=n||{},n.timeout=this.timeout;let i=bn;t&&(i=this.jc.encode(t));let{retries:a}=n;a=a||1,a=a===-1?Number.MAX_SAFE_INTEGER:a;const u=hd();for(let c=0;c<a;c++)try{const f=await this.nc.request(e,i,n);return this.parseJsResponse(f)}catch(f){const h=f;if((h.code==="503"||h.code===we.Timeout)&&c+1<a)await ya(u.backoff(c));else throw f}}async findStream(e){const t={subject:e},i=await this._request(`${this.prefix}.STREAM.NAMES`,t);if(!i.streams||i.streams.length!==1)throw new Error("no stream matches subject");return i.streams[0]}getConnection(){return this.nc}parseJsResponse(e){const t=this.jc.decode(e.data),n=t;if(n.error){const i=Gb(n.error.code,n.error.description);if(i!==null)throw i.api_error=n.error,i}return t}}class Io{constructor(e,t,n,i){E(this,"err");E(this,"offset");E(this,"pageInfo");E(this,"subject");E(this,"jsm");E(this,"filter");E(this,"payload");if(!e)throw new Error("subject is required");this.subject=e,this.jsm=n,this.offset=0,this.pageInfo={},this.filter=t,this.payload=i||{}}async next(){if(this.err)return[];if(this.pageInfo&&this.offset>=this.pageInfo.total)return[];const e={offset:this.offset};this.payload&&Object.assign(e,this.payload);try{const t=await this.jsm._request(this.subject,e,{timeout:this.jsm.timeout});this.pageInfo=t;const n=this.countResponse(t);return n===0?[]:(this.offset+=n,this.filter(t))}catch(t){throw this.err=t,t}}countResponse(e){var t,n,i;switch(e==null?void 0:e.type){case"io.nats.jetstream.api.v1.stream_names_response":case"io.nats.jetstream.api.v1.stream_list_response":return((t=e.streams)==null?void 0:t.length)||0;case"io.nats.jetstream.api.v1.consumer_list_response":return((n=e.consumers)==null?void 0:n.length)||0;default:return console.error(`jslister.ts: unknown API response for paged output: ${e==null?void 0:e.type}`),((i=e.streams)==null?void 0:i.length)||0}return 0}async*[Symbol.asyncIterator](){let e=await this.next();for(;e.length>0;){for(const t of e)yield t;e=await this.next()}}}function Ps(r=""){const e=r.match(/(\d+).(\d+).(\d+)/);if(e)return{major:parseInt(e[1]),minor:parseInt(e[2]),micro:parseInt(e[3])};throw new Error(`'${r}' is not a semver value`)}function xd(r,e){return r.major<e.major?-1:r.major>e.major?1:r.minor<e.minor?-1:r.minor>e.minor?1:r.micro<e.micro?-1:r.micro>e.micro?1:0}var Ct;(function(r){r.JS_KV="js_kv",r.JS_OBJECTSTORE="js_objectstore",r.JS_PULL_MAX_BYTES="js_pull_max_bytes",r.JS_NEW_CONSUMER_CREATE_API="js_new_consumer_create",r.JS_ALLOW_DIRECT="js_allow_direct",r.JS_MULTIPLE_CONSUMER_FILTER="js_multiple_consumer_filter",r.JS_SIMPLIFICATION="js_simplification",r.JS_STREAM_CONSUMER_METADATA="js_stream_consumer_metadata",r.JS_CONSUMER_FILTER_SUBJECTS="js_consumer_filter_subjects",r.JS_STREAM_FIRST_SEQ="js_stream_first_seq",r.JS_STREAM_SUBJECT_TRANSFORM="js_stream_subject_transform",r.JS_STREAM_SOURCE_SUBJECT_TRANSFORM="js_stream_source_subject_transform",r.JS_STREAM_COMPRESSION="js_stream_compression",r.JS_DEFAULT_CONSUMER_LIMITS="js_default_consumer_limits",r.JS_BATCH_DIRECT_GET="js_batch_direct_get"})(Ct||(Ct={}));class JI{constructor(e){E(this,"server");E(this,"features");E(this,"disabled");this.features=new Map,this.disabled=[],this.update(e)}resetDisabled(){this.disabled.length=0,this.update(this.server)}disable(e){this.disabled.push(e),this.update(this.server)}isDisabled(e){return this.disabled.indexOf(e)!==-1}update(e){typeof e=="string"&&(e=Ps(e)),this.server=e,this.set(Ct.JS_KV,"2.6.2"),this.set(Ct.JS_OBJECTSTORE,"2.6.3"),this.set(Ct.JS_PULL_MAX_BYTES,"2.8.3"),this.set(Ct.JS_NEW_CONSUMER_CREATE_API,"2.9.0"),this.set(Ct.JS_ALLOW_DIRECT,"2.9.0"),this.set(Ct.JS_MULTIPLE_CONSUMER_FILTER,"2.10.0"),this.set(Ct.JS_SIMPLIFICATION,"2.9.4"),this.set(Ct.JS_STREAM_CONSUMER_METADATA,"2.10.0"),this.set(Ct.JS_CONSUMER_FILTER_SUBJECTS,"2.10.0"),this.set(Ct.JS_STREAM_FIRST_SEQ,"2.10.0"),this.set(Ct.JS_STREAM_SUBJECT_TRANSFORM,"2.10.0"),this.set(Ct.JS_STREAM_SOURCE_SUBJECT_TRANSFORM,"2.10.0"),this.set(Ct.JS_STREAM_COMPRESSION,"2.10.0"),this.set(Ct.JS_DEFAULT_CONSUMER_LIMITS,"2.10.0"),this.set(Ct.JS_BATCH_DIRECT_GET,"2.11.0"),this.disabled.forEach(t=>{this.features.delete(t)})}set(e,t){this.features.set(e,{min:t,ok:xd(this.server,Ps(t))>=0})}get(e){return this.features.get(e)||{min:"unknown",ok:!1}}supports(e){var t;return((t=this.get(e))==null?void 0:t.ok)||!1}require(e){return typeof e=="string"&&(e=Ps(e)),xd(this.server,e)>=0}}class Sd extends ko{constructor(e,t){super(e,t)}async add(e,t,n=cc.Create){if(Xr(e),t.deliver_group&&t.flow_control)throw new Error("jetstream flow control is not supported with queue groups");if(t.deliver_group&&t.idle_heartbeat)throw new Error("jetstream idle heartbeat is not supported with queue groups");const i={};i.config=t,i.stream_name=e,i.action=n,i.config.durable_name&&ga(i.config.durable_name);const a=this.nc;let{min:u,ok:c}=a.features.get(Ct.JS_NEW_CONSUMER_CREATE_API);const f=t.name===""?void 0:t.name;if(f&&!c)throw new Error(`consumer 'name' requires server ${u}`);if(f)try{uc("name",f)}catch(g){const m=g.message,b=m.indexOf("cannot contain");throw b!==-1?new Error(`consumer 'name' ${m.substring(b)}`):g}let h,d="";if(Array.isArray(t.filter_subjects)){const{min:g,ok:m}=a.features.get(Ct.JS_MULTIPLE_CONSUMER_FILTER);if(!m)throw new Error(`consumer 'filter_subjects' requires server ${g}`);c=!1}if(t.metadata){const{min:g,ok:m}=a.features.get(Ct.JS_STREAM_CONSUMER_METADATA);if(!m)throw new Error(`consumer 'metadata' requires server ${g}`)}if(c&&(d=t.name??t.durable_name??""),d!==""){let g=t.filter_subject??void 0;g===">"&&(g=void 0),h=g!==void 0?`${this.prefix}.CONSUMER.CREATE.${e}.${d}.${g}`:`${this.prefix}.CONSUMER.CREATE.${e}.${d}`}else h=t.durable_name?`${this.prefix}.CONSUMER.DURABLE.CREATE.${e}.${t.durable_name}`:`${this.prefix}.CONSUMER.CREATE.${e}`;return await this._request(h,i)}async update(e,t,n){const i=await this.info(e,t),a=n;return this.add(e,Object.assign(i.config,a),cc.Update)}async info(e,t){return Xr(e),ga(t),await this._request(`${this.prefix}.CONSUMER.INFO.${e}.${t}`)}async delete(e,t){return Xr(e),ga(t),(await this._request(`${this.prefix}.CONSUMER.DELETE.${e}.${t}`)).success}list(e){Xr(e);const t=i=>i.consumers,n=`${this.prefix}.CONSUMER.LIST.${e}`;return new Io(n,t,this)}pause(e,t,n){const i=`${this.prefix}.CONSUMER.PAUSE.${e}.${t}`,a={pause_until:n.toISOString()};return this._request(i,a)}resume(e,t){return this.pause(e,t,new Date(0))}}function xa(r,e,t=!1){if(t===!0&&!r)throw Re.errorForCode(we.ApiError,new Error(`${e} is not a function`));if(r&&typeof r!="function")throw Re.errorForCode(we.ApiError,new Error(`${e} is not a function`))}class YI extends Mr{constructor(t,n,i){super();E(this,"sub");E(this,"adapter");E(this,"subIterDone");xa(i.adapter,"adapter",!0),this.adapter=i.adapter,i.callback&&xa(i.callback,"callback"),this.noIterator=typeof i.callback=="function",i.ingestionFilterFn&&(xa(i.ingestionFilterFn,"ingestionFilterFn"),this.ingestionFilterFn=i.ingestionFilterFn),i.protocolFilterFn&&(xa(i.protocolFilterFn,"protocolFilterFn"),this.protocolFilterFn=i.protocolFilterFn),i.dispatchedFn&&(xa(i.dispatchedFn,"dispatchedFn"),this.dispatchedFn=i.dispatchedFn),i.cleanupFn&&xa(i.cleanupFn,"cleanupFn");let a=(d,y)=>{this.callback(d,y)};if(i.callback){const d=i.callback;a=(y,g)=>{const[m,b]=this.adapter(y,g);if(m){d(m,null);return}const{ingest:I}=this.ingestionFilterFn?this.ingestionFilterFn(b,this):{ingest:!0};I&&(!this.protocolFilterFn||this.protocolFilterFn(b))&&(d(m,b),this.dispatchedFn&&b&&this.dispatchedFn(b))}}const{max:u,queue:c,timeout:f}=i,h={queue:c,timeout:f,callback:a};u&&u>0&&(h.max=u),this.sub=t.subscribe(n,h),i.cleanupFn&&(this.sub.cleanupFn=i.cleanupFn),this.noIterator||this.iterClosed.then(()=>{this.unsubscribe()}),this.subIterDone=ir(),Promise.all([this.sub.closed,this.iterClosed]).then(()=>{this.subIterDone.resolve()}).catch(()=>{this.subIterDone.resolve()}),(async d=>{await d.closed,this.stop()})(this.sub).then().catch()}unsubscribe(t){this.sub.unsubscribe(t)}drain(){return this.sub.drain()}isDraining(){return this.sub.isDraining()}isClosed(){return this.sub.isClosed()}callback(t,n){this.sub.cancelTimeout();const[i,a]=this.adapter(t,n);i&&this.stop(i),a&&this.push(a)}getSubject(){return this.sub.getSubject()}getReceived(){return this.sub.getReceived()}getProcessed(){return this.sub.getProcessed()}getPending(){return this.sub.getPending()}getID(){return this.sub.getID()}getMax(){return this.sub.getMax()}get closed(){return this.sub.closed}}let xn;function KI(r){xn=r}function nw(){return xn!==void 0&&xn.defaultPort!==void 0?xn.defaultPort:4222}function Ed(){return xn!==void 0&&xn.urlParseFn?xn.urlParseFn:void 0}function ZI(){if(!xn||typeof xn.factory!="function")throw new Error("transport fn is not set");return xn.factory()}function Od(){return xn!==void 0&&xn.dnsResolveFn?xn.dnsResolveFn:void 0}const lc=`\r
|
|
149
|
-
`,fc=_a.fromAscii(lc),XI=new Uint8Array(fc)[0],eC=new Uint8Array(fc)[1];function tC(r){for(let e=0;e<r.length;e++){const t=e+1;if(r.byteLength>t&&r[e]===XI&&r[t]===eC)return t+1}return 0}function rC(r){const e=tC(r);if(e>0){const n=new Uint8Array(r).slice(0,e);return cn.decode(n)}return""}const nC=4,iw=48,iC=65,sC=97;function aC(r,e,t,n){const i=new Uint8Array(16);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((u,c)=>{i[c]=u}),i[12]=r,i[13]=e,i[14]=t,i[15]=n,i}function Td(r){return oC(r)!==void 0}function oC(r){for(let e=0;e<r.length;e++)switch(r[e]){case".":return sw(r);case":":return uC(r)}}function sw(r){const e=new Uint8Array(4);for(let t=0;t<4;t++){if(r.length===0)return;if(t>0){if(r[0]!==".")return;r=r.substring(1)}const{n,c:i,ok:a}=cC(r);if(!a||n>255)return;r=r.substring(i),e[t]=n}return aC(e[0],e[1],e[2],e[3])}function uC(r){const e=new Uint8Array(16);let t=-1;if(r.length>=2&&r[0]===":"&&r[1]===":"&&(t=0,r=r.substring(2),r.length===0))return e;let n=0;for(;n<16;){const{n:i,c:a,ok:u}=lC(r);if(!u||i>65535)return;if(a<r.length&&r[a]==="."){if(t<0&&n!=12||n+4>16)return;const c=sw(r);if(c===void 0)return;e[n]=c[12],e[n+1]=c[13],e[n+2]=c[14],e[n+3]=c[15],r="",n+=nC;break}if(e[n]=i>>8,e[n+1]=i,n+=2,r=r.substring(a),r.length===0)break;if(r[0]!==":"||r.length==1)return;if(r=r.substring(1),r[0]===":"){if(t>=0)return;if(t=n,r=r.substring(1),r.length===0)break}}if(r.length===0){if(n<16){if(t<0)return;const i=16-n;for(let a=n-1;a>=t;a--)e[a+i]=e[a];for(let a=t+i-1;a>=t;a--)e[a]=0}else if(t>=0)return;return e}}function cC(r){let e=0,t=0;for(e=0;e<r.length&&48<=r.charCodeAt(e)&&r.charCodeAt(e)<=57;e++)if(t=t*10+(r.charCodeAt(e)-iw),t>=16777215)return{n:16777215,c:e,ok:!1};return e===0?{n:0,c:0,ok:!1}:{n:t,c:e,ok:!0}}function lC(r){let e=0,t=0;for(t=0;t<r.length;t++){if(48<=r.charCodeAt(t)&&r.charCodeAt(t)<=57)e*=16,e+=r.charCodeAt(t)-iw;else if(97<=r.charCodeAt(t)&&r.charCodeAt(t)<=102)e*=16,e+=r.charCodeAt(t)-sC+10;else if(65<=r.charCodeAt(t)&&r.charCodeAt(t)<=70)e*=16,e+=r.charCodeAt(t)-iC+10;else break;if(e>=16777215)return{n:0,c:t,ok:!1}}return t===0?{n:0,c:t,ok:!1}:{n:e,c:t,ok:!0}}function fC(r){return r.indexOf("[")!==-1||r.indexOf("::")!==-1?!1:r.indexOf(".")!==-1||r.split(":").length<=2}function Ad(r){return!fC(r)}function hC(r){const e="::FFFF:",t=r.toUpperCase().indexOf(e);if(t!==-1&&r.indexOf(".")!==-1){let n=r.substring(t+e.length);return n=n.replace("[",""),n.replace("]","")}return r}function dC(r){r=r.trim(),r.match(/^(.*:\/\/)(.*)/m)&&(r=r.replace(/^(.*:\/\/)(.*)/gm,"$2")),r=hC(r),Ad(r)&&r.indexOf("[")===-1&&(r=`[${r}]`);const e=Ad(r)?r.match(/(]:)(\d+)/):r.match(/(:)(\d+)/),t=e&&e.length===3&&e[1]&&e[2]?parseInt(e[2]):4222,n=t===80?"https":"http",i=new URL(`${n}://${r}`);i.port=`${t}`;let a=i.hostname;return a.charAt(0)==="["&&(a=a.substring(1,a.length-1)),{listen:i.host,hostname:a,port:t}}class Co{constructor(e,t=!1){E(this,"src");E(this,"listen");E(this,"hostname");E(this,"port");E(this,"didConnect");E(this,"reconnects");E(this,"lastConnect");E(this,"gossiped");E(this,"tlsName");E(this,"resolves");this.src=e,this.tlsName="";const n=dC(e);this.listen=n.listen,this.hostname=n.hostname,this.port=n.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=t}toString(){return this.listen}async resolve(e){if(!e.fn||e.resolve===!1)return[this];const t=[];if(Td(this.hostname))return[this];{const n=await e.fn(this.hostname);e.debug&&console.log(`resolve ${this.hostname} = ${n.join(",")}`);for(const i of n){const a=this.port===80?"https":"http",u=new URL(`${a}://${Ad(i)?"["+i+"]":i}`);u.port=`${this.port}`;const c=new Co(u.host,!1);c.tlsName=this.hostname,t.push(c)}}return e.randomize&&Vb(t),this.resolves=t,t}}class pC{constructor(e=[],t={}){E(this,"firstSelect");E(this,"servers");E(this,"currentServer");E(this,"tlsName");E(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=t.randomize||!1;const n=Ed();e&&(e.forEach(i=>{i=n?n(i):i,this.servers.push(new Co(i))}),this.randomize&&(this.servers=Vb(this.servers))),this.servers.length===0&&this.addServer(`${fd}:${nw()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const e=this.getCurrentServer();Td(e.hostname)||(this.tlsName=e.hostname,this.servers.forEach(t=>{t.gossiped&&(t.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(e,t=!1){const n=Ed();e=n?n(e):e;const i=new Co(e,t);Td(i.hostname)&&(i.tlsName=this.tlsName),this.servers.push(i)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const e=this.servers.shift();return e&&(this.servers.push(e),this.currentServer=e),e}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(e){if(e){const t=this.servers.indexOf(e);this.servers.splice(t,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(e,t){const n=[];let i=[];const a=Ed(),u=new Map;e.connect_urls&&e.connect_urls.length>0&&e.connect_urls.forEach(f=>{f=a?a(f,t):f;const h=new Co(f,!0);u.set(f,h)});const c=[];return this.servers.forEach((f,h)=>{const d=f.listen;f.gossiped&&this.currentServer.listen!==d&&u.get(d)===void 0&&c.push(h),u.delete(d)}),c.reverse(),c.forEach(f=>{const h=this.servers.splice(f,1);i=i.concat(h[0].listen)}),u.forEach((f,h)=>{this.servers.push(f),n.push(h)}),{added:n,deleted:i}}}class mC{constructor(){E(this,"baseInbox");E(this,"reqs");this.reqs=new Map}size(){return this.reqs.size}init(e){return this.baseInbox=`${Ei(e)}.`,this.baseInbox}add(e){isNaN(e.received)||(e.received=0),this.reqs.set(e.token,e)}get(e){return this.reqs.get(e)}cancel(e){this.reqs.delete(e.token)}getToken(e){const t=e.subject||"";return t.indexOf(this.baseInbox)===0?t.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(e,t){if(t&&t.permissionContext){if(e)return this.all().forEach(i=>{i.resolver(t,{})}),!0;const n=t.permissionContext;if(n.operation==="publish"){const i=this.all().find(a=>a.requestSubject===n.subject);if(i)return i.resolver(t,{}),!0}}return!1}dispatcher(){return(e,t)=>{const n=this.getToken(t);if(n){const i=this.get(n);i&&(e===null&&t.headers&&(e=Hb(t)),i.resolver(e,t))}}}close(){const e=Re.errorForCode(we.Timeout);this.reqs.forEach(t=>{t.resolver(e,{})})}}class yC{constructor(e,t,n){E(this,"ph");E(this,"interval");E(this,"maxOut");E(this,"timer");E(this,"pendings");this.ph=e,this.interval=t,this.maxOut=n,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(e){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),e&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:pa.PingTimer,data:`${this.pendings.length+1}`}),this.pendings.length===this.maxOut){this.cancel(!0);return}const e=ir();this.ph.flush(e).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(e),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(e=>(e.resolve(),!1))}}class gC extends Error{constructor(e){super(e),this.name="AssertionError"}}function vC(r,e="Assertion failed."){if(!r)throw new gC(e)}const aw=32*1024,kd=2**32-2;function hc(r,e,t=0){const n=e.byteLength-t;return r.byteLength>n&&(r=r.subarray(0,n)),e.set(r,t),r.byteLength}class Id{constructor(e){E(this,"_buf");E(this,"_off");if(this._off=0,e==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(e)}bytes(e={copy:!0}){return e.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(e){if(e===0){this.reset();return}if(e<0||e>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+e)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(e){const t=this._buf.byteLength;return e<=this.capacity-t?(this._reslice(t+e),t):-1}_reslice(e){vC(e<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,e)}readByte(){const e=new Uint8Array(1);return this.read(e)?e[0]:null}read(e){if(this.empty())return this.reset(),e.byteLength===0?0:null;const t=hc(this._buf.subarray(this._off),e);return this._off+=t,t}writeByte(e){return this.write(Uint8Array.of(e))}writeString(e){return this.write(xi.encode(e))}write(e){const t=this._grow(e.byteLength);return hc(e,this._buf,t)}_grow(e){const t=this.length;t===0&&this._off!==0&&this.reset();const n=this._tryGrowByReslice(e);if(n>=0)return n;const i=this.capacity;if(e<=Math.floor(i/2)-t)hc(this._buf.subarray(this._off),this._buf);else{if(i+e>kd)throw new Error("The buffer cannot be grown beyond the maximum size.");{const a=new Uint8Array(Math.min(2*i+e,kd));hc(this._buf.subarray(this._off),a),this._buf=a}}return this._off=0,this._reslice(Math.min(t+e,kd)),t}grow(e){if(e<0)throw Error("Buffer._grow: negative count");const t=this._grow(e);this._reslice(t)}readFrom(e){let t=0;const n=new Uint8Array(aw);for(;;){const i=this.capacity-this.length<aw,a=i?n:new Uint8Array(this._buf.buffer,this.length),u=e.read(a);if(u===null)return t;i?this.write(a.subarray(0,u)):this._reslice(this.length+u),t+=u}}}var tn;(function(r){r[r.OK=0]="OK",r[r.ERR=1]="ERR",r[r.MSG=2]="MSG",r[r.INFO=3]="INFO",r[r.PING=4]="PING",r[r.PONG=5]="PONG"})(tn||(tn={}));function ow(){const r={};return r.sid=-1,r.hdr=-1,r.size=-1,r}const bC=48;class uw{constructor(e){E(this,"dispatcher");E(this,"state");E(this,"as");E(this,"drop");E(this,"hdr");E(this,"ma");E(this,"argBuf");E(this,"msgBuf");this.dispatcher=e,this.state=Oe.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(e){let t;for(t=0;t<e.length;t++){const n=e[t];switch(this.state){case Oe.OP_START:switch(n){case Te.M:case Te.m:this.state=Oe.OP_M,this.hdr=-1,this.ma=ow();break;case Te.H:case Te.h:this.state=Oe.OP_H,this.hdr=0,this.ma=ow();break;case Te.P:case Te.p:this.state=Oe.OP_P;break;case Te.PLUS:this.state=Oe.OP_PLUS;break;case Te.MINUS:this.state=Oe.OP_MINUS;break;case Te.I:case Te.i:this.state=Oe.OP_I;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_H:switch(n){case Te.M:case Te.m:this.state=Oe.OP_M;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_M:switch(n){case Te.S:case Te.s:this.state=Oe.OP_MS;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MS:switch(n){case Te.G:case Te.g:this.state=Oe.OP_MSG;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MSG:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_MSG_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MSG_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.MSG_ARG,this.as=t}break;case Oe.MSG_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{const i=this.argBuf?this.argBuf.bytes():e.subarray(this.as,t-this.drop);this.processMsgArgs(i),this.drop=0,this.as=t+1,this.state=Oe.MSG_PAYLOAD,t=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(n)}break;case Oe.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const i=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:tn.MSG,msg:this.ma,data:i}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Oe.MSG_END}else{let i=this.ma.size-this.msgBuf.length;const a=e.length-t;a<i&&(i=a),i>0?(this.msgBuf.write(e.subarray(t,t+i)),t=t+i-1):this.msgBuf.writeByte(n)}else t-this.as>=this.ma.size&&(this.dispatcher.push({kind:tn.MSG,msg:this.ma,data:e.subarray(this.as,t)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Oe.MSG_END);break;case Oe.MSG_END:switch(n){case Te.NL:this.drop=0,this.as=t+1,this.state=Oe.OP_START;break;default:continue}break;case Oe.OP_PLUS:switch(n){case Te.O:case Te.o:this.state=Oe.OP_PLUS_O;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PLUS_O:switch(n){case Te.K:case Te.k:this.state=Oe.OP_PLUS_OK;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PLUS_OK:switch(n){case Te.NL:this.dispatcher.push({kind:tn.OK}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_MINUS:switch(n){case Te.E:case Te.e:this.state=Oe.OP_MINUS_E;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_E:switch(n){case Te.R:case Te.r:this.state=Oe.OP_MINUS_ER;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ER:switch(n){case Te.R:case Te.r:this.state=Oe.OP_MINUS_ERR;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ERR:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_MINUS_ERR_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ERR_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.MINUS_ERR_ARG,this.as=t}break;case Oe.MINUS_ERR_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{let i;this.argBuf?(i=this.argBuf.bytes(),this.argBuf=void 0):i=e.subarray(this.as,t-this.drop),this.dispatcher.push({kind:tn.ERR,data:i}),this.drop=0,this.as=t+1,this.state=Oe.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(n))}break;case Oe.OP_P:switch(n){case Te.I:case Te.i:this.state=Oe.OP_PI;break;case Te.O:case Te.o:this.state=Oe.OP_PO;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PO:switch(n){case Te.N:case Te.n:this.state=Oe.OP_PON;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PON:switch(n){case Te.G:case Te.g:this.state=Oe.OP_PONG;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PONG:switch(n){case Te.NL:this.dispatcher.push({kind:tn.PONG}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_PI:switch(n){case Te.N:case Te.n:this.state=Oe.OP_PIN;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PIN:switch(n){case Te.G:case Te.g:this.state=Oe.OP_PING;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PING:switch(n){case Te.NL:this.dispatcher.push({kind:tn.PING}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_I:switch(n){case Te.N:case Te.n:this.state=Oe.OP_IN;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_IN:switch(n){case Te.F:case Te.f:this.state=Oe.OP_INF;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INF:switch(n){case Te.O:case Te.o:this.state=Oe.OP_INFO;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INFO:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_INFO_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INFO_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.INFO_ARG,this.as=t}break;case Oe.INFO_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{let i;this.argBuf?(i=this.argBuf.bytes(),this.argBuf=void 0):i=e.subarray(this.as,t-this.drop),this.dispatcher.push({kind:tn.INFO,data:i}),this.drop=0,this.as=t+1,this.state=Oe.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(n)}break;default:throw this.fail(e.subarray(t))}}(this.state===Oe.MSG_ARG||this.state===Oe.MINUS_ERR_ARG||this.state===Oe.INFO_ARG)&&!this.argBuf&&(this.argBuf=new Id(e.subarray(this.as,t-this.drop))),this.state===Oe.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new Id(e.subarray(this.as)))}cloneMsgArg(){const e=this.ma.subject.length,t=this.ma.reply?this.ma.reply.length:0,n=new Uint8Array(e+t);n.set(this.ma.subject),this.ma.reply&&n.set(this.ma.reply,e),this.argBuf=new Id(n),this.ma.subject=n.subarray(0,e),this.ma.reply&&(this.ma.reply=n.subarray(e))}processMsgArgs(e){if(this.hdr>=0)return this.processHeaderMsgArgs(e);const t=[];let n=-1;for(let i=0;i<e.length;i++)switch(e[i]){case Te.SPACE:case Te.TAB:case Te.CR:case Te.NL:n>=0&&(t.push(e.subarray(n,i)),n=-1);break;default:n<0&&(n=i)}switch(n>=0&&t.push(e.subarray(n)),t.length){case 3:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(t[2]);break;case 4:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=t[2],this.ma.size=this.protoParseInt(t[3]);break;default:throw this.fail(e,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(e,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(e,"processMsgArgs Bad or Missing Size Error")}fail(e,t=""){return t?t=`${t} [${this.state}]`:t=`parse error [${this.state}]`,new Error(`${t}: ${cn.decode(e)}`)}processHeaderMsgArgs(e){const t=[];let n=-1;for(let i=0;i<e.length;i++)switch(e[i]){case Te.SPACE:case Te.TAB:case Te.CR:case Te.NL:n>=0&&(t.push(e.subarray(n,i)),n=-1);break;default:n<0&&(n=i)}switch(n>=0&&t.push(e.subarray(n)),t.length){case 4:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(t[2]),this.ma.size=this.protoParseInt(t[3]);break;case 5:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=t[2],this.ma.hdr=this.protoParseInt(t[3]),this.ma.size=this.protoParseInt(t[4]);break;default:throw this.fail(e,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(e){if(e.length===0)return-1;let t=0;for(let n=0;n<e.length;n++){if(e[n]<48||e[n]>57)return-1;t=t*10+(e[n]-bC)}return t}}var Oe;(function(r){r[r.OP_START=0]="OP_START",r[r.OP_PLUS=1]="OP_PLUS",r[r.OP_PLUS_O=2]="OP_PLUS_O",r[r.OP_PLUS_OK=3]="OP_PLUS_OK",r[r.OP_MINUS=4]="OP_MINUS",r[r.OP_MINUS_E=5]="OP_MINUS_E",r[r.OP_MINUS_ER=6]="OP_MINUS_ER",r[r.OP_MINUS_ERR=7]="OP_MINUS_ERR",r[r.OP_MINUS_ERR_SPC=8]="OP_MINUS_ERR_SPC",r[r.MINUS_ERR_ARG=9]="MINUS_ERR_ARG",r[r.OP_M=10]="OP_M",r[r.OP_MS=11]="OP_MS",r[r.OP_MSG=12]="OP_MSG",r[r.OP_MSG_SPC=13]="OP_MSG_SPC",r[r.MSG_ARG=14]="MSG_ARG",r[r.MSG_PAYLOAD=15]="MSG_PAYLOAD",r[r.MSG_END=16]="MSG_END",r[r.OP_H=17]="OP_H",r[r.OP_P=18]="OP_P",r[r.OP_PI=19]="OP_PI",r[r.OP_PIN=20]="OP_PIN",r[r.OP_PING=21]="OP_PING",r[r.OP_PO=22]="OP_PO",r[r.OP_PON=23]="OP_PON",r[r.OP_PONG=24]="OP_PONG",r[r.OP_I=25]="OP_I",r[r.OP_IN=26]="OP_IN",r[r.OP_INF=27]="OP_INF",r[r.OP_INFO=28]="OP_INFO",r[r.OP_INFO_SPC=29]="OP_INFO_SPC",r[r.INFO_ARG=30]="INFO_ARG"})(Oe||(Oe={}));var Te;(function(r){r[r.CR=13]="CR",r[r.E=69]="E",r[r.e=101]="e",r[r.F=70]="F",r[r.f=102]="f",r[r.G=71]="G",r[r.g=103]="g",r[r.H=72]="H",r[r.h=104]="h",r[r.I=73]="I",r[r.i=105]="i",r[r.K=75]="K",r[r.k=107]="k",r[r.M=77]="M",r[r.m=109]="m",r[r.MINUS=45]="MINUS",r[r.N=78]="N",r[r.n=110]="n",r[r.NL=10]="NL",r[r.O=79]="O",r[r.o=111]="o",r[r.P=80]="P",r[r.p=112]="p",r[r.PLUS=43]="PLUS",r[r.R=82]="R",r[r.r=114]="r",r[r.S=83]="S",r[r.s=115]="s",r[r.SPACE=32]="SPACE",r[r.TAB=9]="TAB"})(Te||(Te={})),function(r){var e=function(w,k){this.hi=w|0,this.lo=k|0},t=function(w){var k,T=new Float64Array(16);if(w)for(k=0;k<w.length;k++)T[k]=w[k];return T},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var u=t(),c=t([1]),f=t([56129,1]),h=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),g=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(w,k){return w<<k|w>>>32-k}function I(w,k){var T=w[k+3]&255;return T=T<<8|w[k+2]&255,T=T<<8|w[k+1]&255,T<<8|w[k+0]&255}function x(w,k){var T=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],C=w[k+4]<<24|w[k+5]<<16|w[k+6]<<8|w[k+7];return new e(T,C)}function _(w,k,T){var C;for(C=0;C<4;C++)w[k+C]=T&255,T>>>=8}function A(w,k,T){w[k]=T.hi>>24&255,w[k+1]=T.hi>>16&255,w[k+2]=T.hi>>8&255,w[k+3]=T.hi&255,w[k+4]=T.lo>>24&255,w[k+5]=T.lo>>16&255,w[k+6]=T.lo>>8&255,w[k+7]=T.lo&255}function P(w,k,T,C,D){var $,ie=0;for($=0;$<D;$++)ie|=w[k+$]^T[C+$];return(1&ie-1>>>8)-1}function M(w,k,T,C){return P(w,k,T,C,16)}function U(w,k,T,C){return P(w,k,T,C,32)}function W(w,k,T,C,D){var $=new Uint32Array(16),ie=new Uint32Array(16),de=new Uint32Array(16),Y=new Uint32Array(4),ne,qe,wt;for(ne=0;ne<4;ne++)ie[5*ne]=I(C,4*ne),ie[1+ne]=I(T,4*ne),ie[6+ne]=I(k,4*ne),ie[11+ne]=I(T,16+4*ne);for(ne=0;ne<16;ne++)de[ne]=ie[ne];for(ne=0;ne<20;ne++){for(qe=0;qe<4;qe++){for(wt=0;wt<4;wt++)Y[wt]=ie[(5*qe+4*wt)%16];for(Y[1]^=b(Y[0]+Y[3]|0,7),Y[2]^=b(Y[1]+Y[0]|0,9),Y[3]^=b(Y[2]+Y[1]|0,13),Y[0]^=b(Y[3]+Y[2]|0,18),wt=0;wt<4;wt++)$[4*qe+(qe+wt)%4]=Y[wt]}for(wt=0;wt<16;wt++)ie[wt]=$[wt]}if(D){for(ne=0;ne<16;ne++)ie[ne]=ie[ne]+de[ne]|0;for(ne=0;ne<4;ne++)ie[5*ne]=ie[5*ne]-I(C,4*ne)|0,ie[6+ne]=ie[6+ne]-I(k,4*ne)|0;for(ne=0;ne<4;ne++)_(w,4*ne,ie[5*ne]),_(w,16+4*ne,ie[6+ne])}else for(ne=0;ne<16;ne++)_(w,4*ne,ie[ne]+de[ne]|0)}function K(w,k,T,C){return W(w,k,T,C,!1),0}function X(w,k,T,C){return W(w,k,T,C,!0),0}var fe=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function oe(w,k,T,C,D,$,ie){var de=new Uint8Array(16),Y=new Uint8Array(64),ne,qe;if(!D)return 0;for(qe=0;qe<16;qe++)de[qe]=0;for(qe=0;qe<8;qe++)de[qe]=$[qe];for(;D>=64;){for(K(Y,de,ie,fe),qe=0;qe<64;qe++)w[k+qe]=(T?T[C+qe]:0)^Y[qe];for(ne=1,qe=8;qe<16;qe++)ne=ne+(de[qe]&255)|0,de[qe]=ne&255,ne>>>=8;D-=64,k+=64,T&&(C+=64)}if(D>0)for(K(Y,de,ie,fe),qe=0;qe<D;qe++)w[k+qe]=(T?T[C+qe]:0)^Y[qe];return 0}function Ie(w,k,T,C,D){return oe(w,k,null,0,T,C,D)}function ye(w,k,T,C,D){var $=new Uint8Array(32);return X($,C,D,fe),Ie(w,k,T,C.subarray(16),$)}function Ne(w,k,T,C,D,$,ie){var de=new Uint8Array(32);return X(de,$,ie,fe),oe(w,k,T,C,D,$.subarray(16),de)}function Ce(w,k){var T,C=0;for(T=0;T<17;T++)C=C+(w[T]+k[T]|0)|0,w[T]=C&255,C>>>=8}var ge=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function ve(w,k,T,C,D,$){var ie,de,Y,ne,qe=new Uint32Array(17),wt=new Uint32Array(17),tr=new Uint32Array(17),En=new Uint32Array(17),Ai=new Uint32Array(17);for(Y=0;Y<17;Y++)wt[Y]=tr[Y]=0;for(Y=0;Y<16;Y++)wt[Y]=$[Y];for(wt[3]&=15,wt[4]&=252,wt[7]&=15,wt[8]&=252,wt[11]&=15,wt[12]&=252,wt[15]&=15;D>0;){for(Y=0;Y<17;Y++)En[Y]=0;for(Y=0;Y<16&&Y<D;++Y)En[Y]=T[C+Y];for(En[Y]=1,C+=Y,D-=Y,Ce(tr,En),de=0;de<17;de++)for(qe[de]=0,Y=0;Y<17;Y++)qe[de]=qe[de]+tr[Y]*(Y<=de?wt[de-Y]:320*wt[de+17-Y]|0)|0|0;for(de=0;de<17;de++)tr[de]=qe[de];for(ne=0,Y=0;Y<16;Y++)ne=ne+tr[Y]|0,tr[Y]=ne&255,ne>>>=8;for(ne=ne+tr[16]|0,tr[16]=ne&3,ne=5*(ne>>>2)|0,Y=0;Y<16;Y++)ne=ne+tr[Y]|0,tr[Y]=ne&255,ne>>>=8;ne=ne+tr[16]|0,tr[16]=ne}for(Y=0;Y<17;Y++)Ai[Y]=tr[Y];for(Ce(tr,ge),ie=-(tr[16]>>>7)|0,Y=0;Y<17;Y++)tr[Y]^=ie&(Ai[Y]^tr[Y]);for(Y=0;Y<16;Y++)En[Y]=$[Y+16];for(En[16]=0,Ce(tr,En),Y=0;Y<16;Y++)w[k+Y]=tr[Y];return 0}function pe(w,k,T,C,D,$){var ie=new Uint8Array(16);return ve(ie,0,T,C,D,$),M(w,k,ie,0)}function te(w,k,T,C,D){var $;if(T<32)return-1;for(Ne(w,0,k,0,T,C,D),ve(w,16,w,32,T-32,w),$=0;$<16;$++)w[$]=0;return 0}function Se(w,k,T,C,D){var $,ie=new Uint8Array(32);if(T<32||(ye(ie,0,32,C,D),pe(k,16,k,32,T-32,ie)!==0))return-1;for(Ne(w,0,k,0,T,C,D),$=0;$<32;$++)w[$]=0;return 0}function Le(w,k){var T;for(T=0;T<16;T++)w[T]=k[T]|0}function Ee(w){var k,T;for(T=0;T<16;T++)w[T]+=65536,k=Math.floor(w[T]/65536),w[(T+1)*(T<15?1:0)]+=k-1+37*(k-1)*(T===15?1:0),w[T]-=k*65536}function Ze(w,k,T){for(var C,D=~(T-1),$=0;$<16;$++)C=D&(w[$]^k[$]),w[$]^=C,k[$]^=C}function vt(w,k){var T,C,D,$=t(),ie=t();for(T=0;T<16;T++)ie[T]=k[T];for(Ee(ie),Ee(ie),Ee(ie),C=0;C<2;C++){for($[0]=ie[0]-65517,T=1;T<15;T++)$[T]=ie[T]-65535-($[T-1]>>16&1),$[T-1]&=65535;$[15]=ie[15]-32767-($[14]>>16&1),D=$[15]>>16&1,$[14]&=65535,Ze(ie,$,1-D)}for(T=0;T<16;T++)w[2*T]=ie[T]&255,w[2*T+1]=ie[T]>>8}function Mt(w,k){var T=new Uint8Array(32),C=new Uint8Array(32);return vt(T,w),vt(C,k),U(T,0,C,0)}function Et(w){var k=new Uint8Array(32);return vt(k,w),k[0]&1}function Xe(w,k){var T;for(T=0;T<16;T++)w[T]=k[2*T]+(k[2*T+1]<<8);w[15]&=32767}function it(w,k,T){var C;for(C=0;C<16;C++)w[C]=k[C]+T[C]|0}function Ot(w,k,T){var C;for(C=0;C<16;C++)w[C]=k[C]-T[C]|0}function De(w,k,T){var C,D,$=new Float64Array(31);for(C=0;C<31;C++)$[C]=0;for(C=0;C<16;C++)for(D=0;D<16;D++)$[C+D]+=k[C]*T[D];for(C=0;C<15;C++)$[C]+=38*$[C+16];for(C=0;C<16;C++)w[C]=$[C];Ee(w),Ee(w)}function He(w,k){De(w,k,k)}function B(w,k){var T=t(),C;for(C=0;C<16;C++)T[C]=k[C];for(C=253;C>=0;C--)He(T,T),C!==2&&C!==4&&De(T,T,k);for(C=0;C<16;C++)w[C]=T[C]}function Q(w,k){var T=t(),C;for(C=0;C<16;C++)T[C]=k[C];for(C=250;C>=0;C--)He(T,T),C!==1&&De(T,T,k);for(C=0;C<16;C++)w[C]=T[C]}function q(w,k,T){var C=new Uint8Array(32),D=new Float64Array(80),$,ie,de=t(),Y=t(),ne=t(),qe=t(),wt=t(),tr=t();for(ie=0;ie<31;ie++)C[ie]=k[ie];for(C[31]=k[31]&127|64,C[0]&=248,Xe(D,T),ie=0;ie<16;ie++)Y[ie]=D[ie],qe[ie]=de[ie]=ne[ie]=0;for(de[0]=qe[0]=1,ie=254;ie>=0;--ie)$=C[ie>>>3]>>>(ie&7)&1,Ze(de,Y,$),Ze(ne,qe,$),it(wt,de,ne),Ot(de,de,ne),it(ne,Y,qe),Ot(Y,Y,qe),He(qe,wt),He(tr,de),De(de,ne,de),De(ne,Y,wt),it(wt,de,ne),Ot(de,de,ne),He(Y,de),Ot(ne,qe,tr),De(de,ne,f),it(de,de,qe),De(ne,ne,de),De(de,qe,tr),De(qe,Y,D),He(Y,wt),Ze(de,Y,$),Ze(ne,qe,$);for(ie=0;ie<16;ie++)D[ie+16]=de[ie],D[ie+32]=ne[ie],D[ie+48]=Y[ie],D[ie+64]=qe[ie];var En=D.subarray(32),Ai=D.subarray(16);return B(En,En),De(Ai,Ai,En),vt(w,Ai),0}function J(w,k){return q(w,k,a)}function ee(w,k){return n(k,32),J(w,k)}function V(w,k,T){var C=new Uint8Array(32);return q(C,T,k),X(w,i,C,fe)}var xe=te,We=Se;function Be(w,k,T,C,D,$){var ie=new Uint8Array(32);return V(ie,D,$),xe(w,k,T,C,ie)}function se(w,k,T,C,D,$){var ie=new Uint8Array(32);return V(ie,D,$),We(w,k,T,C,ie)}function _e(){var w=0,k=0,T=0,C=0,D=65535,$,ie,de;for(de=0;de<arguments.length;de++)$=arguments[de].lo,ie=arguments[de].hi,w+=$&D,k+=$>>>16,T+=ie&D,C+=ie>>>16;return k+=w>>>16,T+=k>>>16,C+=T>>>16,new e(T&D|C<<16,w&D|k<<16)}function Ge(w,k){return new e(w.hi>>>k,w.lo>>>k|w.hi<<32-k)}function pt(){var w=0,k=0,T;for(T=0;T<arguments.length;T++)w^=arguments[T].lo,k^=arguments[T].hi;return new e(k,w)}function mt(w,k){var T,C,D=32-k;return k<32?(T=w.hi>>>k|w.lo<<D,C=w.lo>>>k|w.hi<<D):k<64&&(T=w.lo>>>k|w.hi<<D,C=w.hi>>>k|w.lo<<D),new e(T,C)}function Yt(w,k,T){var C=w.hi&k.hi^~w.hi&T.hi,D=w.lo&k.lo^~w.lo&T.lo;return new e(C,D)}function Tt(w,k,T){var C=w.hi&k.hi^w.hi&T.hi^k.hi&T.hi,D=w.lo&k.lo^w.lo&T.lo^k.lo&T.lo;return new e(C,D)}function Wt(w){return pt(mt(w,28),mt(w,34),mt(w,39))}function Gt(w){return pt(mt(w,14),mt(w,18),mt(w,41))}function Er(w){return pt(mt(w,1),mt(w,8),Ge(w,7))}function zt(w){return pt(mt(w,19),mt(w,61),Ge(w,6))}var sr=[new e(1116352408,3609767458),new e(1899447441,602891725),new e(3049323471,3964484399),new e(3921009573,2173295548),new e(961987163,4081628472),new e(1508970993,3053834265),new e(2453635748,2937671579),new e(2870763221,3664609560),new e(3624381080,2734883394),new e(310598401,1164996542),new e(607225278,1323610764),new e(1426881987,3590304994),new e(1925078388,4068182383),new e(2162078206,991336113),new e(2614888103,633803317),new e(3248222580,3479774868),new e(3835390401,2666613458),new e(4022224774,944711139),new e(264347078,2341262773),new e(604807628,2007800933),new e(770255983,1495990901),new e(1249150122,1856431235),new e(1555081692,3175218132),new e(1996064986,2198950837),new e(2554220882,3999719339),new e(2821834349,766784016),new e(2952996808,2566594879),new e(3210313671,3203337956),new e(3336571891,1034457026),new e(3584528711,2466948901),new e(113926993,3758326383),new e(338241895,168717936),new e(666307205,1188179964),new e(773529912,1546045734),new e(1294757372,1522805485),new e(1396182291,2643833823),new e(1695183700,2343527390),new e(1986661051,1014477480),new e(2177026350,1206759142),new e(2456956037,344077627),new e(2730485921,1290863460),new e(2820302411,3158454273),new e(3259730800,3505952657),new e(3345764771,106217008),new e(3516065817,3606008344),new e(3600352804,1432725776),new e(4094571909,1467031594),new e(275423344,851169720),new e(430227734,3100823752),new e(506948616,1363258195),new e(659060556,3750685593),new e(883997877,3785050280),new e(958139571,3318307427),new e(1322822218,3812723403),new e(1537002063,2003034995),new e(1747873779,3602036899),new e(1955562222,1575990012),new e(2024104815,1125592928),new e(2227730452,2716904306),new e(2361852424,442776044),new e(2428436474,593698344),new e(2756734187,3733110249),new e(3204031479,2999351573),new e(3329325298,3815920427),new e(3391569614,3928383900),new e(3515267271,566280711),new e(3940187606,3454069534),new e(4118630271,4000239992),new e(116418474,1914138554),new e(174292421,2731055270),new e(289380356,3203993006),new e(460393269,320620315),new e(685471733,587496836),new e(852142971,1086792851),new e(1017036298,365543100),new e(1126000580,2618297676),new e(1288033470,3409855158),new e(1501505948,4234509866),new e(1607167915,987167468),new e(1816402316,1246189591)];function dr(w,k,T){var C=[],D=[],$=[],ie=[],de,Y,ne;for(Y=0;Y<8;Y++)C[Y]=$[Y]=x(w,8*Y);for(var qe=0;T>=128;){for(Y=0;Y<16;Y++)ie[Y]=x(k,8*Y+qe);for(Y=0;Y<80;Y++){for(ne=0;ne<8;ne++)D[ne]=$[ne];for(de=_e($[7],Gt($[4]),Yt($[4],$[5],$[6]),sr[Y],ie[Y%16]),D[7]=_e(de,Wt($[0]),Tt($[0],$[1],$[2])),D[3]=_e(D[3],de),ne=0;ne<8;ne++)$[(ne+1)%8]=D[ne];if(Y%16===15)for(ne=0;ne<16;ne++)ie[ne]=_e(ie[ne],ie[(ne+9)%16],Er(ie[(ne+1)%16]),zt(ie[(ne+14)%16]))}for(Y=0;Y<8;Y++)$[Y]=_e($[Y],C[Y]),C[Y]=$[Y];qe+=128,T-=128}for(Y=0;Y<8;Y++)A(w,8*Y,C[Y]);return T}var Ar=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]);function Ht(w,k,T){var C=new Uint8Array(64),D=new Uint8Array(256),$,ie=T;for($=0;$<64;$++)C[$]=Ar[$];for(dr(C,k,T),T%=128,$=0;$<256;$++)D[$]=0;for($=0;$<T;$++)D[$]=k[ie-T+$];for(D[T]=128,T=256-128*(T<112?1:0),D[T-9]=0,A(D,T-8,new e(ie/536870912|0,ie<<3)),dr(C,D,T),$=0;$<64;$++)w[$]=C[$];return 0}function H(w,k){var T=t(),C=t(),D=t(),$=t(),ie=t(),de=t(),Y=t(),ne=t(),qe=t();Ot(T,w[1],w[0]),Ot(qe,k[1],k[0]),De(T,T,qe),it(C,w[0],w[1]),it(qe,k[0],k[1]),De(C,C,qe),De(D,w[3],k[3]),De(D,D,d),De($,w[2],k[2]),it($,$,$),Ot(ie,C,T),Ot(de,$,D),it(Y,$,D),it(ne,C,T),De(w[0],ie,de),De(w[1],ne,Y),De(w[2],Y,de),De(w[3],ie,ne)}function G(w,k,T){var C;for(C=0;C<4;C++)Ze(w[C],k[C],T)}function st(w,k){var T=t(),C=t(),D=t();B(D,k[2]),De(T,k[0],D),De(C,k[1],D),vt(w,C),w[31]^=Et(T)<<7}function bt(w,k,T){var C,D;for(Le(w[0],u),Le(w[1],c),Le(w[2],c),Le(w[3],u),D=255;D>=0;--D)C=T[D/8|0]>>(D&7)&1,G(w,k,C),H(k,w),H(w,w),G(w,k,C)}function lt(w,k){var T=[t(),t(),t(),t()];Le(T[0],y),Le(T[1],g),Le(T[2],c),De(T[3],y,g),bt(w,T,k)}function ze(w,k,T){var C=new Uint8Array(64),D=[t(),t(),t(),t()],$;for(T||n(k,32),Ht(C,k,32),C[0]&=248,C[31]&=127,C[31]|=64,lt(D,C),st(w,D),$=0;$<32;$++)k[$+32]=w[$];return 0}var Kt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Zt(w,k){var T,C,D,$;for(C=63;C>=32;--C){for(T=0,D=C-32,$=C-12;D<$;++D)k[D]+=T-16*k[C]*Kt[D-(C-32)],T=Math.floor((k[D]+128)/256),k[D]-=T*256;k[D]+=T,k[C]=0}for(T=0,D=0;D<32;D++)k[D]+=T-(k[31]>>4)*Kt[D],T=k[D]>>8,k[D]&=255;for(D=0;D<32;D++)k[D]-=T*Kt[D];for(C=0;C<32;C++)k[C+1]+=k[C]>>8,w[C]=k[C]&255}function Qt(w){var k=new Float64Array(64),T;for(T=0;T<64;T++)k[T]=w[T];for(T=0;T<64;T++)w[T]=0;Zt(w,k)}function kr(w,k,T,C){var D=new Uint8Array(64),$=new Uint8Array(64),ie=new Uint8Array(64),de,Y,ne=new Float64Array(64),qe=[t(),t(),t(),t()];Ht(D,C,32),D[0]&=248,D[31]&=127,D[31]|=64;var wt=T+64;for(de=0;de<T;de++)w[64+de]=k[de];for(de=0;de<32;de++)w[32+de]=D[32+de];for(Ht(ie,w.subarray(32),T+32),Qt(ie),lt(qe,ie),st(w,qe),de=32;de<64;de++)w[de]=C[de];for(Ht($,w,T+64),Qt($),de=0;de<64;de++)ne[de]=0;for(de=0;de<32;de++)ne[de]=ie[de];for(de=0;de<32;de++)for(Y=0;Y<32;Y++)ne[de+Y]+=$[de]*D[Y];return Zt(w.subarray(32),ne),wt}function Hr(w,k){var T=t(),C=t(),D=t(),$=t(),ie=t(),de=t(),Y=t();return Le(w[2],c),Xe(w[1],k),He(D,w[1]),De($,D,h),Ot(D,D,w[2]),it($,w[2],$),He(ie,$),He(de,ie),De(Y,de,ie),De(T,Y,D),De(T,T,$),Q(T,T),De(T,T,D),De(T,T,$),De(T,T,$),De(w[0],T,$),He(C,w[0]),De(C,C,$),Mt(C,D)&&De(w[0],w[0],m),He(C,w[0]),De(C,C,$),Mt(C,D)?-1:(Et(w[0])===k[31]>>7&&Ot(w[0],u,w[0]),De(w[3],w[0],w[1]),0)}function Fr(w,k,T,C){var D,$=new Uint8Array(32),ie=new Uint8Array(64),de=[t(),t(),t(),t()],Y=[t(),t(),t(),t()];if(T<64||Hr(Y,C))return-1;for(D=0;D<T;D++)w[D]=k[D];for(D=0;D<32;D++)w[D+32]=C[D];if(Ht(ie,w,T),Qt(ie),bt(de,Y,ie),lt(Y,k.subarray(32)),H(de,Y),st($,de),T-=64,U(k,0,$,0)){for(D=0;D<T;D++)w[D]=0;return-1}for(D=0;D<T;D++)w[D]=k[D+64];return T}var Ut=32,Or=24,$r=32,Lr=16,ar=32,Gr=32,Tr=32,gr=32,Ir=32,Sn=Or,Un=$r,R=Lr,ue=64,be=32,Pe=64,Ve=32,ut=64;r.lowlevel={crypto_core_hsalsa20:X,crypto_stream_xor:Ne,crypto_stream:ye,crypto_stream_salsa20_xor:oe,crypto_stream_salsa20:Ie,crypto_onetimeauth:ve,crypto_onetimeauth_verify:pe,crypto_verify_16:M,crypto_verify_32:U,crypto_secretbox:te,crypto_secretbox_open:Se,crypto_scalarmult:q,crypto_scalarmult_base:J,crypto_box_beforenm:V,crypto_box_afternm:xe,crypto_box:Be,crypto_box_open:se,crypto_box_keypair:ee,crypto_hash:Ht,crypto_sign:kr,crypto_sign_keypair:ze,crypto_sign_open:Fr,crypto_secretbox_KEYBYTES:Ut,crypto_secretbox_NONCEBYTES:Or,crypto_secretbox_ZEROBYTES:$r,crypto_secretbox_BOXZEROBYTES:Lr,crypto_scalarmult_BYTES:ar,crypto_scalarmult_SCALARBYTES:Gr,crypto_box_PUBLICKEYBYTES:Tr,crypto_box_SECRETKEYBYTES:gr,crypto_box_BEFORENMBYTES:Ir,crypto_box_NONCEBYTES:Sn,crypto_box_ZEROBYTES:Un,crypto_box_BOXZEROBYTES:R,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:be,crypto_sign_SECRETKEYBYTES:Pe,crypto_sign_SEEDBYTES:Ve,crypto_hash_BYTES:ut,gf:t,D:h,L:Kt,pack25519:vt,unpack25519:Xe,M:De,A:it,S:He,Z:Ot,pow2523:Q,add:H,set25519:Le,modL:Zt,scalarmult:bt,scalarbase:lt};function Je(w,k){if(w.length!==Ut)throw new Error("bad key size");if(k.length!==Or)throw new Error("bad nonce size")}function et(w,k){if(w.length!==Tr)throw new Error("bad public key size");if(k.length!==gr)throw new Error("bad secret key size")}function tt(){for(var w=0;w<arguments.length;w++)if(!(arguments[w]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function gt(w){for(var k=0;k<w.length;k++)w[k]=0}r.randomBytes=function(w){var k=new Uint8Array(w);return n(k,w),k},r.secretbox=function(w,k,T){tt(w,k,T),Je(T,k);for(var C=new Uint8Array($r+w.length),D=new Uint8Array(C.length),$=0;$<w.length;$++)C[$+$r]=w[$];return te(D,C,C.length,k,T),D.subarray(Lr)},r.secretbox.open=function(w,k,T){tt(w,k,T),Je(T,k);for(var C=new Uint8Array(Lr+w.length),D=new Uint8Array(C.length),$=0;$<w.length;$++)C[$+Lr]=w[$];return C.length<32||Se(D,C,C.length,k,T)!==0?null:D.subarray($r)},r.secretbox.keyLength=Ut,r.secretbox.nonceLength=Or,r.secretbox.overheadLength=Lr,r.scalarMult=function(w,k){if(tt(w,k),w.length!==Gr)throw new Error("bad n size");if(k.length!==ar)throw new Error("bad p size");var T=new Uint8Array(ar);return q(T,w,k),T},r.scalarMult.base=function(w){if(tt(w),w.length!==Gr)throw new Error("bad n size");var k=new Uint8Array(ar);return J(k,w),k},r.scalarMult.scalarLength=Gr,r.scalarMult.groupElementLength=ar,r.box=function(w,k,T,C){var D=r.box.before(T,C);return r.secretbox(w,k,D)},r.box.before=function(w,k){tt(w,k),et(w,k);var T=new Uint8Array(Ir);return V(T,w,k),T},r.box.after=r.secretbox,r.box.open=function(w,k,T,C){var D=r.box.before(T,C);return r.secretbox.open(w,k,D)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var w=new Uint8Array(Tr),k=new Uint8Array(gr);return ee(w,k),{publicKey:w,secretKey:k}},r.box.keyPair.fromSecretKey=function(w){if(tt(w),w.length!==gr)throw new Error("bad secret key size");var k=new Uint8Array(Tr);return J(k,w),{publicKey:k,secretKey:new Uint8Array(w)}},r.box.publicKeyLength=Tr,r.box.secretKeyLength=gr,r.box.sharedKeyLength=Ir,r.box.nonceLength=Sn,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(w,k){if(tt(w,k),k.length!==Pe)throw new Error("bad secret key size");var T=new Uint8Array(ue+w.length);return kr(T,w,w.length,k),T},r.sign.open=function(w,k){if(tt(w,k),k.length!==be)throw new Error("bad public key size");var T=new Uint8Array(w.length),C=Fr(T,w,w.length,k);if(C<0)return null;for(var D=new Uint8Array(C),$=0;$<D.length;$++)D[$]=T[$];return D},r.sign.detached=function(w,k){for(var T=r.sign(w,k),C=new Uint8Array(ue),D=0;D<C.length;D++)C[D]=T[D];return C},r.sign.detached.verify=function(w,k,T){if(tt(w,k,T),k.length!==ue)throw new Error("bad signature size");if(T.length!==be)throw new Error("bad public key size");var C=new Uint8Array(ue+w.length),D=new Uint8Array(ue+w.length),$;for($=0;$<ue;$++)C[$]=k[$];for($=0;$<w.length;$++)C[$+ue]=w[$];return Fr(D,C,C.length,T)>=0},r.sign.keyPair=function(){var w=new Uint8Array(be),k=new Uint8Array(Pe);return ze(w,k),{publicKey:w,secretKey:k}},r.sign.keyPair.fromSecretKey=function(w){if(tt(w),w.length!==Pe)throw new Error("bad secret key size");for(var k=new Uint8Array(be),T=0;T<k.length;T++)k[T]=w[32+T];return{publicKey:k,secretKey:new Uint8Array(w)}},r.sign.keyPair.fromSeed=function(w){if(tt(w),w.length!==Ve)throw new Error("bad seed size");for(var k=new Uint8Array(be),T=new Uint8Array(Pe),C=0;C<32;C++)T[C]=w[C];return ze(k,T,!0),{publicKey:k,secretKey:T}},r.sign.publicKeyLength=be,r.sign.secretKeyLength=Pe,r.sign.seedLength=Ve,r.sign.signatureLength=ue,r.hash=function(w){tt(w);var k=new Uint8Array(ut);return Ht(k,w,w.length),k},r.hash.hashLength=ut,r.verify=function(w,k){return tt(w,k),w.length===0||k.length===0||w.length!==k.length?!1:P(w,0,k,0,w.length)===0},r.setPRNG=function(w){n=w},function(){var w=typeof globalThis<"u"?globalThis.crypto||globalThis.msCrypto:null;if(w&&w.getRandomValues){var k=65536;r.setPRNG(function(T,C){var D,$=new Uint8Array(C);for(D=0;D<C;D+=k)w.getRandomValues($.subarray(D,D+Math.min(C-D,k)));for(D=0;D<C;D++)T[D]=$[D];gt($)})}else typeof require<"u"&&(w=require("crypto"),w&&w.randomBytes&&r.setPRNG(function(T,C){var D,$=w.randomBytes(C);for(D=0;D<C;D++)T[D]=$[D];gt($)}))}()}(typeof module<"u"&&module.exports?module.exports:globalThis.nacl=globalThis.nacl||{});const dc=typeof module<"u"&&module.exports?module.exports:globalThis.nacl,wC={fromSeed:dc.sign.keyPair.fromSeed,sign:dc.sign.detached,verify:dc.sign.detached.verify,randomBytes:dc.randomBytes};let cw;function _C(r){cw=r}function ss(){return cw}const xC=new Uint16Array([0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920]);class pc{static checksum(e){let t=0;for(let n=0;n<e.byteLength;n++){let i=e[n];t=t<<8&65535^xC[(t>>8^i)&255]}return t}static validate(e,t){return pc.checksum(e)==t}}const Cd="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";class lw{static encode(e){let t=0,n=0,i=new Uint8Array(e),a=new Uint8Array(e.byteLength*2),u=0;for(let c=0;c<i.byteLength;c++)for(n=n<<8|i[c],t+=8;t>=5;){let f=n>>>t-5&31;a[u++]=Cd.charAt(f).charCodeAt(0),t-=5}if(t>0){let c=n<<5-t&31;a[u++]=Cd.charAt(c).charCodeAt(0)}return a.slice(0,u)}static decode(e){let t=0,n=0,i=0,a=new Uint8Array(e),u=new Uint8Array(a.byteLength*5/8|0);for(let c=0;c<a.byteLength;c++){let f=String.fromCharCode(a[c]),h=Cd.indexOf(f);if(h===-1)throw new Error("Illegal Base32 character: "+a[c]);n=n<<5|h,t+=5,t>=8&&(u[i++]=n>>>t-8&255,t-=8)}return u.slice(0,i)}}class Bt extends Error{constructor(t,n){super(t);E(this,"name");E(this,"code");E(this,"chainedError");this.name="NKeysError",this.code=t,this.chainedError=n}}function SC(){return mc(Vt.Operator)}function EC(){return mc(Vt.Account)}function OC(){return mc(Vt.User)}var qt;(function(r){r.InvalidPrefixByte="nkeys: invalid prefix byte",r.InvalidKey="nkeys: invalid key",r.InvalidPublicKey="nkeys: invalid public key",r.InvalidSeedLen="nkeys: invalid seed length",r.InvalidSeed="nkeys: invalid seed",r.InvalidEncoding="nkeys: invalid encoded key",r.InvalidSignature="nkeys: signature verification failed",r.CannotSign="nkeys: cannot sign, no private key available",r.PublicKeyOnly="nkeys: no seed or private key available",r.InvalidChecksum="nkeys: invalid checksum",r.SerializationError="nkeys: serialization error",r.ApiError="nkeys: api error",r.ClearedPair="nkeys: pair is cleared"})(qt||(qt={}));var Vt;(function(r){r[r.Seed=144]="Seed",r[r.Private=120]="Private",r[r.Operator=112]="Operator",r[r.Server=104]="Server",r[r.Cluster=16]="Cluster",r[r.Account=0]="Account",r[r.User=160]="User"})(Vt||(Vt={}));class Sa{static isValidPublicPrefix(e){return e==Vt.Server||e==Vt.Operator||e==Vt.Cluster||e==Vt.Account||e==Vt.User}static startsWithValidPrefix(e){let t=e[0];return t=="S"||t=="P"||t=="O"||t=="N"||t=="C"||t=="A"||t=="U"}static isValidPrefix(e){return this.parsePrefix(e)!=-1}static parsePrefix(e){switch(e){case Vt.Seed:return Vt.Seed;case Vt.Private:return Vt.Private;case Vt.Operator:return Vt.Operator;case Vt.Server:return Vt.Server;case Vt.Cluster:return Vt.Cluster;case Vt.Account:return Vt.Account;case Vt.User:return Vt.User;default:return-1}}}class rn{static encode(e,t){if(!t||!(t instanceof Uint8Array))throw new Bt(qt.SerializationError);if(!Sa.isValidPrefix(e))throw new Bt(qt.InvalidPrefixByte);return rn._encode(!1,e,t)}static encodeSeed(e,t){if(!t)throw new Bt(qt.ApiError);if(!Sa.isValidPublicPrefix(e))throw new Bt(qt.InvalidPrefixByte);if(t.byteLength!==32)throw new Bt(qt.InvalidSeedLen);return rn._encode(!0,e,t)}static decode(e,t){if(!Sa.isValidPrefix(e))throw new Bt(qt.InvalidPrefixByte);const n=rn._decode(t);if(n[0]!==e)throw new Bt(qt.InvalidPrefixByte);return n.slice(1)}static decodeSeed(e){const t=rn._decode(e),n=rn._decodePrefix(t);if(n[0]!=Vt.Seed)throw new Bt(qt.InvalidSeed);if(!Sa.isValidPublicPrefix(n[1]))throw new Bt(qt.InvalidPrefixByte);return{buf:t.slice(2),prefix:n[1]}}static _encode(e,t,n){const i=e?2:1,a=n.byteLength,u=i+a+2,c=i+a,f=new Uint8Array(u);if(e){const y=rn._encodePrefix(Vt.Seed,t);f.set(y)}else f[0]=t;f.set(n,i);const h=pc.checksum(f.slice(0,c));return new DataView(f.buffer).setUint16(c,h,!0),lw.encode(f)}static _decode(e){if(e.byteLength<4)throw new Bt(qt.InvalidEncoding);let t;try{t=lw.decode(e)}catch(c){throw new Bt(qt.InvalidEncoding,c)}const n=t.byteLength-2,a=new DataView(t.buffer).getUint16(n,!0),u=t.slice(0,n);if(!pc.validate(u,a))throw new Bt(qt.InvalidChecksum);return u}static _encodePrefix(e,t){const n=e|t>>5,i=(t&31)<<3;return new Uint8Array([n,i])}static _decodePrefix(e){const t=e[0]&248,n=(e[0]&7)<<5|(e[1]&248)>>3;return new Uint8Array([t,n])}}class fw{constructor(e){E(this,"seed");this.seed=e}getRawSeed(){if(!this.seed)throw new Bt(qt.ClearedPair);return rn.decodeSeed(this.seed).buf}getSeed(){if(!this.seed)throw new Bt(qt.ClearedPair);return this.seed}getPublicKey(){if(!this.seed)throw new Bt(qt.ClearedPair);const e=rn.decodeSeed(this.seed),t=ss().fromSeed(this.getRawSeed()),n=rn.encode(e.prefix,t.publicKey);return new TextDecoder().decode(n)}getPrivateKey(){if(!this.seed)throw new Bt(qt.ClearedPair);const e=ss().fromSeed(this.getRawSeed());return rn.encode(Vt.Private,e.secretKey)}sign(e){if(!this.seed)throw new Bt(qt.ClearedPair);const t=ss().fromSeed(this.getRawSeed());return ss().sign(e,t.secretKey)}verify(e,t){if(!this.seed)throw new Bt(qt.ClearedPair);const n=ss().fromSeed(this.getRawSeed());return ss().verify(e,t,n.publicKey)}clear(){this.seed&&(this.seed.fill(0),this.seed=void 0)}}function mc(r){const e=ss().randomBytes(32);let t=rn.encodeSeed(r,new Uint8Array(e));return new fw(t)}class TC{constructor(e){E(this,"publicKey");this.publicKey=e}getPublicKey(){if(!this.publicKey)throw new Bt(qt.ClearedPair);return new TextDecoder().decode(this.publicKey)}getPrivateKey(){throw this.publicKey?new Bt(qt.PublicKeyOnly):new Bt(qt.ClearedPair)}getSeed(){throw this.publicKey?new Bt(qt.PublicKeyOnly):new Bt(qt.ClearedPair)}sign(e){throw this.publicKey?new Bt(qt.CannotSign):new Bt(qt.ClearedPair)}verify(e,t){if(!this.publicKey)throw new Bt(qt.ClearedPair);let n=rn._decode(this.publicKey);return ss().verify(e,t,n.slice(1))}clear(){this.publicKey&&(this.publicKey.fill(0),this.publicKey=void 0)}}function AC(r){const e=new TextEncoder().encode(r),t=rn._decode(e),n=Sa.parsePrefix(t[0]);if(Sa.isValidPublicPrefix(n))return new TC(e);throw new Bt(qt.InvalidPublicKey)}function kC(r){return rn.decodeSeed(r),new fw(r)}function IC(r){return btoa(String.fromCharCode(...r))}function CC(r){const e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}_C(wC);const hw={createAccount:EC,createOperator:SC,createPair:mc,createUser:OC,fromPublic:AC,fromSeed:kC,NKeysError:Bt,NKeysErrorCode:qt,Prefix:Vt,decode:CC,encode:IC};function PC(r){return e=>{let t={};return r.forEach(n=>{const i=n(e)||{};t=Object.assign(t,i)}),t}}function NC(){return()=>{}}function RC(r,e){return()=>{const t=typeof r=="function"?r():r,n=typeof e=="function"?e():e;return{user:t,pass:n}}}function MC(r){return()=>({auth_token:typeof r=="function"?r():r})}function DC(r){return e=>{const t=typeof r=="function"?r():r,n=t?hw.fromSeed(t):void 0,i=n?n.getPublicKey():"",a=xi.encode(e||""),u=n!==void 0&&e?n.sign(a):void 0,c=u?hw.encode(u):"";return{nkey:i,sig:c}}}function FC(r,e){return t=>{const n=typeof r=="function"?r():r,i=DC(e),{nkey:a,sig:u}=i(t);return{jwt:n,nkey:a,sig:u}}}function LC(r){const e=typeof r!="function"?()=>r:r,t=()=>{const a=/\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig,u=cn.decode(e());let c=a.exec(u);if(!c)throw Re.errorForCode(we.BadCreds);const f=c[1].trim();if(c=a.exec(u),!c||!c)throw Re.errorForCode(we.BadCreds);const h=xi.encode(c[1].trim());return{jwt:f,seed:h}};return FC(()=>{const{jwt:a}=t();return a},()=>{const{seed:a}=t();return a})}const dw=2*60*1e3,qC=2,pw=2*1e3;function jC(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:dw,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:pw,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function UC(r){const e=[];return typeof r.authenticator=="function"&&e.push(r.authenticator),Array.isArray(r.authenticator)&&e.push(...r.authenticator),r.token&&e.push(MC(r.token)),r.user&&e.push(RC(r.user,r.pass)),e.length===0?NC():PC(e)}function $C(r){const e=`${fd}:${nw()}`;if(r=r||{servers:[e]},r.servers=r.servers||[],typeof r.servers=="string"&&(r.servers=[r.servers]),r.servers.length>0&&r.port)throw new Re("port and servers options are mutually exclusive",we.InvalidOption);r.servers.length===0&&r.port&&(r.servers=[`${fd}:${r.port}`]),r.servers&&r.servers.length===0&&(r.servers=[e]);const t=ac(jC(),r);if(t.authenticator=UC(t),["reconnectDelayHandler","authenticator"].forEach(n=>{if(t[n]&&typeof t[n]!="function")throw new Re(`${n} option should be a function`,we.NotFunction)}),t.reconnectDelayHandler||(t.reconnectDelayHandler=()=>{let n=t.tls?t.reconnectJitterTLS:t.reconnectJitter;return n&&(n++,n=Math.floor(Math.random()*n)),t.reconnectTimeWait+n}),t.inboxPrefix)try{Ei(t.inboxPrefix)}catch(n){throw new Re(n.message,we.ApiError)}if(t.resolve===void 0&&(t.resolve=typeof Od()=="function"),t.resolve&&typeof Od()!="function")throw new Re("'resolve' is not supported on this client",we.InvalidOption);return t}function BC(r,e){const{proto:t,tls_required:n,tls_available:i}=r;if((t===void 0||t<1)&&e.noEcho)throw new Re("noEcho",we.ServerOptionNotAvailable);const a=n||i||!1;if(e.tls&&!a)throw new Re("tls",we.ServerOptionNotAvailable)}const VC=1024*32,WC=/^INFO\s+([^\r\n]+)\r\n/i,zC=So(`PONG\r
|
|
149
|
+
`,fc=_a.fromAscii(lc),XI=new Uint8Array(fc)[0],eC=new Uint8Array(fc)[1];function tC(r){for(let e=0;e<r.length;e++){const t=e+1;if(r.byteLength>t&&r[e]===XI&&r[t]===eC)return t+1}return 0}function rC(r){const e=tC(r);if(e>0){const n=new Uint8Array(r).slice(0,e);return cn.decode(n)}return""}const nC=4,iw=48,iC=65,sC=97;function aC(r,e,t,n){const i=new Uint8Array(16);return[0,0,0,0,0,0,0,0,0,0,255,255].forEach((u,c)=>{i[c]=u}),i[12]=r,i[13]=e,i[14]=t,i[15]=n,i}function Td(r){return oC(r)!==void 0}function oC(r){for(let e=0;e<r.length;e++)switch(r[e]){case".":return sw(r);case":":return uC(r)}}function sw(r){const e=new Uint8Array(4);for(let t=0;t<4;t++){if(r.length===0)return;if(t>0){if(r[0]!==".")return;r=r.substring(1)}const{n,c:i,ok:a}=cC(r);if(!a||n>255)return;r=r.substring(i),e[t]=n}return aC(e[0],e[1],e[2],e[3])}function uC(r){const e=new Uint8Array(16);let t=-1;if(r.length>=2&&r[0]===":"&&r[1]===":"&&(t=0,r=r.substring(2),r.length===0))return e;let n=0;for(;n<16;){const{n:i,c:a,ok:u}=lC(r);if(!u||i>65535)return;if(a<r.length&&r[a]==="."){if(t<0&&n!=12||n+4>16)return;const c=sw(r);if(c===void 0)return;e[n]=c[12],e[n+1]=c[13],e[n+2]=c[14],e[n+3]=c[15],r="",n+=nC;break}if(e[n]=i>>8,e[n+1]=i,n+=2,r=r.substring(a),r.length===0)break;if(r[0]!==":"||r.length==1)return;if(r=r.substring(1),r[0]===":"){if(t>=0)return;if(t=n,r=r.substring(1),r.length===0)break}}if(r.length===0){if(n<16){if(t<0)return;const i=16-n;for(let a=n-1;a>=t;a--)e[a+i]=e[a];for(let a=t+i-1;a>=t;a--)e[a]=0}else if(t>=0)return;return e}}function cC(r){let e=0,t=0;for(e=0;e<r.length&&48<=r.charCodeAt(e)&&r.charCodeAt(e)<=57;e++)if(t=t*10+(r.charCodeAt(e)-iw),t>=16777215)return{n:16777215,c:e,ok:!1};return e===0?{n:0,c:0,ok:!1}:{n:t,c:e,ok:!0}}function lC(r){let e=0,t=0;for(t=0;t<r.length;t++){if(48<=r.charCodeAt(t)&&r.charCodeAt(t)<=57)e*=16,e+=r.charCodeAt(t)-iw;else if(97<=r.charCodeAt(t)&&r.charCodeAt(t)<=102)e*=16,e+=r.charCodeAt(t)-sC+10;else if(65<=r.charCodeAt(t)&&r.charCodeAt(t)<=70)e*=16,e+=r.charCodeAt(t)-iC+10;else break;if(e>=16777215)return{n:0,c:t,ok:!1}}return t===0?{n:0,c:t,ok:!1}:{n:e,c:t,ok:!0}}function fC(r){return r.indexOf("[")!==-1||r.indexOf("::")!==-1?!1:r.indexOf(".")!==-1||r.split(":").length<=2}function Ad(r){return!fC(r)}function hC(r){const e="::FFFF:",t=r.toUpperCase().indexOf(e);if(t!==-1&&r.indexOf(".")!==-1){let n=r.substring(t+e.length);return n=n.replace("[",""),n.replace("]","")}return r}function dC(r){r=r.trim(),r.match(/^(.*:\/\/)(.*)/m)&&(r=r.replace(/^(.*:\/\/)(.*)/gm,"$2")),r=hC(r),Ad(r)&&r.indexOf("[")===-1&&(r=`[${r}]`);const e=Ad(r)?r.match(/(]:)(\d+)/):r.match(/(:)(\d+)/),t=e&&e.length===3&&e[1]&&e[2]?parseInt(e[2]):4222,n=t===80?"https":"http",i=new URL(`${n}://${r}`);i.port=`${t}`;let a=i.hostname;return a.charAt(0)==="["&&(a=a.substring(1,a.length-1)),{listen:i.host,hostname:a,port:t}}class Co{constructor(e,t=!1){E(this,"src");E(this,"listen");E(this,"hostname");E(this,"port");E(this,"didConnect");E(this,"reconnects");E(this,"lastConnect");E(this,"gossiped");E(this,"tlsName");E(this,"resolves");this.src=e,this.tlsName="";const n=dC(e);this.listen=n.listen,this.hostname=n.hostname,this.port=n.port,this.didConnect=!1,this.reconnects=0,this.lastConnect=0,this.gossiped=t}toString(){return this.listen}async resolve(e){if(!e.fn||e.resolve===!1)return[this];const t=[];if(Td(this.hostname))return[this];{const n=await e.fn(this.hostname);e.debug&&console.log(`resolve ${this.hostname} = ${n.join(",")}`);for(const i of n){const a=this.port===80?"https":"http",u=new URL(`${a}://${Ad(i)?"["+i+"]":i}`);u.port=`${this.port}`;const c=new Co(u.host,!1);c.tlsName=this.hostname,t.push(c)}}return e.randomize&&Vb(t),this.resolves=t,t}}class pC{constructor(e=[],t={}){E(this,"firstSelect");E(this,"servers");E(this,"currentServer");E(this,"tlsName");E(this,"randomize");this.firstSelect=!0,this.servers=[],this.tlsName="",this.randomize=t.randomize||!1;const n=Ed();e&&(e.forEach(i=>{i=n?n(i):i,this.servers.push(new Co(i))}),this.randomize&&(this.servers=Vb(this.servers))),this.servers.length===0&&this.addServer(`${fd}:${nw()}`,!1),this.currentServer=this.servers[0]}clear(){this.servers.length=0}updateTLSName(){const e=this.getCurrentServer();Td(e.hostname)||(this.tlsName=e.hostname,this.servers.forEach(t=>{t.gossiped&&(t.tlsName=this.tlsName)}))}getCurrentServer(){return this.currentServer}addServer(e,t=!1){const n=Ed();e=n?n(e):e;const i=new Co(e,t);Td(i.hostname)&&(i.tlsName=this.tlsName),this.servers.push(i)}selectServer(){if(this.firstSelect)return this.firstSelect=!1,this.currentServer;const e=this.servers.shift();return e&&(this.servers.push(e),this.currentServer=e),e}removeCurrentServer(){this.removeServer(this.currentServer)}removeServer(e){if(e){const t=this.servers.indexOf(e);this.servers.splice(t,1)}}length(){return this.servers.length}next(){return this.servers.length?this.servers[0]:void 0}getServers(){return this.servers}update(e,t){const n=[];let i=[];const a=Ed(),u=new Map;e.connect_urls&&e.connect_urls.length>0&&e.connect_urls.forEach(f=>{f=a?a(f,t):f;const h=new Co(f,!0);u.set(f,h)});const c=[];return this.servers.forEach((f,h)=>{const d=f.listen;f.gossiped&&this.currentServer.listen!==d&&u.get(d)===void 0&&c.push(h),u.delete(d)}),c.reverse(),c.forEach(f=>{const h=this.servers.splice(f,1);i=i.concat(h[0].listen)}),u.forEach((f,h)=>{this.servers.push(f),n.push(h)}),{added:n,deleted:i}}}class mC{constructor(){E(this,"baseInbox");E(this,"reqs");this.reqs=new Map}size(){return this.reqs.size}init(e){return this.baseInbox=`${Ei(e)}.`,this.baseInbox}add(e){isNaN(e.received)||(e.received=0),this.reqs.set(e.token,e)}get(e){return this.reqs.get(e)}cancel(e){this.reqs.delete(e.token)}getToken(e){const t=e.subject||"";return t.indexOf(this.baseInbox)===0?t.substring(this.baseInbox.length):null}all(){return Array.from(this.reqs.values())}handleError(e,t){if(t&&t.permissionContext){if(e)return this.all().forEach(i=>{i.resolver(t,{})}),!0;const n=t.permissionContext;if(n.operation==="publish"){const i=this.all().find(a=>a.requestSubject===n.subject);if(i)return i.resolver(t,{}),!0}}return!1}dispatcher(){return(e,t)=>{const n=this.getToken(t);if(n){const i=this.get(n);i&&(e===null&&t.headers&&(e=Hb(t)),i.resolver(e,t))}}}close(){const e=Re.errorForCode(we.Timeout);this.reqs.forEach(t=>{t.resolver(e,{})})}}class yC{constructor(e,t,n){E(this,"ph");E(this,"interval");E(this,"maxOut");E(this,"timer");E(this,"pendings");this.ph=e,this.interval=t,this.maxOut=n,this.pendings=[]}start(){this.cancel(),this._schedule()}cancel(e){this.timer&&(clearTimeout(this.timer),this.timer=void 0),this._reset(),e&&this.ph.disconnect()}_schedule(){this.timer=setTimeout(()=>{if(this.ph.dispatchStatus({type:pa.PingTimer,data:`${this.pendings.length+1}`}),this.pendings.length===this.maxOut){this.cancel(!0);return}const e=ir();this.ph.flush(e).then(()=>{this._reset()}).catch(()=>{this.cancel()}),this.pendings.push(e),this._schedule()},this.interval)}_reset(){this.pendings=this.pendings.filter(e=>(e.resolve(),!1))}}class gC extends Error{constructor(e){super(e),this.name="AssertionError"}}function vC(r,e="Assertion failed."){if(!r)throw new gC(e)}const aw=32*1024,kd=2**32-2;function hc(r,e,t=0){const n=e.byteLength-t;return r.byteLength>n&&(r=r.subarray(0,n)),e.set(r,t),r.byteLength}class Id{constructor(e){E(this,"_buf");E(this,"_off");if(this._off=0,e==null){this._buf=new Uint8Array(0);return}this._buf=new Uint8Array(e)}bytes(e={copy:!0}){return e.copy===!1?this._buf.subarray(this._off):this._buf.slice(this._off)}empty(){return this._buf.byteLength<=this._off}get length(){return this._buf.byteLength-this._off}get capacity(){return this._buf.buffer.byteLength}truncate(e){if(e===0){this.reset();return}if(e<0||e>this.length)throw Error("bytes.Buffer: truncation out of range");this._reslice(this._off+e)}reset(){this._reslice(0),this._off=0}_tryGrowByReslice(e){const t=this._buf.byteLength;return e<=this.capacity-t?(this._reslice(t+e),t):-1}_reslice(e){vC(e<=this._buf.buffer.byteLength),this._buf=new Uint8Array(this._buf.buffer,0,e)}readByte(){const e=new Uint8Array(1);return this.read(e)?e[0]:null}read(e){if(this.empty())return this.reset(),e.byteLength===0?0:null;const t=hc(this._buf.subarray(this._off),e);return this._off+=t,t}writeByte(e){return this.write(Uint8Array.of(e))}writeString(e){return this.write(xi.encode(e))}write(e){const t=this._grow(e.byteLength);return hc(e,this._buf,t)}_grow(e){const t=this.length;t===0&&this._off!==0&&this.reset();const n=this._tryGrowByReslice(e);if(n>=0)return n;const i=this.capacity;if(e<=Math.floor(i/2)-t)hc(this._buf.subarray(this._off),this._buf);else{if(i+e>kd)throw new Error("The buffer cannot be grown beyond the maximum size.");{const a=new Uint8Array(Math.min(2*i+e,kd));hc(this._buf.subarray(this._off),a),this._buf=a}}return this._off=0,this._reslice(Math.min(t+e,kd)),t}grow(e){if(e<0)throw Error("Buffer._grow: negative count");const t=this._grow(e);this._reslice(t)}readFrom(e){let t=0;const n=new Uint8Array(aw);for(;;){const i=this.capacity-this.length<aw,a=i?n:new Uint8Array(this._buf.buffer,this.length),u=e.read(a);if(u===null)return t;i?this.write(a.subarray(0,u)):this._reslice(this.length+u),t+=u}}}var tn;(function(r){r[r.OK=0]="OK",r[r.ERR=1]="ERR",r[r.MSG=2]="MSG",r[r.INFO=3]="INFO",r[r.PING=4]="PING",r[r.PONG=5]="PONG"})(tn||(tn={}));function ow(){const r={};return r.sid=-1,r.hdr=-1,r.size=-1,r}const bC=48;class uw{constructor(e){E(this,"dispatcher");E(this,"state");E(this,"as");E(this,"drop");E(this,"hdr");E(this,"ma");E(this,"argBuf");E(this,"msgBuf");this.dispatcher=e,this.state=Oe.OP_START,this.as=0,this.drop=0,this.hdr=0}parse(e){let t;for(t=0;t<e.length;t++){const n=e[t];switch(this.state){case Oe.OP_START:switch(n){case Te.M:case Te.m:this.state=Oe.OP_M,this.hdr=-1,this.ma=ow();break;case Te.H:case Te.h:this.state=Oe.OP_H,this.hdr=0,this.ma=ow();break;case Te.P:case Te.p:this.state=Oe.OP_P;break;case Te.PLUS:this.state=Oe.OP_PLUS;break;case Te.MINUS:this.state=Oe.OP_MINUS;break;case Te.I:case Te.i:this.state=Oe.OP_I;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_H:switch(n){case Te.M:case Te.m:this.state=Oe.OP_M;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_M:switch(n){case Te.S:case Te.s:this.state=Oe.OP_MS;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MS:switch(n){case Te.G:case Te.g:this.state=Oe.OP_MSG;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MSG:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_MSG_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MSG_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.MSG_ARG,this.as=t}break;case Oe.MSG_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{const i=this.argBuf?this.argBuf.bytes():e.subarray(this.as,t-this.drop);this.processMsgArgs(i),this.drop=0,this.as=t+1,this.state=Oe.MSG_PAYLOAD,t=this.as+this.ma.size-1;break}default:this.argBuf&&this.argBuf.writeByte(n)}break;case Oe.MSG_PAYLOAD:if(this.msgBuf)if(this.msgBuf.length>=this.ma.size){const i=this.msgBuf.bytes({copy:!1});this.dispatcher.push({kind:tn.MSG,msg:this.ma,data:i}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Oe.MSG_END}else{let i=this.ma.size-this.msgBuf.length;const a=e.length-t;a<i&&(i=a),i>0?(this.msgBuf.write(e.subarray(t,t+i)),t=t+i-1):this.msgBuf.writeByte(n)}else t-this.as>=this.ma.size&&(this.dispatcher.push({kind:tn.MSG,msg:this.ma,data:e.subarray(this.as,t)}),this.argBuf=void 0,this.msgBuf=void 0,this.state=Oe.MSG_END);break;case Oe.MSG_END:switch(n){case Te.NL:this.drop=0,this.as=t+1,this.state=Oe.OP_START;break;default:continue}break;case Oe.OP_PLUS:switch(n){case Te.O:case Te.o:this.state=Oe.OP_PLUS_O;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PLUS_O:switch(n){case Te.K:case Te.k:this.state=Oe.OP_PLUS_OK;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PLUS_OK:switch(n){case Te.NL:this.dispatcher.push({kind:tn.OK}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_MINUS:switch(n){case Te.E:case Te.e:this.state=Oe.OP_MINUS_E;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_E:switch(n){case Te.R:case Te.r:this.state=Oe.OP_MINUS_ER;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ER:switch(n){case Te.R:case Te.r:this.state=Oe.OP_MINUS_ERR;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ERR:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_MINUS_ERR_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_MINUS_ERR_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.MINUS_ERR_ARG,this.as=t}break;case Oe.MINUS_ERR_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{let i;this.argBuf?(i=this.argBuf.bytes(),this.argBuf=void 0):i=e.subarray(this.as,t-this.drop),this.dispatcher.push({kind:tn.ERR,data:i}),this.drop=0,this.as=t+1,this.state=Oe.OP_START;break}default:this.argBuf&&this.argBuf.write(Uint8Array.of(n))}break;case Oe.OP_P:switch(n){case Te.I:case Te.i:this.state=Oe.OP_PI;break;case Te.O:case Te.o:this.state=Oe.OP_PO;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PO:switch(n){case Te.N:case Te.n:this.state=Oe.OP_PON;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PON:switch(n){case Te.G:case Te.g:this.state=Oe.OP_PONG;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PONG:switch(n){case Te.NL:this.dispatcher.push({kind:tn.PONG}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_PI:switch(n){case Te.N:case Te.n:this.state=Oe.OP_PIN;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PIN:switch(n){case Te.G:case Te.g:this.state=Oe.OP_PING;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_PING:switch(n){case Te.NL:this.dispatcher.push({kind:tn.PING}),this.drop=0,this.state=Oe.OP_START;break}break;case Oe.OP_I:switch(n){case Te.N:case Te.n:this.state=Oe.OP_IN;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_IN:switch(n){case Te.F:case Te.f:this.state=Oe.OP_INF;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INF:switch(n){case Te.O:case Te.o:this.state=Oe.OP_INFO;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INFO:switch(n){case Te.SPACE:case Te.TAB:this.state=Oe.OP_INFO_SPC;break;default:throw this.fail(e.subarray(t))}break;case Oe.OP_INFO_SPC:switch(n){case Te.SPACE:case Te.TAB:continue;default:this.state=Oe.INFO_ARG,this.as=t}break;case Oe.INFO_ARG:switch(n){case Te.CR:this.drop=1;break;case Te.NL:{let i;this.argBuf?(i=this.argBuf.bytes(),this.argBuf=void 0):i=e.subarray(this.as,t-this.drop),this.dispatcher.push({kind:tn.INFO,data:i}),this.drop=0,this.as=t+1,this.state=Oe.OP_START;break}default:this.argBuf&&this.argBuf.writeByte(n)}break;default:throw this.fail(e.subarray(t))}}(this.state===Oe.MSG_ARG||this.state===Oe.MINUS_ERR_ARG||this.state===Oe.INFO_ARG)&&!this.argBuf&&(this.argBuf=new Id(e.subarray(this.as,t-this.drop))),this.state===Oe.MSG_PAYLOAD&&!this.msgBuf&&(this.argBuf||this.cloneMsgArg(),this.msgBuf=new Id(e.subarray(this.as)))}cloneMsgArg(){const e=this.ma.subject.length,t=this.ma.reply?this.ma.reply.length:0,n=new Uint8Array(e+t);n.set(this.ma.subject),this.ma.reply&&n.set(this.ma.reply,e),this.argBuf=new Id(n),this.ma.subject=n.subarray(0,e),this.ma.reply&&(this.ma.reply=n.subarray(e))}processMsgArgs(e){if(this.hdr>=0)return this.processHeaderMsgArgs(e);const t=[];let n=-1;for(let i=0;i<e.length;i++)switch(e[i]){case Te.SPACE:case Te.TAB:case Te.CR:case Te.NL:n>=0&&(t.push(e.subarray(n,i)),n=-1);break;default:n<0&&(n=i)}switch(n>=0&&t.push(e.subarray(n)),t.length){case 3:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=void 0,this.ma.size=this.protoParseInt(t[2]);break;case 4:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=t[2],this.ma.size=this.protoParseInt(t[3]);break;default:throw this.fail(e,"processMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(e,"processMsgArgs Bad or Missing Sid Error");if(this.ma.size<0)throw this.fail(e,"processMsgArgs Bad or Missing Size Error")}fail(e,t=""){return t?t=`${t} [${this.state}]`:t=`parse error [${this.state}]`,new Error(`${t}: ${cn.decode(e)}`)}processHeaderMsgArgs(e){const t=[];let n=-1;for(let i=0;i<e.length;i++)switch(e[i]){case Te.SPACE:case Te.TAB:case Te.CR:case Te.NL:n>=0&&(t.push(e.subarray(n,i)),n=-1);break;default:n<0&&(n=i)}switch(n>=0&&t.push(e.subarray(n)),t.length){case 4:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=void 0,this.ma.hdr=this.protoParseInt(t[2]),this.ma.size=this.protoParseInt(t[3]);break;case 5:this.ma.subject=t[0],this.ma.sid=this.protoParseInt(t[1]),this.ma.reply=t[2],this.ma.hdr=this.protoParseInt(t[3]),this.ma.size=this.protoParseInt(t[4]);break;default:throw this.fail(e,"processHeaderMsgArgs Parse Error")}if(this.ma.sid<0)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Sid Error");if(this.ma.hdr<0||this.ma.hdr>this.ma.size)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Header Size Error");if(this.ma.size<0)throw this.fail(e,"processHeaderMsgArgs Bad or Missing Size Error")}protoParseInt(e){if(e.length===0)return-1;let t=0;for(let n=0;n<e.length;n++){if(e[n]<48||e[n]>57)return-1;t=t*10+(e[n]-bC)}return t}}var Oe;(function(r){r[r.OP_START=0]="OP_START",r[r.OP_PLUS=1]="OP_PLUS",r[r.OP_PLUS_O=2]="OP_PLUS_O",r[r.OP_PLUS_OK=3]="OP_PLUS_OK",r[r.OP_MINUS=4]="OP_MINUS",r[r.OP_MINUS_E=5]="OP_MINUS_E",r[r.OP_MINUS_ER=6]="OP_MINUS_ER",r[r.OP_MINUS_ERR=7]="OP_MINUS_ERR",r[r.OP_MINUS_ERR_SPC=8]="OP_MINUS_ERR_SPC",r[r.MINUS_ERR_ARG=9]="MINUS_ERR_ARG",r[r.OP_M=10]="OP_M",r[r.OP_MS=11]="OP_MS",r[r.OP_MSG=12]="OP_MSG",r[r.OP_MSG_SPC=13]="OP_MSG_SPC",r[r.MSG_ARG=14]="MSG_ARG",r[r.MSG_PAYLOAD=15]="MSG_PAYLOAD",r[r.MSG_END=16]="MSG_END",r[r.OP_H=17]="OP_H",r[r.OP_P=18]="OP_P",r[r.OP_PI=19]="OP_PI",r[r.OP_PIN=20]="OP_PIN",r[r.OP_PING=21]="OP_PING",r[r.OP_PO=22]="OP_PO",r[r.OP_PON=23]="OP_PON",r[r.OP_PONG=24]="OP_PONG",r[r.OP_I=25]="OP_I",r[r.OP_IN=26]="OP_IN",r[r.OP_INF=27]="OP_INF",r[r.OP_INFO=28]="OP_INFO",r[r.OP_INFO_SPC=29]="OP_INFO_SPC",r[r.INFO_ARG=30]="INFO_ARG"})(Oe||(Oe={}));var Te;(function(r){r[r.CR=13]="CR",r[r.E=69]="E",r[r.e=101]="e",r[r.F=70]="F",r[r.f=102]="f",r[r.G=71]="G",r[r.g=103]="g",r[r.H=72]="H",r[r.h=104]="h",r[r.I=73]="I",r[r.i=105]="i",r[r.K=75]="K",r[r.k=107]="k",r[r.M=77]="M",r[r.m=109]="m",r[r.MINUS=45]="MINUS",r[r.N=78]="N",r[r.n=110]="n",r[r.NL=10]="NL",r[r.O=79]="O",r[r.o=111]="o",r[r.P=80]="P",r[r.p=112]="p",r[r.PLUS=43]="PLUS",r[r.R=82]="R",r[r.r=114]="r",r[r.S=83]="S",r[r.s=115]="s",r[r.SPACE=32]="SPACE",r[r.TAB=9]="TAB"})(Te||(Te={})),function(r){var e=function(w,k){this.hi=w|0,this.lo=k|0},t=function(w){var k,T=new Float64Array(16);if(w)for(k=0;k<w.length;k++)T[k]=w[k];return T},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),a=new Uint8Array(32);a[0]=9;var u=t(),c=t([1]),f=t([56129,1]),h=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),d=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),y=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),g=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),m=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function b(w,k){return w<<k|w>>>32-k}function I(w,k){var T=w[k+3]&255;return T=T<<8|w[k+2]&255,T=T<<8|w[k+1]&255,T<<8|w[k+0]&255}function x(w,k){var T=w[k]<<24|w[k+1]<<16|w[k+2]<<8|w[k+3],C=w[k+4]<<24|w[k+5]<<16|w[k+6]<<8|w[k+7];return new e(T,C)}function _(w,k,T){var C;for(C=0;C<4;C++)w[k+C]=T&255,T>>>=8}function A(w,k,T){w[k]=T.hi>>24&255,w[k+1]=T.hi>>16&255,w[k+2]=T.hi>>8&255,w[k+3]=T.hi&255,w[k+4]=T.lo>>24&255,w[k+5]=T.lo>>16&255,w[k+6]=T.lo>>8&255,w[k+7]=T.lo&255}function P(w,k,T,C,D){var $,ie=0;for($=0;$<D;$++)ie|=w[k+$]^T[C+$];return(1&ie-1>>>8)-1}function M(w,k,T,C){return P(w,k,T,C,16)}function U(w,k,T,C){return P(w,k,T,C,32)}function W(w,k,T,C,D){var $=new Uint32Array(16),ie=new Uint32Array(16),de=new Uint32Array(16),Y=new Uint32Array(4),ne,qe,wt;for(ne=0;ne<4;ne++)ie[5*ne]=I(C,4*ne),ie[1+ne]=I(T,4*ne),ie[6+ne]=I(k,4*ne),ie[11+ne]=I(T,16+4*ne);for(ne=0;ne<16;ne++)de[ne]=ie[ne];for(ne=0;ne<20;ne++){for(qe=0;qe<4;qe++){for(wt=0;wt<4;wt++)Y[wt]=ie[(5*qe+4*wt)%16];for(Y[1]^=b(Y[0]+Y[3]|0,7),Y[2]^=b(Y[1]+Y[0]|0,9),Y[3]^=b(Y[2]+Y[1]|0,13),Y[0]^=b(Y[3]+Y[2]|0,18),wt=0;wt<4;wt++)$[4*qe+(qe+wt)%4]=Y[wt]}for(wt=0;wt<16;wt++)ie[wt]=$[wt]}if(D){for(ne=0;ne<16;ne++)ie[ne]=ie[ne]+de[ne]|0;for(ne=0;ne<4;ne++)ie[5*ne]=ie[5*ne]-I(C,4*ne)|0,ie[6+ne]=ie[6+ne]-I(k,4*ne)|0;for(ne=0;ne<4;ne++)_(w,4*ne,ie[5*ne]),_(w,16+4*ne,ie[6+ne])}else for(ne=0;ne<16;ne++)_(w,4*ne,ie[ne]+de[ne]|0)}function K(w,k,T,C){return W(w,k,T,C,!1),0}function X(w,k,T,C){return W(w,k,T,C,!0),0}var fe=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function oe(w,k,T,C,D,$,ie){var de=new Uint8Array(16),Y=new Uint8Array(64),ne,qe;if(!D)return 0;for(qe=0;qe<16;qe++)de[qe]=0;for(qe=0;qe<8;qe++)de[qe]=$[qe];for(;D>=64;){for(K(Y,de,ie,fe),qe=0;qe<64;qe++)w[k+qe]=(T?T[C+qe]:0)^Y[qe];for(ne=1,qe=8;qe<16;qe++)ne=ne+(de[qe]&255)|0,de[qe]=ne&255,ne>>>=8;D-=64,k+=64,T&&(C+=64)}if(D>0)for(K(Y,de,ie,fe),qe=0;qe<D;qe++)w[k+qe]=(T?T[C+qe]:0)^Y[qe];return 0}function Ie(w,k,T,C,D){return oe(w,k,null,0,T,C,D)}function ye(w,k,T,C,D){var $=new Uint8Array(32);return X($,C,D,fe),Ie(w,k,T,C.subarray(16),$)}function Ne(w,k,T,C,D,$,ie){var de=new Uint8Array(32);return X(de,$,ie,fe),oe(w,k,T,C,D,$.subarray(16),de)}function Ce(w,k){var T,C=0;for(T=0;T<17;T++)C=C+(w[T]+k[T]|0)|0,w[T]=C&255,C>>>=8}var ge=new Uint32Array([5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252]);function ve(w,k,T,C,D,$){var ie,de,Y,ne,qe=new Uint32Array(17),wt=new Uint32Array(17),tr=new Uint32Array(17),En=new Uint32Array(17),Ai=new Uint32Array(17);for(Y=0;Y<17;Y++)wt[Y]=tr[Y]=0;for(Y=0;Y<16;Y++)wt[Y]=$[Y];for(wt[3]&=15,wt[4]&=252,wt[7]&=15,wt[8]&=252,wt[11]&=15,wt[12]&=252,wt[15]&=15;D>0;){for(Y=0;Y<17;Y++)En[Y]=0;for(Y=0;Y<16&&Y<D;++Y)En[Y]=T[C+Y];for(En[Y]=1,C+=Y,D-=Y,Ce(tr,En),de=0;de<17;de++)for(qe[de]=0,Y=0;Y<17;Y++)qe[de]=qe[de]+tr[Y]*(Y<=de?wt[de-Y]:320*wt[de+17-Y]|0)|0|0;for(de=0;de<17;de++)tr[de]=qe[de];for(ne=0,Y=0;Y<16;Y++)ne=ne+tr[Y]|0,tr[Y]=ne&255,ne>>>=8;for(ne=ne+tr[16]|0,tr[16]=ne&3,ne=5*(ne>>>2)|0,Y=0;Y<16;Y++)ne=ne+tr[Y]|0,tr[Y]=ne&255,ne>>>=8;ne=ne+tr[16]|0,tr[16]=ne}for(Y=0;Y<17;Y++)Ai[Y]=tr[Y];for(Ce(tr,ge),ie=-(tr[16]>>>7)|0,Y=0;Y<17;Y++)tr[Y]^=ie&(Ai[Y]^tr[Y]);for(Y=0;Y<16;Y++)En[Y]=$[Y+16];for(En[16]=0,Ce(tr,En),Y=0;Y<16;Y++)w[k+Y]=tr[Y];return 0}function pe(w,k,T,C,D,$){var ie=new Uint8Array(16);return ve(ie,0,T,C,D,$),M(w,k,ie,0)}function te(w,k,T,C,D){var $;if(T<32)return-1;for(Ne(w,0,k,0,T,C,D),ve(w,16,w,32,T-32,w),$=0;$<16;$++)w[$]=0;return 0}function Ee(w,k,T,C,D){var $,ie=new Uint8Array(32);if(T<32||(ye(ie,0,32,C,D),pe(k,16,k,32,T-32,ie)!==0))return-1;for(Ne(w,0,k,0,T,C,D),$=0;$<32;$++)w[$]=0;return 0}function Le(w,k){var T;for(T=0;T<16;T++)w[T]=k[T]|0}function Se(w){var k,T;for(T=0;T<16;T++)w[T]+=65536,k=Math.floor(w[T]/65536),w[(T+1)*(T<15?1:0)]+=k-1+37*(k-1)*(T===15?1:0),w[T]-=k*65536}function Ze(w,k,T){for(var C,D=~(T-1),$=0;$<16;$++)C=D&(w[$]^k[$]),w[$]^=C,k[$]^=C}function vt(w,k){var T,C,D,$=t(),ie=t();for(T=0;T<16;T++)ie[T]=k[T];for(Se(ie),Se(ie),Se(ie),C=0;C<2;C++){for($[0]=ie[0]-65517,T=1;T<15;T++)$[T]=ie[T]-65535-($[T-1]>>16&1),$[T-1]&=65535;$[15]=ie[15]-32767-($[14]>>16&1),D=$[15]>>16&1,$[14]&=65535,Ze(ie,$,1-D)}for(T=0;T<16;T++)w[2*T]=ie[T]&255,w[2*T+1]=ie[T]>>8}function Mt(w,k){var T=new Uint8Array(32),C=new Uint8Array(32);return vt(T,w),vt(C,k),U(T,0,C,0)}function Et(w){var k=new Uint8Array(32);return vt(k,w),k[0]&1}function Xe(w,k){var T;for(T=0;T<16;T++)w[T]=k[2*T]+(k[2*T+1]<<8);w[15]&=32767}function it(w,k,T){var C;for(C=0;C<16;C++)w[C]=k[C]+T[C]|0}function Ot(w,k,T){var C;for(C=0;C<16;C++)w[C]=k[C]-T[C]|0}function De(w,k,T){var C,D,$=new Float64Array(31);for(C=0;C<31;C++)$[C]=0;for(C=0;C<16;C++)for(D=0;D<16;D++)$[C+D]+=k[C]*T[D];for(C=0;C<15;C++)$[C]+=38*$[C+16];for(C=0;C<16;C++)w[C]=$[C];Se(w),Se(w)}function He(w,k){De(w,k,k)}function B(w,k){var T=t(),C;for(C=0;C<16;C++)T[C]=k[C];for(C=253;C>=0;C--)He(T,T),C!==2&&C!==4&&De(T,T,k);for(C=0;C<16;C++)w[C]=T[C]}function Q(w,k){var T=t(),C;for(C=0;C<16;C++)T[C]=k[C];for(C=250;C>=0;C--)He(T,T),C!==1&&De(T,T,k);for(C=0;C<16;C++)w[C]=T[C]}function q(w,k,T){var C=new Uint8Array(32),D=new Float64Array(80),$,ie,de=t(),Y=t(),ne=t(),qe=t(),wt=t(),tr=t();for(ie=0;ie<31;ie++)C[ie]=k[ie];for(C[31]=k[31]&127|64,C[0]&=248,Xe(D,T),ie=0;ie<16;ie++)Y[ie]=D[ie],qe[ie]=de[ie]=ne[ie]=0;for(de[0]=qe[0]=1,ie=254;ie>=0;--ie)$=C[ie>>>3]>>>(ie&7)&1,Ze(de,Y,$),Ze(ne,qe,$),it(wt,de,ne),Ot(de,de,ne),it(ne,Y,qe),Ot(Y,Y,qe),He(qe,wt),He(tr,de),De(de,ne,de),De(ne,Y,wt),it(wt,de,ne),Ot(de,de,ne),He(Y,de),Ot(ne,qe,tr),De(de,ne,f),it(de,de,qe),De(ne,ne,de),De(de,qe,tr),De(qe,Y,D),He(Y,wt),Ze(de,Y,$),Ze(ne,qe,$);for(ie=0;ie<16;ie++)D[ie+16]=de[ie],D[ie+32]=ne[ie],D[ie+48]=Y[ie],D[ie+64]=qe[ie];var En=D.subarray(32),Ai=D.subarray(16);return B(En,En),De(Ai,Ai,En),vt(w,Ai),0}function J(w,k){return q(w,k,a)}function ee(w,k){return n(k,32),J(w,k)}function V(w,k,T){var C=new Uint8Array(32);return q(C,T,k),X(w,i,C,fe)}var xe=te,We=Ee;function Be(w,k,T,C,D,$){var ie=new Uint8Array(32);return V(ie,D,$),xe(w,k,T,C,ie)}function se(w,k,T,C,D,$){var ie=new Uint8Array(32);return V(ie,D,$),We(w,k,T,C,ie)}function _e(){var w=0,k=0,T=0,C=0,D=65535,$,ie,de;for(de=0;de<arguments.length;de++)$=arguments[de].lo,ie=arguments[de].hi,w+=$&D,k+=$>>>16,T+=ie&D,C+=ie>>>16;return k+=w>>>16,T+=k>>>16,C+=T>>>16,new e(T&D|C<<16,w&D|k<<16)}function Ge(w,k){return new e(w.hi>>>k,w.lo>>>k|w.hi<<32-k)}function pt(){var w=0,k=0,T;for(T=0;T<arguments.length;T++)w^=arguments[T].lo,k^=arguments[T].hi;return new e(k,w)}function mt(w,k){var T,C,D=32-k;return k<32?(T=w.hi>>>k|w.lo<<D,C=w.lo>>>k|w.hi<<D):k<64&&(T=w.lo>>>k|w.hi<<D,C=w.hi>>>k|w.lo<<D),new e(T,C)}function Yt(w,k,T){var C=w.hi&k.hi^~w.hi&T.hi,D=w.lo&k.lo^~w.lo&T.lo;return new e(C,D)}function Tt(w,k,T){var C=w.hi&k.hi^w.hi&T.hi^k.hi&T.hi,D=w.lo&k.lo^w.lo&T.lo^k.lo&T.lo;return new e(C,D)}function Wt(w){return pt(mt(w,28),mt(w,34),mt(w,39))}function Gt(w){return pt(mt(w,14),mt(w,18),mt(w,41))}function Er(w){return pt(mt(w,1),mt(w,8),Ge(w,7))}function zt(w){return pt(mt(w,19),mt(w,61),Ge(w,6))}var sr=[new e(1116352408,3609767458),new e(1899447441,602891725),new e(3049323471,3964484399),new e(3921009573,2173295548),new e(961987163,4081628472),new e(1508970993,3053834265),new e(2453635748,2937671579),new e(2870763221,3664609560),new e(3624381080,2734883394),new e(310598401,1164996542),new e(607225278,1323610764),new e(1426881987,3590304994),new e(1925078388,4068182383),new e(2162078206,991336113),new e(2614888103,633803317),new e(3248222580,3479774868),new e(3835390401,2666613458),new e(4022224774,944711139),new e(264347078,2341262773),new e(604807628,2007800933),new e(770255983,1495990901),new e(1249150122,1856431235),new e(1555081692,3175218132),new e(1996064986,2198950837),new e(2554220882,3999719339),new e(2821834349,766784016),new e(2952996808,2566594879),new e(3210313671,3203337956),new e(3336571891,1034457026),new e(3584528711,2466948901),new e(113926993,3758326383),new e(338241895,168717936),new e(666307205,1188179964),new e(773529912,1546045734),new e(1294757372,1522805485),new e(1396182291,2643833823),new e(1695183700,2343527390),new e(1986661051,1014477480),new e(2177026350,1206759142),new e(2456956037,344077627),new e(2730485921,1290863460),new e(2820302411,3158454273),new e(3259730800,3505952657),new e(3345764771,106217008),new e(3516065817,3606008344),new e(3600352804,1432725776),new e(4094571909,1467031594),new e(275423344,851169720),new e(430227734,3100823752),new e(506948616,1363258195),new e(659060556,3750685593),new e(883997877,3785050280),new e(958139571,3318307427),new e(1322822218,3812723403),new e(1537002063,2003034995),new e(1747873779,3602036899),new e(1955562222,1575990012),new e(2024104815,1125592928),new e(2227730452,2716904306),new e(2361852424,442776044),new e(2428436474,593698344),new e(2756734187,3733110249),new e(3204031479,2999351573),new e(3329325298,3815920427),new e(3391569614,3928383900),new e(3515267271,566280711),new e(3940187606,3454069534),new e(4118630271,4000239992),new e(116418474,1914138554),new e(174292421,2731055270),new e(289380356,3203993006),new e(460393269,320620315),new e(685471733,587496836),new e(852142971,1086792851),new e(1017036298,365543100),new e(1126000580,2618297676),new e(1288033470,3409855158),new e(1501505948,4234509866),new e(1607167915,987167468),new e(1816402316,1246189591)];function dr(w,k,T){var C=[],D=[],$=[],ie=[],de,Y,ne;for(Y=0;Y<8;Y++)C[Y]=$[Y]=x(w,8*Y);for(var qe=0;T>=128;){for(Y=0;Y<16;Y++)ie[Y]=x(k,8*Y+qe);for(Y=0;Y<80;Y++){for(ne=0;ne<8;ne++)D[ne]=$[ne];for(de=_e($[7],Gt($[4]),Yt($[4],$[5],$[6]),sr[Y],ie[Y%16]),D[7]=_e(de,Wt($[0]),Tt($[0],$[1],$[2])),D[3]=_e(D[3],de),ne=0;ne<8;ne++)$[(ne+1)%8]=D[ne];if(Y%16===15)for(ne=0;ne<16;ne++)ie[ne]=_e(ie[ne],ie[(ne+9)%16],Er(ie[(ne+1)%16]),zt(ie[(ne+14)%16]))}for(Y=0;Y<8;Y++)$[Y]=_e($[Y],C[Y]),C[Y]=$[Y];qe+=128,T-=128}for(Y=0;Y<8;Y++)A(w,8*Y,C[Y]);return T}var Ar=new Uint8Array([106,9,230,103,243,188,201,8,187,103,174,133,132,202,167,59,60,110,243,114,254,148,248,43,165,79,245,58,95,29,54,241,81,14,82,127,173,230,130,209,155,5,104,140,43,62,108,31,31,131,217,171,251,65,189,107,91,224,205,25,19,126,33,121]);function Ht(w,k,T){var C=new Uint8Array(64),D=new Uint8Array(256),$,ie=T;for($=0;$<64;$++)C[$]=Ar[$];for(dr(C,k,T),T%=128,$=0;$<256;$++)D[$]=0;for($=0;$<T;$++)D[$]=k[ie-T+$];for(D[T]=128,T=256-128*(T<112?1:0),D[T-9]=0,A(D,T-8,new e(ie/536870912|0,ie<<3)),dr(C,D,T),$=0;$<64;$++)w[$]=C[$];return 0}function H(w,k){var T=t(),C=t(),D=t(),$=t(),ie=t(),de=t(),Y=t(),ne=t(),qe=t();Ot(T,w[1],w[0]),Ot(qe,k[1],k[0]),De(T,T,qe),it(C,w[0],w[1]),it(qe,k[0],k[1]),De(C,C,qe),De(D,w[3],k[3]),De(D,D,d),De($,w[2],k[2]),it($,$,$),Ot(ie,C,T),Ot(de,$,D),it(Y,$,D),it(ne,C,T),De(w[0],ie,de),De(w[1],ne,Y),De(w[2],Y,de),De(w[3],ie,ne)}function G(w,k,T){var C;for(C=0;C<4;C++)Ze(w[C],k[C],T)}function st(w,k){var T=t(),C=t(),D=t();B(D,k[2]),De(T,k[0],D),De(C,k[1],D),vt(w,C),w[31]^=Et(T)<<7}function bt(w,k,T){var C,D;for(Le(w[0],u),Le(w[1],c),Le(w[2],c),Le(w[3],u),D=255;D>=0;--D)C=T[D/8|0]>>(D&7)&1,G(w,k,C),H(k,w),H(w,w),G(w,k,C)}function lt(w,k){var T=[t(),t(),t(),t()];Le(T[0],y),Le(T[1],g),Le(T[2],c),De(T[3],y,g),bt(w,T,k)}function ze(w,k,T){var C=new Uint8Array(64),D=[t(),t(),t(),t()],$;for(T||n(k,32),Ht(C,k,32),C[0]&=248,C[31]&=127,C[31]|=64,lt(D,C),st(w,D),$=0;$<32;$++)k[$+32]=w[$];return 0}var Kt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Zt(w,k){var T,C,D,$;for(C=63;C>=32;--C){for(T=0,D=C-32,$=C-12;D<$;++D)k[D]+=T-16*k[C]*Kt[D-(C-32)],T=Math.floor((k[D]+128)/256),k[D]-=T*256;k[D]+=T,k[C]=0}for(T=0,D=0;D<32;D++)k[D]+=T-(k[31]>>4)*Kt[D],T=k[D]>>8,k[D]&=255;for(D=0;D<32;D++)k[D]-=T*Kt[D];for(C=0;C<32;C++)k[C+1]+=k[C]>>8,w[C]=k[C]&255}function Qt(w){var k=new Float64Array(64),T;for(T=0;T<64;T++)k[T]=w[T];for(T=0;T<64;T++)w[T]=0;Zt(w,k)}function kr(w,k,T,C){var D=new Uint8Array(64),$=new Uint8Array(64),ie=new Uint8Array(64),de,Y,ne=new Float64Array(64),qe=[t(),t(),t(),t()];Ht(D,C,32),D[0]&=248,D[31]&=127,D[31]|=64;var wt=T+64;for(de=0;de<T;de++)w[64+de]=k[de];for(de=0;de<32;de++)w[32+de]=D[32+de];for(Ht(ie,w.subarray(32),T+32),Qt(ie),lt(qe,ie),st(w,qe),de=32;de<64;de++)w[de]=C[de];for(Ht($,w,T+64),Qt($),de=0;de<64;de++)ne[de]=0;for(de=0;de<32;de++)ne[de]=ie[de];for(de=0;de<32;de++)for(Y=0;Y<32;Y++)ne[de+Y]+=$[de]*D[Y];return Zt(w.subarray(32),ne),wt}function Hr(w,k){var T=t(),C=t(),D=t(),$=t(),ie=t(),de=t(),Y=t();return Le(w[2],c),Xe(w[1],k),He(D,w[1]),De($,D,h),Ot(D,D,w[2]),it($,w[2],$),He(ie,$),He(de,ie),De(Y,de,ie),De(T,Y,D),De(T,T,$),Q(T,T),De(T,T,D),De(T,T,$),De(T,T,$),De(w[0],T,$),He(C,w[0]),De(C,C,$),Mt(C,D)&&De(w[0],w[0],m),He(C,w[0]),De(C,C,$),Mt(C,D)?-1:(Et(w[0])===k[31]>>7&&Ot(w[0],u,w[0]),De(w[3],w[0],w[1]),0)}function Fr(w,k,T,C){var D,$=new Uint8Array(32),ie=new Uint8Array(64),de=[t(),t(),t(),t()],Y=[t(),t(),t(),t()];if(T<64||Hr(Y,C))return-1;for(D=0;D<T;D++)w[D]=k[D];for(D=0;D<32;D++)w[D+32]=C[D];if(Ht(ie,w,T),Qt(ie),bt(de,Y,ie),lt(Y,k.subarray(32)),H(de,Y),st($,de),T-=64,U(k,0,$,0)){for(D=0;D<T;D++)w[D]=0;return-1}for(D=0;D<T;D++)w[D]=k[D+64];return T}var Ut=32,Or=24,$r=32,Lr=16,ar=32,Gr=32,Tr=32,gr=32,Ir=32,Sn=Or,Un=$r,R=Lr,ue=64,be=32,Pe=64,Ve=32,ut=64;r.lowlevel={crypto_core_hsalsa20:X,crypto_stream_xor:Ne,crypto_stream:ye,crypto_stream_salsa20_xor:oe,crypto_stream_salsa20:Ie,crypto_onetimeauth:ve,crypto_onetimeauth_verify:pe,crypto_verify_16:M,crypto_verify_32:U,crypto_secretbox:te,crypto_secretbox_open:Ee,crypto_scalarmult:q,crypto_scalarmult_base:J,crypto_box_beforenm:V,crypto_box_afternm:xe,crypto_box:Be,crypto_box_open:se,crypto_box_keypair:ee,crypto_hash:Ht,crypto_sign:kr,crypto_sign_keypair:ze,crypto_sign_open:Fr,crypto_secretbox_KEYBYTES:Ut,crypto_secretbox_NONCEBYTES:Or,crypto_secretbox_ZEROBYTES:$r,crypto_secretbox_BOXZEROBYTES:Lr,crypto_scalarmult_BYTES:ar,crypto_scalarmult_SCALARBYTES:Gr,crypto_box_PUBLICKEYBYTES:Tr,crypto_box_SECRETKEYBYTES:gr,crypto_box_BEFORENMBYTES:Ir,crypto_box_NONCEBYTES:Sn,crypto_box_ZEROBYTES:Un,crypto_box_BOXZEROBYTES:R,crypto_sign_BYTES:ue,crypto_sign_PUBLICKEYBYTES:be,crypto_sign_SECRETKEYBYTES:Pe,crypto_sign_SEEDBYTES:Ve,crypto_hash_BYTES:ut,gf:t,D:h,L:Kt,pack25519:vt,unpack25519:Xe,M:De,A:it,S:He,Z:Ot,pow2523:Q,add:H,set25519:Le,modL:Zt,scalarmult:bt,scalarbase:lt};function Je(w,k){if(w.length!==Ut)throw new Error("bad key size");if(k.length!==Or)throw new Error("bad nonce size")}function et(w,k){if(w.length!==Tr)throw new Error("bad public key size");if(k.length!==gr)throw new Error("bad secret key size")}function tt(){for(var w=0;w<arguments.length;w++)if(!(arguments[w]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function gt(w){for(var k=0;k<w.length;k++)w[k]=0}r.randomBytes=function(w){var k=new Uint8Array(w);return n(k,w),k},r.secretbox=function(w,k,T){tt(w,k,T),Je(T,k);for(var C=new Uint8Array($r+w.length),D=new Uint8Array(C.length),$=0;$<w.length;$++)C[$+$r]=w[$];return te(D,C,C.length,k,T),D.subarray(Lr)},r.secretbox.open=function(w,k,T){tt(w,k,T),Je(T,k);for(var C=new Uint8Array(Lr+w.length),D=new Uint8Array(C.length),$=0;$<w.length;$++)C[$+Lr]=w[$];return C.length<32||Ee(D,C,C.length,k,T)!==0?null:D.subarray($r)},r.secretbox.keyLength=Ut,r.secretbox.nonceLength=Or,r.secretbox.overheadLength=Lr,r.scalarMult=function(w,k){if(tt(w,k),w.length!==Gr)throw new Error("bad n size");if(k.length!==ar)throw new Error("bad p size");var T=new Uint8Array(ar);return q(T,w,k),T},r.scalarMult.base=function(w){if(tt(w),w.length!==Gr)throw new Error("bad n size");var k=new Uint8Array(ar);return J(k,w),k},r.scalarMult.scalarLength=Gr,r.scalarMult.groupElementLength=ar,r.box=function(w,k,T,C){var D=r.box.before(T,C);return r.secretbox(w,k,D)},r.box.before=function(w,k){tt(w,k),et(w,k);var T=new Uint8Array(Ir);return V(T,w,k),T},r.box.after=r.secretbox,r.box.open=function(w,k,T,C){var D=r.box.before(T,C);return r.secretbox.open(w,k,D)},r.box.open.after=r.secretbox.open,r.box.keyPair=function(){var w=new Uint8Array(Tr),k=new Uint8Array(gr);return ee(w,k),{publicKey:w,secretKey:k}},r.box.keyPair.fromSecretKey=function(w){if(tt(w),w.length!==gr)throw new Error("bad secret key size");var k=new Uint8Array(Tr);return J(k,w),{publicKey:k,secretKey:new Uint8Array(w)}},r.box.publicKeyLength=Tr,r.box.secretKeyLength=gr,r.box.sharedKeyLength=Ir,r.box.nonceLength=Sn,r.box.overheadLength=r.secretbox.overheadLength,r.sign=function(w,k){if(tt(w,k),k.length!==Pe)throw new Error("bad secret key size");var T=new Uint8Array(ue+w.length);return kr(T,w,w.length,k),T},r.sign.open=function(w,k){if(tt(w,k),k.length!==be)throw new Error("bad public key size");var T=new Uint8Array(w.length),C=Fr(T,w,w.length,k);if(C<0)return null;for(var D=new Uint8Array(C),$=0;$<D.length;$++)D[$]=T[$];return D},r.sign.detached=function(w,k){for(var T=r.sign(w,k),C=new Uint8Array(ue),D=0;D<C.length;D++)C[D]=T[D];return C},r.sign.detached.verify=function(w,k,T){if(tt(w,k,T),k.length!==ue)throw new Error("bad signature size");if(T.length!==be)throw new Error("bad public key size");var C=new Uint8Array(ue+w.length),D=new Uint8Array(ue+w.length),$;for($=0;$<ue;$++)C[$]=k[$];for($=0;$<w.length;$++)C[$+ue]=w[$];return Fr(D,C,C.length,T)>=0},r.sign.keyPair=function(){var w=new Uint8Array(be),k=new Uint8Array(Pe);return ze(w,k),{publicKey:w,secretKey:k}},r.sign.keyPair.fromSecretKey=function(w){if(tt(w),w.length!==Pe)throw new Error("bad secret key size");for(var k=new Uint8Array(be),T=0;T<k.length;T++)k[T]=w[32+T];return{publicKey:k,secretKey:new Uint8Array(w)}},r.sign.keyPair.fromSeed=function(w){if(tt(w),w.length!==Ve)throw new Error("bad seed size");for(var k=new Uint8Array(be),T=new Uint8Array(Pe),C=0;C<32;C++)T[C]=w[C];return ze(k,T,!0),{publicKey:k,secretKey:T}},r.sign.publicKeyLength=be,r.sign.secretKeyLength=Pe,r.sign.seedLength=Ve,r.sign.signatureLength=ue,r.hash=function(w){tt(w);var k=new Uint8Array(ut);return Ht(k,w,w.length),k},r.hash.hashLength=ut,r.verify=function(w,k){return tt(w,k),w.length===0||k.length===0||w.length!==k.length?!1:P(w,0,k,0,w.length)===0},r.setPRNG=function(w){n=w},function(){var w=typeof globalThis<"u"?globalThis.crypto||globalThis.msCrypto:null;if(w&&w.getRandomValues){var k=65536;r.setPRNG(function(T,C){var D,$=new Uint8Array(C);for(D=0;D<C;D+=k)w.getRandomValues($.subarray(D,D+Math.min(C-D,k)));for(D=0;D<C;D++)T[D]=$[D];gt($)})}else typeof require<"u"&&(w=require("crypto"),w&&w.randomBytes&&r.setPRNG(function(T,C){var D,$=w.randomBytes(C);for(D=0;D<C;D++)T[D]=$[D];gt($)}))}()}(typeof module<"u"&&module.exports?module.exports:globalThis.nacl=globalThis.nacl||{});const dc=typeof module<"u"&&module.exports?module.exports:globalThis.nacl,wC={fromSeed:dc.sign.keyPair.fromSeed,sign:dc.sign.detached,verify:dc.sign.detached.verify,randomBytes:dc.randomBytes};let cw;function _C(r){cw=r}function ss(){return cw}const xC=new Uint16Array([0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920]);class pc{static checksum(e){let t=0;for(let n=0;n<e.byteLength;n++){let i=e[n];t=t<<8&65535^xC[(t>>8^i)&255]}return t}static validate(e,t){return pc.checksum(e)==t}}const Cd="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";class lw{static encode(e){let t=0,n=0,i=new Uint8Array(e),a=new Uint8Array(e.byteLength*2),u=0;for(let c=0;c<i.byteLength;c++)for(n=n<<8|i[c],t+=8;t>=5;){let f=n>>>t-5&31;a[u++]=Cd.charAt(f).charCodeAt(0),t-=5}if(t>0){let c=n<<5-t&31;a[u++]=Cd.charAt(c).charCodeAt(0)}return a.slice(0,u)}static decode(e){let t=0,n=0,i=0,a=new Uint8Array(e),u=new Uint8Array(a.byteLength*5/8|0);for(let c=0;c<a.byteLength;c++){let f=String.fromCharCode(a[c]),h=Cd.indexOf(f);if(h===-1)throw new Error("Illegal Base32 character: "+a[c]);n=n<<5|h,t+=5,t>=8&&(u[i++]=n>>>t-8&255,t-=8)}return u.slice(0,i)}}class Bt extends Error{constructor(t,n){super(t);E(this,"name");E(this,"code");E(this,"chainedError");this.name="NKeysError",this.code=t,this.chainedError=n}}function SC(){return mc(Vt.Operator)}function EC(){return mc(Vt.Account)}function OC(){return mc(Vt.User)}var qt;(function(r){r.InvalidPrefixByte="nkeys: invalid prefix byte",r.InvalidKey="nkeys: invalid key",r.InvalidPublicKey="nkeys: invalid public key",r.InvalidSeedLen="nkeys: invalid seed length",r.InvalidSeed="nkeys: invalid seed",r.InvalidEncoding="nkeys: invalid encoded key",r.InvalidSignature="nkeys: signature verification failed",r.CannotSign="nkeys: cannot sign, no private key available",r.PublicKeyOnly="nkeys: no seed or private key available",r.InvalidChecksum="nkeys: invalid checksum",r.SerializationError="nkeys: serialization error",r.ApiError="nkeys: api error",r.ClearedPair="nkeys: pair is cleared"})(qt||(qt={}));var Vt;(function(r){r[r.Seed=144]="Seed",r[r.Private=120]="Private",r[r.Operator=112]="Operator",r[r.Server=104]="Server",r[r.Cluster=16]="Cluster",r[r.Account=0]="Account",r[r.User=160]="User"})(Vt||(Vt={}));class Sa{static isValidPublicPrefix(e){return e==Vt.Server||e==Vt.Operator||e==Vt.Cluster||e==Vt.Account||e==Vt.User}static startsWithValidPrefix(e){let t=e[0];return t=="S"||t=="P"||t=="O"||t=="N"||t=="C"||t=="A"||t=="U"}static isValidPrefix(e){return this.parsePrefix(e)!=-1}static parsePrefix(e){switch(e){case Vt.Seed:return Vt.Seed;case Vt.Private:return Vt.Private;case Vt.Operator:return Vt.Operator;case Vt.Server:return Vt.Server;case Vt.Cluster:return Vt.Cluster;case Vt.Account:return Vt.Account;case Vt.User:return Vt.User;default:return-1}}}class rn{static encode(e,t){if(!t||!(t instanceof Uint8Array))throw new Bt(qt.SerializationError);if(!Sa.isValidPrefix(e))throw new Bt(qt.InvalidPrefixByte);return rn._encode(!1,e,t)}static encodeSeed(e,t){if(!t)throw new Bt(qt.ApiError);if(!Sa.isValidPublicPrefix(e))throw new Bt(qt.InvalidPrefixByte);if(t.byteLength!==32)throw new Bt(qt.InvalidSeedLen);return rn._encode(!0,e,t)}static decode(e,t){if(!Sa.isValidPrefix(e))throw new Bt(qt.InvalidPrefixByte);const n=rn._decode(t);if(n[0]!==e)throw new Bt(qt.InvalidPrefixByte);return n.slice(1)}static decodeSeed(e){const t=rn._decode(e),n=rn._decodePrefix(t);if(n[0]!=Vt.Seed)throw new Bt(qt.InvalidSeed);if(!Sa.isValidPublicPrefix(n[1]))throw new Bt(qt.InvalidPrefixByte);return{buf:t.slice(2),prefix:n[1]}}static _encode(e,t,n){const i=e?2:1,a=n.byteLength,u=i+a+2,c=i+a,f=new Uint8Array(u);if(e){const y=rn._encodePrefix(Vt.Seed,t);f.set(y)}else f[0]=t;f.set(n,i);const h=pc.checksum(f.slice(0,c));return new DataView(f.buffer).setUint16(c,h,!0),lw.encode(f)}static _decode(e){if(e.byteLength<4)throw new Bt(qt.InvalidEncoding);let t;try{t=lw.decode(e)}catch(c){throw new Bt(qt.InvalidEncoding,c)}const n=t.byteLength-2,a=new DataView(t.buffer).getUint16(n,!0),u=t.slice(0,n);if(!pc.validate(u,a))throw new Bt(qt.InvalidChecksum);return u}static _encodePrefix(e,t){const n=e|t>>5,i=(t&31)<<3;return new Uint8Array([n,i])}static _decodePrefix(e){const t=e[0]&248,n=(e[0]&7)<<5|(e[1]&248)>>3;return new Uint8Array([t,n])}}class fw{constructor(e){E(this,"seed");this.seed=e}getRawSeed(){if(!this.seed)throw new Bt(qt.ClearedPair);return rn.decodeSeed(this.seed).buf}getSeed(){if(!this.seed)throw new Bt(qt.ClearedPair);return this.seed}getPublicKey(){if(!this.seed)throw new Bt(qt.ClearedPair);const e=rn.decodeSeed(this.seed),t=ss().fromSeed(this.getRawSeed()),n=rn.encode(e.prefix,t.publicKey);return new TextDecoder().decode(n)}getPrivateKey(){if(!this.seed)throw new Bt(qt.ClearedPair);const e=ss().fromSeed(this.getRawSeed());return rn.encode(Vt.Private,e.secretKey)}sign(e){if(!this.seed)throw new Bt(qt.ClearedPair);const t=ss().fromSeed(this.getRawSeed());return ss().sign(e,t.secretKey)}verify(e,t){if(!this.seed)throw new Bt(qt.ClearedPair);const n=ss().fromSeed(this.getRawSeed());return ss().verify(e,t,n.publicKey)}clear(){this.seed&&(this.seed.fill(0),this.seed=void 0)}}function mc(r){const e=ss().randomBytes(32);let t=rn.encodeSeed(r,new Uint8Array(e));return new fw(t)}class TC{constructor(e){E(this,"publicKey");this.publicKey=e}getPublicKey(){if(!this.publicKey)throw new Bt(qt.ClearedPair);return new TextDecoder().decode(this.publicKey)}getPrivateKey(){throw this.publicKey?new Bt(qt.PublicKeyOnly):new Bt(qt.ClearedPair)}getSeed(){throw this.publicKey?new Bt(qt.PublicKeyOnly):new Bt(qt.ClearedPair)}sign(e){throw this.publicKey?new Bt(qt.CannotSign):new Bt(qt.ClearedPair)}verify(e,t){if(!this.publicKey)throw new Bt(qt.ClearedPair);let n=rn._decode(this.publicKey);return ss().verify(e,t,n.slice(1))}clear(){this.publicKey&&(this.publicKey.fill(0),this.publicKey=void 0)}}function AC(r){const e=new TextEncoder().encode(r),t=rn._decode(e),n=Sa.parsePrefix(t[0]);if(Sa.isValidPublicPrefix(n))return new TC(e);throw new Bt(qt.InvalidPublicKey)}function kC(r){return rn.decodeSeed(r),new fw(r)}function IC(r){return btoa(String.fromCharCode(...r))}function CC(r){const e=atob(r),t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}_C(wC);const hw={createAccount:EC,createOperator:SC,createPair:mc,createUser:OC,fromPublic:AC,fromSeed:kC,NKeysError:Bt,NKeysErrorCode:qt,Prefix:Vt,decode:CC,encode:IC};function PC(r){return e=>{let t={};return r.forEach(n=>{const i=n(e)||{};t=Object.assign(t,i)}),t}}function NC(){return()=>{}}function RC(r,e){return()=>{const t=typeof r=="function"?r():r,n=typeof e=="function"?e():e;return{user:t,pass:n}}}function MC(r){return()=>({auth_token:typeof r=="function"?r():r})}function DC(r){return e=>{const t=typeof r=="function"?r():r,n=t?hw.fromSeed(t):void 0,i=n?n.getPublicKey():"",a=xi.encode(e||""),u=n!==void 0&&e?n.sign(a):void 0,c=u?hw.encode(u):"";return{nkey:i,sig:c}}}function FC(r,e){return t=>{const n=typeof r=="function"?r():r,i=DC(e),{nkey:a,sig:u}=i(t);return{jwt:n,nkey:a,sig:u}}}function LC(r){const e=typeof r!="function"?()=>r:r,t=()=>{const a=/\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig,u=cn.decode(e());let c=a.exec(u);if(!c)throw Re.errorForCode(we.BadCreds);const f=c[1].trim();if(c=a.exec(u),!c||!c)throw Re.errorForCode(we.BadCreds);const h=xi.encode(c[1].trim());return{jwt:f,seed:h}};return FC(()=>{const{jwt:a}=t();return a},()=>{const{seed:a}=t();return a})}const dw=2*60*1e3,qC=2,pw=2*1e3;function jC(){return{maxPingOut:2,maxReconnectAttempts:10,noRandomize:!1,pedantic:!1,pingInterval:dw,reconnect:!0,reconnectJitter:100,reconnectJitterTLS:1e3,reconnectTimeWait:pw,tls:void 0,verbose:!1,waitOnFirstConnect:!1,ignoreAuthErrorAbort:!1}}function UC(r){const e=[];return typeof r.authenticator=="function"&&e.push(r.authenticator),Array.isArray(r.authenticator)&&e.push(...r.authenticator),r.token&&e.push(MC(r.token)),r.user&&e.push(RC(r.user,r.pass)),e.length===0?NC():PC(e)}function $C(r){const e=`${fd}:${nw()}`;if(r=r||{servers:[e]},r.servers=r.servers||[],typeof r.servers=="string"&&(r.servers=[r.servers]),r.servers.length>0&&r.port)throw new Re("port and servers options are mutually exclusive",we.InvalidOption);r.servers.length===0&&r.port&&(r.servers=[`${fd}:${r.port}`]),r.servers&&r.servers.length===0&&(r.servers=[e]);const t=ac(jC(),r);if(t.authenticator=UC(t),["reconnectDelayHandler","authenticator"].forEach(n=>{if(t[n]&&typeof t[n]!="function")throw new Re(`${n} option should be a function`,we.NotFunction)}),t.reconnectDelayHandler||(t.reconnectDelayHandler=()=>{let n=t.tls?t.reconnectJitterTLS:t.reconnectJitter;return n&&(n++,n=Math.floor(Math.random()*n)),t.reconnectTimeWait+n}),t.inboxPrefix)try{Ei(t.inboxPrefix)}catch(n){throw new Re(n.message,we.ApiError)}if(t.resolve===void 0&&(t.resolve=typeof Od()=="function"),t.resolve&&typeof Od()!="function")throw new Re("'resolve' is not supported on this client",we.InvalidOption);return t}function BC(r,e){const{proto:t,tls_required:n,tls_available:i}=r;if((t===void 0||t<1)&&e.noEcho)throw new Re("noEcho",we.ServerOptionNotAvailable);const a=n||i||!1;if(e.tls&&!a)throw new Re("tls",we.ServerOptionNotAvailable)}const VC=1024*32,WC=/^INFO\s+([^\r\n]+)\r\n/i,zC=So(`PONG\r
|
|
150
150
|
`),mw=So(`PING\r
|
|
151
151
|
`);class HC{constructor(e,t,n){E(this,"echo");E(this,"no_responders");E(this,"protocol");E(this,"verbose");E(this,"pedantic");E(this,"jwt");E(this,"nkey");E(this,"sig");E(this,"user");E(this,"pass");E(this,"auth_token");E(this,"tls_required");E(this,"name");E(this,"lang");E(this,"version");E(this,"headers");this.protocol=1,this.version=e.version,this.lang=e.lang,this.echo=t.noEcho?!1:void 0,this.verbose=t.verbose,this.pedantic=t.pedantic,this.tls_required=t.tls?!0:void 0,this.name=t.name;const i=(t&&typeof t.authenticator=="function"?t.authenticator(n):{})||{};ac(this,i)}}class yw extends Mr{constructor(t,n,i={}){var u;super();E(this,"sid");E(this,"queue");E(this,"draining");E(this,"max");E(this,"subject");E(this,"drained");E(this,"protocol");E(this,"timer");E(this,"info");E(this,"cleanupFn");E(this,"closed");E(this,"requestSubject");ac(this,i),this.protocol=t,this.subject=n,this.draining=!1,this.noIterator=typeof i.callback=="function",this.closed=ir();const a=!((u=t.options)!=null&&u.noAsyncTraces);i.timeout&&(this.timer=ma(i.timeout,a),this.timer.then(()=>{this.timer=void 0}).catch(c=>{this.stop(c),this.noIterator&&this.callback(c,{})})),this.noIterator||this.iterClosed.then(()=>{this.closed.resolve(),this.unsubscribe()})}setPrePostHandlers(t){if(this.noIterator){const n=this.callback,i=t.ingestionFilterFn?t.ingestionFilterFn:()=>({ingest:!0,protocol:!1}),a=t.protocolFilterFn?t.protocolFilterFn:()=>!0,u=t.dispatchedFn?t.dispatchedFn:()=>{};this.callback=(c,f)=>{const{ingest:h}=i(f);h&&a(f)&&(n(c,f),u(f))}}else this.protocolFilterFn=t.protocolFilterFn,this.dispatchedFn=t.dispatchedFn}callback(t,n){this.cancelTimeout(),t?this.stop(t):this.push(n)}close(){if(!this.isClosed()){this.cancelTimeout();const t=()=>{if(this.stop(),this.cleanupFn)try{this.cleanupFn(this,this.info)}catch{}this.closed.resolve()};this.noIterator?t():this.push(t)}}unsubscribe(t){this.protocol.unsubscribe(this,t)}cancelTimeout(){this.timer&&(this.timer.cancel(),this.timer=void 0)}drain(){return this.protocol.isClosed()?Promise.reject(Re.errorForCode(we.ConnectionClosed)):this.isClosed()?Promise.reject(Re.errorForCode(we.SubClosed)):(this.drained||(this.draining=!0,this.protocol.unsub(this),this.drained=this.protocol.flush(ir()).then(()=>{this.protocol.subscriptions.cancel(this)}).catch(()=>{this.protocol.subscriptions.cancel(this)})),this.drained)}isDraining(){return this.draining}isClosed(){return this.done}getSubject(){return this.subject}getMax(){return this.max}getID(){return this.sid}}class GC{constructor(){E(this,"mux");E(this,"subs");E(this,"sidCounter");this.sidCounter=0,this.mux=null,this.subs=new Map}size(){return this.subs.size}add(e){return this.sidCounter++,e.sid=this.sidCounter,this.subs.set(e.sid,e),e}setMux(e){return this.mux=e,e}getMux(){return this.mux}get(e){return this.subs.get(e)}resub(e){return this.sidCounter++,this.subs.delete(e.sid),e.sid=this.sidCounter,this.subs.set(e.sid,e),e}all(){return Array.from(this.subs.values())}cancel(e){e&&(e.close(),this.subs.delete(e.sid))}handleError(e){if(e&&e.permissionContext){const t=e.permissionContext,n=this.all();let i;if(t.operation==="subscription"&&(i=n.find(a=>a.subject===t.subject&&a.queue===t.queue)),t.operation==="publish"&&(i=n.find(a=>a.requestSubject===t.subject)),i)return i.callback(e,{}),i.close(),this.subs.delete(i.sid),i!==this.mux}return!1}close(){this.subs.forEach(e=>{e.close()})}}class yc{constructor(e,t){E(this,"connected");E(this,"connectedOnce");E(this,"infoReceived");E(this,"info");E(this,"muxSubscriptions");E(this,"options");E(this,"outbound");E(this,"pongs");E(this,"subscriptions");E(this,"transport");E(this,"noMorePublishing");E(this,"connectError");E(this,"publisher");E(this,"_closed");E(this,"closed");E(this,"listeners");E(this,"heartbeats");E(this,"parser");E(this,"outMsgs");E(this,"inMsgs");E(this,"outBytes");E(this,"inBytes");E(this,"pendingLimit");E(this,"lastError");E(this,"abortReconnect");E(this,"whyClosed");E(this,"servers");E(this,"server");E(this,"features");E(this,"connectPromise");this._closed=!1,this.connected=!1,this.connectedOnce=!1,this.infoReceived=!1,this.noMorePublishing=!1,this.abortReconnect=!1,this.listeners=[],this.pendingLimit=VC,this.outMsgs=0,this.inMsgs=0,this.outBytes=0,this.inBytes=0,this.options=e,this.publisher=t,this.subscriptions=new GC,this.muxSubscriptions=new mC,this.outbound=new _a,this.pongs=[],this.whyClosed="",this.pendingLimit=e.pendingLimit||this.pendingLimit,this.features=new JI({major:0,minor:0,micro:0}),this.connectPromise=null;const n=typeof e.servers=="string"?[e.servers]:e.servers;this.servers=new pC(n,{randomize:!e.noRandomize}),this.closed=ir(),this.parser=new uw(this),this.heartbeats=new yC(this,this.options.pingInterval||dw,this.options.maxPingOut||qC)}resetOutbound(){this.outbound.reset();const e=this.pongs;this.pongs=[];const t=Re.errorForCode(we.Disconnect);t.stack="",e.forEach(n=>{n.reject(t)}),this.parser=new uw(this),this.infoReceived=!1}dispatchStatus(e){this.listeners.forEach(t=>{t.push(e)})}status(){const e=new Mr;return this.listeners.push(e),e}prepare(){this.transport&&this.transport.discard(),this.info=void 0,this.resetOutbound();const e=ir();return e.catch(()=>{}),this.pongs.unshift(e),this.connectError=t=>{e.reject(t)},this.transport=ZI(),this.transport.closed().then(async t=>{if(this.connected=!1,!this.isClosed()){await this.disconnected(this.transport.closeError||this.lastError);return}}),e}disconnect(){this.dispatchStatus({type:pa.StaleConnection,data:""}),this.transport.disconnect()}reconnect(){return this.connected&&(this.dispatchStatus({type:pa.ClientInitiatedReconnect,data:""}),this.transport.disconnect()),Promise.resolve()}async disconnected(e){this.dispatchStatus({type:Si.Disconnect,data:this.servers.getCurrentServer().toString()}),this.options.reconnect?await this.dialLoop().then(()=>{var t;this.dispatchStatus({type:Si.Reconnect,data:this.servers.getCurrentServer().toString()}),((t=this.lastError)==null?void 0:t.code)===we.AuthenticationExpired&&(this.lastError=void 0)}).catch(t=>{this._close(t)}):await this._close(e)}async dial(e){const t=this.prepare();let n;try{n=ma(this.options.timeout||2e4);const i=this.transport.connect(e,this.options);await Promise.race([i,n]),(async()=>{try{for await(const a of this.transport)this.parser.parse(a)}catch(a){console.log("reader closed",a)}})().then()}catch(i){t.reject(i)}try{await Promise.race([n,t]),n&&n.cancel(),this.connected=!0,this.connectError=void 0,this.sendSubscriptions(),this.connectedOnce=!0,this.server.didConnect=!0,this.server.reconnects=0,this.flushPending(),this.heartbeats.start()}catch(i){throw n&&n.cancel(),await this.transport.close(i),i}}async _doDial(e){const{resolve:t}=this.options,n=await e.resolve({fn:Od(),debug:this.options.debug,randomize:!this.options.noRandomize,resolve:t});let i=null;for(const a of n)try{i=null,this.dispatchStatus({type:pa.Reconnecting,data:a.toString()}),await this.dial(a);return}catch(u){i=u}throw i}dialLoop(){return this.connectPromise===null&&(this.connectPromise=this.dodialLoop(),this.connectPromise.then(()=>{}).catch(()=>{}).finally(()=>{this.connectPromise=null})),this.connectPromise}async dodialLoop(){let e;for(;;){this._closed&&this.servers.clear();const t=this.options.reconnectDelayHandler?this.options.reconnectDelayHandler():pw;let n=t;const i=this.selectServer();if(!i||this.abortReconnect)throw e||(this.lastError?this.lastError:Re.errorForCode(we.ConnectionRefused));const a=Date.now();if(i.lastConnect===0||i.lastConnect+t<=a){i.lastConnect=Date.now();try{await this._doDial(i);break}catch(u){if(e=u,!this.connectedOnce){if(this.options.waitOnFirstConnect)continue;this.servers.removeCurrentServer()}i.reconnects++;const c=this.options.maxReconnectAttempts||0;c!==-1&&i.reconnects>=c&&this.servers.removeCurrentServer()}}else n=Math.min(n,i.lastConnect+t-a),await ya(n)}}static async connect(e,t){const n=new yc(e,t);return await n.dialLoop(),n}static toError(e){const t=e?e.toLowerCase():"";if(t.indexOf("permissions violation")!==-1){const n=new Re(e,we.PermissionsViolation),i=e.match(/(Publish|Subscription) to "(\S+)"/);if(i){n.permissionContext={operation:i[1].toLowerCase(),subject:i[2],queue:void 0};const a=e.match(/using queue "(\S+)"/);a&&(n.permissionContext.queue=a[1])}return n}else return t.indexOf("authorization violation")!==-1?new Re(e,we.AuthorizationViolation):t.indexOf("user authentication expired")!==-1?new Re(e,we.AuthenticationExpired):t.indexOf("account authentication expired")!=-1?new Re(e,we.AccountExpired):t.indexOf("authentication timeout")!==-1?new Re(e,we.AuthenticationTimeout):new Re(e,we.ProtocolError)}processMsg(e,t){if(this.inMsgs++,this.inBytes+=t.length,!this.subscriptions.sidCounter)return;const n=this.subscriptions.get(e.sid);n&&(n.received+=1,n.callback&&n.callback(null,new md(e,t,this)),n.max!==void 0&&n.received>=n.max&&n.unsubscribe())}processError(e){const t=Lb(e),n=yc.toError(t),i={type:Si.Error,data:n.code};if(n.isPermissionError()){let a=!1;if(n.permissionContext){i.permissionContext=n.permissionContext;const u=this.subscriptions.getMux();a=(u==null?void 0:u.subject)===n.permissionContext.subject}this.subscriptions.handleError(n),this.muxSubscriptions.handleError(a,n),a&&this.subscriptions.setMux(null)}this.dispatchStatus(i),this.handleError(n)}handleError(e){e.isAuthError()?this.handleAuthError(e):e.isProtocolError()?this.lastError=e:e.isAuthTimeout()&&(this.lastError=e),e.isPermissionError()||(this.lastError=e)}handleAuthError(e){this.lastError&&e.code===this.lastError.code&&this.options.ignoreAuthErrorAbort===!1&&(this.abortReconnect=!0),this.connectError?this.connectError(e):this.disconnect()}processPing(){this.transport.send(zC)}processPong(){const e=this.pongs.shift();e&&e.resolve()}processInfo(e){const t=JSON.parse(Lb(e));this.info=t;const n=this.options&&this.options.ignoreClusterUpdates?void 0:this.servers.update(t,this.transport.isEncrypted());if(!this.infoReceived){this.features.update(Ps(t.version)),this.infoReceived=!0,this.transport.isEncrypted()&&this.servers.updateTLSName();const{version:a,lang:u}=this.transport;try{const c=new HC({version:a,lang:u},this.options,t.nonce);t.headers&&(c.headers=!0,c.no_responders=!0);const f=JSON.stringify(c);this.transport.send(So(`CONNECT ${f}${lc}`)),this.transport.send(mw)}catch(c){this._close(c)}}n&&this.dispatchStatus({type:Si.Update,data:n}),(t.ldm!==void 0?t.ldm:!1)&&this.dispatchStatus({type:Si.LDM,data:this.servers.getCurrentServer().toString()})}push(e){switch(e.kind){case tn.MSG:{const{msg:t,data:n}=e;this.processMsg(t,n);break}case tn.OK:break;case tn.ERR:this.processError(e.data);break;case tn.PING:this.processPing();break;case tn.PONG:this.processPong();break;case tn.INFO:this.processInfo(e.data);break}}sendCommand(e,...t){const n=this.outbound.length();let i;typeof e=="string"?i=So(e):i=e,this.outbound.fill(i,...t),n===0?queueMicrotask(()=>{this.flushPending()}):this.outbound.size()>=this.pendingLimit&&this.flushPending()}publish(e,t=bn,n){let i;if(t instanceof Uint8Array)i=t;else if(typeof t=="string")i=xi.encode(t);else throw Re.errorForCode(we.BadPayload);let a=i.length;n=n||{},n.reply=n.reply||"";let u=bn,c=0;if(n.headers){if(this.info&&!this.info.headers)throw new Re("headers",we.ServerOptionNotAvailable);u=n.headers.encode(),c=u.length,a=i.length+c}if(this.info&&a>this.info.max_payload)throw Re.errorForCode(we.MaxPayloadExceeded);this.outBytes+=a,this.outMsgs++;let f;n.headers?(n.reply?f=`HPUB ${e} ${n.reply} ${c} ${a}\r
|
|
152
152
|
`:f=`HPUB ${e} ${c} ${a}\r
|