PageSourceSearch

https://www.swanbitcoin.com/ce63a6e64aa11e378ef2044d58b6d8312708ac18-e0d4d4ebe57e8304ea84.js

js swanbitcoin.com collected 2026-09-24 17:13:42 UTC 37,849 bytes, 2 lines download raw bytes

1(self.webpackChunk_swan_bitcoin_landing=self.webpackChunk_swan_bitcoin_landing||[]).push([[657],{78961:function(t){function e(t){return t&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}function n(t){return t}function s(t,s){const o=(s=s||{}).delimiter||".",i=s.maxDepth,r=s.transformKey||n,c={};return function t(n,a,u){u=u||1,Object.keys(n).forEach((function(h){const f=n[h],d=s.safe&&Array.isArray(f),p=Object.prototype.toString.call(f),l=e(f),y="[object Object]"===p||"[object Array]"===p,g=a?a+o+r(h):r(h);if(!d&&!l&&y&&Object.keys(f).length&&(!s.maxDepth||u<i))return t(f,g,u+1);c[g]=f}))}(t),c}t.exports=s,s.flatten=s,s.unflatten=function t(o,i){const r=(i=i||{}).delimiter||".",c=i.overwrite||!1,a=i.transformKey||n,u={};if(e(o)||"[object Object]"!==Object.prototype.toString.call(o))return o;function h(t){const e=Number(t);return isNaN(e)||-1!==t.indexOf(".")||i.object?t:e}return o=Object.keys(o).reduce((function(t,e){const n=Object.prototype.toString.call(o[e]);return!("[object Object]"===n||"[object Array]"===n)||function(t){const e=Object.prototype.toString.call(t),n="[object Array]"===e,s="[object Object]"===e;if(!t)return!0;if(n)return!t.length;if(s)return!Object.keys(t).length}(o[e])?(t[e]=o[e],t):function(t,e,n){return Object.keys(n).reduce((function(e,s){return e[t+r+s]=n[s],e}),e)}(e,t,s(o[e],i))}),{}),Object.keys(o).forEach((function(e){const n=e.split(r).map(a);let s=h(n.shift()),f=h(n[0]),d=u;for(;void 0!==f;){if("__proto__"===s)return;const t=Object.prototype.toString.call(d[s]),e="[object Object]"===t||"[object Array]"===t;if(!c&&!e&&void 0!==d[s])return;(c&&!e||!c&&null==d[s])&&(d[s]="number"!=typeof f||i.object?{}:[]),d=d[s],n.length>0&&(s=h(n.shift()),f=h(n[0]))}d[s]=t(o[e],i)})),u}},62444:function(t,e,n){"use strict";n.d(e,{FZ:function(){return r},ef:function(){return i}});var s=n(78961),o=n.n(s);const i=t=>{if("string"==typeof t)return{path:"",name:t,value:t};const e=o()(t),n=Object.keys(e);if(1!==n.length)throw Error("The passed in XState value is in more than one state. Something is wrong here!");const[s]=n;return{path:s,name:e[s],value:`${s}.${e[s]}`}},r=(t,e,n="")=>t[Object.keys(t).find((t=>e(t)))]||n},8612:function(t,e,n){"use strict";n.d(e,{Sx:function(){return c}});var s=n(97366);const o="xstate.promise.resolve",i="xstate.promise.reject",r=new WeakMap;function c(t){return{config:t,transition:(t,e,n)=>{if("active"!==t.status)return t;switch(e.type){case o:{const n=e.data;return{...t,status:"done",output:n,input:void 0}}case i:return{...t,status:"error",error:e.data,input:void 0};case s.X:return r.get(n.self)?.abort(),{...t,status:"stopped",input:void 0};default:return t}},start:(e,{self:n,system:s})=>{if("active"!==e.status)return;const c=new AbortController;r.set(n,c);Promise.resolve(t({input:e.input,system:s,self:n,signal:c.signal})).then((t=>{"active"===n.getSnapshot().status&&(r.delete(n),s._relay(n,n,{type:o,data:t}))}),(t=>{"active"===n.getSnapshot().status&&(r.delete(n),s._relay(n,n,{type:i,data:t}))}))},getInitialSnapshot:(t,e)=>({status:"active",output:void 0,error:void 0,input:e}),getPersistedSnapshot:t=>t,restoreSnapshot:t=>t}}u=void 0,a=t=>{};var a,u},71099:function(t,e,n){"use strict";n.d(e,{a:function(){return r}});var s=n(97366);function o(t,{machine:e,context:n},o,i){return(r,c)=>{const a=((r,c={})=>{const{systemId:a,input:u}=c;if("string"==typeof r){const h=(0,s.z)(e,r);if(!h)throw new Error(`Actor logic '${r}' not implemented in machine '${e.id}'`);const f=(0,s.A)(h,{id:c.id,parent:t.self,syncSnapshot:c.syncSnapshot,input:"function"==typeof u?u({context:n,event:o,self:t.self}):u,src:r,systemId:a});return i[f.id]=f,f}return(0,s.A)(r,{id:c.id,parent:t.self,syncSnapshot:c.syncSnapshot,input:c.input,src:r,systemId:a})})(r,c);return i[a.id]=a,t.defer((()=>{a._processingStatus!==s.T.Stopped&&a.start()})),a}}function i(t,e,n,i,{assignment:r}){if(!e.context)throw new Error("Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.");const c={},a={context:e.context,event:n.event,spawn:o(t,e,n.event,c),self:t.self,system:t.system};let u={};if("function"==typeof r)u=r(a,i);else for(const s of Object.keys(r)){const t=r[s];u[s]="function"==typeof t?t(a,i):t}const h=Object.assign({},e.context,u);return[(0,s.U)(e,{context:h,children:Object.keys(c).length?{...e.children,...c}:e.children})]}function r(t){function e(t,e){}return e.type="xstate.assign",e.assignment=t,e.resolve=i,e}},97366:function(t,e,n){"use strict";function s(){const t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:void 0;if(t.__xstate__)return t.__xstate__}n.d(e,{$:function(){return T},A:function(){return D},N:function(){return a},S:function(){return r},T:function(){return N},U:function(){return zt},X:function(){return f},a:function(){return j},b:function(){return nt},c:function(){return O},d:function(){return ot},e:function(){return W},f:function(){return st},g:function(){return et},h:function(){return tt},i:function(){return Q},j:function(){return ft},k:function(){return Jt},l:function(){return H},m:function(){return S},n:function(){return Et},o:function(){return dt},p:function(){return It},q:function(){return p},r:function(){return Nt},s:function(){return bt},t:function(){return w},u:function(){return at},v:function(){return _},w:function(){return Y},x:function(){return ht},y:function(){return Bt},z:function(){return A}});const o=t=>{if("undefined"==typeof window)return;const e=s();e&&e.register(t)};class i{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){const e={value:t,next:null};if(this._current)return this._last.next=e,void(this._last=e);this._current=e,this._last=e,this._active&&this.flush()}flush(){for(;this._current;){const t=this._current;this._process(t.value),this._current=t.next}this._last=null}}const r=".",c="",a="",u="*",h="xstate.init",f="xstate.stop";function d(t,e){return{type:`xstate.done.state.${t}`,output:e}}function p(t){return{type:h,input:t}}function l(t){setTimeout((()=>{throw t}))}const y="function"==typeof Symbol&&Symbol.observable||"@@observable";function g(t,e){return`${t.sessionId}.${e}`}let v=0;function m(t,e){const n=b(t),s=b(e);return"string"==typeof s?"string"==typeof n&&s===n:"string"==typeof n?n in s:Object.keys(n).every((t=>t in s&&m(n[t],s[t])))}function _(t){if($(t))return t;let e=[],n="";for(let s=0;s<t.length;s++){switch(t.charCodeAt(s)){case 92:n+=t[s+1],s++;continue;case 46:e.push(n),n="";continue}n+=t[s]}return e.push(n),e}function b(t){if((e=t)&&"object"==typeof e&&"machine"in e&&"value"in e)return t.value;var e;if("string"!=typeof t)return t;return function(t){if(1===t.length)return t[0];const e={};let n=e;for(let s=0;s<t.length-1;s++)if(s===t.length-2)n[t[s]]=t[s+1];else{const e=n;n={},e[t[s]]=n}return e}(_(t))}function S(t,e){const n={},s=Object.keys(t);for(let o=0;o<s.length;o++){const i=s[o];n[i]=e(t[i],i,t,o)}return n}function x(t){return $(t)?t:[t]}function w(t){return void 0===t?[]:x(t)}function k(t,e,n,s){return"function"==typeof t?t({context:e,event:n,self:s}):t}function $(t){return Array.isArray(t)}function j(t){return x(t).map((t=>void 0===t||"string"==typeof t?{target:t}:t))}function I(t){if(void 0!==t&&t!==c)return w(t)}function E(t,e,n){const s="object"==typeof t,o=s?t:void 0;return{next:(s?t.next:t)?.bind(o),error:(s?t.error:e)?.bind(o),c
vendor: 4,910 bytes, line 1
1omplete:(s?t.complete:n)?.bind(o)}}function O(t,e){return`${e}.${t}`}function A(t,e){const n=e.match(/^xstate\.invoke\.(\d+)\.(.*)/);if(!n)return t.implementations.actors[e];const[,s,o]=n,i=t.getStateNodeById(o).config.invoke;return(Array.isArray(i)?i[s]:i).src}const T=1;let N=function(t){return t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped",t}({});const M={clock:{setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t)},logger:console.log.bind(console),devTools:!1};class R{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 i(this._process.bind(this)),this.observers=new Set,this.eventListeners=new Map,this.logger=void 0,this._processingStatus=N.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 n={...M,...e},{clock:s,logger:o,parent:r,syncSnapshot:c,id:a,systemId:u,inspect:h}=n;this.system=r?r.system:function(t,e){const n=new Map,s=new Map,o=new WeakMap,i=new Set,r={},{clock:c,logger:a}=e,u={schedule:(t,e,n,s,o=Math.random().toString(36).slice(2))=>{const i={source:t,target:e,event:n,delay:s,id:o,startedAt:Date.now()},a=g(t,o);h._snapshot._scheduledEvents[a]=i;const u=c.setTimeout((()=>{delete r[a],delete h._snapshot._scheduledEvents[a],h._relay(t,e,n)}),s);r[a]=u},cancel:(t,e)=>{const n=g(t,e),s=r[n];delete r[n],delete h._snapshot._scheduledEvents[n],c.clearTimeout(s)},cancelAll:t=>{for(const e in h._snapshot._scheduledEvents){const n=h._snapshot._scheduledEvents[e];n.source===t&&u.cancel(t,n.id)}}},h={_snapshot:{_scheduledEvents:(e?.snapshot&&e.snapshot.scheduler)??{}},_bookId:()=>"x:"+v++,_register:(t,e)=>(n.set(t,e),t),_unregister:t=>{n.delete(t.sessionId);const e=o.get(t);void 0!==e&&(s.delete(e),o.delete(t))},get:t=>s.get(t),_set:(t,e)=>{const n=s.get(t);if(n&&n!==e)throw new Error(`Actor with system ID '${t}' already exists.`);s.set(t,e),o.set(e,t)},inspect:t=>{i.add(t)},_sendInspectionEvent:e=>{if(!i.size)return;const n={...e,rootId:t.sessionId};i.forEach((t=>t.next?.(n)))},_relay:(t,e,n)=>{h._sendInspectionEvent({type:"@xstate.event",sourceRef:t,actorRef:e,event:n}),e._send(n)},scheduler:u,getSnapshot:()=>({_scheduledEvents:{...h._snapshot._scheduledEvents}}),start:()=>{const t=h._snapshot._scheduledEvents;h._snapshot._scheduledEvents={};for(const e in t){const{source:n,target:s,event:o,delay:i,id:r}=t[e];u.schedule(n,s,o,i,r)}},_clock:c,_logger:a};return h}(this,{clock:s,logger:o}),h&&!r&&this.system.inspect(E(h)),this.sessionId=this.system._bookId(),this.id=a??this.sessionId,this.logger=e?.logger??this.system._logger,this.clock=e?.clock??this.system._clock,this._parent=r,this._syncSnapshot=c,this.options=n,this.src=n.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 new Error(`Cannot stop child actor ${t.id} of ${this.id} because it is not a child`);t._stop()},emit:t=>{const e=this.eventListeners.get(t.type);if(e)for(const n of Array.from(e))n(t)}},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(e){this._snapshot={status:"error",output:void 0,error:e}}}update(t,e){let n;for(this._snapshot=t;n=this._deferred.shift();)try{n()}catch(i){this._deferred.length=0,this._snapshot={...t,status:"error",error:i}}switch(this._snapshot.status){case"active":for(const e of this.observers)try{e.next?.(t)}catch(i){l(i)}break;case"done":for(const e of this.observers)try{e.next?.(t)}catch(i){l(i)}this._stopProcedure(),this._complete(),this._doneEvent=(s=this.id,o=this._snapshot.output,{type:`xstate.done.actor.${s}`,output:o}),this._parent&&this.system._relay(this,this._parent,this._doneEvent);break;case"error":this._error(this._snapshot.error)}var s,o;this.system._sendInspectionEvent({type:"@xstate.snapshot",actorRef:this,event:e,snapshot:t})}subscribe(t,e,n){const s=E(t,e,n);if(this._processingStatus!==N.Stopped)this.observers.add(s);else switch(this._snapshot.status){case"done":try{s.complete?.()}catch(o){l(o)}break;case"error":{const t=this._snapshot.error;if(s.error)try{s.error(t)}catch(o){l(o)}else l(t);break}}return{unsubscribe:()=>{this.observers.delete(s)}}}on(t,e){let n=this.eventListeners.get(t);n||(n=new Set,this.eventListeners.set(t,n));const s=e.bind(void 0);return n.add(s),{unsubscribe:()=>{n.delete(s)}}}
1start(){if(this._processingStatus===N.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=N.Running;const t=p(this.options.input);this.system._sendInspectionEvent({type:"@xstate.event",sourceRef:this._parent,actorRef:this,event:t});switch(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(e){return this._snapshot={...this._snapshot,status:"error",error:e},this._error(e),this}return this.update(this._snapshot,t),this.options.devTools&&this.attachDevTools(),this.mailbox.start(),this}_process(t){let e,n;try{e=this.logic.transition(this._snapshot,t,this._actorScope)}catch(s){n={err:s}}if(n){const{err:t}=n;return this._snapshot={...this._snapshot,status:"error",error:t},void this._error(t)}this.update(e,t),t.type===f&&(this._stopProcedure(),this._complete())}_stop(){return this._processingStatus===N.Stopped?this:(this.mailbox.clear(),this._processingStatus===N.NotStarted?(this._processingStatus=N.Stopped,this):(this.mailbox.enqueue({type:f}),this))}stop(){if(this._parent)throw new Error("A non-root actor cannot be stopped directly.");return this._stop()}_complete(){for(const e of this.observers)try{e.complete?.()}catch(t){l(t)}this.observers.clear()}_reportError(t){if(!this.observers.size)return void(this._parent||l(t));let e=!1;for(const s of this.observers){const o=s.error;e||=!o;try{o?.(t)}catch(n){l(n)}}this.observers.clear(),e&&l(t)}_error(t){this._stopProcedure(),this._reportError(t),this._parent&&this.system._relay(this,this._parent,{type:`xstate.error.actor.${this.id}`,error:t})}_stopProcedure(){return this._processingStatus!==N.Running||(this.system.scheduler.cancelAll(this),this.mailbox.clear(),this.mailbox=new i(this._process.bind(this)),this._processingStatus=N.Stopped,this.system._unregister(this)),this}_send(t){this._processingStatus!==N.Stopped&&this.mailbox.enqueue(t)}send(t){this.system._relay(void 0,this,t)}attachDevTools(){const{devTools:t}=this.options;if(t){("function"==typeof t?t:o)(this)}}toJSON(){return{xstate$$type:T,id:this.id}}getPersistedSnapshot(t){return this.logic.getPersistedSnapshot(this._snapshot,t)}[y](){return this}getSnapshot(){return this._snapshot}}function D(t,...[e]){return new R(t,e)}function P(t,e,n,s,{sendId:o}){return[e,"function"==typeof o?o(n,s):o]}function C(t,e){t.defer((()=>{t.system.scheduler.cancel(t.self,e)}))}function J(t,e,n,s,{id:o,systemId:i,src:r,input:c,syncSnapshot:a}){const u="string"==typeof r?A(e.machine,r):r,h="function"==typeof o?o(n):o;let f;return u&&(f=D(u,{id:h,src:r,parent:t.self,syncSnapshot:a,systemId:i,input:"function"==typeof c?c({context:e.context,event:n.event,self:t.self}):c})),[zt(e,{children:{...e.children,[h]:f}}),{id:o,actorRef:f}]}function z(t,{id:e,actorRef:n}){n&&t.defer((()=>{n._processingStatus!==N.Stopped&&n.start()}))}function B(...[t,{id:e,systemId:n,input:s,syncSnapshot:o=!1}={}]){function i(t,e){}return i.type="snapshot.spawnChild",i.id=e,i.systemId=n,i.src=t,i.input=s,i.syncSnapshot=o,i.resolve=J,i.execute=z,i}function V(t,e,n,s,{actorRef:o}){const i="function"==typeof o?o(n,s):o,r="string"==typeof i?e.children[i]:i;let c=e.children;return r&&(c={...c},delete c[r.id]),[zt(e,{children:c}),r]}function q(t,e){e&&(t.system._unregister(e),e._processingStatus===N.Running?t.defer((()=>{t.stopChild(e)})):t.stopChild(e))}function U(t){function e(t,e){}return e.type="xstate.stopChild",e.actorRef=t,e.resolve=V,e.execute=q,e}function W(t,e,n,s){const{machine:o}=s,i="function"==typeof t,r=i?t:o.implementations.guards["string"==typeof t?t:t.type];if(!i&&!r)throw new Error(`Guard '${"string"==typeof t?t:t.type}' is not implemented.'.`);if("function"!=typeof r)return W(r,e,n,s);const c={context:e,event:n},a=i||"string"==typeof t?void 0:"params"in t?"function"==typeof t.params?t.params({context:e,event:n}):t.params:void 0;if(!("check"in r))return r(c,a);return r.check(s,c,r)}const L=t=>"atomic"===t.type||"final"===t.type;function X(t){return Object.values(t.states).filter((t=>"history"!==t.type))}function K(t,e){const n=[];if(e===t)return n;let s=t.parent;for(;s&&s!==e;)n.push(s),s=s.parent;return n}function Q(t){const e=new Set(t),n=G(e);for(const s of e)if("compound"!==s.type||n.get(s)&&n.get(s).length){if("parallel"===s.type)for(const t of X(s))if("history"!==t.type&&!e.has(t)){const n=ct(t);for(const t of n)e.add(t)}}
1else ct(s).forEach((t=>e.add(t)));for(const s of e){let t=s.parent;for(;t;)e.add(t),t=t.parent}return e}function F(t,e){const n=e.get(t);if(!n)return{};if("compound"===t.type){const t=n[0];if(!t)return{};if(L(t))return t.key}const s={};for(const o of n)s[o.key]=F(o,e);return s}function G(t){const e=new Map;for(const n of t)e.has(n)||e.set(n,[]),n.parent&&(e.has(n.parent)||e.set(n.parent,[]),e.get(n.parent).push(n));return e}function Z(t,e){return F(t,G(Q(e)))}function H(t,e){return"compound"===e.type?X(e).some((e=>"final"===e.type&&t.has(e))):"parallel"===e.type?X(e).every((e=>H(t,e))):"final"===e.type}const Y=t=>"#"===t[0];function tt(t,e){return t.transitions.get(e)||[...t.transitions.keys()].filter((t=>{if(t===u)return!0;if(!t.endsWith(".*"))return!1;const n=t.split("."),s=e.split(".");for(let e=0;e<n.length;e++){const t=n[e],o=s[e];if("*"===t){return e===n.length-1}if(t!==o)return!1}return!0})).sort(((t,e)=>e.length-t.length)).flatMap((e=>t.transitions.get(e)))}function et(t){const e=t.config.after;if(!e)return[];const n=(e,n)=>{const s=(o=e,i=t.id,{type:`xstate.after.${o}.${i}`});var o,i;const r=s.type;return t.entry.push(function(t,e){function n(t,e){}return n.type="xstate.raise",n.event=t,n.id=e?.id,n.delay=e?.delay,n.resolve=qt,n.execute=Ut,n}(s,{id:r,delay:e})),t.exit.push(function(t){function e(t,e){}return e.type="xstate.cancel",e.sendId=t,e.resolve=P,e.execute=C,e}(r)),r};return Object.keys(e).flatMap(((t,s)=>{const o=e[t],i="string"==typeof o?{target:o}:o,r=Number.isNaN(+t)?t:+t,c=n(r);return w(i).map((t=>({...t,event:c,delay:r})))})).map((e=>{const{delay:n}=e;return{...nt(t,e.event,e),delay:n}}))}function nt(t,e,n){const s=I(n.target),o=n.reenter??!1,i=function(t,e){if(void 0===e)return;return e.map((e=>{if("string"!=typeof e)return e;if(Y(e))return t.machine.getStateNodeById(e);const n=e[0]===r;if(n&&!t.parent)return ht(t,e.slice(1));const s=n?t.key+e:e;if(!t.parent)throw new Error(`Invalid target: "${e}" is not a valid target from the root node. Did you mean ".${e}"?`);try{return ht(t.parent,s)}catch(o){throw new Error(`Invalid transition definition for state node '${t.id}':\n${o.message}`)}}))}(t,s),c={...n,actions:w(n.actions),guard:n.guard,target:i,source:t,reenter:o,eventType:e,toJSON:()=>({...c,source:`#${t.id}`,target:i?i.map((t=>`#${t.id}`)):void 0})};return c}function st(t){const e=new Map;if(t.config.on)for(const n of Object.keys(t.config.on)){if(n===a)throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');const s=t.config.on[n];e.set(n,j(s).map((e=>nt(t,n,e))))}if(t.config.onDone){const n=`xstate.done.state.${t.id}`;e.set(n,j(t.config.onDone).map((e=>nt(t,n,e))))}for(const n of t.invoke){if(n.onDone){const s=`xstate.done.actor.${n.id}`;e.set(s,j(n.onDone).map((e=>nt(t,s,e))))}if(n.onError){const s=`xstate.error.actor.${n.id}`;e.set(s,j(n.onError).map((e=>nt(t,s,e))))}if(n.onSnapshot){const s=`xstate.snapshot.${n.id}`;e.set(s,j(n.onSnapshot).map((e=>nt(t,s,e))))}}for(const n of t.after){let t=e.get(n.eventType);t||(t=[],e.set(n.eventType,t)),t.push(n)}return e}function ot(t,e){const n="string"==typeof e?t.states[e]:e?t.states[e.target]:void 0;if(!n&&e)throw new Error(`Initial state node "${e}" not found on parent state node #${t.id}`);const s={source:t,actions:e&&"string"!=typeof e?w(e.actions):[],eventType:null,reenter:!1,target:n?[n]:[],toJSON:()=>({...s,source:`#${t.id}`,target:n?[`#${n.id}`]:[]})};return s}function it(t){const e=I(t.config.target);return e?{target:e.map((e=>"string"==typeof e?ht(t.parent,e):e))}:t.parent.initial}function rt(t){return"history"===t.type}function ct(t){const e=at(t);for(const n of e)for(const s of K(n,t))e.add(s);return e}function at(t){const e=new Set;return function t(n){if(!e.has(n))if(e.add(n),"compound"===n.type)t(n.initial.target[0]);else if("parallel"===n.type)for(const e of X(n))t(e)}(t),e}function ut(t,e){if(Y(e))return t.machine.getStateNodeById(e);if(!t.states)throw new Error(`Unable to retrieve child state '${e}' from '${t.id}'; no child states exist.`);const n=t.states[e];if(!n)throw new Error(`Child state '${e}' does not exist on '${t.id}'`);return n}function ht(t,e){if("string"==typeof e&&Y(e))try{return t.machine.getStateNodeById(e)}catch(o){}const n=_(e).slice();let s=t;for(;n.length;){const t=n.shift();if(!t.length)break;s=ut(s,t)}return s}function ft(t,e){if("string"==typeof e){const n=t.states[e];if(!n)throw new Error(`State '${e}' does not exist on '${t.id}'`);return[t,n]}const n=Object.keys(e),s=n.map((e=>
1ut(t,e))).filter(Boolean);return[t.machine.root,t].concat(s,n.reduce(((n,s)=>{const o=ut(t,s);if(!o)return n;const i=ft(o,e[s]);return n.concat(i)}),[]))}function dt(t,e,n,s){return"string"==typeof e?function(t,e,n,s){const o=ut(t,e).next(n,s);return o&&o.length?o:t.next(n,s)}(t,e,n,s):1===Object.keys(e).length?function(t,e,n,s){const o=Object.keys(e),i=dt(ut(t,o[0]),e[o[0]],n,s);return i&&i.length?i:t.next(n,s)}(t,e,n,s):function(t,e,n,s){const o=[];for(const i of Object.keys(e)){const r=e[i];if(!r)continue;const c=dt(ut(t,i),r,n,s);c&&o.push(...c)}return o.length?o:t.next(n,s)}(t,e,n,s)}function pt(t){return Object.keys(t.states).map((e=>t.states[e])).filter((t=>"history"===t.type))}function lt(t,e){let n=t;for(;n.parent&&n.parent!==e;)n=n.parent;return n.parent===e}function yt(t,e){const n=new Set(t),s=new Set(e);for(const o of n)if(s.has(o))return!0;for(const o of s)if(n.has(o))return!0;return!1}function gt(t,e,n){const s=new Set;for(const o of t){let t=!1;const i=new Set;for(const r of s)if(yt(_t([o],e,n),_t([r],e,n))){if(!lt(o.source,r.source)){t=!0;break}i.add(r)}if(!t){for(const t of i)s.delete(t);s.add(o)}}return Array.from(s)}function vt(t,e){if(!t.target)return[];const n=new Set;for(const s of t.target)if(rt(s))if(e[s.id])for(const t of e[s.id])n.add(t);else for(const t of vt(it(s),e))n.add(t);else n.add(s);return[...n]}function mt(t,e){const n=vt(t,e);if(!n)return;if(!t.reenter&&n.every((e=>e===t.source||lt(e,t.source))))return t.source;const s=function(t){const[e,...n]=t;for(const s of K(e,void 0))if(n.every((t=>lt(t,s))))return s}(n.concat(t.source));return s||(t.reenter?void 0:t.source.machine.root)}function _t(t,e,n){const s=new Set;for(const o of t)if(o.target?.length){const t=mt(o,n);o.reenter&&o.source===t&&s.add(t);for(const n of e)lt(n,t)&&s.add(n)}return[...s]}function bt(t,e,n,s,o,i){if(!t.length)return e;const r=new Set(e._nodes);let c=e.historyValue;const a=gt(t,r,c);let u=e;o||([u,c]=function(t,e,n,s,o,i,r){let c=t;const a=_t(s,o,i);let u;a.sort(((t,e)=>e.order-t.order));for(const h of a)for(const t of pt(h)){let e;e="deep"===t.history?t=>L(t)&&lt(t,h):t=>t.parent===h,u??={...i},u[t.id]=Array.from(o).filter(e)}for(const h of a)c=It(c,e,n,[...h.exit,...h.invoke.map((t=>U(t.id)))],r),o.delete(h);return[c,u||i]}(u,s,n,a,r,c,i)),u=It(u,s,n,a.flatMap((t=>t.actions)),i),u=function(t,e,n,s,o,i,r,c){let a=t;const u=new Set,h=new Set;(function(t,e,n,s){for(const o of t){const t=mt(o,e);for(const r of o.target||[])rt(r)||o.source===r&&o.source===t&&!o.reenter||(s.add(r),n.add(r)),xt(r,e,n,s);const i=vt(o,e);for(const r of i){const i=K(r,t);"parallel"===t?.type&&i.push(t),wt(s,e,n,i,!o.source.parent&&o.reenter?void 0:t)}}})(s,r,h,u),c&&h.add(t.machine.root);const f=new Set;for(const p of[...u].sort(((t,e)=>t.order-e.order))){o.add(p);const t=[];t.push(...p.entry);for(const e of p.invoke)t.push(B(e.src,{...e,syncSnapshot:!!e.onSnapshot}));if(h.has(p)){const e=p.initial.actions;t.push(...e)}if(a=It(a,e,n,t,i,p.invoke.map((t=>t.id))),"final"===p.type){const t=p.parent;let s="parallel"===t?.type?t:t?.parent,r=s||p;for("compound"===t?.type&&i.push(d(t.id,void 0!==p.output?k(p.output,a.context,e,n.self):void 0));"parallel"===s?.type&&!f.has(s)&&H(o,s);)f.add(s),i.push(d(s.id)),r=s,s=s.parent;if(s)continue;a=zt(a,{status:"done",output:St(a,e,n,a.machine.root,r)})}}return a}(u,s,n,a,r,i,c,o);const h=[...r];"done"===u.status&&(u=It(u,s,n,h.sort(((t,e)=>e.order-t.order)).flatMap((t=>t.exit)),i));try{return c===e.historyValue&&function(t,e){if(t.length!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0}(e._nodes,r)?u:zt(u,{_nodes:h,historyValue:c})}catch(f){throw f}}function St(t,e,n,s,o){if(void 0===s.output)return;const i=d(o.id,void 0!==o.output&&o.parent?k(o.output,t.context,e,n.self):void 0);return k(s.output,t.context,i,n.self)}function xt(t,e,n,s){if(rt(t))if(e[t.id]){const o=e[t.id];for(const t of o)s.add(t),xt(t,e,n,s);for(const i of o)kt(i,t.parent,s,e,n)}else{const o=it(t);for(const i of o.target)s.add(i),o===t.parent?.initial&&n.add(t.parent),xt(i,e,n,s);for(const i of o.target)kt(i,t.parent,s,e,n)}else if("compound"===t.type){const[o]=t.initial.target;
1rt(o)||(s.add(o),n.add(o)),xt(o,e,n,s),kt(o,t,s,e,n)}else if("parallel"===t.type)for(const o of X(t).filter((t=>!rt(t))))[...s].some((t=>lt(t,o)))||(rt(o)||(s.add(o),n.add(o)),xt(o,e,n,s))}function wt(t,e,n,s,o){for(const i of s)if(o&&!lt(i,o)||t.add(i),"parallel"===i.type)for(const s of X(i).filter((t=>!rt(t))))[...t].some((t=>lt(t,s)))||(t.add(s),xt(s,e,n,t))}function kt(t,e,n,s,o){wt(n,s,o,K(t,e))}let $t=!1;function jt(t,e,n,s,o,i){const{machine:r}=t;let c=t;for(const a of s){const u="function"==typeof a,h=u?a:r.implementations.actions["string"==typeof a?a:a.type];if(!h)continue;const f={context:c.context,event:e,self:n.self,system:n.system},d=u||"string"==typeof a?void 0:"params"in a?"function"==typeof a.params?a.params({context:c.context,event:e}):a.params:void 0;function p(){n.system._sendInspectionEvent({type:"@xstate.action",actorRef:n.self,action:{type:"string"==typeof a?a:"object"==typeof a?a.type:a.name||"(anonymous)",params:d}});try{$t=h,h(f,d)}finally{$t=!1}}if(!("resolve"in h)){n.self._processingStatus===N.Running?p():n.defer((()=>{p()}));continue}const l=h,[y,g,v]=l.resolve(n,c,f,d,h,o);c=y,"retryResolve"in l&&i?.push([l,g]),"execute"in l&&(n.self._processingStatus===N.Running?l.execute(n,g):n.defer(l.execute.bind(null,n,g))),v&&(c=jt(c,e,n,v,o,i))}return c}function It(t,e,n,s,o,i){const r=i?[]:void 0,c=jt(t,e,n,s,{internalQueue:o,deferredActorIds:i},r);return r?.forEach((([t,e])=>{t.retryResolve(n,c,e)})),c}function Et(t,e,n,s=[]){let o=t;const i=[];function r(t,e,s){n.system._sendInspectionEvent({type:"@xstate.microstep",actorRef:n.self,event:e,snapshot:t,_transitions:s}),i.push(t)}if(e.type===f)return o=zt(Ot(o,e,n),{status:"stopped"}),r(o,e,[]),{snapshot:o,microstates:i};let c=e;if(c.type!==h){const e=c,a=function(t){return t.type.startsWith("xstate.error.actor")}(e),u=At(e,o);if(a&&!u.length)return o=zt(t,{status:"error",error:e.error}),r(o,e,[]),{snapshot:o,microstates:i};o=bt(u,t,n,c,!1,s),r(o,e,u)}let a=!0;for(;"active"===o.status;){let t=a?Tt(o,c):[];const e=t.length?o:void 0;if(!t.length){if(!s.length)break;c=s.shift(),t=At(c,o)}o=bt(t,o,n,c,!1,s),a=o!==e,r(o,c,t)}return"active"!==o.status&&Ot(o,c,n),{snapshot:o,microstates:i}}function Ot(t,e,n){return It(t,e,n,Object.values(t.children).map((t=>U(t))),[])}function At(t,e){return e.machine.getTransitionData(e,t)}function Tt(t,e){const n=new Set,s=t._nodes.filter(L);for(const o of s)t:for(const s of[o].concat(K(o,void 0)))if(s.always)for(const o of s.always)if(void 0===o.guard||W(o.guard,t.context,e,t)){n.add(o);break t}return gt(Array.from(n),new Set(t._nodes),t.historyValue)}function Nt(t,e){return Z(t,[...Q(ft(t,e))])}const Mt=function(t){return m(t,this.value)},Rt=function(t){return this.tags.has(t)},Dt=function(t){const e=this.machine.getTransitionData(this,t);return!!e?.length&&e.some((t=>void 0!==t.target||t.actions.length))},Pt=function(){const{_nodes:t,tags:e,machine:n,getMeta:s,toJSON:o,can:i,hasTag:r,matches:c,...a}=this;return{...a,tags:Array.from(e)}},Ct=function(){return this._nodes.reduce(((t,e)=>(void 0!==e.meta&&(t[e.id]=e.meta),t)),{})};function Jt(t,e){return{status:t.status,output:t.output,error:t.error,machine:e,context:t.context,_nodes:t._nodes,value:Z(e.root,t._nodes),tags:new Set(t._nodes.flatMap((t=>t.tags))),children:t.children,historyValue:t.historyValue||{},matches:Mt,hasTag:Rt,can:Dt,getMeta:Ct,toJSON:Pt}}function zt(t,e={}){return Jt({...t,...e},t.machine)}function Bt(t,e){const{_nodes:n,tags:s,machine:o,children:i,context:r,can:c,hasTag:a,matches:u,getMeta:h,toJSON:f,...d}=t,p={};for(const l in i){const t=i[l];p[l]={snapshot:t.getPersistedSnapshot(e),src:t.src,systemId:t._systemId,syncSnapshot:t._syncSnapshot}}return{...d,context:Vt(r),children:p}}function Vt(t){let e;for(const n in t){const s=t[n];if(s&&"object"==typeof s)if("sessionId"in s&&"send"in s&&"ref"in s)e??=Array.isArray(t)?t.slice():{...t},e[n]={xstate$$type:T,id:s.id};else{const o=Vt(s);o!==s&&(e??=Array.isArray(t)?t.slice():{...t},e[n]=o)}}return e??t}function qt(t,e,n,s,{event:o,id:i,delay:r},{internalQueue:c}){const a=e.machine.implementations.delays;if("string"==typeof o)throw new Error(`Only event objects may be used with raise; use raise({ type: "${o}" }) instead`);const u="function"==typeof o?o(n,s):o;let h;if("string"==typeof r){const t=a&&a[r];h="function"==typeof t?t(n,s):t}else h="function"==typeof r?r(n,s):r;return"number"!=typeof h&&c.push(u),[e,{event:u,id:i,delay:h}]}function Ut(t,e){const{event:n,delay:s,id:o}=e;"number"!=typeof s||t.defer((()=>{const e=t.self;t.system.scheduler.schedule(e,e,n,s,o)}))}},85678:function(t,e,n){"use strict";n.d(e,{Op:function(){return f},mj:function(){return d}});n(8612);var s=n(97366),o=n(71099);const i=new WeakMap;function r(t,e,n){let s=i.get(t);return s?e in s||(s[e]=n()):(s={[e]:n()},i.set(t,s)),s[e]}const c={},a=t=>"string"==typeof t?{type:t}:"function"==typeof t?"resolve"in t?{type:t.type}:{type:t.name}:t;class u{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(s.S),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?(0,s.m)(this.config.states,((t,e)=>new u(t,{_parent:this,_key:e,_machine:this.machine}))):c,"compound"===this.type&&!this.config.initial)throw new Error(`No initial state specified for c
1ompound 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=(0,s.t)(this.config.entry).slice(),this.exit=(0,s.t)(this.config.exit).slice(),this.meta=this.config.meta,this.output="final"!==this.type&&this.parent?void 0:this.config.output,this.tags=(0,s.t)(t.tags).slice()}_initialize(){this.transitions=(0,s.f)(this),this.config.always&&(this.always=(0,s.a)(this.config.always).map((t=>(0,s.b)(this,s.N,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.type,initial:this.initial?{target:this.initial.target,source:this,actions:this.initial.actions.map(a),eventType:null,reenter:!1,toJSON:()=>({target:this.initial.target.map((t=>`#${t.id}`)),source:`#${this.id}`,actions:this.initial.actions.map(a),eventType:null})}:void 0,history:this.history,states:(0,s.m)(this.states,(t=>t.definition)),on:this.on,transitions:[...this.transitions.values()].flat().map((t=>({...t,actions:t.actions.map(a)}))),entry:this.entry.map(a),exit:this.exit.map(a),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 r(this,"invoke",(()=>(0,s.t)(this.config.invoke).map(((t,e)=>{const{src:n,systemId:o}=t,i=t.id??(0,s.c)(this.id,e),r="string"==typeof n?n:`xstate.invoke.${(0,s.c)(this.id,e)}`;return{...t,src:r,id:i,systemId:o,toJSON(){const{onDone:e,onError:n,...s}=t;return{...s,type:"xstate.invoke",src:r,id:i}}}}))))}get on(){return r(this,"on",(()=>[...this.transitions].flatMap((([t,e])=>e.map((e=>[t,e])))).reduce(((t,[e,n])=>(t[e]=t[e]||[],t[e].push(n),t)),{})))}get after(){return r(this,"delayedTransitions",(()=>(0,s.g)(this)))}get initial(){return r(this,"initial",(()=>(0,s.d)(this,this.config.initial)))}next(t,e){const n=e.type,o=[];let i;const c=r(this,`candidates-${n}`,(()=>(0,s.h)(this,n)));for(const r of c){const{guard:c}=r,u=t.context;let h=!1;try{h=!c||(0,s.e)(c,u,e,t)}catch(a){const t="string"==typeof c?c:"object"==typeof c?c.type:void 0;throw new Error(`Unable to evaluate guard ${t?`'${t}' `:""}in transition for event '${n}' in state node '${this.id}':\n${a.message}`)}if(h){o.push(...r.actions),i=r;break}}return i?[i]:void 0}get events(){return r(this,"events",(()=>{const{states:t}=this,e=new Set(this.ownEvents);if(t)for(const n of Object.keys(t)){const s=t[n];if(s.states)for(const t of s.events)e.add(`${t}`)}return Array.from(e)}))}get ownEvents(){const t=new Set([...this.transitions.keys()].filter((t=>this.transitions.get(t).some((t=>!(!t.target&&!t.actions.length&&!t.reenter))))));return Array.from(t)}}class h{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.__TResolvedTypesMeta=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 u(t,{_key:this.id,_machine:this}),this.root._initialize(),this.states=this.root.states,this.events=this.root.events}provide(t){const{actions:e,guards:n,actors:s,delays:o}=this.implementations;return new h(this.config,{actions:{...e,...t.actions},guards:{...n,...t.guards},actors:{...s,...t.actors},delays:{...o,...t.delays}})}resolveState(t){const e=(0,s.r)(this.root,t.value),n=(0,s.i)((0,s.j)(this.root,e));return(0,s.k)({_nodes:[...n],context:t.context||{},children:{},status:(0,s.l)(n,this.root)?"done":t.status||"active",output:t.output,error:t.error,historyValue:t.historyValue},this)}transition(t,e,n){return(0,s.n)(t,e,n).snapshot}microstep(t,e,n){return(0,s.n)(t,e,n).microstates}getTransitionData(t,e){return(0,s.o)(this.root,t.value,t,e)||[]}getPreInitialState(t,e,n){const{context:i}=this.config,r=(0,s.k)({context:"function"!=typeof i&&i?i:{},_nodes:[this.root],children:{},status:"active"},this);if("function"==typeof i){const c=({spawn:t,event:e,self:n})=>i({spawn:t,input:e.input,self:n});return(0,s.p)(r,e,t,[(0,o.a)(c)],n)}return r}getInitialSnapshot(t,e){const n=(0,s.q)(e),o=[],i=this.getPreInitialState(t,n,o),r=(0,s.s)([{target:[...(0,s.u)(this.root)],source:this.root,reenter
1:!0,actions:[],eventType:null,toJSON:null}],i,t,n,!0,o),{snapshot:c}=(0,s.n)(r,n,t,o);return c}start(t){Object.values(t.children).forEach((t=>{"active"===t.getSnapshot().status&&t.start()}))}getStateNodeById(t){const e=(0,s.v)(t),n=e.slice(1),o=(0,s.w)(e[0])?e[0].slice(1):e[0],i=this.idMap.get(o);if(!i)throw new Error(`Child state node '#${o}' does not exist on machine '${this.id}'`);return(0,s.x)(i,n)}get definition(){return this.root.definition}toJSON(){return this.definition}getPersistedSnapshot(t,e){return(0,s.y)(t,e)}restoreSnapshot(t,e){const n={},o=t.children;Object.keys(o).forEach((t=>{const i=o[t],r=i.snapshot,c=i.src,a="string"==typeof c?(0,s.z)(this,c):c;if(!a)return;const u=(0,s.A)(a,{id:t,parent:e.self,syncSnapshot:i.syncSnapshot,snapshot:r,src:c,systemId:i.systemId});n[t]=u}));const i=(0,s.k)({...t,children:n,_nodes:Array.from((0,s.i)((0,s.j)(this.root,t.value)))},this);let r=new Set;return function t(e,n){if(!r.has(e)){r.add(e);for(let o in e){const i=e[o];if(i&&"object"==typeof i){if("xstate$$type"in i&&i.xstate$$type===s.$){e[o]=n[i.id];continue}t(i,n)}}}}(i.context,n),i}}function f(t,e){return new h(t,e)}function d({schemas:t,actors:e,actions:n,guards:s,delays:o}){return{createMachine:i=>f({...i,schemas:t},{actors:e,actions:n,guards:s,delays:o})}}}}]);
2//# sourceMappingURL=ce63a6e64aa11e378ef2044d58b6d8312708ac18-e0d4d4ebe57e8304ea84.js.map

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.