diff --git a/assets/dotlottie-state-machine-manager-XQAAXUPV-a728a3f7.js b/assets/dotlottie-state-machine-manager-2E7RUGJG-111b470e.js similarity index 99% rename from assets/dotlottie-state-machine-manager-XQAAXUPV-a728a3f7.js rename to assets/dotlottie-state-machine-manager-2E7RUGJG-111b470e.js index 6e3edb1..2dbbc42 100644 --- a/assets/dotlottie-state-machine-manager-XQAAXUPV-a728a3f7.js +++ b/assets/dotlottie-state-machine-manager-2E7RUGJG-111b470e.js @@ -1,4 +1,4 @@ -var Ee=Object.defineProperty;var Oe=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var X=(e,t,n)=>(Oe(e,typeof t!="symbol"?t+"":t,n),n);import{o as Lt,d as Kt,u as ke,a as Te}from"./index-98cfabb9.js";var p=function(){return p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),r,o=[],a;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function V(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i"u"||typeof i=="string"||ot(i)?{target:i,event:e}:p(p({},i),{event:e})});return n}function Ue(e){if(!(e===void 0||e===Ce))return q(e)}function de(e,t,n,i,r){var o=e.options.guards,a={state:r,cond:t,_event:i};if(t.type===Rt)return((o==null?void 0:o[t.name])||t.predicate)(n,i.data,a);var s=o==null?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,i.data,a)}function ve(e){return typeof e=="string"?{type:e}:e}function wt(e,t,n){var i=function(){},r=typeof e=="object",o=r?e:null;return{next:((r?e.next:e)||i).bind(o),error:((r?e.error:t)||i).bind(o),complete:((r?e.complete:n)||i).bind(o)}}function mt(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Bt(e){return(e.type===yt||e.type===At&&e.to===rt.Internal)&&typeof e.delay!="number"}var it=R({type:je});function Jt(e,t){return t&&t[e]||void 0}function vt(e,t){var n;if(A(e)||typeof e=="number"){var i=Jt(e,t);T(i)?n={type:e,exec:i}:i?n=i:n={type:e,exec:void 0}}else if(T(e))n={type:e.name||e.toString(),exec:e};else{var i=Jt(e.type,t);if(T(i))n=p(p({},e),{exec:i});else if(i){var r=i.type||e.type;n=p(p(p({},i),e),{type:r})}else n=e}return n}var H=function(e,t){if(!e)return[];var n=at(e)?e:[e];return n.map(function(i){return vt(i,t)})};function Qt(e){var t=vt(e);return p(p({id:A(e)?e:t.id},t),{type:t.type})}function Fe(e,t){return{type:yt,event:typeof e=="function"?e:Pt(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function Xe(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(A(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;return p(p({},e),{type:yt,_event:o,delay:a})}function Qe(e,t){return{to:t?t.to:void 0,type:At,event:T(e)?e:Pt(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:T(e)?e.name:ue(e)}}function He(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(A(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;var c=T(e.to)?e.to(t,n.data,r):e.to;return p(p({},e),{to:c,_event:o,event:o.data,delay:a})}var We=function(e,t,n){return p(p({},e),{value:A(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Ke=function(e){return{type:re,sendId:e}};function Ze(e){var t=Qt(e);return{type:P.Start,activity:t,exec:void 0}}function Ye(e){var t=T(e)?e:Qt(e);return{type:P.Stop,activity:t,exec:void 0}}function Ge(e,t,n){var i=T(e.activity)?e.activity(t,n.data):e.activity,r=typeof i=="string"?{id:i}:i,o={type:P.Stop,activity:r};return o}function tn(e,t){var n=t?"#".concat(t):"";return"".concat(P.After,"(").concat(e,")").concat(n)}function _t(e,t){var n="".concat(P.DoneState,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function Et(e,t){var n="".concat(P.DoneInvoke,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function ht(e,t){var n="".concat(P.ErrorPlatform,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}var en=function(e){var t,n,i=[];try{for(var r=E(e),o=r.next();!o.done;o=r.next())for(var a=o.value,s=0;s0;){var u=r.shift();n=e.transition(n,u,c),i.forEach(function(h){return h.next(n)})}o=!1}},s=an({id:t.id,send:function(u){r.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,h,f){var l=wt(u,h,f);return i.add(l),l.next(n),{unsubscribe:function(){i.delete(l)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:i};return n=e.start?e.start(c):n,s}var gn={sync:!1,autoForward:!1},D;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(D||(D={}));var mn=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var i=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=D.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,f){if(at(h))return i.batch(h),i.state;var l=R(Pt(h,f));if(i.status===D.Stopped)return i.state;if(i.status!==D.Running&&!i.options.deferEvents)throw new Error('Event "'.concat(l.name,'" was sent to uninitialized service "').concat(i.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options. +var Ee=Object.defineProperty;var Oe=(e,t,n)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var X=(e,t,n)=>(Oe(e,typeof t!="symbol"?t+"":t,n),n);import{o as Lt,d as Kt,u as ke,a as Te}from"./index-39f61548.js";var p=function(){return p=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var i=n.call(e),r,o=[],a;try{for(;(t===void 0||t-- >0)&&!(r=i.next()).done;)o.push(r.value)}catch(s){a={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(a)throw a.error}}return o}function V(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i"u"||typeof i=="string"||ot(i)?{target:i,event:e}:p(p({},i),{event:e})});return n}function Ue(e){if(!(e===void 0||e===Ce))return q(e)}function de(e,t,n,i,r){var o=e.options.guards,a={state:r,cond:t,_event:i};if(t.type===Rt)return((o==null?void 0:o[t.name])||t.predicate)(n,i.data,a);var s=o==null?void 0:o[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(n,i.data,a)}function ve(e){return typeof e=="string"?{type:e}:e}function wt(e,t,n){var i=function(){},r=typeof e=="object",o=r?e:null;return{next:((r?e.next:e)||i).bind(o),error:((r?e.error:t)||i).bind(o),complete:((r?e.complete:n)||i).bind(o)}}function mt(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Bt(e){return(e.type===yt||e.type===At&&e.to===rt.Internal)&&typeof e.delay!="number"}var it=R({type:je});function Jt(e,t){return t&&t[e]||void 0}function vt(e,t){var n;if(A(e)||typeof e=="number"){var i=Jt(e,t);T(i)?n={type:e,exec:i}:i?n=i:n={type:e,exec:void 0}}else if(T(e))n={type:e.name||e.toString(),exec:e};else{var i=Jt(e.type,t);if(T(i))n=p(p({},e),{exec:i});else if(i){var r=i.type||e.type;n=p(p(p({},i),e),{type:r})}else n=e}return n}var H=function(e,t){if(!e)return[];var n=at(e)?e:[e];return n.map(function(i){return vt(i,t)})};function Qt(e){var t=vt(e);return p(p({id:A(e)?e:t.id},t),{type:t.type})}function Fe(e,t){return{type:yt,event:typeof e=="function"?e:Pt(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function Xe(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(A(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;return p(p({},e),{type:yt,_event:o,delay:a})}function Qe(e,t){return{to:t?t.to:void 0,type:At,event:T(e)?e:Pt(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:T(e)?e.name:ue(e)}}function He(e,t,n,i){var r={_event:n},o=R(T(e.event)?e.event(t,n.data,r):e.event),a;if(A(e.delay)){var s=i&&i[e.delay];a=T(s)?s(t,n.data,r):s}else a=T(e.delay)?e.delay(t,n.data,r):e.delay;var c=T(e.to)?e.to(t,n.data,r):e.to;return p(p({},e),{to:c,_event:o,event:o.data,delay:a})}var We=function(e,t,n){return p(p({},e),{value:A(e.expr)?e.expr:e.expr(t,n.data,{_event:n})})},Ke=function(e){return{type:re,sendId:e}};function Ze(e){var t=Qt(e);return{type:P.Start,activity:t,exec:void 0}}function Ye(e){var t=T(e)?e:Qt(e);return{type:P.Stop,activity:t,exec:void 0}}function Ge(e,t,n){var i=T(e.activity)?e.activity(t,n.data):e.activity,r=typeof i=="string"?{id:i}:i,o={type:P.Stop,activity:r};return o}function tn(e,t){var n=t?"#".concat(t):"";return"".concat(P.After,"(").concat(e,")").concat(n)}function _t(e,t){var n="".concat(P.DoneState,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function Et(e,t){var n="".concat(P.DoneInvoke,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}function ht(e,t){var n="".concat(P.ErrorPlatform,".").concat(e),i={type:n,data:t};return i.toString=function(){return n},i}var en=function(e){var t,n,i=[];try{for(var r=E(e),o=r.next();!o.done;o=r.next())for(var a=o.value,s=0;s0;){var u=r.shift();n=e.transition(n,u,c),i.forEach(function(h){return h.next(n)})}o=!1}},s=an({id:t.id,send:function(u){r.push(u),a()},getSnapshot:function(){return n},subscribe:function(u,h,f){var l=wt(u,h,f);return i.add(l),l.next(n),{unsubscribe:function(){i.delete(l)}}}}),c={parent:t.parent,self:s,id:t.id||"anonymous",observers:i};return n=e.start?e.start(c):n,s}var gn={sync:!1,autoForward:!1},D;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(D||(D={}));var mn=function(){function e(t,n){n===void 0&&(n=e.defaultOptions);var i=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=D.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(h,f){if(at(h))return i.batch(h),i.state;var l=R(Pt(h,f));if(i.status===D.Stopped)return i.state;if(i.status!==D.Running&&!i.options.deferEvents)throw new Error('Event "'.concat(l.name,'" was sent to uninitialized service "').concat(i.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options. Event: `).concat(JSON.stringify(l.data)));return i.scheduler.schedule(function(){i.forward(l);var d=i._nextState(l);i.update(d,l)}),i._state},this.sendTo=function(h,f,l){var d=i.parent&&(f===rt.Parent||i.parent.id===f),y=d?i.parent:A(f)?f===rt.Internal?i:i.children.get(f)||ct.get(f):qe(f)?f:void 0;if(!y){if(!d)throw new Error("Unable to send event to child '".concat(f,"' from service '").concat(i.id,"'."));return}if("machine"in y){if(i.status!==D.Stopped||i.parent!==y||i.state.done){var v=p(p({},h),{name:h.name===Ae?"".concat(ht(i.id)):h.name,origin:i.sessionId});!l&&i.machine.config.predictableActionArguments?i._outgoingQueue.push([y,v]):y.send(v)}}else!l&&i.machine.config.predictableActionArguments?i._outgoingQueue.push([y,h.data]):y.send(h.data)},this._exec=function(h,f,l,d){d===void 0&&(d=i.machine.options.actions);var y=h.exec||Jt(h.type,d),v=T(y)?y:y?y.exec:h.exec;if(v)try{return v(f,l.data,i.machine.config.predictableActionArguments?{action:h,_event:l}:{action:h,state:i.state,_event:l})}catch(B){throw i.parent&&i.parent.send({type:"xstate.error",data:B}),B}switch(h.type){case yt:{var _=h;i.defer(_);break}case At:var g=h;if(typeof g.delay=="number"){i.defer(g);return}else g.to?i.sendTo(g._event,g.to,l===it):i.send(g._event);break;case re:i.cancel(h.sendId);break;case Mt:{if(i.status!==D.Running)return;var m=h.activity;if(!i.machine.config.predictableActionArguments&&!i.state.activities[m.id||m.type])break;if(m.type===P.Invoke){var b=ve(m.src),S=i.machine.options.services?i.machine.options.services[b.type]:void 0,N=m.id,C=m.data,k="autoForward"in m?m.autoForward:!!m.forward;if(!S)return;var L=C?Tt(C,f,l):void 0;if(typeof S=="string")return;var w=T(S)?S(f,l.data,{data:L,src:b,meta:m.meta}):S;if(!w)return;var M=void 0;ot(w)&&(w=L?w.withContext(L):w,M={autoForward:k}),i.spawn(w,N,M)}else i.spawnActivity(m);break}case Ft:{i.stopChild(h.activity.id);break}case ae:var x=h,j=x.label,z=x.value;j?i.logger(j,z):i.logger(z);break}};var r=p(p({},e.defaultOptions),n),o=r.clock,a=r.logger,s=r.parent,c=r.id,u=c!==void 0?c:t.id;this.id=u,this.logger=a,this.clock=o,this.parent=s,this.options=r,this.scheduler=new ie({deferEvents:this.options.deferEvents}),this.sessionId=ct.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:et(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,n){var i,r;try{for(var o=E(t.actions),a=o.next();!a.done;a=o.next()){var s=a.value;this.exec(s,t,n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}},e.prototype.update=function(t,n){var i,r,o,a,s,c,u,h,f=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||n===it)&&this.options.execute)this.execute(this.state);else for(var l=void 0;l=this._outgoingQueue.shift();)l[0].send(l[1]);if(this.children.forEach(function(w){f.state.children[w.id]=w}),this.devTools&&this.devTools.send(n.data,t),t.event)try{for(var d=E(this.eventListeners),y=d.next();!y.done;y=d.next()){var v=y.value;v(t.event)}}catch(w){i={error:w}}finally{try{y&&!y.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}try{for(var _=E(this.listeners),g=_.next();!g.done;g=_.next()){var v=g.value;v(t,t.event)}}catch(w){o={error:w}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}try{for(var m=E(this.contextListeners),b=m.next();!b.done;b=m.next()){var S=b.value;S(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(w){s={error:w}}finally{try{b&&!b.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}if(this.state.done){var N=t.configuration.find(function(w){return w.type==="final"&&w.parent===f.machine}),C=N&&N.doneData?Tt(N.doneData,t.context,n):void 0;this._doneEvent=Et(this.id,C);try{for(var k=E(this.doneListeners),L=k.next();!L.done;L=k.next()){var v=L.value;v(this._doneEvent)}}catch(w){u={error:w}}finally{try{L&&!L.done&&(h=k.return)&&h.call(k)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),ct.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===D.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,n,i){var r=this,o=wt(t,n,i);this.listeners.add(o.next),this.status!==D.NotStarted&&o.next(this.state);var a=function(){r.doneListeners.delete(a),r.stopListeners.delete(a),o.complete()};return this.status===D.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){r.listeners.delete(o.next),r.doneListeners.delete(a),r.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===D.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var n=this;if(this.status===D.Running)return this;this.machine._init(),ct.register(this.sessionId,this),this.initialized=!0,this.status=D.Running;var i=t===void 0?this.initialState:et(this,function(){return hn(t)?n.machine.resolveState(t):n.machine.resolveState(F.from(t,n.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){n.update(i,it)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){T(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,n,i,r,o,a,s,c,u,h;try{for(var f=E(this.listeners),l=f.next();!l.done;l=f.next()){var d=l.value;this.listeners.delete(d)}}catch(k){t={error:k}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}try{for(var y=E(this.stopListeners),v=y.next();!v.done;v=y.next()){var d=v.value;d(),this.stopListeners.delete(d)}}catch(k){i={error:k}}finally{try{v&&!v.done&&(r=y.return)&&r.call(y)}finally{if(i)throw i.error}}try{for(var _=E(this.contextListeners),g=_.next();!g.done;g=_.next()){var d=g.value;this.contextListeners.delete(d)}}catch(k){o={error:k}}finally{try{g&&!g.done&&(a=_.return)&&a.call(_)}finally{if(o)throw o.error}}try{for(var m=E(this.doneListeners),b=m.next();!b.done;b=m.next()){var d=b.value;this.doneListeners.delete(d)}}catch(k){s={error:k}}finally{try{b&&!b.done&&(c=m.return)&&c.call(m)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=D.Stopped,this._initialState=void 0;try{for(var S=E(Object.keys(this.delayedEventsMap)),N=S.next();!N.done;N=S.next()){var C=N.value;this.clock.clearTimeout(this.delayedEventsMap[C])}}catch(k){u={error:k}}finally{try{N&&!N.done&&(h=S.return)&&h.call(S)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new ie({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,n=this.scheduler;return this._stop(),n.schedule(function(){var i=R({type:"xstate.stop"}),r=et(t,function(){var o=I(V([],O(t.state.configuration),!1).sort(function(h,f){return f.order-h.order}).map(function(h){return H(h.onExit,t.machine.options.actions)})),a=O(Nt(t.machine,t.state,t.state.context,i,[{type:"exit",actions:o}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],c=a[1],u=new F({value:t.state.value,context:c,_event:i,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(h){return!Bt(h)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(r,i),t._stopChildren(),ct.free(t.sessionId)}),this},e.prototype.batch=function(t){var n=this;if(!(this.status===D.NotStarted&&this.options.deferEvents)){if(this.status!==D.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'))}if(t.length){var i=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var r,o,a=n.state,s=!1,c=[],u=function(d){var y=R(d);n.forward(y),a=et(n,function(){return n.machine.transition(a,y,void 0,i||void 0)}),c.push.apply(c,V([],O(n.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return ln(v,a)})),!1)),s=s||!!a.changed};try{for(var h=E(t),f=h.next();!f.done;f=h.next()){var l=f.value;u(l)}}catch(d){r={error:d}}finally{try{f&&!f.done&&(o=h.return)&&o.call(h)}finally{if(r)throw r.error}}a.changed=s,a.actions=c,n.update(a,R(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,n){var i=this;n===void 0&&(n=!!this.machine.config.predictableActionArguments&&this._exec);var r=R(t);if(r.name.indexOf(Zt)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Zt)===0}))throw r.data.data;var o=et(this,function(){return i.machine.transition(i.state,r,void 0,n||void 0)});return o},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var n,i;try{for(var r=E(this.forwardTo),o=r.next();!o.done;o=r.next()){var a=o.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(c){n={error:c}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},e.prototype.defer=function(t){var n=this,i=this.clock.setTimeout(function(){"to"in t&&t.to?n.sendTo(t._event,t.to,!0):n.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=i)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,n,i){i===void 0&&(i=this.machine.options.actions),this._exec(t,n.context,n._event,i)},e.prototype.removeChild=function(t){var n;this.children.delete(t),this.forwardTo.delete(t),(n=this.state)===null||n===void 0||delete n.children[t]},e.prototype.stopChild=function(t){var n=this.children.get(t);n&&(this.removeChild(t),T(n.stop)&&n.stop())},e.prototype.spawn=function(t,n,i){if(this.status!==D.Running)return ye(t,n);if(te(t))return this.spawnPromise(Promise.resolve(t),n);if(T(t))return this.spawnCallback(t,n);if(on(t))return this.spawnActor(t,n);if($e(t))return this.spawnObservable(t,n);if(ot(t))return this.spawnMachine(t,p(p({},i),{id:n}));if(Re(t))return this.spawnBehavior(t,n);throw new Error('Unable to spawn entity "'.concat(n,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,n){var i=this;n===void 0&&(n={});var r=new e(t,p(p({},this.options),{parent:this,id:n.id||t.id})),o=p(p({},gn),n);o.sync&&r.onTransition(function(s){i.send(se,{state:s,id:r.id})});var a=r;return this.children.set(r.id,a),o.autoForward&&this.forwardTo.add(r.id),r.onDone(function(s){i.removeChild(r.id),i.send(R(s,{origin:r.id}))}).start(),a},e.prototype.spawnBehavior=function(t,n){var i=yn(t,{id:n,parent:this});return this.children.set(n,i),i},e.prototype.spawnPromise=function(t,n){var i,r=this,o=!1,a;t.then(function(c){o||(a=c,r.removeChild(n),r.send(R(Et(n,c),{origin:n})))},function(c){if(!o){r.removeChild(n);var u=ht(n,c);try{r.send(R(u,{origin:n}))}catch{r.devTools&&r.devTools.send(u,r.state),r.machine.strict&&r.stop()}}});var s=(i={id:n,send:function(){},subscribe:function(c,u,h){var f=wt(c,u,h),l=!1;return t.then(function(d){l||(f.next(d),!l&&f.complete())},function(d){l||f.error(d)}),{unsubscribe:function(){return l=!0}}},stop:function(){o=!0},toJSON:function(){return{id:n}},getSnapshot:function(){return a}},i[Q]=function(){return this},i);return this.children.set(n,s),s},e.prototype.spawnCallback=function(t,n){var i,r=this,o=!1,a=new Set,s=new Set,c,u=function(l){c=l,s.forEach(function(d){return d(l)}),!o&&r.send(R(l,{origin:n}))},h;try{h=t(u,function(l){a.add(l)})}catch(l){this.send(ht(n,l))}if(te(h))return this.spawnPromise(h,n);var f=(i={id:n,send:function(l){return a.forEach(function(d){return d(l)})},subscribe:function(l){var d=wt(l);return s.add(d.next),{unsubscribe:function(){s.delete(d.next)}}},stop:function(){o=!0,T(h)&&h()},toJSON:function(){return{id:n}},getSnapshot:function(){return c}},i[Q]=function(){return this},i);return this.children.set(n,f),f},e.prototype.spawnObservable=function(t,n){var i,r=this,o,a=t.subscribe(function(c){o=c,r.send(R(c,{origin:n}))},function(c){r.removeChild(n),r.send(R(ht(n,c),{origin:n}))},function(){r.removeChild(n),r.send(R(Et(n),{origin:n}))}),s=(i={id:n,send:function(){},subscribe:function(c,u,h){return t.subscribe(c,u,h)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:n}}},i[Q]=function(){return this},i);return this.children.set(n,s),s},e.prototype.spawnActor=function(t,n){return this.children.set(n,t),t},e.prototype.spawnActivity=function(t){var n=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(n){var i=n(this.state.context,t);this.spawnEffect(t.id,i)}},e.prototype.spawnEffect=function(t,n){var i;this.children.set(t,(i={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:n||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},i[Q]=function(){return this},i))},e.prototype.attachDev=function(){var t=Ht();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var n=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(p(p({name:this.id,autoPause:!0,stateSanitizer:function(i){return{value:i.value,context:i.context,actions:i.actions}}},n),{features:p({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}pn(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Q]=function(){return this},e.prototype.getSnapshot=function(){return this.status===D.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,n){return setTimeout(t,n)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=xe,e}();function xe(e,t){var n=new mn(e,t);return n}function _n(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function bt(e){return p(p({type:Dt},e),{toJSON:function(){e.onDone,e.onError;var t=Ut(e,["onDone","onError"]);return p(p({},t),{type:Dt,src:_n(e.src)})}})}var xt="",qt="#",It="*",G={},tt=function(e){return e[0]===qt},bn=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},xn=function(){function e(t,n,i,r){i===void 0&&(i="context"in t?t.context:void 0);var o=this,a;this.config=t,this._context=i,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(bn(),n),this.parent=r==null?void 0:r.parent,this.key=this.config.key||(r==null?void 0:r.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:ce),this.id=this.config.id||V([this.machine.key],O(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,this.initial=this.config.initial,this.states=this.config.states?ut(this.config.states,function(u,h){var f,l=new e(u,{},void 0,{parent:o,key:h});return Object.assign(o.idMap,p((f={},f[l.id]=l,f),l.idMap)),l}):G;var s=0;function c(u){var h,f;u.order=s++;try{for(var l=E(ge(u)),d=l.next();!d.done;d=l.next()){var y=d.value;c(y)}}catch(v){h={error:v}}finally{try{d&&!d.done&&(f=l.return)&&f.call(l)}finally{if(h)throw h.error}}}c(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var h=u.event;return h===xt}):xt in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=q(this.config.entry||this.config.onEntry).map(function(u){return vt(u)}),this.onExit=q(this.config.exit||this.config.onExit).map(function(u){return vt(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=q(this.config.invoke).map(function(u,h){var f,l;if(ot(u)){var d=mt(o.id,h);return o.machine.options.services=p((f={},f[d]=u,f),o.machine.options.services),bt({src:d,id:d})}else if(A(u.src)){var d=u.id||mt(o.id,h);return bt(p(p({},u),{id:d,src:u.src}))}else if(ot(u.src)||T(u.src)){var d=u.id||mt(o.id,h);return o.machine.options.services=p((l={},l[d]=u.src,l),o.machine.options.services),bt(p(p({id:d},u),{src:d}))}else{var y=u.src;return bt(p(p({id:mt(o.id,h)},u),{src:y}))}}),this.activities=q(this.config.activities).concat(this.invoke).map(function(u){return Qt(u)}),this.transition=this.transition.bind(this),this.tags=q(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||me(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,n){var i=this.options,r=i.actions,o=i.activities,a=i.guards,s=i.services,c=i.delays;return new e(this.config,{actions:p(p({},r),t.actions),activities:p(p({},o),t.activities),guards:p(p({},a),t.guards),services:p(p({},s),t.services),delays:p(p({},c),t.delays)},n??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return T(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:ut(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(n,i){return n[i.eventType]=n[i.eventType]||[],n[i.eventType].push(i),n},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var n=t===xt,i=this.transitions.filter(function(r){var o=r.eventType===t;return n?o:o||r.eventType===It});return this.__cache.candidates[t]=i,i},e.prototype.getDelayedTransitions=function(){var t=this,n=this.config.after;if(!n)return[];var i=function(o,a){var s=T(o)?"".concat(t.id,":delay[").concat(a,"]"):o,c=tn(s,t.id);return t.onEntry.push(Qe(c,{delay:o})),t.onExit.push(Ke(c)),c},r=at(n)?n.map(function(o,a){var s=i(o.delay,a);return p(p({},o),{event:s})}):I(Object.keys(n).map(function(o,a){var s=n[o],c=A(s)?{target:s}:s,u=isNaN(+o)?o:+o,h=i(u,a);return q(c).map(function(f){return p(p({},f),{event:h,delay:u})})}));return r.map(function(o){var a=o.delay;return p(p({},t.formatTransition(o)),{delay:a})})},e.prototype.getStateNodes=function(t){var n,i=this;if(!t)return[];var r=t instanceof F?t.value:dt(t,this.delimiter);if(A(r)){var o=this.getStateNode(r).initial;return o!==void 0?this.getStateNodes((n={},n[r]=o,n)):[this,this.states[r]]}var a=Object.keys(r),s=[this];return s.push.apply(s,V([],O(I(a.map(function(c){return i.getStateNode(c).getStateNodes(r[c])}))),!1)),s},e.prototype.handles=function(t){var n=ue(t);return this.events.includes(n)},e.prototype.resolveState=function(t){var n=t instanceof F?t:F.create(t),i=Array.from(lt([],this.getStateNodes(n.value)));return new F(p(p({},n),{value:this.resolve(n.value),configuration:i,done:Ot(i,this),tags:ne(i),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,n,i){var r=this.getStateNode(t),o=r.next(n,i);return!o||!o.transitions.length?this.next(n,i):o},e.prototype.transitionCompoundNode=function(t,n,i){var r=Object.keys(t),o=this.getStateNode(r[0]),a=o._transition(t[r[0]],n,i);return!a||!a.transitions.length?this.next(n,i):a},e.prototype.transitionParallelNode=function(t,n,i){var r,o,a={};try{for(var s=E(Object.keys(t)),c=s.next();!c.done;c=s.next()){var u=c.value,h=t[u];if(h){var f=this.getStateNode(u),l=f._transition(h,n,i);l&&(a[u]=l)}}}catch(g){r={error:g}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}var d=Object.keys(a).map(function(g){return a[g]}),y=I(d.map(function(g){return g.transitions})),v=d.some(function(g){return g.transitions.length>0});if(!v)return this.next(n,i);var _=I(Object.keys(a).map(function(g){return a[g].configuration}));return{transitions:y,exitSet:I(d.map(function(g){return g.exitSet})),configuration:_,source:n,actions:I(Object.keys(a).map(function(g){return a[g].actions}))}},e.prototype._transition=function(t,n,i){return A(t)?this.transitionLeafNode(t,n,i):Object.keys(t).length===1?this.transitionCompoundNode(t,n,i):this.transitionParallelNode(t,n,i)},e.prototype.getTransitionData=function(t,n){return this._transition(t.value,t,R(n))},e.prototype.next=function(t,n){var i,r,o=this,a=n.name,s=[],c=[],u;try{for(var h=E(this.getCandidates(a)),f=h.next();!f.done;f=h.next()){var l=f.value,d=l.cond,y=l.in,v=t.context,_=y?A(y)&&tt(y)?t.matches(dt(this.getStateNodeById(y).path,this.delimiter)):Xt(dt(y,this.delimiter),Ie(this.path.slice(0,-2))(t.value)):!0,g=!1;try{g=!d||de(this.machine,d,v,n,t)}catch(S){throw new Error("Unable to evaluate guard '".concat(d.name||d.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`': `).concat(S.message))}if(g&&_){l.target!==void 0&&(c=l.target),s.push.apply(s,V([],O(l.actions),!1)),u=l;break}}}catch(S){i={error:S}}finally{try{f&&!f.done&&(r=h.return)&&r.call(h)}finally{if(i)throw i.error}}if(u){if(!c.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var m=I(c.map(function(S){return o.getRelativeStateNodes(S,t.historyValue)})),b=!!u.internal;return{transitions:[u],exitSet:b?[]:I(c.map(function(S){return o.getPotentiallyReenteringNodes(S)})),configuration:m,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order0,d=l?t.configuration:n?n.configuration:[],y=Ot(d,this),v=l?sn(this.machine,f):void 0,_=n?n.historyValue?n.historyValue:t.source?this.machine.historyValue(n.value):void 0:void 0,g=this.getActions(new Set(d),y,t,i,o,n,r),m=n?p({},n.activities):{};try{for(var b=E(g),S=b.next();!S.done;S=b.next()){var N=S.value;try{for(var C=(c=void 0,E(N.actions)),k=C.next();!k.done;k=C.next()){var L=k.value;L.type===Mt?m[L.activity.id||L.activity.type]=L:L.type===Ft&&(m[L.activity.id||L.activity.type]=!1)}}catch($){c={error:$}}finally{try{k&&!k.done&&(u=C.return)&&u.call(C)}finally{if(c)throw c.error}}}}catch($){a={error:$}}finally{try{S&&!S.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}var w=O(Nt(this,n,i,o,g,r,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),M=w[0],x=w[1],j=O(ze(M,Bt),2),z=j[0],B=j[1],st=M.filter(function($){var Z;return $.type===Mt&&((Z=$.activity)===null||Z===void 0?void 0:Z.type)===Dt}),gt=st.reduce(function($,Z){return $[Z.activity.id]=nn(Z.activity,h.machine,x,o),$},n?p({},n.children):{}),U=new F({value:v||n.value,context:x,_event:o,_sessionid:n?n._sessionid:null,historyValue:v?_?Be(_,v):void 0:n?n.historyValue:void 0,history:!v||t.source?n:void 0,actions:v?B:[],activities:v?m:n?n.activities:{},events:[],configuration:d,transitions:t.transitions,children:gt,done:y,tags:ne(d),machine:this}),W=i!==x;U.changed=o.name===se||W;var K=U.history;K&&delete K.history;var Wt=!y&&(this._transient||f.some(function($){return $._transient}));if(!l&&(!Wt||o.name===xt))return U;var J=U;if(!y)for(Wt&&(J=this.resolveRaisedTransition(J,{type:Ne},o,r));z.length;){var Se=z.shift();J=this.resolveRaisedTransition(J,Se._event,o,r)}var we=J.changed||(K?!!J.actions.length||W||typeof K.value!=typeof J.value||!be(J.value,K.value):void 0);return J.changed=we,J.history=K,J},e.prototype.getStateNode=function(t){if(tt(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var n=this.states[t];if(!n)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return n},e.prototype.getStateNodeById=function(t){var n=tt(t)?t.slice(qt.length):t;if(n===this.id)return this;var i=this.machine.idMap[n];if(!i)throw new Error("Child state node '#".concat(n,"' does not exist on machine '").concat(this.id,"'"));return i},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&tt(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var n=zt(t,this.delimiter).slice(),i=this;n.length;){var r=n.shift();if(!r.length)break;i=i.getStateNode(r)}return i},e.prototype.resolve=function(t){var n,i=this;if(!t)return this.initialStateValue||G;switch(this.type){case"parallel":return ut(this.initialStateValue,function(o,a){return o?i.getStateNode(a).resolve(t[a]||o):G});case"compound":if(A(t)){var r=this.getStateNode(t);return r.type==="parallel"||r.type==="compound"?(n={},n[t]=r.initialStateValue,n):t}return Object.keys(t).length?ut(t,function(o,a){return o?i.getStateNode(a).resolve(o):G}):this.initialStateValue||{};default:return t||G}},e.prototype.getResolvedPath=function(t){if(tt(t)){var n=this.machine.idMap[t.slice(qt.length)];if(!n)throw new Error("Unable to find state node '".concat(t,"'"));return n.path}return zt(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var n;if(this.type==="parallel")n=Gt(this.states,function(i){return i.initialStateValue||G},function(i){return i.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));n=jt(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else n={};return this.__cache.initialStateValue=n,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,n){this._init();var i=this.getStateNodes(t);return this.resolveTransition({configuration:i,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,n??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var n=this.config;A(n.target)?t=tt(n.target)?kt(this.machine.getStateNodeById(n.target).path.slice(this.path.length-1)):n.target:t=n.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,n,i){return i===void 0&&(i=!0),i?t.type==="history"?t.resolveHistory(n):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(jt(this))return[this];if(this.type==="compound"&&!this.initial)return[this];var n=St(this.initialStateValue);return I(n.map(function(i){return t.getFromRelativePath(i)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var n=O(t),i=n[0],r=n.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(i,"' from node with no states"));var o=this.getStateNode(i);if(o.type==="history")return o.resolveHistory();if(!this.states[i])throw new Error("Child state '".concat(i,"' does not exist on '").concat(this.id,"'"));return this.states[i].getFromRelativePath(r)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Gt(this.states,function(n,i){if(!t)return n.historyValue();var r=A(t)?void 0:t[i];return n.historyValue(r||n.initialStateValue)},function(n){return!n.history})}},e.prototype.resolveHistory=function(t){var n=this;if(this.type!=="history")return[this];var i=this.parent;if(!t){var r=this.target;return r?I(St(r).map(function(a){return i.getFromRelativePath(a)})):i.initialStateNodes}var o=Me(i.path,"states")(t).current;return A(o)?[i.getStateNode(o)]:I(St(o).map(function(a){return n.history==="deep"?i.getFromRelativePath(a):[i.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,n=I(Object.keys(this.states).map(function(i){return t.states[i].stateIds}));return[this.id].concat(n)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,n,i,r;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var s=E(Object.keys(o)),c=s.next();!c.done;c=s.next()){var u=c.value,h=o[u];if(h.states)try{for(var f=(i=void 0,E(h.events)),l=f.next();!l.done;l=f.next()){var d=l.value;a.add("".concat(d))}}catch(y){i={error:y}}finally{try{l&&!l.done&&(r=f.return)&&r.call(f)}finally{if(i)throw i.error}}}}catch(y){t={error:y}}finally{try{c&&!c.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(n){return!(!n.target&&!n.actions.length&&n.internal)}).map(function(n){return n.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var n=this;if(t!==void 0)return t.map(function(i){if(!A(i))return i;var r=i[0]===n.delimiter;if(r&&!n.parent)return n.getStateNodeByPath(i.slice(1));var o=r?n.key+i:i;if(n.parent)try{var a=n.parent.getStateNodeByPath(o);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(n.id,`': `).concat(s.message))}else return n.getStateNodeByPath(o)})},e.prototype.formatTransition=function(t){var n=this,i=Ue(t.target),r="internal"in t?t.internal:i?i.some(function(c){return A(c)&&c[0]===n.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(i),s=p(p({},t),{actions:H(q(t.actions)),cond:fe(t.cond,o),target:a,source:this,internal:r,eventType:t.event,toJSON:function(){return p(p({},s),{target:s.target?s.target.map(function(c){return"#".concat(c.id)}):void 0,source:"#".concat(n.id)})}});return s},e.prototype.formatTransitions=function(){var t,n,i=this,r;if(!this.config.on)r=[];else if(Array.isArray(this.config.on))r=this.config.on;else{var o=this.config.on,a=It,s=o[a],c=s===void 0?[]:s,u=Ut(o,[typeof a=="symbol"?a:a+""]);r=I(Object.keys(u).map(function(m){var b=Y(m,u[m]);return b}).concat(Y(It,c)))}var h=this.config.always?Y("",this.config.always):[],f=this.config.onDone?Y(String(_t(this.id)),this.config.onDone):[],l=I(this.invoke.map(function(m){var b=[];return m.onDone&&b.push.apply(b,V([],O(Y(String(Et(m.id)),m.onDone)),!1)),m.onError&&b.push.apply(b,V([],O(Y(String(ht(m.id)),m.onError)),!1)),b})),d=this.after,y=I(V(V(V(V([],O(f),!1),O(l),!1),O(r),!1),O(h),!1).map(function(m){return q(m).map(function(b){return i.formatTransition(b)})}));try{for(var v=E(d),_=v.next();!_.done;_=v.next()){var g=_.value;y.push(g)}}catch(m){t={error:m}}finally{try{_&&!_.done&&(n=v.return)&&n.call(v)}finally{if(t)throw t.error}}return y},e}();function Sn(e,t){return new xn(e,t)}var nt={click:"onClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",complete:"onComplete",after:"onAfter",enter:"onEnter",show:"onShow"};Object.values(nt);var wn=Object.keys(nt),kn=class{constructor(e,t){X(this,"activeStateId","");X(this,"_service");X(this,"_domListeners",new Map);X(this,"_domElement");X(this,"_playerListeners",new Map);X(this,"_player");X(this,"_machineSchemas",new Map);X(this,"_onShowPrevValue",0);this._player=t,this._machineSchemas=this._transformToXStateSchema(e),this._domElement=t.container}start(e){this.stop();let t=this._machineSchemas.get(e);if(typeof t>"u")throw Lt(`invalid state machine id ${e}`);this._service=xe(Sn(t)),this._addEventListeners(),this._service.start()}stop(){var e;this._removeEventListeners(),(e=this._service)==null||e.stop(),this._player.stop()}_removeEventListeners(){var e;this._requiresDomElement();for(let[t,n]of this._domListeners)t==="visibilityChange"&&this._player.stopPlayOnShow(),(e=this._domElement)==null||e.removeEventListener(t,n),this._domListeners.delete(t);for(let[t,n]of this._playerListeners)this._player.removeEventListener(t,n),this._playerListeners.delete(t)}_addEventListeners(){this._requiresDomElement();let e=n=>{this._service.send({type:n})},t=n=>{function i(){e(n)}return i};this._service.subscribe(n=>{var i;if(typeof n.changed>"u"||n.changed){this._removeEventListeners();for(let r of n.nextEvents)if(wn.filter(o=>o!=="complete"&&o!=="show").includes(r)){let o=t(r);this._domListeners.set(r,o),(i=this._domElement)==null||i.addEventListener(r,o,{once:!0})}else if(r==="complete"){let o=t(r);this._player.addEventListener(r,o),this._playerListeners.set(r,o)}else if(r==="show"){let o=t(r);this._player.addIntersectionObserver({callbackOnIntersect:a=>{a>0&&(a!==100&&this._onShowPrevValue!==a&&o(),this._onShowPrevValue=a)},threshold:[]}),this._domListeners.set("visibilityChange",o)}}})}subscribe(e){throw Lt(e.toString())}_transformToXStateSchema(e){var t,n,i;let r=new Map;for(let o of e){let a={},s={};if(s.id=o.descriptor.id,typeof o.descriptor.initial<"u"&&(s.initial=o.descriptor.initial),typeof o<"u"){let c=o.states;for(let u in c)if(typeof c[u]<"u"&&c[u]){let h=c[u],f=h.playbackSettings,l=Object.keys(h).filter(v=>v.startsWith("on")),d={},y={};for(let v of l)if(typeof h[v]<"u"){let _=h[v];if(v===nt.after){let g=_;y[g.ms]={target:(t=_==null?void 0:_.state)!=null?t:""}}else v===nt.enter?d[Kt(nt,v)]={target:(n=_==null?void 0:_.state)!=null?n:""}:d[Kt(nt,v)]={target:(i=_==null?void 0:_.state)!=null?i:""}}a[u]={entry:()=>{!this._player.getAnimationInstance()||h.animationId&&h.animationId!==this._player.currentAnimationId?this._player.play(h.animationId,()=>({...ke,...f})).then(()=>{this._updatePlaybackSettings(f)}).catch(v=>{Te(`State machine error: ${v.message}`)}):this._updatePlaybackSettings(f)},exit:()=>{typeof f.segments<"u"&&this._player.resetSegments(!1),typeof f.playOnScroll<"u"&&this._player.stopPlayOnScroll()},on:d,after:y,meta:f}}}s.states=a,r.set(s.id,s)}return r}_handlePlaySegments(e){if(typeof e.segments=="string")this._player.goToAndPlay(e.segments,!0);else{let[t,n]=e.segments,i=t;t!==0&&t===n&&(i=t-1),t===0&&t===n?this._player.goToAndPlay(t,!0):this._player.playSegments([i,n],!0)}}_handlePlayOnScroll(e){let t=e.playOnScroll;if(e.segments&&typeof e.segments!="string"){let n=e.segments;this._player.playOnScroll({threshold:t,segments:n})}else this._player.playOnScroll({threshold:t})}_updatePlaybackSettings(e){if(!this._player.getAnimationInstance())throw new Error("Unable to update playbackSettings. Animations is not rendered yet.");typeof e.autoplay<"u"&&(this._player.setAutoplay(e.autoplay),e.autoplay?this._player.play():this._player.pause()),typeof e.direction<"u"&&this._player.setDirection(e.direction),typeof e.intermission<"u"&&this._player.setIntermission(e.intermission),typeof e.loop<"u"&&this._player.setLoop(e.loop),typeof e.playMode<"u"&&this._player.setMode(e.playMode),typeof e.speed<"u"&&this._player.setSpeed(e.speed),typeof e.defaultTheme<"u"&&this._player.setDefaultTheme(e.defaultTheme),typeof e.playOnScroll<"u"&&this._handlePlayOnScroll(e),e.segments&&this._handlePlaySegments(e),e.autoplay||this._player.pause()}_requiresDomElement(){if(!this._domElement)throw Lt("Requires a DOM element to attach events.")}};/*! Bundled license information: diff --git a/assets/index-98cfabb9.js b/assets/index-39f61548.js similarity index 99% rename from assets/index-98cfabb9.js rename to assets/index-39f61548.js index 7dbd85c..bac5df6 100644 --- a/assets/index-98cfabb9.js +++ b/assets/index-39f61548.js @@ -87,4 +87,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xw(e){return tO(e)||nO(e)||Cw(e)||rO()}function iO(e){if(e.sheet)return e.sheet;for(var t=0;t0?Ze(to,--bt):0,qi--,Be===10&&(qi=1,Pu--),Be}function Mt(){return Be=bt2||da(Be)>3?"":" "}function gO(e,t){for(;--t&&Mt()&&!(Be<48||Be>102||Be>57&&Be<65||Be>70&&Be<97););return Oa(e,Ds()+(t<6&&Pn()==32&&Mt()==32))}function hd(e){for(;Mt();)switch(Be){case e:return bt;case 34:case 39:e!==34&&e!==39&&hd(Be);break;case 40:e===41&&hd(e);break;case 92:Mt();break}return bt}function yO(e,t){for(;Mt()&&e+Be!==47+10;)if(e+Be===42+42&&Pn()===47)break;return"/*"+Oa(t,bt-1)+"*"+ku(e===47?e:Mt())}function wO(e){for(;!da(Pn());)Mt();return Oa(e,bt)}function _O(e){return Mw(Fs("",null,null,null,[""],e=Iw(e),0,[0],e))}function Fs(e,t,n,r,i,o,a,s,l){for(var u=0,c=0,f=a,d=0,h=0,y=0,m=1,w=1,p=1,g=0,v="",_=i,b=o,E=r,C=v;w;)switch(y=g,g=Mt()){case 40:if(y!=108&&Ze(C,f-1)==58){pd(C+=se(Ts(g),"&","&\f"),"&\f")!=-1&&(p=-1);break}case 34:case 39:case 91:C+=Ts(g);break;case 9:case 10:case 13:case 32:C+=vO(y);break;case 92:C+=gO(Ds()-1,7);continue;case 47:switch(Pn()){case 42:case 47:ss(SO(yO(Mt(),Ds()),t,n),l);break;default:C+="/"}break;case 123*m:s[u++]=wn(C)*p;case 125*m:case 59:case 0:switch(g){case 0:case 125:w=0;case 59+c:p==-1&&(C=se(C,/\f/g,"")),h>0&&wn(C)-f&&ss(h>32?$v(C+";",r,n,f-1):$v(se(C," ","")+";",r,n,f-2),l);break;case 59:C+=";";default:if(ss(E=Fv(C,t,n,u,c,i,s,v,_=[],b=[],f),o),g===123)if(c===0)Fs(C,t,E,E,_,o,f,s,b);else switch(d===99&&Ze(C,3)===110?100:d){case 100:case 108:case 109:case 115:Fs(e,E,E,r&&ss(Fv(e,E,E,0,0,i,s,v,i,_=[],f),b),i,b,f,s,r?_:b);break;default:Fs(C,E,E,E,[""],b,0,s,b)}}u=c=h=0,m=p=1,v=C="",f=a;break;case 58:f=1+wn(C),h=y;default:if(m<1){if(g==123)--m;else if(g==125&&m++==0&&mO()==125)continue}switch(C+=ku(g),g*m){case 38:p=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(wn(C)-1)*p,p=1;break;case 64:Pn()===45&&(C+=Ts(Mt())),d=Pn(),c=f=wn(v=C+=wO(Ds())),g++;break;case 45:y===45&&wn(C)==2&&(m=0)}}return o}function Fv(e,t,n,r,i,o,a,s,l,u,c){for(var f=i-1,d=i===0?o:[""],h=Yp(d),y=0,m=0,w=0;y0?d[p]+" "+g:se(g,/&\f/g,d[p])))&&(l[w++]=v);return Iu(e,t,n,i===0?Gp:s,l,u,c)}function SO(e,t,n){return Iu(e,t,n,Ow,ku(hO()),fa(e,2,-2),0)}function $v(e,t,n,r){return Iu(e,t,n,Qp,fa(e,0,r),fa(e,r+1,-1),r)}function Li(e,t){for(var n="",r=Yp(e),i=0;i6)switch(Ze(e,t+1)){case 109:if(Ze(e,t+4)!==45)break;case 102:return se(e,/(.+:)(.+)-([^]+)/,"$1"+oe+"$2-$3$1"+kl+(Ze(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~pd(e,"stretch")?Lw(se(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ze(e,t+1)!==115)break;case 6444:switch(Ze(e,wn(e)-3-(~pd(e,"!important")&&10))){case 107:return se(e,":",":"+oe)+e;case 101:return se(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+oe+(Ze(e,14)===45?"inline-":"")+"box$3$1"+oe+"$2$3$1"+it+"$2box$3")+e}break;case 5936:switch(Ze(e,t+11)){case 114:return oe+e+it+se(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return oe+e+it+se(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return oe+e+it+se(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return oe+e+it+e+e}return e}var MO=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Qp:t.return=Lw(t.value,t.length);break;case Aw:return Li([po(t,{value:se(t.value,"@","@"+oe)})],i);case Gp:if(t.length)return pO(t.props,function(o){switch(dO(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Li([po(t,{props:[se(o,/:(read-\w+)/,":"+kl+"$1")]})],i);case"::placeholder":return Li([po(t,{props:[se(o,/:(plac\w+)/,":"+oe+"input-$1")]}),po(t,{props:[se(o,/:(plac\w+)/,":"+kl+"$1")]}),po(t,{props:[se(o,/:(plac\w+)/,it+"input-$1")]})],i)}return""})}},LO=[MO],DO=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(m){var w=m.getAttribute("data-emotion");w.indexOf(" ")!==-1&&(document.head.appendChild(m),m.setAttribute("data-s",""))})}var i=t.stylisPlugins||LO,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(m){for(var w=m.getAttribute("data-emotion").split(" "),p=1;p=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jO={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},NO=/[A-Z]|^ms/g,zO=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Tw=function(t){return t.charCodeAt(1)===45},jv=function(t){return t!=null&&typeof t!="boolean"},Fc=xO(function(e){return Tw(e)?e:e.replace(NO,"-$&").toLowerCase()}),Nv=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(zO,function(r,i,o){return _n={name:i,styles:o,next:_n},i})}return jO[t]!==1&&!Tw(t)&&typeof n=="number"&&n!==0?n+"px":n};function pa(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return _n={name:n.name,styles:n.styles,next:_n},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)_n={name:r.name,styles:r.styles,next:_n},r=r.next;var i=n.styles+";";return i}return VO(e,t,n)}case"function":{if(e!==void 0){var o=_n,a=n(e);return _n=o,pa(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function VO(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i({x:e,y:e});function t5(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Rw(e){return Nw(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function jw(e){var t;return(t=(Nw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Nw(e){return e instanceof Node||e instanceof fn(e).Node}function vd(e){return e instanceof Element||e instanceof fn(e).Element}function Zp(e){return e instanceof HTMLElement||e instanceof fn(e).HTMLElement}function Vv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}function zw(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=eh(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function n5(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function r5(e){return["html","body","#document"].includes(Rw(e))}function eh(e){return fn(e).getComputedStyle(e)}function i5(e){if(Rw(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vv(e)&&e.host||jw(e);return Vv(t)?t.host:t}function Vw(e){const t=i5(e);return r5(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zp(t)&&zw(t)?t:Vw(t)}function gd(e,t){var n;t===void 0&&(t=[]);const r=Vw(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=fn(r);return i?t.concat(o,o.visualViewport||[],zw(r)?r:[]):t.concat(r,gd(r))}function o5(e){const t=eh(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zp(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=Pl(n)!==o||Pl(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function th(e){return vd(e)?e:e.contextElement}function $c(e){const t=th(e);if(!Zp(t))return Il(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=o5(t);let a=(o?Pl(n.width):n.width)/r,s=(o?Pl(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const a5=Il(0);function s5(e){const t=fn(e);return!n5()||!t.visualViewport?a5:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function l5(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Bv(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=th(e);let a=Il(1);t&&(r?vd(r)&&(a=$c(r)):a=$c(e));const s=l5(o,n,r)?s5(o):Il(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const d=fn(o),h=r&&vd(r)?fn(r):r;let y=d.frameElement;for(;y&&r&&h!==d;){const m=$c(y),w=y.getBoundingClientRect(),p=eh(y),g=w.left+(y.clientLeft+parseFloat(p.paddingLeft))*m.x,v=w.top+(y.clientTop+parseFloat(p.paddingTop))*m.y;l*=m.x,u*=m.y,c*=m.x,f*=m.y,l+=g,u+=v,y=fn(y).frameElement}}return t5({width:c,height:f,x:l,y:u})}function u5(e,t){let n=null,r;const i=jw(e);function o(){clearTimeout(r),n&&n.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const h=ls(c),y=ls(i.clientWidth-(u+f)),m=ls(i.clientHeight-(c+d)),w=ls(u),g={rootMargin:-h+"px "+-y+"px "+-m+"px "+-w+"px",threshold:e5(0,ZO(1,l))||1};let v=!0;function _(b){const E=b[0].intersectionRatio;if(E!==l){if(!v)return a();E?a(!1,E):r=setTimeout(()=>{a(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(_,{...g,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,g)}n.observe(e)}return a(!0),o}function c5(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=th(e),c=i||o?[...u?gd(u):[],...gd(t)]:[];c.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),o&&p.addEventListener("resize",n)});const f=u&&s?u5(u,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(p=>{let[g]=p;g&&g.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,m=l?Bv(e):null;l&&w();function w(){const p=Bv(e);m&&(p.x!==m.x||p.y!==m.y||p.width!==m.width||p.height!==m.height)&&n(),m=p,y=requestAnimationFrame(w)}return n(),()=>{c.forEach(p=>{i&&p.removeEventListener("scroll",n),o&&p.removeEventListener("resize",n)}),f&&f(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(y)}}var yd=S.useLayoutEffect,f5=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Ml=function(){};function d5(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function p5(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i-1}function h5(e){return Mu(e)?window.innerHeight:e.clientHeight}function Uw(e){return Mu(e)?window.pageYOffset:e.scrollTop}function Ll(e,t){if(Mu(e)){window.scrollTo(0,t);return}e.scrollTop=t}function m5(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function v5(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function us(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Ml,i=Uw(e),o=t-i,a=10,s=0;function l(){s+=a;var u=v5(s,i,o,n);Ll(e,u),sn.bottom?Ll(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i1?n-1:0),i=1;i=y)return{placement:"bottom",maxHeight:t};if(O>=y&&!a)return o&&us(l,k,z),{placement:"bottom",maxHeight:t};if(!a&&O>=r||a&&C>=r){o&&us(l,k,z);var W=a?C-_:O-_;return{placement:"bottom",maxHeight:W}}if(i==="auto"||a){var $=t,M=a?E:x;return M>=r&&($=Math.min(M-_-s,t)),{placement:"top",maxHeight:$}}if(i==="bottom")return o&&Ll(l,k),{placement:"bottom",maxHeight:t};break;case"top":if(E>=y)return{placement:"top",maxHeight:t};if(x>=y&&!a)return o&&us(l,T,z),{placement:"top",maxHeight:t};if(!a&&x>=r||a&&E>=r){var D=t;return(!a&&x>=r||a&&E>=r)&&(D=a?E-b:x-b),o&&us(l,T,z),{placement:"top",maxHeight:D}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return u}function A5(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var Ww=function(t){return t==="auto"?"bottom":t},k5=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,l=o.colors;return Q((r={label:"menu"},Co(r,A5(i),"100%"),Co(r,"position","absolute"),Co(r,"width","100%"),Co(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},qw=S.createContext(null),P5=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,u=S.useContext(qw)||{},c=u.setPortalPlacement,f=S.useRef(null),d=S.useState(i),h=Vn(d,2),y=h[0],m=h[1],w=S.useState(null),p=Vn(w,2),g=p[0],v=p[1],_=l.spacing.controlHeight;return yd(function(){var b=f.current;if(b){var E=a==="fixed",C=s&&!E,x=O5({maxHeight:i,menuEl:b,minHeight:r,placement:o,shouldScroll:C,isFixedPosition:E,controlHeight:_});m(x.maxHeight),v(x.placement),c==null||c(x.placement)}},[i,o,a,s,r,c,_]),n({ref:f,placerProps:Q(Q({},t),{},{placement:g||Ww(o),maxHeight:y})})},I5=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return J("div",X({},Fe(t,"menu",{menu:!0}),{ref:r},i),n)},M5=I5,L5=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Q({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},D5=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return J("div",X({},Fe(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},Kw=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Q({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},T5=Kw,F5=Kw,$5=function(t){var n=t.children,r=n===void 0?"No options":n,i=t.innerProps,o=Qn(t,C5);return J("div",X({},Fe(Q(Q({},o),{},{children:r,innerProps:i}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),i),r)},R5=function(t){var n=t.children,r=n===void 0?"Loading...":n,i=t.innerProps,o=Qn(t,x5);return J("div",X({},Fe(Q(Q({},o),{},{children:r,innerProps:i}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),i),r)},j5=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},N5=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,l=S.useRef(null),u=S.useRef(null),c=S.useState(Ww(a)),f=Vn(c,2),d=f[0],h=f[1],y=S.useMemo(function(){return{setPortalPlacement:h}},[]),m=S.useState(null),w=Vn(m,2),p=w[0],g=w[1],v=S.useCallback(function(){if(i){var C=g5(i),x=s==="fixed"?0:window.pageYOffset,O=C[d]+x;(O!==(p==null?void 0:p.offset)||C.left!==(p==null?void 0:p.rect.left)||C.width!==(p==null?void 0:p.rect.width))&&g({offset:O,rect:C})}},[i,s,d,p==null?void 0:p.offset,p==null?void 0:p.rect.left,p==null?void 0:p.rect.width]);yd(function(){v()},[v]);var _=S.useCallback(function(){typeof u.current=="function"&&(u.current(),u.current=null),i&&l.current&&(u.current=c5(i,l.current,v,{elementResize:"ResizeObserver"in window}))},[i,v]);yd(function(){_()},[_]);var b=S.useCallback(function(C){l.current=C,_()},[_]);if(!n&&s!=="fixed"||!p)return null;var E=J("div",X({ref:b},Fe(Q(Q({},t),{},{offset:p.offset,position:s,rect:p.rect}),"menuPortal",{"menu-portal":!0}),o),r);return J(qw.Provider,{value:y},n?Sp.createPortal(E,n):E)},z5=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},V5=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return J("div",X({},Fe(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},B5=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return Q({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},U5=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return J("div",X({},Fe(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},H5=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},W5=function(t){var n=t.children,r=t.innerProps;return J("div",X({},Fe(t,"indicatorsContainer",{indicators:!0}),r),n)},qv,q5=["size"],K5=["innerProps","isRtl","size"],G5={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Gw=function(t){var n=t.size,r=Qn(t,q5);return J("svg",X({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:G5},r))},nh=function(t){return J(Gw,X({size:20},t),J("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Qw=function(t){return J(Gw,X({size:20},t),J("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Yw=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Q({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},Q5=Yw,Y5=function(t){var n=t.children,r=t.innerProps;return J("div",X({},Fe(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||J(Qw,null))},J5=Yw,X5=function(t){var n=t.children,r=t.innerProps;return J("div",X({},Fe(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||J(nh,null))},Z5=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Q({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},eA=function(t){var n=t.innerProps;return J("span",X({},n,Fe(t,"indicatorSeparator",{"indicator-separator":!0})))},tA=JO(qv||(qv=XO([` 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } -`]))),nA=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return Q({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},Rc=function(t){var n=t.delay,r=t.offset;return J("span",{css:Xp({animation:"".concat(tA," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},rA=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Qn(t,K5);return J("div",X({},Fe(Q(Q({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),J(Rc,{delay:0,offset:r}),J(Rc,{delay:160,offset:!0}),J(Rc,{delay:320,offset:!r}))},iA=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return Q({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},oA=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return J("div",X({ref:o},Fe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a),n)},aA=oA,sA=["data"],lA=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},uA=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,f=t.selectProps;return J("div",X({},Fe(t,"group",{group:!0}),l),J(a,X({},s,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),J("div",null,n))},cA=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Q({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},fA=function(t){var n=Bw(t);n.data;var r=Qn(n,sA);return J("div",X({},Fe(t,"groupHeading",{"group-heading":!0}),r))},dA=uA,pA=["innerRef","isDisabled","isHidden","inputClassName"],hA=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return Q(Q({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},mA),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Jw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mA={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Q({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Jw)},vA=function(t){return Q({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Jw)},gA=function(t){var n=t.cx,r=t.value,i=Bw(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Qn(i,pA);return J("div",X({},Fe(t,"input",{"input-container":!0}),{"data-value":r||""}),J("input",X({className:n({input:!0},l),ref:o,style:vA(s),disabled:a},u)))},yA=gA,wA=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return Q({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},_A=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return Q({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},SA=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return Q({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Xw=function(t){var n=t.children,r=t.innerProps;return J("div",r,n)},bA=Xw,EA=Xw;function CA(e){var t=e.children,n=e.innerProps;return J("div",X({role:"button"},n),t||J(nh,{size:14}))}var xA=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,f=r.Remove;return J(u,{data:i,innerProps:Q(Q({},Fe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},J(c,{data:i,innerProps:Q({},Fe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),J(f,{data:i,innerProps:Q(Q({},Fe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},OA=xA,AA=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return Q({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},kA=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return J("div",X({},Fe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},PA=kA,IA=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Q({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},MA=function(t){var n=t.children,r=t.innerProps;return J("div",X({},Fe(t,"placeholder",{placeholder:!0}),r),n)},LA=MA,DA=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return Q({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},TA=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return J("div",X({},Fe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},FA=TA,$A={ClearIndicator:X5,Control:aA,DropdownIndicator:Y5,DownChevron:Qw,CrossIcon:nh,Group:dA,GroupHeading:fA,IndicatorsContainer:W5,IndicatorSeparator:eA,Input:yA,LoadingIndicator:rA,Menu:M5,MenuList:D5,MenuPortal:N5,LoadingMessage:R5,NoOptionsMessage:$5,MultiValue:OA,MultiValueContainer:bA,MultiValueLabel:EA,MultiValueRemove:CA,Option:PA,Placeholder:LA,SelectContainer:V5,SingleValue:FA,ValueContainer:U5},RA=function(t){return Q(Q({},$A),t.components)},Kv=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function jA(e,t){return!!(e===t||Kv(e)&&Kv(t))}function NA(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=function(y,m){return y&&y.length?"".concat(y.indexOf(m)+1," of ").concat(y.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if(n==="menu"){var f=l?" disabled":"",d="".concat(u?"selected":"focused").concat(f);return"option ".concat(a," ").concat(d,", ").concat(c(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},HA=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=l.ariaLiveMessages,f=l.getOptionLabel,d=l.inputValue,h=l.isMulti,y=l.isOptionDisabled,m=l.isSearchable,w=l.menuIsOpen,p=l.options,g=l.screenReaderStatus,v=l.tabSelectsValue,_=l["aria-label"],b=l["aria-live"],E=S.useMemo(function(){return Q(Q({},UA),c||{})},[c]),C=S.useMemo(function(){var $="";if(n&&E.onChange){var M=n.option,D=n.options,F=n.removedValue,A=n.removedValues,I=n.value,N=function(ee){return Array.isArray(ee)?null:ee},j=F||M||N(I),B=j?f(j):"",L=D||A||void 0,V=L?L.map(f):[],H=Q({isDisabled:j&&y(j,s),label:B,labels:V},n);$=E.onChange(H)}return $},[n,E,y,s,f]),x=S.useMemo(function(){var $="",M=r||i,D=!!(r&&s&&s.includes(r));if(M&&E.onFocus){var F={focused:M,label:f(M),isDisabled:y(M,s),isSelected:D,options:o,context:M===r?"menu":"value",selectValue:s};$=E.onFocus(F)}return $},[r,i,f,y,E,o,s]),O=S.useMemo(function(){var $="";if(w&&p.length&&E.onFilter){var M=g({count:o.length});$=E.onFilter({inputValue:d,resultsMessage:M})}return $},[o,d,w,E,p,g]),k=S.useMemo(function(){var $="";if(E.guidance){var M=i?"value":w?"menu":"input";$=E.guidance({"aria-label":_,context:M,isDisabled:r&&y(r,s),isMulti:h,isSearchable:m,tabSelectsValue:v})}return $},[_,r,i,h,y,m,w,E,s,v]),T="".concat(x," ").concat(O," ").concat(k),z=J(S.Fragment,null,J("span",{id:"aria-selection"},C),J("span",{id:"aria-context"},T)),W=(n==null?void 0:n.action)==="initial-input-focus";return J(S.Fragment,null,J(Gv,{id:u},W&&z),J(Gv,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text"},a&&!W&&z))},WA=HA,wd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],qA=new RegExp("["+wd.map(function(e){return e.letters}).join("")+"]","g"),Zw={};for(var jc=0;jc-1}},YA=["innerRef"];function JA(e){var t=e.innerRef,n=Qn(e,YA),r=E5(n,"onExited","in","enter","exit","appear");return J("input",X({ref:t},r,{css:Xp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var XA=function(t){t.preventDefault(),t.stopPropagation()};function ZA(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=S.useRef(!1),s=S.useRef(!1),l=S.useRef(0),u=S.useRef(null),c=S.useCallback(function(w,p){if(u.current!==null){var g=u.current,v=g.scrollTop,_=g.scrollHeight,b=g.clientHeight,E=u.current,C=p>0,x=_-b-v,O=!1;x>p&&a.current&&(r&&r(w),a.current=!1),C&&s.current&&(o&&o(w),s.current=!1),C&&p>x?(n&&!a.current&&n(w),E.scrollTop=_,O=!0,a.current=!0):!C&&-p>v&&(i&&!s.current&&i(w),E.scrollTop=0,O=!0,s.current=!0),O&&XA(w)}},[n,r,i,o]),f=S.useCallback(function(w){c(w,w.deltaY)},[c]),d=S.useCallback(function(w){l.current=w.changedTouches[0].clientY},[]),h=S.useCallback(function(w){var p=l.current-w.changedTouches[0].clientY;c(w,p)},[c]),y=S.useCallback(function(w){if(w){var p=_5?{passive:!1}:!1;w.addEventListener("wheel",f,p),w.addEventListener("touchstart",d,p),w.addEventListener("touchmove",h,p)}},[h,d,f]),m=S.useCallback(function(w){w&&(w.removeEventListener("wheel",f,!1),w.removeEventListener("touchstart",d,!1),w.removeEventListener("touchmove",h,!1))},[h,d,f]);return S.useEffect(function(){if(t){var w=u.current;return y(w),function(){m(w)}}},[t,y,m]),function(w){u.current=w}}var Yv=["boxSizing","height","overflow","paddingRight","position"],Jv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Xv(e){e.preventDefault()}function Zv(e){e.stopPropagation()}function e0(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function t0(){return"ontouchstart"in window||navigator.maxTouchPoints}var n0=!!(typeof window<"u"&&window.document&&window.document.createElement),ho=0,ai={capture:!1,passive:!1};function ek(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=S.useRef({}),o=S.useRef(null),a=S.useCallback(function(l){if(n0){var u=document.body,c=u&&u.style;if(r&&Yv.forEach(function(y){var m=c&&c[y];i.current[y]=m}),r&&ho<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Jv).forEach(function(y){var m=Jv[y];c&&(c[y]=m)}),c&&(c.paddingRight="".concat(h,"px"))}u&&t0()&&(u.addEventListener("touchmove",Xv,ai),l&&(l.addEventListener("touchstart",e0,ai),l.addEventListener("touchmove",Zv,ai))),ho+=1}},[r]),s=S.useCallback(function(l){if(n0){var u=document.body,c=u&&u.style;ho=Math.max(ho-1,0),r&&ho<1&&Yv.forEach(function(f){var d=i.current[f];c&&(c[f]=d)}),u&&t0()&&(u.removeEventListener("touchmove",Xv,ai),l&&(l.removeEventListener("touchstart",e0,ai),l.removeEventListener("touchmove",Zv,ai)))}},[r]);return S.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var tk=function(){return document.activeElement&&document.activeElement.blur()},nk={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function rk(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=ZA({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),c=ek({isEnabled:n}),f=function(h){u(h),c(h)};return J(S.Fragment,null,n&&J("div",{onClick:tk,css:nk}),t(f))}var ik={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ok=function(t){var n=t.name,r=t.onFocus;return J("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:ik,value:"",onChange:function(){}})},ak=ok,sk=function(t){return t.label},lk=function(t){return t.label},uk=function(t){return t.value},ck=function(t){return!!t.isDisabled},fk={clearIndicator:J5,container:z5,control:iA,dropdownIndicator:Q5,group:lA,groupHeading:cA,indicatorsContainer:H5,indicatorSeparator:Z5,input:hA,loadingIndicator:nA,loadingMessage:F5,menu:k5,menuList:L5,menuPortal:j5,multiValue:wA,multiValueLabel:_A,multiValueRemove:SA,noOptionsMessage:T5,option:AA,placeholder:IA,singleValue:DA,valueContainer:B5},dk={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},pk=4,t2=4,hk=38,mk=t2*2,vk={baseUnit:t2,controlHeight:hk,menuGutter:mk},Vc={borderRadius:pk,colors:dk,spacing:vk},gk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wv(),captureMenuScroll:!Wv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:QA(),formatGroupLabel:sk,getOptionLabel:lk,getOptionValue:uk,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ck,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!y5(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function r0(e,t,n,r){var i=o2(e,t,n),o=a2(e,t,n),a=i2(e,t),s=Dl(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function n2(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return r0(e,a,t,s)}).filter(function(a){return i0(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=r0(e,n,t,r);return i0(e,o)?o:void 0}).filter(S5)}function r2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,xw(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function yk(e,t){return r2(n2(e,t))}function i0(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!l2(e)||!o)&&s2(e,{label:a,value:s,data:i},r)}function wk(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i-1?n:t[0]}var i2=function(t,n){return t.getOptionLabel(n)},Dl=function(t,n){return t.getOptionValue(n)};function o2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function a2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Dl(e,t);return n.some(function(i){return Dl(e,i)===r})}function s2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var l2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Sk=1,u2=function(e){Y6(n,e);var t=eO(n);function n(r){var i;if(G6(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,l){var u=i.props,c=u.onChange,f=u.name;l.name=f,i.ariaOnChange(s,l),c(s,l)},i.setValue=function(s,l,u){var c=i.props,f=c.closeMenuOnSelect,d=c.isMulti,h=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),f&&(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:l,option:u})},i.selectOption=function(s){var l=i.props,u=l.blurInputOnSelect,c=l.isMulti,f=l.name,d=i.state.selectValue,h=c&&i.isOptionSelected(s,d),y=i.isOptionDisabled(s,d);if(h){var m=i.getOptionValue(s);i.setValue(d.filter(function(w){return i.getOptionValue(w)!==m}),"deselect-option",s)}else if(!y)c?i.setValue([].concat(xw(d),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:f});return}u&&i.blurInput()},i.removeValue=function(s){var l=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(s),f=u.filter(function(h){return i.getOptionValue(h)!==c}),d=fs(l,f,f[0]||null);i.onChange(d,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(fs(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,l=i.state.selectValue,u=l[l.length-1],c=l.slice(0,l.length-1),f=fs(s,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,l=new Array(s),u=0;ud||f>d}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var l=i.props.inputValue,u=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:l}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var l=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:l}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){i.blockOptionHover||i.state.focusedOption===s||i.setState({focusedOption:s})},i.shouldHideSelectedOptions=function(){return l2(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var l=i.props,u=l.isMulti,c=l.backspaceRemovesValue,f=l.escapeClearsValue,d=l.inputValue,h=l.isClearable,y=l.isDisabled,m=l.menuIsOpen,w=l.onKeyDown,p=l.tabSelectsValue,g=l.openMenuOnFocus,v=i.state,_=v.focusedOption,b=v.focusedValue,E=v.selectValue;if(!y&&!(typeof w=="function"&&(w(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!u||d)return;i.focusValue("previous");break;case"ArrowRight":if(!u||d)return;i.focusValue("next");break;case"Delete":case"Backspace":if(d)return;if(b)i.removeValue(b);else{if(!c)return;u?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!m||!p||!_||g&&i.isOptionSelected(_,E))return;i.selectOption(_);break;case"Enter":if(s.keyCode===229)break;if(m){if(!_||i.isComposing)return;i.selectOption(_);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:d}),i.onMenuClose()):h&&f&&i.clearValue();break;case" ":if(d)return;if(!m){i.openMenu("first");break}if(!_)return;i.selectOption(_);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++Sk),i.state.selectValue=Uv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[a]}return i}return Q6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Hv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Hv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,c=-1;if(a.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Vc):Q(Q({},Vc),this.props.theme):Vc}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,y=f.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:m,isMulti:d,isRtl:h,options:y,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return o2(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return a2(this.props,i,o)}},{key:"filterOption",value:function(i,o){return s2(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),y=h.Input,m=this.state,w=m.inputIsHidden,p=m.ariaSelection,g=this.commonProps,v=s||this.getElementId("input"),_=Q(Q(Q({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?S.createElement(y,X({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:o,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},_)):S.createElement(JA,X({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ml,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},_))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,y=h.controlShouldRenderValue,m=h.isDisabled,w=h.isMulti,p=h.inputValue,g=h.placeholder,v=this.state,_=v.selectValue,b=v.focusedValue,E=v.isFocused;if(!this.hasValue()||!y)return p?null:S.createElement(f,X({},d,{key:"placeholder",isDisabled:m,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),g);if(w)return _.map(function(x,O){var k=x===b,T="".concat(i.getOptionLabel(x),"-").concat(i.getOptionValue(x));return S.createElement(a,X({},d,{components:{Container:s,Label:l,Remove:u},isFocused:k,isDisabled:m,key:T,index:O,removeProps:{onClick:function(){return i.removeValue(x)},onTouchEnd:function(){return i.removeValue(x)},onMouseDown:function(W){W.preventDefault()}},data:x}),i.formatOptionLabel(x,"value"))});if(p)return null;var C=_[0];return S.createElement(c,X({},d,{data:C,isDisabled:m}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:f,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return S.createElement(a,X({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,y=this.commonProps,m=this.state.focusedOption,w=this.props,p=w.captureMenuScroll,g=w.inputValue,v=w.isLoading,_=w.loadingMessage,b=w.minMenuHeight,E=w.maxMenuHeight,C=w.menuIsOpen,x=w.menuPlacement,O=w.menuPosition,k=w.menuPortalTarget,T=w.menuShouldBlockScroll,z=w.menuShouldScrollIntoView,W=w.noOptionsMessage,$=w.onMenuScrollToTop,M=w.onMenuScrollToBottom;if(!C)return null;var D=function(L,V){var H=L.type,q=L.data,ee=L.isDisabled,ce=L.isSelected,ge=L.label,Ce=L.value,he=m===q,ye=ee?void 0:function(){return i.onOptionHover(q)},$e=ee?void 0:function(){return i.selectOption(q)},Ct="".concat(i.getElementId("option"),"-").concat(V),La={id:Ct,onClick:$e,onMouseMove:ye,onMouseOver:ye,tabIndex:-1};return S.createElement(h,X({},y,{innerProps:La,data:q,isDisabled:ee,isSelected:ce,key:Ct,label:ge,type:H,value:Ce,isFocused:he,innerRef:he?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(L.data,"menu"))},F;if(this.hasOptions())F=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var L=B.data,V=B.options,H=B.index,q="".concat(i.getElementId("group"),"-").concat(H),ee="".concat(q,"-heading");return S.createElement(a,X({},y,{key:q,data:L,options:V,Heading:s,headingProps:{id:ee,data:B.data},label:i.formatGroupLabel(B.data)}),B.options.map(function(ce){return D(ce,"".concat(H,"-").concat(ce.index))}))}else if(B.type==="option")return D(B,"".concat(B.index))});else if(v){var A=_({inputValue:g});if(A===null)return null;F=S.createElement(f,y,A)}else{var I=W({inputValue:g});if(I===null)return null;F=S.createElement(d,y,I)}var N={minMenuHeight:b,maxMenuHeight:E,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:z},j=S.createElement(P5,X({},y,N),function(B){var L=B.ref,V=B.placerProps,H=V.placement,q=V.maxHeight;return S.createElement(l,X({},y,N,{innerRef:L,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:v,placement:H}),S.createElement(rk,{captureEnabled:p,onTopArrive:$,onBottomArrive:M,lockEnabled:T},function(ee){return S.createElement(u,X({},y,{innerRef:function(ge){i.getMenuListRef(ge),ee(ge)},isLoading:v,maxHeight:q,focusedOption:m}),F)}))});return k||O==="fixed"?S.createElement(c,X({},y,{appendTo:k,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),j):j}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!s)return S.createElement(ak,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var d=f.map(function(m){return i.getOptionValue(m)}).join(a);return S.createElement("input",{name:u,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(m,w){return S.createElement("input",{key:"i-".concat(w),name:u,type:"hidden",value:i.getOptionValue(m)})}):S.createElement("input",{name:u,type:"hidden",value:""});return S.createElement("div",null,h)}else{var y=f[0]?this.getOptionValue(f[0]):"";return S.createElement("input",{name:u,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return S.createElement(WA,X({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,f=u.id,d=u.isDisabled,h=u.menuIsOpen,y=this.state.isFocused,m=this.commonProps=this.getCommonProps();return S.createElement(s,X({},m,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:y}),this.renderLiveRegion(),S.createElement(o,X({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:y,menuIsOpen:h}),S.createElement(l,X({},m,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),S.createElement(a,X({},m,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,d=i.options,h=i.value,y=i.menuIsOpen,m=i.inputValue,w=i.isMulti,p=Uv(h),g={};if(a&&(h!==a.value||d!==a.options||y!==a.menuIsOpen||m!==a.inputValue)){var v=y?yk(i,p):[],_=s?wk(o,p):null,b=_k(o,v);g={selectValue:p,focusedOption:b,focusedValue:_,clearFocusValueOnUpdate:!1}}var E=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},C=u,x=c&&f;return c&&!x&&(C={value:fs(w,p,p[0]||null),options:p,action:"initial-input-focus"},x=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(C=null),Q(Q(Q({},g),E),{},{prevProps:i,ariaSelection:C,prevWasFocused:x})}}]),n}(S.Component);u2.defaultProps=gk;var bk=S.forwardRef(function(e,t){var n=K6(e);return S.createElement(u2,X({ref:t},n))}),Ek=bk;function Ck(e){return P.jsx(Ek,{classNames:{container:()=>"text-lg bg-white rounded text-gray-400",valueContainer:()=>"text-lg !text-gray-600 !py-1",singleValue:()=>"text-lg !text-gray-600 py-1",multiValue:()=>"text-lg !text-gray-600",menuList:()=>"text-lg !text-gray-600"},...e})}const ds=({label:e,multiple:t,onChange:n,options:r,value:i})=>{const o=S.useMemo(()=>{if(!i)return t?[]:void 0;const s=i.split(",");return t?r.filter(l=>s.includes(l.value)):r.find(l=>l.value===i)},[i,r,t]),a=S.useCallback(s=>{if(Array.isArray(s))n==null||n(s.map(l=>l.value).join(","));else{const l=s;n==null||n((l==null?void 0:l.value)||"")}},[n]);return P.jsxs("div",{className:"flex flex-col text-gray-400 w-full max-w-xs hover:text-white",children:[P.jsx("span",{className:"flex-1 text-lg text-left",children:e}),P.jsx(Ck,{value:o,isMulti:t,name:e,options:r,onChange:a})]})},xk=({onUpdate:e})=>{const{dotLottie:t,setAnimationOptions:n}=Kp(),r=Au(),i=Ne(d=>d.editor.animationOptions),o=Ne(d=>d.editor.animationId),a=Ne(d=>d.editor.updated),s=Ne(d=>d.themes.list),l=S.useMemo(()=>s.map(({name:d})=>({label:d,value:d})),[s]),u=S.useMemo(()=>{var h;const d=[{label:"None",value:""}];return typeof i.assignedThemes<"u"&&Array.isArray(i.assignedThemes)?d:d.concat(((h=i.assignedThemes)==null?void 0:h.split(",").map(y=>({label:y,value:y})))||[])},[i,o]);S.useEffect(()=>{if(o)return(async()=>{const d=await t.getAnimation(o);d&&r(Av({direction:d.direction,speed:d.speed,playMode:d.playMode,loop:d.loop,autoplay:d.autoplay,hover:d.hover,intermission:d.intermission,defaultTheme:d.defaultTheme,assignedThemes:d.themes.map(h=>h.id).join(",")||void 0,defaultActiveAnimation:d.defaultActiveAnimation}))})(),()=>{r(Av({}))}},[r,t,o]);const c=S.useCallback(d=>h=>{d==="assignedThemes"&&!String(h).split(",").includes(i.defaultTheme||"")&&r(Iv({defaultTheme:""})),r(Iv({[d]:h})),r(xl(!0))},[r,i]),f=S.useCallback(()=>{o&&(n(o,i),r(xl(!1)),e())},[o,i,n,r,e]);return P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[P.jsxs("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:["Animation: ",o]}),P.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:f,disabled:!a,children:P.jsx(Sy,{size:33})})]}),P.jsxs("div",{className:"p-8 flex-1 max-h-[calc(100vh-5.5rem)] overflow-y-auto custom-scrollbar",children:[P.jsx("div",{className:"text-white",children:"Playback options"}),P.jsx("ul",{children:Object.keys(i).map(d=>["loop","autoplay","hover"].includes(d)?P.jsx("li",{children:P.jsx(Dv,{label:d,value:i[d],onToggle:c(d)})},d):["playMode"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:d,value:i[d],options:[{label:"Normal",value:"normal"},{label:"Bounce",value:"bounce"}]})},d):["direction"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:d,value:String(i[d]),options:[{label:"Normal",value:"1"},{label:"Inverted",value:"-1"}]})},d):["speed","intermission"].includes(d)?P.jsx("li",{children:P.jsx(B6,{label:d,value:i[d],onChange:c(d)})},d):["defaultTheme"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:"defaultTheme",options:u||[],value:i[d]||""})},d):void 0)}),P.jsx("div",{className:"text-white mt-8",children:"Other options"}),P.jsxs("div",{children:[P.jsx(ds,{multiple:!0,onChange:c("assignedThemes"),label:"Assign Themes",value:i.assignedThemes,options:l}),P.jsx(Dv,{label:"Default ActiveAnimation",value:i.defaultActiveAnimation,onToggle:c("defaultActiveAnimation")})]})]})]})},Ok="modulepreload",Ak=function(e){return"/player-component/"+e},o0={},Tn=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Ak(o),o in o0)return;o0[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Ok,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};var a0={},kk=function(e,t,n,r,i){var o=new Worker(a0[t]||(a0[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var s=a.data,l=s.$e$;if(l){var u=new Error(l[0]);u.code=l[1],u.stack=l[2],i(u,null)}else i(null,s)},o.postMessage(n,r),o},ct=Uint8Array,Rr=Uint16Array,c2=Int32Array,rh=new ct([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ih=new ct([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),f2=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d2=function(e,t){for(var n=new Rr(31),r=0;r<31;++r)n[r]=t+=1<>1|(le&21845)<<1,Dn=(Dn&52428)>>2|(Dn&13107)<<2,Dn=(Dn&61680)>>4|(Dn&3855)<<4,Tl[le]=((Dn&65280)>>8|(Dn&255)<<8)>>1;var Dn,le,Di=function(e,t,n){for(var r=e.length,i=0,o=new Rr(t);i>l]=u}else for(s=new Rr(r),i=0;i>15-e[i]);return s},Aa=new ct(288);for(le=0;le<144;++le)Aa[le]=8;var le;for(le=144;le<256;++le)Aa[le]=9;var le;for(le=256;le<280;++le)Aa[le]=7;var le;for(le=280;le<288;++le)Aa[le]=8;var le,m2=new ct(32);for(le=0;le<32;++le)m2[le]=5;var le,v2=Di(Aa,9,1),g2=Di(m2,5,1),$s=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},zt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Rs=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},y2=function(e){return(e+7)/8|0},Lu=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new ct(e.subarray(t,n))},w2=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ut=function(e,t,n){var r=new Error(t||w2[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ut),!n)throw r;return r},_2=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new ct(0);var a=!n,s=a||t.i!=2,l=t.i;a&&(n=new ct(i*3));var u=function(he){var ye=n.length;if(he>ye){var $e=new ct(Math.max(ye*2,he));$e.set(n),n=$e}},c=t.f||0,f=t.p||0,d=t.b||0,h=t.l,y=t.d,m=t.m,w=t.n,p=i*8;do{if(!h){c=zt(e,f,1);var g=zt(e,f+1,3);if(f+=3,g)if(g==1)h=v2,y=g2,m=9,w=5;else if(g==2){var v=zt(e,f,31)+257,_=zt(e,f+10,15)+4,b=v+zt(e,f+5,31)+1;f+=14;for(var E=new ct(b),C=new ct(19),x=0;x<_;++x)C[f2[x]]=zt(e,f+x*3,7);f+=_*3;for(var O=$s(C),k=(1<>4;if(W<16)E[x++]=W;else{var $=0,M=0;for(W==16?(M=3+zt(e,f,3),f+=2,$=E[x-1]):W==17?(M=3+zt(e,f,7),f+=3):W==18&&(M=11+zt(e,f,127),f+=7);M--;)E[x++]=$}}var D=E.subarray(0,v),F=E.subarray(v);m=$s(D),w=$s(F),h=Di(D,m,1),y=Di(F,w,1)}else ut(1);else{var W=y2(f)+4,A=e[W-4]|e[W-3]<<8,I=W+A;if(I>i){l&&ut(0);break}s&&u(d+A),n.set(e.subarray(W,I),d),t.b=d+=A,t.p=f=I*8,t.f=c;continue}if(f>p){l&&ut(0);break}}s&&u(d+131072);for(var N=(1<>4;if(f+=$&15,f>p){l&&ut(0);break}if($||ut(2),L<256)n[d++]=L;else if(L==256){B=f,h=null;break}else{var V=L-254;if(L>264){var x=L-257,H=rh[x];V=zt(e,f,(1<>4;q||ut(3),f+=q&15;var F=h2[ee];if(ee>3){var H=ih[ee];F+=Rs(e,f)&(1<p){l&&ut(0);break}s&&u(d+131072);var ce=d+V;if(d>>0},Bc=function(e,t){return an(e,t)+an(e,t+4)*4294967296};function Rk(e,t,n){return n||(n=t,t={}),typeof n!="function"&&ut(7),$k(e,t,[Fk],function(r){return S2(ah(r.data[0],b2(r.data[1])))},1,n)}function ah(e,t){return _2(e,{i:2},t&&t.out,t&&t.dictionary)}var _d=typeof TextDecoder<"u"&&new TextDecoder,jk=0;try{_d.decode(Mk,{stream:!0}),jk=1}catch{}var Nk=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Lu(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function no(e,t){if(t){for(var n="",r=0;r65558)return a(ut(13,0,1),null),i;var l=En(e,s+8);if(l){var u=l,c=an(e,s+16),f=c==4294967295||u==65535;if(f){var d=an(e,s-12);f=an(e,d)==101075792,f&&(u=l=an(e,d+32),c=an(e,d+48))}for(var h=t&&t.filter,y=function(w){var p=Vk(e,c,f),g=p[0],v=p[1],_=p[2],b=p[3],E=p[4],C=p[5],x=zk(e,C);c=E;var O=function(T,z){T?(i(),a(T,null)):(z&&(o[b]=z),--l||a(null,o))};if(!h||h({name:b,size:v,originalSize:_,compression:g}))if(!g)O(null,Lu(e,x,x+v));else if(g==8){var k=e.subarray(x,x+v);if(v<32e4)try{O(null,ah(k,{out:new ct(_)}))}catch(T){O(T,null)}else r.push(Rk(k,{size:_},O))}else O(ut(14,"unknown compression type "+g,1),null);else O(null,null)},m=0;m{if(n.path){let r=n.path.map(({key:i})=>i).join(".");t.nested[r]=[...t.nested[r]||[],n.message]}else t.root=[...t.root||[],n.message];return t},{nested:{}})}var Wk=class extends Error{constructor(t){super(t[0].message);ne(this,"issues");this.name="ValiError",this.issues=t}};function qk(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}}function Kk(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}}function Or(e,t,n,r){if(!t||!t.length)return{output:e};let i,o,a=e;for(let s of t){let l=s(a);if(l.issue){i=i||Kk(n,r);let u=qk(i,l.issue);if(o?o.push(u):o=[u],i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?{issues:o}:{output:a}}function hn(e,t){return!e||typeof e=="string"?[e,t]:[void 0,e]}function Ln(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:r,input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}]}}function Gk(e=[]){return{schema:"any",async:!1,_parse(t,n){return Or(t,e,n,"any")}}}function jo(e,t,n){let[r,i]=hn(t,n);return{schema:"array",array:{item:e},async:!1,_parse(o,a){if(!Array.isArray(o))return Ln(a,"type","array",r||"Invalid type",o);let s,l=[];for(let u=0;us.length)return Ln(l,"type","tuple",o||"Invalid type",s);let u,c=[];for(let f=0;f({...o,...a.object}),{}),r,i)}function e8(e,t,n,r){let[i,o]=hn(n,r);return Xt(Object.entries(e.object).reduce((a,[s,l])=>t.includes(s)?a:{...a,[s]:l},{}),i,o)}function t8(e,t,n){let r=e._parse(t,n);return r.issues?{success:!1,error:new Wk(r.issues),issues:r.issues}:{success:!0,data:r.output,output:r.output}}function bd(e,t){return n=>n>e?{issue:{validation:"max_value",message:t||"Invalid value",input:n}}:{output:n}}function Ed(e,t){return n=>nt in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pa=(e,t)=>function(){return t||(0,e[E2(e)[0]])((t={exports:{}}).exports,t),t.exports},s8=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of E2(t))!o8.call(e,i)&&i!==n&&sh(e,i,{get:()=>t[i],enumerable:!(r=r8(t,i))||r.enumerable});return e},l8=(e,t,n)=>(n=e!=null?n8(i8(e)):{},s8(t||!e||!e.__esModule?sh(n,"default",{value:e,enumerable:!0}):n,e)),u8=(e,t,n)=>(a8(e,typeof t!="symbol"?t+"":t,n),n),c8=Pa({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.copy=void 0;var t=(n,r,i=0,o=0,a=n.width-i,s=n.height-o,l=0,u=0)=>{if(i=i|0,o=o|0,a=a|0,s=s|0,l=l|0,u=u|0,a<=0||s<=0)return;let c=new Uint32Array(n.data.buffer),f=new Uint32Array(r.data.buffer);for(let d=0;d=n.height)continue;let y=u+d;if(!(y<0||y>=r.height))for(let m=0;m=n.width)continue;let p=l+m;if(p<0||p>=r.width)continue;let g=h*n.width+w,v=y*r.width+p;f[v]=c[g]}}};e.copy=t}}),f8=Pa({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreateImageFactory=(t=[0,0,0,0],n=4)=>{if(n=Math.floor(n),isNaN(n)||n<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in t)||t.lengthi===0);return(i,o,a)=>{if(i===void 0||o===void 0)throw TypeError("Not enough arguments");if(i=Math.floor(i),o=Math.floor(o),isNaN(i)||i<1||isNaN(o)||o<1)throw TypeError("Index or size is negative or greater than the allowed amount");let s=i*o*n;if(a===void 0&&(a=new Uint8ClampedArray(s)),a instanceof Uint8ClampedArray){if(a.length!==s)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let l=0;l{if(o<=-a||o>=a||o==0)return 0;let s=o*Math.PI;return Math.sin(s)/s*Math.sin(s/a)/(s/a)},r=o=>Math.round(o*((1<{let c=u?2:3,f=1/s,d=Math.min(1,s),h=c/d,y=Math.floor((h+1)*2),m=new Int16Array((y+2)*a),w=0;for(let p=0;p>1]+=r(1-k);let T=0;for(;T0&&C[z]===0;)z--;let W=v+T,$=z-T+1;m[w++]=W,m[w++]=$,m.set(C.subarray(T,z+1),w),w+=$}return m};e.filters=i}}),p8=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convolve=void 0;var t=14,n=(r,i,o,a,s,l)=>{let u=0,c=0;for(let f=0;f0;_--){let b=l[d++];w=w+b*r[m]|0,p=p+b*r[m+1]|0,g=g+b*r[m+2]|0,v=v+b*r[m+3]|0,m=m+4|0}i[c]=w+8192>>t,i[c+1]=p+8192>>t,i[c+2]=g+8192>>t,i[c+3]=v+8192>>t,c=c+a*4|0}c=(f+1)*4|0,u=(f+1)*o*4|0}};e.convolve=n}}),h8=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lanczos2=e.lanczos=void 0;var t=c8(),n=f8(),r=d8(),i=p8(),o=(l,u,c=!1)=>{let f=u.width/l.width,d=u.height/l.height,h=r.filters(l.width,u.width,f,0,c),y=r.filters(l.height,u.height,d,0,c),m=new Uint8ClampedArray(u.width*l.height*4);i.convolve(l.data,m,l.width,l.height,u.width,h),i.convolve(m,u.data,l.height,u.width,u.height,y)},a=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,m=0,w=u.width-y,p=u.height-m)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,m=m|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&m===0&&w===u.width&&p===u.height){o(l,u);return}let g=n.createImage(d,h),v=n.createImage(w,p);t.copy(l,g,c,f),o(g,v),t.copy(v,u,0,0,v.width,v.height,y,m)};e.lanczos=a;var s=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,m=0,w=u.width-y,p=u.height-m)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,m=m|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&m===0&&w===u.width&&p===u.height){o(l,u,!0);return}let g=n.createImage(d,h),v=n.createImage(w,p);t.copy(l,g,c,f),o(g,v,!0),t.copy(v,u,0,0,v.width,v.height,y,m)};e.lanczos2=s}}),C2=(e=>(e.Bounce="bounce",e.Normal="normal",e))(C2||{}),m8=Qk(C2),x2=Xt({autoplay:ue(Uc()),defaultTheme:ue(Xe()),direction:ue(Sd([u0(1),u0(-1)])),hover:ue(Uc()),id:Xe(),intermission:ue(ln()),loop:ue(Sd([Uc(),ln()])),playMode:ue(m8),speed:ue(ln()),themeColor:ue(Xe())}),v8=Xt({animations:jo(Xe()),id:Xe()}),g8=Xt({activeAnimationId:ue(Xe()),animations:jo(x2),author:ue(Xe()),custom:ue(Xk(Xe(),Gk())),description:ue(Xe()),generator:ue(Xe()),keywords:ue(Xe()),revision:ue(ln()),themes:ue(jo(v8)),states:ue(jo(Xe())),version:ue(Xe())}),O2=e8(x2,["id"]),ei=Xt({state:Xe()}),y8=ei,w8=ka([ei,Xt({ms:ln()})]),_8=ka([ei,Xt({count:ln()})]),S8=ei,b8=ei,E8=ei,C8=ka([ei,Xt({threshold:ue(jo(ln([Ed(0),bd(1)])))})]),x8=Xt({onAfter:ue(w8),onClick:ue(y8),onComplete:ue(E8),onEnter:ue(_8),onMouseEnter:ue(S8),onMouseLeave:ue(b8),onShow:ue(C8)}),O8=ka([O2,Xt({playOnScroll:ue(c0([ln([Ed(0),bd(1)]),ln([Ed(0),bd(1)])])),segments:ue(Sd([c0([ln(),ln()]),Xe()]))})]);ka([x8,Xt({animationId:ue(Xe()),playbackSettings:O8})]);var A8={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",mpeg:"audio/mpeg",mp3:"audio/mp3"},f0={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120],mp3:[73,68,51,3,0,0,0,0],mpeg:[73,68,51,3,0,0,0,0]},k8=e=>{let t=null,n=[];if(!e)return null;let r=e.substring(e.indexOf(",")+1);typeof window>"u"?t=Buffer.from(r,"base64").toString("binary"):t=atob(r);let i=new Uint8Array(t.length);for(let o=0;os===a[l]))return A8[o]}return null},lh=class extends Error{constructor(e,t){super(e),u8(this,"code"),this.name="[dotlottie-js]",this.code=t}};function A2(e){let t;if(typeof window>"u")t=Buffer.from(e).toString("base64");else{let n=Array.prototype.map.call(e,r=>String.fromCharCode(r)).join("");t=window.btoa(n)}return`data:${k8(t)};base64,${t}`}function d0(e){return"w"in e&&"h"in e&&!("xt"in e)&&"p"in e}function Cd(e){return!("h"in e)&&!("w"in e)&&"p"in e&&"e"in e&&"u"in e&&"id"in e}async function Ia(e,t=()=>!0){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((n,r)=>{Uk(e,{filter:t},(i,o)=>{i&&r(i),n(o)})})}async function uh(e,t,n){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return(await Ia(e,r=>r.name===t&&(!n||n(r))))[t]}async function xd(e){let t="manifest.json",n=(await Ia(e,r=>r.name===t))[t];if(!(typeof n>"u"))return JSON.parse(no(n,!1))}async function P8(e){if(!(e instanceof Uint8Array))return{success:!1,error:"DotLottie not found"};let t=await xd(e);if(typeof t>"u")return{success:!1,error:"Invalid .lottie file, manifest.json is missing"};let n=t8(g8,t);return n.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(Hk(n.error).nested,null,2)}`}}async function p0(e){let t=new Uint8Array(e),n=await P8(t);if(n.error)throw new lh(n.error,"INVALID_DOTLOTTIE");return t}async function I8(e,t){let n=await Ia(e,i=>{let o=i.name.replace("audio/","");return i.name.startsWith("audio/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("audio/","");r[a]=A2(o)}}return r}async function M8(e,t){var n;let r=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(Cd(s)){let l=s.p;r.has(l)||r.set(l,new Set),(n=r.get(l))==null||n.add(o)}let i=await I8(e,o=>r.has(o.name));for(let[o,a]of r){let s=i[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])Cd(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function L8(e,t){let n=await Ia(e,i=>{let o=i.name.replace("images/","");return i.name.startsWith("images/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("images/","");r[a]=A2(o)}}return r}async function D8(e,t){var n;let r=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(d0(s)){let l=s.p;r.has(l)||r.set(l,new Set),(n=r.get(l))==null||n.add(o)}let i=await L8(e,o=>r.has(o.name));for(let[o,a]of r){let s=i[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])d0(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function T8(e,t,{inlineAssets:n}={},r){let i=`animations/${t}.json`,o=await uh(e,i,r);if(typeof o>"u")return;let a=JSON.parse(no(o,!1));if(!n)return a;let s={[t]:a};return await D8(e,s),await M8(e,s),a}async function F8(e,t,n){let r=`themes/${t}.json`,i=await uh(e,r,n);if(!(typeof i>"u"))return JSON.parse(no(i,!1))}async function $8(e,t){let n={},r=await Ia(e,i=>{let o=i.name.replace("states/","").replace(".json","");return i.name.startsWith("states/")&&(!t||t({...i,name:o}))});for(let i in r){let o=r[i];if(o instanceof Uint8Array){let a=i.replace("states/","").replace(".json","");n[a]=no(o,!1)}}return n}async function R8(e,t,n){let r=`states/${t}.json`,i=await uh(e,r,n);return typeof i>"u"?void 0:JSON.parse(no(i,!1))}l8(h8());function ae(e,t="dotLottie-common"){return new Error(`[${t}]: ${e}`)}function si(e,t="dotLottie-common",...n){console.error(`[${t}]:`,e,...n)}function Le(e,t="dotLottie-common",...n){console.warn(`[${t}]:`,e,...n)}function j8(e=""){let t=e.trim(),n=t.lastIndexOf("/"),r=t.substring(n+1),i=r.indexOf(".");return i!==-1?r.substring(0,i):r}function Fl(e){return["v","ip","op","layers","fr","w","h"].every(t=>Object.prototype.hasOwnProperty.call(e,t))}function N8(e){let t=e.assets;return t?t.some(n=>Cd(n)):!1}function z8(e){try{let t=JSON.parse(e);return Fl(t)}catch{return!1}}function WP(e,t){let n=Object.keys(e).find(r=>e[r]===t);if(n===void 0)throw new Error("Value not found in the object.");return n}function Hc(e){return JSON.parse(JSON.stringify(e))}var V8=class{constructor(){ne(this,"_dotLottie");ne(this,"_animationsMap",new Map);ne(this,"_themeMap",new Map);ne(this,"_stateMachinesMap",new Map);ne(this,"_manifest")}get dotLottie(){return this._dotLottie}get animationsMap(){return this._animationsMap}get themeMap(){return this._themeMap}get stateMachinesMap(){return this._stateMachinesMap}get manifest(){return this._manifest}async loadFromUrl(t){let n=await fetch(t,{method:"GET",mode:"cors"});if(!n.ok)throw new Error(`Failed to load dotLottie from ${t} with status ${n.status}`);let r=n.headers.get("content-type");if(r!=null&&r.includes("application/json")){let i=await n.json();if(!Fl(i))throw new Error(`Invalid lottie JSON at ${t}`);let o=j8(t);this._animationsMap.set(o,i);let a={activeAnimationId:o,animations:[{id:o}]};this._manifest=a}else{this._dotLottie=await p0(await n.arrayBuffer());let i=await xd(this._dotLottie);if(!i)throw new Error("Manifest not found");this._manifest=i}}loadFromLottieJSON(t){if(!Fl(t))throw new Error("Invalid lottie JSON");let n="my-animation";this._animationsMap.set(n,t);let r={activeAnimationId:n,animations:[{id:n}]};this._manifest=r}async loadFromArrayBuffer(t){this._dotLottie=await p0(t);let n=await xd(this._dotLottie);if(!n)throw new Error("Manifest not found");this._manifest=n}async getAnimation(t){if(this._animationsMap.get(t))return this._animationsMap.get(t);if(!this._dotLottie)return;let n=await T8(this._dotLottie,t,{inlineAssets:!0});return n&&this._animationsMap.set(t,n),n}async getTheme(t){if(this._themeMap.get(t))return this._themeMap.get(t);if(!this._dotLottie)return;let n=await F8(this._dotLottie,t);return n&&this._themeMap.set(t,n),n}async getStateMachines(){if(!this._dotLottie)return;let t=await $8(this._dotLottie);for(let n in t)if(n){let r=t[n];if(r){let i=JSON.parse(r);if(i){let o=i.descriptor.id;this._stateMachinesMap.get(o)||this._stateMachinesMap.set(o,i)}}}return Array.from(this._stateMachinesMap.values())}async getStateMachine(t){if(this._stateMachinesMap.get(t))return this._stateMachinesMap.get(t);if(!this._dotLottie)return;let n=await R8(this._dotLottie,t);return n&&this._stateMachinesMap.set(n.descriptor.id,n),n}};async function B8(e,t){let[{DotLottieStateMachineManager:n}]=await Promise.all([Tn(()=>import("./dotlottie-state-machine-manager-XQAAXUPV-a728a3f7.js"),[])]);if(!e.length)throw ae("No state machines available inside this .lottie!");return new n(e,t)}function Du(){throw new Error("Cycle detected")}function ch(){if(Ti>1)Ti--;else{for(var e,t=!1;No!==void 0;){var n=No;for(No=void 0,Od++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&P2(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Od=0,Ti--,t)throw e}}var De=void 0,No=void 0,Ti=0,Od=0,$l=0;function k2(e){if(De!==void 0){var t=e.n;if(t===void 0||t.t!==De)return t={i:0,S:e,p:De.s,n:void 0,t:De,e:void 0,x:void 0,r:t},De.s!==void 0&&(De.s.n=t),De.s=t,e.n=t,32&De.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=De.s,t.n=void 0,De.s.n=t,De.s=t),t}}function Et(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}Et.prototype.h=function(){return!0};Et.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};Et.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};Et.prototype.subscribe=function(e){var t=this;return W8(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})};Et.prototype.valueOf=function(){return this.value};Et.prototype.toString=function(){return this.value+""};Et.prototype.toJSON=function(){return this.value};Et.prototype.peek=function(){return this.v};Object.defineProperty(Et.prototype,"value",{get:function(){var e=k2(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(De instanceof ti&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Od>100&&Du(),this.v=e,this.i++,$l++,Ti++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ch()}}}});function U8(e){return new Et(e)}function P2(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I2(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function M2(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function ti(e){Et.call(this,void 0),this.x=e,this.s=void 0,this.g=$l-1,this.f=4}(ti.prototype=new Et).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===$l))return!0;if(this.g=$l,this.f|=1,this.i>0&&!P2(this))return this.f&=-2,!0;var e=De;try{I2(this),De=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return De=e,M2(this),this.f&=-2,!0};ti.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Et.prototype.S.call(this,e)};ti.prototype.U=function(e){if(this.t!==void 0&&(Et.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ti.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};ti.prototype.peek=function(){if(this.h()||Du(),16&this.f)throw this.v;return this.v};Object.defineProperty(ti.prototype,"value",{get:function(){1&this.f&&Du();var e=k2(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function L2(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ti++;var n=De;De=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,fh(e),r}finally{De=n,ch()}}}function fh(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,L2(e)}function H8(e){if(De!==this)throw new Error("Out-of-order effect");M2(this),De=e,this.f&=-2,8&this.f&&fh(this),ch()}function Ma(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ma.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ma.prototype.S=function(){1&this.f&&Du(),this.f|=1,this.f&=-9,L2(this),I2(this),Ti++;var e=De;return De=this,H8.bind(this,e)};Ma.prototype.N=function(){2&this.f||(this.f|=2,this.o=No,No=this)};Ma.prototype.d=function(){this.f|=8,1&this.f||fh(this)};function W8(e){var t=new Ma(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var q8=class{constructor(e){ne(this,"_state");ne(this,"_prevState");this._prevState=e,this._state=U8(e)}setState(e){this._prevState=this._state.value,this._state.value=e}subscribe(e){return this._state.subscribe(t=>e(t,this._prevState))}},K8={name:"@dotlottie/common",version:"0.7.10",type:"module",description:"",author:"Afsal , Sam Osborne ",license:"MIT",engines:{node:">18.0.0"},module:"dist/index.js",main:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:[],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint .","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"^0.7.0","@preact/signals-core":"^1.2.3",howler:"^2.2.3","lottie-web":"^5.12.2",xstate:"^4.38.1"},devDependencies:{"@lottiefiles/lottie-types":"^1.2.0","@types/howler":"^2.2.8",tsup:"^7.2.0",typescript:"^4.7.4"},publishConfig:{access:"public"}},mt=(e=>(e.Complete="complete",e.DataFail="data_fail",e.DataReady="data_ready",e.Error="error",e.Frame="frame",e.Freeze="freeze",e.LoopComplete="loopComplete",e.Pause="pause",e.Play="play",e.Ready="ready",e.Stop="stop",e.VisibilityChange="visibilityChange",e))(mt||{}),en=(e=>(e.Completed="completed",e.Error="error",e.Fetching="fetching",e.Frozen="frozen",e.Initial="initial",e.Loading="loading",e.Paused="paused",e.Playing="playing",e.Ready="ready",e.Stopped="stopped",e))(en||{}),G8=(e=>(e.Bounce="bounce",e.Normal="normal",e))(G8||{}),Rt={autoplay:!1,direction:1,hover:!1,intermission:0,loop:!1,playMode:"normal",speed:1,defaultTheme:""},dh={activeStateId:"",autoplay:!1,currentState:"initial",frame:0,seeker:0,direction:1,hover:!1,loop:!1,playMode:"normal",speed:1,background:"transparent",intermission:0,currentAnimationId:void 0,visibilityPercentage:0},Q8=class{constructor(t,n,r){ne(this,"_lottie");ne(this,"_src");ne(this,"_animationConfig");ne(this,"_prevUserPlaybackOptions",{});ne(this,"_userPlaybackOptions");ne(this,"_hover",!1);ne(this,"_loop",!1);ne(this,"_counter",0);ne(this,"_intermission",0);ne(this,"_counterInterval",null);ne(this,"_container",null);ne(this,"_name");ne(this,"_mode","normal");ne(this,"_background","transparent");ne(this,"_animation");ne(this,"_defaultTheme");ne(this,"_activeAnimationId");ne(this,"_currentAnimationId");ne(this,"_testId");ne(this,"_listeners",new Map);ne(this,"_currentState","initial");ne(this,"_stateBeforeFreeze","initial");ne(this,"state",new q8(dh));ne(this,"_light",!1);ne(this,"_worker",!1);ne(this,"_dotLottieLoader",new V8);ne(this,"_activeStateId");ne(this,"_inInteractiveMode",!1);ne(this,"_scrollTicking",!1);ne(this,"_scrollCallback");ne(this,"_onShowIntersectionObserver");ne(this,"_visibilityPercentage",0);ne(this,"_audios",[]);ne(this,"_stateMachineManager");typeof t=="string"?this._src=t:this._src=Hc(t),r!=null&&r.testId&&(this._testId=r.testId),this._defaultTheme=(r==null?void 0:r.defaultTheme)||"",this._userPlaybackOptions=this._validatePlaybackOptions(r||{}),typeof(r==null?void 0:r.activeAnimationId)=="string"&&(this._activeAnimationId=r.activeAnimationId),this._container=n||null,typeof(r==null?void 0:r.background)=="string"&&this.setBackground(r.background),typeof(r==null?void 0:r.activeStateId)<"u"&&(this._activeStateId=r.activeStateId);let{rendererSettings:i,...o}=r||{};this._animationConfig={loop:!1,autoplay:!1,renderer:"svg",rendererSettings:{clearCanvas:!0,progressiveLoad:!0,hideOnTransparent:!0,filterSize:{width:"200%",height:"200%",x:"-50%",y:"-50%"},...i},...o},r!=null&&r.light&&(this._light=r.light),r!=null&&r.worker&&(this._worker=r.worker),this._listenToHover(),this._listenToVisibilityChange()}_listenToHover(){var t,n,r,i;let o=()=>{this._hover&&this.currentState!=="playing"&&this.play()},a=()=>{this._hover&&this.currentState==="playing"&&this.stop()};(t=this._container)==null||t.removeEventListener("mouseenter",o),(n=this._container)==null||n.removeEventListener("mouseleave",a),(r=this._container)==null||r.addEventListener("mouseleave",a),(i=this._container)==null||i.addEventListener("mouseenter",o)}_onVisibilityChange(){!this._lottie||typeof document>"u"||(document.hidden&&this.currentState==="playing"?this.freeze():this.currentState==="frozen"&&this.unfreeze())}_listenToVisibilityChange(){typeof document<"u"&&typeof document.hidden<"u"&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange())}_getOption(t){var n;if(typeof this._userPlaybackOptions[t]<"u")return this._userPlaybackOptions[t];let r=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(i=>i.id===this._currentAnimationId);return r&&typeof r[t]<"u"?r[t]:Rt[t]}_getPlaybackOptions(){let t={};for(let n in Rt)typeof Rt[n]<"u"&&(t[n]=this._getOption(n));return t}_setPlayerState(t){var n,r,i;let o=t(this._getPlaybackOptions());try{O2._parse(o)}catch{Le(`Invalid PlaybackOptions, ${JSON.stringify(o,null,2)}`);return}typeof o.defaultTheme<"u"&&(this._defaultTheme=o.defaultTheme),typeof o.playMode<"u"&&(this._mode=o.playMode),typeof o.intermission<"u"&&(this._intermission=o.intermission),typeof o.hover<"u"&&(this._hover=o.hover),typeof o.loop<"u"&&(this.clearCountTimer(),this._loop=o.loop,this._counter=0,(n=this._lottie)==null||n.setLoop(typeof o.loop=="number"?!0:o.loop)),typeof o.speed<"u"&&((r=this._lottie)==null||r.setSpeed(o.speed)),typeof o.autoplay<"u"&&this._lottie&&(this._lottie.autoplay=o.autoplay),typeof o.direction<"u"&&((i=this._lottie)==null||i.setDirection(o.direction))}_getOptionsFromAnimation(t){let{id:n,...r}=t;return{...Rt,...r}}_updateTestData(){!this._testId||!this._lottie||(window.dotLottiePlayer||(window.dotLottiePlayer={[this._testId]:{}}),window.dotLottiePlayer[this._testId]={direction:this._lottie.playDirection,currentState:this._currentState,loop:this.loop,mode:this._mode,speed:this._lottie.playSpeed})}setContainer(t){t!==this._container&&(this._container=t,this.setBackground(this._background),this._listenToHover())}get currentState(){return this._currentState}clearCountTimer(){this._counterInterval&&clearInterval(this._counterInterval)}setCurrentState(t){this._currentState=t,this._notify(),this._updateTestData()}static isPathJSON(t){var n;return((n=t.split(".").pop())==null?void 0:n.toLowerCase())==="json"}get src(){return this._src}updateSrc(t){this._src!==t&&(typeof t=="string"?this._src=t:this._src=Hc(t),this._activeAnimationId=void 0,this._currentAnimationId=void 0,this.load())}get intermission(){return this._intermission}get hover(){return this._hover}setHover(t){typeof t=="boolean"&&(this._hover=t,this._userPlaybackOptions.hover=t,this._notify())}setIntermission(t){this._intermission=t,this._userPlaybackOptions.intermission=t,this._notify()}get mode(){return this._mode}get animations(){return this._dotLottieLoader.animationsMap}get themes(){return this._dotLottieLoader.themeMap}setMode(t){typeof t=="string"&&(this._mode=t,this._userPlaybackOptions.playMode=t,this._setPlayerState(()=>({playMode:t})),this._notify(),this._updateTestData())}get container(){if(this._container)return this._container}goToAndPlay(t,n,r){if(!this._lottie||["loading"].includes(this._currentState)){Le("goToAndPlay() Can't use whilst loading.");return}this._lottie.goToAndPlay(t,n,r),this.setCurrentState("playing")}goToAndStop(t,n,r){if(!this._lottie||["loading"].includes(this._currentState)){Le("goToAndStop() Can't use whilst loading.");return}this._lottie.goToAndStop(t,n,r),this.setCurrentState("stopped")}seek(t){if(!this._lottie||["loading"].includes(this._currentState)){Le("seek() Can't use whilst loading.");return}let n=t;typeof n=="number"&&(n=Math.round(n));let r=/^(\d+)(%?)$/u.exec(n.toString());if(!r)return;let i=r[2]==="%"?this.totalFrames*Number(r[1])/100:r[1];i!==void 0&&(this._lottie.goToAndPlay(i,!0),this.currentState==="playing"?this.play():this.currentState==="frozen"?this.freeze():this.pause())}_areNumbersInRange(t,n){return t>=0&&t<=1&&n>=0&&n<=1}_updatePosition(t,n,r){let[i,o]=t??[0,this.totalFrames-1],[a,s]=n??[0,1];if(!this._areNumbersInRange(a,s)){si("threshold values must be between 0 and 1");return}if(this.container){let{height:l,top:u}=this.container.getBoundingClientRect(),c=window.innerHeight-u,f=window.innerHeight+l,d=c/f,h=i+Math.round((d-a)/(s-a)*(o-i));r&&r(d),this.goToAndStop(h,!0),(h>=o||d>=s)&&this._handleAnimationComplete()}this._scrollTicking=!1}_requestTick(t,n,r){this._scrollTicking||(requestAnimationFrame(()=>this._updatePosition(t,n,r)),this._scrollTicking=!0)}playOnScroll(t){this.stop(),this._scrollCallback&&this.stopPlayOnScroll(),this._scrollCallback=()=>this._requestTick(t==null?void 0:t.segments,t==null?void 0:t.threshold,t==null?void 0:t.positionCallback),window.addEventListener("scroll",this._scrollCallback)}stopPlayOnScroll(){this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback),this._scrollCallback=void 0)}stopPlayOnShow(){this._onShowIntersectionObserver&&(this._onShowIntersectionObserver.disconnect(),this._onShowIntersectionObserver=void 0)}addIntersectionObserver(t){if(!this.container)throw ae("Can't play on show, player container element not available.");let n={root:null,rootMargin:"0px",threshold:t!=null&&t.threshold?t.threshold:[0,1]},r=i=>{i.forEach(o=>{var a,s;this._visibilityPercentage=o.intersectionRatio*100,o.isIntersecting?(t!=null&&t.callbackOnIntersect&&t.callbackOnIntersect(this._visibilityPercentage),(a=this._container)==null||a.dispatchEvent(new Event("visibilityChange"))):t!=null&&t.callbackOnIntersect&&(t.callbackOnIntersect(0),(s=this._container)==null||s.dispatchEvent(new Event("visibilityChange")))})};this._onShowIntersectionObserver=new IntersectionObserver(r,n),this._onShowIntersectionObserver.observe(this.container)}playOnShow(t){var n;if(this.stop(),!this.container)throw ae("Can't play on show, player container element not available.");this._onShowIntersectionObserver&&this.stopPlayOnShow(),this.addIntersectionObserver({threshold:(n=t==null?void 0:t.threshold)!=null?n:[],callbackOnIntersect:r=>{r===0?this.pause():this.play()}})}_validatePlaybackOptions(t){if(!t)return{};let n={};for(let[r,i]of Object.entries(t))switch(r){case"autoplay":typeof i=="boolean"&&(n.autoplay=i);break;case"direction":typeof i=="number"&&[1,-1].includes(i)&&(n.direction=i);break;case"loop":(typeof i=="boolean"||typeof i=="number")&&(n.loop=i);break;case"playMode":typeof i=="string"&&["normal","bounce"].includes(i)&&(n.playMode=i);break;case"speed":typeof i=="number"&&(n.speed=i);break;case"themeColor":typeof i=="string"&&(n.themeColor=i);break;case"hover":typeof i=="boolean"&&(n.hover=i);break;case"intermission":typeof i=="number"&&(n.intermission=i);break;case"defaultTheme":typeof i=="string"&&(n.defaultTheme=i);break}return this._requireValidPlaybackOptions(n),n}_requireAnimationsInTheManifest(){var t;if(!((t=this._dotLottieLoader.manifest)!=null&&t.animations.length))throw ae("No animations found in manifest.")}_requireAnimationsToBeLoaded(){if(this._dotLottieLoader.animationsMap.size===0)throw ae("No animations have been loaded.")}async play(t,n){var r,i;if(["initial","loading"].includes(this._currentState)){Le("Player unable to play whilst loading.");return}if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),this._lottie&&!t){this._lottie.playDirection===-1&&this._lottie.currentFrame===0?this._lottie.goToAndPlay(this._lottie.totalFrames,!0):this._lottie.play(),this.setCurrentState("playing");return}if(typeof t=="number"){let o=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations[t];if(!o)throw ae("animation not found.");typeof n=="function"?await this.render({id:o.id,...n(this._getPlaybackOptions(),this._getOptionsFromAnimation(o))}):await this.render({id:o.id})}if(typeof t=="string"){let o=(i=this._dotLottieLoader.manifest)==null?void 0:i.animations.find(a=>a.id===t);if(!o)throw ae("animation not found.");typeof n=="function"?await this.render({id:o.id,...n(this._getPlaybackOptions(),this._getOptionsFromAnimation(o))}):await this.render({id:o.id})}}playSegments(t,n){if(!this._lottie||["loading"].includes(this._currentState)){Le("playSegments() Can't use whilst loading.");return}this._lottie.playSegments(t,n),this.setCurrentState("playing")}resetSegments(t){if(!this._lottie||["loading"].includes(this._currentState)){Le("resetSegments() Can't use whilst loading.");return}this._lottie.resetSegments(t)}togglePlay(){this.currentState==="playing"?this.pause():this.play()}_getAnimationByIdOrIndex(t){var n,r;if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),typeof t=="number"){let i=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations[t];if(!i)throw ae("animation not found.");return i}if(typeof t=="string"){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations.find(o=>o.id===t);if(!i)throw ae("animation not found.");return i}throw ae("first param must be a number or string")}get activeAnimationId(){return this._getActiveAnimationId()}get currentAnimationId(){return this._currentAnimationId}get activeStateId(){return this._activeStateId}async _startInteractivity(t){if(!this._inInteractiveMode){si("Can't start interactivity. Not in interactive mode. Call enterInteractiveMode(stateId: string) to start.");return}if(this._dotLottieLoader.stateMachinesMap.size===0&&await this._dotLottieLoader.getStateMachines(),this._dotLottieLoader.stateMachinesMap.size===0)throw ae("No interactivity states are available.");if(t==="undefined")throw ae("stateId is not specified.");this._stateMachineManager||(this._stateMachineManager=await B8(Array.from(this._dotLottieLoader.stateMachinesMap.values()),this)),this._stateMachineManager.start(t)}enterInteractiveMode(t){var n;if(t)this._inInteractiveMode||(this._prevUserPlaybackOptions={...this._userPlaybackOptions}),this._inInteractiveMode&&((n=this._stateMachineManager)==null||n.stop()),this._activeStateId=t,this._inInteractiveMode=!0,this._startInteractivity(t);else throw ae("stateId must be a non-empty string.")}exitInteractiveMode(){var t;this._inInteractiveMode&&(this._inInteractiveMode=!1,this._activeStateId="",(t=this._stateMachineManager)==null||t.stop(),this._userPlaybackOptions={},this._userPlaybackOptions={...this._prevUserPlaybackOptions},this._prevUserPlaybackOptions={},this.reset())}reset(){var t;let n=this._getActiveAnimationId(),r=(t=this._dotLottieLoader.manifest)==null?void 0:t.animations.find(i=>i.id===n);if(this._inInteractiveMode&&this.exitInteractiveMode(),!r)throw ae("animation not found.");this.play(n)}previous(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw ae("manifest not found.");if(this._inInteractiveMode){Le("previous() is not supported in interactive mode.");return}let n=this._dotLottieLoader.manifest.animations.findIndex(i=>i.id===this._currentAnimationId);if(n===-1)throw ae("animation not found.");let r=this._dotLottieLoader.manifest.animations[(n-1+this._dotLottieLoader.manifest.animations.length)%this._dotLottieLoader.manifest.animations.length];if(!r||!r.id)throw ae("animation not found.");typeof t=="function"?this.render({id:r.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):this.render({id:r.id})}next(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw ae("manifest not found.");if(this._inInteractiveMode){Le("next() is not supported in interactive mode.");return}let n=this._dotLottieLoader.manifest.animations.findIndex(i=>i.id===this._currentAnimationId);if(n===-1)throw ae("animation not found.");let r=this._dotLottieLoader.manifest.animations[(n+1)%this._dotLottieLoader.manifest.animations.length];if(!r||!r.id)throw ae("animation not found.");typeof t=="function"?this.render({id:r.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):this.render({id:r.id})}getManifest(){return this._dotLottieLoader.manifest}resize(){if(!this._lottie||["loading"].includes(this._currentState)){Le("resize() Can't use whilst loading.");return}this._lottie.resize()}stop(){if(!this._lottie||["loading"].includes(this._currentState)){Le("stop() Can't use whilst loading.");return}this.clearCountTimer(),this._counter=0,this._setPlayerState(()=>({direction:this._getOption("direction")})),this._lottie.stop(),this.setCurrentState("stopped")}pause(){if(!this._lottie||["loading"].includes(this._currentState)){Le("pause() Can't use whilst loading.");return}this.clearCountTimer(),this._lottie.pause(),this.setCurrentState("paused")}freeze(){if(!this._lottie||["loading"].includes(this._currentState)){Le("freeze() Can't use whilst loading.");return}this.currentState!=="frozen"&&(this._stateBeforeFreeze=this.currentState),this._lottie.pause(),this.setCurrentState("frozen")}unfreeze(){if(!this._lottie||["loading"].includes(this._currentState)){Le("unfreeze() Can't use whilst loading.");return}this._stateBeforeFreeze==="playing"?this.play():this.pause()}destroy(){var t,n;(t=this._container)!=null&&t.__lottie&&(this._container.__lottie.destroy(),this._container.__lottie=null),this._audios.length&&(this._audios.forEach(r=>{r.unload()}),this._audios=[]),this.clearCountTimer(),typeof document<"u"&&document.removeEventListener("visibilitychange",()=>this._onVisibilityChange()),this._counter=0,(n=this._lottie)==null||n.destroy(),this._lottie=void 0}getAnimationInstance(){return this._lottie}static getLottieWebVersion(){return`${K8.dependencies["lottie-web"]}`}addEventListener(t,n){var r,i,o;this._listeners.has(t)||this._listeners.set(t,new Set),(r=this._listeners.get(t))==null||r.add(n);try{t==="complete"?(i=this._container)==null||i.addEventListener(t,n):(o=this._lottie)==null||o.addEventListener(t,n)}catch(a){si(`addEventListener ${a}`)}}getState(){var t,n,r,i,o,a,s;return{autoplay:(n=(t=this._lottie)==null?void 0:t.autoplay)!=null?n:!1,currentState:this._currentState,frame:this._frame,visibilityPercentage:this._visibilityPercentage,seeker:this._seeker,direction:(i=(r=this._lottie)==null?void 0:r.playDirection)!=null?i:1,hover:this._hover,loop:this._loop||!1,playMode:this._mode,speed:(a=(o=this._lottie)==null?void 0:o.playSpeed)!=null?a:1,background:this._background,intermission:this._intermission,defaultTheme:this._defaultTheme,currentAnimationId:this._currentAnimationId,activeStateId:(s=this._activeStateId)!=null?s:""}}_notify(){this.state.setState(this.getState())}get totalFrames(){var t;return((t=this._lottie)==null?void 0:t.totalFrames)||0}get direction(){return this._lottie?this._lottie.playDirection:1}setDirection(t){this._requireValidDirection(t),this._setPlayerState(()=>({direction:t})),this._userPlaybackOptions.direction=t}get speed(){var t;return((t=this._lottie)==null?void 0:t.playSpeed)||1}setSpeed(t){this._requireValidSpeed(t),this._setPlayerState(()=>({speed:t})),this._userPlaybackOptions.speed=t}get autoplay(){var t,n;return(n=(t=this._lottie)==null?void 0:t.autoplay)!=null?n:!1}setAutoplay(t){if(this._requireValidAutoplay(t),!this._lottie||["loading"].includes(this._currentState)){Le("setAutoplay() Can't use whilst loading.");return}this._setPlayerState(()=>({autoplay:t})),this._userPlaybackOptions.autoplay=t}toggleAutoplay(){if(!this._lottie||["loading"].includes(this._currentState)){Le("toggleAutoplay() Can't use whilst loading.");return}this.setAutoplay(!this._lottie.autoplay)}get defaultTheme(){return this._defaultTheme}setDefaultTheme(t){this._setPlayerState(()=>({defaultTheme:t})),this._userPlaybackOptions.defaultTheme=t,this._animation&&this.render()}get loop(){return this._loop}setLoop(t){this._requireValidLoop(t),this._setPlayerState(()=>({loop:t})),this._userPlaybackOptions.loop=t}toggleLoop(){if(!this._lottie||["loading"].includes(this._currentState)){Le("toggleLoop() Can't use whilst loading.");return}this.setLoop(!this._loop)}get background(){return this._background}setBackground(t){this._requireValidBackground(t),this._background=t,this._container&&(this._container.style.backgroundColor=t)}get _frame(){return this._lottie?this.currentState==="completed"?this.direction===-1?0:this._lottie.totalFrames:this._lottie.currentFrame:0}get _seeker(){return this._lottie?this._frame/this._lottie.totalFrames*100:0}async revertToManifestValues(t){var n;let r;!Array.isArray(t)||t.length===0?r=["autoplay","defaultTheme","direction","hover","intermission","loop","playMode","speed","activeAnimationId"]:r=t;let i=!1;if(r.includes("activeAnimationId")){let o=(n=this._dotLottieLoader.manifest)==null?void 0:n.activeAnimationId,a=this._getAnimationByIdOrIndex(o||0);this._activeAnimationId=o,await this._setCurrentAnimation(a.id),i=!0}r.forEach(o=>{switch(o){case"autoplay":delete this._userPlaybackOptions.autoplay,this.setAutoplay(this._getOption("autoplay"));break;case"defaultTheme":delete this._userPlaybackOptions.defaultTheme,this.setDefaultTheme(this._getOption("defaultTheme"));break;case"direction":delete this._userPlaybackOptions.direction,this.setDirection(this._getOption("direction"));break;case"hover":delete this._userPlaybackOptions.hover,this.setHover(this._getOption("hover"));break;case"intermission":delete this._userPlaybackOptions.intermission,this.setIntermission(this._getOption("intermission"));break;case"loop":delete this._userPlaybackOptions.loop,this.setLoop(this._getOption("loop"));break;case"playMode":delete this._userPlaybackOptions.playMode,this.setMode(this._getOption("playMode")),this.setDirection(this._getOption("direction"));break;case"speed":delete this._userPlaybackOptions.speed,this.setSpeed(this._getOption("speed"));break}}),i&&this.render()}removeEventListener(t,n){var r,i,o;try{t==="complete"?(r=this._container)==null||r.removeEventListener(t,n):(i=this._lottie)==null||i.removeEventListener(t,n),(o=this._listeners.get(t))==null||o.delete(n)}catch(a){si("removeEventListener",a)}}_handleAnimationComplete(){var t;typeof this._loop=="number"&&this.stop();let n=this.direction===-1?0:this.totalFrames-1;this.goToAndStop(n,!0),this._counter=0,this.clearCountTimer(),this.setCurrentState("completed"),(t=this._container)==null||t.dispatchEvent(new Event("complete"))}addEventListeners(){var t;if(!this._lottie||["loading"].includes(this._currentState)){Le("addEventListeners() Can't use whilst loading.");return}this._lottie.addEventListener("enterFrame",()=>{var n;if(!this._lottie){Le("enterFrame event : Lottie is undefined.");return}Math.floor(this._lottie.currentFrame)===0&&this.direction===-1&&((n=this._container)==null||n.dispatchEvent(new Event("complete")),this.loop||this.setCurrentState("completed")),this._notify()}),this._lottie.addEventListener("loopComplete",()=>{var n;if(!this._lottie){Le("loopComplete event : Lottie is undefined.");return}(n=this._container)==null||n.dispatchEvent(new Event("loopComplete")),this.intermission>0&&this.pause();let r=this._lottie.playDirection;if(typeof this._loop=="number"&&this._loop>0&&(this._counter+=this._mode==="bounce"?.5:1,this._counter>=this._loop)){this._handleAnimationComplete();return}this._mode==="bounce"&&typeof r=="number"&&(r=Number(r)*-1);let i=r===-1?this._lottie.totalFrames-1:0;this.intermission?(this.goToAndPlay(i,!0),this.pause(),this._counterInterval=window.setTimeout(()=>{this._lottie&&(this._setPlayerState(()=>({direction:r})),this.goToAndPlay(i,!0))},this._intermission)):(this._setPlayerState(()=>({direction:r})),this.goToAndPlay(r===-1?this.totalFrames-1:0,!0))}),this._lottie.addEventListener("complete",()=>{if(this._lottie&&this._loop===!1&&this._mode==="bounce"){if(this._counter+=.5,this._counter>=1){this._handleAnimationComplete();return}this._counterInterval=window.setTimeout(()=>{if(!this._lottie)return;let n=this._lottie.playDirection;this._mode==="bounce"&&typeof n=="number"&&(n=Number(n)*-1);let r=n===-1?this.totalFrames-1:0;this._setPlayerState(()=>({direction:n})),this.goToAndPlay(r,!0)},this._intermission)}else this._handleAnimationComplete()});for(let[n,r]of this._listeners)if(n==="complete")for(let i of r)(t=this._container)==null||t.addEventListener(n,i);else for(let i of r)this._lottie.addEventListener(n,i)}async _setCurrentAnimation(t){this._currentState="loading";let n=await this._dotLottieLoader.getAnimation(t);this._currentAnimationId=t,this._animation=n,this._currentState="ready"}async _getAudioFactory(){if(this._animation&&N8(this._animation)){let{DotLottieAudio:t}=await Tn(()=>import("./dotlottie-audio-ed937df9.js"),["assets/dotlottie-audio-ed937df9.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);return n=>{let r=new t({src:[n]});return this._audios.push(r),r}}return null}async render(t){var n,r,i,o,a,s,l,u,c,f,d,h,y,m,w,p,g,v;if(t!=null&&t.id)await this._setCurrentAnimation(t.id);else if(!this._animation)throw ae("no animation selected");let _=(n=Rt.loop)!=null?n:!1,b=(r=Rt.autoplay)!=null?r:!1,E=(i=Rt.playMode)!=null?i:"normal",C=(o=Rt.intermission)!=null?o:0,x=(a=Rt.hover)!=null?a:!1,O=(s=Rt.direction)!=null?s:1,k=(l=Rt.speed)!=null?l:1,T=(u=Rt.defaultTheme)!=null?u:"";_=(c=t==null?void 0:t.loop)!=null?c:this._getOption("loop"),b=(f=t==null?void 0:t.autoplay)!=null?f:this._getOption("autoplay"),E=(d=t==null?void 0:t.playMode)!=null?d:this._getOption("playMode"),C=(h=t==null?void 0:t.intermission)!=null?h:this._getOption("intermission"),x=(y=t==null?void 0:t.hover)!=null?y:this._getOption("hover"),O=(m=t==null?void 0:t.direction)!=null?m:this._getOption("direction"),k=(w=t==null?void 0:t.speed)!=null?w:this._getOption("speed"),T=(p=t==null?void 0:t.defaultTheme)!=null?p:this._getOption("defaultTheme");let z={...this._animationConfig,autoplay:x?!1:b,loop:typeof _=="number"?!0:_,renderer:this._worker?"svg":(g=this._animationConfig.renderer)!=null?g:"svg"},[W,$,M]=await Promise.all([this._dotLottieLoader.getTheme(T),this._getLottiePlayerInstance(),this._getAudioFactory()]);if(W&&this._animation?(this._animation=Hc(this._animation),this._animation.slots=W):this._animation=await this._dotLottieLoader.getAnimation((v=this._currentAnimationId)!=null?v:""),this._activeStateId&&!this._inInteractiveMode){this.enterInteractiveMode(this._activeStateId);return}this.destroy(),this._setPlayerState(()=>({defaultTheme:T,playMode:E,intermission:C,hover:x,loop:_})),M?this._lottie=$.loadAnimation({...z,container:this._container,animationData:this._animation,audioFactory:M}):this._lottie=$.loadAnimation({...z,container:this._container,animationData:this._animation}),typeof this._lottie.resetSegments>"u"&&(this._lottie.resetSegments=()=>{var D;(D=this._lottie)==null||D.playSegments([0,this._lottie.totalFrames],!0)}),this.addEventListeners(),this._container&&(this._container.__lottie=this._lottie),this._setPlayerState(()=>({direction:O,speed:k})),b&&!x&&(_===!1&&O===-1?this.play():this.setCurrentState("playing")),this._updateTestData()}async _getLottiePlayerInstance(){var t;let n=(t=this._animationConfig.renderer)!=null?t:"svg",r;if(this._worker)return n!=="svg"&&Le("Worker is only supported with svg renderer. Change or remove renderer prop to get rid of this warning."),r=await Tn(()=>import("./lottie_worker-Q23FJ6ZR-b8c2ff66.js"),["assets/lottie_worker-Q23FJ6ZR-b8c2ff66.js","assets/chunk-B7OIQIGJ-23fdac17.js"]),r.default;switch(n){case"svg":{this._light?r=await Tn(()=>import("./lottie_light-KMJEUZFY-f635437d.js"),["assets/lottie_light-KMJEUZFY-f635437d.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_svg-MJGYILXD-1f9e46c1.js"),["assets/lottie_svg-MJGYILXD-1f9e46c1.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}case"canvas":{this._light?r=await Tn(()=>import("./lottie_light_canvas-B5UTTNXA-cb44d299.js"),["assets/lottie_light_canvas-B5UTTNXA-cb44d299.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_canvas-CDSUBMCL-8a15594c.js"),["assets/lottie_canvas-CDSUBMCL-8a15594c.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}case"html":{this._light?r=await Tn(()=>import("./lottie_light_html-SLCECTRT-887e5dc4.js"),["assets/lottie_light_html-SLCECTRT-887e5dc4.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_html-X3TYKVQI-be036789.js"),["assets/lottie_html-X3TYKVQI-be036789.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}default:throw new Error(`Invalid renderer: ${n}`)}return r.default}_getActiveAnimationId(){var t,n,r,i;let o=this._dotLottieLoader.manifest;return(i=(r=(t=this._activeAnimationId)!=null?t:o==null?void 0:o.activeAnimationId)!=null?r:(n=o==null?void 0:o.animations[0])==null?void 0:n.id)!=null?i:void 0}async load(t){if(this._currentState==="loading"){Le("Loading in progress..");return}try{if(this.setCurrentState("loading"),typeof this._src=="string")if(z8(this._src)){let r=JSON.parse(this._src);this._dotLottieLoader.loadFromLottieJSON(r)}else{let r=new URL(this._src,window.location.href);await this._dotLottieLoader.loadFromUrl(r.toString())}else if(typeof this._src=="object"&&Fl(this._src))this._dotLottieLoader.loadFromLottieJSON(this._src);else throw ae("Invalid src provided");if(!this._dotLottieLoader.manifest)throw ae("No manifest found");let n=this._getActiveAnimationId();if(!n)throw ae("No active animation found");await this._setCurrentAnimation(n),await this.render(t)}catch(n){this.setCurrentState("error"),n instanceof Error&&si(`Error loading animation: ${n.message}`)}}setErrorState(t){this.setCurrentState("error"),si(t)}_requireValidDirection(t){if(t!==-1&&t!==1)throw ae("Direction can only be -1 (backwards) or 1 (forwards)")}_requireValidIntermission(t){if(t<0||!Number.isInteger(t))throw ae("intermission must be a positive number")}_requireValidLoop(t){if(typeof t=="number"&&(!Number.isInteger(t)||t<0))throw ae("loop must be a positive number or boolean")}_requireValidSpeed(t){if(typeof t!="number")throw ae("speed must be a number")}_requireValidBackground(t){if(typeof t!="string")throw ae("background must be a string")}_requireValidAutoplay(t){if(typeof t!="boolean")throw ae("autoplay must be a boolean")}_requireValidPlaybackOptions(t){t.direction&&this._requireValidDirection(t.direction),t.intermission&&this._requireValidIntermission(t.intermission),t.loop&&this._requireValidLoop(t.loop),t.speed&&this._requireValidSpeed(t.speed)}};function Y8(){var e=S.useRef(!0);return e.current?(e.current=!1,!0):e.current}var J8=function(e,t){var n=Y8();S.useEffect(function(){if(!n)return e()},t)},jt=J8,X8=function(){};function D2(e){for(var t=[],n=1;n{let e=S.useContext(F2);if(typeof e>"u")throw ae("useDotLottieContext must be used within a DotLottieProvider");return e},R2=(e,t,n)=>{let[r,i]=S.useState(()=>n());return S.useEffect(()=>{let o=e(()=>{let a=t();i(a)});return()=>{o()}},[e]),r},cP=()=>{};function Ar(e){let t=$2(),n=S.useCallback(()=>{if(t!==null)return e(t.getState())},[e,t]),r=S.useCallback(i=>t===null?cP:t.state.subscribe(i),[t]);return R2(r,n,()=>e(dh))}var fP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.33325 11.6667C7.78097 11.6667 7.33325 12.1144 7.33325 12.6667C7.33325 13.2189 7.78097 13.6667 8.33325 13.6667C8.88554 13.6667 9.33325 13.2189 9.33325 12.6667C9.33325 12.1144 8.88554 11.6667 8.33325 11.6667Z",fill:"currentColor"}),R.createElement("path",{d:"M7.33325 8C7.33325 7.44771 7.78097 7 8.33325 7C8.88554 7 9.33325 7.44771 9.33325 8C9.33325 8.55228 8.88554 9 8.33325 9C7.78097 9 7.33325 8.55228 7.33325 8Z",fill:"currentColor"}),R.createElement("path",{d:"M7.33325 3.33333C7.33325 2.78105 7.78097 2.33333 8.33325 2.33333C8.88554 2.33333 9.33325 2.78105 9.33325 3.33333C9.33325 3.88562 8.88554 4.33333 8.33325 4.33333C7.78097 4.33333 7.33325 3.88562 7.33325 3.33333Z",fill:"currentColor"})),dP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M10.8654 2.31311C11.0607 2.11785 11.3772 2.11785 11.5725 2.31311L13.4581 4.19873C13.6534 4.39399 13.6534 4.71058 13.4581 4.90584L11.5725 6.79146C11.3772 6.98672 11.0607 6.98672 10.8654 6.79146C10.6701 6.5962 10.6701 6.27961 10.8654 6.08435L11.6162 5.33354H4V6.66687C4 7.03506 3.70152 7.33354 3.33333 7.33354C2.96514 7.33354 2.66666 7.03506 2.66666 6.66687L2.66666 4.66687C2.66666 4.29868 2.96514 4.0002 3.33333 4.0002H11.8454L10.8654 3.02022C10.6701 2.82496 10.6701 2.50838 10.8654 2.31311Z",fill:"currentColor"}),R.createElement("path",{d:"M12.4375 11.9998C12.8057 11.9998 13.1042 11.7013 13.1042 11.3331V9.33313C13.1042 8.96494 12.8057 8.66647 12.4375 8.66647C12.0693 8.66647 11.7708 8.96494 11.7708 9.33313V10.6665H4.15462L4.90543 9.91565C5.10069 9.72039 5.10069 9.40381 4.90543 9.20854C4.71017 9.01328 4.39359 9.01328 4.19832 9.20854L2.31271 11.0942C2.11744 11.2894 2.11744 11.606 2.31271 11.8013L4.19832 13.6869C4.39359 13.8821 4.71017 13.8821 4.90543 13.6869C5.10069 13.4916 5.10069 13.175 4.90543 12.9798L3.92545 11.9998H12.4375Z",fill:"currentColor"})),pP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3336 2.5C14.3336 2.22386 14.1097 2 13.8336 2C13.5574 2 13.3336 2.22386 13.3336 2.5V13.5C13.3336 13.7761 13.5574 14 13.8336 14C14.1097 14 14.3336 13.7761 14.3336 13.5V2.5ZM3.50618 2.21722C2.83954 1.82595 2 2.30667 2 3.07965V12.9201C2 13.6931 2.83954 14.1738 3.50618 13.7825L11.8893 8.86231C12.5477 8.47586 12.5477 7.52389 11.8893 7.13745L3.50618 2.21722Z",fill:"currentColor"})),hP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M3.99996 2C3.26358 2 2.66663 2.59695 2.66663 3.33333V12.6667C2.66663 13.403 3.26358 14 3.99996 14H5.33329C6.06967 14 6.66663 13.403 6.66663 12.6667V3.33333C6.66663 2.59695 6.06967 2 5.33329 2H3.99996Z",fill:"currentColor"}),R.createElement("path",{d:"M10.6666 2C9.93025 2 9.33329 2.59695 9.33329 3.33333V12.6667C9.33329 13.403 9.93025 14 10.6666 14H12C12.7363 14 13.3333 13.403 13.3333 12.6667V3.33333C13.3333 2.59695 12.7363 2 12 2H10.6666Z",fill:"currentColor"})),mP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M3.33337 3.46787C3.33337 2.52312 4.35948 1.93558 5.17426 2.41379L12.8961 6.94592C13.7009 7.41824 13.7009 8.58176 12.8961 9.05408L5.17426 13.5862C4.35948 14.0644 3.33337 13.4769 3.33337 12.5321V3.46787Z",fill:"currentColor"})),vP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.69214 13.5C1.69214 13.7761 1.916 14 2.19214 14C2.46828 14 2.69214 13.7761 2.69214 13.5L2.69214 2.5C2.69214 2.22386 2.46828 2 2.19214 2C1.916 2 1.69214 2.22386 1.69214 2.5V13.5ZM12.5192 13.7828C13.1859 14.174 14.0254 13.6933 14.0254 12.9204L14.0254 3.0799C14.0254 2.30692 13.1859 1.8262 12.5192 2.21747L4.13612 7.13769C3.47769 7.52414 3.47769 8.4761 4.13612 8.86255L12.5192 13.7828Z",fill:"currentColor"})),gP=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5303 6.46967C13.8232 6.76256 13.8232 7.23744 13.5303 7.53033L9.06066 12L13.5303 16.4697C13.8232 16.7626 13.8232 17.2374 13.5303 17.5303C13.2374 17.8232 12.7626 17.8232 12.4697 17.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L12.4697 6.46967C12.7626 6.17678 13.2374 6.17678 13.5303 6.46967Z",fill:"currentColor"})),yP=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4697 17.5303C10.1768 17.2374 10.1768 16.7626 10.4697 16.4697L14.9393 12L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L11.5303 17.5303C11.2374 17.8232 10.7626 17.8232 10.4697 17.5303Z",fill:"currentColor"})),wP=({children:e,enableReset:t,expand:n=!1,onBack:r,onExpand:i,onReset:o,title:a})=>{let s=S.useCallback(()=>{r()},[r]),l=S.useCallback(()=>{i()},[i]),u=S.useCallback(()=>{o()},[o]);return R.createElement(R.Fragment,null,!n&&R.createElement("button",{className:"popover-item","aria-label":`Go to ${a}`,onClick:l},R.createElement("span",{style:{flex:1}},a),R.createElement("span",null,R.createElement(yP,null))),n&&R.createElement("div",{className:"popover-submenu"},R.createElement("div",{className:"popover-header"},R.createElement("button",{onClick:s},R.createElement(gP,null)),R.createElement("div",{className:"popover-header-title",style:{flex:1}},R.createElement("span",null,a),t&&R.createElement("button",{className:"reset-theme",onClick:u,"aria-label":`Reset ${a}`},"Reset"))),e))},_P=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5283 5.9372C20.8211 6.23009 20.8211 6.70497 20.5283 6.99786L9.4631 18.063C9.32181 18.2043 9.12997 18.2833 8.93016 18.2826C8.73035 18.2819 8.53907 18.2015 8.39877 18.0593L3.46807 13.0596C3.17722 12.7647 3.18052 12.2898 3.47544 11.999C3.77036 11.7081 4.24522 11.7114 4.53608 12.0063L8.93646 16.4683L19.4676 5.9372C19.7605 5.64431 20.2354 5.64431 20.5283 5.9372Z",fill:"currentColor"})),SP=({onSelectItem:e,selected:t=!1,value:n,...r})=>{let i=S.useCallback(()=>{e==null||e(n)},[e,n]);return R.createElement("button",{"aria-label":`Select ${n}`,className:`popover-item ${t?"selected":""}`,onClick:i,...r},R.createElement("span",{style:{visibility:t?"visible":"hidden"}},R.createElement(_P,null)),R.createElement("span",{style:{flex:1}},n))},bP=({items:e=[],onSelectItem:t,onDismiss:n,...r})=>{let[i,o]=S.useState(""),a=S.useRef(null);nP(a,()=>{o(""),n()}),lP("Escape",()=>{o(""),n()});let s=S.useCallback(()=>{o("")},[o]),l=S.useCallback(c=>()=>o(c),[o]),u=S.useCallback((c,f)=>()=>t(c,f),[t]);return R.createElement("dialog",{ref:a,style:{padding:i?"0px":"8px"},className:"popover","aria-label":"Popover Menu",...r},R.createElement("ul",{"aria-label":"Popover content",className:"popover-content"},e.map(c=>R.createElement("li",{key:c.title,style:{width:"100%"}},(i===c.title||!i)&&R.createElement(wP,{expand:i===c.title,title:c.title,onExpand:l(c.title),onBack:s,enableReset:c.enableReset,onReset:u(c.title,"")},R.createElement("ul",{className:"popover-items","aria-label":`List of ${c.title}`},c.items.map(f=>R.createElement("li",{key:f.value},R.createElement(SP,{value:f.value,selected:f.selected,onSelectItem:u(c.title,f.value)})))))))))},EP=["play","stop","loop","next","previous","animations","themes"],CP=({buttons:e=EP,...t})=>{let n=$2(),r=Ar(D=>D.loop),i=Ar(D=>D.currentState),o=Ar(D=>D.seeker),a=Ar(D=>D.currentAnimationId),s=Ar(D=>D.defaultTheme),l=Ar(D=>D.direction),u=Ar(D=>D.activeStateId),c=S.useMemo(()=>i===en.Playing,[i]),[f,d]=S.useState(!1),[h,y]=S.useState([]),[m,w]=S.useState([]),[p,g]=S.useState([]),v=S.useMemo(()=>{let D=[],F=h.map(N=>({value:N.id,selected:a===N.id})),A=m.filter(N=>N.animations.length===0||N.animations.includes(a||"")).map(N=>({value:N.id,selected:s===N.id})),I=p.map(N=>({value:N,selected:u===N}));return Array.isArray(F)&&F.length!==0&&D.push({title:"Animations",items:F,enableReset:!1}),Array.isArray(I)&&I.length!==0&&D.push({title:"States",items:I,enableReset:!0}),Array.isArray(A)&&A.length!==0&&D.push({title:"Themes",items:A,enableReset:!!s}),D},[h,m,a,s,p,u]),_=S.useMemo(()=>e.includes("themes")&&Array.isArray(m)&&m.length?!0:e.includes("animations")&&Array.isArray(h)&&h.length>1,[v]),b=S.useCallback(()=>{d(!f)},[d]),E=S.useCallback(()=>{d(!1)},[d]),C=S.useCallback(()=>{n==null||n.toggleLoop()},[n]),x=S.useCallback(()=>{n==null||n.freeze()},[n]),O=S.useCallback(()=>{n==null||n.unfreeze()},[n]),k=S.useCallback(()=>{n==null||n.next()},[n]),T=S.useCallback(()=>{n==null||n.previous()},[n]),z=S.useCallback(()=>{n==null||n.togglePlay()},[n]),W=S.useCallback((D,F)=>{D==="Animations"&&(n==null||n.play(F)),D==="Themes"&&(n==null||n.setDefaultTheme(F)),D==="States"&&(F?n==null||n.enterInteractiveMode(F):n==null||n.exitInteractiveMode())},[n]),$=S.useCallback(D=>{n==null||n.seek(String(D.currentTarget.value).concat("%"))},[n]);function M(){var D,F,A;let I=(D=n==null?void 0:n.getManifest())==null?void 0:D.animations,N=(F=n==null?void 0:n.getManifest())==null?void 0:F.themes,j=(A=n==null?void 0:n.getManifest())==null?void 0:A.states;I&&y(I),N&&w(N),j&&g(j)}return S.useEffect(()=>{if(!(typeof n>"u"))return n==null||n.addEventListener("DOMLoaded",M),()=>{n==null||n.removeEventListener("DOMLoaded",M)}},[n]),R.createElement("div",{"aria-label":"lottie-animation-controls",className:"toolbar",...t},e.includes("previous")&&h.length>1&&R.createElement("button",{onClick:T,"aria-label":"play-previous"},R.createElement(vP,null)),e.includes("play")&&R.createElement("button",{onClick:z,"aria-label":"play-pause"},c?R.createElement(hP,null):R.createElement(mP,null)),e.includes("next")&&h.length>1&&R.createElement("button",{onClick:k,"aria-label":"play-next"},R.createElement(pP,null)),R.createElement("input",{style:{width:"100%","--seeker":o},className:`seeker ${l===1?"":"to-left"}`,type:"range",min:0,step:0,max:100,value:o||0,onInput:$,onMouseDown:x,onMouseUp:O,"aria-valuemin":1,"aria-valuemax":100,role:"slider","aria-valuenow":o,"aria-label":"lottie-seek-input"}),e.includes("loop")&&R.createElement("button",{onClick:C,className:r?"active":"","aria-label":"loop-toggle"},R.createElement(dP,null)),_&&R.createElement("div",{style:{position:"relative"}},R.createElement(bP,{items:v,open:f,onDismiss:E,onSelectItem:W}),R.createElement("button",{className:`${f?"popover-active":""}`,"aria-label":"open-popover",onClick:b},R.createElement(fP,null))))},xP=typeof window>"u"?S.useEffect:S.useLayoutEffect,OP=(e,t,n)=>{let[r]=S.useState(()=>new Q8(e,t.current,n)),i=S.useRef(!1);return xP(()=>{async function o(){!i.current&&t.current&&(i.current=!0,r.setContainer(t.current),await r.load())}return o(),()=>{i.current&&r.destroy()}},[r]),r};function hs(e,t){let n=S.useCallback(()=>t(e.getState()),[t,e]),r=S.useCallback(i=>e.state.subscribe(i),[e]);return R2(r,n,()=>t(dh))}var v0={animation:{position:"relative",width:"100%",height:"100%"},animationWithControls:{position:"relative"}},AP=R.forwardRef(({onEvent:e,activeAnimationId:t,autoplay:n,background:r="transparent",direction:i,intermission:o,loop:a,playMode:s,hover:l,speed:u,renderer:c="svg",rendererSettings:f={},src:d,className:h="",testId:y,children:m,defaultTheme:w,light:p=!1,worker:g=!1,activeStateId:v,lottieRef:_,...b},E)=>{let C=S.useRef(null),x=OP(d,C,{renderer:c,activeAnimationId:t,rendererSettings:{clearCanvas:!0,progressiveLoad:!1,hideOnTransparent:!0,...f},hover:l,loop:a,direction:i,speed:u,intermission:o,background:r,playMode:s,autoplay:l?!1:n,testId:y,defaultTheme:w,light:p,worker:g,activeStateId:v}),O=S.useRef(x);O.current=x,R.useImperativeHandle(E,()=>x,[x]),R.useImperativeHandle(_,()=>x,[x]);let k=hs(x,$=>$.currentState),T=hs(x,$=>$.frame),z=hs(x,$=>$.seeker),W=hs(x,$=>$.currentAnimationId);return jt(()=>{typeof a>"u"?O.current.revertToManifestValues(["loop"]):O.current.setLoop(a)},[a]),jt(()=>{[en.Initial,en.Loading].includes(k)||(typeof n>"u"?O.current.revertToManifestValues(["autoplay"]):O.current.setAutoplay(n))},[n]),jt(()=>{typeof i>"u"?O.current.revertToManifestValues(["direction"]):O.current.setDirection(i)},[i]),jt(()=>{typeof u>"u"?O.current.revertToManifestValues(["speed"]):O.current.setSpeed(u)},[u]),jt(()=>{typeof s>"u"?O.current.revertToManifestValues(["playMode"]):O.current.setMode(s)},[s]),jt(()=>{typeof l>"u"?O.current.revertToManifestValues(["hover"]):O.current.setHover(l)},[l]),jt(()=>{typeof r>"u"?O.current.setBackground("transparent"):O.current.setBackground(r)},[r]),jt(()=>{typeof o>"u"?O.current.revertToManifestValues(["intermission"]):O.current.setIntermission(o)},[o]),jt(()=>{typeof w>"u"||!w?O.current.revertToManifestValues(["defaultTheme"]):O.current.setDefaultTheme(w)},[w]),jt(()=>{t&&O.current.play(t)},[t]),jt(()=>(typeof v<"u"&&O.current.enterInteractiveMode(v),()=>{O.current.exitInteractiveMode()}),[v]),jt(()=>{typeof d<"u"&&O.current.updateSrc(d)},[d]),S.useEffect(()=>{let $=()=>{e==null||e(mt.Ready)},M=()=>{e==null||e(mt.DataReady)},D=()=>{e==null||e(mt.DataFail)},F=()=>{O.current.currentState!==en.Playing&&(e==null||e(mt.Complete))},A=()=>{e==null||e(mt.LoopComplete)};return O.current.addEventListener("DOMLoaded",$),O.current.addEventListener("data_ready",M),O.current.addEventListener("data_failed",D),O.current.addEventListener("complete",F),O.current.addEventListener("loopComplete",A),()=>{O.current.removeEventListener("DOMLoaded",$),O.current.removeEventListener("data_ready",M),O.current.removeEventListener("data_failed",D),O.current.removeEventListener("complete",F),O.current.removeEventListener("loopComplete",A)}},[]),S.useEffect(()=>{switch(k){case en.Stopped:e==null||e(mt.Stop);break;case en.Paused:e==null||e(mt.Pause);break;case en.Playing:e==null||e(mt.Play);break;case en.Frozen:e==null||e(mt.Freeze);break;case en.Error:e==null||e(mt.Error);break}},[k]),S.useEffect(()=>{e==null||e(mt.Frame,{frame:T,seeker:z})},[T]),R.createElement(uP,{value:x},R.createElement("div",{className:`dotlottie-container main ${m?"controls":""} ${h}`,lang:"en",...y&&{"data-testid":y},...b},R.createElement("div",{ref:C,"data-name":`${W}`,role:"figure",className:`animation ${m?"controls":""}`,style:m?v0.animationWithControls:v0.animation,...y&&{"data-testid":"animation"}},k===en.Error&&R.createElement("div",{...y&&{"data-testid":"error"},className:"error"},"⚠️")),m))});const kP=({activeAnimationId:e})=>{const t=S.useRef(),n=Ne(d=>d.playground.playerUrl),[r,i]=S.useState([]),[o,a]=S.useState(""),[s,l]=S.useState(0),u=S.useCallback((d,h)=>{var m,w,p;if(d===mt.Ready){const g=(w=(m=t.current)==null?void 0:m.getManifest())==null?void 0:w.states;i(g||[])}if(d===mt.Frame){const{frame:g}=h;l(Math.floor(g))}const y=(p=t.current)==null?void 0:p.getState();y&&a(y.activeStateId||"")},[t]),c=S.useCallback(()=>()=>{t.current&&t.current.exitInteractiveMode()},[t]),f=S.useCallback(d=>()=>{t.current&&t.current.enterInteractiveMode(d)},[t]);if(n)return P.jsx("div",{children:P.jsxs(P.Fragment,{children:[P.jsx(AP,{activeAnimationId:e||void 0,background:"white",onEvent:u,ref:t,src:n,children:P.jsxs("div",{className:"bg-white",children:[P.jsx(CP,{}),P.jsx("div",{className:"px-3 pb-1",children:P.jsxs("span",{className:"bg-gray-300 rounded px-2",children:["# ",P.jsx("span",{children:s})]})})]})}),P.jsx("div",{className:"flex flex-wrap gap-2 p-2 text-white",children:P.jsxs("div",{className:"text-white",children:[P.jsxs("div",{className:"mb-2 flex gap-2",children:[P.jsx("span",{children:"Interactivity states:"}),P.jsx(Ol,{disabled:!o,color:"red",onClick:c(),children:"Exit Interactivity"})]}),P.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(d=>P.jsx(Ol,{color:o===d?"green":"blue",onClick:f(d),children:d},d))})]})})]})})};const PP=({file:e,fileName:t})=>{const n=Au(),r=S.useRef(),i=Ne(L=>L.animations.list),o=Ne(L=>L.themes.list),a=Ne(L=>L.states.list),{addDotLottieAnimation:s,addDotLottieStateMachine:l,addDotLottieTheme:u,buildAndUpdateUrl:c,dotLottie:f,downloadDotLottie:d,fetchAndUpdateDotLottie:h,removeDotLottieAnimation:y,removeDotLottieState:m,removeDotLottieTheme:w,setDotLottie:p}=Kp(),g=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.content}),v=Ne(L=>{var V;return((V=L.editor.file)==null?void 0:V.type)||"json"}),_=Ne(L=>L.editor.animationId),b=Ne(L=>L.playground.workingFileName),E=S.useCallback(async(L,V)=>{let H,q="";if(L instanceof File?(H=await L.arrayBuffer(),q=L.name):(H=L,q=V||"new_awesome"),typeof H<"u")try{const ee=await f.fromArrayBuffer(H);n(Ls()),n(as(q)),p(ee)}catch(ee){throw ve(ee.message,{type:"error"}),ee}},[as,p]),C=S.useCallback(L=>{const V=L[0];typeof V>"u"||E(V)},[E]);S.useEffect(()=>{E(e,t)},[E]);const x=Ne(L=>L.editor.validationStatus),O=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.name}),k=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.path}),T=S.useCallback(L=>{x&&L&&n(xl(L))},[x,n]),z=Ne(L=>L.editor.updated),W=S.useCallback(()=>{var H;if(!x||!O)return;const L=(H=r.current)==null?void 0:H.getValue();let V;if(L){switch(k){case"States":if(V=JSON.parse(L),L&&O){const q=V.descriptor.id;l(V,O),n(kv({name:q}))}break;case"Themes":O&&u(L,O);break}n(xl(!1))}},[x,O,n,k]);function $(L){r.current=L}S.useEffect(()=>{f.animations.length&&(h(),c())},[f,c,h]);const M=S.useCallback(async(L,V)=>{var q,ee;n(Ls());let H;switch(L){case"States":H=(q=f.getStateMachine(V))==null?void 0:q.toString();break;case"Themes":H=await((ee=f.getTheme(V))==null?void 0:ee.toString());break}H&&n(kv({name:V,type:"json",path:L,content:v6(H)}))},[f,n]),D=S.useCallback(L=>{if(L.some(H=>H.severity===8)){n(Pv(!1));return}n(Pv(!0))},[n]),F=S.useCallback((L,V)=>{switch(L){case"States":m(V);break;case"Animations":y(V);break;case"Themes":w(V);break}(O===V||_===V)&&n(Ls())},[f,n,O,_]),A=S.useCallback(async(L,V)=>{const H=cd(V.name).replace(/(.json)/gu,"");let q;switch(L){case"States":q=JSON.parse(await V.text()),l(q);break;case"Animations":q=JSON.parse(await V.text()),s(q,H);break;case"Themes":q=await V.text(),u(q,V.name);break}},[f]),I=S.useCallback(()=>{h(),c()},[h,c]),N=S.useCallback(async(L,V)=>{const H=cd(V).replace(/(.json)/gu,"");let q;switch(L){case"States":q=g6(),q.descriptor.id=H,l(q);break;case"Themes":u("{}",H);break}},[f]),j=S.useCallback((L,V)=>{n(_6(V.replace(/.json/gu,"")))},[n]),B=S.useCallback(L=>{n(as(L))},[as,n]);return P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"w-full bg-dark p-2 flex gap-2 justify-end",children:[P.jsx(ia,{onDrop:C,accept:"lottie",children:L=>P.jsxs(Ol,{...L.getRootProps(),children:[P.jsx("input",{...L.getInputProps()}),"Start Over"]})}),P.jsx("div",{className:"flex-1 flex justify-center items-center text-gray-400 text-sm",children:P.jsx(b6,{title:b,onChange:B})}),P.jsx(Ol,{onClick:d,children:"Download"})]}),P.jsx("div",{className:"flex grow border-t border-gray-600 flex-1 max-h-[calc(100vh-2.9rem)]",children:P.jsxs(Fy,{autoSaveId:"dotlottie-playground",direction:"horizontal",className:"h-full",children:[P.jsx(ks,{defaultSize:10,maxSize:40,className:"bg-dark",children:P.jsxs("section",{className:"flex flex-col h-full",children:[P.jsx(Tc,{className:"flex-1 h-1/3",title:"Animations",files:i,onClick:j,onRemove:F,onUpload:A}),P.jsx(Tc,{className:"flex-1 h-1/3",title:"States",files:a,onClick:M,onRemove:F,onUpload:A,onAddNew:N}),P.jsx(Tc,{className:"flex-1 h-1/3",title:"Themes",files:o,onClick:M,onRemove:F,onUpload:A,onAddNew:N})]})}),P.jsx(Gf,{className:"bg-gray-500 w-1"}),P.jsx(ks,{children:P.jsx(ia,{onDrop:C,accept:"lottie",noClick:!0,children:L=>P.jsxs("div",{className:"flex flex-col w-full h-full relative",...L.getRootProps(),children:[P.jsx("input",{...L.getInputProps()}),L.isDragActive&&P.jsx("div",{className:"absolute z-10 inset-0 bg-gray-500 opacity-80 flex justify-center items-center text-white text-3xl",children:"Drop your .lottie here"}),_&&P.jsx(xk,{onUpdate:I}),g&&P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[P.jsx("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:O}),P.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:W,disabled:!z,children:P.jsx(Sy,{size:33})})]}),P.jsx(SC,{className:"flex-1 max-h-[calc(100vh-5.5rem)]",language:v,width:"100%",theme:"vs-dark",options:{fontSize:15,formatOnPaste:!0,formatOnType:!0,minimap:{enabled:!1}},loading:"Loading...",value:g,onChange:T,onMount:$,onValidate:D})]})]})})}),P.jsx(Gf,{className:"bg-gray-500 w-1"}),P.jsx(ks,{defaultSize:25,children:P.jsx(kP,{activeAnimationId:_})})]})})]})},IP=[{name:"toggle.lottie",path:"/player-component/toggle.lottie"},{name:"interactivity_example.lottie",path:"/player-component/interactivity_example.lottie"},{name:"aniki_hamster.lottie",path:"/player-component/aniki_hamster.lottie"},{name:"theming_example.lottie",path:"/player-component/theming_example.lottie"}],MP=({onStart:e})=>{const t=S.useCallback(async(o,a)=>{let s,l="";o instanceof File?(s=await o.arrayBuffer(),l=o.name):(s=o,l=a||"new_awesome"),typeof s<"u"&&e(s,l)},[e]),n=S.useCallback(o=>{const a=o[0];a&&t(a)},[e]),r=S.useCallback(async(o,a)=>{const l=await(await fetch(o)).arrayBuffer();t(l,a)},[]),i=S.useCallback(o=>()=>{r(o.path,o.name)},[e]);return P.jsx(ia,{onDrop:n,accept:"lottie",noClick:!0,children:o=>P.jsxs("div",{...o.getRootProps(),className:"h-full bg-dark text-white flex justify-center items-center",children:[P.jsx("input",{...o.getInputProps()}),o.isDragActive?P.jsx("h1",{className:"text-5xl mb-4",children:"Drop it!!!! Almost there :)"}):P.jsxs("div",{className:"p-10 rounded text-gray-400 max-w-2xl",children:[P.jsx("h1",{className:"text-5xl mb-4",children:"DotLottie Playground :)"}),P.jsxs("p",{className:"text-2xl mb-6",children:["To start drop a ",P.jsx("span",{className:"text-red-600",children:".lottie"}),". You could also select a sample file below."]}),P.jsx("h2",{className:"text-lg mb-2",children:"Sample files"}),P.jsx("ul",{className:"text-sm",children:IP.map(a=>P.jsx("li",{children:P.jsxs("button",{className:"flex gap-2 items-center hover:text-white mb-1",onClick:i(a),children:[P.jsx(cE,{className:"fill-yellow-500"}),a.name]})},a.name))})]})]})})},LP=()=>{const[e,t]=S.useState({}),n=S.useCallback((r,i)=>{t({name:i,arrayBuffer:r})},[t]);return P.jsxs("div",{className:"h-screen bg-dark",children:[e.arrayBuffer?P.jsx(PP,{file:e.arrayBuffer,fileName:e.name||"unammed.lottie"}):P.jsx(MP,{onStart:n}),P.jsx(Nf,{})]})},DP=Wx({reducer:{animations:r6,themes:f6,states:l6,editor:S6,playground:o6}});Wc.createRoot(document.getElementById("root")).render(P.jsx(R.StrictMode,{children:P.jsx(iE,{store:DP,children:P.jsx(y6,{children:P.jsx(LP,{})})})}));export{si as a,WP as d,ae as o,Rt as u}; +`]))),nA=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return Q({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},Rc=function(t){var n=t.delay,r=t.offset;return J("span",{css:Xp({animation:"".concat(tA," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},rA=function(t){var n=t.innerProps,r=t.isRtl,i=t.size,o=i===void 0?4:i,a=Qn(t,K5);return J("div",X({},Fe(Q(Q({},a),{},{innerProps:n,isRtl:r,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),J(Rc,{delay:0,offset:r}),J(Rc,{delay:160,offset:!0}),J(Rc,{delay:320,offset:!r}))},iA=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return Q({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},oA=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return J("div",X({ref:o},Fe(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a),n)},aA=oA,sA=["data"],lA=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},uA=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,u=t.label,c=t.theme,f=t.selectProps;return J("div",X({},Fe(t,"group",{group:!0}),l),J(a,X({},s,{selectProps:f,theme:c,getStyles:i,getClassNames:o,cx:r}),u),J("div",null,n))},cA=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Q({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},fA=function(t){var n=Bw(t);n.data;var r=Qn(n,sA);return J("div",X({},Fe(t,"groupHeading",{"group-heading":!0}),r))},dA=uA,pA=["innerRef","isDisabled","isHidden","inputClassName"],hA=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return Q(Q({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},mA),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},Jw={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mA={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Q({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Jw)},vA=function(t){return Q({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},Jw)},gA=function(t){var n=t.cx,r=t.value,i=Bw(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,u=Qn(i,pA);return J("div",X({},Fe(t,"input",{"input-container":!0}),{"data-value":r||""}),J("input",X({className:n({input:!0},l),ref:o,style:vA(s),disabled:a},u)))},yA=gA,wA=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return Q({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},_A=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return Q({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},SA=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return Q({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},Xw=function(t){var n=t.children,r=t.innerProps;return J("div",r,n)},bA=Xw,EA=Xw;function CA(e){var t=e.children,n=e.innerProps;return J("div",X({role:"button"},n),t||J(nh,{size:14}))}var xA=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,u=r.Container,c=r.Label,f=r.Remove;return J(u,{data:i,innerProps:Q(Q({},Fe(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},J(c,{data:i,innerProps:Q({},Fe(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),J(f,{data:i,innerProps:Q(Q({},Fe(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},OA=xA,AA=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return Q({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},kA=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return J("div",X({},Fe(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},PA=kA,IA=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Q({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},MA=function(t){var n=t.children,r=t.innerProps;return J("div",X({},Fe(t,"placeholder",{placeholder:!0}),r),n)},LA=MA,DA=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return Q({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},TA=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return J("div",X({},Fe(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},FA=TA,$A={ClearIndicator:X5,Control:aA,DropdownIndicator:Y5,DownChevron:Qw,CrossIcon:nh,Group:dA,GroupHeading:fA,IndicatorsContainer:W5,IndicatorSeparator:eA,Input:yA,LoadingIndicator:rA,Menu:M5,MenuList:D5,MenuPortal:N5,LoadingMessage:R5,NoOptionsMessage:$5,MultiValue:OA,MultiValueContainer:bA,MultiValueLabel:EA,MultiValueRemove:CA,Option:PA,Placeholder:LA,SelectContainer:V5,SingleValue:FA,ValueContainer:U5},RA=function(t){return Q(Q({},$A),t.components)},Kv=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function jA(e,t){return!!(e===t||Kv(e)&&Kv(t))}function NA(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,u=t.isSelected,c=function(y,m){return y&&y.length?"".concat(y.indexOf(m)+1," of ").concat(y.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(c(s,r),".");if(n==="menu"){var f=l?" disabled":"",d="".concat(u?"selected":"focused").concat(f);return"option ".concat(a," ").concat(d,", ").concat(c(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},HA=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,u=t.id,c=l.ariaLiveMessages,f=l.getOptionLabel,d=l.inputValue,h=l.isMulti,y=l.isOptionDisabled,m=l.isSearchable,w=l.menuIsOpen,p=l.options,g=l.screenReaderStatus,v=l.tabSelectsValue,_=l["aria-label"],b=l["aria-live"],E=S.useMemo(function(){return Q(Q({},UA),c||{})},[c]),C=S.useMemo(function(){var $="";if(n&&E.onChange){var M=n.option,D=n.options,F=n.removedValue,A=n.removedValues,I=n.value,N=function(ee){return Array.isArray(ee)?null:ee},j=F||M||N(I),B=j?f(j):"",L=D||A||void 0,V=L?L.map(f):[],H=Q({isDisabled:j&&y(j,s),label:B,labels:V},n);$=E.onChange(H)}return $},[n,E,y,s,f]),x=S.useMemo(function(){var $="",M=r||i,D=!!(r&&s&&s.includes(r));if(M&&E.onFocus){var F={focused:M,label:f(M),isDisabled:y(M,s),isSelected:D,options:o,context:M===r?"menu":"value",selectValue:s};$=E.onFocus(F)}return $},[r,i,f,y,E,o,s]),O=S.useMemo(function(){var $="";if(w&&p.length&&E.onFilter){var M=g({count:o.length});$=E.onFilter({inputValue:d,resultsMessage:M})}return $},[o,d,w,E,p,g]),k=S.useMemo(function(){var $="";if(E.guidance){var M=i?"value":w?"menu":"input";$=E.guidance({"aria-label":_,context:M,isDisabled:r&&y(r,s),isMulti:h,isSearchable:m,tabSelectsValue:v})}return $},[_,r,i,h,y,m,w,E,s,v]),T="".concat(x," ").concat(O," ").concat(k),z=J(S.Fragment,null,J("span",{id:"aria-selection"},C),J("span",{id:"aria-context"},T)),W=(n==null?void 0:n.action)==="initial-input-focus";return J(S.Fragment,null,J(Gv,{id:u},W&&z),J(Gv,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text"},a&&!W&&z))},WA=HA,wd=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],qA=new RegExp("["+wd.map(function(e){return e.letters}).join("")+"]","g"),Zw={};for(var jc=0;jc-1}},YA=["innerRef"];function JA(e){var t=e.innerRef,n=Qn(e,YA),r=E5(n,"onExited","in","enter","exit","appear");return J("input",X({ref:t},r,{css:Xp({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var XA=function(t){t.preventDefault(),t.stopPropagation()};function ZA(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=S.useRef(!1),s=S.useRef(!1),l=S.useRef(0),u=S.useRef(null),c=S.useCallback(function(w,p){if(u.current!==null){var g=u.current,v=g.scrollTop,_=g.scrollHeight,b=g.clientHeight,E=u.current,C=p>0,x=_-b-v,O=!1;x>p&&a.current&&(r&&r(w),a.current=!1),C&&s.current&&(o&&o(w),s.current=!1),C&&p>x?(n&&!a.current&&n(w),E.scrollTop=_,O=!0,a.current=!0):!C&&-p>v&&(i&&!s.current&&i(w),E.scrollTop=0,O=!0,s.current=!0),O&&XA(w)}},[n,r,i,o]),f=S.useCallback(function(w){c(w,w.deltaY)},[c]),d=S.useCallback(function(w){l.current=w.changedTouches[0].clientY},[]),h=S.useCallback(function(w){var p=l.current-w.changedTouches[0].clientY;c(w,p)},[c]),y=S.useCallback(function(w){if(w){var p=_5?{passive:!1}:!1;w.addEventListener("wheel",f,p),w.addEventListener("touchstart",d,p),w.addEventListener("touchmove",h,p)}},[h,d,f]),m=S.useCallback(function(w){w&&(w.removeEventListener("wheel",f,!1),w.removeEventListener("touchstart",d,!1),w.removeEventListener("touchmove",h,!1))},[h,d,f]);return S.useEffect(function(){if(t){var w=u.current;return y(w),function(){m(w)}}},[t,y,m]),function(w){u.current=w}}var Yv=["boxSizing","height","overflow","paddingRight","position"],Jv={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Xv(e){e.preventDefault()}function Zv(e){e.stopPropagation()}function e0(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function t0(){return"ontouchstart"in window||navigator.maxTouchPoints}var n0=!!(typeof window<"u"&&window.document&&window.document.createElement),ho=0,ai={capture:!1,passive:!1};function ek(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=S.useRef({}),o=S.useRef(null),a=S.useCallback(function(l){if(n0){var u=document.body,c=u&&u.style;if(r&&Yv.forEach(function(y){var m=c&&c[y];i.current[y]=m}),r&&ho<1){var f=parseInt(i.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+f||0;Object.keys(Jv).forEach(function(y){var m=Jv[y];c&&(c[y]=m)}),c&&(c.paddingRight="".concat(h,"px"))}u&&t0()&&(u.addEventListener("touchmove",Xv,ai),l&&(l.addEventListener("touchstart",e0,ai),l.addEventListener("touchmove",Zv,ai))),ho+=1}},[r]),s=S.useCallback(function(l){if(n0){var u=document.body,c=u&&u.style;ho=Math.max(ho-1,0),r&&ho<1&&Yv.forEach(function(f){var d=i.current[f];c&&(c[f]=d)}),u&&t0()&&(u.removeEventListener("touchmove",Xv,ai),l&&(l.removeEventListener("touchstart",e0,ai),l.removeEventListener("touchmove",Zv,ai)))}},[r]);return S.useEffect(function(){if(t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var tk=function(){return document.activeElement&&document.activeElement.blur()},nk={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function rk(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,u=ZA({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),c=ek({isEnabled:n}),f=function(h){u(h),c(h)};return J(S.Fragment,null,n&&J("div",{onClick:tk,css:nk}),t(f))}var ik={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},ok=function(t){var n=t.name,r=t.onFocus;return J("input",{required:!0,name:n,tabIndex:-1,"aria-hidden":"true",onFocus:r,css:ik,value:"",onChange:function(){}})},ak=ok,sk=function(t){return t.label},lk=function(t){return t.label},uk=function(t){return t.value},ck=function(t){return!!t.isDisabled},fk={clearIndicator:J5,container:z5,control:iA,dropdownIndicator:Q5,group:lA,groupHeading:cA,indicatorsContainer:H5,indicatorSeparator:Z5,input:hA,loadingIndicator:nA,loadingMessage:F5,menu:k5,menuList:L5,menuPortal:j5,multiValue:wA,multiValueLabel:_A,multiValueRemove:SA,noOptionsMessage:T5,option:AA,placeholder:IA,singleValue:DA,valueContainer:B5},dk={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},pk=4,t2=4,hk=38,mk=t2*2,vk={baseUnit:t2,controlHeight:hk,menuGutter:mk},Vc={borderRadius:pk,colors:dk,spacing:vk},gk={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Wv(),captureMenuScroll:!Wv(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:QA(),formatGroupLabel:sk,getOptionLabel:lk,getOptionValue:uk,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:ck,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!y5(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function r0(e,t,n,r){var i=o2(e,t,n),o=a2(e,t,n),a=i2(e,t),s=Dl(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function n2(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return r0(e,a,t,s)}).filter(function(a){return i0(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=r0(e,n,t,r);return i0(e,o)?o:void 0}).filter(S5)}function r2(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,xw(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function yk(e,t){return r2(n2(e,t))}function i0(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!l2(e)||!o)&&s2(e,{label:a,value:s,data:i},r)}function wk(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i-1?n:t[0]}var i2=function(t,n){return t.getOptionLabel(n)},Dl=function(t,n){return t.getOptionValue(n)};function o2(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function a2(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=Dl(e,t);return n.some(function(i){return Dl(e,i)===r})}function s2(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var l2=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},Sk=1,u2=function(e){Y6(n,e);var t=eO(n);function n(r){var i;if(G6(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,l){var u=i.props,c=u.onChange,f=u.name;l.name=f,i.ariaOnChange(s,l),c(s,l)},i.setValue=function(s,l,u){var c=i.props,f=c.closeMenuOnSelect,d=c.isMulti,h=c.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:h}),f&&(i.setState({inputIsHiddenAfterUpdate:!d}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:l,option:u})},i.selectOption=function(s){var l=i.props,u=l.blurInputOnSelect,c=l.isMulti,f=l.name,d=i.state.selectValue,h=c&&i.isOptionSelected(s,d),y=i.isOptionDisabled(s,d);if(h){var m=i.getOptionValue(s);i.setValue(d.filter(function(w){return i.getOptionValue(w)!==m}),"deselect-option",s)}else if(!y)c?i.setValue([].concat(xw(d),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:f});return}u&&i.blurInput()},i.removeValue=function(s){var l=i.props.isMulti,u=i.state.selectValue,c=i.getOptionValue(s),f=u.filter(function(h){return i.getOptionValue(h)!==c}),d=fs(l,f,f[0]||null);i.onChange(d,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(fs(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,l=i.state.selectValue,u=l[l.length-1],c=l.slice(0,l.length-1),f=fs(s,c,c[0]||null);i.onChange(f,{action:"pop-value",removedValue:u})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,l=new Array(s),u=0;ud||f>d}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var l=i.props.inputValue,u=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(u,{action:"input-change",prevInputValue:l}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var l=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:l}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){i.blockOptionHover||i.state.focusedOption===s||i.setState({focusedOption:s})},i.shouldHideSelectedOptions=function(){return l2(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var l=i.props,u=l.isMulti,c=l.backspaceRemovesValue,f=l.escapeClearsValue,d=l.inputValue,h=l.isClearable,y=l.isDisabled,m=l.menuIsOpen,w=l.onKeyDown,p=l.tabSelectsValue,g=l.openMenuOnFocus,v=i.state,_=v.focusedOption,b=v.focusedValue,E=v.selectValue;if(!y&&!(typeof w=="function"&&(w(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!u||d)return;i.focusValue("previous");break;case"ArrowRight":if(!u||d)return;i.focusValue("next");break;case"Delete":case"Backspace":if(d)return;if(b)i.removeValue(b);else{if(!c)return;u?i.popValue():h&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!m||!p||!_||g&&i.isOptionSelected(_,E))return;i.selectOption(_);break;case"Enter":if(s.keyCode===229)break;if(m){if(!_||i.isComposing)return;i.selectOption(_);break}return;case"Escape":m?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:d}),i.onMenuClose()):h&&f&&i.clearValue();break;case" ":if(d)return;if(!m){i.openMenu("first");break}if(!_)return;i.selectOption(_);break;case"ArrowUp":m?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":m?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!m)return;i.focusOption("pageup");break;case"PageDown":if(!m)return;i.focusOption("pagedown");break;case"Home":if(!m)return;i.focusOption("first");break;case"End":if(!m)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++Sk),i.state.selectValue=Uv(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[a]}return i}return Q6(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Hv(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Hv(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,u=this.buildFocusableOptions(),c=i==="first"?0:u.length-1;if(!this.props.isMulti){var f=u.indexOf(s[0]);f>-1&&(c=f)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:u[c]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var u=a.length-1,c=-1;if(a.length){switch(i){case"previous":l===0?c=0:l===-1?c=u:c=l-1;break;case"next":l>-1&&l0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(s.length){var l=0,u=s.indexOf(a);a||(u=-1),i==="up"?l=u>0?u-1:s.length-1:i==="down"?l=(u+1)%s.length:i==="pageup"?(l=u-o,l<0&&(l=0)):i==="pagedown"?(l=u+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Vc):Q(Q({},Vc),this.props.theme):Vc}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,u=this.selectOption,c=this.setValue,f=this.props,d=f.isMulti,h=f.isRtl,y=f.options,m=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:m,isMulti:d,isRtl:h,options:y,selectOption:u,selectProps:f,setValue:c,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return o2(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return a2(this.props,i,o)}},{key:"filterOption",value:function(i,o){return s2(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,u=i.tabIndex,c=i.form,f=i.menuIsOpen,d=i.required,h=this.getComponents(),y=h.Input,m=this.state,w=m.inputIsHidden,p=m.ariaSelection,g=this.commonProps,v=s||this.getElementId("input"),_=Q(Q(Q({"aria-autocomplete":"list","aria-expanded":f,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":d,role:"combobox"},f&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?S.createElement(y,X({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:v,innerRef:this.getInputRef,isDisabled:o,isHidden:w,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:u,form:c,type:"text",value:l},_)):S.createElement(JA,X({id:v,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Ml,onFocus:this.onInputFocus,disabled:o,tabIndex:u,inputMode:"none",form:c,value:""},_))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,u=o.MultiValueRemove,c=o.SingleValue,f=o.Placeholder,d=this.commonProps,h=this.props,y=h.controlShouldRenderValue,m=h.isDisabled,w=h.isMulti,p=h.inputValue,g=h.placeholder,v=this.state,_=v.selectValue,b=v.focusedValue,E=v.isFocused;if(!this.hasValue()||!y)return p?null:S.createElement(f,X({},d,{key:"placeholder",isDisabled:m,isFocused:E,innerProps:{id:this.getElementId("placeholder")}}),g);if(w)return _.map(function(x,O){var k=x===b,T="".concat(i.getOptionLabel(x),"-").concat(i.getOptionValue(x));return S.createElement(a,X({},d,{components:{Container:s,Label:l,Remove:u},isFocused:k,isDisabled:m,key:T,index:O,removeProps:{onClick:function(){return i.removeValue(x)},onTouchEnd:function(){return i.removeValue(x)},onMouseDown:function(W){W.preventDefault()}},data:x}),i.formatOptionLabel(x,"value"))});if(p)return null;var C=_[0];return S.createElement(c,X({},d,{data:C,isDisabled:m}),this.formatOptionLabel(C,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||u)return null;var f={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:f,isFocused:c}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,u=s.isLoading,c=this.state.isFocused;if(!o||!u)return null;var f={"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:f,isDisabled:l,isFocused:c}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,u=this.state.isFocused;return S.createElement(a,X({},s,{isDisabled:l,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,u={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return S.createElement(o,X({},a,{innerProps:u,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,u=o.MenuList,c=o.MenuPortal,f=o.LoadingMessage,d=o.NoOptionsMessage,h=o.Option,y=this.commonProps,m=this.state.focusedOption,w=this.props,p=w.captureMenuScroll,g=w.inputValue,v=w.isLoading,_=w.loadingMessage,b=w.minMenuHeight,E=w.maxMenuHeight,C=w.menuIsOpen,x=w.menuPlacement,O=w.menuPosition,k=w.menuPortalTarget,T=w.menuShouldBlockScroll,z=w.menuShouldScrollIntoView,W=w.noOptionsMessage,$=w.onMenuScrollToTop,M=w.onMenuScrollToBottom;if(!C)return null;var D=function(L,V){var H=L.type,q=L.data,ee=L.isDisabled,ce=L.isSelected,ge=L.label,Ce=L.value,he=m===q,ye=ee?void 0:function(){return i.onOptionHover(q)},$e=ee?void 0:function(){return i.selectOption(q)},Ct="".concat(i.getElementId("option"),"-").concat(V),La={id:Ct,onClick:$e,onMouseMove:ye,onMouseOver:ye,tabIndex:-1};return S.createElement(h,X({},y,{innerProps:La,data:q,isDisabled:ee,isSelected:ce,key:Ct,label:ge,type:H,value:Ce,isFocused:he,innerRef:he?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(L.data,"menu"))},F;if(this.hasOptions())F=this.getCategorizedOptions().map(function(B){if(B.type==="group"){var L=B.data,V=B.options,H=B.index,q="".concat(i.getElementId("group"),"-").concat(H),ee="".concat(q,"-heading");return S.createElement(a,X({},y,{key:q,data:L,options:V,Heading:s,headingProps:{id:ee,data:B.data},label:i.formatGroupLabel(B.data)}),B.options.map(function(ce){return D(ce,"".concat(H,"-").concat(ce.index))}))}else if(B.type==="option")return D(B,"".concat(B.index))});else if(v){var A=_({inputValue:g});if(A===null)return null;F=S.createElement(f,y,A)}else{var I=W({inputValue:g});if(I===null)return null;F=S.createElement(d,y,I)}var N={minMenuHeight:b,maxMenuHeight:E,menuPlacement:x,menuPosition:O,menuShouldScrollIntoView:z},j=S.createElement(P5,X({},y,N),function(B){var L=B.ref,V=B.placerProps,H=V.placement,q=V.maxHeight;return S.createElement(l,X({},y,N,{innerRef:L,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:v,placement:H}),S.createElement(rk,{captureEnabled:p,onTopArrive:$,onBottomArrive:M,lockEnabled:T},function(ee){return S.createElement(u,X({},y,{innerRef:function(ge){i.getMenuListRef(ge),ee(ge)},isLoading:v,maxHeight:q,focusedOption:m}),F)}))});return k||O==="fixed"?S.createElement(c,X({},y,{appendTo:k,controlElement:this.controlRef,menuPlacement:x,menuPosition:O}),j):j}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,u=o.name,c=o.required,f=this.state.selectValue;if(c&&!this.hasValue()&&!s)return S.createElement(ak,{name:u,onFocus:this.onValueInputFocus});if(!(!u||s))if(l)if(a){var d=f.map(function(m){return i.getOptionValue(m)}).join(a);return S.createElement("input",{name:u,type:"hidden",value:d})}else{var h=f.length>0?f.map(function(m,w){return S.createElement("input",{key:"i-".concat(w),name:u,type:"hidden",value:i.getOptionValue(m)})}):S.createElement("input",{name:u,type:"hidden",value:""});return S.createElement("div",null,h)}else{var y=f[0]?this.getOptionValue(f[0]):"";return S.createElement("input",{name:u,type:"hidden",value:y})}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,u=o.isFocused,c=o.selectValue,f=this.getFocusableOptions();return S.createElement(WA,X({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:u,selectValue:c,focusableOptions:f}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,u=this.props,c=u.className,f=u.id,d=u.isDisabled,h=u.menuIsOpen,y=this.state.isFocused,m=this.commonProps=this.getCommonProps();return S.createElement(s,X({},m,{className:c,innerProps:{id:f,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:y}),this.renderLiveRegion(),S.createElement(o,X({},m,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:y,menuIsOpen:h}),S.createElement(l,X({},m,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),S.createElement(a,X({},m,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,u=o.ariaSelection,c=o.isFocused,f=o.prevWasFocused,d=i.options,h=i.value,y=i.menuIsOpen,m=i.inputValue,w=i.isMulti,p=Uv(h),g={};if(a&&(h!==a.value||d!==a.options||y!==a.menuIsOpen||m!==a.inputValue)){var v=y?yk(i,p):[],_=s?wk(o,p):null,b=_k(o,v);g={selectValue:p,focusedOption:b,focusedValue:_,clearFocusValueOnUpdate:!1}}var E=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},C=u,x=c&&f;return c&&!x&&(C={value:fs(w,p,p[0]||null),options:p,action:"initial-input-focus"},x=!f),(u==null?void 0:u.action)==="initial-input-focus"&&(C=null),Q(Q(Q({},g),E),{},{prevProps:i,ariaSelection:C,prevWasFocused:x})}}]),n}(S.Component);u2.defaultProps=gk;var bk=S.forwardRef(function(e,t){var n=K6(e);return S.createElement(u2,X({ref:t},n))}),Ek=bk;function Ck(e){return P.jsx(Ek,{classNames:{container:()=>"text-lg bg-white rounded text-gray-400",valueContainer:()=>"text-lg !text-gray-600 !py-1",singleValue:()=>"text-lg !text-gray-600 py-1",multiValue:()=>"text-lg !text-gray-600",menuList:()=>"text-lg !text-gray-600"},...e})}const ds=({label:e,multiple:t,onChange:n,options:r,value:i})=>{const o=S.useMemo(()=>{if(!i)return t?[]:void 0;const s=i.split(",");return t?r.filter(l=>s.includes(l.value)):r.find(l=>l.value===i)},[i,r,t]),a=S.useCallback(s=>{if(Array.isArray(s))n==null||n(s.map(l=>l.value).join(","));else{const l=s;n==null||n((l==null?void 0:l.value)||"")}},[n]);return P.jsxs("div",{className:"flex flex-col text-gray-400 w-full max-w-xs hover:text-white",children:[P.jsx("span",{className:"flex-1 text-lg text-left",children:e}),P.jsx(Ck,{value:o,isMulti:t,name:e,options:r,onChange:a})]})},xk=({onUpdate:e})=>{const{dotLottie:t,setAnimationOptions:n}=Kp(),r=Au(),i=Ne(d=>d.editor.animationOptions),o=Ne(d=>d.editor.animationId),a=Ne(d=>d.editor.updated),s=Ne(d=>d.themes.list),l=S.useMemo(()=>s.map(({name:d})=>({label:d,value:d})),[s]),u=S.useMemo(()=>{var h;const d=[{label:"None",value:""}];return typeof i.assignedThemes<"u"&&Array.isArray(i.assignedThemes)?d:d.concat(((h=i.assignedThemes)==null?void 0:h.split(",").map(y=>({label:y,value:y})))||[])},[i,o]);S.useEffect(()=>{if(o)return(async()=>{const d=await t.getAnimation(o);d&&r(Av({direction:d.direction,speed:d.speed,playMode:d.playMode,loop:d.loop,autoplay:d.autoplay,hover:d.hover,intermission:d.intermission,defaultTheme:d.defaultTheme,assignedThemes:d.themes.map(h=>h.id).join(",")||void 0,defaultActiveAnimation:d.defaultActiveAnimation}))})(),()=>{r(Av({}))}},[r,t,o]);const c=S.useCallback(d=>h=>{d==="assignedThemes"&&!String(h).split(",").includes(i.defaultTheme||"")&&r(Iv({defaultTheme:""})),r(Iv({[d]:h})),r(xl(!0))},[r,i]),f=S.useCallback(()=>{o&&(n(o,i),r(xl(!1)),e())},[o,i,n,r,e]);return P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[P.jsxs("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:["Animation: ",o]}),P.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:f,disabled:!a,children:P.jsx(Sy,{size:33})})]}),P.jsxs("div",{className:"p-8 flex-1 max-h-[calc(100vh-5.5rem)] overflow-y-auto custom-scrollbar",children:[P.jsx("div",{className:"text-white",children:"Playback options"}),P.jsx("ul",{children:Object.keys(i).map(d=>["loop","autoplay","hover"].includes(d)?P.jsx("li",{children:P.jsx(Dv,{label:d,value:i[d],onToggle:c(d)})},d):["playMode"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:d,value:i[d],options:[{label:"Normal",value:"normal"},{label:"Bounce",value:"bounce"}]})},d):["direction"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:d,value:String(i[d]),options:[{label:"Normal",value:"1"},{label:"Inverted",value:"-1"}]})},d):["speed","intermission"].includes(d)?P.jsx("li",{children:P.jsx(B6,{label:d,value:i[d],onChange:c(d)})},d):["defaultTheme"].includes(d)?P.jsx("li",{children:P.jsx(ds,{onChange:c(d),label:"defaultTheme",options:u||[],value:i[d]||""})},d):void 0)}),P.jsx("div",{className:"text-white mt-8",children:"Other options"}),P.jsxs("div",{children:[P.jsx(ds,{multiple:!0,onChange:c("assignedThemes"),label:"Assign Themes",value:i.assignedThemes,options:l}),P.jsx(Dv,{label:"Default ActiveAnimation",value:i.defaultActiveAnimation,onToggle:c("defaultActiveAnimation")})]})]})]})},Ok="modulepreload",Ak=function(e){return"/player-component/"+e},o0={},Tn=function(t,n,r){if(!n||n.length===0)return t();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Ak(o),o in o0)return;o0[o]=!0;const a=o.endsWith(".css"),s=a?'[rel="stylesheet"]':"";if(!!r)for(let c=i.length-1;c>=0;c--){const f=i[c];if(f.href===o&&(!a||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${s}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Ok,a||(u.as="script",u.crossOrigin=""),u.href=o,document.head.appendChild(u),a)return new Promise((c,f)=>{u.addEventListener("load",c),u.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t()).catch(o=>{const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=o,window.dispatchEvent(a),!a.defaultPrevented)throw o})};var a0={},kk=function(e,t,n,r,i){var o=new Worker(a0[t]||(a0[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(a){var s=a.data,l=s.$e$;if(l){var u=new Error(l[0]);u.code=l[1],u.stack=l[2],i(u,null)}else i(null,s)},o.postMessage(n,r),o},ct=Uint8Array,Rr=Uint16Array,c2=Int32Array,rh=new ct([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ih=new ct([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),f2=new ct([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d2=function(e,t){for(var n=new Rr(31),r=0;r<31;++r)n[r]=t+=1<>1|(le&21845)<<1,Dn=(Dn&52428)>>2|(Dn&13107)<<2,Dn=(Dn&61680)>>4|(Dn&3855)<<4,Tl[le]=((Dn&65280)>>8|(Dn&255)<<8)>>1;var Dn,le,Di=function(e,t,n){for(var r=e.length,i=0,o=new Rr(t);i>l]=u}else for(s=new Rr(r),i=0;i>15-e[i]);return s},Aa=new ct(288);for(le=0;le<144;++le)Aa[le]=8;var le;for(le=144;le<256;++le)Aa[le]=9;var le;for(le=256;le<280;++le)Aa[le]=7;var le;for(le=280;le<288;++le)Aa[le]=8;var le,m2=new ct(32);for(le=0;le<32;++le)m2[le]=5;var le,v2=Di(Aa,9,1),g2=Di(m2,5,1),$s=function(e){for(var t=e[0],n=1;nt&&(t=e[n]);return t},zt=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(t&7)&n},Rs=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(t&7)},y2=function(e){return(e+7)/8|0},Lu=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new ct(e.subarray(t,n))},w2=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ut=function(e,t,n){var r=new Error(t||w2[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,ut),!n)throw r;return r},_2=function(e,t,n,r){var i=e.length,o=r?r.length:0;if(!i||t.f&&!t.l)return n||new ct(0);var a=!n,s=a||t.i!=2,l=t.i;a&&(n=new ct(i*3));var u=function(he){var ye=n.length;if(he>ye){var $e=new ct(Math.max(ye*2,he));$e.set(n),n=$e}},c=t.f||0,f=t.p||0,d=t.b||0,h=t.l,y=t.d,m=t.m,w=t.n,p=i*8;do{if(!h){c=zt(e,f,1);var g=zt(e,f+1,3);if(f+=3,g)if(g==1)h=v2,y=g2,m=9,w=5;else if(g==2){var v=zt(e,f,31)+257,_=zt(e,f+10,15)+4,b=v+zt(e,f+5,31)+1;f+=14;for(var E=new ct(b),C=new ct(19),x=0;x<_;++x)C[f2[x]]=zt(e,f+x*3,7);f+=_*3;for(var O=$s(C),k=(1<>4;if(W<16)E[x++]=W;else{var $=0,M=0;for(W==16?(M=3+zt(e,f,3),f+=2,$=E[x-1]):W==17?(M=3+zt(e,f,7),f+=3):W==18&&(M=11+zt(e,f,127),f+=7);M--;)E[x++]=$}}var D=E.subarray(0,v),F=E.subarray(v);m=$s(D),w=$s(F),h=Di(D,m,1),y=Di(F,w,1)}else ut(1);else{var W=y2(f)+4,A=e[W-4]|e[W-3]<<8,I=W+A;if(I>i){l&&ut(0);break}s&&u(d+A),n.set(e.subarray(W,I),d),t.b=d+=A,t.p=f=I*8,t.f=c;continue}if(f>p){l&&ut(0);break}}s&&u(d+131072);for(var N=(1<>4;if(f+=$&15,f>p){l&&ut(0);break}if($||ut(2),L<256)n[d++]=L;else if(L==256){B=f,h=null;break}else{var V=L-254;if(L>264){var x=L-257,H=rh[x];V=zt(e,f,(1<>4;q||ut(3),f+=q&15;var F=h2[ee];if(ee>3){var H=ih[ee];F+=Rs(e,f)&(1<p){l&&ut(0);break}s&&u(d+131072);var ce=d+V;if(d>>0},Bc=function(e,t){return an(e,t)+an(e,t+4)*4294967296};function Rk(e,t,n){return n||(n=t,t={}),typeof n!="function"&&ut(7),$k(e,t,[Fk],function(r){return S2(ah(r.data[0],b2(r.data[1])))},1,n)}function ah(e,t){return _2(e,{i:2},t&&t.out,t&&t.dictionary)}var _d=typeof TextDecoder<"u"&&new TextDecoder,jk=0;try{_d.decode(Mk,{stream:!0}),jk=1}catch{}var Nk=function(e){for(var t="",n=0;;){var r=e[n++],i=(r>127)+(r>223)+(r>239);if(n+i>e.length)return{s:t,r:Lu(e,n-1)};i?i==3?(r=((r&15)<<18|(e[n++]&63)<<12|(e[n++]&63)<<6|e[n++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023)):i&1?t+=String.fromCharCode((r&31)<<6|e[n++]&63):t+=String.fromCharCode((r&15)<<12|(e[n++]&63)<<6|e[n++]&63):t+=String.fromCharCode(r)}};function no(e,t){if(t){for(var n="",r=0;r65558)return a(ut(13,0,1),null),i;var l=En(e,s+8);if(l){var u=l,c=an(e,s+16),f=c==4294967295||u==65535;if(f){var d=an(e,s-12);f=an(e,d)==101075792,f&&(u=l=an(e,d+32),c=an(e,d+48))}for(var h=t&&t.filter,y=function(w){var p=Vk(e,c,f),g=p[0],v=p[1],_=p[2],b=p[3],E=p[4],C=p[5],x=zk(e,C);c=E;var O=function(T,z){T?(i(),a(T,null)):(z&&(o[b]=z),--l||a(null,o))};if(!h||h({name:b,size:v,originalSize:_,compression:g}))if(!g)O(null,Lu(e,x,x+v));else if(g==8){var k=e.subarray(x,x+v);if(v<32e4)try{O(null,ah(k,{out:new ct(_)}))}catch(T){O(T,null)}else r.push(Rk(k,{size:_},O))}else O(ut(14,"unknown compression type "+g,1),null);else O(null,null)},m=0;m{if(n.path){let r=n.path.map(({key:i})=>i).join(".");t.nested[r]=[...t.nested[r]||[],n.message]}else t.root=[...t.root||[],n.message];return t},{nested:{}})}var Wk=class extends Error{constructor(t){super(t[0].message);ne(this,"issues");this.name="ValiError",this.issues=t}};function qk(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}}function Kk(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}}function Or(e,t,n,r){if(!t||!t.length)return{output:e};let i,o,a=e;for(let s of t){let l=s(a);if(l.issue){i=i||Kk(n,r);let u=qk(i,l.issue);if(o?o.push(u):o=[u],i.abortEarly||i.abortPipeEarly)break}else a=l.output}return o?{issues:o}:{output:a}}function hn(e,t){return!e||typeof e=="string"?[e,t]:[void 0,e]}function Ln(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:r,input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly}]}}function Gk(e=[]){return{schema:"any",async:!1,_parse(t,n){return Or(t,e,n,"any")}}}function jo(e,t,n){let[r,i]=hn(t,n);return{schema:"array",array:{item:e},async:!1,_parse(o,a){if(!Array.isArray(o))return Ln(a,"type","array",r||"Invalid type",o);let s,l=[];for(let u=0;us.length)return Ln(l,"type","tuple",o||"Invalid type",s);let u,c=[];for(let f=0;f({...o,...a.object}),{}),r,i)}function e8(e,t,n,r){let[i,o]=hn(n,r);return Xt(Object.entries(e.object).reduce((a,[s,l])=>t.includes(s)?a:{...a,[s]:l},{}),i,o)}function t8(e,t,n){let r=e._parse(t,n);return r.issues?{success:!1,error:new Wk(r.issues),issues:r.issues}:{success:!0,data:r.output,output:r.output}}function bd(e,t){return n=>n>e?{issue:{validation:"max_value",message:t||"Invalid value",input:n}}:{output:n}}function Ed(e,t){return n=>nt in e?sh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Pa=(e,t)=>function(){return t||(0,e[E2(e)[0]])((t={exports:{}}).exports,t),t.exports},s8=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of E2(t))!o8.call(e,i)&&i!==n&&sh(e,i,{get:()=>t[i],enumerable:!(r=r8(t,i))||r.enumerable});return e},l8=(e,t,n)=>(n=e!=null?n8(i8(e)):{},s8(t||!e||!e.__esModule?sh(n,"default",{value:e,enumerable:!0}):n,e)),u8=(e,t,n)=>(a8(e,typeof t!="symbol"?t+"":t,n),n),c8=Pa({"../../node_modules/.pnpm/@rgba-image+copy@0.1.3/node_modules/@rgba-image/copy/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.copy=void 0;var t=(n,r,i=0,o=0,a=n.width-i,s=n.height-o,l=0,u=0)=>{if(i=i|0,o=o|0,a=a|0,s=s|0,l=l|0,u=u|0,a<=0||s<=0)return;let c=new Uint32Array(n.data.buffer),f=new Uint32Array(r.data.buffer);for(let d=0;d=n.height)continue;let y=u+d;if(!(y<0||y>=r.height))for(let m=0;m=n.width)continue;let p=l+m;if(p<0||p>=r.width)continue;let g=h*n.width+w,v=y*r.width+p;f[v]=c[g]}}};e.copy=t}}),f8=Pa({"../../node_modules/.pnpm/@rgba-image+create-image@0.1.1/node_modules/@rgba-image/create-image/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CreateImageFactory=(t=[0,0,0,0],n=4)=>{if(n=Math.floor(n),isNaN(n)||n<1)throw TypeError("channels should be a positive non-zero number");if(!("length"in t)||t.lengthi===0);return(i,o,a)=>{if(i===void 0||o===void 0)throw TypeError("Not enough arguments");if(i=Math.floor(i),o=Math.floor(o),isNaN(i)||i<1||isNaN(o)||o<1)throw TypeError("Index or size is negative or greater than the allowed amount");let s=i*o*n;if(a===void 0&&(a=new Uint8ClampedArray(s)),a instanceof Uint8ClampedArray){if(a.length!==s)throw TypeError("Index or size is negative or greater than the allowed amount");if(!r)for(let l=0;l{if(o<=-a||o>=a||o==0)return 0;let s=o*Math.PI;return Math.sin(s)/s*Math.sin(s/a)/(s/a)},r=o=>Math.round(o*((1<{let c=u?2:3,f=1/s,d=Math.min(1,s),h=c/d,y=Math.floor((h+1)*2),m=new Int16Array((y+2)*a),w=0;for(let p=0;p>1]+=r(1-k);let T=0;for(;T0&&C[z]===0;)z--;let W=v+T,$=z-T+1;m[w++]=W,m[w++]=$,m.set(C.subarray(T,z+1),w),w+=$}return m};e.filters=i}}),p8=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/convolve.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.convolve=void 0;var t=14,n=(r,i,o,a,s,l)=>{let u=0,c=0;for(let f=0;f0;_--){let b=l[d++];w=w+b*r[m]|0,p=p+b*r[m+1]|0,g=g+b*r[m+2]|0,v=v+b*r[m+3]|0,m=m+4|0}i[c]=w+8192>>t,i[c+1]=p+8192>>t,i[c+2]=g+8192>>t,i[c+3]=v+8192>>t,c=c+a*4|0}c=(f+1)*4|0,u=(f+1)*o*4|0}};e.convolve=n}}),h8=Pa({"../../node_modules/.pnpm/@rgba-image+lanczos@0.1.1/node_modules/@rgba-image/lanczos/dist/index.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.lanczos2=e.lanczos=void 0;var t=c8(),n=f8(),r=d8(),i=p8(),o=(l,u,c=!1)=>{let f=u.width/l.width,d=u.height/l.height,h=r.filters(l.width,u.width,f,0,c),y=r.filters(l.height,u.height,d,0,c),m=new Uint8ClampedArray(u.width*l.height*4);i.convolve(l.data,m,l.width,l.height,u.width,h),i.convolve(m,u.data,l.height,u.width,u.height,y)},a=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,m=0,w=u.width-y,p=u.height-m)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,m=m|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&m===0&&w===u.width&&p===u.height){o(l,u);return}let g=n.createImage(d,h),v=n.createImage(w,p);t.copy(l,g,c,f),o(g,v),t.copy(v,u,0,0,v.width,v.height,y,m)};e.lanczos=a;var s=(l,u,c=0,f=0,d=l.width-c,h=l.height-f,y=0,m=0,w=u.width-y,p=u.height-m)=>{if(c=c|0,f=f|0,d=d|0,h=h|0,y=y|0,m=m|0,w=w|0,p=p|0,d<=0||h<=0||w<=0||p<=0)return;if(c===0&&f===0&&d===l.width&&h===l.height&&y===0&&m===0&&w===u.width&&p===u.height){o(l,u,!0);return}let g=n.createImage(d,h),v=n.createImage(w,p);t.copy(l,g,c,f),o(g,v,!0),t.copy(v,u,0,0,v.width,v.height,y,m)};e.lanczos2=s}}),C2=(e=>(e.Bounce="bounce",e.Normal="normal",e))(C2||{}),m8=Qk(C2),x2=Xt({autoplay:ue(Uc()),defaultTheme:ue(Xe()),direction:ue(Sd([u0(1),u0(-1)])),hover:ue(Uc()),id:Xe(),intermission:ue(ln()),loop:ue(Sd([Uc(),ln()])),playMode:ue(m8),speed:ue(ln()),themeColor:ue(Xe())}),v8=Xt({animations:jo(Xe()),id:Xe()}),g8=Xt({activeAnimationId:ue(Xe()),animations:jo(x2),author:ue(Xe()),custom:ue(Xk(Xe(),Gk())),description:ue(Xe()),generator:ue(Xe()),keywords:ue(Xe()),revision:ue(ln()),themes:ue(jo(v8)),states:ue(jo(Xe())),version:ue(Xe())}),O2=e8(x2,["id"]),ei=Xt({state:Xe()}),y8=ei,w8=ka([ei,Xt({ms:ln()})]),_8=ka([ei,Xt({count:ln()})]),S8=ei,b8=ei,E8=ei,C8=ka([ei,Xt({threshold:ue(jo(ln([Ed(0),bd(1)])))})]),x8=Xt({onAfter:ue(w8),onClick:ue(y8),onComplete:ue(E8),onEnter:ue(_8),onMouseEnter:ue(S8),onMouseLeave:ue(b8),onShow:ue(C8)}),O8=ka([O2,Xt({playOnScroll:ue(c0([ln([Ed(0),bd(1)]),ln([Ed(0),bd(1)])])),segments:ue(Sd([c0([ln(),ln()]),Xe()]))})]);ka([x8,Xt({animationId:ue(Xe()),playbackSettings:O8})]);var A8={jpeg:"image/jpeg",png:"image/png",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml",webp:"image/webp",mpeg:"audio/mpeg",mp3:"audio/mp3"},f0={jpeg:[255,216,255],png:[137,80,78,71,13,10,26,10],gif:[71,73,70],bmp:[66,77],webp:[82,73,70,70,87,69,66,80],svg:[60,63,120],mp3:[73,68,51,3,0,0,0,0],mpeg:[73,68,51,3,0,0,0,0]},k8=e=>{let t=null,n=[];if(!e)return null;let r=e.substring(e.indexOf(",")+1);typeof window>"u"?t=Buffer.from(r,"base64").toString("binary"):t=atob(r);let i=new Uint8Array(t.length);for(let o=0;os===a[l]))return A8[o]}return null},lh=class extends Error{constructor(e,t){super(e),u8(this,"code"),this.name="[dotlottie-js]",this.code=t}};function A2(e){let t;if(typeof window>"u")t=Buffer.from(e).toString("base64");else{let n=Array.prototype.map.call(e,r=>String.fromCharCode(r)).join("");t=window.btoa(n)}return`data:${k8(t)};base64,${t}`}function d0(e){return"w"in e&&"h"in e&&!("xt"in e)&&"p"in e}function Cd(e){return!("h"in e)&&!("w"in e)&&"p"in e&&"e"in e&&"u"in e&&"id"in e}async function Ia(e,t=()=>!0){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return await new Promise((n,r)=>{Uk(e,{filter:t},(i,o)=>{i&&r(i),n(o)})})}async function uh(e,t,n){if(!(e instanceof Uint8Array))throw new lh("DotLottie not found","INVALID_DOTLOTTIE");return(await Ia(e,r=>r.name===t&&(!n||n(r))))[t]}async function xd(e){let t="manifest.json",n=(await Ia(e,r=>r.name===t))[t];if(!(typeof n>"u"))return JSON.parse(no(n,!1))}async function P8(e){if(!(e instanceof Uint8Array))return{success:!1,error:"DotLottie not found"};let t=await xd(e);if(typeof t>"u")return{success:!1,error:"Invalid .lottie file, manifest.json is missing"};let n=t8(g8,t);return n.success?{success:!0}:{success:!1,error:`Invalid .lottie file, manifest.json structure is invalid, ${JSON.stringify(Hk(n.error).nested,null,2)}`}}async function p0(e){let t=new Uint8Array(e),n=await P8(t);if(n.error)throw new lh(n.error,"INVALID_DOTLOTTIE");return t}async function I8(e,t){let n=await Ia(e,i=>{let o=i.name.replace("audio/","");return i.name.startsWith("audio/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("audio/","");r[a]=A2(o)}}return r}async function M8(e,t){var n;let r=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(Cd(s)){let l=s.p;r.has(l)||r.set(l,new Set),(n=r.get(l))==null||n.add(o)}let i=await I8(e,o=>r.has(o.name));for(let[o,a]of r){let s=i[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])Cd(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function L8(e,t){let n=await Ia(e,i=>{let o=i.name.replace("images/","");return i.name.startsWith("images/")&&(!t||t({...i,name:o}))}),r={};for(let i in n){let o=n[i];if(o instanceof Uint8Array){let a=i.replace("images/","");r[a]=A2(o)}}return r}async function D8(e,t){var n;let r=new Map;for(let[o,a]of Object.entries(t))for(let s of a.assets||[])if(d0(s)){let l=s.p;r.has(l)||r.set(l,new Set),(n=r.get(l))==null||n.add(o)}let i=await L8(e,o=>r.has(o.name));for(let[o,a]of r){let s=i[o];if(s)for(let l of a){let u=t[l];for(let c of(u==null?void 0:u.assets)||[])d0(c)&&c.p===o&&(c.p=s,c.u="",c.e=1)}}}async function T8(e,t,{inlineAssets:n}={},r){let i=`animations/${t}.json`,o=await uh(e,i,r);if(typeof o>"u")return;let a=JSON.parse(no(o,!1));if(!n)return a;let s={[t]:a};return await D8(e,s),await M8(e,s),a}async function F8(e,t,n){let r=`themes/${t}.json`,i=await uh(e,r,n);if(!(typeof i>"u"))return JSON.parse(no(i,!1))}async function $8(e,t){let n={},r=await Ia(e,i=>{let o=i.name.replace("states/","").replace(".json","");return i.name.startsWith("states/")&&(!t||t({...i,name:o}))});for(let i in r){let o=r[i];if(o instanceof Uint8Array){let a=i.replace("states/","").replace(".json","");n[a]=no(o,!1)}}return n}async function R8(e,t,n){let r=`states/${t}.json`,i=await uh(e,r,n);return typeof i>"u"?void 0:JSON.parse(no(i,!1))}l8(h8());function ae(e,t="dotLottie-common"){return new Error(`[${t}]: ${e}`)}function si(e,t="dotLottie-common",...n){console.error(`[${t}]:`,e,...n)}function Le(e,t="dotLottie-common",...n){console.warn(`[${t}]:`,e,...n)}function j8(e=""){let t=e.trim(),n=t.lastIndexOf("/"),r=t.substring(n+1),i=r.indexOf(".");return i!==-1?r.substring(0,i):r}function Fl(e){return["v","ip","op","layers","fr","w","h"].every(t=>Object.prototype.hasOwnProperty.call(e,t))}function N8(e){let t=e.assets;return t?t.some(n=>Cd(n)):!1}function z8(e){try{let t=JSON.parse(e);return Fl(t)}catch{return!1}}function WP(e,t){let n=Object.keys(e).find(r=>e[r]===t);if(n===void 0)throw new Error("Value not found in the object.");return n}function Hc(e){return JSON.parse(JSON.stringify(e))}var V8=class{constructor(){ne(this,"_dotLottie");ne(this,"_animationsMap",new Map);ne(this,"_themeMap",new Map);ne(this,"_stateMachinesMap",new Map);ne(this,"_manifest")}get dotLottie(){return this._dotLottie}get animationsMap(){return this._animationsMap}get themeMap(){return this._themeMap}get stateMachinesMap(){return this._stateMachinesMap}get manifest(){return this._manifest}async loadFromUrl(t){let n=await fetch(t,{method:"GET",mode:"cors"});if(!n.ok)throw new Error(`Failed to load dotLottie from ${t} with status ${n.status}`);let r=n.headers.get("content-type");if(r!=null&&r.includes("application/json")){let i=await n.json();if(!Fl(i))throw new Error(`Invalid lottie JSON at ${t}`);let o=j8(t);this._animationsMap.set(o,i);let a={activeAnimationId:o,animations:[{id:o}]};this._manifest=a}else{this._dotLottie=await p0(await n.arrayBuffer());let i=await xd(this._dotLottie);if(!i)throw new Error("Manifest not found");this._manifest=i}}loadFromLottieJSON(t){if(!Fl(t))throw new Error("Invalid lottie JSON");let n="my-animation";this._animationsMap.set(n,t);let r={activeAnimationId:n,animations:[{id:n}]};this._manifest=r}async loadFromArrayBuffer(t){this._dotLottie=await p0(t);let n=await xd(this._dotLottie);if(!n)throw new Error("Manifest not found");this._manifest=n}async getAnimation(t){if(this._animationsMap.get(t))return this._animationsMap.get(t);if(!this._dotLottie)return;let n=await T8(this._dotLottie,t,{inlineAssets:!0});return n&&this._animationsMap.set(t,n),n}async getTheme(t){if(this._themeMap.get(t))return this._themeMap.get(t);if(!this._dotLottie)return;let n=await F8(this._dotLottie,t);return n&&this._themeMap.set(t,n),n}async getStateMachines(){if(!this._dotLottie)return;let t=await $8(this._dotLottie);for(let n in t)if(n){let r=t[n];if(r){let i=JSON.parse(r);if(i){let o=i.descriptor.id;this._stateMachinesMap.get(o)||this._stateMachinesMap.set(o,i)}}}return Array.from(this._stateMachinesMap.values())}async getStateMachine(t){if(this._stateMachinesMap.get(t))return this._stateMachinesMap.get(t);if(!this._dotLottie)return;let n=await R8(this._dotLottie,t);return n&&this._stateMachinesMap.set(n.descriptor.id,n),n}};async function B8(e,t){let[{DotLottieStateMachineManager:n}]=await Promise.all([Tn(()=>import("./dotlottie-state-machine-manager-2E7RUGJG-111b470e.js"),[])]);if(!e.length)throw ae("No state machines available inside this .lottie!");return new n(e,t)}function Du(){throw new Error("Cycle detected")}function ch(){if(Ti>1)Ti--;else{for(var e,t=!1;No!==void 0;){var n=No;for(No=void 0,Od++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&P2(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Od=0,Ti--,t)throw e}}var De=void 0,No=void 0,Ti=0,Od=0,$l=0;function k2(e){if(De!==void 0){var t=e.n;if(t===void 0||t.t!==De)return t={i:0,S:e,p:De.s,n:void 0,t:De,e:void 0,x:void 0,r:t},De.s!==void 0&&(De.s.n=t),De.s=t,e.n=t,32&De.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=De.s,t.n=void 0,De.s.n=t,De.s=t),t}}function Et(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}Et.prototype.h=function(){return!0};Et.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)};Et.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}};Et.prototype.subscribe=function(e){var t=this;return W8(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})};Et.prototype.valueOf=function(){return this.value};Et.prototype.toString=function(){return this.value+""};Et.prototype.toJSON=function(){return this.value};Et.prototype.peek=function(){return this.v};Object.defineProperty(Et.prototype,"value",{get:function(){var e=k2(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(De instanceof ti&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Od>100&&Du(),this.v=e,this.i++,$l++,Ti++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{ch()}}}});function U8(e){return new Et(e)}function P2(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function I2(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function M2(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function ti(e){Et.call(this,void 0),this.x=e,this.s=void 0,this.g=$l-1,this.f=4}(ti.prototype=new Et).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===$l))return!0;if(this.g=$l,this.f|=1,this.i>0&&!P2(this))return this.f&=-2,!0;var e=De;try{I2(this),De=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return De=e,M2(this),this.f&=-2,!0};ti.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}Et.prototype.S.call(this,e)};ti.prototype.U=function(e){if(this.t!==void 0&&(Et.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}};ti.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}};ti.prototype.peek=function(){if(this.h()||Du(),16&this.f)throw this.v;return this.v};Object.defineProperty(ti.prototype,"value",{get:function(){1&this.f&&Du();var e=k2(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function L2(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ti++;var n=De;De=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,fh(e),r}finally{De=n,ch()}}}function fh(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,L2(e)}function H8(e){if(De!==this)throw new Error("Out-of-order effect");M2(this),De=e,this.f&=-2,8&this.f&&fh(this),ch()}function Ma(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ma.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}};Ma.prototype.S=function(){1&this.f&&Du(),this.f|=1,this.f&=-9,L2(this),I2(this),Ti++;var e=De;return De=this,H8.bind(this,e)};Ma.prototype.N=function(){2&this.f||(this.f|=2,this.o=No,No=this)};Ma.prototype.d=function(){this.f|=8,1&this.f||fh(this)};function W8(e){var t=new Ma(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var q8=class{constructor(e){ne(this,"_state");ne(this,"_prevState");this._prevState=e,this._state=U8(e)}setState(e){this._prevState=this._state.value,this._state.value=e}subscribe(e){return this._state.subscribe(t=>e(t,this._prevState))}},K8={name:"@dotlottie/common",version:"0.7.11",type:"module",description:"",author:"Afsal , Sam Osborne ",license:"MIT",engines:{node:">18.0.0"},module:"dist/index.js",main:"dist/index.js",types:"dist/index.d.ts",files:["dist"],keywords:[],scripts:{build:"tsup",dev:"tsup --watch",lint:"eslint .","type-check":"tsc --noEmit"},dependencies:{"@dotlottie/dotlottie-js":"^0.7.0","@preact/signals-core":"^1.2.3",howler:"^2.2.3","lottie-web":"^5.12.2",xstate:"^4.38.1"},devDependencies:{"@lottiefiles/lottie-types":"^1.2.0","@types/howler":"^2.2.8",tsup:"^7.2.0",typescript:"^4.7.4"},publishConfig:{access:"public"}},mt=(e=>(e.Complete="complete",e.DataFail="data_fail",e.DataReady="data_ready",e.Error="error",e.Frame="frame",e.Freeze="freeze",e.LoopComplete="loopComplete",e.Pause="pause",e.Play="play",e.Ready="ready",e.Stop="stop",e.VisibilityChange="visibilityChange",e))(mt||{}),en=(e=>(e.Completed="completed",e.Error="error",e.Fetching="fetching",e.Frozen="frozen",e.Initial="initial",e.Loading="loading",e.Paused="paused",e.Playing="playing",e.Ready="ready",e.Stopped="stopped",e))(en||{}),G8=(e=>(e.Bounce="bounce",e.Normal="normal",e))(G8||{}),Rt={autoplay:!1,direction:1,hover:!1,intermission:0,loop:!1,playMode:"normal",speed:1,defaultTheme:""},dh={activeStateId:"",autoplay:!1,currentState:"initial",frame:0,seeker:0,direction:1,hover:!1,loop:!1,playMode:"normal",speed:1,background:"transparent",intermission:0,currentAnimationId:void 0,visibilityPercentage:0},Q8=class{constructor(t,n,r){ne(this,"_lottie");ne(this,"_src");ne(this,"_animationConfig");ne(this,"_prevUserPlaybackOptions",{});ne(this,"_userPlaybackOptions");ne(this,"_hover",!1);ne(this,"_loop",!1);ne(this,"_counter",0);ne(this,"_intermission",0);ne(this,"_counterInterval",null);ne(this,"_container",null);ne(this,"_name");ne(this,"_mode","normal");ne(this,"_background","transparent");ne(this,"_animation");ne(this,"_defaultTheme");ne(this,"_activeAnimationId");ne(this,"_currentAnimationId");ne(this,"_testId");ne(this,"_listeners",new Map);ne(this,"_currentState","initial");ne(this,"_stateBeforeFreeze","initial");ne(this,"state",new q8(dh));ne(this,"_light",!1);ne(this,"_worker",!1);ne(this,"_dotLottieLoader",new V8);ne(this,"_activeStateId");ne(this,"_inInteractiveMode",!1);ne(this,"_scrollTicking",!1);ne(this,"_scrollCallback");ne(this,"_onShowIntersectionObserver");ne(this,"_visibilityPercentage",0);ne(this,"_audios",[]);ne(this,"_stateMachineManager");typeof t=="string"?this._src=t:this._src=Hc(t),r!=null&&r.testId&&(this._testId=r.testId),this._defaultTheme=(r==null?void 0:r.defaultTheme)||"",this._userPlaybackOptions=this._validatePlaybackOptions(r||{}),typeof(r==null?void 0:r.activeAnimationId)=="string"&&(this._activeAnimationId=r.activeAnimationId),this._container=n||null,typeof(r==null?void 0:r.background)=="string"&&this.setBackground(r.background),typeof(r==null?void 0:r.activeStateId)<"u"&&(this._activeStateId=r.activeStateId);let{rendererSettings:i,...o}=r||{};this._animationConfig={loop:!1,autoplay:!1,renderer:"svg",rendererSettings:{clearCanvas:!0,progressiveLoad:!0,hideOnTransparent:!0,filterSize:{width:"200%",height:"200%",x:"-50%",y:"-50%"},...i},...o},r!=null&&r.light&&(this._light=r.light),r!=null&&r.worker&&(this._worker=r.worker),this._listenToHover(),this._listenToVisibilityChange()}_listenToHover(){var t,n,r,i;let o=()=>{this._hover&&this.currentState!=="playing"&&this.play()},a=()=>{this._hover&&this.currentState==="playing"&&this.stop()};(t=this._container)==null||t.removeEventListener("mouseenter",o),(n=this._container)==null||n.removeEventListener("mouseleave",a),(r=this._container)==null||r.addEventListener("mouseleave",a),(i=this._container)==null||i.addEventListener("mouseenter",o)}_onVisibilityChange(){!this._lottie||typeof document>"u"||(document.hidden&&this.currentState==="playing"?this.freeze():this.currentState==="frozen"&&this.unfreeze())}_listenToVisibilityChange(){typeof document<"u"&&typeof document.hidden<"u"&&document.addEventListener("visibilitychange",()=>this._onVisibilityChange())}_getOption(t){var n;if(typeof this._userPlaybackOptions[t]<"u")return this._userPlaybackOptions[t];let r=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations.find(i=>i.id===this._currentAnimationId);return r&&typeof r[t]<"u"?r[t]:Rt[t]}_getPlaybackOptions(){let t={};for(let n in Rt)typeof Rt[n]<"u"&&(t[n]=this._getOption(n));return t}_setPlayerState(t){var n,r,i;let o=t(this._getPlaybackOptions());try{O2._parse(o)}catch{Le(`Invalid PlaybackOptions, ${JSON.stringify(o,null,2)}`);return}typeof o.defaultTheme<"u"&&(this._defaultTheme=o.defaultTheme),typeof o.playMode<"u"&&(this._mode=o.playMode),typeof o.intermission<"u"&&(this._intermission=o.intermission),typeof o.hover<"u"&&(this._hover=o.hover),typeof o.loop<"u"&&(this.clearCountTimer(),this._loop=o.loop,this._counter=0,(n=this._lottie)==null||n.setLoop(typeof o.loop=="number"?!0:o.loop)),typeof o.speed<"u"&&((r=this._lottie)==null||r.setSpeed(o.speed)),typeof o.autoplay<"u"&&this._lottie&&(this._lottie.autoplay=o.autoplay),typeof o.direction<"u"&&((i=this._lottie)==null||i.setDirection(o.direction))}_getOptionsFromAnimation(t){let{id:n,...r}=t;return{...Rt,...r}}_updateTestData(){!this._testId||!this._lottie||(window.dotLottiePlayer||(window.dotLottiePlayer={[this._testId]:{}}),window.dotLottiePlayer[this._testId]={direction:this._lottie.playDirection,currentState:this._currentState,loop:this.loop,mode:this._mode,speed:this._lottie.playSpeed})}setContainer(t){t!==this._container&&(this._container=t,this.setBackground(this._background),this._listenToHover())}get currentState(){return this._currentState}clearCountTimer(){this._counterInterval&&clearInterval(this._counterInterval)}setCurrentState(t){this._currentState=t,this._notify(),this._updateTestData()}static isPathJSON(t){var n;return((n=t.split(".").pop())==null?void 0:n.toLowerCase())==="json"}get src(){return this._src}updateSrc(t){this._src!==t&&(typeof t=="string"?this._src=t:this._src=Hc(t),this._activeAnimationId=void 0,this._currentAnimationId=void 0,this.load())}get intermission(){return this._intermission}get hover(){return this._hover}setHover(t){typeof t=="boolean"&&(this._hover=t,this._userPlaybackOptions.hover=t,this._notify())}setIntermission(t){this._intermission=t,this._userPlaybackOptions.intermission=t,this._notify()}get mode(){return this._mode}get animations(){return this._dotLottieLoader.animationsMap}get themes(){return this._dotLottieLoader.themeMap}setMode(t){typeof t=="string"&&(this._mode=t,this._userPlaybackOptions.playMode=t,this._setPlayerState(()=>({playMode:t})),this._notify(),this._updateTestData())}get container(){if(this._container)return this._container}goToAndPlay(t,n,r){if(!this._lottie||["loading"].includes(this._currentState)){Le("goToAndPlay() Can't use whilst loading.");return}this._lottie.goToAndPlay(t,n,r),this.setCurrentState("playing")}goToAndStop(t,n,r){if(!this._lottie||["loading"].includes(this._currentState)){Le("goToAndStop() Can't use whilst loading.");return}this._lottie.goToAndStop(t,n,r),this.setCurrentState("stopped")}seek(t){if(!this._lottie||["loading"].includes(this._currentState)){Le("seek() Can't use whilst loading.");return}let n=t;typeof n=="number"&&(n=Math.round(n));let r=/^(\d+)(%?)$/u.exec(n.toString());if(!r)return;let i=r[2]==="%"?this.totalFrames*Number(r[1])/100:r[1];i!==void 0&&(this._lottie.goToAndPlay(i,!0),this.currentState==="playing"?this.play():this.currentState==="frozen"?this.freeze():this.pause())}_areNumbersInRange(t,n){return t>=0&&t<=1&&n>=0&&n<=1}_updatePosition(t,n,r){let[i,o]=t??[0,this.totalFrames-1],[a,s]=n??[0,1];if(!this._areNumbersInRange(a,s)){si("threshold values must be between 0 and 1");return}if(this.container){let{height:l,top:u}=this.container.getBoundingClientRect(),c=window.innerHeight-u,f=window.innerHeight+l,d=c/f,h=i+Math.round((d-a)/(s-a)*(o-i));r&&r(d),this.goToAndStop(h,!0),(h>=o||d>=s)&&this._handleAnimationComplete()}this._scrollTicking=!1}_requestTick(t,n,r){this._scrollTicking||(requestAnimationFrame(()=>this._updatePosition(t,n,r)),this._scrollTicking=!0)}playOnScroll(t){this.stop(),this._scrollCallback&&this.stopPlayOnScroll(),this._scrollCallback=()=>this._requestTick(t==null?void 0:t.segments,t==null?void 0:t.threshold,t==null?void 0:t.positionCallback),window.addEventListener("scroll",this._scrollCallback)}stopPlayOnScroll(){this._scrollCallback&&(window.removeEventListener("scroll",this._scrollCallback),this._scrollCallback=void 0)}stopPlayOnShow(){this._onShowIntersectionObserver&&(this._onShowIntersectionObserver.disconnect(),this._onShowIntersectionObserver=void 0)}addIntersectionObserver(t){if(!this.container)throw ae("Can't play on show, player container element not available.");let n={root:null,rootMargin:"0px",threshold:t!=null&&t.threshold?t.threshold:[0,1]},r=i=>{i.forEach(o=>{var a,s;this._visibilityPercentage=o.intersectionRatio*100,o.isIntersecting?(t!=null&&t.callbackOnIntersect&&t.callbackOnIntersect(this._visibilityPercentage),(a=this._container)==null||a.dispatchEvent(new Event("visibilityChange"))):t!=null&&t.callbackOnIntersect&&(t.callbackOnIntersect(0),(s=this._container)==null||s.dispatchEvent(new Event("visibilityChange")))})};this._onShowIntersectionObserver=new IntersectionObserver(r,n),this._onShowIntersectionObserver.observe(this.container)}playOnShow(t){var n;if(this.stop(),!this.container)throw ae("Can't play on show, player container element not available.");this._onShowIntersectionObserver&&this.stopPlayOnShow(),this.addIntersectionObserver({threshold:(n=t==null?void 0:t.threshold)!=null?n:[],callbackOnIntersect:r=>{r===0?this.pause():this.play()}})}_validatePlaybackOptions(t){if(!t)return{};let n={};for(let[r,i]of Object.entries(t))switch(r){case"autoplay":typeof i=="boolean"&&(n.autoplay=i);break;case"direction":typeof i=="number"&&[1,-1].includes(i)&&(n.direction=i);break;case"loop":(typeof i=="boolean"||typeof i=="number")&&(n.loop=i);break;case"playMode":typeof i=="string"&&["normal","bounce"].includes(i)&&(n.playMode=i);break;case"speed":typeof i=="number"&&(n.speed=i);break;case"themeColor":typeof i=="string"&&(n.themeColor=i);break;case"hover":typeof i=="boolean"&&(n.hover=i);break;case"intermission":typeof i=="number"&&(n.intermission=i);break;case"defaultTheme":typeof i=="string"&&(n.defaultTheme=i);break}return this._requireValidPlaybackOptions(n),n}_requireAnimationsInTheManifest(){var t;if(!((t=this._dotLottieLoader.manifest)!=null&&t.animations.length))throw ae("No animations found in manifest.")}_requireAnimationsToBeLoaded(){if(this._dotLottieLoader.animationsMap.size===0)throw ae("No animations have been loaded.")}async play(t,n){var r,i;if(["initial","loading"].includes(this._currentState)){Le("Player unable to play whilst loading.");return}if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),this._lottie&&!t){this._lottie.playDirection===-1&&this._lottie.currentFrame===0?this._lottie.goToAndPlay(this._lottie.totalFrames,!0):this._lottie.play(),this.setCurrentState("playing");return}if(typeof t=="number"){let o=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations[t];if(!o)throw ae("animation not found.");typeof n=="function"?await this.render({id:o.id,...n(this._getPlaybackOptions(),this._getOptionsFromAnimation(o))}):await this.render({id:o.id})}if(typeof t=="string"){let o=(i=this._dotLottieLoader.manifest)==null?void 0:i.animations.find(a=>a.id===t);if(!o)throw ae("animation not found.");typeof n=="function"?await this.render({id:o.id,...n(this._getPlaybackOptions(),this._getOptionsFromAnimation(o))}):await this.render({id:o.id})}}playSegments(t,n){if(!this._lottie||["loading"].includes(this._currentState)){Le("playSegments() Can't use whilst loading.");return}this._lottie.playSegments(t,n),this.setCurrentState("playing")}resetSegments(t){if(!this._lottie||["loading"].includes(this._currentState)){Le("resetSegments() Can't use whilst loading.");return}this._lottie.resetSegments(t)}togglePlay(){this.currentState==="playing"?this.pause():this.play()}_getAnimationByIdOrIndex(t){var n,r;if(this._requireAnimationsInTheManifest(),this._requireAnimationsToBeLoaded(),typeof t=="number"){let i=(n=this._dotLottieLoader.manifest)==null?void 0:n.animations[t];if(!i)throw ae("animation not found.");return i}if(typeof t=="string"){let i=(r=this._dotLottieLoader.manifest)==null?void 0:r.animations.find(o=>o.id===t);if(!i)throw ae("animation not found.");return i}throw ae("first param must be a number or string")}get activeAnimationId(){return this._getActiveAnimationId()}get currentAnimationId(){return this._currentAnimationId}get activeStateId(){return this._activeStateId}async _startInteractivity(t){if(!this._inInteractiveMode){si("Can't start interactivity. Not in interactive mode. Call enterInteractiveMode(stateId: string) to start.");return}if(this._dotLottieLoader.stateMachinesMap.size===0&&await this._dotLottieLoader.getStateMachines(),this._dotLottieLoader.stateMachinesMap.size===0)throw ae("No interactivity states are available.");if(t==="undefined")throw ae("stateId is not specified.");this._stateMachineManager||(this._stateMachineManager=await B8(Array.from(this._dotLottieLoader.stateMachinesMap.values()),this)),this._stateMachineManager.start(t)}enterInteractiveMode(t){var n;if(t)this._inInteractiveMode||(this._prevUserPlaybackOptions={...this._userPlaybackOptions}),this._inInteractiveMode&&((n=this._stateMachineManager)==null||n.stop()),this._activeStateId=t,this._inInteractiveMode=!0,this._startInteractivity(t);else throw ae("stateId must be a non-empty string.")}exitInteractiveMode(){var t;this._inInteractiveMode&&(this._inInteractiveMode=!1,this._activeStateId="",(t=this._stateMachineManager)==null||t.stop(),this._userPlaybackOptions={},this._userPlaybackOptions={...this._prevUserPlaybackOptions},this._prevUserPlaybackOptions={},this.reset())}reset(){var t;let n=this._getActiveAnimationId(),r=(t=this._dotLottieLoader.manifest)==null?void 0:t.animations.find(i=>i.id===n);if(this._inInteractiveMode&&this.exitInteractiveMode(),!r)throw ae("animation not found.");this.play(n)}previous(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw ae("manifest not found.");if(this._inInteractiveMode){Le("previous() is not supported in interactive mode.");return}let n=this._dotLottieLoader.manifest.animations.findIndex(i=>i.id===this._currentAnimationId);if(n===-1)throw ae("animation not found.");let r=this._dotLottieLoader.manifest.animations[(n-1+this._dotLottieLoader.manifest.animations.length)%this._dotLottieLoader.manifest.animations.length];if(!r||!r.id)throw ae("animation not found.");typeof t=="function"?this.render({id:r.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):this.render({id:r.id})}next(t){if(!this._dotLottieLoader.manifest||!this._dotLottieLoader.manifest.animations.length)throw ae("manifest not found.");if(this._inInteractiveMode){Le("next() is not supported in interactive mode.");return}let n=this._dotLottieLoader.manifest.animations.findIndex(i=>i.id===this._currentAnimationId);if(n===-1)throw ae("animation not found.");let r=this._dotLottieLoader.manifest.animations[(n+1)%this._dotLottieLoader.manifest.animations.length];if(!r||!r.id)throw ae("animation not found.");typeof t=="function"?this.render({id:r.id,...t(this._getPlaybackOptions(),this._getOptionsFromAnimation(r))}):this.render({id:r.id})}getManifest(){return this._dotLottieLoader.manifest}resize(){if(!this._lottie||["loading"].includes(this._currentState)){Le("resize() Can't use whilst loading.");return}this._lottie.resize()}stop(){if(!this._lottie||["loading"].includes(this._currentState)){Le("stop() Can't use whilst loading.");return}this.clearCountTimer(),this._counter=0,this._setPlayerState(()=>({direction:this._getOption("direction")})),this._lottie.stop(),this.setCurrentState("stopped")}pause(){if(!this._lottie||["loading"].includes(this._currentState)){Le("pause() Can't use whilst loading.");return}this.clearCountTimer(),this._lottie.pause(),this.setCurrentState("paused")}freeze(){if(!this._lottie||["loading"].includes(this._currentState)){Le("freeze() Can't use whilst loading.");return}this.currentState!=="frozen"&&(this._stateBeforeFreeze=this.currentState),this._lottie.pause(),this.setCurrentState("frozen")}unfreeze(){if(!this._lottie||["loading"].includes(this._currentState)){Le("unfreeze() Can't use whilst loading.");return}this._stateBeforeFreeze==="playing"?this.play():this.pause()}destroy(){var t,n;(t=this._container)!=null&&t.__lottie&&(this._container.__lottie.destroy(),this._container.__lottie=null),this._audios.length&&(this._audios.forEach(r=>{r.unload()}),this._audios=[]),this.clearCountTimer(),typeof document<"u"&&document.removeEventListener("visibilitychange",()=>this._onVisibilityChange()),this._counter=0,(n=this._lottie)==null||n.destroy(),this._lottie=void 0}getAnimationInstance(){return this._lottie}static getLottieWebVersion(){return`${K8.dependencies["lottie-web"]}`}addEventListener(t,n){var r,i,o;this._listeners.has(t)||this._listeners.set(t,new Set),(r=this._listeners.get(t))==null||r.add(n);try{t==="complete"?(i=this._container)==null||i.addEventListener(t,n):(o=this._lottie)==null||o.addEventListener(t,n)}catch(a){si(`addEventListener ${a}`)}}getState(){var t,n,r,i,o,a,s;return{autoplay:(n=(t=this._lottie)==null?void 0:t.autoplay)!=null?n:!1,currentState:this._currentState,frame:this._frame,visibilityPercentage:this._visibilityPercentage,seeker:this._seeker,direction:(i=(r=this._lottie)==null?void 0:r.playDirection)!=null?i:1,hover:this._hover,loop:this._loop||!1,playMode:this._mode,speed:(a=(o=this._lottie)==null?void 0:o.playSpeed)!=null?a:1,background:this._background,intermission:this._intermission,defaultTheme:this._defaultTheme,currentAnimationId:this._currentAnimationId,activeStateId:(s=this._activeStateId)!=null?s:""}}_notify(){this.state.setState(this.getState())}get totalFrames(){var t;return((t=this._lottie)==null?void 0:t.totalFrames)||0}get direction(){return this._lottie?this._lottie.playDirection:1}setDirection(t){this._requireValidDirection(t),this._setPlayerState(()=>({direction:t})),this._userPlaybackOptions.direction=t}get speed(){var t;return((t=this._lottie)==null?void 0:t.playSpeed)||1}setSpeed(t){this._requireValidSpeed(t),this._setPlayerState(()=>({speed:t})),this._userPlaybackOptions.speed=t}get autoplay(){var t,n;return(n=(t=this._lottie)==null?void 0:t.autoplay)!=null?n:!1}setAutoplay(t){if(this._requireValidAutoplay(t),!this._lottie||["loading"].includes(this._currentState)){Le("setAutoplay() Can't use whilst loading.");return}this._setPlayerState(()=>({autoplay:t})),this._userPlaybackOptions.autoplay=t}toggleAutoplay(){if(!this._lottie||["loading"].includes(this._currentState)){Le("toggleAutoplay() Can't use whilst loading.");return}this.setAutoplay(!this._lottie.autoplay)}get defaultTheme(){return this._defaultTheme}setDefaultTheme(t){this._setPlayerState(()=>({defaultTheme:t})),this._userPlaybackOptions.defaultTheme=t,this._animation&&this.render()}get loop(){return this._loop}setLoop(t){this._requireValidLoop(t),this._setPlayerState(()=>({loop:t})),this._userPlaybackOptions.loop=t}toggleLoop(){if(!this._lottie||["loading"].includes(this._currentState)){Le("toggleLoop() Can't use whilst loading.");return}this.setLoop(!this._loop)}get background(){return this._background}setBackground(t){this._requireValidBackground(t),this._background=t,this._container&&(this._container.style.backgroundColor=t)}get _frame(){return this._lottie?this.currentState==="completed"?this.direction===-1?0:this._lottie.totalFrames:this._lottie.currentFrame:0}get _seeker(){return this._lottie?this._frame/this._lottie.totalFrames*100:0}async revertToManifestValues(t){var n;let r;!Array.isArray(t)||t.length===0?r=["autoplay","defaultTheme","direction","hover","intermission","loop","playMode","speed","activeAnimationId"]:r=t;let i=!1;if(r.includes("activeAnimationId")){let o=(n=this._dotLottieLoader.manifest)==null?void 0:n.activeAnimationId,a=this._getAnimationByIdOrIndex(o||0);this._activeAnimationId=o,await this._setCurrentAnimation(a.id),i=!0}r.forEach(o=>{switch(o){case"autoplay":delete this._userPlaybackOptions.autoplay,this.setAutoplay(this._getOption("autoplay"));break;case"defaultTheme":delete this._userPlaybackOptions.defaultTheme,this.setDefaultTheme(this._getOption("defaultTheme"));break;case"direction":delete this._userPlaybackOptions.direction,this.setDirection(this._getOption("direction"));break;case"hover":delete this._userPlaybackOptions.hover,this.setHover(this._getOption("hover"));break;case"intermission":delete this._userPlaybackOptions.intermission,this.setIntermission(this._getOption("intermission"));break;case"loop":delete this._userPlaybackOptions.loop,this.setLoop(this._getOption("loop"));break;case"playMode":delete this._userPlaybackOptions.playMode,this.setMode(this._getOption("playMode")),this.setDirection(this._getOption("direction"));break;case"speed":delete this._userPlaybackOptions.speed,this.setSpeed(this._getOption("speed"));break}}),i&&this.render()}removeEventListener(t,n){var r,i,o;try{t==="complete"?(r=this._container)==null||r.removeEventListener(t,n):(i=this._lottie)==null||i.removeEventListener(t,n),(o=this._listeners.get(t))==null||o.delete(n)}catch(a){si("removeEventListener",a)}}_handleAnimationComplete(){var t;typeof this._loop=="number"&&this.stop();let n=this.direction===-1?0:this.totalFrames-1;this.goToAndStop(n,!0),this._counter=0,this.clearCountTimer(),this.setCurrentState("completed"),(t=this._container)==null||t.dispatchEvent(new Event("complete"))}addEventListeners(){var t;if(!this._lottie||["loading"].includes(this._currentState)){Le("addEventListeners() Can't use whilst loading.");return}this._lottie.addEventListener("enterFrame",()=>{var n;if(!this._lottie){Le("enterFrame event : Lottie is undefined.");return}Math.floor(this._lottie.currentFrame)===0&&this.direction===-1&&((n=this._container)==null||n.dispatchEvent(new Event("complete")),this.loop||this.setCurrentState("completed")),this._notify()}),this._lottie.addEventListener("loopComplete",()=>{var n;if(!this._lottie){Le("loopComplete event : Lottie is undefined.");return}(n=this._container)==null||n.dispatchEvent(new Event("loopComplete")),this.intermission>0&&this.pause();let r=this._lottie.playDirection;if(typeof this._loop=="number"&&this._loop>0&&(this._counter+=this._mode==="bounce"?.5:1,this._counter>=this._loop)){this._handleAnimationComplete();return}this._mode==="bounce"&&typeof r=="number"&&(r=Number(r)*-1);let i=r===-1?this._lottie.totalFrames-1:0;this.intermission?(this.goToAndPlay(i,!0),this.pause(),this._counterInterval=window.setTimeout(()=>{this._lottie&&(this._setPlayerState(()=>({direction:r})),this.goToAndPlay(i,!0))},this._intermission)):(this._setPlayerState(()=>({direction:r})),this.goToAndPlay(r===-1?this.totalFrames-1:0,!0))}),this._lottie.addEventListener("complete",()=>{if(this._lottie&&this._loop===!1&&this._mode==="bounce"){if(this._counter+=.5,this._counter>=1){this._handleAnimationComplete();return}this._counterInterval=window.setTimeout(()=>{if(!this._lottie)return;let n=this._lottie.playDirection;this._mode==="bounce"&&typeof n=="number"&&(n=Number(n)*-1);let r=n===-1?this.totalFrames-1:0;this._setPlayerState(()=>({direction:n})),this.goToAndPlay(r,!0)},this._intermission)}else this._handleAnimationComplete()});for(let[n,r]of this._listeners)if(n==="complete")for(let i of r)(t=this._container)==null||t.addEventListener(n,i);else for(let i of r)this._lottie.addEventListener(n,i)}async _setCurrentAnimation(t){this._currentState="loading";let n=await this._dotLottieLoader.getAnimation(t);this._currentAnimationId=t,this._animation=n,this._currentState="ready"}async _getAudioFactory(){if(this._animation&&N8(this._animation)){let{DotLottieAudio:t}=await Tn(()=>import("./dotlottie-audio-ed937df9.js"),["assets/dotlottie-audio-ed937df9.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);return n=>{let r=new t({src:[n]});return this._audios.push(r),r}}return null}async render(t){var n,r,i,o,a,s,l,u,c,f,d,h,y,m,w,p,g,v;if(t!=null&&t.id)await this._setCurrentAnimation(t.id);else if(!this._animation)throw ae("no animation selected");let _=(n=Rt.loop)!=null?n:!1,b=(r=Rt.autoplay)!=null?r:!1,E=(i=Rt.playMode)!=null?i:"normal",C=(o=Rt.intermission)!=null?o:0,x=(a=Rt.hover)!=null?a:!1,O=(s=Rt.direction)!=null?s:1,k=(l=Rt.speed)!=null?l:1,T=(u=Rt.defaultTheme)!=null?u:"";_=(c=t==null?void 0:t.loop)!=null?c:this._getOption("loop"),b=(f=t==null?void 0:t.autoplay)!=null?f:this._getOption("autoplay"),E=(d=t==null?void 0:t.playMode)!=null?d:this._getOption("playMode"),C=(h=t==null?void 0:t.intermission)!=null?h:this._getOption("intermission"),x=(y=t==null?void 0:t.hover)!=null?y:this._getOption("hover"),O=(m=t==null?void 0:t.direction)!=null?m:this._getOption("direction"),k=(w=t==null?void 0:t.speed)!=null?w:this._getOption("speed"),T=(p=t==null?void 0:t.defaultTheme)!=null?p:this._getOption("defaultTheme");let z={...this._animationConfig,autoplay:x?!1:b,loop:typeof _=="number"?!0:_,renderer:this._worker?"svg":(g=this._animationConfig.renderer)!=null?g:"svg"},[W,$,M]=await Promise.all([this._dotLottieLoader.getTheme(T),this._getLottiePlayerInstance(),this._getAudioFactory()]);if(W&&this._animation?(this._animation=Hc(this._animation),this._animation.slots=W):this._animation=await this._dotLottieLoader.getAnimation((v=this._currentAnimationId)!=null?v:""),this._activeStateId&&!this._inInteractiveMode){this.enterInteractiveMode(this._activeStateId);return}this.destroy(),this._setPlayerState(()=>({defaultTheme:T,playMode:E,intermission:C,hover:x,loop:_})),M?this._lottie=$.loadAnimation({...z,container:this._container,animationData:this._animation,audioFactory:M}):this._lottie=$.loadAnimation({...z,container:this._container,animationData:this._animation}),typeof this._lottie.resetSegments>"u"&&(this._lottie.resetSegments=()=>{var D;(D=this._lottie)==null||D.playSegments([0,this._lottie.totalFrames],!0)}),this.addEventListeners(),this._container&&(this._container.__lottie=this._lottie),this._setPlayerState(()=>({direction:O,speed:k})),b&&!x&&(_===!1&&O===-1?this.play():this.setCurrentState("playing")),this._updateTestData()}async _getLottiePlayerInstance(){var t;let n=(t=this._animationConfig.renderer)!=null?t:"svg",r;if(this._worker)return n!=="svg"&&Le("Worker is only supported with svg renderer. Change or remove renderer prop to get rid of this warning."),r=await Tn(()=>import("./lottie_worker-Q23FJ6ZR-b8c2ff66.js"),["assets/lottie_worker-Q23FJ6ZR-b8c2ff66.js","assets/chunk-B7OIQIGJ-23fdac17.js"]),r.default;switch(n){case"svg":{this._light?r=await Tn(()=>import("./lottie_light-KMJEUZFY-f635437d.js"),["assets/lottie_light-KMJEUZFY-f635437d.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_svg-MJGYILXD-1f9e46c1.js"),["assets/lottie_svg-MJGYILXD-1f9e46c1.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}case"canvas":{this._light?r=await Tn(()=>import("./lottie_light_canvas-B5UTTNXA-cb44d299.js"),["assets/lottie_light_canvas-B5UTTNXA-cb44d299.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_canvas-CDSUBMCL-8a15594c.js"),["assets/lottie_canvas-CDSUBMCL-8a15594c.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}case"html":{this._light?r=await Tn(()=>import("./lottie_light_html-SLCECTRT-887e5dc4.js"),["assets/lottie_light_html-SLCECTRT-887e5dc4.js","assets/chunk-B7OIQIGJ-23fdac17.js"]):r=await Tn(()=>import("./lottie_html-X3TYKVQI-be036789.js"),["assets/lottie_html-X3TYKVQI-be036789.js","assets/chunk-B7OIQIGJ-23fdac17.js"]);break}default:throw new Error(`Invalid renderer: ${n}`)}return r.default}_getActiveAnimationId(){var t,n,r,i;let o=this._dotLottieLoader.manifest;return(i=(r=(t=this._activeAnimationId)!=null?t:o==null?void 0:o.activeAnimationId)!=null?r:(n=o==null?void 0:o.animations[0])==null?void 0:n.id)!=null?i:void 0}async load(t){if(this._currentState==="loading"){Le("Loading in progress..");return}try{if(this.setCurrentState("loading"),typeof this._src=="string")if(z8(this._src)){let r=JSON.parse(this._src);this._dotLottieLoader.loadFromLottieJSON(r)}else{let r=new URL(this._src,window.location.href);await this._dotLottieLoader.loadFromUrl(r.toString())}else if(typeof this._src=="object"&&Fl(this._src))this._dotLottieLoader.loadFromLottieJSON(this._src);else throw ae("Invalid src provided");if(!this._dotLottieLoader.manifest)throw ae("No manifest found");let n=this._getActiveAnimationId();if(!n)throw ae("No active animation found");await this._setCurrentAnimation(n),await this.render(t)}catch(n){this.setCurrentState("error"),n instanceof Error&&si(`Error loading animation: ${n.message}`)}}setErrorState(t){this.setCurrentState("error"),si(t)}_requireValidDirection(t){if(t!==-1&&t!==1)throw ae("Direction can only be -1 (backwards) or 1 (forwards)")}_requireValidIntermission(t){if(t<0||!Number.isInteger(t))throw ae("intermission must be a positive number")}_requireValidLoop(t){if(typeof t=="number"&&(!Number.isInteger(t)||t<0))throw ae("loop must be a positive number or boolean")}_requireValidSpeed(t){if(typeof t!="number")throw ae("speed must be a number")}_requireValidBackground(t){if(typeof t!="string")throw ae("background must be a string")}_requireValidAutoplay(t){if(typeof t!="boolean")throw ae("autoplay must be a boolean")}_requireValidPlaybackOptions(t){t.direction&&this._requireValidDirection(t.direction),t.intermission&&this._requireValidIntermission(t.intermission),t.loop&&this._requireValidLoop(t.loop),t.speed&&this._requireValidSpeed(t.speed)}};function Y8(){var e=S.useRef(!0);return e.current?(e.current=!1,!0):e.current}var J8=function(e,t){var n=Y8();S.useEffect(function(){if(!n)return e()},t)},jt=J8,X8=function(){};function D2(e){for(var t=[],n=1;n{let e=S.useContext(F2);if(typeof e>"u")throw ae("useDotLottieContext must be used within a DotLottieProvider");return e},R2=(e,t,n)=>{let[r,i]=S.useState(()=>n());return S.useEffect(()=>{let o=e(()=>{let a=t();i(a)});return()=>{o()}},[e]),r},cP=()=>{};function Ar(e){let t=$2(),n=S.useCallback(()=>{if(t!==null)return e(t.getState())},[e,t]),r=S.useCallback(i=>t===null?cP:t.state.subscribe(i),[t]);return R2(r,n,()=>e(dh))}var fP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M8.33325 11.6667C7.78097 11.6667 7.33325 12.1144 7.33325 12.6667C7.33325 13.2189 7.78097 13.6667 8.33325 13.6667C8.88554 13.6667 9.33325 13.2189 9.33325 12.6667C9.33325 12.1144 8.88554 11.6667 8.33325 11.6667Z",fill:"currentColor"}),R.createElement("path",{d:"M7.33325 8C7.33325 7.44771 7.78097 7 8.33325 7C8.88554 7 9.33325 7.44771 9.33325 8C9.33325 8.55228 8.88554 9 8.33325 9C7.78097 9 7.33325 8.55228 7.33325 8Z",fill:"currentColor"}),R.createElement("path",{d:"M7.33325 3.33333C7.33325 2.78105 7.78097 2.33333 8.33325 2.33333C8.88554 2.33333 9.33325 2.78105 9.33325 3.33333C9.33325 3.88562 8.88554 4.33333 8.33325 4.33333C7.78097 4.33333 7.33325 3.88562 7.33325 3.33333Z",fill:"currentColor"})),dP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M10.8654 2.31311C11.0607 2.11785 11.3772 2.11785 11.5725 2.31311L13.4581 4.19873C13.6534 4.39399 13.6534 4.71058 13.4581 4.90584L11.5725 6.79146C11.3772 6.98672 11.0607 6.98672 10.8654 6.79146C10.6701 6.5962 10.6701 6.27961 10.8654 6.08435L11.6162 5.33354H4V6.66687C4 7.03506 3.70152 7.33354 3.33333 7.33354C2.96514 7.33354 2.66666 7.03506 2.66666 6.66687L2.66666 4.66687C2.66666 4.29868 2.96514 4.0002 3.33333 4.0002H11.8454L10.8654 3.02022C10.6701 2.82496 10.6701 2.50838 10.8654 2.31311Z",fill:"currentColor"}),R.createElement("path",{d:"M12.4375 11.9998C12.8057 11.9998 13.1042 11.7013 13.1042 11.3331V9.33313C13.1042 8.96494 12.8057 8.66647 12.4375 8.66647C12.0693 8.66647 11.7708 8.96494 11.7708 9.33313V10.6665H4.15462L4.90543 9.91565C5.10069 9.72039 5.10069 9.40381 4.90543 9.20854C4.71017 9.01328 4.39359 9.01328 4.19832 9.20854L2.31271 11.0942C2.11744 11.2894 2.11744 11.606 2.31271 11.8013L4.19832 13.6869C4.39359 13.8821 4.71017 13.8821 4.90543 13.6869C5.10069 13.4916 5.10069 13.175 4.90543 12.9798L3.92545 11.9998H12.4375Z",fill:"currentColor"})),pP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.3336 2.5C14.3336 2.22386 14.1097 2 13.8336 2C13.5574 2 13.3336 2.22386 13.3336 2.5V13.5C13.3336 13.7761 13.5574 14 13.8336 14C14.1097 14 14.3336 13.7761 14.3336 13.5V2.5ZM3.50618 2.21722C2.83954 1.82595 2 2.30667 2 3.07965V12.9201C2 13.6931 2.83954 14.1738 3.50618 13.7825L11.8893 8.86231C12.5477 8.47586 12.5477 7.52389 11.8893 7.13745L3.50618 2.21722Z",fill:"currentColor"})),hP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M3.99996 2C3.26358 2 2.66663 2.59695 2.66663 3.33333V12.6667C2.66663 13.403 3.26358 14 3.99996 14H5.33329C6.06967 14 6.66663 13.403 6.66663 12.6667V3.33333C6.66663 2.59695 6.06967 2 5.33329 2H3.99996Z",fill:"currentColor"}),R.createElement("path",{d:"M10.6666 2C9.93025 2 9.33329 2.59695 9.33329 3.33333V12.6667C9.33329 13.403 9.93025 14 10.6666 14H12C12.7363 14 13.3333 13.403 13.3333 12.6667V3.33333C13.3333 2.59695 12.7363 2 12 2H10.6666Z",fill:"currentColor"})),mP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{d:"M3.33337 3.46787C3.33337 2.52312 4.35948 1.93558 5.17426 2.41379L12.8961 6.94592C13.7009 7.41824 13.7009 8.58176 12.8961 9.05408L5.17426 13.5862C4.35948 14.0644 3.33337 13.4769 3.33337 12.5321V3.46787Z",fill:"currentColor"})),vP=e=>R.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.69214 13.5C1.69214 13.7761 1.916 14 2.19214 14C2.46828 14 2.69214 13.7761 2.69214 13.5L2.69214 2.5C2.69214 2.22386 2.46828 2 2.19214 2C1.916 2 1.69214 2.22386 1.69214 2.5V13.5ZM12.5192 13.7828C13.1859 14.174 14.0254 13.6933 14.0254 12.9204L14.0254 3.0799C14.0254 2.30692 13.1859 1.8262 12.5192 2.21747L4.13612 7.13769C3.47769 7.52414 3.47769 8.4761 4.13612 8.86255L12.5192 13.7828Z",fill:"currentColor"})),gP=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.5303 6.46967C13.8232 6.76256 13.8232 7.23744 13.5303 7.53033L9.06066 12L13.5303 16.4697C13.8232 16.7626 13.8232 17.2374 13.5303 17.5303C13.2374 17.8232 12.7626 17.8232 12.4697 17.5303L7.46967 12.5303C7.17678 12.2374 7.17678 11.7626 7.46967 11.4697L12.4697 6.46967C12.7626 6.17678 13.2374 6.17678 13.5303 6.46967Z",fill:"currentColor"})),yP=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.4697 17.5303C10.1768 17.2374 10.1768 16.7626 10.4697 16.4697L14.9393 12L10.4697 7.53033C10.1768 7.23744 10.1768 6.76256 10.4697 6.46967C10.7626 6.17678 11.2374 6.17678 11.5303 6.46967L16.5303 11.4697C16.8232 11.7626 16.8232 12.2374 16.5303 12.5303L11.5303 17.5303C11.2374 17.8232 10.7626 17.8232 10.4697 17.5303Z",fill:"currentColor"})),wP=({children:e,enableReset:t,expand:n=!1,onBack:r,onExpand:i,onReset:o,title:a})=>{let s=S.useCallback(()=>{r()},[r]),l=S.useCallback(()=>{i()},[i]),u=S.useCallback(()=>{o()},[o]);return R.createElement(R.Fragment,null,!n&&R.createElement("button",{className:"popover-item","aria-label":`Go to ${a}`,onClick:l},R.createElement("span",{style:{flex:1}},a),R.createElement("span",null,R.createElement(yP,null))),n&&R.createElement("div",{className:"popover-submenu"},R.createElement("div",{className:"popover-header"},R.createElement("button",{onClick:s},R.createElement(gP,null)),R.createElement("div",{className:"popover-header-title",style:{flex:1}},R.createElement("span",null,a),t&&R.createElement("button",{className:"reset-theme",onClick:u,"aria-label":`Reset ${a}`},"Reset"))),e))},_P=e=>R.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",...e},R.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.5283 5.9372C20.8211 6.23009 20.8211 6.70497 20.5283 6.99786L9.4631 18.063C9.32181 18.2043 9.12997 18.2833 8.93016 18.2826C8.73035 18.2819 8.53907 18.2015 8.39877 18.0593L3.46807 13.0596C3.17722 12.7647 3.18052 12.2898 3.47544 11.999C3.77036 11.7081 4.24522 11.7114 4.53608 12.0063L8.93646 16.4683L19.4676 5.9372C19.7605 5.64431 20.2354 5.64431 20.5283 5.9372Z",fill:"currentColor"})),SP=({onSelectItem:e,selected:t=!1,value:n,...r})=>{let i=S.useCallback(()=>{e==null||e(n)},[e,n]);return R.createElement("button",{"aria-label":`Select ${n}`,className:`popover-item ${t?"selected":""}`,onClick:i,...r},R.createElement("span",{style:{visibility:t?"visible":"hidden"}},R.createElement(_P,null)),R.createElement("span",{style:{flex:1}},n))},bP=({items:e=[],onSelectItem:t,onDismiss:n,...r})=>{let[i,o]=S.useState(""),a=S.useRef(null);nP(a,()=>{o(""),n()}),lP("Escape",()=>{o(""),n()});let s=S.useCallback(()=>{o("")},[o]),l=S.useCallback(c=>()=>o(c),[o]),u=S.useCallback((c,f)=>()=>t(c,f),[t]);return R.createElement("dialog",{ref:a,style:{padding:i?"0px":"8px"},className:"popover","aria-label":"Popover Menu",...r},R.createElement("ul",{"aria-label":"Popover content",className:"popover-content"},e.map(c=>R.createElement("li",{key:c.title,style:{width:"100%"}},(i===c.title||!i)&&R.createElement(wP,{expand:i===c.title,title:c.title,onExpand:l(c.title),onBack:s,enableReset:c.enableReset,onReset:u(c.title,"")},R.createElement("ul",{className:"popover-items","aria-label":`List of ${c.title}`},c.items.map(f=>R.createElement("li",{key:f.value},R.createElement(SP,{value:f.value,selected:f.selected,onSelectItem:u(c.title,f.value)})))))))))},EP=["play","stop","loop","next","previous","animations","themes"],CP=({buttons:e=EP,...t})=>{let n=$2(),r=Ar(D=>D.loop),i=Ar(D=>D.currentState),o=Ar(D=>D.seeker),a=Ar(D=>D.currentAnimationId),s=Ar(D=>D.defaultTheme),l=Ar(D=>D.direction),u=Ar(D=>D.activeStateId),c=S.useMemo(()=>i===en.Playing,[i]),[f,d]=S.useState(!1),[h,y]=S.useState([]),[m,w]=S.useState([]),[p,g]=S.useState([]),v=S.useMemo(()=>{let D=[],F=h.map(N=>({value:N.id,selected:a===N.id})),A=m.filter(N=>N.animations.length===0||N.animations.includes(a||"")).map(N=>({value:N.id,selected:s===N.id})),I=p.map(N=>({value:N,selected:u===N}));return Array.isArray(F)&&F.length!==0&&D.push({title:"Animations",items:F,enableReset:!1}),Array.isArray(I)&&I.length!==0&&D.push({title:"States",items:I,enableReset:!0}),Array.isArray(A)&&A.length!==0&&D.push({title:"Themes",items:A,enableReset:!!s}),D},[h,m,a,s,p,u]),_=S.useMemo(()=>e.includes("themes")&&Array.isArray(m)&&m.length?!0:e.includes("animations")&&Array.isArray(h)&&h.length>1,[v]),b=S.useCallback(()=>{d(!f)},[d]),E=S.useCallback(()=>{d(!1)},[d]),C=S.useCallback(()=>{n==null||n.toggleLoop()},[n]),x=S.useCallback(()=>{n==null||n.freeze()},[n]),O=S.useCallback(()=>{n==null||n.unfreeze()},[n]),k=S.useCallback(()=>{n==null||n.next()},[n]),T=S.useCallback(()=>{n==null||n.previous()},[n]),z=S.useCallback(()=>{n==null||n.togglePlay()},[n]),W=S.useCallback((D,F)=>{D==="Animations"&&(n==null||n.play(F)),D==="Themes"&&(n==null||n.setDefaultTheme(F)),D==="States"&&(F?n==null||n.enterInteractiveMode(F):n==null||n.exitInteractiveMode())},[n]),$=S.useCallback(D=>{n==null||n.seek(String(D.currentTarget.value).concat("%"))},[n]);function M(){var D,F,A;let I=(D=n==null?void 0:n.getManifest())==null?void 0:D.animations,N=(F=n==null?void 0:n.getManifest())==null?void 0:F.themes,j=(A=n==null?void 0:n.getManifest())==null?void 0:A.states;I&&y(I),N&&w(N),j&&g(j)}return S.useEffect(()=>{if(!(typeof n>"u"))return n==null||n.addEventListener("DOMLoaded",M),()=>{n==null||n.removeEventListener("DOMLoaded",M)}},[n]),R.createElement("div",{"aria-label":"lottie-animation-controls",className:"toolbar",...t},e.includes("previous")&&h.length>1&&R.createElement("button",{onClick:T,"aria-label":"play-previous"},R.createElement(vP,null)),e.includes("play")&&R.createElement("button",{onClick:z,"aria-label":"play-pause"},c?R.createElement(hP,null):R.createElement(mP,null)),e.includes("next")&&h.length>1&&R.createElement("button",{onClick:k,"aria-label":"play-next"},R.createElement(pP,null)),R.createElement("input",{style:{width:"100%","--seeker":o},className:`seeker ${l===1?"":"to-left"}`,type:"range",min:0,step:0,max:100,value:o||0,onInput:$,onMouseDown:x,onMouseUp:O,"aria-valuemin":1,"aria-valuemax":100,role:"slider","aria-valuenow":o,"aria-label":"lottie-seek-input"}),e.includes("loop")&&R.createElement("button",{onClick:C,className:r?"active":"","aria-label":"loop-toggle"},R.createElement(dP,null)),_&&R.createElement("div",{style:{position:"relative"}},R.createElement(bP,{items:v,open:f,onDismiss:E,onSelectItem:W}),R.createElement("button",{className:`${f?"popover-active":""}`,"aria-label":"open-popover",onClick:b},R.createElement(fP,null))))},xP=typeof window>"u"?S.useEffect:S.useLayoutEffect,OP=(e,t,n)=>{let[r]=S.useState(()=>new Q8(e,t.current,n)),i=S.useRef(!1);return xP(()=>{async function o(){!i.current&&t.current&&(i.current=!0,r.setContainer(t.current),await r.load())}return o(),()=>{i.current&&r.destroy()}},[r]),r};function hs(e,t){let n=S.useCallback(()=>t(e.getState()),[t,e]),r=S.useCallback(i=>e.state.subscribe(i),[e]);return R2(r,n,()=>t(dh))}var v0={animation:{position:"relative",width:"100%",height:"100%"},animationWithControls:{position:"relative"}},AP=R.forwardRef(({onEvent:e,activeAnimationId:t,autoplay:n,background:r="transparent",direction:i,intermission:o,loop:a,playMode:s,hover:l,speed:u,renderer:c="svg",rendererSettings:f={},src:d,className:h="",testId:y,children:m,defaultTheme:w,light:p=!1,worker:g=!1,activeStateId:v,lottieRef:_,...b},E)=>{let C=S.useRef(null),x=OP(d,C,{renderer:c,activeAnimationId:t,rendererSettings:{clearCanvas:!0,progressiveLoad:!1,hideOnTransparent:!0,...f},hover:l,loop:a,direction:i,speed:u,intermission:o,background:r,playMode:s,autoplay:l?!1:n,testId:y,defaultTheme:w,light:p,worker:g,activeStateId:v}),O=S.useRef(x);O.current=x,R.useImperativeHandle(E,()=>x,[x]),R.useImperativeHandle(_,()=>x,[x]);let k=hs(x,$=>$.currentState),T=hs(x,$=>$.frame),z=hs(x,$=>$.seeker),W=hs(x,$=>$.currentAnimationId);return jt(()=>{typeof a>"u"?O.current.revertToManifestValues(["loop"]):O.current.setLoop(a)},[a]),jt(()=>{[en.Initial,en.Loading].includes(k)||(typeof n>"u"?O.current.revertToManifestValues(["autoplay"]):O.current.setAutoplay(n))},[n]),jt(()=>{typeof i>"u"?O.current.revertToManifestValues(["direction"]):O.current.setDirection(i)},[i]),jt(()=>{typeof u>"u"?O.current.revertToManifestValues(["speed"]):O.current.setSpeed(u)},[u]),jt(()=>{typeof s>"u"?O.current.revertToManifestValues(["playMode"]):O.current.setMode(s)},[s]),jt(()=>{typeof l>"u"?O.current.revertToManifestValues(["hover"]):O.current.setHover(l)},[l]),jt(()=>{typeof r>"u"?O.current.setBackground("transparent"):O.current.setBackground(r)},[r]),jt(()=>{typeof o>"u"?O.current.revertToManifestValues(["intermission"]):O.current.setIntermission(o)},[o]),jt(()=>{typeof w>"u"||!w?O.current.revertToManifestValues(["defaultTheme"]):O.current.setDefaultTheme(w)},[w]),jt(()=>{t&&O.current.play(t)},[t]),jt(()=>(typeof v<"u"&&O.current.enterInteractiveMode(v),()=>{O.current.exitInteractiveMode()}),[v]),jt(()=>{typeof d<"u"&&O.current.updateSrc(d)},[d]),S.useEffect(()=>{let $=()=>{e==null||e(mt.Ready)},M=()=>{e==null||e(mt.DataReady)},D=()=>{e==null||e(mt.DataFail)},F=()=>{O.current.currentState!==en.Playing&&(e==null||e(mt.Complete))},A=()=>{e==null||e(mt.LoopComplete)};return O.current.addEventListener("DOMLoaded",$),O.current.addEventListener("data_ready",M),O.current.addEventListener("data_failed",D),O.current.addEventListener("complete",F),O.current.addEventListener("loopComplete",A),()=>{O.current.removeEventListener("DOMLoaded",$),O.current.removeEventListener("data_ready",M),O.current.removeEventListener("data_failed",D),O.current.removeEventListener("complete",F),O.current.removeEventListener("loopComplete",A)}},[]),S.useEffect(()=>{switch(k){case en.Stopped:e==null||e(mt.Stop);break;case en.Paused:e==null||e(mt.Pause);break;case en.Playing:e==null||e(mt.Play);break;case en.Frozen:e==null||e(mt.Freeze);break;case en.Error:e==null||e(mt.Error);break}},[k]),S.useEffect(()=>{e==null||e(mt.Frame,{frame:T,seeker:z})},[T]),R.createElement(uP,{value:x},R.createElement("div",{className:`dotlottie-container main ${m?"controls":""} ${h}`,lang:"en",...y&&{"data-testid":y},...b},R.createElement("div",{ref:C,"data-name":`${W}`,role:"figure",className:`animation ${m?"controls":""}`,style:m?v0.animationWithControls:v0.animation,...y&&{"data-testid":"animation"}},k===en.Error&&R.createElement("div",{...y&&{"data-testid":"error"},className:"error"},"⚠️")),m))});const kP=({activeAnimationId:e})=>{const t=S.useRef(),n=Ne(d=>d.playground.playerUrl),[r,i]=S.useState([]),[o,a]=S.useState(""),[s,l]=S.useState(0),u=S.useCallback((d,h)=>{var m,w,p;if(d===mt.Ready){const g=(w=(m=t.current)==null?void 0:m.getManifest())==null?void 0:w.states;i(g||[])}if(d===mt.Frame){const{frame:g}=h;l(Math.floor(g))}const y=(p=t.current)==null?void 0:p.getState();y&&a(y.activeStateId||"")},[t]),c=S.useCallback(()=>()=>{t.current&&t.current.exitInteractiveMode()},[t]),f=S.useCallback(d=>()=>{t.current&&t.current.enterInteractiveMode(d)},[t]);if(n)return P.jsx("div",{children:P.jsxs(P.Fragment,{children:[P.jsx(AP,{activeAnimationId:e||void 0,background:"white",onEvent:u,ref:t,src:n,children:P.jsxs("div",{className:"bg-white",children:[P.jsx(CP,{}),P.jsx("div",{className:"px-3 pb-1",children:P.jsxs("span",{className:"bg-gray-300 rounded px-2",children:["# ",P.jsx("span",{children:s})]})})]})}),P.jsx("div",{className:"flex flex-wrap gap-2 p-2 text-white",children:P.jsxs("div",{className:"text-white",children:[P.jsxs("div",{className:"mb-2 flex gap-2",children:[P.jsx("span",{children:"Interactivity states:"}),P.jsx(Ol,{disabled:!o,color:"red",onClick:c(),children:"Exit Interactivity"})]}),P.jsx("div",{className:"flex flex-wrap gap-2",children:r.map(d=>P.jsx(Ol,{color:o===d?"green":"blue",onClick:f(d),children:d},d))})]})})]})})};const PP=({file:e,fileName:t})=>{const n=Au(),r=S.useRef(),i=Ne(L=>L.animations.list),o=Ne(L=>L.themes.list),a=Ne(L=>L.states.list),{addDotLottieAnimation:s,addDotLottieStateMachine:l,addDotLottieTheme:u,buildAndUpdateUrl:c,dotLottie:f,downloadDotLottie:d,fetchAndUpdateDotLottie:h,removeDotLottieAnimation:y,removeDotLottieState:m,removeDotLottieTheme:w,setDotLottie:p}=Kp(),g=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.content}),v=Ne(L=>{var V;return((V=L.editor.file)==null?void 0:V.type)||"json"}),_=Ne(L=>L.editor.animationId),b=Ne(L=>L.playground.workingFileName),E=S.useCallback(async(L,V)=>{let H,q="";if(L instanceof File?(H=await L.arrayBuffer(),q=L.name):(H=L,q=V||"new_awesome"),typeof H<"u")try{const ee=await f.fromArrayBuffer(H);n(Ls()),n(as(q)),p(ee)}catch(ee){throw ve(ee.message,{type:"error"}),ee}},[as,p]),C=S.useCallback(L=>{const V=L[0];typeof V>"u"||E(V)},[E]);S.useEffect(()=>{E(e,t)},[E]);const x=Ne(L=>L.editor.validationStatus),O=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.name}),k=Ne(L=>{var V;return(V=L.editor.file)==null?void 0:V.path}),T=S.useCallback(L=>{x&&L&&n(xl(L))},[x,n]),z=Ne(L=>L.editor.updated),W=S.useCallback(()=>{var H;if(!x||!O)return;const L=(H=r.current)==null?void 0:H.getValue();let V;if(L){switch(k){case"States":if(V=JSON.parse(L),L&&O){const q=V.descriptor.id;l(V,O),n(kv({name:q}))}break;case"Themes":O&&u(L,O);break}n(xl(!1))}},[x,O,n,k]);function $(L){r.current=L}S.useEffect(()=>{f.animations.length&&(h(),c())},[f,c,h]);const M=S.useCallback(async(L,V)=>{var q,ee;n(Ls());let H;switch(L){case"States":H=(q=f.getStateMachine(V))==null?void 0:q.toString();break;case"Themes":H=await((ee=f.getTheme(V))==null?void 0:ee.toString());break}H&&n(kv({name:V,type:"json",path:L,content:v6(H)}))},[f,n]),D=S.useCallback(L=>{if(L.some(H=>H.severity===8)){n(Pv(!1));return}n(Pv(!0))},[n]),F=S.useCallback((L,V)=>{switch(L){case"States":m(V);break;case"Animations":y(V);break;case"Themes":w(V);break}(O===V||_===V)&&n(Ls())},[f,n,O,_]),A=S.useCallback(async(L,V)=>{const H=cd(V.name).replace(/(.json)/gu,"");let q;switch(L){case"States":q=JSON.parse(await V.text()),l(q);break;case"Animations":q=JSON.parse(await V.text()),s(q,H);break;case"Themes":q=await V.text(),u(q,V.name);break}},[f]),I=S.useCallback(()=>{h(),c()},[h,c]),N=S.useCallback(async(L,V)=>{const H=cd(V).replace(/(.json)/gu,"");let q;switch(L){case"States":q=g6(),q.descriptor.id=H,l(q);break;case"Themes":u("{}",H);break}},[f]),j=S.useCallback((L,V)=>{n(_6(V.replace(/.json/gu,"")))},[n]),B=S.useCallback(L=>{n(as(L))},[as,n]);return P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"w-full bg-dark p-2 flex gap-2 justify-end",children:[P.jsx(ia,{onDrop:C,accept:"lottie",children:L=>P.jsxs(Ol,{...L.getRootProps(),children:[P.jsx("input",{...L.getInputProps()}),"Start Over"]})}),P.jsx("div",{className:"flex-1 flex justify-center items-center text-gray-400 text-sm",children:P.jsx(b6,{title:b,onChange:B})}),P.jsx(Ol,{onClick:d,children:"Download"})]}),P.jsx("div",{className:"flex grow border-t border-gray-600 flex-1 max-h-[calc(100vh-2.9rem)]",children:P.jsxs(Fy,{autoSaveId:"dotlottie-playground",direction:"horizontal",className:"h-full",children:[P.jsx(ks,{defaultSize:10,maxSize:40,className:"bg-dark",children:P.jsxs("section",{className:"flex flex-col h-full",children:[P.jsx(Tc,{className:"flex-1 h-1/3",title:"Animations",files:i,onClick:j,onRemove:F,onUpload:A}),P.jsx(Tc,{className:"flex-1 h-1/3",title:"States",files:a,onClick:M,onRemove:F,onUpload:A,onAddNew:N}),P.jsx(Tc,{className:"flex-1 h-1/3",title:"Themes",files:o,onClick:M,onRemove:F,onUpload:A,onAddNew:N})]})}),P.jsx(Gf,{className:"bg-gray-500 w-1"}),P.jsx(ks,{children:P.jsx(ia,{onDrop:C,accept:"lottie",noClick:!0,children:L=>P.jsxs("div",{className:"flex flex-col w-full h-full relative",...L.getRootProps(),children:[P.jsx("input",{...L.getInputProps()}),L.isDragActive&&P.jsx("div",{className:"absolute z-10 inset-0 bg-gray-500 opacity-80 flex justify-center items-center text-white text-3xl",children:"Drop your .lottie here"}),_&&P.jsx(xk,{onUpdate:I}),g&&P.jsxs("div",{className:"h-full flex flex-col",children:[P.jsxs("div",{className:"flex justify-between items-stretch pr-4 flex-shrink border-b border-gray-600",children:[P.jsx("span",{className:"text-white text-sm border-b border-b-blue-500 border-r border-gray-600 px-4 flex items-center",children:O}),P.jsx("button",{title:"Save",className:"text-gray-400 py-1 hover:text-white disabled:text-gray-700",onClick:W,disabled:!z,children:P.jsx(Sy,{size:33})})]}),P.jsx(SC,{className:"flex-1 max-h-[calc(100vh-5.5rem)]",language:v,width:"100%",theme:"vs-dark",options:{fontSize:15,formatOnPaste:!0,formatOnType:!0,minimap:{enabled:!1}},loading:"Loading...",value:g,onChange:T,onMount:$,onValidate:D})]})]})})}),P.jsx(Gf,{className:"bg-gray-500 w-1"}),P.jsx(ks,{defaultSize:25,children:P.jsx(kP,{activeAnimationId:_})})]})})]})},IP=[{name:"toggle.lottie",path:"/player-component/toggle.lottie"},{name:"interactivity_example.lottie",path:"/player-component/interactivity_example.lottie"},{name:"aniki_hamster.lottie",path:"/player-component/aniki_hamster.lottie"},{name:"theming_example.lottie",path:"/player-component/theming_example.lottie"}],MP=({onStart:e})=>{const t=S.useCallback(async(o,a)=>{let s,l="";o instanceof File?(s=await o.arrayBuffer(),l=o.name):(s=o,l=a||"new_awesome"),typeof s<"u"&&e(s,l)},[e]),n=S.useCallback(o=>{const a=o[0];a&&t(a)},[e]),r=S.useCallback(async(o,a)=>{const l=await(await fetch(o)).arrayBuffer();t(l,a)},[]),i=S.useCallback(o=>()=>{r(o.path,o.name)},[e]);return P.jsx(ia,{onDrop:n,accept:"lottie",noClick:!0,children:o=>P.jsxs("div",{...o.getRootProps(),className:"h-full bg-dark text-white flex justify-center items-center",children:[P.jsx("input",{...o.getInputProps()}),o.isDragActive?P.jsx("h1",{className:"text-5xl mb-4",children:"Drop it!!!! Almost there :)"}):P.jsxs("div",{className:"p-10 rounded text-gray-400 max-w-2xl",children:[P.jsx("h1",{className:"text-5xl mb-4",children:"DotLottie Playground :)"}),P.jsxs("p",{className:"text-2xl mb-6",children:["To start drop a ",P.jsx("span",{className:"text-red-600",children:".lottie"}),". You could also select a sample file below."]}),P.jsx("h2",{className:"text-lg mb-2",children:"Sample files"}),P.jsx("ul",{className:"text-sm",children:IP.map(a=>P.jsx("li",{children:P.jsxs("button",{className:"flex gap-2 items-center hover:text-white mb-1",onClick:i(a),children:[P.jsx(cE,{className:"fill-yellow-500"}),a.name]})},a.name))})]})]})})},LP=()=>{const[e,t]=S.useState({}),n=S.useCallback((r,i)=>{t({name:i,arrayBuffer:r})},[t]);return P.jsxs("div",{className:"h-screen bg-dark",children:[e.arrayBuffer?P.jsx(PP,{file:e.arrayBuffer,fileName:e.name||"unammed.lottie"}):P.jsx(MP,{onStart:n}),P.jsx(Nf,{})]})},DP=Wx({reducer:{animations:r6,themes:f6,states:l6,editor:S6,playground:o6}});Wc.createRoot(document.getElementById("root")).render(P.jsx(R.StrictMode,{children:P.jsx(iE,{store:DP,children:P.jsx(y6,{children:P.jsx(LP,{})})})}));export{si as a,WP as d,ae as o,Rt as u}; diff --git a/index.html b/index.html index fdbfbd0..4e9de20 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ DotLottie Playground - +