@machinemetrics/mm-react-tools 4.0.2 → 4.0.3
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.
|
@@ -22909,7 +22909,7 @@ const sl = Ms.createContext(), SF = () => {
|
|
|
22909
22909
|
toast: pe,
|
|
22910
22910
|
popup: Pe,
|
|
22911
22911
|
confirm: me,
|
|
22912
|
-
|
|
22912
|
+
setLoaded: Ie
|
|
22913
22913
|
},
|
|
22914
22914
|
context: {
|
|
22915
22915
|
...b,
|
|
@@ -128,7 +128,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
128
128
|
`;T(Z)},[y,m,h]),pe.useEffect(()=>{_&&P()},[_,S]);const[P,{data:M,loading:U}]=U1(_,{fetchPolicy:"no-cache"});return pe.useEffect(()=>{if(!M||!M.quantities)return;const z=ci.last(M.quantities);if(z&&d(z.eventTime),!n)i(M.quantities);else{const Z=ci.drop(M.quantities);i([...n,...Z])}},[M]),{data:n,error:c,loading:a}},YA=r=>{const[e,t]=pe.useState(),[n,i]=pe.useState(!0),[a,u]=pe.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]=pe.useState(),{urls:n,request:i,clientId:a}=ti(),u=`lab:${a}:${r}`,{data:c,loading:f,error:h}=f0("/templates");return pe.useEffect(()=>{if(!c)return;const m=ci.filter(c.templates,{namespace:u});t(m)},[c]),[async({name:m,public:b,config:I})=>{const S={name:m,public:b,namespace:u,config:JSON.stringify(I)},_=JSON.stringify(S),T=await i(`${n.apiUrl}/templates`,{method:"POST",body:_});return t([...e,T.template]),T.template},async(m,{name:b,public:I,config:S})=>{const _={name:b,public:I,namespace:u,config:JSON.stringify(S)},T=JSON.stringify(_),P=await i(`${n.apiUrl}/templates/${m}`,{method:"PUT",body:T}),M=ci.findIndex(e,{id:m}),U=e.slice(0,M),z=e.slice(M+1);return t([...U,P.template,...z]),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]=pe.useState(),[t,n]=pe.useState(),{urls:i}=ti();return pe.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]),pe.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=()=>pe.useContext(c0),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}=pe.useContext(vo);return r},h0=()=>{const{params:r}=pe.useContext(vo);return r},d0=()=>{const{commands:r}=pe.useContext(vo);return r},rk=(r,e,t=[])=>{const{addSetting:n}=pe.useContext(vo);pe.useEffect(()=>{n(r,e)},[...t])},nk=()=>pe.useContext(u0),ik=()=>{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 ah(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([],ah(t),ah(n))}function sk(r){try{return decodeURIComponent(r)}catch{let e=r.match(m0)||[];for(let t=1;t<e.length;t++)r=ah(e,t).join(""),e=r.match(m0)||[];return r}}function ak(r){const e={"%FE%FF":"��","%FF%FE":"��"};let t=y0.exec(r);for(;t;){try{e[t[0]]=decodeURIComponent(t[0])}catch{const i=sk(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 ok(r){if(typeof r!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof r+"`");try{return decodeURIComponent(r)}catch{return ak(r)}}function uk(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 ck=r=>r==null,lk=r=>encodeURIComponent(r).replaceAll(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),oh=Symbol("encodeFragmentIdentifier");function fk(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 hk(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?lk(r):encodeURIComponent(r):r}function wi(r,e){return e.decode?ok(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 dk(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 uh(r){r=w0(r);const e=r.indexOf("?");return e===-1?"":r.slice(e+1)}function ch(r,e){e={decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1,types:Object.create(null),...e},v0(e.arrayFormatSeparator);const t=hk(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&&ck(r[u])||e.skipEmptyString&&r[u]==="",n=fk(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:ch(uh(r),e),...e&&e.parseFragmentIdentifier&&n?{fragmentIdentifier:wi(n,e)}:{}}}function E0(r,e){e={encode:!0,strict:!0,[oh]:!0,...e};const t=w0(r.url).split("?")[0]||"",n=uh(r.url),i={...ch(n,{sort:!1}),...r.query};let a=x0(i,e);a&&(a=`?${a}`);let u=dk(r.url);if(typeof r.fragmentIdentifier=="string"){const c=new URL(t);c.hash=r.fragmentIdentifier,u=e[oh]?c.hash:`#${r.fragmentIdentifier}`}return`${t}${a}${u}`}function O0(r,e,t){t={parseFragmentIdentifier:!0,[oh]:!1,...t};const{url:n,query:i,fragmentIdentifier:a}=S0(r,t);return E0({url:n,query:uk(i,e),fragmentIdentifier:a},t)}function pk(r,e,t){const n=Array.isArray(e)?i=>!e.includes(i):(i,a)=>!e(i,a);return O0(r,n,t)}const mk=Object.freeze(Object.defineProperty({__proto__:null,exclude:pk,extract:uh,parse:ch,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 yk(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 lh;const gk=new Uint8Array(16);function vk(){if(!lh){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");lh=crypto.getRandomValues.bind(crypto)}return lh(gk)}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||vk)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,yk(n)}const fh="mm-auth-state",hh="mm-auth-destination",dh="mm-auth-access-token",_i=window.localStorage,bk=()=>_i.getItem(dh),wk=r=>{r?_i.setItem(dh,r):_i.removeItem(dh)},_k=()=>_i.getItem(hh),k0=r=>{r?_i.setItem(hh,r):_i.removeItem(hh)},xk=()=>_i.getItem(fh),I0=r=>{r?_i.setItem(fh,r):_i.removeItem(fh)},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 Sk(r){return er(r)&&"code"in r&&"reason"in r}function Ek(r){var e;return er(r)&&((e=r.target)===null||e===void 0?void 0:e.readyState)===WebSocket.CLOSED}var Ok=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:Hs(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=Sk(a);return u||Ek(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 ks(r){return un(r)==="object"}function Tk(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 Ak="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(!ks(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&&!ks(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(!ks(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&&!ks(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&&!ks(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(!ks(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(!Tk(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 kk(r,e){return N0(typeof r=="string"?JSON.parse(r,e):r)}function _o(r,e){return N0(r),JSON.stringify(r,e)}var fa=function(r){return this instanceof fa?(this.v=r,this):new fa(r)},Ik=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 fa?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 Ck(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(We){let Ie=1e3;for(let te=0;te<We;te++)Ie*=2;await new Promise(te=>setTimeout(te,Ie+Math.floor(Math.random()*2700+300)))},shouldRetry:y=ph,isFatalConnectionProblem:g,on:m,webSocketImpl:b,generateID:I=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,We=>{const Ie=Math.random()*16|0;return(We=="x"?Ie:Ie&3|8).toString(16)})},jsonMessageReplacer:S,jsonMessageReviver:_}=r;let T;if(b){if(!Nk(b))throw new Error("Invalid WebSocket implementation provided");T=b}else typeof WebSocket<"u"?T=WebSocket:typeof global<"u"?T=global.WebSocket||global.MozWebSocket:typeof window<"u"&&(T=window.WebSocket||window.MozWebSocket);if(!T)throw new Error("WebSocket implementation missing; on Node you can `import WebSocket from 'ws';` and pass `webSocketImpl: WebSocket` to `createClient`");const P=T,M=(()=>{const ye=(()=>{const Ie={};return{on(te,ge){return Ie[te]=ge,()=>{delete Ie[te]}},emit(te){var ge;"id"in te&&((ge=Ie[te.id])===null||ge===void 0||ge.call(Ie,te))}}})(),We={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?[ye.emit,m.message]:[ye.emit],closed:m!=null&&m.closed?[m.closed]:[],error:m!=null&&m.error?[m.error]:[]};return{onMessage:ye.on,on(Ie,te){const ge=We[Ie];return ge.push(te),()=>{ge.splice(ge.indexOf(te),1)}},emit(Ie,...te){for(const ge of[...We[Ie]])ge(...te)}}})();function U(ye){const We=[M.on("error",Ie=>{We.forEach(te=>te()),ye(Ie)}),M.on("closed",Ie=>{We.forEach(te=>te()),ye(Ie)})]}let z,Z=0,X,fe=!1,se=0,ke=!1;async function me(){clearTimeout(X);const[ye,We]=await(z??(z=new Promise((ge,xe)=>(async()=>{if(fe){if(await d(se),!Z)return z=void 0,xe({code:1e3,reason:"All Subscriptions Gone"});se++}M.emit("connecting",fe);const Se=new P(typeof e=="function"?await e():e,Ak);let Ve,rt;function kt(){isFinite(u)&&u>0&&(clearTimeout(rt),rt=setTimeout(()=>{Se.readyState===P.OPEN&&(Se.send(_o({type:mr.Ping})),M.emit("ping",!1,void 0))},u))}U(st=>{z=void 0,clearTimeout(Ve),clearTimeout(rt),xe(st),st instanceof R0&&(Se.close(4499,"Terminated"),Se.onerror=null,Se.onclose=null)}),Se.onerror=st=>M.emit("error",st),Se.onclose=st=>M.emit("closed",st),Se.onopen=async()=>{try{M.emit("opened",Se);const st=typeof t=="function"?await t():t;if(Se.readyState!==P.OPEN)return;Se.send(_o(st?{type:mr.ConnectionInit,payload:st}:{type:mr.ConnectionInit},S)),isFinite(f)&&f>0&&(Ve=setTimeout(()=>{Se.close(vn.ConnectionAcknowledgementTimeout,"Connection acknowledgement timeout")},f)),kt()}catch(st){M.emit("error",st),Se.close(vn.InternalClientError,P0(st instanceof Error?st.message:new Error(st).message,"Internal client error"))}};let Rt=!1;Se.onmessage=({data:st})=>{try{const Xe=kk(st,_);if(M.emit("message",Xe),Xe.type==="ping"||Xe.type==="pong"){M.emit(Xe.type,!0,Xe.payload),Xe.type==="pong"?kt():c||(Se.send(_o(Xe.payload?{type:mr.Pong,payload:Xe.payload}:{type:mr.Pong})),M.emit("pong",!1,Xe.payload));return}if(Rt)return;if(Xe.type!==mr.ConnectionAck)throw new Error(`First message cannot be of type ${Xe.type}`);clearTimeout(Ve),Rt=!0,M.emit("connected",Se,Xe.payload,fe),fe=!1,se=0,ge([Se,new Promise((Et,De)=>U(De))])}catch(Xe){Se.onmessage=null,M.emit("error",Xe),Se.close(vn.BadResponse,P0(Xe instanceof Error?Xe.message:new Error(Xe).message,"Bad response"))}}})())));ye.readyState===P.CLOSING&&await We;let Ie=()=>{};const te=new Promise(ge=>Ie=ge);return[ye,Ie,Promise.race([te.then(()=>{if(!Z){const ge=()=>ye.close(1e3,"Normal Closure");isFinite(a)&&a>0?X=setTimeout(()=>{ye.readyState===P.OPEN&&ge()},a):ge()}}),We])]}function Ne(ye){if(ph(ye)&&(Pk(ye.code)||[vn.InternalServerError,vn.InternalClientError,vn.BadRequest,vn.BadResponse,vn.Unauthorized,vn.SubprotocolNotAcceptable,vn.SubscriberAlreadyExists,vn.TooManyInitialisationRequests].includes(ye.code)))throw ye;if(ke)return!1;if(ph(ye)&&ye.code===1e3)return Z>0;if(!h||se>=h||!y(ye)||g!=null&&g(ye))throw ye;return fe=!0}n||(async()=>{for(Z++;;)try{const[,,ye]=await me();await ye}catch(ye){try{if(!Ne(ye))return}catch(We){return i==null?void 0:i(We)}}})();function Ce(ye,We){const Ie=I(ye);let te=!1,ge=!1,xe=()=>{Z--,te=!0};return(async()=>{for(Z++;;)try{const[Se,Ve,rt]=await me();if(te)return Ve();const kt=M.onMessage(Ie,Rt=>{switch(Rt.type){case mr.Next:{We.next(Rt.payload);return}case mr.Error:{ge=!0,te=!0,We.error(Rt.payload),xe();return}case mr.Complete:{te=!0,xe();return}}});Se.send(_o({id:Ie,type:mr.Subscribe,payload:ye},S)),xe=()=>{!te&&Se.readyState===P.OPEN&&Se.send(_o({id:Ie,type:mr.Complete},S)),Z--,te=!0,Ve()},await rt.finally(kt);return}catch(Se){if(!Ne(Se))return}})().then(()=>{ge||We.complete()}).catch(Se=>{We.error(Se)}),()=>{te||xe()}}return{on:M.on,subscribe:Ce,iterate(ye){const We=[],Ie={done:!1,error:null,resolve:()=>{}},te=Ce(ye,{next(xe){We.push(xe),Ie.resolve()},error(xe){Ie.done=!0,Ie.error=xe,Ie.resolve()},complete(){Ie.done=!0,Ie.resolve()}}),ge=function(){return Ik(this,arguments,function*(){for(;;){for(We.length||(yield fa(new Promise(Ve=>Ie.resolve=Ve)));We.length;)yield yield fa(We.shift());if(Ie.error)throw Ie.error;if(Ie.done)return yield fa(void 0)}})}();return ge.throw=async xe=>(Ie.done||(Ie.done=!0,Ie.error=xe,Ie.resolve()),{done:!0,value:void 0}),ge.return=async()=>(te(),{done:!0,value:void 0}),ge},async dispose(){if(ke=!0,z){const[ye]=await z;ye.close(1e3,"Normal Closure")}},terminate(){z&&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 ph(r){return ks(r)&&"code"in r&&"reason"in r}function Pk(r){return[1e3,1001,1006,1005,1012,1013,1014].includes(r)?!1:r>=1e3&&r<=1999}function Nk(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 mh={exports:{}};const Rk=ol(O1),Mk=ol(gO);var yh,F0;function ha(){return F0||(F0=1,yh=TypeError),yh}const Dk=ol(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var gh,L0;function ec(){if(L0)return gh;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,S=Function.prototype.toString,_=String.prototype.match,T=String.prototype.slice,P=String.prototype.replace,M=String.prototype.toUpperCase,U=String.prototype.toLowerCase,z=RegExp.prototype.test,Z=Array.prototype.concat,X=Array.prototype.join,fe=Array.prototype.slice,se=Math.floor,ke=typeof BigInt=="function"?BigInt.prototype.valueOf:null,me=Object.getOwnPropertySymbols,Ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ce=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ye=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ce||!0)?Symbol.toStringTag:null,We=Object.prototype.propertyIsEnumerable,Ie=(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||z.call(/e/,G))return G;var at=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof H=="number"){var vt=H<0?-se(-H):se(H);if(vt!==H){var ft=String(vt),He=T.call(G,ft.length+1);return P.call(ft,at,"$&_")+"."+P.call(P.call(He,/([0-9]{3})/g,"$&_"),/_$/,"")}}return P.call(G,at,"$&_")}var ge=Dk,xe=ge.custom,Se=q(xe)?xe:null,Ve={__proto__:null,double:'"',single:"'"},rt={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};gh=function H(G,at,vt,ft){var He=at||{};if(V(He,"quoteStyle")&&!V(Ve,He.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(He,"maxStringLength")&&(typeof He.maxStringLength=="number"?He.maxStringLength<0&&He.maxStringLength!==1/0:He.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Kt=V(He,"customInspect")?He.customInspect:!0;if(typeof Kt!="boolean"&&Kt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(He,"indent")&&He.indent!==null&&He.indent!==" "&&!(parseInt(He.indent,10)===He.indent&&He.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(He,"numericSeparator")&&typeof He.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var Zt=He.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 Ot(G,He);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 He.depth>"u"?5:He.depth;if(typeof vt>"u"&&(vt=0),vt>=Hr&&Hr>0&&typeof G=="object")return st(G)?"[Array]":"[Object]";var Fr=dr(He,vt);if(typeof ft>"u")ft=[];else if($e(ft,G)>=0)return"[Circular]";function Ut(Ye,et,tt){if(et&&(ft=fe.call(ft),ft.push(et)),tt){var gt={depth:He.depth};return V(He,"quoteStyle")&&(gt.quoteStyle=He.quoteStyle),H(Ye,gt,vt+1,ft)}return H(Ye,He,vt+1,ft)}if(typeof G=="function"&&!Et(G)){var Or=ze(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+"="+kt(Rt(Gr[Tr].value),"double",He);return ar+=">",G.childNodes&&G.childNodes.length&&(ar+="..."),ar+="</"+U.call(String(G.nodeName))+">",ar}if(st(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&&!We.call(G,"cause")?"{ ["+String(G)+"] "+X.call(Z.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"&&ge)return ge(G,{depth:Hr-vt});if(Kt!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(ae(G)){var Sn=[];return n&&n.call(G,function(Ye,et){Sn.push(Ut(et,G,!0)+" => "+Ut(Ye,G))}),zt("Map",t.call(G),Sn,Fr)}if(pt(G)){var Un=[];return c&&c.call(G,function(Ye){Un.push(Ut(Ye,G))}),zt("Set",u.call(G),Un,Fr)}if(we(G))return Er("WeakMap");if(mt(G))return Er("WeakSet");if(Qe(G))return Er("WeakRef");if(B(G))return Gt(Ut(Number(G)));if(J(G))return Gt(Ut(ke.call(G)));if(Q(G))return Gt(b.call(G));if(Ge(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(!Xe(G)&&!Et(G)){var R=Ht(G,Ut),ue=Ie?Ie(G)===Object.prototype:G instanceof Object||G.constructor===Object,ve=G instanceof Object?"":"null prototype",Pe=!ue&&ye&&Object(G)===G&&ye in G?T.call(_e(G),8,-1):ve?"Object":"",Be=ue||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",ct=Be+(Pe||ve?"["+X.call(Z.call([],Pe||[],ve||[]),": ")+"] ":"");return R.length===0?ct+"{}":Fr?ct+"{"+Ar(R,Fr)+"}":ct+"{ "+X.call(R,", ")+" }"}return String(G)};function kt(H,G,at){var vt=at.quoteStyle||G,ft=Ve[vt];return ft+H+ft}function Rt(H){return P.call(String(H),/"/g,""")}function st(H){return _e(H)==="[object Array]"&&(!ye||!(typeof H=="object"&&ye in H))}function Xe(H){return _e(H)==="[object Date]"&&(!ye||!(typeof H=="object"&&ye in H))}function Et(H){return _e(H)==="[object RegExp]"&&(!ye||!(typeof H=="object"&&ye in H))}function De(H){return _e(H)==="[object Error]"&&(!ye||!(typeof H=="object"&&ye in H))}function Ge(H){return _e(H)==="[object String]"&&(!ye||!(typeof H=="object"&&ye in H))}function B(H){return _e(H)==="[object Number]"&&(!ye||!(typeof H=="object"&&ye in H))}function Q(H){return _e(H)==="[object Boolean]"&&(!ye||!(typeof H=="object"&&ye 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"||!ke)return!1;try{return ke.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 _e(H){return I.call(H)}function ze(H){if(H.name)return H.name;var G=_.call(S.call(H),/^function\s*([\w$]+)/);return G?G[1]:null}function $e(H,G){if(H.indexOf)return H.indexOf(G);for(var at=0,vt=H.length;at<vt;at++)if(H[at]===G)return at;return-1}function ae(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 we(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 Qe(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 Ot(H,G){if(H.length>G.maxStringLength){var at=H.length-G.maxStringLength,vt="... "+at+" more character"+(at>1?"s":"");return Ot(T.call(H,0,G.maxStringLength),G)+vt}var ft=rt[G.quoteStyle||"single"];ft.lastIndex=0;var He=P.call(P.call(H,ft,"\\$1"),/[\x00-\x1f]/g,Wt);return kt(He,"single",G)}function Wt(H){var G=H.charCodeAt(0),at={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return at?"\\"+at:"\\x"+(G<16?"0":"")+M.call(G.toString(16))}function Gt(H){return"Object("+H+")"}function Er(H){return H+" { ? }"}function zt(H,G,at,vt){var ft=vt?Ar(at,vt):X.call(at,", ");return H+" ("+G+") {"+ft+"}"}function sr(H){for(var G=0;G<H.length;G++)if($e(H[G],`
|
|
129
129
|
`)>=0)return!1;return!0}function dr(H,G){var at;if(H.indent===" ")at=" ";else if(typeof H.indent=="number"&&H.indent>0)at=X.call(Array(H.indent+1)," ");else return null;return{base:at,prev:X.call(Array(G+1),at)}}function Ar(H,G){if(H.length===0)return"";var at=`
|
|
130
130
|
`+G.prev+G.base;return at+X.call(H,","+at)+`
|
|
131
|
-
`+G.prev}function Ht(H,G){var at=st(H),vt=[];if(at){vt.length=H.length;for(var ft=0;ft<H.length;ft++)vt[ft]=V(H,ft)?G(H[ft],H):""}var He=typeof me=="function"?me(H):[],Kt;if(Ce){Kt={};for(var Zt=0;Zt<He.length;Zt++)Kt["$"+He[Zt]]=He[Zt]}for(var Qt in H)V(H,Qt)&&(at&&String(Number(Qt))===Qt&&Qt<H.length||Ce&&Kt["$"+Qt]instanceof Symbol||(z.call(/[^\w$]/,Qt)?vt.push(G(Qt,H)+": "+G(H[Qt],H)):vt.push(Qt+": "+G(H[Qt],H))));if(typeof me=="function")for(var kr=0;kr<He.length;kr++)We.call(H,He[kr])&&vt.push("["+G(He[kr])+"]: "+G(H[He[kr]],H));return vt}return gh}var vh,q0;function Fk(){if(q0)return vh;q0=1;var r=ec(),e=ha(),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 vh=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},vh}var bh,j0;function U0(){return j0||(j0=1,bh=Object),bh}var wh,$0;function Lk(){return $0||($0=1,wh=Error),wh}var _h,B0;function qk(){return B0||(B0=1,_h=EvalError),_h}var xh,V0;function jk(){return V0||(V0=1,xh=RangeError),xh}var Sh,W0;function Uk(){return W0||(W0=1,Sh=ReferenceError),Sh}var Eh,z0;function $k(){return z0||(z0=1,Eh=SyntaxError),Eh}var Oh,H0;function Bk(){return H0||(H0=1,Oh=URIError),Oh}var Th,G0;function Vk(){return G0||(G0=1,Th=Math.abs),Th}var Ah,Q0;function Wk(){return Q0||(Q0=1,Ah=Math.floor),Ah}var kh,J0;function zk(){return J0||(J0=1,kh=Math.max),kh}var Ih,Y0;function Hk(){return Y0||(Y0=1,Ih=Math.min),Ih}var Ch,K0;function Gk(){return K0||(K0=1,Ch=Math.pow),Ch}var Ph,Z0;function Qk(){return Z0||(Z0=1,Ph=Math.round),Ph}var Nh,X0;function Jk(){return X0||(X0=1,Nh=Number.isNaN||function(e){return e!==e}),Nh}var Rh,eb;function Yk(){if(eb)return Rh;eb=1;var r=Jk();return Rh=function(t){return r(t)||t===0?t:t<0?-1:1},Rh}var Mh,tb;function Kk(){return tb||(tb=1,Mh=Object.getOwnPropertyDescriptor),Mh}var Dh,rb;function nb(){if(rb)return Dh;rb=1;var r=Kk();if(r)try{r([],"length")}catch{r=null}return Dh=r,Dh}var Fh,ib;function Zk(){if(ib)return Fh;ib=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Fh=r,Fh}var Lh,sb;function Xk(){return sb||(sb=1,Lh=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}),Lh}var qh,ab;function eI(){if(ab)return qh;ab=1;var r=typeof Symbol<"u"&&Symbol,e=Xk();return qh=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},qh}var jh,ob;function ub(){return ob||(ob=1,jh=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jh}var Uh,cb;function lb(){if(cb)return Uh;cb=1;var r=U0();return Uh=r.getPrototypeOf||null,Uh}var $h,fb;function tI(){if(fb)return $h;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 $h=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 S=function(){};S.prototype=h.prototype,y.prototype=new S,S.prototype=null}return y},$h}var Bh,hb;function tc(){if(hb)return Bh;hb=1;var r=tI();return Bh=Function.prototype.bind||r,Bh}var Vh,db;function Wh(){return db||(db=1,Vh=Function.prototype.call),Vh}var zh,pb;function mb(){return pb||(pb=1,zh=Function.prototype.apply),zh}var Hh,yb;function rI(){return yb||(yb=1,Hh=typeof Reflect<"u"&&Reflect&&Reflect.apply),Hh}var Gh,gb;function nI(){if(gb)return Gh;gb=1;var r=tc(),e=mb(),t=Wh(),n=rI();return Gh=n||r.call(t,e),Gh}var Qh,vb;function bb(){if(vb)return Qh;vb=1;var r=tc(),e=ha(),t=Wh(),n=nI();return Qh=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(r,t,a)},Qh}var Jh,wb;function iI(){if(wb)return Jh;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 Jh=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(c){return a(c==null?c:i(c))}:!1,Jh}var Yh,_b;function sI(){if(_b)return Yh;_b=1;var r=ub(),e=lb(),t=iI();return Yh=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,Yh}var Kh,xb;function aI(){if(xb)return Kh;xb=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=tc();return Kh=t.call(r,e),Kh}var Zh,Sb;function Xh(){if(Sb)return Zh;Sb=1;var r,e=U0(),t=Lk(),n=qk(),i=jk(),a=Uk(),u=$k(),c=ha(),f=Bk(),h=Vk(),d=Wk(),y=zk(),g=Hk(),m=Gk(),b=Qk(),I=Yk(),S=Function,_=function(De){try{return S('"use strict"; return ('+De+").constructor;")()}catch{}},T=nb(),P=Zk(),M=function(){throw new c},U=T?function(){try{return arguments.callee,M}catch{try{return T(arguments,"callee").get}catch{return M}}}():M,z=eI()(),Z=sI(),X=lb(),fe=ub(),se=mb(),ke=Wh(),me={},Ne=typeof Uint8Array>"u"||!Z?r:Z(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":z&&Z?Z([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":me,"%AsyncGenerator%":me,"%AsyncGeneratorFunction%":me,"%AsyncIteratorPrototype%":me,"%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%":S,"%GeneratorFunction%":me,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":z&&Z?Z(Z([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!z||!Z?r:Z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":T,"%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"||!z||!Z?r:Z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&Z?Z(""[Symbol.iterator]()):r,"%Symbol%":z?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%":ke,"%Function.prototype.apply%":se,"%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(Z)try{null.error}catch(De){var ye=Z(Z(De));Ce["%Error.prototype%"]=ye}var We=function De(Ge){var B;if(Ge==="%AsyncFunction%")B=_("async function () {}");else if(Ge==="%GeneratorFunction%")B=_("function* () {}");else if(Ge==="%AsyncGeneratorFunction%")B=_("async function* () {}");else if(Ge==="%AsyncGenerator%"){var Q=De("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(Ge==="%AsyncIteratorPrototype%"){var q=De("%AsyncGenerator%");q&&Z&&(B=Z(q.prototype))}return Ce[Ge]=B,B},Ie={__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(),ge=aI(),xe=te.call(ke,Array.prototype.concat),Se=te.call(se,Array.prototype.splice),Ve=te.call(ke,String.prototype.replace),rt=te.call(ke,String.prototype.slice),kt=te.call(ke,RegExp.prototype.exec),Rt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,st=/\\(\\)?/g,Xe=function(Ge){var B=rt(Ge,0,1),Q=rt(Ge,-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 Ve(Ge,Rt,function(J,ee,V,_e){q[q.length]=V?Ve(_e,st,"$1"):ee||J}),q},Et=function(Ge,B){var Q=Ge,q;if(ge(Ie,Q)&&(q=Ie[Q],Q="%"+q[0]+"%"),ge(Ce,Q)){var J=Ce[Q];if(J===me&&(J=We(Q)),typeof J>"u"&&!B)throw new c("intrinsic "+Ge+" exists, but is not available. Please file an issue!");return{alias:q,name:Q,value:J}}throw new u("intrinsic "+Ge+" does not exist!")};return Zh=function(Ge,B){if(typeof Ge!="string"||Ge.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(kt(/^%?[^%]*%?$/,Ge)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Q=Xe(Ge),q=Q.length>0?Q[0]:"",J=Et("%"+q+"%",B),ee=J.name,V=J.value,_e=!1,ze=J.alias;ze&&(q=ze[0],Se(Q,xe([0,1],ze)));for(var $e=1,ae=!0;$e<Q.length;$e+=1){var we=Q[$e],Qe=rt(we,0,1),pt=rt(we,-1);if((Qe==='"'||Qe==="'"||Qe==="`"||pt==='"'||pt==="'"||pt==="`")&&Qe!==pt)throw new u("property names with quotes must have matching quotes");if((we==="constructor"||!ae)&&(_e=!0),q+="."+we,ee="%"+q+"%",ge(Ce,ee))V=Ce[ee];else if(V!=null){if(!(we in V)){if(!B)throw new c("base intrinsic for "+Ge+" exists, but the property is not available.");return}if(T&&$e+1>=Q.length){var mt=T(V,we);ae=!!mt,ae&&"get"in mt&&!("originalValue"in mt.get)?V=mt.get:V=V[we]}else ae=ge(V,we),V=V[we];ae&&!_e&&(Ce[ee]=V)}}return V},Zh}var ed,Eb;function Ob(){if(Eb)return ed;Eb=1;var r=Xh(),e=bb(),t=e([r("%String.prototype.indexOf%")]);return ed=function(i,a){var u=r(i,!!a);return typeof u=="function"&&t(i,".prototype.")>-1?e([u]):u},ed}var td,Tb;function Ab(){if(Tb)return td;Tb=1;var r=Xh(),e=Ob(),t=ec(),n=ha(),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 td=!!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},td}var rd,kb;function oI(){if(kb)return rd;kb=1;var r=Xh(),e=Ob(),t=ec(),n=Ab(),i=ha(),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 rd=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,rd}var nd,Ib;function uI(){if(Ib)return nd;Ib=1;var r=ha(),e=ec(),t=Fk(),n=Ab(),i=oI(),a=i||n||t;return nd=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},nd}var id,Cb;function sd(){if(Cb)return id;Cb=1;var r=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return id={default:t.RFC3986,formatters:{RFC1738:function(n){return r.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},id}var ad,Pb;function Nb(){if(Pb)return ad;Pb=1;var r=sd(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var S=[],_=0;_<256;++_)S.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return S}(),i=function(_){for(;_.length>1;){var T=_.pop(),P=T.obj[T.prop];if(t(P)){for(var M=[],U=0;U<P.length;++U)typeof P[U]<"u"&&M.push(P[U]);T.obj[T.prop]=M}}},a=function(_,T){for(var P=T&&T.plainObjects?Object.create(null):{},M=0;M<_.length;++M)typeof _[M]<"u"&&(P[M]=_[M]);return P},u=function S(_,T,P){if(!T)return _;if(typeof T!="object"){if(t(_))_.push(T);else if(_&&typeof _=="object")(P&&(P.plainObjects||P.allowPrototypes)||!e.call(Object.prototype,T))&&(_[T]=!0);else return[_,T];return _}if(!_||typeof _!="object")return[_].concat(T);var M=_;return t(_)&&!t(T)&&(M=a(_,P)),t(_)&&t(T)?(T.forEach(function(U,z){if(e.call(_,z)){var Z=_[z];Z&&typeof Z=="object"&&U&&typeof U=="object"?_[z]=S(Z,U,P):_.push(U)}else _[z]=U}),_):Object.keys(T).reduce(function(U,z){var Z=T[z];return e.call(U,z)?U[z]=S(U[z],Z,P):U[z]=Z,U},M)},c=function(_,T){return Object.keys(T).reduce(function(P,M){return P[M]=T[M],P},_)},f=function(S,_,T){var P=S.replace(/\+/g," ");if(T==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,d=function(_,T,P,M,U){if(_.length===0)return _;var z=_;if(typeof _=="symbol"?z=Symbol.prototype.toString.call(_):typeof _!="string"&&(z=String(_)),P==="iso-8859-1")return escape(z).replace(/%u[0-9a-f]{4}/gi,function(Ne){return"%26%23"+parseInt(Ne.slice(2),16)+"%3B"});for(var Z="",X=0;X<z.length;X+=h){for(var fe=z.length>=h?z.slice(X,X+h):z,se=[],ke=0;ke<fe.length;++ke){var me=fe.charCodeAt(ke);if(me===45||me===46||me===95||me===126||me>=48&&me<=57||me>=65&&me<=90||me>=97&&me<=122||U===r.RFC1738&&(me===40||me===41)){se[se.length]=fe.charAt(ke);continue}if(me<128){se[se.length]=n[me];continue}if(me<2048){se[se.length]=n[192|me>>6]+n[128|me&63];continue}if(me<55296||me>=57344){se[se.length]=n[224|me>>12]+n[128|me>>6&63]+n[128|me&63];continue}ke+=1,me=65536+((me&1023)<<10|fe.charCodeAt(ke)&1023),se[se.length]=n[240|me>>18]+n[128|me>>12&63]+n[128|me>>6&63]+n[128|me&63]}Z+=se.join("")}return Z},y=function(_){for(var T=[{obj:{o:_},prop:"o"}],P=[],M=0;M<T.length;++M)for(var U=T[M],z=U.obj[U.prop],Z=Object.keys(z),X=0;X<Z.length;++X){var fe=Z[X],se=z[fe];typeof se=="object"&&se!==null&&P.indexOf(se)===-1&&(T.push({obj:z,prop:fe}),P.push(se))}return i(T),_},g=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},m=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},b=function(_,T){return[].concat(_,T)},I=function(_,T){if(t(_)){for(var P=[],M=0;M<_.length;M+=1)P.push(T(_[M]));return P}return T(_)};return ad={arrayToObject:a,assign:c,combine:b,compact:y,decode:f,encode:d,isBuffer:m,isRegExp:g,maybeMap:I,merge:u},ad}var od,Rb;function cI(){if(Rb)return od;Rb=1;var r=uI(),e=Nb(),t=sd(),n=Object.prototype.hasOwnProperty,i={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,_){return S+"["+_+"]"},repeat:function(S){return S}},a=Array.isArray,u=Array.prototype.push,c=function(I,S){u.apply(I,a(S)?S:[S])},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(S){return f.call(S)},skipNulls:!1,strictNullHandling:!1},y=function(S){return typeof S=="string"||typeof S=="number"||typeof S=="boolean"||typeof S=="symbol"||typeof S=="bigint"},g={},m=function I(S,_,T,P,M,U,z,Z,X,fe,se,ke,me,Ne,Ce,ye,We,Ie){for(var te=S,ge=Ie,xe=0,Se=!1;(ge=ge.get(g))!==void 0&&!Se;){var Ve=ge.get(S);if(xe+=1,typeof Ve<"u"){if(Ve===xe)throw new RangeError("Cyclic object value");Se=!0}typeof ge.get(g)>"u"&&(xe=0)}if(typeof fe=="function"?te=fe(_,te):te instanceof Date?te=me(te):T==="comma"&&a(te)&&(te=e.maybeMap(te,function(ee){return ee instanceof Date?me(ee):ee})),te===null){if(U)return X&&!ye?X(_,d.encoder,We,"key",Ne):_;te=""}if(y(te)||e.isBuffer(te)){if(X){var rt=ye?_:X(_,d.encoder,We,"key",Ne);return[Ce(rt)+"="+Ce(X(te,d.encoder,We,"value",Ne))]}return[Ce(_)+"="+Ce(String(te))]}var kt=[];if(typeof te>"u")return kt;var Rt;if(T==="comma"&&a(te))ye&&X&&(te=e.maybeMap(te,X)),Rt=[{value:te.length>0?te.join(",")||null:void 0}];else if(a(fe))Rt=fe;else{var st=Object.keys(te);Rt=se?st.sort(se):st}var Xe=Z?_.replace(/\./g,"%2E"):_,Et=P&&a(te)&&te.length===1?Xe+"[]":Xe;if(M&&a(te)&&te.length===0)return Et+"[]";for(var De=0;De<Rt.length;++De){var Ge=Rt[De],B=typeof Ge=="object"&&typeof Ge.value<"u"?Ge.value:te[Ge];if(!(z&&B===null)){var Q=ke&&Z?Ge.replace(/\./g,"%2E"):Ge,q=a(te)?typeof T=="function"?T(Et,Q):Et:Et+(ke?"."+Q:"["+Q+"]");Ie.set(S,xe);var J=r();J.set(g,Ie),c(kt,I(B,q,T,P,M,U,z,Z,T==="comma"&&ye&&a(te)?null:X,fe,se,ke,me,Ne,Ce,ye,We,J))}}return kt},b=function(S){if(!S)return d;if(typeof S.allowEmptyArrays<"u"&&typeof S.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof S.encodeDotInKeys<"u"&&typeof S.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(S.encoder!==null&&typeof S.encoder<"u"&&typeof S.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=S.charset||d.charset;if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var T=t.default;if(typeof S.format<"u"){if(!n.call(t.formatters,S.format))throw new TypeError("Unknown format option provided.");T=S.format}var P=t.formatters[T],M=d.filter;(typeof S.filter=="function"||a(S.filter))&&(M=S.filter);var U;if(S.arrayFormat in i?U=S.arrayFormat:"indices"in S?U=S.indices?"indices":"repeat":U=d.arrayFormat,"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var z=typeof S.allowDots>"u"?S.encodeDotInKeys===!0?!0:d.allowDots:!!S.allowDots;return{addQueryPrefix:typeof S.addQueryPrefix=="boolean"?S.addQueryPrefix:d.addQueryPrefix,allowDots:z,allowEmptyArrays:typeof S.allowEmptyArrays=="boolean"?!!S.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:U,charset:_,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:d.charsetSentinel,commaRoundTrip:S.commaRoundTrip,delimiter:typeof S.delimiter>"u"?d.delimiter:S.delimiter,encode:typeof S.encode=="boolean"?S.encode:d.encode,encodeDotInKeys:typeof S.encodeDotInKeys=="boolean"?S.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof S.encoder=="function"?S.encoder:d.encoder,encodeValuesOnly:typeof S.encodeValuesOnly=="boolean"?S.encodeValuesOnly:d.encodeValuesOnly,filter:M,format:T,formatter:P,serializeDate:typeof S.serializeDate=="function"?S.serializeDate:d.serializeDate,skipNulls:typeof S.skipNulls=="boolean"?S.skipNulls:d.skipNulls,sort:typeof S.sort=="function"?S.sort:null,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:d.strictNullHandling}};return od=function(I,S){var _=I,T=b(S),P,M;typeof T.filter=="function"?(M=T.filter,_=M("",_)):a(T.filter)&&(M=T.filter,P=M);var U=[];if(typeof _!="object"||_===null)return"";var z=i[T.arrayFormat],Z=z==="comma"&&T.commaRoundTrip;P||(P=Object.keys(_)),T.sort&&P.sort(T.sort);for(var X=r(),fe=0;fe<P.length;++fe){var se=P[fe];T.skipNulls&&_[se]===null||c(U,m(_[se],se,z,Z,T.allowEmptyArrays,T.strictNullHandling,T.skipNulls,T.encodeDotInKeys,T.encode?T.encoder:null,T.filter,T.sort,T.allowDots,T.serializeDate,T.format,T.formatter,T.encodeValuesOnly,T.charset,X))}var ke=U.join(T.delimiter),me=T.addQueryPrefix===!0?"?":"";return T.charsetSentinel&&(T.charset==="iso-8859-1"?me+="utf8=%26%2310003%3B&":me+="utf8=%E2%9C%93&"),ke.length>0?me+ke:""},od}var ud,Mb;function lI(){if(Mb)return ud;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},S=b.ignoreQueryPrefix?m.replace(/^\?/,""):m;S=S.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var _=b.parameterLimit===1/0?void 0:b.parameterLimit,T=S.split(b.delimiter,_),P=-1,M,U=b.charset;if(b.charsetSentinel)for(M=0;M<T.length;++M)T[M].indexOf("utf8=")===0&&(T[M]===c?U="utf-8":T[M]===u&&(U="iso-8859-1"),P=M,M=T.length);for(M=0;M<T.length;++M)if(M!==P){var z=T[M],Z=z.indexOf("]="),X=Z===-1?z.indexOf("="):Z+1,fe,se;X===-1?(fe=b.decoder(z,n.decoder,U,"key"),se=b.strictNullHandling?null:""):(fe=b.decoder(z.slice(0,X),n.decoder,U,"key"),se=r.maybeMap(a(z.slice(X+1),b),function(me){return b.decoder(me,n.decoder,U,"value")})),se&&b.interpretNumericEntities&&U==="iso-8859-1"&&(se=i(se)),z.indexOf("[]=")>-1&&(se=t(se)?[se]:se);var ke=e.call(I,fe);ke&&b.duplicates==="combine"?I[fe]=r.combine(I[fe],se):(!ke||b.duplicates==="last")&&(I[fe]=se)}return I},h=function(g,m,b,I){for(var S=I?m:a(m,b),_=g.length-1;_>=0;--_){var T,P=g[_];if(P==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(S===""||b.strictNullHandling&&S===null)?[]:[].concat(S);else{T=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,z=parseInt(U,10);!b.parseArrays&&U===""?T={0:S}:!isNaN(z)&&P!==U&&String(z)===U&&z>=0&&b.parseArrays&&z<=b.arrayLimit?(T=[],T[z]=S):U!=="__proto__"&&(T[U]=S)}S=T}return S},d=function(m,b,I,S){if(m){var _=I.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,T=/(\[[^[\]]*])/,P=/(\[[^[\]]*])/g,M=I.depth>0&&T.exec(_),U=M?_.slice(0,M.index):_,z=[];if(U){if(!I.plainObjects&&e.call(Object.prototype,U)&&!I.allowPrototypes)return;z.push(U)}for(var Z=0;I.depth>0&&(M=P.exec(_))!==null&&Z<I.depth;){if(Z+=1,!I.plainObjects&&e.call(Object.prototype,M[1].slice(1,-1))&&!I.allowPrototypes)return;z.push(M[1])}if(M){if(I.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+I.depth+" and strictDepth is true");z.push("["+_.slice(M.index)+"]")}return h(z,b,I,S)}},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 S=typeof m.allowDots>"u"?m.decodeDotInKeys===!0?!0:n.allowDots:!!m.allowDots;return{allowDots:S,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 ud=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,S=b.plainObjects?Object.create(null):{},_=Object.keys(I),T=0;T<_.length;++T){var P=_[T],M=d(P,I[P],b,typeof g=="string");S=r.merge(S,M,b)}return b.allowSparse===!0?S:r.compact(S)},ud}var cd,Db;function fI(){if(Db)return cd;Db=1;var r=cI(),e=lI(),t=sd();return cd={formats:t,parse:e,stringify:r},cd}(function(r,e){(function(t,n){n(e,Rk,Mk,fI())})(pi,function(t,n,i,a){var u=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(_e){_e(V)})}return new(q||(q=Promise))(function(V,_e){function ze(we){try{ae(J.next(we))}catch(Qe){_e(Qe)}}function $e(we){try{ae(J.throw(we))}catch(Qe){_e(Qe)}}function ae(we){we.done?V(we.value):ee(we.value).then(ze,$e)}ae((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,_e;return _e={next:ze(0),throw:ze(1),return:ze(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function ze(ae){return function(we){return $e([ae,we])}}function $e(ae){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=ae[0]&2?ee.return:ae[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,ae[1])).done)return V;switch(ee=0,V&&(ae=[ae[0]&2,V.value]),ae[0]){case 0:case 1:V=ae;break;case 4:return q.label++,{value:ae[1],done:!1};case 5:q.label++,ee=ae[1],ae=[0];continue;case 7:ae=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(ae[0]===6||ae[0]===2)){q=0;continue}if(ae[0]===3&&(!V||ae[1]>V[0]&&ae[1]<V[3])){q.label=ae[1];break}if(ae[0]===6&&q.label<V[1]){q.label=V[1],V=ae;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(ae);break}V[2]&&q.ops.pop(),q.trys.pop();continue}ae=Q.call(B,q)}catch(we){ae=[6,we],ee=0}finally{J=V=0}if(ae[0]&5)throw ae[1];return{value:ae[0]?ae[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 _e=i.getMainDefinition(Q),ze=i.getFragmentDefinitions(Q),$e=i.createFragmentMap(ze),ae=V.resultMapper,we=V.fragmentMatcher||function(){return!0},Qe={fragmentMap:$e,contextValue:J,variableValues:ee,resultMapper:ae,resolver:B,fragmentMatcher:we};return g(_e.selectionSet,q,Qe)}function g(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,_e,ze,$e=this;return c(this,function(ae){switch(ae.label){case 0:return J=q.fragmentMap,ee=q.contextValue,V=q.variableValues,_e={},ze=function(we){return u($e,void 0,void 0,function(){var Qe,pt,mt,Yt,Ot;return c(this,function(Wt){switch(Wt.label){case 0:return i.shouldInclude(we,V)?i.isField(we)?[4,m(we,Q,q)]:[3,2]:[2];case 1:return Qe=Wt.sent(),pt=i.resultKeyNameFromField(we),Qe!==void 0&&(_e[pt]===void 0?_e[pt]=Qe:d(_e[pt],Qe)),[2];case 2:if(i.isInlineFragment(we))mt=we;else if(mt=J[we.name.value],!mt)throw new Error("No fragment named "+we.name.value);return Yt=mt.typeCondition.name.value,q.fragmentMatcher(Q,Yt,ee)?[4,g(mt.selectionSet,Q,q)]:[3,4];case 3:Ot=Wt.sent(),d(_e,Ot),Wt.label=4;case 4:return[2]}})})},[4,Promise.all(B.selections.map(ze))];case 1:return ae.sent(),q.resultMapper?[2,q.resultMapper(_e,Q)]:[2,_e]}})})}function m(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,_e,ze,$e,ae;return c(this,function(we){switch(we.label){case 0:return J=q.variableValues,ee=q.contextValue,V=q.resolver,_e=B.name.value,ze=i.argumentsObjectFromField(B,J),$e={isLeaf:!B.selectionSet,resultKey:i.resultKeyNameFromField(B),directives:f(B,J),field:B},[4,V(_e,Q,ze,ee,$e)];case 1:return ae=we.sent(),B.selectionSet?ae==null?[2,ae]:Array.isArray(ae)?[2,b(B,ae,q)]:[2,g(B.selectionSet,ae,q)]:[2,ae]}})})}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)}}(),S=function(){return S=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},S.apply(this,arguments)},_=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(_e){_e(V)})}return new(q||(q=Promise))(function(V,_e){function ze(we){try{ae(J.next(we))}catch(Qe){_e(Qe)}}function $e(we){try{ae(J.throw(we))}catch(Qe){_e(Qe)}}function ae(we){we.done?V(we.value):ee(we.value).then(ze,$e)}ae((J=J.apply(B,Q||[])).next())})},T=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,_e;return _e={next:ze(0),throw:ze(1),return:ze(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function ze(ae){return function(we){return $e([ae,we])}}function $e(ae){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=ae[0]&2?ee.return:ae[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,ae[1])).done)return V;switch(ee=0,V&&(ae=[ae[0]&2,V.value]),ae[0]){case 0:case 1:V=ae;break;case 4:return q.label++,{value:ae[1],done:!1};case 5:q.label++,ee=ae[1],ae=[0];continue;case 7:ae=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(ae[0]===6||ae[0]===2)){q=0;continue}if(ae[0]===3&&(!V||ae[1]>V[0]&&ae[1]<V[3])){q.label=ae[1];break}if(ae[0]===6&&q.label<V[1]){q.label=V[1],V=ae;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(ae);break}V[2]&&q.ops.pop(),q.trys.pop();continue}ae=Q.call(B,q)}catch(we){ae=[6,we],ee=0}finally{J=V=0}if(ae[0]&5)throw ae[1];return{value:ae[0]?ae[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],_e=0,ze=V.length;_e<ze;_e++,ee++)J[ee]=V[_e];return J},M=function(B){var Q=B.replace(/\s/g,""),q=Q.replace(/\[(.*)\]/,function(J,ee,V,_e){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)},z=function(B){return B.directives&&B.directives.length?B.directives.find(function(Q){return Q.name.value==="rest"}):null};function Z(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))Z(B,Q,q,J,V.selectionSet);else if(V.kind==="FragmentSpread"){var _e=J[V.name.value];Z(B,Q,q,J,_e.selectionSet)}else if(i.isField(V)){var ze=i.resultKeyNameFromField(V);ze===B&&z(V)!=null?X(Q,q,J,V.selectionSet):Z(B,Q,q,J,V.selectionSet)}else return function($e){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 _e=B[ee.name.value];ee.name.value==="__typename"||(typeof _e>"u"?B[ee.name.value]=null:_e!=null&&typeof _e=="object"&&ee.selectionSet!=null&&X(_e,Q,q,ee.selectionSet))}else return function(ze){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()})}}var fe=function(B,Q){var q=B[Q||st]||B[st];return typeof q=="string"?{uri:q}:S({responseTransformer:null},q)},se=function(B,Q,q){return q===void 0||Q===void 0?B:B.replace(":"+Q,q)},ke=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(ze,$e){if($e===""||$e==="{}")return ze+$e.length;var ae=ze+$e.length;if($e[0]==="{"&&$e[$e.length-1]==="}"){var we=$e.slice(1,$e.length-1).split(".");ee.push(function(Qe,pt){try{var mt=me(Qe,we);return!pt||typeof mt!="object"||mt==null?String(mt):a.stringify(mt)}catch{var Yt=[Q,we.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($e),!V&&ae>=q&&(V=!0,ee.push(!0));return ae},0);var _e=function(ze){var $e=!1,ae=ee.reduce(function(we,Qe){return typeof Qe=="string"?we+Qe:typeof Qe=="boolean"?($e=!0,we):we+Qe(ze,$e)},"");return ae};return B.cache[Q]=_e},B.cache={},B.warnTable={},B.argReplacement=/({[._a-zA-Z0-9]*})/,B}();function me(B,Q){if(Q.length===0)return B;var q=P(Q),J=q.shift();return me(B[J],q)}var Ne=["__typename"],Ce=typeof globalThis=="object"&&globalThis||pi,ye=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 ye(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 _e=B[V];if(Ne.indexOf(V)!==-1)return ee[V]=_e,ee;var ze=P(q,[V]);return ee[J(V,ze)]=ye(_e,J,ze),ee},{})},We=function(B){return B},Ie=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=Ie(J)),J.forEach(function(ee,V){q.append(V,ee)})),q},new Headers)},ge=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)},xe=function(B){return function(Q,q){return ge(Q,B,q)}},Se=["GET","POST","PUT","PATCH","DELETE"],Ve=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}},rt=function(B,Q,q){var J=new Error(q);throw J.response=B,J.statusCode=B.status,J.result=Q,J},kt=function(B,Q){return B==null||typeof B!="object"?B:Array.isArray(B)?B.map(function(q){return kt(q,Q)}):(B.__typename=Q,B)},Rt=function(B,Q,q,J,ee){return _(void 0,void 0,void 0,function(){var V,_e,ze,$e,ae,we,Qe,pt,mt,Yt,Ot,Wt,Gt,Er,zt,sr,dr,Ar,Ht,H,G,at,vt,ft,He,Kt,Zt,Qt,kr,Hr,Fr,Ut,Or,$r,Lr,ar,Gr,Tr,gr,Ir,Sn,Un,R,ue,ve,Pe,Be,ct,Ye,et;return T(this,function(tt){switch(tt.label){case 0:if(V=ee.directives,_e=ee.isLeaf,ze=ee.resultKey,$e=J.exportVariablesByNode,ae=$e.get(Q)||{},we=function(gt){return gt instanceof Array?gt.forEach(we):$e.set(gt,S({},ae)),gt},Qe=(Q||{})[ze],pt=(Q||{})[B],Q&&V&&V.export&&(ae[V.export.as]=pt),mt=V&&V.type,!_e&&mt){if(V.rest)throw new Error("Invalid use of @type(name: ...) directive on a call that also has @rest(...)");return we(pt),[2,kt(pt,V.type.name)]}if(Yt=!V||!V.rest,Yt)return[2,we(Qe||pt)];if(Ot=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,at=J.responseTransformer,vt=i.createFragmentMap(Ar),ft=V.rest,He=ft.path,Kt=ft.endpoint,Zt=ft.pathBuilder,Qt=fe(Wt,Kt),kr=He==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||(He.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,A=S(S({},w),k),C=Object.keys(A).reduce(function(D,$){return se(D,$,A[$])},He);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=ke.replacerForPath(He)),Hr={args:q,exportVariables:ae,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=ye(Lr(Hr),Gr||H||We),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[Xe](Ir,Gt);Ir=R.body,Sn=new Headers(R.headers)}return Ve(Or,zt||"query"),ue=S({method:Or,headers:Sn||Gt,body:Ir},Ot?{credentials:Ot}:{}),ve=""+Qt.uri+Fr,[4,(Er||fetch)(ve,ue)];case 1:return Pe=tt.sent(),J.responses.push(Pe),Pe.ok?(Pe.status===204||Pe.headers.get("Content-Length")==="0"?Be={}:Be=Pe,[3,9]):[3,2];case 2:return Pe.status!==404?[3,3]:(Be=null,[3,9]);case 3:ct=void 0,tt.label=4;case 4:return tt.trys.push([4,6,,8]),[4,Pe.clone().json()];case 5:return ct=tt.sent(),[3,8];case 6:return tt.sent(),[4,Pe.clone().text()];case 7:return ct=tt.sent(),[3,8];case 8:rt(Pe,ct,"Response not successful: Received status code "+Pe.status),tt.label=9;case 9:if(Ye=Qt.responseTransformer||at,!Ye)return[3,14];tt.label=10;case 10:return tt.trys.push([10,12,,13]),[4,Ye(Be,$r)];case 11:return Be=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 Be&&Be.json?[4,Be.json()]:[3,16];case 15:Be=tt.sent(),tt.label=16;case 16:return Be=ye(Be,Tr||Ht||We),Be=Z(ze,Be,dr,vt,dr.selectionSet),Be=U(Be,$r,sr,{resolverParams:{fieldName:B,root:Q,args:q,context:J,info:ee}}),[2,we(Be)]}})})},st="",Xe="",Et=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},Ge=function(B){I(Q,B);function Q(q){var J,ee=q.uri,V=q.endpoints,_e=q.headers,ze=q.fieldNameNormalizer,$e=q.fieldNameDenormalizer,ae=q.typePatcher,we=q.customFetch,Qe=q.credentials,pt=q.bodySerializers,mt=q.defaultSerializer,Yt=q.responseTransformer,Ot=B.call(this)||this,Wt={};if(Wt[st]=ee||"",Ot.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||{})[st];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.");Ot.endpoints[st]=ee}if(Ot.endpoints[st]==null&&console.warn("RestLink configured without a default URI. All @rest(…) directives must provide an endpoint key!"),ae==null)Ot.typePatcher=function(zt,sr,dr){return S({__typename:sr},zt)};else if(!Array.isArray(ae)&&typeof ae=="object"&&Object.keys(ae).map(function(zt){return ae[zt]}).reduce(function(zt,sr){return zt&&typeof sr=="function"},!0)){var Er=ae;Ot.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 S({__typename:Ht},H(zt,Ht,dr,Ar))}}else throw new Error("RestLink was configured with a typePatcher of invalid type!");return pt&&pt.hasOwnProperty(Xe)&&console.warn("RestLink was configured to override the default serializer! This may result in unexpected behavior"),Ot.responseTransformer=Yt||null,Ot.fieldNameNormalizer=ze||null,Ot.fieldNameDenormalizer=$e||null,Ot.headers=Ie(_e),Ot.credentials=Qe||null,Ot.customFetch=we,Ot.serializers=S((J={},J[Xe]=mt||Et,J),pt||{}),Ot.processedDocuments=new Map,Ot}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,_e=q.getContext,ze=q.setContext,$e=_e(),ae=i.hasDirectives(["rest"],ee);if(!ae)return J(q);var we=this.removeRestSetsFromDocument(ee),Qe=$e.headersMergePolicy;Qe==null&&Array.isArray($e.headersToOverride)?Qe=xe($e.headersToOverride):Qe==null&&(Qe=te);var pt=Qe(this.headers,$e.headers);pt.has("Accept")||pt.append("Accept","application/json");var mt=$e.credentials||this.credentials,Yt=i.addTypenameToDocument(ee),Ot=i.getMainDefinition(ee),Wt=i.getFragmentDefinitions(ee),Gt=(Ot||{}).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:Ot,fragmentDefinitions:Wt,typePatcher:this.typePatcher,serializers:this.serializers,responses:[],responseTransformer:this.responseTransformer},zt={},sr;return we&&J?(q.query=we,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(Rt,Yt,Ar,Er,V,zt).then(function(G){ze({restResponses:($e.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=Ge,t.PathBuilder=ke,Object.defineProperty(t,"__esModule",{value:!0})})})(mh,mh.exports);var hI=mh.exports;const rc=pe.createContext(),dI=()=>{const{isAuthenticated:r,login:e}=ti(),{children:t,isEmbedded:n,setIsEmbedded:i,authError:a}=pe.useContext(rc),u=pn.useNavigate(),c=pn.useLocation(),[f,h]=pe.useState(!1),[d,y]=pe.useState(),[g,m]=pe.useState(),[b,I]=pe.useState({}),[S,_]=pe.useState({}),[T,P]=pe.useState({}),[M,U]=pe.useState({}),[z,Z]=pe.useState(!1),[X,fe]=pe.useState({});pe.useEffect(()=>{var te;if(!(!c||c.pathname!=="/mm-embedded-login")){if(r||a)if(((te=new URL(origin))==null?void 0:te.protocol)==="http:"){window.close();return}else{const xe=new URLSearchParams(c.search),Se=xe.get("id"),Ve=xe.get("origin");a?window.parent.postMessage({type:"authorize-failed",instanceId:Se,error:a,authUrl:window.location.href},Ve):window.parent.postMessage({type:"authorized",instanceId:Se,authUrl:window.location.href},Ve);return}r===!1&&e()}},[c]),pe.useEffect(()=>{var Se,Ve;if(r===null||!c||c.pathname!=="/mm-embedded-interop")return;const te=new URLSearchParams(c.search),ge=te.get("id"),xe=te.get("origin");if(xe){const rt=(Se=new URL(xe))==null?void 0:Se.hostname;if(/^(?:[\w-]+\.)*(?:machinemetrics\.com|machinemetrics-us-gov\.com|m12s\.com)$/.test(rt))y(xe);else{alert("Invalid Embeddable Zone Host");return}}if(r===!1){if(xe){const rt={instanceId:ge,authUrl:`${window.location.protocol}//${window.location.host}/mm-embedded-login?id=${ge}&origin=${xe}`,origin:xe};if(((Ve=new URL(xe))==null?void 0:Ve.protocol)==="http:"){window.parent.postMessage({type:"login",...rt},xe);return}e({mm_instanceId:rt.instanceId,mm_authUrl:encodeURIComponent(rt.authUrl),mm_origin:rt.origin});return}e();return}ge&&m(ge),ge&&xe&&i(!0)},[c,r]),pn.useBlocker(({nextLocation:te})=>{var ge;return n?(ge=te.state)!=null&&ge.fromParent?(h(!0),!1):(se(`${te.pathname}${te.search}`),!0):!1}),pe.useEffect(()=>{if(!n||!d)return;const te=ge=>{ge.metaKey&&ge.key==="k"&&window.parent.postMessage({type:"open-search",instanceId:g},d)};return window.addEventListener("keydown",te),()=>{window.removeEventListener("keydown",te)}},[n,d]),pe.useEffect(()=>{if(!n||!d)return;const te=({origin:ge,data:xe})=>{var Se,Ve,rt;if(ge===d)switch(xe.type){case"navigate":u(xe.path,{replace:!0,state:{fromParent:!0}});break;case"set-context":I(xe.context||{});break;case"set-configuring":Z(xe.isConfiguring);break;case"set-params":fe(xe.params);break;case"load-options":(Se=S[xe.name])==null||Se.call(S,{filter:xe.filter});break;case"validate":(Ve=T[xe.name])==null||Ve.call(T,{value:xe.value});break;case"response":(rt=M[xe.callbackId])==null||rt.call(M,xe.response);break}};return window.addEventListener("message",te),!f&&r&&window.parent.postMessage({type:"ready",instanceId:g},d),()=>{window.removeEventListener("message",te)}},[u,f,n,r,d,S,T,M]);const se=(te,ge)=>{!f&&!r||window.parent.postMessage({type:"set-path",instanceId:g,path:te,...ge},d)},ke=te=>{f&&window.parent.postMessage({type:"set-summary",instanceId:g,summary:te},d)},me=te=>{f&&window.parent.postMessage({type:"toast",instanceId:g,message:te},d)},Ne=te=>{f&&window.parent.postMessage({type:"popup",instanceId:g,message:te},d)},Ce=()=>{f&&window.parent.postMessage({type:"loaded",instanceId:g},d)},ye=async({header:te,body:ge,choices:xe})=>f?new Promise(Se=>{const Ve=A0(),rt=async kt=>{U(Rt=>{const{[Ve]:st,...Xe}=Rt;return Xe}),Se(kt)};U(kt=>({...kt,[Ve]:rt})),window.parent.postMessage({type:"confirm",instanceId:g,header:te,body:ge,choices:xe,callbackId:Ve},d)}):Promise.reject(new Error("Not ready")),We=async(te,ge)=>{f&&(ge.validate&&typeof ge.validate=="function"&&P(xe=>{const Se=async Ve=>{const rt=await ge.validate(Ve);window.parent.postMessage({type:"set-validation",instanceId:g,name:te,validation:rt},d)};return xe[te]&&Se({value:""}),{...xe,[te]:Se}}),ge.options&&_(xe=>{const Se=async Ve=>{const kt=await(typeof ge.options=="function"?ge.options:()=>ge.options)(Ve);window.parent.postMessage({type:"set-options",instanceId:g,name:te,options:kt},d)};return xe[te]&&Se({filter:""}),{...xe,[te]:Se}}),window.parent.postMessage({type:"add-setting",instanceId:g,setting:{name:te,...ge,options:void 0,validate:void 0}},d))},Ie=pe.useMemo(()=>({commands:{navigateParent:se,setSummary:ke,toast:me,popup:Ne,confirm:ye,loaded:Ce},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:z,colorMode:b.colorMode,isFullScreen:b.isFullScreen,...X},addSetting:We}),[n,z,se,ke,me,Ne,ye,Ce,b,X,We]);return nr.jsx(vo.Provider,{value:Ie,children:c.pathname!=="/mm-embedded-interop"&&c.pathname!=="/mm-embedded-login"&&c.pathname!=="/mm-embedded-print"?t:nr.jsx(nr.Fragment,{})})},pI=()=>{const{urls:r,jwtRef:e,accessToken:t}=ti(),{graphQLRoleOverride:n,children:i}=pe.useContext(rc),[a,u]=pe.useState(),[c,f]=pe.useState(),h=()=>{const g=new URL(r.graphQLUrl);return`//${g.host}${g.pathname}`},d=()=>n?{"X-Hasura-Role":n}:{};pe.useEffect(()=>{const g=new Ok(Ck({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})),S=m.split(({query:P})=>{const M=Bi(P);return M.kind==="OperationDefinition"&&M.operation==="subscription"},g,I),T=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${t}`}})).concat(new hI.RestLink({uri:r.apiUrl}));f(Kr.from([T,S]))},[]),pe.useEffect(()=>{c&&u(new Cf({link:c,cache:new Of}))},[c]);const y=pe.useMemo(()=>({link:c}),[c]);return nr.jsx(u0.Provider,{value:y,children:a?nr.jsx(T1,{client:a,children:nr.jsx(zA,{children:nr.jsx(dI,{children:i})})}):nr.jsx(nr.Fragment,{})})},mI=Qp.div`
|
|
131
|
+
`+G.prev}function Ht(H,G){var at=st(H),vt=[];if(at){vt.length=H.length;for(var ft=0;ft<H.length;ft++)vt[ft]=V(H,ft)?G(H[ft],H):""}var He=typeof me=="function"?me(H):[],Kt;if(Ce){Kt={};for(var Zt=0;Zt<He.length;Zt++)Kt["$"+He[Zt]]=He[Zt]}for(var Qt in H)V(H,Qt)&&(at&&String(Number(Qt))===Qt&&Qt<H.length||Ce&&Kt["$"+Qt]instanceof Symbol||(z.call(/[^\w$]/,Qt)?vt.push(G(Qt,H)+": "+G(H[Qt],H)):vt.push(Qt+": "+G(H[Qt],H))));if(typeof me=="function")for(var kr=0;kr<He.length;kr++)We.call(H,He[kr])&&vt.push("["+G(He[kr])+"]: "+G(H[He[kr]],H));return vt}return gh}var vh,q0;function Fk(){if(q0)return vh;q0=1;var r=ec(),e=ha(),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 vh=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},vh}var bh,j0;function U0(){return j0||(j0=1,bh=Object),bh}var wh,$0;function Lk(){return $0||($0=1,wh=Error),wh}var _h,B0;function qk(){return B0||(B0=1,_h=EvalError),_h}var xh,V0;function jk(){return V0||(V0=1,xh=RangeError),xh}var Sh,W0;function Uk(){return W0||(W0=1,Sh=ReferenceError),Sh}var Eh,z0;function $k(){return z0||(z0=1,Eh=SyntaxError),Eh}var Oh,H0;function Bk(){return H0||(H0=1,Oh=URIError),Oh}var Th,G0;function Vk(){return G0||(G0=1,Th=Math.abs),Th}var Ah,Q0;function Wk(){return Q0||(Q0=1,Ah=Math.floor),Ah}var kh,J0;function zk(){return J0||(J0=1,kh=Math.max),kh}var Ih,Y0;function Hk(){return Y0||(Y0=1,Ih=Math.min),Ih}var Ch,K0;function Gk(){return K0||(K0=1,Ch=Math.pow),Ch}var Ph,Z0;function Qk(){return Z0||(Z0=1,Ph=Math.round),Ph}var Nh,X0;function Jk(){return X0||(X0=1,Nh=Number.isNaN||function(e){return e!==e}),Nh}var Rh,eb;function Yk(){if(eb)return Rh;eb=1;var r=Jk();return Rh=function(t){return r(t)||t===0?t:t<0?-1:1},Rh}var Mh,tb;function Kk(){return tb||(tb=1,Mh=Object.getOwnPropertyDescriptor),Mh}var Dh,rb;function nb(){if(rb)return Dh;rb=1;var r=Kk();if(r)try{r([],"length")}catch{r=null}return Dh=r,Dh}var Fh,ib;function Zk(){if(ib)return Fh;ib=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Fh=r,Fh}var Lh,sb;function Xk(){return sb||(sb=1,Lh=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}),Lh}var qh,ab;function eI(){if(ab)return qh;ab=1;var r=typeof Symbol<"u"&&Symbol,e=Xk();return qh=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},qh}var jh,ob;function ub(){return ob||(ob=1,jh=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),jh}var Uh,cb;function lb(){if(cb)return Uh;cb=1;var r=U0();return Uh=r.getPrototypeOf||null,Uh}var $h,fb;function tI(){if(fb)return $h;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 $h=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 S=function(){};S.prototype=h.prototype,y.prototype=new S,S.prototype=null}return y},$h}var Bh,hb;function tc(){if(hb)return Bh;hb=1;var r=tI();return Bh=Function.prototype.bind||r,Bh}var Vh,db;function Wh(){return db||(db=1,Vh=Function.prototype.call),Vh}var zh,pb;function mb(){return pb||(pb=1,zh=Function.prototype.apply),zh}var Hh,yb;function rI(){return yb||(yb=1,Hh=typeof Reflect<"u"&&Reflect&&Reflect.apply),Hh}var Gh,gb;function nI(){if(gb)return Gh;gb=1;var r=tc(),e=mb(),t=Wh(),n=rI();return Gh=n||r.call(t,e),Gh}var Qh,vb;function bb(){if(vb)return Qh;vb=1;var r=tc(),e=ha(),t=Wh(),n=nI();return Qh=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(r,t,a)},Qh}var Jh,wb;function iI(){if(wb)return Jh;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 Jh=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(c){return a(c==null?c:i(c))}:!1,Jh}var Yh,_b;function sI(){if(_b)return Yh;_b=1;var r=ub(),e=lb(),t=iI();return Yh=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,Yh}var Kh,xb;function aI(){if(xb)return Kh;xb=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=tc();return Kh=t.call(r,e),Kh}var Zh,Sb;function Xh(){if(Sb)return Zh;Sb=1;var r,e=U0(),t=Lk(),n=qk(),i=jk(),a=Uk(),u=$k(),c=ha(),f=Bk(),h=Vk(),d=Wk(),y=zk(),g=Hk(),m=Gk(),b=Qk(),I=Yk(),S=Function,_=function(De){try{return S('"use strict"; return ('+De+").constructor;")()}catch{}},T=nb(),P=Zk(),M=function(){throw new c},U=T?function(){try{return arguments.callee,M}catch{try{return T(arguments,"callee").get}catch{return M}}}():M,z=eI()(),Z=sI(),X=lb(),fe=ub(),se=mb(),ke=Wh(),me={},Ne=typeof Uint8Array>"u"||!Z?r:Z(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":z&&Z?Z([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":me,"%AsyncGenerator%":me,"%AsyncGeneratorFunction%":me,"%AsyncIteratorPrototype%":me,"%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%":S,"%GeneratorFunction%":me,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":z&&Z?Z(Z([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!z||!Z?r:Z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":T,"%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"||!z||!Z?r:Z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":z&&Z?Z(""[Symbol.iterator]()):r,"%Symbol%":z?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%":ke,"%Function.prototype.apply%":se,"%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(Z)try{null.error}catch(De){var ye=Z(Z(De));Ce["%Error.prototype%"]=ye}var We=function De(Ge){var B;if(Ge==="%AsyncFunction%")B=_("async function () {}");else if(Ge==="%GeneratorFunction%")B=_("function* () {}");else if(Ge==="%AsyncGeneratorFunction%")B=_("async function* () {}");else if(Ge==="%AsyncGenerator%"){var Q=De("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(Ge==="%AsyncIteratorPrototype%"){var q=De("%AsyncGenerator%");q&&Z&&(B=Z(q.prototype))}return Ce[Ge]=B,B},Ie={__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(),ge=aI(),xe=te.call(ke,Array.prototype.concat),Se=te.call(se,Array.prototype.splice),Ve=te.call(ke,String.prototype.replace),rt=te.call(ke,String.prototype.slice),kt=te.call(ke,RegExp.prototype.exec),Rt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,st=/\\(\\)?/g,Xe=function(Ge){var B=rt(Ge,0,1),Q=rt(Ge,-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 Ve(Ge,Rt,function(J,ee,V,_e){q[q.length]=V?Ve(_e,st,"$1"):ee||J}),q},Et=function(Ge,B){var Q=Ge,q;if(ge(Ie,Q)&&(q=Ie[Q],Q="%"+q[0]+"%"),ge(Ce,Q)){var J=Ce[Q];if(J===me&&(J=We(Q)),typeof J>"u"&&!B)throw new c("intrinsic "+Ge+" exists, but is not available. Please file an issue!");return{alias:q,name:Q,value:J}}throw new u("intrinsic "+Ge+" does not exist!")};return Zh=function(Ge,B){if(typeof Ge!="string"||Ge.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(kt(/^%?[^%]*%?$/,Ge)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Q=Xe(Ge),q=Q.length>0?Q[0]:"",J=Et("%"+q+"%",B),ee=J.name,V=J.value,_e=!1,ze=J.alias;ze&&(q=ze[0],Se(Q,xe([0,1],ze)));for(var $e=1,ae=!0;$e<Q.length;$e+=1){var we=Q[$e],Qe=rt(we,0,1),pt=rt(we,-1);if((Qe==='"'||Qe==="'"||Qe==="`"||pt==='"'||pt==="'"||pt==="`")&&Qe!==pt)throw new u("property names with quotes must have matching quotes");if((we==="constructor"||!ae)&&(_e=!0),q+="."+we,ee="%"+q+"%",ge(Ce,ee))V=Ce[ee];else if(V!=null){if(!(we in V)){if(!B)throw new c("base intrinsic for "+Ge+" exists, but the property is not available.");return}if(T&&$e+1>=Q.length){var mt=T(V,we);ae=!!mt,ae&&"get"in mt&&!("originalValue"in mt.get)?V=mt.get:V=V[we]}else ae=ge(V,we),V=V[we];ae&&!_e&&(Ce[ee]=V)}}return V},Zh}var ed,Eb;function Ob(){if(Eb)return ed;Eb=1;var r=Xh(),e=bb(),t=e([r("%String.prototype.indexOf%")]);return ed=function(i,a){var u=r(i,!!a);return typeof u=="function"&&t(i,".prototype.")>-1?e([u]):u},ed}var td,Tb;function Ab(){if(Tb)return td;Tb=1;var r=Xh(),e=Ob(),t=ec(),n=ha(),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 td=!!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},td}var rd,kb;function oI(){if(kb)return rd;kb=1;var r=Xh(),e=Ob(),t=ec(),n=Ab(),i=ha(),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 rd=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,rd}var nd,Ib;function uI(){if(Ib)return nd;Ib=1;var r=ha(),e=ec(),t=Fk(),n=Ab(),i=oI(),a=i||n||t;return nd=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},nd}var id,Cb;function sd(){if(Cb)return id;Cb=1;var r=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return id={default:t.RFC3986,formatters:{RFC1738:function(n){return r.call(n,e,"+")},RFC3986:function(n){return String(n)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},id}var ad,Pb;function Nb(){if(Pb)return ad;Pb=1;var r=sd(),e=Object.prototype.hasOwnProperty,t=Array.isArray,n=function(){for(var S=[],_=0;_<256;++_)S.push("%"+((_<16?"0":"")+_.toString(16)).toUpperCase());return S}(),i=function(_){for(;_.length>1;){var T=_.pop(),P=T.obj[T.prop];if(t(P)){for(var M=[],U=0;U<P.length;++U)typeof P[U]<"u"&&M.push(P[U]);T.obj[T.prop]=M}}},a=function(_,T){for(var P=T&&T.plainObjects?Object.create(null):{},M=0;M<_.length;++M)typeof _[M]<"u"&&(P[M]=_[M]);return P},u=function S(_,T,P){if(!T)return _;if(typeof T!="object"){if(t(_))_.push(T);else if(_&&typeof _=="object")(P&&(P.plainObjects||P.allowPrototypes)||!e.call(Object.prototype,T))&&(_[T]=!0);else return[_,T];return _}if(!_||typeof _!="object")return[_].concat(T);var M=_;return t(_)&&!t(T)&&(M=a(_,P)),t(_)&&t(T)?(T.forEach(function(U,z){if(e.call(_,z)){var Z=_[z];Z&&typeof Z=="object"&&U&&typeof U=="object"?_[z]=S(Z,U,P):_.push(U)}else _[z]=U}),_):Object.keys(T).reduce(function(U,z){var Z=T[z];return e.call(U,z)?U[z]=S(U[z],Z,P):U[z]=Z,U},M)},c=function(_,T){return Object.keys(T).reduce(function(P,M){return P[M]=T[M],P},_)},f=function(S,_,T){var P=S.replace(/\+/g," ");if(T==="iso-8859-1")return P.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(P)}catch{return P}},h=1024,d=function(_,T,P,M,U){if(_.length===0)return _;var z=_;if(typeof _=="symbol"?z=Symbol.prototype.toString.call(_):typeof _!="string"&&(z=String(_)),P==="iso-8859-1")return escape(z).replace(/%u[0-9a-f]{4}/gi,function(Ne){return"%26%23"+parseInt(Ne.slice(2),16)+"%3B"});for(var Z="",X=0;X<z.length;X+=h){for(var fe=z.length>=h?z.slice(X,X+h):z,se=[],ke=0;ke<fe.length;++ke){var me=fe.charCodeAt(ke);if(me===45||me===46||me===95||me===126||me>=48&&me<=57||me>=65&&me<=90||me>=97&&me<=122||U===r.RFC1738&&(me===40||me===41)){se[se.length]=fe.charAt(ke);continue}if(me<128){se[se.length]=n[me];continue}if(me<2048){se[se.length]=n[192|me>>6]+n[128|me&63];continue}if(me<55296||me>=57344){se[se.length]=n[224|me>>12]+n[128|me>>6&63]+n[128|me&63];continue}ke+=1,me=65536+((me&1023)<<10|fe.charCodeAt(ke)&1023),se[se.length]=n[240|me>>18]+n[128|me>>12&63]+n[128|me>>6&63]+n[128|me&63]}Z+=se.join("")}return Z},y=function(_){for(var T=[{obj:{o:_},prop:"o"}],P=[],M=0;M<T.length;++M)for(var U=T[M],z=U.obj[U.prop],Z=Object.keys(z),X=0;X<Z.length;++X){var fe=Z[X],se=z[fe];typeof se=="object"&&se!==null&&P.indexOf(se)===-1&&(T.push({obj:z,prop:fe}),P.push(se))}return i(T),_},g=function(_){return Object.prototype.toString.call(_)==="[object RegExp]"},m=function(_){return!_||typeof _!="object"?!1:!!(_.constructor&&_.constructor.isBuffer&&_.constructor.isBuffer(_))},b=function(_,T){return[].concat(_,T)},I=function(_,T){if(t(_)){for(var P=[],M=0;M<_.length;M+=1)P.push(T(_[M]));return P}return T(_)};return ad={arrayToObject:a,assign:c,combine:b,compact:y,decode:f,encode:d,isBuffer:m,isRegExp:g,maybeMap:I,merge:u},ad}var od,Rb;function cI(){if(Rb)return od;Rb=1;var r=uI(),e=Nb(),t=sd(),n=Object.prototype.hasOwnProperty,i={brackets:function(S){return S+"[]"},comma:"comma",indices:function(S,_){return S+"["+_+"]"},repeat:function(S){return S}},a=Array.isArray,u=Array.prototype.push,c=function(I,S){u.apply(I,a(S)?S:[S])},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(S){return f.call(S)},skipNulls:!1,strictNullHandling:!1},y=function(S){return typeof S=="string"||typeof S=="number"||typeof S=="boolean"||typeof S=="symbol"||typeof S=="bigint"},g={},m=function I(S,_,T,P,M,U,z,Z,X,fe,se,ke,me,Ne,Ce,ye,We,Ie){for(var te=S,ge=Ie,xe=0,Se=!1;(ge=ge.get(g))!==void 0&&!Se;){var Ve=ge.get(S);if(xe+=1,typeof Ve<"u"){if(Ve===xe)throw new RangeError("Cyclic object value");Se=!0}typeof ge.get(g)>"u"&&(xe=0)}if(typeof fe=="function"?te=fe(_,te):te instanceof Date?te=me(te):T==="comma"&&a(te)&&(te=e.maybeMap(te,function(ee){return ee instanceof Date?me(ee):ee})),te===null){if(U)return X&&!ye?X(_,d.encoder,We,"key",Ne):_;te=""}if(y(te)||e.isBuffer(te)){if(X){var rt=ye?_:X(_,d.encoder,We,"key",Ne);return[Ce(rt)+"="+Ce(X(te,d.encoder,We,"value",Ne))]}return[Ce(_)+"="+Ce(String(te))]}var kt=[];if(typeof te>"u")return kt;var Rt;if(T==="comma"&&a(te))ye&&X&&(te=e.maybeMap(te,X)),Rt=[{value:te.length>0?te.join(",")||null:void 0}];else if(a(fe))Rt=fe;else{var st=Object.keys(te);Rt=se?st.sort(se):st}var Xe=Z?_.replace(/\./g,"%2E"):_,Et=P&&a(te)&&te.length===1?Xe+"[]":Xe;if(M&&a(te)&&te.length===0)return Et+"[]";for(var De=0;De<Rt.length;++De){var Ge=Rt[De],B=typeof Ge=="object"&&typeof Ge.value<"u"?Ge.value:te[Ge];if(!(z&&B===null)){var Q=ke&&Z?Ge.replace(/\./g,"%2E"):Ge,q=a(te)?typeof T=="function"?T(Et,Q):Et:Et+(ke?"."+Q:"["+Q+"]");Ie.set(S,xe);var J=r();J.set(g,Ie),c(kt,I(B,q,T,P,M,U,z,Z,T==="comma"&&ye&&a(te)?null:X,fe,se,ke,me,Ne,Ce,ye,We,J))}}return kt},b=function(S){if(!S)return d;if(typeof S.allowEmptyArrays<"u"&&typeof S.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof S.encodeDotInKeys<"u"&&typeof S.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(S.encoder!==null&&typeof S.encoder<"u"&&typeof S.encoder!="function")throw new TypeError("Encoder has to be a function.");var _=S.charset||d.charset;if(typeof S.charset<"u"&&S.charset!=="utf-8"&&S.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var T=t.default;if(typeof S.format<"u"){if(!n.call(t.formatters,S.format))throw new TypeError("Unknown format option provided.");T=S.format}var P=t.formatters[T],M=d.filter;(typeof S.filter=="function"||a(S.filter))&&(M=S.filter);var U;if(S.arrayFormat in i?U=S.arrayFormat:"indices"in S?U=S.indices?"indices":"repeat":U=d.arrayFormat,"commaRoundTrip"in S&&typeof S.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var z=typeof S.allowDots>"u"?S.encodeDotInKeys===!0?!0:d.allowDots:!!S.allowDots;return{addQueryPrefix:typeof S.addQueryPrefix=="boolean"?S.addQueryPrefix:d.addQueryPrefix,allowDots:z,allowEmptyArrays:typeof S.allowEmptyArrays=="boolean"?!!S.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:U,charset:_,charsetSentinel:typeof S.charsetSentinel=="boolean"?S.charsetSentinel:d.charsetSentinel,commaRoundTrip:S.commaRoundTrip,delimiter:typeof S.delimiter>"u"?d.delimiter:S.delimiter,encode:typeof S.encode=="boolean"?S.encode:d.encode,encodeDotInKeys:typeof S.encodeDotInKeys=="boolean"?S.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof S.encoder=="function"?S.encoder:d.encoder,encodeValuesOnly:typeof S.encodeValuesOnly=="boolean"?S.encodeValuesOnly:d.encodeValuesOnly,filter:M,format:T,formatter:P,serializeDate:typeof S.serializeDate=="function"?S.serializeDate:d.serializeDate,skipNulls:typeof S.skipNulls=="boolean"?S.skipNulls:d.skipNulls,sort:typeof S.sort=="function"?S.sort:null,strictNullHandling:typeof S.strictNullHandling=="boolean"?S.strictNullHandling:d.strictNullHandling}};return od=function(I,S){var _=I,T=b(S),P,M;typeof T.filter=="function"?(M=T.filter,_=M("",_)):a(T.filter)&&(M=T.filter,P=M);var U=[];if(typeof _!="object"||_===null)return"";var z=i[T.arrayFormat],Z=z==="comma"&&T.commaRoundTrip;P||(P=Object.keys(_)),T.sort&&P.sort(T.sort);for(var X=r(),fe=0;fe<P.length;++fe){var se=P[fe];T.skipNulls&&_[se]===null||c(U,m(_[se],se,z,Z,T.allowEmptyArrays,T.strictNullHandling,T.skipNulls,T.encodeDotInKeys,T.encode?T.encoder:null,T.filter,T.sort,T.allowDots,T.serializeDate,T.format,T.formatter,T.encodeValuesOnly,T.charset,X))}var ke=U.join(T.delimiter),me=T.addQueryPrefix===!0?"?":"";return T.charsetSentinel&&(T.charset==="iso-8859-1"?me+="utf8=%26%2310003%3B&":me+="utf8=%E2%9C%93&"),ke.length>0?me+ke:""},od}var ud,Mb;function lI(){if(Mb)return ud;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},S=b.ignoreQueryPrefix?m.replace(/^\?/,""):m;S=S.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var _=b.parameterLimit===1/0?void 0:b.parameterLimit,T=S.split(b.delimiter,_),P=-1,M,U=b.charset;if(b.charsetSentinel)for(M=0;M<T.length;++M)T[M].indexOf("utf8=")===0&&(T[M]===c?U="utf-8":T[M]===u&&(U="iso-8859-1"),P=M,M=T.length);for(M=0;M<T.length;++M)if(M!==P){var z=T[M],Z=z.indexOf("]="),X=Z===-1?z.indexOf("="):Z+1,fe,se;X===-1?(fe=b.decoder(z,n.decoder,U,"key"),se=b.strictNullHandling?null:""):(fe=b.decoder(z.slice(0,X),n.decoder,U,"key"),se=r.maybeMap(a(z.slice(X+1),b),function(me){return b.decoder(me,n.decoder,U,"value")})),se&&b.interpretNumericEntities&&U==="iso-8859-1"&&(se=i(se)),z.indexOf("[]=")>-1&&(se=t(se)?[se]:se);var ke=e.call(I,fe);ke&&b.duplicates==="combine"?I[fe]=r.combine(I[fe],se):(!ke||b.duplicates==="last")&&(I[fe]=se)}return I},h=function(g,m,b,I){for(var S=I?m:a(m,b),_=g.length-1;_>=0;--_){var T,P=g[_];if(P==="[]"&&b.parseArrays)T=b.allowEmptyArrays&&(S===""||b.strictNullHandling&&S===null)?[]:[].concat(S);else{T=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,z=parseInt(U,10);!b.parseArrays&&U===""?T={0:S}:!isNaN(z)&&P!==U&&String(z)===U&&z>=0&&b.parseArrays&&z<=b.arrayLimit?(T=[],T[z]=S):U!=="__proto__"&&(T[U]=S)}S=T}return S},d=function(m,b,I,S){if(m){var _=I.allowDots?m.replace(/\.([^.[]+)/g,"[$1]"):m,T=/(\[[^[\]]*])/,P=/(\[[^[\]]*])/g,M=I.depth>0&&T.exec(_),U=M?_.slice(0,M.index):_,z=[];if(U){if(!I.plainObjects&&e.call(Object.prototype,U)&&!I.allowPrototypes)return;z.push(U)}for(var Z=0;I.depth>0&&(M=P.exec(_))!==null&&Z<I.depth;){if(Z+=1,!I.plainObjects&&e.call(Object.prototype,M[1].slice(1,-1))&&!I.allowPrototypes)return;z.push(M[1])}if(M){if(I.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+I.depth+" and strictDepth is true");z.push("["+_.slice(M.index)+"]")}return h(z,b,I,S)}},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 S=typeof m.allowDots>"u"?m.decodeDotInKeys===!0?!0:n.allowDots:!!m.allowDots;return{allowDots:S,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 ud=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,S=b.plainObjects?Object.create(null):{},_=Object.keys(I),T=0;T<_.length;++T){var P=_[T],M=d(P,I[P],b,typeof g=="string");S=r.merge(S,M,b)}return b.allowSparse===!0?S:r.compact(S)},ud}var cd,Db;function fI(){if(Db)return cd;Db=1;var r=cI(),e=lI(),t=sd();return cd={formats:t,parse:e,stringify:r},cd}(function(r,e){(function(t,n){n(e,Rk,Mk,fI())})(pi,function(t,n,i,a){var u=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(_e){_e(V)})}return new(q||(q=Promise))(function(V,_e){function ze(we){try{ae(J.next(we))}catch(Qe){_e(Qe)}}function $e(we){try{ae(J.throw(we))}catch(Qe){_e(Qe)}}function ae(we){we.done?V(we.value):ee(we.value).then(ze,$e)}ae((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,_e;return _e={next:ze(0),throw:ze(1),return:ze(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function ze(ae){return function(we){return $e([ae,we])}}function $e(ae){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=ae[0]&2?ee.return:ae[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,ae[1])).done)return V;switch(ee=0,V&&(ae=[ae[0]&2,V.value]),ae[0]){case 0:case 1:V=ae;break;case 4:return q.label++,{value:ae[1],done:!1};case 5:q.label++,ee=ae[1],ae=[0];continue;case 7:ae=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(ae[0]===6||ae[0]===2)){q=0;continue}if(ae[0]===3&&(!V||ae[1]>V[0]&&ae[1]<V[3])){q.label=ae[1];break}if(ae[0]===6&&q.label<V[1]){q.label=V[1],V=ae;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(ae);break}V[2]&&q.ops.pop(),q.trys.pop();continue}ae=Q.call(B,q)}catch(we){ae=[6,we],ee=0}finally{J=V=0}if(ae[0]&5)throw ae[1];return{value:ae[0]?ae[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 _e=i.getMainDefinition(Q),ze=i.getFragmentDefinitions(Q),$e=i.createFragmentMap(ze),ae=V.resultMapper,we=V.fragmentMatcher||function(){return!0},Qe={fragmentMap:$e,contextValue:J,variableValues:ee,resultMapper:ae,resolver:B,fragmentMatcher:we};return g(_e.selectionSet,q,Qe)}function g(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,_e,ze,$e=this;return c(this,function(ae){switch(ae.label){case 0:return J=q.fragmentMap,ee=q.contextValue,V=q.variableValues,_e={},ze=function(we){return u($e,void 0,void 0,function(){var Qe,pt,mt,Yt,Ot;return c(this,function(Wt){switch(Wt.label){case 0:return i.shouldInclude(we,V)?i.isField(we)?[4,m(we,Q,q)]:[3,2]:[2];case 1:return Qe=Wt.sent(),pt=i.resultKeyNameFromField(we),Qe!==void 0&&(_e[pt]===void 0?_e[pt]=Qe:d(_e[pt],Qe)),[2];case 2:if(i.isInlineFragment(we))mt=we;else if(mt=J[we.name.value],!mt)throw new Error("No fragment named "+we.name.value);return Yt=mt.typeCondition.name.value,q.fragmentMatcher(Q,Yt,ee)?[4,g(mt.selectionSet,Q,q)]:[3,4];case 3:Ot=Wt.sent(),d(_e,Ot),Wt.label=4;case 4:return[2]}})})},[4,Promise.all(B.selections.map(ze))];case 1:return ae.sent(),q.resultMapper?[2,q.resultMapper(_e,Q)]:[2,_e]}})})}function m(B,Q,q){return u(this,void 0,void 0,function(){var J,ee,V,_e,ze,$e,ae;return c(this,function(we){switch(we.label){case 0:return J=q.variableValues,ee=q.contextValue,V=q.resolver,_e=B.name.value,ze=i.argumentsObjectFromField(B,J),$e={isLeaf:!B.selectionSet,resultKey:i.resultKeyNameFromField(B),directives:f(B,J),field:B},[4,V(_e,Q,ze,ee,$e)];case 1:return ae=we.sent(),B.selectionSet?ae==null?[2,ae]:Array.isArray(ae)?[2,b(B,ae,q)]:[2,g(B.selectionSet,ae,q)]:[2,ae]}})})}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)}}(),S=function(){return S=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},S.apply(this,arguments)},_=function(B,Q,q,J){function ee(V){return V instanceof q?V:new q(function(_e){_e(V)})}return new(q||(q=Promise))(function(V,_e){function ze(we){try{ae(J.next(we))}catch(Qe){_e(Qe)}}function $e(we){try{ae(J.throw(we))}catch(Qe){_e(Qe)}}function ae(we){we.done?V(we.value):ee(we.value).then(ze,$e)}ae((J=J.apply(B,Q||[])).next())})},T=function(B,Q){var q={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},J,ee,V,_e;return _e={next:ze(0),throw:ze(1),return:ze(2)},typeof Symbol=="function"&&(_e[Symbol.iterator]=function(){return this}),_e;function ze(ae){return function(we){return $e([ae,we])}}function $e(ae){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,ee&&(V=ae[0]&2?ee.return:ae[0]?ee.throw||((V=ee.return)&&V.call(ee),0):ee.next)&&!(V=V.call(ee,ae[1])).done)return V;switch(ee=0,V&&(ae=[ae[0]&2,V.value]),ae[0]){case 0:case 1:V=ae;break;case 4:return q.label++,{value:ae[1],done:!1};case 5:q.label++,ee=ae[1],ae=[0];continue;case 7:ae=q.ops.pop(),q.trys.pop();continue;default:if(V=q.trys,!(V=V.length>0&&V[V.length-1])&&(ae[0]===6||ae[0]===2)){q=0;continue}if(ae[0]===3&&(!V||ae[1]>V[0]&&ae[1]<V[3])){q.label=ae[1];break}if(ae[0]===6&&q.label<V[1]){q.label=V[1],V=ae;break}if(V&&q.label<V[2]){q.label=V[2],q.ops.push(ae);break}V[2]&&q.ops.pop(),q.trys.pop();continue}ae=Q.call(B,q)}catch(we){ae=[6,we],ee=0}finally{J=V=0}if(ae[0]&5)throw ae[1];return{value:ae[0]?ae[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],_e=0,ze=V.length;_e<ze;_e++,ee++)J[ee]=V[_e];return J},M=function(B){var Q=B.replace(/\s/g,""),q=Q.replace(/\[(.*)\]/,function(J,ee,V,_e){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)},z=function(B){return B.directives&&B.directives.length?B.directives.find(function(Q){return Q.name.value==="rest"}):null};function Z(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))Z(B,Q,q,J,V.selectionSet);else if(V.kind==="FragmentSpread"){var _e=J[V.name.value];Z(B,Q,q,J,_e.selectionSet)}else if(i.isField(V)){var ze=i.resultKeyNameFromField(V);ze===B&&z(V)!=null?X(Q,q,J,V.selectionSet):Z(B,Q,q,J,V.selectionSet)}else return function($e){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 _e=B[ee.name.value];ee.name.value==="__typename"||(typeof _e>"u"?B[ee.name.value]=null:_e!=null&&typeof _e=="object"&&ee.selectionSet!=null&&X(_e,Q,q,ee.selectionSet))}else return function(ze){throw new Error("Unhandled Node Type in SelectionSetNode.selections")}()})}}var fe=function(B,Q){var q=B[Q||st]||B[st];return typeof q=="string"?{uri:q}:S({responseTransformer:null},q)},se=function(B,Q,q){return q===void 0||Q===void 0?B:B.replace(":"+Q,q)},ke=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(ze,$e){if($e===""||$e==="{}")return ze+$e.length;var ae=ze+$e.length;if($e[0]==="{"&&$e[$e.length-1]==="}"){var we=$e.slice(1,$e.length-1).split(".");ee.push(function(Qe,pt){try{var mt=me(Qe,we);return!pt||typeof mt!="object"||mt==null?String(mt):a.stringify(mt)}catch{var Yt=[Q,we.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($e),!V&&ae>=q&&(V=!0,ee.push(!0));return ae},0);var _e=function(ze){var $e=!1,ae=ee.reduce(function(we,Qe){return typeof Qe=="string"?we+Qe:typeof Qe=="boolean"?($e=!0,we):we+Qe(ze,$e)},"");return ae};return B.cache[Q]=_e},B.cache={},B.warnTable={},B.argReplacement=/({[._a-zA-Z0-9]*})/,B}();function me(B,Q){if(Q.length===0)return B;var q=P(Q),J=q.shift();return me(B[J],q)}var Ne=["__typename"],Ce=typeof globalThis=="object"&&globalThis||pi,ye=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 ye(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 _e=B[V];if(Ne.indexOf(V)!==-1)return ee[V]=_e,ee;var ze=P(q,[V]);return ee[J(V,ze)]=ye(_e,J,ze),ee},{})},We=function(B){return B},Ie=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=Ie(J)),J.forEach(function(ee,V){q.append(V,ee)})),q},new Headers)},ge=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)},xe=function(B){return function(Q,q){return ge(Q,B,q)}},Se=["GET","POST","PUT","PATCH","DELETE"],Ve=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}},rt=function(B,Q,q){var J=new Error(q);throw J.response=B,J.statusCode=B.status,J.result=Q,J},kt=function(B,Q){return B==null||typeof B!="object"?B:Array.isArray(B)?B.map(function(q){return kt(q,Q)}):(B.__typename=Q,B)},Rt=function(B,Q,q,J,ee){return _(void 0,void 0,void 0,function(){var V,_e,ze,$e,ae,we,Qe,pt,mt,Yt,Ot,Wt,Gt,Er,zt,sr,dr,Ar,Ht,H,G,at,vt,ft,He,Kt,Zt,Qt,kr,Hr,Fr,Ut,Or,$r,Lr,ar,Gr,Tr,gr,Ir,Sn,Un,R,ue,ve,Pe,Be,ct,Ye,et;return T(this,function(tt){switch(tt.label){case 0:if(V=ee.directives,_e=ee.isLeaf,ze=ee.resultKey,$e=J.exportVariablesByNode,ae=$e.get(Q)||{},we=function(gt){return gt instanceof Array?gt.forEach(we):$e.set(gt,S({},ae)),gt},Qe=(Q||{})[ze],pt=(Q||{})[B],Q&&V&&V.export&&(ae[V.export.as]=pt),mt=V&&V.type,!_e&&mt){if(V.rest)throw new Error("Invalid use of @type(name: ...) directive on a call that also has @rest(...)");return we(pt),[2,kt(pt,V.type.name)]}if(Yt=!V||!V.rest,Yt)return[2,we(Qe||pt)];if(Ot=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,at=J.responseTransformer,vt=i.createFragmentMap(Ar),ft=V.rest,He=ft.path,Kt=ft.endpoint,Zt=ft.pathBuilder,Qt=fe(Wt,Kt),kr=He==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||(He.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,A=S(S({},w),k),C=Object.keys(A).reduce(function(D,$){return se(D,$,A[$])},He);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=ke.replacerForPath(He)),Hr={args:q,exportVariables:ae,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=ye(Lr(Hr),Gr||H||We),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[Xe](Ir,Gt);Ir=R.body,Sn=new Headers(R.headers)}return Ve(Or,zt||"query"),ue=S({method:Or,headers:Sn||Gt,body:Ir},Ot?{credentials:Ot}:{}),ve=""+Qt.uri+Fr,[4,(Er||fetch)(ve,ue)];case 1:return Pe=tt.sent(),J.responses.push(Pe),Pe.ok?(Pe.status===204||Pe.headers.get("Content-Length")==="0"?Be={}:Be=Pe,[3,9]):[3,2];case 2:return Pe.status!==404?[3,3]:(Be=null,[3,9]);case 3:ct=void 0,tt.label=4;case 4:return tt.trys.push([4,6,,8]),[4,Pe.clone().json()];case 5:return ct=tt.sent(),[3,8];case 6:return tt.sent(),[4,Pe.clone().text()];case 7:return ct=tt.sent(),[3,8];case 8:rt(Pe,ct,"Response not successful: Received status code "+Pe.status),tt.label=9;case 9:if(Ye=Qt.responseTransformer||at,!Ye)return[3,14];tt.label=10;case 10:return tt.trys.push([10,12,,13]),[4,Ye(Be,$r)];case 11:return Be=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 Be&&Be.json?[4,Be.json()]:[3,16];case 15:Be=tt.sent(),tt.label=16;case 16:return Be=ye(Be,Tr||Ht||We),Be=Z(ze,Be,dr,vt,dr.selectionSet),Be=U(Be,$r,sr,{resolverParams:{fieldName:B,root:Q,args:q,context:J,info:ee}}),[2,we(Be)]}})})},st="",Xe="",Et=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},Ge=function(B){I(Q,B);function Q(q){var J,ee=q.uri,V=q.endpoints,_e=q.headers,ze=q.fieldNameNormalizer,$e=q.fieldNameDenormalizer,ae=q.typePatcher,we=q.customFetch,Qe=q.credentials,pt=q.bodySerializers,mt=q.defaultSerializer,Yt=q.responseTransformer,Ot=B.call(this)||this,Wt={};if(Wt[st]=ee||"",Ot.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||{})[st];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.");Ot.endpoints[st]=ee}if(Ot.endpoints[st]==null&&console.warn("RestLink configured without a default URI. All @rest(…) directives must provide an endpoint key!"),ae==null)Ot.typePatcher=function(zt,sr,dr){return S({__typename:sr},zt)};else if(!Array.isArray(ae)&&typeof ae=="object"&&Object.keys(ae).map(function(zt){return ae[zt]}).reduce(function(zt,sr){return zt&&typeof sr=="function"},!0)){var Er=ae;Ot.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 S({__typename:Ht},H(zt,Ht,dr,Ar))}}else throw new Error("RestLink was configured with a typePatcher of invalid type!");return pt&&pt.hasOwnProperty(Xe)&&console.warn("RestLink was configured to override the default serializer! This may result in unexpected behavior"),Ot.responseTransformer=Yt||null,Ot.fieldNameNormalizer=ze||null,Ot.fieldNameDenormalizer=$e||null,Ot.headers=Ie(_e),Ot.credentials=Qe||null,Ot.customFetch=we,Ot.serializers=S((J={},J[Xe]=mt||Et,J),pt||{}),Ot.processedDocuments=new Map,Ot}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,_e=q.getContext,ze=q.setContext,$e=_e(),ae=i.hasDirectives(["rest"],ee);if(!ae)return J(q);var we=this.removeRestSetsFromDocument(ee),Qe=$e.headersMergePolicy;Qe==null&&Array.isArray($e.headersToOverride)?Qe=xe($e.headersToOverride):Qe==null&&(Qe=te);var pt=Qe(this.headers,$e.headers);pt.has("Accept")||pt.append("Accept","application/json");var mt=$e.credentials||this.credentials,Yt=i.addTypenameToDocument(ee),Ot=i.getMainDefinition(ee),Wt=i.getFragmentDefinitions(ee),Gt=(Ot||{}).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:Ot,fragmentDefinitions:Wt,typePatcher:this.typePatcher,serializers:this.serializers,responses:[],responseTransformer:this.responseTransformer},zt={},sr;return we&&J?(q.query=we,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(Rt,Yt,Ar,Er,V,zt).then(function(G){ze({restResponses:($e.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=Ge,t.PathBuilder=ke,Object.defineProperty(t,"__esModule",{value:!0})})})(mh,mh.exports);var hI=mh.exports;const rc=pe.createContext(),dI=()=>{const{isAuthenticated:r,login:e}=ti(),{children:t,isEmbedded:n,setIsEmbedded:i,authError:a}=pe.useContext(rc),u=pn.useNavigate(),c=pn.useLocation(),[f,h]=pe.useState(!1),[d,y]=pe.useState(),[g,m]=pe.useState(),[b,I]=pe.useState({}),[S,_]=pe.useState({}),[T,P]=pe.useState({}),[M,U]=pe.useState({}),[z,Z]=pe.useState(!1),[X,fe]=pe.useState({});pe.useEffect(()=>{var te;if(!(!c||c.pathname!=="/mm-embedded-login")){if(r||a)if(((te=new URL(origin))==null?void 0:te.protocol)==="http:"){window.close();return}else{const xe=new URLSearchParams(c.search),Se=xe.get("id"),Ve=xe.get("origin");a?window.parent.postMessage({type:"authorize-failed",instanceId:Se,error:a,authUrl:window.location.href},Ve):window.parent.postMessage({type:"authorized",instanceId:Se,authUrl:window.location.href},Ve);return}r===!1&&e()}},[c]),pe.useEffect(()=>{var Se,Ve;if(r===null||!c||c.pathname!=="/mm-embedded-interop")return;const te=new URLSearchParams(c.search),ge=te.get("id"),xe=te.get("origin");if(xe){const rt=(Se=new URL(xe))==null?void 0:Se.hostname;if(/^(?:[\w-]+\.)*(?:machinemetrics\.com|machinemetrics-us-gov\.com|m12s\.com)$/.test(rt))y(xe);else{alert("Invalid Embeddable Zone Host");return}}if(r===!1){if(xe){const rt={instanceId:ge,authUrl:`${window.location.protocol}//${window.location.host}/mm-embedded-login?id=${ge}&origin=${xe}`,origin:xe};if(((Ve=new URL(xe))==null?void 0:Ve.protocol)==="http:"){window.parent.postMessage({type:"login",...rt},xe);return}e({mm_instanceId:rt.instanceId,mm_authUrl:encodeURIComponent(rt.authUrl),mm_origin:rt.origin});return}e();return}ge&&m(ge),ge&&xe&&i(!0)},[c,r]),pn.useBlocker(({nextLocation:te})=>{var ge;return n?(ge=te.state)!=null&&ge.fromParent?(h(!0),!1):(se(`${te.pathname}${te.search}`),!0):!1}),pe.useEffect(()=>{if(!n||!d)return;const te=ge=>{ge.metaKey&&ge.key==="k"&&window.parent.postMessage({type:"open-search",instanceId:g},d)};return window.addEventListener("keydown",te),()=>{window.removeEventListener("keydown",te)}},[n,d]),pe.useEffect(()=>{if(!n||!d)return;const te=({origin:ge,data:xe})=>{var Se,Ve,rt;if(ge===d)switch(xe.type){case"navigate":u(xe.path,{replace:!0,state:{fromParent:!0}});break;case"set-context":I(xe.context||{});break;case"set-configuring":Z(xe.isConfiguring);break;case"set-params":fe(xe.params);break;case"load-options":(Se=S[xe.name])==null||Se.call(S,{filter:xe.filter});break;case"validate":(Ve=T[xe.name])==null||Ve.call(T,{value:xe.value});break;case"response":(rt=M[xe.callbackId])==null||rt.call(M,xe.response);break}};return window.addEventListener("message",te),!f&&r&&window.parent.postMessage({type:"ready",instanceId:g},d),()=>{window.removeEventListener("message",te)}},[u,f,n,r,d,S,T,M]);const se=(te,ge)=>{!f&&!r||window.parent.postMessage({type:"set-path",instanceId:g,path:te,...ge},d)},ke=te=>{f&&window.parent.postMessage({type:"set-summary",instanceId:g,summary:te},d)},me=te=>{f&&window.parent.postMessage({type:"toast",instanceId:g,message:te},d)},Ne=te=>{f&&window.parent.postMessage({type:"popup",instanceId:g,message:te},d)},Ce=()=>{f&&window.parent.postMessage({type:"loaded",instanceId:g},d)},ye=async({header:te,body:ge,choices:xe})=>f?new Promise(Se=>{const Ve=A0(),rt=async kt=>{U(Rt=>{const{[Ve]:st,...Xe}=Rt;return Xe}),Se(kt)};U(kt=>({...kt,[Ve]:rt})),window.parent.postMessage({type:"confirm",instanceId:g,header:te,body:ge,choices:xe,callbackId:Ve},d)}):Promise.reject(new Error("Not ready")),We=async(te,ge)=>{f&&(ge.validate&&typeof ge.validate=="function"&&P(xe=>{const Se=async Ve=>{const rt=await ge.validate(Ve);window.parent.postMessage({type:"set-validation",instanceId:g,name:te,validation:rt},d)};return xe[te]&&Se({value:""}),{...xe,[te]:Se}}),ge.options&&_(xe=>{const Se=async Ve=>{const kt=await(typeof ge.options=="function"?ge.options:()=>ge.options)(Ve);window.parent.postMessage({type:"set-options",instanceId:g,name:te,options:kt},d)};return xe[te]&&Se({filter:""}),{...xe,[te]:Se}}),window.parent.postMessage({type:"add-setting",instanceId:g,setting:{name:te,...ge,options:void 0,validate:void 0}},d))},Ie=pe.useMemo(()=>({commands:{navigateParent:se,setSummary:ke,toast:me,popup:Ne,confirm:ye,setLoaded:Ce},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:z,colorMode:b.colorMode,isFullScreen:b.isFullScreen,...X},addSetting:We}),[n,z,se,ke,me,Ne,ye,Ce,b,X,We]);return nr.jsx(vo.Provider,{value:Ie,children:c.pathname!=="/mm-embedded-interop"&&c.pathname!=="/mm-embedded-login"&&c.pathname!=="/mm-embedded-print"?t:nr.jsx(nr.Fragment,{})})},pI=()=>{const{urls:r,jwtRef:e,accessToken:t}=ti(),{graphQLRoleOverride:n,children:i}=pe.useContext(rc),[a,u]=pe.useState(),[c,f]=pe.useState(),h=()=>{const g=new URL(r.graphQLUrl);return`//${g.host}${g.pathname}`},d=()=>n?{"X-Hasura-Role":n}:{};pe.useEffect(()=>{const g=new Ok(Ck({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})),S=m.split(({query:P})=>{const M=Bi(P);return M.kind==="OperationDefinition"&&M.operation==="subscription"},g,I),T=M0(async(P,{headers:M})=>({headers:{...M,Authorization:`Bearer ${t}`}})).concat(new hI.RestLink({uri:r.apiUrl}));f(Kr.from([T,S]))},[]),pe.useEffect(()=>{c&&u(new Cf({link:c,cache:new Of}))},[c]);const y=pe.useMemo(()=>({link:c}),[c]);return nr.jsx(u0.Provider,{value:y,children:a?nr.jsx(T1,{client:a,children:nr.jsx(zA,{children:nr.jsx(dI,{children:i})})}):nr.jsx(nr.Fragment,{})})},mI=Qp.div`
|
|
132
132
|
text-align: center;
|
|
133
133
|
padding-top: 200px;
|
|
134
134
|
`,Fb=({loadError:r})=>{const e=_k();return r&&(!e||e.indexOf("mm-embedded-login")===-1)?nr.jsx(mI,{children:r}):(k0(),nr.jsx(pn.Navigate,{replace:!0,to:e||"/"}))};Qp.div`
|
package/package.json
CHANGED