PageSourceSearch

https://fjordline.com/fl-static-pages/_next/static/chunks/3fvq-3s5px_8v.js

js fjordline.com collected 2026-10-02 05:21:31 UTC 72,285 bytes, 3 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,636536,908667,807574,214990,509820,663095,269193,721634,688236,681026,613650,881283,t=>{"use strict";let e,r="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),n=new Uint8Array(16),s=[];for(let t=0;t<256;++t)s.push((t+256).toString(16).slice(1));let i=function(t,i,o){if(r&&!i&&!t)return r();var a=t,c=o;let u=(a=a||{}).random??a.rng?.()??function(){if(!e){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e=crypto.getRandomValues.bind(crypto)}return e(n)}();if(u.length<16)throw Error("Random bytes length must be >= 16");if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,i){if((c=c||0)<0||c+16>i.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let t=0;t<16;++t)i[c+t]=u[t];return i}return function(t,e=0){return(s[t[e+0]]+s[t[e+1]]+s[t[e+2]]+s[t[e+3]]+"-"+s[t[e+4]]+s[t[e+5]]+"-"+s[t[e+6]]+s[t[e+7]]+"-"+s[t[e+8]]+s[t[e+9]]+"-"+s[t[e+10]]+s[t[e+11]]+s[t[e+12]]+s[t[e+13]]+s[t[e+14]]+s[t[e+15]]).toLowerCase()}(u)};class o{constructor(t){this._process=t,this._active=!1,this._current=null,this._last=null}start(){this._active=!0,this.flush()}clear(){this._current&&(this._current.next=null,this._last=this._current)}enqueue(t){let e={value:t,next:null};if(this._current){this._last.next=e,this._last=e;return}this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){let t=this._current;this._process(t.value),this._current=t.next}this._last=null}}let a="xstate.init",c="xstate.error",u="xstate.stop";function l(t,e){return{type:`xstate.done.state.${t}`,output:e}}function f(t,e){return{type:`xstate.error.actor.${t}`,error:e,actorId:t}}function p(t){return{type:a,input:t}}function h(t){setTimeout(()=>{throw t})}let d="function"==typeof Symbol&&Symbol.observable||"@@observable";function y(t){if(_(t))return t;let e=[],r="";for(let n=0;n<t.length;n++){switch(t.charCodeAt(n)){case 92:r+=t[n+1],n++;continue;case 46:e.push(r),r="";
1continue}r+=t[n]}return e.push(r),e}function v(t){var e;return(e=t)&&"object"==typeof e&&"machine"in e&&"value"in e?t.value:"string"!=typeof t?t:function(t){if(1===t.length)return t[0];let e={},r=e;for(let e=0;e<t.length-1;e++)if(e===t.length-2)r[t[e]]=t[e+1];else{let n=r;r={},n[t[e]]=r}return e}(y(t))}function g(t,e){let r={},n=Object.keys(t);for(let s=0;s<n.length;s++){let i=n[s];r[i]=e(t[i],i,t,s)}return r}function m(t){var e;return void 0===t?[]:_(e=t)?e:[e]}function b(t,e,r,n){return"function"==typeof t?t({context:e,event:r,self:n}):t}function _(t){return Array.isArray(t)}function S(t){var e;return(_(e=t)?e:[e]).map(t=>void 0===t||"string"==typeof t?{target:t}:t)}function x(t){if(void 0!==t&&""!==t)return m(t)}function w(t,e,r){let n="object"==typeof t,s=n?t:void 0;return{next:(n?t.next:t)?.bind(s),error:(n?t.error:e)?.bind(s),complete:(n?t.complete:r)?.bind(s)}}function k(t,e){return`${e}.${t}`}function E(t,e){let r=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!r)return t.implementations.actors[e];let[,n,s]=r,i=t.getStateNodeById(s).config.invoke;return(Array.isArray(i)?i[n]:i).src}function I(t,e){if(e===t||"*"===e)return!0;if(!e.endsWith(".*"))return!1;let r=e.split("."),n=t.split(".");for(let t=0;t<r.length;t++){let e=r[t],s=n[t];if("*"===e)return t===r.length-1;if(e!==s)return!1}return!0}function O(t,e){return`${t.sessionId}.${e}`}let T=0,A=!1,$=((eo={})[eo.NotStarted=0]="NotStarted",eo[eo.Running=1]="Running",eo[eo.Stopped=2]="Stopped",eo),j={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class P{constructor(t,e){this.logic=t,this._snapshot=void 0,this.clock=void 0,this.options=void 0,this.id=void 0,this.mailbox=new o(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=$.NotStarted,this._parent=void 0,this._syncSnapshot=void 0,this.ref=void 0,this._actorScope=void 0,this.systemId=void 0,this.sessionId=void 0,this.system=void 0,this._doneEvent=void 0,this.src=void 0,this._deferred=[];const r={...j,...e},{clock:n,logger:s,parent:i,syncSnapshot:a,id:c,systemId:u,inspect:l}=r;this.system=i?i.system:function(t,e){let r=new Map,n=new Map,s=new WeakMap,i=new Set,o={},{clock:a,logger:c}=e,u={schedule:(t,e,r,n,s=Math.random().toString(36).slice(2))=>{let i={source:t,target:e,event:r,delay:n,id:s,startedAt:Date.now()},c=O(t,s);l._snapshot._scheduledEvents[c]=i;let u=a.setTimeout(()=>{delete o[c],delete l._snapshot._scheduledEvents[c],l._relay(t,e,r)},n);o[c]=u},cancel:(t,e)=>{let r=O(t,e),n=o[r];delete o[r],delete l._snapshot._scheduledEvents[r],void 0!==n&&a.clearTimeout(n)},cancelAll:t=>{for(let e in l._snapshot._scheduledEvents){let r=l._snapshot._scheduledEvents[e];r.source===t&&u.cancel(t,r.id)}}},l={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>`x:${T++}`,_register:(t,e)=>(r.set(t,e),t),_unregister:t=>{r.delete(t.sessionId);let e=s.get(t);void 0!==e&&(n.delete(e),s.delete(t))},get:t=>n.get(t),getAll:()=>Object.fromEntries(n.entries()),_set:(t,e)=>{let r=n.get(t);if(r&&r!==e)throw Error(`Actor with system ID '${t}' already exists.`);n.set(t,e),s.set(e,t)},inspect:t=>{let e=w(t);return i.add(e),{unsubscribe(){i.delete(e)}}},_sendInspectionEvent:e=>{if(!i.size)return;let r={...e,rootId:t.sessionId};i.forEach(t=>t.next?.(r))},_relay:(t,e,r)=>{l._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:r}),e._send(r)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...l._snapshot._scheduledEvents}}),start:()=>{let t=l._snapshot._scheduledEvents;for(let e in l._snapshot._scheduledEvents={},t){let{source:r,target:n,event:s,delay:i,id:o}=t[e];u.schedule(r,n,s,i,o)}},_clock:a,_logger:c};return l}(this,{clock:n,logger:s}),l&&!i&&this.system.inspect(w(l)),this.sessionId=this.system._bookId(),this.id=c??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=i,this._syncSnapshot=a,this.options=r,this.src=r.src??t,this.ref=this,this._actorScope={self:this,id:this.id,sessionId:this.sessionId,logger:this.logger,defer:t=>{this._deferred.push(t)},system:this.system,stopChild:t=>{if(t._parent!==this)throw Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{let e=this.eventListeners.get(t.type),r=this.eventListeners.get("*");if(e||r)for(let n of[...e?e.values():[],...r?r.values():[]])try{n(t)}catch(t){h(t)}},actionExecutor:t=>{let e=()=>{if(this._actorScope.system._sendInspectionEvent({type:"@xstate.action",actorRef:this,action:{type:t.type,params:t.params}}),!t.exec)return;let e=A;try{A=!0,t.exec(t.info,t.params)}finally{A=e}};this._processingStatus===$.Running?e():this._deferred.push(e)}},this.send=this.send.bind(this),this.system._sendInspectionEvent({type:"@xstate.actor",actorRef:this}),u&&(this.systemId=u,this.system._set(u,this)),this._initState(e?.snapshot??e?.state),u&&"active"!==this._snapshot.status&&this.system._unregister(this)}_initState(t){try{this._snapshot=t?this.logic.restoreSnapshot?this.logic.restoreSnapshot(t,this._actorScope):t:this.logic.getInitialSnapshot(this._actorScope,this.options?.input)}catch(t){this._snapshot={status:"error",output:void 0,error:t}}}update(t,e){let r;for(this._snapshot=t;r=this._deferred.shift();)try{r()}catch(e){this._deferred.length=0,this._snapshot={...t,status:"error",error:e}}switch(this._snapshot.status){case"active":for(let e of this.observers)try{e.
1next?.(t)}catch(t){h(t)}break;case"done":var n;for(let e of this.observers)try{e.next?.(t)}catch(t){h(t)}this._stopProcedure(),this._complete(),this._doneEvent=(n=this.id,{type:`xstate.done.actor.${n}`,output:this._snapshot.output,actorId:n}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,r){let n=w(t,e,r);if(this._processingStatus!==$.Stopped)this.observers.add(n);else switch(this._snapshot.status){case"done":try{n.complete?.()}catch(t){h(t)}break;case"error":{let t=this._snapshot.error;if(n.error)try{n.error(t)}catch(t){h(t)}else h(t)}}return{unsubscribe:()=>{this.observers.delete(n)}}}on(t,e){let r=this.eventListeners.get(t);r||(r=new Set,this.eventListeners.set(t,r));let n=e.bind(void 0);return r.add(n),{unsubscribe:()=>{r.delete(n)}}}start(){if(this._processingStatus===$.Running)return this;this._syncSnapshot&&this.subscribe({next:t=>{"active"===t.status&&this.system._relay(this,this._parent,{type:`xstate.snapshot.${this.id}`,snapshot:t})},error:()=>{}}),this.system._register(this.sessionId,this),this.systemId&&this.system._set(this.systemId,this),this._processingStatus=$.Running;let t=p(this.options.input);switch(this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t}),this._snapshot.status){case"done":return this.update(this._snapshot,t),this;case"error":return this._error(this._snapshot.error),this}if(this._parent||this.system.start(),this.logic.start)try{this.logic.start(this._snapshot,this._actorScope)}catch(t){return this._snapshot={...this._snapshot,status:"error",error:t},this._error(t),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,r;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(t){r={err:t}}if(r){let{err:t}=r;this._snapshot={...this._snapshot,status:"error",error:t},this._error(t);return}this.update(e,t),t.type===u&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===$.Stopped||((this.mailbox.clear(),this._processingStatus===$.NotStarted)?this._processingStatus=$.Stopped:this.mailbox.enqueue({type:u})),this}stop(){if(this._parent)throw Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(let t of this.observers)try{t.complete?.()}catch(t){h(t)}this.observers.clear(),this.eventListeners.clear()}_reportError(t){if(!this.observers.size){this._parent||h(t),this.eventListeners.clear();return}let e=!1;for(let r of this.observers){let n=r.error;e||=!n;try{n?.(t)}catch(t){h(t)}}this.observers.clear(),this.eventListeners.clear(),e&&h(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,f(this.id,t))}_stopProcedure(){return this._processingStatus!==$.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new o(this._process.bind(this)),this._processingStatus=$.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==$.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){let{devTools:e}=this.options;e&&("function"==typeof e?e:e=>{if("u"<typeof window)return;let r=function(){let e="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:t.g;if(e.__xstate__)return e.__xstate__}();r&&r.register(e)})(this)}toJSON(){return{xstate$$type:1,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[d](){return this}getSnapshot(){return this._snapshot}}function R(t,...[e]){return new P(t,e)}function M(t,e,r,n,{sendId:s}){return[e,{sendId:"function"==typeof s?s(r,n):s},void 0]}function q(t,e){t.defer(()=>{t.system.scheduler.cancel(t.self,e.sendId)})}function N(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=M,e.execute=q,e}function C(t,e,r,n,{id:s,systemId:i,src:o,input:a,syncSnapshot:c}){let u,l,f="string"==typeof o?E(e.machine,o):o,p="function"==typeof s?s(r):s;return f&&(l="function"==typeof a?a({context:e.context,event:r.event,self:t.self}):a,u=R(f,{id:p,src:o,parent:t.self,syncSnapshot:c,systemId:i,input:l})),[tP(e,{children:{...e.children,[p]:u}}),{id:s,systemId:i,actorRef:u,src:o,input:l},void 0]}function L(t,{actorRef:e}){e&&t.defer(()=>{e._processingStatus!==$.Stopped&&e.start()})}function D(...[t,{id:e,systemId:r,input:n,syncSnapshot:s=!1}={}]){function i(t,e){}return i.type="xstate.spawnChild",i.id=e,i.systemId=r,i.src=t,i.input=n,i.syncSnapshot=s,i.resolve=C,i.execute=L,i}function U(t,e,r,n,{actorRef:s}){let i="function"==typeof s?s(r,n):s,o="string"==typeof i?e.children[i]:i,a=e.children;return o&&(a={...a},delete a[o.id]),[tP(e,{children:a}),o,void 0]}function F(t,e){if(e){if(!function t(e,r){let n=r.getSnapshot();if(n&&"children"in n)for(let r of Object.values(n.children))t(e,r);e.system._unregister(r)}(t,e),e._processingStatus!==$.Running)return void t.stopChild(e);t.defer(()=>{t.stopChild(e)})}}function B(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=U,e.execute=F,e}function z(t,e,r,n){let{machine:s}=n,i="function"==typeof t,o=i?t:s.implementations.guards["string"==typeof t?t:t.type];if(!i&&!o)throw Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof o)return z(o,e,r,n);let a={context:e,event:r},c=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:r}):t.params:void 0;return"check"in o?o.check(n,a,o):o(a,c)}function V(t){return"atomic"===t.type||"final"===t.type}function W(t){return Object.values(t.states).filter(t=>"history"!==t.type)}function G(t,e){let r=[];if(e===t)return r;let n=t.parent;for(;n&&n!==e;)r.push(n),n=n.parent;return r}function J(t){let e=new Set(t),r=Y(e);for(let t of e)if("compound"!==t.type||r.get(t)&&r.get(t).length){if("parallel"===t.type){for(let r of W(t))if("history"!==r.type&&!e.has(r))for(let t of to(r))e.add(t)}}else to(t).forEach(t=>e.add(t));for(let t of e){let r=t.parent;for(;r;)e.add(r),r=r.parent}return e}function Y(t){let e=new Map;for(let r of t)e.has(r)||e.set(r,[]),r.parent&&(e.has(r.parent)||e.set(r.parent,[]),e.get(r.parent).push(r));return e}function H(t,e){return function t(e,r){let n=r.get(e);if(!n)return{};if("compound"===e.type){let t=n[0];if(!t)return{};if(V(t))return t.key}let s={};for(let e of n)s[e.key]=t(e,r);return s}(t,Y(J(e)))}function K(t,e){return"compound"===e.type?W(e).some(e=>"final"===e.type&&t.has(e)):"parallel"===e.type?W(e).every(e=>K(t,e)):"final"===e.type}let Q=t=>"#"===t[0];function X(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter(t=>I(e,t)).sort((t,e)=>e.length-t.length).flatMap(e=>t.transitions.get(e))}function Z(t){let e=t.config.after;return e?Object.keys(e).flatMap(r=>{var n;let s,i,o=e[r],a=Number.isNaN(+r)?r:+r,c=(n=t.id,i=(s={type:`xstate.after.${a}.${n}`}).type,t.entry.push(tN(s,{id:i,delay:a})),t.exit.push(N(i)),i);return m("string"==typeof o?{target:o}:o).map(t=>({...t,event:c,delay:a}))}).map(e=>{let{delay:r}=e;return{...tt(t,e.event,e),delay:r}}):[]}function tt(t,e,r){let n=x(r.target),s=r.reenter??!1,i=function(t,e){if(void 0!==e)return e.map(e=>{if("string"!=typeof e)return e;if(Q(e))return t.machine.getStateNodeById(e);let r="."===e[0];if(r&&!t.parent)return tu(t,e.slice(1));let n=r?t.key+e:e;if(t.parent)try{return tu(t.parent,n)}catch(e){throw Error(`Invalid transition definition for state node '${t.id}':
2${e.message}`)}throw Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`)})}(t,n),o={...r,actions:m(r.actions),guard:r.guard,target:i,source:t,reenter
2:s,eventType:e,toJSON:()=>({...o,source:`#${t.id}`,target:i?i.map(t=>`#${t.id}`):void 0})};return o}function te(t){let e=new Map;if(t.config.on)for(let r of Object.keys(t.config.on)){if(""===r)throw Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');let n=t.config.on[r];e.set(r,S(n).map(e=>tt(t,r,e)))}if(t.config.onDone){let r=`xstate.done.state.${t.id}`;e.set(r,S(t.config.onDone).map(e=>tt(t,r,e)))}for(let r of t.invoke){if(r.onDone){let n=`xstate.done.actor.${r.id}`;e.set(n,S(r.onDone).map(e=>tt(t,n,e)))}if(r.onError){let n=`xstate.error.actor.${r.id}`;e.set(n,S(r.onError).map(e=>tt(t,n,e)))}if(r.onSnapshot){let n=`xstate.snapshot.${r.id}`;e.set(n,S(r.onSnapshot).map(e=>tt(t,n,e)))}}for(let r of t.after){let t=e.get(r.eventType);t||(t=[],e.set(r.eventType,t)),t.push(r)}return e}function tr(t){let e=[],r=n=>{Object.values(n).forEach(n=>{if(n.config.route&&n.config.id){let r=n.config.id,s=n.config.route.guard,i={...n.config.route,guard:(t,e)=>t.event.to===`#${r}`&&(!s||"function"!=typeof s||s(t,e)),target:`#${r}`};e.push(tt(t,"xstate.route",i))}n.states&&r(n.states)})};r(t.states),e.length>0&&t.transitions.set("xstate.route",e)}function tn(t,e){let r="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!r&&e)throw Error(`Initial state node "${e}" not found on parent state node #${t.id}`);let n={source:t,actions:e&&"string"!=typeof e?m(e.actions):[],eventType:null,reenter:!1,target:r?[r]:[],toJSON:()=>({...n,source:`#${t.id}`,target:r?[`#${r.id}`]:[]})};return n}function ts(t){let e=x(t.config.target);return e?{target:e.map(e=>"string"==typeof e?tu(t.parent,e):e)}:t.parent.initial}function ti(t){return"history"===t.type}function to(t){let e=ta(t);for(let r of e)for(let n of G(r,t))e.add(n);return e}function ta(t){let e=new Set;return!function t(r){if(!e.has(r)){if(e.add(r),"compound"===r.type)t(r.initial.target[0]);else if("parallel"===r.type)for(let e of W(r))t(e)}}(t),e}function tc(t,e){if(Q(e))return t.machine.getStateNodeById(e);if(!t.states)throw Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);let r=t.states[e];if(!r)throw Error(`Child state '${e}' does not exist on '${t.id}'`);return r}function tu(t,e){if("string"==typeof e&&Q(e))try{return t.machine.getStateNodeById(e)}catch{}let r=y(e).slice(),n=t;for(;r.length;){let t=r.shift();if(!t.length)break;n=tc(n,t)}return n}function tl(t,e){if("string"==typeof e){let r=t.states[e];if(!r)throw Error(`State '${e}' does not exist on '${t.id}'`);return[t,r]}let r=Object.keys(e),n=r.map(e=>tc(t,e)).filter(Boolean);return[t.machine.root,t].concat(n,r.reduce((r,n)=>{let s=tc(t,n);if(!s)return r;let i=tl(s,e[n]);return r.concat(i)},[]))}function tf(t,e,r,n){if("string"==typeof e){let s;return(s=tc(t,e).next(r,n))&&s.length?s:t.next(r,n)}if(1===Object.keys(e).length){let s,i;return(i=tf(tc(t,(s=Object.keys(e))[0]),e[s[0]],r,n))&&i.length?i:t.next(r,n)}let s=[];for(let i of Object.keys(e)){let o=e[i];if(!o)continue;let a=tf(tc(t,i),o,r,n);a&&s.push(...a)}return s.length?s:t.next(r,n)}function tp(t,e){let r=t;for(;r.parent&&r.parent!==e;)r=r.parent;return r.parent===e}function th(t,e,r){let n=new Set;for(let s of t){let t=!1,i=new Set;for(let o of n)if(function(t,e){let r=new Set(t),n=new Set(e);for(let t of r)if(n.has(t))return!0;for(let t of n)if(r.has(t))return!0;return!1}(tv([s],e,r),tv([o],e,r)))if(tp(s.source,o.source))i.add(o);else{t=!0;break}if(!t){for(let t of i)n.delete(t);n.add(s)}}return Array.from(n)}function td(t,e){if(!t.target)return[];let r=new Set;for(let n of t.target)if(ti(n))if(e[n.id])for(let t of e[n.id])r.add(t);else for(let t of td(ts(n),e))r.add(t);else r.add(n);return[...r]}function ty(t,e){let r=td(t,e);if(!r)return;if(!t.reenter&&r.every(e=>e===t.source||tp(e,t.source)))return t.source;let n=function(t){let[e,...r]=t;for(let t of G(e,void 0))if(r.every(e=>tp(e,t)))return t}(r.concat(t.source));return n||(t.reenter?void 0:t.source.machine.root)}function tv(t,e,r){let n=new Set;for(let s of t)if(s.target?.length){let t=ty(s,r);for(let r of(s.reenter&&s.source===t&&n.add(t),e))tp(r,t)&&n.add(r)}return[...n]}function tg(t,e,r,n,s){return tm([{target:[...ta(t)],source:t,reenter
2:!0,actions:[],eventType:null,toJSON:null}],e,r,n,!0,s)}function tm(t,e,r,n,s,i){let o=[];if(!t.length)return[e,o];let a=r.actionExecutor;r.actionExecutor=t=>{o.push(t),a(t)};try{let a=new Set(e._nodes),c=e.historyValue,u=th(t,a,c),f=e;s||([f,c]=function(t,e,r,n,s,i,o,a){let c,u=t,l=tv(n,s,i);for(let t of(l.sort((t,e)=>e.order-t.order),l))for(let e of function(t){return Object.keys(t.states).map(e=>t.states[e]).filter(t=>"history"===t.type)}(t)){let r;r="deep"===e.history?e=>V(e)&&tp(e,t):e=>e.parent===t,(c??={...i})[e.id]=Array.from(s).filter(r)}for(let t of l)u=tS(u,e,r,[...t.exit,...t.invoke.map(t=>B(t.id))],o,void 0),s.delete(t);return[u,c||i]}(f,n,r,u,a,c,i,r.actionExecutor)),f=tS(f,n,r,u.flatMap(t=>t.actions),i,void 0),f=function(t,e,r,n,s,i,o,a){let c=t,u=new Set,f=new Set;(function(t,e,r,n){for(let s of t){let t=ty(s,e);for(let i of s.target||[])!ti(i)&&(s.source!==i||s.source!==t||s.reenter)&&(n.add(i),r.add(i)),tb(i,e,r,n);for(let i of td(s,e)){let o=G(i,t);t?.type==="parallel"&&o.push(t),t_(n,e,r,o,!s.source.parent&&s.reenter?void 0:t)}}})(n,o,f,u),a&&f.add(t.machine.root);let p=new Set;for(let t of[...u].sort((t,e)=>t.order-e.order)){s.add(t);let n=[];for(let e of(n.push(...t.entry),t.invoke))n.push(D(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(f.has(t)){let e=t.initial.actions;n.push(...e)}if(c=tS(c,e,r,n,i,t.invoke.map(t=>t.id)),"final"===t.type){let n=t.parent,o=n?.type==="parallel"?n:n?.parent,a=o||t;for(n?.type==="compound"&&i.push(l(n.id,void 0!==t.output?b(t.output,c.context,e,r.self):void 0));o?.type==="parallel"&&!p.has(o)&&K(s,o);)p.add(o),i.push(l(o.id)),a=o,o=o.parent;if(o)continue;c=tP(c,{status:"done",output:function(t,e,r,n,s){if(void 0===n.output)return;let i=l(s.id,void 0!==s.output&&s.parent?b(s.output,t.context,e,r.self):void 0);return b(n.output,t.context,i,r.self)}(c,e,r,c.machine.root,a)})}}return c}(f,n,r,u,a,i,c,s);let p=[...a];"done"===f.status&&(f=tS(f,n,r,p.sort((t,e)=>e.order-t.order).flatMap(t=>t.exit),i,void 0));try{if(c===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}(e._nodes,a))return[f,o];return[tP(f,{_nodes:p,historyValue:c}),o]}catch(t){throw t}}finally{r.actionExecutor=a}}function tb(t,e,r,n){var s,i,o,a;if(ti(t))if(e[t.id]){let o=e[t.id];for(let t of o)n.add(t),tb(t,e,r,n);for(let a of o){s=a,i=t.parent,t_(n,e,r,G(s,i))}}else{let s=ts(t);for(let i of s.target)n.add(i),s===t.parent?.initial&&r.add(t.parent),tb(i,e,r,n);for(let i of s.target){o=i,a=t.parent,t_(n,e,r,G(o,a))}}else if("compound"===t.type){let[s]=t.initial.target;ti(s)||(n.add(s),r.add(s)),tb(s,e,r,n),t_(n,e,r,G(s,t))}else if("parallel"===t.type)for(let s of W(t).filter(t=>!ti(t)))[...n].some(t=>tp(t,s))||(ti(s)||(n.add(s),r.add(s)),tb(s,e,r,n))}function t_(t,e,r,n,s){for(let i of n)if((!s||tp(i,s))&&t.add(i),"parallel"===i.type)for(let n of W(i).filter(t=>!ti(t)))[...t].some(t=>tp(t,n))||(t.add(n),tb(n,e,r,t))}function tS(t,e,r,n,s,i){let o=i?[]:void 0,a=function t(e,r,n,s,i,o){let{machine:a}=e,c=e;for(let e of s){var u;let s="function"==typeof e,l=s?e:(u="string"==typeof e?e:e.type,a.implementations.actions[u]),f={context:c.context,event:r,self:n.self,system:n.system},p=s||"string"==typeof e?void 0:"params"in e?"function"==typeof e.params?e.params({context:c.context,event:r}):e.params:void 0;if(!l||!("resolve"in l)){n.actionExecutor({type:"string"==typeof e?e:"object"==typeof e?e.type:e.name||"(anonymous)",info:f,params:p,exec:l});continue}let[h,d,y]=l.resolve(n,c,f,p,l,i);c=h,"retryResolve"in l&&o?.push([l,d]),"execute"in l&&n.actionExecutor({type:l.type,info:f,params:d,exec:l.execute.bind(null,n,d)}),y&&(c=t(c,r,n,y,i,o))}return c}(t,e,r,n,{internalQueue:s,deferredActorIds:i},o);return o?.forEach(([t,e])=>{t.retryResolve(r,a,e)}),a}function tx(t,e,r,n){let s=t,i=[];function o(t,e,n){r.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:r.self,event:e,snapshot:t[0],_transitions:n}),i.push(t)}if(e.type===u)return o([s=tP(tw(s,e,r),{status:"stopped"}),[]],e,[]),{snapshot:s,microsteps:i};let c=e;if(c.type!==a){let e=c,a=e.type.startsWith("xstate.error.actor"),u=tk(e,s);if(a&&!u.length)return o([s=tP(t,{status:"error",error:e.error}),[]],e,[]),{snapshot:s,microsteps:i};let l=tm(u,t,r,c,!1,n);s=l[0],o(l,e,u)}
2let l=!0;for(;"active"===s.status;){let t=l?function(t,e){let r=new Set;for(let n of t._nodes.filter(V))t:for(let s of[n].concat(G(n,void 0)))if(s.always){for(let n of s.always)if(void 0===n.guard||z(n.guard,t.context,e,t)){r.add(n);break t}}return th(Array.from(r),new Set(t._nodes),t.historyValue)}(s,c):[],e=t.length?s:void 0;if(!t.length){if(!n.length)break;t=tk(c=n.shift(),s)}let i=tm(t,s,r,c,!1,n);l=(s=i[0])!==e,o(i,c,t)}return"active"!==s.status&&tw(s,c,r),{snapshot:s,microsteps:i}}function tw(t,e,r){return tS(t,e,r,Object.values(t.children).map(t=>B(t)),[],void 0)}function tk(t,e){return e.machine.getTransitionData(e,t)}function tE(t,e){let r=J(tl(t,e));return H(t,[...r])}let tI=function(t){return function t(e,r){let n=v(e),s=v(r);return"string"==typeof s?"string"==typeof n&&s===n:"string"==typeof n?n in s:Object.keys(n).every(e=>e in s&&t(n[e],s[e]))}(t,this.value)},tO=function(t){return this.tags.has(t)},tT=function(t){let e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some(t=>void 0!==t.target||t.actions.length)},tA=function(){let{_nodes:t,tags:e,machine:r,getMeta:n,toJSON:s,can:i,hasTag:o,matches:a,...c}=this;return{...c,tags:Array.from(e)}},t$=function(){return this._nodes.reduce((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t),{})};function tj(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:H(e.root,t._nodes),tags:new Set(t._nodes.flatMap(t=>t.tags)),children:t.children,historyValue:t.historyValue||{},matches:tI,hasTag:tO,can:tT,getMeta:t$,toJSON:tA}}function tP(t,e={}){return tj({...t,...e},t.machine)}function tR(t,e){let{_nodes:r,tags:n,machine:s,children:i,context:o,can:a,hasTag:c,matches:u,getMeta:l,toJSON:f,...p}=t,h={};for(let t in i){let r=i[t];h[t]={snapshot:r.getPersistedSnapshot(e),src:r.src,systemId:r.systemId,syncSnapshot:r._syncSnapshot}}return{...p,context:function t(e){let r;for(let n in e){let s=e[n];if(s&&"object"==typeof s)if("sessionId"in s&&"send"in s&&"ref"in s)(r??=Array.isArray(e)?e.slice():{...e})[n]={xstate$$type:1,id:s.id};else{let i=t(s);i!==s&&((r??=Array.isArray(e)?e.slice():{...e})[n]=i)}}return r??e}(o),children:h,historyValue:function(t){if("object"!=typeof t||null===t)return{};let e={};for(let r in t){let n=t[r];Array.isArray(n)&&(e[r]=n.map(t=>({id:t.id})))}return e}(p.historyValue)}}function tM(t,e,r,n,{event:s,id:i,delay:o},{internalQueue:a}){let c,u=e.machine.implementations.delays;if("string"==typeof s)throw Error(`Only event objects may be used with raise; use raise({ type: "${s}" }) instead`);let l="function"==typeof s?s(r,n):s;if("string"==typeof o){let t=u&&u[o];c="function"==typeof t?t(r,n):t}else c="function"==typeof o?o(r,n):o;return"number"!=typeof c&&a.push(l),[e,{event:l,id:i,delay:c},void 0]}function tq(t,e){let{event:r,delay:n,id:s}=e;if("number"==typeof n)return void t.defer(()=>{let e=t.self;t.system.scheduler.schedule(e,e,r,n,s)})}function tN(t,e){function r(t,e){}return r.type="xstate.raise",r.event=t,r.id=e?.id,r.delay=e?.delay,r.resolve=tM,r.execute=tq,r}t.s(["$",0,1,"B",0,S,"C",0,tt,"D",0,z,"E",0,k,"F",0,Z,"G",0,tn,"H",0,X,"I",0,tr,"J",0,tE,"K",0,J,"L",0,tj,"M",0,K,"N",0,"","O",0,tf,"P",0,tS,"Q",0,y,"R",0,Q,"S",0,".","T",0,tu,"U",0,tR,"V",0,E,"W",0,c,"X",0,u,"Y",0,f,"Z",0,$,"_",0,tP,"a",0,N,"b",0,D,"c",0,R,"d",0,tx,"e",0,p,"f",0,V,"g",0,G,"i",0,tg,"m",0,I,"p",0,tl,"r",0,tN,"s",0,B,"t",0,m,"y",0,g,"z",0,te],908667);let tC=new WeakMap;function tL(t){return{config:t,start:(e,r)=>{let{self:n,system:s,emit:i}=r,o={receivers:void 0,dispose:void 0};tC.set(n,o),o.dispose=t({input:e.input,system:s,self:n,sendBack:t=>{"stopped"!==n.getSnapshot().status&&n._parent&&s._relay(n,n._parent,t)},receive:t=>{o.receivers??=new Set,o.receivers.add(t)},emit:i})},transition:(t,e,r)=>{let n=tC.get(r.self);return e.type===u?(t={...t,status:"stopped",error:void 0},tC.delete(r.self),n.receivers?.clear(),n.dispose?.()):n.receivers?.forEach(t=>t(e)),t},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}let tD="xstate.observable.error",tU="xstate.observable.complete";function tF(t){return{config:t,transition:(t,e)=>{if("active"!==t.status)return t;switch(e.type){case tD:return{...t,status:"error",error:e.data,input:void 0,_subscription:void 0};case tU:return{...t,status:"done",input:void 0,_subscription:void 0};case u:return t._subscription.unsubscribe(),{...t,status:"stopped",input:void 0,_subscription:void 0};default:return t}},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:void 0,input:e,_subscription:void 0}),start:(e,{self:r,system:n,emit:s})=>{"done"!==e.status&&(e._subscription=t({input:e.input,system:n,self:r,emit:s}).subscribe({next:t=>{r._parent&&n._relay(r,r._parent,t)},error:t=>{n._relay(r,r,{type:tD,data:t})},complete:()=>{n._relay(r,r,{type:tU})}}))},getPersistedSnapshot:({_subscription:t,...e})=>e,restoreSnapshot:t=>({...t,_subscription:void 0})}}let tB="xstate.promise.resolve",tz="xstate.promise.reject",tV=new WeakMap,tW=(ec=void 0,{config:ea=t=>void 0,transition:(t,e,r)=>({...t,context:ea(t.context)}),getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,context:"function"==typeof ec?ec({input:e}):ec}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t});function tG(t,e,r,n,{assignment:s}){if(!e.context)throw Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");let i={},o={context:e.context,event:r.event,spawn:function(t,{machine:e,context:r},n,s){return(i,o)=>{let a=((i,o)=>
2{if("string"!=typeof i)return R(i,{id:o?.id,parent:t.self,syncSnapshot:o?.syncSnapshot,input:o?.input,src:i,systemId:o?.systemId});{let a=E(e,i);if(!a)throw Error(`Actor logic '${i}' not implemented in machine '${e.id}'`);let c=R(a,{id:o?.id,parent:t.self,syncSnapshot:o?.syncSnapshot,input:"function"==typeof o?.input?o.input({context:r,event:n,self:t.self}):o?.input,src:i,systemId:o?.systemId});return s[c.id]=c,c}})(i,o);return s[a.id]=a,t.defer(()=>{a._processingStatus!==$.Stopped&&a.start()}),a}}(t,e,r.event,i),self:t.self,system:t.system},a={};if("function"==typeof s)a=s(o,n);else for(let t of Object.keys(s)){let e=s[t];a[t]="function"==typeof e?e(o,n):e}let c=Object.assign({},e.context,a);return[tP(e,{context:c,children:Object.keys(i).length?{...e.children,...i}:e.children}),void 0,void 0]}function tJ(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=tG,e}t.s(["createEmptyActor",0,function(){return R(tW)},"fromCallback",0,tL,"fromEventObservable",0,tF,"fromPromise",0,function(t){return{config:t,transition:(t,e,r)=>{if("active"!==t.status)return t;switch(e.type){case tB:{let r=e.data;return{...t,status:"done",output:r,input:void 0}}case tz:return{...t,status:"error",error:e.data,input:void 0};case u:return tV.get(r.self)?.abort(),tV.delete(r.self),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:r,system:n,emit:s})=>{if("active"!==e.status)return;let i=new AbortController;tV.set(r,i),Promise.resolve(t({input:e.input,system:n,self:r,signal:i.signal,emit:s})).then(t=>{"active"===r.getSnapshot().status&&(tV.delete(r),n._relay(r,r,{type:tB,data:t}))},t=>{"active"===r.getSnapshot().status&&(tV.delete(r),n._relay(r,r,{type:tz,data:t}))})},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}],807574);let tY=new WeakMap;function tH(t,e,r){let n=tY.get(t);return n?e in n||(n[e]=r()):(n={[e]:r()},tY.set(t,n)),n[e]}let tK={},tQ=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class tX{constructor(t,e){if(this.config=t,this.key=void 0,this.id=void 0,this.type=void 0,this.path=void 0,this.states=void 0,this.history=void 0,this.entry=void 0,this.exit=void 0,this.parent=void 0,this.machine=void 0,this.meta=void 0,this.output=void 0,this.order=-1,this.description=void 0,this.tags=[],this.transitions=void 0,this.always=void 0,this.parent=e._parent,this.key=e._key,this.machine=e._machine,this.path=this.parent?this.parent.path.concat(this.key):[],this.id=this.config.id||[this.machine.id,...this.path].join("."),this.type=this.config.type||(this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.description=this.config.description,this.order=this.machine.idMap.size,this.machine.idMap.set(this.id,this),this.states=this.config.states?g(this.config.states,(t,e)=>new tX(t,{_parent:this,_key:e,_machine:this.machine})):tK,"compound"===this.type&&!this.config.initial)throw Error(`No initial state specified for compound state node "#${this.id}". Try adding { initial: "${Object.keys(this.states)[0]}" } to the state config.`);this.history=!0===this.config.history?"shallow":this.config.history||!1,this.entry=m(this.config.entry).slice(),this.exit=m(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=m(t.tags).slice()}_initialize(){this.transitions=te(this),this.config.always&&(this.always=S(this.config.always).map(t=>tt(this,"",t))),Object.keys(this.states).forEach(t=>{this.states[t]._initialize()})}get definition(){return{id:this.id,key:this.key,version:this.machine.version,type:this.t
2ype,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(tQ),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map(t=>`#${t.id}`),source:`#${this.id}`,actions:this.initial.actions.map(tQ),eventType:null})}:void 0,history:this.history,states:g(this.states,t=>t.definition),on:this.on,transitions:[...this.transitions.values()].flat().map(t=>({...t,actions:t.actions.map(tQ)})),entry:this.entry.map(tQ),exit:this.exit.map(tQ),meta:this.meta,order:this.order||-1,output:this.output,invoke:this.invoke,description:this.description,tags:this.tags}}toJSON(){return this.definition}get invoke(){return tH(this,"invoke",()=>m(this.config.invoke).map((t,e)=>{let{src:r,systemId:n}=t,s=t.id??k(this.id,e),i="string"==typeof r?r:`xstate.invoke.${k(this.id,e)}`;return{...t,src:i,id:s,systemId:n,toJSON(){let{onDone:e,onError:r,...n}=t;return{...n,type:"xstate.invoke",src:i,id:s}}}}))}get on(){return tH(this,"on",()=>[...this.transitions].flatMap(([t,e])=>e.map(e=>[t,e])).reduce((t,[e,r])=>(t[e]=t[e]||[],t[e].push(r),t),{}))}get after(){return tH(this,"delayedTransitions",()=>Z(this))}get initial(){return tH(this,"initial",()=>tn(this,this.config.initial))}next(t,e){let r,n=e.type,s=[];for(let i of tH(this,`candidates-${n}`,()=>X(this,n))){let{guard:o}=i,a=t.context,c=!1;try{c=!o||z(o,a,e,t)}catch(e){let t="string"==typeof o?o:"object"==typeof o?o.type:void 0;throw Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${n}' in state node '${this.id}':
3${e.message}`)}if(c){s.push(...i.actions),r=i;break}}return r?[r]:void 0}get events(){return tH(this,"events",()=>{let{states:t}=this,e=new Set(this.ownEvents);if(t)for(let r of Object.keys(t)){let n=t[r];if(n.states)for(let t of n.events)e.add(`${t}`)}return Array.from(e)})}get ownEvents(){return Array.from(new Set(Object.keys(Object.fromEntries(this.transitions)).filter(t=>this.transitions.get(t).some(t=>!(!t.target&&!t.actions.length&&!t.reenter)))))}}class tZ{constructor(t,e){this.config=t,this.version=void 0,this.schemas=void 0,this.implementations=void 0,this.__xstatenode=!0,this.idMap=new Map,this.root=void 0,this.id=void 0,this.states=void 0,this.events=void 0,this.id=t.id||"(machine)",this.implementations={actors:e?.actors??{},actions:e?.actions??{},delays:e?.delays??{},guards:e?.guards??{}},this.version=this.config.version,this.schemas=this.config.schemas,this.transition=this.transition.bind(this),this.getInitialSnapshot=this.getInitialSnapshot.bind(this),this.getPersistedSnapshot=this.getPersistedSnapshot.bind(this),this.restoreSnapshot=this.restoreSnapshot.bind(this),this.start=this.start.bind(this),this.root=new tX(t,{_key:this.id,_machine:this}),this.root._initialize(),tr(this.root),this.states=this.root.states,this.events=this.root.events}provide(t){let{actions:e,guards:r,actors:n,delays:s}=this.implementations;return new tZ(this.config,{actions:{...e,...t.actions},guards:{...r,...t.guards},actors:{...n,...t.actors},delays:{...s,...t.delays}})}resolveState(t){let e=tE(this.root,t.value),r=J(tl(this.root,e));return tj({_nodes:[...r],context:t.context||{},children:{},status:K(r,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,r){return tx(t,e,r,[]).snapshot}microstep(t,e,r){return tx(t,e,r,[]).microsteps.map(([t])=>t)}getTransitionData(t,e){return tf(this.root,t.value,t,e)||[]}
3_getPreInitialState(t,e,r){let{context:n}=this.config,s=tj({context:"function"!=typeof n&&n?n:{},_nodes:[this.root],children:{},status:"active"},this);return"function"==typeof n?tS(s,e,t,[tJ(({spawn:t,event:e,self:r})=>n({spawn:t,input:e.input,self:r}))],r,void 0):s}getInitialSnapshot(t,e){let r=p(e),n=[],s=this._getPreInitialState(t,r,n),[i]=tg(this.root,s,t,r,n),{snapshot:o}=tx(i,r,t,n);return o}start(t){Object.values(t.children).forEach(t=>{"active"===t.getSnapshot().status&&t.start()})}getStateNodeById(t){let e=y(t),r=e.slice(1),n=Q(e[0])?e[0].slice(1):e[0],s=this.idMap.get(n);if(!s)throw Error(`Child state node '#${n}' does not exist on machine '${this.id}'`);return tu(s,r)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return tR(t,e)}restoreSnapshot(t,e){let r={},n=t.children;Object.keys(n).forEach(t=>{let s=n[t],i=s.snapshot,o=s.src,a="string"==typeof o?E(this,o):o;if(!a)return;let c=R(a,{id:t,parent:e.self,syncSnapshot:s.syncSnapshot,snapshot:i,src:o,systemId:s.systemId});r[t]=c});let s=function(t,e){if(!e||"object"!=typeof e)return{};let r={};for(let n in e)for(let s of e[n]){let e=function(t,e){if(e instanceof tX)return e;try{return t.machine.getStateNodeById(e.id)}catch{}}(t,s);e&&(r[n]??=[],r[n].push(e))}return r}(this.root,t.historyValue),i=tj({...t,children:r,_nodes:Array.from(J(tl(this.root,t.value))),historyValue:s},this),o=new Set;return!function t(e,r){if(!o.has(e))for(let n in o.add(e),e){let s=e[n];if(s&&"object"==typeof s){if("xstate$$type"in s&&1===s.xstate$$type){e[n]=r[s.id];continue}t(s,r)}}}(i.context,r),i}}function t0(t,e,r,n,{event:s}){return[e,{event:"function"==typeof s?s(r,n):s},void 0]}function t1(t,{event:e}){t.defer(()=>t.emit(e))}function t2(t){function e(t,e){}return e.type="xstate.emit",e.event=t,e.resolve=t0,e.execute=t1,e}let t6=((eu={}).Parent="#_parent",eu.Internal="#_internal",eu);function t3(t,e,r,n,{to:s,event:i,id:o,delay:a},c){let u,l,f=e.machine.implementations.delays;if("string"==typeof i)throw Error(`Only event objects may be used with sendTo; use sendTo({ type: "${i}" }) instead`);let p="function"==typeof i?i(r,n):i;if("string"==typeof a){let t=f&&f[a];u="function"==typeof t?t(r,n):t}else u="function"==typeof a?a(r,n):a;let h="function"==typeof s?s(r,n):s;if("string"==typeof h){if(!(l=h===t6.Parent?t.self._parent:h===t6.Internal?t.self:h.startsWith("#_")?e.children[h.slice(2)]:c.deferredActorIds?.includes(h)?h:e.children[h]))throw Error(`Unable to send event to actor '${h}' from machine '${e.machine.id}'.`)}else l=h||t.self;return[e,{to:l,targetId:"string"==typeof h?h:void 0,event:p,id:o,delay:u},void 0]}function t9(t,e,r){"string"==typeof r.to&&(r.to=e.children[r.to])}function t4(t,e){t.defer(()=>{let{to:r,event:n,delay:s,id:i}=e;"number"==typeof s?t.system.scheduler.schedule(t.self,r,n,s,i):t.system._relay(t.self,r,n.type===c?f(t.self.id,n.data):n)})}function t5(t,e,r){function n(t,e){}return n.type="xstate.sendTo",n.to=t,n.event=e,n.id=r?.id,n.delay=r?.delay,n.resolve=t3,n.retryResolve=t9,n.execute=t4,n}function t7(t,e){return t5(t6.Parent,t,e)}function t8(t,e,r,n,{collect:s}){let i=[],o=function(t){i.push(t)};return o.assign=(...t)=>{i.push(tJ(...t))},o.cancel=(...t)=>{i.push(N(...t))},o.raise=(...t)=>{i.push(tN(...t))},o.sendTo=(...t)=>{i.push(t5(...t))},o.sendParent=(...t)=>{i.push(t7(...t))},o.spawnChild=(...t)=>{i.push(D(...t))},o.stopChild=(...t)=>{i.push(B(...t))},o.emit=(...t)=>{i.push(t2(...t))},s({context:r.context,event:r.event,enqueue:o,check:t=>z(t,e.context,r.event,e),self:t.self,system:t.system},n),[e,void 0,i]}function et(t){function e(t,e){}return e.type="xstate.enqueueActions",e.collect=t,e.resolve=t8,e}function ee(t,e,r,n,{value:s,label:i}){return[e,{value:"function"==typeof s?s(r,n):s,label:i},void 0]}function er({logger:t},{value:e,label:r}){r?t(r,e):t(e)}function en(t=({context:t,event:e})=>({context:t,event:e}),e){function r(t,e){}return r.type="xstate.log",r.value=t,r.label=e,r.resolve=ee,r.execute=er,r}function es(t,e){let r=m(e);if(!r.some(e=>I(t.type,e))){let e=1===r.length?`type matching "${r[0]}
3"`:`one of types matching "${r.join('", "')}"`;throw Error(`Expected event ${JSON.stringify(t)} to have ${e}`)}}function ei({schemas:t,actors:e,actions:r,guards:n,delays:s}){return{assign:tJ,sendTo:t5,raise:tN,log:en,cancel:N,stopChild:B,enqueueActions:et,emit:t2,spawnChild:D,createStateConfig:t=>t,createAction:t=>t,createMachine:i=>new tZ({...i,schemas:t},{actors:e,actions:r,guards:n,delays:s}),extend:i=>ei({schemas:t,actors:e,actions:{...r,...i.actions},guards:{...n,...i.guards},delays:{...s,...i.delays}})}}t.s(["a",0,t2,"b",0,t7,"e",0,et,"l",0,en,"s",0,t5],214990),t.s(["assertEvent",0,es,"setup",0,ei],509820),t.s(["assign",0,tJ],663095),t.s(["createActor",0,R],269193),t.s(["enqueueActions",0,et],721634),t.s(["raise",0,tN],688236),t.s(["emit",0,t2],681026),t.s(["stopChild",0,B],613650);var eo,ea,ec,eu,el=t.i(751340),ef=t.i(290571),ep=t.i(220324),eh=t.i(394426),ed=t.i(484973),ey=t.i(987675),ev=t.i(603752),eg=t.i(272383),em=["addListener","removeListener"],eb=["addEventListener","removeEventListener"],e_=["on","off"];function eS(t,e,r,n){if((0,ev.isFunction)(r)&&(n=r,r=void 0),n)return eS(t,e,r).pipe((0,eg.mapOneOrManyArgs)(n));var s,i,o,a=(0,ef.__read)((s=t,(0,ev.isFunction)(s.addEventListener)&&(0,ev.isFunction)(s.removeEventListener))?eb.map(function(n){return function(s){return t[n](e,s,r)}}):(i=t,(0,ev.isFunction)(i.addListener)&&(0,ev.isFunction)(i.removeListener))?em.map(ex(t,e)):(o=t,(0,ev.isFunction)(o.on)&&(0,ev.isFunction)(o.off))?e_.map(ex(t,e)):[],2),c=a[0],u=a[1];if(!c&&(0,ey.isArrayLike)(t))return(0,ed.mergeMap)(function(t){return eS(t,e,r)})((0,ep.innerFrom)(t));if(!c)throw TypeError("Invalid event target");return new eh.Observable(function(t){var e=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.next(1<e.length?e:e[0])};return c(e),function(){return u(e)}})}function ex(t,e){return function(r){return function(n){return t[r](e,n)}}}var ew=t.i(94059),ek=t.i(282541),eE=t.i(722249),eI=t.i(902965),eO=t.i(627608),eT=t.i(586903),eA=t.i(96623);function e$(t){return t<=0?function(){return eA.EMPTY}:(0,eI.operate)(function(e,r){var n=0;e.subscribe((0,eO.createOperatorSubscriber)(r,function(e){++n<=t&&(r.next(e),t<=n&&r.complete())}))})}var ej=t.i(114940);let eP=t=>({context:e})=>{let{count:r,include:n,exclude:s,responseType:i="message.received"}=t;return{count:r,domain:e.domain,from:e.connectTo,include:n?Array.isArray(n)?n:[n]:[],exclude:s?Array.isArray(s)?s:[s]:[],responseType:i,target:e.target,to:e.name}},eR=(0,el.defer)(()=>eS(window,"message")),eM=t=>tF(({input:e})=>{var r,n,s;let i;return eR.pipe(t?(0,ew.map)(t):(0,ek.pipe)(),(0,eE.filter)(t=>{let{data:r}=t;return(!e.include.length||e.include.includes(r.type))&&(!e.exclude.length||!e.exclude.includes(r.type))&&r.domain===e.domain&&r.from===e.from&&r.to===e.to&&(!e.target||t.source===e.target)}),(0,ew.map)((i=e.responseType,t=>({type:i,message:t}))),e.count?(0,ek.pipe)((r=e.count,void 0===n&&(n=null),n=null!=n?n:r,(0,eI.operate)(function(t,e){var s=[],i=0;t.subscribe((0,eO.createOperatorSubscriber)(e,function(t){var o,a,c,u,l=null;i++%n==0&&s.push([]);try{for(var f=(0,ef.__values)(s),p=f.next();!p.done;p=f.next()){var h=p.value;h.push(t),r<=h.length&&(l=null!=l?l:[]).push(h)}}catch(t){o={error:t}}finally{try{p&&!p.done&&(a=f.return)&&a.call(f)}finally{if(o)throw o.error}}if(l)try{for(var d=(0,ef.__values)(l),y=d.next();!y.done;y=d.next()){var h=y.value;(0,eT.arrRemove)(s,h),e.next(h)}}catch(t){c={error:t}}finally{try{y&&!y.done&&(u=d.return)&&u.call(d)}finally{if(c)throw c.error}}},function(){var t,r;try{for(var n=(0,ef.__values)(s),i=n.next();!i.done;i=n.next()){var o=i.value;e.next(o)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()},void 0,function(){s=null}))})),(s=t=>t,(0,ev.isFunction)(void 0)?(0,ed.mergeMap)(s,void 0,1):(0,ed.mergeMap)(s,1)),e$(e.count)):(0,ek.pipe)())}),eq="sanity/comlink",eN="comlink/response",eC="comlink/heartbeat",eL="comlink/disconnect",eD="comlink/handshake/syn",eU="comlink/handshake/syn-ack",eF="comlink/handshake/ack",eB=()=>ei({types:{},actors:{listen:tF(({input:t})=>{let e,r=t.signal?eS(t.signal,"abort").pipe((e=`Request ${t.requestId} aborted`,t=>t.pipe(e$(1),(0,ew.map)(()=>{throw Error(e)})))):eA.EMPTY;return eS(window,"message").pipe((0,eE.filter)(e=>e.data?.type===eN&&e.data?.responseTo===t.requestId&&!!e.source&&t.sources.has(e.source)),e$(t.sources.size),(0,eI.operate)(function(t,e){(0,ep.innerFrom)(r).subscribe((0,eO.createOperatorSubscriber)(e,function(){return e.complete()},ej.noop)),e.closed||t.subscribe(e)}))})},actions:{"send message":({context:t},e)=>{let{sources:r,targetOrigin:n}=t,{message:s}=e;r.forEach(t=>{t.postMessage(s,{targetOrigin:n})})},"on success":t5(({context:t})=>t.parentRef,({context:t,self:e})=>(t.response&&t.resolvable?.resolve(t.response),{type:"request.success",requestId:e.id,response:t.response,responseTo:t.responseTo})),"on fail":t5(({context:t})=>t.parentRef,({context:t,self:e})=>(t.suppressWarnings||console.warn(`[@sanity/comlink] Received no response to message '${t.type}' on client '${t.from}' (ID: '${t.id}').`),t.resolvable?.reject(Error("No response received")),{type:"request.failed",requestId:e.id})),"on abort":t5(({context:t})=>t.parentRef,({context:t,self:e})=>(t.resolvable?.reject(Error("Request aborted")),{type:"request.aborted",requestId:e.id}))},guards:{expectsResponse:({context:t})=>t.expectResponse},delays:{initialTimeout:0,responseTimeout:({context:t})=>t.responseTimeout??3e3}}).createMachine({context:({input:t})=>({channelId:t.channelId,data:t.data,domain:t.domain,expectResponse:t.expectResponse??!1,from:t.from,id:`msg-${i()}`,parentRef:t.parentRef,resolvable:t.resolvable,response:null,responseTimeout:t.responseTimeout,responseTo:t.responseTo,signal:t.signal,sources:t.sources instanceof Set?t.sources:new Set([t.sources]),suppressWarnings:t.suppressWarnings,targetOrigin:t.targetOrigin,to:t.to,type:t.type}),initial:"idle",on:{abort:".aborted"},states:{idle:{after:{initialTimeout:[{target:"sending"}]}},sending:{entry:{type:"send message",params:({context:t})=>{let{channelId:e,data:r,domain:n,from:s,id:i,responseTo:o,to:a,type:c}=t;return{message:{channelId:e,data:r,domain:n,from:s,id:i,to:a,type:c,responseTo:o}}}},always:[{guard:"expectsResponse",target:"awaiting"},"success"]},awaiting:{invoke:{id:"listen for response",src:"listen",input:({context:t})=>({requestId:t.id,sources:t.sources,signal:t.signal}),onError:"aborted"},after:{responseTimeout:"failed"},on:{message:{actions:tJ({response:({event:t})=>t.data.data,responseTo:({event:t})=>t.data.responseTo}),target:"success"}}},failed:{type:"final",entry:"on fail"},success:{type:"final",entry:"on success"},aborted:{type:"final",entry:"on abort"}},output:({context:t,self:e})=>({requestId:e.id,response:t.response,responseTo:t.responseTo})});tL(({sendBack:t,input:e})=>{let r=()=>{t(e.event)};e.immediate&&r();let n=setInterval(r,e.interval);return()=>{clearInterval(n)}});let ez=()=>ei({types:{},actors:{requestMachine:eB(),listen:eM()},actions:{"buffer handshake":tJ({handshakeBuffer:({event:t,context:e})=>(es(t,"message.received"),[...e.handshakeBuffer,t])}),"buffer message":et(({enqueue:t})=>{t.assign({buffer:({event:t,context:e})=>(es(t,"post"),[...e.buffer,{data:t.data,resolvable:t.resolvable,options:t.options}])}),t.emit(({event:t})=>(es(t,"post"),{type:"buffer.added",message:t.data}))}),"create request":tJ({requests:({context:t,event:e,self:r,spawn:n})=>{es(e,"request");let s=(Array.isArray(e.data)?e.data:[e.data]).map(e=>n("requestMachine",{id:`req-${i()}`,input:{channelId:t.channelId,data:e.data,domain:t.domain,expectResponse:e.expectResponse,from:t.name,parentRef:r,resolvable:e.resolvable,responseTimeout:e.options?.responseTimeout,responseTo:e.responseTo,signal:e.options?.signal,sources:t.target,suppressWarnings:e.options?.suppressWarnings,targetOrigin:t.targetOrigin,to:t.connectTo,type:e.type}}));return[...t.requests,...s]}}),"emit heartbeat":t2(()=>({type:"heartbeat"})),"emit received message":et(({enqueue:t})=>{t.emit(({event:t})=>(es(t,"message.received"),{type:"message",message:t.message.data}))}),"emit status":t2((t,e)=>({type:"status",status:e.status})),"post message":tN(({event:t})=>(es(t,"post"),{type:"request",data:{data:t.data.data,expectResponse:!!t.resolvable,type:t.data.type,resolvable:t.resolvable,options:t.options}})),"process pending handshakes":et(({context:t,enqueue:e})=>{t.handshakeBuffer.forEach(t=>e.raise(t)),e.assign({handshakeBuffer:[]})}),"remove request":et(({context:t,enqueue:e,event:r})=>{es(r,["request.success","request.failed","request.aborted"]),B(r.requestId),e.assign({requests:t.requests.filter(({id:t})=>t!==r.requestId)})}),"send response":tN(({event:t})=>(es(t,["message.received","heartbeat.received"]),{type:"request",data:{type:eN,responseTo:t.message.data.id,data:void 0}})),"send handshake syn ack":tN({type:"request",data:{type:eU}}),"send pending messages":et(({enqueue:t})=>{t.raise(({context:t})=>({type:"request",data:t.buffer.map(({data:t,resolvable:e,options:r})=>({data:t.data,type:t.type,expectResponse:!!e,resolvable:e,options:r}))})),t.emit(({context:t})=>({type:"buffer.flushed",messages:t.buffer.map(({data:t})=>t)})),t.assign({buffer:[]})}),"set connection config":tJ({channelId:({event:t})=>(es(t,"handshake.syn"),t.message.data.channelId),target:({event:t})=>(es(t,"handshake.syn"),t.message.source||void 0),targetOrigin:({event:t})=>(es(t,"handshake.syn"),t.message.origin)})},guards:{hasSource:({context:t})=>null!==t.target}}).createMachine({id:"node",context:({input:t})=>({buffer:[],channelId:null,connectTo:t.connectTo,domain:t.domain??eq,handshakeBuffer:[],name:t.name,requests:[],target:void 0,targetOrigin:null}),invoke:{id:"listen for handshake syn",src:"listen",input:eP({include:eD,responseType:"handshake.syn"})},on:{"request.success":{actions:"remove request"},"request.failed":{actions:"remove request"},"request.aborted":{actions:"remove request"},"handshake.syn":{actions:"set connection config",target:".handshaking"}}
3,initial:"idle",states:{idle:{entry:[{type:"emit status",params:{status:"idle"}}],on:{post:{actions:"buffer message"}}},handshaking:{guard:"hasSource",entry:["send handshake syn ack",{type:"emit status",params:{status:"handshaking"}}],invoke:[{id:"listen for handshake ack",src:"listen",input:eP({include:eF,count:1,responseType:"handshake.complete"}),onDone:"connected"},{id:"listen for disconnect",src:"listen",input:eP({include:eL,count:1,responseType:"disconnect"})},{id:"listen for messages",src:"listen",input:eP({exclude:[eL,eD,eF,eC,eN]})}],on:{request:{actions:"create request"},post:{actions:"buffer message"},"message.received":{actions:"buffer handshake"},disconnect:{target:"idle"}}},connected:{entry:["process pending handshakes","send pending messages",{type:"emit status",params:{status:"connected"}}],invoke:[{id:"listen for messages",src:"listen",input:eP({exclude:[eL,eD,eF,eC,eN]})},{id:"listen for heartbeat",src:"listen",input:eP({include:eC,responseType:"heartbeat.received"})},{id:"listen for disconnect",src:"listen",input:eP({include:eL,count:1,responseType:"disconnect"})}],on:{request:{actions:"create request"},post:{actions:"post message"},disconnect:{target:"idle"},"message.received":{actions:["send response","emit received message"]},"heartbeat.received":{actions:["send response","emit heartbeat"]}}}}});t.s(["DOMAIN",0,eq,"MSG_DISCONNECT",0,eL,"MSG_HANDSHAKE_ACK",0,eF,"MSG_HANDSHAKE_SYN",0,eD,"MSG_HANDSHAKE_SYN_ACK",0,eU,"MSG_HEARTBEAT",0,eC,"MSG_RESPONSE",0,eN,"createListenLogic",0,eM,"createNode",0,(t,e=ez())=>{let r,n=R(e,{input:t}),s=new Map,i=new Map;n.on("message",({message:t})=>{let e=s.get(t.type);if(e)return void e.forEach(e=>e(t.data));let r=i.get(t.type);r?r.add(t):i.set(t.type,new Set([t]))});let o=()=>{n.stop()};return{actor:n,fetch:(t,e,r)=>{let s,i,{responseTimeout:o=1e4,signal:a,suppressWarnings:c}=r||{},u="function"==typeof Promise.withResolvers?Promise.withResolvers():{promise:new Promise((t,e)=>{s=t,i=e}),resolve:s,reject:i};return n.send({type:"post",data:{type:t,data:e},resolvable:u,options:{responseTimeout:o,signal:a,suppressWarnings:c}}),u.promise},machine:e,on:(t,e,r)=>{let n=s.get(t)||new Set;s.has(t)||s.set(t,n),n.add(e);let o=i.get(t);if(o){let n=r?.replay??1;Array.from(o).slice(-n).forEach(({data:t})=>e(t)),i.delete(t)}return()=>{n.delete(e)}},onStatus:(t,e)=>{let s=n.on("status",n=>{r=n.status,e&&n.status!==e||t(n.status)});return r&&t(r),()=>s.unsubscribe()},post:(t,e)=>{n.send({type:"post",data:{type:t,data:e}})},start:()=>(n.start(),o),stop:o}},"createNodeMachine",0,ez,"createRequestMachine",0,eB],881283);let eV={"handshake/syn":eD,"handshake/syn-ack":eU,"handshake/ack":eF,"channel/response":eN,"channel/heartbeat":eC,"channel/disconnect":eL,"overlay/focus":"visual-editing/focus","overlay/navigate":"visual-editing/navigate","overlay/toggle":"visual-editing/toggle","presentation/toggleOverlay":"presentation/toggle-overlay"},eW={[eD]:"handshake/syn",[eU]:"handshake/syn-ack",[eF]:"handshake/ack",[eN]:"channel/response",[eC]:"channel/heartbeat",[eL]:"channel/disconnect","visual-editing/focus":"overlay/focus","visual-editing/navigate":"overlay/navigate","visual-editing/toggle":"overlay/toggle","presentation/toggle-overlay":"presentation/toggleOverlay"},eG=t=>{let{data:e}=t;return e&&"object"==typeof e&&"domain"in e&&"type"in e&&"from"in e&&"to"in e&&("sanity/channels"===e.domain&&(e.domain=eq),"overlays"===e.to&&(e.to="visual-editing"),"overlays"===e.from&&(e.from="visual-editing"),e.channelId=e.connectionId,delete e.connectionId,e.type=eV[e.type]??e.type),t},eJ=({context:t},e)=>{let{sources:r,targetOrigin:n}=t,s=(t=>{let{channelId:e,...r}=t,n={...r,connectionId:e};return n.domain===eq&&(n.domain="sanity/channels"),"visual-editing"===n.to&&(n.to="overlays"),"visual-editing"===n.from&&(n.from="overlays"),n.type=eW[n.type]??n.type,"channel/response"===n.type&&n.responseTo&&!n.data&&(n.data={responseTo:n.responseTo}),("handshake/syn"===n.type||"handshake/syn-ack"===n.type||"handshake/ack"===n.type)&&(n.data={id:n.connectionId}),n})(e.message);r.forEach(t=>{t.postMessage(s,{targetOrigin:n})})};function eY(){return window.self!==window.top}function eH(){return!!window.opener}t.s(["createCompatibilityActors",0,()=>({listen:eM(eG),requestMachine:eB().provide({actions:{"send message":eJ}})}),"isMaybePresentation",0,function(){return eY()||eH()},"isMaybePreviewIframe",0,eY,"isMaybePreviewWindow",0,eH],636536)},95187,(t,e,r)=>{"use strict";
3Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return a.createServerReference},findSourceMapURL:function(){return o.findSourceMapURL}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let i=t.r(132120),o=t.r(92245),a=t.r(235326)},751340,290571,603752,842093,586903,909116,114940,140260,240126,979165,282541,394426,987675,349449,717718,238331,254824,177650,23515,311902,220324,t=>{"use strict";var e=function(t,r){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(t,r)};function r(t,r){if("function"!=typeof r&&null!==r)throw TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var s in e=arguments[r])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)};function s(t,e,r,n){return new(r||(r=Promise))(function(s,i){function o(t){try{c(n.next(t))}catch(t){i(t)}}function a(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?s(t.value):((e=t.value)instanceof r?e:new r(function(t){t(e)})).then(o,a)}c((n=n.apply(t,e||[])).next())})}function i(t,e){var r,n,s,i={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=a(0),o.throw=a(1),o.return=a(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(c){var u=[a,c];if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(i=0)),i;)try{if(r=1,n&&(s=2&u[0]?n.return:u[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,u[1])).done)return s;switch(n=0,s&&(u=[2&u[0],s.value]),u[0]){case 0:case 1:s=u;break;case 4:return i.label++,{value:u[1],done:!1};case 5:i.label++,n=u[1],u=[0];continue;case 7:u=i.ops.pop(),i.trys.pop();continue;default:if(!(s=(s=i.trys).length>0&&s[s.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!s||u[1]>s[0]&&u[1]<s[3])){i.label=u[1];break}if(6===u[0]&&i.label<s[1]){i.label=s[1],s=u;break}if(s&&i.label<s[2]){i.label=s[2],i.ops.push(u);break}s[2]&&i.ops.pop(),i.trys.pop();continue}u=e.call(t,i)}catch(t){u=[6,t],n=0}
3finally{r=s=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}function o(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,s,i=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(t){s={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return o}function c(t,e,r){if(r||2==arguments.length)for(var n,s=0,i=e.length;s<i;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}function u(t){return this instanceof u?(this.v=t,this):new u(t)}function l(t,e,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,s=r.apply(t,e||[]),i=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),o("next"),o("throw"),o("return",function(t){return function(e){return Promise.resolve(e).then(t,l)}}),n[Symbol.asyncIterator]=function(){return this},n;function o(t,e){s[t]&&(n[t]=function(e){return new Promise(function(r,n){i.push([t,e,r,n])>1||a(t,e)})},e&&(n[t]=e(n[t])))}function a(t,e){try{var r;(r=s[t](e)).value instanceof u?Promise.resolve(r.value.v).then(c,l):f(i[0][2],r)}catch(t){f(i[0][3],t)}}function c(t){a("next",t)}function l(t){a("throw",t)}function f(t,e){t(e),i.shift(),i.length&&a(i[0][0],i[0][1])}}function f(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=o(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,s){var i,o,a;i=n,o=s,a=(e=t[r](e)).done,Promise.resolve(e.value).then(function(t){i({value:t,done:a})},o)})}}}function p(t){return"function"==typeof t}function h(t){var e=t(function(t){Error.call(t),t.stack=Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}"function"==typeof SuppressedError&&SuppressedError,t.s(["__assign",()=>n,"__asyncGenerator",0,l,"__asyncValues",0,f,"__await",0,u,"__awaiter",0,s,"__extends",0,r,"__generator",0,i,"__read",0,a,"__rest",0,function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&0>e.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)0>e.indexOf(n[s])&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r},"__spreadArray",0,c,"__values",0,o],290571),t.s(["isFunction",0,p],603752),t.s(["createErrorClass",0,h],842093);var d=h(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=e}});function y(t,e){if(t){var r=t.indexOf(e);0<=r&&t.splice(r,1)}}t.s(["arrRemove",0,y],586903);var v=function(){var t;function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t,e,r,n,s,i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var u=o(i),l=u.next();!l.done;l=u.next())l.value.remove(this)}catch(e){t={error:e}}finally{try{l&&!l.done&&(e=u.return)&&e.call(u)}finally{if(t)throw t.error}}else i.remove(this);var f=this.initialTeardown;if(p(f))try{f()}catch(t){s=t instanceof d?t.errors:[t]}var h=this._finalizers;if(h){this._finalizers=null;try{for(var y=o(h),v=y.next();!v.done;v=y.next()){var g=v.value;try{b(g)}catch(t){s=null!=s?s:[],t instanceof d?s=c(c([],a(s)),a(t.errors)):s.push(t)}}}catch(t){r={error:t}}finally{try{v&&!v.done&&(n=y.return)&&n.call(y)}finally{if(r)throw r.error}}}if(s)throw new d(s)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)b(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(t)}},e.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},e.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},e.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&y(e,t)},e.prototype.remove=function(t){var r=this._finalizers;r&&y(r,t),t instanceof e&&t._removeParent(this)},(t=new e).closed=!0,e.EMPTY=t,e}(),g=v.EMPTY;function m(t){return t instanceof v||t&&"closed"in t&&p(t.remove)&&p(t.add)&&p(t.unsubscribe)}function b(t){p(t)?t():t.unsubscribe()}t.s(["EMPTY_SUBSCRIPTION",0,g,"Subscription",0,v,"isSubscription",0,m],909116);var _=void 0,S={setTimeout:function(t,e){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var s=S.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,c([t,e],a(r))):setTimeout.apply(void 0,c([t,e],a(r)))},clearTimeout:function(t){var e=S.delegate;return((null==e?void 0:e.clearTimeout)||clearTimeout)(t)},delegate:void 0};function x(t){S.setTimeout(function(){!1;throw t})}function w(){}t.s(["noop",0,w],114940);var k=E("C",void 0,void 0);function E(t,e,r){return{kind:t,value:e,error:r}}var I=null;function O(t){var e,r,n,s;1;t()}function T(t){}t.s(["captureError",0,T,"errorContext",0,O],140260);var A=function(t){function e(e){var r=t.call(this)||this;return r.isStopped=!1,e?(r.destination=e,m(e)&&e.add(r)):r.destination=N,r}return r(e,t),e.create=function(t,e,r){return new R(t,e,r)},e.prototype.next=function(t){this.isStopped?q(E("N",t,void 0),this):this._next(t)},e.prototype.error=function(t){this.isStopped?q(E("E",void 0,t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?q(k,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(v),$=Function.prototype.bind;function j(t,e){return $.call(t,e)}var P=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){M(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){M(t)}else M(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){M(t)}},t}(),R=function(t){function e(e,r,n){var s,i,o=t.call(this)||this;return p(e)||!e?s={next:null!=e?e:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:s=e,o.destination=new P(s),o}return r(e,t),e}(A);function M(t){x(t)}function q(t,e){}var N={closed:!0,next:w,error:function(t){throw t},complete:w};t.s(["SafeSubscriber",0,R,"Subscriber",0,A],240126);var C="function"==typeof Symbol&&Symbol.observable||"@@observable";function L(t){return t}function D(t){return 0===t.length?L:1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}}t.s(["identity",0,L],979165),t.s(["pipe",0,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return D(t)},"pipeFromArray",0,D],282541);var U=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var r=new t;return r.source=this,r.operator=e,r},t.prototype.subscribe=function(t,e,r){var n=this,s=!function(t){return t&&t instanceof A||t&&p(t.next)&&p(t.error)&&p(t.complete)&&m(t)}(t)?new R(t,e,r):t;return O(function(){var t=n.operator,e=n.source;s.add(t?t.call(s,e):e?n._subscribe(s):n._trySubscribe(s))}),s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var r=this;return new(e=F(e))(function(e,n){var s=new R({next:function(e){try{t(e)}catch(t){n(t),s.unsubscribe()}},error:n,complete:e});r.subscribe(s)})},t.prototype._subscribe=function(t){var e;return null==(e=this.source)?void 0:e.subscribe(t)},t.prototype[C]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return D(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=F(t))(function(t,r){var n;e.subscribe(function(t){return n=t},function(t){return r(t)},function(){return t(n)})})},t.create=function(e){return new t(e)},t}();function F(t){var e;return null!=(e=null!=t?t:_)?e:Promise}t.s(["Observable",0,U],394426);var B=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function z(t){return p(null==t?void 0:t.then)}function V(t){return p(t[C])}function W(t){return Symbol.asyncIterator&&p(null==t?void 0:t[Symbol.asyncIterator])}function G(t){return TypeError("You provided "+(null!==t&&"object"==typeof t?"an invali
3d object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}t.s(["isArrayLike",0,B],987675),t.s(["isPromise",0,z],349449),t.s(["isInteropObservable",0,V],717718),t.s(["isAsyncIterable",0,W],238331),t.s(["createInvalidObservableTypeError",0,G],254824);var J="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Y(t){return p(null==t?void 0:t[J])}function H(t){return l(this,arguments,function(){var e,r,n;return i(this,function(s){switch(s.label){case 0:e=t.getReader(),s.label=1;case 1:s.trys.push([1,,9,10]),s.label=2;case 2:return[4,u(e.read())];case 3:if(n=(r=s.sent()).value,!r.done)return[3,5];return[4,u(void 0)];case 4:return[2,s.sent()];case 5:return[4,u(n)];case 6:return[4,s.sent()];case 7:return s.sent(),[3,2];case 8:return[3,10];case 9:return e.releaseLock(),[7];case 10:return[2]}})})}function K(t){return p(null==t?void 0:t.getReader)}function Q(t){if(t instanceof U)return t;if(null!=t){var e,r,n,s;if(V(t)){return e=t,new U(function(t){var r=e[C]();if(p(r.subscribe))return r.subscribe(t);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(B(t)){return r=t,new U(function(t){for(var e=0;e<r.length&&!t.closed;e++)t.next(r[e]);t.complete()})}if(z(t)){return n=t,new U(function(t){n.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,x)})}if(W(t))return X(t);if(Y(t)){return s=t,new U(function(t){var e,r;try{for(var n=o(s),i=n.next();!i.done;i=n.next()){var a=i.value;if(t.next(a),t.closed)return}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}t.complete()})}if(K(t))return X(H(t))}throw G(t)}function X(t){return new U(function(e){(function(t,e){var r,n,o,a;return s(this,void 0,void 0,function(){var s;return i(this,function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=f(t),i.label=1;case 1:return[4,r.next()];case 2:if((n=i.sent()).done)return[3,4];if(s=n.value,e.next(s),e.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o={error:i.sent()},[3,11];case 6:if(i.trys.push([6,,9,10]),!(n&&!n.done&&(a=r.return)))return[3,8];return[4,a.call(r)];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(o)throw o.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})})(t,e).catch(function(t){return e.error(t)})})}t.s(["iterator",0,J],177650),t.s(["isIterable",0,Y],23515),t.s(["isReadableStreamLike",0,K,"readableStreamLikeToAsyncGenerator",0,H],311902),t.s(["innerFrom",0,Q],220324),t.s(["defer",0,function(t){return new U(function(e){Q(t()).subscribe(e)})}],751340)},96623,t=>{"use strict";var e=new(t.i(394426)).Observable(function(t){return t.complete()});t.s(["EMPTY",0,e])},94059,902965,627608,t=>{"use strict";var e=t.i(603752);function r(t){return function(r){if((0,e.isFunction)(null==r?void 0:r.lift))return r.lift(function(e){try{return t(e,this)}catch(t){this.error(t)}});throw TypeError("Unable to lift unknown Observable type")}}t.s(["operate",0,r],902965);var n=t.i(290571);function s(t,e,r,n,s){return new i(t,e,r,n,s)}var i=function(t){function e(e,r,n,s,i,o){var a=t.call(this,e)||this;return a.onFinalize=i,a.shouldUnsubscribe=o,a._next=r?function(t){try{r(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=s?function(t){try{s(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=n?function(){try{n()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return(0,n.__extends)(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;t.prototype.unsubscribe.call(this),r||null==(e=this.onFinalize)||e.call(this)}},e}(t.i(240126).Subscriber);t.s(["createOperatorSubscriber",0,s],627608),t.s(["map",0,function(t,e){return r(function(r,n){var i=0;r.subscribe(s(n,function(r){n.next(t.call(e,r,i++))}))})}],94059)},484973,t=>{"use strict";var e=t.i(94059),r=t.i(220324),n=t.i(902965),s=(t.i(175436),t.i(627608)),i=t.i(603752);t.s(["mergeMap",0,function t(o,a,c){return(void 0===c&&(c=1/0),(0,i.isFunction)(a))?t(function(t,n){return(0,e.map)(function(e,r){return a(t,e,n,r)})((0,r.innerFrom)(o(t,n)))},c):("number"==typeof a&&(c=a),(0,n.operate)(function(t,e){var n,i,a,u,l,f,p,h;return n=c,i=[],a=0,u=0,l=!1,f=function(){!l||i.length||a||e.complete()},p=function(t){return a<n?h(t):i.push(t)},h=function(t){a++;var c=!1;(0,r.innerFrom)(o(t,u++)).subscribe((0,s.createOperatorSubscriber)(e,function(t){e.next(t)},function(){c=!0},void 0,function(){if(c)try{for(a--;i.length&&a<n;)!function(){var t=i.shift();h(t)}();f()}catch(t){e.error(t)}}))},t.subscribe((0,s.createOperatorSubscriber)(e,p,function(){l=!0,f()})),function(){}}))}],484973)},175436,t=>{"use strict";t.s(["executeSchedule",0,function(t,e,r,n,s){void 0===n&&(n=0),void 0===s&&(s=!1);var i=e.schedule(function(){r(),s?t.add(this.schedule(null,n)):this.unsubscribe()},n);if(t.add(i),!s)return i}])},272383,722249,t=>{"use strict";var e=t.i(290571),r=t.i(94059),n=Array.isArray;t.s(["mapOneOrManyArgs",0,function(t){return(0,r.map)(function(r){return n(r)?t.apply(void 0,(0,e.__spreadArray)([],(0,e.__read)(r))):t(r)})}],272383);var s=t.i(902965),i=t.i(627608);t.s(["filter",0,function(t,e){return(0,s.operate)(function(r,n){var s=0;r.subscribe((0,i.createOperatorSubscriber)(n,function(r){return t.call(e,r,s++)&&n.next(r)}))})}],722249)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.