@coppsary/motionly 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2470 +0,0 @@
1
- (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function i(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(n){if(n.ep)return;n.ep=!0;const a=i(n);fetch(n.href,a)}})();var K1=()=>{window.va||(window.va=function(...e){window.vaq||(window.vaq=[]),window.vaq.push(e)})},X1="@vercel/analytics",J1="2.0.1";function pm(){return typeof window<"u"}function mm(){try{const t="production"}catch{}return"production"}function Z1(t="auto"){if(t==="auto"){window.vam=mm();return}window.vam=t}function Q1(){return(pm()?window.vam:mm())||"production"}function hd(){return Q1()==="development"}function t0(t){return t.scriptSrc?qr(t.scriptSrc):hd()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?qr(`${t.basePath}/insights/script.js`):"/_vercel/insights/script.js"}function e0(t,e){var i;let s=t;if(e)try{s={...(i=JSON.parse(e))==null?void 0:i.analytics,...t}}catch{}Z1(s.mode);const n={sdkn:X1+(s.framework?`/${s.framework}`:""),sdkv:J1};return s.disableAutoTrack&&(n.disableAutoTrack="1"),s.viewEndpoint&&(n.viewEndpoint=qr(s.viewEndpoint)),s.eventEndpoint&&(n.eventEndpoint=qr(s.eventEndpoint)),s.sessionEndpoint&&(n.sessionEndpoint=qr(s.sessionEndpoint)),hd()&&s.debug===!1&&(n.debug="false"),s.dsn&&(n.dsn=s.dsn),s.endpoint?n.endpoint=s.endpoint:s.basePath&&(n.endpoint=qr(`${s.basePath}/insights`)),{beforeSend:s.beforeSend,src:t0(s),dataset:n}}function qr(t){return t.startsWith("http://")||t.startsWith("https://")||t.startsWith("/")?t:`/${t}`}function i0(t={debug:!0},e){var i;if(!pm())return;const{beforeSend:s,src:n,dataset:a}=e0(t,e);if(K1(),s&&((i=window.va)==null||i.call(window,"beforeSend",s)),document.head.querySelector(`script[src*="${n}"]`))return;const o=document.createElement("script");o.src=n;for(const[l,c]of Object.entries(a))o.dataset[l]=c;o.defer=!0,o.onerror=()=>{const l=hd()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${n}. ${l}`)},document.head.appendChild(o)}const vm=!1;var Ql=Array.isArray,s0=Array.prototype.indexOf,Il=Array.prototype.includes,tc=Array.from,n0=Object.defineProperty,En=Object.getOwnPropertyDescriptor,_m=Object.getOwnPropertyDescriptors,r0=Object.prototype,a0=Array.prototype,pd=Object.getPrototypeOf,Mh=Object.isExtensible;function Ia(t){return typeof t=="function"}const o0=()=>{};function l0(t){return t()}function Tu(t){for(var e=0;e<t.length;e++)t[e]()}function gm(){var t,e,i=new Promise((s,n)=>{t=s,e=n});return{promise:i,resolve:t,reject:e}}function c0(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const i=[];for(const s of t)if(i.push(s),i.length===e)break;return i}const Pi=2,ia=4,xo=8,md=1<<24,Ls=16,qs=32,Kn=64,Pu=128,zs=512,mi=1024,ki=2048,Ws=4096,Vi=8192,ys=16384,pa=32768,Au=1<<25,Br=65536,Ml=1<<17,u0=1<<18,ma=1<<19,ym=1<<20,ln=1<<25,Er=65536,zl=1<<21,Jr=1<<22,qn=1<<23,un=Symbol("$state"),bm=Symbol("legacy props"),d0=Symbol(""),xm=Symbol("attributes"),Iu=Symbol("class"),Mu=Symbol("style"),zu=Symbol("text"),_l=Symbol("form reset"),ec=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ic=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function f0(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function h0(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function p0(t,e,i){throw new Error("https://svelte.dev/e/each_key_duplicate")}function m0(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function v0(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function _0(t){throw new Error("https://svelte.dev/e/effect_orphan")}function g0(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function y0(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function b0(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function x0(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function w0(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function S0(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const k0=1,B0=2,wm=4,E0=8,U0=16,T0=1,P0=2,Sm=4,A0=8,I0=16,M0=1,z0=2,hi=Symbol("uninitialized"),km="http://www.w3.org/1999/xhtml",C0="http://www.w3.org/2000/svg",$0="@attach";function O0(){console.warn("https://svelte.dev/e/derived_inert")}function F0(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function N0(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Bm(t){return t===this.v}function D0(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function Em(t){return!D0(t,this.v)}let va=!1,R0=!1;function L0(){va=!0}let Le=null;function sa(t){Le=t}function ir(t,e=!1,i){Le={p:Le,i:!1,c:null,e:null,s:t,x:null,r:ie,l:va&&!e?{s:null,u:null,$:[]}:null}}function sr(t){var e=Le,i=e.e;if(i!==null){e.e=null;for(var s of i)Wm(s)}return t!==void 0&&(e.x=t),e.i=!0,Le=e.p,t??{}}function _a(){return!va||Le!==null&&Le.l===null}let pr=[];function Um(){var t=pr;pr=[],Tu(t)}function Un(t){if(pr.length===0&&!Ja){var e=pr;queueMicrotask(()=>{e===pr&&Um()})}pr.push(t)}function H0(){for(;pr.length>0;)Um()}function Tm(t){var e=ie;if(e===null)return ce.f|=qn,t;if((e.f&pa)===0&&(e.f&ia)===0)throw t;Rn(t,e)}function Rn(t,e){if(!(e!==null&&(e.f&ys)!==0)){for(;e!==null;){if((e.f&Pu)!==0){if((e.f&pa)===0)throw t;try{e.b.error(t);return}catch(i){t=i}}e=e.parent}throw t}}const V0=-7169;function ni(t,e){t.f=t.f&V0|e}function vd(t){(t.f&zs)!==0||t.deps===null?ni(t,mi):ni(t,Ws)}function Pm(t){if(t!==null)for(const e of t)(e.f&Pi)===0||(e.f&Er)===0||(e.f^=Er,Pm(e.deps))}function Am(t,e,i){(t.f&ki)!==0?e.add(t):(t.f&Ws)!==0&&i.add(t),Pm(t.deps),ni(t,mi)}let el=!1;function j0(t){var e=el;try{return el=!1,[t(),el]}finally{el=e}}function G0(t){let e=0,i=Jn(0),s;return()=>{bd()&&(r(i),ko(()=>(e===0&&(s=k(()=>t(()=>Za(i)))),e+=1,()=>{Un(()=>{e-=1,e===0&&(s?.(),s=void 0,Za(i))})})))}}var q0=Br|ma;function W0(t,e,i,s){new Y0(t,e,i,s)}class Y0{parent;is_pending=!1;transform_error;#t;#a=null;#e;#l;#s;#r=null;#i=null;#o=null;#n=null;#p=0;#c=0;#u=!1;#f=new Set;#v=new Set;#d=null;#g=G0(()=>(this.#d=Jn(this.#p),()=>{this.#d=null}));constructor(e,i,s,n){this.#t=e,this.#e=i,this.#l=a=>{var o=ie;o.b=this,o.f|=Pu,s(a)},this.parent=ie.b,this.transform_error=n??this.parent?.transform_error??(a=>a),this.#s=Bo(()=>{this.#y()},q0)}#_(){try{this.#r=Yi(()=>this.#l(this.#t))}catch(e){this.error(e)}}#x(e){const i=this.#e.failed;i&&(this.#o=Yi(()=>{i(this.#t,()=>e,()=>()=>{})}))}#w(){const e=this.#e.pending;e&&(this.is_pending=!0,this.#i=Yi(()=>e(this.#t)),Un(()=>{var i=this.#n=document.createDocumentFragment(),s=Tn();i.append(s),this.#r=this.#b(()=>Yi(()=>this.#l(s))),this.#c===0&&(this.#t.before(i),this.#n=null,gr(this.#i,()=>{this.#i=null}),this.#h(ee))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#c=0,this.#p=0,this.#r=Yi(()=>{this.#l(this.#t)}),this.#c>0){var e=this.#n=document.createDocumentFragment();wd(this.#r,e);const i=this.#e.pending;this.#i=Yi(()=>i(this.#t))}else this.#h(ee)}catch(i){this.error(i)}}#h(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#v)}defer_effect(e){Am(e,this.#f,this.#v)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#e.pending}#b(e){var i=ie,s=ce,n=Le;ss(this.#s),Cs(this.#s),sa(this.#s.ctx);try{return Xn.ensure(),e()}catch(a){return Tm(a),null}finally{ss(i),Cs(s),sa(n)}}#m(e,i){if(!this.has_pending_snippet()){this.parent&&this.parent.#m(e,i);return}this.#c+=e,this.#c===0&&(this.#h(i),this.#i&&gr(this.#i,()=>{this.#i=null}),this.#n&&(this.#t.before(this.#n),this.#n=null))}update_pending_count(e,i){this.#m(e,i),this.#p+=e,!(!this.#d||this.#u)&&(this.#u=!0,Un(()=>{this.#u=!1,this.#d&&Ur(this.#d,this.#p)}))}get_effect_pending(){return this.#g(),r(this.#d)}error(e){if(!this.#e.onerror&&!this.#e.failed)throw e;ee?.is_fork?(this.#r&&ee.skip_effect(this.#r),this.#i&&ee.skip_effect(this.#i),this.#o&&ee.skip_effect(this.#o),ee.oncommit(()=>{this.#S(e)})):this.#S(e)}#S(e){this.#r&&(Ui(this.#r),this.#r=null),this.#i&&(Ui(this.#i),this.#i=null),this.#o&&(Ui(this.#o),this.#o=null);var i=this.#e.onerror;let s=this.#e.failed;var n=!1,a=!1;const o=()=>{if(n){N0();return}n=!0,a&&S0(),this.#o!==null&&gr(this.#o,()=>{this.#o=null}),this.#b(()=>{this.#y()})},l=c=>{try{a=!0,i?.(c,o),a=!1}catch(u){Rn(u,this.#s&&this.#s.parent)}s&&(this.#o=this.#b(()=>{try{return Yi(()=>{var u=ie;u.b=this,u.f|=Pu,s(this.#t,()=>c,()=>o)})}catch(u){return Rn(u,this.#s.parent),null}}))};Un(()=>{var c;try{c=this.transform_error(e)}catch(u){Rn(u,this.#s&&this.#s.parent);return}c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(l,u=>Rn(u,this.#s&&this.#s.parent)):l(c)})}}function Im(t,e,i,s){const n=_a()?na:Nn;var a=t.filter(v=>!v.settled),o=e.map(n);if(i.length===0&&a.length===0){s(o);return}var l=ie,c=K0(),u=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(v=>v.promise)):null;function d(v){if((l.f&ys)===0){c();try{s([...o,...v])}catch(g){Rn(g,l)}Cl()}}var f=Mm();if(i.length===0){u.then(()=>d([])).finally(f);return}function p(){Promise.all(i.map(v=>X0(v))).then(d).catch(v=>Rn(v,l)).finally(f)}u?u.then(()=>{c(),p(),Cl()}):p()}function K0(){var t=ie,e=ce,i=Le,s=ee;return function(a=!0){ss(t),Cs(e),sa(i),a&&(t.f&ys)===0&&(s?.activate(),s?.apply())}}function Cl(t=!0){ss(null),Cs(null),sa(null),t&&ee?.deactivate()}function Mm(){var t=ie,e=t.b,i=ee,s=!!e?.is_rendered();return e?.update_pending_count(1,i),i.increment(s,t),()=>{e?.update_pending_count(-1,i),i.decrement(s,t)}}function na(t){var e=Pi|ki;return ie!==null&&(ie.f|=ma),{ctx:Le,deps:null,effects:null,equals:Bm,f:e,fn:t,reactions:null,rv:0,v:hi,wv:0,parent:ie,ac:null}}const ja=Symbol("obsolete");function X0(t,e,i){let s=ie;s===null&&h0();var n=void 0,a=Jn(hi),o=!ce,l=new Set;return db(()=>{var c=ie,u=gm();n=u.promise;try{Promise.resolve(t()).then(u.resolve,v=>{v!==ec&&u.reject(v)}).finally(Cl)}catch(v){u.reject(v),Cl()}var d=ee;if(o){if((c.f&pa)!==0)var f=Mm();if(s.b?.is_rendered())d.async_deriveds.get(c)?.reject(ja);else for(const v of l.values())v.reject(ja);l.add(u),d.async_deriveds.set(c,u)}const p=(v,g=void 0)=>{f?.(),l.delete(u),g!==ja&&(d.activate(),g?(a.f|=qn,Ur(a,g)):((a.f&qn)!==0&&(a.f^=qn),Ur(a,v)),d.deactivate())};u.promise.then(p,v=>p(null,v||"unknown"))}),So(()=>{for(const c of l)c.reject(ja)}),new Promise(c=>{function u(d){function f(){d===n?c(a):u(n)}d.then(f,f)}u(n)})}function ps(t){const e=na(t);return Qm(e),e}function Nn(t){const e=na(t);return e.equals=Em,e}function J0(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)Ui(e[i])}}function _d(t){var e,i=ie,s=t.parent;if(!An&&s!==null&&t.v!==hi&&(s.f&(ys|Vi))!==0)return O0(),t.v;ss(s);try{t.f&=~Er,J0(t),e=sv(t)}finally{ss(i)}return e}function zm(t){var e=_d(t);if(!t.equals(e)&&(t.wv=ev(),(!ee?.is_fork||t.deps===null)&&(ee!==null?(ee.capture(t,e,!0),Cu?.capture(t,e,!0)):t.v=e,t.deps===null))){ni(t,mi);return}An||(Hs!==null?(bd()||ee?.is_fork)&&Hs.set(t,e):vd(t))}function Z0(t){if(t.effects!==null)for(const e of t.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(ec),e.fn!==null&&(e.teardown=o0),e.ac=null,ro(e,0),xd(e))}function Cm(t){if(t.effects!==null)for(const e of t.effects)e.teardown&&e.fn!==null&&Tr(e)}let Xc=null,Hr=null,ee=null,Cu=null,Hs=null,$u=null,Ja=!1,Jc=!1,Wr=null,gl=null;var zh=0;let Q0=1;class Xn{id=Q0++;#t=!1;linked=!0;#a=null;#e=null;async_deriveds=new Map;current=new Map;previous=new Map;#l=new Set;#s=new Set;#r=0;#i=new Map;#o=null;#n=[];#p=[];#c=new Set;#u=new Set;#f=new Map;#v=new Set;is_fork=!1;#d=!1;constructor(){Hr===null?Xc=Hr=this:(Hr.#e=this,this.#a=Hr),Hr=this}#g(){if(this.is_fork)return!0;for(const s of this.#i.keys()){for(var e=s,i=!1;e.parent!==null;){if(this.#f.has(e)){i=!0;break}e=e.parent}if(!i)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#v.delete(e)}unskip_effect(e,i=s=>this.schedule(s)){var s=this.#f.get(e);if(s){this.#f.delete(e);for(var n of s.d)ni(n,ki),i(n);for(n of s.m)ni(n,Ws),i(n)}this.#v.add(e)}#_(){this.#t=!0,zh++>1e3&&(this.#m(),eb());for(const c of this.#c)this.#u.delete(c),ni(c,ki),this.schedule(c);for(const c of this.#u)ni(c,Ws),this.schedule(c);const e=this.#n;this.#n=[],this.apply();var i=Wr=[],s=[],n=gl=[];for(const c of e)try{this.#x(c,i,s)}catch(u){throw Fm(c),this.#g()||this.discard(),u}if(ee=null,n.length>0){var a=Xn.ensure();for(const c of n)a.schedule(c)}if(Wr=null,gl=null,this.#g()){this.#h(s),this.#h(i);for(const[c,u]of this.#f)Om(c,u);n.length>0&&ee.#_();return}const o=this.#w();if(o){this.#h(s),this.#h(i),o.#y(this);return}this.#c.clear(),this.#u.clear();for(const c of this.#l)c(this);this.#l.clear(),Cu=this,Ch(s),Ch(i),Cu=null,this.#o?.resolve();var l=ee;if(this.#r===0&&(this.#n.length===0||l!==null)&&this.#m(),this.#n.length>0)if(l!==null){const c=l;c.#n.push(...this.#n.filter(u=>!c.#n.includes(u)))}else l=this;l!==null&&l.#_()}#x(e,i,s){e.f^=mi;for(var n=e.first;n!==null;){var a=n.f,o=(a&(qs|Kn))!==0,l=o&&(a&mi)!==0,c=l||(a&Vi)!==0||this.#f.has(n);if(!c&&n.fn!==null){o?n.f^=mi:(a&ia)!==0?i.push(n):ya(n)&&((a&Ls)!==0&&this.#u.add(n),Tr(n));var u=n.first;if(u!==null){n=u;continue}}for(;n!==null;){var d=n.next;if(d!==null){n=d;break}n=n.parent}}}#w(){for(var e=this.#a;e!==null;){if(!e.is_fork){for(const[i,[,s]]of this.current)if(e.current.has(i)&&!s)return e}e=e.#a}return null}#y(e){for(const[s,n]of e.current)!this.previous.has(s)&&e.previous.has(s)&&this.previous.set(s,e.previous.get(s)),this.current.set(s,n);for(const[s,n]of e.async_deriveds){const a=this.async_deriveds.get(s);a&&n.promise.then(a.resolve).catch(a.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#c,e.#u);const i=s=>{var n=s.reactions;if(n!==null)for(const l of n){var a=l.f;if((a&Pi)!==0)i(l);else{var o=l;a&(Jr|Ls)&&!this.async_deriveds.has(o)&&(this.#u.delete(o),ni(o,ki),this.schedule(o))}}};for(const s of this.current.keys())i(s);this.oncommit(()=>e.discard()),e.#m(),ee=this,this.#_()}#h(e){for(var i=0;i<e.length;i+=1)Am(e[i],this.#c,this.#u)}capture(e,i,s=!1){e.v!==hi&&!this.previous.has(e)&&this.previous.set(e,e.v),(e.f&qn)===0&&(this.current.set(e,[i,s]),Hs?.set(e,i)),this.is_fork||(e.v=i)}activate(){ee=this}deactivate(){ee=null,Hs=null}flush(){try{Jc=!0,ee=this,this.#_()}finally{zh=0,$u=null,Wr=null,gl=null,Jc=!1,ee=null,Hs=null,_r.clear()}}discard(){for(const e of this.#s)e(this);this.#s.clear();for(const e of this.async_deriveds.values())e.reject(ja);this.#m(),this.#o?.resolve()}register_created_effect(e){this.#p.push(e)}#b(){for(let f=Xc;f!==null;f=f.#e){var e=f.id<this.id,i=[];for(const[p,[v,g]]of this.current){if(f.current.has(p)){var s=f.current.get(p)[0];if(e&&v!==s)f.current.set(p,[v,g]);else continue}i.push(p)}if(e)for(const[p,v]of this.async_deriveds){const g=f.async_deriveds.get(p);g&&v.promise.then(g.resolve).catch(g.reject)}var n=[...f.current.keys()].filter(p=>!f.current.get(p)[1]);if(!(!f.#t||n.length===0)){var a=n.filter(p=>!this.current.has(p));if(a.length===0)e&&f.discard();else if(i.length>0){if(e)for(const p of this.#v)f.unskip_effect(p,v=>{(v.f&(Ls|Jr))!==0?f.schedule(v):f.#h([v])});f.activate();var o=new Set,l=new Map;for(var c of i)$m(c,a,o,l);l=new Map;var u=[...f.current].filter(([p,v])=>{const g=this.current.get(p);return g?g[0]!==v[0]||g[1]!==v[1]:!0}).map(([p])=>p);if(u.length>0)for(const p of this.#p)(p.f&(ys|Vi|Ml))===0&&gd(p,u,l)&&((p.f&(Jr|Ls))!==0?(ni(p,ki),f.schedule(p)):f.#c.add(p));if(f.#n.length>0&&!f.#d){f.apply();for(var d of f.#n)f.#x(d,[],[]);f.#n=[]}f.deactivate()}}}}increment(e,i){if(this.#r+=1,e){let s=this.#i.get(i)??0;this.#i.set(i,s+1)}}decrement(e,i){if(this.#r-=1,e){let s=this.#i.get(i)??0;s===1?this.#i.delete(i):this.#i.set(i,s-1)}this.#d||(this.#d=!0,Un(()=>{this.#d=!1,this.linked&&this.flush()}))}transfer_effects(e,i){for(const s of e)this.#c.add(s);for(const s of i)this.#u.add(s);e.clear(),i.clear()}oncommit(e){this.#l.add(e)}ondiscard(e){this.#s.add(e)}settled(){return(this.#o??=gm()).promise}static ensure(){if(ee===null){const e=ee=new Xn;!Jc&&!Ja&&Un(()=>{e.#t||e.flush()})}return ee}apply(){{Hs=null;return}}schedule(e){if($u=e,e.b?.is_pending&&(e.f&(ia|xo|md))!==0&&(e.f&pa)===0){e.b.defer_effect(e);return}for(var i=e;i.parent!==null;){i=i.parent;var s=i.f;if(Wr!==null&&i===ie&&(ce===null||(ce.f&Pi)===0))return;if((s&(Kn|qs))!==0){if((s&mi)===0)return;i.f^=mi}}this.#n.push(i)}#m(){if(this.linked){var e=this.#a,i=this.#e;e===null?Xc=i:e.#e=i,i===null?Hr=e:i.#a=e,this.linked=!1}}}function tb(t){var e=Ja;Ja=!0;try{for(var i;;){if(H0(),ee===null)return i;ee.flush()}}finally{Ja=e}}function eb(){try{g0()}catch(t){Rn(t,$u)}}let Sn=null;function Ch(t){var e=t.length;if(e!==0){for(var i=0;i<e;){var s=t[i++];if((s.f&(ys|Vi))===0&&ya(s)&&(Sn=new Set,Tr(s),s.deps===null&&s.first===null&&s.nodes===null&&s.teardown===null&&s.ac===null&&Xm(s),Sn?.size>0)){_r.clear();for(const n of Sn){if((n.f&(ys|Vi))!==0)continue;const a=[n];let o=n.parent;for(;o!==null;)Sn.has(o)&&(Sn.delete(o),a.push(o)),o=o.parent;for(let l=a.length-1;l>=0;l--){const c=a[l];(c.f&(ys|Vi))===0&&Tr(c)}}Sn.clear()}}Sn=null}}function $m(t,e,i,s){if(!i.has(t)&&(i.add(t),t.reactions!==null))for(const n of t.reactions){const a=n.f;(a&Pi)!==0?$m(n,e,i,s):(a&(Jr|Ls))!==0&&(a&ki)===0&&gd(n,e,s)&&(ni(n,ki),yd(n))}}function gd(t,e,i){const s=i.get(t);if(s!==void 0)return s;if(t.deps!==null)for(const n of t.deps){if(Il.call(e,n))return!0;if((n.f&Pi)!==0&&gd(n,e,i))return i.set(n,!0),!0}return i.set(t,!1),!1}function yd(t){ee.schedule(t)}function Om(t,e){if(!((t.f&qs)!==0&&(t.f&mi)!==0)){(t.f&ki)!==0?e.d.push(t):(t.f&Ws)!==0&&e.m.push(t),ni(t,mi);for(var i=t.first;i!==null;)Om(i,e),i=i.next}}function Fm(t){ni(t,mi);for(var e=t.first;e!==null;)Fm(e),e=e.next}let $l=new Set;const _r=new Map;let Nm=!1;function Jn(t,e){var i={f:0,v:t,reactions:null,equals:Bm,rv:0,wv:0};return i}function Cn(t,e){const i=Jn(t);return Qm(i),i}function q(t,e=!1,i=!0){const s=Jn(t);return e||(s.equals=Em),va&&i&&Le!==null&&Le.l!==null&&(Le.l.s??=[]).push(s),s}function Ce(t,e){return S(t,k(()=>r(t))),e}function S(t,e,i=!1){ce!==null&&(!Vs||(ce.f&Ml)!==0)&&_a()&&(ce.f&(Pi|Ls|Jr|Ml))!==0&&(dn===null||!dn.has(t))&&w0();let s=i?Yr(e):e;return Ur(t,s,gl)}function Ur(t,e,i=null){if(!t.equals(e)){_r.set(t,An?e:t.v);var s=Xn.ensure();if(s.capture(t,e),(t.f&Pi)!==0){const n=t;(t.f&ki)!==0&&_d(n),Hs===null&&vd(n)}t.wv=ev(),Dm(t,ki,i),_a()&&ie!==null&&(ie.f&mi)!==0&&(ie.f&(qs|Kn))===0&&(As===null?mb([t]):As.push(t)),!s.is_fork&&$l.size>0&&!Nm&&ib()}return e}function ib(){Nm=!1;for(const t of $l){(t.f&mi)!==0&&ni(t,Ws);let e;try{e=ya(t)}catch{e=!0}e&&Tr(t)}$l.clear()}function $h(t,e=1){var i=r(t),s=e===1?i++:i--;return S(t,i),s}function Za(t){S(t,t.v+1)}function Dm(t,e,i){var s=t.reactions;if(s!==null)for(var n=_a(),a=s.length,o=0;o<a;o++){var l=s[o],c=l.f;if(!(!n&&l===ie)){var u=(c&ki)===0;if(u&&ni(l,e),(c&Ml)!==0)$l.add(l);else if((c&Pi)!==0){var d=l;Hs?.delete(d),(c&Er)===0&&(c&zs&&(ie===null||(ie.f&zl)===0)&&(l.f|=Er),Dm(d,Ws,i))}else if(u){var f=l;(c&Ls)!==0&&Sn!==null&&Sn.add(f),i!==null?i.push(f):yd(f)}}}}function Yr(t){if(typeof t!="object"||t===null||un in t)return t;const e=pd(t);if(e!==r0&&e!==a0)return t;var i=new Map,s=Ql(t),n=Cn(0),a=yr,o=l=>{if(yr===a)return l();var c=ce,u=yr;Cs(null),Rh(a);var d=l();return Cs(c),Rh(u),d};return s&&i.set("length",Cn(t.length)),new Proxy(t,{defineProperty(l,c,u){(!("value"in u)||u.configurable===!1||u.enumerable===!1||u.writable===!1)&&b0();var d=i.get(c);return d===void 0?o(()=>{var f=Cn(u.value);return i.set(c,f),f}):S(d,u.value,!0),!0},deleteProperty(l,c){var u=i.get(c);if(u===void 0){if(c in l){const d=o(()=>Cn(hi));i.set(c,d),Za(n)}}else S(u,hi),Za(n);return!0},get(l,c,u){if(c===un)return t;var d=i.get(c),f=c in l;if(d===void 0&&(!f||En(l,c)?.writable)&&(d=o(()=>{var v=Yr(f?l[c]:hi),g=Cn(v);return g}),i.set(c,d)),d!==void 0){var p=r(d);return p===hi?void 0:p}return Reflect.get(l,c,u)},getOwnPropertyDescriptor(l,c){var u=Reflect.getOwnPropertyDescriptor(l,c);if(u&&"value"in u){var d=i.get(c);d&&(u.value=r(d))}else if(u===void 0){var f=i.get(c),p=f?.v;if(f!==void 0&&p!==hi)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return u},has(l,c){if(c===un)return!0;var u=i.get(c),d=u!==void 0&&u.v!==hi||Reflect.has(l,c);if(u!==void 0||ie!==null&&(!d||En(l,c)?.writable)){u===void 0&&(u=o(()=>{var p=d?Yr(l[c]):hi,v=Cn(p);return v}),i.set(c,u));var f=r(u);if(f===hi)return!1}return d},set(l,c,u,d){var f=i.get(c),p=c in l;if(s&&c==="length")for(var v=u;v<f.v;v+=1){var g=i.get(v+"");g!==void 0?S(g,hi):v in l&&(g=o(()=>Cn(hi)),i.set(v+"",g))}if(f===void 0)(!p||En(l,c)?.writable)&&(f=o(()=>Cn(void 0)),S(f,Yr(u)),i.set(c,f));else{p=f.v!==hi;var _=o(()=>Yr(u));S(f,_)}var x=Reflect.getOwnPropertyDescriptor(l,c);if(x?.set&&x.set.call(d,u),!p){if(s&&typeof c=="string"){var E=i.get("length"),I=Number(c);Number.isInteger(I)&&I>=E.v&&S(E,I+1)}Za(n)}return!0},ownKeys(l){r(n);var c=Reflect.ownKeys(l).filter(f=>{var p=i.get(f);return p===void 0||p.v!==hi});for(var[u,d]of i)d.v!==hi&&!(u in l)&&c.push(u);return c},setPrototypeOf(){x0()}})}function Oh(t){try{if(t!==null&&typeof t=="object"&&un in t)return t[un]}catch{}return t}function sb(t,e){return Object.is(Oh(t),Oh(e))}var Fh,Rm,Lm,Hm;function nb(){if(Fh===void 0){Fh=window,Rm=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Lm=En(e,"firstChild").get,Hm=En(e,"nextSibling").get,Mh(t)&&(t[Iu]=void 0,t[xm]=null,t[Mu]=void 0,t.__e=void 0),Mh(i)&&(i[zu]=void 0)}}function Tn(t=""){return document.createTextNode(t)}function ra(t){return Lm.call(t)}function wo(t){return Hm.call(t)}function y(t,e){return ra(t)}function et(t,e=!1){{var i=ra(t);return i instanceof Comment&&i.data===""?wo(i):i}}function b(t,e=1,i=!1){let s=t;for(;e--;)s=wo(s);return s}function rb(t){t.textContent=""}function Vm(){return!1}function jm(t,e,i){return e==null||e===km?i?document.createElement(t,{is:i}):document.createElement(t):i?document.createElementNS(e,t,{is:i}):document.createElementNS(e,t)}function ab(t,e){if(e){const i=document.body;t.autofocus=!0,Un(()=>{document.activeElement===i&&t.focus()})}}let Nh=!1;function ob(){Nh||(Nh=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e[_l]?.()})},{capture:!0}))}function sc(t){var e=ce,i=ie;Cs(null),ss(null);try{return t()}finally{Cs(e),ss(i)}}function Gm(t,e,i,s=i){t.addEventListener(e,()=>sc(i));const n=t[_l];n?t[_l]=()=>{n(),s(!0)}:t[_l]=()=>s(!0),ob()}function qm(t){ie===null&&(ce===null&&_0(),v0()),An&&m0()}function lb(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Ys(t,e){var i=ie;i!==null&&(i.f&Vi)!==0&&(t|=Vi);var s={ctx:Le,deps:null,nodes:null,f:t|ki|zs,first:null,fn:e,last:null,next:null,parent:i,b:i&&i.b,prev:null,teardown:null,wv:0,ac:null};ee?.register_created_effect(s);var n=s;if((t&ia)!==0)Wr!==null?Wr.push(s):Xn.ensure().schedule(s);else if(e!==null){try{Tr(s)}catch(o){throw Ui(s),o}n.deps===null&&n.teardown===null&&n.nodes===null&&n.first===n.last&&(n.f&ma)===0&&(n=n.first,(t&Ls)!==0&&(t&Br)!==0&&n!==null&&(n.f|=Br))}if(n!==null&&(n.parent=i,i!==null&&lb(n,i),ce!==null&&(ce.f&Pi)!==0&&(t&Kn)===0)){var a=ce;(a.effects??=[]).push(n)}return s}function bd(){return ce!==null&&!Vs}function So(t){const e=Ys(xo,null);return ni(e,mi),e.teardown=t,e}function Ou(t){qm();var e=ie.f,i=!ce&&(e&qs)!==0&&Le!==null&&!Le.i;if(i){var s=Le;(s.e??=[]).push(t)}else return Wm(t)}function Wm(t){return Ys(ia|ym,t)}function cb(t){return qm(),Ys(xo|ym,t)}function ub(t){Xn.ensure();const e=Ys(Kn|ma,t);return(i={})=>new Promise(s=>{i.outro?gr(e,()=>{Ui(e),s(void 0)}):(Ui(e),s(void 0))})}function nc(t){return Ys(ia,t)}function le(t,e){var i=Le,s={effect:null,ran:!1,deps:t};i.l.$.push(s),s.effect=ko(()=>{if(t(),!s.ran){s.ran=!0;var n=ie;try{ss(n.parent),k(e)}finally{ss(n)}}})}function ga(){var t=Le;ko(()=>{for(var e of t.l.$){e.deps();var i=e.effect;(i.f&mi)!==0&&i.deps!==null&&ni(i,Ws),ya(i)&&Tr(i),e.ran=!1}})}function db(t){return Ys(Jr|ma,t)}function ko(t,e=0){return Ys(xo|e,t)}function K(t,e=[],i=[],s=[]){Im(s,e,i,n=>{Ys(xo,()=>{t(...n.map(r))})})}function Bo(t,e=0){var i=Ys(Ls|e,t);return i}function Ym(t,e=0){var i=Ys(md|e,t);return i}function Yi(t){return Ys(qs|ma,t)}function Km(t){var e=t.teardown;if(e!==null){const i=An,s=ce;Dh(!0),Cs(null);try{e.call(null)}finally{Dh(i),Cs(s)}}}function xd(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){const n=i.ac;n!==null&&sc(()=>{n.abort(ec)});var s=i.next;(i.f&Kn)!==0?i.parent=null:Ui(i,e),i=s}}function fb(t){for(var e=t.first;e!==null;){var i=e.next;(e.f&qs)===0&&Ui(e),e=i}}function Ui(t,e=!0){var i=!1;(e||(t.f&u0)!==0)&&t.nodes!==null&&t.nodes.end!==null&&(hb(t.nodes.start,t.nodes.end),i=!0),t.f|=Au,xd(t,e&&!i),ro(t,0);var s=t.nodes&&t.nodes.t;if(s!==null)for(const a of s)a.stop();Km(t),t.f^=Au,t.f|=ys;var n=t.parent;n!==null&&n.first!==null&&Xm(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes=t.ac=t.b=null}function hb(t,e){for(;t!==null;){var i=t===e?null:wo(t);t.remove(),t=i}}function Xm(t){var e=t.parent,i=t.prev,s=t.next;i!==null&&(i.next=s),s!==null&&(s.prev=i),e!==null&&(e.first===t&&(e.first=s),e.last===t&&(e.last=i))}function gr(t,e,i=!0){var s=[];Jm(t,s,!0);var n=()=>{i&&Ui(t),e&&e()},a=s.length;if(a>0){var o=()=>--a||n();for(var l of s)l.out(o)}else n()}function Jm(t,e,i){if((t.f&Vi)===0){t.f^=Vi;var s=t.nodes&&t.nodes.t;if(s!==null)for(const l of s)(l.is_global||i)&&e.push(l);for(var n=t.first;n!==null;){var a=n.next;if((n.f&Kn)===0){var o=(n.f&Br)!==0||(n.f&qs)!==0&&(t.f&Ls)!==0;Jm(n,e,o?i:!1)}n=a}}}function Ol(t){Zm(t,!0)}function Zm(t,e){if((t.f&Vi)!==0){t.f^=Vi,(t.f&mi)===0&&(ni(t,ki),Xn.ensure().schedule(t));for(var i=t.first;i!==null;){var s=i.next,n=(i.f&Br)!==0||(i.f&qs)!==0;Zm(i,n?e:!1),i=s}var a=t.nodes&&t.nodes.t;if(a!==null)for(const o of a)(o.is_global||e)&&o.in()}}function wd(t,e){if(t.nodes)for(var i=t.nodes.start,s=t.nodes.end;i!==null;){var n=i===s?null:wo(i);e.append(i),i=n}}let jr=null;function pb(t){var e=jr;try{if(jr=new Set,k(t),e!==null)for(var i of jr)e.add(i);return jr}finally{jr=e}}function en(t){for(var e of pb(t))Ur(e,e.v)}let yl=!1,An=!1;function Dh(t){An=t}let ce=null,Vs=!1;function Cs(t){ce=t}let ie=null;function ss(t){ie=t}let dn=null;function Qm(t){ce!==null&&(dn??=new Set).add(t)}let Wi=null,hs=0,As=null;function mb(t){As=t}let tv=1,mr=0,yr=mr;function Rh(t){yr=t}function ev(){return++tv}function ya(t){var e=t.f;if((e&ki)!==0)return!0;if(e&Pi&&(t.f&=~Er),(e&Ws)!==0){for(var i=t.deps,s=i.length,n=0;n<s;n++){var a=i[n];if(ya(a)&&zm(a),a.wv>t.wv)return!0}(e&zs)!==0&&Hs===null&&ni(t,mi)}return!1}function iv(t,e,i=!0){var s=t.reactions;if(s!==null&&!(dn!==null&&dn.has(t)))for(var n=0;n<s.length;n++){var a=s[n];(a.f&Pi)!==0?iv(a,e,!1):e===a&&(i?ni(a,ki):(a.f&mi)!==0&&ni(a,Ws),yd(a))}}function sv(t){var e=Wi,i=hs,s=As,n=ce,a=dn,o=Le,l=Vs,c=yr,u=t.f;Wi=null,hs=0,As=null,ce=(u&(qs|Kn))===0?t:null,dn=null,sa(t.ctx),Vs=!1,yr=++mr,t.ac!==null&&(sc(()=>{t.ac.abort(ec)}),t.ac=null);try{t.f|=zl;var d=t.fn,f=d();t.f|=pa;var p=t.deps,v=ee?.is_fork;if(Wi!==null){var g;if(v||ro(t,hs),p!==null&&hs>0)for(p.length=hs+Wi.length,g=0;g<Wi.length;g++)p[hs+g]=Wi[g];else t.deps=p=Wi;if(bd()&&(t.f&zs)!==0)for(g=hs;g<p.length;g++)(p[g].reactions??=[]).push(t)}else!v&&p!==null&&hs<p.length&&(ro(t,hs),p.length=hs);if(_a()&&As!==null&&!Vs&&p!==null&&(t.f&(Pi|Ws|ki))===0)for(g=0;g<As.length;g++)iv(As[g],t);if(n!==null&&n!==t){if(mr++,n.deps!==null)for(let _=0;_<i;_+=1)n.deps[_].rv=mr;if(e!==null)for(const _ of e)_.rv=mr;As!==null&&(s===null?s=As:s.push(...As))}return(t.f&qn)!==0&&(t.f^=qn),f}catch(_){return Tm(_)}finally{t.f^=zl,Wi=e,hs=i,As=s,ce=n,dn=a,sa(o),Vs=l,yr=c}}function vb(t,e){let i=e.reactions;if(i!==null){var s=s0.call(i,t);if(s!==-1){var n=i.length-1;n===0?i=e.reactions=null:(i[s]=i[n],i.pop())}}if(i===null&&(e.f&Pi)!==0&&(Wi===null||!Il.call(Wi,e))){var a=e;(a.f&zs)!==0&&(a.f^=zs,a.f&=~Er),a.v!==hi&&vd(a),Z0(a),ro(a,0)}}function ro(t,e){var i=t.deps;if(i!==null)for(var s=e;s<i.length;s++)vb(t,i[s])}function Tr(t){var e=t.f;if((e&ys)===0){ni(t,mi);var i=ie,s=yl;ie=t,yl=!0;try{(e&(Ls|md))!==0?fb(t):xd(t),Km(t);var n=sv(t);t.teardown=typeof n=="function"?n:null,t.wv=tv;var a;vm&&R0&&(t.f&ki)!==0&&t.deps}finally{yl=s,ie=i}}}async function _b(){await Promise.resolve(),tb()}function r(t){var e=t.f,i=(e&Pi)!==0;if(jr?.add(t),ce!==null&&!Vs){var s=ie!==null&&(ie.f&ys)!==0;if(!s&&(dn===null||!dn.has(t))){var n=ce.deps;if((ce.f&zl)!==0)t.rv<mr&&(t.rv=mr,Wi===null&&n!==null&&n[hs]===t?hs++:Wi===null?Wi=[t]:Wi.push(t));else{ce.deps??=[],Il.call(ce.deps,t)||ce.deps.push(t);var a=t.reactions;a===null?t.reactions=[ce]:Il.call(a,ce)||a.push(ce)}}}if(An&&_r.has(t))return _r.get(t);if(i){var o=t;if(An){var l=o.v;return((o.f&mi)===0&&o.reactions!==null||rv(o))&&(l=_d(o)),_r.set(o,l),l}var c=(o.f&zs)===0&&!Vs&&ce!==null&&(yl||(ce.f&zs)!==0),u=(o.f&pa)===0;ya(o)&&(c&&(o.f|=zs),zm(o)),c&&!u&&(Cm(o),nv(o))}if(Hs?.has(t))return Hs.get(t);if((t.f&qn)!==0)throw t.v;return t.v}function nv(t){if(t.f|=zs,t.deps!==null)for(const e of t.deps)(e.reactions??=[]).push(t),(e.f&Pi)!==0&&(e.f&zs)===0&&(Cm(e),nv(e))}function rv(t){if(t.v===hi)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(_r.has(e)||(e.f&Pi)!==0&&rv(e))return!0;return!1}function k(t){var e=Vs;try{return Vs=!0,t()}finally{Vs=e}}function Zt(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(un in t)Fu(t);else if(!Array.isArray(t))for(let e in t){const i=t[e];typeof i=="object"&&i&&un in i&&Fu(i)}}}function Fu(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let s in t)try{Fu(t[s],e)}catch{}const i=pd(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){const s=_m(i);for(let n in s){const a=s[n].get;if(a)try{a.call(t)}catch{}}}}}function gb(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const yb=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function bb(t){return yb.includes(t)}const xb={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function wb(t){return t=t.toLowerCase(),xb[t]??t}const Sb=["touchstart","touchmove"];function kb(t){return Sb.includes(t)}const Ga=Symbol("events"),av=new Set,Nu=new Set;function ov(t,e,i,s={}){function n(a){if(s.capture||Du.call(e,a),!a.cancelBubble)return sc(()=>i?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?Un(()=>{e.addEventListener(t,n,s)}):e.addEventListener(t,n,s),n}function P(t,e,i,s,n){var a={capture:s,passive:n},o=ov(t,e,i,a);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&So(()=>{e.removeEventListener(t,o,a)})}function Bb(t,e,i){(e[Ga]??={})[t]=i}function Eb(t){for(var e=0;e<t.length;e++)av.add(t[e]);for(var i of Nu)i(t)}let Lh=null;function Du(t){var e=this,i=e.ownerDocument,s=t.type,n=t.composedPath?.()||[],a=n[0]||t.target;Lh=t;var o=0,l=Lh===t&&t[Ga];if(l){var c=n.indexOf(l);if(c!==-1&&(e===document||e===window)){t[Ga]=e;return}var u=n.indexOf(e);if(u===-1)return;c<=u&&(o=c)}if(a=n[o]||t.target,a!==e){n0(t,"currentTarget",{configurable:!0,get(){return a||i}});var d=ce,f=ie;Cs(null),ss(null);try{for(var p,v=[];a!==null&&a!==e;){try{var g=a[Ga]?.[s];g!=null&&(!a.disabled||t.target===a)&&g.call(a,t)}catch(_){p?v.push(_):p=_}if(t.cancelBubble)break;o++,a=o<n.length?n[o]:null}if(p){for(let _ of v)queueMicrotask(()=>{throw _});throw p}}finally{t[Ga]=e,delete t.currentTarget,Cs(d),ss(f)}}}const Ub=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:t=>t});function Tb(t){return Ub?.createHTML(t)??t}function lv(t){var e=jm("template");return e.innerHTML=Tb(t.replaceAll("<!>","<!---->")),e.content}function ao(t,e){var i=ie;i.nodes===null&&(i.nodes={start:t,end:e,a:null,t:null})}function W(t,e){var i=(e&M0)!==0,s=(e&z0)!==0,n,a=!t.startsWith("<!>");return()=>{n===void 0&&(n=lv(a?t:"<!>"+t),i||(n=ra(n)));var o=s||Rm?document.importNode(n,!0):n.cloneNode(!0);if(i){var l=ra(o),c=o.lastChild;ao(l,c)}else ao(o,o);return o}}function Pb(t,e,i="svg"){var s=!t.startsWith("<!>"),n=`<${i}>${s?t:"<!>"+t}</${i}>`,a;return()=>{if(!a){var o=lv(n),l=ra(o);a=ra(l)}var c=a.cloneNode(!0);return ao(c,c),c}}function cv(t,e){return Pb(t,e,"svg")}function Nt(){var t=document.createDocumentFragment(),e=document.createComment(""),i=Tn();return t.append(e,i),ao(e,i),t}function A(t,e){t!==null&&t.before(e)}function at(t,e){var i=e==null?"":typeof e=="object"?`${e}`:e;i!==(t[zu]??=t.nodeValue)&&(t[zu]=i,t.nodeValue=`${i}`)}function Ab(t,e){return Ib(t,e)}const il=new Map;function Ib(t,{target:e,anchor:i,props:s={},events:n,context:a,intro:o=!0,transformError:l}){nb();var c=void 0,u=ub(()=>{var d=i??e.appendChild(Tn());W0(d,{pending:()=>{}},v=>{ir({});var g=Le;a&&(g.c=a),n&&(s.$$events=n),c=t(v,s)||{},sr()},l);var f=new Set,p=v=>{for(var g=0;g<v.length;g++){var _=v[g];if(!f.has(_)){f.add(_);var x=kb(_);for(const z of[e,document]){var E=il.get(z);E===void 0&&(E=new Map,il.set(z,E));var I=E.get(_);I===void 0?(z.addEventListener(_,Du,{passive:x}),E.set(_,1)):E.set(_,I+1)}}}};return p(tc(av)),Nu.add(p),()=>{for(var v of f)for(const x of[e,document]){var g=il.get(x),_=g.get(v);--_==0?(x.removeEventListener(v,Du),g.delete(v),g.size===0&&il.delete(x)):g.set(v,_)}Nu.delete(p),d!==i&&d.parentNode?.removeChild(d)}});return Mb.set(c,u),c}let Mb=new WeakMap;class Sd{anchor;#t=new Map;#a=new Map;#e=new Map;#l=new Set;#s=!0;constructor(e,i=!0){this.anchor=e,this.#s=i}#r=e=>{if(this.#t.has(e)){var i=this.#t.get(e),s=this.#a.get(i);if(s)Ol(s),this.#l.delete(i);else{var n=this.#e.get(i);n&&(Ol(n.effect),this.#a.set(i,n.effect),this.#e.delete(i),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),s=n.effect)}for(const[a,o]of this.#t){if(this.#t.delete(a),a===e)break;const l=this.#e.get(o);l&&(Ui(l.effect),this.#e.delete(o))}for(const[a,o]of this.#a){if(a===i||this.#l.has(a))continue;const l=()=>{if(Array.from(this.#t.values()).includes(a)){var u=document.createDocumentFragment();wd(o,u),u.append(Tn()),this.#e.set(a,{effect:o,fragment:u})}else Ui(o);this.#l.delete(a),this.#a.delete(a)};this.#s||!s?(this.#l.add(a),gr(o,l,!1)):l()}}};#i=e=>{this.#t.delete(e);const i=Array.from(this.#t.values());for(const[s,n]of this.#e)i.includes(s)||(Ui(n.effect),this.#e.delete(s))};ensure(e,i){var s=ee,n=Vm();if(i&&!this.#a.has(e)&&!this.#e.has(e))if(n){var a=document.createDocumentFragment(),o=Tn();a.append(o),this.#e.set(e,{effect:Yi(()=>i(o)),fragment:a})}else this.#a.set(e,Yi(()=>i(this.anchor)));if(this.#t.set(s,e),n){for(const[l,c]of this.#a)l===e?s.unskip_effect(c):s.skip_effect(c);for(const[l,c]of this.#e)l===e?s.unskip_effect(c.effect):s.skip_effect(c.effect);s.oncommit(this.#r),s.ondiscard(this.#i)}else this.#r(s)}}function Z(t,e,i=!1){var s=new Sd(t),n=i?Br:0;function a(o,l){s.ensure(o,l)}Bo(()=>{var o=!1;e((l,c=0)=>{o=!0,a(c,l)}),o||a(-1,null)},n)}const zb=Symbol("NaN");function Cb(t,e,i){var s=new Sd(t),n=!_a();Bo(()=>{var a=e();a!==a&&(a=zb),n&&a!==null&&typeof a=="object"&&(a={}),s.ensure(a,i)})}function be(t,e){return e}function $b(t,e,i){for(var s=[],n=e.length,a,o=e.length,l=0;l<n;l++){let f=e[l];gr(f,()=>{if(a){if(a.pending.delete(f),a.done.add(f),a.pending.size===0){var p=t.outrogroups;Ru(t,tc(a.done)),p.delete(a),p.size===0&&(t.outrogroups=null)}}else o-=1},!1)}if(o===0){var c=s.length===0&&i!==null;if(c){var u=i,d=u.parentNode;rb(d),d.append(u),t.items.clear()}Ru(t,e,!c)}else a={pending:new Set(e),done:new Set},(t.outrogroups??=new Set).add(a)}function Ru(t,e,i=!0){var s;if(t.pending.size>0){s=new Set;for(const o of t.pending.values())for(const l of o)s.add(t.items.get(l).e)}for(var n=0;n<e.length;n++){var a=e[n];if(s?.has(a)){a.f|=ln;const o=document.createDocumentFragment();wd(a,o)}else Ui(e[n],i)}}var Hh;function ge(t,e,i,s,n,a=null){var o=t,l=new Map,c=(e&wm)!==0;if(c){var u=t;o=u.appendChild(Tn())}var d=null,f=Nn(()=>{var z=i();return Ql(z)?z:z==null?[]:tc(z)}),p,v=new Map,g=!0;function _(z){(I.effect.f&ys)===0&&(I.pending.delete(z),I.fallback=d,Ob(I,p,o,e,s),d!==null&&(p.length===0?(d.f&ln)===0?Ol(d):(d.f^=ln,qa(d,null,o)):gr(d,()=>{d=null})))}function x(z){I.pending.delete(z)}var E=Bo(()=>{p=r(f);for(var z=p.length,$=new Set,M=ee,V=Vm(),N=0;N<z;N+=1){var H=p[N],T=s(H,N),j=g?null:l.get(T);j?(j.v&&Ur(j.v,H),j.i&&Ur(j.i,N),V&&M.unskip_effect(j.e)):(j=Fb(l,g?o:Hh??=Tn(),H,T,N,n,e,i),g||(j.e.f|=ln),l.set(T,j)),$.add(T)}if(z===0&&a&&!d&&(g?d=Yi(()=>a(o)):(d=Yi(()=>a(Hh??=Tn())),d.f|=ln)),z>$.size&&p0(),!g)if(v.set(M,$),V){for(const[St,yt]of l)$.has(St)||M.skip_effect(yt.e);M.oncommit(_),M.ondiscard(x)}else _(M);r(f)}),I={effect:E,items:l,pending:v,outrogroups:null,fallback:d};g=!1}function Ma(t){for(;t!==null&&(t.f&qs)===0;)t=t.next;return t}function Ob(t,e,i,s,n){var a=(s&E0)!==0,o=e.length,l=t.items,c=Ma(t.effect.first),u,d=null,f,p=[],v=[],g,_,x,E;if(a)for(E=0;E<o;E+=1)g=e[E],_=n(g,E),x=l.get(_).e,(x.f&ln)===0&&(x.nodes?.a?.measure(),(f??=new Set).add(x));for(E=0;E<o;E+=1){if(g=e[E],_=n(g,E),x=l.get(_).e,t.outrogroups!==null)for(const j of t.outrogroups)j.pending.delete(x),j.done.delete(x);if((x.f&Vi)!==0&&(Ol(x),a&&(x.nodes?.a?.unfix(),(f??=new Set).delete(x))),(x.f&ln)!==0)if(x.f^=ln,x===c)qa(x,null,i);else{var I=d?d.next:c;x===t.effect.last&&(t.effect.last=x.prev),x.prev&&(x.prev.next=x.next),x.next&&(x.next.prev=x.prev),$n(t,d,x),$n(t,x,I),qa(x,I,i),d=x,p=[],v=[],c=Ma(d.next);continue}if(x!==c){if(u!==void 0&&u.has(x)){if(p.length<v.length){var z=v[0],$;d=z.prev;var M=p[0],V=p[p.length-1];for($=0;$<p.length;$+=1)qa(p[$],z,i);for($=0;$<v.length;$+=1)u.delete(v[$]);$n(t,M.prev,V.next),$n(t,d,M),$n(t,V,z),c=z,d=V,E-=1,p=[],v=[]}else u.delete(x),qa(x,c,i),$n(t,x.prev,x.next),$n(t,x,d===null?t.effect.first:d.next),$n(t,d,x),d=x;continue}for(p=[],v=[];c!==null&&c!==x;)(u??=new Set).add(c),v.push(c),c=Ma(c.next);if(c===null)continue}(x.f&ln)===0&&p.push(x),d=x,c=Ma(x.next)}if(t.outrogroups!==null){for(const j of t.outrogroups)j.pending.size===0&&(Ru(t,tc(j.done)),t.outrogroups?.delete(j));t.outrogroups.size===0&&(t.outrogroups=null)}if(c!==null||u!==void 0){var N=[];if(u!==void 0)for(x of u)(x.f&Vi)===0&&N.push(x);for(;c!==null;)(c.f&Vi)===0&&c!==t.fallback&&N.push(c),c=Ma(c.next);var H=N.length;if(H>0){var T=(s&wm)!==0&&o===0?i:null;if(a){for(E=0;E<H;E+=1)N[E].nodes?.a?.measure();for(E=0;E<H;E+=1)N[E].nodes?.a?.fix()}$b(t,N,T)}}a&&Un(()=>{if(f!==void 0)for(x of f)x.nodes?.a?.apply()})}function Fb(t,e,i,s,n,a,o,l){var c=(o&k0)!==0?(o&U0)===0?q(i,!1,!1):Jn(i):null,u=(o&B0)!==0?Jn(n):null;return{v:c,i:u,e:Yi(()=>(a(e,c??i,u??n,l),()=>{t.delete(s)}))}}function qa(t,e,i){if(t.nodes)for(var s=t.nodes.start,n=t.nodes.end,a=e&&(e.f&ln)===0?e.nodes.start:i;s!==null;){var o=wo(s);if(a.before(s),s===n)return;s=o}}function $n(t,e,i){e===null?t.effect.first=i:e.next=i,i===null?t.effect.last=e:i.prev=e}function Gt(t,e,i,s,n){var a=e.$$slots?.[i],o=!1;a===!0&&(a=e.children,o=!0),a===void 0||a(t,o?()=>s:s)}function Nb(t,e,i,s,n,a){var o=null,l=t,c=new Sd(l,!1);Bo(()=>{const u=e()||null;var d=C0;if(u===null){c.ensure(null,null);return}return c.ensure(u,f=>{if(u){if(o=jm(u,d),ao(o,o),s){var p=null,v=o.appendChild(Tn());s(o,v),p?.remove()}ie.nodes.end=o,f.before(o)}}),()=>{}},Br),So(()=>{})}function Db(t,e){var i=void 0,s;Ym(()=>{i!==(i=e())&&(s&&(Ui(s),s=null),i&&(s=Yi(()=>{nc(()=>i(t))})))})}function uv(t){var e,i,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(i=uv(t[e]))&&(s&&(s+=" "),s+=i)}else for(i in t)t[i]&&(s&&(s+=" "),s+=i);return s}function Rb(){for(var t,e,i=0,s="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=uv(t))&&(s&&(s+=" "),s+=e);return s}function Lb(t){return typeof t=="object"?Rb(t):t??""}const Vh=[...`
2
- \r\f \v\uFEFF`];function Hb(t,e,i){var s=t==null?"":""+t;if(e&&(s=s?s+" "+e:e),i){for(var n of Object.keys(i))if(i[n])s=s?s+" "+n:n;else if(s.length)for(var a=n.length,o=0;(o=s.indexOf(n,o))>=0;){var l=o+a;(o===0||Vh.includes(s[o-1]))&&(l===s.length||Vh.includes(s[l]))?s=(o===0?"":s.substring(0,o))+s.substring(l+1):o=l}}return s===""?null:s}function jh(t,e=!1){var i=e?" !important;":";",s="";for(var n of Object.keys(t)){var a=t[n];a!=null&&a!==""&&(s+=" "+n+": "+a+i)}return s}function Zc(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Vb(t,e){if(e){var i="",s,n;if(Array.isArray(e)?(s=e[0],n=e[1]):s=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,o=0,l=!1,c=[];s&&c.push(...Object.keys(s).map(Zc)),n&&c.push(...Object.keys(n).map(Zc));var u=0,d=-1;const _=t.length;for(var f=0;f<_;f++){var p=t[f];if(l?p==="/"&&t[f-1]==="*"&&(l=!1):a?a===p&&(a=!1):p==="/"&&t[f+1]==="*"?l=!0:p==='"'||p==="'"?a=p:p==="("?o++:p===")"&&o--,!l&&a===!1&&o===0){if(p===":"&&d===-1)d=f;else if(p===";"||f===_-1){if(d!==-1){var v=Zc(t.substring(u,d).trim());if(!c.includes(v)){p!==";"&&f++;var g=t.substring(u,f).trim();i+=" "+g+";"}}u=f+1,d=-1}}}}return s&&(i+=jh(s)),n&&(i+=jh(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function Ft(t,e,i,s,n,a){var o=t[Iu];if(o!==i||o===void 0){var l=Hb(i,s,a);l==null?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l),t[Iu]=i}else if(a&&n!==a)for(var c in a){var u=!!a[c];(n==null||u!==!!n[c])&&t.classList.toggle(c,u)}return a}function Qc(t,e={},i,s){for(var n in i){var a=i[n];e[n]!==a&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,a,s))}}function Ae(t,e,i,s){var n=t[Mu];if(n!==e){var a=Vb(e,s);a==null?t.removeAttribute("style"):t.style.cssText=a,t[Mu]=e}else s&&(Array.isArray(s)?(Qc(t,i?.[0],s[0]),Qc(t,i?.[1],s[1],"important")):Qc(t,i,s));return s}function Pn(t,e,i=!1){if(t.multiple){if(e==null)return;if(!Ql(e))return F0();for(var s of t.options)s.selected=e.includes(Qa(s));return}for(s of t.options){var n=Qa(s);if(sb(n,e)){s.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function br(t){var e=new MutationObserver(()=>{Pn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),So(()=>{e.disconnect()})}function jb(t,e,i=e){var s=new WeakSet,n=!0;Gm(t,"change",a=>{var o=a?"[selected]":":checked",l;if(t.multiple)l=[].map.call(t.querySelectorAll(o),Qa);else{var c=t.querySelector(o)??t.querySelector("option:not([disabled])");l=c&&Qa(c)}i(l),t.__value=l,ee!==null&&s.add(ee)}),nc(()=>{var a=e();if(t===document.activeElement){var o=ee;if(s.has(o))return}if(Pn(t,a,n),n&&a===void 0){var l=t.querySelector(":checked");l!==null&&(a=Qa(l),i(a))}t.__value=a,n=!1}),br(t)}function Qa(t){return"__value"in t?t.__value:t.value}const za=Symbol("class"),Ca=Symbol("style"),dv=Symbol("is custom element"),fv=Symbol("is html"),Gb=ic?"input":"INPUT",qb=ic?"option":"OPTION",Wb=ic?"select":"SELECT",Yb=ic?"progress":"PROGRESS";function _e(t,e){var i=rc(t);i.value===(i.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!==Yb)||(t.value=e??"")}function oo(t,e){var i=rc(t);i.checked!==(i.checked=e??void 0)&&(t.checked=e)}function Kb(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function st(t,e,i,s){var n=rc(t);n[e]!==(n[e]=i)&&(e==="loading"&&(t[d0]=i),i==null?t.removeAttribute(e):typeof i!="string"&&hv(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function Xb(t,e,i,s,n=!1,a=!1){var o=rc(t),l=o[dv],c=!o[fv],u=e||{},d=t.nodeName===qb;for(var f in e)f in i||(i[f]=null);i.class?i.class=Lb(i.class):i[za]&&(i.class=null),i[Ca]&&(i.style??=null);var p=hv(t);if(t.nodeName===Gb&&"type"in i&&("value"in i||"__value"in i)){var v=i.type;(v!==u.type||v===void 0&&t.hasAttribute("type"))&&(u.type=v,st(t,"type",v))}for(const M in i){let V=i[M];if(d&&M==="value"&&V==null){t.value=t.__value="",u[M]=V;continue}if(M==="class"){var g=t.namespaceURI==="http://www.w3.org/1999/xhtml";Ft(t,g,V,s,e?.[za],i[za]),u[M]=V,u[za]=i[za];continue}if(M==="style"){Ae(t,V,e?.[Ca],i[Ca]),u[M]=V,u[Ca]=i[Ca];continue}var _=u[M];if(!(V===_&&!(V===void 0&&t.hasAttribute(M)))){u[M]=V;var x=M[0]+M[1];if(x!=="$$")if(x==="on"){const N={},H="$$"+M;let T=M.slice(2);var E=bb(T);if(gb(T)&&(T=T.slice(0,-7),N.capture=!0),!E&&_){if(V!=null)continue;t.removeEventListener(T,u[H],N),u[H]=null}if(E)Bb(T,t,V),Eb([T]);else if(V!=null){let j=function(St){u[M].call(this,St)};var $=j;u[H]=ov(T,t,j,N)}}else if(M==="style")st(t,M,V);else if(M==="autofocus")ab(t,!!V);else if(!l&&(M==="__value"||M==="value"&&V!=null))t.value=t.__value=V;else if(M==="selected"&&d)Kb(t,V);else{var I=M;c||(I=wb(I));var z=I==="defaultValue"||I==="defaultChecked";if(V==null&&!l&&!z)if(o[M]=null,I==="value"||I==="checked"){let N=t;const H=e===void 0;if(I==="value"){let T=N.defaultValue;N.removeAttribute(I),N.defaultValue=T,N.value=N.__value=H?T:null}else{let T=N.defaultChecked;N.removeAttribute(I),N.defaultChecked=T,N.checked=H?T:!1}}else t.removeAttribute(M);else z||p.includes(I)&&(l||typeof V!="string")?(t[I]=V,I in o&&(o[I]=hi)):typeof V!="function"&&st(t,I,V)}}}return u}function Gh(t,e,i=[],s=[],n=[],a,o=!1,l=!1){Im(n,i,s,c=>{var u=void 0,d={},f=t.nodeName===Wb,p=!1;if(Ym(()=>{var g=e(...c.map(r)),_=Xb(t,u,g,a,o,l);p&&f&&"value"in g&&Pn(t,g.value);for(let E of Object.getOwnPropertySymbols(d))g[E]||Ui(d[E]);for(let E of Object.getOwnPropertySymbols(g)){var x=g[E];E.description===$0&&(!u||x!==u[E])&&(d[E]&&Ui(d[E]),d[E]=Yi(()=>Db(t,()=>x))),_[E]=x}u=_}),f){var v=t;nc(()=>{Pn(v,u.value,!0),br(v)})}p=!0})}function rc(t){return t[xm]??={[dv]:t.nodeName.includes("-"),[fv]:t.namespaceURI===km}}var qh=new Map;function hv(t){var e=t.getAttribute("is")||t.nodeName,i=qh.get(e);if(i)return i;qh.set(e,i=[]);for(var s,n=t,a=Element.prototype;a!==n;){s=_m(n);for(var o in s)s[o].set&&o!=="innerHTML"&&o!=="textContent"&&o!=="innerText"&&i.push(o);n=pd(n)}return i}function zi(t,e,i=e){var s=new WeakSet;Gm(t,"input",async n=>{var a=n?t.defaultValue:t.value;if(a=tu(t)?eu(a):a,i(a),ee!==null&&s.add(ee),await _b(),a!==(a=e())){var o=t.selectionStart,l=t.selectionEnd,c=t.value.length;if(t.value=a??"",l!==null){var u=t.value.length;o===l&&l===c&&u>c?(t.selectionStart=u,t.selectionEnd=u):(t.selectionStart=o,t.selectionEnd=Math.min(l,u))}}}),k(e)==null&&t.value&&(i(tu(t)?eu(t.value):t.value),ee!==null&&s.add(ee)),ko(()=>{var n=e();if(t===document.activeElement){var a=ee;if(s.has(a))return}tu(t)&&n===eu(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}function tu(t){var e=t.type;return e==="number"||e==="range"}function eu(t){return t===""?null:+t}function Jb(t,e,i){var s=En(t,e);s&&s.set&&(t[e]=i,So(()=>{t[e]=null}))}function iu(t,e){return t===e||t?.[un]===e}function an(t={},e,i,s){var n=Le.r,a=ie;return nc(()=>{var o,l;return ko(()=>{o=l,l=[],k(()=>{iu(i(...l),t)||(e(t,...l),o&&iu(i(...o),t)&&e(null,...o))})}),()=>{let c=a;for(;c!==n&&c.parent!==null&&c.parent.f&Au;)c=c.parent;const u=()=>{l&&iu(i(...l),t)&&e(null,...l)},d=c.teardown;c.teardown=()=>{u(),d?.()}}}),t}function Rs(t){return function(...e){var i=e[0];return i.stopPropagation(),t?.apply(this,e)}}function su(t){return function(...e){var i=e[0];return i.preventDefault(),t?.apply(this,e)}}function Mr(t=!1){const e=Le,i=e.l.u;if(!i)return;let s=()=>Zt(e.s);if(t){let n=0,a={};const o=na(()=>{let l=!1;const c=e.s;for(const u in c)c[u]!==a[u]&&(a[u]=c[u],l=!0);return l&&n++,n});s=()=>r(o)}i.b.length&&cb(()=>{Wh(e,s),Tu(i.b)}),Ou(()=>{const n=k(()=>i.m.map(l0));return()=>{for(const a of n)typeof a=="function"&&a()}}),i.a.length&&Ou(()=>{Wh(e,s),Tu(i.a)})}function Wh(t,e){if(t.l.s)for(const i of t.l.s)r(i);e()}function sl(t,e){var i=t.$$events?.[e.type],s=Ql(i)?i.slice():i==null?[]:[i];for(var n of s)n.call(this,e)}const Zb={get(t,e){if(!t.exclude.includes(e))return r(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,i){if(!(e in t.special)){var s=ie;try{ss(t.parent_effect),t.special[e]=Ci({get[e](){return t.props[e]}},e,Sm)}finally{ss(s)}}return t.special[e](i),$h(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},deleteProperty(t,e){return t.exclude.includes(e)||(t.exclude.push(e),$h(t.version)),!0},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Vt(t,e){return new Proxy({props:t,exclude:e,special:{},version:Jn(0),parent_effect:ie},Zb)}const Qb={get(t,e){let i=t.props.length;for(;i--;){let s=t.props[i];if(Ia(s)&&(s=s()),typeof s=="object"&&s!==null&&e in s)return s[e]}},set(t,e,i){let s=t.props.length;for(;s--;){let n=t.props[s];Ia(n)&&(n=n());const a=En(n,e);if(a&&a.set)return a.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let s=t.props[i];if(Ia(s)&&(s=s()),typeof s=="object"&&s!==null&&e in s){const n=En(s,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===un||e===bm)return!1;for(let i of t.props)if(Ia(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){const e=[];for(let i of t.props)if(Ia(i)&&(i=i()),!!i){for(const s in i)e.includes(s)||e.push(s);for(const s of Object.getOwnPropertySymbols(i))e.includes(s)||e.push(s)}return e}};function qt(...t){return new Proxy({props:t},Qb)}function Ci(t,e,i,s){var n=!va||(i&P0)!==0,a=(i&A0)!==0,o=(i&I0)!==0,l=s,c=!0,u=void 0,d=()=>o&&n?(u??=na(s),r(u)):(c&&(c=!1,l=o?k(s):s),l);let f;if(a){var p=un in t||bm in t;f=En(t,e)?.set??(p&&e in t?$=>t[e]=$:void 0)}var v,g=!1;a?[v,g]=j0(()=>t[e]):v=t[e],v===void 0&&s!==void 0&&(v=d(),f&&(n&&y0(),f(v)));var _;if(n?_=()=>{var $=t[e];return $===void 0?d():(c=!0,$)}:_=()=>{var $=t[e];return $!==void 0&&(l=void 0),$===void 0?l:$},n&&(i&Sm)===0)return _;if(f){var x=t.$$legacy;return(function($,M){return arguments.length>0?((!n||!M||x||g)&&f(M?_():$),$):_()})}var E=!1,I=((i&T0)!==0?na:Nn)(()=>(E=!1,_()));a&&r(I);var z=ie;return(function($,M){if(arguments.length>0){const V=M?r(I):n&&a?Yr($):$;return S(I,V),E=!0,l!==void 0&&(l=V),$}return An&&E||(z.f&ys)!==0?I.v:r(I)})}function ac(t){Le===null&&f0(),va&&Le.l!==null?tx(Le).m.push(t):Ou(()=>{const e=k(t);if(typeof e=="function")return e})}function tx(t){var e=t.l;return e.u??={a:[],b:[],m:[]}}const pv="motionly.onboarding.complete.v1";function ex(t,e,i,s="/"){return mv(t,s).replace(/\/$/,"")==="/editor"||i&&!e?"editor":"onboarding"}function js(t="",e="/"){return`${e.endsWith("/")?e:`${e}/`}${t.replace(/^\/+/,"")}`}function mv(t,e="/"){const i=e==="/"?"":e.replace(/\/$/,"");return t.startsWith(i)?t.slice(i.length)||"/":t}const ix="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(ix);L0();/**
3
- * @license lucide-svelte v1.0.1 - ISC
4
- *
5
- * ISC License
6
- *
7
- * Copyright (c) 2026 Lucide Icons and Contributors
8
- *
9
- * Permission to use, copy, modify, and/or distribute this software for any
10
- * purpose with or without fee is hereby granted, provided that the above
11
- * copyright notice and this permission notice appear in all copies.
12
- *
13
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20
- *
21
- * ---
22
- *
23
- * The following Lucide icons are derived from the Feather project:
24
- *
25
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
26
- *
27
- * The MIT License (MIT) (for the icons listed above)
28
- *
29
- * Copyright (c) 2013-present Cole Bemis
30
- *
31
- * Permission is hereby granted, free of charge, to any person obtaining a copy
32
- * of this software and associated documentation files (the "Software"), to deal
33
- * in the Software without restriction, including without limitation the rights
34
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
35
- * copies of the Software, and to permit persons to whom the Software is
36
- * furnished to do so, subject to the following conditions:
37
- *
38
- * The above copyright notice and this permission notice shall be included in all
39
- * copies or substantial portions of the Software.
40
- *
41
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
44
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
45
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
46
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
47
- * SOFTWARE.
48
- *
49
- */const sx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
50
- * @license lucide-svelte v1.0.1 - ISC
51
- *
52
- * ISC License
53
- *
54
- * Copyright (c) 2026 Lucide Icons and Contributors
55
- *
56
- * Permission to use, copy, modify, and/or distribute this software for any
57
- * purpose with or without fee is hereby granted, provided that the above
58
- * copyright notice and this permission notice appear in all copies.
59
- *
60
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
61
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
62
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
63
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
64
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
65
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
66
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
67
- *
68
- * ---
69
- *
70
- * The following Lucide icons are derived from the Feather project:
71
- *
72
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
73
- *
74
- * The MIT License (MIT) (for the icons listed above)
75
- *
76
- * Copyright (c) 2013-present Cole Bemis
77
- *
78
- * Permission is hereby granted, free of charge, to any person obtaining a copy
79
- * of this software and associated documentation files (the "Software"), to deal
80
- * in the Software without restriction, including without limitation the rights
81
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
82
- * copies of the Software, and to permit persons to whom the Software is
83
- * furnished to do so, subject to the following conditions:
84
- *
85
- * The above copyright notice and this permission notice shall be included in all
86
- * copies or substantial portions of the Software.
87
- *
88
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
89
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
90
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
91
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
92
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
93
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
94
- * SOFTWARE.
95
- *
96
- */const nx=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1};/**
97
- * @license lucide-svelte v1.0.1 - ISC
98
- *
99
- * ISC License
100
- *
101
- * Copyright (c) 2026 Lucide Icons and Contributors
102
- *
103
- * Permission to use, copy, modify, and/or distribute this software for any
104
- * purpose with or without fee is hereby granted, provided that the above
105
- * copyright notice and this permission notice appear in all copies.
106
- *
107
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
108
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
109
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
110
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
111
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
112
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
113
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
114
- *
115
- * ---
116
- *
117
- * The following Lucide icons are derived from the Feather project:
118
- *
119
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
120
- *
121
- * The MIT License (MIT) (for the icons listed above)
122
- *
123
- * Copyright (c) 2013-present Cole Bemis
124
- *
125
- * Permission is hereby granted, free of charge, to any person obtaining a copy
126
- * of this software and associated documentation files (the "Software"), to deal
127
- * in the Software without restriction, including without limitation the rights
128
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
129
- * copies of the Software, and to permit persons to whom the Software is
130
- * furnished to do so, subject to the following conditions:
131
- *
132
- * The above copyright notice and this permission notice shall be included in all
133
- * copies or substantial portions of the Software.
134
- *
135
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
136
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
137
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
138
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
139
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
140
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
141
- * SOFTWARE.
142
- *
143
- */const Yh=(...t)=>t.filter((e,i,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===i).join(" ").trim();var rx=cv("<svg><!><!></svg>");function Wt(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]),s=Vt(i,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);ir(e,!1);let n=Ci(e,"name",8,void 0),a=Ci(e,"color",8,"currentColor"),o=Ci(e,"size",8,24),l=Ci(e,"strokeWidth",8,2),c=Ci(e,"absoluteStrokeWidth",8,!1),u=Ci(e,"iconNode",24,()=>[]);Mr();var d=rx();Gh(d,(v,g,_)=>({...sx,...v,...s,width:o(),height:o(),stroke:a(),"stroke-width":g,class:_}),[()=>nx(s)?void 0:{"aria-hidden":"true"},()=>(Zt(c()),Zt(l()),Zt(o()),k(()=>c()?Number(l())*24/Number(o()):l())),()=>(Zt(Yh),Zt(n()),Zt(i),k(()=>Yh("lucide-icon","lucide",n()?`lucide-${n()}`:"",i.class)))]);var f=y(d);ge(f,1,u,be,(v,g)=>{var _=ps(()=>c0(r(g),2));let x=()=>r(_)[0],E=()=>r(_)[1];var I=Nt(),z=et(I);Nb(z,x,!0,($,M)=>{Gh($,()=>({...E()}))}),A(v,I)});var p=b(f);Gt(p,e,"default",{}),A(t,d),sr()}function ax(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
144
- * @license lucide-svelte v1.0.1 - ISC
145
- *
146
- * ISC License
147
- *
148
- * Copyright (c) 2026 Lucide Icons and Contributors
149
- *
150
- * Permission to use, copy, modify, and/or distribute this software for any
151
- * purpose with or without fee is hereby granted, provided that the above
152
- * copyright notice and this permission notice appear in all copies.
153
- *
154
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
155
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
156
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
157
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
158
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
159
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
160
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
161
- *
162
- * ---
163
- *
164
- * The following Lucide icons are derived from the Feather project:
165
- *
166
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
167
- *
168
- * The MIT License (MIT) (for the icons listed above)
169
- *
170
- * Copyright (c) 2013-present Cole Bemis
171
- *
172
- * Permission is hereby granted, free of charge, to any person obtaining a copy
173
- * of this software and associated documentation files (the "Software"), to deal
174
- * in the Software without restriction, including without limitation the rights
175
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
176
- * copies of the Software, and to permit persons to whom the Software is
177
- * furnished to do so, subject to the following conditions:
178
- *
179
- * The above copyright notice and this permission notice shall be included in all
180
- * copies or substantial portions of the Software.
181
- *
182
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
183
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
185
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
186
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
187
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
188
- * SOFTWARE.
189
- *
190
- */const s=[["rect",{width:"6",height:"14",x:"2",y:"5",rx:"2"}],["rect",{width:"6",height:"10",x:"16",y:"7",rx:"2"}],["path",{d:"M12 2v20"}]];Wt(t,qt({name:"align-horizontal-justify-center"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function ox(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
191
- * @license lucide-svelte v1.0.1 - ISC
192
- *
193
- * ISC License
194
- *
195
- * Copyright (c) 2026 Lucide Icons and Contributors
196
- *
197
- * Permission to use, copy, modify, and/or distribute this software for any
198
- * purpose with or without fee is hereby granted, provided that the above
199
- * copyright notice and this permission notice appear in all copies.
200
- *
201
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
202
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
203
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
204
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
205
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
206
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
207
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
208
- *
209
- * ---
210
- *
211
- * The following Lucide icons are derived from the Feather project:
212
- *
213
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
214
- *
215
- * The MIT License (MIT) (for the icons listed above)
216
- *
217
- * Copyright (c) 2013-present Cole Bemis
218
- *
219
- * Permission is hereby granted, free of charge, to any person obtaining a copy
220
- * of this software and associated documentation files (the "Software"), to deal
221
- * in the Software without restriction, including without limitation the rights
222
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
223
- * copies of the Software, and to permit persons to whom the Software is
224
- * furnished to do so, subject to the following conditions:
225
- *
226
- * The above copyright notice and this permission notice shall be included in all
227
- * copies or substantial portions of the Software.
228
- *
229
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
230
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
231
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
232
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
233
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
234
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
235
- * SOFTWARE.
236
- *
237
- */const s=[["rect",{width:"6",height:"14",x:"2",y:"5",rx:"2"}],["rect",{width:"6",height:"10",x:"12",y:"7",rx:"2"}],["path",{d:"M22 2v20"}]];Wt(t,qt({name:"align-horizontal-justify-end"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function lx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
238
- * @license lucide-svelte v1.0.1 - ISC
239
- *
240
- * ISC License
241
- *
242
- * Copyright (c) 2026 Lucide Icons and Contributors
243
- *
244
- * Permission to use, copy, modify, and/or distribute this software for any
245
- * purpose with or without fee is hereby granted, provided that the above
246
- * copyright notice and this permission notice appear in all copies.
247
- *
248
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
249
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
250
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
251
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
252
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
253
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
254
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
255
- *
256
- * ---
257
- *
258
- * The following Lucide icons are derived from the Feather project:
259
- *
260
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
261
- *
262
- * The MIT License (MIT) (for the icons listed above)
263
- *
264
- * Copyright (c) 2013-present Cole Bemis
265
- *
266
- * Permission is hereby granted, free of charge, to any person obtaining a copy
267
- * of this software and associated documentation files (the "Software"), to deal
268
- * in the Software without restriction, including without limitation the rights
269
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
270
- * copies of the Software, and to permit persons to whom the Software is
271
- * furnished to do so, subject to the following conditions:
272
- *
273
- * The above copyright notice and this permission notice shall be included in all
274
- * copies or substantial portions of the Software.
275
- *
276
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
277
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
278
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
279
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
280
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
281
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
282
- * SOFTWARE.
283
- *
284
- */const s=[["rect",{width:"6",height:"14",x:"6",y:"5",rx:"2"}],["rect",{width:"6",height:"10",x:"16",y:"7",rx:"2"}],["path",{d:"M2 2v20"}]];Wt(t,qt({name:"align-horizontal-justify-start"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function cx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
285
- * @license lucide-svelte v1.0.1 - ISC
286
- *
287
- * ISC License
288
- *
289
- * Copyright (c) 2026 Lucide Icons and Contributors
290
- *
291
- * Permission to use, copy, modify, and/or distribute this software for any
292
- * purpose with or without fee is hereby granted, provided that the above
293
- * copyright notice and this permission notice appear in all copies.
294
- *
295
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
296
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
297
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
298
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
299
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
300
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
301
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
302
- *
303
- * ---
304
- *
305
- * The following Lucide icons are derived from the Feather project:
306
- *
307
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
308
- *
309
- * The MIT License (MIT) (for the icons listed above)
310
- *
311
- * Copyright (c) 2013-present Cole Bemis
312
- *
313
- * Permission is hereby granted, free of charge, to any person obtaining a copy
314
- * of this software and associated documentation files (the "Software"), to deal
315
- * in the Software without restriction, including without limitation the rights
316
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
317
- * copies of the Software, and to permit persons to whom the Software is
318
- * furnished to do so, subject to the following conditions:
319
- *
320
- * The above copyright notice and this permission notice shall be included in all
321
- * copies or substantial portions of the Software.
322
- *
323
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
324
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
325
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
326
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
327
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
328
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
329
- * SOFTWARE.
330
- *
331
- */const s=[["rect",{width:"14",height:"6",x:"5",y:"16",rx:"2"}],["rect",{width:"10",height:"6",x:"7",y:"2",rx:"2"}],["path",{d:"M2 12h20"}]];Wt(t,qt({name:"align-vertical-justify-center"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function ux(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
332
- * @license lucide-svelte v1.0.1 - ISC
333
- *
334
- * ISC License
335
- *
336
- * Copyright (c) 2026 Lucide Icons and Contributors
337
- *
338
- * Permission to use, copy, modify, and/or distribute this software for any
339
- * purpose with or without fee is hereby granted, provided that the above
340
- * copyright notice and this permission notice appear in all copies.
341
- *
342
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
343
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
344
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
345
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
346
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
347
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
348
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
349
- *
350
- * ---
351
- *
352
- * The following Lucide icons are derived from the Feather project:
353
- *
354
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
355
- *
356
- * The MIT License (MIT) (for the icons listed above)
357
- *
358
- * Copyright (c) 2013-present Cole Bemis
359
- *
360
- * Permission is hereby granted, free of charge, to any person obtaining a copy
361
- * of this software and associated documentation files (the "Software"), to deal
362
- * in the Software without restriction, including without limitation the rights
363
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
364
- * copies of the Software, and to permit persons to whom the Software is
365
- * furnished to do so, subject to the following conditions:
366
- *
367
- * The above copyright notice and this permission notice shall be included in all
368
- * copies or substantial portions of the Software.
369
- *
370
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
371
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
372
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
373
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
374
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
375
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
376
- * SOFTWARE.
377
- *
378
- */const s=[["rect",{width:"14",height:"6",x:"5",y:"12",rx:"2"}],["rect",{width:"10",height:"6",x:"7",y:"2",rx:"2"}],["path",{d:"M2 22h20"}]];Wt(t,qt({name:"align-vertical-justify-end"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function dx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
379
- * @license lucide-svelte v1.0.1 - ISC
380
- *
381
- * ISC License
382
- *
383
- * Copyright (c) 2026 Lucide Icons and Contributors
384
- *
385
- * Permission to use, copy, modify, and/or distribute this software for any
386
- * purpose with or without fee is hereby granted, provided that the above
387
- * copyright notice and this permission notice appear in all copies.
388
- *
389
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
390
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
391
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
392
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
393
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
394
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
395
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
396
- *
397
- * ---
398
- *
399
- * The following Lucide icons are derived from the Feather project:
400
- *
401
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
402
- *
403
- * The MIT License (MIT) (for the icons listed above)
404
- *
405
- * Copyright (c) 2013-present Cole Bemis
406
- *
407
- * Permission is hereby granted, free of charge, to any person obtaining a copy
408
- * of this software and associated documentation files (the "Software"), to deal
409
- * in the Software without restriction, including without limitation the rights
410
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
411
- * copies of the Software, and to permit persons to whom the Software is
412
- * furnished to do so, subject to the following conditions:
413
- *
414
- * The above copyright notice and this permission notice shall be included in all
415
- * copies or substantial portions of the Software.
416
- *
417
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
418
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
419
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
420
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
421
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
422
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
423
- * SOFTWARE.
424
- *
425
- */const s=[["rect",{width:"14",height:"6",x:"5",y:"16",rx:"2"}],["rect",{width:"10",height:"6",x:"7",y:"6",rx:"2"}],["path",{d:"M2 2h20"}]];Wt(t,qt({name:"align-vertical-justify-start"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function On(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
426
- * @license lucide-svelte v1.0.1 - ISC
427
- *
428
- * ISC License
429
- *
430
- * Copyright (c) 2026 Lucide Icons and Contributors
431
- *
432
- * Permission to use, copy, modify, and/or distribute this software for any
433
- * purpose with or without fee is hereby granted, provided that the above
434
- * copyright notice and this permission notice appear in all copies.
435
- *
436
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
437
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
438
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
439
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
440
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
441
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
442
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
443
- *
444
- * ---
445
- *
446
- * The following Lucide icons are derived from the Feather project:
447
- *
448
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
449
- *
450
- * The MIT License (MIT) (for the icons listed above)
451
- *
452
- * Copyright (c) 2013-present Cole Bemis
453
- *
454
- * Permission is hereby granted, free of charge, to any person obtaining a copy
455
- * of this software and associated documentation files (the "Software"), to deal
456
- * in the Software without restriction, including without limitation the rights
457
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
458
- * copies of the Software, and to permit persons to whom the Software is
459
- * furnished to do so, subject to the following conditions:
460
- *
461
- * The above copyright notice and this permission notice shall be included in all
462
- * copies or substantial portions of the Software.
463
- *
464
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
465
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
466
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
467
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
468
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
469
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
470
- * SOFTWARE.
471
- *
472
- */const s=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];Wt(t,qt({name:"arrow-right"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function fx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
473
- * @license lucide-svelte v1.0.1 - ISC
474
- *
475
- * ISC License
476
- *
477
- * Copyright (c) 2026 Lucide Icons and Contributors
478
- *
479
- * Permission to use, copy, modify, and/or distribute this software for any
480
- * purpose with or without fee is hereby granted, provided that the above
481
- * copyright notice and this permission notice appear in all copies.
482
- *
483
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
484
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
485
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
486
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
487
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
488
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
489
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
490
- *
491
- * ---
492
- *
493
- * The following Lucide icons are derived from the Feather project:
494
- *
495
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
496
- *
497
- * The MIT License (MIT) (for the icons listed above)
498
- *
499
- * Copyright (c) 2013-present Cole Bemis
500
- *
501
- * Permission is hereby granted, free of charge, to any person obtaining a copy
502
- * of this software and associated documentation files (the "Software"), to deal
503
- * in the Software without restriction, including without limitation the rights
504
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
505
- * copies of the Software, and to permit persons to whom the Software is
506
- * furnished to do so, subject to the following conditions:
507
- *
508
- * The above copyright notice and this permission notice shall be included in all
509
- * copies or substantial portions of the Software.
510
- *
511
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
512
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
513
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
514
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
515
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
516
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
517
- * SOFTWARE.
518
- *
519
- */const s=[["path",{d:"M12 7v14"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}]];Wt(t,qt({name:"book-open"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function vv(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
520
- * @license lucide-svelte v1.0.1 - ISC
521
- *
522
- * ISC License
523
- *
524
- * Copyright (c) 2026 Lucide Icons and Contributors
525
- *
526
- * Permission to use, copy, modify, and/or distribute this software for any
527
- * purpose with or without fee is hereby granted, provided that the above
528
- * copyright notice and this permission notice appear in all copies.
529
- *
530
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
531
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
532
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
533
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
534
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
535
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
536
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
537
- *
538
- * ---
539
- *
540
- * The following Lucide icons are derived from the Feather project:
541
- *
542
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
543
- *
544
- * The MIT License (MIT) (for the icons listed above)
545
- *
546
- * Copyright (c) 2013-present Cole Bemis
547
- *
548
- * Permission is hereby granted, free of charge, to any person obtaining a copy
549
- * of this software and associated documentation files (the "Software"), to deal
550
- * in the Software without restriction, including without limitation the rights
551
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
552
- * copies of the Software, and to permit persons to whom the Software is
553
- * furnished to do so, subject to the following conditions:
554
- *
555
- * The above copyright notice and this permission notice shall be included in all
556
- * copies or substantial portions of the Software.
557
- *
558
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
559
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
560
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
561
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
562
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
563
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
564
- * SOFTWARE.
565
- *
566
- */const s=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];Wt(t,qt({name:"bot"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function hx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
567
- * @license lucide-svelte v1.0.1 - ISC
568
- *
569
- * ISC License
570
- *
571
- * Copyright (c) 2026 Lucide Icons and Contributors
572
- *
573
- * Permission to use, copy, modify, and/or distribute this software for any
574
- * purpose with or without fee is hereby granted, provided that the above
575
- * copyright notice and this permission notice appear in all copies.
576
- *
577
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
578
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
579
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
580
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
581
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
582
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
583
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
584
- *
585
- * ---
586
- *
587
- * The following Lucide icons are derived from the Feather project:
588
- *
589
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
590
- *
591
- * The MIT License (MIT) (for the icons listed above)
592
- *
593
- * Copyright (c) 2013-present Cole Bemis
594
- *
595
- * Permission is hereby granted, free of charge, to any person obtaining a copy
596
- * of this software and associated documentation files (the "Software"), to deal
597
- * in the Software without restriction, including without limitation the rights
598
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
599
- * copies of the Software, and to permit persons to whom the Software is
600
- * furnished to do so, subject to the following conditions:
601
- *
602
- * The above copyright notice and this permission notice shall be included in all
603
- * copies or substantial portions of the Software.
604
- *
605
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
606
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
607
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
608
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
609
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
610
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
611
- * SOFTWARE.
612
- *
613
- */const s=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];Wt(t,qt({name:"circle-question-mark"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function px(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
614
- * @license lucide-svelte v1.0.1 - ISC
615
- *
616
- * ISC License
617
- *
618
- * Copyright (c) 2026 Lucide Icons and Contributors
619
- *
620
- * Permission to use, copy, modify, and/or distribute this software for any
621
- * purpose with or without fee is hereby granted, provided that the above
622
- * copyright notice and this permission notice appear in all copies.
623
- *
624
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
625
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
626
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
627
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
628
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
629
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
630
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
631
- *
632
- * ---
633
- *
634
- * The following Lucide icons are derived from the Feather project:
635
- *
636
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
637
- *
638
- * The MIT License (MIT) (for the icons listed above)
639
- *
640
- * Copyright (c) 2013-present Cole Bemis
641
- *
642
- * Permission is hereby granted, free of charge, to any person obtaining a copy
643
- * of this software and associated documentation files (the "Software"), to deal
644
- * in the Software without restriction, including without limitation the rights
645
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
646
- * copies of the Software, and to permit persons to whom the Software is
647
- * furnished to do so, subject to the following conditions:
648
- *
649
- * The above copyright notice and this permission notice shall be included in all
650
- * copies or substantial portions of the Software.
651
- *
652
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
653
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
654
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
655
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
656
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
657
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
658
- * SOFTWARE.
659
- *
660
- */const s=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Wt(t,qt({name:"download"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Fl(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
661
- * @license lucide-svelte v1.0.1 - ISC
662
- *
663
- * ISC License
664
- *
665
- * Copyright (c) 2026 Lucide Icons and Contributors
666
- *
667
- * Permission to use, copy, modify, and/or distribute this software for any
668
- * purpose with or without fee is hereby granted, provided that the above
669
- * copyright notice and this permission notice appear in all copies.
670
- *
671
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
672
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
673
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
674
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
675
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
676
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
677
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
678
- *
679
- * ---
680
- *
681
- * The following Lucide icons are derived from the Feather project:
682
- *
683
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
684
- *
685
- * The MIT License (MIT) (for the icons listed above)
686
- *
687
- * Copyright (c) 2013-present Cole Bemis
688
- *
689
- * Permission is hereby granted, free of charge, to any person obtaining a copy
690
- * of this software and associated documentation files (the "Software"), to deal
691
- * in the Software without restriction, including without limitation the rights
692
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
693
- * copies of the Software, and to permit persons to whom the Software is
694
- * furnished to do so, subject to the following conditions:
695
- *
696
- * The above copyright notice and this permission notice shall be included in all
697
- * copies or substantial portions of the Software.
698
- *
699
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
700
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
701
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
702
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
703
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
704
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
705
- * SOFTWARE.
706
- *
707
- */const s=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];Wt(t,qt({name:"eye-off"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function lo(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
708
- * @license lucide-svelte v1.0.1 - ISC
709
- *
710
- * ISC License
711
- *
712
- * Copyright (c) 2026 Lucide Icons and Contributors
713
- *
714
- * Permission to use, copy, modify, and/or distribute this software for any
715
- * purpose with or without fee is hereby granted, provided that the above
716
- * copyright notice and this permission notice appear in all copies.
717
- *
718
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
719
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
720
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
721
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
722
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
723
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
724
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
725
- *
726
- * ---
727
- *
728
- * The following Lucide icons are derived from the Feather project:
729
- *
730
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
731
- *
732
- * The MIT License (MIT) (for the icons listed above)
733
- *
734
- * Copyright (c) 2013-present Cole Bemis
735
- *
736
- * Permission is hereby granted, free of charge, to any person obtaining a copy
737
- * of this software and associated documentation files (the "Software"), to deal
738
- * in the Software without restriction, including without limitation the rights
739
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
740
- * copies of the Software, and to permit persons to whom the Software is
741
- * furnished to do so, subject to the following conditions:
742
- *
743
- * The above copyright notice and this permission notice shall be included in all
744
- * copies or substantial portions of the Software.
745
- *
746
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
747
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
748
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
749
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
750
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
751
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
752
- * SOFTWARE.
753
- *
754
- */const s=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];Wt(t,qt({name:"eye"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function mx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
755
- * @license lucide-svelte v1.0.1 - ISC
756
- *
757
- * ISC License
758
- *
759
- * Copyright (c) 2026 Lucide Icons and Contributors
760
- *
761
- * Permission to use, copy, modify, and/or distribute this software for any
762
- * purpose with or without fee is hereby granted, provided that the above
763
- * copyright notice and this permission notice appear in all copies.
764
- *
765
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
766
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
767
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
768
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
769
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
770
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
771
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
772
- *
773
- * ---
774
- *
775
- * The following Lucide icons are derived from the Feather project:
776
- *
777
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
778
- *
779
- * The MIT License (MIT) (for the icons listed above)
780
- *
781
- * Copyright (c) 2013-present Cole Bemis
782
- *
783
- * Permission is hereby granted, free of charge, to any person obtaining a copy
784
- * of this software and associated documentation files (the "Software"), to deal
785
- * in the Software without restriction, including without limitation the rights
786
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
787
- * copies of the Software, and to permit persons to whom the Software is
788
- * furnished to do so, subject to the following conditions:
789
- *
790
- * The above copyright notice and this permission notice shall be included in all
791
- * copies or substantial portions of the Software.
792
- *
793
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
794
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
795
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
796
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
797
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
798
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
799
- * SOFTWARE.
800
- *
801
- */const s=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 12.5 8 15l2 2.5"}],["path",{d:"m14 12.5 2 2.5-2 2.5"}]];Wt(t,qt({name:"file-code"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function nl(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
802
- * @license lucide-svelte v1.0.1 - ISC
803
- *
804
- * ISC License
805
- *
806
- * Copyright (c) 2026 Lucide Icons and Contributors
807
- *
808
- * Permission to use, copy, modify, and/or distribute this software for any
809
- * purpose with or without fee is hereby granted, provided that the above
810
- * copyright notice and this permission notice appear in all copies.
811
- *
812
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
813
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
814
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
815
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
816
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
817
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
818
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
819
- *
820
- * ---
821
- *
822
- * The following Lucide icons are derived from the Feather project:
823
- *
824
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
825
- *
826
- * The MIT License (MIT) (for the icons listed above)
827
- *
828
- * Copyright (c) 2013-present Cole Bemis
829
- *
830
- * Permission is hereby granted, free of charge, to any person obtaining a copy
831
- * of this software and associated documentation files (the "Software"), to deal
832
- * in the Software without restriction, including without limitation the rights
833
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
834
- * copies of the Software, and to permit persons to whom the Software is
835
- * furnished to do so, subject to the following conditions:
836
- *
837
- * The above copyright notice and this permission notice shall be included in all
838
- * copies or substantial portions of the Software.
839
- *
840
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
841
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
842
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
843
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
844
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
845
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
846
- * SOFTWARE.
847
- *
848
- */const s=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["circle",{cx:"10",cy:"12",r:"2"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22"}]];Wt(t,qt({name:"file-image"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Kh(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
849
- * @license lucide-svelte v1.0.1 - ISC
850
- *
851
- * ISC License
852
- *
853
- * Copyright (c) 2026 Lucide Icons and Contributors
854
- *
855
- * Permission to use, copy, modify, and/or distribute this software for any
856
- * purpose with or without fee is hereby granted, provided that the above
857
- * copyright notice and this permission notice appear in all copies.
858
- *
859
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
860
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
861
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
862
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
863
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
864
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
865
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
866
- *
867
- * ---
868
- *
869
- * The following Lucide icons are derived from the Feather project:
870
- *
871
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
872
- *
873
- * The MIT License (MIT) (for the icons listed above)
874
- *
875
- * Copyright (c) 2013-present Cole Bemis
876
- *
877
- * Permission is hereby granted, free of charge, to any person obtaining a copy
878
- * of this software and associated documentation files (the "Software"), to deal
879
- * in the Software without restriction, including without limitation the rights
880
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
881
- * copies of the Software, and to permit persons to whom the Software is
882
- * furnished to do so, subject to the following conditions:
883
- *
884
- * The above copyright notice and this permission notice shall be included in all
885
- * copies or substantial portions of the Software.
886
- *
887
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
888
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
889
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
890
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
891
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
892
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
893
- * SOFTWARE.
894
- *
895
- */const s=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Wt(t,qt({name:"file-text"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function _v(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
896
- * @license lucide-svelte v1.0.1 - ISC
897
- *
898
- * ISC License
899
- *
900
- * Copyright (c) 2026 Lucide Icons and Contributors
901
- *
902
- * Permission to use, copy, modify, and/or distribute this software for any
903
- * purpose with or without fee is hereby granted, provided that the above
904
- * copyright notice and this permission notice appear in all copies.
905
- *
906
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
907
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
908
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
909
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
910
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
911
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
912
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
913
- *
914
- * ---
915
- *
916
- * The following Lucide icons are derived from the Feather project:
917
- *
918
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
919
- *
920
- * The MIT License (MIT) (for the icons listed above)
921
- *
922
- * Copyright (c) 2013-present Cole Bemis
923
- *
924
- * Permission is hereby granted, free of charge, to any person obtaining a copy
925
- * of this software and associated documentation files (the "Software"), to deal
926
- * in the Software without restriction, including without limitation the rights
927
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
928
- * copies of the Software, and to permit persons to whom the Software is
929
- * furnished to do so, subject to the following conditions:
930
- *
931
- * The above copyright notice and this permission notice shall be included in all
932
- * copies or substantial portions of the Software.
933
- *
934
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
935
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
936
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
937
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
938
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
939
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
940
- * SOFTWARE.
941
- *
942
- */const s=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Wt(t,qt({name:"folder-open"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function vx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
943
- * @license lucide-svelte v1.0.1 - ISC
944
- *
945
- * ISC License
946
- *
947
- * Copyright (c) 2026 Lucide Icons and Contributors
948
- *
949
- * Permission to use, copy, modify, and/or distribute this software for any
950
- * purpose with or without fee is hereby granted, provided that the above
951
- * copyright notice and this permission notice appear in all copies.
952
- *
953
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
954
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
955
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
956
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
957
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
958
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
959
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
960
- *
961
- * ---
962
- *
963
- * The following Lucide icons are derived from the Feather project:
964
- *
965
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
966
- *
967
- * The MIT License (MIT) (for the icons listed above)
968
- *
969
- * Copyright (c) 2013-present Cole Bemis
970
- *
971
- * Permission is hereby granted, free of charge, to any person obtaining a copy
972
- * of this software and associated documentation files (the "Software"), to deal
973
- * in the Software without restriction, including without limitation the rights
974
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
975
- * copies of the Software, and to permit persons to whom the Software is
976
- * furnished to do so, subject to the following conditions:
977
- *
978
- * The above copyright notice and this permission notice shall be included in all
979
- * copies or substantial portions of the Software.
980
- *
981
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
982
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
983
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
984
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
985
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
986
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
987
- * SOFTWARE.
988
- *
989
- */const s=[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3"}]];Wt(t,qt({name:"headphones"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function nu(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
990
- * @license lucide-svelte v1.0.1 - ISC
991
- *
992
- * ISC License
993
- *
994
- * Copyright (c) 2026 Lucide Icons and Contributors
995
- *
996
- * Permission to use, copy, modify, and/or distribute this software for any
997
- * purpose with or without fee is hereby granted, provided that the above
998
- * copyright notice and this permission notice appear in all copies.
999
- *
1000
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1001
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1002
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1003
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1004
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1005
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1006
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1007
- *
1008
- * ---
1009
- *
1010
- * The following Lucide icons are derived from the Feather project:
1011
- *
1012
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1013
- *
1014
- * The MIT License (MIT) (for the icons listed above)
1015
- *
1016
- * Copyright (c) 2013-present Cole Bemis
1017
- *
1018
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1019
- * of this software and associated documentation files (the "Software"), to deal
1020
- * in the Software without restriction, including without limitation the rights
1021
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1022
- * copies of the Software, and to permit persons to whom the Software is
1023
- * furnished to do so, subject to the following conditions:
1024
- *
1025
- * The above copyright notice and this permission notice shall be included in all
1026
- * copies or substantial portions of the Software.
1027
- *
1028
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1029
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1030
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1031
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1032
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1033
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1034
- * SOFTWARE.
1035
- *
1036
- */const s=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];Wt(t,qt({name:"layers"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function _x(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1037
- * @license lucide-svelte v1.0.1 - ISC
1038
- *
1039
- * ISC License
1040
- *
1041
- * Copyright (c) 2026 Lucide Icons and Contributors
1042
- *
1043
- * Permission to use, copy, modify, and/or distribute this software for any
1044
- * purpose with or without fee is hereby granted, provided that the above
1045
- * copyright notice and this permission notice appear in all copies.
1046
- *
1047
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1048
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1049
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1050
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1051
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1052
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1053
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1054
- *
1055
- * ---
1056
- *
1057
- * The following Lucide icons are derived from the Feather project:
1058
- *
1059
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1060
- *
1061
- * The MIT License (MIT) (for the icons listed above)
1062
- *
1063
- * Copyright (c) 2013-present Cole Bemis
1064
- *
1065
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1066
- * of this software and associated documentation files (the "Software"), to deal
1067
- * in the Software without restriction, including without limitation the rights
1068
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1069
- * copies of the Software, and to permit persons to whom the Software is
1070
- * furnished to do so, subject to the following conditions:
1071
- *
1072
- * The above copyright notice and this permission notice shall be included in all
1073
- * copies or substantial portions of the Software.
1074
- *
1075
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1076
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1077
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1078
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1079
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1080
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1081
- * SOFTWARE.
1082
- *
1083
- */const s=[["path",{d:"m12 15 4 4"}],["path",{d:"M2.352 10.648a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.029-6.029a1 1 0 1 1 3 3l-6.029 6.029a1.205 1.205 0 0 0 0 1.704l2.296 2.296a1.205 1.205 0 0 0 1.704 0l6.365-6.367A1 1 0 0 0 8.716 4.282z"}],["path",{d:"m5 8 4 4"}]];Wt(t,qt({name:"magnet"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Xh(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1084
- * @license lucide-svelte v1.0.1 - ISC
1085
- *
1086
- * ISC License
1087
- *
1088
- * Copyright (c) 2026 Lucide Icons and Contributors
1089
- *
1090
- * Permission to use, copy, modify, and/or distribute this software for any
1091
- * purpose with or without fee is hereby granted, provided that the above
1092
- * copyright notice and this permission notice appear in all copies.
1093
- *
1094
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1095
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1096
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1097
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1098
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1099
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1100
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1101
- *
1102
- * ---
1103
- *
1104
- * The following Lucide icons are derived from the Feather project:
1105
- *
1106
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1107
- *
1108
- * The MIT License (MIT) (for the icons listed above)
1109
- *
1110
- * Copyright (c) 2013-present Cole Bemis
1111
- *
1112
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1113
- * of this software and associated documentation files (the "Software"), to deal
1114
- * in the Software without restriction, including without limitation the rights
1115
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1116
- * copies of the Software, and to permit persons to whom the Software is
1117
- * furnished to do so, subject to the following conditions:
1118
- *
1119
- * The above copyright notice and this permission notice shall be included in all
1120
- * copies or substantial portions of the Software.
1121
- *
1122
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1123
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1124
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1125
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1126
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1127
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1128
- * SOFTWARE.
1129
- *
1130
- */const s=[["path",{d:"M15 3h6v6"}],["path",{d:"m21 3-7 7"}],["path",{d:"m3 21 7-7"}],["path",{d:"M9 21H3v-6"}]];Wt(t,qt({name:"maximize-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function gx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1131
- * @license lucide-svelte v1.0.1 - ISC
1132
- *
1133
- * ISC License
1134
- *
1135
- * Copyright (c) 2026 Lucide Icons and Contributors
1136
- *
1137
- * Permission to use, copy, modify, and/or distribute this software for any
1138
- * purpose with or without fee is hereby granted, provided that the above
1139
- * copyright notice and this permission notice appear in all copies.
1140
- *
1141
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1142
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1143
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1144
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1145
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1146
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1147
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1148
- *
1149
- * ---
1150
- *
1151
- * The following Lucide icons are derived from the Feather project:
1152
- *
1153
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1154
- *
1155
- * The MIT License (MIT) (for the icons listed above)
1156
- *
1157
- * Copyright (c) 2013-present Cole Bemis
1158
- *
1159
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1160
- * of this software and associated documentation files (the "Software"), to deal
1161
- * in the Software without restriction, including without limitation the rights
1162
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1163
- * copies of the Software, and to permit persons to whom the Software is
1164
- * furnished to do so, subject to the following conditions:
1165
- *
1166
- * The above copyright notice and this permission notice shall be included in all
1167
- * copies or substantial portions of the Software.
1168
- *
1169
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1170
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1171
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1172
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1173
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1174
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1175
- * SOFTWARE.
1176
- *
1177
- */const s=[["path",{d:"M5 12h14"}]];Wt(t,qt({name:"minus"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function $a(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1178
- * @license lucide-svelte v1.0.1 - ISC
1179
- *
1180
- * ISC License
1181
- *
1182
- * Copyright (c) 2026 Lucide Icons and Contributors
1183
- *
1184
- * Permission to use, copy, modify, and/or distribute this software for any
1185
- * purpose with or without fee is hereby granted, provided that the above
1186
- * copyright notice and this permission notice appear in all copies.
1187
- *
1188
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1189
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1190
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1191
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1192
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1193
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1194
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1195
- *
1196
- * ---
1197
- *
1198
- * The following Lucide icons are derived from the Feather project:
1199
- *
1200
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1201
- *
1202
- * The MIT License (MIT) (for the icons listed above)
1203
- *
1204
- * Copyright (c) 2013-present Cole Bemis
1205
- *
1206
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1207
- * of this software and associated documentation files (the "Software"), to deal
1208
- * in the Software without restriction, including without limitation the rights
1209
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1210
- * copies of the Software, and to permit persons to whom the Software is
1211
- * furnished to do so, subject to the following conditions:
1212
- *
1213
- * The above copyright notice and this permission notice shall be included in all
1214
- * copies or substantial portions of the Software.
1215
- *
1216
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1217
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1218
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1219
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1220
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1221
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1222
- * SOFTWARE.
1223
- *
1224
- */const s=[["circle",{cx:"8",cy:"18",r:"4"}],["path",{d:"M12 18V2l7 4"}]];Wt(t,qt({name:"music-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function yx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1225
- * @license lucide-svelte v1.0.1 - ISC
1226
- *
1227
- * ISC License
1228
- *
1229
- * Copyright (c) 2026 Lucide Icons and Contributors
1230
- *
1231
- * Permission to use, copy, modify, and/or distribute this software for any
1232
- * purpose with or without fee is hereby granted, provided that the above
1233
- * copyright notice and this permission notice appear in all copies.
1234
- *
1235
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1236
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1237
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1238
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1239
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1240
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1241
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1242
- *
1243
- * ---
1244
- *
1245
- * The following Lucide icons are derived from the Feather project:
1246
- *
1247
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1248
- *
1249
- * The MIT License (MIT) (for the icons listed above)
1250
- *
1251
- * Copyright (c) 2013-present Cole Bemis
1252
- *
1253
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1254
- * of this software and associated documentation files (the "Software"), to deal
1255
- * in the Software without restriction, including without limitation the rights
1256
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1257
- * copies of the Software, and to permit persons to whom the Software is
1258
- * furnished to do so, subject to the following conditions:
1259
- *
1260
- * The above copyright notice and this permission notice shall be included in all
1261
- * copies or substantial portions of the Software.
1262
- *
1263
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1264
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1265
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1266
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1267
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1268
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1269
- * SOFTWARE.
1270
- *
1271
- */const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"m16 15-3-3 3-3"}]];Wt(t,qt({name:"panel-left-close"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function bx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1272
- * @license lucide-svelte v1.0.1 - ISC
1273
- *
1274
- * ISC License
1275
- *
1276
- * Copyright (c) 2026 Lucide Icons and Contributors
1277
- *
1278
- * Permission to use, copy, modify, and/or distribute this software for any
1279
- * purpose with or without fee is hereby granted, provided that the above
1280
- * copyright notice and this permission notice appear in all copies.
1281
- *
1282
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1283
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1284
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1285
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1286
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1287
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1288
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1289
- *
1290
- * ---
1291
- *
1292
- * The following Lucide icons are derived from the Feather project:
1293
- *
1294
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1295
- *
1296
- * The MIT License (MIT) (for the icons listed above)
1297
- *
1298
- * Copyright (c) 2013-present Cole Bemis
1299
- *
1300
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1301
- * of this software and associated documentation files (the "Software"), to deal
1302
- * in the Software without restriction, including without limitation the rights
1303
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1304
- * copies of the Software, and to permit persons to whom the Software is
1305
- * furnished to do so, subject to the following conditions:
1306
- *
1307
- * The above copyright notice and this permission notice shall be included in all
1308
- * copies or substantial portions of the Software.
1309
- *
1310
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1311
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1312
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1313
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1314
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1315
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1316
- * SOFTWARE.
1317
- *
1318
- */const s=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1"}]];Wt(t,qt({name:"pause"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function xx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1319
- * @license lucide-svelte v1.0.1 - ISC
1320
- *
1321
- * ISC License
1322
- *
1323
- * Copyright (c) 2026 Lucide Icons and Contributors
1324
- *
1325
- * Permission to use, copy, modify, and/or distribute this software for any
1326
- * purpose with or without fee is hereby granted, provided that the above
1327
- * copyright notice and this permission notice appear in all copies.
1328
- *
1329
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1330
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1331
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1332
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1333
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1334
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1335
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1336
- *
1337
- * ---
1338
- *
1339
- * The following Lucide icons are derived from the Feather project:
1340
- *
1341
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1342
- *
1343
- * The MIT License (MIT) (for the icons listed above)
1344
- *
1345
- * Copyright (c) 2013-present Cole Bemis
1346
- *
1347
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1348
- * of this software and associated documentation files (the "Software"), to deal
1349
- * in the Software without restriction, including without limitation the rights
1350
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1351
- * copies of the Software, and to permit persons to whom the Software is
1352
- * furnished to do so, subject to the following conditions:
1353
- *
1354
- * The above copyright notice and this permission notice shall be included in all
1355
- * copies or substantial portions of the Software.
1356
- *
1357
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1358
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1359
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1360
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1361
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1362
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1363
- * SOFTWARE.
1364
- *
1365
- */const s=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z"}]];Wt(t,qt({name:"play"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Lu(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1366
- * @license lucide-svelte v1.0.1 - ISC
1367
- *
1368
- * ISC License
1369
- *
1370
- * Copyright (c) 2026 Lucide Icons and Contributors
1371
- *
1372
- * Permission to use, copy, modify, and/or distribute this software for any
1373
- * purpose with or without fee is hereby granted, provided that the above
1374
- * copyright notice and this permission notice appear in all copies.
1375
- *
1376
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1377
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1378
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1379
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1380
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1381
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1382
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1383
- *
1384
- * ---
1385
- *
1386
- * The following Lucide icons are derived from the Feather project:
1387
- *
1388
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1389
- *
1390
- * The MIT License (MIT) (for the icons listed above)
1391
- *
1392
- * Copyright (c) 2013-present Cole Bemis
1393
- *
1394
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1395
- * of this software and associated documentation files (the "Software"), to deal
1396
- * in the Software without restriction, including without limitation the rights
1397
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1398
- * copies of the Software, and to permit persons to whom the Software is
1399
- * furnished to do so, subject to the following conditions:
1400
- *
1401
- * The above copyright notice and this permission notice shall be included in all
1402
- * copies or substantial portions of the Software.
1403
- *
1404
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1405
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1406
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1407
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1408
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1409
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1410
- * SOFTWARE.
1411
- *
1412
- */const s=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];Wt(t,qt({name:"plus"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function wx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1413
- * @license lucide-svelte v1.0.1 - ISC
1414
- *
1415
- * ISC License
1416
- *
1417
- * Copyright (c) 2026 Lucide Icons and Contributors
1418
- *
1419
- * Permission to use, copy, modify, and/or distribute this software for any
1420
- * purpose with or without fee is hereby granted, provided that the above
1421
- * copyright notice and this permission notice appear in all copies.
1422
- *
1423
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1424
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1425
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1426
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1427
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1428
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1429
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1430
- *
1431
- * ---
1432
- *
1433
- * The following Lucide icons are derived from the Feather project:
1434
- *
1435
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1436
- *
1437
- * The MIT License (MIT) (for the icons listed above)
1438
- *
1439
- * Copyright (c) 2013-present Cole Bemis
1440
- *
1441
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1442
- * of this software and associated documentation files (the "Software"), to deal
1443
- * in the Software without restriction, including without limitation the rights
1444
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1445
- * copies of the Software, and to permit persons to whom the Software is
1446
- * furnished to do so, subject to the following conditions:
1447
- *
1448
- * The above copyright notice and this permission notice shall be included in all
1449
- * copies or substantial portions of the Software.
1450
- *
1451
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1452
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1453
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1454
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1455
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1456
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1457
- * SOFTWARE.
1458
- *
1459
- */const s=[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]];Wt(t,qt({name:"redo-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Sx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1460
- * @license lucide-svelte v1.0.1 - ISC
1461
- *
1462
- * ISC License
1463
- *
1464
- * Copyright (c) 2026 Lucide Icons and Contributors
1465
- *
1466
- * Permission to use, copy, modify, and/or distribute this software for any
1467
- * purpose with or without fee is hereby granted, provided that the above
1468
- * copyright notice and this permission notice appear in all copies.
1469
- *
1470
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1471
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1472
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1473
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1474
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1475
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1476
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1477
- *
1478
- * ---
1479
- *
1480
- * The following Lucide icons are derived from the Feather project:
1481
- *
1482
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1483
- *
1484
- * The MIT License (MIT) (for the icons listed above)
1485
- *
1486
- * Copyright (c) 2013-present Cole Bemis
1487
- *
1488
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1489
- * of this software and associated documentation files (the "Software"), to deal
1490
- * in the Software without restriction, including without limitation the rights
1491
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1492
- * copies of the Software, and to permit persons to whom the Software is
1493
- * furnished to do so, subject to the following conditions:
1494
- *
1495
- * The above copyright notice and this permission notice shall be included in all
1496
- * copies or substantial portions of the Software.
1497
- *
1498
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1499
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1500
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1501
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1502
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1503
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1504
- * SOFTWARE.
1505
- *
1506
- */const s=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7"}]];Wt(t,qt({name:"save"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function kx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1507
- * @license lucide-svelte v1.0.1 - ISC
1508
- *
1509
- * ISC License
1510
- *
1511
- * Copyright (c) 2026 Lucide Icons and Contributors
1512
- *
1513
- * Permission to use, copy, modify, and/or distribute this software for any
1514
- * purpose with or without fee is hereby granted, provided that the above
1515
- * copyright notice and this permission notice appear in all copies.
1516
- *
1517
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1518
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1519
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1520
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1521
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1522
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1523
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1524
- *
1525
- * ---
1526
- *
1527
- * The following Lucide icons are derived from the Feather project:
1528
- *
1529
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1530
- *
1531
- * The MIT License (MIT) (for the icons listed above)
1532
- *
1533
- * Copyright (c) 2013-present Cole Bemis
1534
- *
1535
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1536
- * of this software and associated documentation files (the "Software"), to deal
1537
- * in the Software without restriction, including without limitation the rights
1538
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1539
- * copies of the Software, and to permit persons to whom the Software is
1540
- * furnished to do so, subject to the following conditions:
1541
- *
1542
- * The above copyright notice and this permission notice shall be included in all
1543
- * copies or substantial portions of the Software.
1544
- *
1545
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1546
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1547
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1548
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1549
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1550
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1551
- * SOFTWARE.
1552
- *
1553
- */const s=[["circle",{cx:"6",cy:"6",r:"3"}],["path",{d:"M8.12 8.12 12 12"}],["path",{d:"M20 4 8.12 15.88"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M14.8 14.8 20 20"}]];Wt(t,qt({name:"scissors"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Bx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1554
- * @license lucide-svelte v1.0.1 - ISC
1555
- *
1556
- * ISC License
1557
- *
1558
- * Copyright (c) 2026 Lucide Icons and Contributors
1559
- *
1560
- * Permission to use, copy, modify, and/or distribute this software for any
1561
- * purpose with or without fee is hereby granted, provided that the above
1562
- * copyright notice and this permission notice appear in all copies.
1563
- *
1564
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1565
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1566
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1567
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1568
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1569
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1570
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1571
- *
1572
- * ---
1573
- *
1574
- * The following Lucide icons are derived from the Feather project:
1575
- *
1576
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1577
- *
1578
- * The MIT License (MIT) (for the icons listed above)
1579
- *
1580
- * Copyright (c) 2013-present Cole Bemis
1581
- *
1582
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1583
- * of this software and associated documentation files (the "Software"), to deal
1584
- * in the Software without restriction, including without limitation the rights
1585
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1586
- * copies of the Software, and to permit persons to whom the Software is
1587
- * furnished to do so, subject to the following conditions:
1588
- *
1589
- * The above copyright notice and this permission notice shall be included in all
1590
- * copies or substantial portions of the Software.
1591
- *
1592
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1593
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1594
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1595
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1596
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1597
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1598
- * SOFTWARE.
1599
- *
1600
- */const s=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z"}],["path",{d:"m21.854 2.147-10.94 10.939"}]];Wt(t,qt({name:"send"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function gv(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1601
- * @license lucide-svelte v1.0.1 - ISC
1602
- *
1603
- * ISC License
1604
- *
1605
- * Copyright (c) 2026 Lucide Icons and Contributors
1606
- *
1607
- * Permission to use, copy, modify, and/or distribute this software for any
1608
- * purpose with or without fee is hereby granted, provided that the above
1609
- * copyright notice and this permission notice appear in all copies.
1610
- *
1611
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1612
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1613
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1614
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1615
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1616
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1617
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1618
- *
1619
- * ---
1620
- *
1621
- * The following Lucide icons are derived from the Feather project:
1622
- *
1623
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1624
- *
1625
- * The MIT License (MIT) (for the icons listed above)
1626
- *
1627
- * Copyright (c) 2013-present Cole Bemis
1628
- *
1629
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1630
- * of this software and associated documentation files (the "Software"), to deal
1631
- * in the Software without restriction, including without limitation the rights
1632
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1633
- * copies of the Software, and to permit persons to whom the Software is
1634
- * furnished to do so, subject to the following conditions:
1635
- *
1636
- * The above copyright notice and this permission notice shall be included in all
1637
- * copies or substantial portions of the Software.
1638
- *
1639
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1640
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1641
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1642
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1643
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1644
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1645
- * SOFTWARE.
1646
- *
1647
- */const s=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];Wt(t,qt({name:"settings"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Ex(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1648
- * @license lucide-svelte v1.0.1 - ISC
1649
- *
1650
- * ISC License
1651
- *
1652
- * Copyright (c) 2026 Lucide Icons and Contributors
1653
- *
1654
- * Permission to use, copy, modify, and/or distribute this software for any
1655
- * purpose with or without fee is hereby granted, provided that the above
1656
- * copyright notice and this permission notice appear in all copies.
1657
- *
1658
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1659
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1660
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1661
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1662
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1663
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1664
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1665
- *
1666
- * ---
1667
- *
1668
- * The following Lucide icons are derived from the Feather project:
1669
- *
1670
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1671
- *
1672
- * The MIT License (MIT) (for the icons listed above)
1673
- *
1674
- * Copyright (c) 2013-present Cole Bemis
1675
- *
1676
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1677
- * of this software and associated documentation files (the "Software"), to deal
1678
- * in the Software without restriction, including without limitation the rights
1679
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1680
- * copies of the Software, and to permit persons to whom the Software is
1681
- * furnished to do so, subject to the following conditions:
1682
- *
1683
- * The above copyright notice and this permission notice shall be included in all
1684
- * copies or substantial portions of the Software.
1685
- *
1686
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1687
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1688
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1689
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1690
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1691
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1692
- * SOFTWARE.
1693
- *
1694
- */const s=[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z"}],["path",{d:"M3 20V4"}]];Wt(t,qt({name:"skip-back"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Gr(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1695
- * @license lucide-svelte v1.0.1 - ISC
1696
- *
1697
- * ISC License
1698
- *
1699
- * Copyright (c) 2026 Lucide Icons and Contributors
1700
- *
1701
- * Permission to use, copy, modify, and/or distribute this software for any
1702
- * purpose with or without fee is hereby granted, provided that the above
1703
- * copyright notice and this permission notice appear in all copies.
1704
- *
1705
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1706
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1707
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1708
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1709
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1710
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1711
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1712
- *
1713
- * ---
1714
- *
1715
- * The following Lucide icons are derived from the Feather project:
1716
- *
1717
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1718
- *
1719
- * The MIT License (MIT) (for the icons listed above)
1720
- *
1721
- * Copyright (c) 2013-present Cole Bemis
1722
- *
1723
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1724
- * of this software and associated documentation files (the "Software"), to deal
1725
- * in the Software without restriction, including without limitation the rights
1726
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1727
- * copies of the Software, and to permit persons to whom the Software is
1728
- * furnished to do so, subject to the following conditions:
1729
- *
1730
- * The above copyright notice and this permission notice shall be included in all
1731
- * copies or substantial portions of the Software.
1732
- *
1733
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1734
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1735
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1736
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1737
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1738
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1739
- * SOFTWARE.
1740
- *
1741
- */const s=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z"}],["path",{d:"M20 2v4"}],["path",{d:"M22 4h-4"}],["circle",{cx:"4",cy:"20",r:"2"}]];Wt(t,qt({name:"sparkles"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function ru(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1742
- * @license lucide-svelte v1.0.1 - ISC
1743
- *
1744
- * ISC License
1745
- *
1746
- * Copyright (c) 2026 Lucide Icons and Contributors
1747
- *
1748
- * Permission to use, copy, modify, and/or distribute this software for any
1749
- * purpose with or without fee is hereby granted, provided that the above
1750
- * copyright notice and this permission notice appear in all copies.
1751
- *
1752
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1753
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1754
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1755
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1756
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1757
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1758
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1759
- *
1760
- * ---
1761
- *
1762
- * The following Lucide icons are derived from the Feather project:
1763
- *
1764
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1765
- *
1766
- * The MIT License (MIT) (for the icons listed above)
1767
- *
1768
- * Copyright (c) 2013-present Cole Bemis
1769
- *
1770
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1771
- * of this software and associated documentation files (the "Software"), to deal
1772
- * in the Software without restriction, including without limitation the rights
1773
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1774
- * copies of the Software, and to permit persons to whom the Software is
1775
- * furnished to do so, subject to the following conditions:
1776
- *
1777
- * The above copyright notice and this permission notice shall be included in all
1778
- * copies or substantial portions of the Software.
1779
- *
1780
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1781
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1782
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1783
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1784
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1785
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1786
- * SOFTWARE.
1787
- *
1788
- */const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];Wt(t,qt({name:"square"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Ux(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1789
- * @license lucide-svelte v1.0.1 - ISC
1790
- *
1791
- * ISC License
1792
- *
1793
- * Copyright (c) 2026 Lucide Icons and Contributors
1794
- *
1795
- * Permission to use, copy, modify, and/or distribute this software for any
1796
- * purpose with or without fee is hereby granted, provided that the above
1797
- * copyright notice and this permission notice appear in all copies.
1798
- *
1799
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1800
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1801
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1802
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1803
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1804
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1805
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1806
- *
1807
- * ---
1808
- *
1809
- * The following Lucide icons are derived from the Feather project:
1810
- *
1811
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1812
- *
1813
- * The MIT License (MIT) (for the icons listed above)
1814
- *
1815
- * Copyright (c) 2013-present Cole Bemis
1816
- *
1817
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1818
- * of this software and associated documentation files (the "Software"), to deal
1819
- * in the Software without restriction, including without limitation the rights
1820
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1821
- * copies of the Software, and to permit persons to whom the Software is
1822
- * furnished to do so, subject to the following conditions:
1823
- *
1824
- * The above copyright notice and this permission notice shall be included in all
1825
- * copies or substantial portions of the Software.
1826
- *
1827
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1828
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1829
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1830
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1831
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1832
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1833
- * SOFTWARE.
1834
- *
1835
- */const s=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z"}]];Wt(t,qt({name:"star"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Wa(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1836
- * @license lucide-svelte v1.0.1 - ISC
1837
- *
1838
- * ISC License
1839
- *
1840
- * Copyright (c) 2026 Lucide Icons and Contributors
1841
- *
1842
- * Permission to use, copy, modify, and/or distribute this software for any
1843
- * purpose with or without fee is hereby granted, provided that the above
1844
- * copyright notice and this permission notice appear in all copies.
1845
- *
1846
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1847
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1848
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1849
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1850
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1851
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1852
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1853
- *
1854
- * ---
1855
- *
1856
- * The following Lucide icons are derived from the Feather project:
1857
- *
1858
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1859
- *
1860
- * The MIT License (MIT) (for the icons listed above)
1861
- *
1862
- * Copyright (c) 2013-present Cole Bemis
1863
- *
1864
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1865
- * of this software and associated documentation files (the "Software"), to deal
1866
- * in the Software without restriction, including without limitation the rights
1867
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1868
- * copies of the Software, and to permit persons to whom the Software is
1869
- * furnished to do so, subject to the following conditions:
1870
- *
1871
- * The above copyright notice and this permission notice shall be included in all
1872
- * copies or substantial portions of the Software.
1873
- *
1874
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1875
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1876
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1877
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1878
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1879
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1880
- * SOFTWARE.
1881
- *
1882
- */const s=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];Wt(t,qt({name:"trash-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function rl(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1883
- * @license lucide-svelte v1.0.1 - ISC
1884
- *
1885
- * ISC License
1886
- *
1887
- * Copyright (c) 2026 Lucide Icons and Contributors
1888
- *
1889
- * Permission to use, copy, modify, and/or distribute this software for any
1890
- * purpose with or without fee is hereby granted, provided that the above
1891
- * copyright notice and this permission notice appear in all copies.
1892
- *
1893
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1894
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1895
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1896
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1897
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1898
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1899
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1900
- *
1901
- * ---
1902
- *
1903
- * The following Lucide icons are derived from the Feather project:
1904
- *
1905
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1906
- *
1907
- * The MIT License (MIT) (for the icons listed above)
1908
- *
1909
- * Copyright (c) 2013-present Cole Bemis
1910
- *
1911
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1912
- * of this software and associated documentation files (the "Software"), to deal
1913
- * in the Software without restriction, including without limitation the rights
1914
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1915
- * copies of the Software, and to permit persons to whom the Software is
1916
- * furnished to do so, subject to the following conditions:
1917
- *
1918
- * The above copyright notice and this permission notice shall be included in all
1919
- * copies or substantial portions of the Software.
1920
- *
1921
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1922
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1923
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1924
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1925
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1926
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1927
- * SOFTWARE.
1928
- *
1929
- */const s=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];Wt(t,qt({name:"type"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Tx(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1930
- * @license lucide-svelte v1.0.1 - ISC
1931
- *
1932
- * ISC License
1933
- *
1934
- * Copyright (c) 2026 Lucide Icons and Contributors
1935
- *
1936
- * Permission to use, copy, modify, and/or distribute this software for any
1937
- * purpose with or without fee is hereby granted, provided that the above
1938
- * copyright notice and this permission notice appear in all copies.
1939
- *
1940
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1941
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1942
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1943
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1944
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1945
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1946
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1947
- *
1948
- * ---
1949
- *
1950
- * The following Lucide icons are derived from the Feather project:
1951
- *
1952
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
1953
- *
1954
- * The MIT License (MIT) (for the icons listed above)
1955
- *
1956
- * Copyright (c) 2013-present Cole Bemis
1957
- *
1958
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1959
- * of this software and associated documentation files (the "Software"), to deal
1960
- * in the Software without restriction, including without limitation the rights
1961
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1962
- * copies of the Software, and to permit persons to whom the Software is
1963
- * furnished to do so, subject to the following conditions:
1964
- *
1965
- * The above copyright notice and this permission notice shall be included in all
1966
- * copies or substantial portions of the Software.
1967
- *
1968
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1969
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1970
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1971
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1972
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1973
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1974
- * SOFTWARE.
1975
- *
1976
- */const s=[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]];Wt(t,qt({name:"undo-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function al(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
1977
- * @license lucide-svelte v1.0.1 - ISC
1978
- *
1979
- * ISC License
1980
- *
1981
- * Copyright (c) 2026 Lucide Icons and Contributors
1982
- *
1983
- * Permission to use, copy, modify, and/or distribute this software for any
1984
- * purpose with or without fee is hereby granted, provided that the above
1985
- * copyright notice and this permission notice appear in all copies.
1986
- *
1987
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1988
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1989
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1990
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1991
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1992
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1993
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1994
- *
1995
- * ---
1996
- *
1997
- * The following Lucide icons are derived from the Feather project:
1998
- *
1999
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2000
- *
2001
- * The MIT License (MIT) (for the icons listed above)
2002
- *
2003
- * Copyright (c) 2013-present Cole Bemis
2004
- *
2005
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2006
- * of this software and associated documentation files (the "Software"), to deal
2007
- * in the Software without restriction, including without limitation the rights
2008
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2009
- * copies of the Software, and to permit persons to whom the Software is
2010
- * furnished to do so, subject to the following conditions:
2011
- *
2012
- * The above copyright notice and this permission notice shall be included in all
2013
- * copies or substantial portions of the Software.
2014
- *
2015
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2016
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2017
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2018
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2019
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2021
- * SOFTWARE.
2022
- *
2023
- */const s=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];Wt(t,qt({name:"upload"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function cr(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
2024
- * @license lucide-svelte v1.0.1 - ISC
2025
- *
2026
- * ISC License
2027
- *
2028
- * Copyright (c) 2026 Lucide Icons and Contributors
2029
- *
2030
- * Permission to use, copy, modify, and/or distribute this software for any
2031
- * purpose with or without fee is hereby granted, provided that the above
2032
- * copyright notice and this permission notice appear in all copies.
2033
- *
2034
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2035
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2036
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2037
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2038
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2039
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2040
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2041
- *
2042
- * ---
2043
- *
2044
- * The following Lucide icons are derived from the Feather project:
2045
- *
2046
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2047
- *
2048
- * The MIT License (MIT) (for the icons listed above)
2049
- *
2050
- * Copyright (c) 2013-present Cole Bemis
2051
- *
2052
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2053
- * of this software and associated documentation files (the "Software"), to deal
2054
- * in the Software without restriction, including without limitation the rights
2055
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2056
- * copies of the Software, and to permit persons to whom the Software is
2057
- * furnished to do so, subject to the following conditions:
2058
- *
2059
- * The above copyright notice and this permission notice shall be included in all
2060
- * copies or substantial portions of the Software.
2061
- *
2062
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2063
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2064
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2065
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2066
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2067
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2068
- * SOFTWARE.
2069
- *
2070
- */const s=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2"}]];Wt(t,qt({name:"video"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Px(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
2071
- * @license lucide-svelte v1.0.1 - ISC
2072
- *
2073
- * ISC License
2074
- *
2075
- * Copyright (c) 2026 Lucide Icons and Contributors
2076
- *
2077
- * Permission to use, copy, modify, and/or distribute this software for any
2078
- * purpose with or without fee is hereby granted, provided that the above
2079
- * copyright notice and this permission notice appear in all copies.
2080
- *
2081
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2082
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2083
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2084
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2085
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2086
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2087
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2088
- *
2089
- * ---
2090
- *
2091
- * The following Lucide icons are derived from the Feather project:
2092
- *
2093
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2094
- *
2095
- * The MIT License (MIT) (for the icons listed above)
2096
- *
2097
- * Copyright (c) 2013-present Cole Bemis
2098
- *
2099
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2100
- * of this software and associated documentation files (the "Software"), to deal
2101
- * in the Software without restriction, including without limitation the rights
2102
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2103
- * copies of the Software, and to permit persons to whom the Software is
2104
- * furnished to do so, subject to the following conditions:
2105
- *
2106
- * The above copyright notice and this permission notice shall be included in all
2107
- * copies or substantial portions of the Software.
2108
- *
2109
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2110
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2111
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2112
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2113
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2114
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2115
- * SOFTWARE.
2116
- *
2117
- */const s=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["path",{d:"M16 9a5 5 0 0 1 0 6"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728"}]];Wt(t,qt({name:"volume-2"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Ax(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
2118
- * @license lucide-svelte v1.0.1 - ISC
2119
- *
2120
- * ISC License
2121
- *
2122
- * Copyright (c) 2026 Lucide Icons and Contributors
2123
- *
2124
- * Permission to use, copy, modify, and/or distribute this software for any
2125
- * purpose with or without fee is hereby granted, provided that the above
2126
- * copyright notice and this permission notice appear in all copies.
2127
- *
2128
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2129
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2130
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2131
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2132
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2133
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2134
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2135
- *
2136
- * ---
2137
- *
2138
- * The following Lucide icons are derived from the Feather project:
2139
- *
2140
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2141
- *
2142
- * The MIT License (MIT) (for the icons listed above)
2143
- *
2144
- * Copyright (c) 2013-present Cole Bemis
2145
- *
2146
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2147
- * of this software and associated documentation files (the "Software"), to deal
2148
- * in the Software without restriction, including without limitation the rights
2149
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2150
- * copies of the Software, and to permit persons to whom the Software is
2151
- * furnished to do so, subject to the following conditions:
2152
- *
2153
- * The above copyright notice and this permission notice shall be included in all
2154
- * copies or substantial portions of the Software.
2155
- *
2156
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2157
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2158
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2159
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2160
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2161
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2162
- * SOFTWARE.
2163
- *
2164
- */const s=[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15"}]];Wt(t,qt({name:"volume-x"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function ol(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
2165
- * @license lucide-svelte v1.0.1 - ISC
2166
- *
2167
- * ISC License
2168
- *
2169
- * Copyright (c) 2026 Lucide Icons and Contributors
2170
- *
2171
- * Permission to use, copy, modify, and/or distribute this software for any
2172
- * purpose with or without fee is hereby granted, provided that the above
2173
- * copyright notice and this permission notice appear in all copies.
2174
- *
2175
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2176
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2177
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2178
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2179
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2180
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2181
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2182
- *
2183
- * ---
2184
- *
2185
- * The following Lucide icons are derived from the Feather project:
2186
- *
2187
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2188
- *
2189
- * The MIT License (MIT) (for the icons listed above)
2190
- *
2191
- * Copyright (c) 2013-present Cole Bemis
2192
- *
2193
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2194
- * of this software and associated documentation files (the "Software"), to deal
2195
- * in the Software without restriction, including without limitation the rights
2196
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2197
- * copies of the Software, and to permit persons to whom the Software is
2198
- * furnished to do so, subject to the following conditions:
2199
- *
2200
- * The above copyright notice and this permission notice shall be included in all
2201
- * copies or substantial portions of the Software.
2202
- *
2203
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2204
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2205
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2206
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2207
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2208
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2209
- * SOFTWARE.
2210
- *
2211
- */const s=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72"}],["path",{d:"m14 7 3 3"}],["path",{d:"M5 6v4"}],["path",{d:"M19 14v4"}],["path",{d:"M10 2v2"}],["path",{d:"M7 8H3"}],["path",{d:"M21 16h-4"}],["path",{d:"M11 3H9"}]];Wt(t,qt({name:"wand-sparkles"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function Ln(t,e){const i=Vt(e,["children","$$slots","$$events","$$legacy"]);/**
2212
- * @license lucide-svelte v1.0.1 - ISC
2213
- *
2214
- * ISC License
2215
- *
2216
- * Copyright (c) 2026 Lucide Icons and Contributors
2217
- *
2218
- * Permission to use, copy, modify, and/or distribute this software for any
2219
- * purpose with or without fee is hereby granted, provided that the above
2220
- * copyright notice and this permission notice appear in all copies.
2221
- *
2222
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
2223
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
2224
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2225
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
2226
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
2227
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
2228
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2229
- *
2230
- * ---
2231
- *
2232
- * The following Lucide icons are derived from the Feather project:
2233
- *
2234
- * airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out
2235
- *
2236
- * The MIT License (MIT) (for the icons listed above)
2237
- *
2238
- * Copyright (c) 2013-present Cole Bemis
2239
- *
2240
- * Permission is hereby granted, free of charge, to any person obtaining a copy
2241
- * of this software and associated documentation files (the "Software"), to deal
2242
- * in the Software without restriction, including without limitation the rights
2243
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2244
- * copies of the Software, and to permit persons to whom the Software is
2245
- * furnished to do so, subject to the following conditions:
2246
- *
2247
- * The above copyright notice and this permission notice shall be included in all
2248
- * copies or substantial portions of the Software.
2249
- *
2250
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2251
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2252
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2253
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2254
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2255
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2256
- * SOFTWARE.
2257
- *
2258
- */const s=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Wt(t,qt({name:"x"},()=>i,{get iconNode(){return s},children:(n,a)=>{var o=Nt(),l=et(o);Gt(l,e,"default",{}),A(n,o)},$$slots:{default:!0}}))}function aa(t){const e="#motionly-filename=",i=t.lastIndexOf(e);if(i>=0)return au(t.slice(i+e.length));if(t.startsWith("data:"))return"";if(t.startsWith("motionly-local:"))return au(t.slice(15).split(/[?#]/,1)[0]??"");const n=(t.split(/[?#]/,1)[0]??t).split(/[\\/]/).pop()??"";return au(n)}function au(t){try{return decodeURIComponent(t)}catch{return t}}function Ix(t,e){return`${t.split("#",1)[0]}#motionly-filename=${encodeURIComponent(e)}`}function Mx(t,e){const i=(s,n)=>Math.max(s,n)/Math.max(1,Math.min(s,n));return i(t.width,e.width)>1.5||i(t.height,e.height)>1.5||!!t.size&&!!e.size&&i(t.size,e.size)>2}const to="motionly.ai.settings.v1",ou="motionly.ai.history.v1",zx=`Context:
2259
- You are Motionly Assistant inside a browser-based motion graphics editor. You cannot open repository files or links. The syntax contract below is the authoritative subset of AGENTS.md and the write-motionly skill. Motionly saves editable projects as plain .motion source.
2260
-
2261
- Objective:
2262
- Given the request, conversation, current project, and available assets, plan distinct shots and return one complete valid .motion project. When refining, update the full current project instead of returning a fragment. Use one focal subject per shot, deliberate exits, and restrained motion. Avoid accidental overlap, repeated fade-only scenes, and constant camera drift.
2263
- Behave like an experienced motion designer: establish hierarchy, stagger entrances, hold text long enough to read, make exits faster than entrances, and use transitions only when the story changes. Prefer editable native SVG or overlay artwork for logos, icons, diagrams, badges, line art, illustrations, and UI graphics. Preserve an imported asset's animation only when the user asks for it.
2264
-
2265
- Mandatory syntax contract:
2266
- - A project has one canvas block: canvas { ... }. Optional camera uses camera { ... }.
2267
- - Import assets exactly as: import "path" as alias
2268
- - Render an imported asset with its alias directly: alias { ... }
2269
- - Text is: text name { ... }. Other built-in elements are only: overlay name { ... } and effect name { ... }.
2270
- - NEVER write image name { ... }, asset name { ... }, video name { ... }, scene name { ... }, group name { ... }, rect name { ... }, or layer name { ... }. Those block types do not exist.
2271
- - Explicit animations use a top-level animate TARGET block with nested from and to blocks, followed by duration, delay, and easing properties.
2272
- - Put every block body on multiple lines and every property on its own line. Do not use JSON, CSS syntax, colons, semicolons, commas, arrays, or equals signs.
2273
- - Quote text values and import paths. Names and aliases are single words without spaces.
2274
- - Use size, never fontSize. Explicit animate blocks use easing. Preset option lists use ease.
2275
- - Valid common properties: value, center, cover, x, y, width, height, scale, rotation, originX, originY, skewX, skewY, opacity, blur, brightness, contrast, saturation, hue, grayscale, sepia, invert, mask, maskInvert, maskVisible, shadow, size, weight, tracking, color, fill, stroke, strokeWidth, layer, animation, textAnimation, backgroundEffect.
2276
- - Valid layers: background, hero, supporting, content, details, text, effects.
2277
- - Preserve asset aspect ratio by setting width OR height, not both.
2278
- - Use only paths listed under Available local assets. Do not invent imports or placeholder paths.
2279
- - Paths beginning motionly-local: are uploaded browser assets. Copy those paths and aliases exactly; Motionly restores their encoded bytes when loading.
2280
- - Presets are string property values, for example: animation "maskReveal(delay 1s duration 800ms direction down exitAt 5s exitDuration 450ms ease power3.out)"
2281
- - Text presets: keynoteText, wordReveal, charReveal, splitReveal, blurReveal, fadeUp, slideIn, scaleText, typewriter, maskReveal, gradientReveal.
2282
- - Object and transition presets: softReveal, maskReveal, dynamicSlide, shapeWipe, irisWipe, drawSVG, sceneExit, scaleReveal. Use drawSVG only for simple stroked SVG artwork.
2283
- - Animate local SVG focus moves with the asset's x, y, scale, rotation, originX, and originY. Do not move the global camera when only one SVG should push in, pull back, or pan.
2284
- - MP4, WebM, MOV, GIF, animated SVG, and Lottie imports are animated assets. Never describe them as unsupported or replace them with still images. Animated SVG uses real-time Canvas playback; disclose that exact frame seeking is unavailable and CSS keyframes may differ from browser DOM playback.
2285
- - Camera presets go inside camera as cameraAnimation. Prefer slowPush, pan, pull, or one speedZoom at a meaningful transition.
2286
- - Keyframes must be percentage blocks nested inside a keyframes block, which is nested inside animate TARGET.
2287
- - Project audio is audio "path" { start 0s }. Keep it on the bottom audio track and preserve its start offset.
2288
- - Persistent timeline rows use track NAME { ... }; imported media clips use clip ALIAS { track NAME start 0s duration 5s trimIn 0s trimOut 0s }.
2289
- - Every visual track behaves as a simple layer: content types do not restrict placement, gaps/overlaps are allowed, and edits do not ripple neighboring clips.
2290
- - Preserve existing track, start, duration, mask, and keyframe data unless the requested change requires editing it.
2291
-
2292
- Minimal valid example:
2293
- canvas {
2294
- size 1920x1080
2295
- fps 60
2296
- duration 5s
2297
- background #050608
2298
- }
2299
-
2300
- import "/assets/logo.svg" as logo
2301
-
2302
- logo {
2303
- center
2304
- layer hero
2305
- width 240
2306
- opacity 0
2307
- }
2308
-
2309
- text title {
2310
- value "Make it move."
2311
- center
2312
- layer text
2313
- y 180
2314
- size 72
2315
- color #ffffff
2316
- opacity 1
2317
- textAnimation "keynoteText(split words stagger 80ms duration 750ms delay 1s ease power3.out)"
2318
- }
2319
-
2320
- animate logo {
2321
- from {
2322
- opacity 0
2323
- y 80
2324
- }
2325
- to {
2326
- opacity 1
2327
- y 0
2328
- }
2329
- duration 800ms
2330
- delay 0s
2331
- easing power3.out
2332
- }
2333
-
2334
- Before answering, silently verify balanced braces, one property per line, every imported visual uses alias { ... }, every animate target exists, no forbidden block keyword appears, required copy is exact, timing covers the complete canvas, and tracks/keyframes survive as editable source.
2335
-
2336
- Style and tone:
2337
- Concise, clean, helpful, and collaborative for users who may not know .motion syntax. Prefer power3.out and entrances around 650ms to 1s.
2338
-
2339
- Response format:
2340
- Give one short explanation, then exactly one fenced \`\`\`motion code block containing the complete project. Do not emit any other fenced blocks.`;function Dn(t){const e=t.trim();return e.startsWith("sk-ant-")?"anthropic":e.startsWith("sk-or-")?"openrouter":e.startsWith("AIza")||e.startsWith("AQ.")?"gemini":e.startsWith("hf_")?"huggingface":e.startsWith("sk-proj-")||e.startsWith("sk-")?"openai":null}function Cx(t){return/```motion\s*([\s\S]*?)```/i.exec(t)?.[1]?.trim()||void 0}function $x(t,e){return bv(t,e,i=>`motionly-local:${encodeURIComponent(aa(i.path)||i.name)}`)}function yv(t,e){for(const i of e.filter(s=>s.path.startsWith("data:"))){const s=new Set([i.name,encodeURIComponent(aa(i.path)||i.name)]);for(const n of s)t=t.replaceAll(`"motionly-local:${n}"`,`"${i.path}"`)}return bv(t,e,i=>i.path)}function bv(t,e,i){for(const s of e.filter(n=>n.path.startsWith("data:"))){const n=s.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp(`(import\\s+)"[^"\\n]*"(\\s+as\\s+${n}(?=\\s|$))`,"g"),(a,o,l)=>`${o}"${i(s)}"${l}`)}return t}function kd(t){const e=new URL(t);if(e.protocol!=="https:"&&e.protocol!=="http:")throw new Error("Base URL must use http or https.");return/\/chat\/completions\/?$/.test(e.pathname)?e.href.replace(/\/$/,""):`${e.href.replace(/\/$/,"")}/chat/completions`}async function Ox(t,e,i,s,n=""){const a=`${zx}
2341
-
2342
- Current project:
2343
- \`\`\`motion
2344
- ${$x(i,s)}
2345
- \`\`\`
2346
-
2347
- Available local assets:
2348
- ${s.length?s.map(o=>`- ${o.name}: ${o.path.startsWith("data:")?`motionly-local:${o.name}`:o.path} (${o.type})`).join(`
2349
- `):"- None"}${n.trim()?`
2350
-
2351
- ${n.trim()}`:""}`;return t.provider==="anthropic"?Nx(t,e,a):Fx(t,e,a)}async function Fx(t,e,i){const s={openai:"https://api.openai.com/v1/chat/completions",openrouter:"https://openrouter.ai/api/v1/chat/completions",gemini:"https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",huggingface:"https://router.huggingface.co/v1/chat/completions"},n={openai:"gpt-5.4-mini",openrouter:"openrouter/auto",gemini:"gemini-2.5-flash",huggingface:"openai/gpt-oss-120b:fastest"},a=t.provider==="openai"||t.provider==="openrouter"||t.provider==="gemini"||t.provider==="huggingface"?t.provider:null,o=a?s[a]:kd(t.baseUrl),l=t.model.trim()||(a?n[a]:""),c={method:"POST",headers:{Authorization:`Bearer ${t.apiKey}`,"Content-Type":"application/json",...t.provider==="openrouter"?{"X-OpenRouter-Title":"Motionly"}:{}},body:JSON.stringify({...l?{model:l}:{},messages:[{role:"system",content:i},...e.map(({role:v,content:g})=>({role:v,content:g}))]})};let u=await fetch(o,c);t.provider==="gemini"&&u.status===503&&(await new Promise(v=>setTimeout(v,800)),u=await fetch(o,c));const d=await u.text();let f={};try{f=JSON.parse(d)}catch{f.message=d}if(!u.ok){const v=t.provider==="gemini"&&u.status===503?"Google Gemini is temporarily unavailable (503). Try again shortly or switch providers.":`Provider request failed (${u.status}).`,g=typeof f.error=="string"?f.error:f.error?.message;throw new Error(g||f.message||v)}const p=f.choices?.[0]?.message?.content?.trim();if(!p)throw new Error("The provider returned an empty response.");return p}async function Nx(t,e,i){const s=await fetch("https://api.anthropic.com/v1/messages",{method:"POST",headers:{"x-api-key":t.apiKey,"anthropic-version":"2023-06-01","anthropic-dangerous-direct-browser-access":"true","Content-Type":"application/json"},body:JSON.stringify({model:t.model.trim()||"claude-sonnet-4-6",max_tokens:8192,system:i,messages:e.map(({role:o,content:l})=>({role:o,content:l}))})}),n=await s.json();if(!s.ok)throw new Error(n.error?.message||`Anthropic request failed (${s.status}).`);const a=n.content?.filter(o=>o.type==="text").map(o=>o.text??"").join(`
2352
- `).trim();if(!a)throw new Error("Anthropic returned an empty response.");return a}var Dx=W("<i></i>"),Rx=W(`<div class="title-row svelte-qg4u95"><h1 class="svelte-qg4u95">Welcome to Motionly</h1><span class="beta svelte-qg4u95">Beta</span></div> <p class="notice svelte-qg4u95">We're early in beta—you may run into bugs or rough edges. Thanks for being here while we sort them out.</p> <p class="svelte-qg4u95">Motionly is an AI-native motion graphics editor where AI-assisted workflows create editable animation projects that you can refine visually. Edit timing, assets, animations, and layouts through a timeline and canvas editor before exporting the final result.</p> <p class="svelte-qg4u95">Underneath, every project is a plain, readable <code class="svelte-qg4u95">.motion</code> file. What AI makes is a starting point you can actually direct.</p> <div class="actions end svelte-qg4u95"><button class="primary svelte-qg4u95" type="button">Continue <!></button></div>`,1),Lx=W('<select class="provider-chip svelte-qg4u95" aria-label="AI provider"><option class="svelte-qg4u95">OpenAI</option><option class="svelte-qg4u95">Anthropic</option><option class="svelte-qg4u95">OpenRouter</option><option class="svelte-qg4u95">Google Gemini</option><option class="svelte-qg4u95">Hugging Face</option><option class="svelte-qg4u95">Custom endpoint</option></select>'),Hx=W('<label class="custom-toggle svelte-qg4u95"><input type="checkbox" class="svelte-qg4u95"/> Custom endpoint</label>'),Vx=W('<p class="warning svelte-qg4u95">Kiro keys work with Kiro CLI, not a documented browser chat endpoint. Use another provider or a compatible custom gateway.</p>'),jx=W('<div class="field svelte-qg4u95"><label for="welcome-base-url" class="svelte-qg4u95">Base URL</label><input id="welcome-base-url" placeholder="http://localhost:11434/v1" class="svelte-qg4u95"/></div>'),Gx=W(`<div class="field svelte-qg4u95"><label for="welcome-model" class="svelte-qg4u95">Model <span class="svelte-qg4u95">(optional)</span></label><input id="welcome-model" placeholder="Exact model ID" class="svelte-qg4u95"/><small class="svelte-qg4u95">Leave blank to use Motionly's default for this provider.</small></div>`),qx=W('<p class="error svelte-qg4u95"> </p>'),Wx=W('<h1 class="svelte-qg4u95">Connect your AI provider</h1> <p class="svelte-qg4u95">AI features are Bring Your Own Key (BYOK). Motionly does not host or proxy AI requests; your browser sends prompts directly to your chosen provider.</p> <div class="field svelte-qg4u95"><label for="welcome-api-key" class="svelte-qg4u95">API key</label> <div class="key-field svelte-qg4u95"><input id="welcome-api-key" placeholder="Paste API key" autocomplete="off" class="svelte-qg4u95"/> <button type="button" class="svelte-qg4u95"><!></button></div></div> <!> <!> <!> <!> <p class="privacy svelte-qg4u95">Your key is stored locally in your browser and never sent to our servers.</p> <!> <div class="actions split svelte-qg4u95"><button class="text-button svelte-qg4u95" type="button">Back</button><button class="primary svelte-qg4u95" type="button">Continue <!></button></div> <button class="skip svelte-qg4u95" type="button">Skip for now</button> <small class="skip-note svelte-qg4u95">You can always add this later from the AI Assistant panel in the editor.</small>',1),Yx=W('<h1 class="svelte-qg4u95">Start with one solid preset</h1> <p class="svelte-qg4u95">Motionly currently ships with one preset to explore while the editor is in beta. More purposeful presets are coming.</p> <div class="preset svelte-qg4u95"><img alt="Motionly preset preview" class="svelte-qg4u95"/><div class="svelte-qg4u95"><strong class="svelte-qg4u95">Motionly</strong><span class="svelte-qg4u95">A complete editable project to inspect, remix, and learn from.</span></div></div> <div class="loop svelte-qg4u95"><span class="svelte-qg4u95">Describe or choose a preset</span><!><span class="svelte-qg4u95">Get editable `.motion`</span><!><span class="svelte-qg4u95">Refine visually</span><!><span class="svelte-qg4u95">Export</span></div> <div class="actions split svelte-qg4u95"><button class="text-button svelte-qg4u95" type="button">Back</button><button class="primary svelte-qg4u95" type="button">Continue <!></button></div>',1),Kx=W('<img class="hero-icon svelte-qg4u95" alt=""/> <h1 class="svelte-qg4u95">Build Motionly with us</h1> <p class="svelte-qg4u95">Motionly is open source. Follow progress, report rough edges, contribute directly on GitHub, or support the launch on Product Hunt.</p> <div class="community-links svelte-qg4u95"><a class="community-link svelte-qg4u95" href="https://github.com/COPPSARY/Motionly" target="_blank" rel="noreferrer"><img alt="" class="svelte-qg4u95"/> Contribute on GitHub</a> <a class="product-hunt-badge svelte-qg4u95" href="https://www.producthunt.com/products/motionly?embed=true&amp;utm_source=badge-featured&amp;utm_medium=badge&amp;utm_campaign=badge-motionly" target="_blank" rel="noopener noreferrer" aria-label="View Motionly on Product Hunt"><img alt="Motionly - Motionly is an AI-native motion graphics editor. | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1197499&amp;theme=dark&amp;t=1784188075155" class="svelte-qg4u95"/></a></div> <div class="actions split svelte-qg4u95"><button class="text-button svelte-qg4u95" type="button">Back</button><button class="primary svelte-qg4u95" type="button">Continue <!></button></div>',1),Xx=W(`<img class="final-logo svelte-qg4u95" alt=""/> <h1 class="svelte-qg4u95">Ready when you are.</h1> <p class="svelte-qg4u95">Start from the preset, describe an idea to the Assistant, or build visually from scratch.</p> <button class="primary final svelte-qg4u95" type="button">Let's create something together <!></button>`,1),Jx=W('<div class="step-content svelte-qg4u95"><!></div>'),Zx=W('<main class="onboarding svelte-qg4u95"><div class="brand svelte-qg4u95"><img alt="" class="svelte-qg4u95"/><span class="svelte-qg4u95">Motionly</span></div> <section class="step-card svelte-qg4u95" aria-live="polite"><div class="progress svelte-qg4u95"><span class="svelte-qg4u95"> </span> <div class="dots svelte-qg4u95"></div></div> <!></section></main>');function Qx(t,e){ir(e,!1);const i=q(),s=q(),n=js("logo.svg"),a=js("github.svg"),o=js("preset/motionly/motionly-preset.gif");let l=q(1),c=q(""),u=q("openai"),d=q(""),f=q(""),p=q(!1),v=q(!1),g=q("");ac(()=>{try{const ht=localStorage.getItem(to);if(!ht)return;const vt=JSON.parse(ht);S(c,vt.apiKey??""),S(u,Dn(r(c))??vt.provider??"openai"),S(d,vt.baseUrl??""),S(f,vt.model??""),S(p,r(u)==="custom")}catch{S(g,"Saved provider settings could not be read.")}});function _(){const ht=Dn(r(c));ht&&(r(u)!==ht&&S(f,""),S(u,ht),S(p,!1))}function x(ht){const vt=ht.currentTarget.value;vt!==r(u)&&S(f,""),S(u,vt),S(p,r(u)==="custom")}function E(ht){S(p,ht.currentTarget.checked),S(u,r(p)?"custom":r(i)??"openai")}function I(){if(S(g,""),!r(c).trim()){S(g,"Paste an API key or skip this step for now.");return}if(!r(i)&&r(u)!=="custom"){S(g,r(s)?"Kiro keys authenticate Kiro CLI, not a documented browser chat endpoint.":"Choose Custom endpoint for this key format.");return}if(r(u)==="custom")try{kd(r(d))}catch(ht){S(g,ht instanceof Error?ht.message:"Enter a valid Base URL.");return}localStorage.setItem(to,JSON.stringify({apiKey:r(c).trim(),provider:r(u),baseUrl:r(d).trim(),model:r(f).trim()})),S(l,3)}function z(){localStorage.setItem(pv,"true"),window.location.assign(js("editor"))}le(()=>r(c),()=>{S(i,Dn(r(c)))}),le(()=>r(c),()=>{S(s,r(c).trim().startsWith("ksk_"))}),ga(),Mr();var $=Zx(),M=y($),V=y(M),N=b(M,2),H=y(N),T=y(H),j=y(T),St=b(T,2);ge(St,4,()=>[1,2,3,4,5],be,(ht,vt)=>{var F=Dx();let C;K(()=>C=Ft(F,1,"svelte-qg4u95",null,C,{active:vt===r(l),complete:vt<r(l)})),A(ht,F)});var yt=b(H,2);Cb(yt,()=>r(l),ht=>{var vt=Jx(),F=y(vt);{var C=de=>{var re=Rx(),xe=b(et(re),8),Ct=y(xe),nt=b(y(Ct));On(nt,{size:15}),P("click",Ct,()=>S(l,2)),A(de,re)},Lt=de=>{var re=Wx(),xe=b(et(re),4),Ct=b(y(xe),2),nt=y(Ct),ai=b(nt,2),kt=y(ai);{var Ge=Et=>{Fl(Et,{size:15})},fe=Et=>{lo(Et,{size:15})};Z(kt,Et=>{r(v)?Et(Ge):Et(fe,-1)})}var Me=b(xe,2);{var pt=Et=>{var he=Nt(),_i=et(he);{var Fi=di=>{var gi=Lx(),Ni=y(gi);Ni.value=Ni.__value="openai";var Ee=b(Ni);Ee.value=Ee.__value="anthropic";var $e=b(Ee);$e.value=$e.__value="openrouter";var yi=b($e);yi.value=yi.__value="gemini";var Se=b(yi);Se.value=Se.__value="huggingface";var ks=b(Se);ks.value=ks.__value="custom";var oi;br(gi),K(()=>{oi!==(oi=r(u))&&(gi.value=(gi.__value=r(u))??"",Pn(gi,r(u)))}),P("change",gi,x),A(di,gi)},pn=di=>{var gi=Hx(),Ni=y(gi);K(()=>oo(Ni,r(p))),P("change",Ni,E),A(di,gi)};Z(_i,di=>{r(i)||r(p)?di(Fi):di(pn,-1)})}A(Et,he)},jt=ps(()=>(r(c),k(()=>r(c).trim())));Z(Me,Et=>{r(jt)&&Et(pt)})}var xi=b(Me,2);{var ft=Et=>{var he=Vx();A(Et,he)};Z(xi,Et=>{r(s)&&Et(ft)})}var qe=b(xi,2);{var Ss=Et=>{var he=jx(),_i=b(y(he));zi(_i,()=>r(d),Fi=>S(d,Fi)),A(Et,he)};Z(qe,Et=>{r(p)&&Et(Ss)})}var Ii=b(qe,2);{var as=Et=>{var he=Gx(),_i=b(y(he));zi(_i,()=>r(f),Fi=>S(f,Fi)),A(Et,he)},rt=ps(()=>(r(c),r(i),r(p),k(()=>r(c).trim()&&(r(i)||r(p)))));Z(Ii,Et=>{r(rt)&&Et(as)})}var It=b(Ii,4);{var Be=Et=>{var he=qx(),_i=y(he);K(()=>at(_i,r(g))),A(Et,he)};Z(It,Et=>{r(g)&&Et(Be)})}var bt=b(It,2),_t=y(bt),Pt=b(_t),Ie=b(y(Pt));On(Ie,{size:15});var we=b(bt,2);K(()=>{st(nt,"type",r(v)?"text":"password"),st(ai,"title",r(v)?"Hide key":"Show key")}),zi(nt,()=>r(c),Et=>S(c,Et)),P("input",nt,_),P("click",ai,()=>S(v,!r(v))),P("click",_t,()=>S(l,1)),P("click",Pt,I),P("click",we,()=>S(l,3)),A(de,re)},xt=de=>{var re=Yx(),xe=b(et(re),4),Ct=y(xe),nt=b(xe,2),ai=b(y(nt));On(ai,{size:14});var kt=b(ai,2);On(kt,{size:14});var Ge=b(kt,2);On(Ge,{size:14});var fe=b(nt,2),Me=y(fe),pt=b(Me),jt=b(y(pt));On(jt,{size:15}),K(()=>st(Ct,"src",o)),P("click",Me,()=>S(l,2)),P("click",pt,()=>S(l,4)),A(de,re)},He=de=>{var re=Kx(),xe=et(re),Ct=b(xe,6),nt=y(Ct),ai=y(nt),kt=b(Ct,2),Ge=y(kt),fe=b(Ge),Me=b(y(fe));On(Me,{size:15}),K(()=>{st(xe,"src",a),st(ai,"src",a)}),P("click",Ge,()=>S(l,3)),P("click",fe,()=>S(l,5)),A(de,re)},ii=de=>{var re=Xx(),xe=et(re),Ct=b(xe,6),nt=b(y(Ct));On(nt,{size:15}),K(()=>st(xe,"src",n)),P("click",Ct,z),A(de,re)};Z(F,de=>{r(l)===1?de(C):r(l)===2?de(Lt,1):r(l)===3?de(xt,2):r(l)===4?de(He,3):de(ii,-1)})}A(ht,vt)}),K(()=>{st(V,"src",n),st(H,"aria-label",`Step ${r(l)} of 5`),at(j,`Step ${r(l)??""} of 5`)}),A(t,$),sr()}function tw(t){return{type:"Program",body:t}}function ew(t){return{type:"Canvas",properties:t}}function iw(t,e){return{type:"Import",path:t,name:e}}function sw(t){return{type:"Camera",properties:t}}function Jh(t,e,i){return{type:"Element",kind:t,name:e,properties:i}}function nw(t,e){return{type:"Animation",target:t,...e}}function rw(t,e){return{type:"Sequence",name:t,properties:e}}function aw(t,e){return{type:"Track",name:t,properties:e}}function ow(t){const e=[];let i=0,s=1,n=1;for(;i<t.length;){const a=t[i];if(a===`
2353
- `){e.push(Oa("Newline",`
2354
- `,s,n)),i+=1,s+=1,n=1;continue}if(/\s/.test(a)){i+=1,n+=1;continue}if(a==="/"&&t[i+1]==="/"){for(;i<t.length&&t[i]!==`
2355
- `;)i+=1,n+=1;continue}if(a==="{"||a==="}"){const c=a==="{"?"LeftBrace":"RightBrace";e.push(Oa(c,a,s,n)),i+=1,n+=1;continue}if(a==='"'){const c=n;let u="";for(i+=1,n+=1;i<t.length&&t[i]!=='"';){if(t[i]==="\\"&&i+1<t.length){const d=t[i+1];u+=d==="n"?`
2356
- `:d,i+=2,n+=2;continue}u+=t[i],i+=1,n+=1}if(t[i]!=='"')throw new Error(`Unterminated string at ${s}:${c}`);i+=1,n+=1,e.push(Oa("String",u,s,c));continue}const o=n;let l="";for(;i<t.length&&!/\s/.test(t[i])&&t[i]!=="{"&&t[i]!=="}";)l+=t[i],i+=1,n+=1;e.push(Oa("Word",l,s,o))}return e.push(Oa("EOF","",s,n)),e}function Oa(t,e,i,s){return{type:t,value:e,line:i,column:s}}const lw=new Set(["image","text","overlay","effect"]),cw=new Set(["background","backgroundEffect","blur","brightness","contrast","saturation","hue","grayscale","sepia","invert","mask","maskInvert","maskVisible","center","clip","color","cover","fill","effect","font","fps","height","gridSize","gridThickness","layer","animation","cameraAnimation","textAnimation","opacity","originX","originY","parent","path","pathProgress","revealProgress","offset","intensity","rotation","radius","radiusX","radiusY","scale","skewX","skewY","shadow","size","shape","source","stroke","strokeWidth","tracking","track","role","content","label","hidden","muted","order","start","duration","trimIn","trimOut","volume","mute","transitionIn","transitionInDuration","transitionOut","transitionOutDuration","value","weight","width","x","x2","y","y2","zoom"]);function Zh(t){return new uw(ow(t)).parseProgram()}class uw{tokens;index;constructor(e){this.tokens=e,this.index=0}parseProgram(){const e=[];for(;!this.check("EOF")&&(this.skipNewlines(),!this.check("EOF"));)e.push(this.parseStatement());return tw(e)}parseStatement(){const e=this.peek();if(this.matchWord("canvas"))return ew(this.parseBlockProperties());if(this.matchWord("camera"))return sw(this.parseBlockProperties());if(this.matchWord("audio")){const i=this.consume("String","Expected audio path").value;this.skipNewlines();const s=this.check("LeftBrace")?this.parseBlockProperties():{};return{type:"Audio",path:i,properties:s}}if(e.type==="Word"&&e.value==="track"&&this.tokens[this.index+1]?.type==="Word"){this.advance();const i=this.consume("Word","Expected track name").value;return aw(i,this.parseBlockProperties())}if(this.matchWord("clip"))return{type:"Clip",assetName:this.consume("Word","Expected clip asset name").value,properties:this.parseBlockProperties()};if(this.matchWord("sequence")){const i=this.consume("Word","Expected sequence name").value;return rw(i,this.parseBlockProperties())}if(this.matchWord("import")){const i=this.consume("String","Expected import path").value;this.consumeWord("as",'Expected "as" in import');const s=this.consume("Word","Expected import alias").value;return this.skipNewlines(),iw(i,s)}if(this.matchWord("animate")){const i=this.consume("Word","Expected animation target").value;return nw(i,this.parseAnimationBody())}if(e.type==="Word"){const i=this.advance().value;if(lw.has(i)&&this.check("Word")){const s=this.consume("Word",`Expected ${i} name`).value;return Jh(i,s,this.parseBlockProperties())}return Jh("asset",i,this.parseBlockProperties())}throw this.error(e,`Unexpected token "${e.value}"`)}parseAnimationBody(){this.consume("LeftBrace","Expected animation block");const e={from:{},to:{},keyframes:[],delay:0,duration:1,easing:"soft"};for(;!this.check("RightBrace")&&!this.check("EOF")&&(this.skipNewlines(),!this.check("RightBrace"));){if(this.matchWord("from")){e.from=this.parseBlockProperties();continue}if(this.matchWord("to")){e.to=this.parseBlockProperties();continue}if(this.matchWord("keyframes")){e.keyframes=this.parseKeyframes();continue}const i=this.consume("Word","Expected animation property").value,s=this.collectLineValues();e[i]=s.join(" ")}return this.consume("RightBrace","Expected end of animation block"),this.skipNewlines(),e}parseKeyframes(){this.consume("LeftBrace","Expected keyframes block");const e=[];for(;!this.check("RightBrace")&&!this.check("EOF")&&(this.skipNewlines(),!this.check("RightBrace"));){const i=this.consume("Word","Expected keyframe offset"),s=i.value.endsWith("%")?Number.parseFloat(i.value)/100:Number.parseFloat(i.value),n=this.parseBlockProperties(),a=typeof n.ease=="string"?n.ease:typeof n.easing=="string"?n.easing:void 0;delete n.ease,delete n.easing,e.push({offset:s,properties:n,...a?{easing:a}:{}})}return this.consume("RightBrace","Expected end of keyframes block"),e.sort((i,s)=>i.offset-s.offset)}parseBlockProperties(){this.consume("LeftBrace","Expected block");const e={};for(;!this.check("RightBrace")&&!this.check("EOF")&&(this.skipNewlines(),!this.check("RightBrace"));){const i=this.consume("Word","Expected property name").value;if(["center","cover","clip","maskInvert","maskVisible","mute","hidden","muted"].includes(i)&&(this.check("Newline")||this.check("RightBrace"))){e[i]=!0,this.skipNewlines();continue}const s=!["animation","textAnimation","cameraAnimation","backgroundEffect"].includes(i);e[i]=this.collectLineValues({stopAtPropertyName:s}).join(" ")}return this.consume("RightBrace","Expected end of block"),this.skipNewlines(),e}collectLineValues(e={}){const i=[];for(;!this.check("Newline")&&!this.check("RightBrace")&&!this.check("EOF")&&!(e.stopAtPropertyName&&i.length>0&&this.check("Word")&&cw.has(this.peek().value));)i.push(this.advance().value);return this.skipNewlines(),i}skipNewlines(){for(;this.check("Newline");)this.advance()}match(e){return this.check(e)?(this.advance(),!0):!1}matchWord(e){return!this.check("Word")||this.peek().value!==e?!1:(this.advance(),!0)}consume(e,i){if(this.check(e))return this.advance();throw this.error(this.peek(),i)}consumeWord(e,i){if(this.check("Word")&&this.peek().value===e)return this.advance();throw this.error(this.peek(),i)}check(e){return this.peek().type===e}advance(){const e=this.tokens[this.index];return e?(this.index++,e):this.tokens[this.tokens.length-1]}peek(){const e=this.tokens[this.index];return e||this.tokens[this.tokens.length-1]}error(e,i){const s=new Error(`${i} at ${e.line}:${e.column}`);return s.line=e.line,s.column=e.column,s.token=e,s}}function Nl(t){return String(t).trim()}function oc(t){const e=String(t).trim();return e.endsWith("ms")?Number.parseFloat(e)/1e3:(e.endsWith("s"),Number.parseFloat(e))}function dw(t){const e=String(t).trim().match(/^(\d+(?:\.\d+)?)\s*x\s*(\d+(?:\.\d+)?)$/);if(!e)throw new Error(`Invalid size "${t}"`);return{width:Number(e[1]),height:Number(e[2])}}function fw(t){if(typeof t=="number")return t;const e=String(t).trim();if(e==="true")return!0;if(e==="false")return!1;const i=Number(e);return Number.isNaN(i)?e:i}function co(t,e=0,i=1){return Math.min(i,Math.max(e,t))}const hw=new Set(["duration","delay","start","trimIn","trimOut","transitionInDuration","transitionOutDuration"]),pw=new Set(["x","y","width","height","scale","originX","originY","skewX","skewY","rotation","opacity","pathProgress","revealProgress","blur","brightness","contrast","saturation","hue","grayscale","sepia","invert","shadow","size","intensity","offset","overscan","radius","radiusX","radiusY","weight","tracking","strokeWidth","x2","y2","zoom"]),mw=new Set(["background","color","fill","stroke"]);function vw(t){const e=t.size?dw(String(t.size)):{width:1920,height:1080};return{width:e.width,height:e.height,fps:Number(t.fps??60),duration:t.duration?oc(t.duration):5,background:t.background?Nl(t.background):"#000"}}function _w(t={}){return{x:Number.parseFloat(String(t.x??0)),y:Number.parseFloat(String(t.y??0)),zoom:Number.parseFloat(String(t.zoom??1)),rotation:Number.parseFloat(String(t.rotation??0))}}function eo(t){const e={};for(const[i,s]of Object.entries(t))e[i]=Ki(i,s);return e}function Ki(t,e){return hw.has(t)?oc(e):pw.has(t)?Number.parseFloat(String(e)):mw.has(t)?Nl(e):fw(e)}function gw(t){const e={x:0,y:0,width:null,height:null,scale:1,rotation:0,originX:.5,originY:.5,opacity:1,blur:0,brightness:1,contrast:1,saturation:1,hue:0,grayscale:0,sepia:0,invert:0,shadow:0,layer:"content",center:!1,cover:!1};return t==="text"?{...e,value:"",font:"Inter, SF Pro Display, Segoe UI, Arial, sans-serif",size:64,weight:600,color:"#fff",tracking:0}:t==="image"?{...e,source:""}:t==="overlay"?{...e,parent:"",shape:"rect",fill:"#000",stroke:"none",strokeWidth:4,radius:48,radiusX:48,radiusY:48,x2:0,y2:0,path:"",value:"",font:"Inter, SF Pro Display, Segoe UI, Arial, sans-serif",size:48,weight:700,clip:!1,opacity:0,layer:"effects"}:t==="effect"?{...e,effect:"gradientMotion",opacity:0,offset:0,intensity:1,layer:"background"}:e}function Gs(t){const e=String(t??"").trim(),i=e.match(/^([A-Za-z][\w-]*)(?:\((.*)\))?$/);return i?{name:i[1],options:yw(i[2]??"")}:{name:e,options:{}}}function yw(t){const e={},i=t.replace(/[,:]/g," ").split(/\s+/).map(s=>s.trim()).filter(Boolean);for(let s=0;s<i.length;s+=2){const n=i[s],a=i[s+1];if(!n||a==null)break;e[n]=bw(n,a)}return e}function bw(t,e){if(["delay","duration","stagger","exitAt","exitDuration"].includes(t))return oc(e);const i=Number(e);return Number.isNaN(i)?e:i}const xw={comma:",",none:"",space:" "};function Qh(t){if(!Number.isFinite(t)||Number.isInteger(t))return 0;const e=String(t).toLowerCase();if(e.includes("e-")){const[i,s]=e.split("e-");return(i?.split(".")[1]?.length??0)+Number(s??0)}return e.split(".")[1]?.length??0}function ww(t){const e=String(t??"").trim();return xw[e.toLowerCase()]??e}function Sw(t,e="",i=0){const s=Number(t);if(!Number.isFinite(s))return String(t??"");const n=Math.max(0,Math.min(20,Math.floor(i))),a=new Intl.NumberFormat("en-US",{useGrouping:!!e,minimumFractionDigits:n,maximumFractionDigits:n}).format(s);return e?a.replace(/,/g,e):a}const kw=new Set(["splitReveal","blurReveal","fadeUp","slideIn","scaleText","typewriter","maskReveal","charReveal","wordReveal","gradientReveal","keynoteText","countUp"]),Bw=new Set(["heroLogo","productPanel","softReveal","sceneExit","springIn","bounceIn","float","pulse","drawSVG","shapeWipe","irisWipe","maskReveal","dynamicSlide","scaleReveal","morph","rotateReveal","productReveal","appleHero","startupLaunch","highlight-circle-reveal","animated-arrow-point","callout-text-pop","spotlight-mask"]);function Ew(t){const e=[],i=[],s=[];for(const n of t.elements){const a=n.properties,o=a.animation,l=a.textAnimation,c=Gs(o).name==="countUp"?o:l??o;if(n.kind==="text"&&c&&Pw(c)){if(Gs(c).name==="countUp"){const p=Uw(n,c);s.push(p.element),i.push(p.animation);continue}const f=Mw(n,c);s.push(Iw(n)),e.push(...f.elements),i.push(...f.animations);continue}if(a.backgroundEffect){const f=Cw(n);e.push(...f.elements),i.push(...f.animations)}const d=a.animation;if(d&&Aw(d)){const f=Gs(d).name;s.push({...n,properties:{...n.properties,...f==="drawSVG"?{pathProgress:0}:{},...["highlight-circle-reveal","animated-arrow-point"].includes(f)?{pathProgress:0}:{},...f==="spotlight-mask"?{revealProgress:0}:{},...["shapeWipe","irisWipe","maskReveal"].includes(f)?{revealProgress:0,revealStyle:f==="irisWipe"?"iris":"linear"}:{},...["shapeWipe","maskReveal"].includes(f)?{revealDirection:String(Gs(d).options.direction??"right")}:{}}}),i.push(...zw(n))}else s.push(n)}return{...t,elements:[...s,...e],animations:[...i,...t.animations]}}function Uw(t,e){const{options:i}=Gs(e),s=t.properties,n=Fa(i.from,0),a=Fa(i.to,Fa(s.value,0)),o=String(i.direction??"up").toLowerCase(),l=o==="down"?a:n,c=o==="down"?n:a;return{element:{...t,properties:{...t.properties,value:l,countSeparator:ww(i.separator),countDecimals:Math.max(Qh(n),Qh(a)),countTo:a}},animation:{target:t.id,from:{value:l},to:{value:c},keyframes:[],delay:Fa(i.delay,0),duration:Math.max(.001,Fa(i.duration,2)),easing:String(i.ease??i.easing??"power3.out")}}}function Fa(t,e){const i=Number(t);return Number.isFinite(i)?i:e}function Tw(t){const{name:e,options:i}=Gs(t),s=i.delay??0,n=i.duration??5,a=i.ease??"smooth";return e==="slowPush"||e==="push"||e==="productReveal"||e==="appleHero"?[{target:"camera",from:{zoom:i.from??1,x:i.xFrom??0,y:i.yFrom??0,rotation:0},to:{zoom:i.to??1.05,x:i.xTo??0,y:i.yTo??-10,rotation:0},keyframes:[],delay:s,duration:n,easing:a}]:e==="pan"?[{target:"camera",from:{x:i.from??-80,y:0},to:{x:i.to??80,y:0},keyframes:[],delay:s,duration:n,easing:a}]:e==="pull"?[{target:"camera",from:{zoom:i.from??1.06},to:{zoom:i.to??1},keyframes:[],delay:s,duration:n,easing:a}]:e==="speedZoom"?[{target:"camera",from:{},to:{},keyframes:[{offset:0,properties:{zoom:i.from??1,x:i.xFrom??0,y:i.yFrom??0}},{offset:.55,properties:{zoom:i.peak??1.12,x:i.xPeak??0,y:i.yPeak??0}},{offset:1,properties:{zoom:i.to??1.02,x:i.xTo??0,y:i.yTo??0}}],delay:s,duration:n,easing:i.ease??"power3.out"}]:[]}function Pw(t){return kw.has(Gs(t).name)}function Aw(t){return Bw.has(Gs(t).name)}function Iw(t){return{...t,properties:{...t.properties,opacity:0}}}function Mw(t,e){const{name:i,options:s}=Gs(e),n=s.split??Nw(i),a=t.properties,o=$w(String(a.value??""),n),l=s.stagger??(n==="chars"?.035:.09),c=s.delay??0,u=s.duration??1.2,d=wv(s.ease??"power3.out"),p=Ow(o,a,n).map((g,_)=>({...t,id:`${t.id}__${n}_${_}`,properties:{...t.properties,value:g.value,x:a.x+g.x,textGroup:t.id,textGroupX:a.x??0,textSplit:n,y:a.y,center:!0,opacity:0,blur:xv(i),scale:i==="scaleText"?.94:a.scale,tracking:0}})),v=p.map((g,_)=>{const x=g.properties;return{target:g.id,from:Dw(i,x),to:tp(i,x),keyframes:[],delay:c+_*l,duration:u,easing:d}});return s.exitAt!=null&&v.push(...p.map((g,_)=>{const x=g.properties;return{target:g.id,from:tp(i,x),to:{opacity:0,y:x.y-30,blur:i==="blurReveal"?6:0},keyframes:[],delay:s.exitAt+_*Math.min(l,.018),duration:s.exitDuration??.9,easing:"ease-out"}})),{elements:p,animations:v}}function zw(t){const e=t.id,i=t.properties,{name:s,options:n}=Gs(i.animation),a=n.delay??0,o=n.duration??(s==="float"?4:1.2),l=wv(n.ease??(s==="springIn"||s==="bounceIn"?"spring":"ease-out"));if(s==="highlight-circle-reveal"||s==="animated-arrow-point")return[Li(e,a,o,n.ease??"power3.out",{opacity:1,pathProgress:0},{opacity:i.opacity||1,pathProgress:1})];if(s==="callout-text-pop"){const c=i.x??0,u=i.y??0,d=i.scale??1;return[Li(e,a,o,n.ease??"power3.out",{opacity:0,x:c,y:u+(n.yFrom??18),scale:d*.84},{opacity:i.opacity||1,x:c,y:u,scale:d})]}if(s==="spotlight-mask")return[Li(e,a,o,n.ease??"power3.out",{opacity:1,revealProgress:0},{opacity:i.opacity||1,revealProgress:1})];if(s==="heroLogo")return[Li(e,a,o,n.ease??"soft-spring",{opacity:0,scale:n.from??.82,y:n.yFrom??i.y+34,rotation:n.rotationFrom??-1.5},{opacity:1,scale:n.to??i.scale,y:n.yTo??i.y,rotation:i.rotation})];if(s==="productPanel")return[Li(e,a,o,n.ease??"ease-out",{opacity:0,scale:n.from??.965,x:n.xFrom??i.x,y:n.yFrom??i.y+34},{opacity:i.opacity||1,scale:n.to??i.scale,x:i.x,y:i.y})];if(s==="softReveal"){const c=n.opacity??(i.opacity||1),u=i.x??0,d=i.y??0,f=i.scale??1,p=[Li(e,a,o,n.ease??"power3.out",{opacity:0,x:u+(n.xFrom??0),y:d+(n.yFrom??24),scale:n.from??f*.98,blur:n.blur??0},{opacity:c,x:u,y:d,scale:f,blur:0})];return n.exitAt!=null&&p.push(Li(e,n.exitAt,n.exitDuration??.55,n.exitEase??"power2.in",{opacity:c,x:u,y:d,scale:f,blur:0},{opacity:0,x:u+(n.xExit??0),y:d+(n.yExit??0),scale:n.exitScale??f,blur:n.exitBlur??0})),p}if(s==="sceneExit")return[Li(e,a,o,n.ease??"ease-out",{opacity:i.opacity||1,scale:i.scale,x:i.x,y:i.y},{opacity:0,scale:n.to??.98,x:n.xTo??i.x,y:n.yTo??i.y-28})];if(s==="float")return[{target:e,from:{},to:{},keyframes:[{offset:0,properties:{y:n.y??0}},{offset:.5,properties:{y:n.yTo??-14}},{offset:1,properties:{y:n.y??0}}],delay:a,duration:o,easing:"smooth"}];if(s==="pulse")return[{target:e,from:{},to:{},keyframes:[{offset:0,properties:{scale:1}},{offset:.5,properties:{scale:n.to??1.035}},{offset:1,properties:{scale:1}}],delay:a,duration:o,easing:"smooth"}];if(s==="rotateReveal")return[Li(e,a,o,l,{opacity:0,scale:.94,rotation:i.rotation-4},{opacity:1,scale:i.scale,rotation:i.rotation})];if(s==="drawSVG")return[Li(e,a,o,l,{opacity:1,pathProgress:0,scale:i.scale*.98},{opacity:i.opacity||1,pathProgress:1,scale:i.scale})];if(s==="shapeWipe"||s==="irisWipe")return[Li(e,a,o,n.ease??"power3.out",{opacity:1,revealProgress:0},{opacity:1,revealProgress:1})];if(s==="maskReveal"){const c=i.opacity||1,u=[Li(e,a,o,n.ease??"power3.out",{opacity:1,revealProgress:0},{opacity:c,revealProgress:1})];return n.exitAt!=null&&u.push(Li(e,n.exitAt,n.exitDuration??.6,n.exitEase??"power2.in",{opacity:c,revealProgress:1},{opacity:0,revealProgress:0})),u}if(s==="dynamicSlide"){const c=i.x??0,u=i.y??0,d=i.scale??1,f=i.opacity||1,p=String(n.direction??"left"),v=n.distance??180,g=p==="left"?v:p==="right"?-v:0,_=p==="up"?v:p==="down"?-v:0,x=g?Math.sign(g)*4:0,E=[{target:e,from:{},to:{},keyframes:[{offset:0,properties:{opacity:0,x:c+g,y:u+_,scale:d*.94,skewX:x}},{offset:.82,properties:{opacity:f,x:c-g*.04,y:u-_*.04,scale:d*1.01,skewX:-x*.12}},{offset:1,properties:{opacity:f,x:c,y:u,scale:d,skewX:0}}],delay:a,duration:o,easing:n.ease??"power3.out"}];return n.exitAt!=null&&E.push(Li(e,n.exitAt,n.exitDuration??.55,n.exitEase??"power2.in",{opacity:f,x:c,y:u,scale:d,skewX:0},{opacity:0,x:c-g*.7,y:u-_*.7,scale:d*.97,skewX:-x*.5})),E}return[Li(e,a,o,l,{opacity:0,scale:n.from??.8,y:n.yFrom??i.y+36},{opacity:1,scale:n.to??i.scale,y:n.yTo??i.y})]}function Cw(t){const e=t.properties,{name:i,options:s}=Gs(e.backgroundEffect),n=s.duration??12,a=s.opacity??(i==="noise"?.035:.2),o={...t,id:`${t.id}__${i}`,kind:"effect",assetName:null,asset:null,properties:{...t.properties,...s,layer:"background",effect:i,opacity:a,offset:0,intensity:s.intensity??1}};return{elements:[o],animations:[{target:o.id,from:{offset:0},to:{offset:1},keyframes:[],delay:s.delay??0,duration:n,easing:"linear"}]}}function Li(t,e,i,s,n,a){return{target:t,from:n,to:a,keyframes:[],delay:e,duration:i,easing:s}}function $w(t,e){return e==="words"?t.trim().split(/\s+/).filter(i=>i.length>0):Array.from(t)}function Ow(t,e,i){if(i==="words"){const o=t.map(d=>d.length*e.size*.52),l=e.size*.34;let u=-(o.reduce((d,f)=>d+f,0)+l*(t.length-1))/2;return t.map((d,f)=>{const p=o[f],v=u+p/2;return u+=p+l,{value:d,x:v}})}const s=t.map(o=>Fw(o,e,i));let a=-s.reduce((o,l)=>o+l,0)/2;return t.map((o,l)=>{const c=s[l],u=a+c/2;return a+=c,{value:o,x:u}})}function Fw(t,e,i){return i==="words"?t.length*e.size*.52+e.size*.34:e.size*.54+(e.tracking??0)}function Nw(t){return t==="keynoteText"||t==="wordReveal"||t==="blurReveal"?"words":"chars"}function xv(t){return t==="keynoteText"?0:t==="blurReveal"||t==="gradientReveal"?10:0}function Dw(t,e){return t==="keynoteText"?{opacity:0,y:e.y+26,scale:.99}:t==="scaleText"?{opacity:0,scale:.92,y:e.y+8}:t==="slideIn"?{opacity:1,x:e.x-36}:t==="maskReveal"?{opacity:0,y:e.y+24}:{opacity:0,y:e.y+38,blur:xv(t)}}function tp(t,e){return t==="slideIn"?{opacity:e.opacity||1,x:e.x}:{opacity:e.opacity||1,y:e.y,blur:0,scale:e.scale||1}}function wv(t){return t==="power3.out"||t==="power2.out"?"ease-out":t}const ep={background:0,hero:10,supporting:20,content:30,details:40,text:50,effects:60};function ip(t){const e=t.body.find(v=>v.type==="Canvas"),i=t.body.find(v=>v.type==="Camera"),s=t.body.find(v=>v.type==="Audio"),n=vw(e&&"properties"in e?e.properties:{}),a=_w(i&&"properties"in i?i.properties:{}),o=qw(t),l=new Map,c=[],u=[],d=[];for(const v of t.body){if(v.type==="Import"&&l.set(v.name,{name:v.name,path:v.path,type:Yw(v.path)}),v.type==="Element"){const g=v.kind==="asset"?v.name:v.kind==="image"?String(v.properties.source??""):null,_=g?l.get(g)??null:null,x=eo(v.properties);c.push({id:v.name,kind:v.kind,assetName:_?g:null,asset:_,properties:{...gw(v.kind),...x,...v.kind==="overlay"&&x.parent&&!v.properties.layer?{layer:"details"}:{}}})}if(v.type==="Animation"&&u.push(Gw(v,o)),v.type==="Clip"){const g=l.get(v.assetName)??null,_=eo(v.properties);d.push({id:`clip_${v.assetName}_${d.length}`,assetName:v.assetName,asset:g,track:_.track??1,start:Ki("start",_.start??0),duration:Ki("duration",_.duration??5),trimIn:Ki("trimIn",_.trimIn??0),trimOut:Ki("trimOut",_.trimOut??0),transitionIn:_.transitionIn==="crossfade"?"crossfade":void 0,transitionInDuration:Ki("transitionInDuration",_.transitionInDuration??0),transitionOut:_.transitionOut==="crossfade"?"crossfade":void 0,transitionOutDuration:Ki("transitionOutDuration",_.transitionOutDuration??0),volume:_.volume!==void 0?Number(_.volume):1,mute:!!(_.mute??!1),sourceOrder:d.length})}}i&&"properties"in i&&i.properties.cameraAnimation&&u.push(...Tw(i.properties.cameraAnimation));const f=Hw(t,d,c,!!s),p=Ew({canvas:n,camera:a,sequences:Array.from(o.values()),imports:Array.from(l.values()),elements:c,animations:u,tracks:f,clips:d,audio:s&&"path"in s?s.path:void 0,audioStart:s?Ki("start",s.properties.start??0):0});return Kw(p.elements),p.elements.sort((v,g)=>sp(v.properties.layer)-sp(g.properties.layer)),p}const Rw=new Set(["main","overlay","audio"]),Lw=new Set(["primary","video","image","text","effect","audio","mixed"]);function Hw(t,e,i,s){const n=[],a=new Set;let o="";for(const c of t.body.filter(u=>u.type==="Track")){if(c.type!=="Track")continue;if(a.has(c.name))throw new Error(`Duplicate track declaration "${c.name}".`);const u=String(c.properties.role??"overlay");if(!Rw.has(u))throw new Error(`Track "${c.name}" has unsupported role "${u}".`);if(u==="main"&&o)throw new Error(`Only one main track is allowed ("${o}" and "${c.name}").`);u==="main"&&(o=c.name);const d=u==="main"?"primary":u==="audio"?"audio":"mixed",f=String(c.properties.content??d);if(!Lw.has(f))throw new Error(`Track "${c.name}" has unsupported content "${f}".`);if(u==="audio"&&f!=="audio")throw new Error(`Audio track "${c.name}" must use content audio.`);a.add(c.name),n.push({id:c.name,label:String(c.properties.label??Vw(u,n.length)),role:u,content:f,hidden:!!Ki("hidden",c.properties.hidden??!1),muted:!!Ki("muted",c.properties.muted??!1),order:Number(c.properties.order??n.length),declared:!0})}const l=(c,u,d,f)=>{const p=n.find(g=>g.id===c);if(p)return p;const v={id:c,label:f,role:u,content:d,hidden:!1,muted:!1,order:n.length,declared:!1};return n.push(v),a.add(c),v};for(const c of e){const u=String(c.track),d=c.asset?.type==="video"?"video":"image",p=!n.some(v=>v.role==="main")&&(u==="1"||u==="main")?"main":"overlay";l(u,p,p==="main"?"primary":d,p==="main"?"Main Track":`${d==="video"?"Video":"Image"} Overlay`)}for(const c of i){const u=c.properties.track;if(u==null||u==="")continue;const d=c.kind==="text"?"text":c.kind==="effect"||c.kind==="overlay"?"effect":c.asset?.type==="video"?"video":"image";l(String(u),"overlay",d,jw(d))}return n.some(c=>c.role==="main")||n.unshift({id:"main",label:"Main Track",role:"main",content:"primary",hidden:!1,muted:!1,order:-1,declared:!1}),s&&!n.some(c=>c.role==="audio")&&l("legacy-audio","audio","audio","Audio"),n.sort((c,u)=>c.order-u.order)}function Vw(t,e){return t==="main"?"Main Track":t==="audio"?e>0?`Audio ${e+1}`:"Audio":`Overlay ${e+1}`}function jw(t){return t==="text"?"Text Overlay":t==="video"?"Video Overlay":t==="image"?"Image Overlay":t==="effect"?"Effects Overlay":t==="audio"?"Audio":"Overlay"}function Gw(t,e){const i=Ww(t,e);return{target:t.target,from:eo(t.from??{}),to:eo(t.to??{}),keyframes:(t.keyframes??[]).map(s=>({offset:s.offset,properties:eo(s.properties),...s.easing?{easing:String(s.easing)}:{}})),delay:Ki("delay",t.delay??0)+i,duration:Ki("duration",t.duration??1),easing:String(t.easing??"soft"),sequence:t.sequence}}function qw(t){const e=new Map;for(const i of t.body.filter(s=>s.type==="Sequence")){if(i.type!=="Sequence")continue;const s=Ki("delay",i.properties.delay??0),n=Ki("delay",i.properties.gap??0),a=String(i.properties.items??"").split(/\s+/).filter(Boolean);e.set(i.name,{name:i.name,delay:s,gap:n,items:a})}return e}function Ww(t,e){if(!t.sequence)return 0;const i=e.get(String(t.sequence));if(!i)return 0;const s=i.items.indexOf(t.target);return i.delay+Math.max(0,s)*i.gap}function sp(t){return ep[t]??ep.content}function Yw(t){const e=t.toLowerCase(),i=aa(t).toLowerCase(),s=e.split(/[?#]/,1)[0]??e;return e.startsWith("data:video/")||/\.(mp4|webm|mov|m4v)$/.test(i||s)?"video":e.startsWith("data:application/zip+dotlottie")||(i||s).endsWith(".lottie")?"lottie":e.startsWith("data:image/svg+xml")||(i||s).endsWith(".svg")?"svg":"image"}function Kw(t){const e=new Map(t.map(i=>[i.id,i]));for(const i of t){const s=String(i.properties.mask??"");if(!s||s==="none")continue;if(s===i.id)throw new Error(`Layer "${i.id}" cannot mask itself`);const n=e.get(s);if(!n)throw new Error(`Mask layer "${s}" referenced by "${i.id}" does not exist`);const a=String(n.properties.mask??"");if(a&&a!=="none")throw new Error(`Nested layer masks are not supported: "${i.id}" -> "${s}"`)}}function kn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sv(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}/*!
2357
- * GSAP 3.15.0
2358
- * https://gsap.com
2359
- *
2360
- * @license Copyright 2008-2026, GreenSock. All rights reserved.
2361
- * Subject to the terms at https://gsap.com/standard-license
2362
- * @author: Jack Doyle, jack@greensock.com
2363
- */var bs={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},uo={duration:.5,overwrite:!1,delay:0},Bd,Ti,We,Is=1e8,De=1/Is,Hu=Math.PI*2,Xw=Hu/4,Jw=0,kv=Math.sqrt,Zw=Math.cos,Qw=Math.sin,Bi=function(e){return typeof e=="string"},ri=function(e){return typeof e=="function"},In=function(e){return typeof e=="number"},Ed=function(e){return typeof e>"u"},fn=function(e){return typeof e=="object"},Qi=function(e){return e!==!1},Ud=function(){return typeof window<"u"},ll=function(e){return ri(e)||Bi(e)},Bv=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Oi=Array.isArray,t2=/random\([^)]+\)/g,e2=/,\s*/g,np=/(?:-?\.?\d|\.)+/gi,Ev=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Kr=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,lu=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,Uv=/[+-]=-?[.\d]+/,i2=/[^,'"\[\]\s]+/gi,s2=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ti,rn,Vu,Td,xs={},Dl={},Tv,Pv=function(e){return(Dl=oa(e,xs))&&ns},Pd=function(e,i){return console.warn("Invalid property",e,"set to",i,"Missing plugin? gsap.registerPlugin()")},fo=function(e,i){return!i&&console.warn(e)},Av=function(e,i){return e&&(xs[e]=i)&&Dl&&(Dl[e]=i)||xs},ho=function(){return 0},n2={suppressEvents:!0,isStart:!0,kill:!1},bl={suppressEvents:!0,kill:!1},r2={suppressEvents:!0},Ad={},Wn=[],ju={},Iv,ms={},cu={},rp=30,xl=[],Id="",Md=function(e){var i=e[0],s,n;if(fn(i)||ri(i)||(e=[e]),!(s=(i._gsap||{}).harness)){for(n=xl.length;n--&&!xl[n].targetTest(i););s=xl[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Qv(e[n],s)))||e.splice(n,1);return e},xr=function(e){return e._gsap||Md(Ms(e))[0]._gsap},Mv=function(e,i,s){return(s=e[i])&&ri(s)?e[i]():Ed(s)&&e.getAttribute&&e.getAttribute(i)||s},ts=function(e,i){return(e=e.split(",")).forEach(i)||e},ui=function(e){return Math.round(e*1e5)/1e5||0},Qe=function(e){return Math.round(e*1e7)/1e7||0},Zr=function(e,i){var s=i.charAt(0),n=parseFloat(i.substr(2));return e=parseFloat(e),s==="+"?e+n:s==="-"?e-n:s==="*"?e*n:e/n},a2=function(e,i){for(var s=i.length,n=0;e.indexOf(i[n])<0&&++n<s;);return n<s},Rl=function(){var e=Wn.length,i=Wn.slice(0),s,n;for(ju={},Wn.length=0,s=0;s<e;s++)n=i[s],n&&n._lazy&&(n.render(n._lazy[0],n._lazy[1],!0)._lazy=0)},zd=function(e){return!!(e._initted||e._startAt||e.add)},zv=function(e,i,s,n){Wn.length&&!Ti&&Rl(),e.render(i,s,!!(Ti&&i<0&&zd(e))),Wn.length&&!Ti&&Rl()},Cv=function(e){var i=parseFloat(e);return(i||i===0)&&(e+"").match(i2).length<2?i:Bi(e)?e.trim():e},$v=function(e){return e},ws=function(e,i){for(var s in i)s in e||(e[s]=i[s]);return e},o2=function(e){return function(i,s){for(var n in s)n in i||n==="duration"&&e||n==="ease"||(i[n]=s[n])}},oa=function(e,i){for(var s in i)e[s]=i[s];return e},ap=function t(e,i){for(var s in i)s!=="__proto__"&&s!=="constructor"&&s!=="prototype"&&(e[s]=fn(i[s])?t(e[s]||(e[s]={}),i[s]):i[s]);return e},Ll=function(e,i){var s={},n;for(n in e)n in i||(s[n]=e[n]);return s},io=function(e){var i=e.parent||ti,s=e.keyframes?o2(Oi(e.keyframes)):ws;if(Qi(e.inherit))for(;i;)s(e,i.vars.defaults),i=i.parent||i._dp;return e},l2=function(e,i){for(var s=e.length,n=s===i.length;n&&s--&&e[s]===i[s];);return s<0},Ov=function(e,i,s,n,a){var o=e[n],l;if(a)for(l=i[a];o&&o[a]>l;)o=o._prev;return o?(i._next=o._next,o._next=i):(i._next=e[s],e[s]=i),i._next?i._next._prev=i:e[n]=i,i._prev=o,i.parent=i._dp=e,i},lc=function(e,i,s,n){s===void 0&&(s="_first"),n===void 0&&(n="_last");var a=i._prev,o=i._next;a?a._next=o:e[s]===i&&(e[s]=o),o?o._prev=a:e[n]===i&&(e[n]=a),i._next=i._prev=i.parent=null},Zn=function(e,i){e.parent&&(!i||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},wr=function(e,i){if(e&&(!i||i._end>e._dur||i._start<0))for(var s=e;s;)s._dirty=1,s=s.parent;return e},c2=function(e){for(var i=e.parent;i&&i.parent;)i._dirty=1,i.totalDuration(),i=i.parent;return e},Gu=function(e,i,s,n){return e._startAt&&(Ti?e._startAt.revert(bl):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(i,!0,n))},u2=function t(e){return!e||e._ts&&t(e.parent)},op=function(e){return e._repeat?la(e._tTime,e=e.duration()+e._rDelay)*e:0},la=function(e,i){var s=Math.floor(e=Qe(e/i));return e&&s===e?s-1:s},Hl=function(e,i){return(e-i._start)*i._ts+(i._ts>=0?0:i._dirty?i.totalDuration():i._tDur)},cc=function(e){return e._end=Qe(e._start+(e._tDur/Math.abs(e._ts||e._rts||De)||0))},uc=function(e,i){var s=e._dp;return s&&s.smoothChildTiming&&e._ts&&(e._start=Qe(s._time-(e._ts>0?i/e._ts:((e._dirty?e.totalDuration():e._tDur)-i)/-e._ts)),cc(e),s._dirty||wr(s,e)),e},Fv=function(e,i){var s;if((i._time||!i._dur&&i._initted||i._start<e._time&&(i._dur||!i.add))&&(s=Hl(e.rawTime(),i),(!i._dur||Eo(0,i.totalDuration(),s)-i._tTime>De)&&i.render(s,!0)),wr(e,i)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(s=e;s._dp;)s.rawTime()>=0&&s.totalTime(s._tTime),s=s._dp;e._zTime=-De}},on=function(e,i,s,n){return i.parent&&Zn(i),i._start=Qe((In(s)?s:s||e!==ti?Ps(e,s,i):e._time)+i._delay),i._end=Qe(i._start+(i.totalDuration()/Math.abs(i.timeScale())||0)),Ov(e,i,"_first","_last",e._sort?"_start":0),qu(i)||(e._recent=i),n||Fv(e,i),e._ts<0&&uc(e,e._tTime),e},Nv=function(e,i){return(xs.ScrollTrigger||Pd("scrollTrigger",i))&&xs.ScrollTrigger.create(i,e)},Dv=function(e,i,s,n,a){if($d(e,i,a),!e._initted)return 1;if(!s&&e._pt&&!Ti&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&Iv!==vs.frame)return Wn.push(e),e._lazy=[a,n],1},d2=function t(e){var i=e.parent;return i&&i._ts&&i._initted&&!i._lock&&(i.rawTime()<0||t(i))},qu=function(e){var i=e.data;return i==="isFromStart"||i==="isStart"},f2=function(e,i,s,n){var a=e.ratio,o=i<0||!i&&(!e._start&&d2(e)&&!(!e._initted&&qu(e))||(e._ts<0||e._dp._ts<0)&&!qu(e))?0:1,l=e._rDelay,c=0,u,d,f;if(l&&e._repeat&&(c=Eo(0,e._tDur,i),d=la(c,l),e._yoyo&&d&1&&(o=1-o),d!==la(e._tTime,l)&&(a=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==a||Ti||n||e._zTime===De||!i&&e._zTime){if(!e._initted&&Dv(e,i,n,s,c))return;for(f=e._zTime,e._zTime=i||(s?De:0),s||(s=i&&!f),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,u=e._pt;u;)u.r(o,u.d),u=u._next;i<0&&Gu(e,i,s,!0),e._onUpdate&&!s&&_s(e,"onUpdate"),c&&e._repeat&&!s&&e.parent&&_s(e,"onRepeat"),(i>=e._tDur||i<0)&&e.ratio===o&&(o&&Zn(e,1),!s&&!Ti&&(_s(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=i)},h2=function(e,i,s){var n;if(s>i)for(n=e._first;n&&n._start<=s;){if(n.data==="isPause"&&n._start>i)return n;n=n._next}else for(n=e._last;n&&n._start>=s;){if(n.data==="isPause"&&n._start<i)return n;n=n._prev}},ca=function(e,i,s,n){var a=e._repeat,o=Qe(i)||0,l=e._tTime/e._tDur;return l&&!n&&(e._time*=o/e._dur),e._dur=o,e._tDur=a?a<0?1e10:Qe(o*(a+1)+e._rDelay*a):o,l>0&&!n&&uc(e,e._tTime=e._tDur*l),e.parent&&cc(e),s||wr(e.parent,e),e},lp=function(e){return e instanceof Xi?wr(e):ca(e,e._dur)},p2={_start:0,endTime:ho,totalDuration:ho},Ps=function t(e,i,s){var n=e.labels,a=e._recent||p2,o=e.duration()>=Is?a.endTime(!1):e._dur,l,c,u;return Bi(i)&&(isNaN(i)||i in n)?(c=i.charAt(0),u=i.substr(-1)==="%",l=i.indexOf("="),c==="<"||c===">"?(l>=0&&(i=i.replace(/=/,"")),(c==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(i.substr(1))||0)*(u?(l<0?a:s).totalDuration()/100:1)):l<0?(i in n||(n[i]=o),n[i]):(c=parseFloat(i.charAt(l-1)+i.substr(l+1)),u&&s&&(c=c/100*(Oi(s)?s[0]:s).totalDuration()),l>1?t(e,i.substr(0,l-1),s)+c:o+c)):i==null?o:+i},so=function(e,i,s){var n=In(i[1]),a=(n?2:1)+(e<2?0:1),o=i[a],l,c;if(n&&(o.duration=i[1]),o.parent=s,e){for(l=o,c=s;c&&!("immediateRender"in l);)l=c.vars.defaults||{},c=Qi(c.vars.inherit)&&c.parent;o.immediateRender=Qi(l.immediateRender),e<2?o.runBackwards=1:o.startAt=i[a-1]}return new pi(i[0],o,i[a+1])},nr=function(e,i){return e||e===0?i(e):i},Eo=function(e,i,s){return s<e?e:s>i?i:s},$i=function(e,i){return!Bi(e)||!(i=s2.exec(e))?"":i[1]},m2=function(e,i,s){return nr(s,function(n){return Eo(e,i,n)})},Wu=[].slice,Rv=function(e,i){return e&&fn(e)&&"length"in e&&(!i&&!e.length||e.length-1 in e&&fn(e[0]))&&!e.nodeType&&e!==rn},v2=function(e,i,s){return s===void 0&&(s=[]),e.forEach(function(n){var a;return Bi(n)&&!i||Rv(n,1)?(a=s).push.apply(a,Ms(n)):s.push(n)})||s},Ms=function(e,i,s){return We&&!i&&We.selector?We.selector(e):Bi(e)&&!s&&(Vu||!ua())?Wu.call((i||Td).querySelectorAll(e),0):Oi(e)?v2(e,s):Rv(e)?Wu.call(e,0):e?[e]:[]},Yu=function(e){return e=Ms(e)[0]||fo("Invalid scope")||{},function(i){var s=e.current||e.nativeElement||e;return Ms(i,s.querySelectorAll?s:s===e?fo("Invalid scope")||Td.createElement("div"):e)}},Lv=function(e){return e.sort(function(){return .5-Math.random()})},Hv=function(e){if(ri(e))return e;var i=fn(e)?e:{each:e},s=Sr(i.ease),n=i.from||0,a=parseFloat(i.base)||0,o={},l=n>0&&n<1,c=isNaN(n)||l,u=i.axis,d=n,f=n;return Bi(n)?d=f={center:.5,edges:.5,end:1}[n]||0:!l&&c&&(d=n[0],f=n[1]),function(p,v,g){var _=(g||i).length,x=o[_],E,I,z,$,M,V,N,H,T;if(!x){if(T=i.grid==="auto"?0:(i.grid||[1,Is])[1],!T){for(N=-Is;N<(N=g[T++].getBoundingClientRect().left)&&T<_;);T<_&&T--}for(x=o[_]=[],E=c?Math.min(T,_)*d-.5:n%T,I=T===Is?0:c?_*f/T-.5:n/T|0,N=0,H=Is,V=0;V<_;V++)z=V%T-E,$=I-(V/T|0),x[V]=M=u?Math.abs(u==="y"?$:z):kv(z*z+$*$),M>N&&(N=M),M<H&&(H=M);n==="random"&&Lv(x),x.max=N-H,x.min=H,x.v=_=(parseFloat(i.amount)||parseFloat(i.each)*(T>_?_-1:u?u==="y"?_/T:T:Math.max(T,_/T))||0)*(n==="edges"?-1:1),x.b=_<0?a-_:a,x.u=$i(i.amount||i.each)||0,s=s&&_<0?P2(s):s}return _=(x[p]-x.min)/x.max||0,Qe(x.b+(s?s(_):_)*x.v)+x.u}},Ku=function(e){var i=Math.pow(10,((e+"").split(".")[1]||"").length);return function(s){var n=Qe(Math.round(parseFloat(s)/e)*e*i);return(n-n%1)/i+(In(s)?0:$i(s))}},Vv=function(e,i){var s=Oi(e),n,a;return!s&&fn(e)&&(n=s=e.radius||Is,e.values?(e=Ms(e.values),(a=!In(e[0]))&&(n*=n)):e=Ku(e.increment)),nr(i,s?ri(e)?function(o){return a=e(o),Math.abs(a-o)<=n?a:o}:function(o){for(var l=parseFloat(a?o.x:o),c=parseFloat(a?o.y:0),u=Is,d=0,f=e.length,p,v;f--;)a?(p=e[f].x-l,v=e[f].y-c,p=p*p+v*v):p=Math.abs(e[f]-l),p<u&&(u=p,d=f);return d=!n||u<=n?e[d]:o,a||d===o||In(o)?d:d+$i(o)}:Ku(e))},jv=function(e,i,s,n){return nr(Oi(e)?!i:s===!0?!!(s=0):!n,function(){return Oi(e)?e[~~(Math.random()*e.length)]:(s=s||1e-5)&&(n=s<1?Math.pow(10,(s+"").length-2):1)&&Math.floor(Math.round((e-s/2+Math.random()*(i-e+s*.99))/s)*s*n)/n})},_2=function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];return function(n){return i.reduce(function(a,o){return o(a)},n)}},g2=function(e,i){return function(s){return e(parseFloat(s))+(i||$i(s))}},y2=function(e,i,s){return qv(e,i,0,1,s)},Gv=function(e,i,s){return nr(s,function(n){return e[~~i(n)]})},b2=function t(e,i,s){var n=i-e;return Oi(e)?Gv(e,t(0,e.length),i):nr(s,function(a){return(n+(a-e)%n)%n+e})},x2=function t(e,i,s){var n=i-e,a=n*2;return Oi(e)?Gv(e,t(0,e.length-1),i):nr(s,function(o){return o=(a+(o-e)%a)%a||0,e+(o>n?a-o:o)})},po=function(e){return e.replace(t2,function(i){var s=i.indexOf("[")+1,n=i.substring(s||7,s?i.indexOf("]"):i.length-1).split(e2);return jv(s?n:+n[0],s?0:+n[1],+n[2]||1e-5)})},qv=function(e,i,s,n,a){var o=i-e,l=n-s;return nr(a,function(c){return s+((c-e)/o*l||0)})},w2=function t(e,i,s,n){var a=isNaN(e+i)?0:function(v){return(1-v)*e+v*i};if(!a){var o=Bi(e),l={},c,u,d,f,p;if(s===!0&&(n=1)&&(s=null),o)e={p:e},i={p:i};else if(Oi(e)&&!Oi(i)){for(d=[],f=e.length,p=f-2,u=1;u<f;u++)d.push(t(e[u-1],e[u]));f--,a=function(g){g*=f;var _=Math.min(p,~~g);return d[_](g-_)},s=i}else n||(e=oa(Oi(e)?[]:{},e));if(!d){for(c in i)Cd.call(l,e,c,"get",i[c]);a=function(g){return Nd(g,l)||(o?e.p:e)}}}return nr(s,a)},cp=function(e,i,s){var n=e.labels,a=Is,o,l,c;for(o in n)l=n[o]-i,l<0==!!s&&l&&a>(l=Math.abs(l))&&(c=o,a=l);return c},_s=function(e,i,s){var n=e.vars,a=n[i],o=We,l=e._ctx,c,u,d;if(a)return c=n[i+"Params"],u=n.callbackScope||e,s&&Wn.length&&Rl(),l&&(We=l),d=c?a.apply(u,c):a.call(u),We=o,d},Ya=function(e){return Zn(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Ti),e.progress()<1&&_s(e,"onInterrupt"),e},Xr,Wv=[],Yv=function(e){if(e)if(e=!e.name&&e.default||e,Ud()||e.headless){var i=e.name,s=ri(e),n=i&&!s&&e.init?function(){this._props=[]}:e,a={init:ho,render:Nd,add:Cd,kill:D2,modifier:N2,rawVars:0},o={targetTest:0,get:0,getSetter:Fd,aliases:{},register:0};if(ua(),e!==n){if(ms[i])return;ws(n,ws(Ll(e,a),o)),oa(n.prototype,oa(a,Ll(e,o))),ms[n.prop=i]=n,e.targetTest&&(xl.push(n),Ad[i]=1),i=(i==="css"?"CSS":i.charAt(0).toUpperCase()+i.substr(1))+"Plugin"}Av(i,n),e.register&&e.register(ns,n,es)}else Wv.push(e)},Ne=255,Ka={aqua:[0,Ne,Ne],lime:[0,Ne,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Ne],navy:[0,0,128],white:[Ne,Ne,Ne],olive:[128,128,0],yellow:[Ne,Ne,0],orange:[Ne,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Ne,0,0],pink:[Ne,192,203],cyan:[0,Ne,Ne],transparent:[Ne,Ne,Ne,0]},uu=function(e,i,s){return e+=e<0?1:e>1?-1:0,(e*6<1?i+(s-i)*e*6:e<.5?s:e*3<2?i+(s-i)*(2/3-e)*6:i)*Ne+.5|0},Kv=function(e,i,s){var n=e?In(e)?[e>>16,e>>8&Ne,e&Ne]:0:Ka.black,a,o,l,c,u,d,f,p,v,g;if(!n){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Ka[e])n=Ka[e];else if(e.charAt(0)==="#"){if(e.length<6&&(a=e.charAt(1),o=e.charAt(2),l=e.charAt(3),e="#"+a+a+o+o+l+l+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return n=parseInt(e.substr(1,6),16),[n>>16,n>>8&Ne,n&Ne,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),n=[e>>16,e>>8&Ne,e&Ne]}else if(e.substr(0,3)==="hsl"){if(n=g=e.match(np),!i)c=+n[0]%360/360,u=+n[1]/100,d=+n[2]/100,o=d<=.5?d*(u+1):d+u-d*u,a=d*2-o,n.length>3&&(n[3]*=1),n[0]=uu(c+1/3,a,o),n[1]=uu(c,a,o),n[2]=uu(c-1/3,a,o);else if(~e.indexOf("="))return n=e.match(Ev),s&&n.length<4&&(n[3]=1),n}else n=e.match(np)||Ka.transparent;n=n.map(Number)}return i&&!g&&(a=n[0]/Ne,o=n[1]/Ne,l=n[2]/Ne,f=Math.max(a,o,l),p=Math.min(a,o,l),d=(f+p)/2,f===p?c=u=0:(v=f-p,u=d>.5?v/(2-f-p):v/(f+p),c=f===a?(o-l)/v+(o<l?6:0):f===o?(l-a)/v+2:(a-o)/v+4,c*=60),n[0]=~~(c+.5),n[1]=~~(u*100+.5),n[2]=~~(d*100+.5)),s&&n.length<4&&(n[3]=1),n},Xv=function(e){var i=[],s=[],n=-1;return e.split(Yn).forEach(function(a){var o=a.match(Kr)||[];i.push.apply(i,o),s.push(n+=o.length+1)}),i.c=s,i},up=function(e,i,s){var n="",a=(e+n).match(Yn),o=i?"hsla(":"rgba(",l=0,c,u,d,f;if(!a)return e;if(a=a.map(function(p){return(p=Kv(p,i,1))&&o+(i?p[0]+","+p[1]+"%,"+p[2]+"%,"+p[3]:p.join(","))+")"}),s&&(d=Xv(e),c=s.c,c.join(n)!==d.c.join(n)))for(u=e.replace(Yn,"1").split(Kr),f=u.length-1;l<f;l++)n+=u[l]+(~c.indexOf(l)?a.shift()||o+"0,0,0,0)":(d.length?d:a.length?a:s).shift());if(!u)for(u=e.split(Yn),f=u.length-1;l<f;l++)n+=u[l]+a[l];return n+u[f]},Yn=(function(){var t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Ka)t+="|"+e+"\\b";return new RegExp(t+")","gi")})(),S2=/hsl[a]?\(/,Jv=function(e){var i=e.join(" "),s;if(Yn.lastIndex=0,Yn.test(i))return s=S2.test(i),e[1]=up(e[1],s),e[0]=up(e[0],s,Xv(e[1])),!0},mo,vs=(function(){var t=Date.now,e=500,i=33,s=t(),n=s,a=1e3/240,o=a,l=[],c,u,d,f,p,v,g=function _(x){var E=t()-n,I=x===!0,z,$,M,V;if((E>e||E<0)&&(s+=E-i),n+=E,M=n-s,z=M-o,(z>0||I)&&(V=++f.frame,p=M-f.time*1e3,f.time=M=M/1e3,o+=z+(z>=a?4:a-z),$=1),I||(c=u(_)),$)for(v=0;v<l.length;v++)l[v](M,p,V,x)};return f={time:0,frame:0,tick:function(){g(!0)},deltaRatio:function(x){return p/(1e3/(x||60))},wake:function(){Tv&&(!Vu&&Ud()&&(rn=Vu=window,Td=rn.document||{},xs.gsap=ns,(rn.gsapVersions||(rn.gsapVersions=[])).push(ns.version),Pv(Dl||rn.GreenSockGlobals||!rn.gsap&&rn||{}),Wv.forEach(Yv)),d=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&f.sleep(),u=d||function(x){return setTimeout(x,o-f.time*1e3+1|0)},mo=1,g(2))},sleep:function(){(d?cancelAnimationFrame:clearTimeout)(c),mo=0,u=ho},lagSmoothing:function(x,E){e=x||1/0,i=Math.min(E||33,e)},fps:function(x){a=1e3/(x||240),o=f.time*1e3+a},add:function(x,E,I){var z=E?function($,M,V,N){x($,M,V,N),f.remove(z)}:x;return f.remove(x),l[I?"unshift":"push"](z),ua(),z},remove:function(x,E){~(E=l.indexOf(x))&&l.splice(E,1)&&v>=E&&v--},_listeners:l},f})(),ua=function(){return!mo&&vs.wake()},ue={},k2=/^[\d.\-M][\d.\-,\s]/,B2=/["']/g,E2=function(e){for(var i={},s=e.substr(1,e.length-3).split(":"),n=s[0],a=1,o=s.length,l,c,u;a<o;a++)c=s[a],l=a!==o-1?c.lastIndexOf(","):c.length,u=c.substr(0,l),i[n]=isNaN(u)?u.replace(B2,"").trim():+u,n=c.substr(l+1).trim();return i},U2=function(e){var i=e.indexOf("(")+1,s=e.indexOf(")"),n=e.indexOf("(",i);return e.substring(i,~n&&n<s?e.indexOf(")",s+1):s)},T2=function(e){var i=(e+"").split("("),s=ue[i[0]];return s&&i.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[E2(i[1])]:U2(e).split(",").map(Cv)):ue._CE&&k2.test(e)?ue._CE("",e):s},P2=function(e){return function(i){return 1-e(1-i)}},Sr=function(e,i){return e&&(ri(e)?e:ue[e]||T2(e))||i},zr=function(e,i,s,n){s===void 0&&(s=function(c){return 1-i(1-c)}),n===void 0&&(n=function(c){return c<.5?i(c*2)/2:1-i((1-c)*2)/2});var a={easeIn:i,easeOut:s,easeInOut:n},o;return ts(e,function(l){ue[l]=xs[l]=a,ue[o=l.toLowerCase()]=s;for(var c in a)ue[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=ue[l+"."+c]=a[c]}),a},Zv=function(e){return function(i){return i<.5?(1-e(1-i*2))/2:.5+e((i-.5)*2)/2}},du=function t(e,i,s){var n=i>=1?i:1,a=(s||(e?.3:.45))/(i<1?i:1),o=a/Hu*(Math.asin(1/n)||0),l=function(d){return d===1?1:n*Math.pow(2,-10*d)*Qw((d-o)*a)+1},c=e==="out"?l:e==="in"?function(u){return 1-l(1-u)}:Zv(l);return a=Hu/a,c.config=function(u,d){return t(e,u,d)},c},fu=function t(e,i){i===void 0&&(i=1.70158);var s=function(o){return o?--o*o*((i+1)*o+i)+1:0},n=e==="out"?s:e==="in"?function(a){return 1-s(1-a)}:Zv(s);return n.config=function(a){return t(e,a)},n};ts("Linear,Quad,Cubic,Quart,Quint,Strong",function(t,e){var i=e<5?e+1:e;zr(t+",Power"+(i-1),e?function(s){return Math.pow(s,i)}:function(s){return s},function(s){return 1-Math.pow(1-s,i)},function(s){return s<.5?Math.pow(s*2,i)/2:1-Math.pow((1-s)*2,i)/2})});ue.Linear.easeNone=ue.none=ue.Linear.easeIn;zr("Elastic",du("in"),du("out"),du());(function(t,e){var i=1/e,s=2*i,n=2.5*i,a=function(l){return l<i?t*l*l:l<s?t*Math.pow(l-1.5/e,2)+.75:l<n?t*(l-=2.25/e)*l+.9375:t*Math.pow(l-2.625/e,2)+.984375};zr("Bounce",function(o){return 1-a(1-o)},a)})(7.5625,2.75);zr("Expo",function(t){return Math.pow(2,10*(t-1))*t+t*t*t*t*t*t*(1-t)});zr("Circ",function(t){return-(kv(1-t*t)-1)});zr("Sine",function(t){return t===1?1:-Zw(t*Xw)+1});zr("Back",fu("in"),fu("out"),fu());ue.SteppedEase=ue.steps=xs.SteppedEase={config:function(e,i){e===void 0&&(e=1);var s=1/e,n=e+(i?0:1),a=i?1:0,o=1-De;return function(l){return((n*Eo(0,o,l)|0)+a)*s}}};uo.ease=ue["quad.out"];ts("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(t){return Id+=t+","+t+"Params,"});var Qv=function(e,i){this.id=Jw++,e._gsap=this,this.target=e,this.harness=i,this.get=i?i.get:Mv,this.set=i?i.getSetter:Fd},vo=(function(){function t(i){this.vars=i,this._delay=+i.delay||0,(this._repeat=i.repeat===1/0?-2:i.repeat||0)&&(this._rDelay=i.repeatDelay||0,this._yoyo=!!i.yoyo||!!i.yoyoEase),this._ts=1,ca(this,+i.duration,1,1),this.data=i.data,We&&(this._ctx=We,We.data.push(this)),mo||vs.wake()}var e=t.prototype;return e.delay=function(s){return s||s===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+s-this._delay),this._delay=s,this):this._delay},e.duration=function(s){return arguments.length?this.totalDuration(this._repeat>0?s+(s+this._rDelay)*this._repeat:s):this.totalDuration()&&this._dur},e.totalDuration=function(s){return arguments.length?(this._dirty=0,ca(this,this._repeat<0?s:(s-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(s,n){if(ua(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(uc(this,s),!a._dp||a.parent||Fv(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&s<this._tDur||this._ts<0&&s>0||!this._tDur&&!s)&&on(this._dp,this,this._start-this._delay)}return(this._tTime!==s||!this._dur&&!n||this._initted&&Math.abs(this._zTime)===De||!this._initted&&this._dur&&s||!s&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=s),zv(this,s,n)),this},e.time=function(s,n){return arguments.length?this.totalTime(Math.min(this.totalDuration(),s+op(this))%(this._dur+this._rDelay)||(s?this._dur:0),n):this._time},e.totalProgress=function(s,n){return arguments.length?this.totalTime(this.totalDuration()*s,n):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(s,n){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-s:s)+op(this),n):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(s,n){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(s-1)*a,n):this._repeat?la(this._tTime,a)+1:1},e.timeScale=function(s,n){if(!arguments.length)return this._rts===-De?0:this._rts;if(this._rts===s)return this;var a=this.parent&&this._ts?Hl(this.parent._time,this):this._tTime;return this._rts=+s||0,this._ts=this._ps||s===-De?0:this._rts,this.totalTime(Eo(-Math.abs(this._delay),this.totalDuration(),a),n!==!1),cc(this),c2(this)},e.paused=function(s){return arguments.length?(this._ps!==s&&(this._ps=s,s?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(ua(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==De&&(this._tTime-=De)))),this):this._ps},e.startTime=function(s){if(arguments.length){this._start=Qe(s);var n=this.parent||this._dp;return n&&(n._sort||!this.parent)&&on(n,this,this._start-this._delay),this}return this._start},e.endTime=function(s){return this._start+(Qi(s)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(s){var n=this.parent||this._dp;return n?s&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Hl(n.rawTime(s),this):this._tTime:this._tTime},e.revert=function(s){s===void 0&&(s=r2);var n=Ti;return Ti=s,zd(this)&&(this.timeline&&this.timeline.revert(s),this.totalTime(-.01,s.suppressEvents)),this.data!=="nested"&&s.kill!==!1&&this.kill(),Ti=n,this},e.globalTime=function(s){for(var n=this,a=arguments.length?s:n.rawTime();n;)a=n._start+a/(Math.abs(n._ts)||1),n=n._dp;return!this.parent&&this._sat?this._sat.globalTime(s):a},e.repeat=function(s){return arguments.length?(this._repeat=s===1/0?-2:s,lp(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(s){if(arguments.length){var n=this._time;return this._rDelay=s,lp(this),n?this.time(n):this}return this._rDelay},e.yoyo=function(s){return arguments.length?(this._yoyo=s,this):this._yoyo},e.seek=function(s,n){return this.totalTime(Ps(this,s),Qi(n))},e.restart=function(s,n){return this.play().totalTime(s?-this._delay:0,Qi(n)),this._dur||(this._zTime=-De),this},e.play=function(s,n){return s!=null&&this.seek(s,n),this.reversed(!1).paused(!1)},e.reverse=function(s,n){return s!=null&&this.seek(s||this.totalDuration(),n),this.reversed(!0).paused(!1)},e.pause=function(s,n){return s!=null&&this.seek(s,n),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(s){return arguments.length?(!!s!==this.reversed()&&this.timeScale(-this._rts||(s?-De:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-De,this},e.isActive=function(){var s=this.parent||this._dp,n=this._start,a;return!!(!s||this._ts&&this._initted&&s.isActive()&&(a=s.rawTime(!0))>=n&&a<this.endTime(!0)-De)},e.eventCallback=function(s,n,a){var o=this.vars;return arguments.length>1?(n?(o[s]=n,a&&(o[s+"Params"]=a),s==="onUpdate"&&(this._onUpdate=n)):delete o[s],this):o[s]},e.then=function(s){var n=this,a=n._prom;return new Promise(function(o){var l=ri(s)?s:$v,c=function(){var d=n.then;n.then=null,a&&a(),ri(l)&&(l=l(n))&&(l.then||l===n)&&(n.then=d),o(l),n.then=d};n._initted&&n.totalProgress()===1&&n._ts>=0||!n._tTime&&n._ts<0?c():n._prom=c})},e.kill=function(){Ya(this)},t})();ws(vo.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-De,_prom:0,_ps:!1,_rts:1});var Xi=(function(t){Sv(e,t);function e(s,n){var a;return s===void 0&&(s={}),a=t.call(this,s)||this,a.labels={},a.smoothChildTiming=!!s.smoothChildTiming,a.autoRemoveChildren=!!s.autoRemoveChildren,a._sort=Qi(s.sortChildren),ti&&on(s.parent||ti,kn(a),n),s.reversed&&a.reverse(),s.paused&&a.paused(!0),s.scrollTrigger&&Nv(kn(a),s.scrollTrigger),a}var i=e.prototype;return i.to=function(n,a,o){return so(0,arguments,this),this},i.from=function(n,a,o){return so(1,arguments,this),this},i.fromTo=function(n,a,o,l){return so(2,arguments,this),this},i.set=function(n,a,o){return a.duration=0,a.parent=this,io(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new pi(n,a,Ps(this,o),1),this},i.call=function(n,a,o){return on(this,pi.delayedCall(0,n,a),o)},i.staggerTo=function(n,a,o,l,c,u,d){return o.duration=a,o.stagger=o.stagger||l,o.onComplete=u,o.onCompleteParams=d,o.parent=this,new pi(n,o,Ps(this,c)),this},i.staggerFrom=function(n,a,o,l,c,u,d){return o.runBackwards=1,io(o).immediateRender=Qi(o.immediateRender),this.staggerTo(n,a,o,l,c,u,d)},i.staggerFromTo=function(n,a,o,l,c,u,d,f){return l.startAt=o,io(l).immediateRender=Qi(l.immediateRender),this.staggerTo(n,a,l,c,u,d,f)},i.render=function(n,a,o){var l=this._time,c=this._dirty?this.totalDuration():this._tDur,u=this._dur,d=n<=0?0:Qe(n),f=this._zTime<0!=n<0&&(this._initted||!u),p,v,g,_,x,E,I,z,$,M,V,N;if(this!==ti&&d>c&&n>=0&&(d=c),d!==this._tTime||o||f){if(l!==this._time&&u&&(d+=this._time-l,n+=this._time-l),p=d,$=this._start,z=this._ts,E=!z,f&&(u||(l=this._zTime),(n||!a)&&(this._zTime=n)),this._repeat){if(V=this._yoyo,x=u+this._rDelay,this._repeat<-1&&n<0)return this.totalTime(x*100+n,a,o);if(p=Qe(d%x),d===c?(_=this._repeat,p=u):(M=Qe(d/x),_=~~M,_&&_===M&&(p=u,_--),p>u&&(p=u)),M=la(this._tTime,x),!l&&this._tTime&&M!==_&&this._tTime-M*x-this._dur<=0&&(M=_),V&&_&1&&(p=u-p,N=1),_!==M&&!this._lock){var H=V&&M&1,T=H===(V&&_&1);if(_<M&&(H=!H),l=H?0:d%u?u:d,this._lock=1,this.render(l||(N?0:Qe(_*x)),a,!u)._lock=0,this._tTime=d,!a&&this.parent&&_s(this,"onRepeat"),this.vars.repeatRefresh&&!N&&(this.invalidate()._lock=1,M=_),l&&l!==this._time||E!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,c=this._tDur,T&&(this._lock=2,l=H?u:-1e-4,this.render(l,!0),this.vars.repeatRefresh&&!N&&this.invalidate()),this._lock=0,!this._ts&&!E)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(I=h2(this,Qe(l),Qe(p)),I&&(d-=p-(p=I._start))),this._tTime=d,this._time=p,this._act=!!z,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=n,l=0),!l&&d&&u&&!a&&!M&&(_s(this,"onStart"),this._tTime!==d))return this;if(p>=l&&n>=0)for(v=this._first;v;){if(g=v._next,(v._act||p>=v._start)&&v._ts&&I!==v){if(v.parent!==this)return this.render(n,a,o);if(v.render(v._ts>0?(p-v._start)*v._ts:(v._dirty?v.totalDuration():v._tDur)+(p-v._start)*v._ts,a,o),p!==this._time||!this._ts&&!E){I=0,g&&(d+=this._zTime=-De);break}}v=g}else{v=this._last;for(var j=n<0?n:p;v;){if(g=v._prev,(v._act||j<=v._end)&&v._ts&&I!==v){if(v.parent!==this)return this.render(n,a,o);if(v.render(v._ts>0?(j-v._start)*v._ts:(v._dirty?v.totalDuration():v._tDur)+(j-v._start)*v._ts,a,o||Ti&&zd(v)),p!==this._time||!this._ts&&!E){I=0,g&&(d+=this._zTime=j?-De:De);break}}v=g}}if(I&&!a&&(this.pause(),I.render(p>=l?0:-De)._zTime=p>=l?1:-1,this._ts))return this._start=$,cc(this),this.render(n,a,o);this._onUpdate&&!a&&_s(this,"onUpdate",!0),(d===c&&this._tTime>=this.totalDuration()||!d&&l)&&($===this._start||Math.abs(z)!==Math.abs(this._ts))&&(this._lock||((n||!u)&&(d===c&&this._ts>0||!d&&this._ts<0)&&Zn(this,1),!a&&!(n<0&&!l)&&(d||l||!c)&&(_s(this,d===c&&n>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(d<c&&this.timeScale()>0)&&this._prom())))}return this},i.add=function(n,a){var o=this;if(In(a)||(a=Ps(this,a,n)),!(n instanceof vo)){if(Oi(n))return n.forEach(function(l){return o.add(l,a)}),this;if(Bi(n))return this.addLabel(n,a);if(ri(n))n=pi.delayedCall(0,n);else return this}return this!==n?on(this,n,a):this},i.getChildren=function(n,a,o,l){n===void 0&&(n=!0),a===void 0&&(a=!0),o===void 0&&(o=!0),l===void 0&&(l=-Is);for(var c=[],u=this._first;u;)u._start>=l&&(u instanceof pi?a&&c.push(u):(o&&c.push(u),n&&c.push.apply(c,u.getChildren(!0,a,o)))),u=u._next;return c},i.getById=function(n){for(var a=this.getChildren(1,1,1),o=a.length;o--;)if(a[o].vars.id===n)return a[o]},i.remove=function(n){return Bi(n)?this.removeLabel(n):ri(n)?this.killTweensOf(n):(n.parent===this&&lc(this,n),n===this._recent&&(this._recent=this._last),wr(this))},i.totalTime=function(n,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Qe(vs.time-(this._ts>0?n/this._ts:(this.totalDuration()-n)/-this._ts))),t.prototype.totalTime.call(this,n,a),this._forcing=0,this):this._tTime},i.addLabel=function(n,a){return this.labels[n]=Ps(this,a),this},i.removeLabel=function(n){return delete this.labels[n],this},i.addPause=function(n,a,o){var l=pi.delayedCall(0,a||ho,o);return l.data="isPause",this._hasPause=1,on(this,l,Ps(this,n))},i.removePause=function(n){var a=this._first;for(n=Ps(this,n);a;)a._start===n&&a.data==="isPause"&&Zn(a),a=a._next},i.killTweensOf=function(n,a,o){for(var l=this.getTweensOf(n,o),c=l.length;c--;)Hn!==l[c]&&l[c].kill(n,a);return this},i.getTweensOf=function(n,a){for(var o=[],l=Ms(n),c=this._first,u=In(a),d;c;)c instanceof pi?a2(c._targets,l)&&(u?(!Hn||c._initted&&c._ts)&&c.globalTime(0)<=a&&c.globalTime(c.totalDuration())>a:!a||c.isActive())&&o.push(c):(d=c.getTweensOf(l,a)).length&&o.push.apply(o,d),c=c._next;return o},i.tweenTo=function(n,a){a=a||{};var o=this,l=Ps(o,n),c=a,u=c.startAt,d=c.onStart,f=c.onStartParams,p=c.immediateRender,v,g=pi.to(o,ws({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:l,overwrite:"auto",duration:a.duration||Math.abs((l-(u&&"time"in u?u.time:o._time))/o.timeScale())||De,onStart:function(){if(o.pause(),!v){var x=a.duration||Math.abs((l-(u&&"time"in u?u.time:o._time))/o.timeScale());g._dur!==x&&ca(g,x,0,1).render(g._time,!0,!0),v=1}d&&d.apply(g,f||[])}},a));return p?g.render(0):g},i.tweenFromTo=function(n,a,o){return this.tweenTo(a,ws({startAt:{time:Ps(this,n)}},o))},i.recent=function(){return this._recent},i.nextLabel=function(n){return n===void 0&&(n=this._time),cp(this,Ps(this,n))},i.previousLabel=function(n){return n===void 0&&(n=this._time),cp(this,Ps(this,n),1)},i.currentLabel=function(n){return arguments.length?this.seek(n,!0):this.previousLabel(this._time+De)},i.shiftChildren=function(n,a,o){o===void 0&&(o=0);var l=this._first,c=this.labels,u;for(n=Qe(n);l;)l._start>=o&&(l._start+=n,l._end+=n),l=l._next;if(a)for(u in c)c[u]>=o&&(c[u]+=n);return wr(this)},i.invalidate=function(n){var a=this._first;for(this._lock=0;a;)a.invalidate(n),a=a._next;return t.prototype.invalidate.call(this,n)},i.clear=function(n){n===void 0&&(n=!0);for(var a=this._first,o;a;)o=a._next,this.remove(a),a=o;return this._dp&&(this._time=this._tTime=this._pTime=0),n&&(this.labels={}),wr(this)},i.totalDuration=function(n){var a=0,o=this,l=o._last,c=Is,u,d,f;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-n:n));if(o._dirty){for(f=o.parent;l;)u=l._prev,l._dirty&&l.totalDuration(),d=l._start,d>c&&o._sort&&l._ts&&!o._lock?(o._lock=1,on(o,l,d-l._delay,1)._lock=0):c=d,d<0&&l._ts&&(a-=d,(!f&&!o._dp||f&&f.smoothChildTiming)&&(o._start+=Qe(d/o._ts),o._time-=d,o._tTime-=d),o.shiftChildren(-d,!1,-1/0),c=0),l._end>a&&l._ts&&(a=l._end),l=u;ca(o,o===ti&&o._time>a?o._time:a,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(n){if(ti._ts&&(zv(ti,Hl(n,ti)),Iv=vs.frame),vs.frame>=rp){rp+=bs.autoSleep||120;var a=ti._first;if((!a||!a._ts)&&bs.autoSleep&&vs._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||vs.sleep()}}},e})(vo);ws(Xi.prototype,{_lock:0,_hasPause:0,_forcing:0});var A2=function(e,i,s,n,a,o,l){var c=new es(this._pt,e,i,0,1,r_,null,a),u=0,d=0,f,p,v,g,_,x,E,I;for(c.b=s,c.e=n,s+="",n+="",(E=~n.indexOf("random("))&&(n=po(n)),o&&(I=[s,n],o(I,e,i),s=I[0],n=I[1]),p=s.match(lu)||[];f=lu.exec(n);)g=f[0],_=n.substring(u,f.index),v?v=(v+1)%5:_.substr(-5)==="rgba("&&(v=1),g!==p[d++]&&(x=parseFloat(p[d-1])||0,c._pt={_next:c._pt,p:_||d===1?_:",",s:x,c:g.charAt(1)==="="?Zr(x,g)-x:parseFloat(g)-x,m:v&&v<4?Math.round:0},u=lu.lastIndex);return c.c=u<n.length?n.substring(u,n.length):"",c.fp=l,(Uv.test(n)||E)&&(c.e=0),this._pt=c,c},Cd=function(e,i,s,n,a,o,l,c,u,d){ri(n)&&(n=n(a||0,e,o));var f=e[i],p=s!=="get"?s:ri(f)?u?e[i.indexOf("set")||!ri(e["get"+i.substr(3)])?i:"get"+i.substr(3)](u):e[i]():f,v=ri(f)?u?$2:s_:Od,g;if(Bi(n)&&(~n.indexOf("random(")&&(n=po(n)),n.charAt(1)==="="&&(g=Zr(p,n)+($i(p)||0),(g||g===0)&&(n=g))),!d||p!==n||Xu)return!isNaN(p*n)&&n!==""?(g=new es(this._pt,e,i,+p||0,n-(p||0),typeof f=="boolean"?F2:n_,0,v),u&&(g.fp=u),l&&g.modifier(l,this,e),this._pt=g):(!f&&!(i in e)&&Pd(i,n),A2.call(this,e,i,p,n,v,c||bs.stringFilter,u))},I2=function(e,i,s,n,a){if(ri(e)&&(e=no(e,a,i,s,n)),!fn(e)||e.style&&e.nodeType||Oi(e)||Bv(e))return Bi(e)?no(e,a,i,s,n):e;var o={},l;for(l in e)o[l]=no(e[l],a,i,s,n);return o},t_=function(e,i,s,n,a,o){var l,c,u,d;if(ms[e]&&(l=new ms[e]).init(a,l.rawVars?i[e]:I2(i[e],n,a,o,s),s,n,o)!==!1&&(s._pt=c=new es(s._pt,a,e,0,1,l.render,l,0,l.priority),s!==Xr))for(u=s._ptLookup[s._targets.indexOf(a)],d=l._props.length;d--;)u[l._props[d]]=c;return l},Hn,Xu,$d=function t(e,i,s){var n=e.vars,a=n.ease,o=n.startAt,l=n.immediateRender,c=n.lazy,u=n.onUpdate,d=n.runBackwards,f=n.yoyoEase,p=n.keyframes,v=n.autoRevert,g=e._dur,_=e._startAt,x=e._targets,E=e.parent,I=E&&E.data==="nested"?E.vars.targets:x,z=e._overwrite==="auto"&&!Bd,$=e.timeline,M=n.easeReverse||f,V,N,H,T,j,St,yt,ht,vt,F,C,Lt,xt;if($&&(!p||!a)&&(a="none"),e._ease=Sr(a,uo.ease),e._rEase=M&&(Sr(M)||e._ease),e._from=!$&&!!n.runBackwards,e._from&&(e.ratio=1),!$||p&&!n.stagger){if(ht=x[0]?xr(x[0]).harness:0,Lt=ht&&n[ht.prop],V=Ll(n,Ad),_&&(_._zTime<0&&_.progress(1),i<0&&d&&l&&!v?_.render(-1,!0):_.revert(d&&g?bl:n2),_._lazy=0),o){if(Zn(e._startAt=pi.set(x,ws({data:"isStart",overwrite:!1,parent:E,immediateRender:!0,lazy:!_&&Qi(c),startAt:null,delay:0,onUpdate:u&&function(){return _s(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,i<0&&(Ti||!l&&!v)&&e._startAt.revert(bl),l&&g&&i<=0&&s<=0){i&&(e._zTime=i);return}}else if(d&&g&&!_){if(i&&(l=!1),H=ws({overwrite:!1,data:"isFromStart",lazy:l&&!_&&Qi(c),immediateRender:l,stagger:0,parent:E},V),Lt&&(H[ht.prop]=Lt),Zn(e._startAt=pi.set(x,H)),e._startAt._dp=0,e._startAt._sat=e,i<0&&(Ti?e._startAt.revert(bl):e._startAt.render(-1,!0)),e._zTime=i,!l)t(e._startAt,De,De);else if(!i)return}for(e._pt=e._ptCache=0,c=g&&Qi(c)||c&&!g,N=0;N<x.length;N++){if(j=x[N],yt=j._gsap||Md(x)[N]._gsap,e._ptLookup[N]=F={},ju[yt.id]&&Wn.length&&Rl(),C=I===x?N:I.indexOf(j),ht&&(vt=new ht).init(j,Lt||V,e,C,I)!==!1&&(e._pt=T=new es(e._pt,j,vt.name,0,1,vt.render,vt,0,vt.priority),vt._props.forEach(function(He){F[He]=T}),vt.priority&&(St=1)),!ht||Lt)for(H in V)ms[H]&&(vt=t_(H,V,e,C,j,I))?vt.priority&&(St=1):F[H]=T=Cd.call(e,j,H,"get",V[H],C,I,0,n.stringFilter);e._op&&e._op[N]&&e.kill(j,e._op[N]),z&&e._pt&&(Hn=e,ti.killTweensOf(j,F,e.globalTime(i)),xt=!e.parent,Hn=0),e._pt&&c&&(ju[yt.id]=1)}St&&a_(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!xt,p&&i<=0&&$.render(Is,!0,!0)},M2=function(e,i,s,n,a,o,l,c){var u=(e._pt&&e._ptCache||(e._ptCache={}))[i],d,f,p,v;if(!u)for(u=e._ptCache[i]=[],p=e._ptLookup,v=e._targets.length;v--;){if(d=p[v][i],d&&d.d&&d.d._pt)for(d=d.d._pt;d&&d.p!==i&&d.fp!==i;)d=d._next;if(!d)return Xu=1,e.vars[i]="+=0",$d(e,l),Xu=0,c?fo(i+" not eligible for reset. Try splitting into individual properties"):1;u.push(d)}for(v=u.length;v--;)f=u[v],d=f._pt||f,d.s=(n||n===0)&&!a?n:d.s+(n||0)+o*d.c,d.c=s-d.s,f.e&&(f.e=ui(s)+$i(f.e)),f.b&&(f.b=d.s+$i(f.b))},z2=function(e,i){var s=e[0]?xr(e[0]).harness:0,n=s&&s.aliases,a,o,l,c;if(!n)return i;a=oa({},i);for(o in n)if(o in a)for(c=n[o].split(","),l=c.length;l--;)a[c[l]]=a[o];return a},C2=function(e,i,s,n){var a=i.ease||n||"power1.inOut",o,l;if(Oi(i))l=s[e]||(s[e]=[]),i.forEach(function(c,u){return l.push({t:u/(i.length-1)*100,v:c,e:a})});else for(o in i)l=s[o]||(s[o]=[]),o==="ease"||l.push({t:parseFloat(e),v:i[o],e:a})},no=function(e,i,s,n,a){return ri(e)?e.call(i,s,n,a):Bi(e)&&~e.indexOf("random(")?po(e):e},e_=Id+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",i_={};ts(e_+",id,stagger,delay,duration,paused,scrollTrigger",function(t){return i_[t]=1});var pi=(function(t){Sv(e,t);function e(s,n,a,o){var l;typeof n=="number"&&(a.duration=n,n=a,a=null),l=t.call(this,o?n:io(n))||this;var c=l.vars,u=c.duration,d=c.delay,f=c.immediateRender,p=c.stagger,v=c.overwrite,g=c.keyframes,_=c.defaults,x=c.scrollTrigger,E=n.parent||ti,I=(Oi(s)||Bv(s)?In(s[0]):"length"in n)?[s]:Ms(s),z,$,M,V,N,H,T,j;if(l._targets=I.length?Md(I):fo("GSAP target "+s+" not found. https://gsap.com",!bs.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=v,g||p||ll(u)||ll(d)){n=l.vars;var St=n.easeReverse||n.yoyoEase;if(z=l.timeline=new Xi({data:"nested",defaults:_||{},targets:E&&E.data==="nested"?E.vars.targets:I}),z.kill(),z.parent=z._dp=kn(l),z._start=0,p||ll(u)||ll(d)){if(V=I.length,T=p&&Hv(p),fn(p))for(N in p)~e_.indexOf(N)&&(j||(j={}),j[N]=p[N]);for($=0;$<V;$++)M=Ll(n,i_),M.stagger=0,St&&(M.easeReverse=St),j&&oa(M,j),H=I[$],M.duration=+no(u,kn(l),$,H,I),M.delay=(+no(d,kn(l),$,H,I)||0)-l._delay,!p&&V===1&&M.delay&&(l._delay=d=M.delay,l._start+=d,M.delay=0),z.to(H,M,T?T($,H,I):0),z._ease=ue.none;z.duration()?u=d=0:l.timeline=0}else if(g){io(ws(z.vars.defaults,{ease:"none"})),z._ease=Sr(g.ease||n.ease||"none");var yt=0,ht,vt,F;if(Oi(g))g.forEach(function(C){return z.to(I,C,">")}),z.duration();else{M={};for(N in g)N==="ease"||N==="easeEach"||C2(N,g[N],M,g.easeEach);for(N in M)for(ht=M[N].sort(function(C,Lt){return C.t-Lt.t}),yt=0,$=0;$<ht.length;$++)vt=ht[$],F={ease:vt.e,duration:(vt.t-($?ht[$-1].t:0))/100*u},F[N]=vt.v,z.to(I,F,yt),yt+=F.duration;z.duration()<u&&z.to({},{duration:u-z.duration()})}}u||l.duration(u=z.duration())}else l.timeline=0;return v===!0&&!Bd&&(Hn=kn(l),ti.killTweensOf(I),Hn=0),on(E,kn(l),a),n.reversed&&l.reverse(),n.paused&&l.paused(!0),(f||!u&&!g&&l._start===Qe(E._time)&&Qi(f)&&u2(kn(l))&&E.data!=="nested")&&(l._tTime=-De,l.render(Math.max(0,-d)||0)),x&&Nv(kn(l),x),l}var i=e.prototype;return i.render=function(n,a,o){var l=this._time,c=this._tDur,u=this._dur,d=n<0,f=n>c-De&&!d?c:n<De?0:n,p,v,g,_,x,E,I,z;if(!u)f2(this,n,a,o);else if(f!==this._tTime||!n||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==d||this._lazy){if(p=f,z=this.timeline,this._repeat){if(_=u+this._rDelay,this._repeat<-1&&d)return this.totalTime(_*100+n,a,o);if(p=Qe(f%_),f===c?(g=this._repeat,p=u):(x=Qe(f/_),g=~~x,g&&g===x?(p=u,g--):p>u&&(p=u)),E=this._yoyo&&g&1,E&&(p=u-p),x=la(this._tTime,_),p===l&&!o&&this._initted&&g===x)return this._tTime=f,this;g!==x&&this.vars.repeatRefresh&&!E&&!this._lock&&p!==_&&this._initted&&(this._lock=o=1,this.render(Qe(_*g),!0).invalidate()._lock=0)}if(!this._initted){if(Dv(this,d?n:p,o,a,f))return this._tTime=0,this;if(l!==this._time&&!(o&&this.vars.repeatRefresh&&g!==x))return this;if(u!==this._dur)return this.render(n,a,o)}if(this._rEase){var $=p<l;if($!==this._inv){var M=$?l:u-l;this._inv=$,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=l,this._invRecip=M?($?-1:1)/M:0,this._invScale=$?-this.ratio:1-this.ratio,this._invEase=$?this._rEase:this._ease}this.ratio=I=this._invRatio+this._invScale*this._invEase((p-this._invTime)*this._invRecip)}else this.ratio=I=this._ease(p/u);if(this._from&&(this.ratio=I=1-I),this._tTime=f,this._time=p,!this._act&&this._ts&&(this._act=1,this._lazy=0),!l&&f&&!a&&!x&&(_s(this,"onStart"),this._tTime!==f))return this;for(v=this._pt;v;)v.r(I,v.d),v=v._next;z&&z.render(n<0?n:z._dur*z._ease(p/this._dur),a,o)||this._startAt&&(this._zTime=n),this._onUpdate&&!a&&(d&&Gu(this,n,a,o),_s(this,"onUpdate")),this._repeat&&g!==x&&this.vars.onRepeat&&!a&&this.parent&&_s(this,"onRepeat"),(f===this._tDur||!f)&&this._tTime===f&&(d&&!this._onUpdate&&Gu(this,n,!0,!0),(n||!u)&&(f===this._tDur&&this._ts>0||!f&&this._ts<0)&&Zn(this,1),!a&&!(d&&!l)&&(f||l||E)&&(_s(this,f===c?"onComplete":"onReverseComplete",!0),this._prom&&!(f<c&&this.timeScale()>0)&&this._prom()))}return this},i.targets=function(){return this._targets},i.invalidate=function(n){return(!n||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(n),t.prototype.invalidate.call(this,n)},i.resetTo=function(n,a,o,l,c){mo||vs.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),d;return this._initted||$d(this,u),d=this._ease(u/this._dur),M2(this,n,a,o,l,d,u,c)?this.resetTo(n,a,o,l,1):(uc(this,0),this.parent||Ov(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},i.kill=function(n,a){if(a===void 0&&(a="all"),!n&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?Ya(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Ti),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(n,a,Hn&&Hn.vars.overwrite!==!0)._first||Ya(this),this.parent&&o!==this.timeline.totalDuration()&&ca(this,this._dur*this.timeline._tDur/o,0,1),this}var l=this._targets,c=n?Ms(n):l,u=this._ptLookup,d=this._pt,f,p,v,g,_,x,E;if((!a||a==="all")&&l2(l,c))return a==="all"&&(this._pt=0),Ya(this);for(f=this._op=this._op||[],a!=="all"&&(Bi(a)&&(_={},ts(a,function(I){return _[I]=1}),a=_),a=z2(l,a)),E=l.length;E--;)if(~c.indexOf(l[E])){p=u[E],a==="all"?(f[E]=a,g=p,v={}):(v=f[E]=f[E]||{},g=a);for(_ in g)x=p&&p[_],x&&((!("kill"in x.d)||x.d.kill(_)===!0)&&lc(this,x,"_pt"),delete p[_]),v!=="all"&&(v[_]=1)}return this._initted&&!this._pt&&d&&Ya(this),this},e.to=function(n,a){return new e(n,a,arguments[2])},e.from=function(n,a){return so(1,arguments)},e.delayedCall=function(n,a,o,l){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:n,onComplete:a,onReverseComplete:a,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:l})},e.fromTo=function(n,a,o){return so(2,arguments)},e.set=function(n,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(n,a)},e.killTweensOf=function(n,a,o){return ti.killTweensOf(n,a,o)},e})(vo);ws(pi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ts("staggerTo,staggerFrom,staggerFromTo",function(t){pi[t]=function(){var e=new Xi,i=Wu.call(arguments,0);return i.splice(t==="staggerFromTo"?5:4,0,0),e[t].apply(e,i)}});var Od=function(e,i,s){return e[i]=s},s_=function(e,i,s){return e[i](s)},$2=function(e,i,s,n){return e[i](n.fp,s)},O2=function(e,i,s){return e.setAttribute(i,s)},Fd=function(e,i){return ri(e[i])?s_:Ed(e[i])&&e.setAttribute?O2:Od},n_=function(e,i){return i.set(i.t,i.p,Math.round((i.s+i.c*e)*1e6)/1e6,i)},F2=function(e,i){return i.set(i.t,i.p,!!(i.s+i.c*e),i)},r_=function(e,i){var s=i._pt,n="";if(!e&&i.b)n=i.b;else if(e===1&&i.e)n=i.e;else{for(;s;)n=s.p+(s.m?s.m(s.s+s.c*e):Math.round((s.s+s.c*e)*1e4)/1e4)+n,s=s._next;n+=i.c}i.set(i.t,i.p,n,i)},Nd=function(e,i){for(var s=i._pt;s;)s.r(e,s.d),s=s._next},N2=function(e,i,s,n){for(var a=this._pt,o;a;)o=a._next,a.p===n&&a.modifier(e,i,s),a=o},D2=function(e){for(var i=this._pt,s,n;i;)n=i._next,i.p===e&&!i.op||i.op===e?lc(this,i,"_pt"):i.dep||(s=1),i=n;return!s},R2=function(e,i,s,n){n.mSet(e,i,n.m.call(n.tween,s,n.mt),n)},a_=function(e){for(var i=e._pt,s,n,a,o;i;){for(s=i._next,n=a;n&&n.pr>i.pr;)n=n._next;(i._prev=n?n._prev:o)?i._prev._next=i:a=i,(i._next=n)?n._prev=i:o=i,i=s}e._pt=a},es=(function(){function t(i,s,n,a,o,l,c,u,d){this.t=s,this.s=a,this.c=o,this.p=n,this.r=l||n_,this.d=c||this,this.set=u||Od,this.pr=d||0,this._next=i,i&&(i._prev=this)}var e=t.prototype;return e.modifier=function(s,n,a){this.mSet=this.mSet||this.set,this.set=R2,this.m=s,this.mt=a,this.tween=n},t})();ts(Id+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(t){return Ad[t]=1});xs.TweenMax=xs.TweenLite=pi;xs.TimelineLite=xs.TimelineMax=Xi;ti=new Xi({sortChildren:!1,defaults:uo,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});bs.stringFilter=Jv;var kr=[],wl={},L2=[],dp=0,H2=0,hu=function(e){return(wl[e]||L2).map(function(i){return i()})},Ju=function(){var e=Date.now(),i=[];e-dp>2&&(hu("matchMediaInit"),kr.forEach(function(s){var n=s.queries,a=s.conditions,o,l,c,u;for(l in n)o=rn.matchMedia(n[l]).matches,o&&(c=1),o!==a[l]&&(a[l]=o,u=1);u&&(s.revert(),c&&i.push(s))}),hu("matchMediaRevert"),i.forEach(function(s){return s.onMatch(s,function(n){return s.add(null,n)})}),dp=e,hu("matchMedia"))},o_=(function(){function t(i,s){this.selector=s&&Yu(s),this.data=[],this._r=[],this.isReverted=!1,this.id=H2++,i&&this.add(i)}var e=t.prototype;return e.add=function(s,n,a){ri(s)&&(a=n,n=s,s=ri);var o=this,l=function(){var u=We,d=o.selector,f;return u&&u!==o&&u.data.push(o),a&&(o.selector=Yu(a)),We=o,f=n.apply(o,arguments),ri(f)&&o._r.push(f),We=u,o.selector=d,o.isReverted=!1,f};return o.last=l,s===ri?l(o,function(c){return o.add(null,c)}):s?o[s]=l:l},e.ignore=function(s){var n=We;We=null,s(this),We=n},e.getTweens=function(){var s=[];return this.data.forEach(function(n){return n instanceof t?s.push.apply(s,n.getTweens()):n instanceof pi&&!(n.parent&&n.parent.data==="nested")&&s.push(n)}),s},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(s,n){var a=this;if(s?(function(){for(var l=a.getTweens(),c=a.data.length,u;c--;)u=a.data[c],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(d){return l.splice(l.indexOf(d),1)}));for(l.map(function(d){return{g:d._dur||d._delay||d._sat&&!d._sat.vars.immediateRender?d.globalTime(0):-1/0,t:d}}).sort(function(d,f){return f.g-d.g||-1/0}).forEach(function(d){return d.t.revert(s)}),c=a.data.length;c--;)u=a.data[c],u instanceof Xi?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof pi)&&u.revert&&u.revert(s);a._r.forEach(function(d){return d(s,a)}),a.isReverted=!0})():this.data.forEach(function(l){return l.kill&&l.kill()}),this.clear(),n)for(var o=kr.length;o--;)kr[o].id===this.id&&kr.splice(o,1)},e.revert=function(s){this.kill(s||{})},t})(),V2=(function(){function t(i){this.contexts=[],this.scope=i,We&&We.data.push(this)}var e=t.prototype;return e.add=function(s,n,a){fn(s)||(s={matches:s});var o=new o_(0,a||this.scope),l=o.conditions={},c,u,d;We&&!o.selector&&(o.selector=We.selector),this.contexts.push(o),n=o.add("onMatch",n),o.queries=s;for(u in s)u==="all"?d=1:(c=rn.matchMedia(s[u]),c&&(kr.indexOf(o)<0&&kr.push(o),(l[u]=c.matches)&&(d=1),c.addListener?c.addListener(Ju):c.addEventListener("change",Ju)));return d&&n(o,function(f){return o.add(null,f)}),this},e.revert=function(s){this.kill(s||{})},e.kill=function(s){this.contexts.forEach(function(n){return n.kill(s,!0)})},t})(),Vl={registerPlugin:function(){for(var e=arguments.length,i=new Array(e),s=0;s<e;s++)i[s]=arguments[s];i.forEach(function(n){return Yv(n)})},timeline:function(e){return new Xi(e)},getTweensOf:function(e,i){return ti.getTweensOf(e,i)},getProperty:function(e,i,s,n){Bi(e)&&(e=Ms(e)[0]);var a=xr(e||{}).get,o=s?$v:Cv;return s==="native"&&(s=""),e&&(i?o((ms[i]&&ms[i].get||a)(e,i,s,n)):function(l,c,u){return o((ms[l]&&ms[l].get||a)(e,l,c,u))})},quickSetter:function(e,i,s){if(e=Ms(e),e.length>1){var n=e.map(function(d){return ns.quickSetter(d,i,s)}),a=n.length;return function(d){for(var f=a;f--;)n[f](d)}}e=e[0]||{};var o=ms[i],l=xr(e),c=l.harness&&(l.harness.aliases||{})[i]||i,u=o?function(d){var f=new o;Xr._pt=0,f.init(e,s?d+s:d,Xr,0,[e]),f.render(1,f),Xr._pt&&Nd(1,Xr)}:l.set(e,c);return o?u:function(d){return u(e,c,s?d+s:d,l,1)}},quickTo:function(e,i,s){var n,a=ns.to(e,ws((n={},n[i]="+=0.1",n.paused=!0,n.stagger=0,n),s||{})),o=function(c,u,d){return a.resetTo(i,c,u,d)};return o.tween=a,o},isTweening:function(e){return ti.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Sr(e.ease,uo.ease)),ap(uo,e||{})},config:function(e){return ap(bs,e||{})},registerEffect:function(e){var i=e.name,s=e.effect,n=e.plugins,a=e.defaults,o=e.extendTimeline;(n||"").split(",").forEach(function(l){return l&&!ms[l]&&!xs[l]&&fo(i+" effect requires "+l+" plugin.")}),cu[i]=function(l,c,u){return s(Ms(l),ws(c||{},a),u)},o&&(Xi.prototype[i]=function(l,c,u){return this.add(cu[i](l,fn(c)?c:(u=c)&&{},this),u)})},registerEase:function(e,i){ue[e]=Sr(i)},parseEase:function(e,i){return arguments.length?Sr(e,i):ue},getById:function(e){return ti.getById(e)},exportRoot:function(e,i){e===void 0&&(e={});var s=new Xi(e),n,a;for(s.smoothChildTiming=Qi(e.smoothChildTiming),ti.remove(s),s._dp=0,s._time=s._tTime=ti._time,n=ti._first;n;)a=n._next,(i||!(!n._dur&&n instanceof pi&&n.vars.onComplete===n._targets[0]))&&on(s,n,n._start-n._delay),n=a;return on(ti,s,0),s},context:function(e,i){return e?new o_(e,i):We},matchMedia:function(e){return new V2(e)},matchMediaRefresh:function(){return kr.forEach(function(e){var i=e.conditions,s,n;for(n in i)i[n]&&(i[n]=!1,s=1);s&&e.revert()})||Ju()},addEventListener:function(e,i){var s=wl[e]||(wl[e]=[]);~s.indexOf(i)||s.push(i)},removeEventListener:function(e,i){var s=wl[e],n=s&&s.indexOf(i);n>=0&&s.splice(n,1)},utils:{wrap:b2,wrapYoyo:x2,distribute:Hv,random:jv,snap:Vv,normalize:y2,getUnit:$i,clamp:m2,splitColor:Kv,toArray:Ms,selector:Yu,mapRange:qv,pipe:_2,unitize:g2,interpolate:w2,shuffle:Lv},install:Pv,effects:cu,ticker:vs,updateRoot:Xi.updateRoot,plugins:ms,globalTimeline:ti,core:{PropTween:es,globals:Av,Tween:pi,Timeline:Xi,Animation:vo,getCache:xr,_removeLinkedListItem:lc,reverting:function(){return Ti},context:function(e){return e&&We&&(We.data.push(e),e._ctx=We),We},suppressOverwrites:function(e){return Bd=e}}};ts("to,from,fromTo,delayedCall,set,killTweensOf",function(t){return Vl[t]=pi[t]});vs.add(Xi.updateRoot);Xr=Vl.to({},{duration:0});var j2=function(e,i){for(var s=e._pt;s&&s.p!==i&&s.op!==i&&s.fp!==i;)s=s._next;return s},G2=function(e,i){var s=e._targets,n,a,o;for(n in i)for(a=s.length;a--;)o=e._ptLookup[a][n],o&&(o=o.d)&&(o._pt&&(o=j2(o,n)),o&&o.modifier&&o.modifier(i[n],e,s[a],n))},pu=function(e,i){return{name:e,headless:1,rawVars:1,init:function(n,a,o){o._onInit=function(l){var c,u;if(Bi(a)&&(c={},ts(a,function(d){return c[d]=1}),a=c),i){c={};for(u in a)c[u]=i(a[u]);a=c}G2(l,a)}}}},ns=Vl.registerPlugin({name:"attr",init:function(e,i,s,n,a){var o,l,c;this.tween=s;for(o in i)c=e.getAttribute(o)||"",l=this.add(e,"setAttribute",(c||0)+"",i[o],n,a,0,0,o),l.op=o,l.b=c,this._props.push(o)},render:function(e,i){for(var s=i._pt;s;)Ti?s.set(s.t,s.p,s.b,s):s.r(e,s.d),s=s._next}},{name:"endArray",headless:1,init:function(e,i){for(var s=i.length;s--;)this.add(e,s,e[s]||0,i[s],0,0,0,0,0,1)}},pu("roundProps",Ku),pu("modifiers"),pu("snap",Vv))||Vl;pi.version=Xi.version=ns.version="3.15.0";Tv=1;Ud()&&ua();ue.Power0;ue.Power1;ue.Power2;ue.Power3;ue.Power4;ue.Linear;ue.Quad;ue.Cubic;ue.Quart;ue.Quint;ue.Strong;ue.Elastic;ue.Back;ue.SteppedEase;ue.Bounce;ue.Sine;ue.Expo;ue.Circ;/*!
2364
- * CSSPlugin 3.15.0
2365
- * https://gsap.com
2366
- *
2367
- * Copyright 2008-2026, GreenSock. All rights reserved.
2368
- * Subject to the terms at https://gsap.com/standard-license
2369
- * @author: Jack Doyle, jack@greensock.com
2370
- */var fp,Vn,Qr,Dd,vr,hp,Rd,q2=function(){return typeof window<"u"},Mn={},hr=180/Math.PI,ta=Math.PI/180,Vr=Math.atan2,pp=1e8,Ld=/([A-Z])/g,W2=/(left|right|width|margin|padding|x)/i,Y2=/[\s,\(]\S/,cn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Zu=function(e,i){return i.set(i.t,i.p,Math.round((i.s+i.c*e)*1e4)/1e4+i.u,i)},K2=function(e,i){return i.set(i.t,i.p,e===1?i.e:Math.round((i.s+i.c*e)*1e4)/1e4+i.u,i)},X2=function(e,i){return i.set(i.t,i.p,e?Math.round((i.s+i.c*e)*1e4)/1e4+i.u:i.b,i)},J2=function(e,i){return i.set(i.t,i.p,e===1?i.e:e?Math.round((i.s+i.c*e)*1e4)/1e4+i.u:i.b,i)},Z2=function(e,i){var s=i.s+i.c*e;i.set(i.t,i.p,~~(s+(s<0?-.5:.5))+i.u,i)},l_=function(e,i){return i.set(i.t,i.p,e?i.e:i.b,i)},c_=function(e,i){return i.set(i.t,i.p,e!==1?i.b:i.e,i)},Q2=function(e,i,s){return e.style[i]=s},tS=function(e,i,s){return e.style.setProperty(i,s)},eS=function(e,i,s){return e._gsap[i]=s},iS=function(e,i,s){return e._gsap.scaleX=e._gsap.scaleY=s},sS=function(e,i,s,n,a){var o=e._gsap;o.scaleX=o.scaleY=s,o.renderTransform(a,o)},nS=function(e,i,s,n,a){var o=e._gsap;o[i]=s,o.renderTransform(a,o)},ei="transform",is=ei+"Origin",rS=function t(e,i){var s=this,n=this.target,a=n.style,o=n._gsap;if(e in Mn&&a){if(this.tfm=this.tfm||{},e!=="transform")e=cn[e]||e,~e.indexOf(",")?e.split(",").forEach(function(l){return s.tfm[l]=Bn(n,l)}):this.tfm[e]=o.x?o[e]:Bn(n,e),e===is&&(this.tfm.zOrigin=o.zOrigin);else return cn.transform.split(",").forEach(function(l){return t.call(s,l,i)});if(this.props.indexOf(ei)>=0)return;o.svg&&(this.svgo=n.getAttribute("data-svg-origin"),this.props.push(is,i,"")),e=ei}(a||i)&&this.props.push(e,i,a[e])},u_=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},aS=function(){var e=this.props,i=this.target,s=i.style,n=i._gsap,a,o;for(a=0;a<e.length;a+=3)e[a+1]?e[a+1]===2?i[e[a]](e[a+2]):i[e[a]]=e[a+2]:e[a+2]?s[e[a]]=e[a+2]:s.removeProperty(e[a].substr(0,2)==="--"?e[a]:e[a].replace(Ld,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)n[o]=this.tfm[o];n.svg&&(n.renderTransform(),i.setAttribute("data-svg-origin",this.svgo||"")),a=Rd(),(!a||!a.isStart)&&!s[ei]&&(u_(s),n.zOrigin&&s[is]&&(s[is]+=" "+n.zOrigin+"px",n.zOrigin=0,n.renderTransform()),n.uncache=1)}},d_=function(e,i){var s={target:e,props:[],revert:aS,save:rS};return e._gsap||ns.core.getCache(e),i&&e.style&&e.nodeType&&i.split(",").forEach(function(n){return s.save(n)}),s},f_,Qu=function(e,i){var s=Vn.createElementNS?Vn.createElementNS((i||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Vn.createElement(e);return s&&s.style?s:Vn.createElement(e)},gs=function t(e,i,s){var n=getComputedStyle(e);return n[i]||n.getPropertyValue(i.replace(Ld,"-$1").toLowerCase())||n.getPropertyValue(i)||!s&&t(e,da(i)||i,1)||""},mp="O,Moz,ms,Ms,Webkit".split(","),da=function(e,i,s){var n=i||vr,a=n.style,o=5;if(e in a&&!s)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(mp[o]+e in a););return o<0?null:(o===3?"ms":o>=0?mp[o]:"")+e},td=function(){q2()&&window.document&&(fp=window,Vn=fp.document,Qr=Vn.documentElement,vr=Qu("div")||{style:{}},Qu("div"),ei=da(ei),is=ei+"Origin",vr.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",f_=!!da("perspective"),Rd=ns.core.reverting,Dd=1)},vp=function(e){var i=e.ownerSVGElement,s=Qu("svg",i&&i.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),n=e.cloneNode(!0),a;n.style.display="block",s.appendChild(n),Qr.appendChild(s);try{a=n.getBBox()}catch{}return s.removeChild(n),Qr.removeChild(s),a},_p=function(e,i){for(var s=i.length;s--;)if(e.hasAttribute(i[s]))return e.getAttribute(i[s])},h_=function(e){var i,s;try{i=e.getBBox()}catch{i=vp(e),s=1}return i&&(i.width||i.height)||s||(i=vp(e)),i&&!i.width&&!i.x&&!i.y?{x:+_p(e,["x","cx","x1"])||0,y:+_p(e,["y","cy","y1"])||0,width:0,height:0}:i},p_=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&h_(e))},Qn=function(e,i){if(i){var s=e.style,n;i in Mn&&i!==is&&(i=ei),s.removeProperty?(n=i.substr(0,2),(n==="ms"||i.substr(0,6)==="webkit")&&(i="-"+i),s.removeProperty(n==="--"?i:i.replace(Ld,"-$1").toLowerCase())):s.removeAttribute(i)}},jn=function(e,i,s,n,a,o){var l=new es(e._pt,i,s,0,1,o?c_:l_);return e._pt=l,l.b=n,l.e=a,e._props.push(s),l},gp={deg:1,rad:1,turn:1},oS={grid:1,flex:1},tr=function t(e,i,s,n){var a=parseFloat(s)||0,o=(s+"").trim().substr((a+"").length)||"px",l=vr.style,c=W2.test(i),u=e.tagName.toLowerCase()==="svg",d=(u?"client":"offset")+(c?"Width":"Height"),f=100,p=n==="px",v=n==="%",g,_,x,E;if(n===o||!a||gp[n]||gp[o])return a;if(o!=="px"&&!p&&(a=t(e,i,s,"px")),E=e.getCTM&&p_(e),(v||o==="%")&&(Mn[i]||~i.indexOf("adius")))return g=E?e.getBBox()[c?"width":"height"]:e[d],ui(v?a/g*f:a/100*g);if(l[c?"width":"height"]=f+(p?o:n),_=n!=="rem"&&~i.indexOf("adius")||n==="em"&&e.appendChild&&!u?e:e.parentNode,E&&(_=(e.ownerSVGElement||{}).parentNode),(!_||_===Vn||!_.appendChild)&&(_=Vn.body),x=_._gsap,x&&v&&x.width&&c&&x.time===vs.time&&!x.uncache)return ui(a/x.width*f);if(v&&(i==="height"||i==="width")){var I=e.style[i];e.style[i]=f+n,g=e[d],I?e.style[i]=I:Qn(e,i)}else(v||o==="%")&&!oS[gs(_,"display")]&&(l.position=gs(e,"position")),_===e&&(l.position="static"),_.appendChild(vr),g=vr[d],_.removeChild(vr),l.position="absolute";return c&&v&&(x=xr(_),x.time=vs.time,x.width=_[d]),ui(p?g*a/f:g&&a?f/g*a:0)},Bn=function(e,i,s,n){var a;return Dd||td(),i in cn&&i!=="transform"&&(i=cn[i],~i.indexOf(",")&&(i=i.split(",")[0])),Mn[i]&&i!=="transform"?(a=go(e,n),a=i!=="transformOrigin"?a[i]:a.svg?a.origin:Gl(gs(e,is))+" "+a.zOrigin+"px"):(a=e.style[i],(!a||a==="auto"||n||~(a+"").indexOf("calc("))&&(a=jl[i]&&jl[i](e,i,s)||gs(e,i)||Mv(e,i)||(i==="opacity"?1:0))),s&&!~(a+"").trim().indexOf(" ")?tr(e,i,a,s)+s:a},lS=function(e,i,s,n){if(!s||s==="none"){var a=da(i,e,1),o=a&&gs(e,a,1);o&&o!==s?(i=a,s=o):i==="borderColor"&&(s=gs(e,"borderTopColor"))}var l=new es(this._pt,e.style,i,0,1,r_),c=0,u=0,d,f,p,v,g,_,x,E,I,z,$,M;if(l.b=s,l.e=n,s+="",n+="",n.substring(0,6)==="var(--"&&(n=gs(e,n.substring(4,n.indexOf(")")))),n==="auto"&&(_=e.style[i],e.style[i]=n,n=gs(e,i)||n,_?e.style[i]=_:Qn(e,i)),d=[s,n],Jv(d),s=d[0],n=d[1],p=s.match(Kr)||[],M=n.match(Kr)||[],M.length){for(;f=Kr.exec(n);)x=f[0],I=n.substring(c,f.index),g?g=(g+1)%5:(I.substr(-5)==="rgba("||I.substr(-5)==="hsla(")&&(g=1),x!==(_=p[u++]||"")&&(v=parseFloat(_)||0,$=_.substr((v+"").length),x.charAt(1)==="="&&(x=Zr(v,x)+$),E=parseFloat(x),z=x.substr((E+"").length),c=Kr.lastIndex-z.length,z||(z=z||bs.units[i]||$,c===n.length&&(n+=z,l.e+=z)),$!==z&&(v=tr(e,i,_,z)||0),l._pt={_next:l._pt,p:I||u===1?I:",",s:v,c:E-v,m:g&&g<4||i==="zIndex"?Math.round:0});l.c=c<n.length?n.substring(c,n.length):""}else l.r=i==="display"&&n==="none"?c_:l_;return Uv.test(n)&&(l.e=0),this._pt=l,l},yp={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},cS=function(e){var i=e.split(" "),s=i[0],n=i[1]||"50%";return(s==="top"||s==="bottom"||n==="left"||n==="right")&&(e=s,s=n,n=e),i[0]=yp[s]||s,i[1]=yp[n]||n,i.join(" ")},uS=function(e,i){if(i.tween&&i.tween._time===i.tween._dur){var s=i.t,n=s.style,a=i.u,o=s._gsap,l,c,u;if(a==="all"||a===!0)n.cssText="",c=1;else for(a=a.split(","),u=a.length;--u>-1;)l=a[u],Mn[l]&&(c=1,l=l==="transformOrigin"?is:ei),Qn(s,l);c&&(Qn(s,ei),o&&(o.svg&&s.removeAttribute("transform"),n.scale=n.rotate=n.translate="none",go(s,1),o.uncache=1,u_(n)))}},jl={clearProps:function(e,i,s,n,a){if(a.data!=="isFromStart"){var o=e._pt=new es(e._pt,i,s,0,0,uS);return o.u=n,o.pr=-10,o.tween=a,e._props.push(s),1}}},_o=[1,0,0,1,0,0],m_={},v_=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},bp=function(e){var i=gs(e,ei);return v_(i)?_o:i.substr(7).match(Ev).map(ui)},Hd=function(e,i){var s=e._gsap||xr(e),n=e.style,a=bp(e),o,l,c,u;return s.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,a=[c.a,c.b,c.c,c.d,c.e,c.f],a.join(",")==="1,0,0,1,0,0"?_o:a):(a===_o&&!e.offsetParent&&e!==Qr&&!s.svg&&(c=n.display,n.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,l=e.nextElementSibling,Qr.appendChild(e)),a=bp(e),c?n.display=c:Qn(e,"display"),u&&(l?o.insertBefore(e,l):o?o.appendChild(e):Qr.removeChild(e))),i&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},ed=function(e,i,s,n,a,o){var l=e._gsap,c=a||Hd(e,!0),u=l.xOrigin||0,d=l.yOrigin||0,f=l.xOffset||0,p=l.yOffset||0,v=c[0],g=c[1],_=c[2],x=c[3],E=c[4],I=c[5],z=i.split(" "),$=parseFloat(z[0])||0,M=parseFloat(z[1])||0,V,N,H,T;s?c!==_o&&(N=v*x-g*_)&&(H=$*(x/N)+M*(-_/N)+(_*I-x*E)/N,T=$*(-g/N)+M*(v/N)-(v*I-g*E)/N,$=H,M=T):(V=h_(e),$=V.x+(~z[0].indexOf("%")?$/100*V.width:$),M=V.y+(~(z[1]||z[0]).indexOf("%")?M/100*V.height:M)),n||n!==!1&&l.smooth?(E=$-u,I=M-d,l.xOffset=f+(E*v+I*_)-E,l.yOffset=p+(E*g+I*x)-I):l.xOffset=l.yOffset=0,l.xOrigin=$,l.yOrigin=M,l.smooth=!!n,l.origin=i,l.originIsAbsolute=!!s,e.style[is]="0px 0px",o&&(jn(o,l,"xOrigin",u,$),jn(o,l,"yOrigin",d,M),jn(o,l,"xOffset",f,l.xOffset),jn(o,l,"yOffset",p,l.yOffset)),e.setAttribute("data-svg-origin",$+" "+M)},go=function(e,i){var s=e._gsap||new Qv(e);if("x"in s&&!i&&!s.uncache)return s;var n=e.style,a=s.scaleX<0,o="px",l="deg",c=getComputedStyle(e),u=gs(e,is)||"0",d,f,p,v,g,_,x,E,I,z,$,M,V,N,H,T,j,St,yt,ht,vt,F,C,Lt,xt,He,ii,de,re,xe,Ct,nt;return d=f=p=_=x=E=I=z=$=0,v=g=1,s.svg=!!(e.getCTM&&p_(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(n[ei]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[ei]!=="none"?c[ei]:"")),n.scale=n.rotate=n.translate="none"),N=Hd(e,s.svg),s.svg&&(s.uncache?(xt=e.getBBox(),u=s.xOrigin-xt.x+"px "+(s.yOrigin-xt.y)+"px",Lt=""):Lt=!i&&e.getAttribute("data-svg-origin"),ed(e,Lt||u,!!Lt||s.originIsAbsolute,s.smooth!==!1,N)),M=s.xOrigin||0,V=s.yOrigin||0,N!==_o&&(St=N[0],yt=N[1],ht=N[2],vt=N[3],d=F=N[4],f=C=N[5],N.length===6?(v=Math.sqrt(St*St+yt*yt),g=Math.sqrt(vt*vt+ht*ht),_=St||yt?Vr(yt,St)*hr:0,I=ht||vt?Vr(ht,vt)*hr+_:0,I&&(g*=Math.abs(Math.cos(I*ta))),s.svg&&(d-=M-(M*St+V*ht),f-=V-(M*yt+V*vt))):(nt=N[6],xe=N[7],ii=N[8],de=N[9],re=N[10],Ct=N[11],d=N[12],f=N[13],p=N[14],H=Vr(nt,re),x=H*hr,H&&(T=Math.cos(-H),j=Math.sin(-H),Lt=F*T+ii*j,xt=C*T+de*j,He=nt*T+re*j,ii=F*-j+ii*T,de=C*-j+de*T,re=nt*-j+re*T,Ct=xe*-j+Ct*T,F=Lt,C=xt,nt=He),H=Vr(-ht,re),E=H*hr,H&&(T=Math.cos(-H),j=Math.sin(-H),Lt=St*T-ii*j,xt=yt*T-de*j,He=ht*T-re*j,Ct=vt*j+Ct*T,St=Lt,yt=xt,ht=He),H=Vr(yt,St),_=H*hr,H&&(T=Math.cos(H),j=Math.sin(H),Lt=St*T+yt*j,xt=F*T+C*j,yt=yt*T-St*j,C=C*T-F*j,St=Lt,F=xt),x&&Math.abs(x)+Math.abs(_)>359.9&&(x=_=0,E=180-E),v=ui(Math.sqrt(St*St+yt*yt+ht*ht)),g=ui(Math.sqrt(C*C+nt*nt)),H=Vr(F,C),I=Math.abs(H)>2e-4?H*hr:0,$=Ct?1/(Ct<0?-Ct:Ct):0),s.svg&&(Lt=e.getAttribute("transform"),s.forceCSS=e.setAttribute("transform","")||!v_(gs(e,ei)),Lt&&e.setAttribute("transform",Lt))),Math.abs(I)>90&&Math.abs(I)<270&&(a?(v*=-1,I+=_<=0?180:-180,_+=_<=0?180:-180):(g*=-1,I+=I<=0?180:-180)),i=i||s.uncache,s.x=d-((s.xPercent=d&&(!i&&s.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-d)?-50:0)))?e.offsetWidth*s.xPercent/100:0)+o,s.y=f-((s.yPercent=f&&(!i&&s.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-f)?-50:0)))?e.offsetHeight*s.yPercent/100:0)+o,s.z=p+o,s.scaleX=ui(v),s.scaleY=ui(g),s.rotation=ui(_)+l,s.rotationX=ui(x)+l,s.rotationY=ui(E)+l,s.skewX=I+l,s.skewY=z+l,s.transformPerspective=$+o,(s.zOrigin=parseFloat(u.split(" ")[2])||!i&&s.zOrigin||0)&&(n[is]=Gl(u)),s.xOffset=s.yOffset=0,s.force3D=bs.force3D,s.renderTransform=s.svg?fS:f_?__:dS,s.uncache=0,s},Gl=function(e){return(e=e.split(" "))[0]+" "+e[1]},mu=function(e,i,s){var n=$i(i);return ui(parseFloat(i)+parseFloat(tr(e,"x",s+"px",n)))+n},dS=function(e,i){i.z="0px",i.rotationY=i.rotationX="0deg",i.force3D=0,__(e,i)},ur="0deg",Na="0px",dr=") ",__=function(e,i){var s=i||this,n=s.xPercent,a=s.yPercent,o=s.x,l=s.y,c=s.z,u=s.rotation,d=s.rotationY,f=s.rotationX,p=s.skewX,v=s.skewY,g=s.scaleX,_=s.scaleY,x=s.transformPerspective,E=s.force3D,I=s.target,z=s.zOrigin,$="",M=E==="auto"&&e&&e!==1||E===!0;if(z&&(f!==ur||d!==ur)){var V=parseFloat(d)*ta,N=Math.sin(V),H=Math.cos(V),T;V=parseFloat(f)*ta,T=Math.cos(V),o=mu(I,o,N*T*-z),l=mu(I,l,-Math.sin(V)*-z),c=mu(I,c,H*T*-z+z)}x!==Na&&($+="perspective("+x+dr),(n||a)&&($+="translate("+n+"%, "+a+"%) "),(M||o!==Na||l!==Na||c!==Na)&&($+=c!==Na||M?"translate3d("+o+", "+l+", "+c+") ":"translate("+o+", "+l+dr),u!==ur&&($+="rotate("+u+dr),d!==ur&&($+="rotateY("+d+dr),f!==ur&&($+="rotateX("+f+dr),(p!==ur||v!==ur)&&($+="skew("+p+", "+v+dr),(g!==1||_!==1)&&($+="scale("+g+", "+_+dr),I.style[ei]=$||"translate(0, 0)"},fS=function(e,i){var s=i||this,n=s.xPercent,a=s.yPercent,o=s.x,l=s.y,c=s.rotation,u=s.skewX,d=s.skewY,f=s.scaleX,p=s.scaleY,v=s.target,g=s.xOrigin,_=s.yOrigin,x=s.xOffset,E=s.yOffset,I=s.forceCSS,z=parseFloat(o),$=parseFloat(l),M,V,N,H,T;c=parseFloat(c),u=parseFloat(u),d=parseFloat(d),d&&(d=parseFloat(d),u+=d,c+=d),c||u?(c*=ta,u*=ta,M=Math.cos(c)*f,V=Math.sin(c)*f,N=Math.sin(c-u)*-p,H=Math.cos(c-u)*p,u&&(d*=ta,T=Math.tan(u-d),T=Math.sqrt(1+T*T),N*=T,H*=T,d&&(T=Math.tan(d),T=Math.sqrt(1+T*T),M*=T,V*=T)),M=ui(M),V=ui(V),N=ui(N),H=ui(H)):(M=f,H=p,V=N=0),(z&&!~(o+"").indexOf("px")||$&&!~(l+"").indexOf("px"))&&(z=tr(v,"x",o,"px"),$=tr(v,"y",l,"px")),(g||_||x||E)&&(z=ui(z+g-(g*M+_*N)+x),$=ui($+_-(g*V+_*H)+E)),(n||a)&&(T=v.getBBox(),z=ui(z+n/100*T.width),$=ui($+a/100*T.height)),T="matrix("+M+","+V+","+N+","+H+","+z+","+$+")",v.setAttribute("transform",T),I&&(v.style[ei]=T)},hS=function(e,i,s,n,a){var o=360,l=Bi(a),c=parseFloat(a)*(l&&~a.indexOf("rad")?hr:1),u=c-n,d=n+u+"deg",f,p;return l&&(f=a.split("_")[1],f==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),f==="cw"&&u<0?u=(u+o*pp)%o-~~(u/o)*o:f==="ccw"&&u>0&&(u=(u-o*pp)%o-~~(u/o)*o)),e._pt=p=new es(e._pt,i,s,n,u,K2),p.e=d,p.u="deg",e._props.push(s),p},xp=function(e,i){for(var s in i)e[s]=i[s];return e},pS=function(e,i,s){var n=xp({},s._gsap),a="perspective,force3D,transformOrigin,svgOrigin",o=s.style,l,c,u,d,f,p,v,g;n.svg?(u=s.getAttribute("transform"),s.setAttribute("transform",""),o[ei]=i,l=go(s,1),Qn(s,ei),s.setAttribute("transform",u)):(u=getComputedStyle(s)[ei],o[ei]=i,l=go(s,1),o[ei]=u);for(c in Mn)u=n[c],d=l[c],u!==d&&a.indexOf(c)<0&&(v=$i(u),g=$i(d),f=v!==g?tr(s,c,u,g):parseFloat(u),p=parseFloat(d),e._pt=new es(e._pt,l,c,f,p-f,Zu),e._pt.u=g||0,e._props.push(c));xp(l,n)};ts("padding,margin,Width,Radius",function(t,e){var i="Top",s="Right",n="Bottom",a="Left",o=(e<3?[i,s,n,a]:[i+a,i+s,n+s,n+a]).map(function(l){return e<2?t+l:"border"+l+t});jl[e>1?"border"+t:t]=function(l,c,u,d,f){var p,v;if(arguments.length<4)return p=o.map(function(g){return Bn(l,g,u)}),v=p.join(" "),v.split(p[0]).length===5?p[0]:v;p=(d+"").split(" "),v={},o.forEach(function(g,_){return v[g]=p[_]=p[_]||p[(_-1)/2|0]}),l.init(c,v,f)}});var g_={name:"css",register:td,targetTest:function(e){return e.style&&e.nodeType},init:function(e,i,s,n,a){var o=this._props,l=e.style,c=s.vars.startAt,u,d,f,p,v,g,_,x,E,I,z,$,M,V,N,H,T;Dd||td(),this.styles=this.styles||d_(e),H=this.styles.props,this.tween=s;for(_ in i)if(_!=="autoRound"&&(d=i[_],!(ms[_]&&t_(_,i,s,n,e,a)))){if(v=typeof d,g=jl[_],v==="function"&&(d=d.call(s,n,e,a),v=typeof d),v==="string"&&~d.indexOf("random(")&&(d=po(d)),g)g(this,e,_,d,s)&&(N=1);else if(_.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(_)+"").trim(),d+="",Yn.lastIndex=0,Yn.test(u)||(x=$i(u),E=$i(d),E?x!==E&&(u=tr(e,_,u,E)+E):x&&(d+=x)),this.add(l,"setProperty",u,d,n,a,0,0,_),o.push(_),H.push(_,0,l[_]);else if(v!=="undefined"){if(c&&_ in c?(u=typeof c[_]=="function"?c[_].call(s,n,e,a):c[_],Bi(u)&&~u.indexOf("random(")&&(u=po(u)),$i(u+"")||u==="auto"||(u+=bs.units[_]||$i(Bn(e,_))||""),(u+"").charAt(1)==="="&&(u=Bn(e,_))):u=Bn(e,_),p=parseFloat(u),I=v==="string"&&d.charAt(1)==="="&&d.substr(0,2),I&&(d=d.substr(2)),f=parseFloat(d),_ in cn&&(_==="autoAlpha"&&(p===1&&Bn(e,"visibility")==="hidden"&&f&&(p=0),H.push("visibility",0,l.visibility),jn(this,l,"visibility",p?"inherit":"hidden",f?"inherit":"hidden",!f)),_!=="scale"&&_!=="transform"&&(_=cn[_],~_.indexOf(",")&&(_=_.split(",")[0]))),z=_ in Mn,z){if(this.styles.save(_),T=d,v==="string"&&d.substring(0,6)==="var(--"){if(d=gs(e,d.substring(4,d.indexOf(")"))),d.substring(0,5)==="calc("){var j=e.style.perspective;e.style.perspective=d,d=gs(e,"perspective"),j?e.style.perspective=j:Qn(e,"perspective")}f=parseFloat(d)}if($||(M=e._gsap,M.renderTransform&&!i.parseTransform||go(e,i.parseTransform),V=i.smoothOrigin!==!1&&M.smooth,$=this._pt=new es(this._pt,l,ei,0,1,M.renderTransform,M,0,-1),$.dep=1),_==="scale")this._pt=new es(this._pt,M,"scaleY",M.scaleY,(I?Zr(M.scaleY,I+f):f)-M.scaleY||0,Zu),this._pt.u=0,o.push("scaleY",_),_+="X";else if(_==="transformOrigin"){H.push(is,0,l[is]),d=cS(d),M.svg?ed(e,d,0,V,0,this):(E=parseFloat(d.split(" ")[2])||0,E!==M.zOrigin&&jn(this,M,"zOrigin",M.zOrigin,E),jn(this,l,_,Gl(u),Gl(d)));continue}else if(_==="svgOrigin"){ed(e,d,1,V,0,this);continue}else if(_ in m_){hS(this,M,_,p,I?Zr(p,I+d):d);continue}else if(_==="smoothOrigin"){jn(this,M,"smooth",M.smooth,d);continue}else if(_==="force3D"){M[_]=d;continue}else if(_==="transform"){pS(this,d,e);continue}}else _ in l||(_=da(_)||_);if(z||(f||f===0)&&(p||p===0)&&!Y2.test(d)&&_ in l)x=(u+"").substr((p+"").length),f||(f=0),E=$i(d)||(_ in bs.units?bs.units[_]:x),x!==E&&(p=tr(e,_,u,E)),this._pt=new es(this._pt,z?M:l,_,p,(I?Zr(p,I+f):f)-p,!z&&(E==="px"||_==="zIndex")&&i.autoRound!==!1?Z2:Zu),this._pt.u=E||0,z&&T!==d?(this._pt.b=u,this._pt.e=T,this._pt.r=J2):x!==E&&E!=="%"&&(this._pt.b=u,this._pt.r=X2);else if(_ in l)lS.call(this,e,_,u,I?I+d:d);else if(_ in e)this.add(e,_,u||e[_],I?I+d:d,n,a);else if(_!=="parseTransform"){Pd(_,d);continue}z||(_ in l?H.push(_,0,l[_]):typeof e[_]=="function"?H.push(_,2,e[_]()):H.push(_,1,u||e[_])),o.push(_)}}N&&a_(this)},render:function(e,i){if(i.tween._time||!Rd())for(var s=i._pt;s;)s.r(e,s.d),s=s._next;else i.styles.revert()},get:Bn,aliases:cn,getSetter:function(e,i,s){var n=cn[i];return n&&n.indexOf(",")<0&&(i=n),i in Mn&&i!==is&&(e._gsap.x||Bn(e,"x"))?s&&hp===s?i==="scale"?iS:eS:(hp=s||{})&&(i==="scale"?sS:nS):e.style&&!Ed(e.style[i])?Q2:~i.indexOf("-")?tS:Fd(e,i)},core:{_removeProperty:Qn,_getMatrix:Hd}};ns.utils.checkPrefix=da;ns.core.getStyleSaver=d_;(function(t,e,i,s){var n=ts(t+","+e+","+i,function(a){Mn[a]=1});ts(e,function(a){bs.units[a]="deg",m_[a]=1}),cn[n[13]]=t+","+e,ts(s,function(a){var o=a.split(":");cn[o[1]]=n[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ts("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(t){bs.units[t]="px"});ns.registerPlugin(g_);var id=ns.registerPlugin(g_)||ns;id.core.Tween;const mS={ease:"power3.out",smooth:"power3.out","ease-out":"power3.out",easeOut:"power3.out",expo:"expo.out",expoOut:"expo.out",softSpring:"back.out(1.05)","soft-spring":"back.out(1.05)",spring:"elastic.out(0.55, 0.42)",bounceOut:"bounce.out"};function ql(t,e){const i=co(t,0,1);if(i===0||i===1)return i;const s=mS[String(e??"power3.out")]??String(e??"power3.out");if(s.startsWith("cubic-bezier("))return vS(s,i);const n=id.parseEase(s)??id.parseEase("power3.out");return co(n(i),0,1.04)}function vS(t,e){const i=t.match(/^cubic-bezier\(([^)]+)\)$/)?.[1]?.split(",").map(p=>Number(p.trim()));if(!i||i.length!==4||i.some(p=>!Number.isFinite(p)))return ql(e,"power3.out");const[s,n,a,o]=i;if(s<0||s>1||a<0||a>1)return ql(e,"power3.out");const l=(p,v,g)=>{const _=1-g;return 3*_*_*g*p+3*_*g*g*v+g*g*g},c=(p,v,g)=>3*(1-g)*(1-g)*p+6*(1-g)*g*(v-p)+3*g*g*(1-v);let u=e;for(let p=0;p<8;p+=1){const v=l(s,a,u)-e;if(Math.abs(v)<1e-7)return l(n,o,u);const g=c(s,a,u);if(Math.abs(g)<1e-7)break;const _=u-v/g;if(_<0||_>1)break;u=_}let d=0,f=1;u=e;for(let p=0;p<24;p+=1){const v=l(s,a,u);if(Math.abs(v-e)<1e-7)break;v<e?d=u:f=u,u=(d+f)/2}return l(n,o,u)}function y_(t,e,i){return i<=0?t:i>=1?e:typeof t=="number"&&typeof e=="number"?t+(e-t)*i:wp(t)&&wp(e)?_S(t,e,i):i<1?t:e}function wp(t){return typeof t=="string"&&(t.startsWith("#")||t.startsWith("rgb"))}function _S(t,e,i){const s=Sp(t),n=Sp(e);if(!s||!n)return i<1?Nl(t):Nl(e);const a=Math.round(s.r+(n.r-s.r)*i),o=Math.round(s.g+(n.g-s.g)*i),l=Math.round(s.b+(n.b-s.b)*i),c=s.a+(n.a-s.a)*i;return`rgba(${a}, ${o}, ${l}, ${c.toFixed(3)})`}function Sp(t){const e=String(t).trim();if(e.startsWith("#")){const n=e.slice(1);if(n.length===3)return{r:Number.parseInt(n[0]+n[0],16),g:Number.parseInt(n[1]+n[1],16),b:Number.parseInt(n[2]+n[2],16),a:1};if(n.length===6)return{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16),a:1}}const i=e.match(/^rgba?\(([^)]+)\)$/);if(!i)return null;const s=i[1].split(",").map(n=>Number.parseFloat(n.trim()));return{r:s[0]??0,g:s[1]??0,b:s[2]??0,a:s[3]??1}}const kp=new WeakMap,Bp=new WeakMap;function b_(t,e){const i=gS(t),s=wS(t,i,e),n=i.regularElements.filter(o=>yS(o,e)).map(o=>{let l=sd(o,i.animationsByTarget.get(o.id)??[],e);return o.asset&&(l={...l,mediaTime:Math.max(0,e)}),{...o,render:l}}),a=i.orderedClips.filter(o=>{const l=o.transitionOut==="crossfade"?o.transitionOutDuration:0;return e>=o.start&&e<o.start+o.duration+l});for(const o of a){if(!o.asset)continue;const l=i.elementsByAsset.get(o.assetName),c=l?sd(l,i.animationsByTarget.get(l.id)??[],e):{x:0,y:0,scale:1,rotation:0,opacity:1,center:!0,cover:!1,layer:"content"},u=o.start+o.duration;let d=1;o.transitionIn==="crossfade"&&o.transitionInDuration>0&&(d*=co((e-o.start)/o.transitionInDuration)),o.transitionOut==="crossfade"&&o.transitionOutDuration>0&&e>=u&&(d*=1-co((e-u)/o.transitionOutDuration));const f=Number(c.opacity??1),p={id:o.id,kind:"asset",assetName:o.assetName,asset:o.asset,properties:l?.properties??{},render:{...c,opacity:f*d,mediaTime:Math.max(0,o.trimIn+e-o.start),mediaTrimOut:o.trimOut,mediaVolume:o.volume??1,mediaMuted:(i.tracksById.get(String(o.track))?.muted??!1)||(o.mute??!1)}};n.push(p)}return n.sort((o,l)=>Ep(i,o)-Ep(i,l)),{canvas:t.canvas,camera:s,elements:n}}function gS(t){const e=kp.get(t);if(e)return e;const i=new Map;for(const o of t.animations){const l=i.get(o.target);l?l.push(o):i.set(o.target,[o])}const s=new Map(t.tracks.map(o=>[o.id,o])),n=new Map;for(const o of t.elements)o.kind==="asset"&&o.assetName&&!n.has(o.assetName)&&n.set(o.assetName,o);const a={animationsByTarget:i,clippedAssets:new Set(t.clips.map(o=>o.assetName)),clipsById:new Map(t.clips.map(o=>[o.id,o])),elementsByAsset:n,orderedClips:[],regularElements:[],tracksById:s};return a.regularElements=t.elements.filter(o=>(o.kind!=="asset"||!o.assetName||!a.clippedAssets.has(o.assetName))&&bS(a,o)),a.orderedClips=t.clips.filter(o=>{const l=a.tracksById.get(String(o.track));return l?.role!=="audio"&&!l?.hidden}).sort((o,l)=>Wl(a,o.track)-Wl(a,l.track)||o.sourceOrder-l.sourceOrder),kp.set(t,a),a}function Wl(t,e){const i=t.tracksById.get(String(e));return i?i.role==="main"?0:100+i.order:xS(e)}function yS(t,e){const i=t.properties;if(i.start===void 0||i.duration===void 0)return!0;const s=Number(i.start),n=Number(i.duration);return!Number.isFinite(s)||!Number.isFinite(n)?!0:e>=s&&e<s+Math.max(0,n)}function bS(t,e){const i=e.properties.track;if(i===void 0)return!0;const s=t.tracksById.get(String(i));return s?.role!=="audio"&&!s?.hidden}function Ep(t,e){const i=t.clipsById.get(e.id);if(i)return Wl(t,i.track);const s=e.render.track;return s!==void 0?Wl(t,String(s)):1e3}function xS(t){const e=Number(t);return Number.isFinite(e)?e:0}function wS(t,e,i){const s={id:"camera",properties:t.camera??{x:0,y:0,zoom:1,rotation:0}};return sd(s,e.animationsByTarget.get(s.id)??[],i)}function sd(t,e,i){if(e.length===0)return t.properties;let s={...t.properties};for(const n of e)s=SS(s,n,i);return s}function SS(t,e,i){const s=i-e.delay;if(s<0)return t;const n=co(s/e.duration);if(e.keyframes.length>0)return kS(t,e.keyframes,n,e.easing);if(s===0)return{...t,...e.from};const a=ql(n,e.easing),o={...t};let l=Bp.get(e);l||(l=[...new Set([...Object.keys(e.from),...Object.keys(e.to)])],Bp.set(e,l));for(const c of l){const u=e.from[c]??t[c]??0,d=e.to[c]??t[c]??0;o[c]=y_(u,d,a)}return o}function kS(t,e,i,s){if(e.length===0)return t;const n=e[0],a=e[e.length-1];if(!n||!a)return t;if(i<=n.offset)return{...t,...n.properties};if(i>=a.offset)return{...t,...a.properties};const o={...t};let l=n,c=a;for(let v=0;v<e.length-1;v+=1){const g=e[v],_=e[v+1];if(!(!g||!_)&&i>=g.offset&&i<=_.offset){l=g,c=_;break}}const u=c.offset-l.offset||1,d=c.easing??s,f=ql((i-l.offset)/u,d),p=new Set([...Object.keys(l.properties),...Object.keys(c.properties)]);for(const v of p){const g=l.properties[v]??t[v]??0,_=c.properties[v]??t[v]??0;o[v]=y_(g,_,f)}return o}const BS="modulepreload",ES=function(t){return"/"+t},Up={},Vd=function(e,i,s){let n=Promise.resolve();if(i&&i.length>0){let o=function(u){return Promise.all(u.map(d=>Promise.resolve(d).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");n=o(i.map(u=>{if(u=ES(u),u in Up)return;Up[u]=!0;const d=u.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=d?"stylesheet":BS,d||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),d)return new Promise((v,g)=>{p.addEventListener("load",v),p.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${u}`)))})}))}function a(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return n.then(o=>{for(const l of o||[])l.status==="rejected"&&a(l.reason);return e().catch(a)})};var bn={},vu={},xn={},Tp;function x_(){if(Tp)return xn;Tp=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.loop=xn.conditional=xn.parse=void 0;var t=function s(n,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:o;if(Array.isArray(a))a.forEach(function(u){return s(n,u,o,l)});else if(typeof a=="function")a(n,o,l,s);else{var c=Object.keys(a)[0];Array.isArray(a[c])?(l[c]={},s(n,a[c],o,l[c])):l[c]=a[c](n,o,l,s)}return o};xn.parse=t;var e=function(n,a){return function(o,l,c,u){a(o,l,c)&&u(o,n,l,c)}};xn.conditional=e;var i=function(n,a){return function(o,l,c,u){for(var d=[],f=o.pos;a(o,l,c);){var p={};if(u(o,n,l,p),o.pos===f)break;f=o.pos,d.push(p)}return d}};return xn.loop=i,xn}var ci={},Pp;function w_(){if(Pp)return ci;Pp=1,Object.defineProperty(ci,"__esModule",{value:!0}),ci.readBits=ci.readArray=ci.readUnsigned=ci.readString=ci.peekBytes=ci.readBytes=ci.peekByte=ci.readByte=ci.buildStream=void 0;var t=function(f){return{data:f,pos:0}};ci.buildStream=t;var e=function(){return function(f){return f.data[f.pos++]}};ci.readByte=e;var i=function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(p){return p.data[p.pos+f]}};ci.peekByte=i;var s=function(f){return function(p){return p.data.subarray(p.pos,p.pos+=f)}};ci.readBytes=s;var n=function(f){return function(p){return p.data.subarray(p.pos,p.pos+f)}};ci.peekBytes=n;var a=function(f){return function(p){return Array.from(s(f)(p)).map(function(v){return String.fromCharCode(v)}).join("")}};ci.readString=a;var o=function(f){return function(p){var v=s(2)(p);return f?(v[1]<<8)+v[0]:(v[0]<<8)+v[1]}};ci.readUnsigned=o;var l=function(f,p){return function(v,g,_){for(var x=typeof p=="function"?p(v,g,_):p,E=s(f),I=new Array(x),z=0;z<x;z++)I[z]=E(v);return I}};ci.readArray=l;var c=function(f,p,v){for(var g=0,_=0;_<v;_++)g+=f[p+_]&&Math.pow(2,v-_-1);return g},u=function(f){return function(p){for(var v=e()(p),g=new Array(8),_=0;_<8;_++)g[7-_]=!!(v&1<<_);return Object.keys(f).reduce(function(x,E){var I=f[E];return I.length?x[E]=c(g,I.index,I.length):x[E]=g[I.index],x},{})}};return ci.readBits=u,ci}var Ap;function US(){return Ap||(Ap=1,(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=x_(),i=w_(),s={blocks:function(p){for(var v=0,g=[],_=p.data.length,x=0,E=(0,i.readByte)()(p);E!==v&&E;E=(0,i.readByte)()(p)){if(p.pos+E>=_){var I=_-p.pos;g.push((0,i.readBytes)(I)(p)),x+=I;break}g.push((0,i.readBytes)(E)(p)),x+=E}for(var z=new Uint8Array(x),$=0,M=0;M<g.length;M++)z.set(g[M],$),$+=g[M].length;return z}},n=(0,e.conditional)({gce:[{codes:(0,i.readBytes)(2)},{byteSize:(0,i.readByte)()},{extras:(0,i.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,i.readUnsigned)(!0)},{transparentColorIndex:(0,i.readByte)()},{terminator:(0,i.readByte)()}]},function(f){var p=(0,i.peekBytes)(2)(f);return p[0]===33&&p[1]===249}),a=(0,e.conditional)({image:[{code:(0,i.readByte)()},{descriptor:[{left:(0,i.readUnsigned)(!0)},{top:(0,i.readUnsigned)(!0)},{width:(0,i.readUnsigned)(!0)},{height:(0,i.readUnsigned)(!0)},{lct:(0,i.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,i.readArray)(3,function(f,p,v){return Math.pow(2,v.descriptor.lct.size+1)})},function(f,p,v){return v.descriptor.lct.exists}),{data:[{minCodeSize:(0,i.readByte)()},s]}]},function(f){return(0,i.peekByte)()(f)===44}),o=(0,e.conditional)({text:[{codes:(0,i.readBytes)(2)},{blockSize:(0,i.readByte)()},{preData:function(p,v,g){return(0,i.readBytes)(g.text.blockSize)(p)}},s]},function(f){var p=(0,i.peekBytes)(2)(f);return p[0]===33&&p[1]===1}),l=(0,e.conditional)({application:[{codes:(0,i.readBytes)(2)},{blockSize:(0,i.readByte)()},{id:function(p,v,g){return(0,i.readString)(g.blockSize)(p)}},s]},function(f){var p=(0,i.peekBytes)(2)(f);return p[0]===33&&p[1]===255}),c=(0,e.conditional)({comment:[{codes:(0,i.readBytes)(2)},s]},function(f){var p=(0,i.peekBytes)(2)(f);return p[0]===33&&p[1]===254}),u=[{header:[{signature:(0,i.readString)(3)},{version:(0,i.readString)(3)}]},{lsd:[{width:(0,i.readUnsigned)(!0)},{height:(0,i.readUnsigned)(!0)},{gct:(0,i.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,i.readByte)()},{pixelAspectRatio:(0,i.readByte)()}]},(0,e.conditional)({gct:(0,i.readArray)(3,function(f,p){return Math.pow(2,p.lsd.gct.size+1)})},function(f,p){return p.lsd.gct.exists}),{frames:(0,e.loop)([n,l,c,a,o],function(f){var p=(0,i.peekByte)()(f);return p===33||p===44})}],d=u;t.default=d})(vu)),vu}var Da={},Ip;function TS(){if(Ip)return Da;Ip=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.deinterlace=void 0;var t=function(i,s){for(var n=new Array(i.length),a=i.length/s,o=function(v,g){var _=i.slice(g*s,(g+1)*s);n.splice.apply(n,[v*s,s].concat(_))},l=[0,4,2,1],c=[8,8,4,2],u=0,d=0;d<4;d++)for(var f=l[d];f<a;f+=c[d])o(f,u),u++;return n};return Da.deinterlace=t,Da}var Ra={},Mp;function PS(){if(Mp)return Ra;Mp=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.lzw=void 0;var t=function(i,s,n){var a=4096,o=-1,l=n,c,u,d,f,p,v,g,N,_,x,V,E,H,T,St,j,I=new Array(n),z=new Array(a),$=new Array(a),M=new Array(a+1);for(E=i,u=1<<E,p=u+1,c=u+2,g=o,f=E+1,d=(1<<f)-1,_=0;_<u;_++)z[_]=0,$[_]=_;var V,N,H,T,j,St;for(V=N=H=T=j=St=0,x=0;x<l;){if(T===0){if(N<f){V+=s[St]<<N,N+=8,St++;continue}if(_=V&d,V>>=f,N-=f,_>c||_==p)break;if(_==u){f=E+1,d=(1<<f)-1,c=u+2,g=o;continue}if(g==o){M[T++]=$[_],g=_,H=_;continue}for(v=_,_==c&&(M[T++]=H,_=g);_>u;)M[T++]=$[_],_=z[_];H=$[_]&255,M[T++]=H,c<a&&(z[c]=g,$[c]=H,c++,(c&d)===0&&c<a&&(f++,d+=c)),g=v}T--,I[j++]=M[T],x++}for(x=j;x<l;x++)I[x]=0;return I};return Ra.lzw=t,Ra}var zp;function AS(){if(zp)return bn;zp=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.decompressFrames=bn.decompressFrame=bn.parseGIF=void 0;var t=a(US()),e=x_(),i=w_(),s=TS(),n=PS();function a(d){return d&&d.__esModule?d:{default:d}}var o=function(f){var p=new Uint8Array(f);return(0,e.parse)((0,i.buildStream)(p),t.default)};bn.parseGIF=o;var l=function(f){for(var p=f.pixels.length,v=new Uint8ClampedArray(p*4),g=0;g<p;g++){var _=g*4,x=f.pixels[g],E=f.colorTable[x]||[0,0,0];v[_]=E[0],v[_+1]=E[1],v[_+2]=E[2],v[_+3]=x!==f.transparentIndex?255:0}return v},c=function(f,p,v){if(!f.image){console.warn("gif frame does not have associated image.");return}var g=f.image,_=g.descriptor.width*g.descriptor.height,x=(0,n.lzw)(g.data.minCodeSize,g.data.blocks,_);g.descriptor.lct.interlaced&&(x=(0,s.deinterlace)(x,g.descriptor.width));var E={pixels:x,dims:{top:f.image.descriptor.top,left:f.image.descriptor.left,width:f.image.descriptor.width,height:f.image.descriptor.height}};return g.descriptor.lct&&g.descriptor.lct.exists?E.colorTable=g.lct:E.colorTable=p,f.gce&&(E.delay=(f.gce.delay||10)*10,E.disposalType=f.gce.extras.disposal,f.gce.extras.transparentColorGiven&&(E.transparentIndex=f.gce.transparentColorIndex)),v&&(E.patch=l(E)),E};bn.decompressFrame=c;var u=function(f,p){return f.frames.filter(function(v){return v.image}).map(function(v){return c(v,f.gct,p)})};return bn.decompressFrames=u,bn}var Cp=AS();function Pr(t){return t?.motionlyType==="video"}function $p(t){return t.motionlyType==="gif"||t.motionlyType==="lottie"||t.motionlyType==="svg"}function IS(t){return[...t.entries()].flatMap(([e,i])=>i.motionlyWarning?[`${e}: ${i.motionlyWarning}`]:[])}async function MS(t,e=document.baseURI,i){const s=new Map;for(const a of t.imports){const o=aa(a.path);a.path.startsWith("data:")&&o&&s.set(o,a.path)}const n=await Promise.all(t.imports.map(async a=>{try{const o=s.get(aa(a.path))??a.path;return[a.name,await zS(o,e,a.type)]}catch(o){return console.warn(`Could not load asset ${a.path}:`,o),i?.(a.name,o),null}}));return new Map(n.filter(a=>a!==null))}async function zS(t,e,i){const s=new URL(t.startsWith("/")?`/${t.slice(1)}`:t,e).href,[n,a]=await Promise.all([i==="video"?FS(s):i==="lottie"?NS(s):QS(s)?DS(s):$S(s,i==="svg"),CS(s)]);return a&&(n.motionlySize=a),n}async function CS(t){if(/^https?:/i.test(t))try{const e=await fetch(t,{method:"HEAD"}),i=Number(e.headers.get("content-length"));return e.ok&&Number.isFinite(i)&&i>0?i:void 0}catch{return}}async function $S(t,e){const i=new Image;i.motionlyType="image",i.motionlySource=t,i.decoding="async",i.src=t;const s=i.decode(),n=e?fetch(t).then(a=>{if(!a.ok)throw new Error(`Asset request failed (${a.status})`);return a.text()}):null;if(n){const a=await n,o=XS(a);if(o.animated)return OS(t,a,o);i.motionlySvg=o}return await s,i}async function OS(t,e,i){const s=document.createElement("canvas"),n=Math.min(1,2048/Math.max(1,i.width,i.height));s.width=Math.max(1,Math.round(i.width*n)),s.height=Math.max(1,Math.round(i.height*n)),s.src=t,s.motionlySource=t,s.motionlyType="svg",s.motionlyDuration=0,s.motionlySvg=i,s.motionlyWarning=/@keyframes\b|animation(?:-name)?\s*:/i.test(e)?"Animated SVG uses real-time Canvas playback. SMIL animation is rendered where supported, but CSS keyframes are not fully supported by the Canvas SVG runtime and may differ.":"Animated SVG uses real-time Canvas playback. Its internal SMIL timeline cannot be frame-seeked, so exact scrubbing and export use wall-clock playback.";const a=s.getContext("2d");if(!a)throw new Error("Could not create animated SVG render context");const{Canvg:o}=await Vd(async()=>{const{Canvg:d}=await import("./index-uMHqBndL.js");return{Canvg:d}},[]),l={enableRedraw:!0,ignoreDimensions:!0,ignoreMouse:!0,scaleWidth:s.width,scaleHeight:s.height},c=()=>o.fromString(a,e),u=c();return s.motionlyCanvg=u,await u.render(l),s.motionlyRestart=async()=>{s.motionlyCanvg?.stop(),a.clearRect(0,0,s.width,s.height);const d=c();s.motionlyCanvg=d,d.start(l)},s.motionlyResume=()=>s.motionlyCanvg?.start(l),s}async function FS(t){const e=document.createElement("video");if(e.motionlyType="video",e.motionlySource=t,e.preload="auto",e.muted=!0,e.defaultMuted=!0,e.playsInline=!0,e.src=t,e.load(),e.readyState<HTMLMediaElement.HAVE_METADATA&&await yo(e,"loadedmetadata"),e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA&&await yo(e,"loadeddata"),e.width=Math.max(1,e.videoWidth),e.height=Math.max(1,e.videoHeight),e.motionlyPreviewFrame=document.createElement("canvas"),e.motionlyPreviewFrame.width=e.width,e.motionlyPreviewFrame.height=e.height,tk(t))try{const i=await fetch(t);if(!i.ok)throw new Error(`MP4 request failed (${i.status})`);const{demuxMp4:s}=await Vd(async()=>{const{demuxMp4:n}=await Promise.resolve().then(()=>PE);return{demuxMp4:n}},void 0);e.motionlyMp4=await s(await i.arrayBuffer())}catch(i){console.warn("Could not demux MP4 metadata:",i)}return e.motionlyDuration=e.motionlyMp4?.duration??await KS(e),jd(e),e}async function NS(t){const e=document.createElement("canvas");e.width=512,e.height=512,e.src=t,e.motionlySource=t,e.motionlyType="lottie",e.motionlyDuration=0;const i=await fetch(t);if(!i.ok)throw new Error(`Lottie request failed (${i.status})`);const{DotLottie:s}=await Vd(async()=>{const{DotLottie:l}=await import("./index-bTggaIHQ.js");return{DotLottie:l}},[]),n=new s({canvas:e,data:await i.arrayBuffer(),autoplay:!1,loop:!0,useFrameInterpolation:!0,renderConfig:{autoResize:!1,devicePixelRatio:1,freezeOnOffscreen:!1}});e.motionlyLottie=n;try{await new Promise((l,c)=>{const u=()=>{f(),l()},d=p=>{f(),c(p.error)},f=()=>{n.removeEventListener("load",u),n.removeEventListener("loadError",d)};n.addEventListener("load",u),n.addEventListener("loadError",d),n.isLoaded&&u()})}catch(l){throw n.destroy(),l}const a=n.animationSize(),o=Math.min(1,2048/Math.max(1,a.width,a.height));return e.width=Math.max(1,Math.round(a.width*o)),e.height=Math.max(1,Math.round(a.height*o)),e.motionlyDuration=Math.max(0,n.duration),n.resize(),n.setFrame(0),e}async function DS(t){const e=await fetch(t);if(!e.ok)throw new Error(`GIF request failed (${e.status})`);const i=Cp.parseGIF(await e.arrayBuffer()),s=Cp.decompressFrames(i,!0);if(!s.length)throw new Error("GIF contains no frames");const n=document.createElement("canvas");n.width=i.lsd.width,n.height=i.lsd.height,n.src=t,n.motionlySource=t,n.motionlyType="gif";const a=document.createElement("canvas");a.width=n.width,a.height=n.height;const o=a.getContext("2d"),l=document.createElement("canvas"),c=l.getContext("2d");if(!o||!c)throw new Error("Could not create GIF render context");const u=[];let d=0,f,p;for(const v of s){f?.disposalType===2?o.clearRect(f.dims.left,f.dims.top,f.dims.width,f.dims.height):f?.disposalType===3&&p&&o.putImageData(p,0,0),p=v.disposalType===3?o.getImageData(0,0,n.width,n.height):void 0,l.width=v.dims.width,l.height=v.dims.height;const g=c.createImageData(v.dims.width,v.dims.height);g.data.set(v.patch),c.putImageData(g,0,0),o.drawImage(l,v.dims.left,v.dims.top),d+=Math.max(.01,v.delay/1e3),u.push({endTime:d,bitmap:await createImageBitmap(a)}),f=v}return n.motionlyDuration=d,n.motionlyGif={frames:u,currentFrame:-1},k_(n,0),n}function yo(t,e){return new Promise((i,s)=>{const n=()=>{t.removeEventListener(e,a),t.removeEventListener("error",o)},a=()=>{n(),i()},o=()=>{n(),s(t.error??new Error(`Video failed during ${e}`))};t.addEventListener(e,a,{once:!0}),t.addEventListener("error",o,{once:!0})})}const Yl=new WeakMap,Gn=new WeakSet;function RS(t,e,i=0){const s=Math.max(0,e-Math.max(0,i)-.001);return Math.max(0,Math.min(s,Number.isFinite(t)?t:0))}async function S_(t,e,i){const s=new Map;for(const l of t.elements){if(!l.assetName)continue;const c=e.get(l.assetName);!c||!Op(c)||s.set(l.assetName,l.render)}const n=[],a=Yl.get(e)??new Set,o=new Set;for(const[l,c]of s){const u=e.get(l);if(!u||!Op(u))continue;o.add(u);const d=Number(c.mediaTime??0),f=Math.max(0,Number(c.mediaTrimOut??0));if(Pr(u)){const p=RS(d,u.motionlyDuration,f),v=!a.has(u),g=i.exact||v?1/1e3:.35;if(Math.abs(u.currentTime-p)>g){const _=GS(u,p,i.exact===!0);n.push(i.playing?_.then(()=>u.paused?Fp(u):void 0):_)}else i.playing&&u.paused&&n.push(Fp(u));i.playing||(u.pause(),rd(u))}else $p(u)&&u.motionlyLottie?VS(u,d):$p(u)&&u.motionlyGif?k_(u,d):dc(u)&&(i.playing?i.playing&&!a.has(u)?Gn.has(u)&&u.motionlyResume?(Gn.delete(u),u.motionlyResume()):n.push(Sl(u)):!u.motionlyCanvg&&!a.has(u)&&n.push(Sl(u)):(u.motionlyCanvg?u.motionlyCanvg.stop():a.has(u)||n.push(Sl(u)),Gn.delete(u),o.delete(u)))}for(const l of a)o.has(l)||(Pr(l)&&(l.pause(),rd(l)),l.motionlyCanvg&&(l.motionlyCanvg.stop(),Gn.delete(l)));Yl.set(e,o),await Promise.all(n)}function nd(t){for(const e of t.values())Pr(e)&&(e.pause(),rd(e)),e.motionlyCanvg&&(e.motionlyCanvg.stop(),Gn.add(e)),e.motionlyLottie?.pause();Yl.delete(t)}function _u(t){nd(t);for(const e of t.values())e.motionlyCanvg?.stop(),Gn.delete(e),e.motionlyLottie?.destroy(),e.motionlyGif?.frames.forEach(i=>i.bitmap.close())}async function LS(t){Yl.delete(t);for(const e of t.values())Gn.delete(e);await Promise.all([...t.values()].filter(dc).map(e=>Sl(e)))}function HS(t){return[...t.values()].some(dc)}function Op(t){return Pr(t)||t.motionlyType==="gif"||t.motionlyType==="lottie"||dc(t)}function dc(t){return!!t.motionlyRestart}function VS(t,e){const i=t.motionlyLottie;if(!i||!i.totalFrames||!i.duration)return;const s=((Number.isFinite(e)?e:0)%i.duration+i.duration)%i.duration;i.setFrame(Math.min(i.totalFrames-1,s/i.duration*i.totalFrames))}function jS(t,e){const i=t.at(-1)?.endTime??0;if(!i)return 0;const s=((Number.isFinite(e)?e:0)%i+i)%i,n=t.findIndex(a=>s<a.endTime);return n<0?Math.max(0,t.length-1):n}function k_(t,e){const i=t.motionlyGif;if(!i)return;const s=jS(i.frames,e);if(s===i.currentFrame)return;const n=t.getContext("2d");n&&(n.clearRect(0,0,t.width,t.height),n.drawImage(i.frames[s].bitmap,0,0),i.currentFrame=s)}async function Sl(t){if(Gn.delete(t),t.motionlyRestart)return t.motionlyRestart();if(t.motionlyType!=="image")return;const e=t.motionlySource;t.src="",t.src=e,await t.decode()}function Fp(t){if(t.motionlyPlay)return t.motionlyPlay;YS(t);const e=t.play().catch(()=>{});return t.motionlyPlay=e,e.finally(()=>{t.motionlyPlay===e&&(t.motionlyPlay=void 0)})}function GS(t,e,i){if(t.motionlySeek&&!i)return t.motionlySeek;const n=(t.motionlySeek?.catch(()=>{})??Promise.resolve()).then(()=>qS(t,e));return t.motionlySeek=n,n.finally(()=>{t.motionlySeek===n&&(t.motionlySeek=void 0)})}async function qS(t,e){if(Math.abs(t.currentTime-e)>1/1e3){const i=yo(t,"seeked");t.currentTime=e,await i,await WS(t)}jd(t)}function WS(t){return t.requestVideoFrameCallback?new Promise(e=>{let i=!1,s;const n=()=>{i||(i=!0,clearTimeout(a),e())},a=setTimeout(()=>{s!==void 0&&t.cancelVideoFrameCallback?.(s),n()},100);s=t.requestVideoFrameCallback(n)}):Promise.resolve()}function YS(t){if(t.motionlyFramePumpActive)return;t.motionlyFramePumpActive=!0;const e=()=>{t.motionlyFramePumpActive&&(jd(t),t.requestVideoFrameCallback?(t.motionlyFrameCallbackType="rvfc",t.motionlyFrameCallback=t.requestVideoFrameCallback(e)):(t.motionlyFrameCallbackType="raf",t.motionlyFrameCallback=requestAnimationFrame(e)))};e()}function rd(t){t.motionlyFramePumpActive=!1,t.motionlyFrameCallback!==void 0&&(t.motionlyFrameCallbackType==="rvfc"?t.cancelVideoFrameCallback?.(t.motionlyFrameCallback):cancelAnimationFrame(t.motionlyFrameCallback),t.motionlyFrameCallback=void 0)}function jd(t){const e=t.motionlyPreviewFrame;if(!e||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t.seeking||!t.videoWidth||!t.videoHeight)return;const i=e.getContext("2d");if(i)try{i.drawImage(t,0,0,e.width,e.height)}catch{}}async function KS(t){if(Number.isFinite(t.duration)&&t.duration>0)return t.duration;const e=yo(t,"seeked");t.currentTime=Number.MAX_SAFE_INTEGER,await e;const i=t.duration,s=yo(t,"seeked");return t.currentTime=0,await s,Number.isFinite(i)&&i>0?i:0}function XS(t){const e=new DOMParser().parseFromString(t,"image/svg+xml").documentElement,i=e.getAttribute("viewBox")?.split(/\s+/).map(Number),s=i?.[2]??Number.parseFloat(e.getAttribute("width")??"1"),n=i?.[3]??Number.parseFloat(e.getAttribute("height")??"1"),a=Array.from(e.querySelectorAll("path[d]")).map((l,c)=>{const u=ZS(l),d=l.getAttribute("stroke")??u.stroke??"none",f=l.getAttribute("fill")??u.fill??"#000000";let p=s+n;try{p=l.getTotalLength()}catch{}return{d:l.getAttribute("d")??"",fill:f.startsWith("url(")?c?"#ffffff":"#8ab4ff":f,fillOpacity:Number.parseFloat(l.getAttribute("fill-opacity")??u.fillOpacity??"1"),stroke:d.startsWith("url(")?c?"#ffffff":"#8ab4ff":d,strokeWidth:Number.parseFloat(l.getAttribute("stroke-width")??u.strokeWidth??"1"),opacity:Number.parseFloat(l.getAttribute("stroke-opacity")??u.strokeOpacity??"1"),lineCap:l.getAttribute("stroke-linecap")||"butt",lineJoin:l.getAttribute("stroke-linejoin")||"miter",length:Math.max(1,p)}}),o=JS(t,e);return{width:s,height:n,animated:o,paths:a}}function JS(t,e){return!!(e?.querySelector("animate, animateMotion, animateTransform, set")||/<(?:animate|animateMotion|animateTransform|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(t))}function ZS(t){const e=Object.fromEntries((t.getAttribute("style")??"").split(";").map(i=>i.split(":",2).map(s=>s.trim())).filter(i=>i.length===2&&!!i[0]));return{fill:e.fill??"",fillOpacity:e["fill-opacity"]??"",stroke:e.stroke??"",strokeOpacity:e["stroke-opacity"]??"",strokeWidth:e["stroke-width"]??""}}function QS(t){return t.startsWith("data:image/gif")||/\.gif(?:[?#]|$)/i.test(t)}function tk(t){return/^data:video\/(?:mp4|quicktime)/i.test(t)||/\.(?:mp4|mov|m4v)(?:[?#]|$)/i.test(t)||/motionly-filename=[^#]*(?:mp4|mov|m4v)(?:[&#]|$)/i.test(t)}class B_{canvas;context;maskCanvas;maskContext;constructor(e){this.canvas=e;const i=e.getContext("2d",{alpha:!1});if(!i)throw new Error("Failed to get 2D rendering context");this.context=i,this.maskCanvas=e.ownerDocument.createElement("canvas");const s=this.maskCanvas.getContext("2d");if(!s)throw new Error("Failed to create mask rendering context");this.maskContext=s}resize(e,i){this.canvas.width!==e&&(this.canvas.width=e),this.canvas.height!==i&&(this.canvas.height=i),this.maskCanvas.width!==e&&(this.maskCanvas.width=e),this.maskCanvas.height!==i&&(this.maskCanvas.height=i)}render(e,i=new Map,s=1){const{canvas:n,camera:a,elements:o}=e,l=Math.max(.05,Math.min(1,Number.isFinite(s)?s:1));this.resize(Math.max(1,Math.round(n.width*l)),Math.max(1,Math.round(n.height*l)));const c=this.context;c.save(),c.setTransform(l,0,0,l,0,0),c.imageSmoothingEnabled=!0,c.imageSmoothingQuality="high",c.globalAlpha=1,c.filter="none",c.fillStyle=n.background,c.fillRect(0,0,n.width,n.height);const u=ek(o),d=E_(u),f=new Map(u.map(p=>[p.id,p]));c.save(),nk(c,n,a);for(const p of u)p.render.layer!=="effects"&&!d.has(p.id)&&Dp(c,n,p,i,f,this.maskCanvas,this.maskContext);c.restore();for(const p of u)p.render.layer==="effects"&&!d.has(p.id)&&Dp(c,n,p,i,f,this.maskCanvas,this.maskContext);c.restore()}measureText(e,i,s,n){return this.context.font=`${n} ${s}px ${i}`,this.context.measureText(e)}}function ek(t){const e=new Map,i=[];for(const s of t){const n=s.properties,a=n.textGroup;if(!a||n.textSplit!=="words"){i.push(s);continue}e.has(a)||e.set(a,[]),e.get(a).push(s)}for(const s of e.values())i.push(...ik(s));return i}function ik(t){if(t.length===0)return t;const e=sk(),i=t[0].render,s=i.textGroupX??0;e.font=`${i.weight} ${i.size}px ${i.font}`;const n=t.map(c=>{const u=c.render;return e.measureText(String(u.value)).width}),a=e.measureText(" ").width;let l=-(n.reduce((c,u)=>c+u,0)+a*(t.length-1))/2;return t.map((c,u)=>{const d=n[u],f=l+d/2;l+=d+a;const p=c.properties,v=c.render,g=p.x,_=v.x,x=typeof _=="number"&&typeof g=="number"?_-g:0;return{...c,render:{...c.render,x:s+f+x}}})}let gu;function sk(){return typeof document>"u"?Np:(gu||(gu=document.createElement("canvas")),gu.getContext("2d")??Np)}const Np={font:"",measureText(t){const e=Number.parseFloat(this.font.match(/(\d+(?:\.\d+)?)px/)?.[1]??"16");return{width:String(t).length*e*.52}}};function nk(t,e,i){const s=i,n=s.zoom??1,a=s.rotation??0,o=s.x??0,l=s.y??0;t.translate(e.width/2,e.height/2),t.scale(n,n),t.rotate(a*Math.PI/180),t.translate(-(e.width/2)-o,-(e.height/2)-l)}function E_(t){const e=new Set;for(const i of t){const s=i.render,n=String(s.mask??"");n&&n!=="none"&&s.maskVisible!==!0&&e.add(n)}return e}function Dp(t,e,i,s,n,a,o){const l=i.render,c=String(l.mask??""),u=c&&c!=="none"?n.get(c):void 0;if(!u){yu(t,e,i,s,n);return}o.save(),o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,a.width,a.height),o.restore(),o.save(),o.setTransform(t.getTransform()),o.globalAlpha=1,o.filter="none",o.globalCompositeOperation="source-over",yu(o,e,i,s,n),o.globalCompositeOperation=l.maskInvert===!0?"destination-out":"destination-in",yu(o,e,u,s,n),o.restore(),t.save(),t.setTransform(1,0,0,1,0,0),t.globalAlpha=1,t.filter="none",t.drawImage(a,0,0),t.restore()}function yu(t,e,i,s,n){const a=i.render,o=a.opacity;if(o<=0)return;t.save(),t.globalAlpha=o;const l=Sk(a);l!=="none"&&(t.filter=l),i.kind==="text"?lk(t,e,a):i.kind==="overlay"?uk(t,e,a,s,n):i.kind==="effect"?mk(t,e,a):rk(t,e,i,a,s),t.restore()}function rk(t,e,i,s,n){const a=i.assetName;if(!a)return;const o=n.get(a);if(!o)return;const l=Pr(o)?o.motionlyPreviewFrame:o;if(!l?.width||!l.height)return;const c=T_(e,o,s);P_(t,s);const u=s.rotation??0,d=s.scale??1,f=er(s.originX,.5),p=er(s.originY,.5),v=-c.width*f,g=-c.height*p;t.translate(c.x+c.width*f,c.y+c.height*p),t.rotate(u*Math.PI/180),Kl(t,s),t.scale(d,d),pk(t,c.width,c.height,s,v,g);const _=s.pathProgress;if(typeof _=="number"&&o.motionlySvg?.paths.length)ak(t,o,c,_,v,g,s);else if(o.motionlySvg?.paths.length&&!o.motionlySvg.animated&&(s.fill!==void 0||s.stroke!==void 0||s.strokeWidth!==void 0))ok(t,o.motionlySvg,c,v,g,s);else try{t.drawImage(l,v,g,c.width,c.height)}catch(x){if(!Pr(o))throw x}}function ak(t,e,i,s,n,a,o){const l=e.motionlySvg;if(!l)return;const c=Math.max(0,Math.min(1,s)),u=Math.max(0,Math.min(1,(c-.72)/.28));if(u>0&&(t.save(),t.globalAlpha*=u,t.drawImage(e,n,a,i.width,i.height),t.restore()),c>=1)return;t.save(),t.translate(n,a),t.scale(i.width/l.width,i.height/l.height);const d=t.globalAlpha;for(const f of l.paths)f.stroke!=="none"&&(t.strokeStyle=String(o.stroke??f.stroke),t.globalAlpha=d*f.opacity,t.lineWidth=er(o.strokeWidth,f.strokeWidth),t.lineCap=f.lineCap,t.lineJoin=f.lineJoin,t.setLineDash([f.length,f.length]),t.lineDashOffset=f.length*(1-c),t.stroke(U_(f)));t.restore()}function ok(t,e,i,s,n,a){t.save(),t.translate(s,n),t.scale(i.width/e.width,i.height/e.height);const o=t.globalAlpha;for(const l of e.paths){const c=U_(l),u=String(a.fill??l.fill),d=String(a.stroke??l.stroke);u!=="none"&&(t.globalAlpha=o*l.fillOpacity,t.fillStyle=u,t.fill(c)),d!=="none"&&(t.globalAlpha=o*l.opacity,t.strokeStyle=d,t.lineWidth=er(a.strokeWidth,l.strokeWidth),t.lineCap=l.lineCap,t.lineJoin=l.lineJoin,t.stroke(c))}t.restore()}const Rp=new WeakMap;function U_(t){const e=Rp.get(t);if(e)return e;const i=new Path2D(t.d);return Rp.set(t,i),i}function lk(t,e,i){P_(t,i),t.fillStyle=i.color??"#fff",t.font=`${i.weight} ${i.size}px ${i.font}`,t.textBaseline="middle",t.textAlign="center";const s=i.center,n=s?e.width/2+(i.x??0):i.x??0,a=s?e.height/2+(i.y??0):i.y??0,o=i.rotation??0,l=i.scale??1,c=typeof i.countDecimals=="number"?Sw(i.value,String(i.countSeparator??""),i.countDecimals):String(i.value??""),u=i.tracking??0;t.translate(n,a),t.rotate(o*Math.PI/180),Kl(t,i),t.scale(l,l),ck(t,c,0,0,u)}function ck(t,e,i,s,n){if(!n){t.fillText(e,i,s);return}const a=Array.from(e),o=a.map(u=>t.measureText(u).width),l=o.reduce((u,d)=>u+d,0)+n*(a.length-1);let c=i-l/2;t.textAlign="left";for(let u=0;u<a.length;u+=1){const d=a[u],f=o[u];d&&f!==void 0&&(t.fillText(d,c,s),c+=f+n)}}function uk(t,e,i,s,n){const a=String(i.parent??"");if(a){dk(t,e,i,a,s,n);return}t.fillStyle=i.fill??"#000";const o=i.revealProgress;if(typeof o=="number"){const l=Math.max(0,Math.min(1,o));if(i.revealStyle==="iris"){t.beginPath(),t.arc(e.width/2,e.height/2,Math.hypot(e.width,e.height)*l/2,0,Math.PI*2),t.fill();return}const c=String(i.revealDirection??"right");c==="left"?t.fillRect(e.width*(1-l),0,e.width*l,e.height):c==="up"?t.fillRect(0,e.height*(1-l),e.width,e.height*l):c==="down"?t.fillRect(0,0,e.width,e.height*l):t.fillRect(0,0,e.width*l,e.height);return}t.fillRect(0,0,e.width,e.height)}function dk(t,e,i,s,n,a){const o=a.get(s);if(!o||o.kind!=="image"&&o.kind!=="asset")return;const l=o.render,c=Number(l.opacity??1);if(c<=0)return;const u=o.assetName,d=u?n.get(u):void 0;if(!d)return;const f=T_(e,d,l),p=d.width||f.width,v=d.height||f.height,g=Number(l.rotation??0),_=Number(l.scale??1),x=er(l.originX,.5),E=er(l.originY,.5);t.save(),t.globalAlpha*=c,t.translate(f.x+f.width*x,f.y+f.height*E),t.rotate(g*Math.PI/180),Kl(t,l),t.scale(_,_),t.translate(-f.width*x,-f.height*E),t.scale(f.width/p,f.height/v),i.clip&&(t.beginPath(),t.rect(0,0,p,v),t.clip());const I=Number(i.x??0),z=Number(i.y??0),$=Number(i.scale??1),M=Number(i.rotation??0),V=String(i.shape??"rect");t.translate(I,z),t.rotate(M*Math.PI/180),Kl(t,i),t.scale($,$),fk(t,V,i,p,v,I,z),t.restore()}function fk(t,e,i,s,n,a,o){const l=String(i.fill??"none"),c=String(i.stroke??"none"),u=Number(i.strokeWidth??4),d=Number(i.width??120),f=Number(i.height??80),p=Number(i.radius??48),v=Number(i.radiusX??p),g=Number(i.radiusY??p),_=Math.max(0,Math.min(1,Number(i.pathProgress??1)));if(t.lineWidth=u,t.lineCap="round",t.lineJoin="round",l!=="none"&&(t.fillStyle=l),c!=="none"&&(t.strokeStyle=c),e==="text"){t.fillStyle=l==="none"?String(i.color??"#fff"):l,t.font=`${Number(i.weight??700)} ${Number(i.size??48)}px ${String(i.font??"sans-serif")}`,t.textAlign="center",t.textBaseline="middle",t.fillText(String(i.value??""),0,0);return}if(e==="arrow"||e==="line"){hk(t,i,_,e==="arrow");return}if(e==="spotlight"){const E=Math.max(0,Math.min(1,Number(i.revealProgress??1))),I=new Path2D;I.rect(-a,-o,s,n),I.ellipse(0,0,v*E,g*E,0,0,Math.PI*2),t.fillStyle=l==="none"?"rgba(0, 0, 0, 0.58)":l,t.fill(I,"evenodd");return}const x=new Path2D;if(e==="circle")x.arc(0,0,p,-Math.PI/2,-Math.PI/2+Math.PI*2*_);else if(e==="ellipse")x.ellipse(0,0,v,g,0,-Math.PI/2,-Math.PI/2+Math.PI*2*_);else if(e==="path"){const E=String(i.path??"");if(!E)return;const I=new Path2D(E);l!=="none"&&t.fill(I),c!=="none"&&t.stroke(I);return}else x.rect(-d/2,-f/2,d,f);l!=="none"&&_>=1&&t.fill(x),c!=="none"&&t.stroke(x)}function hk(t,e,i,s){const n=Number(e.x2??0),a=Number(e.y2??0),o=n*i,l=a*i;if(t.beginPath(),t.moveTo(0,0),t.lineTo(o,l),t.stroke(),!s||i<.92)return;const c=Math.atan2(a,n),u=Math.max(10,Number(e.strokeWidth??4)*3.5);t.beginPath(),t.moveTo(o,l),t.lineTo(o-u*Math.cos(c-Math.PI/6),l-u*Math.sin(c-Math.PI/6)),t.moveTo(o,l),t.lineTo(o-u*Math.cos(c+Math.PI/6),l-u*Math.sin(c+Math.PI/6)),t.stroke()}function Kl(t,e){const i=Math.tan((e.skewX??0)*Math.PI/180),s=Math.tan((e.skewY??0)*Math.PI/180);(i||s)&&t.transform(1,s,i,1,0,0)}function pk(t,e,i,s,n=-e/2,a=-i/2){const o=s.revealProgress;if(typeof o!="number")return;const l=Math.max(0,Math.min(1,o)),c=String(s.revealDirection??"right");t.beginPath(),c==="left"?t.rect(n+e-e*l,a,e*l,i):c==="up"?t.rect(n,a+i-i*l,e,i*l):c==="down"?t.rect(n,a,e,i*l):t.rect(n,a,e*l,i),t.clip()}function mk(t,e,i){const s=i.effect;if(s==="noise"){xk(t,e,i);return}if(s==="grid"||s==="mesh"){gk(t,e,i);return}if(s==="rippleGrid"||s==="ripple-grid"){bk(t,e,i);return}if(s==="prism"){yk(t,e,i);return}vk(t,e,i)}function vk(t,e,i){const s=i.offset??0,n=i.effect??"gradientMotion",a=e.width*(.18+.68*s),o=e.height*(.32+.2*Math.sin(s*Math.PI*2)),l=t.createRadialGradient(a,o,0,a,o,e.width*.62),c=_k(n);l.addColorStop(0,c[0]),l.addColorStop(.42,c[1]),l.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=l,t.fillRect(0,0,e.width,e.height)}function _k(t){return t==="aurora"?["rgba(124, 247, 197, 0.32)","rgba(138, 180, 255, 0.2)"]:t==="codeGlow"?["rgba(88, 101, 242, 0.3)","rgba(124, 247, 197, 0.14)"]:t==="heroGlow"?["rgba(255, 255, 255, 0.18)","rgba(138, 180, 255, 0.18)"]:["rgba(124, 247, 197, 0.34)","rgba(138, 180, 255, 0.2)"]}function gk(t,e,i){const s=(i.offset??0)*48;t.strokeStyle="rgba(255, 255, 255, 0.055)",t.lineWidth=1;for(let n=-48+s;n<e.width+48;n+=48)t.beginPath(),t.moveTo(n,0),t.lineTo(n,e.height),t.stroke();for(let n=-48+s;n<e.height+48;n+=48)t.beginPath(),t.moveTo(0,n),t.lineTo(e.width,n),t.stroke()}function yk(t,e,i){const s=i.offset??0,n=i.intensity??1,a=e.width*(.5+Math.sin(s*Math.PI*2)*.08)+(i.x??0),o=e.height*(.54+Math.cos(s*Math.PI*2)*.04)+(i.y??0),l=e.height*.82,c=e.width*.32,u=s*Math.PI*2,d=t.createRadialGradient(a,o,0,a,o,e.width*.72);d.addColorStop(0,`rgba(138, 180, 255, ${.16*n})`),d.addColorStop(.42,`rgba(124, 247, 197, ${.08*n})`),d.addColorStop(1,"rgba(0, 0, 0, 0)"),t.fillStyle=d,t.fillRect(0,0,e.width,e.height),t.save(),t.translate(a,o),t.rotate(Math.sin(u)*.12);for(let p=0;p<7;p+=1){const v=p/6,g=-l*.42+v*l*.82,_=c*(1-Math.abs(v-.5)*1.35),x=170+Math.sin(u*1.8+p*.8)*80,E=(.17-p*.013)*n;t.beginPath(),t.moveTo(0,-l*.5),t.lineTo(-_,g),t.lineTo(0,l*.46),t.lineTo(_,g),t.closePath(),t.strokeStyle=`hsla(${x}, 92%, 72%, ${E})`,t.lineWidth=3+p*3.5,t.stroke()}const f=t.createLinearGradient(0,-l*.5,0,l*.5);f.addColorStop(0,`rgba(255, 255, 255, ${.18*n})`),f.addColorStop(.45,`rgba(138, 180, 255, ${.08*n})`),f.addColorStop(1,"rgba(124, 247, 197, 0)"),t.fillStyle=f,t.beginPath(),t.moveTo(0,-l*.48),t.lineTo(-c*.45,l*.28),t.lineTo(0,l*.48),t.lineTo(c*.45,l*.28),t.closePath(),t.fill(),t.restore()}function bk(t,e,i){const s=i.offset??0,n=i.intensity??1,a=i.gridSize??56,o=34*n,l=e.width/2,c=e.height/2,u=Math.hypot(l,c);t.lineWidth=i.gridThickness??1,t.strokeStyle=i.color??"rgba(255, 255, 255, 0.22)";for(let f=-a;f<=e.width+a;f+=a){t.beginPath();for(let p=0;p<=e.height;p+=18){const v=Math.hypot(f-l,p-c)/u,g=Math.sin(v*28-s*Math.PI*6)*o*(1-v);p===0?t.moveTo(f+g,p):t.lineTo(f+g,p)}t.stroke()}for(let f=-a;f<=e.height+a;f+=a){t.beginPath();for(let p=0;p<=e.width;p+=18){const v=Math.hypot(p-l,f-c)/u,g=Math.sin(v*28-s*Math.PI*6)*o*(1-v);p===0?t.moveTo(p,f+g):t.lineTo(p,f+g)}t.stroke()}const d=t.createRadialGradient(l,c,e.width*.18,l,c,e.width*.7);d.addColorStop(0,"rgba(0, 0, 0, 0)"),d.addColorStop(1,"rgba(0, 0, 0, 0.72)"),t.fillStyle=d,t.fillRect(0,0,e.width,e.height)}function xk(t,e,i){const n=Math.floor((i.offset??0)*60);t.fillStyle="rgba(255, 255, 255, 0.32)";for(let a=0;a<e.height;a+=6)for(let o=0;o<e.width;o+=6)wk(o,a,n)>.92&&t.fillRect(o,a,1,1)}function wk(t,e,i){const s=Math.sin(t*12.9898+e*78.233+i*37.719)*43758.5453;return s-Math.floor(s)}function T_(t,e,i){const s=e.width,n=e.height,a=i.cover,o=i.center,l=i.x??0,c=i.y??0,u=i.width,d=i.height;if(a){const _=i.overscan??1.18,x=Math.max(t.width/s,t.height/n)*_,E=s*x,I=n*x;return{x:(t.width-E)/2+l,y:(t.height-I)/2+c,width:E,height:I}}const f=u??(d?s*(d/n):s),p=d??n*(f/s),v=o?(t.width-f)/2+l:l,g=o?(t.height-p)/2+c:c;return{x:v,y:g,width:f,height:p}}function er(t,e){const i=typeof t=="number"?t:Number(t);return Number.isFinite(i)?i:e}function fr(t,e,i,s){return Math.min(s,Math.max(i,er(t,e)))}function Sk(t){const e=[],i=fr(t.blur,0,0,100),s=fr(t.brightness,1,0,10),n=fr(t.contrast,1,0,10),a=fr(t.saturation,1,0,10),o=er(t.hue,0),l=fr(t.grayscale,0,0,1),c=fr(t.sepia,0,0,1),u=fr(t.invert,0,0,1);return i!==0&&e.push(`blur(${i}px)`),s!==1&&e.push(`brightness(${s})`),n!==1&&e.push(`contrast(${n})`),a!==1&&e.push(`saturate(${a})`),o!==0&&e.push(`hue-rotate(${o}deg)`),l!==0&&e.push(`grayscale(${l})`),c!==0&&e.push(`sepia(${c})`),u!==0&&e.push(`invert(${u})`),e.length?e.join(" "):"none"}function P_(t,e){const i=e.shadow;if(!i){t.shadowBlur=0;return}t.shadowColor="rgba(0, 0, 0, 0.28)",t.shadowBlur=i,t.shadowOffsetY=i/3}var Lp=Object.defineProperty,A_=(t,e)=>{let i={};for(var s in t)Lp(i,s,{get:t[s],enumerable:!0});return Lp(i,Symbol.toStringTag,{value:"Module"}),i};const bu=Math.pow(2,32),bi=Math.pow(2,32)-1,kk=131072,Bk=1024,Ek=2048;var Fn=class I_ extends ArrayBuffer{constructor(e){super(e),this.fileStart=0,this.usedBytes=0}static fromArrayBuffer(e,i){const s=new I_(e.byteLength);return new Uint8Array(s).set(new Uint8Array(e)),s.fileStart=i,s}},Hi=class Pe{static{this.ENDIANNESS=new Int8Array(new Int16Array([1]).buffer)[0]>0?2:1}constructor(e,i,s){this._byteLength=0,this.failurePosition=0,this._dynamicSize=1,this._byteOffset=i||0,e instanceof ArrayBuffer?this.buffer=Fn.fromArrayBuffer(e,0):e instanceof DataView?(this.dataView=e,i&&(this._byteOffset+=i)):this.buffer=new Fn(e||0),this.position=0,this.endianness=s||1}getPosition(){return this.position}_realloc(e){if(!this._dynamicSize)return;const i=this._byteOffset+this.position+e;let s=this._buffer.byteLength;if(i<=s){i>this._byteLength&&(this._byteLength=i);return}for(s<1&&(s=1);i>s;)s*=2;const n=new Fn(s),a=new Uint8Array(this._buffer);new Uint8Array(n,0,a.length).set(a),this.buffer=n,this._byteLength=i}_trimAlloc(){if(this._byteLength===this._buffer.byteLength)return;const e=new Fn(this._byteLength),i=new Uint8Array(e),s=new Uint8Array(this._buffer,0,i.length);i.set(s),this.buffer=e}get byteLength(){return this._byteLength-this._byteOffset}get buffer(){return this._trimAlloc(),this._buffer}set buffer(e){this._buffer=e,this._dataView=new DataView(e,this._byteOffset),this._byteLength=e.byteLength}get byteOffset(){return this._byteOffset}set byteOffset(e){this._byteOffset=e,this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._buffer.byteLength}get dataView(){return this._dataView}set dataView(e){this._byteOffset=e.byteOffset,this._buffer=Fn.fromArrayBuffer(e.buffer,0),this._dataView=new DataView(this._buffer,this._byteOffset),this._byteLength=this._byteOffset+e.byteLength}seek(e){const i=Math.max(0,Math.min(this.byteLength,e));this.position=isNaN(i)||!isFinite(i)?0:i}isEof(){return this.position>=this._byteLength}#t(e){return Array.isArray(e)&&e.length===3&&e[0]==="[]"}mapUint8Array(e){this._realloc(e*1);const i=new Uint8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=e*1,i}readInt32Array(e,i){e=e===void 0?this.byteLength-this.position/4:e;const s=new Int32Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readInt16Array(e,i){e=e===void 0?this.byteLength-this.position/2:e;const s=new Int16Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readInt8Array(e){e=e===void 0?this.byteLength-this.position:e;const i=new Int8Array(e);return Pe.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),this.position+=i.byteLength,i}readUint32Array(e,i){e=e===void 0?this.byteLength-this.position/4:e;const s=new Uint32Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readUint16Array(e,i){e=e===void 0?this.byteLength-this.position/2:e;const s=new Uint16Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readUint8Array(e){e=e===void 0?this.byteLength-this.position:e;const i=new Uint8Array(e);return Pe.memcpy(i.buffer,0,this.buffer,this.byteOffset+this.position,e*i.BYTES_PER_ELEMENT),this.position+=i.byteLength,i}readFloat64Array(e,i){e=e===void 0?this.byteLength-this.position/8:e;const s=new Float64Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readFloat32Array(e,i){e=e===void 0?this.byteLength-this.position/4:e;const s=new Float32Array(e);return Pe.memcpy(s.buffer,0,this.buffer,this.byteOffset+this.position,e*s.BYTES_PER_ELEMENT),Pe.arrayToNative(s,i??this.endianness),this.position+=s.byteLength,s}readInt32(e){const i=this._dataView.getInt32(this.position,(e??this.endianness)===2);return this.position+=4,i}readInt16(e){const i=this._dataView.getInt16(this.position,(e??this.endianness)===2);return this.position+=2,i}readInt8(){const e=this._dataView.getInt8(this.position);return this.position+=1,e}readUint32(e){const i=this._dataView.getUint32(this.position,(e??this.endianness)===2);return this.position+=4,i}readUint16(e){const i=this._dataView.getUint16(this.position,(e??this.endianness)===2);return this.position+=2,i}readUint8(){const e=this._dataView.getUint8(this.position);return this.position+=1,e}readFloat32(e){const i=this._dataView.getFloat32(this.position,(e??this.endianness)===2);return this.position+=4,i}readFloat64(e){const i=this._dataView.getFloat64(this.position,(e??this.endianness)===2);return this.position+=8,i}static memcpy(e,i,s,n,a){const o=new Uint8Array(e,i,a),l=new Uint8Array(s,n,a);o.set(l)}static arrayToNative(e,i){return i===Pe.ENDIANNESS?e:this.flipArrayEndianness(e)}static nativeToEndian(e,i){return i&&Pe.ENDIANNESS===2?e:this.flipArrayEndianness(e)}static flipArrayEndianness(e){const i=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);for(let s=0;s<e.byteLength;s+=e.BYTES_PER_ELEMENT)for(let n=s+e.BYTES_PER_ELEMENT-1,a=s;n>a;n--,a++){const o=i[a];i[a]=i[n],i[n]=o}return e}readString(e,i){return i===void 0||i==="ASCII"?Hp(this.mapUint8Array(e===void 0?this.byteLength-this.position:e)):new TextDecoder(i).decode(this.mapUint8Array(e))}readCString(e){let i=0;const s=this.byteLength-this.position,n=new Uint8Array(this._buffer,this._byteOffset+this.position),a=e!==void 0?Math.min(e,s):s;for(;i<a&&n[i]!==0;i++);const o=Hp(this.mapUint8Array(i));return e!==void 0?this.position+=a-i:i!==s&&(this.position+=1),o}readInt64(){return this.readInt32()*bu+this.readUint32()}readUint64(){return this.readUint32()*bu+this.readUint32()}readUint24(){return(this.readUint8()<<16)+(this.readUint8()<<8)+this.readUint8()}save(e){const i=new Blob([this.buffer]);if(typeof window<"u"&&typeof document<"u")if(window.URL&&URL.createObjectURL){const s=window.URL.createObjectURL(i),n=document.createElement("a");document.body.appendChild(n),n.setAttribute("href",s),n.setAttribute("download",e),n.setAttribute("target","_self"),n.click(),window.URL.revokeObjectURL(s),document.body.removeChild(n)}else throw new Error("DataStream.save: Can't create object URL.");return i}get dynamicSize(){return this._dynamicSize}set dynamicSize(e){e||this._trimAlloc(),this._dynamicSize=e}shift(e){const i=new Fn(this._byteLength-e),s=new Uint8Array(i),n=new Uint8Array(this._buffer,e,s.length);s.set(n),this.buffer=i,this.position-=e}writeInt32Array(e,i){if(this._realloc(e.length*4),e instanceof Int32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt32Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeInt32(e[s],i)}writeInt16Array(e,i){if(this._realloc(e.length*2),e instanceof Int16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt16Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeInt16(e[s],i)}writeInt8Array(e){if(this._realloc(e.length*1),e instanceof Int8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapInt8Array(e.length);else for(let i=0;i<e.length;i++)this.writeInt8(e[i])}writeUint32Array(e,i){if(this._realloc(e.length*4),e instanceof Uint32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint32Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeUint32(e[s],i)}writeUint16Array(e,i){if(this._realloc(e.length*2),e instanceof Uint16Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint16Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeUint16(e[s],i)}writeUint8Array(e){if(this._realloc(e.length*1),e instanceof Uint8Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapUint8Array(e.length);else for(let i=0;i<e.length;i++)this.writeUint8(e[i])}writeFloat64Array(e,i){if(this._realloc(e.length*8),e instanceof Float64Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat64Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeFloat64(e[s],i)}writeFloat32Array(e,i){if(this._realloc(e.length*4),e instanceof Float32Array&&this.byteOffset+this.position%e.BYTES_PER_ELEMENT===0)Pe.memcpy(this._buffer,this.byteOffset+this.position,e.buffer,0,e.byteLength),this.mapFloat32Array(e.length,i);else for(let s=0;s<e.length;s++)this.writeFloat32(e[s],i)}writeInt64(e,i){this._realloc(8),this._dataView.setBigInt64(this.position,BigInt(e),(i??this.endianness)===2),this.position+=8}writeInt32(e,i){this._realloc(4),this._dataView.setInt32(this.position,e,(i??this.endianness)===2),this.position+=4}writeInt16(e,i){this._realloc(2),this._dataView.setInt16(this.position,e,(i??this.endianness)===2),this.position+=2}writeInt8(e){this._realloc(1),this._dataView.setInt8(this.position,e),this.position+=1}writeUint32(e,i){this._realloc(4),this._dataView.setUint32(this.position,e,(i??this.endianness)===2),this.position+=4}writeUint16(e,i){this._realloc(2),this._dataView.setUint16(this.position,e,(i??this.endianness)===2),this.position+=2}writeUint8(e){this._realloc(1),this._dataView.setUint8(this.position,e),this.position+=1}writeFloat32(e,i){this._realloc(4),this._dataView.setFloat32(this.position,e,(i??this.endianness)===2),this.position+=4}writeFloat64(e,i){this._realloc(8),this._dataView.setFloat64(this.position,e,(i??this.endianness)===2),this.position+=8}writeUCS2String(e,i,s){s===void 0&&(s=e.length);let n;for(n=0;n<e.length&&n<s;n++)this.writeUint16(e.charCodeAt(n),i);for(;n<s;n++)this.writeUint16(0)}writeString(e,i,s){let n=0;if(i===void 0||i==="ASCII")if(s!==void 0){const a=Math.min(e.length,s);for(n=0;n<a;n++)this.writeUint8(e.charCodeAt(n));for(;n<s;n++)this.writeUint8(0)}else for(n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));else this.writeUint8Array(new TextEncoder(i).encode(e.substring(0,s)))}writeCString(e,i){let s=0;if(i!==void 0){const n=Math.min(e.length,i);for(s=0;s<n;s++)this.writeUint8(e.charCodeAt(s));for(;s<i;s++)this.writeUint8(0)}else{for(s=0;s<e.length;s++)this.writeUint8(e.charCodeAt(s));this.writeUint8(0)}}writeStruct(e,i){for(let s=0;s<e.length;s++){const[n,a]=e[s],o=i[n];this.writeType(a,o,i)}}writeType(e,i,s){if(typeof e=="function")return e(this,i);if(typeof e=="object"&&!(e instanceof Array))return e.set(this,i,s);let n,a="ASCII";const o=this.position;let l=e;if(typeof e=="string"&&/:/.test(e)){const c=e.split(":");l=c[0],n=parseInt(c[1])}if(typeof l=="string"&&/,/.test(l)){const c=l.split(",");l=c[0],a=c[1]}switch(l){case"uint8":this.writeUint8(i);break;case"int8":this.writeInt8(i);break;case"uint16":this.writeUint16(i,this.endianness);break;case"int16":this.writeInt16(i,this.endianness);break;case"uint32":this.writeUint32(i,this.endianness);break;case"int32":this.writeInt32(i,this.endianness);break;case"float32":this.writeFloat32(i,this.endianness);break;case"float64":this.writeFloat64(i,this.endianness);break;case"uint16be":this.writeUint16(i,1);break;case"int16be":this.writeInt16(i,1);break;case"uint32be":this.writeUint32(i,1);break;case"int32be":this.writeInt32(i,1);break;case"float32be":this.writeFloat32(i,1);break;case"float64be":this.writeFloat64(i,1);break;case"uint16le":this.writeUint16(i,2);break;case"int16le":this.writeInt16(i,2);break;case"uint32le":this.writeUint32(i,2);break;case"int32le":this.writeInt32(i,2);break;case"float32le":this.writeFloat32(i,2);break;case"float64le":this.writeFloat64(i,2);break;case"cstring":this.writeCString(i,n);break;case"string":this.writeString(i,a,n);break;case"u16string":this.writeUCS2String(i,this.endianness,n);break;case"u16stringle":this.writeUCS2String(i,2,n);break;case"u16stringbe":this.writeUCS2String(i,1,n);break;default:if(this.#t(l)){const[,c]=l;for(let u=0;u<i.length;u++)this.writeType(c,i[u]);break}else{this.writeStruct(l,i);break}}n&&(this.position=o,this._realloc(n),this.position=o+n)}writeUint64(e){const i=Math.floor(e/bu);this.writeUint32(i),this.writeUint32(e&4294967295)}writeUint24(e){this.writeUint8((e&16711680)>>16),this.writeUint8((e&65280)>>8),this.writeUint8(e&255)}adjustUint32(e,i){const s=this.position;this.seek(e),this.writeUint32(i),this.seek(s)}readStruct(e){const i={},s=this.position;for(let n=0;n<e.length;n+=1){const a=e[n][1],o=this.readType(a,i);if(!o){this.failurePosition===0&&(this.failurePosition=this.position),this.position=s;return}i[e[n][0]]=o}return i}readUCS2String(e,i){return String.fromCharCode.apply(void 0,this.readUint16Array(e,i))}readType(e,i){if(typeof e=="function")return e(this,i);if(typeof e=="object"&&!(e instanceof Array))return e.get(this,i);if(e instanceof Array&&e.length!==3)return this.readStruct(e);let s,n,a="ASCII";const o=this.position;let l=e;if(typeof l=="string"&&/:/.test(l)){const c=l.split(":");l=c[0],n=parseInt(c[1])}if(typeof l=="string"&&/,/.test(l)){const c=l.split(",");l=c[0],a=c[1]}switch(l){case"uint8":s=this.readUint8();break;case"int8":s=this.readInt8();break;case"uint16":s=this.readUint16(this.endianness);break;case"int16":s=this.readInt16(this.endianness);break;case"uint32":s=this.readUint32(this.endianness);break;case"int32":s=this.readInt32(this.endianness);break;case"float32":s=this.readFloat32(this.endianness);break;case"float64":s=this.readFloat64(this.endianness);break;case"uint16be":s=this.readUint16(1);break;case"int16be":s=this.readInt16(1);break;case"uint32be":s=this.readUint32(1);break;case"int32be":s=this.readInt32(1);break;case"float32be":s=this.readFloat32(1);break;case"float64be":s=this.readFloat64(1);break;case"uint16le":s=this.readUint16(2);break;case"int16le":s=this.readInt16(2);break;case"uint32le":s=this.readUint32(2);break;case"int32le":s=this.readInt32(2);break;case"float32le":s=this.readFloat32(2);break;case"float64le":s=this.readFloat64(2);break;case"cstring":s=this.readCString(n);break;case"string":s=this.readString(n,a);break;case"u16string":s=this.readUCS2String(n,this.endianness);break;case"u16stringle":s=this.readUCS2String(n,2);break;case"u16stringbe":s=this.readUCS2String(n,1);break;default:if(this.#t(l)){const[,c,u]=l,d=typeof u=="function"?u(i,this,l):typeof u=="string"&&i[u]!==void 0?parseInt(i[u]):typeof u=="number"?u:u==="*"?void 0:parseInt(u);if(typeof c=="string"){const f=c.replace(/(le|be)$/,"");let p;switch(/le$/.test(c)?p=2:/be$/.test(c)&&(p=1),f){case"uint8":s=this.readUint8Array(d);break;case"uint16":s=this.readUint16Array(d,p);break;case"uint32":s=this.readUint32Array(d,p);break;case"int8":s=this.readInt8Array(d);break;case"int16":s=this.readInt16Array(d,p);break;case"int32":s=this.readInt32Array(d,p);break;case"float32":s=this.readFloat32Array(d,p);break;case"float64":s=this.readFloat64Array(d,p);break;case"cstring":case"utf16string":case"string":if(d){s=new Array(d);for(let v=0;v<d;v++)s[v]=this.readType(c,i)}else for(s=[];!this.isEof();){const v=this.readType(c,i);if(!v)break;s.push(v)}break}}else if(d){s=new Array(d);for(let f=0;f<d;f++){const p=this.readType(c,i);if(!p)return;s[f]=p}}else for(s=[];;){const f=this.position;try{const p=this.readType(c,i);if(!p){this.position=f;break}s.push(p)}catch{this.position=f;break}}break}}return n&&(this.position=o+n),s}mapInt32Array(e,i){this._realloc(e*4);const s=new Int32Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*4,s}mapInt16Array(e,i){this._realloc(e*2);const s=new Int16Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*2,s}mapInt8Array(e,i){this._realloc(e*1);const s=new Int8Array(this._buffer,this.byteOffset+this.position,e);return this.position+=e*1,s}mapUint32Array(e,i){this._realloc(e*4);const s=new Uint32Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*4,s}mapUint16Array(e,i){this._realloc(e*2);const s=new Uint16Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*2,s}mapFloat64Array(e,i){this._realloc(e*8);const s=new Float64Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*8,s}mapFloat32Array(e,i){this._realloc(e*4);const s=new Float32Array(this._buffer,this.byteOffset+this.position,e);return Pe.arrayToNative(s,i??this.endianness),this.position+=e*4,s}};function Hp(t){const e=[];for(let i=0;i<t.length;i++)e[i]=t[i];return String.fromCharCode.apply(void 0,e)}const cl=new Date,kl=4,Vp=3,jp=2,Gp=1;let wn=kl;const L={setLogLevel(t){t===this.debug?wn=Gp:t===this.info?wn=jp:t===this.warn?wn=Vp:(this.error,wn=kl)},debug(t,e){console.debug===void 0&&(console.debug=console.log),Gp>=wn&&console.debug("["+L.getDurationString(new Date().getTime()-cl.getTime(),1e3)+"]","["+t+"]",e)},log(t,e){this.debug(t.msg)},info(t,e){jp>=wn&&console.info("["+L.getDurationString(new Date().getTime()-cl.getTime(),1e3)+"]","["+t+"]",e)},warn(t,e){Vp>=wn&&console.warn("["+L.getDurationString(new Date().getTime()-cl.getTime(),1e3)+"]","["+t+"]",e)},error(t,e,i){i?.onError?i.onError(t,e):kl>=wn&&console.error("["+L.getDurationString(new Date().getTime()-cl.getTime(),1e3)+"]","["+t+"]",e)},getDurationString(t,e){let i;function s(c,u){const d=(""+c).split(".");for(;d[0].length<u;)d[0]="0"+d[0];return d.join(".")}t<0?(i=!0,t=-t):i=!1;let n=t/(e||1);const a=Math.floor(n/3600);n-=a*3600;const o=Math.floor(n/60);n-=o*60;let l=n*1e3;return n=Math.floor(n),l-=n*1e3,l=Math.floor(l),(i?"-":"")+a+":"+s(o,2)+":"+s(n,2)+"."+s(l,3)},printRanges(t){const e=t.length;if(e>0){let i="";for(let s=0;s<e;s++)s>0&&(i+=","),i+="["+L.getDurationString(t.start(s))+","+L.getDurationString(t.end(s))+"]";return i}else return"(empty)"}};function Uk(t,e){L.debug("ArrayBuffer","Trying to create a new buffer of size: "+(t.byteLength+e.byteLength));const i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t),0),i.set(new Uint8Array(e),t.byteLength),i.buffer}var Bl=class extends Hi{constructor(t){super(new ArrayBuffer,0),this.buffers=[],this.bufferIndex=-1,t&&(this.insertBuffer(t),this.bufferIndex=0)}initialized(){if(this.bufferIndex>-1)return!0;if(this.buffers.length>0){const t=this.buffers[0];return t.fileStart===0?(this.buffer=t,this.bufferIndex=0,L.debug("MultiBufferStream","Stream ready for parsing"),!0):(L.warn("MultiBufferStream","The first buffer should have a fileStart of 0"),this.logBufferLevel(),!1)}else return L.warn("MultiBufferStream","No buffer to start parsing from"),this.logBufferLevel(),!1}reduceBuffer(t,e,i){const s=new Uint8Array(i);return s.set(new Uint8Array(t,e,i)),s.buffer.fileStart=t.fileStart+e,s.buffer.usedBytes=0,s.buffer}insertBuffer(t){let e=!0,i=0;for(;i<this.buffers.length;i++){const s=this.buffers[i];if(t.fileStart<=s.fileStart){if(t.fileStart===s.fileStart)if(t.byteLength>s.byteLength){this.buffers.splice(i,1),i--;continue}else L.warn("MultiBufferStream","Buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+") already appended, ignoring");else t.fileStart+t.byteLength<=s.fileStart||(t=this.reduceBuffer(t,0,s.fileStart-t.fileStart)),L.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.splice(i,0,t),i===0&&(this.buffer=t);e=!1;break}else if(t.fileStart<s.fileStart+s.byteLength){const n=s.fileStart+s.byteLength-t.fileStart,a=t.byteLength-n;if(a>0)t=this.reduceBuffer(t,n,a);else{e=!1;break}}}e&&(L.debug("MultiBufferStream","Appending new buffer (fileStart: "+t.fileStart+" - Length: "+t.byteLength+")"),this.buffers.push(t),i===0&&(this.buffer=t))}logBufferLevel(t){const e=[];let i="",s,n=0,a=0;for(let l=0;l<this.buffers.length;l++){const c=this.buffers[l];l===0?(s={start:c.fileStart,end:c.fileStart+c.byteLength},e.push(s),i+="["+s.start+"-"):s.end===c.fileStart?s.end=c.fileStart+c.byteLength:(s={start:c.fileStart,end:c.fileStart+c.byteLength},i+=e[e.length-1].end-1+"], ["+s.start+"-",e.push(s)),n+=c.usedBytes,a+=c.byteLength}e.length>0&&(i+=s.end-1+"]");const o=t?L.info:L.debug;this.buffers.length===0?o("MultiBufferStream","No more buffer in memory"):o("MultiBufferStream",""+this.buffers.length+" stored buffer(s) ("+n+"/"+a+" bytes), continuous ranges: "+i)}cleanBuffers(){for(let t=0;t<this.buffers.length;t++){const e=this.buffers[t];e.usedBytes===e.byteLength&&(L.debug("MultiBufferStream","Removing buffer #"+t),this.buffers.splice(t,1),t--)}}mergeNextBuffer(){if(this.bufferIndex+1<this.buffers.length){const t=this.buffers[this.bufferIndex+1];if(t.fileStart===this.buffer.fileStart+this.buffer.byteLength){const e=this.buffer.byteLength,i=this.buffer.usedBytes,s=this.buffer.fileStart;return this.buffers[this.bufferIndex]=Uk(this.buffer,t),this.buffer=this.buffers[this.bufferIndex],this.buffers.splice(this.bufferIndex+1,1),this.buffer.usedBytes=i,this.buffer.fileStart=s,L.debug("ISOFile","Concatenating buffer for box parsing (length: "+e+"->"+this.buffer.byteLength+")"),!0}else return!1}else return!1}findPosition(t,e,i){let s=-1,n=t===!0?0:this.bufferIndex;for(;n<this.buffers.length;){const o=this.buffers[n];if(o&&o.fileStart<=e)s=n,i&&(o.fileStart+o.byteLength<=e?o.usedBytes=o.byteLength:o.usedBytes=e-o.fileStart,this.logBufferLevel());else break;n++}if(s===-1)return-1;const a=this.buffers[s];return a.fileStart+a.byteLength>=e?(L.debug("MultiBufferStream","Found position in existing buffer #"+s),s):-1}findEndContiguousBuf(t){const e=t!==void 0?t:this.bufferIndex;let i=this.buffers[e];if(this.buffers.length>e+1)for(let s=e+1;s<this.buffers.length;s++){const n=this.buffers[s];if(n.fileStart===i.fileStart+i.byteLength)i=n;else break}return i.fileStart+i.byteLength}getEndFilePositionAfter(t){const e=this.findPosition(!0,t,!1);return e!==-1?this.findEndContiguousBuf(e):t}addUsedBytes(t){this.buffer.usedBytes+=t,this.logBufferLevel()}setAllUsedBytes(){this.buffer.usedBytes=this.buffer.byteLength,this.logBufferLevel()}seek(t,e,i){const s=this.findPosition(e,t,i);return s!==-1?(this.buffer=this.buffers[s],this.bufferIndex=s,this.position=t-this.buffer.fileStart,L.debug("MultiBufferStream","Repositioning parser at buffer position: "+this.position),!0):(L.debug("MultiBufferStream","Position "+t+" not found in buffered data"),!1)}getPosition(){return this.bufferIndex===-1||this.buffers[this.bufferIndex]===void 0?0:this.buffers[this.bufferIndex].fileStart+this.position}getLength(){return this.byteLength}getEndPosition(){return this.bufferIndex===-1||this.buffers[this.bufferIndex]===void 0?0:this.buffers[this.bufferIndex].fileStart+this.byteLength}getAbsoluteEndPosition(){if(this.buffers.length===0)return 0;const t=this.buffers[this.buffers.length-1];return t.fileStart+t.byteLength}},mt=class{static{this.registryId=Symbol.for("BoxIdentifier")}#t;get type(){return this.constructor.fourcc??this.#t}set type(t){this.#t=t}constructor(t=0){this.size=t}addBox(t){return this.boxes||(this.boxes=[]),this.boxes.push(t),this[t.type+"s"]?this[t.type+"s"].push(t):this[t.type]=t,t}set(t,e){return this[t]=e,this}addEntry(t,e){const i=e||"entries";return this[i]||(this[i]=[]),this[i].push(t),this}writeHeader(t,e){if(this.size+=8,(this.size>bi||this.original_size===1)&&(this.size+=8),this.type==="uuid"&&(this.size+=16),L.debug("BoxWriter","Writing box "+this.type+" of size: "+this.size+" at position "+t.getPosition()+(e||"")),this.original_size===0?t.writeUint32(0):this.size>bi||this.original_size===1?t.writeUint32(1):(this.sizePosition=t.getPosition(),t.writeUint32(this.size)),t.writeString(this.type,void 0,4),this.type==="uuid"){const i=new Uint8Array(16);for(let s=0;s<16;s++)i[s]=parseInt(this.uuid.substring(s*2,s*2+2),16);t.writeUint8Array(i)}(this.size>bi||this.original_size===1)&&(this.sizePosition=t.getPosition(),t.writeUint64(this.size))}write(t){if(this.type==="mdat"){const e=this;if(e.stream){this.size=e.stream.getAbsoluteEndPosition(),this.writeHeader(t);for(const i of e.stream.buffers){const s=new Uint8Array(i);t.writeUint8Array(s)}}else e.data&&(this.size=e.data.length,this.writeHeader(t),t.writeUint8Array(e.data))}else this.size=this.data?this.data.length:0,this.writeHeader(t),this.data&&t.writeUint8Array(this.data)}printHeader(t){this.size+=8,this.size>bi&&(this.size+=8),this.type==="uuid"&&(this.size+=16),t.log(t.indent+"size:"+this.size),t.log(t.indent+"type:"+this.type)}print(t){this.printHeader(t)}parse(t){this.type!=="mdat"?this.data=t.readUint8Array(this.size-this.hdr_size):this.size===0?t.seek(t.getEndPosition()):t.seek(this.start+this.size)}parseDataAndRewind(t){this.data=t.readUint8Array(this.size-this.hdr_size),t.seek(this.start+this.hdr_size)}parseLanguage(t){this.language=t.readUint16();const e=[];e[0]=this.language>>10&31,e[1]=this.language>>5&31,e[2]=this.language&31,this.languageString=String.fromCharCode(e[0]+96,e[1]+96,e[2]+96)}computeSize(t){const e=t||new Bl;this.write(e)}isEndOfBox(t){return t.getPosition()===this.start+this.size}},X=class extends mt{constructor(...t){super(...t),this.flags=0,this.version=0}writeHeader(t){this.size+=4,super.writeHeader(t," v="+this.version+" f="+this.flags),t.writeUint8(this.version),t.writeUint24(this.flags)}printHeader(t){this.size+=4,super.printHeader(t),t.log(t.indent+"version:"+this.version),t.log(t.indent+"flags:"+this.flags)}parseDataAndRewind(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=4,t.seek(this.start+this.hdr_size)}parseFullHeader(t){this.version=t.readUint8(),this.flags=t.readUint24(),this.hdr_size+=4}parse(t){this.parseFullHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)}},vi=class{static{this.registryId=Symbol.for("SampleGroupEntryIdentifier")}constructor(t){this.grouping_type=t}write(t){t.writeUint8Array(this.data)}parse(t){L.warn("BoxParser",`Unknown sample group type: '${this.grouping_type}'`),this.data=t.readUint8Array(this.description_length)}},Tk=class extends X{parse(t){this.parseFullHeader(t),this.track_group_id=t.readUint32()}},Pk=class extends mt{constructor(t,e,i,s,n){super(e),this.box_name=i,this.hdr_size=s,this.start=n,this.type=t}parse(t){this.from_item_ID=t.readUint16();const e=t.readUint16();this.references=[];for(let i=0;i<e;i++)this.references[i]={to_item_ID:t.readUint16()}}},Ak=class extends mt{constructor(t,e,i,s,n){super(e),this.box_name=i,this.hdr_size=s,this.start=n,this.type=t}parse(t){this.from_item_ID=t.readUint32();const e=t.readUint16();this.references=[];for(let i=0;i<e;i++)this.references[i]={to_item_ID:t.readUint32()}}},Ik=class extends mt{constructor(t,e,i,s){super(e),this.hdr_size=i,this.start=s,this.type=t}parse(t){this.track_ids=t.readUint32Array((this.size-this.hdr_size)/4)}write(t){this.size=this.track_ids.length*4,this.writeHeader(t),t.writeUint32Array(this.track_ids)}};const ad=["boxes","entries","references","subsamples","items","item_infos","extents","associations","subsegments","ranges","seekLists","seekPoints","esd","levels"],Mk=["compatible_brands","matrix","opcolor","sample_counts","sample_deltas","first_chunk","samples_per_chunk","sample_sizes","chunk_offsets","sample_offsets","sample_description_index","sample_duration"];function zk(t,e){if(t&&!e)return!1;let i;for(i in t)if(!ad.find(s=>s===i)){if(t[i]instanceof mt||e[i]instanceof mt)continue;if(typeof t[i]>"u"||typeof e[i]>"u")continue;if(typeof t[i]=="function"||typeof e[i]=="function")continue;if("subBoxNames"in t&&t.subBoxNames.indexOf(i.slice(0,4))>-1||"subBoxNames"in e&&e.subBoxNames.indexOf(i.slice(0,4))>-1)continue;if(i==="data"||i==="start"||i==="size"||i==="creation_time"||i==="modification_time")continue;if(Mk.find(s=>s===i))continue;if(t[i]!==e[i])return!1}return!0}function M_(t,e){if(!zk(t,e))return!1;for(let i=0;i<ad.length;i++){const s=ad[i];if(t[s]&&e[s]&&!M_(t[s],e[s]))return!1}return!0}function Gd(t){let e=t;for(;e;){if("registryId"in e)return e.registryId;e=Object.getPrototypeOf(e)}}const Ck=t=>{const e=Symbol.for("SampleGroupEntryIdentifier");return Gd(t)===e},$k=t=>{const e=Symbol.for("SampleEntryIdentifier");return Gd(t)===e},Ok=t=>{const e=Symbol.for("BoxIdentifier");return Gd(t)===e},Ji={uuid:{},sampleEntry:{},sampleGroupEntry:{},box:{}};function Fk(t){const e={uuid:{},sampleEntry:{},sampleGroupEntry:{},box:{}};for(const[i,s]of Object.entries(t)){if(Ck(s)){const n="grouping_type"in s?s.grouping_type:void 0;if(!n)throw new Error(`SampleGroupEntry class ${i} does not have a valid static grouping_type. Please ensure it is defined correctly.`);if(n in e.sampleGroupEntry)throw new Error(`SampleGroupEntry class ${i} has a grouping_type that is already registered. Please ensure it is unique.`);e.sampleGroupEntry[n]=s;continue}if($k(s)){const n="fourcc"in s?s.fourcc:void 0;if(!n)throw new Error(`SampleEntry class ${i} does not have a valid static fourcc. Please ensure it is defined correctly.`);if(n in e.sampleEntry)throw new Error(`SampleEntry class ${i} has a fourcc that is already registered. Please ensure it is unique.`);e.sampleEntry[n]=s;continue}if(Ok(s)){const n="fourcc"in s?s.fourcc:void 0,a="uuid"in s?s.uuid:void 0;if(n==="uuid"){if(!a)throw new Error(`Box class ${i} has a fourcc of 'uuid' but does not have a valid uuid. Please ensure it is defined correctly.`);if(a in e.uuid)throw new Error(`Box class ${i} has a uuid that is already registered. Please ensure it is unique.`);e.uuid[a]=s;continue}e.box[n]=s;continue}throw new Error(`Box class ${i} does not have a valid static fourcc, uuid, or grouping_type. Please ensure it is defined correctly.`)}return Ji.uuid={...e.uuid},Ji.sampleEntry={...e.sampleEntry},Ji.sampleGroupEntry={...e.sampleGroupEntry},Ji.box={...e.box},Ji}const Xl={};function Nk(t){return Object.entries(t).forEach(([e,i])=>Xl[e]=i),Xl}function Dk(t){return Ar(t)}function Ar(t){let e="";for(let i=0;i<16;i++){const s=t.readUint8().toString(16);e+=s.length===1?"0"+s:s}return e}function hn(t,e,i){let s,n;const a=t.getPosition();let o=0,l;if(t.getEndPosition()-a<8)return L.debug("BoxParser","Not enough data in stream to parse the type and size of the box"),{code:0};if(i&&i<8)return L.debug("BoxParser","Not enough bytes left in the parent box to parse a new box"),{code:0};let c=t.readUint32();const u=t.readString(4);if(u.length!==4||!/^[\x20-\x7E]{4}$/.test(u))return L.error("BoxParser",`Invalid box type: '${u}'`),{code:-1,start:a,type:u};let d=u;if(L.debug("BoxParser","Found box of type '"+u+"' and size "+c+" at position "+a),o=8,u==="uuid"){if(t.getEndPosition()-t.getPosition()<16||i-o<16)return t.seek(a),L.debug("BoxParser","Not enough bytes left in the parent box to parse a UUID box"),{code:0};l=Dk(t),o+=16,d=l}if(c===1){if(t.getEndPosition()-t.getPosition()<8||i&&i-o<8)return t.seek(a),L.warn("BoxParser",'Not enough data in stream to parse the extended size of the "'+u+'" box'),{code:0};n=c,c=t.readUint64(),o+=8}else if(c===0)if(i)c=i;else{if(u!=="mdat")return L.error("BoxParser","Unlimited box size not supported for type: '"+u+"'"),s=new mt(c),s.type=u,{code:1,box:s,size:s.size};c=t.getEndPosition()-a}if(c!==0&&c<o)return L.error("BoxParser","Box of type "+u+" has an invalid size "+c+" (too small to be a box)"),{code:0,type:u,size:c,hdr_size:o,start:a};if(c!==0&&i&&c>i)return L.error("BoxParser","Box of type '"+u+"' has a size "+c+" greater than its container size "+i),{code:0,type:u,size:c,hdr_size:o,start:a};if(c!==0&&a+c>t.getEndPosition())return t.seek(a),L.info("BoxParser","Not enough data in stream to parse the entire '"+u+"' box"),{code:0,type:u,size:c,hdr_size:o,start:a,original_size:n};if(e)return{code:1,type:u,size:c,hdr_size:o,start:a};u in Ji.box?s=new Ji.box[u](c):u!=="uuid"?(L.warn("BoxParser",`Unknown box type: '${u}'`),s=new mt(c),s.type=u,s.has_unparsed_data=!0):l in Ji.uuid?s=new Ji.uuid[l](c):(L.warn("BoxParser",`Unknown UUID box type: '${l}'`),s=new mt(c),s.type=u,s.uuid=l,s.has_unparsed_data=!0),s.original_size=n,s.hdr_size=o,s.start=a,s.write===mt.prototype.write&&s.type!=="mdat"&&(L.info("BoxParser","'"+d+"' box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(t)),s.parse(t);const f=t.getPosition()-(s.start+s.size);return f<0?(L.warn("BoxParser","Parsing of box '"+d+"' did not read the entire indicated box data size (missing "+-f+" bytes), seeking forward"),t.seek(s.start+s.size)):f>0&&s.size!==0&&(L.error("BoxParser","Parsing of box '"+d+"' read "+f+" more bytes than the indicated box data size, seeking backwards"),t.seek(s.start+s.size)),{code:1,box:s,size:s.size}}var ke=class extends mt{write(t){if(this.size=0,this.writeHeader(t),this.boxes)for(let e=0;e<this.boxes.length;e++)this.boxes[e]&&(this.boxes[e].write(t),this.size+=this.boxes[e].size);L.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),t.adjustUint32(this.sizePosition,this.size)}print(t){this.printHeader(t);for(let e=0;e<this.boxes.length;e++)if(this.boxes[e]){const i=t.indent;t.indent+=" ",this.boxes[e].print(t),t.indent=i}}parse(t){let e;for(;t.getPosition()<this.start+this.size;)if(e=hn(t,!1,this.size-(t.getPosition()-this.start)),e.code===1){const i=e.box;if(this.boxes||(this.boxes=[]),this.boxes.push(i),this.subBoxNames&&this.subBoxNames.indexOf(i.type)!==-1){const s=this.subBoxNames[this.subBoxNames.indexOf(i.type)]+"s";this[s]||(this[s]=[]),this[s].push(i)}else{const s=i.type!=="uuid"?i.type:i.uuid;this[s]?L.warn("ContainerBox",`Box of type ${s} already exists in container box ${this.type}.`):this[s]=i}}else return}},zn=class extends ke{static{this.registryId=Symbol.for("SampleEntryIdentifier")}constructor(t,e,i){super(t),this.hdr_size=e,this.start=i}isVideo(){return!1}isAudio(){return!1}isSubtitle(){return!1}isMetadata(){return!1}isHint(){return!1}getCodec(){return this.type.replace(".","")}getWidth(){return""}getHeight(){return""}getChannelCount(){return""}getSampleRate(){return""}getSampleSize(){return""}parseHeader(t){t.readUint8Array(6),this.data_reference_index=t.readUint16(),this.hdr_size+=8}parse(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size)}parseDataAndRewind(t){this.parseHeader(t),this.data=t.readUint8Array(this.size-this.hdr_size),this.hdr_size-=8,t.seek(this.start+this.hdr_size)}parseFooter(t){super.parse(t)}writeHeader(t){this.size=8,super.writeHeader(t),t.writeUint8(0),t.writeUint8(0),t.writeUint8(0),t.writeUint8(0),t.writeUint8(0),t.writeUint8(0),t.writeUint16(this.data_reference_index)}writeFooter(t){if(this.boxes)for(let e=0;e<this.boxes.length;e++)this.boxes[e].write(t),this.size+=this.boxes[e].size;L.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),t.adjustUint32(this.sizePosition,this.size)}write(t){this.writeHeader(t),t.writeUint8Array(this.data),this.size+=this.data.length,L.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),t.adjustUint32(this.sizePosition,this.size)}},qp=class extends zn{},fa=class extends zn{isMetadata(){return!0}},Ir=class extends zn{isSubtitle(){return!0}},Rk=class extends zn{},Ye=class extends zn{parse(t){this.parseHeader(t),t.readUint16(),t.readUint16(),t.readUint32Array(3),this.width=t.readUint16(),this.height=t.readUint16(),this.horizresolution=t.readUint32(),this.vertresolution=t.readUint32(),t.readUint32(),this.frame_count=t.readUint16();const e=Math.min(31,t.readUint8());this.compressorname=t.readString(e),e<31&&t.readString(31-e),this.depth=t.readUint16(),t.readUint16(),this.parseFooter(t)}isVideo(){return!0}getWidth(){return this.width}getHeight(){return this.height}write(t){this.writeHeader(t),this.size+=70,t.writeUint16(0),t.writeUint16(0),t.writeUint32(0),t.writeUint32(0),t.writeUint32(0),t.writeUint16(this.width),t.writeUint16(this.height),t.writeUint32(this.horizresolution),t.writeUint32(this.vertresolution),t.writeUint32(0),t.writeUint16(this.frame_count),t.writeUint8(Math.min(31,this.compressorname.length)),t.writeString(this.compressorname,void 0,31),t.writeUint16(this.depth),t.writeInt16(-1),this.writeFooter(t)}},rs=class extends zn{parse(t){this.parseHeader(t),this.version=t.readUint16(),t.readUint16(),t.readUint32(),this.channel_count=t.readUint16(),this.samplesize=t.readUint16(),t.readUint16(),t.readUint16(),this.samplerate=t.readUint32()/65536,t.isofile?.ftyp?.major_brand.includes("qt")&&(this.version===1?this.extensions=t.readUint8Array(16):this.version===2&&(this.extensions=t.readUint8Array(36))),this.parseFooter(t)}isAudio(){return!0}getChannelCount(){return this.channel_count}getSampleRate(){return this.samplerate}getSampleSize(){return this.samplesize}write(t){this.writeHeader(t),this.size+=20,t.writeUint32(0),t.writeUint32(0),t.writeUint16(this.channel_count),t.writeUint16(this.samplesize),t.writeUint16(0),t.writeUint16(0),t.writeUint32(this.samplerate<<16),this.writeFooter(t)}},qd=class extends zn{parse(t){this.parseHeader(t),this.parseFooter(t)}write(t){this.writeHeader(t),this.writeFooter(t)}},Wp=class extends Array{toString(){let t="<table class='inner-table'>";t+="<thead><tr><th>length</th><th>nalu_data</th></tr></thead>",t+="<tbody>";for(let e=0;e<this.length;e++){const i=this[e];t+="<tr>",t+="<td>"+i.length+"</td>",t+="<td>",t+=i.data.reduce(function(s,n){return s+n.toString(16).padStart(2,"0")},"0x"),t+="</td></tr>"}return t+="</tbody></table>",t}},z_=class extends mt{constructor(...t){super(...t),this.box_name="AVCConfigurationBox"}static{this.fourcc="avcC"}parse(t){this.configurationVersion=t.readUint8(),this.AVCProfileIndication=t.readUint8(),this.profile_compatibility=t.readUint8(),this.AVCLevelIndication=t.readUint8(),this.lengthSizeMinusOne=t.readUint8()&3,this.nb_SPS_nalus=t.readUint8()&31;let e=this.size-this.hdr_size-6;this.SPS=new Wp;for(let i=0;i<this.nb_SPS_nalus;i++){const s=t.readUint16();this.SPS.push({length:s,data:t.readUint8Array(s)}),e-=2+s}this.nb_PPS_nalus=t.readUint8(),e--,this.PPS=new Wp;for(let i=0;i<this.nb_PPS_nalus;i++){const s=t.readUint16();this.PPS.push({length:s,data:t.readUint8Array(s)}),e-=2+s}e>0&&(this.ext=t.readUint8Array(e))}write(t){this.size=7;for(let e=0;e<this.SPS.length;e++)this.size+=2+this.SPS[e].length;for(let e=0;e<this.PPS.length;e++)this.size+=2+this.PPS[e].length;this.ext&&(this.size+=this.ext.length),this.writeHeader(t),t.writeUint8(this.configurationVersion),t.writeUint8(this.AVCProfileIndication),t.writeUint8(this.profile_compatibility),t.writeUint8(this.AVCLevelIndication),t.writeUint8(this.lengthSizeMinusOne+252),t.writeUint8(this.SPS.length+224);for(let e=0;e<this.SPS.length;e++)t.writeUint16(this.SPS[e].length),t.writeUint8Array(this.SPS[e].data);t.writeUint8(this.PPS.length);for(let e=0;e<this.PPS.length;e++)t.writeUint16(this.PPS[e].length),t.writeUint8Array(this.PPS[e].data);this.ext&&t.writeUint8Array(this.ext)}},El=class extends mt{constructor(...t){super(...t),this.box_name="MediaDataBox"}static{this.fourcc="mdat"}},Lk=class extends mt{constructor(...t){super(...t),this.box_name="ItemDataBox"}static{this.fourcc="idat"}},Hk=class extends mt{constructor(...t){super(...t),this.box_name="FreeSpaceBox"}static{this.fourcc="free"}},Vk=class extends mt{constructor(...t){super(...t),this.box_name="FreeSpaceBox"}static{this.fourcc="skip"}},C_=class extends X{constructor(...t){super(...t),this.box_name="HintMediaHeaderBox"}static{this.fourcc="hmhd"}},Ul=class extends X{constructor(...t){super(...t),this.box_name="NullMediaHeaderBox"}static{this.fourcc="nmhd"}},jk=class extends X{constructor(...t){super(...t),this.box_name="ObjectDescriptorBox"}static{this.fourcc="iods"}},Gk=class extends X{constructor(...t){super(...t),this.box_name="XMLBox"}static{this.fourcc="xml "}},qk=class extends X{constructor(...t){super(...t),this.box_name="BinaryXMLBox"}static{this.fourcc="bxml"}},Wk=class extends X{constructor(...t){super(...t),this.box_name="ItemProtectionBox",this.sinfs=[]}static{this.fourcc="ipro"}get protections(){return this.sinfs}},Tl=class extends ke{constructor(...t){super(...t),this.box_name="MovieBox",this.traks=[],this.psshs=[],this.subBoxNames=["trak","pssh"]}static{this.fourcc="moov"}},$_=class extends ke{constructor(...t){super(...t),this.box_name="TrackBox",this.samples=[]}static{this.fourcc="trak"}},Yk=class extends ke{constructor(...t){super(...t),this.box_name="EditBox"}static{this.fourcc="edts"}},O_=class extends ke{constructor(...t){super(...t),this.box_name="MediaBox"}static{this.fourcc="mdia"}},F_=class extends ke{constructor(...t){super(...t),this.box_name="MediaInformationBox"}static{this.fourcc="minf"}},N_=class extends ke{constructor(...t){super(...t),this.box_name="DataInformationBox"}static{this.fourcc="dinf"}},D_=class extends ke{constructor(...t){super(...t),this.box_name="SampleTableBox",this.sgpds=[],this.sbgps=[],this.subBoxNames=["sgpd","sbgp"]}static{this.fourcc="stbl"}},od=class extends ke{constructor(...t){super(...t),this.box_name="MovieExtendsBox",this.trexs=[],this.subBoxNames=["trex"]}static{this.fourcc="mvex"}},R_=class extends ke{constructor(...t){super(...t),this.box_name="MovieFragmentBox",this.trafs=[],this.subBoxNames=["traf"]}static{this.fourcc="moof"}},L_=class extends ke{constructor(...t){super(...t),this.box_name="TrackFragmentBox",this.truns=[],this.sgpds=[],this.sbgps=[],this.subBoxNames=["trun","sgpd","sbgp"]}static{this.fourcc="traf"}},Kk=class extends ke{constructor(...t){super(...t),this.box_name="VTTCueBox"}static{this.fourcc="vttc"}},Xk=class extends ke{constructor(...t){super(...t),this.box_name="MovieFragmentRandomAccessBox",this.tfras=[],this.subBoxNames=["tfra"]}static{this.fourcc="mfra"}},Jk=class extends ke{constructor(...t){super(...t),this.box_name="AdditionalMetadataContainerBox"}static{this.fourcc="meco"}},Zk=class extends ke{constructor(...t){super(...t),this.box_name="trackhintinformation",this.subBoxNames=["sdp ","rtp "]}static{this.fourcc="hnti"}},Qk=class extends ke{constructor(...t){super(...t),this.box_name="hintstatisticsbox",this.maxrs=[],this.subBoxNames=["maxr"]}static{this.fourcc="hinf"}},t4=class extends ke{constructor(...t){super(...t),this.box_name="SubTrackBox"}static{this.fourcc="strk"}},e4=class extends ke{constructor(...t){super(...t),this.box_name="SubTrackDefinitionBox"}static{this.fourcc="strd"}},i4=class extends ke{constructor(...t){super(...t),this.box_name="ProtectionSchemeInfoBox"}static{this.fourcc="sinf"}},s4=class extends ke{constructor(...t){super(...t),this.box_name="RestrictedSchemeInfoBox"}static{this.fourcc="rinf"}},n4=class extends ke{constructor(...t){super(...t),this.box_name="SchemeInformationBox"}static{this.fourcc="schi"}},r4=class extends ke{constructor(...t){super(...t),this.box_name="TrackGroupBox"}static{this.fourcc="trgr"}},a4=class extends ke{constructor(...t){super(...t),this.box_name="UserDataBox",this.kinds=[],this.strks=[],this.subBoxNames=["kind","strk"]}static{this.fourcc="udta"}},o4=class extends ke{constructor(...t){super(...t),this.box_name="ItemPropertiesBox",this.ipmas=[],this.subBoxNames=["ipma"]}static{this.fourcc="iprp"}},l4=class extends ke{constructor(...t){super(...t),this.box_name="ItemPropertyContainerBox",this.hvcCs=[],this.ispes=[],this.claps=[],this.irots=[],this.subBoxNames=["hvcC","ispe","clap","irot"]}static{this.fourcc="ipco"}},c4=class extends ke{constructor(...t){super(...t),this.box_name="GroupsListBox"}static{this.fourcc="grpl"}},u4=class extends ke{constructor(...t){super(...t),this.box_name="J2KHeaderInfoBox"}static{this.fourcc="j2kH"}},d4=class extends ke{constructor(...t){super(...t),this.box_name="ExtendedTypeBox",this.tycos=[],this.subBoxNames=["tyco"]}static{this.fourcc="etyp"}},f4=class extends ke{constructor(...t){super(...t),this.box_name="ProjectedOmniVideoBox",this.subBoxNames=["prfr"]}static{this.fourcc="povd"}},H_=class extends X{constructor(...t){super(...t),this.box_name="DataReferenceBox"}static{this.fourcc="dref"}parse(t){this.parseFullHeader(t),this.entries=[];const e=t.readUint32();for(let i=0;i<e;i++){const s=hn(t,!1,this.size-(t.getPosition()-this.start));if(s.code===1){const n=s.box;this.entries.push(n)}else return}}write(t){this.version=0,this.flags=0,this.size=4,this.writeHeader(t),t.writeUint32(this.entries.length);for(let e=0;e<this.entries.length;e++)this.entries[e].write(t),this.size+=this.entries[e].size;L.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),t.adjustUint32(this.sizePosition,this.size)}},V_=class extends X{constructor(...t){super(...t),this.box_name="ExtendedLanguageBox"}static{this.fourcc="elng"}parse(t){this.parseFullHeader(t),this.extended_language=t.readString(this.size-this.hdr_size)}write(t){this.version=0,this.flags=0,this.size=this.extended_language.length,this.writeHeader(t),t.writeString(this.extended_language)}},j_=class extends mt{constructor(...t){super(...t),this.box_name="FileTypeBox"}static{this.fourcc="ftyp"}parse(t){let e=this.size-this.hdr_size;this.major_brand=t.readString(4),this.minor_version=t.readUint32();const i=String.fromCharCode(this.minor_version>>24,this.minor_version>>16&255,this.minor_version>>8&255,this.minor_version&255);i.match("[a-zA-Z0-9]{4}")&&(this.minor_version=i),e-=8,this.compatible_brands=[];let s=0;for(;e>=4;)this.compatible_brands[s]=t.readString(4),e-=4,s++}write(t){this.size=8+4*this.compatible_brands.length,this.writeHeader(t),t.writeString(this.major_brand,void 0,4),typeof this.minor_version=="number"?t.writeUint32(this.minor_version):t.writeString(this.minor_version,void 0,4);for(let e=0;e<this.compatible_brands.length;e++)t.writeString(this.compatible_brands[e],void 0,4)}},G_=class extends X{constructor(...t){super(...t),this.box_name="HandlerBox"}static{this.fourcc="hdlr"}parse(t){if(this.parseFullHeader(t),this.version===0&&(t.readUint32(),this.handler=t.readString(4),t.readUint32Array(3),!this.isEndOfBox(t))){const e=this.start+this.size-t.getPosition();this.name=t.readCString();const i=this.start+this.size-1;t.seek(i),t.readUint8()!==0&&e>1&&(L.info("BoxParser","Warning: hdlr name is not null-terminated, possibly length-prefixed string. Trimming first byte."),this.name=this.name.slice(1))}}write(t){this.size=20+this.name.length+1,this.version=0,this.flags=0,this.writeHeader(t),t.writeUint32(0),t.writeString(this.handler,void 0,4),t.writeUint32Array([0,0,0]),t.writeCString(this.name)}},q_=class extends mt{constructor(...t){super(...t),this.box_name="HEVCConfigurationBox"}static{this.fourcc="hvcC"}parse(t){this.configurationVersion=t.readUint8();let e=t.readUint8();this.general_profile_space=e>>6,this.general_tier_flag=(e&32)>>5,this.general_profile_idc=e&31,this.general_profile_compatibility=t.readUint32(),this.general_constraint_indicator=t.readUint8Array(6),this.general_level_idc=t.readUint8(),this.min_spatial_segmentation_idc=t.readUint16()&4095,this.parallelismType=t.readUint8()&3,this.chroma_format_idc=t.readUint8()&3,this.bit_depth_luma_minus8=t.readUint8()&7,this.bit_depth_chroma_minus8=t.readUint8()&7,this.avgFrameRate=t.readUint16(),e=t.readUint8(),this.constantFrameRate=e>>6,this.numTemporalLayers=(e&13)>>3,this.temporalIdNested=(e&4)>>2,this.lengthSizeMinusOne=e&3,this.nalu_arrays=[];const i=t.readUint8();for(let s=0;s<i;s++){const n=[];this.nalu_arrays.push(n),e=t.readUint8(),n.completeness=(e&128)>>7,n.nalu_type=e&63;const a=t.readUint16();for(let o=0;o<a;o++){const l=t.readUint16();n.push({data:t.readUint8Array(l)})}}}write(t){this.size=23;for(let e=0;e<this.nalu_arrays.length;e++){this.size+=3;for(let i=0;i<this.nalu_arrays[e].length;i++)this.size+=2+this.nalu_arrays[e][i].data.length}this.writeHeader(t),t.writeUint8(this.configurationVersion),t.writeUint8((this.general_profile_space<<6)+(this.general_tier_flag<<5)+this.general_profile_idc),t.writeUint32(this.general_profile_compatibility),t.writeUint8Array(this.general_constraint_indicator),t.writeUint8(this.general_level_idc),t.writeUint16(this.min_spatial_segmentation_idc+(15<<24)),t.writeUint8(this.parallelismType+252),t.writeUint8(this.chroma_format_idc+252),t.writeUint8(this.bit_depth_luma_minus8+248),t.writeUint8(this.bit_depth_chroma_minus8+248),t.writeUint16(this.avgFrameRate),t.writeUint8((this.constantFrameRate<<6)+(this.numTemporalLayers<<3)+(this.temporalIdNested<<2)+this.lengthSizeMinusOne),t.writeUint8(this.nalu_arrays.length);for(let e=0;e<this.nalu_arrays.length;e++){t.writeUint8((this.nalu_arrays[e].completeness<<7)+this.nalu_arrays[e].nalu_type),t.writeUint16(this.nalu_arrays[e].length);for(let i=0;i<this.nalu_arrays[e].length;i++)t.writeUint16(this.nalu_arrays[e][i].data.length),t.writeUint8Array(this.nalu_arrays[e][i].data)}}},W_=class extends X{constructor(...t){super(...t),this.box_name="MediaHeaderBox"}static{this.fourcc="mdhd"}parse(t){this.parseFullHeader(t),this.version===1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.parseLanguage(t),t.readUint16()}write(t){const e=this.modification_time>bi||this.creation_time>bi||this.duration>bi||this.version===1;this.version=e?1:0,this.size=20,this.size+=e?12:0,this.flags=0,this.writeHeader(t),e?(t.writeUint64(this.creation_time),t.writeUint64(this.modification_time),t.writeUint32(this.timescale),t.writeUint64(this.duration)):(t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.timescale),t.writeUint32(this.duration)),t.writeUint16(this.language),t.writeUint16(0)}},Y_=class extends X{constructor(...t){super(...t),this.box_name="MovieExtendsHeaderBox"}static{this.fourcc="mehd"}parse(t){this.parseFullHeader(t),this.flags&1&&(L.warn("BoxParser","mehd box incorrectly uses flags set to 1, converting version to 1"),this.version=1),this.version===1?this.fragment_duration=t.readUint64():this.fragment_duration=t.readUint32()}write(t){const e=this.fragment_duration>bi||this.version===1;this.version=e?1:0,this.size=4,this.size+=e?4:0,this.flags=0,this.writeHeader(t),e?t.writeUint64(this.fragment_duration):t.writeUint32(this.fragment_duration)}},h4=class extends X{constructor(...t){super(...t),this.box_name="ItemInfoEntry"}static{this.fourcc="infe"}parse(t){if(this.parseFullHeader(t),(this.version===0||this.version===1)&&(this.item_ID=t.readUint16(),this.item_protection_index=t.readUint16(),this.item_name=t.readCString(),this.content_type=t.readCString(),this.isEndOfBox(t)||(this.content_encoding=t.readCString())),this.version===1){this.extension_type=t.readString(4),L.warn("BoxParser","Cannot parse extension type"),t.seek(this.start+this.size);return}this.version>=2&&(this.version===2?this.item_ID=t.readUint16():this.version===3&&(this.item_ID=t.readUint32()),this.item_protection_index=t.readUint16(),this.item_type=t.readString(4),this.item_name=t.readCString(),this.item_type==="mime"?(this.content_type=t.readCString(),this.content_encoding=t.readCString()):this.item_type==="uri "&&(this.item_uri_type=t.readCString()))}},p4=class extends X{constructor(...t){super(...t),this.box_name="ItemInfoBox"}static{this.fourcc="iinf"}parse(t){this.parseFullHeader(t),this.version===0?this.entry_count=t.readUint16():this.entry_count=t.readUint32(),this.item_infos=[];for(let e=0;e<this.entry_count;e++){const i=hn(t,!1,this.size-(t.getPosition()-this.start));if(i.code===1){const s=i.box;s.type==="infe"?this.item_infos[e]=s:L.error("BoxParser","Expected 'infe' box, got "+i.box.type,t.isofile)}else return}}},m4=class extends X{constructor(...t){super(...t),this.box_name="ItemLocationBox"}static{this.fourcc="iloc"}parse(t){this.parseFullHeader(t);let e;e=t.readUint8(),this.offset_size=e>>4&15,this.length_size=e&15,e=t.readUint8(),this.base_offset_size=e>>4&15,this.version===1||this.version===2?this.index_size=e&15:this.index_size=0,this.items=[];let i=0;if(this.version<2)i=t.readUint16();else if(this.version===2)i=t.readUint32();else throw new Error("version of iloc box not supported");for(let s=0;s<i;s++){let n=0,a=0,o=0;if(this.version<2)n=t.readUint16();else if(this.version===2)n=t.readUint32();else throw new Error("version of iloc box not supported");this.version===1||this.version===2?a=t.readUint16()&15:a=0;const l=t.readUint16();switch(this.base_offset_size){case 0:o=0;break;case 4:o=t.readUint32();break;case 8:o=t.readUint64();break;default:throw new Error("Error reading base offset size")}const c=[],u=t.readUint16();for(let d=0;d<u;d++){let f=0,p=0,v=0;if(this.version===1||this.version===2)switch(this.index_size){case 0:f=0;break;case 4:f=t.readUint32();break;case 8:f=t.readUint64();break;default:throw new Error("Error reading extent index")}switch(this.offset_size){case 0:p=0;break;case 4:p=t.readUint32();break;case 8:p=t.readUint64();break;default:throw new Error("Error reading extent index")}switch(this.length_size){case 0:v=0;break;case 4:v=t.readUint32();break;case 8:v=t.readUint64();break;default:throw new Error("Error reading extent index")}c.push({extent_index:f,extent_length:v,extent_offset:p})}this.items.push({base_offset:o,construction_method:a,item_ID:n,data_reference_index:l,extents:c})}}};const v4={auxl:"Auxiliary image item",base:"Pre-derived image item base",cdsc:"Item describes referenced item",dimg:"Derived image item",dpnd:"Item coding dependency",eroi:"Region",evir:"EVC slice",exbl:"Scalable image item","fdl ":"File delivery",font:"Font item",iloc:"Item data location",mask:"Region mask",mint:"Data integrity",pred:"Predictively coded item",prem:"Pre-multiplied item",tbas:"HEVC tile track base item",text:"Text item",thmb:"Thumbnail image item"};var _4=class K_ extends X{constructor(...e){super(...e),this.box_name="ItemReferenceBox",this.references=[]}static{this.fourcc="iref"}static{this.allowed_types=["auxl","base","cdsc","dimg","dpnd","eroi","evir","exbl","fdl ","font","iloc","mask","mint","pred","prem","tbas","text","thmb"]}parse(e){for(this.parseFullHeader(e),this.references=[];e.getPosition()<this.start+this.size;){const i=hn(e,!0,this.size-(e.getPosition()-this.start));if(i.code===1){let s="Unknown item reference";K_.allowed_types.includes(i.type)?s=v4[i.type]:L.warn("BoxParser",`Unknown item reference type: '${i.type}'`);const n=this.version===0?new Pk(i.type,i.size,s,i.hdr_size,i.start):new Ak(i.type,i.size,s,i.hdr_size,i.start);n.write===mt.prototype.write&&n.type!=="mdat"&&(L.warn("BoxParser",n.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(e)),n.parse(e),this.references.push(n)}else return}}},g4=class extends X{constructor(...t){super(...t),this.box_name="PrimaryItemBox"}static{this.fourcc="pitm"}parse(t){this.parseFullHeader(t),this.version===0?this.item_id=t.readUint16():this.item_id=t.readUint32()}},y4=class extends X{constructor(...t){super(...t),this.box_name="MetaBox",this.isQT=!1}static{this.fourcc="meta"}parse(t){const e=t.getPosition();if(this.size>8){switch(t.readUint32(),t.readString(4)){case"hdlr":case"mhdr":case"keys":case"ilst":case"ctry":case"lang":this.isQT=!0;break}t.seek(e)}this.isQT||this.parseFullHeader(t),ke.prototype.parse.call(this,t)}},X_=class extends X{constructor(...t){super(...t),this.box_name="MovieFragmentHeaderBox"}static{this.fourcc="mfhd"}parse(t){this.parseFullHeader(t),this.sequence_number=t.readUint32()}write(t){this.version=0,this.flags=0,this.size=4,this.writeHeader(t),t.writeUint32(this.sequence_number)}},J_=class extends X{constructor(...t){super(...t),this.box_name="MovieHeaderBox"}static{this.fourcc="mvhd"}parse(t){this.parseFullHeader(t),this.version===1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.timescale=t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.timescale=t.readUint32(),this.duration=t.readUint32()),this.rate=t.readUint32(),this.volume=t.readUint16()>>8,t.readUint16(),t.readUint32Array(2),this.matrix=t.readInt32Array(9),t.readUint32Array(6),this.next_track_id=t.readUint32()}write(t){const e=this.modification_time>bi||this.creation_time>bi||this.duration>bi||this.version===1;this.version=e?1:0,this.size=96,this.size+=e?12:0,this.flags=0,this.writeHeader(t),e?(t.writeUint64(this.creation_time),t.writeUint64(this.modification_time),t.writeUint32(this.timescale),t.writeUint64(this.duration)):(t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.timescale),t.writeUint32(this.duration)),t.writeUint32(this.rate),t.writeUint16(this.volume<<8),t.writeUint16(0),t.writeUint32(0),t.writeUint32(0),t.writeInt32Array(this.matrix),t.writeUint32(0),t.writeUint32(0),t.writeUint32(0),t.writeUint32(0),t.writeUint32(0),t.writeUint32(0),t.writeUint32(this.next_track_id)}print(t){super.printHeader(t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"timescale: "+this.timescale),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"rate: "+this.rate),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"next_track_id: "+this.next_track_id)}},b4=class extends fa{static{this.fourcc="mett"}parse(t){this.parseHeader(t),this.content_encoding=t.readCString(),this.mime_format=t.readCString(),this.parseFooter(t)}},x4=class extends fa{static{this.fourcc="metx"}parse(t){this.parseHeader(t),this.content_encoding=t.readCString(),this.namespace=t.readCString(),this.schema_location=t.readCString(),this.parseFooter(t)}},w4=class extends mt{constructor(...t){super(...t),this.box_name="AV1CodecConfigurationBox"}static{this.fourcc="av1C"}parse(t){let e=t.readUint8();if((e>>7&1)!==1){L.error("BoxParser","av1C marker problem",t.isofile);return}if(this.version=e&127,this.version!==1){L.error("BoxParser","av1C version "+this.version+" not supported",t.isofile);return}if(e=t.readUint8(),this.seq_profile=e>>5&7,this.seq_level_idx_0=e&31,e=t.readUint8(),this.seq_tier_0=e>>7&1,this.high_bitdepth=e>>6&1,this.twelve_bit=e>>5&1,this.monochrome=e>>4&1,this.chroma_subsampling_x=e>>3&1,this.chroma_subsampling_y=e>>2&1,this.chroma_sample_position=e&3,e=t.readUint8(),this.reserved_1=e>>5&7,this.reserved_1!==0){L.error("BoxParser","av1C reserved_1 parsing problem",t.isofile);return}if(this.initial_presentation_delay_present=e>>4&1,this.initial_presentation_delay_present===1)this.initial_presentation_delay_minus_one=e&15;else if(this.reserved_2=e&15,this.reserved_2!==0){L.error("BoxParser","av1C reserved_2 parsing problem",t.isofile);return}const i=this.size-this.hdr_size-4;this.configOBUs=t.readUint8Array(i)}},S4=class extends X{constructor(...t){super(...t),this.box_name="ElementaryStreamDescriptorBox"}static{this.fourcc="esds"}parse(t){this.parseFullHeader(t);const e=t.readUint8Array(this.size-this.hdr_size);if("MPEG4DescriptorParser"in Xl){const i=new Xl.MPEG4DescriptorParser;this.esd=i.parseOneDescriptor(new Hi(e.buffer,0))}}},k4=class extends ke{constructor(...t){super(...t),this.box_name="siDecompressionParamBox"}static{this.fourcc="wave"}},B4=class extends mt{constructor(...t){super(...t),this.box_name="LCEVCConfigurationBox"}static{this.fourcc="lvcC"}parse(t){if(this.configurationVersion=t.readUint8(),this.configurationVersion!==1){L.error("BoxParser","lvcC version "+this.configurationVersion+" not supported",t.isofile);return}this.LCEVCProfileIndication=t.readUint8(),this.LCEVCLevelIndication=t.readUint8();let e=t.readUint8();this.chroma_format_idc=e>>6&3,this.bit_depth_luma_minus8=e>>3&7,this.bit_depth_chroma_minus8=e&7,e=t.readUint8(),this.lengthSizeMinusOne=e>>6&3;let i=e&63;if(i!==63){L.error("BoxParser","lvcC reserved parsing problem",t.isofile);return}if(this.pic_width_in_luma_samples=t.readUint32(),this.pic_height_in_luma_samples=t.readUint32(),e=t.readUint8(),this.sc_in_stream=e>>7&1,this.gc_in_stream=e>>6&1,this.ai_in_stream=e>>5&1,i=e&31,i!==31){L.error("BoxParser","lvcC reserved parsing problem",t.isofile);return}this.nalu_arrays=[];const s=t.readUint8();for(let n=0;n<s;n++){const a=[];if(this.nalu_arrays.push(a),e=t.readUint8(),i=e>>6&3,i!==0){L.error("BoxParser","lvcC reserved parsing problem",t.isofile);return}a.nalu_type=e&63;const o=t.readUint16();for(let l=0;l<o;l++){const c=t.readUint16();a.push({data:t.readUint8Array(c)})}}}},E4=class extends X{constructor(...t){super(...t),this.box_name="VPCodecConfigurationRecord"}static{this.fourcc="vpcC"}parse(t){if(this.parseFullHeader(t),this.version===1){this.profile=t.readUint8(),this.level=t.readUint8();const e=t.readUint8();this.bitDepth=e>>4,this.chromaSubsampling=e>>1&7,this.videoFullRangeFlag=e&1,this.colourPrimaries=t.readUint8(),this.transferCharacteristics=t.readUint8(),this.matrixCoefficients=t.readUint8(),this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}else{this.profile=t.readUint8(),this.level=t.readUint8();let e=t.readUint8();this.bitDepth=e>>4&15,this.colorSpace=e&15,e=t.readUint8(),this.chromaSubsampling=e>>4&15,this.transferFunction=e>>1&7,this.videoFullRangeFlag=e&1,this.codecIntializationDataSize=t.readUint16(),this.codecIntializationData=t.readUint8Array(this.codecIntializationDataSize)}}},U4=class extends X{constructor(...t){super(...t),this.box_name="VvcConfigurationBox"}static{this.fourcc="vvcC"}parse(t){this.parseFullHeader(t);const e={held_bits:void 0,num_held_bits:0,stream_read_1_bytes:function(a){this.held_bits=a.readUint8(),this.num_held_bits=8},stream_read_2_bytes:function(a){this.held_bits=a.readUint16(),this.num_held_bits=16},extract_bits:function(a){const o=this.held_bits>>this.num_held_bits-a&(1<<a)-1;return this.num_held_bits-=a,o}};if(e.stream_read_1_bytes(t),e.extract_bits(5),this.lengthSizeMinusOne=e.extract_bits(2),this.ptl_present_flag=e.extract_bits(1),this.ptl_present_flag){if(e.stream_read_2_bytes(t),this.ols_idx=e.extract_bits(9),this.num_sublayers=e.extract_bits(3),this.constant_frame_rate=e.extract_bits(2),this.chroma_format_idc=e.extract_bits(2),e.stream_read_1_bytes(t),this.bit_depth_minus8=e.extract_bits(3),e.extract_bits(5),e.stream_read_2_bytes(t),e.extract_bits(2),this.num_bytes_constraint_info=e.extract_bits(6),this.general_profile_idc=e.extract_bits(7),this.general_tier_flag=e.extract_bits(1),this.general_level_idc=t.readUint8(),e.stream_read_1_bytes(t),this.ptl_frame_only_constraint_flag=e.extract_bits(1),this.ptl_multilayer_enabled_flag=e.extract_bits(1),this.general_constraint_info=new Uint8Array(this.num_bytes_constraint_info),this.num_bytes_constraint_info){for(let a=0;a<this.num_bytes_constraint_info-1;a++){const o=e.extract_bits(6);e.stream_read_1_bytes(t);const l=e.extract_bits(2);this.general_constraint_info[a]=o<<2|l}this.general_constraint_info[this.num_bytes_constraint_info-1]=e.extract_bits(6)}else e.extract_bits(6);if(this.num_sublayers>1){e.stream_read_1_bytes(t),this.ptl_sublayer_present_mask=0;for(let a=this.num_sublayers-2;a>=0;--a){const o=e.extract_bits(1);this.ptl_sublayer_present_mask|=o<<a}for(let a=this.num_sublayers;a<=8&&this.num_sublayers>1;++a)e.extract_bits(1);this.sublayer_level_idc=[];for(let a=this.num_sublayers-2;a>=0;--a)this.ptl_sublayer_present_mask&1<<a&&(this.sublayer_level_idc[a]=t.readUint8())}if(this.ptl_num_sub_profiles=t.readUint8(),this.general_sub_profile_idc=[],this.ptl_num_sub_profiles)for(let a=0;a<this.ptl_num_sub_profiles;a++)this.general_sub_profile_idc.push(t.readUint32());this.max_picture_width=t.readUint16(),this.max_picture_height=t.readUint16(),this.avg_frame_rate=t.readUint16()}const i=12,s=13;this.nalu_arrays=[];const n=t.readUint8();for(let a=0;a<n;a++){const o=[];this.nalu_arrays.push(o),e.stream_read_1_bytes(t),o.completeness=e.extract_bits(1),e.extract_bits(2),o.nalu_type=e.extract_bits(5);let l=1;o.nalu_type!==s&&o.nalu_type!==i&&(l=t.readUint16());for(let c=0;c<l;c++){const u=t.readUint16();o.push({data:t.readUint8Array(u),length:u})}}}},T4=class extends mt{constructor(...t){super(...t),this.box_name="ColourInformationBox"}static{this.fourcc="colr"}parse(t){if(this.colour_type=t.readString(4),this.colour_type==="nclx"){this.colour_primaries=t.readUint16(),this.transfer_characteristics=t.readUint16(),this.matrix_coefficients=t.readUint16();const e=t.readUint8();this.full_range_flag=e>>7}else this.colour_type==="rICC"?this.ICC_profile=t.readUint8Array(this.size-4):this.colour_type==="prof"&&(this.ICC_profile=t.readUint8Array(this.size-4))}};function ea(t,e){let i=Number(t).toString(16);for(e=typeof e>"u"?2:e;i.length<e;)i="0"+i;return i}var fc=class extends Ye{getCodec(){const t=super.getCodec();return this.avcC?`${t}.${ea(this.avcC.AVCProfileIndication)}${ea(this.avcC.profile_compatibility)}${ea(this.avcC.AVCLevelIndication)}`:t}},P4=class extends fc{constructor(...t){super(...t),this.box_name="AVCSampleEntry"}static{this.fourcc="avc1"}},A4=class extends fc{constructor(...t){super(...t),this.box_name="AVC2SampleEntry"}static{this.fourcc="avc2"}},I4=class extends fc{constructor(...t){super(...t),this.box_name="AVCSampleEntry"}static{this.fourcc="avc3"}},M4=class extends fc{constructor(...t){super(...t),this.box_name="AVC2SampleEntry"}static{this.fourcc="avc4"}},z4=class extends Ye{constructor(...t){super(...t),this.box_name="AV1SampleEntry"}static{this.fourcc="av01"}getCodec(){const t=super.getCodec(),e=this.av1C.seq_level_idx_0,i=e<10?"0"+e:e;let s;return this.av1C.seq_profile===2&&this.av1C.high_bitdepth===1?s=this.av1C.twelve_bit===1?"12":"10":this.av1C.seq_profile<=2&&(s=this.av1C.high_bitdepth===1?"10":"08"),t+"."+this.av1C.seq_profile+"."+i+(this.av1C.seq_tier_0?"H":"M")+"."+s}},C4=class extends Ye{static{this.fourcc="dav1"}},hc=class extends Ye{getCodec(){let t=super.getCodec();if(this.hvcC){switch(t+=".",this.hvcC.general_profile_space){case 0:t+="";break;case 1:t+="A";break;case 2:t+="B";break;case 3:t+="C";break}t+=this.hvcC.general_profile_idc,t+=".";let e=this.hvcC.general_profile_compatibility,i=0;for(let a=0;a<32&&(i|=e&1,a!==31);a++)i<<=1,e>>=1;t+=ea(i,0),t+=".",this.hvcC.general_tier_flag===0?t+="L":t+="H",t+=this.hvcC.general_level_idc;let s=!1,n="";for(let a=5;a>=0;a--)(this.hvcC.general_constraint_indicator[a]||s)&&(n="."+ea(this.hvcC.general_constraint_indicator[a],0)+n,s=!0);t+=n}return t}},$4=class extends hc{constructor(...t){super(...t),this.box_name="HEVCSampleEntry"}static{this.fourcc="hvc1"}},O4=class extends hc{static{this.fourcc="hvc2"}},F4=class extends hc{constructor(...t){super(...t),this.box_name="HEVCSampleEntry",this.colrs=[],this.subBoxNames=["colr"]}static{this.fourcc="hev1"}},N4=class extends hc{static{this.fourcc="hev2"}},D4=class extends Ye{constructor(...t){super(...t),this.box_name="HEVCTileSampleSampleEntry"}static{this.fourcc="hvt1"}},R4=class extends Ye{constructor(...t){super(...t),this.box_name="LHEVCSampleEntry"}static{this.fourcc="lhe1"}},L4=class extends Ye{constructor(...t){super(...t),this.box_name="LHEVCSampleEntry"}static{this.fourcc="lhv1"}},H4=class extends Ye{constructor(...t){super(...t),this.box_name="LCEVCSampleEntry"}static{this.fourcc="lvc1"}getCodec(){let t=super.getCodec();return this.lvcC&&(t+=".",t+="vprf",t+=this.lvcC.LCEVCProfileIndication,t+=".",t+="vlev",t+=this.lvcC.LCEVCLevelIndication),t}},V4=class extends Ye{static{this.fourcc="dvh1"}},j4=class extends Ye{static{this.fourcc="dvhe"}},Z_=class extends Ye{getCodec(){let t=super.getCodec();if(this.vvcC){t+="."+this.vvcC.general_profile_idc,this.vvcC.general_tier_flag?t+=".H":t+=".L",t+=this.vvcC.general_level_idc;let e="";if(this.vvcC.general_constraint_info){const i=[];let s=0;s|=this.vvcC.ptl_frame_only_constraint_flag<<7,s|=this.vvcC.ptl_multilayer_enabled_flag<<6;let n;for(let a=0;a<this.vvcC.general_constraint_info.length;++a)s|=this.vvcC.general_constraint_info[a]>>2&63,i.push(s),s&&(n=a),s=this.vvcC.general_constraint_info[a]>>2&3;if(n===void 0)e=".CA";else{e=".C";const a="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";let o=0,l=0;for(let c=0;c<=n;++c)for(o=o<<8|i[c],l+=8;l>=5;){const u=o>>l-5&31;e+=a[u],l-=5,o&=(1<<l)-1}l&&(o<<=5-l,e+=a[o&31])}}t+=e}return t}},G4=class extends Z_{constructor(...t){super(...t),this.box_name="VvcSampleEntry"}static{this.fourcc="vvc1"}},q4=class extends Z_{constructor(...t){super(...t),this.box_name="VvcSampleEntry"}static{this.fourcc="vvi1"}},W4=class extends Ye{constructor(...t){super(...t),this.box_name="VvcSampleEntry"}static{this.fourcc="vvs1"}},Y4=class extends Ye{constructor(...t){super(...t),this.box_name="VvcNonVCLSampleEntry"}static{this.fourcc="vvcN"}},Q_=class extends Ye{getCodec(){const t=super.getCodec();let e=this.vpcC.level;e===0&&(e="00");let i=this.vpcC.bitDepth;return i===8&&(i="08"),`${t}.0${this.vpcC.profile}.${e}.${i}`}},K4=class extends Q_{static{this.fourcc="vp08"}},X4=class extends Q_{static{this.fourcc="vp09"}},J4=class extends Ye{static{this.fourcc="avs3"}},Z4=class extends Ye{constructor(...t){super(...t),this.box_name="J2KSampleEntry"}static{this.fourcc="j2ki"}},Q4=class extends Ye{static{this.fourcc="mjp2"}},t3=class extends Ye{static{this.fourcc="mjpg"}},e3=class extends Ye{constructor(...t){super(...t),this.box_name="UncompressedVideoSampleEntry"}static{this.fourcc="uncv"}},i3=class extends Ye{constructor(...t){super(...t),this.box_name="MP4VisualSampleEntry"}static{this.fourcc="mp4v"}},tg=class extends rs{constructor(...t){super(...t),this.box_name="MP4AudioSampleEntry"}static{this.fourcc="mp4a"}getCodec(){const t=super.getCodec(),e=this.esds??this.wave?.esds;if(e&&e.esd){const i=e.esd.getOTI(),s=e.esd.getAudioConfig();return t+"."+ea(i)+(s?"."+s:"")}else return t}},s3=class extends rs{static{this.fourcc="m4ae"}},n3=class extends rs{static{this.fourcc="ac-3"}},r3=class extends rs{static{this.fourcc="ac-4"}},a3=class extends rs{static{this.fourcc="ec-3"}},o3=class extends rs{static{this.fourcc="Opus"}},l3=class extends rs{static{this.fourcc="mha1"}},c3=class extends rs{static{this.fourcc="mha2"}},u3=class extends rs{static{this.fourcc="mhm1"}},d3=class extends rs{static{this.fourcc="mhm2"}},f3=class extends rs{static{this.fourcc="fLaC"}},h3=class extends Ye{static{this.fourcc="encv"}},p3=class extends rs{static{this.fourcc="enca"}},m3=class extends Ir{constructor(...t){super(...t),this.subBoxNames=["sinf"],this.sinfs=[]}static{this.fourcc="encu"}},v3=class extends qd{constructor(...t){super(...t),this.subBoxNames=["sinf"],this.sinfs=[]}static{this.fourcc="encs"}},_3=class extends qd{static{this.fourcc="mp4s"}},g3=class extends Rk{constructor(...t){super(...t),this.subBoxNames=["sinf"],this.sinfs=[]}static{this.fourcc="enct"}},y3=class extends fa{constructor(...t){super(...t),this.subBoxNames=["sinf"],this.sinfs=[]}static{this.fourcc="encm"}},b3=class extends Ye{constructor(...t){super(...t),this.box_name="RestrictedVideoSampleEntry"}static{this.fourcc="resv"}},x3=class extends Ir{static{this.fourcc="sbtt"}parse(t){this.parseHeader(t),this.content_encoding=t.readCString(),this.mime_format=t.readCString(),this.parseFooter(t)}},eg=class extends Ir{static{this.fourcc="stpp"}parse(t){this.parseHeader(t),this.namespace=t.readCString(),this.schema_location=t.readCString(),this.auxiliary_mime_types=t.readCString(),this.parseFooter(t)}write(t){this.writeHeader(t),this.size+=this.namespace.length+1+this.schema_location.length+1+this.auxiliary_mime_types.length+1,t.writeCString(this.namespace),t.writeCString(this.schema_location),t.writeCString(this.auxiliary_mime_types),this.writeFooter(t)}},w3=class extends Ir{static{this.fourcc="stxt"}parse(t){this.parseHeader(t),this.content_encoding=t.readCString(),this.mime_format=t.readCString(),this.parseFooter(t)}getCodec(){const t=super.getCodec();return this.mime_format?t+"."+this.mime_format:t}},S3=class extends Ir{static{this.fourcc="tx3g"}parse(t){this.parseHeader(t),this.displayFlags=t.readUint32(),this.horizontal_justification=t.readInt8(),this.vertical_justification=t.readInt8(),this.bg_color_rgba=t.readUint8Array(4),this.box_record=t.readInt16Array(4),this.style_record=t.readUint8Array(12),this.parseFooter(t)}},k3=class extends fa{static{this.fourcc="wvtt"}parse(t){this.parseHeader(t),this.parseFooter(t)}},B3=class extends X{constructor(...t){super(...t),this.box_name="SampleToGroupBox"}static{this.fourcc="sbgp"}parse(t){this.parseFullHeader(t),this.grouping_type=t.readString(4),this.version===1?this.grouping_type_parameter=t.readUint32():this.grouping_type_parameter=0,this.entries=[];const e=t.readUint32();for(let i=0;i<e;i++)this.entries.push({sample_count:t.readInt32(),group_description_index:t.readInt32()})}write(t){this.grouping_type_parameter?this.version=1:this.version=0,this.flags=0,this.size=8+8*this.entries.length+(this.version===1?4:0),this.writeHeader(t),t.writeString(this.grouping_type,void 0,4),this.version===1&&t.writeUint32(this.grouping_type_parameter),t.writeUint32(this.entries.length);for(let e=0;e<this.entries.length;e++){const i=this.entries[e];t.writeInt32(i.sample_count),t.writeInt32(i.group_description_index)}}},E3=class extends X{constructor(...t){super(...t),this.box_name="SampleDependencyTypeBox"}static{this.fourcc="sdtp"}parse(t){this.parseFullHeader(t);const e=this.size-this.hdr_size;this.is_leading=[],this.sample_depends_on=[],this.sample_is_depended_on=[],this.sample_has_redundancy=[];for(let i=0;i<e;i++){const s=t.readUint8();this.is_leading[i]=s>>6,this.sample_depends_on[i]=s>>4&3,this.sample_is_depended_on[i]=s>>2&3,this.sample_has_redundancy[i]=s&3}}},U3=class extends X{constructor(...t){super(...t),this.box_name="SampleGroupDescriptionBox"}static{this.fourcc="sgpd"}parse(t){this.parseFullHeader(t),this.grouping_type=t.readString(4),L.debug("BoxParser","Found Sample Groups of type "+this.grouping_type),this.version===1?this.default_length=t.readUint32():this.default_length=0,this.version>=2&&(this.default_group_description_index=t.readUint32()),this.entries=[];const e=t.readUint32();for(let i=0;i<e;i++){let s;this.grouping_type in Ji.sampleGroupEntry?s=new Ji.sampleGroupEntry[this.grouping_type](this.grouping_type):s=new vi(this.grouping_type),this.entries.push(s),this.version===1?this.default_length===0?s.description_length=t.readUint32():s.description_length=this.default_length:s.description_length=this.default_length,s.write===vi.prototype.write&&(L.info("BoxParser","SampleGroup for type "+this.grouping_type+" writing not yet implemented, keeping unparsed data in memory for later write"),s.data=t.readUint8Array(s.description_length),t.seek(t.getPosition()-s.description_length)),s.parse(t)}}write(t){this.flags=0,this.size=12;for(let e=0;e<this.entries.length;e++){const i=this.entries[e];this.version===1&&(this.default_length===0&&(this.size+=4),this.size+=i.data.length)}this.writeHeader(t),t.writeString(this.grouping_type,void 0,4),this.version===1&&t.writeUint32(this.default_length),this.version>=2&&t.writeUint32(this.default_sample_description_index),t.writeUint32(this.entries.length);for(let e=0;e<this.entries.length;e++){const i=this.entries[e];this.version===1&&this.default_length===0&&t.writeUint32(i.description_length),i.write(t)}}},T3=class extends X{constructor(...t){super(...t),this.box_name="CompressedSegmentIndexBox"}static{this.fourcc="sidx"}parse(t){this.parseFullHeader(t),this.reference_ID=t.readUint32(),this.timescale=t.readUint32(),this.version===0?(this.earliest_presentation_time=t.readUint32(),this.first_offset=t.readUint32()):(this.earliest_presentation_time=t.readUint64(),this.first_offset=t.readUint64()),t.readUint16(),this.references=[];const e=t.readUint16();for(let i=0;i<e;i++){const s=t.readUint32(),n=t.readUint32(),a=t.readUint32();this.references.push({reference_type:s>>31&1,referenced_size:s&2147483647,subsegment_duration:n,starts_with_SAP:a>>31&1,SAP_type:a>>28&7,SAP_delta_time:a&268435455})}}write(t){const e=this.earliest_presentation_time>bi||this.first_offset>bi||this.version===1;this.version=e?1:0,this.size=12+12*this.references.length,this.size+=e?16:8,this.flags=0,this.writeHeader(t),t.writeUint32(this.reference_ID),t.writeUint32(this.timescale),e?(t.writeUint64(this.earliest_presentation_time),t.writeUint64(this.first_offset)):(t.writeUint32(this.earliest_presentation_time),t.writeUint32(this.first_offset)),t.writeUint16(0),t.writeUint16(this.references.length);for(let i=0;i<this.references.length;i++){const s=this.references[i];t.writeUint32(s.reference_type<<31|s.referenced_size),t.writeUint32(s.subsegment_duration),t.writeUint32(s.starts_with_SAP<<31|s.SAP_type<<28|s.SAP_delta_time)}}},ig=class extends X{constructor(...t){super(...t),this.box_name="SoundMediaHeaderBox"}static{this.fourcc="smhd"}parse(t){this.parseFullHeader(t),this.balance=t.readUint16(),t.readUint16()}write(t){this.version=0,this.size=4,this.writeHeader(t),t.writeUint16(this.balance),t.writeUint16(0)}},sg=class extends X{constructor(...t){super(...t),this.box_name="ChunkOffsetBox"}static{this.fourcc="stco"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.chunk_offsets=[],this.version===0)for(let i=0;i<e;i++)this.chunk_offsets.push(t.readUint32())}write(t){this.version=0,this.flags=0,this.size=4+4*this.chunk_offsets.length,this.writeHeader(t),t.writeUint32(this.chunk_offsets.length),t.writeUint32Array(this.chunk_offsets)}unpack(t){for(let e=0;e<this.chunk_offsets.length;e++)t[e].offset=this.chunk_offsets[e]}},ng=class extends X{constructor(...t){super(...t),this.box_name="SubtitleMediaHeaderBox"}static{this.fourcc="sthd"}},rg=class extends X{constructor(...t){super(...t),this.box_name="SampleToChunkBox"}static{this.fourcc="stsc"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.first_chunk=[],this.samples_per_chunk=[],this.sample_description_index=[],this.version===0)for(let i=0;i<e;i++)this.first_chunk.push(t.readUint32()),this.samples_per_chunk.push(t.readUint32()),this.sample_description_index.push(t.readUint32())}write(t){this.version=0,this.flags=0,this.size=4+12*this.first_chunk.length,this.writeHeader(t),t.writeUint32(this.first_chunk.length);for(let e=0;e<this.first_chunk.length;e++)t.writeUint32(this.first_chunk[e]),t.writeUint32(this.samples_per_chunk[e]),t.writeUint32(this.sample_description_index[e])}unpack(t){let e=0,i=0;for(let s=0;s<this.first_chunk.length;s++)for(let n=0;n<(s+1<this.first_chunk.length?this.first_chunk[s+1]:1/0);n++){i++;for(let a=0;a<this.samples_per_chunk[s];a++){if(t[e])t[e].description_index=this.sample_description_index[s],t[e].chunk_index=i;else return;e++}}}},ag=class extends X{constructor(...t){super(...t),this.box_name="SampleDescriptionBox"}static{this.fourcc="stsd"}parse(t){this.parseFullHeader(t),this.entries=[];const e=t.readUint32();for(let i=1;i<=e;i++){const s=hn(t,!0,this.size-(t.getPosition()-this.start));if(s.code===1){let n;s.type in Ji.sampleEntry?(n=new Ji.sampleEntry[s.type](s.size),n.hdr_size=s.hdr_size,n.start=s.start):(L.warn("BoxParser",`Unknown sample entry type: '${s.type}'`),n=new zn(s.size,s.hdr_size,s.start),n.type=s.type),n.write===zn.prototype.write&&(L.info("BoxParser","SampleEntry "+n.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),n.parseDataAndRewind(t)),n.parse(t),this.entries.push(n)}else return}}write(t){this.version=0,this.flags=0,this.size=0,this.writeHeader(t),t.writeUint32(this.entries.length),this.size+=4;for(let e=0;e<this.entries.length;e++)this.entries[e].write(t),this.size+=this.entries[e].size;L.debug("BoxWriter","Adjusting box "+this.type+" with new size "+this.size),t.adjustUint32(this.sizePosition,this.size)}},og=class extends X{constructor(...t){super(...t),this.box_name="SampleSizeBox"}static{this.fourcc="stsz"}parse(t){if(this.parseFullHeader(t),this.sample_sizes=[],this.version===0){this.sample_size=t.readUint32(),this.sample_count=t.readUint32();for(let e=0;e<this.sample_count;e++)this.sample_size===0?this.sample_sizes.push(t.readUint32()):this.sample_sizes[e]=this.sample_size}}write(t){let e=!0;this.version=0,this.flags=0,this.sample_sizes.length>0&&this.sample_size===0&&(e=!1),this.size=8,e||(this.size+=4*this.sample_sizes.length),this.writeHeader(t),t.writeUint32(this.sample_size),t.writeUint32(this.sample_sizes.length),e||t.writeUint32Array(this.sample_sizes)}unpack(t){for(let e=0;e<this.sample_sizes.length;e++)t[e].size=this.sample_sizes[e]}},lg=class extends X{constructor(...t){super(...t),this.box_name="TimeToSampleBox",this.sample_counts=[],this.sample_deltas=[]}static{this.fourcc="stts"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.sample_counts.length=0,this.sample_deltas.length=0,this.version===0)for(let i=0;i<e;i++){this.sample_counts.push(t.readUint32());let s=t.readInt32();s<0&&(L.warn("BoxParser","File uses negative stts sample delta, using value 1 instead, sync may be lost!"),s=1),this.sample_deltas.push(s)}}write(t){this.version=0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(t),t.writeUint32(this.sample_counts.length);for(let e=0;e<this.sample_counts.length;e++)t.writeUint32(this.sample_counts[e]),t.writeUint32(this.sample_deltas[e])}unpack(t){let e=0;for(let i=0;i<this.sample_counts.length;i++)for(let s=0;s<this.sample_counts[i];s++)e===0?t[e].dts=0:t[e].dts=t[e-1].dts+this.sample_deltas[i],e++}},cg=class extends X{constructor(...t){super(...t),this.box_name="TrackFragmentBaseMediaDecodeTimeBox"}static{this.fourcc="tfdt"}parse(t){this.parseFullHeader(t),this.version===1?this.baseMediaDecodeTime=t.readUint64():this.baseMediaDecodeTime=t.readUint32()}write(t){const e=this.baseMediaDecodeTime>bi||this.version===1;this.version=e?1:0,this.size=4,this.size+=e?4:0,this.flags=0,this.writeHeader(t),e?t.writeUint64(this.baseMediaDecodeTime):t.writeUint32(this.baseMediaDecodeTime)}},ug=class extends X{constructor(...t){super(...t),this.box_name="TrackFragmentHeaderBox"}static{this.fourcc="tfhd"}parse(t){this.parseFullHeader(t);let e=0;this.track_id=t.readUint32(),this.size-this.hdr_size>e&&this.flags&1?(this.base_data_offset=t.readUint64(),e+=8):this.base_data_offset=0,this.size-this.hdr_size>e&&this.flags&2?(this.default_sample_description_index=t.readUint32(),e+=4):this.default_sample_description_index=0,this.size-this.hdr_size>e&&this.flags&8?(this.default_sample_duration=t.readUint32(),e+=4):this.default_sample_duration=0,this.size-this.hdr_size>e&&this.flags&16?(this.default_sample_size=t.readUint32(),e+=4):this.default_sample_size=0,this.size-this.hdr_size>e&&this.flags&32?(this.default_sample_flags=t.readUint32(),e+=4):this.default_sample_flags=0}write(t){this.version=0,this.size=4,this.flags&1&&(this.size+=8),this.flags&2&&(this.size+=4),this.flags&8&&(this.size+=4),this.flags&16&&(this.size+=4),this.flags&32&&(this.size+=4),this.writeHeader(t),t.writeUint32(this.track_id),this.flags&1&&t.writeUint64(this.base_data_offset),this.flags&2&&t.writeUint32(this.default_sample_description_index),this.flags&8&&t.writeUint32(this.default_sample_duration),this.flags&16&&t.writeUint32(this.default_sample_size),this.flags&32&&t.writeUint32(this.default_sample_flags)}},dg=class extends X{constructor(...t){super(...t),this.box_name="TrackHeaderBox",this.layer=0,this.alternate_group=0}static{this.fourcc="tkhd"}parse(t){this.parseFullHeader(t),this.version===1?(this.creation_time=t.readUint64(),this.modification_time=t.readUint64(),this.track_id=t.readUint32(),t.readUint32(),this.duration=t.readUint64()):(this.creation_time=t.readUint32(),this.modification_time=t.readUint32(),this.track_id=t.readUint32(),t.readUint32(),this.duration=t.readUint32()),t.readUint32Array(2),this.layer=t.readInt16(),this.alternate_group=t.readInt16(),this.volume=t.readInt16()>>8,t.readUint16(),this.matrix=t.readInt32Array(9),this.width=t.readUint32(),this.height=t.readUint32()}write(t){const e=this.modification_time>bi||this.creation_time>bi||this.duration>bi||this.version===1;this.version=e?1:0,this.size=80,this.size+=e?12:0,this.flags=this.flags??3,this.writeHeader(t),e?(t.writeUint64(this.creation_time),t.writeUint64(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint64(this.duration)):(t.writeUint32(this.creation_time),t.writeUint32(this.modification_time),t.writeUint32(this.track_id),t.writeUint32(0),t.writeUint32(this.duration)),t.writeUint32Array([0,0]),t.writeInt16(this.layer),t.writeInt16(this.alternate_group),t.writeInt16(this.volume<<8),t.writeInt16(0),t.writeInt32Array(this.matrix),t.writeUint32(this.width),t.writeUint32(this.height)}print(t){super.printHeader(t),t.log(t.indent+"creation_time: "+this.creation_time),t.log(t.indent+"modification_time: "+this.modification_time),t.log(t.indent+"track_id: "+this.track_id),t.log(t.indent+"duration: "+this.duration),t.log(t.indent+"volume: "+(this.volume>>8)),t.log(t.indent+"matrix: "+this.matrix.join(", ")),t.log(t.indent+"layer: "+this.layer),t.log(t.indent+"alternate_group: "+this.alternate_group),t.log(t.indent+"width: "+this.width),t.log(t.indent+"height: "+this.height)}},ld=class extends X{constructor(...t){super(...t),this.box_name="TrackExtendsBox"}static{this.fourcc="trex"}parse(t){this.parseFullHeader(t),this.track_id=t.readUint32(),this.default_sample_description_index=t.readUint32(),this.default_sample_duration=t.readUint32(),this.default_sample_size=t.readUint32(),this.default_sample_flags=t.readUint32()}write(t){this.version=0,this.flags=0,this.size=20,this.writeHeader(t),t.writeUint32(this.track_id),t.writeUint32(this.default_sample_description_index),t.writeUint32(this.default_sample_duration),t.writeUint32(this.default_sample_size),t.writeUint32(this.default_sample_flags)}},fg=class extends X{constructor(...t){super(...t),this.box_name="TrackRunBox",this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[]}static{this.fourcc="trun"}parse(t){this.parseFullHeader(t);let e=0;if(this.sample_count=t.readUint32(),e+=4,this.size-this.hdr_size>e&&this.flags&1?(this.data_offset=t.readInt32(),e+=4):this.data_offset=0,this.size-this.hdr_size>e&&this.flags&4?(this.first_sample_flags=t.readUint32(),e+=4):this.first_sample_flags=0,this.sample_duration=[],this.sample_size=[],this.sample_flags=[],this.sample_composition_time_offset=[],this.size-this.hdr_size>e)for(let i=0;i<this.sample_count;i++)this.flags&256&&(this.sample_duration[i]=t.readUint32()),this.flags&512&&(this.sample_size[i]=t.readUint32()),this.flags&1024&&(this.sample_flags[i]=t.readUint32()),this.flags&2048&&(this.version===0?this.sample_composition_time_offset[i]=t.readUint32():this.sample_composition_time_offset[i]=t.readInt32())}write(t){this.size=4,this.flags&1&&(this.size+=4),this.flags&4&&(this.size+=4),this.flags&256&&(this.size+=4*this.sample_duration.length),this.flags&512&&(this.size+=4*this.sample_size.length),this.flags&1024&&(this.size+=4*this.sample_flags.length),this.flags&2048&&(this.size+=4*this.sample_composition_time_offset.length),this.writeHeader(t),t.writeUint32(this.sample_count),this.flags&1&&(this.data_offset_position=t.getPosition(),t.writeInt32(this.data_offset)),this.flags&4&&t.writeUint32(this.first_sample_flags);for(let e=0;e<this.sample_count;e++)this.flags&256&&t.writeUint32(this.sample_duration[e]),this.flags&512&&t.writeUint32(this.sample_size[e]),this.flags&1024&&t.writeUint32(this.sample_flags[e]),this.flags&2048&&(this.version===0?t.writeUint32(this.sample_composition_time_offset[e]):t.writeInt32(this.sample_composition_time_offset[e]))}},hg=class extends X{constructor(...t){super(...t),this.box_name="DataEntryUrlBox"}static{this.fourcc="url "}parse(t){this.parseFullHeader(t),this.flags!==1&&(this.location=t.readCString())}write(t){this.version=0,this.location?(this.flags=0,this.size=this.location.length+1):(this.flags=1,this.size=0),this.writeHeader(t),this.location&&t.writeCString(this.location)}},pg=class extends X{constructor(...t){super(...t),this.box_name="VideoMediaHeaderBox"}static{this.fourcc="vmhd"}parse(t){this.parseFullHeader(t),this.graphicsmode=t.readUint16(),this.opcolor=t.readUint16Array(3)}write(t){this.version=0,this.size=8,this.writeHeader(t),t.writeUint16(this.graphicsmode),t.writeUint16Array(this.opcolor)}},xu=class{constructor(t,e,i){this.grouping_type=t,this.grouping_type_parameter=e,this.sbgp=i,this.last_sample_in_run=-1,this.entry_index=-1}},P3=class nn{constructor(e,i=!0){this.boxes=[],this.mdats=[],this.moofs=[],this.isProgressive=!1,this.moovStartFound=!1,this.moovStartSent=!1,this.readySent=!1,this.sampleListBuilt=!1,this.fragmentedTracks=[],this.extractedTracks=[],this.isFragmentationInitialized=!1,this.sampleProcessingStarted=!1,this.nextMoofNumber=0,this.itemListBuilt=!1,this.sidxSent=!1,this.items=[],this.entity_groups=[],this.itemsDataSize=0,this.lastMoofIndex=0,this.samplesDataSize=0,this.lastBoxStartPosition=0,this.nextParsePosition=0,this.discardMdatData=!0,this.discardMdatData=i,e?(this.stream=e,this.parse()):this.stream=new Bl,this.stream.isofile=this}setSegmentOptions(e,i,s){const{sizePerSegment:n=Number.MAX_SAFE_INTEGER,rapAlignement:a=!0,normalizeAudioSampleEntriesForMSE:o=!0}=s;let l=s.nbSamples??s.nbSamplesPerFragment??1e3;const c=s.nbSamplesPerFragment??l;if(l<=0||c<=0||n<=0){L.error("ISOFile",`Invalid segment options: nbSamples=${l}, nbSamplesPerFragment=${c}, sizePerSegment=${n}`);return}if(l<c&&(L.warn("ISOFile",`nbSamples (${l}) is less than nbSamplesPerFragment (${c}), setting nbSamples to nbSamplesPerFragment`),l=c),this.fragmentedTracks.some(d=>d.nb_samples!==l)){L.error("ISOFile",`Cannot set segment options for track ${e}: nbSamples (${l}) does not match existing tracks`);return}const u=this.getTrackById(e);if(u){const d={id:e,user:i,trak:u,segmentStream:void 0,nb_samples:l,nb_samples_per_fragment:c,size_per_segment:n,rapAlignement:a,normalizeAudioSampleEntriesForMSE:o,state:{lastFragmentSampleNumber:0,lastSegmentSampleNumber:0,accumulatedSize:0}};this.fragmentedTracks.push(d),u.nextSample=0}this.discardMdatData&&L.warn("ISOFile","Segmentation options set but discardMdatData is true, samples will not be segmented")}unsetSegmentOptions(e){let i=-1;for(let s=0;s<this.fragmentedTracks.length;s++)this.fragmentedTracks[s].id===e&&(i=s);i>-1&&this.fragmentedTracks.splice(i,1)}setExtractionOptions(e,i,{nbSamples:s=1e3}={}){const n=this.getTrackById(e);n&&(this.extractedTracks.push({id:e,user:i,trak:n,nb_samples:s,samples:[]}),n.nextSample=0),this.discardMdatData&&L.warn("ISOFile","Extraction options set but discardMdatData is true, samples will not be extracted")}unsetExtractionOptions(e){let i=-1;for(let s=0;s<this.extractedTracks.length;s++)this.extractedTracks[s].id===e&&(i=s);i>-1&&this.extractedTracks.splice(i,1)}parse(){if(!(this.restoreParsePosition&&!this.restoreParsePosition()))for(;;)if(this.hasIncompleteMdat&&this.hasIncompleteMdat()){if(this.processIncompleteMdat())continue;return}else{this.saveParsePosition&&this.saveParsePosition();const i=hn(this.stream,!1);if(i.code===0)if(this.processIncompleteBox){if(this.processIncompleteBox(i))continue;return}else return;else if(i.code===1){const s=i.box;if(this.boxes.push(s),s.type==="uuid")this[s.uuid]!==void 0&&L.warn("ISOFile","Duplicate Box of uuid: "+s.uuid+", overriding previous occurrence"),this[s.uuid]=s;else switch(s.type){case"mdat":this.mdats.push(s),this.transferMdatData(s);break;case"moof":this.moofs.push(s);break;case"free":case"skip":break;case"moov":this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0);default:this[s.type]!==void 0?Array.isArray(this[s.type+"s"])?(L.info("ISOFile",`Found multiple boxes of type ${s.type} in ISOFile, adding to array`),this[s.type+"s"].push(s)):(L.warn("ISOFile",`Found multiple boxes of type ${s.type} but no array exists. Creating array dynamically.`),this[s.type+"s"]=[this[s.type],s]):(this[s.type]=s,Array.isArray(this[s.type+"s"])&&this[s.type+"s"].push(s));break}this.updateUsedBytes&&this.updateUsedBytes(s,i)}else if(i.code===-1){L.error("ISOFile",`Invalid data found while parsing box of type '${i.type}' at position ${i.start}. Aborting parsing.`,this);break}}}checkBuffer(e){if(!e)throw new Error("Buffer must be defined and non empty");return e.byteLength===0?(L.warn("ISOFile","Ignoring empty buffer (fileStart: "+e.fileStart+")"),this.stream.logBufferLevel(),!1):(L.info("ISOFile","Processing buffer (fileStart: "+e.fileStart+")"),e.usedBytes=0,this.stream.insertBuffer(e),this.stream.logBufferLevel(),this.stream.initialized()?!0:(L.warn("ISOFile","Not ready to start parsing"),!1))}appendBuffer(e,i){let s;if(this.checkBuffer(e))return this.parse(),this.moovStartFound&&!this.moovStartSent&&(this.moovStartSent=!0,this.onMoovStart&&this.onMoovStart()),this.moov?(this.sampleListBuilt||(this.buildSampleLists(),this.sampleListBuilt=!0),this.updateSampleLists(),this.onReady&&!this.readySent&&(this.readySent=!0,this.onReady(this.getInfo())),this.processSamples(i),this.nextSeekPosition?(s=this.nextSeekPosition,this.nextSeekPosition=void 0):s=this.nextParsePosition,this.stream.getEndFilePositionAfter&&(s=this.stream.getEndFilePositionAfter(s))):this.nextParsePosition?s=this.nextParsePosition:s=0,this.sidx&&this.onSidx&&!this.sidxSent&&(this.onSidx(this.sidx),this.sidxSent=!0),this.meta&&(this.flattenItemInfo&&!this.itemListBuilt&&(this.flattenItemInfo(),this.itemListBuilt=!0),this.processItems&&this.processItems(this.onItem)),this.stream.cleanBuffers&&(L.info("ISOFile","Done processing buffer (fileStart: "+e.fileStart+") - next buffer to fetch should have a fileStart position of "+s),this.stream.logBufferLevel(),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0),L.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize())),s}getFragmentDuration(){const e=this.getBox("mvex");if(!e)return;if(e.mehd)return{num:e.mehd.fragment_duration,den:this.moov.mvhd.timescale};const i=this.getBoxes("trak",!1);let s={num:0,den:1};for(const n of i){const a=n.samples_duration,o=n.mdia.mdhd.timescale;a&&o&&a/o>s.num/s.den&&(s={num:a,den:o})}return s}getInfo(){if(!this.moov)return{hasMoov:!1,mime:""};const e=new Date("1904-01-01T00:00:00Z").getTime(),i=this.getBox("mvex")!==void 0,s={hasMoov:!0,duration:this.moov.mvhd.duration,timescale:this.moov.mvhd.timescale,isFragmented:i,fragment_duration:this.getFragmentDuration(),isProgressive:this.isProgressive,hasIOD:this.moov.iods!==void 0,brands:[this.ftyp.major_brand].concat(this.ftyp.compatible_brands),created:new Date(e+this.moov.mvhd.creation_time*1e3),modified:new Date(e+this.moov.mvhd.modification_time*1e3),tracks:[],audioTracks:[],videoTracks:[],subtitleTracks:[],metadataTracks:[],hintTracks:[],otherTracks:[],mime:""};for(let n=0;n<this.moov.traks.length;n++){const a=this.moov.traks[n],o=a.mdia.minf.stbl.stsd.entries[0],l=a.samples_size,c=a.mdia.mdhd.timescale,u=a.samples_duration,d={samples_duration:u,bitrate:l*8*c/u,size:l,timescale:c,alternate_group:a.tkhd.alternate_group,codec:o.getCodec(),created:new Date(e+a.tkhd.creation_time*1e3),cts_shift:a.mdia.minf.stbl.cslg,duration:a.mdia.mdhd.duration,id:a.tkhd.track_id,kind:a.udta&&a.udta.kinds.length?a.udta.kinds[0]:{schemeURI:"",value:""},language:a.mdia.elng?a.mdia.elng.extended_language:a.mdia.mdhd.languageString,layer:a.tkhd.layer,matrix:a.tkhd.matrix,modified:new Date(e+a.tkhd.modification_time*1e3),movie_duration:a.tkhd.duration,movie_timescale:s.timescale,name:a.mdia.hdlr.name,nb_samples:a.samples.length,references:[],track_height:a.tkhd.height/65536,track_width:a.tkhd.width/65536,volume:a.tkhd.volume};if(s.tracks.push(d),a.tref)for(let f=0;f<a.tref.references.length;f++)d.references.push({type:a.tref.references[f].type,track_ids:a.tref.references[f].track_ids});a.edts!==void 0&&a.edts.elst!==void 0&&(d.edits=a.edts.elst.entries),o instanceof rs?(d.type="audio",s.audioTracks.push(d),d.audio={sample_rate:o.getSampleRate(),channel_count:o.getChannelCount(),sample_size:o.getSampleSize()}):o instanceof Ye?(d.type="video",s.videoTracks.push(d),d.video={width:o.getWidth(),height:o.getHeight()}):o instanceof Ir?(d.type="subtitles",s.subtitleTracks.push(d)):o instanceof qp?(d.type="metadata",s.hintTracks.push(d)):o instanceof fa?(d.type="metadata",s.metadataTracks.push(d)):(d.type="metadata",s.otherTracks.push(d))}s.videoTracks&&s.videoTracks.length>0?s.mime+='video/mp4; codecs="':s.audioTracks&&s.audioTracks.length>0?s.mime+='audio/mp4; codecs="':s.mime+='application/mp4; codecs="';for(let n=0;n<s.tracks.length;n++)n!==0&&(s.mime+=","),s.mime+=s.tracks[n].codec;return s.mime+='"; profiles="',s.mime+=this.ftyp.compatible_brands.join(),s.mime+='"',s}setNextSeekPositionFromSample(e){e&&(this.nextSeekPosition?this.nextSeekPosition=Math.min(e.offset+e.alreadyRead,this.nextSeekPosition):this.nextSeekPosition=e.offset+e.alreadyRead)}processSamples(e){if(this.sampleProcessingStarted){if(this.isFragmentationInitialized&&this.onSegment!==void 0){const i=new Set;for(;i.size<this.fragmentedTracks.length&&this.fragmentedTracks.some(s=>s.trak.nextSample<s.trak.samples.length)&&this.sampleProcessingStarted;)for(const s of this.fragmentedTracks){const n=s.trak;if(!i.has(s.id)){const a=n.nextSample<n.samples.length?this.getSample(n,n.nextSample):void 0;if(!a){this.setNextSeekPositionFromSample(n.samples[n.nextSample]),i.add(s.id);continue}s.state.accumulatedSize+=a.size;const o=n.nextSample+1,l=o-s.state.lastFragmentSampleNumber>s.nb_samples_per_fragment,c=o-s.state.lastSegmentSampleNumber>s.nb_samples;let u=l||o%s.nb_samples_per_fragment===0,d=c||o%s.nb_samples===0,f=s.state.accumulatedSize>=s.size_per_segment;const p=!s.rapAlignement||a.is_sync,v=e||n.nextSample+1>=n.samples.length;if(v&&!p&&L.warn("ISOFile","Flushing track #"+s.id+" at sample #"+n.nextSample+" which is not a RAP, this may lead to playback issues"),u=u&&p,d=d&&p,f=f&&p,u||f||v){l?L.warn("ISOFile","Fragment on track #"+s.id+" is overdue, creating it with samples ["+s.state.lastFragmentSampleNumber+", "+n.nextSample+"]"):L.debug("ISOFile","Creating media fragment on track #"+s.id+" for samples ["+s.state.lastFragmentSampleNumber+", "+n.nextSample+"]");const g=this.createFragment(s.id,s.state.lastFragmentSampleNumber,n.nextSample,s.segmentStream);if(g)s.segmentStream=g,s.state.lastFragmentSampleNumber=n.nextSample+1;else{i.add(s.id);continue}}(d||f||v)&&(c?L.warn("ISOFile","Segment on track #"+s.id+" is overdue, sending it with samples ["+Math.max(0,n.nextSample-s.nb_samples)+", "+(n.nextSample-1)+"]"):L.info("ISOFile","Sending fragmented data on track #"+s.id+" for samples ["+Math.max(0,n.nextSample-s.nb_samples)+", "+(n.nextSample-1)+"]"),L.info("ISOFile","Sample data size in memory: "+this.getAllocatedSampleDataSize()),this.onSegment&&this.onSegment(s.id,s.user,s.segmentStream.buffer,n.nextSample+1,e||n.nextSample+1>=n.samples.length),s.segmentStream=void 0,s.state.accumulatedSize=0,s.state.lastSegmentSampleNumber=n.nextSample+1),n.nextSample++}}}if(this.onSamples!==void 0)for(let i=0;i<this.extractedTracks.length;i++){const s=this.extractedTracks[i],n=s.trak;for(;n.nextSample<n.samples.length&&this.sampleProcessingStarted;){L.debug("ISOFile","Exporting on track #"+s.id+" sample #"+n.nextSample);const a=this.getSample(n,n.nextSample);if(a)n.nextSample++,s.samples.push(a);else{this.setNextSeekPositionFromSample(n.samples[n.nextSample]);break}if((n.nextSample%s.nb_samples===0||n.nextSample>=n.samples.length)&&(L.debug("ISOFile","Sending samples on track #"+s.id+" for sample "+n.nextSample),this.onSamples&&this.onSamples(s.id,s.user,s.samples),s.samples=[],s!==this.extractedTracks[i]))break}}}}getBox(e){const i=this.getBoxes(e,!0);return i.length?i[0]:void 0}getBoxes(e,i){const s=[],n=a=>{a instanceof mt&&a.type&&a.type===e&&s.push(a);const o=[];a.boxes&&o.push(...a.boxes),a.entries&&o.push(...a.entries),a.item_infos&&o.push(...a.item_infos),a.references&&o.push(...a.references);for(const l of o){if(s.length&&i)return;n(l)}};return n(this),s}getTrackSamplesInfo(e){const i=this.getTrackById(e);if(i)return i.samples}getTrackSample(e,i){const s=this.getTrackById(e);return this.getSample(s,i)}releaseUsedSamples(e,i){let s=0;const n=this.getTrackById(e);n.lastValidSample||(n.lastValidSample=0);for(let a=n.lastValidSample;a<i;a++)s+=this.releaseSample(n,a);L.info("ISOFile","Track #"+e+" released samples up to "+i+" (released size: "+s+", remaining: "+this.samplesDataSize+")"),n.lastValidSample=i}start(){this.sampleProcessingStarted=!0,this.processSamples(!1)}stop(){this.sampleProcessingStarted=!1}flush(){L.info("ISOFile","Flushing remaining samples"),this.updateSampleLists(),this.processSamples(!0),this.stream.cleanBuffers(),this.stream.logBufferLevel(!0)}seekTrack(e,i,s){let n=0,a=0,o;if(s.samples.length===0)return L.info("ISOFile","No sample in track, cannot seek! Using time "+L.getDurationString(0,1)+" and offset: 0"),{offset:0,time:0};for(let c=0;c<s.samples.length;c++){const u=s.samples[c];if(c===0)a=0,o=u.timescale;else if(u.cts>e*u.timescale){a=c-1;break}i&&u.is_sync&&(n=c)}for(i&&(a=n),e=s.samples[a].cts,s.nextSample=a,this.resetFragmentedTrackStateAfterSeek(s,a),this.resetExtractedTrackStateAfterSeek(s);s.samples[a].alreadyRead===s.samples[a].size&&s.samples[a+1];)a++;const l=s.samples[a].offset+s.samples[a].alreadyRead;return L.info("ISOFile","Seeking to "+(i?"RAP":"")+" sample #"+s.nextSample+" on track "+s.tkhd.track_id+", time "+L.getDurationString(e,o)+" and offset: "+l),{offset:l,time:e/o}}resetFragmentedTrackStateAfterSeek(e,i){const s=this.fragmentedTracks.find(n=>n.trak===e);s&&(s.state.lastFragmentSampleNumber=i,s.state.lastSegmentSampleNumber=i,s.state.accumulatedSize=0,s.segmentStream=void 0)}resetExtractedTrackStateAfterSeek(e){const i=this.extractedTracks.find(s=>s.trak===e);i&&(i.samples=[])}getTrackDuration(e){if(!e.samples)return 1/0;const i=e.samples[e.samples.length-1];return(i.cts+i.duration)/i.timescale}seek(e,i){const s=this.moov;let n={offset:1/0,time:1/0};if(this.moov){for(let a=0;a<s.traks.length;a++){const o=s.traks[a];if(e>this.getTrackDuration(o))continue;const l=this.seekTrack(e,i,o);l.offset<n.offset&&(n.offset=l.offset),l.time<n.time&&(n.time=l.time)}return L.info("ISOFile","Seeking at time "+L.getDurationString(n.time,1)+" needs a buffer with a fileStart position of "+n.offset),n.offset===1/0?n={offset:this.nextParsePosition,time:0}:n.offset=this.stream.getEndFilePositionAfter(n.offset),L.info("ISOFile","Adjusted seek position (after checking data already in buffer): "+n.offset),n}else throw new Error("Cannot seek: moov not received!")}equal(e){let i=0;for(;i<this.boxes.length&&i<e.boxes.length;){const s=this.boxes[i],n=e.boxes[i];if(!M_(s,n))return!1;i++}return!0}write(e){for(let i=0;i<this.boxes.length;i++)this.boxes[i].write(e)}createFragment(e,i,s,n){if(s<i)return L.warn("ISOFile",`Skipping fragment creation on track #${e}: invalid sample range [${i}, ${s}]`),n||new Hi;const a=[];for(let d=i;d<=s;d++){const f=this.getTrackById(e),p=this.getSample(f,d);if(!p){this.setNextSeekPositionFromSample(f.samples[d]);return}a.push(p)}const o=n||new Hi,l=this.createMoof(a);l.write(o),l.trafs[0].truns[0].data_offset=l.size+8,L.debug("MP4Box","Adjusting data_offset with new value "+l.trafs[0].truns[0].data_offset),o.adjustUint32(l.trafs[0].truns[0].data_offset_position,l.trafs[0].truns[0].data_offset);const c=new El;c.stream=new Bl;let u=0;for(const d of a)if(d.data){const f=Fn.fromArrayBuffer(d.data.buffer,u);c.stream.insertBuffer(f),u+=d.data.byteLength}return c.write(o),o}static writeInitializationSegment(e,i,s,n){L.debug("ISOFile","Generating initialization segment");const a=new Hi;e.write(a);const o=nn.normalizeAudioSampleEntriesForMSEFragmentedInit(i.traks,n);try{const l=i.addBox(new od);if(s){const c=l.addBox(new Y_);c.fragment_duration=s}for(let c=0;c<i.traks.length;c++){const u=l.addBox(new ld);u.track_id=i.traks[c].tkhd.track_id,u.default_sample_description_index=1,u.default_sample_duration=i.traks[c].samples[0]?.duration??0,u.default_sample_size=0,u.default_sample_flags=65536}i.write(a)}finally{for(let l=o.length-1;l>=0;l--)o[l]()}return a.buffer}save(e){const i=new Hi;return i.isofile=this,this.write(i),i.save(e)}getBuffer(){const e=new Hi;return e.isofile=this,this.write(e),e}static normalizeAudioSampleEntriesForMSEFragmentedInit(e,i){const s=[];for(const n of e)if(i?.has(n.tkhd.track_id))for(const a of n.mdia.minf.stbl.stsd?.entries??[]){if(!(a instanceof tg))continue;const o=a.wave?.esds;if(a.esds||!o)continue;const l=a.esds,c=a.wave,u=a.boxes;s.push(()=>{a.esds=l,a.wave=c,a.boxes=u});const d=Array.isArray(a.boxes)?a.boxes.filter(f=>f?.type!=="wave"&&f?.type!=="esds"):[];a.esds=o,a.boxes=[...d,o],a.wave=void 0}return s}initializeSegmentation(e){if(this.onSegment||L.warn("MP4Box","No segmentation callback set!"),e!==void 0&&e!=="combined"&&e!=="per-track")throw new Error(`Invalid segmentation mode: ${e}`);this.isFragmentationInitialized||(this.isFragmentationInitialized=!0,this.resetTables());const i=[];for(const o of this.fragmentedTracks){const l=this.getTrackById(o.id);if(!l){L.warn("ISOFile",`Track with id ${o.id} not found, skipping fragmentation initialization`);continue}i.push({id:o.id,user:o.user,trak:l})}const s=this.moov?.mvex?.mehd?.fragment_duration,n=new Set(this.fragmentedTracks.filter(o=>o.normalizeAudioSampleEntriesForMSE!==!1).map(o=>o.id));if(e==="per-track")return i.map(({id:o,user:l,trak:c})=>{const u=new Tl;return u.addBox(this.moov.mvhd),u.addBox(c),{id:o,user:l,buffer:nn.writeInitializationSegment(this.ftyp,u,s,n)}});const a=new Tl;a.addBox(this.moov.mvhd);for(const o of i)a.addBox(o.trak);return{tracks:i.map(({id:o,user:l})=>({id:o,user:l})),buffer:nn.writeInitializationSegment(this.ftyp,a,s,n)}}resetTables(){this.initial_duration=this.moov.mvhd.duration,this.moov.mvhd.duration=0;for(let e=0;e<this.moov.traks.length;e++){const i=this.moov.traks[e];i.tkhd.duration=0,i.mdia.mdhd.duration=0;const s=i.mdia.minf.stbl.stco||i.mdia.minf.stbl.co64;s.chunk_offsets=[];const n=i.mdia.minf.stbl.stsc;n.first_chunk=[],n.samples_per_chunk=[],n.sample_description_index=[];const a=i.mdia.minf.stbl.stsz||i.mdia.minf.stbl.stz2;a.sample_sizes=[];const o=i.mdia.minf.stbl.stts;o.sample_counts=[],o.sample_deltas=[];const l=i.mdia.minf.stbl.ctts;l&&(l.sample_counts=[],l.sample_offsets=[]);const c=i.mdia.minf.stbl.stss,u=i.mdia.minf.stbl.boxes.indexOf(c);u!==-1&&(i.mdia.minf.stbl.boxes[u]=void 0)}}static initSampleGroups(e,i,s,n,a){i&&(i.sample_groups_info=[]),e.sample_groups_info||(e.sample_groups_info=[]);for(let o=0;o<s.length;o++){const l=s[o].grouping_type+"/"+s[o].grouping_type_parameter,c=new xu(s[o].grouping_type,s[o].grouping_type_parameter,s[o]);i&&(i.sample_groups_info[l]=c),e.sample_groups_info[l]||(e.sample_groups_info[l]=c);for(let u=0;u<n.length;u++)n[u].grouping_type===s[o].grouping_type&&(c.description=n[u],c.description.used=!0);if(a)for(let u=0;u<a.length;u++)a[u].grouping_type===s[o].grouping_type&&(c.fragment_description=a[u],c.fragment_description.used=!0,c.is_fragment=!0)}if(i){if(a){for(let o=0;o<a.length;o++)if(!a[o].used&&a[o].version>=2){const l=a[o].grouping_type+"/0",c=new xu(a[o].grouping_type,0);c.is_fragment=!0,i.sample_groups_info[l]||(i.sample_groups_info[l]=c)}}}else for(let o=0;o<n.length;o++)if(!n[o].used&&n[o].version>=2){const l=n[o].grouping_type+"/0",c=new xu(n[o].grouping_type,0);e.sample_groups_info[l]||(e.sample_groups_info[l]=c)}}static setSampleGroupProperties(e,i,s,n){i.sample_groups=[];for(const a in n)if(i.sample_groups[a]={grouping_type:n[a].grouping_type,grouping_type_parameter:n[a].grouping_type_parameter},s>=n[a].last_sample_in_run&&(n[a].last_sample_in_run<0&&(n[a].last_sample_in_run=0),n[a].entry_index++,n[a].entry_index<=n[a].sbgp.entries.length-1&&(n[a].last_sample_in_run+=n[a].sbgp.entries[n[a].entry_index].sample_count)),n[a].entry_index<=n[a].sbgp.entries.length-1?i.sample_groups[a].group_description_index=n[a].sbgp.entries[n[a].entry_index].group_description_index:i.sample_groups[a].group_description_index=-1,i.sample_groups[a].group_description_index!==0){let o;if(n[a].fragment_description?o=n[a].fragment_description:o=n[a].description,i.sample_groups[a].group_description_index>0){let l;i.sample_groups[a].group_description_index>65535?l=(i.sample_groups[a].group_description_index>>16)-1:l=i.sample_groups[a].group_description_index-1,o&&l>=0&&(i.sample_groups[a].description=o.entries[l])}else o&&o.version>=2&&o.default_group_description_index>0&&(i.sample_groups[a].description=o.entries[o.default_group_description_index-1])}}static process_sdtp(e,i,s){i&&(e?(i.is_leading=e.is_leading[s],i.depends_on=e.sample_depends_on[s],i.is_depended_on=e.sample_is_depended_on[s],i.has_redundancy=e.sample_has_redundancy[s]):(i.is_leading=0,i.depends_on=0,i.is_depended_on=0,i.has_redundancy=0))}buildSampleLists(){for(let e=0;e<this.moov.traks.length;e++)this.buildTrakSampleLists(this.moov.traks[e])}buildTrakSampleLists(e){let i,s,n,a,o,l;e.samples=[],e.samples_duration=0,e.samples_size=0;const c=e.mdia.minf.stbl.stco||e.mdia.minf.stbl.co64,u=e.mdia.minf.stbl.stsc,d=e.mdia.minf.stbl.stsz||e.mdia.minf.stbl.stz2,f=e.mdia.minf.stbl.stts,p=e.mdia.minf.stbl.ctts,v=e.mdia.minf.stbl.stss,g=e.mdia.minf.stbl.stsd,_=e.mdia.minf.stbl.subs,x=e.mdia.minf.stbl.stdp,E=e.mdia.minf.stbl.sbgps,I=e.mdia.minf.stbl.sgpds;let z=-1,$=-1,M=-1,V=-1,N=0,H=0,T=0;if(nn.initSampleGroups(e,void 0,E,I),!(typeof d>"u")){for(i=0;i<d.sample_sizes.length;i++){const j={number:i,track_id:e.tkhd.track_id,timescale:e.mdia.mdhd.timescale,alreadyRead:0,size:d.sample_sizes[i]};e.samples[i]=j,e.samples_size+=j.size,i===0?(n=1,s=0,j.chunk_index=n,j.chunk_run_index=s,l=u.samples_per_chunk[s],o=0,s+1<u.first_chunk.length?a=u.first_chunk[s+1]-1:a=1/0):i<l?(j.chunk_index=n,j.chunk_run_index=s):(n++,j.chunk_index=n,o=0,n<=a||(s++,s+1<u.first_chunk.length?a=u.first_chunk[s+1]-1:a=1/0),j.chunk_run_index=s,l+=u.samples_per_chunk[s]),j.description_index=u.sample_description_index[j.chunk_run_index]-1,j.description=g.entries[j.description_index],j.offset=c.chunk_offsets[j.chunk_index-1]+o,o+=j.size,i>z&&($++,z<0&&(z=0),z+=f.sample_counts[$]),i>0?(e.samples[i-1].duration=f.sample_deltas[$],e.samples_duration+=e.samples[i-1].duration,j.dts=e.samples[i-1].dts+e.samples[i-1].duration):j.dts=0,p?(i>=M&&(V++,M<0&&(M=0),M+=p.sample_counts[V]),j.cts=e.samples[i].dts+p.sample_offsets[V]):j.cts=j.dts,v?(i===v.sample_numbers[N]-1?(j.is_sync=!0,N++):(j.is_sync=!1,j.degradation_priority=0),_&&_.entries[H].sample_delta+T===i+1&&(j.subsamples=_.entries[H].subsamples,T+=_.entries[H].sample_delta,H++)):j.is_sync=!0,nn.process_sdtp(e.mdia.minf.stbl.sdtp,j,j.number),x?j.degradation_priority=x.priority[i]:j.degradation_priority=0,_&&_.entries[H].sample_delta+T===i&&(j.subsamples=_.entries[H].subsamples,T+=_.entries[H].sample_delta),(E.length>0||I.length>0)&&nn.setSampleGroupProperties(e,j,i,e.sample_groups_info)}i>0&&(e.samples[i-1].duration=Math.max(e.mdia.mdhd.duration-e.samples[i-1].dts,0),e.samples_duration+=e.samples[i-1].duration)}}updateSampleLists(){let e,i,s,n,a;if(this.moov!==void 0)for(;this.lastMoofIndex<this.moofs.length;){const o=this.moofs[this.lastMoofIndex];if(this.lastMoofIndex++,o.type==="moof"){const l=o;for(let c=0;c<l.trafs.length;c++){const u=l.trafs[c],d=this.getTrackById(u.tfhd.track_id),f=this.getTrexById(u.tfhd.track_id);u.tfhd.flags&2?e=u.tfhd.default_sample_description_index:e=f?f.default_sample_description_index:1,u.tfhd.flags&8?i=u.tfhd.default_sample_duration:i=f?f.default_sample_duration:0,u.tfhd.flags&16?s=u.tfhd.default_sample_size:s=f?f.default_sample_size:0,u.tfhd.flags&32?n=u.tfhd.default_sample_flags:n=f?f.default_sample_flags:0,u.sample_number=0,u.sbgps.length>0&&nn.initSampleGroups(d,u,u.sbgps,d.mdia.minf.stbl.sgpds,u.sgpds);for(let p=0;p<u.truns.length;p++){const v=u.truns[p];for(let g=0;g<v.sample_count;g++){const _=e-1;let x=n;v.flags&1024?x=v.sample_flags[g]:g===0&&v.flags&4&&(x=v.first_sample_flags);let E=s;v.flags&512&&(E=v.sample_size[g]),d.samples_size+=E;let I=i;v.flags&256&&(I=v.sample_duration[g]),d.samples_duration+=I;let z;d.first_traf_merged||g>0?z=d.samples[d.samples.length-1].dts+d.samples[d.samples.length-1].duration:(u.tfdt?z=u.tfdt.baseMediaDecodeTime:z=0,d.first_traf_merged=!0);let $=z;v.flags&2048&&($=z+v.sample_composition_time_offset[g]);const M=!!(u.tfhd.flags&1),V=!!(u.tfhd.flags&131072),N=!!(v.flags&1);let H=0;M?H=u.tfhd.base_data_offset:V||p===0?H=l.start:H=a;let T;p===0&&g===0?N?T=H+v.data_offset:T=H:T=a,a=T+E;const j=u.sample_number;u.sample_number++;const St={cts:$,description_index:_,description:d.mdia.minf.stbl.stsd.entries[_],dts:z,duration:I,moof_number:this.lastMoofIndex,number_in_traf:j,number:d.samples.length,offset:T,size:E,timescale:d.mdia.mdhd.timescale,track_id:d.tkhd.track_id,is_sync:!(x>>16&1),is_leading:x>>26&3,depends_on:x>>24&3,is_depended_on:x>>22&3,has_redundancy:x>>20&3,degradation_priority:x&65535};u.first_sample_index=d.samples.length,d.samples.push(St),(u.sbgps.length>0||u.sgpds.length>0||d.mdia.minf.stbl.sbgps.length>0||d.mdia.minf.stbl.sgpds.length>0)&&nn.setSampleGroupProperties(d,St,St.number_in_traf,u.sample_groups_info)}}if(u.subs){d.has_fragment_subsamples=!0;let p=u.first_sample_index;for(let v=0;v<u.subs.entries.length;v++){p+=u.subs.entries[v].sample_delta;const g=d.samples[p-1];g.subsamples=u.subs.entries[v].subsamples}}}}}}getSample(e,i){const s=e.samples[i];if(this.moov){if(!s.data)s.data=new Uint8Array(s.size),s.alreadyRead=0,this.samplesDataSize+=s.size,L.debug("ISOFile","Allocating sample #"+i+" on track #"+e.tkhd.track_id+" of size "+s.size+" (total: "+this.samplesDataSize+")");else if(s.alreadyRead===s.size)return s;for(;;){let n=this.stream,a=n.findPosition(!0,s.offset+s.alreadyRead,!1),o,l;if(a>-1)o=n.buffers[a],l=o.fileStart;else for(const c of this.mdats){if(!c.stream){L.debug("ISOFile","mdat stream not yet fully read for #"+this.mdats.indexOf(c)+" mdat");continue}if(a=c.stream.findPosition(!0,s.offset+s.alreadyRead-c.start-c.hdr_size,!1),a>-1){n=c.stream,o=c.stream.buffers[a],l=c.start+c.hdr_size+o.fileStart;break}}if(o){const c=o.byteLength-(s.offset+s.alreadyRead-l);if(s.size-s.alreadyRead<=c)return L.debug("ISOFile","Getting sample #"+i+" data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-l)+" read size: "+(s.size-s.alreadyRead)+" full size: "+s.size+")"),Hi.memcpy(s.data.buffer,s.alreadyRead,o,s.offset+s.alreadyRead-l,s.size-s.alreadyRead),o.usedBytes+=s.size-s.alreadyRead,n.logBufferLevel(),s.alreadyRead=s.size,s;if(c===0)return;L.debug("ISOFile","Getting sample #"+i+" partial data (alreadyRead: "+s.alreadyRead+" offset: "+(s.offset+s.alreadyRead-l)+" read size: "+c+" full size: "+s.size+")"),Hi.memcpy(s.data.buffer,s.alreadyRead,o,s.offset+s.alreadyRead-l,c),s.alreadyRead+=c,o.usedBytes+=c,n.logBufferLevel()}else return}}}releaseSample(e,i){const s=e.samples[i];return s.data?(this.samplesDataSize-=s.size,s.data=void 0,s.alreadyRead=0,s.size):0}getAllocatedSampleDataSize(){return this.samplesDataSize}getCodecs(){let e="";for(let i=0;i<this.moov.traks.length;i++){const s=this.moov.traks[i];i>0&&(e+=","),e+=s.mdia.minf.stbl.stsd.entries[0].getCodec()}return e}getTrexById(e){if(!(!this.moov||!this.moov.mvex))for(let i=0;i<this.moov.mvex.trexs.length;i++){const s=this.moov.mvex.trexs[i];if(s.track_id===e)return s}}getTrackById(e){if(this.moov)for(let i=0;i<this.moov.traks.length;i++){const s=this.moov.traks[i];if(s.tkhd.track_id===e)return s}}flattenItemInfo(){const e=this.items,i=this.entity_groups,s=this.meta;if(!(!s||!s.hdlr||!s.iinf)){for(let n=0;n<s.iinf.item_infos.length;n++){const a=s.iinf.item_infos[n].item_ID;e[a]={id:a,name:s.iinf.item_infos[n].item_name,ref_to:[],content_type:s.iinf.item_infos[n].content_type,content_encoding:s.iinf.item_infos[n].content_encoding,item_uri_type:s.iinf.item_infos[n].item_uri_type,type:s.iinf.item_infos[n].item_type?s.iinf.item_infos[n].item_type:"mime",protection:s.iinf.item_infos[n].item_protection_index>0?s.ipro.protections[s.iinf.item_infos[n].item_protection_index-1]:void 0}}if(s.grpl)for(let n=0;n<s.grpl.boxes.length;n++){const a=s.grpl.boxes[n];i[a.group_id]={id:a.group_id,entity_ids:a.entity_ids,type:a.type}}if(s.iloc)for(let n=0;n<s.iloc.items.length;n++){const a=s.iloc.items[n],o=e[a.item_ID];a.data_reference_index!==0&&(L.warn("Item storage with reference to other files: not supported"),o.source=s.dinf.boxes[a.data_reference_index-1]),o.extents=[],o.size=0;for(let l=0;l<a.extents.length;l++)o.extents[l]={offset:a.extents[l].extent_offset+a.base_offset,length:a.extents[l].extent_length,alreadyRead:0},a.construction_method===1&&(o.extents[l].offset+=s.idat.start+s.idat.hdr_size),o.size+=o.extents[l].length}if(s.pitm){const n=s.pitm.item_id;e[n]?e[n].primary=!0:L.warn("ISOFile","Primary item_id #"+n+" does not exist in items")}if(s.iref)for(let n=0;n<s.iref.references.length;n++){const a=s.iref.references[n];for(let o=0;o<a.references.length;o++)e[a.from_item_ID].ref_to.push({type:a.type,id:a.references[o]})}if(s.iprp)for(let n=0;n<s.iprp.ipmas.length;n++){const a=s.iprp.ipmas[n];for(let o=0;o<a.associations.length;o++){const l=a.associations[o],c=e[l.id]??i[l.id];if(c){c.properties===void 0&&(c.properties={boxes:[]});for(let u=0;u<l.props.length;u++){const d=l.props[u];if(d.property_index>0&&d.property_index-1<s.iprp.ipco.boxes.length){const f=s.iprp.ipco.boxes[d.property_index-1];c.properties[f.type]=f,c.properties.boxes.push(f)}}}}}}}getItem(e){if(!this.meta)return;const i=this.items[e];if(!i.data&&i.size)i.data=new Uint8Array(i.size),i.alreadyRead=0,this.itemsDataSize+=i.size,L.debug("ISOFile","Allocating item #"+e+" of size "+i.size+" (total: "+this.itemsDataSize+")");else if(i.alreadyRead===i.size)return i;for(let s=0;s<i.extents.length;s++){const n=i.extents[s];if(n.alreadyRead!==n.length){const a=this.stream.findPosition(!0,n.offset+n.alreadyRead,!1);if(a>-1){const o=this.stream.buffers[a],l=o.byteLength-(n.offset+n.alreadyRead-o.fileStart);if(n.length-n.alreadyRead<=l)L.debug("ISOFile","Getting item #"+e+" extent #"+s+" data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-o.fileStart)+" read size: "+(n.length-n.alreadyRead)+" full extent size: "+n.length+" full item size: "+i.size+")"),Hi.memcpy(i.data.buffer,i.alreadyRead,o,n.offset+n.alreadyRead-o.fileStart,n.length-n.alreadyRead),(!this.parsingMdat||this.discardMdatData)&&(o.usedBytes+=n.length-n.alreadyRead),this.stream.logBufferLevel(),i.alreadyRead+=n.length-n.alreadyRead,n.alreadyRead=n.length;else{L.debug("ISOFile","Getting item #"+e+" extent #"+s+" partial data (alreadyRead: "+n.alreadyRead+" offset: "+(n.offset+n.alreadyRead-o.fileStart)+" read size: "+l+" full extent size: "+n.length+" full item size: "+i.size+")"),Hi.memcpy(i.data.buffer,i.alreadyRead,o,n.offset+n.alreadyRead-o.fileStart,l),n.alreadyRead+=l,i.alreadyRead+=l,(!this.parsingMdat||this.discardMdatData)&&(o.usedBytes+=l),this.stream.logBufferLevel();return}}else return}}if(i.alreadyRead===i.size)return i}releaseItem(e){const i=this.items[e];if(i.data){this.itemsDataSize-=i.size,i.data=void 0,i.alreadyRead=0;for(let s=0;s<i.extents.length;s++){const n=i.extents[s];n.alreadyRead=0}return i.size}else return 0}processItems(e){for(const i in this.items){const s=this.items[i];this.getItem(s.id),e&&!s.sent&&(e(s),s.sent=!0,s.data=void 0)}}hasItem(e){for(const i in this.items){const s=this.items[i];if(s.name===e)return s.id}return-1}getMetaHandler(){if(this.meta)return this.meta.hdlr.handler}getPrimaryItem(){if(this.meta&&this.meta.pitm)return this.getItem(this.meta.pitm.item_id)}itemToFragmentedTrackFile({itemId:e}={}){let i;if(e?i=this.getItem(e):i=this.getPrimaryItem(),!i)return;const s=new nn;s.discardMdatData=!1;const n={type:i.type,description_boxes:i.properties.boxes};i.properties.ispe&&(n.width=i.properties.ispe.image_width,n.height=i.properties.ispe.image_height);const a=s.addTrack(n);if(a)return s.addSample(a,i.data),s}processIncompleteBox(e){if(e.type==="mdat"){const i=new El(e.size);return this.parsingMdat=i,this.boxes.push(i),this.mdats.push(i),i.start=e.start,i.hdr_size=e.hdr_size,i.original_size=e.original_size,this.stream.addUsedBytes(i.hdr_size),this.lastBoxStartPosition=i.start+i.size,this.stream.seek(i.start+i.size,!1,this.discardMdatData)?(this.transferMdatData(),this.parsingMdat=void 0,!0):(this.moovStartFound?this.nextParsePosition=this.stream.findEndContiguousBuf():this.nextParsePosition=i.start+i.size,!1)}else return e.type==="moov"&&(this.moovStartFound=!0,this.mdats.length===0&&(this.isProgressive=!0)),this.stream.mergeNextBuffer&&this.stream.mergeNextBuffer()?(this.nextParsePosition=this.stream.getEndPosition(),!0):(e.type?this.moovStartFound?this.nextParsePosition=this.stream.getEndPosition():this.nextParsePosition=this.stream.getPosition()+e.size:this.nextParsePosition=this.stream.getEndPosition(),!1)}hasIncompleteMdat(){return this.parsingMdat!==void 0}transferMdatData(e){const i=e??this.parsingMdat;if(this.discardMdatData){L.debug("ISOFile","Discarding 'mdat' data, not transferring it to the mdat box stream");return}if(!i){L.warn("ISOFile","Cannot transfer 'mdat' data, no mdat box is being parsed");return}const s=this.stream.findPosition(!0,i.start+i.hdr_size,!1),n=this.stream.findPosition(!0,i.start+i.size,!1);if(s===-1||n===-1){L.warn("ISOFile","Cannot transfer 'mdat' data, start or end buffer not found");return}i.stream=new Bl;for(let a=s;a<=n;a++){const o=this.stream.buffers[a],l=a===s?i.start+i.hdr_size-o.fileStart:0,c=a===n?i.start+i.size-o.fileStart:o.byteLength;if(c>l){L.debug("ISOFile","Transferring 'mdat' data from buffer #"+a+" ("+l+" to "+c+")");const u=c-l,d=new Fn(u),f=i.stream.getAbsoluteEndPosition();Hi.memcpy(d,0,o,l,u),d.fileStart=f,i.stream.insertBuffer(d),o.usedBytes+=u}}}processIncompleteMdat(){const e=this.parsingMdat;return this.stream.seek(e.start+e.size,!1,this.discardMdatData)?(L.debug("ISOFile","Found 'mdat' end in buffered data"),this.transferMdatData(),this.parsingMdat=void 0,!0):(this.nextParsePosition=this.stream.findEndContiguousBuf(),!1)}restoreParsePosition(){return this.stream.seek(this.lastBoxStartPosition,!0,this.discardMdatData)}saveParsePosition(){this.lastBoxStartPosition=this.stream.getPosition()}updateUsedBytes(e,i){this.stream.addUsedBytes&&(e.type==="mdat"?(this.stream.addUsedBytes(e.hdr_size),this.discardMdatData&&this.stream.addUsedBytes(e.size-e.hdr_size)):this.stream.addUsedBytes(e.size))}addBox(e){return mt.prototype.addBox.call(this,e)}init(e={}){const i=this.addBox(new j_);i.major_brand=e.brands&&e.brands[0]||"iso4",i.minor_version=0,i.compatible_brands=e.brands||["iso4"];const s=this.addBox(new Tl);s.addBox(new od);const n=s.addBox(new J_);return n.timescale=e.timescale||600,n.rate=e.rate||65536,n.creation_time=0,n.modification_time=0,n.duration=e.duration||0,n.volume=e.width?0:256,n.matrix=[65536,0,0,0,65536,0,0,0,1073741824],n.next_track_id=1,this}addTrack(e={}){this.moov||this.init(e);const i=e||{};i.width=i.width||320,i.height=i.height||320,i.id=i.id||this.moov.mvhd.next_track_id,i.type=i.type||"avc1";const s=this.moov.addBox(new $_);this.moov.mvhd.next_track_id=i.id+1;const n=s.addBox(new dg);n.flags=7,n.creation_time=0,n.modification_time=0,n.track_id=i.id,n.duration=i.duration||0,n.layer=i.layer||0,n.alternate_group=0,n.volume=1,n.matrix=[65536,0,0,0,65536,0,0,0,1073741824],n.width=i.width<<16,n.height=i.height<<16;const a=s.addBox(new O_),o=a.addBox(new W_);o.creation_time=0,o.modification_time=0,o.timescale=i.timescale||1,o.duration=i.media_duration||0,o.language=i.language||"und";const l=a.addBox(new G_);l.handler=i.hdlr||"vide",l.name=i.name||"Track created with MP4Box.js";const c=a.addBox(new V_);c.extended_language=i.language||"fr-FR";const u=a.addBox(new F_),d=Ji.sampleEntry[i.type];if(!d)return;const f=new d;if(f.data_reference_index=1,f instanceof Ye){const $=f,M=u.addBox(new pg);M.graphicsmode=0,M.opcolor=[0,0,0],$.width=i.width,$.height=i.height,$.horizresolution=72<<16,$.vertresolution=72<<16,$.frame_count=1,$.compressorname=i.type+" Compressor",$.depth=24,i.avcDecoderConfigRecord?$.addBox(new z_(i.avcDecoderConfigRecord.byteLength)).parse(new Hi(i.avcDecoderConfigRecord)):i.hevcDecoderConfigRecord&&$.addBox(new q_(i.hevcDecoderConfigRecord.byteLength)).parse(new Hi(i.hevcDecoderConfigRecord))}else if(f instanceof rs){const $=f,M=u.addBox(new ig);M.balance=i.balance||0,$.channel_count=i.channel_count||2,$.samplesize=i.samplesize||16,$.samplerate=i.samplerate||65536}else f instanceof qp?u.addBox(new C_):f instanceof Ir?(u.addBox(new ng),f instanceof eg&&(f.namespace=i.namespace||"nonamespace",f.schema_location=i.schema_location||"",f.auxiliary_mime_types=i.auxiliary_mime_types||"")):f instanceof fa?u.addBox(new Ul):f instanceof qd?u.addBox(new Ul):u.addBox(new Ul);i.description&&f.addBox.call(f,i.description),i.description_boxes&&i.description_boxes.forEach(function($){f.addBox.call(f,$)});const p=u.addBox(new N_).addBox(new H_),v=new hg;v.flags=1,p.addEntry(v);const g=u.addBox(new D_);g.addBox(new ag).addEntry(f);const _=g.addBox(new lg);_.sample_counts=[],_.sample_deltas=[];const x=g.addBox(new rg);x.first_chunk=[],x.samples_per_chunk=[],x.sample_description_index=[];const E=g.addBox(new sg);E.chunk_offsets=[];const I=g.addBox(new og);I.sample_sizes=[];const z=this.moov.mvex.addBox(new ld);return z.track_id=i.id,z.default_sample_description_index=i.default_sample_description_index||1,z.default_sample_duration=i.default_sample_duration||0,z.default_sample_size=i.default_sample_size||0,z.default_sample_flags=i.default_sample_flags||0,this.buildTrakSampleLists(s),i.id}addSample(e,i,{sample_description_index:s,duration:n=1,cts:a=0,dts:o=0,is_sync:l=!1,is_leading:c=0,depends_on:u=0,is_depended_on:d=0,has_redundancy:f=0,degradation_priority:p=0,subsamples:v,offset:g=0}={}){const _=this.getTrackById(e);if(_===void 0)return;const x=s?s-1:0,E={number:_.samples.length,track_id:_.tkhd.track_id,timescale:_.mdia.mdhd.timescale,description_index:x,description:_.mdia.minf.stbl.stsd.entries[x],data:i,size:i.byteLength,alreadyRead:i.byteLength,duration:n,cts:a,dts:o,is_sync:l,is_leading:c,depends_on:u,is_depended_on:d,has_redundancy:f,degradation_priority:p,offset:g,subsamples:v};_.samples.push(E),_.samples_size+=E.size,_.samples_duration+=E.duration,_.first_dts===void 0&&(_.first_dts=o),this.processSamples();const I=this.addBox(this.createMoof([E]));I.computeSize(),I.trafs[0].truns[0].data_offset=I.size+8;const z=this.addBox(new El);return z.data=new Uint8Array(i),E}createMoof(e){if(e.length===0)return;if(e.some(d=>d.track_id!==e[0].track_id))throw new Error("Cannot create moof for samples from different tracks: "+e.map(d=>d.track_id).join(", "));const i=e[0].track_id,s=this.getTrackById(i);if(!s)throw new Error("Cannot create moof for non-existing track: "+i);const n=new R_,a=n.addBox(new X_);a.sequence_number=++this.nextMoofNumber;const o=n.addBox(new L_),l=o.addBox(new ug);l.track_id=i,l.flags=kk;const c=o.addBox(new cg);c.baseMediaDecodeTime=e[0].dts-(s.first_dts||0);const u=o.addBox(new fg);u.flags=769|Bk|Ek,u.data_offset=0,u.first_sample_flags=0,u.sample_count=e.length;for(const d of e){let f=0;d.is_sync?f=1<<25:f=65536,u.sample_duration.push(d.duration),u.sample_size.push(d.size),u.sample_flags.push(f),u.sample_composition_time_offset.push(d.cts-d.dts)}return n}print(e){e.indent="";for(let i=0;i<this.boxes.length;i++)this.boxes[i]&&this.boxes[i].print(e)}};function A3(t=!1,e){return new P3(e,!t)}var I3=class extends X{constructor(...t){super(...t),this.box_name="EventMessageBox"}static{this.fourcc="emsg"}parse(t){this.parseFullHeader(t),this.version===1?(this.timescale=t.readUint32(),this.presentation_time=t.readUint64(),this.event_duration=t.readUint32(),this.id=t.readUint32(),this.scheme_id_uri=t.readCString(),this.value=t.readCString()):(this.scheme_id_uri=t.readCString(),this.value=t.readCString(),this.timescale=t.readUint32(),this.presentation_time_delta=t.readUint32(),this.event_duration=t.readUint32(),this.id=t.readUint32());let e=this.size-this.hdr_size-(16+(this.scheme_id_uri.length+1)+(this.value.length+1));this.version===1&&(e-=4),this.message_data=t.readUint8Array(e)}write(t){this.version=0,this.flags=0,this.size=16+this.message_data.length+(this.scheme_id_uri.length+1)+(this.value.length+1),this.writeHeader(t),t.writeCString(this.scheme_id_uri),t.writeCString(this.value),t.writeUint32(this.timescale),t.writeUint32(this.presentation_time_delta),t.writeUint32(this.event_duration),t.writeUint32(this.id),t.writeUint8Array(this.message_data)}},M3=class extends X{constructor(...t){super(...t),this.box_name="CompressedSubsegmentIndexBox"}static{this.fourcc="ssix"}parse(t){this.parseFullHeader(t),this.subsegments=[];const e=t.readUint32();for(let i=0;i<e;i++){const s={};this.subsegments.push(s),s.ranges=[];const n=t.readUint32();for(let a=0;a<n;a++){const o={};s.ranges.push(o),o.level=t.readUint8(),o.range_size=t.readUint24()}}}},z3=class extends mt{constructor(...t){super(...t),this.box_name="SegmentTypeBox"}static{this.fourcc="styp"}parse(t){let e=this.size-this.hdr_size;this.major_brand=t.readString(4),this.minor_version=t.readUint32(),e-=8,this.compatible_brands=[];let i=0;for(;e>=4;)this.compatible_brands[i]=t.readString(4),e-=4,i++}write(t){this.size=8+4*this.compatible_brands.length,this.writeHeader(t),t.writeString(this.major_brand,void 0,4),t.writeUint32(this.minor_version);for(let e=0;e<this.compatible_brands.length;e++)t.writeString(this.compatible_brands[e],void 0,4)}},C3=A_({Descriptor:()=>Cr,ES_Descriptor:()=>gg,MPEG4DescriptorParser:()=>D3});const mg=3,Jl=4,Wd=5,vg=6;var Cr=class _g{constructor(e,i){this.tag=e,this.size=i,this.descs=[]}parse(e){this.data=e.readUint8Array(this.size)}findDescriptor(e){for(let i=0;i<this.descs.length;i++)if(this.descs[i].tag===e)return this.descs[i]}parseOneDescriptor(e){let i=0;const s=e.readUint8();let n=e.readUint8();for(;n&128;)i=(i<<7)+(n&127),n=e.readUint8();i=(i<<7)+(n&127),L.debug("Descriptor","Found "+(Pl[s]||"Descriptor "+s)+", size "+i+" at position "+e.getPosition());const a=Pl[s]?new N3[Pl[s]](i):new _g(i);return a.parse(e),a}parseRemainingDescriptors(e){const i=e.getPosition();for(;e.getPosition()<i+this.size;){const s=this.parseOneDescriptor?.(e);this.descs.push(s)}}},gg=class extends Cr{constructor(t){super(mg,t)}parse(t){if(this.ES_ID=t.readUint16(),this.flags=t.readUint8(),this.size-=3,this.flags&128?(this.dependsOn_ES_ID=t.readUint16(),this.size-=2):this.dependsOn_ES_ID=0,this.flags&64){const e=t.readUint8();this.URL=t.readString(e),this.size-=e+1}else this.URL="";this.flags&32?(this.OCR_ES_ID=t.readUint16(),this.size-=2):this.OCR_ES_ID=0,this.parseRemainingDescriptors(t)}getOTI(){const t=this.findDescriptor(Jl);return t?t.oti:0}getAudioConfig(){const t=this.findDescriptor(Jl);if(!t)return;const e=t.findDescriptor(Wd);if(e&&e.data){let i=(e.data[0]&248)>>3;return i===31&&e.data.length>=2&&(i=32+((e.data[0]&7)<<3)+((e.data[1]&224)>>5)),i}}},$3=class extends Cr{constructor(t){super(Jl,t)}parse(t){this.oti=t.readUint8(),this.streamType=t.readUint8(),this.upStream=(this.streamType>>1&1)!==0,this.streamType=this.streamType>>>2,this.bufferSize=t.readUint24(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32(),this.size-=13,this.parseRemainingDescriptors(t)}},O3=class extends Cr{constructor(t){super(Wd,t)}},F3=class extends Cr{constructor(t){super(vg,t)}};const N3={Descriptor:Cr,ES_Descriptor:gg,DecoderConfigDescriptor:$3,DecoderSpecificInfo:O3,SLConfigDescriptor:F3},Pl={[mg]:"ES_Descriptor",[Jl]:"DecoderConfigDescriptor",[Wd]:"DecoderSpecificInfo",[vg]:"SLConfigDescriptor"};var D3=class{constructor(){this.parseOneDescriptor=Cr.prototype.parseOneDescriptor}getDescriptorName(t){return Pl[t]}},R3=class extends mt{constructor(...t){super(...t),this.box_name="AV1LayeredImageIndexingProperty"}static{this.fourcc="a1lx"}parse(t){const e=((t.readUint8()&1)+1)*16;this.layer_size=[];for(let i=0;i<3;i++)e===16?this.layer_size[i]=t.readUint16():this.layer_size[i]=t.readUint32()}},L3=class extends mt{constructor(...t){super(...t),this.box_name="OperatingPointSelectorProperty"}static{this.fourcc="a1op"}parse(t){this.op_index=t.readUint8()}},H3=class extends X{constructor(...t){super(...t),this.box_name="AuxiliaryTypeProperty"}static{this.fourcc="auxC"}parse(t){this.parseFullHeader(t),this.aux_type=t.readCString();const e=this.size-this.hdr_size-(this.aux_type.length+1);this.aux_subtype=t.readUint8Array(e)}},V3=class extends mt{constructor(...t){super(...t),this.box_name="BitRateBox"}static{this.fourcc="btrt"}parse(t){this.bufferSizeDB=t.readUint32(),this.maxBitrate=t.readUint32(),this.avgBitrate=t.readUint32()}},j3=class extends X{constructor(...t){super(...t),this.box_name="CodingConstraintsBox"}static{this.fourcc="ccst"}parse(t){this.parseFullHeader(t);const e=t.readUint8();this.all_ref_pics_intra=(e&128)===128,this.intra_pred_used=(e&64)===64,this.max_ref_per_pic=(e&63)>>2,t.readUint24()}},G3=class extends mt{constructor(...t){super(...t),this.box_name="ComponentDefinitionBox"}static{this.fourcc="cdef"}parse(t){this.channel_count=t.readUint16(),this.channel_indexes=[],this.channel_types=[],this.channel_associations=[];for(let e=0;e<this.channel_count;e++)this.channel_indexes.push(t.readUint16()),this.channel_types.push(t.readUint16()),this.channel_associations.push(t.readUint16())}},q3=class extends mt{constructor(...t){super(...t),this.box_name="CleanApertureBox"}static{this.fourcc="clap"}parse(t){this.cleanApertureWidthN=t.readUint32(),this.cleanApertureWidthD=t.readUint32(),this.cleanApertureHeightN=t.readUint32(),this.cleanApertureHeightD=t.readUint32(),this.horizOffN=t.readUint32(),this.horizOffD=t.readUint32(),this.vertOffN=t.readUint32(),this.vertOffD=t.readUint32()}},W3=class extends mt{constructor(...t){super(...t),this.box_name="ContentLightLevelBox"}static{this.fourcc="clli"}parse(t){this.max_content_light_level=t.readUint16(),this.max_pic_average_light_level=t.readUint16()}},Y3=class extends mt{constructor(...t){super(...t),this.box_name="CameraExtrinsicMatrixProperty"}static{this.fourcc="cmex"}parse(t){this.flags&1&&(this.pos_x=t.readInt32()),this.flags&2&&(this.pos_y=t.readInt32()),this.flags&4&&(this.pos_z=t.readInt32()),this.flags&8&&(this.version===0?this.flags&16?(this.quat_x=t.readInt32(),this.quat_y=t.readInt32(),this.quat_z=t.readInt32()):(this.quat_x=t.readInt16(),this.quat_y=t.readInt16(),this.quat_z=t.readInt16()):this.version),this.flags&32&&(this.id=t.readUint32())}},K3=class extends mt{constructor(...t){super(...t),this.box_name="CameraIntrinsicMatrixProperty"}static{this.fourcc="cmin"}parse(t){this.focal_length_x=t.readInt32(),this.principal_point_x=t.readInt32(),this.principal_point_y=t.readInt32(),this.flags&1&&(this.focal_length_y=t.readInt32(),this.skew_factor=t.readInt32())}},X3=class extends X{constructor(...t){super(...t),this.box_name="CompressionConfigurationBox"}static{this.fourcc="cmpC"}parse(t){this.parseFullHeader(t),this.compression_type=t.readString(4),this.compressed_unit_type=t.readUint8()}},J3=class extends mt{constructor(...t){super(...t),this.box_name="ComponentDefinitionBox"}static{this.fourcc="cmpd"}parse(t){this.component_count=t.readUint32(),this.component_types=[],this.component_type_urls=[];for(let e=0;e<this.component_count;e++){const i=t.readUint16();this.component_types.push(i),i>=32768&&this.component_type_urls.push(t.readCString())}}},Z3=class extends X{constructor(...t){super(...t),this.box_name="ChunkLargeOffsetBox"}static{this.fourcc="co64"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.chunk_offsets=[],this.version===0)for(let i=0;i<e;i++)this.chunk_offsets.push(t.readUint64())}write(t){this.version=0,this.flags=0,this.size=4+8*this.chunk_offsets.length,this.writeHeader(t),t.writeUint32(this.chunk_offsets.length);for(let e=0;e<this.chunk_offsets.length;e++)t.writeUint64(this.chunk_offsets[e])}},Q3=class extends X{constructor(...t){super(...t),this.box_name="ContentLightLevelBox"}static{this.fourcc="CoLL"}parse(t){this.parseFullHeader(t),this.maxCLL=t.readUint16(),this.maxFALL=t.readUint16()}},t5=class{toString(){let t="centre_azimuth: ";return t+=this.centre_azimuth,t+=" (",t+=this.centre_azimuth*2**-16,t+="°), centre_elevation: ",t+=this.centre_elevation,t+=" (",t+=this.centre_elevation*2**-16,t+="°), centre_tilt: ",t+=this.centre_tilt,t+=" (",t+=this.centre_tilt*2**-16,t+="°)",this.range_included_flag&&(t+=", azimuth_range: ",t+=this.azimuth_range,t+=" (",t+=this.azimuth_range*2**-16,t+="°), elevation_range: ",t+=this.elevation_range,t+=" (",t+=this.elevation_range*2**-16,t+="°)"),this.interpolate_included_flag&&(t+=", interpolate: ",t+=this.interpolate),t}},e5=class{toString(){let t="";return this.view_idc&&(t+="view_idc: ",t+=this.view_idc,t+=", "),t+="sphere_region: {",t+=this.sphere_region,t+="}",t}},i5=class extends X{constructor(...t){super(...t),this.box_name="CoverageInformationBox"}static{this.fourcc="covi"}parse(t){this.parseFullHeader(t),this.coverage_shape_type=t.readUint8();const e=t.readUint8(),i=t.readInt8(),s=i&128;s&&(this.default_view_idc=(i&96)>>5),this.coverage_regions=new Array;for(let n=0;n<e;n++){const a=new e5;s&&(a.view_idc=t.readUint8()>>6),a.sphere_region=this.parseSphereRegion(t,!0,!0),this.coverage_regions.push(a)}}parseSphereRegion(t,e,i){const s=new t5;return s.centre_azimuth=t.readInt32(),s.centre_elevation=t.readInt32(),s.centre_tilt=t.readInt32(),s.range_included_flag=e,e&&(s.azimuth_range=t.readUint32(),s.elevation_range=t.readUint32()),s.interpolate_included_flag=i,i&&(s.interpolate=(t.readUint8()&128)===128),s}},s5=class extends X{constructor(...t){super(...t),this.box_name="CopyrightBox"}static{this.fourcc="cprt"}parse(t){this.parseFullHeader(t),this.parseLanguage(t),this.notice=t.readCString()}},n5=class extends X{constructor(...t){super(...t),this.box_name="CompatibleSchemeTypeBox"}static{this.fourcc="csch"}parse(t){this.parseFullHeader(t),this.scheme_type=t.readString(4),this.scheme_version=t.readUint32(),this.flags&1&&(this.scheme_uri=t.readCString())}};const La=2147483647;var r5=class extends X{constructor(...t){super(...t),this.box_name="CompositionToDecodeBox"}static{this.fourcc="cslg"}parse(t){this.parseFullHeader(t),this.version===0?(this.compositionToDTSShift=t.readInt32(),this.leastDecodeToDisplayDelta=t.readInt32(),this.greatestDecodeToDisplayDelta=t.readInt32(),this.compositionStartTime=t.readInt32(),this.compositionEndTime=t.readInt32()):this.version===1&&(this.compositionToDTSShift=t.readInt64(),this.leastDecodeToDisplayDelta=t.readInt64(),this.greatestDecodeToDisplayDelta=t.readInt64(),this.compositionStartTime=t.readInt64(),this.compositionEndTime=t.readInt64())}write(t){this.version=0,(this.compositionToDTSShift>La||this.leastDecodeToDisplayDelta>La||this.greatestDecodeToDisplayDelta>La||this.compositionStartTime>La||this.compositionEndTime>La)&&(this.version=1),this.flags=0,this.version===0?(this.size=20,this.writeHeader(t),t.writeInt32(this.compositionToDTSShift),t.writeInt32(this.leastDecodeToDisplayDelta),t.writeInt32(this.greatestDecodeToDisplayDelta),t.writeInt32(this.compositionStartTime),t.writeInt32(this.compositionEndTime)):this.version===1&&(this.size=40,this.writeHeader(t),t.writeInt64(this.compositionToDTSShift),t.writeInt64(this.leastDecodeToDisplayDelta),t.writeInt64(this.greatestDecodeToDisplayDelta),t.writeInt64(this.compositionStartTime),t.writeInt64(this.compositionEndTime))}},a5=class extends X{constructor(...t){super(...t),this.box_name="CompositionOffsetBox"}static{this.fourcc="ctts"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.sample_counts=[],this.sample_offsets=[],this.version===0)for(let i=0;i<e;i++){this.sample_counts.push(t.readUint32());const s=t.readInt32();s<0&&L.warn("BoxParser","ctts box uses negative values without using version 1"),this.sample_offsets.push(s)}else if(this.version===1)for(let i=0;i<e;i++)this.sample_counts.push(t.readUint32()),this.sample_offsets.push(t.readInt32())}write(t){this.version=this.sample_offsets.some(e=>e<0)?1:0,this.flags=0,this.size=4+8*this.sample_counts.length,this.writeHeader(t),t.writeUint32(this.sample_counts.length);for(let e=0;e<this.sample_counts.length;e++)t.writeUint32(this.sample_counts[e]),this.version===1?t.writeInt32(this.sample_offsets[e]):t.writeUint32(this.sample_offsets[e])}unpack(t){let e=0;for(let i=0;i<this.sample_counts.length;i++)for(let s=0;s<this.sample_counts[i];s++)t[e].pts=t[e].dts+this.sample_offsets[i],e++}},o5=class extends mt{constructor(...t){super(...t),this.box_name="AC3SpecificBox"}static{this.fourcc="dac3"}parse(t){const e=t.readUint8(),i=t.readUint8(),s=t.readUint8();this.fscod=e>>6,this.bsid=e>>1&31,this.bsmod=(e&1)<<2|i>>6&3,this.acmod=i>>3&7,this.lfeon=i>>2&1,this.bit_rate_code=i&3|s>>5&7}},l5=class extends mt{constructor(...t){super(...t),this.box_name="EC3SpecificBox"}static{this.fourcc="dec3"}parse(t){const e=t.readUint16();this.data_rate=e>>3,this.num_ind_sub=e&7,this.ind_subs=[];for(let i=0;i<this.num_ind_sub+1;i++){const s=t.readUint8(),n=t.readUint8(),a=t.readUint8(),o={fscod:s>>6,bsid:s>>1&31,bsmod:(s&1)<<4|n>>4&15,acmod:n>>1&7,lfeon:n&1,num_dep_sub:a>>1&15};this.ind_subs.push(o),o.num_dep_sub>0&&(o.chan_loc=(a&1)<<8|t.readUint8())}}},c5=class extends X{constructor(...t){super(...t),this.box_name="FLACSpecificBox"}static{this.fourcc="dfLa"}parse(t){this.parseFullHeader(t);const e=127,i=128,s=[],n=["STREAMINFO","PADDING","APPLICATION","SEEKTABLE","VORBIS_COMMENT","CUESHEET","PICTURE","RESERVED"];let a;do{a=t.readUint8();const o=Math.min(a&e,n.length-1);o?t.readUint8Array(t.readUint24()):(t.readUint8Array(13),this.samplerate=t.readUint32()>>12,t.readUint8Array(20)),s.push(n[o])}while(a&i);this.numMetadataBlocks=s.length+" ("+s.join(", ")+")"}},u5=class extends mt{constructor(...t){super(...t),this.box_name="hintimmediateBytesSent"}static{this.fourcc="dimm"}parse(t){this.bytessent=t.readUint64()}},d5=class extends mt{constructor(...t){super(...t),this.box_name="hintlongestpacket"}static{this.fourcc="dmax"}parse(t){this.time=t.readUint32()}},f5=class extends mt{constructor(...t){super(...t),this.box_name="hintmediaBytesSent"}static{this.fourcc="dmed"}parse(t){this.bytessent=t.readUint64()}},h5=class extends mt{constructor(...t){super(...t),this.box_name="OpusSpecificBox"}static{this.fourcc="dOps"}parse(t){if(this.Version=t.readUint8(),this.OutputChannelCount=t.readUint8(),this.PreSkip=t.readUint16(),this.InputSampleRate=t.readUint32(),this.OutputGain=t.readInt16(),this.ChannelMappingFamily=t.readUint8(),this.ChannelMappingFamily!==0){this.StreamCount=t.readUint8(),this.CoupledCount=t.readUint8(),this.ChannelMapping=[];for(let e=0;e<this.OutputChannelCount;e++)this.ChannelMapping[e]=t.readUint8()}}write(t){if(this.size=11,this.ChannelMappingFamily!==0&&(this.size+=2+this.OutputChannelCount),this.writeHeader(t),t.writeUint8(this.Version),t.writeUint8(this.OutputChannelCount),t.writeUint16(this.PreSkip),t.writeUint32(this.InputSampleRate),t.writeInt16(this.OutputGain),t.writeUint8(this.ChannelMappingFamily),this.ChannelMappingFamily!==0){t.writeUint8(this.StreamCount),t.writeUint8(this.CoupledCount);for(let e=0;e<this.OutputChannelCount;e++)t.writeUint8(this.ChannelMapping[e])}}},p5=class extends mt{constructor(...t){super(...t),this.box_name="hintrepeatedBytesSent"}static{this.fourcc="drep"}parse(t){this.bytessent=t.readUint64()}},m5=class extends X{constructor(...t){super(...t),this.box_name="EditListBox"}static{this.fourcc="elst"}parse(t){this.parseFullHeader(t),this.entries=[];const e=t.readUint32();for(let i=0;i<e;i++){const s={segment_duration:this.version===1?t.readUint64():t.readUint32(),media_time:this.version===1?t.readInt64():t.readInt32(),media_rate_integer:t.readInt16(),media_rate_fraction:t.readInt16()};this.entries.push(s)}}write(t){const e=this.entries.some(i=>i.segment_duration>bi||i.media_time>bi)||this.version===1;this.version=e?1:0,this.size=4+12*this.entries.length,this.size+=e?8*this.entries.length:0,this.writeHeader(t),t.writeUint32(this.entries.length);for(let i=0;i<this.entries.length;i++){const s=this.entries[i];e?(t.writeUint64(s.segment_duration),t.writeInt64(s.media_time)):(t.writeUint32(s.segment_duration),t.writeInt32(s.media_time)),t.writeInt16(s.media_rate_integer),t.writeInt16(s.media_rate_fraction)}}},Ai=class extends X{parse(t){this.parseFullHeader(t),this.group_id=t.readUint32(),this.num_entities_in_group=t.readUint32(),this.entity_ids=[];for(let e=0;e<this.num_entities_in_group;e++){const i=t.readUint32();this.entity_ids.push(i)}}},v5=class extends Ai{constructor(...t){super(...t),this.box_name="Auto exposure bracketing"}static{this.fourcc="aebr"}},_5=class extends Ai{constructor(...t){super(...t),this.box_name="Flash exposure information"}static{this.fourcc="afbr"}},g5=class extends Ai{constructor(...t){super(...t),this.box_name="Album collection"}static{this.fourcc="albc"}},y5=class extends Ai{constructor(...t){super(...t),this.box_name="Alternative entity"}static{this.fourcc="altr"}},b5=class extends Ai{constructor(...t){super(...t),this.box_name="Burst image"}static{this.fourcc="brst"}},x5=class extends Ai{constructor(...t){super(...t),this.box_name="Depth of field bracketing"}static{this.fourcc="dobr"}},w5=class extends Ai{constructor(...t){super(...t),this.box_name="Equivalent entity"}static{this.fourcc="eqiv"}},S5=class extends Ai{constructor(...t){super(...t),this.box_name="Favorites collection"}static{this.fourcc="favc"}},k5=class extends Ai{constructor(...t){super(...t),this.box_name="Focus bracketing"}static{this.fourcc="fobr"}},B5=class extends Ai{constructor(...t){super(...t),this.box_name="Image item with an audio track"}static{this.fourcc="iaug"}},E5=class extends Ai{constructor(...t){super(...t),this.box_name="Panorama"}static{this.fourcc="pano"}},U5=class extends Ai{constructor(...t){super(...t),this.box_name="Slideshow"}static{this.fourcc="slid"}},T5=class extends Ai{constructor(...t){super(...t),this.box_name="Stereo"}static{this.fourcc="ster"}},P5=class extends Ai{constructor(...t){super(...t),this.box_name="Time-synchronized capture"}static{this.fourcc="tsyn"}},A5=class extends Ai{constructor(...t){super(...t),this.box_name="White balance bracketing"}static{this.fourcc="wbbr"}},I5=class extends Ai{constructor(...t){super(...t),this.box_name="Progressive rendering"}static{this.fourcc="prgr"}},M5=class extends Ai{constructor(...t){super(...t),this.box_name="Image pyramid"}static{this.fourcc="pymd"}parse(t){this.parseFullHeader(t),this.group_id=t.readUint32(),this.num_entities_in_group=t.readUint32(),this.entity_ids=[];for(let e=0;e<this.num_entities_in_group;e++){const i=t.readUint32();this.entity_ids.push(i)}this.tile_size_x=t.readUint16(),this.tile_size_y=t.readUint16(),this.layer_binning=[],this.tiles_in_layer_column_minus1=[],this.tiles_in_layer_row_minus1=[];for(let e=0;e<this.num_entities_in_group;e++)this.layer_binning[e]=t.readUint16(),this.tiles_in_layer_row_minus1[e]=t.readUint16(),this.tiles_in_layer_column_minus1[e]=t.readUint16()}},z5=class extends mt{constructor(...t){super(...t),this.box_name="FieldHandlingBox"}static{this.fourcc="fiel"}parse(t){this.fieldCount=t.readUint8(),this.fieldOrdering=t.readUint8()}},C5=class extends mt{constructor(...t){super(...t),this.box_name="OriginalFormatBox"}static{this.fourcc="frma"}parse(t){this.data_format=t.readString(4)}},$5=class extends mt{constructor(...t){super(...t),this.box_name="ImageMirror"}static{this.fourcc="imir"}parse(t){const e=t.readUint8();this.reserved=e>>7,this.axis=e&1}},O5=class extends X{constructor(...t){super(...t),this.box_name="ItemPropertyAssociationBox"}static{this.fourcc="ipma"}parse(t){this.parseFullHeader(t);const e=t.readUint32();this.associations=[];for(let i=0;i<e;i++){const s=this.version<1?t.readUint16():t.readUint32(),n=[],a=t.readUint8();for(let o=0;o<a;o++){const l=t.readUint8();n.push({essential:(l&128)>>7===1,property_index:this.flags&1?(l&127)<<8|t.readUint8():l&127})}this.associations.push({id:s,props:n})}}},F5=class extends mt{constructor(...t){super(...t),this.box_name="ImageRotation"}static{this.fourcc="irot"}parse(t){this.angle=t.readUint8()&3}},N5=class extends X{constructor(...t){super(...t),this.box_name="ImageSpatialExtentsProperty"}static{this.fourcc="ispe"}parse(t){this.parseFullHeader(t),this.image_width=t.readUint32(),this.image_height=t.readUint32()}},D5=class extends X{constructor(...t){super(...t),this.box_name="TAITimestampBox"}static{this.fourcc="itai"}parse(t){this.TAI_timestamp=t.readUint64();const e=t.readUint8();this.sychronization_state=e>>7&1,this.timestamp_generation_failure=e>>6&1,this.timestamp_is_modified=e>>5&1}},R5=class extends X{constructor(...t){super(...t),this.box_name="KindBox"}static{this.fourcc="kind"}parse(t){this.parseFullHeader(t),this.schemeURI=t.readCString(),this.isEndOfBox(t)||(this.value=t.readCString())}write(t){this.version=0,this.flags=0,this.size=this.schemeURI.length+1+(this.value?this.value.length+1:0),this.writeHeader(t),t.writeCString(this.schemeURI),this.value&&t.writeCString(this.value)}},L5=class extends X{constructor(...t){super(...t),this.box_name="LevelAssignmentBox"}static{this.fourcc="leva"}parse(t){this.parseFullHeader(t);const e=t.readUint8();this.levels=[];for(let i=0;i<e;i++){const s={};this.levels[i]=s,s.track_ID=t.readUint32();const n=t.readUint8();switch(s.padding_flag=n>>7,s.assignment_type=n&127,s.assignment_type){case 0:s.grouping_type=t.readString(4);break;case 1:s.grouping_type=t.readString(4),s.grouping_type_parameter=t.readUint32();break;case 2:break;case 3:break;case 4:s.sub_track_id=t.readUint32();break;default:L.warn("BoxParser",`Unknown level assignment type: ${s.assignment_type}`)}}}},H5=class extends mt{constructor(...t){super(...t),this.box_name="LHEVCConfigurationBox"}static{this.fourcc="lhvC"}parse(t){this.configurationVersion=t.readUint8(),this.min_spatial_segmentation_idc=t.readUint16()&4095,this.parallelismType=t.readUint8()&3;let e=t.readUint8();this.numTemporalLayers=(e&13)>>3,this.temporalIdNested=(e&4)>>2,this.lengthSizeMinusOne=e&3,this.nalu_arrays=[];const i=t.readUint8();for(let s=0;s<i;s++){const n=[];this.nalu_arrays.push(n),e=t.readUint8(),n.completeness=(e&128)>>7,n.nalu_type=e&63;const a=t.readUint16();for(let o=0;o<a;o++){const l=t.readUint16();n.push({data:t.readUint8Array(l)})}}}},V5=class extends mt{constructor(...t){super(...t),this.box_name="LayerSelectorProperty"}static{this.fourcc="lsel"}parse(t){this.layer_id=t.readUint16()}},j5=class extends mt{constructor(...t){super(...t),this.box_name="hintmaxrate"}static{this.fourcc="maxr"}parse(t){this.period=t.readUint32(),this.bytes=t.readUint32()}},ul=class{constructor(t,e){this.x=t,this.y=e}toString(){return"("+this.x+","+this.y+")"}},G5=class extends mt{constructor(...t){super(...t),this.box_name="MasteringDisplayColourVolumeBox"}static{this.fourcc="mdcv"}parse(t){this.display_primaries=[],this.display_primaries[0]=new ul(t.readUint16(),t.readUint16()),this.display_primaries[1]=new ul(t.readUint16(),t.readUint16()),this.display_primaries[2]=new ul(t.readUint16(),t.readUint16()),this.white_point=new ul(t.readUint16(),t.readUint16()),this.max_display_mastering_luminance=t.readUint32(),this.min_display_mastering_luminance=t.readUint32()}},q5=class extends X{constructor(...t){super(...t),this.box_name="MovieFragmentRandomAccessOffsetBox"}static{this.fourcc="mfro"}parse(t){this.parseFullHeader(t),this._size=t.readUint32()}},W5=class extends X{constructor(...t){super(...t),this.box_name="MaskConfigurationProperty"}static{this.fourcc="mskC"}parse(t){this.parseFullHeader(t),this.bits_per_pixel=t.readUint8()}},Y5=class extends mt{constructor(...t){super(...t),this.box_name="hintPacketsSent"}static{this.fourcc="npck"}parse(t){this.packetssent=t.readUint32()}},K5=class extends mt{constructor(...t){super(...t),this.box_name="hintPacketsSent"}static{this.fourcc="nump"}parse(t){this.packetssent=t.readUint64()}},X5=class{constructor(t,e){this.pad1=t,this.pad2=e}},J5=class extends X{constructor(...t){super(...t),this.box_name="PaddingBitsBox"}static{this.fourcc="padb"}parse(t){this.parseFullHeader(t);const e=t.readUint32();this.padbits=[];for(let i=0;i<Math.floor((e+1)/2);i++){const s=t.readUint8(),n=(s&112)>>4,a=s&7;this.padbits.push(new X5(n,a))}}},Z5=class extends mt{constructor(...t){super(...t),this.box_name="PixelAspectRatioBox"}static{this.fourcc="pasp"}parse(t){this.hSpacing=t.readUint32(),this.vSpacing=t.readUint32()}},Q5=class extends mt{constructor(...t){super(...t),this.box_name="CuePayloadBox"}static{this.fourcc="payl"}parse(t){this.text=t.readString(this.size-this.hdr_size)}},tB=class extends mt{constructor(...t){super(...t),this.box_name="hintpayloadID"}static{this.fourcc="payt"}parse(t){this.payloadID=t.readUint32();const e=t.readUint8();this.rtpmap_string=t.readString(e)}},eB=class extends X{constructor(...t){super(...t),this.box_name="ProgressiveDownloadInfoBox",this.rate=[],this.initial_delay=[]}static{this.fourcc="pdin"}parse(t){this.parseFullHeader(t);const e=(this.size-this.hdr_size)/8;for(let i=0;i<e;i++)this.rate[i]=t.readUint32(),this.initial_delay[i]=t.readUint32()}},iB=class extends X{constructor(...t){super(...t),this.box_name="PixelInformationProperty"}static{this.fourcc="pixi"}parse(t){this.parseFullHeader(t),this.num_channels=t.readUint8(),this.bits_per_channels=[];for(let e=0;e<this.num_channels;e++)this.bits_per_channels[e]=t.readUint8()}},sB=class extends mt{constructor(...t){super(...t),this.box_name="hintlargestpacket"}static{this.fourcc="pmax"}parse(t){this.bytes=t.readUint32()}},nB=class extends X{constructor(...t){super(...t),this.box_name="ProgressiveDerivedImageItemInformationProperty"}static{this.fourcc="prdi"}parse(t){if(this.parseFullHeader(t),this.step_count=t.readUint16(),this.item_count=[],this.flags&2)for(let e=0;e<this.step_count;e++)this.item_count[e]=t.readUint16()}},rB=class extends X{constructor(...t){super(...t),this.box_name="ProjectionFormatBox"}static{this.fourcc="prfr"}parse(t){this.parseFullHeader(t),this.projection_type=t.readUint8()&31}},aB=class extends X{constructor(...t){super(...t),this.box_name="ProducerReferenceTimeBox"}static{this.fourcc="prft"}parse(t){this.parseFullHeader(t),this.ref_track_id=t.readUint32(),this.ntp_timestamp=t.readUint64(),this.version===0?this.media_time=t.readUint32():this.media_time=t.readUint64()}},oB=class extends X{constructor(...t){super(...t),this.box_name="ProtectionSystemSpecificHeaderBox"}static{this.fourcc="pssh"}parse(t){if(this.parseFullHeader(t),this.system_id=Ar(t),this.kid=[],this.version>0){const i=t.readUint32();for(let s=0;s<i;s++)this.kid[s]=Ar(t)}const e=t.readUint32();e>0&&(this.protection_data=t.readUint8Array(e))}},lB=class extends X{constructor(...t){super(...t),this.box_name="TrackCleanApertureDimensionsBox"}static{this.fourcc="clef"}parse(t){this.parseFullHeader(t),this.width=t.readUint32(),this.height=t.readUint32()}};function cB(t,e){if(t===Xa.Types.UTF8)return new TextDecoder("utf-8").decode(e);const i=new DataView(e.buffer);if(t===Xa.Types.BE_UNSIGNED_INT){if(e.length===1)return i.getUint8(0);if(e.length===2)return i.getUint16(0,!1);if(e.length===4)return i.getUint32(0,!1);if(e.length===8)return i.getBigUint64(0,!1);throw new Error("Unsupported ITIF_TYPE_BE_UNSIGNED_INT length "+e.length)}else if(t===Xa.Types.BE_SIGNED_INT){if(e.length===1)return i.getInt8(0);if(e.length===2)return i.getInt16(0,!1);if(e.length===4)return i.getInt32(0,!1);if(e.length===8)return i.getBigInt64(0,!1);throw new Error("Unsupported ITIF_TYPE_BE_SIGNED_INT length "+e.length)}else if(t===Xa.Types.BE_FLOAT32)return i.getFloat32(0,!1);L.warn("DataBox","Unsupported or unimplemented itif data type: "+t)}var Xa=class extends mt{constructor(...t){super(...t),this.box_name="DataBox"}static{this.fourcc="data"}static{this.Types={RESERVED:0,UTF8:1,UTF16:2,SJIS:3,UTF8_SORT:4,UTF16_SORT:5,JPEG:13,PNG:14,BE_SIGNED_INT:21,BE_UNSIGNED_INT:22,BE_FLOAT32:23,BE_FLOAT64:24,BMP:27,QT_ATOM:28,BE_SIGNED_INT8:65,BE_SIGNED_INT16:66,BE_SIGNED_INT32:67,BE_FLOAT32_POINT:70,BE_FLOAT32_DIMENSIONS:71,BE_FLOAT32_RECT:72,BE_SIGNED_INT64:74,BE_UNSIGNED_INT8:75,BE_UNSIGNED_INT16:76,BE_UNSIGNED_INT32:77,BE_UNSIGNED_INT64:78,BE_FLOAT64_AFFINE_TRANSFORM:79}}parse(t){this.valueType=t.readUint32(),this.country=t.readUint16(),this.country>255&&(t.seek(t.getPosition()-2),this.countryString=t.readString(2)),this.language=t.readUint16(),this.language>255&&(t.seek(t.getPosition()-2),this.parseLanguage(t)),this.raw=t.readUint8Array(this.size-this.hdr_size-8),this.value=cB(this.valueType,this.raw)}},uB=class extends X{constructor(...t){super(...t),this.box_name="TrackEncodedPixelsDimensionsBox"}static{this.fourcc="enof"}parse(t){this.parseFullHeader(t),this.width=t.readUint32(),this.height=t.readUint32()}},dB=class extends mt{constructor(...t){super(...t),this.box_name="IlstBox"}static{this.fourcc="ilst"}parse(t){this.list={};let e=this.size-this.hdr_size;for(;e>0;){const i=t.readUint32(),s=t.readUint32(),n=hn(t,!1,i-8);n.code===1&&(this.list[s]=n.box),e-=i}}},fB=class extends X{constructor(...t){super(...t),this.box_name="KeysBox"}static{this.fourcc="keys"}parse(t){this.parseFullHeader(t),this.count=t.readUint32(),this.keys={};for(let e=0;e<this.count;e++){const i=t.readUint32();this.keys[e+1]=t.readString(i-4)}}},hB=class extends X{constructor(...t){super(...t),this.box_name="TrackProductionApertureDimensionsBox"}static{this.fourcc="prof"}parse(t){this.parseFullHeader(t),this.width=t.readUint32(),this.height=t.readUint32()}},pB=class extends ke{constructor(...t){super(...t),this.box_name="TrackApertureModeDimensionsBox",this.clefs=[],this.profs=[],this.enofs=[],this.subBoxNames=["clef","prof","enof"]}static{this.fourcc="tapt"}},mB=class extends mt{constructor(...t){super(...t),this.box_name="rtpmoviehintinformation"}static{this.fourcc="rtp "}parse(t){this.descriptionformat=t.readString(4),this.sdptext=t.readString(this.size-this.hdr_size-4)}},vB=class extends X{constructor(...t){super(...t),this.box_name="SampleAuxiliaryInformationOffsetsBox"}static{this.fourcc="saio"}parse(t){this.parseFullHeader(t),this.flags&1&&(this.aux_info_type=t.readString(4),this.aux_info_type_parameter=t.readUint32()),this.entry_count=t.readUint32(),this.offset=[];for(let e=0;e<this.entry_count;e++)this.version===0?this.offset[e]=t.readUint32():this.offset[e]=t.readUint64()}},_B=class extends X{constructor(...t){super(...t),this.box_name="SampleAuxiliaryInformationSizesBox"}static{this.fourcc="saiz"}parse(t){if(this.parseFullHeader(t),this.flags&1&&(this.aux_info_type=t.readString(4),this.aux_info_type_parameter=t.readUint32()),this.default_sample_info_size=t.readUint8(),this.sample_count=t.readUint32(),this.sample_info_size=[],this.default_sample_info_size===0)for(let e=0;e<this.sample_count;e++)this.sample_info_size[e]=t.readUint8()}},gB=class{constructor(t,e){this.bad_pixel_row=t,this.bad_pixel_column=e}toString(){return"[row: "+this.bad_pixel_row+", column: "+this.bad_pixel_column+"]"}},yB=class extends X{constructor(...t){super(...t),this.box_name="SensorBadPixelsMapBox"}static{this.fourcc="sbpm"}parse(t){this.parseFullHeader(t),this.component_count=t.readUint16(),this.component_index=[];for(let i=0;i<this.component_count;i++)this.component_index.push(t.readUint16());const e=t.readUint8();this.correction_applied=(e&128)===128,this.num_bad_rows=t.readUint32(),this.num_bad_cols=t.readUint32(),this.num_bad_pixels=t.readUint32(),this.bad_rows=[],this.bad_columns=[],this.bad_pixels=[];for(let i=0;i<this.num_bad_rows;i++)this.bad_rows.push(t.readUint32());for(let i=0;i<this.num_bad_cols;i++)this.bad_columns.push(t.readUint32());for(let i=0;i<this.num_bad_pixels;i++){const s=t.readUint32(),n=t.readUint32();this.bad_pixels.push(new gB(s,n))}}},bB=class extends X{constructor(...t){super(...t),this.box_name="SchemeTypeBox"}static{this.fourcc="schm"}parse(t){this.parseFullHeader(t),this.scheme_type=t.readString(4),this.scheme_version=t.readUint32(),this.flags&1&&(this.scheme_uri=t.readString(this.size-this.hdr_size-8))}},xB=class extends mt{constructor(...t){super(...t),this.box_name="rtptracksdphintinformation"}static{this.fourcc="sdp "}parse(t){this.sdptext=t.readString(this.size-this.hdr_size)}},wB=class extends X{constructor(...t){super(...t),this.box_name="SampleEncryptionBox"}static{this.fourcc="senc"}},SB=class extends X{constructor(...t){super(...t),this.box_name="SMPTE2086MasteringDisplayMetadataBox"}static{this.fourcc="SmDm"}parse(t){this.parseFullHeader(t),this.primaryRChromaticity_x=t.readUint16(),this.primaryRChromaticity_y=t.readUint16(),this.primaryGChromaticity_x=t.readUint16(),this.primaryGChromaticity_y=t.readUint16(),this.primaryBChromaticity_x=t.readUint16(),this.primaryBChromaticity_y=t.readUint16(),this.whitePointChromaticity_x=t.readUint16(),this.whitePointChromaticity_y=t.readUint16(),this.luminanceMax=t.readUint32(),this.luminanceMin=t.readUint32()}},kB=class extends X{constructor(...t){super(...t),this.box_name="SamplingRateBox"}static{this.fourcc="srat"}parse(t){this.parseFullHeader(t),this.sampling_rate=t.readUint32()}},BB=class extends X{constructor(...t){super(...t),this.box_name="DegradationPriorityBox"}static{this.fourcc="stdp"}parse(t){this.parseFullHeader(t);const e=(this.size-this.hdr_size)/2;this.priority=[];for(let i=0;i<e;i++)this.priority[i]=t.readUint16()}},EB=class extends X{constructor(...t){super(...t),this.box_name="SubTrackInformationBox"}static{this.fourcc="stri"}parse(t){this.parseFullHeader(t),this.switch_group=t.readUint16(),this.alternate_group=t.readUint16(),this.sub_track_id=t.readUint32();const e=(this.size-this.hdr_size-8)/4;this.attribute_list=[];for(let i=0;i<e;i++)this.attribute_list[i]=t.readUint32()}},UB=class extends X{constructor(...t){super(...t),this.box_name="SubTrackSampleGroupBox"}static{this.fourcc="stsg"}parse(t){this.parseFullHeader(t),this.grouping_type=t.readUint32();const e=t.readUint16();this.group_description_index=[];for(let i=0;i<e;i++)this.group_description_index[i]=t.readUint32()}},TB=class extends X{constructor(...t){super(...t),this.box_name="ShadowSyncSampleBox"}static{this.fourcc="stsh"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.shadowed_sample_numbers=[],this.sync_sample_numbers=[],this.version===0)for(let i=0;i<e;i++)this.shadowed_sample_numbers.push(t.readUint32()),this.sync_sample_numbers.push(t.readUint32())}write(t){this.version=0,this.flags=0,this.size=4+8*this.shadowed_sample_numbers.length,this.writeHeader(t),t.writeUint32(this.shadowed_sample_numbers.length);for(let e=0;e<this.shadowed_sample_numbers.length;e++)t.writeUint32(this.shadowed_sample_numbers[e]),t.writeUint32(this.sync_sample_numbers[e])}},PB=class extends X{constructor(...t){super(...t),this.box_name="SyncSampleBox"}static{this.fourcc="stss"}parse(t){this.parseFullHeader(t);const e=t.readUint32();if(this.version===0){this.sample_numbers=[];for(let i=0;i<e;i++)this.sample_numbers.push(t.readUint32())}}write(t){this.version=0,this.flags=0,this.size=4+4*this.sample_numbers.length,this.writeHeader(t),t.writeUint32(this.sample_numbers.length),t.writeUint32Array(this.sample_numbers)}},AB=class extends X{constructor(...t){super(...t),this.box_name="StereoVideoBox"}static{this.fourcc="stvi"}parse(t){this.parseFullHeader(t);const e=t.readUint32();this.single_view_allowed=e&3,this.stereo_scheme=t.readUint32();const i=t.readUint32();for(this.stereo_indication_type=t.readString(i),this.boxes=[];t.getPosition()<this.start+this.size;){const s=hn(t,!1,this.size-(t.getPosition()-this.start));if(s.code===1){const n=s.box;this.boxes.push(n),this[n.type]=n}else return}}},IB=class extends X{constructor(...t){super(...t),this.box_name="CompactSampleSizeBox"}static{this.fourcc="stz2"}parse(t){if(this.parseFullHeader(t),this.sample_sizes=[],this.version===0){this.reserved=t.readUint24(),this.field_size=t.readUint8();const e=t.readUint32();if(this.field_size===4)for(let i=0;i<e;i+=2){const s=t.readUint8();this.sample_sizes[i]=s>>4&15,this.sample_sizes[i+1]=s&15}else if(this.field_size===8)for(let i=0;i<e;i++)this.sample_sizes[i]=t.readUint8();else if(this.field_size===16)for(let i=0;i<e;i++)this.sample_sizes[i]=t.readUint16();else L.error("BoxParser","Error in length field in stz2 box",t.isofile)}}},MB=class extends X{constructor(...t){super(...t),this.box_name="SubSampleInformationBox"}static{this.fourcc="subs"}parse(t){this.parseFullHeader(t);const e=t.readUint32();this.entries=[];let i;for(let s=0;s<e;s++){const n={};if(this.entries[s]=n,n.sample_delta=t.readUint32(),n.subsamples=[],i=t.readUint16(),i>0)for(let a=0;a<i;a++){const o={};n.subsamples.push(o),this.version===1?o.size=t.readUint32():o.size=t.readUint16(),o.priority=t.readUint8(),o.discardable=t.readUint8(),o.codec_specific_parameters=t.readUint32()}}}},zB=class extends X{constructor(...t){super(...t),this.box_name="TAIClockInfoBox"}static{this.fourcc="taic"}parse(t){this.time_uncertainty=t.readUint64(),this.clock_resolution=t.readUint32(),this.clock_drift_rate=t.readInt32();const e=t.readUint8();this.clock_type=(e&192)>>6}},CB=class extends X{constructor(...t){super(...t),this.box_name="TrackEncryptionBox"}static{this.fourcc="tenc"}parse(t){if(this.parseFullHeader(t),t.readUint8(),this.version===0)t.readUint8();else{const e=t.readUint8();this.default_crypt_byte_block=e>>4&15,this.default_skip_byte_block=e&15}this.default_isProtected=t.readUint8(),this.default_Per_Sample_IV_Size=t.readUint8(),this.default_KID=Ar(t),this.default_isProtected===1&&this.default_Per_Sample_IV_Size===0&&(this.default_constant_IV_size=t.readUint8(),this.default_constant_IV=t.readUint8Array(this.default_constant_IV_size))}},$B=class{},OB=class extends X{constructor(...t){super(...t),this.box_name="TrackFragmentRandomAccessBox"}static{this.fourcc="tfra"}parse(t){this.parseFullHeader(t),this.track_ID=t.readUint32(),t.readUint24();const e=t.readUint8();this.length_size_of_traf_num=e>>4&3,this.length_size_of_trun_num=e>>2&3,this.length_size_of_sample_num=e&3,this.entries=[];const i=t.readUint32();for(let s=0;s<i;s++){const n=new $B;this.version===1?(n.time=t.readUint64(),n.moof_offset=t.readUint64()):(n.time=t.readUint32(),n.moof_offset=t.readUint32()),n.traf_number=t["readUint"+8*(this.length_size_of_traf_num+1)](),n.trun_number=t["readUint"+8*(this.length_size_of_trun_num+1)](),n.sample_delta=t["readUint"+8*(this.length_size_of_sample_num+1)](),this.entries.push(n)}}},FB=class extends mt{constructor(...t){super(...t),this.box_name="hintmaxrelativetime"}static{this.fourcc="tmax"}parse(t){this.time=t.readUint32()}},NB=class extends mt{constructor(...t){super(...t),this.box_name="hintminrelativetime"}static{this.fourcc="tmin"}parse(t){this.time=t.readUint32()}},DB=class extends mt{constructor(...t){super(...t),this.box_name="hintBytesSent"}static{this.fourcc="totl"}parse(t){this.bytessent=t.readUint32()}},RB=class extends mt{constructor(...t){super(...t),this.box_name="hintBytesSent"}static{this.fourcc="tpay"}parse(t){this.bytessent=t.readUint32()}},LB=class extends mt{constructor(...t){super(...t),this.box_name="hintBytesSent"}static{this.fourcc="tpyl"}parse(t){this.bytessent=t.readUint64()}},HB=class extends Tk{static{this.fourcc="msrc"}},VB=class yg extends mt{constructor(...e){super(...e),this.box_name="TrackReferenceBox",this.references=[]}static{this.fourcc="tref"}static{this.allowed_types=["hint","cdsc","font","hind","vdep","vplx","subt","thmb","auxl","cdtg","shsc","aest"]}parse(e){for(;e.getPosition()<this.start+this.size;){const i=hn(e,!0,this.size-(e.getPosition()-this.start));if(i.code===1){yg.allowed_types.includes(i.type)||L.warn("BoxParser",`Unknown track reference type: '${i.type}'`);const s=new Ik(i.type,i.size,i.hdr_size,i.start);s.write===mt.prototype.write&&s.type!=="mdat"&&(L.info("BoxParser","TrackReference "+s.type+" box writing not yet implemented, keeping unparsed data in memory for later write"),s.parseDataAndRewind(e)),s.parse(e),this.references.push(s)}else return}}},jB=class extends X{constructor(...t){super(...t),this.box_name="TrackExtensionPropertiesBox"}static{this.fourcc="trep"}parse(t){for(this.parseFullHeader(t),this.track_ID=t.readUint32(),this.boxes=[];t.getPosition()<this.start+this.size;){const e=hn(t,!1,this.size-(t.getPosition()-this.start));if(e.code===1){const i=e.box;this.boxes.push(i)}else return}}},GB=class extends mt{constructor(...t){super(...t),this.box_name="hintBytesSent"}static{this.fourcc="trpy"}parse(t){this.bytessent=t.readUint64()}},qB=class extends X{constructor(...t){super(...t),this.box_name="TrackSelectionBox"}static{this.fourcc="tsel"}parse(t){this.parseFullHeader(t),this.switch_group=t.readUint32();const e=(this.size-this.hdr_size-4)/4;this.attribute_list=[];for(let i=0;i<e;i++)this.attribute_list[i]=t.readUint32()}},WB=class extends X{constructor(...t){super(...t),this.box_name="TextConfigBox"}static{this.fourcc="txtc"}parse(t){this.parseFullHeader(t),this.config=t.readCString()}},YB=class extends mt{constructor(...t){super(...t),this.box_name="TypeCombinationBox"}static{this.fourcc="tyco"}parse(t){const e=(this.size-this.hdr_size)/4;this.compatible_brands=[];for(let i=0;i<e;i++)this.compatible_brands[i]=t.readString(4)}},KB=class extends X{constructor(...t){super(...t),this.box_name="UserDescriptionProperty"}static{this.fourcc="udes"}parse(t){this.parseFullHeader(t),this.lang=t.readCString(),this.name=t.readCString(),this.description=t.readCString(),this.tags=t.readCString()}},XB=class extends X{constructor(...t){super(...t),this.box_name="UncompressedFrameConfigBox"}static{this.fourcc="uncC"}parse(t){if(this.parseFullHeader(t),this.profile=t.readString(4),this.version!==1){if(this.version===0){this.component_count=t.readUint32(),this.component_index=[],this.component_bit_depth_minus_one=[],this.component_format=[],this.component_align_size=[];for(let i=0;i<this.component_count;i++)this.component_index.push(t.readUint16()),this.component_bit_depth_minus_one.push(t.readUint8()),this.component_format.push(t.readUint8()),this.component_align_size.push(t.readUint8());this.sampling_type=t.readUint8(),this.interleave_type=t.readUint8(),this.block_size=t.readUint8();const e=t.readUint8();this.component_little_endian=e>>7&1,this.block_pad_lsb=e>>6&1,this.block_little_endian=e>>5&1,this.block_reversed=e>>4&1,this.pad_unknown=e>>3&1,this.pixel_size=t.readUint32(),this.row_align_size=t.readUint32(),this.tile_align_size=t.readUint32(),this.num_tile_cols_minus_one=t.readUint32(),this.num_tile_rows_minus_one=t.readUint32()}}}},JB=class extends X{constructor(...t){super(...t),this.box_name="DataEntryUrnBox"}static{this.fourcc="urn "}parse(t){this.parseFullHeader(t),this.name=t.readCString(),this.size-this.hdr_size-this.name.length-1>0&&(this.location=t.readCString())}write(t){this.version=0,this.flags=0,this.size=this.name.length+1+(this.location?this.location.length+1:0),this.writeHeader(t),t.writeCString(this.name),this.location&&t.writeCString(this.location)}},ZB=class extends mt{constructor(...t){super(...t),this.box_name="WebVTTConfigurationBox"}static{this.fourcc="vttC"}parse(t){this.text=t.readString(this.size-this.hdr_size)}},QB=class extends X{constructor(...t){super(...t),this.box_name="VvcNALUConfigBox"}static{this.fourcc="vvnC"}parse(t){this.parseFullHeader(t);const e=t.readUint8();this.lengthSizeMinusOne=e&3}},tE=class extends vi{static{this.grouping_type="alst"}parse(t){const e=t.readUint16();this.first_output_sample=t.readUint16(),this.sample_offset=[];for(let s=0;s<e;s++)this.sample_offset[s]=t.readUint32();const i=this.description_length-4-4*e;this.num_output_samples=[],this.num_total_samples=[];for(let s=0;s<i/4;s++)this.num_output_samples[s]=t.readUint16(),this.num_total_samples[s]=t.readUint16()}},eE=class extends vi{static{this.grouping_type="avll"}parse(t){this.layerNumber=t.readUint8(),this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()}},iE=class extends vi{static{this.grouping_type="avss"}parse(t){this.subSequenceIdentifier=t.readUint16(),this.layerNumber=t.readUint8();const e=t.readUint8();this.durationFlag=e>>7,this.avgRateFlag=e>>6&1,this.durationFlag&&(this.duration=t.readUint32()),this.avgRateFlag&&(this.accurateStatisticsFlag=t.readUint8(),this.avgBitRate=t.readUint16(),this.avgFrameRate=t.readUint16()),this.dependency=[];const i=t.readUint8();for(let s=0;s<i;s++)this.dependency.push({subSeqDirectionFlag:t.readUint8(),layerNumber:t.readUint8(),subSequenceIdentifier:t.readUint16()})}},sE=class extends vi{static{this.grouping_type="dtrt"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},nE=class extends vi{static{this.grouping_type="mvif"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},rE=class extends vi{static{this.grouping_type="prol"}parse(t){this.roll_distance=t.readInt16()}},aE=class extends vi{static{this.grouping_type="rap "}parse(t){const e=t.readUint8();this.num_leading_samples_known=e>>7,this.num_leading_samples=e&127}},oE=class extends vi{static{this.grouping_type="rash"}parse(t){if(this.operation_point_count=t.readUint16(),this.description_length!==2+(this.operation_point_count===1?2:this.operation_point_count*6)+9)L.warn("BoxParser","Mismatch in "+this.grouping_type+" sample group length"),this.data=t.readUint8Array(this.description_length-2);else{if(this.operation_point_count===1)this.target_rate_share=t.readUint16();else{this.target_rate_share=[],this.available_bitrate=[];for(let e=0;e<this.operation_point_count;e++)this.available_bitrate[e]=t.readUint32(),this.target_rate_share[e]=t.readUint16()}this.maximum_bitrate=t.readUint32(),this.minimum_bitrate=t.readUint32(),this.discard_priority=t.readUint8()}}},lE=class extends vi{static{this.grouping_type="roll"}parse(t){this.roll_distance=t.readInt16()}},cE=class extends vi{static{this.grouping_type="scif"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},uE=class extends vi{static{this.grouping_type="scnm"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},dE=class extends vi{static{this.grouping_type="seig"}parse(t){this.reserved=t.readUint8();const e=t.readUint8();this.crypt_byte_block=e>>4,this.skip_byte_block=e&15,this.isProtected=t.readUint8(),this.Per_Sample_IV_Size=t.readUint8(),this.KID=Ar(t),this.constant_IV_size=0,this.constant_IV=0,this.isProtected===1&&this.Per_Sample_IV_Size===0&&(this.constant_IV_size=t.readUint8(),this.constant_IV=t.readUint8Array(this.constant_IV_size))}},fE=class extends vi{static{this.grouping_type="stsa"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},hE=class extends vi{static{this.grouping_type="sync"}parse(t){const e=t.readUint8();this.NAL_unit_type=e&63}},pE=class extends vi{static{this.grouping_type="tele"}parse(t){const e=t.readUint8();this.level_independently_decodable=e>>7}},mE=class extends vi{static{this.grouping_type="tsas"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},vE=class extends vi{static{this.grouping_type="tscl"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},_E=class extends vi{static{this.grouping_type="vipr"}parse(t){L.warn("BoxParser","Sample Group type: "+this.grouping_type+" not fully parsed")}},bg=class extends mt{static{this.fourcc="uuid"}},ba=class extends X{static{this.fourcc="uuid"}},gE=class extends ba{constructor(...t){super(...t),this.box_name="LiveServerManifestBox"}static{this.uuid="a5d40b30e81411ddba2f0800200c9a66"}parse(t){this.parseFullHeader(t),this.LiveServerManifest=t.readString(this.size-this.hdr_size).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}},yE=class extends ba{constructor(...t){super(...t),this.box_name="PiffProtectionSystemSpecificHeaderBox"}static{this.uuid="d08a4f1810f34a82b6c832d8aba183d3"}parse(t){this.parseFullHeader(t),this.system_id=Ar(t);const e=t.readUint32();e>0&&(this.data=t.readUint8Array(e))}},bE=class extends ba{constructor(...t){super(...t),this.box_name="PiffSampleEncryptionBox"}static{this.uuid="a2394f525a9b4f14a2446c427c648df4"}},xE=class extends ba{constructor(...t){super(...t),this.box_name="PiffTrackEncryptionBox"}static{this.uuid="8974dbce7be74c5184f97148f9882554"}parse(t){this.parseFullHeader(t),this.default_AlgorithmID=t.readUint24(),this.default_IV_size=t.readUint8(),this.default_KID=Ar(t)}},wE=class extends ba{constructor(...t){super(...t),this.box_name="TfrfBox"}static{this.uuid="d4807ef2ca3946958e5426cb9e46a79f"}parse(t){this.parseFullHeader(t),this.fragment_count=t.readUint8(),this.entries=[];for(let e=0;e<this.fragment_count;e++){let i=0,s=0;this.version===1?(i=t.readUint64(),s=t.readUint64()):(i=t.readUint32(),s=t.readUint32()),this.entries.push({absolute_time:i,absolute_duration:s})}}},SE=class extends ba{constructor(...t){super(...t),this.box_name="TfxdBox"}static{this.uuid="6d1d9b0542d544e680e2141daff757b2"}parse(t){this.parseFullHeader(t),this.version===1?(this.absolute_time=t.readUint64(),this.duration=t.readUint64()):(this.absolute_time=t.readUint32(),this.duration=t.readUint32())}},kE=class extends bg{constructor(...t){super(...t),this.box_name="ItemContentIDProperty"}static{this.uuid="261ef3741d975bbaacbd9d2c8ea73522"}parse(t){this.content_id=t.readCString()}},BE=class extends bg{constructor(...t){super(...t),this.box_name="ItemComponentContentIDProperty"}static{this.uuid="9db9dd6e373c5a4e811021fc83a911fd"}parse(t){this.number_of_components=t.readUint32(),this.content_ids=[];for(let e=0;e<this.number_of_components;e++){const i=t.readCString();this.content_ids.push(i)}}},EE=A_({CoLLBox:()=>Q3,ItemComponentContentIDPropertyBox:()=>BE,ItemContentIDPropertyBox:()=>kE,OpusSampleEntry:()=>o3,SmDmBox:()=>SB,a1lxBox:()=>R3,a1opBox:()=>L3,ac_3SampleEntry:()=>n3,ac_4SampleEntry:()=>r3,aebrBox:()=>v5,afbrBox:()=>_5,albcBox:()=>g5,alstSampleGroupEntry:()=>tE,altrBox:()=>y5,auxCBox:()=>H3,av01SampleEntry:()=>z4,av1CBox:()=>w4,avc1SampleEntry:()=>P4,avc2SampleEntry:()=>A4,avc3SampleEntry:()=>I4,avc4SampleEntry:()=>M4,avcCBox:()=>z_,avllSampleGroupEntry:()=>eE,avs3SampleEntry:()=>J4,avssSampleGroupEntry:()=>iE,brstBox:()=>b5,btrtBox:()=>V3,bxmlBox:()=>qk,ccstBox:()=>j3,cdefBox:()=>G3,clapBox:()=>q3,clefBox:()=>lB,clliBox:()=>W3,cmexBox:()=>Y3,cminBox:()=>K3,cmpCBox:()=>X3,cmpdBox:()=>J3,co64Box:()=>Z3,colrBox:()=>T4,coviBox:()=>i5,cprtBox:()=>s5,cschBox:()=>n5,cslgBox:()=>r5,cttsBox:()=>a5,dOpsBox:()=>h5,dac3Box:()=>o5,dataBox:()=>Xa,dav1SampleEntry:()=>C4,dec3Box:()=>l5,dfLaBox:()=>c5,dimmBox:()=>u5,dinfBox:()=>N_,dmax:()=>d5,dmedBox:()=>f5,dobrBox:()=>x5,drefBox:()=>H_,drepBox:()=>p5,dtrtSampleGroupEntry:()=>sE,dvh1SampleEntry:()=>V4,dvheSampleEntry:()=>j4,ec_3SampleEntry:()=>a3,edtsBox:()=>Yk,elngBox:()=>V_,elstBox:()=>m5,emsgBox:()=>I3,encaSampleEntry:()=>p3,encmSampleEntry:()=>y3,encsSampleEntry:()=>v3,enctSampleEntry:()=>g3,encuSampleEntry:()=>m3,encvSampleEntry:()=>h3,enofBox:()=>uB,eqivBox:()=>w5,esdsBox:()=>S4,etypBox:()=>d4,fLaCSampleEntry:()=>f3,favcBox:()=>S5,fielBox:()=>z5,fobrBox:()=>k5,freeBox:()=>Hk,frmaBox:()=>C5,ftypBox:()=>j_,grplBox:()=>c4,hdlrBox:()=>G_,hev1SampleEntry:()=>F4,hev2SampleEntry:()=>N4,hinfBox:()=>Qk,hmhdBox:()=>C_,hntiBox:()=>Zk,hvc1SampleEntry:()=>$4,hvc2SampleEntry:()=>O4,hvcCBox:()=>q_,hvt1SampleEntry:()=>D4,iaugBox:()=>B5,idatBox:()=>Lk,iinfBox:()=>p4,ilocBox:()=>m4,ilstBox:()=>dB,imirBox:()=>$5,infeBox:()=>h4,iodsBox:()=>jk,ipcoBox:()=>l4,ipmaBox:()=>O5,iproBox:()=>Wk,iprpBox:()=>o4,irefBox:()=>_4,irotBox:()=>F5,ispeBox:()=>N5,itaiBox:()=>D5,j2kHBox:()=>u4,j2kiSampleEntry:()=>Z4,keysBox:()=>fB,kindBox:()=>R5,levaBox:()=>L5,lhe1SampleEntry:()=>R4,lhv1SampleEntry:()=>L4,lhvCBox:()=>H5,lselBox:()=>V5,lvc1SampleEntry:()=>H4,lvcCBox:()=>B4,m4aeSampleEntry:()=>s3,maxrBox:()=>j5,mdatBox:()=>El,mdcvBox:()=>G5,mdhdBox:()=>W_,mdiaBox:()=>O_,mecoBox:()=>Jk,mehdBox:()=>Y_,metaBox:()=>y4,mettSampleEntry:()=>b4,metxSampleEntry:()=>x4,mfhdBox:()=>X_,mfraBox:()=>Xk,mfroBox:()=>q5,mha1SampleEntry:()=>l3,mha2SampleEntry:()=>c3,mhm1SampleEntry:()=>u3,mhm2SampleEntry:()=>d3,minfBox:()=>F_,mjp2SampleEntry:()=>Q4,mjpgSampleEntry:()=>t3,moofBox:()=>R_,moovBox:()=>Tl,mp4aSampleEntry:()=>tg,mp4sSampleEntry:()=>_3,mp4vSampleEntry:()=>i3,mskCBox:()=>W5,msrcTrackGroupTypeBox:()=>HB,mvexBox:()=>od,mvhdBox:()=>J_,mvifSampleGroupEntry:()=>nE,nmhdBox:()=>Ul,npckBox:()=>Y5,numpBox:()=>K5,padbBox:()=>J5,panoBox:()=>E5,paspBox:()=>Z5,paylBox:()=>Q5,paytBox:()=>tB,pdinBox:()=>eB,piffLsmBox:()=>gE,piffPsshBox:()=>yE,piffSencBox:()=>bE,piffTencBox:()=>xE,piffTfrfBox:()=>wE,piffTfxdBox:()=>SE,pitmBox:()=>g4,pixiBox:()=>iB,pmaxBox:()=>sB,povdBox:()=>f4,prdiBox:()=>nB,prfrBox:()=>rB,prftBox:()=>aB,prgrBox:()=>I5,profBox:()=>hB,prolSampleGroupEntry:()=>rE,psshBox:()=>oB,pymdBox:()=>M5,rapSampleGroupEntry:()=>aE,rashSampleGroupEntry:()=>oE,resvSampleEntry:()=>b3,rinfBox:()=>s4,rollSampleGroupEntry:()=>lE,rtp_Box:()=>mB,saioBox:()=>vB,saizBox:()=>_B,sbgpBox:()=>B3,sbpmBox:()=>yB,sbttSampleEntry:()=>x3,schiBox:()=>n4,schmBox:()=>bB,scifSampleGroupEntry:()=>cE,scnmSampleGroupEntry:()=>uE,sdp_Box:()=>xB,sdtpBox:()=>E3,seigSampleGroupEntry:()=>dE,sencBox:()=>wB,sgpdBox:()=>U3,sidxBox:()=>T3,sinfBox:()=>i4,skipBox:()=>Vk,slidBox:()=>U5,smhdBox:()=>ig,sratBox:()=>kB,ssixBox:()=>M3,stblBox:()=>D_,stcoBox:()=>sg,stdpBox:()=>BB,sterBox:()=>T5,sthdBox:()=>ng,stppSampleEntry:()=>eg,strdBox:()=>e4,striBox:()=>EB,strkBox:()=>t4,stsaSampleGroupEntry:()=>fE,stscBox:()=>rg,stsdBox:()=>ag,stsgBox:()=>UB,stshBox:()=>TB,stssBox:()=>PB,stszBox:()=>og,sttsBox:()=>lg,stviBox:()=>AB,stxtSampleEntry:()=>w3,stypBox:()=>z3,stz2Box:()=>IB,subsBox:()=>MB,syncSampleGroupEntry:()=>hE,taicBox:()=>zB,taptBox:()=>pB,teleSampleGroupEntry:()=>pE,tencBox:()=>CB,tfdtBox:()=>cg,tfhdBox:()=>ug,tfraBox:()=>OB,tkhdBox:()=>dg,tmaxBox:()=>FB,tminBox:()=>NB,totlBox:()=>DB,tpayBox:()=>RB,tpylBox:()=>LB,trafBox:()=>L_,trakBox:()=>$_,trefBox:()=>VB,trepBox:()=>jB,trexBox:()=>ld,trgrBox:()=>r4,trpyBox:()=>GB,trunBox:()=>fg,tsasSampleGroupEntry:()=>mE,tsclSampleGroupEntry:()=>vE,tselBox:()=>qB,tsynBox:()=>P5,tx3gSampleEntry:()=>S3,txtcBox:()=>WB,tycoBox:()=>YB,udesBox:()=>KB,udtaBox:()=>a4,uncCBox:()=>XB,uncvSampleEntry:()=>e3,urlBox:()=>hg,urnBox:()=>JB,viprSampleGroupEntry:()=>_E,vmhdBox:()=>pg,vp08SampleEntry:()=>K4,vp09SampleEntry:()=>X4,vpcCBox:()=>E4,vttCBox:()=>ZB,vttcBox:()=>Kk,vvc1SampleEntry:()=>G4,vvcCBox:()=>U4,vvcNSampleEntry:()=>Y4,vvi1SampleEntry:()=>q4,vvnCBox:()=>QB,vvs1SampleEntry:()=>W4,waveBox:()=>k4,wbbrBox:()=>A5,wvttSampleEntry:()=>k3,xmlBox:()=>Gk});Fk(EE);Nk(C3);function UE(t){return new Promise((e,i)=>{const s=A3();let n=!1;const a=l=>{n||(n=!0,i(new Error(l)))};s.onError=(l,c)=>a(`${l}: ${c}`),s.onReady=l=>{const c=l.videoTracks[0];if(!c)return a("MP4 contains no video track");const u=[];s.onSamples=(d,f,p)=>{u.push(...p),!(u.length<c.nb_samples||n)&&(n=!0,e({codec:c.codec,width:c.video?.width??c.track_width,height:c.video?.height??c.track_height,duration:c.duration/c.timescale,description:TE(s,c.id),samples:u}))},s.setExtractionOptions(c.id,void 0,{nbSamples:c.nb_samples}),s.start()};const o=t.slice(0);o.fileStart=0,s.appendBuffer(o,!0),s.flush()})}function TE(t,e){const i=t.getTrackById(e).mdia.minf.stbl.stsd.entries[0],s=i.avcC??i.hvcC??i.vpcC??i.av1C;if(!s)return;const n=new Hi;return s.write(n),new Uint8Array(n.buffer.slice(8))}class pc{canvas;decoder;config;samples;frames=[];current;sampleIndex=0;lastTime=-1;decoderError;static async create(e){if(typeof VideoDecoder>"u")throw new Error("WebCodecs VideoDecoder is unavailable");const i={codec:e.codec,codedWidth:e.width,codedHeight:e.height,description:e.description},s=await VideoDecoder.isConfigSupported(i);if(!s.supported)throw new Error(`WebCodecs does not support ${e.codec}`);return new pc(e,s.config??i)}constructor(e,i){this.samples=e.samples,this.config=i,this.canvas=document.createElement("canvas"),this.canvas.width=e.width,this.canvas.height=e.height,this.decoder=new VideoDecoder({output:s=>this.frames.push(s),error:s=>this.decoderError=s}),this.decoder.configure(i)}async renderAt(e){const i=Math.max(0,e)*1e6;for((this.lastTime<0||i<this.lastTime)&&this.restartAt(i),this.lastTime=i,await this.decodeThrough(i+25e4),this.frames.sort((n,a)=>n.timestamp-a.timestamp);this.frames[0]&&this.frames[0].timestamp<=i;)this.current?.close(),this.current=this.frames.shift();if(!this.current&&this.frames[0]&&(this.current=this.frames.shift()),!this.current)throw new Error("WebCodecs produced no video frame");const s=this.canvas.getContext("2d");if(!s)throw new Error("Could not create decoded video canvas");s.drawImage(this.current,0,0,this.canvas.width,this.canvas.height)}close(){this.current?.close(),this.frames.splice(0).forEach(e=>e.close()),this.decoder.close()}restartAt(e){this.current?.close(),this.current=void 0,this.frames.splice(0).forEach(s=>s.close()),this.decoder.reset(),this.decoder.configure(this.config);const i=e/1e6;this.sampleIndex=0;for(let s=0;s<this.samples.length;s+=1){const n=this.samples[s];if(n.cts/n.timescale>i)break;n.is_sync&&(this.sampleIndex=s)}}async decodeThrough(e){let i=0;for(;this.sampleIndex<this.samples.length;){const s=this.samples[this.sampleIndex],n=s.cts/s.timescale*1e6;if(i&&n>e)break;if(!s.data)throw new Error("MP4 sample data is unavailable");this.decoder.decode(new EncodedVideoChunk({type:s.is_sync?"key":"delta",timestamp:n,duration:s.duration/s.timescale*1e6,data:s.data})),this.sampleIndex+=1,i+=1}if(i&&await this.decoder.flush(),this.decoderError)throw this.decoderError}}const PE=Object.freeze(Object.defineProperty({__proto__:null,Mp4FrameSource:pc,demuxMp4:UE},Symbol.toStringTag,{value:"Module"})),Ha="/api/exports";function AE(t){return typeof document<"u"}async function IE(t){const{scene:e,assets:i,height:s,fps:n,audioUrl:a,onProgress:o}=t;return ME({scene:e,assets:i,height:s,fps:n,audioUrl:a,onProgress:o})}async function ME(t){const{scene:e,assets:i,height:s,fps:n,audioUrl:a,onProgress:o}=t,l=Math.round(s*e.canvas.width/e.canvas.height),c=document.createElement("canvas");c.width=l,c.height=s;const u=new B_(c),d=DE(e,l,s),f=$E(d.canvas.duration,n),p=await NE(Ha,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({width:l,height:s,fps:n,duration:d.canvas.duration,totalFrames:f,hasAudio:!!a,audioStart:d.audioStart})}),v=await zE(i);try{const g=HS(v.assets);g&&await LS(v.assets);const _=performance.now();let x=[],E=0;for(let $=0;$<f;$+=1){g&&await OE(_,$,n);const M=b_(d,$/n);await CE(M,v.sources),await S_(M,v.assets,{playing:!1,exact:!0}),u.render(M,v.assets);const V=await FE(c);x.push(Al(`${Ha}/${p.id}/frames/${$}`,{method:"PUT",headers:{"content-type":"image/jpeg"},body:V}).then(()=>{E+=1,o?.(E/f*.8)})),x.length===4&&(await Promise.all(x),x=[]),$%4===0&&await xg(0)}if(await Promise.all(x),a){const $=await fetch(a);if(!$.ok)throw new Error(`Could not load audio (${$.status})`);await Al(`${Ha}/${p.id}/audio`,{method:"PUT",headers:{"content-type":$.headers.get("content-type")??"application/octet-stream"},body:await $.blob()})}o?.(.85);const z=await(await Al(`${Ha}/${p.id}/finish`,{method:"POST"})).blob();return o?.(1),z}catch(g){throw await fetch(`${Ha}/${p.id}`,{method:"DELETE"}).catch(()=>{}),g}finally{v.sources.forEach(g=>g.close())}}async function zE(t){const e=new Map(t),i=new Map;if(typeof VideoDecoder>"u")return{assets:e,sources:i};for(const[s,n]of t){if(!n.motionlyMp4)continue;const a=await pc.create(n.motionlyMp4),o=a.canvas;Object.assign(o,{motionlyType:"image",motionlySource:n.motionlySource}),e.set(s,o),i.set(s,a)}return{assets:e,sources:i}}async function CE(t,e){const i=new Map;for(const s of t.elements)s.assetName&&e.has(s.assetName)&&i.set(s.assetName,Number(s.render.mediaTime??0));await Promise.all([...i].flatMap(([s,n])=>{const a=e.get(s);return a?[a.renderAt(n)]:[]}))}function $E(t,e){return Math.max(1,Math.ceil(t*e))}async function OE(t,e,i){const s=t+e*1e3/i-performance.now();s>0&&await xg(s)}function FE(t){return new Promise((e,i)=>{t.toBlob(s=>{s?e(s):i(new Error("Could not capture an export frame"))},"image/jpeg",.95)})}async function Al(t,e){let i;try{i=await fetch(t,e)}catch{throw new Error("MP4 export requires the local Motionly server with ffmpeg installed")}if(!i.ok){const s=(await i.text()).trim();throw new Error(s||`MP4 export failed (${i.status})`)}return i}async function NE(t,e){return await(await Al(t,e)).json()}function DE(t,e,i){const s=e/t.canvas.width;return{...t,canvas:{...t.canvas,width:e,height:i},camera:Va(t.camera,s),elements:t.elements.map(n=>({...n,properties:Va(n.properties,s)})),animations:t.animations.map(n=>({...n,from:Va(n.from,s),to:Va(n.to,s),keyframes:n.keyframes.map(a=>({...a,properties:Va(a.properties,s)}))}))}}function Va(t,e){const i={...t};for(const s of["x","y","width","height","blur","shadow","size","tracking"]){const n=i[s];typeof n=="number"&&(i[s]=n*e)}return i}function xg(t){return new Promise(e=>setTimeout(e,t))}function Te(t){return t.body.map(RE).join(`
2371
-
2372
- `)}function RE(t){if(t.type==="Canvas")return sn("canvas",t.properties);if(t.type==="Camera")return sn("camera",t.properties);if(t.type==="Audio"){const i=`audio "${cd(t.path)}"`;return Object.keys(t.properties).length?sn(i,t.properties):i}if(t.type==="Clip")return sn(`clip ${t.assetName}`,t.properties);if(t.type==="Track")return sn(`track ${t.name}`,t.properties);if(t.type==="Import")return`import "${cd(t.path)}" as ${t.name}`;if(t.type==="Sequence")return sn(`sequence ${t.name}`,t.properties);if(t.type==="Element")return sn(`${t.kind==="asset"?"":`${t.kind} `}${t.name}`.trim(),t.properties);if(t.type!=="Animation")return"";const e=[`animate ${t.target} {`];if(t.from&&Object.keys(t.from).length&&e.push(dl(sn("from",t.from))),t.to&&Object.keys(t.to).length&&e.push(dl(sn("to",t.to))),t.keyframes?.length){e.push(" keyframes {");for(const i of t.keyframes){const s=Number((i.offset*100).toFixed(3)),n=i.easing?{...i.properties,ease:i.easing}:i.properties;e.push(dl(dl(sn(`${s}%`,n))))}e.push(" }")}return t.delay!==void 0&&e.push(` delay ${Yp(t.delay)}`),t.duration!==void 0&&e.push(` duration ${Yp(t.duration)}`),t.easing&&e.push(` easing ${t.easing}`),e.push("}"),e.join(`
2373
- `)}function sn(t,e){const i=[`${t} {`];for(const[s,n]of Object.entries(e))i.push(n===!0?` ${s}`:` ${s} ${LE(n)}`);return i.push("}"),i.join(`
2374
- `)}function dl(t){return t.split(`
2375
- `).map(e=>` ${e}`).join(`
2376
- `)}function LE(t){if(typeof t=="number")return Number.isInteger(t)?String(t):String(Number(t.toFixed(3)));const e=String(t);return/\s|"/.test(e)?`"${cd(e)}"`:e}function Yp(t){return typeof t=="number"?`${Number(t.toFixed(3))}s`:String(t)}function cd(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n")}function HE(t,e){const i=[];for(const s of t){const n={element:s,range:e(s.id)},a=String((n.element.properties??{}).track??""),o=a?i.find(l=>l.trackId===a):void 0;if(o){o.items.push({...n,lane:0}),o.start=Math.min(o.start,n.range.start),o.end=Math.max(o.end,n.range.end);continue}i.push({kind:n.element.kind,trackId:a||`legacy-${n.element.id}`,items:[{...n,lane:0}],start:n.range.start,end:n.range.end,laneCount:1})}return i}function VE(t,e=[]){const i=new Map;for(const s of e)i.set(s.id,[]);for(const s of t)i.set(s.track,[...i.get(s.track)??[],s]);return Array.from(i,([s,n])=>{const a=[],o=n.map((c,u)=>({clip:c,sourceOrder:u})).sort((c,u)=>c.clip.start-u.clip.start||c.sourceOrder-u.sourceOrder).map(({clip:c})=>{let u=a.findIndex(d=>d<=c.start);return u<0&&(u=a.length),a[u]=c.start+c.duration,{clip:c,lane:u}}),l=e.find(c=>c.id===String(s))??null;return{track:s,metadata:l,clips:o,elements:[],laneCount:Math.max(1,a.length)}}).sort((s,n)=>!s.metadata&&!n.metadata?Number(n.track)-Number(s.track):Kp(s.metadata)-Kp(n.metadata))}function jE(t,e){const i=new Set(t.map(a=>String(a.track))),s=e.filter(a=>!i.has(a.trackId));return{clipTracks:t.map(a=>{const o=e.filter(d=>d.trackId===String(a.track)).flatMap(d=>d.items);if(o.length===0)return a;const l=[...a.clips.map(({clip:d})=>({type:"clip",id:d.id,start:d.start,end:d.start+d.duration})),...o.map(d=>({type:"element",id:d.element.id,start:d.range.start,end:d.range.end}))].sort((d,f)=>d.start-f.start||d.end-f.end),c=[],u=new Map;for(const d of l){let f=c.findIndex(p=>p<=d.start);f<0&&(f=c.length),c[f]=d.end,u.set(`${d.type}:${d.id}`,f)}return{...a,clips:a.clips.map(({clip:d})=>({clip:d,lane:u.get(`clip:${d.id}`)??0})),elements:o.map(d=>({item:d,lane:u.get(`element:${d.element.id}`)??0})),laneCount:Math.max(1,c.length)}}),elementLanes:s}}function Kp(t){return t?t.role==="audio"?1e6:t.order:9e3}function fl(t,e){return[t,t+e/2,t+e]}function Xp(t,e,i){let s=null;for(const n of t)for(const a of e){const o=a-n;Math.abs(o)>i||(!s||Math.abs(o)<Math.abs(s.delta))&&(s={delta:o,guide:a})}return s}function GE(t,e,i,s){const n=[0,i.width/2,i.width],a=[0,i.height/2,i.height];for(const c of e)n.push(...fl(c.x,c.width)),a.push(...fl(c.y,c.height));const o=Xp(fl(t.x,t.width),n,s),l=Xp(fl(t.y,t.height),a,s);return{rect:{...t,x:t.x+(o?.delta??0),y:t.y+(l?.delta??0)},guides:{vertical:o?.guide??null,horizontal:l?.guide??null}}}function qE(t,e,i){return i==="left"?{...t,x:0}:i==="center-x"?{...t,x:(e.width-t.width)/2}:i==="right"?{...t,x:e.width-t.width}:i==="top"?{...t,y:0}:i==="center-y"?{...t,y:(e.height-t.height)/2}:{...t,y:e.height-t.height}}function wg(t){return Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}function ud(t){return[...t].sort((e,i)=>e.offset-i.offset)}function Jp(t,e={},i={}){return t?.length?t.map(s=>({...s,properties:{...s.properties}})):[{offset:0,properties:{...e}},{offset:1,properties:{...i}}]}function WE(t,e,i,s=1e-6){const n=wg(e),a=t.find(o=>Math.abs(o.offset-n)<=s);return ud(a?t.map(o=>o===a?{...o,offset:n,properties:{...o.properties,...i}}:{...o,properties:{...o.properties}}):[...t,{offset:n,properties:{...i}}])}function YE(t,e,i,s=1e-6){return t.map(n=>Math.abs(n.offset-e)<=s?{...n,properties:{...n.properties},easing:i||void 0}:{...n,properties:{...n.properties}})}function Zp(t,e,i,s=1e-6){const n=t.findIndex(o=>Math.abs(o.offset-e)<=s);if(n<0)return t;const a=t.map((o,l)=>l===n?{...o,offset:wg(i),properties:{...o.properties}}:{...o,properties:{...o.properties}});return ud(a)}function Qp(t,e,i=1e-6){return t.filter(s=>Math.abs(s.offset-e)>i).map(s=>({...s,properties:{...s.properties}}))}const ha=1/60;function Zi(t,e){return Number.isFinite(t)?t:e}function bo(t){return Math.max(Number.EPSILON,Zi(t??ha,ha))}function mc(t){return{start:Math.max(0,Zi(t.start,0)),duration:Math.max(0,Zi(t.duration,0)),trimIn:Math.max(0,Zi(t.trimIn,0)),trimOut:Math.max(0,Zi(t.trimOut,0))}}function KE(t,e,i,s=5,n=ha){const a=Math.max(0,Zi(i,0)),o=Math.min(a,Math.max(0,Zi(t,0))),l=Math.max(bo(n),Zi(s,5)),c=Math.max(bo(n),Zi(e,0)>0?e:l);return{start:o,duration:c,timelineDuration:Math.max(a,o+c)}}function XE(t,e,i=Number.POSITIVE_INFINITY){const s=mc(t),n=Math.max(0,Zi(i,Number.POSITIVE_INFINITY)),a=Math.min(n,Math.max(0,Zi(e,s.start)));return{...s,start:a}}function JE(t,e,i=ha){const s=mc(t),n=Math.min(s.duration,bo(i)),a=Zi(e,s.start)-s.start,o=Math.min(s.duration-n,Math.max(-s.trimIn,a));return{...s,start:s.start+o,duration:s.duration-o,trimIn:s.trimIn+o}}function ZE(t,e,i=ha){const s=mc(t),n=Math.min(s.duration,bo(i)),a=s.start+s.duration,o=Zi(e,a)-a,l=Math.min(s.trimOut,Math.max(n-s.duration,o));return{...s,duration:s.duration+l,trimOut:s.trimOut-l}}function QE(t,e,i=ha){const s=mc(t),n=bo(i),a=Zi(e,s.start)-s.start;return a<n||s.duration-a<n?null:[{...s,duration:a,trimOut:s.trimOut+s.duration-a},{...s,start:s.start+a,duration:s.duration-a,trimIn:s.trimIn+a}]}const Sg=(t,e)=>String(t.track)===String(e.track);function tU(t,e=1/60){const i=[],s=new Map;for(const n of t){const a=String(n.track);s.set(a,[...s.get(a)??[],n])}for(const n of s.values()){const a=[...n].sort((o,l)=>o.start-l.start||o.sourceOrder-l.sourceOrder);for(const o of a){const l=o.start+o.duration,c=a.find(d=>d.id!==o.id&&Math.abs(d.start-l)<=e);if(!c||!Sg(o,c))continue;const u=o.transitionOut==="crossfade"&&c.transitionIn==="crossfade";i.push({outgoing:o,incoming:c,at:l,type:u?"crossfade":null,duration:u?Math.min(o.transitionOutDuration,c.transitionInDuration):0})}}return i.sort((n,a)=>Number(n.outgoing.track)-Number(a.outgoing.track)||n.at-a.at)}function eU(t,e,i,s=1/60){const n=t.start+t.duration;if(!Sg(t,e)||Math.abs(e.start-n)>s)return null;const a=Number.isFinite(i)?i:.5,o=Math.min(t.duration,e.duration);if(o<=0)return null;const l=Math.min(o,Math.max(Math.min(1/120,o),a));return{type:"crossfade",duration:l,outgoing:{transitionOut:"crossfade",transitionOutDuration:l},incoming:{transitionIn:"crossfade",transitionInDuration:l}}}function tm(){return{outgoing:["transitionOut","transitionOutDuration"],incoming:["transitionIn","transitionInDuration"]}}function Zl(t,e,i,s=1/60){const n=Math.max(0,e),a=Math.max(n+s,i);return{...t,start:`${n.toFixed(3)}s`,duration:`${(a-n).toFixed(3)}s`}}function iU(t,e,i,s,n,a=1/60){const o=t.body.find(c=>c.type==="Element"&&c.name===e);if(!o)return!1;const l=i-n;o.properties=Zl(o.properties,i,s,a);for(const c of t.body)c.type!=="Animation"||c.target!==e||(c.delay=`${(oc(c.delay??0)+l).toFixed(3)}s`);return!0}function sU(t,e,i,s,n,a=1/60){if(i-s.start<a||s.end-i<a)return null;const o=t.body.find(p=>p.type==="Element"&&p.name===e);if(!o||t.body.some(p=>"name"in p&&p.name===n))return null;const l=t.body.find(p=>p.type==="Import"&&p.name===e),c={...o,properties:Zl(o.properties,s.start,i,a)},u={...o,name:n,properties:Zl(o.properties,i,s.end,a)},d=l?{...l,name:n}:null,f=[];for(const p of t.body){if(p===o){f.push(c),d&&f.push(d),f.push(u);continue}f.push(p),p.type==="Animation"&&p.target===e&&f.push(nU(p,n))}return{program:{...t,body:f},leftId:e,rightId:n}}function nU(t,e){return{...t,target:e,from:t.from?{...t.from}:void 0,to:t.to?{...t.to}:void 0,keyframes:t.keyframes?.map(i=>({...i,properties:{...i.properties}}))}}function rU(t){return{past:[],present:t,future:[]}}function wu(t,e,i=100){return e===t.present?t:{past:[...t.past,t.present].slice(-Math.max(1,i)),present:e,future:[]}}function aU(t){const e=t.past.at(-1);return e===void 0?t:{past:t.past.slice(0,-1),present:e,future:[t.present,...t.future]}}function oU(t){const e=t.future[0];return e===void 0?t:{past:[...t.past,t.present],present:e,future:t.future.slice(1)}}function lU(t,e=!1){const i=t.ctrlKey||t.metaKey,s=t.key.toLowerCase();return i?!t.altKey&&!t.shiftKey&&s==="s"?"save":!t.altKey&&!e&&s==="z"?t.shiftKey?"redo":"undo":null:e||t.altKey?null:t.key===" "?"toggle-playback":t.key==="Delete"||t.key==="Backspace"?"delete-selection":t.key==="ArrowLeft"?"nudge-left":t.key==="ArrowRight"?"nudge-right":t.key==="ArrowUp"?"nudge-up":t.key==="ArrowDown"?"nudge-down":t.key==="Home"?"reset-playhead":t.key==="Escape"?"clear-selection":!t.shiftKey&&s==="s"?"split":null}const kg=4096;function cU(t){return!Number.isFinite(t)||t<=0?64:Math.min(kg,Math.max(64,Math.ceil(t*80)))}async function uU(t,e,i=()=>!1){if(i()||t.length===0)return[];const s=Math.min(...t.map(l=>l.length));if(s===0)return[];const n=Math.min(s,kg,Math.max(1,Math.floor(e))),a=[];let o=0;for(let l=0;l<n;l+=1){if(l>0&&l%64===0&&(await new Promise(p=>setTimeout(p,0)),i()))return[];const c=Math.floor(l*s/n),u=Math.max(c+1,Math.floor((l+1)*s/n));let d=1,f=-1;for(const p of t)for(let v=c;v<u;v+=1){const g=p[v]??0;g<d&&(d=g),g>f&&(f=g)}o=Math.max(o,Math.abs(d),Math.abs(f)),a.push({min:d,max:f})}return o<=Number.EPSILON?a.map(()=>({min:0,max:0})):a.map(({min:l,max:c})=>({min:l/o,max:c/o}))}function dU(t,e=24){if(t.length===0)return"";const i=e/2,s=Math.max(0,i-1),n=(l,c)=>`${l+.5} ${(i-c*s).toFixed(2)}`,a=t.map((l,c)=>n(c,l.max)),o=t.map((l,c)=>n(c,l.min)).reverse();return`M${a.join("L")}L${o.join("L")}Z`}function Su(t,e,i,s,n){const a=t.find(c=>c.id===e);if(!a)return null;const o={...a,track:i.id},l=XE(o,s,n);return t.map(c=>c.id===e?{...o,...l}:c)}function fU(t,e){return t.filter(i=>i.id!==e)}function em(t,e,i,s,n){return t.map(a=>{if(a.id!==e)return a;const o=i==="start"?JE(a,s,n):ZE(a,s,n);return{...a,...o}})}const hU=.25,pU=8;function mU(t){const e=Number.isFinite(t)?t:1;return Math.min(pU,Math.max(hU,e))}function vU(t,e,i){const s=Math.max(0,e),n=Number.isFinite(i)&&i>0?i:60,a=Math.max(0,Math.min(s,t));return Math.min(s,Math.round(a*n)/n)}function _U(t,e,i,s){const n=Math.max(0,i-e)/1e3;return Math.min(Math.max(0,s),Math.max(0,t)+n)}function gU(t,e,i,s,n){const a=t+Math.max(0,e),l=(i>0?a/i:0)*s-e;return Math.min(Math.max(0,s-n),Math.max(0,l))}const Bg="motionly.ai.brand.v1",Eg="motionly.ai.skills.v1",yU=`Create or refine a polished, fully editable Motionly animation from this creative brief.
2377
-
2378
- Audience and goal:
2379
- [Who should see this, what should they understand, and what should they do next?]
2380
-
2381
- Story:
2382
- [Describe the message or progression. A rough beginning, middle, and end is enough.]
2383
-
2384
- Assets (optional):
2385
- [List required logos, screenshots, video, animated SVG/GIF, Lottie, photos, or illustrations. Say which existing animation must be preserved.]
2386
-
2387
- Narration or script:
2388
- [Paste narration, exact on-screen copy, or useful timestamps. Mark any wording that must remain verbatim.]
2389
-
2390
- Brand direction:
2391
- [Colors, typography, visual references, motion character, and anything to avoid.]
2392
-
2393
- Important requirements:
2394
- [Anything that must appear, must not change, or must be avoided.]
2395
-
2396
- Infer sensible format, duration, pacing, timeline organization, and technical settings from the brief and available media. Prefer native editable SVG artwork and Motionly animation for logos, icons, diagrams, and illustrations unless an existing asset's animation must be preserved.`,vc=[{id:"write-motionly",name:"write-motionly",description:"Author, retime, review, and repair Motionly .motion projects: storyboard shots, choose transitions and presets, sync visuals to narration, and validate composition.",instructions:`Inspect the request, current project, brand constraints, script, audio, and every relevant asset before editing. Probe media duration and dimensions instead of guessing.
2397
- Storyboard distinct shots first. For each shot define purpose, time range, focal subject, supporting elements, entrance, readable hold, exit, and transition.
2398
- Write the smallest valid .motion project that realizes the storyboard. Use predictable visual layers, keep audio on the bottom audio track, preserve aspect ratios, and keep supplied copy verbatim when requested.
2399
- Synchronize entrances and exits to supplied narration timestamps. Prefer power3.out, restrained 650ms–1s entrances, deliberate exits, and one strong transition for a real scene change.
2400
- Prefer native SVG and overlay primitives for logos, icons, diagrams, and vector illustrations. Animate the object itself with x, y, scale, rotation, skew, opacity, blur, fill, stroke, masks, and drawSVG rather than moving the global camera.
2401
- Preserve requested MP4, WebM, MOV, GIF, animated SVG, and Lottie motion; never silently flatten animated media to a still.
2402
- Do not invent syntax, presets, block types, or renderer features. Generated output must remain editable through Motionly's parser and visual controls.
2403
- Run inspect:motion with the expected duration, review every empty-frame range, inspect representative scene/transition frames, and confirm parse/serialize/parse preserves timing, tracks, masks, and keyframes.`,path:".agents/skills/write-motionly/SKILL.md",reference:".agents/skills/write-motionly/references/motion-syntax.md"},{id:"motion-graphics",name:"motion-graphics",description:"Motion design principles for polished, professional animation: composition, timing, easing, and restrained transitions.",instructions:`Build each scene around one clear focal subject; keep supporting elements subordinate and spatially separated.
2404
- Default to power3.out easing and entrances around 650ms–1s. Prefer subtle motion over flashy effects.
2405
- Use staggered word reveals for important copy only, not every label.
2406
- Mark story progression with scene/background changes and purposeful movement — avoid constant camera drift and repeated fade-only scenes.
2407
- Give every element a deliberate exit; do not leave unrelated layers stacked indefinitely.
2408
- Vary shot composition (full-frame type, editorial left/right, centered hero) rather than randomizing motion.`},{id:"svg-motion",name:"svg-motion",description:"Native editable SVG and vector animation for logos, icons, diagrams, illustrations, and UI graphics.",instructions:`Prefer creating editable SVG or Motionly overlay primitives over importing a pre-rendered animation unless the user asks to preserve an existing animation.
2409
- Use drawSVG for simple stroked paths; combine fill/stroke color animation, masks, opacity, blur, scale, rotation, skew, and local x/y movement for richer reveals.
2410
- For push-ins, pull-backs, and pans, animate the SVG element's own x, y, scale, rotation, and originX/originY. Do not move the global camera when only the artwork should move.
2411
- Keep detailed artwork readable, preserve its aspect ratio, and stagger related vector layers as one intentional group.`},{id:"animated-assets",name:"animated-assets",description:"Correct import, timing, and export behavior for video, GIF, animated SVG, and Lottie assets.",instructions:`Treat MP4, WebM, MOV, GIF, animated SVG, and Lottie as animated media, never as static substitutes.
2412
- Use timeline clips to set start, duration, trimIn, and trimOut. Keep transformations editable on the asset layer.
2413
- Browser codec support controls MOV/video decoding. Animated SVG uses real-time Canvas playback and cannot be deterministically seeked; CSS keyframes may differ from browser DOM playback, so state that limitation when it applies.
2414
- If an asset fails to decode, report the actual format/browser limitation instead of implying its animation rendered.`},{id:"motionly-rules",name:"motionly-rules",description:"Core Motionly product rules and .motion syntax: keep projects simple, visual, and valid. (Replaces per-project AGENTS.md.)",instructions:`Motionly is a visual motion graphics editor around .motion; .motion is the saved source format, not something users hand-write for normal work.
2415
- Use only supported syntax and presets. Prefer properties: x, y, scale, rotation, opacity, blur, size, color, center, duration, delay, easing.
2416
- Use size (not fontSize) and easing (not ease) in explicit animate blocks. Valid layers: background, hero, supporting, content, details, text, effects.
2417
- Import assets as: import "path" as alias, and render them with alias { ... }. Never invent block types like image/asset/video/scene/group/rect/layer.
2418
- Preserve imported asset aspect ratios (set width OR height). Avoid node graphs, plugin systems, and speculative complexity.`}];function Ug(){return{name:"",logo:"",colors:[],typography:"",visualStyle:[],motionStyle:[],avoid:[]}}function hl(t,e){const i=e.map(s=>s.trim()).filter(Boolean);return i.length?`${t}:
2419
- ${i.join(`
2420
- `)}
2421
- `:""}function dd(t){if(t.markdownOverride&&t.markdownOverride.trim())return t.markdownOverride.trim()+`
2422
- `;const e=["# Brand Profile",""],i=t.name.trim();i&&e.push(`Brand:
2423
- ${i}
2424
- `),t.logo.trim()&&e.push(`Logo:
2425
- ${t.logo.trim()}
2426
- `);const s=hl("Colors",t.colors);s&&e.push(s),t.typography.trim()&&e.push(`Typography:
2427
- ${t.typography.trim()}
2428
- `);const n=hl("Style",t.visualStyle);n&&e.push(n);const a=hl("Motion",t.motionStyle);a&&e.push(a);const o=hl("Avoid",t.avoid);return o&&e.push(o),e.join(`
2429
- `).replace(/\n{3,}/g,`
2430
-
2431
- `).trimEnd()+`
2432
- `}function Tg(t){return t?t.markdownOverride&&t.markdownOverride.trim()?!0:!!(t.name.trim()||t.logo.trim()||t.typography.trim()||t.colors.length||t.visualStyle.length||t.motionStyle.length||t.avoid.length):!1}function fd(){return Object.fromEntries(vc.map(t=>[t.id,!0]))}function Pg(t){const e=fd();if(!t)return e;for(const i of vc){const s=t[i.id];typeof s=="boolean"&&(e[i.id]=s)}return e}function Ag(t){const e=Pg(t);return vc.filter(i=>e[i.id])}function bU(t){const e=[];Tg(t.brand)&&e.push(`Brand profile (BRAND.md):
2433
- ${dd(t.brand).trim()}`);for(const i of Ag(t.skillState))e.push(`Skill: ${i.name}
2434
- ${i.description}
2435
- ${i.instructions.trim()}`);return e.length?`Additional project knowledge. Honor this brand identity and these enabled skills when generating .motion:
2436
-
2437
- ${e.join(`
2438
-
2439
- `)}`:""}function xU(t){const e=Tg(t.brand),i=Ag(t.skillState).length,s=t.assets.length,n=[`${i>0?"✓":"✗"} ${i} skill${i===1?"":"s"} enabled`,`${e?"✓":"✗"} Brand profile ${e?"loaded":"not set"}`,`${s>0?"✓":"✗"} ${s} asset${s===1?"":"s"} available`];return t.project&&n.push(`✓ Project ${t.project.width}x${t.project.height} · ${t.project.fps}fps · ${t.project.duration.toFixed(2)}s · ${t.project.elementCount} element${t.project.elementCount===1?"":"s"}`),{brandLoaded:e,enabledSkillCount:i,assetCount:s,lines:n}}function Ig(t){try{return localStorage.getItem(t)}catch{return null}}function Mg(t,e){try{localStorage.setItem(t,e)}catch{}}function Yd(){const t=Ig(Bg);if(!t)return null;try{return{...Ug(),...JSON.parse(t)}}catch{return null}}function wU(t){Mg(Bg,JSON.stringify(t))}function zg(){const t=Ig(Eg);if(!t)return fd();try{return Pg(JSON.parse(t))}catch{return fd()}}function SU(t){Mg(Eg,JSON.stringify(t))}var kU=W('<button type="button" class="icon-button svelte-lobal1" title="Clear chat"><!></button>'),BU=W('<select class="provider-chip svelte-lobal1" aria-label="AI provider"><option>Detected: OpenAI</option><option>Detected: Anthropic</option><option>Detected: OpenRouter</option><option>Detected: Google Gemini</option><option>Detected: Hugging Face</option><option>Custom endpoint</option></select>'),EU=W('<label class="custom-toggle svelte-lobal1"><input type="checkbox" class="svelte-lobal1"/> <span>Custom endpoint</span></label>'),UU=W('<p class="provider-warning svelte-lobal1">Detected: Kiro CLI key. Kiro does not document a direct browser/OpenAI-compatible chat endpoint, so this key cannot be sent directly. Use another provider key, or enable Custom endpoint if you have a compatible gateway.</p>'),TU=W('<p class="provider-note svelte-lobal1">Hugging Face tokens need “Make calls to Inference Providers” permission. Enter any compatible chat model ID below.</p>'),PU=W('<div class="field svelte-lobal1"><label for="motionly-ai-url" class="svelte-lobal1">Base URL</label> <input id="motionly-ai-url" placeholder="http://localhost:11434/v1" class="svelte-lobal1"/></div>'),AU=W(`<div class="field svelte-lobal1"><label for="motionly-ai-model" class="svelte-lobal1">Model <span class="svelte-lobal1">(optional)</span></label> <input id="motionly-ai-model" placeholder="Exact model ID" class="svelte-lobal1"/> <small class="svelte-lobal1">Leave blank to use Motionly's provider default.</small></div>`),im=W('<p class="error-message svelte-lobal1"> </p>'),IU=W('<button type="button" class="secondary-button danger svelte-lobal1">Remove key</button>'),MU=W('<div class="settings-view svelte-lobal1"><div class="svelte-lobal1"><h3 class="svelte-lobal1">Connect AI to Motionly</h3> <p class="svelte-lobal1">Motionly does not host or proxy AI requests. Your key lets this browser contact your provider directly and turn prompts into editable <code class="svelte-lobal1">.motion</code> projects. Any usage is billed by your provider.</p></div> <div class="field svelte-lobal1"><label for="motionly-ai-key" class="svelte-lobal1">API key</label> <div class="key-input svelte-lobal1"><input id="motionly-ai-key" placeholder="Paste API key" autocomplete="off" class="svelte-lobal1"/> <button type="button" class="svelte-lobal1"><!></button></div></div> <!> <!> <!> <!> <!> <p class="privacy-note svelte-lobal1">Your key is stored locally in your browser and never sent to our servers.</p> <p class="guide-note svelte-lobal1">See the <a href="https://motionly.mintlify.app/agents/ai-authoring" target="_blank" rel="noreferrer" class="svelte-lobal1">prompt guide</a> for templates and an introduction to the <code class="svelte-lobal1">write-motionly</code> skill.</p> <button type="button" class="copy-prompt-button svelte-lobal1"> </button> <!> <div class="settings-actions svelte-lobal1"><!> <button type="button" class="primary-button svelte-lobal1">Save &amp; continue</button></div></div>'),zU=W('<div class="empty-state svelte-lobal1"><strong class="svelte-lobal1">What are we making today?</strong> <span class="svelte-lobal1">See the <a href="https://motionly.mintlify.app/agents/ai-authoring" target="_blank" rel="noreferrer" class="svelte-lobal1">prompt guide</a> for templates and an introduction to the <code class="svelte-lobal1">write-motionly</code> skill.</span> <button type="button" class="copy-prompt-button svelte-lobal1"> </button></div>'),CU=W('<p class="svelte-lobal1"> </p>'),$U=W('<button type="button" class="repair-button svelte-lobal1">Ask Assistant to Fix</button>'),OU=W('<pre class="svelte-lobal1"><code> </code></pre> <button type="button" class="load-button svelte-lobal1"> </button> <!>',1),FU=W('<article><div class="message-role svelte-lobal1"> </div> <!> <!></article>'),NU=W('<div class="thinking svelte-lobal1">Drafting your project…</div>'),DU=W("<!> <!>",1),RU=W('<div class="message-list svelte-lobal1" aria-live="polite"><!></div> <div class="composer-wrap svelte-lobal1"><!> <div class="composer svelte-lobal1"><textarea rows="1" placeholder="Describe the animation you want..." aria-label="Message Motionly Assistant" class="svelte-lobal1"></textarea> <button type="button" title="Send message" class="svelte-lobal1"><!></button></div></div>',1),LU=W('<section class="ai-chat-panel svelte-lobal1" aria-label="Motionly Assistant"><header class="chat-header svelte-lobal1"><div class="chat-title svelte-lobal1"><!><span>Motionly Assistant</span></div> <div class="header-actions svelte-lobal1"><!> <button type="button" title="Assistant settings"><!></button> <button type="button" class="icon-button svelte-lobal1" title="Collapse assistant"><!></button></div></header> <!></section>');function HU(t,e){ir(e,!1);const i=q(),s=q(),n=q();let a=Ci(e,"project",8,""),o=Ci(e,"assetList",24,()=>[]),l=Ci(e,"onLoadMotion",8,()=>null),c=Ci(e,"onCollapse",8,()=>{}),u=q(""),d=q("openai"),f=q(""),p=q(""),v=q(!1),g=q(!1),_=q(!0),x=q([]),E=q(""),I=q(!1),z=q(""),$=q(""),M=q(""),V="",N=q(!1),H=q(!1),T=q(),j=q();ac(()=>{try{const bt=localStorage.getItem(to);if(bt){const Pt=JSON.parse(bt);S(u,Pt.apiKey??""),S(d,Dn(r(u))??Pt.provider??"openai"),S(f,Pt.baseUrl??""),S(p,Pt.model??""),S(v,r(d)==="custom"),S(_,!r(u)||Pt.provider!=="custom"&&!Dn(r(u))),S(N,!!r(u)),r(u)&&Pt.provider!=="custom"&&!Dn(r(u))&&S(z,r(u).startsWith("ksk_")?"Kiro API keys work with Kiro CLI, not a documented browser chat endpoint.":"Choose Custom endpoint for this unrecognized key format.")}const _t=localStorage.getItem(ou);_t&&S(x,JSON.parse(_t))}catch{S(z,"Saved assistant settings could not be read.")}});function St(){const bt=Dn(r(u));bt&&(r(d)!==bt&&S(p,""),S(d,bt),S(v,!1))}function yt(bt){const _t=bt.currentTarget.value;r(d)!==_t&&S(p,""),S(d,_t),S(v,r(d)==="custom")}function ht(bt){S(v,bt.currentTarget.checked),S(d,r(v)?"custom":r(i)??"openai")}async function vt(){try{await navigator.clipboard.writeText(yU),S(H,!0),setTimeout(()=>S(H,!1),1800)}catch{S(z,"Your browser blocked clipboard access. Open the prompt guide and copy the template there.")}}function F(){if(S(z,""),!r(u).trim()){S(z,"Enter an API key to continue.");return}if(!r(i)&&r(d)!=="custom"){S(z,r(s)?"Kiro API keys work with Kiro CLI. Use a supported provider key or configure a compatible gateway under Custom endpoint.":"Choose Custom endpoint and enter a compatible Base URL for this key format.");return}if(r(d)==="custom"){if(!r(f).trim()){S(z,"Enter the custom endpoint base URL.");return}try{kd(r(f))}catch(bt){S(z,bt instanceof Error?bt.message:"Enter a valid base URL.");return}}localStorage.setItem(to,JSON.stringify(xt())),S(N,!0),S(_,!1)}function C(){localStorage.removeItem(to),S(u,""),S(f,""),S(p,""),S(d,"openai"),S(v,!1),S(N,!1),S(_,!0),S(z,"")}function Lt(){S(x,[]),S($,""),localStorage.removeItem(ou)}function xt(){return{apiKey:r(u).trim(),provider:r(d),baseUrl:r(f).trim(),model:r(p).trim()}}async function He(){const bt=r(E).trim();if(!bt||r(I))return;S(z,"");const _t={id:crypto.randomUUID(),role:"user",content:bt};S(x,[...r(x),_t]),S(E,""),ii(),de(),nt(),S(I,!0);try{const Pt=bU({brand:Yd(),skillState:zg(),assets:o()}),Ie=await Ox(xt(),r(x),a(),o(),Pt);S(x,[...r(x),{id:crypto.randomUUID(),role:"assistant",content:Ie,motion:Cx(Ie)}]),de(),nt()}catch(Pt){S(z,Pt instanceof Error?Pt.message:"The assistant request failed.")}finally{S(I,!1)}}function ii(){requestAnimationFrame(()=>{if(!r(T))return;Ce(T,r(T).style.height="auto");const bt=Math.min(120,Math.max(38,r(T).scrollHeight));Ce(T,r(T).style.height=`${bt}px`),Ce(T,r(T).style.overflowY=r(T).scrollHeight>120?"auto":"hidden")})}function de(){requestAnimationFrame(()=>{r(j)&&Ce(j,r(j).scrollTop=r(j).scrollHeight)})}function re(bt){bt.key==="Enter"&&!bt.shiftKey&&(bt.preventDefault(),He())}function xe(bt){if(!bt.motion)return;const _t=l()(yv(bt.motion,o()));S(z,_t??""),S(M,_t?bt.id:""),V=_t??"",_t||S($,bt.id)}function Ct(){S(E,`Repair your last generated .motion project. Motionly's parser reported: ${V}. Return the corrected complete project using only the system prompt syntax.`),S(M,""),He()}function nt(){localStorage.setItem(ou,JSON.stringify(r(x)))}function ai(bt){return bt.replace(/```motion\s*[\s\S]*?```/gi,"").trim()}le(()=>r(u),()=>{S(i,Dn(r(u)))}),le(()=>r(u),()=>{S(s,r(u).trim().startsWith("ksk_"))}),le(()=>r(u),()=>{S(n,r(u).trim().startsWith("hf_"))}),ga(),Mr();var kt=LU(),Ge=y(kt),fe=y(Ge),Me=y(fe);vv(Me,{size:16});var pt=b(fe,2),jt=y(pt);{var xi=bt=>{var _t=kU(),Pt=y(_t);Wa(Pt,{size:14}),P("click",_t,Lt),A(bt,_t)};Z(jt,bt=>{r(x),r(_),k(()=>r(x).length&&!r(_))&&bt(xi)})}var ft=b(jt,2);let qe;var Ss=y(ft);gv(Ss,{size:15});var Ii=b(ft,2),as=y(Ii);yx(as,{size:15});var rt=b(Ge,2);{var It=bt=>{var _t=MU(),Pt=b(y(_t),2),Ie=b(y(Pt),2),we=y(Ie),Et=b(we,2),he=y(Et);{var _i=zt=>{Fl(zt,{size:15})},Fi=zt=>{lo(zt,{size:15})};Z(he,zt=>{r(g)?zt(_i):zt(Fi,-1)})}var pn=b(Pt,2);{var di=zt=>{var Yt=Nt(),Ke=et(Yt);{var wi=Si=>{var Gi=BU(),ls=y(Gi);ls.value=ls.__value="openai";var ar=b(ls);ar.value=ar.__value="anthropic";var Bs=b(ar);Bs.value=Bs.__value="openrouter";var Ns=b(Bs);Ns.value=Ns.__value="gemini";var $r=b(Ns);$r.value=$r.__value="huggingface";var xa=b($r);xa.value=xa.__value="custom";var Uo;br(Gi),K(()=>{Uo!==(Uo=r(d))&&(Gi.value=(Gi.__value=r(d))??"",Pn(Gi,r(d)))}),P("change",Gi,yt),A(Si,Gi)},mn=Si=>{var Gi=EU(),ls=y(Gi);K(()=>oo(ls,r(v))),P("change",ls,ht),A(Si,Gi)};Z(Ke,Si=>{r(i)||r(v)?Si(wi):Si(mn,-1)})}A(zt,Yt)},gi=ps(()=>(r(u),k(()=>r(u).trim())));Z(pn,zt=>{r(gi)&&zt(di)})}var Ni=b(pn,2);{var Ee=zt=>{var Yt=UU();A(zt,Yt)};Z(Ni,zt=>{r(s)&&zt(Ee)})}var $e=b(Ni,2);{var yi=zt=>{var Yt=TU();A(zt,Yt)};Z($e,zt=>{r(n)&&zt(yi)})}var Se=b($e,2);{var ks=zt=>{var Yt=PU(),Ke=b(y(Yt),2);zi(Ke,()=>r(f),wi=>S(f,wi)),A(zt,Yt)};Z(Se,zt=>{r(v)&&zt(ks)})}var oi=b(Se,2);{var Oe=zt=>{var Yt=AU(),Ke=b(y(Yt),2);zi(Ke,()=>r(p),wi=>S(p,wi)),A(zt,Yt)},$s=ps(()=>(r(u),r(i),r(v),k(()=>r(u).trim()&&(r(i)||r(v)))));Z(oi,zt=>{r($s)&&zt(Oe)})}var Ei=b(oi,6),rr=y(Ei),Os=b(Ei,2);{var os=zt=>{var Yt=im(),Ke=y(Yt);K(()=>at(Ke,r(z))),A(zt,Yt)};Z(Os,zt=>{r(z)&&zt(os)})}var Fs=b(Os,2),Ks=y(Fs);{var ji=zt=>{var Yt=IU();P("click",Yt,C),A(zt,Yt)};Z(Ks,zt=>{r(N)&&zt(ji)})}var Di=b(Ks,2);K(()=>{st(we,"type",r(g)?"text":"password"),st(Et,"title",r(g)?"Hide key":"Show key"),at(rr,r(H)?"Prompt Template Copied":"Copy Prompt Template")}),zi(we,()=>r(u),zt=>S(u,zt)),P("input",we,St),P("click",Et,()=>S(g,!r(g))),P("click",Ei,vt),P("click",Di,F),A(bt,_t)},Be=bt=>{var _t=RU(),Pt=et(_t),Ie=y(Pt);{var we=Ee=>{var $e=zU(),yi=b(y($e),4),Se=y(yi);K(()=>at(Se,r(H)?"Prompt Template Copied":"Copy Prompt Template")),P("click",yi,vt),A(Ee,$e)},Et=Ee=>{var $e=DU(),yi=et($e);ge(yi,1,()=>r(x),oi=>oi.id,(oi,Oe)=>{var $s=FU();let Ei;var rr=y($s),Os=y(rr),os=b(rr,2);{var Fs=zt=>{var Yt=CU(),Ke=y(Yt);K(wi=>at(Ke,wi),[()=>(r(Oe),k(()=>ai(r(Oe).content)))]),A(zt,Yt)},Ks=ps(()=>(r(Oe),k(()=>ai(r(Oe).content))));Z(os,zt=>{r(Ks)&&zt(Fs)})}var ji=b(os,2);{var Di=zt=>{var Yt=OU(),Ke=et(Yt),wi=y(Ke),mn=y(wi),Si=b(Ke,2),Gi=y(Si),ls=b(Si,2);{var ar=Bs=>{var Ns=$U();P("click",Ns,Ct),A(Bs,Ns)};Z(ls,Bs=>{r(M),r(Oe),k(()=>r(M)===r(Oe).id)&&Bs(ar)})}K(()=>{at(mn,(r(Oe),k(()=>r(Oe).motion))),at(Gi,(r($),r(Oe),k(()=>r($)===r(Oe).id?"Loaded":"Load into Editor")))}),P("click",Si,()=>xe(r(Oe))),A(zt,Yt)};Z(ji,zt=>{r(Oe),k(()=>r(Oe).motion)&&zt(Di)})}K(()=>{Ei=Ft($s,1,"message svelte-lobal1",null,Ei,{user:r(Oe).role==="user"}),at(Os,(r(Oe),k(()=>r(Oe).role==="user"?"You":"Assistant")))}),A(oi,$s)});var Se=b(yi,2);{var ks=oi=>{var Oe=NU();A(oi,Oe)};Z(Se,oi=>{r(I)&&oi(ks)})}A(Ee,$e)};Z(Ie,Ee=>{r(x),k(()=>r(x).length===0)?Ee(we):Ee(Et,-1)})}an(Pt,Ee=>S(j,Ee),()=>r(j));var he=b(Pt,2),_i=y(he);{var Fi=Ee=>{var $e=im(),yi=y($e);K(()=>at(yi,r(z))),A(Ee,$e)};Z(_i,Ee=>{r(z)&&Ee(Fi)})}var pn=b(_i,2),di=y(pn);an(di,Ee=>S(T,Ee),()=>r(T));var gi=b(di,2),Ni=y(gi);Bx(Ni,{size:15}),K(Ee=>gi.disabled=Ee,[()=>(r(E),r(I),k(()=>!r(E).trim()||r(I)))]),zi(di,()=>r(E),Ee=>S(E,Ee)),P("input",di,ii),P("keydown",di,re),P("click",gi,He),A(bt,_t)};Z(rt,bt=>{r(_)?bt(It):bt(Be,-1)})}K(()=>qe=Ft(ft,1,"icon-button svelte-lobal1",null,qe,{active:r(_)})),P("click",ft,()=>S(_,!r(_))),P("click",Ii,function(...bt){c()?.apply(this,bt)}),A(t,kt),sr()}var VU=W('<div><strong>File:</strong> <code class="svelte-1tw9x39"> </code></div>'),jU=W('<div><strong>Reference:</strong> <code class="svelte-1tw9x39"> </code></div>'),GU=W('<div class="skill-detail svelte-1tw9x39"><pre class="svelte-1tw9x39"> </pre> <!> <!></div>'),qU=W('<div class="skill-row svelte-1tw9x39"><div class="skill-main svelte-1tw9x39"><label class="skill-toggle svelte-1tw9x39"><input type="checkbox"/> <span class="skill-name svelte-1tw9x39"> </span></label> <button type="button" class="config-link svelte-1tw9x39"><!> </button></div> <p class="skill-desc svelte-1tw9x39"> </p> <!></div>'),WU=W('<div class="config-section svelte-1tw9x39"><h4 class="config-title svelte-1tw9x39">Skills</h4> <p class="config-desc svelte-1tw9x39">Enable the skills the assistant should follow. Enabled skills load their instructions into the assistant, replacing per-project AGENTS.md.</p> <!></div>'),YU=W("<div> </div>"),KU=W('<div class="config-section svelte-1tw9x39"><h4 class="config-title svelte-1tw9x39">AI Context Preview</h4> <p class="config-desc svelte-1tw9x39">What the assistant currently knows about this project.</p> <div class="context-card svelte-1tw9x39"><div class="context-heading svelte-1tw9x39">AI knows:</div> <!></div></div>'),XU=W('<div class="ai-config svelte-1tw9x39"><nav class="config-nav svelte-1tw9x39" aria-label="AI configuration sections"><button type="button"><!> Skills</button> <button type="button"><!> Context</button></nav> <div class="config-body svelte-1tw9x39"><!></div></div>');function JU(t,e){ir(e,!1);const i=q();let s=Ci(e,"assetList",24,()=>[]),n=Ci(e,"projectInfo",8,null),a=q("skills"),o=q(zg()),l=q("");function c(M){S(o,{...r(o),[M]:!r(o)[M]}),SU(r(o))}le(()=>(r(o),Zt(s()),Zt(n())),()=>{S(i,xU({brand:Yd(),skillState:r(o),assets:s(),project:n()}))}),ga(),Mr();var u=XU(),d=y(u),f=y(d);let p;var v=y(f);Gr(v,{size:14});var g=b(f,2);let _;var x=y(g);lo(x,{size:14});var E=b(d,2),I=y(E);{var z=M=>{var V=WU(),N=b(y(V),4);ge(N,1,()=>vc,be,(H,T)=>{var j=qU(),St=y(j),yt=y(St),ht=y(yt),vt=b(ht,2),F=y(vt),C=b(yt,2),Lt=y(C);fx(Lt,{size:13});var xt=b(Lt),He=b(St,2),ii=y(He),de=b(He,2);{var re=xe=>{var Ct=GU(),nt=y(Ct),ai=y(nt),kt=b(nt,2);{var Ge=pt=>{var jt=VU(),xi=b(y(jt),2),ft=y(xi);K(()=>at(ft,(r(T),k(()=>r(T).path)))),A(pt,jt)};Z(kt,pt=>{r(T),k(()=>r(T).path)&&pt(Ge)})}var fe=b(kt,2);{var Me=pt=>{var jt=jU(),xi=b(y(jt),2),ft=y(xi);K(()=>at(ft,(r(T),k(()=>r(T).reference)))),A(pt,jt)};Z(fe,pt=>{r(T),k(()=>r(T).reference)&&pt(Me)})}K(()=>at(ai,(r(T),k(()=>r(T).instructions)))),A(xe,Ct)};Z(de,xe=>{r(l),r(T),k(()=>r(l)===r(T).id)&&xe(re)})}K(()=>{oo(ht,(r(o),r(T),k(()=>r(o)[r(T).id]))),at(F,(r(T),k(()=>r(T).name))),at(xt,` ${r(l),r(T),k(()=>r(l)===r(T).id?"Hide":"Open instructions")??""}`),at(ii,(r(T),k(()=>r(T).description)))}),P("change",ht,()=>c(r(T).id)),P("click",C,()=>S(l,r(l)===r(T).id?"":r(T).id)),A(H,j)}),A(M,V)},$=M=>{var V=KU(),N=b(y(V),4),H=b(y(N),2);ge(H,1,()=>(r(i),k(()=>r(i).lines)),be,(T,j)=>{var St=YU();let yt;var ht=y(St);K(vt=>{yt=Ft(St,1,"context-line svelte-1tw9x39",null,yt,vt),at(ht,r(j))},[()=>({ok:r(j).startsWith("✓"),missing:r(j).startsWith("✗")})]),A(T,St)}),A(M,V)};Z(I,M=>{r(a)==="skills"?M(z):r(a)==="context"&&M($,1)})}K(()=>{p=Ft(f,1,"svelte-1tw9x39",null,p,{active:r(a)==="skills"}),_=Ft(g,1,"svelte-1tw9x39",null,_,{active:r(a)==="context"})}),P("click",f,()=>S(a,"skills")),P("click",g,()=>S(a,"context")),A(t,u),sr()}var ZU=W('<textarea class="config-textarea svelte-167vias" rows="16" spellcheck="false"></textarea> <button type="button" class="config-link danger svelte-167vias">Discard override & return to visual editor</button>',1),QU=W("<option> </option>"),tT=W('<span class="chip color-chip svelte-167vias"><span class="swatch svelte-167vias"></span> <button type="button" class="svelte-167vias"><!></button></span>'),sm=W('<span class="chip svelte-167vias"> <button type="button" class="svelte-167vias"><!></button></span>'),eT=W('<span class="chip avoid-chip svelte-167vias"> <button type="button" class="svelte-167vias"><!></button></span>'),iT=W('<label class="field svelte-167vias"><span class="field-label svelte-167vias">Brand name</span> <input class="config-input svelte-167vias" type="text" placeholder="Motionly"/></label> <label class="field svelte-167vias"><span class="field-label svelte-167vias">Logo</span> <select class="config-input svelte-167vias"><option>None</option><!></select></label> <div class="field svelte-167vias"><span class="field-label svelte-167vias">Brand colors</span> <div class="chip-row svelte-167vias"></div> <div class="inline-add svelte-167vias"><input class="color-input svelte-167vias" type="color" aria-label="Pick brand color"/> <input class="config-input svelte-167vias" type="text" placeholder="#4F8CFF"/> <button type="button" class="config-btn svelte-167vias"><!></button></div></div> <label class="field svelte-167vias"><span class="field-label svelte-167vias">Typography</span> <input class="config-input svelte-167vias" type="text" placeholder="Inter, Geist, system-ui"/></label> <div class="field svelte-167vias"><span class="field-label svelte-167vias">Visual style</span> <div class="chip-row svelte-167vias"></div> <input class="config-input svelte-167vias" type="text" placeholder="Minimal, Premium, Modern — press Enter"/></div> <div class="field svelte-167vias"><span class="field-label svelte-167vias">Motion style</span> <div class="chip-row svelte-167vias"></div> <input class="config-input svelte-167vias" type="text" placeholder="Smooth, Cinematic — press Enter"/></div> <div class="field svelte-167vias"><span class="field-label svelte-167vias">Things to avoid</span> <div class="chip-row svelte-167vias"></div> <input class="config-input svelte-167vias" type="text" placeholder="Overly flashy effects — press Enter"/></div> <div class="brand-preview svelte-167vias"><span class="field-label svelte-167vias"> </span> <pre class="svelte-167vias"> </pre></div>',1),sT=W('<div class="panel-content svelte-167vias"><div class="config-section svelte-167vias"><div class="config-title-row svelte-167vias"><h4 class="config-title svelte-167vias">Brand Profile</h4> <button type="button" class="config-link svelte-167vias"><!> </button></div> <p class="config-desc svelte-167vias">Define brand identity for AI-generated animations. Saved as BRAND.md and loaded into the assistant context.</p> <!></div></div>');function nT(t,e){ir(e,!1);const i=q();let s=Ci(e,"assetList",24,()=>[]),n=q(Yd()??Ug()),a=q(!1),o=q(!1),l=q(""),c=q(""),u=q(""),d=q("#4F8CFF");function f(){S(n,{...r(n)}),wU(r(n)),S(o,!0),setTimeout(()=>S(o,!1),1600)}function p(){const yt=r(d).trim();!yt||r(n).colors.includes(yt)||(Ce(n,r(n).colors=[...r(n).colors,yt]),en(()=>{s()}),f())}function v(yt){Ce(n,r(n).colors=r(n).colors.filter(ht=>ht!==yt)),en(()=>{s()}),f()}function g(yt,ht){const vt=ht.trim();!vt||r(n)[yt].includes(vt)||(Ce(n,r(n)[yt]=[...r(n)[yt],vt]),en(()=>{s()}),f())}function _(yt,ht){Ce(n,r(n)[yt]=r(n)[yt].filter(vt=>vt!==ht)),en(()=>{s()}),f()}function x(yt,ht,vt){yt.key==="Enter"&&(yt.preventDefault(),g(ht,yt.currentTarget.value),vt())}function E(){r(a)||(Ce(n,r(n).markdownOverride=dd({...r(n),markdownOverride:""})),en(()=>{s()})),S(a,!r(a)),f()}function I(){Ce(n,r(n).markdownOverride=""),en(()=>{s()}),S(a,!1),f()}le(()=>r(n),()=>{S(i,dd(r(n)))}),ga(),Mr();var z=sT(),$=y(z),M=y($),V=b(y(M),2),N=y(V);mx(N,{size:13});var H=b(N),T=b(M,4);{var j=yt=>{var ht=ZU(),vt=et(ht),F=b(vt,2);zi(vt,()=>r(n).markdownOverride,C=>(Ce(n,r(n).markdownOverride=C),en(()=>{s()}))),P("input",vt,f),P("click",F,I),A(yt,ht)},St=yt=>{var ht=iT(),vt=et(ht),F=b(y(vt),2),C=b(vt,2),Lt=b(y(C),2),xt=y(Lt);xt.value=xt.__value="";var He=b(xt);ge(He,1,s,be,(_t,Pt)=>{var Ie=QU(),we=y(Ie),Et={};K(()=>{at(we,`${r(Pt),k(()=>r(Pt).name)??""} (${r(Pt),k(()=>r(Pt).type)??""})`),Et!==(Et=(r(Pt),k(()=>r(Pt).name)))&&(Ie.value=(Ie.__value=(r(Pt),k(()=>r(Pt).name)))??"")}),A(_t,Ie)});var ii=b(C,2),de=b(y(ii),2);ge(de,5,()=>(r(n),k(()=>r(n).colors)),be,(_t,Pt)=>{var Ie=tT(),we=y(Ie),Et=b(we),he=b(Et),_i=y(he);Ln(_i,{size:11}),K(()=>{Ae(we,`background:${r(Pt)}`),at(Et,`${r(Pt)??""} `),st(he,"aria-label",`Remove ${r(Pt)}`)}),P("click",he,()=>v(r(Pt))),A(_t,Ie)});var re=b(de,2),xe=y(re),Ct=b(xe,2),nt=b(Ct,2),ai=y(nt);Lu(ai,{size:13});var kt=b(ii,2),Ge=b(y(kt),2),fe=b(kt,2),Me=b(y(fe),2);ge(Me,5,()=>(r(n),k(()=>r(n).visualStyle)),be,(_t,Pt)=>{var Ie=sm(),we=y(Ie),Et=b(we),he=y(Et);Ln(he,{size:11}),K(()=>{at(we,r(Pt)),st(Et,"aria-label",`Remove ${r(Pt)}`)}),P("click",Et,()=>_("visualStyle",r(Pt))),A(_t,Ie)});var pt=b(Me,2),jt=b(fe,2),xi=b(y(jt),2);ge(xi,5,()=>(r(n),k(()=>r(n).motionStyle)),be,(_t,Pt)=>{var Ie=sm(),we=y(Ie),Et=b(we),he=y(Et);Ln(he,{size:11}),K(()=>{at(we,r(Pt)),st(Et,"aria-label",`Remove ${r(Pt)}`)}),P("click",Et,()=>_("motionStyle",r(Pt))),A(_t,Ie)});var ft=b(xi,2),qe=b(jt,2),Ss=b(y(qe),2);ge(Ss,5,()=>(r(n),k(()=>r(n).avoid)),be,(_t,Pt)=>{var Ie=eT(),we=y(Ie),Et=b(we),he=y(Et);Ln(he,{size:11}),K(()=>{at(we,r(Pt)),st(Et,"aria-label",`Remove ${r(Pt)}`)}),P("click",Et,()=>_("avoid",r(Pt))),A(_t,Ie)});var Ii=b(Ss,2),as=b(qe,2),rt=y(as),It=y(rt),Be=b(rt,2),bt=y(Be);K(()=>{at(It,`BRAND.md preview ${r(o)?"· saved":""}`),at(bt,r(i))}),zi(F,()=>r(n).name,_t=>(Ce(n,r(n).name=_t),en(()=>{s()}))),P("input",F,f),jb(Lt,()=>r(n).logo,_t=>(Ce(n,r(n).logo=_t),en(()=>{s()}))),P("change",Lt,f),zi(xe,()=>r(d),_t=>S(d,_t)),zi(Ct,()=>r(d),_t=>S(d,_t)),P("click",nt,p),zi(Ge,()=>r(n).typography,_t=>(Ce(n,r(n).typography=_t),en(()=>{s()}))),P("input",Ge,f),zi(pt,()=>r(l),_t=>S(l,_t)),P("keydown",pt,_t=>x(_t,"visualStyle",()=>S(l,""))),zi(ft,()=>r(c),_t=>S(c,_t)),P("keydown",ft,_t=>x(_t,"motionStyle",()=>S(c,""))),zi(Ii,()=>r(u),_t=>S(u,_t)),P("keydown",Ii,_t=>x(_t,"avoid",()=>S(u,""))),A(yt,ht)};Z(T,yt=>{r(a)?yt(j):yt(St,-1)})}K(()=>at(H,` ${r(a)?"Visual editor":"Edit Markdown"}`)),P("click",V,E),A(t,z),sr()}var rT=W('<div class="panel-header-actions svelte-1mvnu54"><input class="file-input svelte-1mvnu54" type="file" accept="image/*,video/*,.svg,.gif,.mp4,.webm,.mov,.m4v,.lottie" multiple=""/></div>'),nm=W('<p class="asset-error svelte-1mvnu54"> </p>'),aT=W('<div class="asset-folder svelte-1mvnu54"><div class="folder-header svelte-1mvnu54"><!> <span class="folder-title svelte-1mvnu54">Audio</span></div> <div class="folder-content svelte-1mvnu54"><div class="asset-item audio-asset svelte-1mvnu54" role="button" tabindex="0" draggable="true"><div class="asset-item-icon svelte-1mvnu54"><!></div> <div class="asset-item-info svelte-1mvnu54"><div class="asset-item-name svelte-1mvnu54"> </div> <div class="asset-item-path svelte-1mvnu54"> </div></div></div></div></div>'),oT=W('<video playsinline="" preload="metadata" class="svelte-1mvnu54"></video>',2),lT=W('<img class="svelte-1mvnu54"/>'),cT=W('<button type="button" class="asset-card svelte-1mvnu54"><div class="asset-thumbnail svelte-1mvnu54"><!></div> <div class="asset-info svelte-1mvnu54"><div class="asset-name svelte-1mvnu54"> </div></div></button>'),uT=W('<div class="asset-folder svelte-1mvnu54"><div class="folder-header svelte-1mvnu54"><!> <span class="folder-title svelte-1mvnu54">Media</span> <span class="folder-count svelte-1mvnu54"> </span></div> <div class="asset-grid svelte-1mvnu54"></div></div>'),dT=W('<p class="empty-state svelte-1mvnu54">Imported media will stay here until you drag it onto the timeline.</p>'),fT=W('<div role="region" aria-label="Import media by dropping files"><!> <div class="media-drop-prompt svelte-1mvnu54"><button type="button" class="import-media-button svelte-1mvnu54"><!> Import media</button> <span class="svelte-1mvnu54">or drag & drop from your device</span> <small class="svelte-1mvnu54">Images, animated SVG/GIF, MP4/WebM/MOV, and Lottie</small></div> <!> <!> <!></div>'),hT=W('<button type="button" class="preset-card svelte-1mvnu54"><div class="preset-thumbnail svelte-1mvnu54"><img class="svelte-1mvnu54"/></div> <div class="preset-info svelte-1mvnu54"><div class="preset-name svelte-1mvnu54"> </div></div></button>'),pT=W('<div class="preset-grid svelte-1mvnu54"></div>'),mT=W('<div class="panel-header svelte-1mvnu54"><div class="panel-tabs svelte-1mvnu54"><button type="button">Assets</button> <button type="button">Presets</button></div> <!></div> <div class="panel-content svelte-1mvnu54"><!></div>',1),vT=W('<div class="audio-item audio-asset svelte-1mvnu54" role="button" tabindex="0" draggable="true"><!> <span> </span> <button class="icon-btn svelte-1mvnu54" title="Remove audio"><!></button></div>'),_T=W('<p class="empty-state svelte-1mvnu54">Imported audio will appear on the timeline.</p>'),gT=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">Audio</h3> <div class="panel-header-actions svelte-1mvnu54"><button type="button" class="header-icon-btn svelte-1mvnu54" title="Import audio"><!></button></div></div> <div class="panel-content svelte-1mvnu54"><div role="region" aria-label="Import audio by dropping a file"><!> <div class="media-drop-prompt svelte-1mvnu54"><button type="button" class="import-media-button svelte-1mvnu54"><!> Import audio</button> <span class="svelte-1mvnu54">or drag & drop from your device</span> <small class="svelte-1mvnu54">Audio files up to 50 MB</small></div> <!></div></div>',1),rm=W('<button type="button"><span class="layer-icon svelte-1mvnu54"><!></span> <span class="layer-copy svelte-1mvnu54"><strong class="svelte-1mvnu54"> </strong> <small class="svelte-1mvnu54"> </small></span></button>'),yT=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">Text</h3> <div class="panel-header-actions svelte-1mvnu54"><button type="button" class="header-icon-btn svelte-1mvnu54" title="Add text"><!></button></div></div> <div class="panel-content svelte-1mvnu54"><div class="layer-list svelte-1mvnu54"></div></div>',1),pl=W('<button type="button" class="effect-item svelte-1mvnu54"><!> <span class="svelte-1mvnu54"> </span></button>'),bT=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">Effects</h3></div> <div class="panel-content svelte-1mvnu54"><div class="effects-categories svelte-1mvnu54"><div class="effects-category svelte-1mvnu54"><div class="category-title svelte-1mvnu54">Text Effects</div> <div class="effects-list svelte-1mvnu54"></div></div> <div class="effects-category svelte-1mvnu54"><div class="category-title svelte-1mvnu54">Object Effects</div> <div class="effects-list svelte-1mvnu54"></div></div> <div class="effects-category svelte-1mvnu54"><div class="category-title svelte-1mvnu54">Clip Transitions</div> <p class="category-hint svelte-1mvnu54">Drag onto a cut between two touching clips.</p> <div class="effects-list svelte-1mvnu54"><button type="button" class="effect-item transition-effect-item svelte-1mvnu54" draggable="true" title="Fade the outgoing clip into the incoming clip"><!> <span class="svelte-1mvnu54"><strong class="svelte-1mvnu54">Crossfade</strong><small class="svelte-1mvnu54">Fade both clips</small></span></button></div></div> <div class="effects-category svelte-1mvnu54"><div class="category-title svelte-1mvnu54">Scene Transitions</div> <div class="effects-list svelte-1mvnu54"></div></div> <div class="effects-category svelte-1mvnu54"><div class="category-title svelte-1mvnu54">Camera</div> <div class="effects-list svelte-1mvnu54"></div></div></div></div>',1),xT=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">Scenes</h3></div> <div class="panel-content svelte-1mvnu54"><p class="panel-description svelte-1mvnu54">Backgrounds, overlays, and full-canvas effects that define the visual context of your animation. Use scenes to create atmosphere, transitions, and environmental layers.</p> <div class="layer-list svelte-1mvnu54"></div></div>',1),wT=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">AI Config</h3></div> <!>',1),ST=W('<div class="panel-header svelte-1mvnu54"><h3 class="panel-heading-title svelte-1mvnu54">Settings</h3></div> <!>',1),kT=W('<button type="button" class="assistant-expand svelte-1mvnu54" title="Open Motionly Assistant" aria-label="Open Motionly Assistant"><!></button>'),BT=W('<span class="snap-guide snap-guide-v svelte-1mvnu54"></span>'),ET=W('<span class="snap-guide snap-guide-h svelte-1mvnu54"></span>'),UT=W('<video controls="" autoplay="" playsinline="" class="svelte-1mvnu54"></video>',2),TT=W('<img alt="Asset preview" class="svelte-1mvnu54"/>'),PT=W('<div class="asset-preview-overlay svelte-1mvnu54"><!> <button type="button" class="asset-preview-close svelte-1mvnu54" aria-label="Close asset preview"><!></button></div>'),ku=W('<div class="error-banner svelte-1mvnu54"> </div>'),AT=W('<div class="selection-summary transition-summary svelte-1mvnu54"><span class="layer-icon svelte-1mvnu54"><!></span> <span class="svelte-1mvnu54"><strong class="svelte-1mvnu54">Crossfade</strong><small class="svelte-1mvnu54"> </small></span></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Duration</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0.05" step="0.05"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="transition-pair-copy svelte-1mvnu54"><span class="svelte-1mvnu54"><small class="svelte-1mvnu54">Outgoing</small><strong class="svelte-1mvnu54"> </strong></span> <span class="transition-pair-arrow svelte-1mvnu54">→</span> <span class="svelte-1mvnu54"><small class="svelte-1mvnu54">Incoming</small><strong class="svelte-1mvnu54"> </strong></span></div> <button type="button" class="timeline-command transition-remove svelte-1mvnu54">Remove transition</button>',1),ml=W('<img alt="" class="svelte-1mvnu54"/>'),IT=W('<div class="property-align-toolbar svelte-1mvnu54"><span class="property-align-label svelte-1mvnu54">Align to canvas</span> <div class="property-align-actions svelte-1mvnu54" aria-label="Align selected layer to canvas"><button type="button" title="Align left" aria-label="Align left" class="svelte-1mvnu54"><!></button> <button type="button" title="Align horizontal center" aria-label="Align horizontal center" class="svelte-1mvnu54"><!></button> <button type="button" title="Align right" aria-label="Align right" class="svelte-1mvnu54"><!></button> <span class="align-divider svelte-1mvnu54"></span> <button type="button" title="Align top" aria-label="Align top" class="svelte-1mvnu54"><!></button> <button type="button" title="Align vertical center" aria-label="Align vertical center" class="svelte-1mvnu54"><!></button> <button type="button" title="Align bottom" aria-label="Align bottom" class="svelte-1mvnu54"><!></button></div></div>'),MT=W('<div class="property-group svelte-1mvnu54"><div class="property-label-row svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Width</div> <button type="button" class="property-action svelte-1mvnu54">Original size</button></div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="1" step="1"/> <span class="input-suffix svelte-1mvnu54">px</span></div></div>'),zT=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">SVG Fill Override</div> <input class="color-input svelte-1mvnu54" type="color"/></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">SVG Stroke Override</div> <input class="color-input svelte-1mvnu54" type="color"/></div>',1),CT=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Transform Origin</div> <div class="property-row svelte-1mvnu54"><div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" max="1" step="0.05"/> <span class="input-suffix svelte-1mvnu54">x</span></div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" max="1" step="0.05"/> <span class="input-suffix svelte-1mvnu54">y</span></div></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Skew</div> <div class="property-row svelte-1mvnu54"><div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" step="1"/> <span class="input-suffix svelte-1mvnu54">x°</span></div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" step="1"/> <span class="input-suffix svelte-1mvnu54">y°</span></div></div></div> <!>',1),$T=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Background</div> <input class="color-input svelte-1mvnu54" type="color"/></div>'),OT=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Text</div> <textarea class="text-input svelte-1mvnu54" rows="3"></textarea></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Font Size</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="1"/> <span class="input-suffix svelte-1mvnu54">px</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Color</div> <input class="color-input svelte-1mvnu54" type="color"/></div>',1),Bu=W("<option> </option>"),FT=W('<label class="toggle-row svelte-1mvnu54"><input type="checkbox" class="svelte-1mvnu54"/> <span>Invert alpha</span></label> <label class="toggle-row svelte-1mvnu54"><input type="checkbox" class="svelte-1mvnu54"/> <span>Show mask layer</span></label>',1),NT=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54"> </div> <div class="slider-control svelte-1mvnu54"><input class="custom-slider svelte-1mvnu54" type="range"/> <input class="slider-value-input svelte-1mvnu54" type="number"/></div></div>'),DT=W('<div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" max="100" step="0.1"/> <span class="input-suffix svelte-1mvnu54">%</span></div> <button type="button" class="icon-btn danger-btn svelte-1mvnu54" title="Delete selected keyframe"><!></button>',1),RT=W('<div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Keyframe easing (into this keyframe)</div> <select class="text-input svelte-1mvnu54"><option>Animation default</option><!></select></div>'),am=W('<button type="button"> </button>'),LT=W('<div class="selection-summary svelte-1mvnu54"><span class="layer-icon svelte-1mvnu54"><!></span> <span class="svelte-1mvnu54"><strong class="svelte-1mvnu54"> </strong><small class="svelte-1mvnu54"> </small></span></div> <!> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Position</div> <div class="property-row svelte-1mvnu54"><div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number"/> <span class="input-suffix svelte-1mvnu54">x</span></div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number"/> <span class="input-suffix svelte-1mvnu54">y</span></div></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Scale</div> <div class="slider-control svelte-1mvnu54"><input class="custom-slider svelte-1mvnu54" type="range" min="0" max="3" step="0.01"/> <input class="slider-value-input svelte-1mvnu54" type="number" min="0" step="0.01"/></div></div> <!> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Rotation</div> <div class="slider-control svelte-1mvnu54"><input class="custom-slider svelte-1mvnu54" type="range" min="-180" max="180" step="1"/> <input class="slider-value-input svelte-1mvnu54" type="number" min="-180" max="180"/></div></div> <!> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Opacity</div> <div class="slider-control svelte-1mvnu54"><input class="custom-slider svelte-1mvnu54" type="range" min="0" max="1" step="0.01"/> <input class="slider-value-input svelte-1mvnu54" type="number" min="0" max="100"/></div></div> <!> <!> <div class="section-title svelte-1mvnu54">Layer Mask</div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Use layer as alpha</div> <select class="text-input mask-select svelte-1mvnu54"><option>None</option><!></select></div> <!> <div class="section-title svelte-1mvnu54">Adjustments</div> <!> <div class="section-title svelte-1mvnu54">Keyframes</div> <div class="property-group keyframe-controls svelte-1mvnu54"><button type="button" class="timeline-command svelte-1mvnu54">◆ Add at playhead</button> <!></div> <!> <div class="section-title svelte-1mvnu54">Animation</div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Preset</div> <div class="preset-cards svelte-1mvnu54"><button type="button">None</button> <button type="button">Fade</button> <button type="button">Rise</button> <button type="button">Scale</button> <button type="button">Blur</button> <button type="button">Drift</button></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Duration</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0.1" step="0.1"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Delay</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" step="0.1"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Easing</div> <div class="easing-options svelte-1mvnu54"></div> <input class="text-input easing-input svelte-1mvnu54" type="text" placeholder="power3.out or cubic-bezier(...)" aria-label="Custom animation easing"/></div>',1),HT=W('<div class="selection-summary svelte-1mvnu54"><span class="layer-icon svelte-1mvnu54"><!></span> <span class="svelte-1mvnu54"><strong class="svelte-1mvnu54"> </strong><small class="svelte-1mvnu54">Timeline clip</small></span></div> <button type="button" class="timeline-command clip-original-size svelte-1mvnu54">Original size</button> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Scale</div> <div class="slider-control svelte-1mvnu54"><input class="custom-slider svelte-1mvnu54" type="range" min="0.05" max="3" step="0.01"/> <input class="slider-value-input svelte-1mvnu54" type="number" min="0.05" step="0.01"/></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Width</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="1" step="1"/> <span class="input-suffix svelte-1mvnu54">px</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Track</div> <select class="text-input svelte-1mvnu54"></select></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Start</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" step="0.01"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Duration</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0.05" step="0.05"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Trim In</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" step="0.01"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <div class="property-group svelte-1mvnu54"><div class="property-label svelte-1mvnu54">Trim Out</div> <div class="number-input-wrapper svelte-1mvnu54"><input class="number-input svelte-1mvnu54" type="number" min="0" step="0.01"/> <span class="input-suffix svelte-1mvnu54">s</span></div></div> <button type="button" class="timeline-command svelte-1mvnu54">Split at playhead</button>',1),VT=W('<p class="empty svelte-1mvnu54">No object selected.</p>'),jT=W('<span class="audio-chip svelte-1mvnu54"><!> </span> <button class="icon-btn svelte-1mvnu54" title="Remove audio"><!></button>',1),GT=W('<button class="timeline-command svelte-1mvnu54" title="Attach audio"><!> Audio</button>'),qT=W('<button class="icon-btn danger-btn svelte-1mvnu54" title="Delete selected layer (Delete)"><!></button>'),WT=W('<span class="ruler-tick svelte-1mvnu54"> </span>'),YT=W('<span class="drop-indicator svelte-1mvnu54"></span>'),KT=W('<span class="track-controls svelte-1mvnu54"><button type="button"><!></button></span>'),XT=W('<span class="track-time svelte-1mvnu54"> </span>'),om=W('<span class="keyframe-marker drag-keyframe svelte-1mvnu54" aria-hidden="true"></span>'),lm=W("<span></span> <!>",1),Eu=W('<span class="clip-media video-clip-media svelte-1mvnu54"><!></span>'),Uu=W('<span class="clip-media svelte-1mvnu54"></span>'),vl=W('<span class="clip-text svelte-1mvnu54"> </span>'),cm=W('<span class="clip-color svelte-1mvnu54"></span>'),um=W('<span><!> <button type="button" class="clip-select svelte-1mvnu54"></button> <button type="button" class="trim-handle trim-start svelte-1mvnu54"></button> <button type="button" class="trim-handle trim-end svelte-1mvnu54"></button></span>'),dm=W('<button type="button"></button>'),fm=W('<!> <button type="button" class="keyframe-add svelte-1mvnu54" title="Add keyframe at playhead" aria-label="Add keyframe at playhead">+</button>',1),JT=W('<div><div><span class="track-thumb svelte-1mvnu54"><!></span> <span class="track-copy svelte-1mvnu54"><strong class="svelte-1mvnu54"> </strong> <small class="svelte-1mvnu54"> </small></span> <!></div> <div class="track-lane svelte-1mvnu54"><!> <!> <!></div></div>'),hm=W('<button type="button"><!></button>'),ZT=W('<span class="track-controls svelte-1mvnu54"><!> <!></span>'),QT=cv('<svg preserveAspectRatio="none" class="svelte-1mvnu54"><path class="svelte-1mvnu54"></path></svg>'),tP=W('<span><span aria-hidden="true"><!></span> <span class="clip-text audio-clip-label svelte-1mvnu54"> </span> <button type="button" class="clip-select svelte-1mvnu54"></button></span>'),eP=W('<span class="clip-trim-label svelte-1mvnu54"> </span>'),iP=W('<span><!> <!> <button type="button" class="clip-select svelte-1mvnu54"></button> <button type="button" class="trim-handle trim-start svelte-1mvnu54"></button> <button type="button" class="trim-handle trim-end svelte-1mvnu54"></button> <button type="button" class="clip-delete svelte-1mvnu54" title="Delete clip"><!></button></span>'),sP=W('<div><div><span class="track-thumb svelte-1mvnu54"><!></span> <span class="track-copy svelte-1mvnu54"><strong class="svelte-1mvnu54"> </strong> <small class="svelte-1mvnu54"> </small></span> <!></div> <div class="track-lane svelte-1mvnu54"><!> <!> <!> <!> <!> <!></div></div>'),nP=W('<div class="code-overlay svelte-1mvnu54"><div class="code-panel svelte-1mvnu54"><div class="code-header svelte-1mvnu54"><h3 class="svelte-1mvnu54">.motion source</h3> <button class="close-btn svelte-1mvnu54"><!></button></div> <textarea placeholder=".motion source" spellcheck="false" class="code-textarea svelte-1mvnu54"></textarea> <!></div></div>'),rP=W('<div class="dialog-overlay svelte-1mvnu54" role="button" tabindex="-1"><div class="dialog svelte-1mvnu54" role="dialog" aria-labelledby="dialog-title" aria-modal="true" tabindex="0"><div class="dialog-header svelte-1mvnu54"><h3 id="dialog-title" class="svelte-1mvnu54">Load Preset</h3> <button type="button" class="dialog-close svelte-1mvnu54"><!></button></div> <div class="dialog-body svelte-1mvnu54"><p class="svelte-1mvnu54">Loading this preset will replace your current project and assets. Continue?</p></div> <div class="dialog-footer svelte-1mvnu54"><button type="button" class="dialog-btn secondary svelte-1mvnu54">Cancel</button> <button type="button" class="dialog-btn danger svelte-1mvnu54">Load Preset</button></div></div></div>'),aP=W('<div><div><nav class="nav-rail svelte-1mvnu54"><button type="button" title="Media / Assets"><!></button> <button type="button" title="Audio"><!></button> <button type="button" title="Text"><!></button> <button type="button" title="Effects"><!></button> <button type="button" title="Scenes"><!></button> <button type="button" title="AI Config"><!></button> <button type="button" title="Settings"><!></button></nav> <aside class="content-panel svelte-1mvnu54"><!></aside> <aside><!></aside> <main class="preview-container svelte-1mvnu54"><div class="stage-meta svelte-1mvnu54"><span> </span> <div class="stage-actions svelte-1mvnu54"><button type="button" class="meta-btn svelte-1mvnu54">Fit</button> <span> </span> <button type="button" class="icon-btn svelte-1mvnu54" title="Fullscreen preview"><!></button></div></div> <div class="stage svelte-1mvnu54"><div class="canvas-shell svelte-1mvnu54"><canvas></canvas> <!> <!></div> <!></div> <!></main> <aside class="properties-panel svelte-1mvnu54"><div class="panel-title svelte-1mvnu54">Properties</div> <!></aside></div> <section class="timeline-panel svelte-1mvnu54"><button type="button" class="timeline-resizer svelte-1mvnu54" aria-label="Resize timeline" title="Drag to resize timeline"><span class="svelte-1mvnu54"></span></button> <div class="timeline-toolbar svelte-1mvnu54"><div class="playback-controls svelte-1mvnu54"><button class="control-btn svelte-1mvnu54" title="Go to start (Home)"><!></button> <button class="control-btn play-btn svelte-1mvnu54"><!></button> <span class="timecode svelte-1mvnu54"> </span> <span class="framecode svelte-1mvnu54"> </span></div> <div class="timeline-context svelte-1mvnu54"><!> <span class="svelte-1mvnu54"> </span></div> <div class="timeline-actions svelte-1mvnu54"><input class="file-input svelte-1mvnu54" type="file" accept="audio/*"/> <!> <!> <button class="icon-btn svelte-1mvnu54" title="Undo (Ctrl/Cmd+Z)"><!></button> <button class="icon-btn svelte-1mvnu54" title="Redo (Ctrl/Cmd+Shift+Z)"><!></button> <button class="icon-btn svelte-1mvnu54" title="Split selected clip at playhead (S)"><!></button> <button><!></button> <button class="icon-btn svelte-1mvnu54" title="Timeline zoom out"><!></button> <span class="timeline-zoom-value"> </span> <button class="icon-btn svelte-1mvnu54" title="Timeline zoom in"><!></button></div></div> <div role="region" aria-label="Timeline tracks"><div class="ruler-row svelte-1mvnu54"><div class="track-label ruler-label svelte-1mvnu54">Layers</div> <div class="ruler svelte-1mvnu54"><!> <span class="playhead-marker svelte-1mvnu54"></span> <!> <input class="timeline-scrubber svelte-1mvnu54" type="range" min="0" aria-label="Timeline scrubber"/></div></div> <!> <!></div> <audio class="svelte-1mvnu54"></audio></section> <button class="source-toggle svelte-1mvnu54">.motion</button> <!></div> <!>',1);function oP(t,e){ir(e,!1);const i=q(),s=q(),n=q(),a=q(),o=q(),l=q(),c=q(),u=q(),d=q(),f=q(),p=q(),v=q(),g=q(),_=q(),x=q(),E=q(),I=q(),z=q(),$=q(),M=q(),V=q(),N=q(),H=q();let T=Ci(e,"code",12,""),j=Ci(e,"onSave",8,()=>{}),St=q(),yt=q(),ht=null,vt=q(null),F=q(null),C=q(null),Lt=q(null),xt=q(new Map),He=!0,ii="",de=0,re=q([]),xe=q([]),Ct=q(!1),nt=q(0),ai=0,kt=q(5),Ge=null,fe=q(null),Me=q({vertical:null,horizontal:null}),pt=q(null),jt=q(null),xi=q(!1),ft=q(""),qe=q(.42),Ss=q(!1),Ii=q(),as=q(),rt=q(),It="",Be=q(""),bt=q(0),_t=null,Pt=0,Ie="",we=0,Et=q(""),he=q(0),_i=q(!1),Fi=q(0),pn=q(1),di=q(230),gi=!1,Ni=!1,Ee=q(""),$e=q(""),yi=q(""),Se=q("media"),ks=q(!1),oi=q("assets"),Oe=q(!1),$s="",Ei=q(null),rr=0,Os=q(!1),os=q(null),Fs=q(!1),Ks=q(null),ji=q(null),Di=q(null),zt="",Yt=q(rU(T())),Ke=q(),wi=q(1),mn=q(!1),Si=q(null);const Gi=[{property:"blur",label:"Blur",min:0,max:40,step:.5,fallback:0},{property:"brightness",label:"Brightness",min:0,max:3,step:.01,fallback:1},{property:"contrast",label:"Contrast",min:0,max:3,step:.01,fallback:1},{property:"saturation",label:"Saturation",min:0,max:3,step:.01,fallback:1},{property:"hue",label:"Hue",min:-180,max:180,step:1,fallback:0},{property:"grayscale",label:"Grayscale",min:0,max:1,step:.01,fallback:0},{property:"sepia",label:"Sepia",min:0,max:1,step:.01,fallback:0},{property:"invert",label:"Invert",min:0,max:1,step:.01,fallback:0}],ls=[{name:"splitReveal",description:"Split character reveal",category:"text"},{name:"blurReveal",description:"Blur and fade reveal",category:"text"},{name:"fadeUp",description:"Fade up from bottom",category:"text"},{name:"slideIn",description:"Slide in from side",category:"text"},{name:"typewriter",description:"Typewriter effect",category:"text"},{name:"keynoteText",description:"Keynote-style text reveal",category:"text"},{name:"charReveal",description:"Character-by-character reveal",category:"text"},{name:"wordReveal",description:"Word-by-word reveal",category:"text"},{name:"heroLogo",description:"Hero logo entrance",category:"object"},{name:"softReveal",description:"Soft fade and scale reveal",category:"object"},{name:"springIn",description:"Spring entrance",category:"object"},{name:"float",description:"Floating motion",category:"object"},{name:"pulse",description:"Pulsing scale",category:"object"},{name:"drawSVG",description:"SVG path drawing",category:"object"},{name:"scaleReveal",description:"Scale up reveal",category:"object"},{name:"shapeWipe",description:"Directional wipe transition",category:"transition"},{name:"irisWipe",description:"Circular iris wipe",category:"transition"},{name:"maskReveal",description:"Masked reveal transition",category:"transition"},{name:"dynamicSlide",description:"Dynamic slide transition",category:"transition"},{name:"slowPush",description:"Slow camera push",category:"camera"},{name:"pan",description:"Camera pan",category:"camera"},{name:"speedZoom",description:"Speed zoom punch",category:"camera"}],ar=[{name:"Motionly",path:js("preset/motionly/motionly.motion"),gifPath:js("preset/motionly/motionly-preset.gif")}];ac(()=>{gi=AE(),r(St)&&(ht=new B_(r(St)),Xd());const h=new ResizeObserver(Or);r(yt)&&h.observe(r(yt)),requestAnimationFrame(Or);const m=w=>{const U=!!w.target?.closest('input, textarea, select, button, a, [contenteditable="true"], [role="button"], [role="slider"]'),O=lU(w,U);if(!O||r(Oe)||(w.preventDefault(),w.repeat&&!O.startsWith("nudge-")))return;const G=w.shiftKey?10:1;switch(O){case"save":j()();break;case"undo":$r();break;case"redo":xa();break;case"toggle-playback":r(Ct)?cs():Jd();break;case"delete-selection":rf();break;case"nudge-left":zo(-G,0);break;case"nudge-right":zo(G,0);break;case"nudge-up":zo(0,-G);break;case"nudge-down":zo(0,G);break;case"split":Tc();break;case"reset-playhead":Zd();break;case"clear-selection":r(Ei)?uf():r(ft)&&(S(ft,""),S(jt,null),S(ji,null),Xs(r(nt)));break}};return window.addEventListener("keydown",m),()=>{h.disconnect(),_u(r(xt)),Pt+=1,we+=1,It&&URL.revokeObjectURL(It),window.removeEventListener("keydown",m)}});function Bs(){r(Si)===null&&S(Si,r(Yt).present)}function Ns(){if(r(Si)===null)return;const h=r(Yt).present,m=r(Si);S(Si,null),S(Yt,wu({...r(Yt),present:m},h))}function $r(){const h=aU(r(Yt));h!==r(Yt)&&(cs(),S(Yt,h),T(h.present))}function xa(){const h=oU(r(Yt));h!==r(Yt)&&(cs(),S(Yt,h),T(h.present))}function Uo(h){$s=h,S(Oe,!0)}async function Kd(){if($s)try{const h=await fetch($s);if(!h.ok)throw new Error("Failed to load preset");T(await h.text()),S(Oe,!1),$s="",S(ft,""),S(nt,0),r(Ct)&&cs()}catch(h){console.error("Failed to load preset:",h),S(vt,h instanceof Error?h.message:"Failed to load preset"),S(Oe,!1)}}function To(){S(Oe,!1),$s=""}function $g(h){try{const m=yv(h,r(re)),w=Zh(m);return ip(w),r(Ct)&&cs(),S(ft,""),S(nt,0),T(m),null}catch(m){return m instanceof Error?m.message:"The generated project is not valid .motion source."}}function Xd(){try{if(S(vt,null),S(F,Zh(T())),S(C,ip(r(F))),r(rt)&&Ce(rt,r(rt).muted=r(C).tracks.find(m=>m.role==="audio")?.muted??!1),Ng(r(C).imports),S(kt,r(C).canvas.duration),S(nt,Math.min(r(nt),r(kt))),r(ft)&&!r(C).elements.some(m=>m.id===r(ft))&&!r(C).clips.some(m=>m.id===r(ft))&&S(ft,""),r(C).audio){const m=r(C).audio;(!It||m!==Ie)&&qg(m)}else!r(C).audio&&It&&xc();const h=r(C).imports.map(m=>`${m.name}:${m.path}`).join("|");h!==ii&&(ii=h,He=!1,Fg(r(C))),Xs(r(nt))}catch(h){S(vt,h instanceof Error?h.message:String(h)),console.error("Parse error:",h)}}async function Xs(h,m=!1){if(!ht||!r(C))return;const w=b_(r(C),h),B=Po();S(Lt,w);const U=++rr,O=()=>{!ht||U!==rr||(ht.render(w,r(xt),B),Og(B))};try{await S_(w,r(xt),{playing:m?!1:r(Ct),exact:m}),O()}catch(G){console.warn("Animated asset synchronization failed:",G)}}function Og(h=Po()){if(!r(St)||!r(Lt)||!r(ft))return;const m=r(Lt).elements.filter(it=>{const At=us(it);return it.id===r(ft)||At.textGroup===r(ft)}),w=m.filter(it=>Number(us(it).opacity??1)>.001),B=(w.length?w:m).map(Rr);if(!B.length)return;const U=Math.min(...B.map(it=>it.x)),O=Math.min(...B.map(it=>it.y)),G=Math.max(...B.map(it=>it.x+it.width)),D=Math.max(...B.map(it=>it.y+it.height)),R=r(St).getContext("2d");if(!R)return;const tt=r(i)?.kind==="overlay"||r(i)?.kind==="effect"?3/r(qe):0,ct=10/r(qe);if(R.save(),R.setTransform(h,0,0,h,0,0),R.strokeStyle="#7cf7c5",R.lineWidth=2/r(qe),R.setLineDash([8/r(qe),5/r(qe)]),R.strokeRect(U+tt,O+tt,G-U-tt*2,D-O-tt*2),r(i)?.kind==="asset"||r(i)?.kind==="text"||r(s)){R.setLineDash([]),R.fillStyle="#0d1513";const it=[[U,O],[G,O],[G,D],[U,D]];for(const[At,Ht]of it)R.fillRect(At-ct/2,Ht-ct/2,ct,ct),R.strokeRect(At-ct/2,Ht-ct/2,ct,ct)}R.restore()}async function Fg(h){const m=++de,w=r(xt),B=[];try{const U=await MS(h,document.baseURI,(G,D)=>{const R=D instanceof Error?D.message:String(D);B.push(`${G}: ${R}`)});if(m!==de){_u(U);return}for(const G of h.imports){const D=w.get(G.name);!U.has(G.name)&&D&&U.set(G.name,D)}for(const[G,D]of w)U.get(G)!==D&&_u(new Map([[G,D]]));S(xt,U);const O=h.imports.filter(G=>!U.has(G.name));S($e,[...B,...B.length||!O.length?[]:[`Could not load ${O.map(G=>G.name).join(", ")}.`],...IS(U)].join(" ")),He=!0,Xs(r(nt),!0)}catch(U){console.warn("Asset load failed:",U)}}function Ng(h){const m=new Map(r(re).map(w=>[w.name,w]));for(const w of h)w.path.startsWith("data:")&&m.set(w.name,w);S(re,[...m.values()])}function Dg(h,m){return[...new Map([...h,...m].map(w=>[w.name,w])).values()]}function Jd(){if(!r(C)||r(Ct))return;S(Ct,!0),ai=r(nt),af(r(nt));const h=r(C).canvas.fps;let m=r(nt),w=performance.now(),B=-1,U=0;async function O(G){if(!r(Ct))return;const D=!!(It&&r(rt)&&!r(rt).paused&&!r(rt).ended),R=_c(D?(r(C)?.audioStart??0)+r(rt).currentTime:_U(m,w,G,r(kt)));ai=R,D?(m=R,w=G):af(R);const tt=Math.round(R*h);if(tt!==B&&(B=tt,await Xs(R),!r(Ct))){nd(r(xt));return}if((G-U>=1e3/30||R>=r(kt))&&(S(nt,R),U=G),R>=r(kt)){cs();return}Ge=requestAnimationFrame(O)}Ge=requestAnimationFrame(O)}function cs(){const h=r(Ct);S(Ct,!1),h&&S(nt,ai),r(rt)?.pause(),nd(r(xt)),Ge&&(cancelAnimationFrame(Ge),Ge=null)}function Zd(){cs(),S(nt,0),Io(),Xs(r(nt),!0)}function _c(h){return vU(h,r(kt),r(C)?.canvas.fps??60)}function Rg(h){cs(),S(nt,_c(Number(h.currentTarget.value))),Io(),Xs(r(nt),!0)}function gc(h){cs(),S(nt,_c(h)),Io(),Xs(r(nt),!0)}function Lg(h){h.preventDefault();const m=h.clientY,w=r(di),B=O=>{S(di,Math.max(130,Math.min(window.innerHeight*.55,w+m-O.clientY))),Or()},U=()=>{window.removeEventListener("pointermove",B),window.removeEventListener("pointerup",U)};window.addEventListener("pointermove",B),window.addEventListener("pointerup",U)}function Hg(h){h.key!=="ArrowUp"&&h.key!=="ArrowDown"||(h.preventDefault(),S(di,Math.max(130,Math.min(window.innerHeight*.55,r(di)+(h.key==="ArrowUp"?24:-24)))),requestAnimationFrame(Or))}function Or(){if(!r(yt)||!r(C))return;const h=Po(),m=r(yt).getBoundingClientRect(),w=Math.min((m.width-72)/r(z),(m.height-72)/r($),1);S(qe,Math.max(.08,Number(w.toFixed(3)))),!r(Ct)&&Math.abs(h-Po())>.01&&requestAnimationFrame(()=>Xs(r(nt)))}function Po(){const h=typeof window>"u"?1:window.devicePixelRatio||1;return Math.min(1,Math.max(.08,r(qe)*Math.min(h,1.5)))}function Vg(){S(Ss,!r(Ss)),requestAnimationFrame(Or)}function Qd(){S(xi,!r(xi))}function tf(h){const m=Math.floor(h/60),w=Math.floor(h%60);return`${m}:${w.toString().padStart(2,"0")}`}function yc(h){return`${tf(h)}.${Math.floor(h%1*10)}`}function us(h){return"render"in h?h.render:h.properties}function bc(h){if(h.asset?.path)return h.asset.path.split("/").pop()??"Asset";if(h.kind==="text"){const m=qi(h,"value","Text");return m.length>24?`${m.slice(0,24)}...`:m}return h.kind==="overlay"?"Scene color":h.kind==="effect"?"Effect":"Layer"}function vn(h){if(!r(C))return{start:0,end:r(kt)};const m=new Set(r(C).elements.filter(R=>R.id===h||us(R).textGroup===h).map(R=>R.id)),w=[],B=[],U=r(C).elements.find(R=>R.id===h),O=U?us(U):{};if(typeof O.start=="number"&&typeof O.duration=="number"){const R=Math.max(0,O.start);return{start:R,end:Math.min(r(kt),R+Math.max(0,O.duration))}}U&&$t(U,"opacity",1)>0&&w.push(0);for(const R of r(C).animations.filter(tt=>m.has(tt.target))){if(R.keyframes.length){const it=R.keyframes.filter(Kt=>Number(Kt.properties.opacity??0)>0);it[0]&&w.push(R.delay+it[0].offset*R.duration);const At=it.at(-1),Ht=At&&R.keyframes.find(Kt=>Kt.offset>At.offset&&Number(Kt.properties.opacity??1)<=0);Ht&&B.push(R.delay+Ht.offset*R.duration);continue}const tt=Number(R.from.opacity??$t(U??null,"opacity",1)),ct=Number(R.to.opacity??tt);ct>0&&w.push(R.delay),tt>0&&ct<=0&&B.push(R.delay+R.duration)}const G=w.length?Math.min(...w):0,D=B.length?Math.max(G,...B):r(kt);return{start:Math.max(0,G),end:Math.min(r(kt),D)}}function si(h){return r(kt)>0?Math.max(0,Math.min(100,h/r(kt)*100)):0}async function jg(h){const m=h.currentTarget;await ef(m.files?.[0]),m.value=""}async function Gg(h){h.preventDefault(),S(Os,!1),await ef(h.dataTransfer?.files[0])}async function ef(h){if(!h||!r(F))return;if(S(yi,""),!h.type.startsWith("audio/")&&!/\.(aac|flac|m4a|mp3|ogg|opus|wav)$/i.test(h.name)){S(yi,`${h.name} is not a supported audio file.`);return}if(h.size>50*1024*1024){S(yi,"Audio files must be 50 MB or smaller.");return}const m=++Pt,w=await pf(h);if(m!==Pt)return;It.startsWith("blob:")&&URL.revokeObjectURL(It),It=w,Ie=w,S(Be,h.name),S(bt,0),Ce(rt,r(rt).src=It),Ce(rt,r(rt).muted=r(g)?.muted??!1),r(rt).load(),sf(h),Ce(F,r(F).body=r(F).body.filter(U=>U.type!=="Audio"));const B=r(F).body.findIndex(U=>U.type==="Import"||U.type==="Track"||U.type==="Element");r(F).body.splice(B<0?r(F).body.length:B,0,{type:"Audio",path:w,properties:{}}),T(Te(r(F)))}async function qg(h){const m=++Pt;try{const w=await fetch(h);if(!w.ok)throw new Error("Failed to load audio");const B=await w.blob();if(m!==Pt)return;It.startsWith("blob:")&&URL.revokeObjectURL(It),It=URL.createObjectURL(B),Ie=h,S(Be,h.startsWith("data:audio/")?"Embedded audio":h.substring(h.lastIndexOf("/")+1)),S(bt,0),r(rt)&&(Ce(rt,r(rt).src=It),r(rt).load()),sf(B)}catch(w){m===Pt&&console.error("Failed to load audio:",w)}}async function sf(h){const m=++we;S(Et,""),S(he,0),S(_i,!0);let w=null;try{const B=await h.arrayBuffer();if(m!==we)return;w=new AudioContext;const U=await w.decodeAudioData(B);if(m!==we)return;S(bt,U.duration);const O=Array.from({length:U.numberOfChannels},(D,R)=>U.getChannelData(R)),G=await uU(O,cU(U.duration),()=>m!==we);if(m!==we)return;S(Et,dU(G)),S(he,G.length)}catch(B){m===we&&console.warn("Could not generate audio waveform:",B)}finally{w&&await w.close().catch(()=>{}),m===we&&S(_i,!1)}}function Wg(){we+=1,S(Et,""),S(he,0),S(_i,!1)}function xc(){cs(),Pt+=1,Wg(),It.startsWith("blob:")&&URL.revokeObjectURL(It),It="",Ie="",S(Be,""),S(bt,0),_t=null,r(rt)&&r(rt).removeAttribute("src"),r(F)&&(Ce(F,r(F).body=r(F).body.filter(h=>h.type!=="Audio")),T(Te(r(F))))}async function nf(h="motionly.mp4",m){if(!(!r(C)||Ni)){if(!gi){S(Ee,"MP4 export is not supported by this browser.");return}if(!He){S(Ee,"Assets are still loading. Try export again in a moment.");return}cs(),Ni=!0,S(Ee,"");try{const w=await IE({scene:r(C),assets:r(xt),format:"mp4",height:r(C).canvas.height,fps:r(C).canvas.fps,audioUrl:It||void 0,onProgress:O=>{m?.(O)}}),B=URL.createObjectURL(w),U=document.createElement("a");U.href=B,U.download=h,U.click(),URL.revokeObjectURL(B)}catch(w){S(Ee,w instanceof Error?w.message:String(w))}finally{Ni=!1}}}function rf(){if(!r(F)||!r(ft))return;const h=r(ft);if(r(s)){mf(h);return}Ce(F,r(F).body=r(F).body.filter(m=>!(m.type==="Element"&&m.name===h)&&!(m.type==="Animation"&&m.target===h))),S(ft,""),T(Te(r(F)))}function Ao(h,m,w){h.preventDefault(),h.stopPropagation();const B=h.currentTarget.closest(".track-lane");if(!B)return;Bs();const U=B.getBoundingClientRect(),O=D=>{const R=(D.clientX-U.left)/U.width*r(kt);Yg(m,w,Sa(R,U.width,m))},G=()=>{Ns(),window.removeEventListener("pointermove",O),window.removeEventListener("pointerup",G)};window.addEventListener("pointermove",O),window.addEventListener("pointerup",G)}function Yg(h,m,w){if(!r(F))return;const B=vn(h),U=r(F).body.find(R=>R.type==="Element"&&R.name===h);if(!U)return;const O=1/(r(C)?.canvas.fps??60),G=m==="start"?Math.min(w,B.end-O):B.start,D=m==="end"?Math.max(w,B.start+O):B.end;U.properties=Zl(U.properties,G,D,O),T(Te(r(F)))}function Io(h=r(nt)){!It||!r(rt)||Ce(rt,r(rt).currentTime=Math.min(Math.max(0,h-(r(C)?.audioStart??0)),r(bt)||h))}function af(h){if(!It||!r(rt)||!r(C))return;const m=h-r(C).audioStart;if(!(m<0||m>=(r(bt)||Number.POSITIVE_INFINITY))&&(Io(h),r(rt).paused&&!_t)){const w=r(rt).play().catch(B=>{console.warn("Audio playback failed (this is normal if no user interaction yet):",B.message)});_t=w,w.finally(()=>{_t===w&&(_t=null)})}}function $t(h,m,w){if(!h)return w;const B=us(h)[m];return typeof B=="number"?B:w}function qi(h,m,w){if(!h)return w;const B=us(h)[m];return typeof B=="string"?B:w}function Fe(h,m){if(!r(F))return;const w=r(i)?.id??r(s)?.assetName;if(!w)return;const B=wc(w);B&&(B.properties={...B.properties,[h]:m},T(Te(r(F))))}function wc(h){if(!r(F))return null;const m=r(F).body.find(B=>B.type==="Element"&&B.name===h);if(m)return m;if(!r(F).body.some(B=>B.type==="Import"&&B.name===h))return null;const w={type:"Element",kind:"asset",name:h,properties:{center:!0}};return r(F).body.push(w),w}function of(){if(!r(F))return;const h=r(i)?.kind==="asset"?r(i).id:r(s)?.assetName;if(!h)return;const m=wc(h);if(!m)return;const w={...m.properties};delete w.width,delete w.height,m.properties=w,T(Te(r(F)))}function Mo(h,m){if(!r(F))return;const w=r(F).body.find(B=>B.type==="Element"&&B.name===h);w&&(w.properties={...w.properties,...m},T(Te(r(F))))}function zo(h,m){r(i)&&Mo(r(i).id,{x:$t(r(i),"x",0)+h,y:$t(r(i),"y",0)+m})}function Kg(h){if(!r(C)||!r(St))return;const m=cf(h),w=r(i)??r(Lt)?.elements.find(D=>D.id===r(s)?.id);if(w&&(w.kind==="asset"||w.kind==="text")){const D=xy();if(D){const R=[[D.x,D.y],[D.x+D.width,D.y],[D.x+D.width,D.y+D.height],[D.x,D.y+D.height]],tt=16/r(qe);if(R.some(([ct,it])=>Math.hypot(m.x-ct,m.y-it)<=tt)){const ct=D.x+D.width/2,it=D.y+D.height/2;S(fe,{mode:"resize",id:r(i)?.id??r(s)?.assetName??w.id,centerX:ct,centerY:it,startDistance:Math.max(1,Math.hypot(m.x-ct,m.y-it)),startScale:$t(w,"scale",1)}),r(St).setPointerCapture(h.pointerId);return}}}const B=Jg(m.x,m.y);if(!B){S(ft,""),Xs(r(nt));return}cs();const U=qi(B,"textGroup",B.id);_n(U,!1);const O=r(C).elements.find(D=>D.id===U);if(!O)return;const G=wf(O);S(fe,{mode:"move",id:U,offsetX:m.x-G.x,offsetY:m.y-G.y,startX:$t(O,"x",0),startY:$t(O,"y",0)}),r(St).setPointerCapture(h.pointerId)}function Xg(h){if(!r(fe)||!r(C))return;const m=cf(h),w=r(C).elements.find(At=>At.id===r(fe)?.id);if(!w)return;if(r(fe).mode==="resize"){const At=Math.hypot(m.x-r(fe).centerX,m.y-r(fe).centerY);Mo(w.id,{scale:Number(Math.max(.05,r(fe).startScale*At/r(fe).startDistance).toFixed(3))});return}const B=Sf(w);let U=m.x-r(fe).offsetX-(B?r(C).canvas.width/2:0),O=m.y-r(fe).offsetY-(B?r(C).canvas.height/2:0);if(h.shiftKey){const At=U-r(fe).startX,Ht=O-r(fe).startY;Math.abs(At)>=Math.abs(Ht)?O=r(fe).startY:U=r(fe).startX}const G=$t(w,"x",0),D=$t(w,"y",0),R=Rr(w),tt={...R,x:R.x+U-G,y:R.y+O-D},ct=r(C).elements.filter(At=>At.id!==w.id&&!At.id.includes("__")).filter(At=>At.kind==="asset"||At.kind==="text").map(Rr),it=h.altKey?{rect:tt,guides:{vertical:null,horizontal:null}}:GE(tt,ct,r(C).canvas,6/Math.max(r(qe),.01));S(Me,it.guides),U+=it.rect.x-tt.x,O+=it.rect.y-tt.y,Mo(w.id,{x:Math.round(U),y:Math.round(O)})}function lf(h){S(fe,null),S(Me,{vertical:null,horizontal:null}),r(St).hasPointerCapture(h.pointerId)&&r(St).releasePointerCapture(h.pointerId)}function Fr(h){if(!r(C)||!r(i))return;const m=Rr(r(i)),w=qE(m,r(C).canvas,h);Mo(r(i).id,{x:Math.round($t(r(i),"x",0)+w.x-m.x),y:Math.round($t(r(i),"y",0)+w.y-m.y)})}function cf(h){const m=r(St).getBoundingClientRect();return{x:(h.clientX-m.left)/m.width*r(z),y:(h.clientY-m.top)/m.height*r($)}}function Jg(h,m){if(!r(Lt))return null;const w=E_(r(Lt).elements);return r(Lt).elements.filter(U=>!w.has(U.id)).filter(U=>U.kind==="text"||U.kind==="asset").filter(U=>$t(U,"opacity",1)>0).reverse().find(U=>{const O=Rr(U);return h>=O.x&&h<=O.x+O.width&&m>=O.y&&m<=O.y+O.height})??null}function _n(h,m=!0){h!==r(ft)&&S(jt,null),S(ji,null),S(ft,h),m?gc(ay(h)):Xs(r(nt))}function Zg(h){const m=r(xt).get(h.name);m&&S(Ei,{src:Js(m,h.path),width:m.width,height:m.height,type:Pr(m)?"video":"image"})}function Js(h,m=""){if(!h)return m;if(h.motionlyType==="lottie")try{return h.toDataURL("image/png")}catch{return m}return h.motionlySource}function uf(){S(Ei,null)}function Qg(h,m){const w=r(xt).get(m.name);if(!w||m.type==="video"&&!w.motionlyDuration){h.preventDefault(),S($e,`${m.name} is still loading. Try again in a moment.`);return}S(os,m),h.dataTransfer&&(h.dataTransfer.effectAllowed="copy",h.dataTransfer.setData("text/plain",m.name))}function ty(){S(os,null),S(Di,null),zt=""}function df(h){S(Fs,!0),h.dataTransfer&&(h.dataTransfer.effectAllowed="move",h.dataTransfer.setData("text/plain",r(Be)))}function Sc(){S(Fs,!1),S(Di,null),zt=""}async function ey(h){await hf(h.currentTarget.files),Ce(as,r(as).value="")}async function iy(h){h.preventDefault(),S(Os,!1),await hf(h.dataTransfer?.files)}function Co(h){h.dataTransfer?.types.includes("Files")&&S(Os,!0)}function ff(h){h.currentTarget.contains(h.relatedTarget)||S(Os,!1)}async function hf(h){if(!r(F))return;const m=r(F);S($e,"");const w=Array.from(h??[]);if(w.length){for(const B of w){const U=B.name.toLowerCase(),O=B.type.startsWith("image/")||U.endsWith(".svg"),G=B.type.startsWith("video/")||/\.(mp4|webm|mov|m4v)$/.test(U),D=B.type==="application/zip+dotlottie"||U.endsWith(".lottie");if(!O&&!G&&!D){S($e,`${B.name} is not a supported image, SVG, GIF, video, or Lottie file.`);continue}const R=G?1e8:D?5e7:1e7;if(B.size>R){S($e,`${B.name} is larger than ${G?"100":D?"50":"10"} MB.`);continue}let tt="";try{tt=Ix(await pf(B),B.name)}catch(Ot){S($e,Ot instanceof Error?Ot.message:`Could not read ${B.name}.`);continue}const ct=m.body.filter(Ot=>Ot.type==="Import"&&aa(Ot.path)===B.name);if(ct.length){const Ot=ct.map(ut=>r(xt).get(ut.name)).find(ut=>!!ut);let Xt;try{Xt=D?{width:0,height:0,size:B.size}:await sy(B,G)}catch(ut){S($e,ut instanceof Error?ut.message:`Could not inspect ${B.name}.`);continue}if(Ot&&Xt.width>0&&Xt.height>0&&Mx({width:Ot.width,height:Ot.height,size:Ot.motionlySize},Xt)&&!window.confirm(`${B.name} has very different size or dimensions from the current asset. Replace it anyway?`)){S($e,`Kept the current ${B.name}.`);continue}for(const ut of ct)ut.path=tt;S($e,`Matched ${B.name} to its existing import by filename.`);continue}const it=new Set(m.body.flatMap(Ot=>Ot.type==="Import"?[Ot.name]:Ot.type==="Element"?[Ot.name]:[])),At=B.name.replace(/\.[^.]+$/,"").replace(/[^a-zA-Z0-9_]/g,"_").replace(/^[^a-zA-Z_]/,"asset_")||"asset";let Ht=At,Kt=2;for(;it.has(Ht);)Ht=`${At}_${Kt++}`;m.body.push({type:"Import",path:tt,name:Ht})}T(Te(m))}}async function sy(h,m){const w=URL.createObjectURL(h);try{if(m){const U=document.createElement("video");return U.preload="metadata",U.src=w,await new Promise((O,G)=>{U.onloadedmetadata=()=>O(),U.onerror=()=>G(U.error??new Error(`Could not inspect ${h.name}.`))}),{width:U.videoWidth,height:U.videoHeight,size:h.size}}const B=new Image;return B.src=w,await B.decode(),{width:B.naturalWidth,height:B.naturalHeight,size:h.size}}finally{URL.revokeObjectURL(w)}}function pf(h){return new Promise((m,w)=>{const B=new FileReader;B.onload=()=>m(String(B.result)),B.onerror=()=>w(B.error??new Error(`Could not read ${h.name}.`)),B.readAsDataURL(h)})}function ny(h){if(!r(os)&&!r(Fs))return;h.preventDefault(),h.dataTransfer&&(h.dataTransfer.dropEffect=r(Fs)?"move":"copy");const w=h.currentTarget.querySelector(".ruler")?.getBoundingClientRect();if(!w)return;S(Di,gy(h.clientX,w));const B=h.target.closest("[data-track]")?.dataset.track;r(Fs)?zt=r(g)?.id??"legacy-audio":zt=B&&!Number.isNaN(Number(B))?Number(B):B||1}function ry(h){if(h.preventDefault(),!r(F)||r(Di)===null)return;if(r(Fs)){const ct=r(F).body.find(it=>it.type==="Audio");ct&&(ct.properties={...ct.properties,start:`${r(Di).toFixed(3)}s`},T(Te(r(F)))),Sc();return}if(!r(os))return;const m=r(os).name;wc(m);const w=1/(r(C)?.canvas.fps??60),B=r(xt).get(m),U=KE(r(Di),B?.motionlyDuration??0,r(kt),5,w),{start:O,duration:G}=U;if(U.timelineDuration>r(kt)){const ct=r(F).body.find(it=>it.type==="Canvas");ct&&(ct.properties={...ct.properties,duration:`${U.timelineDuration.toFixed(3)}s`})}const D=String(zt||r(v)),R=wa(D),tt={type:"Clip",assetName:m,properties:{track:R.id,start:`${O.toFixed(3)}s`,duration:`${G.toFixed(3)}s`,trimIn:"0s",trimOut:"0s"}};if(r(F).body.push(tt),r(C)){const ct=`clip_${m}_${r(C).clips.length}`,it={id:ct,assetName:m,asset:r(os),track:R.id,start:O,duration:G,trimIn:0,trimOut:0,transitionInDuration:0,transitionOutDuration:0,sourceOrder:r(C).clips.length},At=Su([...r(C).clips,it],ct,R,O,U.timelineDuration);if(At){Nr(At,!1);const Ht=At.find(Kt=>Kt.id===ct);Ht&&(tt.properties={...tt.properties,track:Ht.track,start:`${Ht.start.toFixed(3)}s`})}}T(Te(r(F))),S(os,null),S(Di,null),zt=""}function Nr(h,m=!0){if(!(!r(F)||!r(C))){for(const w of r(C).clips){const B=h.find(O=>O.id===w.id);if(!B)continue;const U=Zs(r(C).clips.findIndex(O=>O.id===w.id));U&&(U.properties={...U.properties,track:B.track,start:`${B.start.toFixed(3)}s`,duration:`${B.duration.toFixed(3)}s`,trimIn:`${B.trimIn.toFixed(3)}s`,trimOut:`${B.trimOut.toFixed(3)}s`})}m&&T(Te(r(F)))}}function mf(h){if(!r(F)||!r(C))return;const m=Zs(r(C).clips.findIndex(B=>B.id===h));if(!m)return;$o(h);const w=fU(r(C).clips,h);Nr(w,!1),r(F).body.splice(r(F).body.indexOf(m),1),r(ft)===h&&S(ft,""),T(Te(r(F)))}function ay(h){return r(C)?.clips.find(m=>m.id===h)?.start??vn(h).start}function Zs(h){return!r(F)||h<0?null:r(F).body.filter(m=>m.type==="Clip")[h]??null}function $o(h){if(!r(C))return;const m=r(_).filter(B=>B.type!==null&&(B.outgoing.id===h||B.incoming.id===h)),w=tm();for(const B of m){const U=Zs(r(C).clips.findIndex(R=>R.id===B.outgoing.id)),O=Zs(r(C).clips.findIndex(R=>R.id===B.incoming.id));if(!U||!O)continue;const G={...U.properties},D={...O.properties};for(const R of w.outgoing)delete G[R];for(const R of w.incoming)delete D[R];U.properties=G,O.properties=D}m.length>0&&S(ji,null)}function vf(h){if(!r(F))return null;const m=r(F).body.find(U=>U.type==="Track"&&U.name===h.id);if(m)return m;const w={type:"Track",name:h.id,properties:{label:h.label,role:h.role,content:h.content,hidden:h.hidden,muted:h.muted,order:h.order}},B=r(F).body.findIndex(U=>U.type==="Element"||U.type==="Clip"||U.type==="Animation");return r(F).body.splice(B<0?r(F).body.length:B,0,w),w}function wa(h){const m=r(C)?.tracks.find(U=>U.id===h);if(m?.declared)return m;const w=r(u).findIndex(U=>U.trackId===h),B={id:h,label:m?.label??`Layer ${h.replace(/^legacy-/,"")}`,role:m?.role??"overlay",content:m?.content??"mixed",hidden:m?.hidden??!1,muted:m?.muted??!1,order:w<0?m?.order??Math.max(0,...r(C)?.tracks.map(U=>U.order)??[])+1:9e3+w,declared:!0};return vf(B),B}function oy(){if(r(F))for(const h of r(u)){const m=wa(h.trackId);for(const w of h.items){const B=r(F).body.find(U=>U.type==="Element"&&U.name===w.element.id);B&&(B.properties={...B.properties,track:m.id})}}}function kc(h,m){const w=vf(h);!w||!r(F)||(w.properties={...w.properties,...m},h.id===r(g)?.id&&m.muted!==void 0&&r(rt)&&Ce(rt,r(rt).muted=m.muted),T(Te(r(F))))}function _f(h,m){if(!r(F)||!r(C))return;const w=Zs(r(C).clips.findIndex(B=>B.id===h));w&&(["track","start","duration"].some(B=>B in m)&&$o(h),w.properties={...w.properties,...m},T(Te(r(F))))}function gf(h,m){if(!r(C)||!r(s))return;const w=wa(h),B=Su(r(C).clips,r(s).id,w,m,r(kt));B&&Nr(B)}function ly(h){if(!r(C)||!r(s))return;const m=r(s).start+Math.max(1/r(C).canvas.fps,h),w=em(r(C).clips,r(s).id,"end",m,1/r(C).canvas.fps);Nr(w)}function cy(h){S(Ks,"crossfade"),h.dataTransfer&&(h.dataTransfer.effectAllowed="copy",h.dataTransfer.setData("application/x-motionly-transition","crossfade"),h.dataTransfer.setData("text/plain","Crossfade"))}function uy(){S(Ks,null)}function Bc(h,m=h.duration||.5){if(!r(F)||!r(C))return;const w=eU(h.outgoing,h.incoming,m,1/r(C).canvas.fps);if(!w)return;const B=Zs(r(C).clips.findIndex(O=>O.id===h.outgoing.id)),U=Zs(r(C).clips.findIndex(O=>O.id===h.incoming.id));!B||!U||(B.properties={...B.properties,transitionOut:w.outgoing.transitionOut,transitionOutDuration:`${w.duration.toFixed(3)}s`},U.properties={...U.properties,transitionIn:w.incoming.transitionIn,transitionInDuration:`${w.duration.toFixed(3)}s`},S(ft,""),S(ji,{outgoingId:h.outgoing.id,incomingId:h.incoming.id}),T(Te(r(F))))}function dy(h,m){h.preventDefault(),h.stopPropagation(),r(Ks)&&(Bc(m),S(Ks,null))}function fy(h){if(!h.type){Bc(h);return}S(ft,""),S(ji,{outgoingId:h.outgoing.id,incomingId:h.incoming.id}),gc(h.at)}function hy(){if(!r(F)||!r(C)||!r(x))return;const h=Zs(r(C).clips.findIndex(O=>O.id===r(x).outgoing.id)),m=Zs(r(C).clips.findIndex(O=>O.id===r(x).incoming.id));if(!h||!m)return;const w=tm(),B={...h.properties},U={...m.properties};for(const O of w.outgoing)delete B[O];for(const O of w.incoming)delete U[O];h.properties=B,m.properties=U,S(ji,null),T(Te(r(F)))}function Ec(h){return document.querySelector(`.track-lane[data-track="${CSS.escape(h)}"]`)?.getBoundingClientRect()??null}function py(h,m){return document.elementFromPoint(h,m)?.closest(".track-lane[data-track]")?.dataset.track??null}function Dr(h){if(!r(pt)||!r(C))return;(Math.abs(h.clientX-r(pt).startClientX)>3||Math.abs(h.clientY-r(pt).startClientY)>3)&&Ce(pt,r(pt).moved=!0);const m=r(pt).kind==="audio"?r(pt).originTrackId:py(h.clientX,h.clientY)??r(pt).originTrackId,w=Ec(m);if(!w)return;const B=(h.clientX-w.left)/w.width*r(kt),U=Math.min(r(kt),Math.max(0,Sa(B-r(pt).grabOffset,w.width,r(pt).id)));S(pt,{...r(pt),ghostStart:U,ghostTrackId:m,valid:!0})}function my(h,m){if(h.button!==0||!r(C))return;h.preventDefault(),h.stopPropagation(),_n(m.id,!1);const w=Ec(String(m.track));if(!w)return;const B=(h.clientX-w.left)/w.width*r(kt);S(pt,{id:m.id,kind:"clip",duration:m.duration,grabOffset:B-m.start,originTrackId:String(m.track),startClientX:h.clientX,startClientY:h.clientY,ghostStart:m.start,ghostTrackId:String(m.track),valid:!0,moved:!1});try{h.currentTarget.setPointerCapture(h.pointerId)}catch{}const U=G=>Dr(G),O=G=>{Dr(G),window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",O),window.removeEventListener("pointercancel",O),Uc()};window.addEventListener("pointermove",U),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)}function Uc(){const h=r(pt);if(S(pt,null),!(!h||!r(C)||!h.moved||!h.valid)){if(h.kind==="audio"){const m=r(F)?.body.find(w=>w.type==="Audio");if(!m||!r(F))return;m.properties={...m.properties,start:`${h.ghostStart.toFixed(3)}s`},T(Te(r(F)));return}if(oy(),h.kind==="clip"){const m=wa(h.ghostTrackId);Bs(),$o(h.id);const w=Su(r(C).clips,h.id,m,h.ghostStart,r(kt));w&&Nr(w),Ns();return}vy(h.id,h.ghostStart,h.ghostStart+h.duration,h.ghostTrackId)}}function vy(h,m,w,B){if(!r(F)||!r(C))return;const U=r(F).body.find(D=>D.type==="Element"&&D.name===h);if(!U)return;const O=wa(B);Bs();const G=vn(h).start;r(i)?.id===h&&Fo(),iU(r(F),h,m,w,G,1/r(C).canvas.fps),U.properties={...U.properties,track:O.id},T(Te(r(F))),Ns()}function yf(h,m){if(h.button!==0||!r(F)||!r(C))return;h.preventDefault(),h.stopPropagation(),_n(m.id,!1);const w=r(F).body.find(it=>it.type==="Element"&&it.name===m.id);if(!w)return;const B=vn(m.id),U=B.end-B.start,O=h.currentTarget.closest(".track-lane[data-track]"),G=O?.dataset.track??String(w.properties.track??r(C).tracks.find(it=>it.role==="overlay")?.id??r(v)),D=O?.getBoundingClientRect()??Ec(G);if(!D)return;const R=(h.clientX-D.left)/D.width*r(kt);S(pt,{id:m.id,kind:"element",duration:U,grabOffset:R-B.start,originTrackId:G,startClientX:h.clientX,startClientY:h.clientY,ghostStart:B.start,ghostTrackId:G,valid:!0,moved:!1});try{h.currentTarget.setPointerCapture(h.pointerId)}catch{}const tt=it=>Dr(it),ct=it=>{Dr(it),window.removeEventListener("pointermove",tt),window.removeEventListener("pointerup",ct),window.removeEventListener("pointercancel",ct),Uc()};window.addEventListener("pointermove",tt),window.addEventListener("pointerup",ct),window.addEventListener("pointercancel",ct)}function _y(h){if(h.button!==0||!r(C)||!r(g))return;h.preventDefault(),h.stopPropagation();const w=h.currentTarget.closest(".track-lane[data-track]")?.getBoundingClientRect();if(!w)return;const B=(h.clientX-w.left)/w.width*r(kt);S(pt,{id:"__audio__",kind:"audio",duration:r(bt)||r(kt),grabOffset:B-r(C).audioStart,originTrackId:r(g).id,startClientX:h.clientX,startClientY:h.clientY,ghostStart:r(C).audioStart,ghostTrackId:r(g).id,valid:!0,moved:!1});const U=G=>Dr(G),O=G=>{Dr(G),window.removeEventListener("pointermove",U),window.removeEventListener("pointerup",O),window.removeEventListener("pointercancel",O),Uc()};window.addEventListener("pointermove",U),window.addEventListener("pointerup",O),window.addEventListener("pointercancel",O)}function bf(h,m,w){if(h.button!==0)return;h.preventDefault(),h.stopPropagation(),_n(m.id,!1);const B=h.currentTarget.closest(".track-lane");if(!B)return;Bs();const U=B.getBoundingClientRect(),O=1/(r(C)?.canvas.fps??60),G=R=>{const tt=(R.clientX-U.left)/U.width*r(kt),ct=Sa(tt,U.width,m.id);if(!r(C))return;const it=em(r(C).clips,m.id,w,ct,O);Nr(it)},D=()=>{Ns(),window.removeEventListener("pointermove",G),window.removeEventListener("pointerup",D)};window.addEventListener("pointermove",G),window.addEventListener("pointerup",D)}function Tc(){if(!r(F)||!r(C))return;if(r(s)){const O=r(C).clips.findIndex(Ht=>Ht.id===r(s).id),G=Zs(O),D=QE(r(s),r(nt),1/r(C).canvas.fps);if(!G||!D)return;$o(r(s).id);const[R,tt]=D,ct={...G.properties},it=Ht=>({start:`${Ht.start.toFixed(3)}s`,duration:`${Ht.duration.toFixed(3)}s`,trimIn:`${Ht.trimIn.toFixed(3)}s`,trimOut:`${Ht.trimOut.toFixed(3)}s`});G.properties={...ct,...it(R)};const At={type:"Clip",assetName:G.assetName,properties:{...ct,...it(tt)}};r(F).body.splice(r(F).body.indexOf(G)+1,0,At),T(Te(r(F)));return}if(!r(i))return;const h=vn(r(i).id);let m=`${r(i).id}_split`,w=2;const B=new Set(r(F).body.filter(O=>O.type==="Element").map(O=>O.name));for(;B.has(m);)m=`${r(i).id}_split_${w++}`;const U=sU(r(F),r(i).id,r(nt),h,m,1/r(C).canvas.fps);U&&(S(F,U.program),S(ft,U.rightId),T(Te(r(F))))}function gy(h,m){const w=(h-m.left)/m.width*r(kt);return Sa(w,m.width)}function Sa(h,m,w=""){const B=Math.max(0,Math.min(r(kt),h)),U=r(C)?.canvas.fps??60,O=Math.round(B*U)/U;if(!r(mn))return O;const G=[0,r(kt),r(nt)];for(const R of r(C)?.clips??[])R.id!==w&&G.push(R.start,R.start+R.duration);for(const R of r(u))for(const tt of R.items)G.push(tt.range.start,tt.range.end);const D=G.reduce((R,tt)=>Math.abs(tt-B)<Math.abs(R-B)?tt:R,0);return Math.abs(D-B)<=r(kt)*8/Math.max(1,m)?D:O}function Pc(h,m){const w=r(Ke)?.scrollWidth??r(N),B=r(Ke)?.clientWidth??w,U=m??B/2,O=r(Ke)?.scrollLeft??0;S(wi,mU(h)),requestAnimationFrame(()=>{r(Ke)&&Ce(Ke,r(Ke).scrollLeft=gU(O,U,w,r(Ke).scrollWidth,B))})}function yy(h){if(!h.ctrlKey&&!h.metaKey)return;h.preventDefault();const m=r(Ke).getBoundingClientRect();Pc(r(wi)*Math.exp(-h.deltaY*.002),h.clientX-m.left)}function xf(h,m){if(h?.role==="audio")return 1e6;if(h)return h.order;const w=r(u).findIndex(B=>B.trackId===m);return w<0?9e3:9e3+w}function by(h){return h.kind==="text"?"Text":h.kind==="asset"?"Images & video":h.kind==="overlay"?"Scenes":"Effects"}function wf(h){const m=Sf(h);return{x:(m?r(z)/2:0)+$t(h,"x",0),y:(m?r($)/2:0)+$t(h,"y",0)}}function Rr(h){if(h.kind==="overlay"||h.kind==="effect")return{x:0,y:0,width:r(z),height:r($)};const m=wf(h),w=$t(h,"scale",1),B=Ac(h)*w,U=wy(h)*w;return{x:m.x-B/2,y:m.y-U/2,width:B,height:U}}function xy(){if(!r(Lt)||!r(ft))return null;const h=r(Lt).elements.filter(D=>D.id===r(ft)||us(D).textGroup===r(ft));if(!h.length)return null;const m=h.filter(D=>Number(us(D).opacity??1)>.001),w=(m.length?m:h).map(Rr),B=Math.min(...w.map(D=>D.x)),U=Math.min(...w.map(D=>D.y)),O=Math.max(...w.map(D=>D.x+D.width)),G=Math.max(...w.map(D=>D.y+D.height));return{x:B,y:U,width:O-B,height:G-U}}function Ac(h){const m=$t(h,"width",0);return m>0?m:h.kind==="text"?Math.max(80,qi(h,"value","").length*$t(h,"size",64)*.52):(h.assetName?r(xt).get(h.assetName):null)?.width??200}function wy(h){const m=$t(h,"height",0);if(m>0)return m;if(h.kind==="text")return $t(h,"size",64)*1.2;const w=$t(h,"width",0),B=h.assetName?r(xt).get(h.assetName):null;return B&&w>0?B.height*(w/B.width):B?.height??120}function Sf(h){return!!us(h).center}function or(){return!r(F)||!r(i)?null:r(F).body.find(h=>h.type==="Animation"&&h.target===r(i).id)??null}const Sy=[{value:"linear",label:"Linear"},{value:"power1.in",label:"Ease In"},{value:"power1.out",label:"Ease Out"},{value:"power1.inOut",label:"Ease In-Out"},{value:"power3.out",label:"Smooth Out"},{value:"power3.inOut",label:"Smooth In-Out"},{value:"back.out",label:"Back Out"},{value:"elastic.out",label:"Elastic Out"}];function Oo(){const h=or();return h?.keyframes?.length?h.keyframes.map(m=>({offset:m.offset,easing:m.easing})):h&&(Object.keys(h.from??{}).length>0||Object.keys(h.to??{}).length>0)?[{offset:0},{offset:1}]:r(a)?r(a).keyframes?.length?r(a).keyframes.map(m=>({offset:m.offset,easing:m.easing})):[{offset:0},{offset:1}]:[]}function Fo(){if(!r(F)||!r(i))return null;const h=or();if(h)return h;const m=r(a);if(!m)return null;const w={type:"Animation",target:r(i).id,from:{...m.from??{}},to:{...m.to??{}},keyframes:(m.keyframes??[]).map(U=>({offset:U.offset,properties:{...U.properties},...U.easing?{easing:U.easing}:{}})),delay:m.delay??0,duration:m.duration??1,easing:m.easing??"power3.out"},B=r(F).body.find(U=>U.type==="Element"&&U.name===r(i).id);if(B){const U={...B.properties};delete U.animation,delete U.textAnimation,B.properties=U}return r(F).body.push(w),w}function kf(h){h.keyframes?.length||(h.keyframes=Jp(h.keyframes,h.from,h.to))}function ky(h){return h===null?"":or()?.keyframes?.find(w=>Math.abs(w.offset-h)<1e-6)?.easing??""}function By(h){const m=Fo();!r(F)||!m||r(jt)===null||(kf(m),m.keyframes=YE(m.keyframes??[],r(jt),h),T(Te(r(F))))}function Bf(h,m){h.preventDefault(),h.stopPropagation();const w=or();!r(F)||!w?.keyframes?.length||(w.keyframes=Qp(w.keyframes,m),r(jt)!==null&&Math.abs(r(jt)-m)<1e-6&&S(jt,null),T(Te(r(F))))}function ka(h){return(r(a)?.delay??0)+h*(r(a)?.duration??1)}function Ef(h){const m=r(Lt)?.elements.find(O=>O.id===r(i)?.id),w=m?us(m):r(i)?us(r(i)):{},B=["x","y","scale","rotation","opacity","blur"],U=h?.length?h:B;return Object.fromEntries(U.filter(O=>typeof w[O]=="number"||typeof w[O]=="string").map(O=>[O,w[O]]))}function Ic(){if(!r(F)||!r(i))return;let h=Fo();if(h)h.keyframes=Jp(h.keyframes,h.from,h.to);else{const O=Ef();h={type:"Animation",target:r(i).id,from:{},to:{},keyframes:[{offset:0,properties:{...O}},{offset:1,properties:{...O}}],delay:0,duration:r(kt),easing:"power3.out"},r(F).body.push(h)}const m=r(a)?.delay??Number(h.delay??0),w=r(a)?.duration??(Number(h.duration??r(kt))||r(kt)),B=Math.min(1,Math.max(0,(r(nt)-m)/Math.max(w,1e-6))),U=Array.from(new Set((h.keyframes??[]).flatMap(O=>Object.keys(O.properties))));h.keyframes=WE(h.keyframes??[],B,Ef(U)),h.from={},h.to={},S(jt,B),T(Te(r(F)))}function Ey(){const h=or();!h||r(jt)===null||(h.keyframes=Qp(h.keyframes??[],r(jt)),S(jt,null),T(Te(r(F))))}function Uf(h,m){if(h.button!==0||!r(a))return;h.preventDefault(),h.stopPropagation();const w=h.currentTarget.closest(".track-lane");if(!w)return;const B=Fo();B&&!B.keyframes?.length&&kf(B),T(Te(r(F)));const U=w.getBoundingClientRect(),O=r(a).delay,G=r(a).duration;let D=m;S(jt,m),gc(ka(m));const R=ct=>{const it=(ct.clientX-U.left)/U.width*r(kt),At=Sa(it,U.width),Ht=Math.min(1,Math.max(0,(At-O)/Math.max(G,1e-6))),Kt=or();Kt&&(Kt.keyframes=Zp(Kt.keyframes??[],D,Ht),D=Ht,S(jt,Ht),T(Te(r(F))))},tt=()=>{window.removeEventListener("pointermove",R),window.removeEventListener("pointerup",tt),window.removeEventListener("pointercancel",tt)};window.addEventListener("pointermove",R),window.addEventListener("pointerup",tt),window.addEventListener("pointercancel",tt)}function No(h,m){if(!r(F)||!r(i))return;const w=Tf(r(F),r(i).id);w[h]=m,T(Te(r(F)))}function Uy(){if(!r(F))return;const h=Ty("text");r(F).body.push({type:"Element",kind:"text",name:h,properties:{value:"New text",center:!0,y:(r(C)?.elements.length??0)*80,size:64,color:"#ffffff",opacity:1,start:"0s",duration:`${r(kt).toFixed(3)}s`,track:r(v)}}),S(ft,h),T(Te(r(F)))}function Lr(h){if(!(!r(F)||!r(i))){if(Ce(F,r(F).body=r(F).body.filter(m=>!(m.type==="Animation"&&m.target===r(i).id))),h!=="none"){const m=Tf(r(F),r(i).id);h==="fade"&&(m.from={opacity:0},m.to={opacity:$t(r(i),"opacity",1)}),h==="rise"&&(m.from={opacity:0,y:$t(r(i),"y",0)+80},m.to={opacity:$t(r(i),"opacity",1),y:$t(r(i),"y",0)}),h==="scale"&&(m.from={opacity:0,scale:.85},m.to={opacity:$t(r(i),"opacity",1),scale:$t(r(i),"scale",1)}),h==="blur"&&(m.from={opacity:0,blur:12,y:$t(r(i),"y",0)+24},m.to={opacity:$t(r(i),"opacity",1),blur:0,y:$t(r(i),"y",0)}),h==="drift"&&(m.from={opacity:0,x:$t(r(i),"x",0)-90},m.to={opacity:$t(r(i),"opacity",1),x:$t(r(i),"x",0)}),m.duration=r(a)?.duration??1,m.delay=r(a)?.delay??0,m.easing=r(a)?.easing??"power3.out"}T(Te(r(F)))}}function Ba(h){const m=r(a)?.from;return m?h==="fade"?m.opacity===0&&m.y===void 0&&m.scale===void 0&&m.blur===void 0&&m.x===void 0:h==="rise"?m.opacity===0&&typeof m.y=="number":h==="scale"?m.opacity===0&&m.scale===.85:h==="blur"?typeof m.blur=="number"&&m.blur>0:h==="drift"?typeof m.x=="number":!1:!1}function Ea(h){return h.category==="camera"?!0:r(i)?h.category==="text"?r(i).kind==="text":h.category==="object"?r(i).kind==="asset":r(i).kind==="asset"||r(i).kind==="overlay":!1}function Do(h){if(!(!r(F)||!Ea(h))){if(h.category==="camera"){let m=r(F).body.find(w=>w.type==="Camera");m||(m={type:"Camera",properties:{}},r(F).body.push(m)),m.properties={...m.properties,cameraAnimation:`${h.name}(duration 1s ease power3.out)`}}else if(r(i)){const m=r(F).body.find(B=>B.type==="Element"&&B.name===r(i).id);if(!m)return;const w=h.category==="text"?"textAnimation":"animation";m.properties={...m.properties,[w]:`${h.name}(duration 800ms ease power3.out)`}}T(Te(r(F)))}}function Tf(h,m){const w=h.body.find(U=>U.type==="Animation"&&U.target===m);if(w)return w;const B={type:"Animation",target:m,from:{opacity:0},to:{opacity:1},keyframes:[],delay:0,duration:1,easing:"soft"};return h.body.push(B),B}function Ty(h){const m=new Set(r(C)?.elements.map(U=>U.id)??[]);let w=m.size+1,B=`${h}${w}`;for(;m.has(B);)w+=1,B=`${h}${w}`;return B}le(()=>(Zt(T()),r(Yt),r(Si),wu),()=>{T()&&(T()!==r(Yt).present&&S(Yt,r(Si)===null?wu(r(Yt),T()):{...r(Yt),present:T(),future:[]}),Xd())}),le(()=>(r(C),r(ft)),()=>{S(i,r(C)?.elements.find(h=>h.id===r(ft))??null)}),le(()=>(r(C),r(ft)),()=>{S(s,r(C)?.clips.find(h=>h.id===r(ft))??null)}),le(()=>(r(s),r(C),r(Lt)),()=>{S(n,r(s)?r(C)?.elements.find(h=>h.id===r(s)?.assetName)??r(Lt)?.elements.find(h=>h.id===r(s)?.id)??null:null)}),le(()=>(r(C),r(i)),()=>{S(a,r(C)?.animations.find(h=>h.target===r(i)?.id)??null)}),le(()=>(r(pt),r(ft)),()=>{S(o,r(pt)?.kind==="element"&&r(pt).id===r(ft)?r(pt).ghostStart-vn(r(pt).id).start:0)}),le(()=>r(C),()=>{S(l,r(C)?.elements.filter(h=>!h.id.includes("__"))??[])}),le(()=>(r(l),r(C)),()=>{S(c,r(l).filter(h=>h.kind!=="asset"||!h.assetName||!r(C)?.clips.some(m=>m.assetName===h.assetName)))}),le(()=>r(c),()=>{S(u,HE(r(c),vn))}),le(()=>(r(C),r(u)),()=>{S(d,jE(VE(r(C)?.clips??[],r(C)?.tracks??[]),r(u)))}),le(()=>r(d),()=>{S(f,r(d).elementLanes)}),le(()=>r(d),()=>{S(p,r(d).clipTracks)}),le(()=>r(C),()=>{S(v,r(C)?.tracks.find(h=>h.role==="main")?.id??"main")}),le(()=>r(C),()=>{S(g,r(C)?.tracks.find(h=>h.role==="audio")??null)}),le(()=>(r(bt),r(kt),r(C)),()=>{S(Fi,Math.min(r(bt)||r(kt),Math.max(0,r(kt)-(r(C)?.audioStart??0))))}),le(()=>(r(bt),r(he),r(Fi)),()=>{S(pn,r(bt)>0?Math.max(1,r(he)*r(Fi)/r(bt)):Math.max(1,r(he)))}),le(()=>r(C),()=>{S(_,tU(r(C)?.clips??[],1/(r(C)?.canvas.fps??60)))}),le(()=>(r(ji),r(_)),()=>{S(x,r(ji)?r(_).find(h=>h.outgoing.id===r(ji)?.outgoingId&&h.incoming.id===r(ji)?.incomingId&&h.type!==null)??null:null)}),le(()=>r(kt),()=>{S(E,Array.from({length:7},(h,m)=>r(kt)*m/6))}),le(()=>(r(nt),r(C)),()=>{S(I,Math.round(r(nt)*(r(C)?.canvas.fps??60)))}),le(()=>(r(C),r(re)),()=>{S(xe,Dg(r(C)?.imports??[],r(re)))}),le(()=>r(C),()=>{S(z,r(C)?.canvas.width??1920)}),le(()=>r(C),()=>{S($,r(C)?.canvas.height??1080)}),le(()=>(r(z),r($),r(C),r(kt),r(l)),()=>{S(M,{width:r(z),height:r($),fps:r(C)?.canvas.fps??60,duration:r(kt),elementCount:r(l).length})}),le(()=>(r(z),r(qe),r($)),()=>{S(V,`width: ${Math.round(r(z)*r(qe))}px; aspect-ratio: ${r(z)} / ${r($)};`)}),le(()=>(r(kt),r(wi)),()=>{S(N,Math.max(820,220+r(kt)*100*r(wi)))}),le(()=>(Zt(T()),r(jt)),()=>{S(H,T()&&r(jt)!==null?ky(r(jt)):"")}),ga();var Py={exportMp4:nf};Mr();var Pf=aP(),Ro=et(Pf);let Af;var Mc=y(Ro);let If;var Mf=y(Mc),Lo=y(Mf);let zf;var Ay=y(Lo);_v(Ay,{size:20});var Ho=b(Lo,2);let Cf;var Iy=y(Ho);vx(Iy,{size:20});var Vo=b(Ho,2);let $f;var My=y(Vo);rl(My,{size:20});var jo=b(Vo,2);let Of;var zy=y(jo);ol(zy,{size:20});var Go=b(jo,2);let Ff;var Cy=y(Go);nu(Cy,{size:20});var qo=b(Go,2);let Nf;var $y=y(qo);vv($y,{size:20});var zc=b(qo,2);let Df;var Oy=y(zc);gv(Oy,{size:20});var Rf=b(Mf,2),Fy=y(Rf);{var Ny=h=>{var m=mT(),w=et(m),B=y(w),U=y(B);let O;var G=b(U,2);let D;var R=b(B,2);{var tt=Kt=>{var Ot=rT(),Xt=y(Ot);an(Xt,ut=>S(as,ut),()=>r(as)),P("change",Xt,ey),A(Kt,Ot)};Z(R,Kt=>{r(oi)==="assets"&&Kt(tt)})}var ct=b(w,2),it=y(ct);{var At=Kt=>{var Ot=fT();let Xt;var ut=y(Ot);{var Mt=Ve=>{var Ut=nm(),gt=y(Ut);K(()=>at(gt,r($e))),A(Ve,Ut)};Z(ut,Ve=>{r($e)&&Ve(Mt)})}var ne=b(ut,2),Ue=y(ne),Xe=y(Ue);al(Xe,{size:15});var Re=b(ne,2);{var Mi=Ve=>{var Ut=aT(),gt=y(Ut),ot=y(gt);$a(ot,{size:14});var dt=b(gt,2),Y=y(dt),Dt=y(Y),lt=y(Dt);$a(lt,{size:16});var J=b(Dt,2),Tt=y(J),wt=y(Tt),ae=b(Tt,2),pe=y(ae);K(Rt=>{st(Y,"aria-label",`Drag ${r(Be)||"audio"} to the timeline`),at(wt,Rt),at(pe,(r(C),k(()=>r(C).audio)))},[()=>(r(C),k(()=>r(C).audio.substring(r(C).audio.lastIndexOf("/")+1)))]),P("dragstart",Y,df),P("dragend",Y,Sc),A(Ve,Ut)};Z(Re,Ve=>{r(C),k(()=>r(C)?.audio)&&Ve(Mi)})}var ds=b(Re,2);{var Es=Ve=>{var Ut=uT(),gt=y(Ut),ot=y(gt);nl(ot,{size:14});var dt=b(ot,4),Y=y(dt),Dt=b(gt,2);ge(Dt,5,()=>(r(C),k(()=>r(C).imports)),be,(lt,J)=>{var Tt=cT(),wt=y(Tt),ae=y(wt);{var pe=me=>{var te=oT();te.muted=!0,K(fi=>st(te,"src",fi),[()=>(r(xt),r(J),k(()=>Js(r(xt).get(r(J).name),r(J).path)))]),A(me,te)},Rt=me=>{var te=lT();K(fi=>{st(te,"src",fi),st(te,"alt",(r(J),k(()=>r(J).name)))},[()=>(r(xt),r(J),k(()=>Js(r(xt).get(r(J).name),r(J).path)))]),A(me,te)},Qt=me=>{nl(me,{size:24})};Z(ae,me=>{r(J),k(()=>r(J).type==="video")?me(pe):(r(J),k(()=>r(J).path)?me(Rt,1):me(Qt,-1))})}var se=b(wt,2),Ri=y(se),oe=y(Ri);K(me=>{st(Tt,"draggable",me),at(oe,(r(J),k(()=>r(J).name)))},[()=>(r(xt),r(J),k(()=>r(xt).has(r(J).name)))]),P("click",Tt,()=>Zg(r(J))),P("dragstart",Tt,me=>Qg(me,r(J))),P("dragend",Tt,ty),A(lt,Tt)}),K(()=>at(Y,(r(C),k(()=>r(C).imports.length)))),A(Ve,Ut)};Z(ds,Ve=>{r(C),k(()=>r(C)&&r(C).imports.length>0)&&Ve(Es)})}var Us=b(ds,2);{var Ts=Ve=>{var Ut=dT();A(Ve,Ut)};Z(Us,Ve=>{r(C),k(()=>!r(C)?.audio&&r(C)?.imports.length===0)&&Ve(Ts)})}K(()=>Xt=Ft(Ot,1,"media-dropzone svelte-1mvnu54",null,Xt,{"drag-active":r(Os)})),P("click",Ue,()=>r(as).click()),P("dragenter",Ot,Co),P("dragover",Ot,su(Co)),P("dragleave",Ot,ff),P("drop",Ot,iy),A(Kt,Ot)},Ht=Kt=>{var Ot=pT();ge(Ot,5,()=>ar,be,(Xt,ut)=>{var Mt=hT(),ne=y(Mt),Ue=y(ne),Xe=b(ne,2),Re=y(Xe),Mi=y(Re);K(()=>{st(Ue,"src",(r(ut),k(()=>r(ut).gifPath))),st(Ue,"alt",(r(ut),k(()=>r(ut).name))),at(Mi,(r(ut),k(()=>r(ut).name)))}),P("click",Mt,()=>Uo(r(ut).path)),A(Xt,Mt)}),A(Kt,Ot)};Z(it,Kt=>{r(oi)==="assets"?Kt(At):r(oi)==="presets"&&Kt(Ht,1)})}K(()=>{O=Ft(U,1,"panel-tab svelte-1mvnu54",null,O,{active:r(oi)==="assets"}),D=Ft(G,1,"panel-tab svelte-1mvnu54",null,D,{active:r(oi)==="presets"})}),P("click",U,()=>S(oi,"assets")),P("click",G,()=>S(oi,"presets")),A(h,m)},Dy=h=>{var m=gT(),w=et(m),B=b(y(w),2),U=y(B),O=y(U);al(O,{size:16});var G=b(w,2),D=y(G);let R;var tt=y(D);{var ct=ut=>{var Mt=nm(),ne=y(Mt);K(()=>at(ne,r(yi))),A(ut,Mt)};Z(tt,ut=>{r(yi)&&ut(ct)})}var it=b(tt,2),At=y(it),Ht=y(At);al(Ht,{size:15});var Kt=b(it,2);{var Ot=ut=>{var Mt=vT(),ne=y(Mt);$a(ne,{size:18});var Ue=b(ne,2),Xe=y(Ue),Re=b(Ue,2),Mi=y(Re);Wa(Mi,{size:14}),K(()=>{st(Mt,"aria-label",`Drag ${r(Be)} to the timeline`),at(Xe,r(Be))}),P("click",Re,xc),P("dragstart",Mt,df),P("dragend",Mt,Sc),A(ut,Mt)},Xt=ut=>{var Mt=_T();A(ut,Mt)};Z(Kt,ut=>{r(Be)?ut(Ot):ut(Xt,-1)})}K(()=>R=Ft(D,1,"media-dropzone svelte-1mvnu54",null,R,{"drag-active":r(Os)})),P("click",U,()=>r(Ii).click()),P("click",At,()=>r(Ii).click()),P("dragenter",D,Co),P("dragover",D,su(Co)),P("dragleave",D,ff),P("drop",D,Gg),A(h,m)},Ry=h=>{var m=yT(),w=et(m),B=b(y(w),2),U=y(B),O=y(U);Lu(O,{size:16});var G=b(w,2),D=y(G);ge(D,5,()=>(r(l),k(()=>r(l).filter(R=>R.kind==="text"))),be,(R,tt)=>{var ct=rm();let it;var At=y(ct),Ht=y(At);rl(Ht,{size:14});var Kt=b(At,2),Ot=y(Kt),Xt=y(Ot),ut=b(Ot,2),Mt=y(ut);K(ne=>{it=Ft(ct,1,"layer-row svelte-1mvnu54",null,it,{selected:r(ft)===r(tt).id}),at(Xt,(r(tt),k(()=>r(tt).id))),at(Mt,ne)},[()=>(r(tt),k(()=>bc(r(tt))))]),P("click",ct,()=>_n(r(tt).id)),A(R,ct)}),P("click",U,Uy),A(h,m)},Ly=h=>{var m=bT(),w=b(et(m),2),B=y(w),U=y(B),O=b(y(U),2);ge(O,5,()=>k(()=>ls.filter(Xt=>Xt.category==="text")),be,(Xt,ut)=>{var Mt=pl(),ne=y(Mt);Gr(ne,{size:14});var Ue=b(ne,2),Xe=y(Ue);K(Re=>{st(Mt,"title",(r(ut),k(()=>r(ut).description))),Mt.disabled=Re,at(Xe,(r(ut),k(()=>r(ut).name)))},[()=>(r(ut),k(()=>!Ea(r(ut))))]),P("click",Mt,()=>Do(r(ut))),A(Xt,Mt)});var G=b(U,2),D=b(y(G),2);ge(D,5,()=>k(()=>ls.filter(Xt=>Xt.category==="object")),be,(Xt,ut)=>{var Mt=pl(),ne=y(Mt);Gr(ne,{size:14});var Ue=b(ne,2),Xe=y(Ue);K(Re=>{st(Mt,"title",(r(ut),k(()=>r(ut).description))),Mt.disabled=Re,at(Xe,(r(ut),k(()=>r(ut).name)))},[()=>(r(ut),k(()=>!Ea(r(ut))))]),P("click",Mt,()=>Do(r(ut))),A(Xt,Mt)});var R=b(G,2),tt=b(y(R),4),ct=y(tt),it=y(ct);ol(it,{size:14});var At=b(R,2),Ht=b(y(At),2);ge(Ht,5,()=>k(()=>ls.filter(Xt=>Xt.category==="transition")),be,(Xt,ut)=>{var Mt=pl(),ne=y(Mt);ol(ne,{size:14});var Ue=b(ne,2),Xe=y(Ue);K(Re=>{st(Mt,"title",(r(ut),k(()=>r(ut).description))),Mt.disabled=Re,at(Xe,(r(ut),k(()=>r(ut).name)))},[()=>(r(ut),k(()=>!Ea(r(ut))))]),P("click",Mt,()=>Do(r(ut))),A(Xt,Mt)});var Kt=b(At,2),Ot=b(y(Kt),2);ge(Ot,5,()=>k(()=>ls.filter(Xt=>Xt.category==="camera")),be,(Xt,ut)=>{var Mt=pl(),ne=y(Mt);Xh(ne,{size:14});var Ue=b(ne,2),Xe=y(Ue);K(Re=>{st(Mt,"title",(r(ut),k(()=>r(ut).description))),Mt.disabled=Re,at(Xe,(r(ut),k(()=>r(ut).name)))},[()=>(r(ut),k(()=>!Ea(r(ut))))]),P("click",Mt,()=>Do(r(ut))),A(Xt,Mt)}),P("dragstart",ct,cy),P("dragend",ct,uy),A(h,m)},Hy=h=>{var m=xT(),w=b(et(m),2),B=b(y(w),2);ge(B,5,()=>(r(l),k(()=>r(l).filter(U=>U.kind==="effect"||U.kind==="overlay"))),be,(U,O)=>{var G=rm();let D;var R=y(G),tt=y(R);ru(tt,{size:14});var ct=b(R,2),it=y(ct),At=y(it),Ht=b(it,2),Kt=y(Ht);K(Ot=>{D=Ft(G,1,"layer-row svelte-1mvnu54",null,D,{selected:r(ft)===r(O).id}),at(At,(r(O),k(()=>r(O).id))),at(Kt,Ot)},[()=>(r(O),k(()=>bc(r(O))))]),P("click",G,()=>_n(r(O).id)),A(U,G)}),A(h,m)},Vy=h=>{var m=wT(),w=b(et(m),2);JU(w,{get assetList(){return r(xe)},get projectInfo(){return r(M)}}),A(h,m)},jy=h=>{var m=ST(),w=b(et(m),2);nT(w,{get assetList(){return r(xe)}}),A(h,m)};Z(Fy,h=>{r(Se)==="media"?h(Ny):r(Se)==="audio"?h(Dy,1):r(Se)==="text"?h(Ry,2):r(Se)==="effects"?h(Ly,3):r(Se)==="scenes"?h(Hy,4):r(Se)==="ai"?h(Vy,5):r(Se)==="settings"&&h(jy,6)})}var Cc=b(Rf,2);let Lf;var Gy=y(Cc);{var qy=h=>{HU(h,{get project(){return T()},get assetList(){return r(xe)},onLoadMotion:$g,onCollapse:()=>S(ks,!1)})},Wy=h=>{var m=kT(),w=y(m);Gr(w,{size:16}),P("click",m,()=>S(ks,!0)),A(h,m)};Z(Gy,h=>{r(ks)?h(qy):h(Wy,-1)})}var Hf=b(Cc,2),Vf=y(Hf),jf=y(Vf),Yy=y(jf),Ky=b(jf,2),Gf=y(Ky),qf=b(Gf,2),Xy=y(qf),Wf=b(qf,2),Jy=y(Wf);Xh(Jy,{size:15});var $c=b(Vf,2),Oc=y($c),gn=y(Oc);let Yf;an(gn,h=>S(St,h),()=>r(St));var Kf=b(gn,2);{var Zy=h=>{var m=BT();K(()=>Ae(m,(r(Me),r(z),k(()=>`left: ${r(Me).vertical/r(z)*100}%`)))),A(h,m)};Z(Kf,h=>{r(Me),k(()=>r(Me).vertical!==null)&&h(Zy)})}var Qy=b(Kf,2);{var t1=h=>{var m=ET();K(()=>Ae(m,(r(Me),r($),k(()=>`top: ${r(Me).horizontal/r($)*100}%`)))),A(h,m)};Z(Qy,h=>{r(Me),k(()=>r(Me).horizontal!==null)&&h(t1)})}var e1=b(Oc,2);{var i1=h=>{var m=PT(),w=y(m);{var B=D=>{var R=UT();R.muted=!0,K(()=>st(R,"src",(r(Ei),k(()=>r(Ei).src)))),A(D,R)},U=D=>{var R=TT();K(()=>st(R,"src",(r(Ei),k(()=>r(Ei).src)))),A(D,R)};Z(w,D=>{r(Ei),k(()=>r(Ei).type==="video")?D(B):D(U,-1)})}var O=b(w,2),G=y(O);Ln(G,{size:18}),P("click",O,uf),A(h,m)};Z(e1,h=>{r(Ei)&&h(i1)})}an($c,h=>S(yt,h),()=>r(yt));var s1=b($c,2);{var n1=h=>{var m=ku(),w=y(m);K(()=>at(w,r(vt))),A(h,m)},r1=h=>{var m=ku(),w=y(m);K(()=>at(w,r(Ee))),A(h,m)};Z(s1,h=>{r(vt)?h(n1):r(Ee)&&h(r1,1)})}var a1=b(Hf,2),o1=b(y(a1),2);{var l1=h=>{var m=AT(),w=et(m),B=y(w),U=y(B);ol(U,{size:15});var O=b(B,2),G=b(y(O)),D=y(G),R=b(w,2),tt=b(y(R),2),ct=y(tt),it=b(R,2),At=y(it),Ht=b(y(At)),Kt=y(Ht),Ot=b(At,4),Xt=b(y(Ot)),ut=y(Xt),Mt=b(it,2);K(ne=>{at(D,`${r(x),k(()=>r(x).outgoing.assetName)??""} → ${r(x),k(()=>r(x).incoming.assetName)??""}`),st(ct,"max",ne),_e(ct,(r(x),k(()=>r(x).duration))),at(Kt,(r(x),k(()=>r(x).outgoing.assetName))),at(ut,(r(x),k(()=>r(x).incoming.assetName)))},[()=>(r(x),k(()=>Math.min(r(x).outgoing.duration,r(x).incoming.duration)))]),P("change",ct,ne=>Bc(r(x),Number(ne.currentTarget.value))),P("click",Mt,hy),A(h,m)},c1=h=>{var m=LT(),w=et(m),B=y(w),U=y(B);{var O=Q=>{cr(Q,{size:15})},G=Q=>{var Bt=ml();K(Jt=>st(Bt,"src",Jt),[()=>(r(xt),r(i),k(()=>Js(r(xt).get(r(i).assetName??""),r(i).asset.path)))]),A(Q,Bt)},D=Q=>{rl(Q,{size:15})},R=Q=>{nl(Q,{size:15})},tt=Q=>{Gr(Q,{size:15})},ct=Q=>{ru(Q,{size:15})};Z(U,Q=>{r(i),k(()=>r(i).kind==="asset"&&r(i).asset?.type==="video")?Q(O):(r(i),k(()=>r(i).kind==="asset"&&r(i).asset?.path)?Q(G,1):(r(i),k(()=>r(i).kind==="text")?Q(D,2):(r(i),k(()=>r(i).kind==="asset")?Q(R,3):(r(i),k(()=>r(i).kind==="effect")?Q(tt,4):Q(ct,-1)))))})}var it=b(B,2),At=y(it),Ht=y(At),Kt=b(At),Ot=y(Kt),Xt=b(w,2);{var ut=Q=>{var Bt=IT(),Jt=b(y(Bt),2),ve=y(Jt),je=y(ve);lx(je,{size:15});var Je=b(ve,2),ye=y(Je);ax(ye,{size:15});var ze=b(Je,2),Ze=y(ze);ox(Ze,{size:15});var li=b(ze,4),Ds=y(li);dx(Ds,{size:15});var tn=b(li,2),Ta=y(tn);cx(Ta,{size:15});var lr=b(tn,2),Pa=y(lr);ux(Pa,{size:15}),P("click",ve,()=>Fr("left")),P("click",Je,()=>Fr("center-x")),P("click",ze,()=>Fr("right")),P("click",li,()=>Fr("top")),P("click",tn,()=>Fr("center-y")),P("click",lr,()=>Fr("bottom")),A(Q,Bt)};Z(Xt,Q=>{r(i),k(()=>r(i).kind==="asset"||r(i).kind==="text")&&Q(ut)})}var Mt=b(Xt,2),ne=b(y(Mt),2),Ue=y(ne),Xe=y(Ue),Re=b(Ue,2),Mi=y(Re),ds=b(Mt,2),Es=b(y(ds),2),Us=y(Es),Ts=b(Us,2),Ve=b(ds,2);{var Ut=Q=>{var Bt=MT(),Jt=y(Bt),ve=b(y(Jt),2),je=b(Jt,2),Je=y(je);K(ye=>_e(Je,ye),[()=>(r(i),k(()=>$t(r(i),"width",Ac(r(i)))))]),P("click",ve,of),P("input",Je,ye=>Fe("width",Number(ye.currentTarget.value))),A(Q,Bt)};Z(Ve,Q=>{r(i),k(()=>r(i).kind==="asset")&&Q(Ut)})}var gt=b(Ve,2),ot=b(y(gt),2),dt=y(ot),Y=b(dt,2),Dt=b(gt,2);{var lt=Q=>{var Bt=CT(),Jt=et(Bt),ve=b(y(Jt),2),je=y(ve),Je=y(je),ye=b(je,2),ze=y(ye),Ze=b(Jt,2),li=b(y(Ze),2),Ds=y(li),tn=y(Ds),Ta=b(Ds,2),lr=y(Ta),Pa=b(Ze,2);{var Kc=fs=>{var Zo=zT(),Qo=et(Zo),tl=b(y(Qo),2),W1=b(Qo,2),Ih=b(y(W1),2);K((Aa,Y1)=>{_e(tl,Aa),_e(Ih,Y1)},[()=>(r(i),k(()=>qi(r(i),"fill","#ffffff"))),()=>(r(i),k(()=>qi(r(i),"stroke","#ffffff")))]),P("input",tl,Aa=>Fe("fill",Aa.currentTarget.value)),P("input",Ih,Aa=>Fe("stroke",Aa.currentTarget.value)),A(fs,Zo)},q1=ps(()=>(r(i),r(xt),k(()=>r(i).asset?.type==="svg"&&!r(xt).get(r(i).assetName??"")?.motionlySvg?.animated)));Z(Pa,fs=>{r(q1)&&fs(Kc)})}K((fs,Zo,Qo,tl)=>{_e(Je,fs),_e(ze,Zo),_e(tn,Qo),_e(lr,tl)},[()=>(r(i),k(()=>$t(r(i),"originX",.5))),()=>(r(i),k(()=>$t(r(i),"originY",.5))),()=>(r(i),k(()=>$t(r(i),"skewX",0))),()=>(r(i),k(()=>$t(r(i),"skewY",0)))]),P("input",Je,fs=>Fe("originX",Number(fs.currentTarget.value))),P("input",ze,fs=>Fe("originY",Number(fs.currentTarget.value))),P("input",tn,fs=>Fe("skewX",Number(fs.currentTarget.value))),P("input",lr,fs=>Fe("skewY",Number(fs.currentTarget.value))),A(Q,Bt)};Z(Dt,Q=>{r(i),k(()=>r(i).kind==="asset")&&Q(lt)})}var J=b(Dt,2),Tt=b(y(J),2),wt=y(Tt),ae=b(wt,2),pe=b(J,2);{var Rt=Q=>{var Bt=$T(),Jt=b(y(Bt),2);K(ve=>_e(Jt,ve),[()=>(r(i),k(()=>qi(r(i),"fill","#000000")))]),P("input",Jt,ve=>Fe("fill",ve.currentTarget.value)),A(Q,Bt)};Z(pe,Q=>{r(i),k(()=>r(i).kind==="overlay")&&Q(Rt)})}var Qt=b(pe,2);{var se=Q=>{var Bt=OT(),Jt=et(Bt),ve=b(y(Jt),2),je=b(Jt,2),Je=b(y(je),2),ye=y(Je),ze=b(je,2),Ze=b(y(ze),2);K((li,Ds,tn)=>{_e(ve,li),_e(ye,Ds),_e(Ze,tn)},[()=>(r(i),k(()=>qi(r(i),"value",""))),()=>(r(i),k(()=>$t(r(i),"size",72))),()=>(r(i),k(()=>qi(r(i),"color","#ffffff")))]),P("input",ve,li=>Fe("value",li.currentTarget.value)),P("input",ye,li=>Fe("size",Number(li.currentTarget.value))),P("input",Ze,li=>Fe("color",li.currentTarget.value)),A(Q,Bt)};Z(Qt,Q=>{r(i),k(()=>r(i).kind==="text")&&Q(se)})}var Ri=b(Qt,4),oe=b(y(Ri),2),me=y(oe);me.value=me.__value="none";var te=b(me);ge(te,1,()=>(r(l),r(i),k(()=>r(l).filter(Q=>Q.id!==r(i)?.id))),be,(Q,Bt)=>{var Jt=Bu(),ve=y(Jt),je={};K(()=>{at(ve,(r(Bt),k(()=>r(Bt).id))),je!==(je=(r(Bt),k(()=>r(Bt).id)))&&(Jt.value=(Jt.__value=(r(Bt),k(()=>r(Bt).id)))??"")}),A(Q,Jt)});var fi;br(oe);var Qs=b(Ri,2);{var Hc=Q=>{var Bt=FT(),Jt=et(Bt),ve=y(Jt),je=b(Jt,2),Je=y(je);K((ye,ze)=>{oo(ve,ye),oo(Je,ze)},[()=>(r(i),k(()=>!!us(r(i)).maskInvert)),()=>(r(i),k(()=>!!us(r(i)).maskVisible))]),P("change",ve,ye=>Fe("maskInvert",ye.currentTarget.checked)),P("change",Je,ye=>Fe("maskVisible",ye.currentTarget.checked)),A(Q,Bt)},Vc=ps(()=>(r(i),k(()=>qi(r(i),"mask","none")!=="none")));Z(Qs,Q=>{r(Vc)&&Q(Hc)})}var hh=b(Qs,4);ge(hh,1,()=>Gi,be,(Q,Bt)=>{var Jt=NT(),ve=y(Jt),je=y(ve),Je=b(ve,2),ye=y(Je),ze=b(ye,2);K((Ze,li)=>{at(je,(r(Bt),k(()=>r(Bt).label))),st(ye,"min",(r(Bt),k(()=>r(Bt).min))),st(ye,"max",(r(Bt),k(()=>r(Bt).max))),st(ye,"step",(r(Bt),k(()=>r(Bt).step))),_e(ye,Ze),st(ze,"min",(r(Bt),k(()=>r(Bt).min))),st(ze,"max",(r(Bt),k(()=>r(Bt).max))),st(ze,"step",(r(Bt),k(()=>r(Bt).step))),_e(ze,li)},[()=>(r(i),r(Bt),k(()=>$t(r(i),r(Bt).property,r(Bt).fallback))),()=>(r(i),r(Bt),k(()=>$t(r(i),r(Bt).property,r(Bt).fallback)))]),P("input",ye,Ze=>Fe(r(Bt).property,Number(Ze.currentTarget.value))),P("input",ze,Ze=>Fe(r(Bt).property,Number(Ze.currentTarget.value))),A(Q,Jt)});var ph=b(hh,4),mh=y(ph),D1=b(mh,2);{var R1=Q=>{var Bt=DT(),Jt=et(Bt),ve=y(Jt),je=b(Jt,2),Je=y(je);Wa(Je,{size:14}),K(ye=>_e(ve,ye),[()=>(r(jt),k(()=>Number((r(jt)*100).toFixed(1))))]),P("change",ve,ye=>{const ze=or();if(ze&&r(jt)!==null){const Ze=Math.min(1,Math.max(0,Number(ye.currentTarget.value)/100));ze.keyframes=Zp(ze.keyframes??[],r(jt),Ze),S(jt,Ze),T(Te(r(F)))}}),P("click",je,Ey),A(Q,Bt)};Z(D1,Q=>{r(jt)!==null&&Q(R1)})}var vh=b(ph,2);{var L1=Q=>{var Bt=RT(),Jt=b(y(Bt),2),ve=y(Jt);ve.value=ve.__value="";var je=b(ve);ge(je,1,()=>Sy,be,(ye,ze)=>{var Ze=Bu(),li=y(Ze),Ds={};K(()=>{at(li,(r(ze),k(()=>r(ze).label))),Ds!==(Ds=(r(ze),k(()=>r(ze).value)))&&(Ze.value=(Ze.__value=(r(ze),k(()=>r(ze).value)))??"")}),A(ye,Ze)});var Je;br(Jt),K(()=>{Je!==(Je=r(H))&&(Jt.value=(Jt.__value=r(H))??"",Pn(Jt,r(H)))}),P("change",Jt,ye=>By(ye.currentTarget.value)),A(Q,Bt)};Z(vh,Q=>{r(jt)!==null&&Q(L1)})}var _h=b(vh,4),H1=b(y(_h),2),jc=y(H1);let gh;var Gc=b(jc,2);let yh;var qc=b(Gc,2);let bh;var Wc=b(qc,2);let xh;var Yc=b(Wc,2);let wh;var Sh=b(Yc,2);let kh;var Bh=b(_h,2),V1=b(y(Bh),2),Eh=y(V1),Uh=b(Bh,2),j1=b(y(Uh),2),Th=y(j1),G1=b(Uh,2),Ph=b(y(G1),2);ge(Ph,4,()=>["soft","power3.out","linear","ease-out","spring","smooth"],be,(Q,Bt)=>{var Jt=am();let ve;var je=y(Jt);K(()=>{ve=Ft(Jt,1,"easing-option svelte-1mvnu54",null,ve,{active:(r(a)?.easing??"soft")===Bt}),at(je,Bt)}),P("click",Jt,()=>No("easing",Bt)),A(Q,Jt)});var Ah=b(Ph,2);K((Q,Bt,Jt,ve,je,Je,ye,ze,Ze,li,Ds,tn,Ta,lr,Pa,Kc)=>{at(Ht,(r(i),k(()=>r(i).id))),at(Ot,Q),_e(Xe,Bt),_e(Mi,Jt),_e(Us,ve),_e(Ts,je),_e(dt,Je),_e(Y,ye),_e(wt,ze),_e(ae,Ze),fi!==(fi=li)&&(oe.value=(oe.__value=li)??"",Pn(oe,li)),gh=Ft(jc,1,"preset-option svelte-1mvnu54",null,gh,{active:!r(a)}),yh=Ft(Gc,1,"preset-option svelte-1mvnu54",null,yh,Ds),bh=Ft(qc,1,"preset-option svelte-1mvnu54",null,bh,tn),xh=Ft(Wc,1,"preset-option svelte-1mvnu54",null,xh,Ta),wh=Ft(Yc,1,"preset-option svelte-1mvnu54",null,wh,lr),kh=Ft(Sh,1,"preset-option svelte-1mvnu54",null,kh,Pa),_e(Eh,(r(a),k(()=>r(a)?.duration??1))),_e(Th,(r(a),k(()=>r(a)?.delay??0))),_e(Ah,Kc)},[()=>(r(i),k(()=>bc(r(i)))),()=>(r(i),k(()=>$t(r(i),"x",0))),()=>(r(i),k(()=>$t(r(i),"y",0))),()=>(r(i),k(()=>$t(r(i),"scale",1))),()=>(r(i),k(()=>$t(r(i),"scale",1).toFixed(2))),()=>(r(i),k(()=>$t(r(i),"rotation",0))),()=>(r(i),k(()=>$t(r(i),"rotation",0))),()=>(r(i),k(()=>$t(r(i),"opacity",1))),()=>(r(i),k(()=>Math.round($t(r(i),"opacity",1)*100))),()=>(r(i),k(()=>qi(r(i),"mask","none"))),()=>({active:Ba("fade")}),()=>({active:Ba("rise")}),()=>({active:Ba("scale")}),()=>({active:Ba("blur")}),()=>({active:Ba("drift")}),()=>(r(a),k(()=>String(r(a)?.easing??"soft")))]),P("input",Xe,Q=>Fe("x",Number(Q.currentTarget.value))),P("input",Mi,Q=>Fe("y",Number(Q.currentTarget.value))),P("input",Us,Q=>Fe("scale",Number(Q.currentTarget.value))),P("input",Ts,Q=>Fe("scale",Number(Q.currentTarget.value))),P("input",dt,Q=>Fe("rotation",Number(Q.currentTarget.value))),P("input",Y,Q=>Fe("rotation",Number(Q.currentTarget.value))),P("input",wt,Q=>Fe("opacity",Number(Q.currentTarget.value))),P("input",ae,Q=>Fe("opacity",Number(Q.currentTarget.value)/100)),P("change",oe,Q=>Fe("mask",Q.currentTarget.value)),P("click",mh,Ic),P("click",jc,()=>Lr("none")),P("click",Gc,()=>Lr("fade")),P("click",qc,()=>Lr("rise")),P("click",Wc,()=>Lr("scale")),P("click",Yc,()=>Lr("blur")),P("click",Sh,()=>Lr("drift")),P("input",Eh,Q=>No("duration",Number(Q.currentTarget.value))),P("input",Th,Q=>No("delay",Number(Q.currentTarget.value))),P("change",Ah,Q=>No("easing",Q.currentTarget.value)),A(h,m)},u1=h=>{var m=HT(),w=et(m),B=y(w),U=y(B);{var O=lt=>{cr(lt,{size:15})},G=lt=>{var J=ml();K(Tt=>st(J,"src",Tt),[()=>(r(xt),r(s),k(()=>Js(r(xt).get(r(s).assetName),r(s).asset.path)))]),A(lt,J)},D=lt=>{nl(lt,{size:15})};Z(U,lt=>{r(s),k(()=>r(s).asset?.type==="video")?lt(O):(r(s),k(()=>r(s).asset?.path)?lt(G,1):lt(D,-1))})}var R=b(B,2),tt=y(R),ct=y(tt),it=b(w,2),At=b(it,2),Ht=b(y(At),2),Kt=y(Ht),Ot=b(Kt,2),Xt=b(At,2),ut=b(y(Xt),2),Mt=y(ut),ne=b(Xt,2),Ue=b(y(ne),2);ge(Ue,5,()=>(r(C),r(s),k(()=>(r(C)?.tracks??[]).filter(lt=>lt.role!=="audio"&&(lt.role==="main"||lt.content===(r(s).asset?.type==="video"?"video":"image")||lt.content==="mixed")))),be,(lt,J)=>{var Tt=Bu(),wt=y(Tt),ae={};K(()=>{at(wt,`${r(J),k(()=>r(J).label)??""} · ${r(J),k(()=>r(J).role)??""}`),ae!==(ae=(r(J),k(()=>r(J).id)))&&(Tt.value=(Tt.__value=(r(J),k(()=>r(J).id)))??"")}),A(lt,Tt)});var Xe;br(Ue);var Re=b(ne,2),Mi=b(y(Re),2),ds=y(Mi),Es=b(Re,2),Us=b(y(Es),2),Ts=y(Us),Ve=b(Es,2),Ut=b(y(Ve),2),gt=y(Ut),ot=b(Ve,2),dt=b(y(ot),2),Y=y(dt),Dt=b(ot,2);K((lt,J,Tt,wt)=>{at(ct,(r(s),k(()=>r(s).assetName))),_e(Kt,lt),_e(Ot,J),_e(Mt,Tt),Xe!==(Xe=wt)&&(Ue.value=(Ue.__value=wt)??"",Pn(Ue,wt)),st(ds,"max",r(kt)),_e(ds,(r(s),k(()=>r(s).start))),st(Ts,"max",r(kt)),_e(Ts,(r(s),k(()=>r(s).duration))),_e(gt,(r(s),k(()=>r(s).trimIn))),_e(Y,(r(s),k(()=>r(s).trimOut))),Dt.disabled=(r(nt),r(s),k(()=>r(nt)<=r(s).start||r(nt)>=r(s).start+r(s).duration))},[()=>(r(n),k(()=>$t(r(n),"scale",1))),()=>(r(n),k(()=>$t(r(n),"scale",1).toFixed(2))),()=>(r(n),r(xt),r(s),k(()=>r(n)?Ac(r(n)):r(xt).get(r(s).assetName)?.width??200)),()=>(r(s),k(()=>String(r(s).track)))]),P("click",it,of),P("input",Kt,lt=>Fe("scale",Number(lt.currentTarget.value))),P("input",Ot,lt=>Fe("scale",Number(lt.currentTarget.value))),P("input",Mt,lt=>Fe("width",Number(lt.currentTarget.value))),P("change",Ue,lt=>gf(lt.currentTarget.value,r(s).start)),P("change",ds,lt=>gf(String(r(s).track),Number(lt.currentTarget.value))),P("change",Ts,lt=>ly(Number(lt.currentTarget.value))),P("input",gt,lt=>_f(r(s).id,{trimIn:`${Math.max(0,Number(lt.currentTarget.value))}s`})),P("input",Y,lt=>_f(r(s).id,{trimOut:`${Math.max(0,Number(lt.currentTarget.value))}s`})),P("click",Dt,Tc),A(h,m)},d1=h=>{var m=VT();A(h,m)};Z(o1,h=>{r(x)?h(l1):r(i)?h(c1,1):r(s)?h(u1,2):h(d1,-1)})}var Xf=b(Mc,2),Fc=y(Xf),Jf=b(Fc,2),Zf=y(Jf),Nc=y(Zf),f1=y(Nc);Ex(f1,{size:17});var Wo=b(Nc,2),h1=y(Wo);{var p1=h=>{bx(h,{size:19})},m1=h=>{xx(h,{size:19})};Z(h1,h=>{r(Ct)?h(p1):h(m1,-1)})}var Qf=b(Wo,2),v1=y(Qf),_1=b(Qf,2),g1=y(_1),th=b(Zf,2),eh=y(th);nu(eh,{size:14});var y1=b(eh,2),b1=y(y1),x1=b(th,2),Dc=y(x1);an(Dc,h=>S(Ii,h),()=>r(Ii));var ih=b(Dc,2);{var w1=h=>{var m=jT(),w=et(m),B=y(w);$a(B,{size:13});var U=b(B),O=b(w,2),G=y(O);Wa(G,{size:14}),K(()=>at(U,` ${r(Be)??""}`)),P("click",O,xc),A(h,m)},S1=h=>{var m=GT(),w=y(m);al(w,{size:14}),P("click",m,()=>r(Ii).click()),A(h,m)};Z(ih,h=>{r(Be)?h(w1):h(S1,-1)})}var sh=b(ih,2);{var k1=h=>{var m=qT(),w=y(m);Wa(w,{size:14}),P("click",m,rf),A(h,m)};Z(sh,h=>{(r(i)||r(s))&&h(k1)})}var Yo=b(sh,2),B1=y(Yo);Tx(B1,{size:14});var Ko=b(Yo,2),E1=y(Ko);wx(E1,{size:14});var Xo=b(Ko,2),U1=y(Xo);kx(U1,{size:14});var Ua=b(Xo,2);let nh;var T1=y(Ua);_x(T1,{size:15});var Rc=b(Ua,2),P1=y(Rc);gx(P1,{size:15});var rh=b(Rc,2),A1=y(rh),ah=b(rh,2),I1=y(ah);Lu(I1,{size:15});var yn=b(Jf,2);let oh;var lh=y(yn),M1=b(y(lh),2),ch=y(M1);ge(ch,1,()=>r(E),be,(h,m)=>{var w=WT(),B=y(w);K((U,O)=>{Ae(w,U),at(B,O)},[()=>(r(m),k(()=>`left: ${si(r(m))}%`)),()=>(r(m),k(()=>tf(r(m))))]),A(h,w)});var uh=b(ch,4);{var z1=h=>{var m=YT();K(w=>Ae(m,w),[()=>(r(Di),k(()=>`left: ${si(r(Di))}%`))]),A(h,m)};Z(uh,h=>{r(Di)!==null&&h(z1)})}var Jo=b(uh,2),dh=b(lh,2);ge(dh,1,()=>r(f),be,(h,m)=>{const w=Nn(()=>(r(C),r(m),k(()=>r(C)?.tracks.find(Ut=>Ut.id===r(m).trackId))));var B=JT();let U;var O=y(B);let G;var D=y(O),R=y(D);{var tt=Ut=>{cr(Ut,{size:12})},ct=Ut=>{var gt=ml();K(ot=>st(gt,"src",ot),[()=>(r(xt),r(m),k(()=>Js(r(xt).get(r(m).items[0].element.assetName??""),r(m).items[0].element.asset.path)))]),A(Ut,gt)},it=Ut=>{rl(Ut,{size:12})},At=Ut=>{Gr(Ut,{size:12})},Ht=Ut=>{ru(Ut,{size:12})};Z(R,Ut=>{r(m),k(()=>r(m).items[0].element.kind==="asset"&&r(m).items[0].element.asset?.type==="video")?Ut(tt):(r(m),k(()=>r(m).items[0].element.kind==="asset"&&r(m).items[0].element.asset?.path)?Ut(ct,1):(r(m),k(()=>r(m).kind==="text")?Ut(it,2):(r(m),k(()=>r(m).kind==="effect")?Ut(At,3):Ut(Ht,-1))))})}var Kt=b(D,2),Ot=y(Kt),Xt=y(Ot),ut=b(Ot,2),Mt=y(ut),ne=b(Kt,2);{var Ue=Ut=>{var gt=KT(),ot=y(gt);let dt;var Y=y(ot);{var Dt=J=>{Fl(J,{size:13})},lt=J=>{lo(J,{size:13})};Z(Y,J=>{Zt(r(w)),k(()=>r(w).hidden)?J(Dt):J(lt,-1)})}K(()=>{dt=Ft(ot,1,"track-control svelte-1mvnu54",null,dt,{active:r(w).hidden}),st(ot,"title",(Zt(r(w)),k(()=>r(w).hidden?"Show track":"Hide track")))}),P("click",ot,Rs(()=>kc(r(w),{hidden:!r(w).hidden}))),A(Ut,gt)},Xe=Ut=>{var gt=XT(),ot=y(gt);K((dt,Y)=>at(ot,`${dt??""} - ${Y??""}`),[()=>(r(m),k(()=>yc(r(m).start))),()=>(r(m),k(()=>yc(r(m).end)))]),A(Ut,gt)};Z(ne,Ut=>{r(w)?Ut(Ue):Ut(Xe,-1)})}var Re=b(O,2),Mi=y(Re);{var ds=Ut=>{var gt=lm(),ot=et(gt);let dt;var Y=b(ot,2);{var Dt=J=>{var Tt=Nt(),wt=et(Tt);ge(wt,1,()=>k(Oo),be,(ae,pe)=>{var Rt=om();K(Qt=>Ae(Rt,Qt),[()=>(r(pe),r(o),k(()=>`left: ${si(ka(r(pe).offset)+r(o))}%; top: 19.5px`))]),A(ae,Rt)}),A(J,Tt)},lt=ps(()=>(r(pt),r(ft),r(m),k(()=>r(pt).kind==="element"&&r(pt).id===r(ft)&&!r(m).items.some(J=>J.element.id===r(ft)))));Z(Y,J=>{r(lt)&&J(Dt)})}K(J=>{dt=Ft(ot,1,"clip-ghost svelte-1mvnu54",null,dt,{invalid:!r(pt).valid}),Ae(ot,J)},[()=>(r(pt),k(()=>`left: ${si(r(pt).ghostStart)}%; width: ${Math.max(.8,si(r(pt).duration))}%`))]),A(Ut,gt)};Z(Mi,Ut=>{r(pt),r(m),k(()=>r(pt)&&r(pt).ghostTrackId===r(m).trackId)&&Ut(ds)})}var Es=b(Mi,2);ge(Es,1,()=>(r(m),k(()=>r(m).items)),be,(Ut,gt)=>{var ot=um();let dt;var Y=y(ot);{var Dt=Rt=>{var Qt=Eu(),se=y(Qt);cr(se,{size:13}),A(Rt,Qt)},lt=Rt=>{var Qt=Uu();K(se=>Ae(Qt,se),[()=>(r(xt),r(gt),k(()=>`background-image: url('${Js(r(xt).get(r(gt).element.assetName??""),r(gt).element.asset.path)}')`))]),A(Rt,Qt)},J=Rt=>{var Qt=vl(),se=y(Qt);K(Ri=>at(se,Ri),[()=>(r(gt),k(()=>qi(r(gt).element,"value",r(gt).element.id)))]),A(Rt,Qt)},Tt=Rt=>{var Qt=cm();K(se=>Ae(Qt,se),[()=>(r(gt),k(()=>`background: ${qi(r(gt).element,"fill","#34404e")}`))]),A(Rt,Qt)};Z(Y,Rt=>{r(gt),k(()=>r(gt).element.kind==="asset"&&r(gt).element.asset?.type==="video")?Rt(Dt):(r(gt),k(()=>r(gt).element.kind==="asset"&&r(gt).element.asset?.path)?Rt(lt,1):(r(gt),k(()=>r(gt).element.kind==="text")?Rt(J,2):(r(gt),k(()=>r(gt).element.kind==="overlay")&&Rt(Tt,3))))})}var wt=b(Y,2),ae=b(wt,2),pe=b(ae,2);K(Rt=>{dt=Ft(ot,1,"clip element-clip svelte-1mvnu54",null,dt,{"selected-clip":r(gt).element.id===r(ft)}),Ae(ot,Rt),st(wt,"aria-label",(r(gt),k(()=>`Select or move ${r(gt).element.id}`))),st(ae,"aria-label",(r(gt),k(()=>`Trim start of ${r(gt).element.id}`))),st(pe,"aria-label",(r(gt),k(()=>`Trim end of ${r(gt).element.id}`)))},[()=>(r(gt),k(()=>`left: ${si(r(gt).range.start)}%; width: ${Math.max(.8,si(r(gt).range.end-r(gt).range.start))}%; top: ${6+r(gt).lane*34}px`))]),P("pointerdown",wt,Rt=>yf(Rt,r(gt).element)),P("click",wt,()=>_n(r(gt).element.id,!1)),P("pointerdown",ae,Rt=>Ao(Rt,r(gt).element.id,"start")),P("pointerdown",pe,Rt=>Ao(Rt,r(gt).element.id,"end")),A(Ut,ot)});var Us=b(Es,2);{var Ts=Ut=>{const gt=Nn(()=>(r(m),r(ft),k(()=>r(m).items.find(Dt=>Dt.element.id===r(ft))?.lane??0)));var ot=fm(),dt=et(ot);ge(dt,1,()=>k(Oo),be,(Dt,lt)=>{var J=dm();let Tt;K((wt,ae,pe,Rt)=>{Tt=Ft(J,1,"keyframe-marker svelte-1mvnu54",null,Tt,wt),Ae(J,ae),st(J,"title",pe),st(J,"aria-label",Rt)},[()=>({"selected-keyframe":r(jt)!==null&&Math.abs(r(jt)-r(lt).offset)<1e-6}),()=>(r(lt),r(o),Zt(r(gt)),k(()=>`left: ${si(ka(r(lt).offset)+r(o))}%; top: ${6+r(gt)*34+13.5}px`)),()=>(r(lt),k(()=>`Keyframe ${Math.round(r(lt).offset*100)}%${r(lt).easing?" · "+r(lt).easing:""} — drag to retime, right-click to delete`)),()=>(r(lt),k(()=>`Keyframe at ${Math.round(r(lt).offset*100)} percent`))]),P("pointerdown",J,wt=>Uf(wt,r(lt).offset)),P("contextmenu",J,wt=>Bf(wt,r(lt).offset)),A(Dt,J)});var Y=b(dt,2);K(Dt=>Ae(Y,Dt),[()=>(r(nt),Zt(r(gt)),k(()=>`left: ${si(r(nt))}%; top: ${6+r(gt)*34+13.5}px`))]),P("pointerdown",Y,Rs(function(Dt){sl.call(this,e,Dt)})),P("click",Y,Rs(Ic)),A(Ut,ot)},Ve=ps(()=>(r(m),r(ft),r(pt),k(()=>r(m).items.some(Ut=>Ut.element.id===r(ft))&&!(r(pt)?.kind==="element"&&r(pt).id===r(ft)&&r(pt).ghostTrackId!==r(m).trackId))));Z(Us,Ut=>{r(Ve)&&Ut(Ts)})}K((Ut,gt,ot)=>{U=Ft(B,1,"timeline-row svelte-1mvnu54",null,U,Ut),Ae(B,gt),G=Ft(O,1,"track-label svelte-1mvnu54",null,G,{"track-hidden":r(w)?.hidden}),at(Xt,ot),at(Mt,`${r(m),k(()=>r(m).items.length)??""} ${r(m),k(()=>r(m).items.length===1?"element":"elements")??""}${r(m),k(()=>r(m).laneCount>1?` · ${r(m).laneCount} stacked`:"")??""}`),st(Re,"data-track",(r(m),k(()=>r(m).trackId))),Ae(Re,(r(m),k(()=>`min-height: ${r(m).laneCount*34+7}px`)))},[()=>({selected:r(m).items.some(Ut=>Ut.element.id===r(ft))}),()=>(r(m),Zt(r(w)),k(()=>`min-height: ${r(m).laneCount*34+8}px; order: ${xf(r(w),r(m).trackId)}`)),()=>(r(m),k(()=>by(r(m))))]),A(h,B)});var C1=b(dh,2);ge(C1,1,()=>r(p),be,(h,m)=>{var w=sP();let B;var U=y(w);let O;var G=y(U),D=y(G);{var R=ot=>{$a(ot,{size:12})},tt=ot=>{cr(ot,{size:12})},ct=ot=>{var dt=ml();K(Y=>st(dt,"src",Y),[()=>(r(xt),r(m),k(()=>Js(r(xt).get(r(m).clips[0].clip.assetName),r(m).clips[0].clip.asset?.path)))]),A(ot,dt)},it=ot=>{nu(ot,{size:12})};Z(D,ot=>{r(m),k(()=>r(m).metadata?.role==="audio")?ot(R):(r(m),k(()=>r(m).clips[0]?.clip.asset?.type==="video")?ot(tt,1):(r(m),k(()=>r(m).clips[0]?.clip.asset?.path)?ot(ct,2):ot(it,-1)))})}var At=b(G,2),Ht=y(At),Kt=y(Ht),Ot=b(Ht,2),Xt=y(Ot),ut=b(At,2);{var Mt=ot=>{var dt=ZT(),Y=y(dt);{var Dt=Tt=>{var wt=hm();let ae;var pe=y(wt);{var Rt=se=>{Fl(se,{size:13})},Qt=se=>{lo(se,{size:13})};Z(pe,se=>{r(m),k(()=>r(m).metadata.hidden)?se(Rt):se(Qt,-1)})}K(()=>{ae=Ft(wt,1,"track-control svelte-1mvnu54",null,ae,{active:r(m).metadata.hidden}),st(wt,"title",(r(m),k(()=>r(m).metadata.hidden?"Show track":"Hide track"))),st(wt,"aria-label",(r(m),k(()=>r(m).metadata.hidden?"Show track":"Hide track")))}),P("click",wt,Rs(()=>kc(r(m).metadata,{hidden:!r(m).metadata.hidden}))),A(Tt,wt)};Z(Y,Tt=>{r(m),k(()=>r(m).metadata.role!=="audio")&&Tt(Dt)})}var lt=b(Y,2);{var J=Tt=>{var wt=hm();let ae;var pe=y(wt);{var Rt=se=>{Ax(se,{size:13})},Qt=se=>{Px(se,{size:13})};Z(pe,se=>{r(m),k(()=>r(m).metadata.muted)?se(Rt):se(Qt,-1)})}K(()=>{ae=Ft(wt,1,"track-control svelte-1mvnu54",null,ae,{active:r(m).metadata.muted}),st(wt,"title",(r(m),k(()=>r(m).metadata.muted?"Unmute track":"Mute track"))),st(wt,"aria-label",(r(m),k(()=>r(m).metadata.muted?"Unmute track":"Mute track")))}),P("click",wt,Rs(()=>kc(r(m).metadata,{muted:!r(m).metadata.muted}))),A(Tt,wt)};Z(lt,Tt=>{r(m),k(()=>r(m).metadata.role==="audio"||r(m).metadata.role==="main"||r(m).metadata.content==="video")&&Tt(J)})}A(ot,dt)};Z(ut,ot=>{r(m),k(()=>r(m).metadata)&&ot(Mt)})}var ne=b(U,2),Ue=y(ne);{var Xe=ot=>{var dt=lm(),Y=et(dt);let Dt;var lt=b(Y,2);{var J=wt=>{var ae=Nt(),pe=et(ae);ge(pe,1,()=>k(Oo),be,(Rt,Qt)=>{var se=om();K(Ri=>Ae(se,Ri),[()=>(r(Qt),r(o),k(()=>`left: ${si(ka(r(Qt).offset)+r(o))}%; top: 19.5px`))]),A(Rt,se)}),A(wt,ae)},Tt=ps(()=>(r(pt),r(ft),r(m),k(()=>r(pt).kind==="element"&&r(pt).id===r(ft)&&!r(m).elements.some(({item:wt})=>wt.element.id===r(ft)))));Z(lt,wt=>{r(Tt)&&wt(J)})}K(wt=>{Dt=Ft(Y,1,"clip-ghost svelte-1mvnu54",null,Dt,{invalid:!r(pt).valid}),Ae(Y,wt)},[()=>(r(pt),k(()=>`left: ${si(r(pt).ghostStart)}%; width: ${Math.max(.8,si(r(pt).duration))}%`))]),A(ot,dt)},Re=ps(()=>(r(pt),r(m),k(()=>r(pt)&&r(pt).ghostTrackId===String(r(m).track))));Z(Ue,ot=>{r(Re)&&ot(Xe)})}var Mi=b(Ue,2);{var ds=ot=>{var dt=tP();let Y;var Dt=y(dt);let lt;var J=y(Dt);{var Tt=Rt=>{var Qt=QT(),se=y(Qt);K(()=>{st(Qt,"viewBox",`0 0 ${r(pn)} 24`),st(se,"d",r(Et))}),A(Rt,Qt)};Z(J,Rt=>{r(Et)&&Rt(Tt)})}var wt=b(Dt,2),ae=y(wt),pe=b(wt,2);K(Rt=>{Y=Ft(dt,1,"clip audio-clip svelte-1mvnu54",null,Y,{muted:r(g)?.muted}),Ae(dt,Rt),lt=Ft(Dt,1,"audio-waveform svelte-1mvnu54",null,lt,{loading:r(_i)}),at(ae,r(Be)),st(pe,"aria-label",`Move audio ${r(Be)}`)},[()=>(r(C),r(Fi),k(()=>`left: ${si(r(C)?.audioStart??0)}%; width: ${si(r(Fi))}%; top: 6px`))]),P("pointerdown",pe,_y),A(ot,dt)};Z(Mi,ot=>{r(m),r(g),r(Be),k(()=>r(m).metadata?.id===r(g)?.id&&r(Be))&&ot(ds)})}var Es=b(Mi,2);ge(Es,1,()=>(r(m),k(()=>r(m).elements)),be,(ot,dt)=>{const Y=Nn(()=>(r(dt),k(()=>r(dt).item)));var Dt=um();let lt;var J=y(Dt);{var Tt=oe=>{var me=Eu(),te=y(me);cr(te,{size:13}),A(oe,me)},wt=oe=>{var me=Uu();K(te=>Ae(me,te),[()=>(r(xt),Zt(r(Y)),k(()=>`background-image: url('${Js(r(xt).get(r(Y).element.assetName??""),r(Y).element.asset.path)}')`))]),A(oe,me)},ae=oe=>{var me=vl(),te=y(me);K(fi=>at(te,fi),[()=>(Zt(r(Y)),k(()=>qi(r(Y).element,"value",r(Y).element.id)))]),A(oe,me)},pe=oe=>{var me=cm();K(te=>Ae(me,te),[()=>(Zt(r(Y)),k(()=>`background: ${qi(r(Y).element,"fill","#34404e")}`))]),A(oe,me)},Rt=oe=>{var me=vl(),te=y(me);K(()=>at(te,(Zt(r(Y)),k(()=>r(Y).element.id)))),A(oe,me)};Z(J,oe=>{Zt(r(Y)),k(()=>r(Y).element.kind==="asset"&&r(Y).element.asset?.type==="video")?oe(Tt):(Zt(r(Y)),k(()=>r(Y).element.kind==="asset"&&r(Y).element.asset?.path)?oe(wt,1):(Zt(r(Y)),k(()=>r(Y).element.kind==="text")?oe(ae,2):(Zt(r(Y)),k(()=>r(Y).element.kind==="overlay")?oe(pe,3):oe(Rt,-1))))})}var Qt=b(J,2),se=b(Qt,2),Ri=b(se,2);K(oe=>{lt=Ft(Dt,1,"clip element-clip svelte-1mvnu54",null,lt,{"selected-clip":r(Y).element.id===r(ft)}),Ae(Dt,oe),st(Qt,"aria-label",(Zt(r(Y)),k(()=>`Select or move ${r(Y).element.id}`))),st(se,"aria-label",(Zt(r(Y)),k(()=>`Trim start of ${r(Y).element.id}`))),st(Ri,"aria-label",(Zt(r(Y)),k(()=>`Trim end of ${r(Y).element.id}`)))},[()=>(Zt(r(Y)),r(dt),k(()=>`left: ${si(r(Y).range.start)}%; width: ${Math.max(.8,si(r(Y).range.end-r(Y).range.start))}%; top: ${6+r(dt).lane*34}px`))]),P("pointerdown",Qt,oe=>yf(oe,r(Y).element)),P("click",Qt,()=>_n(r(Y).element.id,!1)),P("pointerdown",se,oe=>Ao(oe,r(Y).element.id,"start")),P("pointerdown",Ri,oe=>Ao(oe,r(Y).element.id,"end")),A(ot,Dt)});var Us=b(Es,2);{var Ts=ot=>{const dt=Nn(()=>(r(m),r(ft),k(()=>r(m).elements.find(({item:J})=>J.element.id===r(ft))?.lane??0)));var Y=fm(),Dt=et(Y);ge(Dt,1,()=>k(Oo),be,(J,Tt)=>{var wt=dm();let ae;K((pe,Rt,Qt,se)=>{ae=Ft(wt,1,"keyframe-marker svelte-1mvnu54",null,ae,pe),Ae(wt,Rt),st(wt,"title",Qt),st(wt,"aria-label",se)},[()=>({"selected-keyframe":r(jt)!==null&&Math.abs(r(jt)-r(Tt).offset)<1e-6}),()=>(r(Tt),r(o),Zt(r(dt)),k(()=>`left: ${si(ka(r(Tt).offset)+r(o))}%; top: ${6+r(dt)*34+13.5}px`)),()=>(r(Tt),k(()=>`Keyframe ${Math.round(r(Tt).offset*100)}%${r(Tt).easing?" · "+r(Tt).easing:""} — drag to retime, right-click to delete`)),()=>(r(Tt),k(()=>`Keyframe at ${Math.round(r(Tt).offset*100)} percent`))]),P("pointerdown",wt,pe=>Uf(pe,r(Tt).offset)),P("contextmenu",wt,pe=>Bf(pe,r(Tt).offset)),A(J,wt)});var lt=b(Dt,2);K(J=>Ae(lt,J),[()=>(r(nt),Zt(r(dt)),k(()=>`left: ${si(r(nt))}%; top: ${6+r(dt)*34+13.5}px`))]),P("pointerdown",lt,Rs(function(J){sl.call(this,e,J)})),P("click",lt,Rs(Ic)),A(ot,Y)},Ve=ps(()=>(r(m),r(ft),r(pt),k(()=>r(m).elements.some(({item:ot})=>ot.element.id===r(ft))&&!(r(pt)?.kind==="element"&&r(pt).id===r(ft)&&r(pt).ghostTrackId!==String(r(m).track)))));Z(Us,ot=>{r(Ve)&&ot(Ts)})}var Ut=b(Us,2);ge(Ut,1,()=>(r(m),k(()=>r(m).clips)),be,(ot,dt)=>{const Y=Nn(()=>(r(dt),k(()=>r(dt).clip)));var Dt=iP();let lt;var J=y(Dt);{var Tt=te=>{var fi=Eu(),Qs=y(fi);cr(Qs,{size:13}),A(te,fi)},wt=te=>{var fi=Uu();K(Qs=>Ae(fi,Qs),[()=>(r(xt),Zt(r(Y)),k(()=>`background-image: url('${Js(r(xt).get(r(Y).assetName),r(Y).asset.path)}')`))]),A(te,fi)},ae=te=>{var fi=vl(),Qs=y(fi);K(()=>at(Qs,(Zt(r(Y)),k(()=>r(Y).assetName)))),A(te,fi)};Z(J,te=>{Zt(r(Y)),k(()=>r(Y).asset?.type==="video")?te(Tt):(Zt(r(Y)),k(()=>r(Y).asset?.path)?te(wt,1):te(ae,-1))})}var pe=b(J,2);{var Rt=te=>{var fi=eP(),Qs=y(fi);K((Hc,Vc)=>at(Qs,`↤ ${Hc??""}s · ${Vc??""}s ↦`),[()=>(Zt(r(Y)),k(()=>r(Y).trimIn.toFixed(2))),()=>(Zt(r(Y)),k(()=>r(Y).trimOut.toFixed(2)))]),A(te,fi)};Z(pe,te=>{Zt(r(Y)),k(()=>r(Y).trimIn>0||r(Y).trimOut>0)&&te(Rt)})}var Qt=b(pe,2),se=b(Qt,2),Ri=b(se,2),oe=b(Ri,2),me=y(oe);Ln(me,{size:12}),K(te=>{lt=Ft(Dt,1,"clip timeline-clip svelte-1mvnu54",null,lt,{"selected-clip":r(Y).id===r(ft)}),Ae(Dt,te),st(Qt,"aria-label",(Zt(r(Y)),k(()=>`Select ${r(Y).assetName} clip`))),st(se,"aria-label",(Zt(r(Y)),k(()=>`Trim start of ${r(Y).assetName}`))),st(Ri,"aria-label",(Zt(r(Y)),k(()=>`Trim end of ${r(Y).assetName}`)))},[()=>(Zt(r(Y)),r(dt),k(()=>`left: ${si(r(Y).start)}%; width: ${Math.max(.8,si(r(Y).duration))}%; top: ${6+r(dt).lane*34}px`))]),P("pointerdown",Qt,te=>my(te,r(Y))),P("click",Qt,()=>_n(r(Y).id,!1)),P("pointerdown",se,te=>bf(te,r(Y),"start")),P("pointerdown",Ri,te=>bf(te,r(Y),"end")),P("click",oe,Rs(()=>mf(r(Y).id))),A(ot,Dt)});var gt=b(Ut,2);ge(gt,1,()=>(r(_),r(m),k(()=>r(_).filter(ot=>String(ot.outgoing.track)===String(r(m).track)))),be,(ot,dt)=>{var Y=am();let Dt;var lt=y(Y);K((J,Tt)=>{Dt=Ft(Y,1,"transition-cut svelte-1mvnu54",null,Dt,{"has-transition":r(dt).type!==null,"drop-ready":r(Ks)!==null,"selected-transition":r(x)?.outgoing.id===r(dt).outgoing.id&&r(x)?.incoming.id===r(dt).incoming.id}),Ae(Y,J),st(Y,"title",Tt),st(Y,"aria-label",(r(dt),k(()=>r(dt).type?`Select crossfade between ${r(dt).outgoing.assetName} and ${r(dt).incoming.assetName}`:`Add transition between ${r(dt).outgoing.assetName} and ${r(dt).incoming.assetName}`))),at(lt,(r(dt),k(()=>r(dt).type?"×":"+")))},[()=>(r(dt),k(()=>`left: ${si(r(dt).at)}%`)),()=>(r(dt),k(()=>r(dt).type?`Crossfade · ${r(dt).duration.toFixed(2)}s`:"Drop a transition here"))]),P("dragover",Y,su(Rs(function(J){sl.call(this,e,J)}))),P("drop",Y,J=>dy(J,r(dt))),P("click",Y,Rs(()=>fy(r(dt)))),A(ot,Y)}),K((ot,dt)=>{B=Ft(w,1,"timeline-row clip-row svelte-1mvnu54",null,B,ot),Ae(w,dt),O=Ft(U,1,"track-label svelte-1mvnu54",null,O,{"track-hidden":r(m).metadata?.hidden}),at(Kt,(r(m),k(()=>r(m).metadata?.label??`Legacy Track ${r(m).track}`))),at(Xt,`${r(m),k(()=>r(m).metadata?.role??"overlay")??""} · ${r(m),k(()=>r(m).clips.length+r(m).elements.length)??""} ${r(m),k(()=>r(m).clips.length+r(m).elements.length===1?"item":"items")??""}`),st(ne,"data-track",(r(m),k(()=>r(m).track))),Ae(ne,(r(m),k(()=>`min-height: ${r(m).laneCount*34+7}px`)))},[()=>({selected:r(m).clips.some(({clip:ot})=>ot.id===r(ft))||r(m).elements.some(({item:ot})=>ot.element.id===r(ft))}),()=>(r(m),k(()=>`min-height: ${r(m).laneCount*34+8}px; order: ${xf(r(m).metadata,String(r(m).track))}`))]),A(h,w)}),an(yn,h=>S(Ke,h),()=>r(Ke));var fh=b(yn,2);an(fh,h=>S(rt,h),()=>r(rt));var Lc=b(Xf,2),$1=b(Lc,2);{var O1=h=>{var m=nP(),w=y(m),B=y(w),U=b(y(B),2),O=y(U);Ln(O,{size:20});var G=b(B,2),D=b(G,2);{var R=tt=>{var ct=ku(),it=y(ct);K(()=>at(it,`⚠️ ${r(vt)??""}`)),A(tt,ct)};Z(D,tt=>{r(vt)&&tt(R)})}P("click",U,Qd),zi(G,T),A(h,m)};Z($1,h=>{r(xi)&&h(O1)})}var F1=b(Ro,2);{var N1=h=>{var m=rP(),w=y(m),B=y(w),U=b(y(B),2),O=y(U);Ln(O,{size:18});var G=b(B,4),D=y(G),R=b(D,2);P("click",U,To),P("click",D,To),P("click",R,Kd),P("click",w,Rs(function(tt){sl.call(this,e,tt)})),P("keydown",w,tt=>tt.key==="Enter"&&Kd()),P("click",m,To),P("keydown",m,tt=>tt.key==="Escape"&&To()),A(h,m)};Z(F1,h=>{r(Oe)&&h(N1)})}return K((h,m,w,B,U,O)=>{Af=Ft(Ro,1,"motion-editor svelte-1mvnu54",null,Af,{fullscreen:r(Ss)}),Ae(Ro,`--timeline-height: ${r(di)}px`),If=Ft(Mc,1,"workbench svelte-1mvnu54",null,If,{"chat-open":r(ks)}),zf=Ft(Lo,1,"nav-item svelte-1mvnu54",null,zf,{active:r(Se)==="media"}),Cf=Ft(Ho,1,"nav-item svelte-1mvnu54",null,Cf,{active:r(Se)==="audio"}),$f=Ft(Vo,1,"nav-item svelte-1mvnu54",null,$f,{active:r(Se)==="text"}),Of=Ft(jo,1,"nav-item svelte-1mvnu54",null,Of,{active:r(Se)==="effects"}),Ff=Ft(Go,1,"nav-item svelte-1mvnu54",null,Ff,{active:r(Se)==="scenes"}),Nf=Ft(qo,1,"nav-item svelte-1mvnu54",null,Nf,{active:r(Se)==="ai"}),Df=Ft(zc,1,"nav-item svelte-1mvnu54",null,Df,{active:r(Se)==="settings"}),Lf=Ft(Cc,1,"chat-drawer svelte-1mvnu54",null,Lf,{collapsed:!r(ks)}),at(Yy,`${r(z)??""} x ${r($)??""}`),at(Xy,`${h??""}%`),Ae(Oc,r(V)),st(gn,"width",r(z)),st(gn,"height",r($)),Yf=Ft(gn,1,"preview-canvas svelte-1mvnu54",null,Yf,m),st(Wo,"title",r(Ct)?"Pause (Space)":"Play (Space)"),at(v1,w),at(g1,`Frame ${r(I)??""}`),at(b1,(r(i),r(s),k(()=>r(i)?.id??r(s)?.assetName??"Timeline"))),Yo.disabled=(r(Yt),k(()=>r(Yt).past.length===0)),Ko.disabled=(r(Yt),k(()=>r(Yt).future.length===0)),Xo.disabled=B,nh=Ft(Ua,1,"icon-btn svelte-1mvnu54",null,nh,{active:r(mn)}),st(Ua,"title",r(mn)?"Disable edge snapping":"Enable edge snapping"),at(A1,`${U??""}%`),oh=Ft(yn,1,"timeline-scroll svelte-1mvnu54",null,oh,{"drop-target":r(os)!==null||r(Fs)}),Ae(yn,O),st(Jo,"max",r(kt)),st(Jo,"step",(r(C),k(()=>1/(r(C)?.canvas.fps??60)))),_e(Jo,r(nt)),st(Lc,"title",r(xi)?"Hide .motion source":"Show .motion source")},[()=>(r(qe),k(()=>Math.round(r(qe)*100))),()=>({dragging:!!r(fe)}),()=>(r(nt),k(()=>yc(r(nt)))),()=>(r(s),r(nt),r(i),k(()=>!(r(s)&&r(nt)>r(s).start&&r(nt)<r(s).start+r(s).duration||r(i)&&r(nt)>vn(r(i).id).start&&r(nt)<vn(r(i).id).end))),()=>(r(wi),k(()=>Math.round(r(wi)*100))),()=>(r(N),r(nt),k(()=>`--timeline-content-width: ${r(N)}px; --playhead-position: ${si(r(nt))}%`))]),P("click",Lo,()=>S(Se,"media")),P("click",Ho,()=>S(Se,"audio")),P("click",Vo,()=>S(Se,"text")),P("click",jo,()=>S(Se,"effects")),P("click",Go,()=>S(Se,"scenes")),P("click",qo,()=>S(Se,"ai")),P("click",zc,()=>S(Se,"settings")),P("click",Gf,Or),P("click",Wf,Vg),P("pointerdown",gn,Kg),P("pointermove",gn,Xg),P("pointerup",gn,lf),P("pointercancel",gn,lf),P("pointerdown",Fc,Lg),P("keydown",Fc,Hg),P("click",Nc,Zd),P("click",Wo,function(...h){(r(Ct)?cs:Jd)?.apply(this,h)}),P("change",Dc,jg),P("click",Yo,$r),P("click",Ko,xa),P("click",Xo,Tc),P("click",Ua,()=>S(mn,!r(mn))),P("click",Rc,()=>Pc(r(wi)/1.25)),P("click",ah,()=>Pc(r(wi)*1.25)),P("input",Jo,Rg),P("dragover",yn,ny),P("drop",yn,ry),P("dragleave",yn,()=>S(Di,null)),P("wheel",yn,yy),P("loadedmetadata",fh,()=>S(bt,r(rt).duration)),P("click",Lc,Qd),A(t,Pf),Jb(e,"exportMp4",nf),sr(Py)}var lP=W('<strong class="svelte-18ujb4i"> </strong>'),cP=W('<img class="star-count svelte-18ujb4i" src="https://img.shields.io/github/stars/COPPSARY/Motionly?style=flat&amp;label=" alt="Stars"/>'),uP=W('<div class="app svelte-18ujb4i"><div class="top-bar svelte-18ujb4i"><div class="brand svelte-18ujb4i"><span class="logo-shell svelte-18ujb4i"><img alt="Motionly" class="logo svelte-18ujb4i"/></span> <h1 class="svelte-18ujb4i">Motionly</h1> <a class="product-hunt-badge svelte-18ujb4i" href="https://www.producthunt.com/products/motionly?embed=true&amp;utm_source=badge-featured&amp;utm_medium=badge&amp;utm_campaign=badge-motionly" target="_blank" rel="noopener noreferrer" aria-label="View Motionly on Product Hunt"><img alt="Motionly - Motionly is an AI-native motion graphics editor. | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=1197499&amp;theme=dark&amp;t=1784188075155" class="svelte-18ujb4i"/></a></div> <div class="file-info svelte-18ujb4i"><!> <span class="svelte-18ujb4i"> </span></div> <div class="actions svelte-18ujb4i"><input class="file-input svelte-18ujb4i" type="file" accept=".motion,text/plain"/> <button class="btn svelte-18ujb4i" title="Open .motion file"><!> <span class="action-label svelte-18ujb4i">Open</span></button> <button class="btn btn-primary svelte-18ujb4i" title="Save changes (Ctrl/Cmd+S)"><!> <span class="action-label svelte-18ujb4i">Save</span></button> <button class="btn export-action svelte-18ujb4i" title="Export MP4"><!> <span class="action-label svelte-18ujb4i"> </span></button> <a class="btn welcome-btn svelte-18ujb4i" title="View welcome guide" aria-label="View welcome guide"><!></a> <a class="btn github-btn svelte-18ujb4i" href="https://github.com/COPPSARY/Motionly" target="_blank" rel="noreferrer" title="Star Motionly on GitHub"><img alt="" class="svelte-18ujb4i"/> <!> <span class="action-label svelte-18ujb4i">Star</span> <!></a> <a class="btn docs-btn svelte-18ujb4i" href="https://motionly.mintlify.app/" target="_blank" rel="noreferrer" title="View Documentation" aria-label="View Documentation"><!> <span class="action-label svelte-18ujb4i">Documentation</span></a></div></div> <!></div>');function dP(t,e){ir(e,!1);const i=js("logo.svg"),s=js("github.svg"),n=`canvas {
2440
- size 1920x1080
2441
- fps 60
2442
- duration 5s
2443
- background #020308
2444
- }
2445
-
2446
- text title {
2447
- value "Motion graphics, written."
2448
- center
2449
- size 72
2450
- color #ffffff
2451
- opacity 1
2452
- }
2453
-
2454
- animate title {
2455
- from {
2456
- opacity 0
2457
- y 80
2458
- blur 10
2459
- }
2460
-
2461
- to {
2462
- opacity 1
2463
- y 0
2464
- blur 0
2465
- }
2466
-
2467
- duration 1.2s
2468
- easing power3.out
2469
- }`;let a=q(n),o=q("untitled.motion"),l=q(),c=q(null),u=!1,d=null,f=Promise.resolve(),p=q(),v=q(!1),g=q(0),_=q(null);ac(()=>(x(),N(),()=>{d&&clearTimeout(d)}));async function x(){try{let rt=await fetch("/api/motion-project",{cache:"no-store"});if(rt.ok&&rt.headers.get("content-type")?.startsWith("text/plain")){S(a,await rt.text()),S(o,rt.headers.get("x-motionly-project-name")||"project.motion"),u=!0;return}}catch(rt){console.warn(rt)}S(a,n)}async function E(){const rt=window.showOpenFilePicker;if(!rt){r(l).click();return}try{const[It]=await rt.call(window,{multiple:!1,types:[{description:"Motionly project",accept:{"text/plain":[".motion"]}}]});if(!It)return;const Be=await It.getFile();S(a,await Be.text()),S(o,Be.name),S(c,It),u=!1}catch(It){It.name!=="AbortError"&&console.error(It)}}async function I(){if(r(c)){await M(r(c),r(a));return}if(u){const _t=await fetch("/api/motion-project",{method:"PUT",headers:{"content-type":"text/plain;charset=utf-8"},body:r(a)});if(!_t.ok)throw new Error(`Could not save ${r(o)} (${_t.status})`);return}const rt=window.showSaveFilePicker;if(rt)try{S(c,await rt.call(window,{suggestedName:r(o).endsWith(".motion")?r(o):`${r(o)}.motion`,types:[{description:"Motionly project",accept:{"text/plain":[".motion"]}}]})),S(o,r(c).name),await M(r(c),r(a));return}catch(_t){_t.name!=="AbortError"&&console.error(_t);return}const It=new Blob([r(a)],{type:"text/plain;charset=utf-8"}),Be=URL.createObjectURL(It),bt=document.createElement("a");bt.href=Be,bt.download=r(o).endsWith(".motion")?r(o):`${r(o)}.motion`,bt.click(),URL.revokeObjectURL(Be)}async function z(rt){const It=rt.currentTarget.files?.[0];It&&(S(a,await It.text()),S(o,It.name),S(c,null),u=!1,Ce(l,r(l).value=""))}function $(rt){r(c)&&(d&&clearTimeout(d),d=setTimeout(()=>{const It=r(c);It&&(f=f.then(()=>M(It,rt)).catch(console.error))},250))}async function M(rt,It){const Be=await rt.createWritable();await Be.write(It),await Be.close()}async function V(){if(!(!r(p)||r(v))){S(v,!0),S(g,0);try{const rt=r(o).replace(/\.motion$/i,"")||"motionly";await r(p).exportMp4(`${rt}.mp4`,It=>S(g,It))}finally{S(v,!1)}}}async function N(){try{const rt=await fetch("https://api.github.com/repos/COPPSARY/Motionly");if(!rt.ok)return;const It=await rt.json();typeof It.stargazers_count=="number"&&S(_,It.stargazers_count)}catch{}}function H(rt){return new Intl.NumberFormat("en",{notation:"compact",maximumFractionDigits:1}).format(rt)}le(()=>(r(c),r(a)),()=>{r(c)&&$(r(a))}),ga(),Mr();var T=uP(),j=y(T),St=y(j),yt=y(St),ht=y(yt),vt=b(St,2),F=y(vt);Kh(F,{size:16});var C=b(F,2),Lt=y(C),xt=b(vt,2),He=y(xt);an(He,rt=>S(l,rt),()=>r(l));var ii=b(He,2),de=y(ii);_v(de,{size:18});var re=b(ii,2),xe=y(re);Sx(xe,{size:18});var Ct=b(re,2),nt=y(Ct);px(nt,{size:18});var ai=b(nt,2),kt=y(ai),Ge=b(Ct,2),fe=y(Ge);hx(fe,{size:18});var Me=b(Ge,2),pt=y(Me),jt=b(pt,2);Ux(jt,{size:14,fill:"currentColor"});var xi=b(jt,4);{var ft=rt=>{var It=lP(),Be=y(It);K(bt=>at(Be,bt),[()=>(r(_),k(()=>H(r(_))))]),A(rt,It)},qe=rt=>{var It=cP();A(rt,It)};Z(xi,rt=>{r(_)!==null?rt(ft):rt(qe,-1)})}var Ss=b(Me,2),Ii=y(Ss);Kh(Ii,{size:18});var as=b(j,2);an(oP(as,{onSave:I,get code(){return r(a)},set code(rt){S(a,rt)},$$legacy:!0}),rt=>S(p,rt),()=>r(p)),K((rt,It)=>{st(ht,"src",i),at(Lt,r(o)),Ct.disabled=r(v),at(kt,rt),st(Ge,"href",It),st(Me,"aria-label",r(_)===null?"Star Motionly on GitHub":`Star Motionly on GitHub, ${r(_)} stars`),st(pt,"src",s)},[()=>(r(v),r(g),k(()=>r(v)?`Exporting ${Math.round(r(g)*100)}%`:"Export MP4")),()=>(Zt(js),k(()=>`${js()}?welcome=1`))]),P("change",He,z),P("click",ii,E),P("click",re,I),P("click",Ct,V),A(t,T),sr()}const fP=new URLSearchParams(location.search).get("welcome")==="1",hP=localStorage.getItem(pv)==="true",Cg=ex(location.pathname,fP,hP,"/");Cg==="editor"&&mv(location.pathname).replace(/\/$/,"")!=="/editor"&&history.replaceState(null,"",js("editor"));i0({mode:"production"});Ab(Cg==="editor"?dP:Qx,{target:document.body});
2470
- //# sourceMappingURL=main-CrcFUwRU.js.map