hyperframes 0.6.32 → 0.6.34
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.
- package/dist/cli.js +30 -2
- package/dist/studio/assets/index-D1edGAWj.js +138 -0
- package/dist/studio/assets/index-SKRp8mGz.css +1 -0
- package/dist/studio/index.html +2 -2
- package/package.json +1 -1
- package/dist/studio/assets/index-C-pv1DOD.js +0 -120
- package/dist/studio/assets/index-Cd3DF1je.css +0 -1
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
var bT=Object.defineProperty;var vT=(t,e,n)=>e in t?bT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var k5=(t,e,n)=>vT(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const o of l.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function ST(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var m2={exports:{}},pc={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var M5;function wT(){if(M5)return pc;M5=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(r,i,l){var o=null;if(l!==void 0&&(o=""+l),i.key!==void 0&&(o=""+i.key),"key"in i){l={};for(var c in i)c!=="key"&&(l[c]=i[c])}else l=i;return i=l.ref,{$$typeof:t,type:r,key:o,ref:i!==void 0?i:null,props:l}}return pc.Fragment=e,pc.jsx=n,pc.jsxs=n,pc}var T5;function AT(){return T5||(T5=1,m2.exports=wT()),m2.exports}var g=AT(),p2={exports:{}},Ve={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var C5;function kT(){if(C5)return Ve;C5=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),y=Symbol.iterator;function b(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,A={};function k(P,R,X){this.props=P,this.context=R,this.refs=A,this.updater=X||S}k.prototype.isReactComponent={},k.prototype.setState=function(P,R){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,R,"setState")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function $(){}$.prototype=k.prototype;function Q(P,R,X){this.props=P,this.context=R,this.refs=A,this.updater=X||S}var C=Q.prototype=new $;C.constructor=Q,w(C,k.prototype),C.isPureReactComponent=!0;var M=Array.isArray;function Z(){}var E={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function _(P,R,X){var Y=X.ref;return{$$typeof:t,type:P,key:R,ref:Y!==void 0?Y:null,props:X}}function H(P,R){return _(P.type,R,P.props)}function L(P){return typeof P=="object"&&P!==null&&P.$$typeof===t}function z(P){var R={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(X){return R[X]})}var F=/\/+/g;function ee(P,R){return typeof P=="object"&&P!==null&&P.key!=null?z(""+P.key):R.toString(36)}function W(P){switch(P.status){case"fulfilled":return P.value;case"rejected":throw P.reason;default:switch(typeof P.status=="string"?P.then(Z,Z):(P.status="pending",P.then(function(R){P.status==="pending"&&(P.status="fulfilled",P.value=R)},function(R){P.status==="pending"&&(P.status="rejected",P.reason=R)})),P.status){case"fulfilled":return P.value;case"rejected":throw P.reason}}throw P}function V(P,R,X,Y,U){var te=typeof P;(te==="undefined"||te==="boolean")&&(P=null);var ne=!1;if(P===null)ne=!0;else switch(te){case"bigint":case"string":case"number":ne=!0;break;case"object":switch(P.$$typeof){case t:case e:ne=!0;break;case p:return ne=P._init,V(ne(P._payload),R,X,Y,U)}}if(ne)return U=U(P),ne=Y===""?"."+ee(P,0):Y,M(U)?(X="",ne!=null&&(X=ne.replace(F,"$&/")+"/"),V(U,R,X,"",function(Se){return Se})):U!=null&&(L(U)&&(U=H(U,X+(U.key==null||P&&P.key===U.key?"":(""+U.key).replace(F,"$&/")+"/")+ne)),R.push(U)),1;ne=0;var ce=Y===""?".":Y+":";if(M(P))for(var me=0;me<P.length;me++)Y=P[me],te=ce+ee(Y,me),ne+=V(Y,R,X,te,U);else if(me=b(P),typeof me=="function")for(P=me.call(P),me=0;!(Y=P.next()).done;)Y=Y.value,te=ce+ee(Y,me++),ne+=V(Y,R,X,te,U);else if(te==="object"){if(typeof P.then=="function")return V(W(P),R,X,Y,U);throw R=String(P),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return ne}function G(P,R,X){if(P==null)return P;var Y=[],U=0;return V(P,Y,"","",function(te){return R.call(X,te,U++)}),Y}function q(P){if(P._status===-1){var R=P._result;R=R(),R.then(function(X){(P._status===0||P._status===-1)&&(P._status=1,P._result=X)},function(X){(P._status===0||P._status===-1)&&(P._status=2,P._result=X)}),P._status===-1&&(P._status=0,P._result=R)}if(P._status===1)return P._result.default;throw P._result}var B=typeof reportError=="function"?reportError:function(P){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof P=="object"&&P!==null&&typeof P.message=="string"?String(P.message):String(P),error:P});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",P);return}console.error(P)},D={map:G,forEach:function(P,R,X){G(P,function(){R.apply(this,arguments)},X)},count:function(P){var R=0;return G(P,function(){R++}),R},toArray:function(P){return G(P,function(R){return R})||[]},only:function(P){if(!L(P))throw Error("React.Children.only expected to receive a single React element child.");return P}};return Ve.Activity=O,Ve.Children=D,Ve.Component=k,Ve.Fragment=n,Ve.Profiler=i,Ve.PureComponent=Q,Ve.StrictMode=r,Ve.Suspense=f,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(P){return E.H.useMemoCache(P)}},Ve.cache=function(P){return function(){return P.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(P,R,X){if(P==null)throw Error("The argument must be a React element, but you passed "+P+".");var Y=w({},P.props),U=P.key;if(R!=null)for(te in R.key!==void 0&&(U=""+R.key),R)!j.call(R,te)||te==="key"||te==="__self"||te==="__source"||te==="ref"&&R.ref===void 0||(Y[te]=R[te]);var te=arguments.length-2;if(te===1)Y.children=X;else if(1<te){for(var ne=Array(te),ce=0;ce<te;ce++)ne[ce]=arguments[ce+2];Y.children=ne}return _(P.type,U,Y)},Ve.createContext=function(P){return P={$$typeof:o,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null},P.Provider=P,P.Consumer={$$typeof:l,_context:P},P},Ve.createElement=function(P,R,X){var Y,U={},te=null;if(R!=null)for(Y in R.key!==void 0&&(te=""+R.key),R)j.call(R,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(U[Y]=R[Y]);var ne=arguments.length-2;if(ne===1)U.children=X;else if(1<ne){for(var ce=Array(ne),me=0;me<ne;me++)ce[me]=arguments[me+2];U.children=ce}if(P&&P.defaultProps)for(Y in ne=P.defaultProps,ne)U[Y]===void 0&&(U[Y]=ne[Y]);return _(P,te,U)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(P){return{$$typeof:c,render:P}},Ve.isValidElement=L,Ve.lazy=function(P){return{$$typeof:p,_payload:{_status:-1,_result:P},_init:q}},Ve.memo=function(P,R){return{$$typeof:m,type:P,compare:R===void 0?null:R}},Ve.startTransition=function(P){var R=E.T,X={};E.T=X;try{var Y=P(),U=E.S;U!==null&&U(X,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(Z,B)}catch(te){B(te)}finally{R!==null&&X.types!==null&&(R.types=X.types),E.T=R}},Ve.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Ve.use=function(P){return E.H.use(P)},Ve.useActionState=function(P,R,X){return E.H.useActionState(P,R,X)},Ve.useCallback=function(P,R){return E.H.useCallback(P,R)},Ve.useContext=function(P){return E.H.useContext(P)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(P,R){return E.H.useDeferredValue(P,R)},Ve.useEffect=function(P,R){return E.H.useEffect(P,R)},Ve.useEffectEvent=function(P){return E.H.useEffectEvent(P)},Ve.useId=function(){return E.H.useId()},Ve.useImperativeHandle=function(P,R,X){return E.H.useImperativeHandle(P,R,X)},Ve.useInsertionEffect=function(P,R){return E.H.useInsertionEffect(P,R)},Ve.useLayoutEffect=function(P,R){return E.H.useLayoutEffect(P,R)},Ve.useMemo=function(P,R){return E.H.useMemo(P,R)},Ve.useOptimistic=function(P,R){return E.H.useOptimistic(P,R)},Ve.useReducer=function(P,R,X){return E.H.useReducer(P,R,X)},Ve.useRef=function(P){return E.H.useRef(P)},Ve.useState=function(P){return E.H.useState(P)},Ve.useSyncExternalStore=function(P,R,X){return E.H.useSyncExternalStore(P,R,X)},Ve.useTransition=function(){return E.H.useTransition()},Ve.version="19.2.6",Ve}var E5;function Og(){return E5||(E5=1,p2.exports=kT()),p2.exports}var d=Og();const X0=ST(d);var g2={exports:{}},gc={},O2={exports:{}},x2={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var $5;function MT(){return $5||($5=1,(function(t){function e(V,G){var q=V.length;V.push(G);e:for(;0<q;){var B=q-1>>>1,D=V[B];if(0<i(D,G))V[B]=G,V[q]=D,q=B;else break e}}function n(V){return V.length===0?null:V[0]}function r(V){if(V.length===0)return null;var G=V[0],q=V.pop();if(q!==G){V[0]=q;e:for(var B=0,D=V.length,P=D>>>1;B<P;){var R=2*(B+1)-1,X=V[R],Y=R+1,U=V[Y];if(0>i(X,q))Y<D&&0>i(U,X)?(V[B]=U,V[Y]=q,B=Y):(V[B]=X,V[R]=q,B=R);else if(Y<D&&0>i(U,q))V[B]=U,V[Y]=q,B=Y;else break e}}return G}function i(V,G){var q=V.sortIndex-G.sortIndex;return q!==0?q:V.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var o=Date,c=o.now();t.unstable_now=function(){return o.now()-c}}var f=[],m=[],p=1,O=null,y=3,b=!1,S=!1,w=!1,A=!1,k=typeof setTimeout=="function"?setTimeout:null,$=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var G=n(m);G!==null;){if(G.callback===null)r(m);else if(G.startTime<=V)r(m),G.sortIndex=G.expirationTime,e(f,G);else break;G=n(m)}}function M(V){if(w=!1,C(V),!S)if(n(f)!==null)S=!0,Z||(Z=!0,z());else{var G=n(m);G!==null&&W(M,G.startTime-V)}}var Z=!1,E=-1,j=5,_=-1;function H(){return A?!0:!(t.unstable_now()-_<j)}function L(){if(A=!1,Z){var V=t.unstable_now();_=V;var G=!0;try{e:{S=!1,w&&(w=!1,$(E),E=-1),b=!0;var q=y;try{t:{for(C(V),O=n(f);O!==null&&!(O.expirationTime>V&&H());){var B=O.callback;if(typeof B=="function"){O.callback=null,y=O.priorityLevel;var D=B(O.expirationTime<=V);if(V=t.unstable_now(),typeof D=="function"){O.callback=D,C(V),G=!0;break t}O===n(f)&&r(f),C(V)}else r(f);O=n(f)}if(O!==null)G=!0;else{var P=n(m);P!==null&&W(M,P.startTime-V),G=!1}}break e}finally{O=null,y=q,b=!1}G=void 0}}finally{G?z():Z=!1}}}var z;if(typeof Q=="function")z=function(){Q(L)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,ee=F.port2;F.port1.onmessage=L,z=function(){ee.postMessage(null)}}else z=function(){k(L,0)};function W(V,G){E=k(function(){V(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<V?Math.floor(1e3/V):5},t.unstable_getCurrentPriorityLevel=function(){return y},t.unstable_next=function(V){switch(y){case 1:case 2:case 3:var G=3;break;default:G=y}var q=y;y=G;try{return V()}finally{y=q}},t.unstable_requestPaint=function(){A=!0},t.unstable_runWithPriority=function(V,G){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var q=y;y=V;try{return G()}finally{y=q}},t.unstable_scheduleCallback=function(V,G,q){var B=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?B+q:B):q=B,V){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=q+D,V={id:p++,callback:G,priorityLevel:V,startTime:q,expirationTime:D,sortIndex:-1},q>B?(V.sortIndex=q,e(m,V),n(f)===null&&V===n(m)&&(w?($(E),E=-1):w=!0,W(M,q-B))):(V.sortIndex=D,e(f,V),S||b||(S=!0,Z||(Z=!0,z()))),V},t.unstable_shouldYield=H,t.unstable_wrapCallback=function(V){var G=y;return function(){var q=y;y=G;try{return V.apply(this,arguments)}finally{y=q}}}})(x2)),x2}var Q5;function TT(){return Q5||(Q5=1,O2.exports=MT()),O2.exports}var y2={exports:{}},bn={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var P5;function CT(){if(P5)return bn;P5=1;var t=Og();function e(f){var m="https://react.dev/errors/"+f;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function l(f,m,p){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:O==null?null:""+O,children:f,containerInfo:m,implementation:p}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,m){if(f==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return bn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,bn.createPortal=function(f,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return l(f,m,null,p)},bn.flushSync=function(f){var m=o.T,p=r.p;try{if(o.T=null,r.p=2,f)return f()}finally{o.T=m,r.p=p,r.d.f()}},bn.preconnect=function(f,m){typeof f=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(f,m))},bn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},bn.preinit=function(f,m){if(typeof f=="string"&&m&&typeof m.as=="string"){var p=m.as,O=c(p,m.crossOrigin),y=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?r.d.S(f,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:O,integrity:y,fetchPriority:b}):p==="script"&&r.d.X(f,{crossOrigin:O,integrity:y,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},bn.preinitModule=function(f,m){if(typeof f=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=c(m.as,m.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(f)},bn.preload=function(f,m){if(typeof f=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,O=c(p,m.crossOrigin);r.d.L(f,p,{crossOrigin:O,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},bn.preloadModule=function(f,m){if(typeof f=="string")if(m){var p=c(m.as,m.crossOrigin);r.d.m(f,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(f)},bn.requestFormReset=function(f){r.d.r(f)},bn.unstable_batchedUpdates=function(f,m){return f(m)},bn.useFormState=function(f,m,p){return o.H.useFormState(f,m,p)},bn.useFormStatus=function(){return o.H.useHostTransitionStatus()},bn.version="19.2.6",bn}var Z5;function rv(){if(Z5)return y2.exports;Z5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),y2.exports=CT(),y2.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var j5;function ET(){if(j5)return gc;j5=1;var t=TT(),e=Og(),n=rv();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function l(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function o(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(l(a)!==a)throw Error(r(188))}function m(a){var s=a.alternate;if(!s){if(s=l(a),s===null)throw Error(r(188));return s!==a?null:a}for(var u=a,h=s;;){var x=u.return;if(x===null)break;var v=x.alternate;if(v===null){if(h=x.return,h!==null){u=h;continue}break}if(x.child===v.child){for(v=x.child;v;){if(v===u)return f(x),a;if(v===h)return f(x),s;v=v.sibling}throw Error(r(188))}if(u.return!==h.return)u=x,h=v;else{for(var T=!1,N=x.child;N;){if(N===u){T=!0,u=x,h=v;break}if(N===h){T=!0,h=x,u=v;break}N=N.sibling}if(!T){for(N=v.child;N;){if(N===u){T=!0,u=v,h=x;break}if(N===h){T=!0,h=v,u=x;break}N=N.sibling}if(!T)throw Error(r(189))}}if(u.alternate!==h)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var O=Object.assign,y=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),$=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),Z=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),_=Symbol.for("react.activity"),H=Symbol.for("react.memo_cache_sentinel"),L=Symbol.iterator;function z(a){return a===null||typeof a!="object"?null:(a=L&&a[L]||a["@@iterator"],typeof a=="function"?a:null)}var F=Symbol.for("react.client.reference");function ee(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===F?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case w:return"Fragment";case k:return"Profiler";case A:return"StrictMode";case M:return"Suspense";case Z:return"SuspenseList";case _:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case S:return"Portal";case Q:return a.displayName||"Context";case $:return(a._context.displayName||"Context")+".Consumer";case C:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case E:return s=a.displayName||null,s!==null?s:ee(a.type)||"Memo";case j:s=a._payload,a=a._init;try{return ee(a(s))}catch{}}return null}var W=Array.isArray,V=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},B=[],D=-1;function P(a){return{current:a}}function R(a){0>D||(a.current=B[D],B[D]=null,D--)}function X(a,s){D++,B[D]=a.current,a.current=s}var Y=P(null),U=P(null),te=P(null),ne=P(null);function ce(a,s){switch(X(te,s),X(U,a),X(Y,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?I4(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=I4(s),a=U4(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}R(Y),X(Y,a)}function me(){R(Y),R(U),R(te)}function Se(a){a.memoizedState!==null&&X(ne,a);var s=Y.current,u=U4(s,a.type);s!==u&&(X(U,a),X(Y,u))}function pe(a){U.current===a&&(R(Y),R(U)),ne.current===a&&(R(ne),fc._currentValue=q)}var ae,xe;function Qe(a){if(ae===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);ae=s&&s[1]||"",xe=-1<u.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ae+a+xe}var $e=!1;function Ze(a,s){if(!a||$e)return"";$e=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var h={DetermineComponentFrameRoot:function(){try{if(s){var de=function(){throw Error()};if(Object.defineProperty(de.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(de,[])}catch(oe){var se=oe}Reflect.construct(a,[],de)}else{try{de.call()}catch(oe){se=oe}a.call(de.prototype)}}else{try{throw Error()}catch(oe){se=oe}(de=a())&&typeof de.catch=="function"&&de.catch(function(){})}}catch(oe){if(oe&&se&&typeof oe.stack=="string")return[oe.stack,se.stack]}return[null,null]}};h.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(h.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(h.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var v=h.DetermineComponentFrameRoot(),T=v[0],N=v[1];if(T&&N){var I=T.split(`
|
|
44
|
-
`),le=N.split(`
|
|
45
|
-
`);for(x=h=0;h<I.length&&!I[h].includes("DetermineComponentFrameRoot");)h++;for(;x<le.length&&!le[x].includes("DetermineComponentFrameRoot");)x++;if(h===I.length||x===le.length)for(h=I.length-1,x=le.length-1;1<=h&&0<=x&&I[h]!==le[x];)x--;for(;1<=h&&0<=x;h--,x--)if(I[h]!==le[x]){if(h!==1||x!==1)do if(h--,x--,0>x||I[h]!==le[x]){var ue=`
|
|
46
|
-
`+I[h].replace(" at new "," at ");return a.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",a.displayName)),ue}while(1<=h&&0<=x);break}}}finally{$e=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?Qe(u):""}function Je(a,s){switch(a.tag){case 26:case 27:case 5:return Qe(a.type);case 16:return Qe("Lazy");case 13:return a.child!==s&&s!==null?Qe("Suspense Fallback"):Qe("Suspense");case 19:return Qe("SuspenseList");case 0:case 15:return Ze(a.type,!1);case 11:return Ze(a.type.render,!1);case 1:return Ze(a.type,!0);case 31:return Qe("Activity");default:return""}}function Ue(a){try{var s="",u=null;do s+=Je(a,u),u=a,a=a.return;while(a);return s}catch(h){return`
|
|
47
|
-
Error generating stack: `+h.message+`
|
|
48
|
-
`+h.stack}}var ve=Object.prototype.hasOwnProperty,bt=t.unstable_scheduleCallback,nt=t.unstable_cancelCallback,Re=t.unstable_shouldYield,kt=t.unstable_requestPaint,Fe=t.unstable_now,Gt=t.unstable_getCurrentPriorityLevel,Lt=t.unstable_ImmediatePriority,st=t.unstable_UserBlockingPriority,tn=t.unstable_NormalPriority,Ci=t.unstable_LowPriority,mr=t.unstable_IdlePriority,Ne=t.log,Mt=t.unstable_setDisableYieldValue,St=null,ze=null;function rt(a){if(typeof Ne=="function"&&Mt(a),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(St,a)}catch{}}var Ye=Math.clz32?Math.clz32:pr,nn=Math.log,Rn=Math.LN2;function pr(a){return a>>>=0,a===0?32:31-(nn(a)/Rn|0)|0}var Cn=256,Kt=262144,Gn=4194304;function un(a){var s=a&42;if(s!==0)return s;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function gr(a,s,u){var h=a.pendingLanes;if(h===0)return 0;var x=0,v=a.suspendedLanes,T=a.pingedLanes;a=a.warmLanes;var N=h&134217727;return N!==0?(h=N&~v,h!==0?x=un(h):(T&=N,T!==0?x=un(T):u||(u=N&~a,u!==0&&(x=un(u))))):(N=h&~v,N!==0?x=un(N):T!==0?x=un(T):u||(u=h&~a,u!==0&&(x=un(u)))),x===0?0:s!==0&&s!==x&&(s&v)===0&&(v=x&-x,u=s&-s,v>=u||v===32&&(u&4194048)!==0)?s:x}function Or(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function sa(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ka(){var a=Gn;return Gn<<=1,(Gn&62914560)===0&&(Gn=4194304),a}function _r(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function xr(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function Il(a,s,u,h,x,v){var T=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var N=a.entanglements,I=a.expirationTimes,le=a.hiddenUpdates;for(u=T&~u;0<u;){var ue=31-Ye(u),de=1<<ue;N[ue]=0,I[ue]=-1;var se=le[ue];if(se!==null)for(le[ue]=null,ue=0;ue<se.length;ue++){var oe=se[ue];oe!==null&&(oe.lane&=-536870913)}u&=~de}h!==0&&ye(a,h,0),v!==0&&x===0&&a.tag!==0&&(a.suspendedLanes|=v&~(T&~s))}function ye(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var h=31-Ye(s);a.entangledLanes|=s,a.entanglements[h]=a.entanglements[h]|1073741824|u&261930}function He(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var h=31-Ye(u),x=1<<h;x&s|a[h]&s&&(a[h]|=s),u&=~x}}function ft(a,s){var u=s&-s;return u=(u&42)!==0?1:Oe(u),(u&(a.suspendedLanes|s))!==0?0:u}function Oe(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function et(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ni(){var a=G.p;return a!==0?a:(a=window.event,a===void 0?32:x5(a.type))}function oa(a,s){var u=G.p;try{return G.p=a,s()}finally{G.p=u}}var ca=Math.random().toString(36).slice(2),fn="__reactFiber$"+ca,Nn="__reactProps$"+ca,Ul="__reactContainer$"+ca,ad="__reactEvents$"+ca,ck="__reactListeners$"+ca,uk="__reactHandles$"+ca,R8="__reactResources$"+ca,Mo="__reactMarker$"+ca;function ld(a){delete a[fn],delete a[Nn],delete a[ad],delete a[ck],delete a[uk]}function Wl(a){var s=a[fn];if(s)return s;for(var u=a.parentNode;u;){if(s=u[Ul]||u[fn]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=n5(a);a!==null;){if(u=a[fn])return u;a=n5(a)}return s}a=u,u=a.parentNode}return null}function Gl(a){if(a=a[fn]||a[Ul]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function To(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function Kl(a){var s=a[R8];return s||(s=a[R8]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function rn(a){a[Mo]=!0}var N8=new Set,V8={};function Ja(a,s){Jl(a,s),Jl(a+"Capture",s)}function Jl(a,s){for(V8[a]=s,a=0;a<s.length;a++)N8.add(s[a])}var fk=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),L8={},_8={};function dk(a){return ve.call(_8,a)?!0:ve.call(L8,a)?!1:fk.test(a)?_8[a]=!0:(L8[a]=!0,!1)}function $u(a,s,u){if(dk(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var h=s.toLowerCase().slice(0,5);if(h!=="data-"&&h!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function Qu(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function Ei(a,s,u,h){if(h===null)a.removeAttribute(u);else{switch(typeof h){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+h)}}function yr(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function D8(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function hk(a,s,u){var h=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var x=h.get,v=h.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return x.call(this)},set:function(T){u=""+T,v.call(this,T)}}),Object.defineProperty(a,s,{enumerable:h.enumerable}),{getValue:function(){return u},setValue:function(T){u=""+T},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function sd(a){if(!a._valueTracker){var s=D8(a)?"checked":"value";a._valueTracker=hk(a,s,""+a[s])}}function H8(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),h="";return a&&(h=D8(a)?a.checked?"true":"false":a.value),a=h,a!==u?(s.setValue(a),!0):!1}function Pu(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var mk=/[\n"\\]/g;function br(a){return a.replace(mk,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function od(a,s,u,h,x,v,T,N){a.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?a.type=T:a.removeAttribute("type"),s!=null?T==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+yr(s)):a.value!==""+yr(s)&&(a.value=""+yr(s)):T!=="submit"&&T!=="reset"||a.removeAttribute("value"),s!=null?cd(a,T,yr(s)):u!=null?cd(a,T,yr(u)):h!=null&&a.removeAttribute("value"),x==null&&v!=null&&(a.defaultChecked=!!v),x!=null&&(a.checked=x&&typeof x!="function"&&typeof x!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?a.name=""+yr(N):a.removeAttribute("name")}function X8(a,s,u,h,x,v,T,N){if(v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(a.type=v),s!=null||u!=null){if(!(v!=="submit"&&v!=="reset"||s!=null)){sd(a);return}u=u!=null?""+yr(u):"",s=s!=null?""+yr(s):u,N||s===a.value||(a.value=s),a.defaultValue=s}h=h??x,h=typeof h!="function"&&typeof h!="symbol"&&!!h,a.checked=N?a.checked:!!h,a.defaultChecked=!!h,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(a.name=T),sd(a)}function cd(a,s,u){s==="number"&&Pu(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function es(a,s,u,h){if(a=a.options,s){s={};for(var x=0;x<u.length;x++)s["$"+u[x]]=!0;for(u=0;u<a.length;u++)x=s.hasOwnProperty("$"+a[u].value),a[u].selected!==x&&(a[u].selected=x),x&&h&&(a[u].defaultSelected=!0)}else{for(u=""+yr(u),s=null,x=0;x<a.length;x++){if(a[x].value===u){a[x].selected=!0,h&&(a[x].defaultSelected=!0);return}s!==null||a[x].disabled||(s=a[x])}s!==null&&(s.selected=!0)}}function z8(a,s,u){if(s!=null&&(s=""+yr(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+yr(u):""}function F8(a,s,u,h){if(s==null){if(h!=null){if(u!=null)throw Error(r(92));if(W(h)){if(1<h.length)throw Error(r(93));h=h[0]}u=h}u==null&&(u=""),s=u}u=yr(s),a.defaultValue=u,h=a.textContent,h===u&&h!==""&&h!==null&&(a.value=h),sd(a)}function ts(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var pk=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Y8(a,s,u){var h=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?h?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":h?a.setProperty(s,u):typeof u!="number"||u===0||pk.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function B8(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var h in u)!u.hasOwnProperty(h)||s!=null&&s.hasOwnProperty(h)||(h.indexOf("--")===0?a.setProperty(h,""):h==="float"?a.cssFloat="":a[h]="");for(var x in s)h=s[x],s.hasOwnProperty(x)&&u[x]!==h&&Y8(a,x,h)}else for(var v in s)s.hasOwnProperty(v)&&Y8(a,v,s[v])}function ud(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var gk=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Ok=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Zu(a){return Ok.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function $i(){}var fd=null;function dd(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ns=null,rs=null;function q8(a){var s=Gl(a);if(s&&(a=s.stateNode)){var u=a[Nn]||null;e:switch(a=s.stateNode,s.type){case"input":if(od(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+br(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var h=u[s];if(h!==a&&h.form===a.form){var x=h[Nn]||null;if(!x)throw Error(r(90));od(h,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(s=0;s<u.length;s++)h=u[s],h.form===a.form&&H8(h)}break e;case"textarea":z8(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&es(a,!!u.multiple,s,!1)}}}var hd=!1;function I8(a,s,u){if(hd)return a(s,u);hd=!0;try{var h=a(s);return h}finally{if(hd=!1,(ns!==null||rs!==null)&&(b0(),ns&&(s=ns,a=rs,rs=ns=null,q8(s),a)))for(s=0;s<a.length;s++)q8(a[s])}}function Co(a,s){var u=a.stateNode;if(u===null)return null;var h=u[Nn]||null;if(h===null)return null;u=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(a=a.type,h=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!h;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var Qi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),md=!1;if(Qi)try{var Eo={};Object.defineProperty(Eo,"passive",{get:function(){md=!0}}),window.addEventListener("test",Eo,Eo),window.removeEventListener("test",Eo,Eo)}catch{md=!1}var ua=null,pd=null,ju=null;function U8(){if(ju)return ju;var a,s=pd,u=s.length,h,x="value"in ua?ua.value:ua.textContent,v=x.length;for(a=0;a<u&&s[a]===x[a];a++);var T=u-a;for(h=1;h<=T&&s[u-h]===x[v-h];h++);return ju=x.slice(a,1<h?1-h:void 0)}function Ru(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function Nu(){return!0}function W8(){return!1}function Vn(a){function s(u,h,x,v,T){this._reactName=u,this._targetInst=x,this.type=h,this.nativeEvent=v,this.target=T,this.currentTarget=null;for(var N in a)a.hasOwnProperty(N)&&(u=a[N],this[N]=u?u(v):v[N]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Nu:W8,this.isPropagationStopped=W8,this}return O(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=Nu)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=Nu)},persist:function(){},isPersistent:Nu}),s}var el={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Vu=Vn(el),$o=O({},el,{view:0,detail:0}),xk=Vn($o),gd,Od,Qo,Lu=O({},$o,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yd,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Qo&&(Qo&&a.type==="mousemove"?(gd=a.screenX-Qo.screenX,Od=a.screenY-Qo.screenY):Od=gd=0,Qo=a),gd)},movementY:function(a){return"movementY"in a?a.movementY:Od}}),G8=Vn(Lu),yk=O({},Lu,{dataTransfer:0}),bk=Vn(yk),vk=O({},$o,{relatedTarget:0}),xd=Vn(vk),Sk=O({},el,{animationName:0,elapsedTime:0,pseudoElement:0}),wk=Vn(Sk),Ak=O({},el,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),kk=Vn(Ak),Mk=O({},el,{data:0}),K8=Vn(Mk),Tk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ck={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Ek={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $k(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=Ek[a])?!!s[a]:!1}function yd(){return $k}var Qk=O({},$o,{key:function(a){if(a.key){var s=Tk[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=Ru(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Ck[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yd,charCode:function(a){return a.type==="keypress"?Ru(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Ru(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Pk=Vn(Qk),Zk=O({},Lu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),J8=Vn(Zk),jk=O({},$o,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yd}),Rk=Vn(jk),Nk=O({},el,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vk=Vn(Nk),Lk=O({},Lu,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),_k=Vn(Lk),Dk=O({},el,{newState:0,oldState:0}),Hk=Vn(Dk),Xk=[9,13,27,32],bd=Qi&&"CompositionEvent"in window,Po=null;Qi&&"documentMode"in document&&(Po=document.documentMode);var zk=Qi&&"TextEvent"in window&&!Po,eO=Qi&&(!bd||Po&&8<Po&&11>=Po),tO=" ",nO=!1;function rO(a,s){switch(a){case"keyup":return Xk.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iO(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var is=!1;function Fk(a,s){switch(a){case"compositionend":return iO(s);case"keypress":return s.which!==32?null:(nO=!0,tO);case"textInput":return a=s.data,a===tO&&nO?null:a;default:return null}}function Yk(a,s){if(is)return a==="compositionend"||!bd&&rO(a,s)?(a=U8(),ju=pd=ua=null,is=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return eO&&s.locale!=="ko"?null:s.data;default:return null}}var Bk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function aO(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!Bk[a.type]:s==="textarea"}function lO(a,s,u,h){ns?rs?rs.push(h):rs=[h]:ns=h,s=T0(s,"onChange"),0<s.length&&(u=new Vu("onChange","change",null,u,h),a.push({event:u,listeners:s}))}var Zo=null,jo=null;function qk(a){X4(a,0)}function _u(a){var s=To(a);if(H8(s))return a}function sO(a,s){if(a==="change")return s}var oO=!1;if(Qi){var vd;if(Qi){var Sd="oninput"in document;if(!Sd){var cO=document.createElement("div");cO.setAttribute("oninput","return;"),Sd=typeof cO.oninput=="function"}vd=Sd}else vd=!1;oO=vd&&(!document.documentMode||9<document.documentMode)}function uO(){Zo&&(Zo.detachEvent("onpropertychange",fO),jo=Zo=null)}function fO(a){if(a.propertyName==="value"&&_u(jo)){var s=[];lO(s,jo,a,dd(a)),I8(qk,s)}}function Ik(a,s,u){a==="focusin"?(uO(),Zo=s,jo=u,Zo.attachEvent("onpropertychange",fO)):a==="focusout"&&uO()}function Uk(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return _u(jo)}function Wk(a,s){if(a==="click")return _u(s)}function Gk(a,s){if(a==="input"||a==="change")return _u(s)}function Kk(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var Kn=typeof Object.is=="function"?Object.is:Kk;function Ro(a,s){if(Kn(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),h=Object.keys(s);if(u.length!==h.length)return!1;for(h=0;h<u.length;h++){var x=u[h];if(!ve.call(s,x)||!Kn(a[x],s[x]))return!1}return!0}function dO(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function hO(a,s){var u=dO(a);a=0;for(var h;u;){if(u.nodeType===3){if(h=a+u.textContent.length,a<=s&&h>=s)return{node:u,offset:s-a};a=h}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=dO(u)}}function mO(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?mO(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function pO(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Pu(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Pu(a.document)}return s}function wd(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var Jk=Qi&&"documentMode"in document&&11>=document.documentMode,as=null,Ad=null,No=null,kd=!1;function gO(a,s,u){var h=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;kd||as==null||as!==Pu(h)||(h=as,"selectionStart"in h&&wd(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),No&&Ro(No,h)||(No=h,h=T0(Ad,"onSelect"),0<h.length&&(s=new Vu("onSelect","select",null,s,u),a.push({event:s,listeners:h}),s.target=as)))}function tl(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var ls={animationend:tl("Animation","AnimationEnd"),animationiteration:tl("Animation","AnimationIteration"),animationstart:tl("Animation","AnimationStart"),transitionrun:tl("Transition","TransitionRun"),transitionstart:tl("Transition","TransitionStart"),transitioncancel:tl("Transition","TransitionCancel"),transitionend:tl("Transition","TransitionEnd")},Md={},OO={};Qi&&(OO=document.createElement("div").style,"AnimationEvent"in window||(delete ls.animationend.animation,delete ls.animationiteration.animation,delete ls.animationstart.animation),"TransitionEvent"in window||delete ls.transitionend.transition);function nl(a){if(Md[a])return Md[a];if(!ls[a])return a;var s=ls[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in OO)return Md[a]=s[u];return a}var xO=nl("animationend"),yO=nl("animationiteration"),bO=nl("animationstart"),eM=nl("transitionrun"),tM=nl("transitionstart"),nM=nl("transitioncancel"),vO=nl("transitionend"),SO=new Map,Td="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Td.push("scrollEnd");function Dr(a,s){SO.set(a,s),Ja(s,[a])}var Du=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},vr=[],ss=0,Cd=0;function Hu(){for(var a=ss,s=Cd=ss=0;s<a;){var u=vr[s];vr[s++]=null;var h=vr[s];vr[s++]=null;var x=vr[s];vr[s++]=null;var v=vr[s];if(vr[s++]=null,h!==null&&x!==null){var T=h.pending;T===null?x.next=x:(x.next=T.next,T.next=x),h.pending=x}v!==0&&wO(u,x,v)}}function Xu(a,s,u,h){vr[ss++]=a,vr[ss++]=s,vr[ss++]=u,vr[ss++]=h,Cd|=h,a.lanes|=h,a=a.alternate,a!==null&&(a.lanes|=h)}function Ed(a,s,u,h){return Xu(a,s,u,h),zu(a)}function rl(a,s){return Xu(a,null,null,s),zu(a)}function wO(a,s,u){a.lanes|=u;var h=a.alternate;h!==null&&(h.lanes|=u);for(var x=!1,v=a.return;v!==null;)v.childLanes|=u,h=v.alternate,h!==null&&(h.childLanes|=u),v.tag===22&&(a=v.stateNode,a===null||a._visibility&1||(x=!0)),a=v,v=v.return;return a.tag===3?(v=a.stateNode,x&&s!==null&&(x=31-Ye(u),a=v.hiddenUpdates,h=a[x],h===null?a[x]=[s]:h.push(s),s.lane=u|536870912),v):null}function zu(a){if(50<ic)throw ic=0,Lh=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var os={};function rM(a,s,u,h){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(a,s,u,h){return new rM(a,s,u,h)}function $d(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Pi(a,s){var u=a.alternate;return u===null?(u=Jn(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function AO(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Fu(a,s,u,h,x,v){var T=0;if(h=a,typeof a=="function")$d(a)&&(T=1);else if(typeof a=="string")T=oT(a,u,Y.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case _:return a=Jn(31,u,s,x),a.elementType=_,a.lanes=v,a;case w:return il(u.children,x,v,s);case A:T=8,x|=24;break;case k:return a=Jn(12,u,s,x|2),a.elementType=k,a.lanes=v,a;case M:return a=Jn(13,u,s,x),a.elementType=M,a.lanes=v,a;case Z:return a=Jn(19,u,s,x),a.elementType=Z,a.lanes=v,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Q:T=10;break e;case $:T=9;break e;case C:T=11;break e;case E:T=14;break e;case j:T=16,h=null;break e}T=29,u=Error(r(130,a===null?"null":typeof a,"")),h=null}return s=Jn(T,u,s,x),s.elementType=a,s.type=h,s.lanes=v,s}function il(a,s,u,h){return a=Jn(7,a,h,s),a.lanes=u,a}function Qd(a,s,u){return a=Jn(6,a,null,s),a.lanes=u,a}function kO(a){var s=Jn(18,null,null,0);return s.stateNode=a,s}function Pd(a,s,u){return s=Jn(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var MO=new WeakMap;function Sr(a,s){if(typeof a=="object"&&a!==null){var u=MO.get(a);return u!==void 0?u:(s={value:a,source:s,stack:Ue(s)},MO.set(a,s),s)}return{value:a,source:s,stack:Ue(s)}}var cs=[],us=0,Yu=null,Vo=0,wr=[],Ar=0,fa=null,ri=1,ii="";function Zi(a,s){cs[us++]=Vo,cs[us++]=Yu,Yu=a,Vo=s}function TO(a,s,u){wr[Ar++]=ri,wr[Ar++]=ii,wr[Ar++]=fa,fa=a;var h=ri;a=ii;var x=32-Ye(h)-1;h&=~(1<<x),u+=1;var v=32-Ye(s)+x;if(30<v){var T=x-x%5;v=(h&(1<<T)-1).toString(32),h>>=T,x-=T,ri=1<<32-Ye(s)+x|u<<x|h,ii=v+a}else ri=1<<v|u<<x|h,ii=a}function Zd(a){a.return!==null&&(Zi(a,1),TO(a,1,0))}function jd(a){for(;a===Yu;)Yu=cs[--us],cs[us]=null,Vo=cs[--us],cs[us]=null;for(;a===fa;)fa=wr[--Ar],wr[Ar]=null,ii=wr[--Ar],wr[Ar]=null,ri=wr[--Ar],wr[Ar]=null}function CO(a,s){wr[Ar++]=ri,wr[Ar++]=ii,wr[Ar++]=fa,ri=s.id,ii=s.overflow,fa=a}var dn=null,wt=null,Ke=!1,da=null,kr=!1,Rd=Error(r(519));function ha(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Lo(Sr(s,a)),Rd}function EO(a){var s=a.stateNode,u=a.type,h=a.memoizedProps;switch(s[fn]=a,s[Nn]=h,u){case"dialog":qe("cancel",s),qe("close",s);break;case"iframe":case"object":case"embed":qe("load",s);break;case"video":case"audio":for(u=0;u<lc.length;u++)qe(lc[u],s);break;case"source":qe("error",s);break;case"img":case"image":case"link":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"input":qe("invalid",s),X8(s,h.value,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name,!0);break;case"select":qe("invalid",s);break;case"textarea":qe("invalid",s),F8(s,h.value,h.defaultValue,h.children)}u=h.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||h.suppressHydrationWarning===!0||B4(s.textContent,u)?(h.popover!=null&&(qe("beforetoggle",s),qe("toggle",s)),h.onScroll!=null&&qe("scroll",s),h.onScrollEnd!=null&&qe("scrollend",s),h.onClick!=null&&(s.onclick=$i),s=!0):s=!1,s||ha(a,!0)}function $O(a){for(dn=a.return;dn;)switch(dn.tag){case 5:case 31:case 13:kr=!1;return;case 27:case 3:kr=!0;return;default:dn=dn.return}}function fs(a){if(a!==dn)return!1;if(!Ke)return $O(a),Ke=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||Jh(a.type,a.memoizedProps)),u=!u),u&&wt&&ha(a),$O(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));wt=t5(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));wt=t5(a)}else s===27?(s=wt,Ta(a.type)?(a=i2,i2=null,wt=a):wt=s):wt=dn?Tr(a.stateNode.nextSibling):null;return!0}function al(){wt=dn=null,Ke=!1}function Nd(){var a=da;return a!==null&&(Hn===null?Hn=a:Hn.push.apply(Hn,a),da=null),a}function Lo(a){da===null?da=[a]:da.push(a)}var Vd=P(null),ll=null,ji=null;function ma(a,s,u){X(Vd,s._currentValue),s._currentValue=u}function Ri(a){a._currentValue=Vd.current,R(Vd)}function Ld(a,s,u){for(;a!==null;){var h=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),a===u)break;a=a.return}}function _d(a,s,u,h){var x=a.child;for(x!==null&&(x.return=a);x!==null;){var v=x.dependencies;if(v!==null){var T=x.child;v=v.firstContext;e:for(;v!==null;){var N=v;v=x;for(var I=0;I<s.length;I++)if(N.context===s[I]){v.lanes|=u,N=v.alternate,N!==null&&(N.lanes|=u),Ld(v.return,u,a),h||(T=null);break e}v=N.next}}else if(x.tag===18){if(T=x.return,T===null)throw Error(r(341));T.lanes|=u,v=T.alternate,v!==null&&(v.lanes|=u),Ld(T,u,a),T=null}else T=x.child;if(T!==null)T.return=x;else for(T=x;T!==null;){if(T===a){T=null;break}if(x=T.sibling,x!==null){x.return=T.return,T=x;break}T=T.return}x=T}}function ds(a,s,u,h){a=null;for(var x=s,v=!1;x!==null;){if(!v){if((x.flags&524288)!==0)v=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var T=x.alternate;if(T===null)throw Error(r(387));if(T=T.memoizedProps,T!==null){var N=x.type;Kn(x.pendingProps.value,T.value)||(a!==null?a.push(N):a=[N])}}else if(x===ne.current){if(T=x.alternate,T===null)throw Error(r(387));T.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(a!==null?a.push(fc):a=[fc])}x=x.return}a!==null&&_d(s,a,u,h),s.flags|=262144}function Bu(a){for(a=a.firstContext;a!==null;){if(!Kn(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function sl(a){ll=a,ji=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function hn(a){return QO(ll,a)}function qu(a,s){return ll===null&&sl(a),QO(a,s)}function QO(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},ji===null){if(a===null)throw Error(r(308));ji=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else ji=ji.next=s;return u}var iM=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,h){a.push(h)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},aM=t.unstable_scheduleCallback,lM=t.unstable_NormalPriority,Yt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Dd(){return{controller:new iM,data:new Map,refCount:0}}function _o(a){a.refCount--,a.refCount===0&&aM(lM,function(){a.controller.abort()})}var Do=null,Hd=0,hs=0,ms=null;function sM(a,s){if(Do===null){var u=Do=[];Hd=0,hs=Fh(),ms={status:"pending",value:void 0,then:function(h){u.push(h)}}}return Hd++,s.then(PO,PO),s}function PO(){if(--Hd===0&&Do!==null){ms!==null&&(ms.status="fulfilled");var a=Do;Do=null,hs=0,ms=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function oM(a,s){var u=[],h={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return a.then(function(){h.status="fulfilled",h.value=s;for(var x=0;x<u.length;x++)(0,u[x])(s)},function(x){for(h.status="rejected",h.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),h}var ZO=V.S;V.S=function(a,s){g4=Fe(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&sM(a,s),ZO!==null&&ZO(a,s)};var ol=P(null);function Xd(){var a=ol.current;return a!==null?a:xt.pooledCache}function Iu(a,s){s===null?X(ol,ol.current):X(ol,s.pool)}function jO(){var a=Xd();return a===null?null:{parent:Yt._currentValue,pool:a}}var ps=Error(r(460)),zd=Error(r(474)),Uu=Error(r(542)),Wu={then:function(){}};function RO(a){return a=a.status,a==="fulfilled"||a==="rejected"}function NO(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then($i,$i),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,LO(a),a;default:if(typeof s.status=="string")s.then($i,$i);else{if(a=xt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(h){if(s.status==="pending"){var x=s;x.status="fulfilled",x.value=h}},function(h){if(s.status==="pending"){var x=s;x.status="rejected",x.reason=h}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,LO(a),a}throw ul=s,ps}}function cl(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(ul=u,ps):u}}var ul=null;function VO(){if(ul===null)throw Error(r(459));var a=ul;return ul=null,a}function LO(a){if(a===ps||a===Uu)throw Error(r(483))}var gs=null,Ho=0;function Gu(a){var s=Ho;return Ho+=1,gs===null&&(gs=[]),NO(gs,a,s)}function Xo(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Ku(a,s){throw s.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function _O(a){function s(re,J){if(a){var ie=re.deletions;ie===null?(re.deletions=[J],re.flags|=16):ie.push(J)}}function u(re,J){if(!a)return null;for(;J!==null;)s(re,J),J=J.sibling;return null}function h(re){for(var J=new Map;re!==null;)re.key!==null?J.set(re.key,re):J.set(re.index,re),re=re.sibling;return J}function x(re,J){return re=Pi(re,J),re.index=0,re.sibling=null,re}function v(re,J,ie){return re.index=ie,a?(ie=re.alternate,ie!==null?(ie=ie.index,ie<J?(re.flags|=67108866,J):ie):(re.flags|=67108866,J)):(re.flags|=1048576,J)}function T(re){return a&&re.alternate===null&&(re.flags|=67108866),re}function N(re,J,ie,fe){return J===null||J.tag!==6?(J=Qd(ie,re.mode,fe),J.return=re,J):(J=x(J,ie),J.return=re,J)}function I(re,J,ie,fe){var Ee=ie.type;return Ee===w?ue(re,J,ie.props.children,fe,ie.key):J!==null&&(J.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===j&&cl(Ee)===J.type)?(J=x(J,ie.props),Xo(J,ie),J.return=re,J):(J=Fu(ie.type,ie.key,ie.props,null,re.mode,fe),Xo(J,ie),J.return=re,J)}function le(re,J,ie,fe){return J===null||J.tag!==4||J.stateNode.containerInfo!==ie.containerInfo||J.stateNode.implementation!==ie.implementation?(J=Pd(ie,re.mode,fe),J.return=re,J):(J=x(J,ie.children||[]),J.return=re,J)}function ue(re,J,ie,fe,Ee){return J===null||J.tag!==7?(J=il(ie,re.mode,fe,Ee),J.return=re,J):(J=x(J,ie),J.return=re,J)}function de(re,J,ie){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=Qd(""+J,re.mode,ie),J.return=re,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return ie=Fu(J.type,J.key,J.props,null,re.mode,ie),Xo(ie,J),ie.return=re,ie;case S:return J=Pd(J,re.mode,ie),J.return=re,J;case j:return J=cl(J),de(re,J,ie)}if(W(J)||z(J))return J=il(J,re.mode,ie,null),J.return=re,J;if(typeof J.then=="function")return de(re,Gu(J),ie);if(J.$$typeof===Q)return de(re,qu(re,J),ie);Ku(re,J)}return null}function se(re,J,ie,fe){var Ee=J!==null?J.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Ee!==null?null:N(re,J,""+ie,fe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ie.key===Ee?I(re,J,ie,fe):null;case S:return ie.key===Ee?le(re,J,ie,fe):null;case j:return ie=cl(ie),se(re,J,ie,fe)}if(W(ie)||z(ie))return Ee!==null?null:ue(re,J,ie,fe,null);if(typeof ie.then=="function")return se(re,J,Gu(ie),fe);if(ie.$$typeof===Q)return se(re,J,qu(re,ie),fe);Ku(re,ie)}return null}function oe(re,J,ie,fe,Ee){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return re=re.get(ie)||null,N(J,re,""+fe,Ee);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case b:return re=re.get(fe.key===null?ie:fe.key)||null,I(J,re,fe,Ee);case S:return re=re.get(fe.key===null?ie:fe.key)||null,le(J,re,fe,Ee);case j:return fe=cl(fe),oe(re,J,ie,fe,Ee)}if(W(fe)||z(fe))return re=re.get(ie)||null,ue(J,re,fe,Ee,null);if(typeof fe.then=="function")return oe(re,J,ie,Gu(fe),Ee);if(fe.$$typeof===Q)return oe(re,J,ie,qu(J,fe),Ee);Ku(J,fe)}return null}function Ae(re,J,ie,fe){for(var Ee=null,ot=null,Te=J,De=J=0,Ge=null;Te!==null&&De<ie.length;De++){Te.index>De?(Ge=Te,Te=null):Ge=Te.sibling;var ct=se(re,Te,ie[De],fe);if(ct===null){Te===null&&(Te=Ge);break}a&&Te&&ct.alternate===null&&s(re,Te),J=v(ct,J,De),ot===null?Ee=ct:ot.sibling=ct,ot=ct,Te=Ge}if(De===ie.length)return u(re,Te),Ke&&Zi(re,De),Ee;if(Te===null){for(;De<ie.length;De++)Te=de(re,ie[De],fe),Te!==null&&(J=v(Te,J,De),ot===null?Ee=Te:ot.sibling=Te,ot=Te);return Ke&&Zi(re,De),Ee}for(Te=h(Te);De<ie.length;De++)Ge=oe(Te,re,De,ie[De],fe),Ge!==null&&(a&&Ge.alternate!==null&&Te.delete(Ge.key===null?De:Ge.key),J=v(Ge,J,De),ot===null?Ee=Ge:ot.sibling=Ge,ot=Ge);return a&&Te.forEach(function(Pa){return s(re,Pa)}),Ke&&Zi(re,De),Ee}function Pe(re,J,ie,fe){if(ie==null)throw Error(r(151));for(var Ee=null,ot=null,Te=J,De=J=0,Ge=null,ct=ie.next();Te!==null&&!ct.done;De++,ct=ie.next()){Te.index>De?(Ge=Te,Te=null):Ge=Te.sibling;var Pa=se(re,Te,ct.value,fe);if(Pa===null){Te===null&&(Te=Ge);break}a&&Te&&Pa.alternate===null&&s(re,Te),J=v(Pa,J,De),ot===null?Ee=Pa:ot.sibling=Pa,ot=Pa,Te=Ge}if(ct.done)return u(re,Te),Ke&&Zi(re,De),Ee;if(Te===null){for(;!ct.done;De++,ct=ie.next())ct=de(re,ct.value,fe),ct!==null&&(J=v(ct,J,De),ot===null?Ee=ct:ot.sibling=ct,ot=ct);return Ke&&Zi(re,De),Ee}for(Te=h(Te);!ct.done;De++,ct=ie.next())ct=oe(Te,re,De,ct.value,fe),ct!==null&&(a&&ct.alternate!==null&&Te.delete(ct.key===null?De:ct.key),J=v(ct,J,De),ot===null?Ee=ct:ot.sibling=ct,ot=ct);return a&&Te.forEach(function(yT){return s(re,yT)}),Ke&&Zi(re,De),Ee}function Ot(re,J,ie,fe){if(typeof ie=="object"&&ie!==null&&ie.type===w&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:e:{for(var Ee=ie.key;J!==null;){if(J.key===Ee){if(Ee=ie.type,Ee===w){if(J.tag===7){u(re,J.sibling),fe=x(J,ie.props.children),fe.return=re,re=fe;break e}}else if(J.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===j&&cl(Ee)===J.type){u(re,J.sibling),fe=x(J,ie.props),Xo(fe,ie),fe.return=re,re=fe;break e}u(re,J);break}else s(re,J);J=J.sibling}ie.type===w?(fe=il(ie.props.children,re.mode,fe,ie.key),fe.return=re,re=fe):(fe=Fu(ie.type,ie.key,ie.props,null,re.mode,fe),Xo(fe,ie),fe.return=re,re=fe)}return T(re);case S:e:{for(Ee=ie.key;J!==null;){if(J.key===Ee)if(J.tag===4&&J.stateNode.containerInfo===ie.containerInfo&&J.stateNode.implementation===ie.implementation){u(re,J.sibling),fe=x(J,ie.children||[]),fe.return=re,re=fe;break e}else{u(re,J);break}else s(re,J);J=J.sibling}fe=Pd(ie,re.mode,fe),fe.return=re,re=fe}return T(re);case j:return ie=cl(ie),Ot(re,J,ie,fe)}if(W(ie))return Ae(re,J,ie,fe);if(z(ie)){if(Ee=z(ie),typeof Ee!="function")throw Error(r(150));return ie=Ee.call(ie),Pe(re,J,ie,fe)}if(typeof ie.then=="function")return Ot(re,J,Gu(ie),fe);if(ie.$$typeof===Q)return Ot(re,J,qu(re,ie),fe);Ku(re,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,J!==null&&J.tag===6?(u(re,J.sibling),fe=x(J,ie),fe.return=re,re=fe):(u(re,J),fe=Qd(ie,re.mode,fe),fe.return=re,re=fe),T(re)):u(re,J)}return function(re,J,ie,fe){try{Ho=0;var Ee=Ot(re,J,ie,fe);return gs=null,Ee}catch(Te){if(Te===ps||Te===Uu)throw Te;var ot=Jn(29,Te,null,re.mode);return ot.lanes=fe,ot.return=re,ot}finally{}}}var fl=_O(!0),DO=_O(!1),pa=!1;function Fd(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yd(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function ga(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Oa(a,s,u){var h=a.updateQueue;if(h===null)return null;if(h=h.shared,(ut&2)!==0){var x=h.pending;return x===null?s.next=s:(s.next=x.next,x.next=s),h.pending=s,s=zu(a),wO(a,null,u),s}return Xu(a,h,s,u),zu(a)}function zo(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,He(a,u)}}function Bd(a,s){var u=a.updateQueue,h=a.alternate;if(h!==null&&(h=h.updateQueue,u===h)){var x=null,v=null;if(u=u.firstBaseUpdate,u!==null){do{var T={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};v===null?x=v=T:v=v.next=T,u=u.next}while(u!==null);v===null?x=v=s:v=v.next=s}else x=v=s;u={baseState:h.baseState,firstBaseUpdate:x,lastBaseUpdate:v,shared:h.shared,callbacks:h.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var qd=!1;function Fo(){if(qd){var a=ms;if(a!==null)throw a}}function Yo(a,s,u,h){qd=!1;var x=a.updateQueue;pa=!1;var v=x.firstBaseUpdate,T=x.lastBaseUpdate,N=x.shared.pending;if(N!==null){x.shared.pending=null;var I=N,le=I.next;I.next=null,T===null?v=le:T.next=le,T=I;var ue=a.alternate;ue!==null&&(ue=ue.updateQueue,N=ue.lastBaseUpdate,N!==T&&(N===null?ue.firstBaseUpdate=le:N.next=le,ue.lastBaseUpdate=I))}if(v!==null){var de=x.baseState;T=0,ue=le=I=null,N=v;do{var se=N.lane&-536870913,oe=se!==N.lane;if(oe?(We&se)===se:(h&se)===se){se!==0&&se===hs&&(qd=!0),ue!==null&&(ue=ue.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Ae=a,Pe=N;se=s;var Ot=u;switch(Pe.tag){case 1:if(Ae=Pe.payload,typeof Ae=="function"){de=Ae.call(Ot,de,se);break e}de=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Pe.payload,se=typeof Ae=="function"?Ae.call(Ot,de,se):Ae,se==null)break e;de=O({},de,se);break e;case 2:pa=!0}}se=N.callback,se!==null&&(a.flags|=64,oe&&(a.flags|=8192),oe=x.callbacks,oe===null?x.callbacks=[se]:oe.push(se))}else oe={lane:se,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ue===null?(le=ue=oe,I=de):ue=ue.next=oe,T|=se;if(N=N.next,N===null){if(N=x.shared.pending,N===null)break;oe=N,N=oe.next,oe.next=null,x.lastBaseUpdate=oe,x.shared.pending=null}}while(!0);ue===null&&(I=de),x.baseState=I,x.firstBaseUpdate=le,x.lastBaseUpdate=ue,v===null&&(x.shared.lanes=0),Sa|=T,a.lanes=T,a.memoizedState=de}}function HO(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function XO(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)HO(u[a],s)}var Os=P(null),Ju=P(0);function zO(a,s){a=Fi,X(Ju,a),X(Os,s),Fi=a|s.baseLanes}function Id(){X(Ju,Fi),X(Os,Os.current)}function Ud(){Fi=Ju.current,R(Os),R(Ju)}var er=P(null),Mr=null;function xa(a){var s=a.alternate;X(_t,_t.current&1),X(er,a),Mr===null&&(s===null||Os.current!==null||s.memoizedState!==null)&&(Mr=a)}function Wd(a){X(_t,_t.current),X(er,a),Mr===null&&(Mr=a)}function FO(a){a.tag===22?(X(_t,_t.current),X(er,a),Mr===null&&(Mr=a)):ya()}function ya(){X(_t,_t.current),X(er,er.current)}function tr(a){R(er),Mr===a&&(Mr=null),R(_t)}var _t=P(0);function e0(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||n2(u)||r2(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ni=0,_e=null,pt=null,Bt=null,t0=!1,xs=!1,dl=!1,n0=0,Bo=0,ys=null,cM=0;function Pt(){throw Error(r(321))}function Gd(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!Kn(a[u],s[u]))return!1;return!0}function Kd(a,s,u,h,x,v){return Ni=v,_e=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,V.H=a===null||a.memoizedState===null?T6:hh,dl=!1,v=u(h,x),dl=!1,xs&&(v=BO(s,u,h,x)),YO(a),v}function YO(a){V.H=Uo;var s=pt!==null&&pt.next!==null;if(Ni=0,Bt=pt=_e=null,t0=!1,Bo=0,ys=null,s)throw Error(r(300));a===null||qt||(a=a.dependencies,a!==null&&Bu(a)&&(qt=!0))}function BO(a,s,u,h){_e=a;var x=0;do{if(xs&&(ys=null),Bo=0,xs=!1,25<=x)throw Error(r(301));if(x+=1,Bt=pt=null,a.updateQueue!=null){var v=a.updateQueue;v.lastEffect=null,v.events=null,v.stores=null,v.memoCache!=null&&(v.memoCache.index=0)}V.H=C6,v=s(u,h)}while(xs);return v}function uM(){var a=V.H,s=a.useState()[0];return s=typeof s.then=="function"?qo(s):s,a=a.useState()[0],(pt!==null?pt.memoizedState:null)!==a&&(_e.flags|=1024),s}function Jd(){var a=n0!==0;return n0=0,a}function eh(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function th(a){if(t0){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}t0=!1}Ni=0,Bt=pt=_e=null,xs=!1,Bo=n0=0,ys=null}function En(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?_e.memoizedState=Bt=a:Bt=Bt.next=a,Bt}function Dt(){if(pt===null){var a=_e.alternate;a=a!==null?a.memoizedState:null}else a=pt.next;var s=Bt===null?_e.memoizedState:Bt.next;if(s!==null)Bt=s,pt=a;else{if(a===null)throw _e.alternate===null?Error(r(467)):Error(r(310));pt=a,a={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Bt===null?_e.memoizedState=Bt=a:Bt=Bt.next=a}return Bt}function r0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qo(a){var s=Bo;return Bo+=1,ys===null&&(ys=[]),a=NO(ys,a,s),s=_e,(Bt===null?s.memoizedState:Bt.next)===null&&(s=s.alternate,V.H=s===null||s.memoizedState===null?T6:hh),a}function i0(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return qo(a);if(a.$$typeof===Q)return hn(a)}throw Error(r(438,String(a)))}function nh(a){var s=null,u=_e.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var h=_e.alternate;h!==null&&(h=h.updateQueue,h!==null&&(h=h.memoCache,h!=null&&(s={data:h.data.map(function(x){return x.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=r0(),_e.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),h=0;h<a;h++)u[h]=H;return s.index++,u}function Vi(a,s){return typeof s=="function"?s(a):s}function a0(a){var s=Dt();return rh(s,pt,a)}function rh(a,s,u){var h=a.queue;if(h===null)throw Error(r(311));h.lastRenderedReducer=u;var x=a.baseQueue,v=h.pending;if(v!==null){if(x!==null){var T=x.next;x.next=v.next,v.next=T}s.baseQueue=x=v,h.pending=null}if(v=a.baseState,x===null)a.memoizedState=v;else{s=x.next;var N=T=null,I=null,le=s,ue=!1;do{var de=le.lane&-536870913;if(de!==le.lane?(We&de)===de:(Ni&de)===de){var se=le.revertLane;if(se===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),de===hs&&(ue=!0);else if((Ni&se)===se){le=le.next,se===hs&&(ue=!0);continue}else de={lane:0,revertLane:le.revertLane,gesture:null,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},I===null?(N=I=de,T=v):I=I.next=de,_e.lanes|=se,Sa|=se;de=le.action,dl&&u(v,de),v=le.hasEagerState?le.eagerState:u(v,de)}else se={lane:de,revertLane:le.revertLane,gesture:le.gesture,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null},I===null?(N=I=se,T=v):I=I.next=se,_e.lanes|=de,Sa|=de;le=le.next}while(le!==null&&le!==s);if(I===null?T=v:I.next=N,!Kn(v,a.memoizedState)&&(qt=!0,ue&&(u=ms,u!==null)))throw u;a.memoizedState=v,a.baseState=T,a.baseQueue=I,h.lastRenderedState=v}return x===null&&(h.lanes=0),[a.memoizedState,h.dispatch]}function ih(a){var s=Dt(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var h=u.dispatch,x=u.pending,v=s.memoizedState;if(x!==null){u.pending=null;var T=x=x.next;do v=a(v,T.action),T=T.next;while(T!==x);Kn(v,s.memoizedState)||(qt=!0),s.memoizedState=v,s.baseQueue===null&&(s.baseState=v),u.lastRenderedState=v}return[v,h]}function qO(a,s,u){var h=_e,x=Dt(),v=Ke;if(v){if(u===void 0)throw Error(r(407));u=u()}else u=s();var T=!Kn((pt||x).memoizedState,u);if(T&&(x.memoizedState=u,qt=!0),x=x.queue,sh(WO.bind(null,h,x,a),[a]),x.getSnapshot!==s||T||Bt!==null&&Bt.memoizedState.tag&1){if(h.flags|=2048,bs(9,{destroy:void 0},UO.bind(null,h,x,u,s),null),xt===null)throw Error(r(349));v||(Ni&127)!==0||IO(h,s,u)}return u}function IO(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=_e.updateQueue,s===null?(s=r0(),_e.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function UO(a,s,u,h){s.value=u,s.getSnapshot=h,GO(s)&&KO(a)}function WO(a,s,u){return u(function(){GO(s)&&KO(a)})}function GO(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!Kn(a,u)}catch{return!0}}function KO(a){var s=rl(a,2);s!==null&&Xn(s,a,2)}function ah(a){var s=En();if(typeof a=="function"){var u=a;if(a=u(),dl){rt(!0);try{u()}finally{rt(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vi,lastRenderedState:a},s}function JO(a,s,u,h){return a.baseState=u,rh(a,pt,typeof h=="function"?h:Vi)}function fM(a,s,u,h,x){if(o0(a))throw Error(r(485));if(a=s.action,a!==null){var v={payload:x,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){v.listeners.push(T)}};V.T!==null?u(!0):v.isTransition=!1,h(v),u=s.pending,u===null?(v.next=s.pending=v,e6(s,v)):(v.next=u.next,s.pending=u.next=v)}}function e6(a,s){var u=s.action,h=s.payload,x=a.state;if(s.isTransition){var v=V.T,T={};V.T=T;try{var N=u(x,h),I=V.S;I!==null&&I(T,N),t6(a,s,N)}catch(le){lh(a,s,le)}finally{v!==null&&T.types!==null&&(v.types=T.types),V.T=v}}else try{v=u(x,h),t6(a,s,v)}catch(le){lh(a,s,le)}}function t6(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(h){n6(a,s,h)},function(h){return lh(a,s,h)}):n6(a,s,u)}function n6(a,s,u){s.status="fulfilled",s.value=u,r6(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,e6(a,u)))}function lh(a,s,u){var h=a.pending;if(a.pending=null,h!==null){h=h.next;do s.status="rejected",s.reason=u,r6(s),s=s.next;while(s!==h)}a.action=null}function r6(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function i6(a,s){return s}function a6(a,s){if(Ke){var u=xt.formState;if(u!==null){e:{var h=_e;if(Ke){if(wt){t:{for(var x=wt,v=kr;x.nodeType!==8;){if(!v){x=null;break t}if(x=Tr(x.nextSibling),x===null){x=null;break t}}v=x.data,x=v==="F!"||v==="F"?x:null}if(x){wt=Tr(x.nextSibling),h=x.data==="F!";break e}}ha(h)}h=!1}h&&(s=u[0])}}return u=En(),u.memoizedState=u.baseState=s,h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i6,lastRenderedState:s},u.queue=h,u=A6.bind(null,_e,h),h.dispatch=u,h=ah(!1),v=dh.bind(null,_e,!1,h.queue),h=En(),x={state:s,dispatch:null,action:a,pending:null},h.queue=x,u=fM.bind(null,_e,x,v,u),x.dispatch=u,h.memoizedState=a,[s,u,!1]}function l6(a){var s=Dt();return s6(s,pt,a)}function s6(a,s,u){if(s=rh(a,s,i6)[0],a=a0(Vi)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var h=qo(s)}catch(T){throw T===ps?Uu:T}else h=s;s=Dt();var x=s.queue,v=x.dispatch;return u!==s.memoizedState&&(_e.flags|=2048,bs(9,{destroy:void 0},dM.bind(null,x,u),null)),[h,v,a]}function dM(a,s){a.action=s}function o6(a){var s=Dt(),u=pt;if(u!==null)return s6(s,u,a);Dt(),s=s.memoizedState,u=Dt();var h=u.queue.dispatch;return u.memoizedState=a,[s,h,!1]}function bs(a,s,u,h){return a={tag:a,create:u,deps:h,inst:s,next:null},s=_e.updateQueue,s===null&&(s=r0(),_e.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(h=u.next,u.next=a,a.next=h,s.lastEffect=a),a}function c6(){return Dt().memoizedState}function l0(a,s,u,h){var x=En();_e.flags|=a,x.memoizedState=bs(1|s,{destroy:void 0},u,h===void 0?null:h)}function s0(a,s,u,h){var x=Dt();h=h===void 0?null:h;var v=x.memoizedState.inst;pt!==null&&h!==null&&Gd(h,pt.memoizedState.deps)?x.memoizedState=bs(s,v,u,h):(_e.flags|=a,x.memoizedState=bs(1|s,v,u,h))}function u6(a,s){l0(8390656,8,a,s)}function sh(a,s){s0(2048,8,a,s)}function hM(a){_e.flags|=4;var s=_e.updateQueue;if(s===null)s=r0(),_e.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function f6(a){var s=Dt().memoizedState;return hM({ref:s,nextImpl:a}),function(){if((ut&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function d6(a,s){return s0(4,2,a,s)}function h6(a,s){return s0(4,4,a,s)}function m6(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function p6(a,s,u){u=u!=null?u.concat([a]):null,s0(4,4,m6.bind(null,s,a),u)}function oh(){}function g6(a,s){var u=Dt();s=s===void 0?null:s;var h=u.memoizedState;return s!==null&&Gd(s,h[1])?h[0]:(u.memoizedState=[a,s],a)}function O6(a,s){var u=Dt();s=s===void 0?null:s;var h=u.memoizedState;if(s!==null&&Gd(s,h[1]))return h[0];if(h=a(),dl){rt(!0);try{a()}finally{rt(!1)}}return u.memoizedState=[h,s],h}function ch(a,s,u){return u===void 0||(Ni&1073741824)!==0&&(We&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=x4(),_e.lanes|=a,Sa|=a,u)}function x6(a,s,u,h){return Kn(u,s)?u:Os.current!==null?(a=ch(a,u,h),Kn(a,s)||(qt=!0),a):(Ni&42)===0||(Ni&1073741824)!==0&&(We&261930)===0?(qt=!0,a.memoizedState=u):(a=x4(),_e.lanes|=a,Sa|=a,s)}function y6(a,s,u,h,x){var v=G.p;G.p=v!==0&&8>v?v:8;var T=V.T,N={};V.T=N,dh(a,!1,s,u);try{var I=x(),le=V.S;if(le!==null&&le(N,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ue=oM(I,h);Io(a,s,ue,ir(a))}else Io(a,s,h,ir(a))}catch(de){Io(a,s,{then:function(){},status:"rejected",reason:de},ir())}finally{G.p=v,T!==null&&N.types!==null&&(T.types=N.types),V.T=T}}function mM(){}function uh(a,s,u,h){if(a.tag!==5)throw Error(r(476));var x=b6(a).queue;y6(a,x,s,q,u===null?mM:function(){return v6(a),u(h)})}function b6(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vi,lastRenderedState:q},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vi,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function v6(a){var s=b6(a);s.next===null&&(s=a.alternate.memoizedState),Io(a,s.next.queue,{},ir())}function fh(){return hn(fc)}function S6(){return Dt().memoizedState}function w6(){return Dt().memoizedState}function pM(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=ir();a=ga(u);var h=Oa(s,a,u);h!==null&&(Xn(h,s,u),zo(h,s,u)),s={cache:Dd()},a.payload=s;return}s=s.return}}function gM(a,s,u){var h=ir();u={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},o0(a)?k6(s,u):(u=Ed(a,s,u,h),u!==null&&(Xn(u,a,h),M6(u,s,h)))}function A6(a,s,u){var h=ir();Io(a,s,u,h)}function Io(a,s,u,h){var x={lane:h,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(o0(a))k6(s,x);else{var v=a.alternate;if(a.lanes===0&&(v===null||v.lanes===0)&&(v=s.lastRenderedReducer,v!==null))try{var T=s.lastRenderedState,N=v(T,u);if(x.hasEagerState=!0,x.eagerState=N,Kn(N,T))return Xu(a,s,x,0),xt===null&&Hu(),!1}catch{}finally{}if(u=Ed(a,s,x,h),u!==null)return Xn(u,a,h),M6(u,s,h),!0}return!1}function dh(a,s,u,h){if(h={lane:2,revertLane:Fh(),gesture:null,action:h,hasEagerState:!1,eagerState:null,next:null},o0(a)){if(s)throw Error(r(479))}else s=Ed(a,u,h,2),s!==null&&Xn(s,a,2)}function o0(a){var s=a.alternate;return a===_e||s!==null&&s===_e}function k6(a,s){xs=t0=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function M6(a,s,u){if((u&4194048)!==0){var h=s.lanes;h&=a.pendingLanes,u|=h,s.lanes=u,He(a,u)}}var Uo={readContext:hn,use:i0,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};Uo.useEffectEvent=Pt;var T6={readContext:hn,use:i0,useCallback:function(a,s){return En().memoizedState=[a,s===void 0?null:s],a},useContext:hn,useEffect:u6,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,l0(4194308,4,m6.bind(null,s,a),u)},useLayoutEffect:function(a,s){return l0(4194308,4,a,s)},useInsertionEffect:function(a,s){l0(4,2,a,s)},useMemo:function(a,s){var u=En();s=s===void 0?null:s;var h=a();if(dl){rt(!0);try{a()}finally{rt(!1)}}return u.memoizedState=[h,s],h},useReducer:function(a,s,u){var h=En();if(u!==void 0){var x=u(s);if(dl){rt(!0);try{u(s)}finally{rt(!1)}}}else x=s;return h.memoizedState=h.baseState=x,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:x},h.queue=a,a=a.dispatch=gM.bind(null,_e,a),[h.memoizedState,a]},useRef:function(a){var s=En();return a={current:a},s.memoizedState=a},useState:function(a){a=ah(a);var s=a.queue,u=A6.bind(null,_e,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:oh,useDeferredValue:function(a,s){var u=En();return ch(u,a,s)},useTransition:function(){var a=ah(!1);return a=y6.bind(null,_e,a.queue,!0,!1),En().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var h=_e,x=En();if(Ke){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),xt===null)throw Error(r(349));(We&127)!==0||IO(h,s,u)}x.memoizedState=u;var v={value:u,getSnapshot:s};return x.queue=v,u6(WO.bind(null,h,v,a),[a]),h.flags|=2048,bs(9,{destroy:void 0},UO.bind(null,h,v,u,s),null),u},useId:function(){var a=En(),s=xt.identifierPrefix;if(Ke){var u=ii,h=ri;u=(h&~(1<<32-Ye(h)-1)).toString(32)+u,s="_"+s+"R_"+u,u=n0++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=cM++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:fh,useFormState:a6,useActionState:a6,useOptimistic:function(a){var s=En();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=dh.bind(null,_e,!0,u),u.dispatch=s,[a,s]},useMemoCache:nh,useCacheRefresh:function(){return En().memoizedState=pM.bind(null,_e)},useEffectEvent:function(a){var s=En(),u={impl:a};return s.memoizedState=u,function(){if((ut&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},hh={readContext:hn,use:i0,useCallback:g6,useContext:hn,useEffect:sh,useImperativeHandle:p6,useInsertionEffect:d6,useLayoutEffect:h6,useMemo:O6,useReducer:a0,useRef:c6,useState:function(){return a0(Vi)},useDebugValue:oh,useDeferredValue:function(a,s){var u=Dt();return x6(u,pt.memoizedState,a,s)},useTransition:function(){var a=a0(Vi)[0],s=Dt().memoizedState;return[typeof a=="boolean"?a:qo(a),s]},useSyncExternalStore:qO,useId:S6,useHostTransitionStatus:fh,useFormState:l6,useActionState:l6,useOptimistic:function(a,s){var u=Dt();return JO(u,pt,a,s)},useMemoCache:nh,useCacheRefresh:w6};hh.useEffectEvent=f6;var C6={readContext:hn,use:i0,useCallback:g6,useContext:hn,useEffect:sh,useImperativeHandle:p6,useInsertionEffect:d6,useLayoutEffect:h6,useMemo:O6,useReducer:ih,useRef:c6,useState:function(){return ih(Vi)},useDebugValue:oh,useDeferredValue:function(a,s){var u=Dt();return pt===null?ch(u,a,s):x6(u,pt.memoizedState,a,s)},useTransition:function(){var a=ih(Vi)[0],s=Dt().memoizedState;return[typeof a=="boolean"?a:qo(a),s]},useSyncExternalStore:qO,useId:S6,useHostTransitionStatus:fh,useFormState:o6,useActionState:o6,useOptimistic:function(a,s){var u=Dt();return pt!==null?JO(u,pt,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:nh,useCacheRefresh:w6};C6.useEffectEvent=f6;function mh(a,s,u,h){s=a.memoizedState,u=u(h,s),u=u==null?s:O({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var ph={enqueueSetState:function(a,s,u){a=a._reactInternals;var h=ir(),x=ga(h);x.payload=s,u!=null&&(x.callback=u),s=Oa(a,x,h),s!==null&&(Xn(s,a,h),zo(s,a,h))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var h=ir(),x=ga(h);x.tag=1,x.payload=s,u!=null&&(x.callback=u),s=Oa(a,x,h),s!==null&&(Xn(s,a,h),zo(s,a,h))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=ir(),h=ga(u);h.tag=2,s!=null&&(h.callback=s),s=Oa(a,h,u),s!==null&&(Xn(s,a,u),zo(s,a,u))}};function E6(a,s,u,h,x,v,T){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(h,v,T):s.prototype&&s.prototype.isPureReactComponent?!Ro(u,h)||!Ro(x,v):!0}function $6(a,s,u,h){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,h),s.state!==a&&ph.enqueueReplaceState(s,s.state,null)}function hl(a,s){var u=s;if("ref"in s){u={};for(var h in s)h!=="ref"&&(u[h]=s[h])}if(a=a.defaultProps){u===s&&(u=O({},u));for(var x in a)u[x]===void 0&&(u[x]=a[x])}return u}function Q6(a){Du(a)}function P6(a){console.error(a)}function Z6(a){Du(a)}function c0(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(h){setTimeout(function(){throw h})}}function j6(a,s,u){try{var h=a.onCaughtError;h(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function gh(a,s,u){return u=ga(u),u.tag=3,u.payload={element:null},u.callback=function(){c0(a,s)},u}function R6(a){return a=ga(a),a.tag=3,a}function N6(a,s,u,h){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var v=h.value;a.payload=function(){return x(v)},a.callback=function(){j6(s,u,h)}}var T=u.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(a.callback=function(){j6(s,u,h),typeof x!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var N=h.stack;this.componentDidCatch(h.value,{componentStack:N!==null?N:""})})}function OM(a,s,u,h,x){if(u.flags|=32768,h!==null&&typeof h=="object"&&typeof h.then=="function"){if(s=u.alternate,s!==null&&ds(s,u,x,!0),u=er.current,u!==null){switch(u.tag){case 31:case 13:return Mr===null?v0():u.alternate===null&&Zt===0&&(Zt=3),u.flags&=-257,u.flags|=65536,u.lanes=x,h===Wu?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([h]):s.add(h),Hh(a,h,x)),!1;case 22:return u.flags|=65536,h===Wu?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([h])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([h]):u.add(h)),Hh(a,h,x)),!1}throw Error(r(435,u.tag))}return Hh(a,h,x),v0(),!1}if(Ke)return s=er.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=x,h!==Rd&&(a=Error(r(422),{cause:h}),Lo(Sr(a,u)))):(h!==Rd&&(s=Error(r(423),{cause:h}),Lo(Sr(s,u))),a=a.current.alternate,a.flags|=65536,x&=-x,a.lanes|=x,h=Sr(h,u),x=gh(a.stateNode,h,x),Bd(a,x),Zt!==4&&(Zt=2)),!1;var v=Error(r(520),{cause:h});if(v=Sr(v,u),rc===null?rc=[v]:rc.push(v),Zt!==4&&(Zt=2),s===null)return!0;h=Sr(h,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=x&-x,u.lanes|=a,a=gh(u.stateNode,h,a),Bd(u,a),!1;case 1:if(s=u.type,v=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(wa===null||!wa.has(v))))return u.flags|=65536,x&=-x,u.lanes|=x,x=R6(x),N6(x,a,u,h),Bd(u,x),!1}u=u.return}while(u!==null);return!1}var Oh=Error(r(461)),qt=!1;function mn(a,s,u,h){s.child=a===null?DO(s,null,u,h):fl(s,a.child,u,h)}function V6(a,s,u,h,x){u=u.render;var v=s.ref;if("ref"in h){var T={};for(var N in h)N!=="ref"&&(T[N]=h[N])}else T=h;return sl(s),h=Kd(a,s,u,T,v,x),N=Jd(),a!==null&&!qt?(eh(a,s,x),Li(a,s,x)):(Ke&&N&&Zd(s),s.flags|=1,mn(a,s,h,x),s.child)}function L6(a,s,u,h,x){if(a===null){var v=u.type;return typeof v=="function"&&!$d(v)&&v.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=v,_6(a,s,v,h,x)):(a=Fu(u.type,null,h,s,s.mode,x),a.ref=s.ref,a.return=s,s.child=a)}if(v=a.child,!kh(a,x)){var T=v.memoizedProps;if(u=u.compare,u=u!==null?u:Ro,u(T,h)&&a.ref===s.ref)return Li(a,s,x)}return s.flags|=1,a=Pi(v,h),a.ref=s.ref,a.return=s,s.child=a}function _6(a,s,u,h,x){if(a!==null){var v=a.memoizedProps;if(Ro(v,h)&&a.ref===s.ref)if(qt=!1,s.pendingProps=h=v,kh(a,x))(a.flags&131072)!==0&&(qt=!0);else return s.lanes=a.lanes,Li(a,s,x)}return xh(a,s,u,h,x)}function D6(a,s,u,h){var x=h.children,v=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),h.mode==="hidden"){if((s.flags&128)!==0){if(v=v!==null?v.baseLanes|u:u,a!==null){for(h=s.child=a.child,x=0;h!==null;)x=x|h.lanes|h.childLanes,h=h.sibling;h=x&~v}else h=0,s.child=null;return H6(a,s,v,u,h)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Iu(s,v!==null?v.cachePool:null),v!==null?zO(s,v):Id(),FO(s);else return h=s.lanes=536870912,H6(a,s,v!==null?v.baseLanes|u:u,u,h)}else v!==null?(Iu(s,v.cachePool),zO(s,v),ya(),s.memoizedState=null):(a!==null&&Iu(s,null),Id(),ya());return mn(a,s,x,u),s.child}function Wo(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function H6(a,s,u,h,x){var v=Xd();return v=v===null?null:{parent:Yt._currentValue,pool:v},s.memoizedState={baseLanes:u,cachePool:v},a!==null&&Iu(s,null),Id(),FO(s),a!==null&&ds(a,s,h,!0),s.childLanes=x,null}function u0(a,s){return s=d0({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function X6(a,s,u){return fl(s,a.child,null,u),a=u0(s,s.pendingProps),a.flags|=2,tr(s),s.memoizedState=null,a}function xM(a,s,u){var h=s.pendingProps,x=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ke){if(h.mode==="hidden")return a=u0(s,h),s.lanes=536870912,Wo(null,a);if(Wd(s),(a=wt)?(a=e5(a,kr),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:fa!==null?{id:ri,overflow:ii}:null,retryLane:536870912,hydrationErrors:null},u=kO(a),u.return=s,s.child=u,dn=s,wt=null)):a=null,a===null)throw ha(s);return s.lanes=536870912,null}return u0(s,h)}var v=a.memoizedState;if(v!==null){var T=v.dehydrated;if(Wd(s),x)if(s.flags&256)s.flags&=-257,s=X6(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(qt||ds(a,s,u,!1),x=(u&a.childLanes)!==0,qt||x){if(h=xt,h!==null&&(T=ft(h,u),T!==0&&T!==v.retryLane))throw v.retryLane=T,rl(a,T),Xn(h,a,T),Oh;v0(),s=X6(a,s,u)}else a=v.treeContext,wt=Tr(T.nextSibling),dn=s,Ke=!0,da=null,kr=!1,a!==null&&CO(s,a),s=u0(s,h),s.flags|=4096;return s}return a=Pi(a.child,{mode:h.mode,children:h.children}),a.ref=s.ref,s.child=a,a.return=s,a}function f0(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function xh(a,s,u,h,x){return sl(s),u=Kd(a,s,u,h,void 0,x),h=Jd(),a!==null&&!qt?(eh(a,s,x),Li(a,s,x)):(Ke&&h&&Zd(s),s.flags|=1,mn(a,s,u,x),s.child)}function z6(a,s,u,h,x,v){return sl(s),s.updateQueue=null,u=BO(s,h,u,x),YO(a),h=Jd(),a!==null&&!qt?(eh(a,s,v),Li(a,s,v)):(Ke&&h&&Zd(s),s.flags|=1,mn(a,s,u,v),s.child)}function F6(a,s,u,h,x){if(sl(s),s.stateNode===null){var v=os,T=u.contextType;typeof T=="object"&&T!==null&&(v=hn(T)),v=new u(h,v),s.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,v.updater=ph,s.stateNode=v,v._reactInternals=s,v=s.stateNode,v.props=h,v.state=s.memoizedState,v.refs={},Fd(s),T=u.contextType,v.context=typeof T=="object"&&T!==null?hn(T):os,v.state=s.memoizedState,T=u.getDerivedStateFromProps,typeof T=="function"&&(mh(s,u,T,h),v.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(T=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),T!==v.state&&ph.enqueueReplaceState(v,v.state,null),Yo(s,h,v,x),Fo(),v.state=s.memoizedState),typeof v.componentDidMount=="function"&&(s.flags|=4194308),h=!0}else if(a===null){v=s.stateNode;var N=s.memoizedProps,I=hl(u,N);v.props=I;var le=v.context,ue=u.contextType;T=os,typeof ue=="object"&&ue!==null&&(T=hn(ue));var de=u.getDerivedStateFromProps;ue=typeof de=="function"||typeof v.getSnapshotBeforeUpdate=="function",N=s.pendingProps!==N,ue||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(N||le!==T)&&$6(s,v,h,T),pa=!1;var se=s.memoizedState;v.state=se,Yo(s,h,v,x),Fo(),le=s.memoizedState,N||se!==le||pa?(typeof de=="function"&&(mh(s,u,de,h),le=s.memoizedState),(I=pa||E6(s,u,I,h,se,le,T))?(ue||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(s.flags|=4194308)):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=le),v.props=h,v.state=le,v.context=T,h=I):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{v=s.stateNode,Yd(a,s),T=s.memoizedProps,ue=hl(u,T),v.props=ue,de=s.pendingProps,se=v.context,le=u.contextType,I=os,typeof le=="object"&&le!==null&&(I=hn(le)),N=u.getDerivedStateFromProps,(le=typeof N=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(T!==de||se!==I)&&$6(s,v,h,I),pa=!1,se=s.memoizedState,v.state=se,Yo(s,h,v,x),Fo();var oe=s.memoizedState;T!==de||se!==oe||pa||a!==null&&a.dependencies!==null&&Bu(a.dependencies)?(typeof N=="function"&&(mh(s,u,N,h),oe=s.memoizedState),(ue=pa||E6(s,u,ue,h,se,oe,I)||a!==null&&a.dependencies!==null&&Bu(a.dependencies))?(le||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,oe,I),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,oe,I)),typeof v.componentDidUpdate=="function"&&(s.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof v.componentDidUpdate!="function"||T===a.memoizedProps&&se===a.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&se===a.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=oe),v.props=h,v.state=oe,v.context=I,h=ue):(typeof v.componentDidUpdate!="function"||T===a.memoizedProps&&se===a.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||T===a.memoizedProps&&se===a.memoizedState||(s.flags|=1024),h=!1)}return v=h,f0(a,s),h=(s.flags&128)!==0,v||h?(v=s.stateNode,u=h&&typeof u.getDerivedStateFromError!="function"?null:v.render(),s.flags|=1,a!==null&&h?(s.child=fl(s,a.child,null,x),s.child=fl(s,null,u,x)):mn(a,s,u,x),s.memoizedState=v.state,a=s.child):a=Li(a,s,x),a}function Y6(a,s,u,h){return al(),s.flags|=256,mn(a,s,u,h),s.child}var yh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bh(a){return{baseLanes:a,cachePool:jO()}}function vh(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=rr),a}function B6(a,s,u){var h=s.pendingProps,x=!1,v=(s.flags&128)!==0,T;if((T=v)||(T=a!==null&&a.memoizedState===null?!1:(_t.current&2)!==0),T&&(x=!0,s.flags&=-129),T=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ke){if(x?xa(s):ya(),(a=wt)?(a=e5(a,kr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:fa!==null?{id:ri,overflow:ii}:null,retryLane:536870912,hydrationErrors:null},u=kO(a),u.return=s,s.child=u,dn=s,wt=null)):a=null,a===null)throw ha(s);return r2(a)?s.lanes=32:s.lanes=536870912,null}var N=h.children;return h=h.fallback,x?(ya(),x=s.mode,N=d0({mode:"hidden",children:N},x),h=il(h,x,u,null),N.return=s,h.return=s,N.sibling=h,s.child=N,h=s.child,h.memoizedState=bh(u),h.childLanes=vh(a,T,u),s.memoizedState=yh,Wo(null,h)):(xa(s),Sh(s,N))}var I=a.memoizedState;if(I!==null&&(N=I.dehydrated,N!==null)){if(v)s.flags&256?(xa(s),s.flags&=-257,s=wh(a,s,u)):s.memoizedState!==null?(ya(),s.child=a.child,s.flags|=128,s=null):(ya(),N=h.fallback,x=s.mode,h=d0({mode:"visible",children:h.children},x),N=il(N,x,u,null),N.flags|=2,h.return=s,N.return=s,h.sibling=N,s.child=h,fl(s,a.child,null,u),h=s.child,h.memoizedState=bh(u),h.childLanes=vh(a,T,u),s.memoizedState=yh,s=Wo(null,h));else if(xa(s),r2(N)){if(T=N.nextSibling&&N.nextSibling.dataset,T)var le=T.dgst;T=le,h=Error(r(419)),h.stack="",h.digest=T,Lo({value:h,source:null,stack:null}),s=wh(a,s,u)}else if(qt||ds(a,s,u,!1),T=(u&a.childLanes)!==0,qt||T){if(T=xt,T!==null&&(h=ft(T,u),h!==0&&h!==I.retryLane))throw I.retryLane=h,rl(a,h),Xn(T,a,h),Oh;n2(N)||v0(),s=wh(a,s,u)}else n2(N)?(s.flags|=192,s.child=a.child,s=null):(a=I.treeContext,wt=Tr(N.nextSibling),dn=s,Ke=!0,da=null,kr=!1,a!==null&&CO(s,a),s=Sh(s,h.children),s.flags|=4096);return s}return x?(ya(),N=h.fallback,x=s.mode,I=a.child,le=I.sibling,h=Pi(I,{mode:"hidden",children:h.children}),h.subtreeFlags=I.subtreeFlags&65011712,le!==null?N=Pi(le,N):(N=il(N,x,u,null),N.flags|=2),N.return=s,h.return=s,h.sibling=N,s.child=h,Wo(null,h),h=s.child,N=a.child.memoizedState,N===null?N=bh(u):(x=N.cachePool,x!==null?(I=Yt._currentValue,x=x.parent!==I?{parent:I,pool:I}:x):x=jO(),N={baseLanes:N.baseLanes|u,cachePool:x}),h.memoizedState=N,h.childLanes=vh(a,T,u),s.memoizedState=yh,Wo(a.child,h)):(xa(s),u=a.child,a=u.sibling,u=Pi(u,{mode:"visible",children:h.children}),u.return=s,u.sibling=null,a!==null&&(T=s.deletions,T===null?(s.deletions=[a],s.flags|=16):T.push(a)),s.child=u,s.memoizedState=null,u)}function Sh(a,s){return s=d0({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function d0(a,s){return a=Jn(22,a,null,s),a.lanes=0,a}function wh(a,s,u){return fl(s,a.child,null,u),a=Sh(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function q6(a,s,u){a.lanes|=s;var h=a.alternate;h!==null&&(h.lanes|=s),Ld(a.return,s,u)}function Ah(a,s,u,h,x,v){var T=a.memoizedState;T===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:u,tailMode:x,treeForkCount:v}:(T.isBackwards=s,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=u,T.tailMode=x,T.treeForkCount=v)}function I6(a,s,u){var h=s.pendingProps,x=h.revealOrder,v=h.tail;h=h.children;var T=_t.current,N=(T&2)!==0;if(N?(T=T&1|2,s.flags|=128):T&=1,X(_t,T),mn(a,s,h,u),h=Ke?Vo:0,!N&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&q6(a,u,s);else if(a.tag===19)q6(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(x){case"forwards":for(u=s.child,x=null;u!==null;)a=u.alternate,a!==null&&e0(a)===null&&(x=u),u=u.sibling;u=x,u===null?(x=s.child,s.child=null):(x=u.sibling,u.sibling=null),Ah(s,!1,x,u,v,h);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=s.child,s.child=null;x!==null;){if(a=x.alternate,a!==null&&e0(a)===null){s.child=x;break}a=x.sibling,x.sibling=u,u=x,x=a}Ah(s,!0,u,null,v,h);break;case"together":Ah(s,!1,null,null,void 0,h);break;default:s.memoizedState=null}return s.child}function Li(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),Sa|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(ds(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,u=Pi(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=Pi(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function kh(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&Bu(a)))}function yM(a,s,u){switch(s.tag){case 3:ce(s,s.stateNode.containerInfo),ma(s,Yt,a.memoizedState.cache),al();break;case 27:case 5:Se(s);break;case 4:ce(s,s.stateNode.containerInfo);break;case 10:ma(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Wd(s),null;break;case 13:var h=s.memoizedState;if(h!==null)return h.dehydrated!==null?(xa(s),s.flags|=128,null):(u&s.child.childLanes)!==0?B6(a,s,u):(xa(s),a=Li(a,s,u),a!==null?a.sibling:null);xa(s);break;case 19:var x=(a.flags&128)!==0;if(h=(u&s.childLanes)!==0,h||(ds(a,s,u,!1),h=(u&s.childLanes)!==0),x){if(h)return I6(a,s,u);s.flags|=128}if(x=s.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),X(_t,_t.current),h)break;return null;case 22:return s.lanes=0,D6(a,s,u,s.pendingProps);case 24:ma(s,Yt,a.memoizedState.cache)}return Li(a,s,u)}function U6(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)qt=!0;else{if(!kh(a,u)&&(s.flags&128)===0)return qt=!1,yM(a,s,u);qt=(a.flags&131072)!==0}else qt=!1,Ke&&(s.flags&1048576)!==0&&TO(s,Vo,s.index);switch(s.lanes=0,s.tag){case 16:e:{var h=s.pendingProps;if(a=cl(s.elementType),s.type=a,typeof a=="function")$d(a)?(h=hl(a,h),s.tag=1,s=F6(null,s,a,h,u)):(s.tag=0,s=xh(null,s,a,h,u));else{if(a!=null){var x=a.$$typeof;if(x===C){s.tag=11,s=V6(null,s,a,h,u);break e}else if(x===E){s.tag=14,s=L6(null,s,a,h,u);break e}}throw s=ee(a)||a,Error(r(306,s,""))}}return s;case 0:return xh(a,s,s.type,s.pendingProps,u);case 1:return h=s.type,x=hl(h,s.pendingProps),F6(a,s,h,x,u);case 3:e:{if(ce(s,s.stateNode.containerInfo),a===null)throw Error(r(387));h=s.pendingProps;var v=s.memoizedState;x=v.element,Yd(a,s),Yo(s,h,null,u);var T=s.memoizedState;if(h=T.cache,ma(s,Yt,h),h!==v.cache&&_d(s,[Yt],u,!0),Fo(),h=T.element,v.isDehydrated)if(v={element:h,isDehydrated:!1,cache:T.cache},s.updateQueue.baseState=v,s.memoizedState=v,s.flags&256){s=Y6(a,s,h,u);break e}else if(h!==x){x=Sr(Error(r(424)),s),Lo(x),s=Y6(a,s,h,u);break e}else{switch(a=s.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(wt=Tr(a.firstChild),dn=s,Ke=!0,da=null,kr=!0,u=DO(s,null,h,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling}else{if(al(),h===x){s=Li(a,s,u);break e}mn(a,s,h,u)}s=s.child}return s;case 26:return f0(a,s),a===null?(u=l5(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ke||(u=s.type,a=s.pendingProps,h=C0(te.current).createElement(u),h[fn]=s,h[Nn]=a,pn(h,u,a),rn(h),s.stateNode=h):s.memoizedState=l5(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return Se(s),a===null&&Ke&&(h=s.stateNode=r5(s.type,s.pendingProps,te.current),dn=s,kr=!0,x=wt,Ta(s.type)?(i2=x,wt=Tr(h.firstChild)):wt=x),mn(a,s,s.pendingProps.children,u),f0(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ke&&((x=h=wt)&&(h=UM(h,s.type,s.pendingProps,kr),h!==null?(s.stateNode=h,dn=s,wt=Tr(h.firstChild),kr=!1,x=!0):x=!1),x||ha(s)),Se(s),x=s.type,v=s.pendingProps,T=a!==null?a.memoizedProps:null,h=v.children,Jh(x,v)?h=null:T!==null&&Jh(x,T)&&(s.flags|=32),s.memoizedState!==null&&(x=Kd(a,s,uM,null,null,u),fc._currentValue=x),f0(a,s),mn(a,s,h,u),s.child;case 6:return a===null&&Ke&&((a=u=wt)&&(u=WM(u,s.pendingProps,kr),u!==null?(s.stateNode=u,dn=s,wt=null,a=!0):a=!1),a||ha(s)),null;case 13:return B6(a,s,u);case 4:return ce(s,s.stateNode.containerInfo),h=s.pendingProps,a===null?s.child=fl(s,null,h,u):mn(a,s,h,u),s.child;case 11:return V6(a,s,s.type,s.pendingProps,u);case 7:return mn(a,s,s.pendingProps,u),s.child;case 8:return mn(a,s,s.pendingProps.children,u),s.child;case 12:return mn(a,s,s.pendingProps.children,u),s.child;case 10:return h=s.pendingProps,ma(s,s.type,h.value),mn(a,s,h.children,u),s.child;case 9:return x=s.type._context,h=s.pendingProps.children,sl(s),x=hn(x),h=h(x),s.flags|=1,mn(a,s,h,u),s.child;case 14:return L6(a,s,s.type,s.pendingProps,u);case 15:return _6(a,s,s.type,s.pendingProps,u);case 19:return I6(a,s,u);case 31:return xM(a,s,u);case 22:return D6(a,s,u,s.pendingProps);case 24:return sl(s),h=hn(Yt),a===null?(x=Xd(),x===null&&(x=xt,v=Dd(),x.pooledCache=v,v.refCount++,v!==null&&(x.pooledCacheLanes|=u),x=v),s.memoizedState={parent:h,cache:x},Fd(s),ma(s,Yt,x)):((a.lanes&u)!==0&&(Yd(a,s),Yo(s,null,null,u),Fo()),x=a.memoizedState,v=s.memoizedState,x.parent!==h?(x={parent:h,cache:h},s.memoizedState=x,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=x),ma(s,Yt,h)):(h=v.cache,ma(s,Yt,h),h!==x.cache&&_d(s,[Yt],u,!0))),mn(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function _i(a){a.flags|=4}function Mh(a,s,u,h,x){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(x&335544128)===x)if(a.stateNode.complete)a.flags|=8192;else if(S4())a.flags|=8192;else throw ul=Wu,zd}else a.flags&=-16777217}function W6(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!f5(s))if(S4())a.flags|=8192;else throw ul=Wu,zd}function h0(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?Ka():536870912,a.lanes|=s,As|=s)}function Go(a,s){if(!Ke)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:h.sibling=null}}function At(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,h=0;if(s)for(var x=a.child;x!==null;)u|=x.lanes|x.childLanes,h|=x.subtreeFlags&65011712,h|=x.flags&65011712,x.return=a,x=x.sibling;else for(x=a.child;x!==null;)u|=x.lanes|x.childLanes,h|=x.subtreeFlags,h|=x.flags,x.return=a,x=x.sibling;return a.subtreeFlags|=h,a.childLanes=u,s}function bM(a,s,u){var h=s.pendingProps;switch(jd(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(s),null;case 1:return At(s),null;case 3:return u=s.stateNode,h=null,a!==null&&(h=a.memoizedState.cache),s.memoizedState.cache!==h&&(s.flags|=2048),Ri(Yt),me(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(fs(s)?_i(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Nd())),At(s),null;case 26:var x=s.type,v=s.memoizedState;return a===null?(_i(s),v!==null?(At(s),W6(s,v)):(At(s),Mh(s,x,null,h,u))):v?v!==a.memoizedState?(_i(s),At(s),W6(s,v)):(At(s),s.flags&=-16777217):(a=a.memoizedProps,a!==h&&_i(s),At(s),Mh(s,x,a,h,u)),null;case 27:if(pe(s),u=te.current,x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&_i(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}a=Y.current,fs(s)?EO(s):(a=r5(x,h,u),s.stateNode=a,_i(s))}return At(s),null;case 5:if(pe(s),x=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==h&&_i(s);else{if(!h){if(s.stateNode===null)throw Error(r(166));return At(s),null}if(v=Y.current,fs(s))EO(s);else{var T=C0(te.current);switch(v){case 1:v=T.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:v=T.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":v=T.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":v=T.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":v=T.createElement("div"),v.innerHTML="<script><\/script>",v=v.removeChild(v.firstChild);break;case"select":v=typeof h.is=="string"?T.createElement("select",{is:h.is}):T.createElement("select"),h.multiple?v.multiple=!0:h.size&&(v.size=h.size);break;default:v=typeof h.is=="string"?T.createElement(x,{is:h.is}):T.createElement(x)}}v[fn]=s,v[Nn]=h;e:for(T=s.child;T!==null;){if(T.tag===5||T.tag===6)v.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===s)break e;for(;T.sibling===null;){if(T.return===null||T.return===s)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}s.stateNode=v;e:switch(pn(v,x,h),x){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}h&&_i(s)}}return At(s),Mh(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==h&&_i(s);else{if(typeof h!="string"&&s.stateNode===null)throw Error(r(166));if(a=te.current,fs(s)){if(a=s.stateNode,u=s.memoizedProps,h=null,x=dn,x!==null)switch(x.tag){case 27:case 5:h=x.memoizedProps}a[fn]=s,a=!!(a.nodeValue===u||h!==null&&h.suppressHydrationWarning===!0||B4(a.nodeValue,u)),a||ha(s,!0)}else a=C0(a).createTextNode(h),a[fn]=s,s.stateNode=a}return At(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(h=fs(s),u!==null){if(a===null){if(!h)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[fn]=s}else al(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),a=!1}else u=Nd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(tr(s),s):(tr(s),null);if((s.flags&128)!==0)throw Error(r(558))}return At(s),null;case 13:if(h=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(x=fs(s),h!==null&&h.dehydrated!==null){if(a===null){if(!x)throw Error(r(318));if(x=s.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[fn]=s}else al(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;At(s),x=!1}else x=Nd(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=x),x=!0;if(!x)return s.flags&256?(tr(s),s):(tr(s),null)}return tr(s),(s.flags&128)!==0?(s.lanes=u,s):(u=h!==null,a=a!==null&&a.memoizedState!==null,u&&(h=s.child,x=null,h.alternate!==null&&h.alternate.memoizedState!==null&&h.alternate.memoizedState.cachePool!==null&&(x=h.alternate.memoizedState.cachePool.pool),v=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(v=h.memoizedState.cachePool.pool),v!==x&&(h.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),h0(s,s.updateQueue),At(s),null);case 4:return me(),a===null&&Ih(s.stateNode.containerInfo),At(s),null;case 10:return Ri(s.type),At(s),null;case 19:if(R(_t),h=s.memoizedState,h===null)return At(s),null;if(x=(s.flags&128)!==0,v=h.rendering,v===null)if(x)Go(h,!1);else{if(Zt!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(v=e0(a),v!==null){for(s.flags|=128,Go(h,!1),a=v.updateQueue,s.updateQueue=a,h0(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)AO(u,a),u=u.sibling;return X(_t,_t.current&1|2),Ke&&Zi(s,h.treeForkCount),s.child}a=a.sibling}h.tail!==null&&Fe()>x0&&(s.flags|=128,x=!0,Go(h,!1),s.lanes=4194304)}else{if(!x)if(a=e0(v),a!==null){if(s.flags|=128,x=!0,a=a.updateQueue,s.updateQueue=a,h0(s,a),Go(h,!0),h.tail===null&&h.tailMode==="hidden"&&!v.alternate&&!Ke)return At(s),null}else 2*Fe()-h.renderingStartTime>x0&&u!==536870912&&(s.flags|=128,x=!0,Go(h,!1),s.lanes=4194304);h.isBackwards?(v.sibling=s.child,s.child=v):(a=h.last,a!==null?a.sibling=v:s.child=v,h.last=v)}return h.tail!==null?(a=h.tail,h.rendering=a,h.tail=a.sibling,h.renderingStartTime=Fe(),a.sibling=null,u=_t.current,X(_t,x?u&1|2:u&1),Ke&&Zi(s,h.treeForkCount),a):(At(s),null);case 22:case 23:return tr(s),Ud(),h=s.memoizedState!==null,a!==null?a.memoizedState!==null!==h&&(s.flags|=8192):h&&(s.flags|=8192),h?(u&536870912)!==0&&(s.flags&128)===0&&(At(s),s.subtreeFlags&6&&(s.flags|=8192)):At(s),u=s.updateQueue,u!==null&&h0(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048),a!==null&&R(ol),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Ri(Yt),At(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function vM(a,s){switch(jd(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Ri(Yt),me(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return pe(s),null;case 31:if(s.memoizedState!==null){if(tr(s),s.alternate===null)throw Error(r(340));al()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(tr(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));al()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return R(_t),null;case 4:return me(),null;case 10:return Ri(s.type),null;case 22:case 23:return tr(s),Ud(),a!==null&&R(ol),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Ri(Yt),null;case 25:return null;default:return null}}function G6(a,s){switch(jd(s),s.tag){case 3:Ri(Yt),me();break;case 26:case 27:case 5:pe(s);break;case 4:me();break;case 31:s.memoizedState!==null&&tr(s);break;case 13:tr(s);break;case 19:R(_t);break;case 10:Ri(s.type);break;case 22:case 23:tr(s),Ud(),a!==null&&R(ol);break;case 24:Ri(Yt)}}function Ko(a,s){try{var u=s.updateQueue,h=u!==null?u.lastEffect:null;if(h!==null){var x=h.next;u=x;do{if((u.tag&a)===a){h=void 0;var v=u.create,T=u.inst;h=v(),T.destroy=h}u=u.next}while(u!==x)}}catch(N){mt(s,s.return,N)}}function ba(a,s,u){try{var h=s.updateQueue,x=h!==null?h.lastEffect:null;if(x!==null){var v=x.next;h=v;do{if((h.tag&a)===a){var T=h.inst,N=T.destroy;if(N!==void 0){T.destroy=void 0,x=s;var I=u,le=N;try{le()}catch(ue){mt(x,I,ue)}}}h=h.next}while(h!==v)}}catch(ue){mt(s,s.return,ue)}}function K6(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{XO(s,u)}catch(h){mt(a,a.return,h)}}}function J6(a,s,u){u.props=hl(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(h){mt(a,s,h)}}function Jo(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var h=a.stateNode;break;case 30:h=a.stateNode;break;default:h=a.stateNode}typeof u=="function"?a.refCleanup=u(h):u.current=h}}catch(x){mt(a,s,x)}}function ai(a,s){var u=a.ref,h=a.refCleanup;if(u!==null)if(typeof h=="function")try{h()}catch(x){mt(a,s,x)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){mt(a,s,x)}else u.current=null}function e4(a){var s=a.type,u=a.memoizedProps,h=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&h.focus();break e;case"img":u.src?h.src=u.src:u.srcSet&&(h.srcset=u.srcSet)}}catch(x){mt(a,a.return,x)}}function Th(a,s,u){try{var h=a.stateNode;zM(h,a.type,u,s),h[Nn]=s}catch(x){mt(a,a.return,x)}}function t4(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ta(a.type)||a.tag===4}function Ch(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||t4(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ta(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function Eh(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=$i));else if(h!==4&&(h===27&&Ta(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(Eh(a,s,u),a=a.sibling;a!==null;)Eh(a,s,u),a=a.sibling}function m0(a,s,u){var h=a.tag;if(h===5||h===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(h!==4&&(h===27&&Ta(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(m0(a,s,u),a=a.sibling;a!==null;)m0(a,s,u),a=a.sibling}function n4(a){var s=a.stateNode,u=a.memoizedProps;try{for(var h=a.type,x=s.attributes;x.length;)s.removeAttributeNode(x[0]);pn(s,h,u),s[fn]=a,s[Nn]=u}catch(v){mt(a,a.return,v)}}var Di=!1,It=!1,$h=!1,r4=typeof WeakSet=="function"?WeakSet:Set,an=null;function SM(a,s){if(a=a.containerInfo,Gh=R0,a=pO(a),wd(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var h=u.getSelection&&u.getSelection();if(h&&h.rangeCount!==0){u=h.anchorNode;var x=h.anchorOffset,v=h.focusNode;h=h.focusOffset;try{u.nodeType,v.nodeType}catch{u=null;break e}var T=0,N=-1,I=-1,le=0,ue=0,de=a,se=null;t:for(;;){for(var oe;de!==u||x!==0&&de.nodeType!==3||(N=T+x),de!==v||h!==0&&de.nodeType!==3||(I=T+h),de.nodeType===3&&(T+=de.nodeValue.length),(oe=de.firstChild)!==null;)se=de,de=oe;for(;;){if(de===a)break t;if(se===u&&++le===x&&(N=T),se===v&&++ue===h&&(I=T),(oe=de.nextSibling)!==null)break;de=se,se=de.parentNode}de=oe}u=N===-1||I===-1?null:{start:N,end:I}}else u=null}u=u||{start:0,end:0}}else u=null;for(Kh={focusedElem:a,selectionRange:u},R0=!1,an=s;an!==null;)if(s=an,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,an=a;else for(;an!==null;){switch(s=an,v=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)x=a[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&v!==null){a=void 0,u=s,x=v.memoizedProps,v=v.memoizedState,h=u.stateNode;try{var Ae=hl(u.type,x);a=h.getSnapshotBeforeUpdate(Ae,v),h.__reactInternalSnapshotBeforeUpdate=a}catch(Pe){mt(u,u.return,Pe)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)t2(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":t2(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,an=a;break}an=s.return}}function i4(a,s,u){var h=u.flags;switch(u.tag){case 0:case 11:case 15:Xi(a,u),h&4&&Ko(5,u);break;case 1:if(Xi(a,u),h&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(T){mt(u,u.return,T)}else{var x=hl(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(x,s,a.__reactInternalSnapshotBeforeUpdate)}catch(T){mt(u,u.return,T)}}h&64&&K6(u),h&512&&Jo(u,u.return);break;case 3:if(Xi(a,u),h&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{XO(a,s)}catch(T){mt(u,u.return,T)}}break;case 27:s===null&&h&4&&n4(u);case 26:case 5:Xi(a,u),s===null&&h&4&&e4(u),h&512&&Jo(u,u.return);break;case 12:Xi(a,u);break;case 31:Xi(a,u),h&4&&s4(a,u);break;case 13:Xi(a,u),h&4&&o4(a,u),h&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=QM.bind(null,u),GM(a,u))));break;case 22:if(h=u.memoizedState!==null||Di,!h){s=s!==null&&s.memoizedState!==null||It,x=Di;var v=It;Di=h,(It=s)&&!v?zi(a,u,(u.subtreeFlags&8772)!==0):Xi(a,u),Di=x,It=v}break;case 30:break;default:Xi(a,u)}}function a4(a){var s=a.alternate;s!==null&&(a.alternate=null,a4(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&ld(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Tt=null,Ln=!1;function Hi(a,s,u){for(u=u.child;u!==null;)l4(a,s,u),u=u.sibling}function l4(a,s,u){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(St,u)}catch{}switch(u.tag){case 26:It||ai(u,s),Hi(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:It||ai(u,s);var h=Tt,x=Ln;Ta(u.type)&&(Tt=u.stateNode,Ln=!1),Hi(a,s,u),oc(u.stateNode),Tt=h,Ln=x;break;case 5:It||ai(u,s);case 6:if(h=Tt,x=Ln,Tt=null,Hi(a,s,u),Tt=h,Ln=x,Tt!==null)if(Ln)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(u.stateNode)}catch(v){mt(u,s,v)}else try{Tt.removeChild(u.stateNode)}catch(v){mt(u,s,v)}break;case 18:Tt!==null&&(Ln?(a=Tt,K4(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Ps(a)):K4(Tt,u.stateNode));break;case 4:h=Tt,x=Ln,Tt=u.stateNode.containerInfo,Ln=!0,Hi(a,s,u),Tt=h,Ln=x;break;case 0:case 11:case 14:case 15:ba(2,u,s),It||ba(4,u,s),Hi(a,s,u);break;case 1:It||(ai(u,s),h=u.stateNode,typeof h.componentWillUnmount=="function"&&J6(u,s,h)),Hi(a,s,u);break;case 21:Hi(a,s,u);break;case 22:It=(h=It)||u.memoizedState!==null,Hi(a,s,u),It=h;break;default:Hi(a,s,u)}}function s4(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Ps(a)}catch(u){mt(s,s.return,u)}}}function o4(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ps(a)}catch(u){mt(s,s.return,u)}}function wM(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new r4),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new r4),s;default:throw Error(r(435,a.tag))}}function p0(a,s){var u=wM(a);s.forEach(function(h){if(!u.has(h)){u.add(h);var x=PM.bind(null,a,h);h.then(x,x)}})}function _n(a,s){var u=s.deletions;if(u!==null)for(var h=0;h<u.length;h++){var x=u[h],v=a,T=s,N=T;e:for(;N!==null;){switch(N.tag){case 27:if(Ta(N.type)){Tt=N.stateNode,Ln=!1;break e}break;case 5:Tt=N.stateNode,Ln=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,Ln=!0;break e}N=N.return}if(Tt===null)throw Error(r(160));l4(v,T,x),Tt=null,Ln=!1,v=x.alternate,v!==null&&(v.return=null),x.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)c4(s,a),s=s.sibling}var Hr=null;function c4(a,s){var u=a.alternate,h=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:_n(s,a),Dn(a),h&4&&(ba(3,a,a.return),Ko(3,a),ba(5,a,a.return));break;case 1:_n(s,a),Dn(a),h&512&&(It||u===null||ai(u,u.return)),h&64&&Di&&(a=a.updateQueue,a!==null&&(h=a.callbacks,h!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?h:u.concat(h))));break;case 26:var x=Hr;if(_n(s,a),Dn(a),h&512&&(It||u===null||ai(u,u.return)),h&4){var v=u!==null?u.memoizedState:null;if(h=a.memoizedState,u===null)if(h===null)if(a.stateNode===null){e:{h=a.type,u=a.memoizedProps,x=x.ownerDocument||x;t:switch(h){case"title":v=x.getElementsByTagName("title")[0],(!v||v[Mo]||v[fn]||v.namespaceURI==="http://www.w3.org/2000/svg"||v.hasAttribute("itemprop"))&&(v=x.createElement(h),x.head.insertBefore(v,x.querySelector("head > title"))),pn(v,h,u),v[fn]=a,rn(v),h=v;break e;case"link":var T=c5("link","href",x).get(h+(u.href||""));if(T){for(var N=0;N<T.length;N++)if(v=T[N],v.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&v.getAttribute("rel")===(u.rel==null?null:u.rel)&&v.getAttribute("title")===(u.title==null?null:u.title)&&v.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){T.splice(N,1);break t}}v=x.createElement(h),pn(v,h,u),x.head.appendChild(v);break;case"meta":if(T=c5("meta","content",x).get(h+(u.content||""))){for(N=0;N<T.length;N++)if(v=T[N],v.getAttribute("content")===(u.content==null?null:""+u.content)&&v.getAttribute("name")===(u.name==null?null:u.name)&&v.getAttribute("property")===(u.property==null?null:u.property)&&v.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&v.getAttribute("charset")===(u.charSet==null?null:u.charSet)){T.splice(N,1);break t}}v=x.createElement(h),pn(v,h,u),x.head.appendChild(v);break;default:throw Error(r(468,h))}v[fn]=a,rn(v),h=v}a.stateNode=h}else u5(x,a.type,a.stateNode);else a.stateNode=o5(x,h,a.memoizedProps);else v!==h?(v===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):v.count--,h===null?u5(x,a.type,a.stateNode):o5(x,h,a.memoizedProps)):h===null&&a.stateNode!==null&&Th(a,a.memoizedProps,u.memoizedProps)}break;case 27:_n(s,a),Dn(a),h&512&&(It||u===null||ai(u,u.return)),u!==null&&h&4&&Th(a,a.memoizedProps,u.memoizedProps);break;case 5:if(_n(s,a),Dn(a),h&512&&(It||u===null||ai(u,u.return)),a.flags&32){x=a.stateNode;try{ts(x,"")}catch(Ae){mt(a,a.return,Ae)}}h&4&&a.stateNode!=null&&(x=a.memoizedProps,Th(a,x,u!==null?u.memoizedProps:x)),h&1024&&($h=!0);break;case 6:if(_n(s,a),Dn(a),h&4){if(a.stateNode===null)throw Error(r(162));h=a.memoizedProps,u=a.stateNode;try{u.nodeValue=h}catch(Ae){mt(a,a.return,Ae)}}break;case 3:if(Q0=null,x=Hr,Hr=E0(s.containerInfo),_n(s,a),Hr=x,Dn(a),h&4&&u!==null&&u.memoizedState.isDehydrated)try{Ps(s.containerInfo)}catch(Ae){mt(a,a.return,Ae)}$h&&($h=!1,u4(a));break;case 4:h=Hr,Hr=E0(a.stateNode.containerInfo),_n(s,a),Dn(a),Hr=h;break;case 12:_n(s,a),Dn(a);break;case 31:_n(s,a),Dn(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,p0(a,h)));break;case 13:_n(s,a),Dn(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(O0=Fe()),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,p0(a,h)));break;case 22:x=a.memoizedState!==null;var I=u!==null&&u.memoizedState!==null,le=Di,ue=It;if(Di=le||x,It=ue||I,_n(s,a),It=ue,Di=le,Dn(a),h&8192)e:for(s=a.stateNode,s._visibility=x?s._visibility&-2:s._visibility|1,x&&(u===null||I||Di||It||ml(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){I=u=s;try{if(v=I.stateNode,x)T=v.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{N=I.stateNode;var de=I.memoizedProps.style,se=de!=null&&de.hasOwnProperty("display")?de.display:null;N.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Ae){mt(I,I.return,Ae)}}}else if(s.tag===6){if(u===null){I=s;try{I.stateNode.nodeValue=x?"":I.memoizedProps}catch(Ae){mt(I,I.return,Ae)}}}else if(s.tag===18){if(u===null){I=s;try{var oe=I.stateNode;x?J4(oe,!0):J4(I.stateNode,!1)}catch(Ae){mt(I,I.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}h&4&&(h=a.updateQueue,h!==null&&(u=h.retryQueue,u!==null&&(h.retryQueue=null,p0(a,u))));break;case 19:_n(s,a),Dn(a),h&4&&(h=a.updateQueue,h!==null&&(a.updateQueue=null,p0(a,h)));break;case 30:break;case 21:break;default:_n(s,a),Dn(a)}}function Dn(a){var s=a.flags;if(s&2){try{for(var u,h=a.return;h!==null;){if(t4(h)){u=h;break}h=h.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,v=Ch(a);m0(a,v,x);break;case 5:var T=u.stateNode;u.flags&32&&(ts(T,""),u.flags&=-33);var N=Ch(a);m0(a,N,T);break;case 3:case 4:var I=u.stateNode.containerInfo,le=Ch(a);Eh(a,le,I);break;default:throw Error(r(161))}}catch(ue){mt(a,a.return,ue)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function u4(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;u4(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function Xi(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)i4(a,s.alternate,s),s=s.sibling}function ml(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:ba(4,s,s.return),ml(s);break;case 1:ai(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&J6(s,s.return,u),ml(s);break;case 27:oc(s.stateNode);case 26:case 5:ai(s,s.return),ml(s);break;case 22:s.memoizedState===null&&ml(s);break;case 30:ml(s);break;default:ml(s)}a=a.sibling}}function zi(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var h=s.alternate,x=a,v=s,T=v.flags;switch(v.tag){case 0:case 11:case 15:zi(x,v,u),Ko(4,v);break;case 1:if(zi(x,v,u),h=v,x=h.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(le){mt(h,h.return,le)}if(h=v,x=h.updateQueue,x!==null){var N=h.stateNode;try{var I=x.shared.hiddenCallbacks;if(I!==null)for(x.shared.hiddenCallbacks=null,x=0;x<I.length;x++)HO(I[x],N)}catch(le){mt(h,h.return,le)}}u&&T&64&&K6(v),Jo(v,v.return);break;case 27:n4(v);case 26:case 5:zi(x,v,u),u&&h===null&&T&4&&e4(v),Jo(v,v.return);break;case 12:zi(x,v,u);break;case 31:zi(x,v,u),u&&T&4&&s4(x,v);break;case 13:zi(x,v,u),u&&T&4&&o4(x,v);break;case 22:v.memoizedState===null&&zi(x,v,u),Jo(v,v.return);break;case 30:break;default:zi(x,v,u)}s=s.sibling}}function Qh(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&_o(u))}function Ph(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&_o(a))}function Xr(a,s,u,h){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)f4(a,s,u,h),s=s.sibling}function f4(a,s,u,h){var x=s.flags;switch(s.tag){case 0:case 11:case 15:Xr(a,s,u,h),x&2048&&Ko(9,s);break;case 1:Xr(a,s,u,h);break;case 3:Xr(a,s,u,h),x&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&_o(a)));break;case 12:if(x&2048){Xr(a,s,u,h),a=s.stateNode;try{var v=s.memoizedProps,T=v.id,N=v.onPostCommit;typeof N=="function"&&N(T,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(I){mt(s,s.return,I)}}else Xr(a,s,u,h);break;case 31:Xr(a,s,u,h);break;case 13:Xr(a,s,u,h);break;case 23:break;case 22:v=s.stateNode,T=s.alternate,s.memoizedState!==null?v._visibility&2?Xr(a,s,u,h):ec(a,s):v._visibility&2?Xr(a,s,u,h):(v._visibility|=2,vs(a,s,u,h,(s.subtreeFlags&10256)!==0||!1)),x&2048&&Qh(T,s);break;case 24:Xr(a,s,u,h),x&2048&&Ph(s.alternate,s);break;default:Xr(a,s,u,h)}}function vs(a,s,u,h,x){for(x=x&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var v=a,T=s,N=u,I=h,le=T.flags;switch(T.tag){case 0:case 11:case 15:vs(v,T,N,I,x),Ko(8,T);break;case 23:break;case 22:var ue=T.stateNode;T.memoizedState!==null?ue._visibility&2?vs(v,T,N,I,x):ec(v,T):(ue._visibility|=2,vs(v,T,N,I,x)),x&&le&2048&&Qh(T.alternate,T);break;case 24:vs(v,T,N,I,x),x&&le&2048&&Ph(T.alternate,T);break;default:vs(v,T,N,I,x)}s=s.sibling}}function ec(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,h=s,x=h.flags;switch(h.tag){case 22:ec(u,h),x&2048&&Qh(h.alternate,h);break;case 24:ec(u,h),x&2048&&Ph(h.alternate,h);break;default:ec(u,h)}s=s.sibling}}var tc=8192;function Ss(a,s,u){if(a.subtreeFlags&tc)for(a=a.child;a!==null;)d4(a,s,u),a=a.sibling}function d4(a,s,u){switch(a.tag){case 26:Ss(a,s,u),a.flags&tc&&a.memoizedState!==null&&cT(u,Hr,a.memoizedState,a.memoizedProps);break;case 5:Ss(a,s,u);break;case 3:case 4:var h=Hr;Hr=E0(a.stateNode.containerInfo),Ss(a,s,u),Hr=h;break;case 22:a.memoizedState===null&&(h=a.alternate,h!==null&&h.memoizedState!==null?(h=tc,tc=16777216,Ss(a,s,u),tc=h):Ss(a,s,u));break;default:Ss(a,s,u)}}function h4(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function nc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];an=h,p4(h,a)}h4(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)m4(a),a=a.sibling}function m4(a){switch(a.tag){case 0:case 11:case 15:nc(a),a.flags&2048&&ba(9,a,a.return);break;case 3:nc(a);break;case 12:nc(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,g0(a)):nc(a);break;default:nc(a)}}function g0(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var h=s[u];an=h,p4(h,a)}h4(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:ba(8,s,s.return),g0(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,g0(s));break;default:g0(s)}a=a.sibling}}function p4(a,s){for(;an!==null;){var u=an;switch(u.tag){case 0:case 11:case 15:ba(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var h=u.memoizedState.cachePool.pool;h!=null&&h.refCount++}break;case 24:_o(u.memoizedState.cache)}if(h=u.child,h!==null)h.return=u,an=h;else e:for(u=a;an!==null;){h=an;var x=h.sibling,v=h.return;if(a4(h),h===u){an=null;break e}if(x!==null){x.return=v,an=x;break e}an=v}}}var AM={getCacheForType:function(a){var s=hn(Yt),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return hn(Yt).controller.signal}},kM=typeof WeakMap=="function"?WeakMap:Map,ut=0,xt=null,Be=null,We=0,ht=0,nr=null,va=!1,ws=!1,Zh=!1,Fi=0,Zt=0,Sa=0,pl=0,jh=0,rr=0,As=0,rc=null,Hn=null,Rh=!1,O0=0,g4=0,x0=1/0,y0=null,wa=null,Jt=0,Aa=null,ks=null,Yi=0,Nh=0,Vh=null,O4=null,ic=0,Lh=null;function ir(){return(ut&2)!==0&&We!==0?We&-We:V.T!==null?Fh():ni()}function x4(){if(rr===0)if((We&536870912)===0||Ke){var a=Kt;Kt<<=1,(Kt&3932160)===0&&(Kt=262144),rr=a}else rr=536870912;return a=er.current,a!==null&&(a.flags|=32),rr}function Xn(a,s,u){(a===xt&&(ht===2||ht===9)||a.cancelPendingCommit!==null)&&(Ms(a,0),ka(a,We,rr,!1)),xr(a,u),((ut&2)===0||a!==xt)&&(a===xt&&((ut&2)===0&&(pl|=u),Zt===4&&ka(a,We,rr,!1)),li(a))}function y4(a,s,u){if((ut&6)!==0)throw Error(r(327));var h=!u&&(s&127)===0&&(s&a.expiredLanes)===0||Or(a,s),x=h?CM(a,s):Dh(a,s,!0),v=h;do{if(x===0){ws&&!h&&ka(a,s,0,!1);break}else{if(u=a.current.alternate,v&&!MM(u)){x=Dh(a,s,!1),v=!1;continue}if(x===2){if(v=s,a.errorRecoveryDisabledLanes&v)var T=0;else T=a.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){s=T;e:{var N=a;x=rc;var I=N.current.memoizedState.isDehydrated;if(I&&(Ms(N,T).flags|=256),T=Dh(N,T,!1),T!==2){if(Zh&&!I){N.errorRecoveryDisabledLanes|=v,pl|=v,x=4;break e}v=Hn,Hn=x,v!==null&&(Hn===null?Hn=v:Hn.push.apply(Hn,v))}x=T}if(v=!1,x!==2)continue}}if(x===1){Ms(a,0),ka(a,s,0,!0);break}e:{switch(h=a,v=x,v){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:ka(h,s,rr,!va);break e;case 2:Hn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(x=O0+300-Fe(),10<x)){if(ka(h,s,rr,!va),gr(h,0,!0)!==0)break e;Yi=s,h.timeoutHandle=W4(b4.bind(null,h,u,Hn,y0,Rh,s,rr,pl,As,va,v,"Throttled",-0,0),x);break e}b4(h,u,Hn,y0,Rh,s,rr,pl,As,va,v,null,-0,0)}}break}while(!0);li(a)}function b4(a,s,u,h,x,v,T,N,I,le,ue,de,se,oe){if(a.timeoutHandle=-1,de=s.subtreeFlags,de&8192||(de&16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$i},d4(s,v,de);var Ae=(v&62914560)===v?O0-Fe():(v&4194048)===v?g4-Fe():0;if(Ae=uT(de,Ae),Ae!==null){Yi=v,a.cancelPendingCommit=Ae(C4.bind(null,a,s,v,u,h,x,T,N,I,ue,de,null,se,oe)),ka(a,v,T,!le);return}}C4(a,s,v,u,h,x,T,N,I)}function MM(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var h=0;h<u.length;h++){var x=u[h],v=x.getSnapshot;x=x.value;try{if(!Kn(v(),x))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function ka(a,s,u,h){s&=~jh,s&=~pl,a.suspendedLanes|=s,a.pingedLanes&=~s,h&&(a.warmLanes|=s),h=a.expirationTimes;for(var x=s;0<x;){var v=31-Ye(x),T=1<<v;h[v]=-1,x&=~T}u!==0&&ye(a,u,s)}function b0(){return(ut&6)===0?(ac(0),!1):!0}function _h(){if(Be!==null){if(ht===0)var a=Be.return;else a=Be,ji=ll=null,th(a),gs=null,Ho=0,a=Be;for(;a!==null;)G6(a.alternate,a),a=a.return;Be=null}}function Ms(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,BM(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),Yi=0,_h(),xt=a,Be=u=Pi(a.current,null),We=s,ht=0,nr=null,va=!1,ws=Or(a,s),Zh=!1,As=rr=jh=pl=Sa=Zt=0,Hn=rc=null,Rh=!1,(s&8)!==0&&(s|=s&32);var h=a.entangledLanes;if(h!==0)for(a=a.entanglements,h&=s;0<h;){var x=31-Ye(h),v=1<<x;s|=a[x],h&=~v}return Fi=s,Hu(),u}function v4(a,s){_e=null,V.H=Uo,s===ps||s===Uu?(s=VO(),ht=3):s===zd?(s=VO(),ht=4):ht=s===Oh?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,nr=s,Be===null&&(Zt=1,c0(a,Sr(s,a.current)))}function S4(){var a=er.current;return a===null?!0:(We&4194048)===We?Mr===null:(We&62914560)===We||(We&536870912)!==0?a===Mr:!1}function w4(){var a=V.H;return V.H=Uo,a===null?Uo:a}function A4(){var a=V.A;return V.A=AM,a}function v0(){Zt=4,va||(We&4194048)!==We&&er.current!==null||(ws=!0),(Sa&134217727)===0&&(pl&134217727)===0||xt===null||ka(xt,We,rr,!1)}function Dh(a,s,u){var h=ut;ut|=2;var x=w4(),v=A4();(xt!==a||We!==s)&&(y0=null,Ms(a,s)),s=!1;var T=Zt;e:do try{if(ht!==0&&Be!==null){var N=Be,I=nr;switch(ht){case 8:_h(),T=6;break e;case 3:case 2:case 9:case 6:er.current===null&&(s=!0);var le=ht;if(ht=0,nr=null,Ts(a,N,I,le),u&&ws){T=0;break e}break;default:le=ht,ht=0,nr=null,Ts(a,N,I,le)}}TM(),T=Zt;break}catch(ue){v4(a,ue)}while(!0);return s&&a.shellSuspendCounter++,ji=ll=null,ut=h,V.H=x,V.A=v,Be===null&&(xt=null,We=0,Hu()),T}function TM(){for(;Be!==null;)k4(Be)}function CM(a,s){var u=ut;ut|=2;var h=w4(),x=A4();xt!==a||We!==s?(y0=null,x0=Fe()+500,Ms(a,s)):ws=Or(a,s);e:do try{if(ht!==0&&Be!==null){s=Be;var v=nr;t:switch(ht){case 1:ht=0,nr=null,Ts(a,s,v,1);break;case 2:case 9:if(RO(v)){ht=0,nr=null,M4(s);break}s=function(){ht!==2&&ht!==9||xt!==a||(ht=7),li(a)},v.then(s,s);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:RO(v)?(ht=0,nr=null,M4(s)):(ht=0,nr=null,Ts(a,s,v,7));break;case 5:var T=null;switch(Be.tag){case 26:T=Be.memoizedState;case 5:case 27:var N=Be;if(T?f5(T):N.stateNode.complete){ht=0,nr=null;var I=N.sibling;if(I!==null)Be=I;else{var le=N.return;le!==null?(Be=le,S0(le)):Be=null}break t}}ht=0,nr=null,Ts(a,s,v,5);break;case 6:ht=0,nr=null,Ts(a,s,v,6);break;case 8:_h(),Zt=6;break e;default:throw Error(r(462))}}EM();break}catch(ue){v4(a,ue)}while(!0);return ji=ll=null,V.H=h,V.A=x,ut=u,Be!==null?0:(xt=null,We=0,Hu(),Zt)}function EM(){for(;Be!==null&&!Re();)k4(Be)}function k4(a){var s=U6(a.alternate,a,Fi);a.memoizedProps=a.pendingProps,s===null?S0(a):Be=s}function M4(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=z6(u,s,s.pendingProps,s.type,void 0,We);break;case 11:s=z6(u,s,s.pendingProps,s.type.render,s.ref,We);break;case 5:th(s);default:G6(u,s),s=Be=AO(s,Fi),s=U6(u,s,Fi)}a.memoizedProps=a.pendingProps,s===null?S0(a):Be=s}function Ts(a,s,u,h){ji=ll=null,th(s),gs=null,Ho=0;var x=s.return;try{if(OM(a,x,s,u,We)){Zt=1,c0(a,Sr(u,a.current)),Be=null;return}}catch(v){if(x!==null)throw Be=x,v;Zt=1,c0(a,Sr(u,a.current)),Be=null;return}s.flags&32768?(Ke||h===1?a=!0:ws||(We&536870912)!==0?a=!1:(va=a=!0,(h===2||h===9||h===3||h===6)&&(h=er.current,h!==null&&h.tag===13&&(h.flags|=16384))),T4(s,a)):S0(s)}function S0(a){var s=a;do{if((s.flags&32768)!==0){T4(s,va);return}a=s.return;var u=bM(s.alternate,s,Fi);if(u!==null){Be=u;return}if(s=s.sibling,s!==null){Be=s;return}Be=s=a}while(s!==null);Zt===0&&(Zt=5)}function T4(a,s){do{var u=vM(a.alternate,a);if(u!==null){u.flags&=32767,Be=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Be=a;return}Be=a=u}while(a!==null);Zt=6,Be=null}function C4(a,s,u,h,x,v,T,N,I){a.cancelPendingCommit=null;do w0();while(Jt!==0);if((ut&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(v=s.lanes|s.childLanes,v|=Cd,Il(a,u,v,T,N,I),a===xt&&(Be=xt=null,We=0),ks=s,Aa=a,Yi=u,Nh=v,Vh=x,O4=h,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,ZM(tn,function(){return Z4(),null})):(a.callbackNode=null,a.callbackPriority=0),h=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||h){h=V.T,V.T=null,x=G.p,G.p=2,T=ut,ut|=4;try{SM(a,s,u)}finally{ut=T,G.p=x,V.T=h}}Jt=1,E4(),$4(),Q4()}}function E4(){if(Jt===1){Jt=0;var a=Aa,s=ks,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=V.T,V.T=null;var h=G.p;G.p=2;var x=ut;ut|=4;try{c4(s,a);var v=Kh,T=pO(a.containerInfo),N=v.focusedElem,I=v.selectionRange;if(T!==N&&N&&N.ownerDocument&&mO(N.ownerDocument.documentElement,N)){if(I!==null&&wd(N)){var le=I.start,ue=I.end;if(ue===void 0&&(ue=le),"selectionStart"in N)N.selectionStart=le,N.selectionEnd=Math.min(ue,N.value.length);else{var de=N.ownerDocument||document,se=de&&de.defaultView||window;if(se.getSelection){var oe=se.getSelection(),Ae=N.textContent.length,Pe=Math.min(I.start,Ae),Ot=I.end===void 0?Pe:Math.min(I.end,Ae);!oe.extend&&Pe>Ot&&(T=Ot,Ot=Pe,Pe=T);var re=hO(N,Pe),J=hO(N,Ot);if(re&&J&&(oe.rangeCount!==1||oe.anchorNode!==re.node||oe.anchorOffset!==re.offset||oe.focusNode!==J.node||oe.focusOffset!==J.offset)){var ie=de.createRange();ie.setStart(re.node,re.offset),oe.removeAllRanges(),Pe>Ot?(oe.addRange(ie),oe.extend(J.node,J.offset)):(ie.setEnd(J.node,J.offset),oe.addRange(ie))}}}}for(de=[],oe=N;oe=oe.parentNode;)oe.nodeType===1&&de.push({element:oe,left:oe.scrollLeft,top:oe.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<de.length;N++){var fe=de[N];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}R0=!!Gh,Kh=Gh=null}finally{ut=x,G.p=h,V.T=u}}a.current=s,Jt=2}}function $4(){if(Jt===2){Jt=0;var a=Aa,s=ks,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=V.T,V.T=null;var h=G.p;G.p=2;var x=ut;ut|=4;try{i4(a,s.alternate,s)}finally{ut=x,G.p=h,V.T=u}}Jt=3}}function Q4(){if(Jt===4||Jt===3){Jt=0,kt();var a=Aa,s=ks,u=Yi,h=O4;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Jt=5:(Jt=0,ks=Aa=null,P4(a,a.pendingLanes));var x=a.pendingLanes;if(x===0&&(wa=null),et(u),s=s.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(St,s,void 0,(s.current.flags&128)===128)}catch{}if(h!==null){s=V.T,x=G.p,G.p=2,V.T=null;try{for(var v=a.onRecoverableError,T=0;T<h.length;T++){var N=h[T];v(N.value,{componentStack:N.stack})}}finally{V.T=s,G.p=x}}(Yi&3)!==0&&w0(),li(a),x=a.pendingLanes,(u&261930)!==0&&(x&42)!==0?a===Lh?ic++:(ic=0,Lh=a):ic=0,ac(0)}}function P4(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,_o(s)))}function w0(){return E4(),$4(),Q4(),Z4()}function Z4(){if(Jt!==5)return!1;var a=Aa,s=Nh;Nh=0;var u=et(Yi),h=V.T,x=G.p;try{G.p=32>u?32:u,V.T=null,u=Vh,Vh=null;var v=Aa,T=Yi;if(Jt=0,ks=Aa=null,Yi=0,(ut&6)!==0)throw Error(r(331));var N=ut;if(ut|=4,m4(v.current),f4(v,v.current,T,u),ut=N,ac(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(St,v)}catch{}return!0}finally{G.p=x,V.T=h,P4(a,s)}}function j4(a,s,u){s=Sr(u,s),s=gh(a.stateNode,s,2),a=Oa(a,s,2),a!==null&&(xr(a,2),li(a))}function mt(a,s,u){if(a.tag===3)j4(a,a,u);else for(;s!==null;){if(s.tag===3){j4(s,a,u);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(wa===null||!wa.has(h))){a=Sr(u,a),u=R6(2),h=Oa(s,u,2),h!==null&&(N6(u,h,s,a),xr(h,2),li(h));break}}s=s.return}}function Hh(a,s,u){var h=a.pingCache;if(h===null){h=a.pingCache=new kM;var x=new Set;h.set(s,x)}else x=h.get(s),x===void 0&&(x=new Set,h.set(s,x));x.has(u)||(Zh=!0,x.add(u),a=$M.bind(null,a,s,u),s.then(a,a))}function $M(a,s,u){var h=a.pingCache;h!==null&&h.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,xt===a&&(We&u)===u&&(Zt===4||Zt===3&&(We&62914560)===We&&300>Fe()-O0?(ut&2)===0&&Ms(a,0):jh|=u,As===We&&(As=0)),li(a)}function R4(a,s){s===0&&(s=Ka()),a=rl(a,s),a!==null&&(xr(a,s),li(a))}function QM(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),R4(a,u)}function PM(a,s){var u=0;switch(a.tag){case 31:case 13:var h=a.stateNode,x=a.memoizedState;x!==null&&(u=x.retryLane);break;case 19:h=a.stateNode;break;case 22:h=a.stateNode._retryCache;break;default:throw Error(r(314))}h!==null&&h.delete(s),R4(a,u)}function ZM(a,s){return bt(a,s)}var A0=null,Cs=null,Xh=!1,k0=!1,zh=!1,Ma=0;function li(a){a!==Cs&&a.next===null&&(Cs===null?A0=Cs=a:Cs=Cs.next=a),k0=!0,Xh||(Xh=!0,RM())}function ac(a,s){if(!zh&&k0){zh=!0;do for(var u=!1,h=A0;h!==null;){if(a!==0){var x=h.pendingLanes;if(x===0)var v=0;else{var T=h.suspendedLanes,N=h.pingedLanes;v=(1<<31-Ye(42|a)+1)-1,v&=x&~(T&~N),v=v&201326741?v&201326741|1:v?v|2:0}v!==0&&(u=!0,_4(h,v))}else v=We,v=gr(h,h===xt?v:0,h.cancelPendingCommit!==null||h.timeoutHandle!==-1),(v&3)===0||Or(h,v)||(u=!0,_4(h,v));h=h.next}while(u);zh=!1}}function jM(){N4()}function N4(){k0=Xh=!1;var a=0;Ma!==0&&YM()&&(a=Ma);for(var s=Fe(),u=null,h=A0;h!==null;){var x=h.next,v=V4(h,s);v===0?(h.next=null,u===null?A0=x:u.next=x,x===null&&(Cs=u)):(u=h,(a!==0||(v&3)!==0)&&(k0=!0)),h=x}Jt!==0&&Jt!==5||ac(a),Ma!==0&&(Ma=0)}function V4(a,s){for(var u=a.suspendedLanes,h=a.pingedLanes,x=a.expirationTimes,v=a.pendingLanes&-62914561;0<v;){var T=31-Ye(v),N=1<<T,I=x[T];I===-1?((N&u)===0||(N&h)!==0)&&(x[T]=sa(N,s)):I<=s&&(a.expiredLanes|=N),v&=~N}if(s=xt,u=We,u=gr(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h=a.callbackNode,u===0||a===s&&(ht===2||ht===9)||a.cancelPendingCommit!==null)return h!==null&&h!==null&&nt(h),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Or(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(h!==null&&nt(h),et(u)){case 2:case 8:u=st;break;case 32:u=tn;break;case 268435456:u=mr;break;default:u=tn}return h=L4.bind(null,a),u=bt(u,h),a.callbackPriority=s,a.callbackNode=u,s}return h!==null&&h!==null&&nt(h),a.callbackPriority=2,a.callbackNode=null,2}function L4(a,s){if(Jt!==0&&Jt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(w0()&&a.callbackNode!==u)return null;var h=We;return h=gr(a,a===xt?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),h===0?null:(y4(a,h,s),V4(a,Fe()),a.callbackNode!=null&&a.callbackNode===u?L4.bind(null,a):null)}function _4(a,s){if(w0())return null;y4(a,s,!0)}function RM(){qM(function(){(ut&6)!==0?bt(Lt,jM):N4()})}function Fh(){if(Ma===0){var a=hs;a===0&&(a=Cn,Cn<<=1,(Cn&261888)===0&&(Cn=256)),Ma=a}return Ma}function D4(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Zu(""+a)}function H4(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function NM(a,s,u,h,x){if(s==="submit"&&u&&u.stateNode===x){var v=D4((x[Nn]||null).action),T=h.submitter;T&&(s=(s=T[Nn]||null)?D4(s.formAction):T.getAttribute("formAction"),s!==null&&(v=s,T=null));var N=new Vu("action","action",null,h,x);a.push({event:N,listeners:[{instance:null,listener:function(){if(h.defaultPrevented){if(Ma!==0){var I=T?H4(x,T):new FormData(x);uh(u,{pending:!0,data:I,method:x.method,action:v},null,I)}}else typeof v=="function"&&(N.preventDefault(),I=T?H4(x,T):new FormData(x),uh(u,{pending:!0,data:I,method:x.method,action:v},v,I))},currentTarget:x}]})}}for(var Yh=0;Yh<Td.length;Yh++){var Bh=Td[Yh],VM=Bh.toLowerCase(),LM=Bh[0].toUpperCase()+Bh.slice(1);Dr(VM,"on"+LM)}Dr(xO,"onAnimationEnd"),Dr(yO,"onAnimationIteration"),Dr(bO,"onAnimationStart"),Dr("dblclick","onDoubleClick"),Dr("focusin","onFocus"),Dr("focusout","onBlur"),Dr(eM,"onTransitionRun"),Dr(tM,"onTransitionStart"),Dr(nM,"onTransitionCancel"),Dr(vO,"onTransitionEnd"),Jl("onMouseEnter",["mouseout","mouseover"]),Jl("onMouseLeave",["mouseout","mouseover"]),Jl("onPointerEnter",["pointerout","pointerover"]),Jl("onPointerLeave",["pointerout","pointerover"]),Ja("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ja("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ja("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ja("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ja("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_M=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lc));function X4(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var h=a[u],x=h.event;h=h.listeners;e:{var v=void 0;if(s)for(var T=h.length-1;0<=T;T--){var N=h[T],I=N.instance,le=N.currentTarget;if(N=N.listener,I!==v&&x.isPropagationStopped())break e;v=N,x.currentTarget=le;try{v(x)}catch(ue){Du(ue)}x.currentTarget=null,v=I}else for(T=0;T<h.length;T++){if(N=h[T],I=N.instance,le=N.currentTarget,N=N.listener,I!==v&&x.isPropagationStopped())break e;v=N,x.currentTarget=le;try{v(x)}catch(ue){Du(ue)}x.currentTarget=null,v=I}}}}function qe(a,s){var u=s[ad];u===void 0&&(u=s[ad]=new Set);var h=a+"__bubble";u.has(h)||(z4(s,a,2,!1),u.add(h))}function qh(a,s,u){var h=0;s&&(h|=4),z4(u,a,h,s)}var M0="_reactListening"+Math.random().toString(36).slice(2);function Ih(a){if(!a[M0]){a[M0]=!0,N8.forEach(function(u){u!=="selectionchange"&&(_M.has(u)||qh(u,!1,a),qh(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[M0]||(s[M0]=!0,qh("selectionchange",!1,s))}}function z4(a,s,u,h){switch(x5(s)){case 2:var x=hT;break;case 8:x=mT;break;default:x=c2}u=x.bind(null,s,u,a),x=void 0,!md||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(x=!0),h?x!==void 0?a.addEventListener(s,u,{capture:!0,passive:x}):a.addEventListener(s,u,!0):x!==void 0?a.addEventListener(s,u,{passive:x}):a.addEventListener(s,u,!1)}function Uh(a,s,u,h,x){var v=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var T=h.tag;if(T===3||T===4){var N=h.stateNode.containerInfo;if(N===x)break;if(T===4)for(T=h.return;T!==null;){var I=T.tag;if((I===3||I===4)&&T.stateNode.containerInfo===x)return;T=T.return}for(;N!==null;){if(T=Wl(N),T===null)return;if(I=T.tag,I===5||I===6||I===26||I===27){h=v=T;continue e}N=N.parentNode}}h=h.return}I8(function(){var le=v,ue=dd(u),de=[];e:{var se=SO.get(a);if(se!==void 0){var oe=Vu,Ae=a;switch(a){case"keypress":if(Ru(u)===0)break e;case"keydown":case"keyup":oe=Pk;break;case"focusin":Ae="focus",oe=xd;break;case"focusout":Ae="blur",oe=xd;break;case"beforeblur":case"afterblur":oe=xd;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":oe=G8;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":oe=bk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":oe=Rk;break;case xO:case yO:case bO:oe=wk;break;case vO:oe=Vk;break;case"scroll":case"scrollend":oe=xk;break;case"wheel":oe=_k;break;case"copy":case"cut":case"paste":oe=kk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":oe=J8;break;case"toggle":case"beforetoggle":oe=Hk}var Pe=(s&4)!==0,Ot=!Pe&&(a==="scroll"||a==="scrollend"),re=Pe?se!==null?se+"Capture":null:se;Pe=[];for(var J=le,ie;J!==null;){var fe=J;if(ie=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ie===null||re===null||(fe=Co(J,re),fe!=null&&Pe.push(sc(J,fe,ie))),Ot)break;J=J.return}0<Pe.length&&(se=new oe(se,Ae,null,u,ue),de.push({event:se,listeners:Pe}))}}if((s&7)===0){e:{if(se=a==="mouseover"||a==="pointerover",oe=a==="mouseout"||a==="pointerout",se&&u!==fd&&(Ae=u.relatedTarget||u.fromElement)&&(Wl(Ae)||Ae[Ul]))break e;if((oe||se)&&(se=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,oe?(Ae=u.relatedTarget||u.toElement,oe=le,Ae=Ae?Wl(Ae):null,Ae!==null&&(Ot=l(Ae),Pe=Ae.tag,Ae!==Ot||Pe!==5&&Pe!==27&&Pe!==6)&&(Ae=null)):(oe=null,Ae=le),oe!==Ae)){if(Pe=G8,fe="onMouseLeave",re="onMouseEnter",J="mouse",(a==="pointerout"||a==="pointerover")&&(Pe=J8,fe="onPointerLeave",re="onPointerEnter",J="pointer"),Ot=oe==null?se:To(oe),ie=Ae==null?se:To(Ae),se=new Pe(fe,J+"leave",oe,u,ue),se.target=Ot,se.relatedTarget=ie,fe=null,Wl(ue)===le&&(Pe=new Pe(re,J+"enter",Ae,u,ue),Pe.target=ie,Pe.relatedTarget=Ot,fe=Pe),Ot=fe,oe&&Ae)t:{for(Pe=DM,re=oe,J=Ae,ie=0,fe=re;fe;fe=Pe(fe))ie++;fe=0;for(var Ee=J;Ee;Ee=Pe(Ee))fe++;for(;0<ie-fe;)re=Pe(re),ie--;for(;0<fe-ie;)J=Pe(J),fe--;for(;ie--;){if(re===J||J!==null&&re===J.alternate){Pe=re;break t}re=Pe(re),J=Pe(J)}Pe=null}else Pe=null;oe!==null&&F4(de,se,oe,Pe,!1),Ae!==null&&Ot!==null&&F4(de,Ot,Ae,Pe,!0)}}e:{if(se=le?To(le):window,oe=se.nodeName&&se.nodeName.toLowerCase(),oe==="select"||oe==="input"&&se.type==="file")var ot=sO;else if(aO(se))if(oO)ot=Gk;else{ot=Uk;var Te=Ik}else oe=se.nodeName,!oe||oe.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?le&&ud(le.elementType)&&(ot=sO):ot=Wk;if(ot&&(ot=ot(a,le))){lO(de,ot,u,ue);break e}Te&&Te(a,se,le),a==="focusout"&&le&&se.type==="number"&&le.memoizedProps.value!=null&&cd(se,"number",se.value)}switch(Te=le?To(le):window,a){case"focusin":(aO(Te)||Te.contentEditable==="true")&&(as=Te,Ad=le,No=null);break;case"focusout":No=Ad=as=null;break;case"mousedown":kd=!0;break;case"contextmenu":case"mouseup":case"dragend":kd=!1,gO(de,u,ue);break;case"selectionchange":if(Jk)break;case"keydown":case"keyup":gO(de,u,ue)}var De;if(bd)e:{switch(a){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else is?rO(a,u)&&(Ge="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Ge="onCompositionStart");Ge&&(eO&&u.locale!=="ko"&&(is||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&is&&(De=U8()):(ua=ue,pd="value"in ua?ua.value:ua.textContent,is=!0)),Te=T0(le,Ge),0<Te.length&&(Ge=new K8(Ge,a,null,u,ue),de.push({event:Ge,listeners:Te}),De?Ge.data=De:(De=iO(u),De!==null&&(Ge.data=De)))),(De=zk?Fk(a,u):Yk(a,u))&&(Ge=T0(le,"onBeforeInput"),0<Ge.length&&(Te=new K8("onBeforeInput","beforeinput",null,u,ue),de.push({event:Te,listeners:Ge}),Te.data=De)),NM(de,a,le,u,ue)}X4(de,s)})}function sc(a,s,u){return{instance:a,listener:s,currentTarget:u}}function T0(a,s){for(var u=s+"Capture",h=[];a!==null;){var x=a,v=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||v===null||(x=Co(a,u),x!=null&&h.unshift(sc(a,x,v)),x=Co(a,s),x!=null&&h.push(sc(a,x,v))),a.tag===3)return h;a=a.return}return[]}function DM(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function F4(a,s,u,h,x){for(var v=s._reactName,T=[];u!==null&&u!==h;){var N=u,I=N.alternate,le=N.stateNode;if(N=N.tag,I!==null&&I===h)break;N!==5&&N!==26&&N!==27||le===null||(I=le,x?(le=Co(u,v),le!=null&&T.unshift(sc(u,le,I))):x||(le=Co(u,v),le!=null&&T.push(sc(u,le,I)))),u=u.return}T.length!==0&&a.push({event:s,listeners:T})}var HM=/\r\n?/g,XM=/\u0000|\uFFFD/g;function Y4(a){return(typeof a=="string"?a:""+a).replace(HM,`
|
|
49
|
-
`).replace(XM,"")}function B4(a,s){return s=Y4(s),Y4(a)===s}function gt(a,s,u,h,x,v){switch(u){case"children":typeof h=="string"?s==="body"||s==="textarea"&&h===""||ts(a,h):(typeof h=="number"||typeof h=="bigint")&&s!=="body"&&ts(a,""+h);break;case"className":Qu(a,"class",h);break;case"tabIndex":Qu(a,"tabindex",h);break;case"dir":case"role":case"viewBox":case"width":case"height":Qu(a,u,h);break;case"style":B8(a,h,v);break;case"data":if(s!=="object"){Qu(a,"data",h);break}case"src":case"href":if(h===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(h==null||typeof h=="function"||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=Zu(""+h),a.setAttribute(u,h);break;case"action":case"formAction":if(typeof h=="function"){a.setAttribute(u,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof v=="function"&&(u==="formAction"?(s!=="input"&>(a,s,"name",x.name,x,null),gt(a,s,"formEncType",x.formEncType,x,null),gt(a,s,"formMethod",x.formMethod,x,null),gt(a,s,"formTarget",x.formTarget,x,null)):(gt(a,s,"encType",x.encType,x,null),gt(a,s,"method",x.method,x,null),gt(a,s,"target",x.target,x,null)));if(h==null||typeof h=="symbol"||typeof h=="boolean"){a.removeAttribute(u);break}h=Zu(""+h),a.setAttribute(u,h);break;case"onClick":h!=null&&(a.onclick=$i);break;case"onScroll":h!=null&&qe("scroll",a);break;case"onScrollEnd":h!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=h&&typeof h!="function"&&typeof h!="symbol";break;case"muted":a.muted=h&&typeof h!="function"&&typeof h!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(h==null||typeof h=="function"||typeof h=="boolean"||typeof h=="symbol"){a.removeAttribute("xlink:href");break}u=Zu(""+h),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""+h):a.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":h&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":h===!0?a.setAttribute(u,""):h!==!1&&h!=null&&typeof h!="function"&&typeof h!="symbol"?a.setAttribute(u,h):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":h!=null&&typeof h!="function"&&typeof h!="symbol"&&!isNaN(h)&&1<=h?a.setAttribute(u,h):a.removeAttribute(u);break;case"rowSpan":case"start":h==null||typeof h=="function"||typeof h=="symbol"||isNaN(h)?a.removeAttribute(u):a.setAttribute(u,h);break;case"popover":qe("beforetoggle",a),qe("toggle",a),$u(a,"popover",h);break;case"xlinkActuate":Ei(a,"http://www.w3.org/1999/xlink","xlink:actuate",h);break;case"xlinkArcrole":Ei(a,"http://www.w3.org/1999/xlink","xlink:arcrole",h);break;case"xlinkRole":Ei(a,"http://www.w3.org/1999/xlink","xlink:role",h);break;case"xlinkShow":Ei(a,"http://www.w3.org/1999/xlink","xlink:show",h);break;case"xlinkTitle":Ei(a,"http://www.w3.org/1999/xlink","xlink:title",h);break;case"xlinkType":Ei(a,"http://www.w3.org/1999/xlink","xlink:type",h);break;case"xmlBase":Ei(a,"http://www.w3.org/XML/1998/namespace","xml:base",h);break;case"xmlLang":Ei(a,"http://www.w3.org/XML/1998/namespace","xml:lang",h);break;case"xmlSpace":Ei(a,"http://www.w3.org/XML/1998/namespace","xml:space",h);break;case"is":$u(a,"is",h);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=gk.get(u)||u,$u(a,u,h))}}function Wh(a,s,u,h,x,v){switch(u){case"style":B8(a,h,v);break;case"dangerouslySetInnerHTML":if(h!=null){if(typeof h!="object"||!("__html"in h))throw Error(r(61));if(u=h.__html,u!=null){if(x.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof h=="string"?ts(a,h):(typeof h=="number"||typeof h=="bigint")&&ts(a,""+h);break;case"onScroll":h!=null&&qe("scroll",a);break;case"onScrollEnd":h!=null&&qe("scrollend",a);break;case"onClick":h!=null&&(a.onclick=$i);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!V8.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),s=u.slice(2,x?u.length-7:void 0),v=a[Nn]||null,v=v!=null?v[u]:null,typeof v=="function"&&a.removeEventListener(s,v,x),typeof h=="function")){typeof v!="function"&&v!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,h,x);break e}u in a?a[u]=h:h===!0?a.setAttribute(u,""):$u(a,u,h)}}}function pn(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var h=!1,x=!1,v;for(v in u)if(u.hasOwnProperty(v)){var T=u[v];if(T!=null)switch(v){case"src":h=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(a,s,v,T,u,null)}}x&>(a,s,"srcSet",u.srcSet,u,null),h&>(a,s,"src",u.src,u,null);return;case"input":qe("invalid",a);var N=v=T=x=null,I=null,le=null;for(h in u)if(u.hasOwnProperty(h)){var ue=u[h];if(ue!=null)switch(h){case"name":x=ue;break;case"type":T=ue;break;case"checked":I=ue;break;case"defaultChecked":le=ue;break;case"value":v=ue;break;case"defaultValue":N=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(r(137,s));break;default:gt(a,s,h,ue,u,null)}}X8(a,v,N,I,le,T,x,!1);return;case"select":qe("invalid",a),h=T=v=null;for(x in u)if(u.hasOwnProperty(x)&&(N=u[x],N!=null))switch(x){case"value":v=N;break;case"defaultValue":T=N;break;case"multiple":h=N;default:gt(a,s,x,N,u,null)}s=v,u=T,a.multiple=!!h,s!=null?es(a,!!h,s,!1):u!=null&&es(a,!!h,u,!0);return;case"textarea":qe("invalid",a),v=x=h=null;for(T in u)if(u.hasOwnProperty(T)&&(N=u[T],N!=null))switch(T){case"value":h=N;break;case"defaultValue":x=N;break;case"children":v=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(r(91));break;default:gt(a,s,T,N,u,null)}F8(a,h,x,v);return;case"option":for(I in u)if(u.hasOwnProperty(I)&&(h=u[I],h!=null))switch(I){case"selected":a.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:gt(a,s,I,h,u,null)}return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(h=0;h<lc.length;h++)qe(lc[h],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(le in u)if(u.hasOwnProperty(le)&&(h=u[le],h!=null))switch(le){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:gt(a,s,le,h,u,null)}return;default:if(ud(s)){for(ue in u)u.hasOwnProperty(ue)&&(h=u[ue],h!==void 0&&Wh(a,s,ue,h,u,void 0));return}}for(N in u)u.hasOwnProperty(N)&&(h=u[N],h!=null&>(a,s,N,h,u,null))}function zM(a,s,u,h){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,v=null,T=null,N=null,I=null,le=null,ue=null;for(oe in u){var de=u[oe];if(u.hasOwnProperty(oe)&&de!=null)switch(oe){case"checked":break;case"value":break;case"defaultValue":I=de;default:h.hasOwnProperty(oe)||gt(a,s,oe,null,h,de)}}for(var se in h){var oe=h[se];if(de=u[se],h.hasOwnProperty(se)&&(oe!=null||de!=null))switch(se){case"type":v=oe;break;case"name":x=oe;break;case"checked":le=oe;break;case"defaultChecked":ue=oe;break;case"value":T=oe;break;case"defaultValue":N=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,s));break;default:oe!==de&>(a,s,se,oe,h,de)}}od(a,T,N,I,le,ue,v,x);return;case"select":oe=T=N=se=null;for(v in u)if(I=u[v],u.hasOwnProperty(v)&&I!=null)switch(v){case"value":break;case"multiple":oe=I;default:h.hasOwnProperty(v)||gt(a,s,v,null,h,I)}for(x in h)if(v=h[x],I=u[x],h.hasOwnProperty(x)&&(v!=null||I!=null))switch(x){case"value":se=v;break;case"defaultValue":N=v;break;case"multiple":T=v;default:v!==I&>(a,s,x,v,h,I)}s=N,u=T,h=oe,se!=null?es(a,!!u,se,!1):!!h!=!!u&&(s!=null?es(a,!!u,s,!0):es(a,!!u,u?[]:"",!1));return;case"textarea":oe=se=null;for(N in u)if(x=u[N],u.hasOwnProperty(N)&&x!=null&&!h.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:gt(a,s,N,null,h,x)}for(T in h)if(x=h[T],v=u[T],h.hasOwnProperty(T)&&(x!=null||v!=null))switch(T){case"value":se=x;break;case"defaultValue":oe=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==v&>(a,s,T,x,h,v)}z8(a,se,oe);return;case"option":for(var Ae in u)if(se=u[Ae],u.hasOwnProperty(Ae)&&se!=null&&!h.hasOwnProperty(Ae))switch(Ae){case"selected":a.selected=!1;break;default:gt(a,s,Ae,null,h,se)}for(I in h)if(se=h[I],oe=u[I],h.hasOwnProperty(I)&&se!==oe&&(se!=null||oe!=null))switch(I){case"selected":a.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:gt(a,s,I,se,h,oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Pe in u)se=u[Pe],u.hasOwnProperty(Pe)&&se!=null&&!h.hasOwnProperty(Pe)&>(a,s,Pe,null,h,se);for(le in h)if(se=h[le],oe=u[le],h.hasOwnProperty(le)&&se!==oe&&(se!=null||oe!=null))switch(le){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:gt(a,s,le,se,h,oe)}return;default:if(ud(s)){for(var Ot in u)se=u[Ot],u.hasOwnProperty(Ot)&&se!==void 0&&!h.hasOwnProperty(Ot)&&Wh(a,s,Ot,void 0,h,se);for(ue in h)se=h[ue],oe=u[ue],!h.hasOwnProperty(ue)||se===oe||se===void 0&&oe===void 0||Wh(a,s,ue,se,h,oe);return}}for(var re in u)se=u[re],u.hasOwnProperty(re)&&se!=null&&!h.hasOwnProperty(re)&>(a,s,re,null,h,se);for(de in h)se=h[de],oe=u[de],!h.hasOwnProperty(de)||se===oe||se==null&&oe==null||gt(a,s,de,se,h,oe)}function q4(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function FM(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),h=0;h<u.length;h++){var x=u[h],v=x.transferSize,T=x.initiatorType,N=x.duration;if(v&&N&&q4(T)){for(T=0,N=x.responseEnd,h+=1;h<u.length;h++){var I=u[h],le=I.startTime;if(le>N)break;var ue=I.transferSize,de=I.initiatorType;ue&&q4(de)&&(I=I.responseEnd,T+=ue*(I<N?1:(N-le)/(I-le)))}if(--h,s+=8*(v+T)/(x.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Gh=null,Kh=null;function C0(a){return a.nodeType===9?a:a.ownerDocument}function I4(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function U4(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function Jh(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var e2=null;function YM(){var a=window.event;return a&&a.type==="popstate"?a===e2?!1:(e2=a,!0):(e2=null,!1)}var W4=typeof setTimeout=="function"?setTimeout:void 0,BM=typeof clearTimeout=="function"?clearTimeout:void 0,G4=typeof Promise=="function"?Promise:void 0,qM=typeof queueMicrotask=="function"?queueMicrotask:typeof G4<"u"?function(a){return G4.resolve(null).then(a).catch(IM)}:W4;function IM(a){setTimeout(function(){throw a})}function Ta(a){return a==="head"}function K4(a,s){var u=s,h=0;do{var x=u.nextSibling;if(a.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(h===0){a.removeChild(x),Ps(s);return}h--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")h++;else if(u==="html")oc(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,oc(u);for(var v=u.firstChild;v;){var T=v.nextSibling,N=v.nodeName;v[Mo]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&v.rel.toLowerCase()==="stylesheet"||u.removeChild(v),v=T}}else u==="body"&&oc(a.ownerDocument.body);u=x}while(u);Ps(s)}function J4(a,s){var u=a;a=0;do{var h=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),h&&h.nodeType===8)if(u=h.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=h}while(u)}function t2(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":t2(u),ld(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function UM(a,s,u,h){for(;a.nodeType===1;){var x=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!h&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(h){if(!a[Mo])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(v=a.getAttribute("rel"),v==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(v!==x.rel||a.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||a.getAttribute("title")!==(x.title==null?null:x.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(v=a.getAttribute("src"),(v!==(x.src==null?null:x.src)||a.getAttribute("type")!==(x.type==null?null:x.type)||a.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&v&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var v=x.name==null?null:""+x.name;if(x.type==="hidden"&&a.getAttribute("name")===v)return a}else return a;if(a=Tr(a.nextSibling),a===null)break}return null}function WM(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Tr(a.nextSibling),a===null))return null;return a}function e5(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Tr(a.nextSibling),a===null))return null;return a}function n2(a){return a.data==="$?"||a.data==="$~"}function r2(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function GM(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var h=function(){s(),u.removeEventListener("DOMContentLoaded",h)};u.addEventListener("DOMContentLoaded",h),a._reactRetry=h}}function Tr(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var i2=null;function t5(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return Tr(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function n5(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function r5(a,s,u){switch(s=C0(u),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function oc(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);ld(a)}var Cr=new Map,i5=new Set;function E0(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Bi=G.d;G.d={f:KM,r:JM,D:eT,C:tT,L:nT,m:rT,X:aT,S:iT,M:lT};function KM(){var a=Bi.f(),s=b0();return a||s}function JM(a){var s=Gl(a);s!==null&&s.tag===5&&s.type==="form"?v6(s):Bi.r(a)}var Es=typeof document>"u"?null:document;function a5(a,s,u){var h=Es;if(h&&typeof s=="string"&&s){var x=br(s);x='link[rel="'+a+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),i5.has(x)||(i5.add(x),a={rel:a,crossOrigin:u,href:s},h.querySelector(x)===null&&(s=h.createElement("link"),pn(s,"link",a),rn(s),h.head.appendChild(s)))}}function eT(a){Bi.D(a),a5("dns-prefetch",a,null)}function tT(a,s){Bi.C(a,s),a5("preconnect",a,s)}function nT(a,s,u){Bi.L(a,s,u);var h=Es;if(h&&a&&s){var x='link[rel="preload"][as="'+br(s)+'"]';s==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+br(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+br(u.imageSizes)+'"]')):x+='[href="'+br(a)+'"]';var v=x;switch(s){case"style":v=$s(a);break;case"script":v=Qs(a)}Cr.has(v)||(a=O({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),Cr.set(v,a),h.querySelector(x)!==null||s==="style"&&h.querySelector(cc(v))||s==="script"&&h.querySelector(uc(v))||(s=h.createElement("link"),pn(s,"link",a),rn(s),h.head.appendChild(s)))}}function rT(a,s){Bi.m(a,s);var u=Es;if(u&&a){var h=s&&typeof s.as=="string"?s.as:"script",x='link[rel="modulepreload"][as="'+br(h)+'"][href="'+br(a)+'"]',v=x;switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":v=Qs(a)}if(!Cr.has(v)&&(a=O({rel:"modulepreload",href:a},s),Cr.set(v,a),u.querySelector(x)===null)){switch(h){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(uc(v)))return}h=u.createElement("link"),pn(h,"link",a),rn(h),u.head.appendChild(h)}}}function iT(a,s,u){Bi.S(a,s,u);var h=Es;if(h&&a){var x=Kl(h).hoistableStyles,v=$s(a);s=s||"default";var T=x.get(v);if(!T){var N={loading:0,preload:null};if(T=h.querySelector(cc(v)))N.loading=5;else{a=O({rel:"stylesheet",href:a,"data-precedence":s},u),(u=Cr.get(v))&&a2(a,u);var I=T=h.createElement("link");rn(I),pn(I,"link",a),I._p=new Promise(function(le,ue){I.onload=le,I.onerror=ue}),I.addEventListener("load",function(){N.loading|=1}),I.addEventListener("error",function(){N.loading|=2}),N.loading|=4,$0(T,s,h)}T={type:"stylesheet",instance:T,count:1,state:N},x.set(v,T)}}}function aT(a,s){Bi.X(a,s);var u=Es;if(u&&a){var h=Kl(u).hoistableScripts,x=Qs(a),v=h.get(x);v||(v=u.querySelector(uc(x)),v||(a=O({src:a,async:!0},s),(s=Cr.get(x))&&l2(a,s),v=u.createElement("script"),rn(v),pn(v,"link",a),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(x,v))}}function lT(a,s){Bi.M(a,s);var u=Es;if(u&&a){var h=Kl(u).hoistableScripts,x=Qs(a),v=h.get(x);v||(v=u.querySelector(uc(x)),v||(a=O({src:a,async:!0,type:"module"},s),(s=Cr.get(x))&&l2(a,s),v=u.createElement("script"),rn(v),pn(v,"link",a),u.head.appendChild(v)),v={type:"script",instance:v,count:1,state:null},h.set(x,v))}}function l5(a,s,u,h){var x=(x=te.current)?E0(x):null;if(!x)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=$s(u.href),u=Kl(x).hoistableStyles,h=u.get(s),h||(h={type:"style",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=$s(u.href);var v=Kl(x).hoistableStyles,T=v.get(a);if(T||(x=x.ownerDocument||x,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},v.set(a,T),(v=x.querySelector(cc(a)))&&!v._p&&(T.instance=v,T.state.loading=5),Cr.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},Cr.set(a,u),v||sT(x,a,u,T.state))),s&&h===null)throw Error(r(528,""));return T}if(s&&h!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=Qs(u),u=Kl(x).hoistableScripts,h=u.get(s),h||(h={type:"script",instance:null,count:0,state:null},u.set(s,h)),h):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function $s(a){return'href="'+br(a)+'"'}function cc(a){return'link[rel="stylesheet"]['+a+"]"}function s5(a){return O({},a,{"data-precedence":a.precedence,precedence:null})}function sT(a,s,u,h){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?h.loading=1:(s=a.createElement("link"),h.preload=s,s.addEventListener("load",function(){return h.loading|=1}),s.addEventListener("error",function(){return h.loading|=2}),pn(s,"link",u),rn(s),a.head.appendChild(s))}function Qs(a){return'[src="'+br(a)+'"]'}function uc(a){return"script[async]"+a}function o5(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var h=a.querySelector('style[data-href~="'+br(u.href)+'"]');if(h)return s.instance=h,rn(h),h;var x=O({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return h=(a.ownerDocument||a).createElement("style"),rn(h),pn(h,"style",x),$0(h,u.precedence,a),s.instance=h;case"stylesheet":x=$s(u.href);var v=a.querySelector(cc(x));if(v)return s.state.loading|=4,s.instance=v,rn(v),v;h=s5(u),(x=Cr.get(x))&&a2(h,x),v=(a.ownerDocument||a).createElement("link"),rn(v);var T=v;return T._p=new Promise(function(N,I){T.onload=N,T.onerror=I}),pn(v,"link",h),s.state.loading|=4,$0(v,u.precedence,a),s.instance=v;case"script":return v=Qs(u.src),(x=a.querySelector(uc(v)))?(s.instance=x,rn(x),x):(h=u,(x=Cr.get(v))&&(h=O({},u),l2(h,x)),a=a.ownerDocument||a,x=a.createElement("script"),rn(x),pn(x,"link",h),a.head.appendChild(x),s.instance=x);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(h=s.instance,s.state.loading|=4,$0(h,u.precedence,a));return s.instance}function $0(a,s,u){for(var h=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=h.length?h[h.length-1]:null,v=x,T=0;T<h.length;T++){var N=h[T];if(N.dataset.precedence===s)v=N;else if(v!==x)break}v?v.parentNode.insertBefore(a,v.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function a2(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function l2(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var Q0=null;function c5(a,s,u){if(Q0===null){var h=new Map,x=Q0=new Map;x.set(u,h)}else x=Q0,h=x.get(u),h||(h=new Map,x.set(u,h));if(h.has(a))return h;for(h.set(a,null),u=u.getElementsByTagName(a),x=0;x<u.length;x++){var v=u[x];if(!(v[Mo]||v[fn]||a==="link"&&v.getAttribute("rel")==="stylesheet")&&v.namespaceURI!=="http://www.w3.org/2000/svg"){var T=v.getAttribute(s)||"";T=a+T;var N=h.get(T);N?N.push(v):h.set(T,[v])}}return h}function u5(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function oT(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return a=s.disabled,typeof s.precedence=="string"&&a==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function f5(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function cT(a,s,u,h){if(u.type==="stylesheet"&&(typeof h.media!="string"||matchMedia(h.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=$s(h.href),v=s.querySelector(cc(x));if(v){s=v._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=P0.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=v,rn(v);return}v=s.ownerDocument||s,h=s5(h),(x=Cr.get(x))&&a2(h,x),v=v.createElement("link"),rn(v);var T=v;T._p=new Promise(function(N,I){T.onload=N,T.onerror=I}),pn(v,"link",h),u.instance=v}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=P0.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var s2=0;function uT(a,s){return a.stylesheets&&a.count===0&&j0(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var h=setTimeout(function(){if(a.stylesheets&&j0(a,a.stylesheets),a.unsuspend){var v=a.unsuspend;a.unsuspend=null,v()}},6e4+s);0<a.imgBytes&&s2===0&&(s2=62500*FM());var x=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&j0(a,a.stylesheets),a.unsuspend)){var v=a.unsuspend;a.unsuspend=null,v()}},(a.imgBytes>s2?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(h),clearTimeout(x)}}:null}function P0(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)j0(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Z0=null;function j0(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Z0=new Map,s.forEach(fT,a),Z0=null,P0.call(a))}function fT(a,s){if(!(s.state.loading&4)){var u=Z0.get(a);if(u)var h=u.get(null);else{u=new Map,Z0.set(a,u);for(var x=a.querySelectorAll("link[data-precedence],style[data-precedence]"),v=0;v<x.length;v++){var T=x[v];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(u.set(T.dataset.precedence,T),h=T)}h&&u.set(null,h)}x=s.instance,T=x.getAttribute("data-precedence"),v=u.get(T)||h,v===h&&u.set(null,x),u.set(T,x),this.count++,h=P0.bind(this),x.addEventListener("load",h),x.addEventListener("error",h),v?v.parentNode.insertBefore(x,v.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(x,a.firstChild)),s.state.loading|=4}}var fc={$$typeof:Q,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function dT(a,s,u,h,x,v,T,N,I){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=_r(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_r(0),this.hiddenUpdates=_r(null),this.identifierPrefix=h,this.onUncaughtError=x,this.onCaughtError=v,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function d5(a,s,u,h,x,v,T,N,I,le,ue,de){return a=new dT(a,s,u,T,I,le,ue,de,N),s=1,v===!0&&(s|=24),v=Jn(3,null,null,s),a.current=v,v.stateNode=a,s=Dd(),s.refCount++,a.pooledCache=s,s.refCount++,v.memoizedState={element:h,isDehydrated:u,cache:s},Fd(v),a}function h5(a){return a?(a=os,a):os}function m5(a,s,u,h,x,v){x=h5(x),h.context===null?h.context=x:h.pendingContext=x,h=ga(s),h.payload={element:u},v=v===void 0?null:v,v!==null&&(h.callback=v),u=Oa(a,h,s),u!==null&&(Xn(u,a,s),zo(u,a,s))}function p5(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function o2(a,s){p5(a,s),(a=a.alternate)&&p5(a,s)}function g5(a){if(a.tag===13||a.tag===31){var s=rl(a,67108864);s!==null&&Xn(s,a,67108864),o2(a,67108864)}}function O5(a){if(a.tag===13||a.tag===31){var s=ir();s=Oe(s);var u=rl(a,s);u!==null&&Xn(u,a,s),o2(a,s)}}var R0=!0;function hT(a,s,u,h){var x=V.T;V.T=null;var v=G.p;try{G.p=2,c2(a,s,u,h)}finally{G.p=v,V.T=x}}function mT(a,s,u,h){var x=V.T;V.T=null;var v=G.p;try{G.p=8,c2(a,s,u,h)}finally{G.p=v,V.T=x}}function c2(a,s,u,h){if(R0){var x=u2(h);if(x===null)Uh(a,s,h,N0,u),y5(a,h);else if(gT(x,a,s,u,h))h.stopPropagation();else if(y5(a,h),s&4&&-1<pT.indexOf(a)){for(;x!==null;){var v=Gl(x);if(v!==null)switch(v.tag){case 3:if(v=v.stateNode,v.current.memoizedState.isDehydrated){var T=un(v.pendingLanes);if(T!==0){var N=v;for(N.pendingLanes|=2,N.entangledLanes|=2;T;){var I=1<<31-Ye(T);N.entanglements[1]|=I,T&=~I}li(v),(ut&6)===0&&(x0=Fe()+500,ac(0))}}break;case 31:case 13:N=rl(v,2),N!==null&&Xn(N,v,2),b0(),o2(v,2)}if(v=u2(h),v===null&&Uh(a,s,h,N0,u),v===x)break;x=v}x!==null&&h.stopPropagation()}else Uh(a,s,h,null,u)}}function u2(a){return a=dd(a),f2(a)}var N0=null;function f2(a){if(N0=null,a=Wl(a),a!==null){var s=l(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=o(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return N0=a,null}function x5(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Gt()){case Lt:return 2;case st:return 8;case tn:case Ci:return 32;case mr:return 268435456;default:return 32}default:return 32}}var d2=!1,Ca=null,Ea=null,$a=null,dc=new Map,hc=new Map,Qa=[],pT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function y5(a,s){switch(a){case"focusin":case"focusout":Ca=null;break;case"dragenter":case"dragleave":Ea=null;break;case"mouseover":case"mouseout":$a=null;break;case"pointerover":case"pointerout":dc.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hc.delete(s.pointerId)}}function mc(a,s,u,h,x,v){return a===null||a.nativeEvent!==v?(a={blockedOn:s,domEventName:u,eventSystemFlags:h,nativeEvent:v,targetContainers:[x]},s!==null&&(s=Gl(s),s!==null&&g5(s)),a):(a.eventSystemFlags|=h,s=a.targetContainers,x!==null&&s.indexOf(x)===-1&&s.push(x),a)}function gT(a,s,u,h,x){switch(s){case"focusin":return Ca=mc(Ca,a,s,u,h,x),!0;case"dragenter":return Ea=mc(Ea,a,s,u,h,x),!0;case"mouseover":return $a=mc($a,a,s,u,h,x),!0;case"pointerover":var v=x.pointerId;return dc.set(v,mc(dc.get(v)||null,a,s,u,h,x)),!0;case"gotpointercapture":return v=x.pointerId,hc.set(v,mc(hc.get(v)||null,a,s,u,h,x)),!0}return!1}function b5(a){var s=Wl(a.target);if(s!==null){var u=l(s);if(u!==null){if(s=u.tag,s===13){if(s=o(u),s!==null){a.blockedOn=s,oa(a.priority,function(){O5(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,oa(a.priority,function(){O5(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function V0(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=u2(a.nativeEvent);if(u===null){u=a.nativeEvent;var h=new u.constructor(u.type,u);fd=h,u.target.dispatchEvent(h),fd=null}else return s=Gl(u),s!==null&&g5(s),a.blockedOn=u,!1;s.shift()}return!0}function v5(a,s,u){V0(a)&&u.delete(s)}function OT(){d2=!1,Ca!==null&&V0(Ca)&&(Ca=null),Ea!==null&&V0(Ea)&&(Ea=null),$a!==null&&V0($a)&&($a=null),dc.forEach(v5),hc.forEach(v5)}function L0(a,s){a.blockedOn===s&&(a.blockedOn=null,d2||(d2=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,OT)))}var _0=null;function S5(a){_0!==a&&(_0=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){_0===a&&(_0=null);for(var s=0;s<a.length;s+=3){var u=a[s],h=a[s+1],x=a[s+2];if(typeof h!="function"){if(f2(h||u)===null)continue;break}var v=Gl(u);v!==null&&(a.splice(s,3),s-=3,uh(v,{pending:!0,data:x,method:u.method,action:h},h,x))}}))}function Ps(a){function s(I){return L0(I,a)}Ca!==null&&L0(Ca,a),Ea!==null&&L0(Ea,a),$a!==null&&L0($a,a),dc.forEach(s),hc.forEach(s);for(var u=0;u<Qa.length;u++){var h=Qa[u];h.blockedOn===a&&(h.blockedOn=null)}for(;0<Qa.length&&(u=Qa[0],u.blockedOn===null);)b5(u),u.blockedOn===null&&Qa.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(h=0;h<u.length;h+=3){var x=u[h],v=u[h+1],T=x[Nn]||null;if(typeof v=="function")T||S5(u);else if(T){var N=null;if(v&&v.hasAttribute("formAction")){if(x=v,T=v[Nn]||null)N=T.formAction;else if(f2(x)!==null)continue}else N=T.action;typeof N=="function"?u[h+1]=N:(u.splice(h,3),h-=3),S5(u)}}}function w5(){function a(v){v.canIntercept&&v.info==="react-transition"&&v.intercept({handler:function(){return new Promise(function(T){return x=T})},focusReset:"manual",scroll:"manual"})}function s(){x!==null&&(x(),x=null),h||setTimeout(u,20)}function u(){if(!h&&!navigation.transition){var v=navigation.currentEntry;v&&v.url!=null&&navigation.navigate(v.url,{state:v.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var h=!1,x=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){h=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),x!==null&&(x(),x=null)}}}function h2(a){this._internalRoot=a}D0.prototype.render=h2.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,h=ir();m5(u,h,a,s,null,null)},D0.prototype.unmount=h2.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;m5(a.current,2,null,a,null,null),b0(),s[Ul]=null}};function D0(a){this._internalRoot=a}D0.prototype.unstable_scheduleHydration=function(a){if(a){var s=ni();a={blockedOn:null,target:a,priority:s};for(var u=0;u<Qa.length&&s!==0&&s<Qa[u].priority;u++);Qa.splice(u,0,a),u===0&&b5(a)}};var A5=e.version;if(A5!=="19.2.6")throw Error(r(527,A5,"19.2.6"));G.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=m(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var xT={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:V,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var H0=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!H0.isDisabled&&H0.supportsFiber)try{St=H0.inject(xT),ze=H0}catch{}}return gc.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,h="",x=Q6,v=P6,T=Z6;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onUncaughtError!==void 0&&(x=s.onUncaughtError),s.onCaughtError!==void 0&&(v=s.onCaughtError),s.onRecoverableError!==void 0&&(T=s.onRecoverableError)),s=d5(a,1,!1,null,null,u,h,null,x,v,T,w5),a[Ul]=s.current,Ih(a),new h2(s)},gc.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var h=!1,x="",v=Q6,T=P6,N=Z6,I=null;return u!=null&&(u.unstable_strictMode===!0&&(h=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(v=u.onUncaughtError),u.onCaughtError!==void 0&&(T=u.onCaughtError),u.onRecoverableError!==void 0&&(N=u.onRecoverableError),u.formState!==void 0&&(I=u.formState)),s=d5(a,1,!0,s,u??null,h,x,I,v,T,N,w5),s.context=h5(null),u=s.current,h=ir(),h=Oe(h),x=ga(h),x.callback=null,Oa(u,x,h),u=h,s.current.lanes=u,xr(s,u),li(s),a[Ul]=s.current,Ih(a),new D0(s)},gc.version="19.2.6",gc}var R5;function $T(){if(R5)return g2.exports;R5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),g2.exports=ET(),g2.exports}var QT=$T();const N5="hyperframes-studio:anonymousId",PT="hyperframes-studio:telemetryDisabled",iv="hyperframes-studio:telemetryNoticeShown";function Zf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function ZT(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`anon-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function jT(){const t=Zf();if(!t)return"anonymous";const e=t.getItem(N5);if(e)return e;const n=ZT();try{t.setItem(N5,n)}catch{}return n}function RT(){var t;return((t=Zf())==null?void 0:t.getItem(PT))==="1"}function NT(){var t;return((t=Zf())==null?void 0:t.getItem(iv))==="1"}function VT(){var t;try{(t=Zf())==null||t.setItem(iv,"1")}catch{}}const av="hyperframes-studio:sessionStartFired";function lv(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function LT(){var t;return((t=lv())==null?void 0:t.getItem(av))==="1"}function _T(){var t;try{(t=lv())==null||t.setItem(av,"1")}catch{}}const DT={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1};let Zs=null;function HT(){if(Zs)return Zs;if(typeof navigator>"u"||typeof window>"u")return Zs=DT,Zs;const t=navigator.userAgent,e=window.screen;return Zs={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t)},Zs}const sv="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",XT="https://us.i.posthog.com",zT=1e3;let P1=[],b2=null,z0=null;function FT(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function YT(){return sv.startsWith("phc_")}function BT(){return!1}function qT(){return z0!==null||(z0=YT()&&!BT()&&!0&&!RT()&&!FT()),z0}function ov(t,e={}){if(!qT())return;const n=HT();P1.push({event:t,properties:{...e,...n},timestamp:new Date().toISOString()}),b2===null&&(b2=setTimeout(()=>{b2=null,Hm()},zT)),UT()}function Hm(){if(P1.length===0)return;const t=jT(),e=P1.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));P1=[],IT(`${XT}/batch/`,JSON.stringify({api_key:sv,batch:e}))}function IT(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function UT(){NT()||(VT(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>Hm(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&Hm()}));function WT(t){ov("studio_session_start",{has_project:t.has_project})}function GT(t){ov("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function KT(t){const[e,n]=d.useState([]),r=d.useRef(null),i=d.useRef(null),l=d.useCallback(async()=>{if(t)try{const m=await fetch(`/api/projects/${t}/renders`);if(!m.ok)return;const p=await m.json();Array.isArray(p.renders)&&n(O=>{const y=new Set(O.map(S=>S.id)),b=p.renders.filter(S=>!y.has(S.id)).map(S=>({id:S.id,status:S.status==="failed"?"failed":"complete",progress:100,filename:S.filename,createdAt:S.createdAt,durationMs:S.durationMs}));return[...O,...b]})}catch{}},[t]);d.useEffect(()=>{l()},[l]);const o=d.useCallback(async(m={})=>{if(!t)return;const p=m.fps??30,O=m.quality??"standard",y=m.format??"mp4",b=m.resolution,S=m.composition;GT({fps:p,quality:O,format:y,resolution:b,composition:S});const w=Date.now(),A={fps:p,quality:O,format:y};b&&b!=="auto"&&(A.resolution=b),S&&(A.composition=S);let k;try{k=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})}catch{const E={id:crypto.randomUUID(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:w};n(j=>[...j,E]);return}if(!k.ok){const E={id:crypto.randomUUID(),status:"failed",progress:0,error:`Server error (${k.status}). Check the terminal for details.`,filename:"Export failed",createdAt:w};n(j=>[...j,E]);return}const{jobId:$}=await k.json(),C={mp4:".mp4",webm:".webm",mov:".mov"}[y]??".mp4",M={id:$,status:"rendering",progress:0,filename:`${$}${C}`,createdAt:w};n(E=>[...E,M]),i.current=$;const Z=new EventSource(`/api/render/${$}/progress`);return r.current=Z,Z.addEventListener("progress",E=>{try{const j=JSON.parse(E.data);n(_=>_.map(H=>H.id===$?{...H,progress:j.progress??H.progress,stage:j.stage??j.message??H.stage,status:j.status==="complete"?"complete":j.status==="failed"?"failed":H.status,durationMs:j.status==="complete"?Date.now()-w:void 0,error:j.error??H.error}:H)),(j.status==="complete"||j.status==="failed")&&(Z.close(),i.current=null)}catch{}}),Z.onerror=()=>{Z.close(),n(E=>E.map(j=>j.id===$&&j.status==="rendering"?{...j,status:"failed",error:"Connection lost. Is the render server running?"}:j)),i.current=null},$},[t]),c=d.useCallback(async m=>{try{await fetch(`/api/render/${m}`,{method:"DELETE"})}catch{}n(p=>p.filter(O=>O.id!==m))},[]),f=d.useCallback(()=>{n(m=>m.filter(p=>p.status==="rendering"))},[]);return d.useEffect(()=>()=>{var m;(m=r.current)==null||m.close(),r.current=null},[t]),{jobs:e,startRender:o,deleteRender:c,clearCompleted:f,isRendering:e.some(m=>m.status==="rendering")}}const JT="modulepreload",eC=function(t){return"/"+t},V5={},cv=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let o=function(m){return Promise.all(m.map(p=>Promise.resolve(p).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),f=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(n.map(m=>{if(m=eC(m),m in V5)return;V5[m]=!0;const p=m.endsWith(".css"),O=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${O}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":JT,p||(y.as="script"),y.crossOrigin="",y.href=m,f&&y.setAttribute("nonce",f),document.head.appendChild(y),p)return new Promise((b,S)=>{y.addEventListener("load",b),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${m}`)))})}))}function l(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function tC(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function Qt(t){d.useEffect(t,[])}const uv={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},nC={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},rC=d.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:l="",disabled:o,...c},f)=>g.jsxs("button",{ref:f,disabled:o||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",uv[t],nC[e],l].join(" "),...c,children:[n?g.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[g.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?g.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&g.jsx("span",{children:i})]}));rC.displayName="Button";const iC={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},aC=d.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},l)=>g.jsx("button",{ref:l,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",uv[n],iC[e],r].join(" "),...i,children:t}));aC.displayName="IconButton";function L5({title:t,detail:e,mono:n,size:r=64,progress:i}){const l=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,o=Math.round(r*1.16);return g.jsxs("div",{className:"hf-loader",draggable:!1,children:[g.jsx("div",{className:"hf-loader-mark-frame",style:{width:o,height:o},draggable:!1,children:g.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[g.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:g.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:g.jsxs("g",{transform:"translate(-50 -50)",children:[g.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),g.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#06E3FA"}),g.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),g.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#06E3FA"}),g.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),g.jsx("div",{className:"hf-loader-title",children:t}),e&&g.jsx("div",{className:"hf-loader-detail",children:e}),l!==void 0&&g.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:g.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${l})`}})}),n&&g.jsx("div",{className:"hf-loader-mono",children:n})]})}const lC=3,sC=3;function _5(t){return typeof t=="object"&&t!==null}function oC(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!_5(e))return null;const n=e.state;return _5(n)?n.loading===!0&&n.ready!==!0:null}const cC=400;function uC(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function fC(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function D5(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const l of r.querySelectorAll("video, audio"))if(fC(l)&&!l.error&&l.networkState!==sC&&l.readyState<lC)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const l of i)if(!tC(l))return!0}return!1}catch{return e}}const fv=d.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:l,suppressLoadingOverlay:o},c)=>{const f=d.useRef(null),m=d.useRef(0),p=d.useRef(null),O=d.useRef(null),[y,b]=d.useState(!1),[S,w]=d.useState(!1),[A,k]=d.useState(!1),[$,Q]=d.useState(!1),[C,M]=d.useState(!0),[Z,E]=d.useState(!0);d.useEffect(()=>{if(!C){E(!0);return}const H=setTimeout(()=>E(!1),cC);return()=>clearTimeout(H)},[C]),Qt(()=>{const H=f.current;if(!H)return;let L=!1,z;return cv(()=>import("./hyperframes-player-CWb0VPYD.js"),[]).then(()=>{if(L)return;const F=document.createElement("hyperframes-player"),ee=e||`/api/projects/${t}/preview`;if(F.setAttribute("shader-capture-scale","1"),F.setAttribute("shader-loading","player"),F.setAttribute("src",ee),F.setAttribute("width",String(i?1080:1920)),F.setAttribute("height",String(i?1920:1080)),F.style.width="100%",F.style.height="100%",F.style.display="block",F.style.background="transparent",H.appendChild(F),F.shadowRoot){const P=document.createElement("style");P.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",F.shadowRoot.appendChild(P)}uC(F);const W=F.iframeElement;typeof c=="function"?c(W):c&&(c.current=W);const V=P=>P.stopImmediatePropagation();F.addEventListener("click",V,{capture:!0});const G=P=>{const R=oC(P);R!==null&&Q(R)};F.addEventListener("shadertransitionstate",G);const q=()=>{M(!1)},B=()=>{M(!1)};F.addEventListener("ready",q),F.addEventListener("error",B);const D=()=>{if(m.current++,Q(!1),M(!0),m.current>1){H.classList.remove("preview-revealing"),H.offsetWidth,H.classList.add("preview-revealing");const X=()=>H.classList.remove("preview-revealing");H.addEventListener("animationend",X,{once:!0})}n(),p.current&&clearInterval(p.current);let R=m.current>1?!1:D5(W,!1);if(R){b(!0);let X=0;p.current=setInterval(()=>{X+=1,R=D5(W,R),(!R||X>100)&&(p.current&&clearInterval(p.current),p.current=null,b(!1),R&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else b(!1)};W.addEventListener("load",D),z=()=>{if(W.removeEventListener("load",D),F.removeEventListener("click",V,{capture:!0}),F.removeEventListener("shadertransitionstate",G),F.removeEventListener("ready",q),F.removeEventListener("error",B),p.current&&clearInterval(p.current),p.current=null,H.removeChild(F),typeof c!="function"){if(c){const P=c;P.current===W&&(P.current=null)}}}}),()=>{L=!0,z==null||z()}}),d.useEffect(()=>{if(O.current&&(clearTimeout(O.current),O.current=null),y){w(!0),k(!1);return}return k(!0),O.current=setTimeout(()=>{w(!1),k(!1),O.current=null},240),()=>{O.current&&(clearTimeout(O.current),O.current=null)}},[y]);const j=!o&&!Z&&C,_=S&&!$&&!j;return d.useEffect(()=>{r==null||r(j||_)},[r,j,_]),g.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:l,children:[g.jsx("div",{ref:f,className:"w-full h-full"}),j&&g.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:H=>H.preventDefault(),onMouseDown:H=>H.preventDefault(),onPointerDown:H=>H.preventDefault(),children:g.jsx(L5,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),_&&g.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:A?0:1,pointerEvents:A?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:H=>H.preventDefault(),onMouseDown:H=>H.preventDefault(),onPointerDown:H=>H.preventDefault(),children:g.jsx(L5,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});fv.displayName="Player";const xu=30;function Qn(t){if(!Number.isFinite(t)||t<0)return"0:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n.toString().padStart(2,"0")}`}function Xm(t,e=xu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function dv(t,e=xu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function zm(t,e,n=xu){const r=Xm(t,n),i=Math.max(0,r+e);return dv(i,n)}function H5(t,e,n=xu){const r=Xm(t,n),i=Xm(e,n);return`${r}f / ${i}f`}function hv(t){return Number.isFinite(t)&&t>0}function X5(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function v2(t){if(!t)return 0;try{const e=Number(t.getDuration());return hv(e)?e:0}catch{return 0}}function dC(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function hC(t,e,n,r=()=>1){var b;const i=Math.max(0,Number.isFinite(e)?e:0);let l=X5(Number(((b=t.getTime)==null?void 0:b.call(t))??0),i),o=!1,c=0,f=l,m=n.now();const p=S=>{var w;if(l=X5(S,i),typeof t.renderSeek=="function"){t.renderSeek(l);return}(w=t.seek)==null||w.call(t,l)},O=()=>{c&&(n.cancelAnimationFrame(c),c=0)},y=S=>{if(!o)return;const w=Math.max(.1,Number(r())||1),A=(S-m)/1e3*w;if(p(f+A),l>=i){o=!1,c=0;return}c=n.requestAnimationFrame(y)};return{play:()=>{o||i<=0||(l>=i&&p(0),o=!0,f=l,m=n.now(),O(),c=n.requestAnimationFrame(y))},pause:()=>{o=!1,O()},seek:S=>{p(S),o&&(f=l,m=n.now())},getTime:()=>l,getDuration:()=>i,isPlaying:()=>o}}function z5(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{n!=null&&n.keepPlaying||t.pause(),t.seek(e)},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function F5(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return hv(e)?e:0}function mC(t){if(!t)return 0;const e=F5(t.querySelector("[data-composition-id]"));if(e>0)return e;let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){const i=Number.parseFloat(r.getAttribute("data-start")??""),l=F5(r);!Number.isFinite(i)||i<0||l<=0||(n=Math.max(n,i+l))}return n}function Fm(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function mv(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function pv(t,e){const n=e.getAttribute("data-playback-start")?"playback-start":e.getAttribute("data-media-start")?"media-start":void 0,r=e.getAttribute("data-playback-start")??e.getAttribute("data-media-start");if(r!=null){const O=parseFloat(r);Number.isFinite(O)&&(t.playbackStart=O)}n&&(t.playbackStartAttr=n);const i=mv(e);if(!i)return;t.tag=i.tagName.toLowerCase();const l=i.getAttribute("src");l&&(t.src=l);const c=(i.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof c>"u"||!(i instanceof c))return;const f=e.getAttribute("data-source-duration")??i.getAttribute("data-source-duration"),m=f?parseFloat(f):i.duration;Number.isFinite(m)&&m>0&&(t.sourceDuration=m);const p=i.defaultPlaybackRate;Number.isFinite(p)&&p>0&&(t.playbackRate=p)}function yu(t){var i,l,o;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(l=t.id)==null?void 0:l.trim();if(n)return n;const r=(o=t.tag)==null?void 0:o.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const pC=new Set(["base","link","meta","noscript","script","style","template"]);function Y5(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function gC(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return Y5(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?Y5(r):yu({tag:t.tagName})}function Ml(t){if(Fm(t)&&t.id)return`#${t.id}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${e}"]`;if(Fm(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${r}`}}function Bc(t){var n;const e=(n=t.parentElement)==null?void 0:n.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function qc(t,e,n){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const i=Array.from(t.querySelectorAll(n)).indexOf(e);return i>=0?i:void 0}catch{return}}function Ym(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function Ic(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||Ym({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=Ym({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function Bm(t){return t.key??t.id}function OC(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e)}function B5(t,e){return Math.abs(t-e)<.001}function xC(t,e){var o;const n=(o=e.tagName)==null?void 0:o.toLowerCase();if(n&&t.tagName.toLowerCase()!==n)return!1;const r=Number.parseFloat(t.getAttribute("data-start")??"");if(Number.isFinite(r)&&!B5(r,e.start))return!1;const i=Number.parseFloat(t.getAttribute("data-duration")??"");if(Number.isFinite(i)&&!B5(i,e.duration))return!1;const l=Number.parseInt(t.getAttribute("data-track-index")??"",10);return!(Number.isFinite(l)&&l!==e.track)}function yC(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${e}"]`)??t.querySelector(`.${e}`)??null}function bC(t,e,n,r=new Set){const i=e.id?yC(t,e.id):null;if(i&&!r.has(i))return i;const l=OC(t).filter(c=>!r.has(c)),o=l.find(c=>xC(c,e));return o||(l[n]??null)}function vC(t,e){if(!Fm(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return pC.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!Ml(e)}function SC(t,e){t.documentElement&&(t.documentElement.style.overflow="hidden",t.documentElement.style.margin="0"),t.body&&(t.body.style.overflow="hidden",t.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function wC(t){const e=/data-composition-id=["']([^"']+)["']/gi,n=new Set,r=Array.from(t.querySelectorAll("style, script"));for(const o of r){const c=o.textContent||"";if(!c)continue;let f;for(;(f=e.exec(c))!==null;){const m=(f[1]||"").trim();m&&n.add(m)}}if(n.size===0)return;const i=new Set,l=Array.from(t.querySelectorAll("[data-composition-id]"));for(const o of l){const c=o.getAttribute("data-composition-id");c&&i.add(c)}for(const o of n){if(o==="root"||i.has(o))continue;const c=t.getElementById(`${o}-layer`)||t.getElementById(`${o}-comp`)||t.getElementById(o);c&&(c.getAttribute("data-composition-id")||c.setAttribute("data-composition-id",o))}}function AC(t){return t instanceof HTMLElement}function gv(t){const e=t.getRootNode();return typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&AC(e.host)?e.host:null}function Ov(t,e,n){var r;(r=t.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...n},"*")}function xv(t,e){return t||e>1}function kC(t,e){if(t)try{const n=gv(t);if(n&&typeof n.muted=="boolean"){n.muted=e;return}Ov(t,"set-muted",{muted:e})}catch(n){console.warn("[useTimelinePlayer] Failed to set preview media mute state",n)}}function MC(t,e){if(!t)return;const n=Number.isFinite(e)&&e>0?e:1;try{const r=gv(t);if(r&&typeof r.playbackRate=="number"){r.playbackRate=n;return}Ov(t,"set-playback-rate",{playbackRate:n})}catch(r){console.warn("[useTimelinePlayer] Failed to set preview playback rate",r)}}function TC(t,e,n,r){const i=new Set(n.map(O=>O.id)),l=t.querySelector("[data-composition-id]"),o=l==null?void 0:l.getAttribute("data-composition-id"),c=t.querySelectorAll("[data-composition-id][data-start]"),f=[];c.forEach(O=>{var H,L,z,F,ee,W,V,G,q;const y=O,b=y.getAttribute("data-composition-id");if(!b||b===o||i.has(y.id)||i.has(b))return;const S=y.getAttribute("data-start")??"0";let w=parseFloat(S);if(isNaN(w)){const B=t.getElementById(S)||t.querySelector(`[data-composition-id="${S}"]`);if(B){const D=B.getAttribute("data-start")??"0";let P=parseFloat(D);if(isNaN(P)){const Y=t.getElementById(D)||t.querySelector(`[data-composition-id="${D}"]`),U=parseFloat((Y==null?void 0:Y.getAttribute("data-start"))??"0")||0,te=Y==null?void 0:Y.getAttribute("data-composition-id"),ne=parseFloat((Y==null?void 0:Y.getAttribute("data-duration"))??"")||(te?((z=(L=(H=e.__timelines)==null?void 0:H[te])==null?void 0:L.duration)==null?void 0:z.call(L))??0:0);P=U+ne}const R=B.getAttribute("data-composition-id"),X=parseFloat(B.getAttribute("data-duration")??"")||(R?((W=(ee=(F=e.__timelines)==null?void 0:F[R])==null?void 0:ee.duration)==null?void 0:W.call(ee))??0:0);w=P+X}else w=0}let A=parseFloat(y.getAttribute("data-duration")??"");if((isNaN(A)||A<=0)&&(A=((q=(G=(V=e.__timelines)==null?void 0:V[b])==null?void 0:G.duration)==null?void 0:q.call(G))??0),!Number.isFinite(A)||A<=0||(Number.isFinite(w)||(w=0),Number.isFinite(r)&&r>0&&(w>=r||(A=Math.min(A,Math.max(0,r-w)),A<=0))))return;const k=y.getAttribute("data-track-index"),$=k!=null?parseInt(k,10):0,Q=y.getAttribute("data-composition-src")||y.getAttribute("data-composition-file"),C=Ml(y),M=Bc(y),Z=qc(t,y,C),E=yu({id:y.id||b||null,label:y.getAttribute("data-timeline-label")??y.getAttribute("data-label"),tag:y.tagName}),j=Ic({preferredId:y.id||b||null,label:E,fallbackIndex:f.length,domId:y.id||void 0,selector:C,selectorIndex:Z,sourceFile:M}),_={id:j.id,label:E,key:j.key,tag:y.tagName.toLowerCase(),start:w,duration:A,track:isNaN($)?0:$,domId:y.id||void 0,selector:C,selectorIndex:Z,sourceFile:M};if(Q)_.compositionSrc=Q;else{const B=y.querySelector("video[src]");B&&(_.src=B.getAttribute("src")||void 0,_.tag="video")}f.push(_)});let m=!1;const p=n.map(O=>{if(O.compositionSrc)return O;const y=t.getElementById(O.id)??t.querySelector(`[data-composition-id="${O.id}"]`);if(!y)return O;const b=y.getAttribute("data-composition-src")||y.getAttribute("data-composition-file");return b?(m=!0,{...O,compositionSrc:b}):O});return{missing:f,updatedEls:p,patched:m}}const q5=t=>{let e;const n=new Set,r=(m,p)=>{const O=typeof m=="function"?m(e):m;if(!Object.is(O,e)){const y=e;e=p??(typeof O!="object"||O===null)?O:Object.assign({},e,O),n.forEach(b=>b(e,y))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>f,subscribe:m=>(n.add(m),()=>n.delete(m))},f=e=t(r,i,c);return c},CC=(t=>t?q5(t):q5),EC=t=>t;function $C(t,e=EC){const n=X0.useSyncExternalStore(t.subscribe,X0.useCallback(()=>e(t.getState()),[t,e]),X0.useCallback(()=>e(t.getInitialState()),[t,e]));return X0.useDebugValue(n),n}const I5=t=>{const e=CC(t),n=r=>$C(e,r);return Object.assign(n,e),n},yv=(t=>t?I5(t):I5),bv="hf-studio-ui-preferences";function U5(t){return typeof t=="object"&&t!==null}function vv(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function Sv(t){if(!t)return{};try{const e=t.getItem(bv);if(!e)return{};const n=JSON.parse(e);if(!U5(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),U5(n.previewZoom)){const{zoomPercent:i,panX:l,panY:o}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof l=="number"&&Number.isFinite(l)&&typeof o=="number"&&Number.isFinite(o)&&(r.previewZoom={zoomPercent:i,panX:l,panY:o})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),r}catch{return{}}}function Uc(t=vv()){return Sv(t)}function Wc(t,e=vv()){if(e)try{const n={...Sv(e),...t};e.setItem(bv,JSON.stringify(n))}catch{}}const S2=new Set,Qr={notify:t=>S2.forEach(e=>e(t)),subscribe:t=>(S2.add(t),()=>S2.delete(t))},ge=yv(t=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:Uc().playbackRate??1,audioMuted:Uc().audioMuted??!1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,inPoint:null,outPoint:null,requestedSeekTime:null,requestSeek:e=>t({requestedSeekTime:e}),clearSeekRequest:()=>t({requestedSeekTime:null}),setIsPlaying:e=>t({isPlaying:e}),setPlaybackRate:e=>{Wc({playbackRate:e}),t({playbackRate:e})},setAudioMuted:e=>{Wc({audioMuted:e}),t({audioMuted:e})},setLoopEnabled:e=>t({loopEnabled:e}),setZoomMode:e=>t({zoomMode:e}),setInPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{inPoint:r,outPoint:r!==null&&n.outPoint!==null&&r>=n.outPoint?null:n.outPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setOutPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{outPoint:r,inPoint:r!==null&&n.inPoint!==null&&r<=n.inPoint?null:n.inPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setManualZoomPercent:e=>t({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>t({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>t({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>t({timelineReady:e}),setElements:e=>t({elements:e}),setSelectedElementId:e=>t({selectedElementId:e}),updateElement:(e,n)=>t(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...n}:i)})),reset:()=>t({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,inPoint:null,outPoint:null})})),wv="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",Av="https://us.i.posthog.com",QC=3e4,PC=5e3;let Al=[],Rc=null,js=null;function kv(){if(js)return js;try{const t=localStorage.getItem("hf-studio-anon-id");if(t)return js=t,t}catch{}js=crypto.randomUUID();try{localStorage.setItem("hf-studio-anon-id",js)}catch{}return js}function ZC(){try{return localStorage.getItem("hf-studio-telemetry-opt-out")!=="1"}catch{return!0}}function jC(){var t,e;return{studio_version:"dev",screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"")}}function Nt(t,e={}){ZC()&&(Al.push({event:`studio:${t}`,properties:{...jC(),...e},timestamp:new Date().toISOString()}),Rc||(Rc=setInterval(RC,QC)))}async function RC(){if(Al.length===0)return;const t=Al.map(r=>({event:r.event,properties:{...r.properties,$ip:null},distinct_id:kv(),timestamp:r.timestamp}));Al=[];const e=new AbortController,n=setTimeout(()=>e.abort(),PC);try{await fetch(`${Av}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:wv,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){if(Rc&&(clearInterval(Rc),Rc=null),Al.length===0)return;const t=Al.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:kv(),timestamp:n.timestamp}));Al=[];const e=JSON.stringify({api_key:wv,batch:t});try{navigator.sendBeacon(`${Av}/batch/`,e)}catch{}}});const NC=[.25,.5,1,1.5,2],VC=8,LC=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}];function W5(t,e,n){if(!Number.isFinite(n)||n<=0)return 0;const r=(t-e)/n,i=Math.max(0,Math.min(1,r)),l=Math.min(.5,VC/n);return i<=l?0:i>=1-l?1:i}const _C=d.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:l}){const o=ge(ae=>ae.isPlaying),c=ge(ae=>ae.duration),f=ge(ae=>ae.timelineReady),m=ge(ae=>ae.playbackRate),p=ge(ae=>ae.audioMuted),O=ge(ae=>ae.loopEnabled),y=ge.getState().setPlaybackRate,b=ge.getState().setAudioMuted,S=ge.getState().setLoopEnabled,w=ge(ae=>ae.inPoint),A=ge(ae=>ae.outPoint),k=ge.getState().setInPoint,$=ge.getState().setOutPoint,[Q,C]=d.useState(!1),[M,Z]=d.useState(!1),[E,j]=d.useState("time"),[_,H]=d.useState(""),L=d.useRef(null),z=d.useRef(null),F=d.useRef(null),ee=d.useRef(null),W=d.useRef(null),V=d.useRef(null),G=d.useRef(null),q=d.useRef(!1),B=d.useRef(0),D=d.useRef(E);D.current=E;const P=d.useRef(c);P.current=c;const R=r||!f,X=m>1,Y=xv(p,m),U=X?"Audio muted above 1x speed":p?"Unmute audio":"Mute audio";Qt(()=>{const ae=$e=>{B.current=$e;const Ze=P.current,Je=Ze>0?Math.min(100,$e/Ze*100):0;L.current&&(L.current.style.width=`${Je}%`),z.current&&(z.current.style.left=`${Je}%`),F.current&&(F.current.textContent=D.current==="frame"?H5($e,Ze):Qn($e)),W.current&&W.current.setAttribute("aria-valuenow",String(Math.round($e)))},xe=Qr.subscribe(ae);ae(ge.getState().currentTime);const Qe=setInterval(()=>{const $e=ge.getState().currentTime,Ze=ge.getState().duration;if(Ze>0&&$e>0){const Je=Math.min(100,$e/Ze*100);L.current&&(L.current.style.width=`${Je}%`),z.current&&(z.current.style.left=`${Je}%`)}},500);return()=>{xe(),clearInterval(Qe)}}),d.useEffect(()=>{if(!F.current)return;const ae=B.current;F.current.textContent=E==="frame"?H5(ae,c):Qn(ae)},[c,E]),d.useEffect(()=>{if(!Q)return;const ae=xe=>{V.current&&!V.current.contains(xe.target)&&C(!1)};return document.addEventListener("mousedown",ae),()=>{document.removeEventListener("mousedown",ae)}},[Q]),d.useEffect(()=>{if(!M)return;const ae=xe=>{G.current&&!G.current.contains(xe.target)&&Z(!1)};return document.addEventListener("mousedown",ae),()=>{document.removeEventListener("mousedown",ae)}},[M]);const te=d.useCallback(ae=>{if(r)return;const xe=ee.current;if(!xe||c<=0)return;const Qe=xe.getBoundingClientRect(),$e=W5(ae,Qe.left,Qe.width),Ze=$e*100;L.current&&(L.current.style.width=`${Ze}%`),z.current&&(z.current.style.left=`${Ze}%`),n($e*c)},[r,c,n]),ne=d.useCallback(ae=>{if(ae.button!==0)return;ae.preventDefault(),ae.currentTarget.focus(),q.current=!0;const xe=ae.currentTarget,Qe=ae.pointerId;try{xe.setPointerCapture(Qe)}catch{}te(ae.clientX);let $e=0,Ze=ae.clientX;const Je=nt=>{if(nt.pointerId!==Qe||!q.current)return;Ze=nt.clientX;const Re=ee.current,kt=P.current;if(Re&&kt>0){const Fe=Re.getBoundingClientRect(),Gt=W5(nt.clientX,Fe.left,Fe.width)*100;L.current&&(L.current.style.width=`${Gt}%`),z.current&&(z.current.style.left=`${Gt}%`)}$e||($e=requestAnimationFrame(()=>{$e=0,q.current&&te(Ze)}))},Ue=()=>{q.current=!1,$e&&(cancelAnimationFrame($e),$e=0),te(Ze);try{xe.releasePointerCapture(Qe)}catch{}xe.removeEventListener("pointermove",Je),xe.removeEventListener("pointerup",ve),xe.removeEventListener("pointercancel",ve),window.removeEventListener("pointerup",ve),window.removeEventListener("pointercancel",ve),document.removeEventListener("visibilitychange",bt),window.removeEventListener("blur",Ue)},ve=nt=>{nt.pointerId===Qe&&Ue()},bt=()=>{document.visibilityState==="hidden"&&Ue()};xe.addEventListener("pointermove",Je),xe.addEventListener("pointerup",ve),xe.addEventListener("pointercancel",ve),window.addEventListener("pointerup",ve),window.addEventListener("pointercancel",ve),document.addEventListener("visibilitychange",bt),window.addEventListener("blur",Ue)},[te]),ce=d.useCallback(ae=>{if(r||!f||c<=0)return;const xe=ae.shiftKey?10:1;ae.key==="ArrowLeft"?(ae.preventDefault(),n(zm(B.current,-xe))):ae.key==="ArrowRight"&&(ae.preventDefault(),n(Math.min(c,zm(B.current,xe))))},[r,f,c,n]),me=d.useCallback(()=>{if(r)return;const ae=Number.parseInt(_,10);!Number.isFinite(ae)||c<=0||n(Math.min(c,dv(Math.max(0,ae))))},[r,c,_,n]),Se=d.useCallback(ae=>{ae.preventDefault(),me()},[me]),pe=d.useCallback(ae=>{ae.key==="Enter"&&(ae.preventDefault(),me())},[me]);return g.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1","aria-disabled":r||void 0,style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[g.jsx("button",{type:"button","aria-label":o?"Pause":"Play",onClick:()=>{Nt("playback",{action:o?"pause":"play"}),e()},disabled:R,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:o?g.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[g.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),g.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):g.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:g.jsx("polygon",{points:"6,3 20,12 6,21"})})}),g.jsxs("button",{type:"button",onClick:()=>j(ae=>ae==="time"?"frame":"time"),disabled:r,title:E==="time"?"Switch to frame display":"Switch to time display",className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px] text-left transition-colors disabled:pointer-events-none hover:opacity-80",style:{color:"#A1A1AA",cursor:"pointer"},children:[g.jsx("span",{ref:F,children:Qn(0)}),E==="time"?g.jsxs(g.Fragment,{children:[g.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),g.jsx("span",{style:{color:"#52525B"},children:Qn(c)})]}):null]}),g.jsx("div",{ref:ae=>{ee.current=ae,W.current=ae},role:"slider",tabIndex:r?-1:0,"aria-label":"Seek","aria-disabled":r||void 0,"aria-valuemin":0,"aria-valuemax":Math.round(c),"aria-valuenow":0,className:`min-w-[96px] flex-1 h-6 flex items-center group ${r?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{touchAction:"none"},onPointerDown:ne,onKeyDown:ce,children:g.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[(w!==null||A!==null)&&c>0&&g.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${w!==null?Math.min(100,w/c*100):0}%`,right:`${A!==null?100-Math.min(100,A/c*100):0}%`,background:"rgba(60,230,172,0.15)"}}),g.jsx("div",{ref:L,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),w!==null&&c>0&&g.jsx("div",{className:"absolute z-[3] pointer-events-none",style:{left:`${Math.min(100,w/c*100)}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"10px",background:"#3CE6AC",borderRadius:"1px"}}),A!==null&&c>0&&g.jsx("div",{className:"absolute z-[3] pointer-events-none",style:{left:`${Math.min(100,A/c*100)}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"10px",background:"#3CE6AC",borderRadius:"1px"}}),g.jsx("div",{ref:z,className:"absolute top-1/2 z-[4] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})}),g.jsx("button",{type:"button",onClick:()=>{X||(Nt("playback",{action:"mute_toggle",muted:!p}),b(!p))},disabled:R||X,title:U,"aria-label":U,"aria-pressed":Y,className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors disabled:pointer-events-none ${Y?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"} ${X?"opacity-70":""}`,children:Y?g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),g.jsx("path",{d:"m19 9-6 6"}),g.jsx("path",{d:"m13 9 6 6"})]}):g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),g.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),g.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"})]})}),g.jsxs("div",{ref:V,className:"relative flex-shrink-0",children:[g.jsx("button",{type:"button",onClick:()=>C(ae=>!ae),disabled:r,className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:m===1?"1x":`${m}x`}),Q&&g.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:NC.map(ae=>g.jsxs("button",{onClick:()=>{Nt("playback",{action:"speed_change",rate:ae}),y(ae),C(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:ae===m?"#FAFAFA":"#71717A",background:ae===m?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:xe=>{ae!==m&&(xe.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:xe=>{ae!==m&&(xe.currentTarget.style.background="transparent")},children:[ae,"x"]},ae))})]}),g.jsx("button",{type:"button",onClick:()=>{Nt("playback",{action:"loop_toggle",enabled:!O}),S(!O)},disabled:r,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${O?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,title:"Loop playback","aria-label":O?"Disable loop playback":"Enable loop playback","aria-pressed":O,children:g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M17 2l4 4-4 4"}),g.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),g.jsx("path",{d:"M7 22l-4-4 4-4"}),g.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})}),l&&g.jsx("button",{type:"button",onClick:()=>{Nt("playback",{action:"fullscreen_toggle",active:!i}),l()},className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors ${i?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,title:i?"Exit fullscreen (F)":"Enter fullscreen (F)","aria-label":i?"Exit fullscreen":"Enter fullscreen",children:i?g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),g.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),g.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),g.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),g.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),g.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),g.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})}),g.jsxs("div",{ref:G,className:"relative flex-shrink-0",children:[g.jsx("button",{type:"button",onClick:()=>Z(ae=>!ae),className:`w-6 h-6 flex items-center justify-center rounded border transition-colors ${M?"border-neutral-600 text-neutral-200 bg-neutral-800":"border-neutral-800 text-neutral-600 hover:text-neutral-300 hover:border-neutral-600"}`,"aria-label":"Shortcuts and tools","aria-expanded":M,children:g.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),g.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})}),M&&g.jsxs("div",{className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[g.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[g.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),g.jsxs("form",{onSubmit:Se,className:"flex items-center gap-1.5",children:[g.jsx("input",{value:_,onChange:ae=>H(ae.target.value),disabled:r,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:pe,onBlur:me}),g.jsx("button",{type:"submit",disabled:r,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})]})]}),g.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),g.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[g.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),g.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),g.jsx("div",{className:"flex items-center gap-1.5",children:w!==null?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:Qn(w)}),g.jsx("button",{type:"button",onClick:()=>k(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:g.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}):g.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),g.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),g.jsx("div",{className:"flex items-center gap-1.5",children:A!==null?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:Qn(A)}),g.jsx("button",{type:"button",onClick:()=>$(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:g.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]}):g.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),g.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),g.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:LC.map(ae=>g.jsxs("div",{children:[g.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:ae.title}),g.jsx("div",{className:"flex flex-col gap-1",children:ae.hints.map(xe=>g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:xe.key}),g.jsx("span",{className:"text-[10px] text-neutral-400",children:xe.label})]},xe.key))})]},ae.title))})]})]})]})}),G5=100;function Xs(t){return Math.round(t*G5)/G5}function Gc(t,e,n){return Math.min(Math.max(t,e),n)}const K5=.55,F0=40,J5=12;function e3(t,e,n){const r=(i,l,o)=>{if(o<i+F0){const c=Math.max(0,1-(o-i)/F0);return-Math.round(J5*c)}if(o>l-F0){const c=Math.max(0,1-(l-o)/F0);return Math.round(J5*c)}return 0};return{x:r(t.left,t.right,e),y:r(t.top,t.bottom,n)}}function DC(t,e,n){const r=(t.currentScrollLeft??0)-(t.originScrollLeft??0),i=(t.currentScrollTop??0)-(t.originScrollTop??0),l=(e-t.originClientX+r)/Math.max(t.pixelsPerSecond,1),o=(n-t.originClientY+i)/Math.max(t.trackHeight,1),c=Math.round(o),f=Math.max(0,t.trackOrder.indexOf(t.track)),m=f+c,p=Gc(m,0,Math.max(0,t.trackOrder.length-1)),O=Math.min(...t.trackOrder),y=Math.max(...t.trackOrder);let b=t.trackOrder[p]??t.track;const S=f===0,w=f===t.trackOrder.length-1;return S&&m<0&&f+o<=-K5?b=O-1:w&&m>t.trackOrder.length-1&&f+o>=t.trackOrder.length-1+K5&&(b=y+1),{start:Gc(Xs(t.start+l),0,Math.max(0,t.maxStart)),track:b}}function HC(t,e,n){const r=Math.max(.05,t.minDuration??.1),i=(n-t.originClientX)/Math.max(t.pixelsPerSecond,1);if(e==="end"){const b=Gc(Xs(t.duration+i),r,Math.max(r,t.maxEnd-t.start));return{start:t.start,duration:b,playbackStart:t.playbackStart}}const l=Math.max(.1,t.playbackRate??1),o=t.playbackStart!=null?t.playbackStart/l:Number.POSITIVE_INFINITY,c=-Math.min(t.start-t.minStart,o),f=t.duration-r,m=Gc(i,c,f),p=Xs(t.start+m),O=Xs(t.duration-m),y=t.playbackStart!=null?Xs(Math.max(0,t.playbackStart+m*l)):void 0;return{start:p,duration:O,playbackStart:y}}function XC(t){if(t.compositionSrc||t.playbackStartAttr!=null||t.sourceDuration!=null&&Number.isFinite(t.sourceDuration)&&t.sourceDuration>0)return!0;const e=t.tag.toLowerCase();return["video","audio","img"].includes(e)}function zC(t){return!!(t.domId||t.selector)}function t3(t){if(t.timingSource==="implicit"||t.timelineLocked)return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=zC(t),n=Number.isFinite(t.duration)&&t.duration>0,r=XC(t);return{canMove:e&&(r||n),canTrimEnd:e&&n,canTrimStart:e&&n}}function FC(t){if(t.capabilities.canMove)return null;const e=Math.max(0,t.width),n=Gc(t.offsetX,0,e),r=Math.max(0,t.handleWidth);return n<=r&&!t.capabilities.canTrimStart?"resize-start":n>=Math.max(0,e-r)&&!t.capabilities.canTrimEnd?"resize-end":"move"}function YC(t,e){return{start:t.start,end:t.start+t.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function BC({rangeStart:t,rangeEnd:e,elements:n,prompt:r}){const i=Math.min(t,e),l=Math.max(t,e),o=n.map(c=>`- #${c.id} (${c.tag}) — ${Qn(c.start)} to ${Qn(c.start+c.duration)}, track ${c.track}`).join(`
|
|
50
|
-
`);return`Edit the following HyperFrames composition:
|
|
51
|
-
|
|
52
|
-
Time range: ${Qn(i)} — ${Qn(l)}
|
|
53
|
-
|
|
54
|
-
Elements in range:
|
|
55
|
-
${o||"(none)"}
|
|
56
|
-
|
|
57
|
-
User request:
|
|
58
|
-
${r.trim()||"(no prompt provided)"}
|
|
59
|
-
|
|
60
|
-
Instructions:
|
|
61
|
-
Modify only the elements listed above within the specified time range.
|
|
62
|
-
The composition uses HyperFrames data attributes (data-start, data-duration, data-track-index) and GSAP for animations.
|
|
63
|
-
Preserve all other elements and timing outside this range.`}function n3(t){return t.trim()}function vn(t){return Number(Xs(t).toFixed(2)).toString()}function r3(t){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=t,e.setAttribute("readonly","true"),e.style.position="fixed",e.style.top="0",e.style.left="0",e.style.width="1px",e.style.height="1px",e.style.padding="0",e.style.border="0",e.style.opacity="0",e.style.pointerEvents="none",document.body.appendChild(e),e.focus({preventScroll:!0}),e.select(),e.setSelectionRange(0,t.length);try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(e)}}function qC(){if(typeof navigator>"u")return!1;const t=navigator.userAgent;return/Safari/i.test(t)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(t)}async function Kc(t){const e=qC();if(e&&r3(t))return!0;const n=typeof navigator<"u"?navigator.clipboard:void 0;if(n!=null&&n.writeText)try{return await n.writeText(t),!0}catch{}return!e&&r3(t)}function IC({rangeStart:t,rangeEnd:e,anchorX:n,anchorY:r,onClose:i}){const l=ge(M=>M.elements),[o,c]=d.useState(""),[f,m]=d.useState(!1),[p,O]=d.useState(!1),y=d.useRef(null),b=d.useRef(null),S=Math.min(t,e),w=Math.max(t,e),A=d.useMemo(()=>l.filter(M=>{const Z=M.start+M.duration;return M.start<w&&Z>S}),[l,S,w]);Qt(()=>{setTimeout(()=>{var M;return(M=b.current)==null?void 0:M.focus()},50)}),Qt(()=>{const M=Z=>{Z.key==="Escape"&&i()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)}),Qt(()=>{const M=Z=>{y.current&&!y.current.contains(Z.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",M),100),()=>window.removeEventListener("mousedown",M)});const k=d.useCallback(()=>BC({rangeStart:S,rangeEnd:w,elements:A,prompt:o}),[S,w,A,o]),$=d.useCallback(async()=>{await Kc(k())&&(m(!0),setTimeout(()=>{m(!1),i()},800))},[k,i]),Q=d.useCallback(async()=>{const M=n3(o);!M||!await Kc(M)||(O(!0),setTimeout(()=>{O(!1)},800))},[o]),C={position:"fixed",left:Math.max(8,Math.min(n-160,window.innerWidth-336)),top:Math.max(8,r-280),zIndex:200};return g.jsx("div",{ref:y,style:C,children:g.jsxs("div",{className:"w-80 bg-neutral-900 border border-neutral-700/60 rounded-xl shadow-2xl shadow-black/40 overflow-hidden",children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-neutral-800/60",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-studio-accent"}),g.jsxs("span",{className:"text-[11px] font-medium text-neutral-300",children:[Qn(S)," — ",Qn(w)]})]}),g.jsxs("span",{className:"text-[10px] text-neutral-600",children:[A.length," element",A.length!==1?"s":""]})]}),A.length>0&&g.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:A.map(M=>g.jsxs("div",{className:"flex items-center justify-between py-0.5",children:[g.jsxs("span",{className:"text-[10px] font-mono text-studio-accent/80",children:["#",M.id]}),g.jsx("span",{className:"text-[10px] text-neutral-600",children:M.tag})]},M.id))}),g.jsx("div",{className:"p-3",children:g.jsx("textarea",{ref:b,value:o,onChange:M=>c(M.target.value),onKeyDown:M=>{M.key==="Enter"&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),$())},placeholder:"What should change?",rows:2,className:"w-full px-3 py-2 text-xs bg-neutral-800/60 border border-neutral-700/40 rounded-lg text-neutral-200 placeholder:text-neutral-600 resize-none focus:outline-none focus:border-studio-accent/40 transition-colors"})}),g.jsxs("div",{className:"grid grid-cols-2 gap-2 px-3 pb-3",children:[g.jsx("button",{onClick:Q,disabled:!n3(o),className:`py-1.5 text-[11px] font-medium rounded-lg transition-all border ${p?"bg-green-500/20 text-green-400 border-green-500/30":"bg-neutral-800/70 text-neutral-200 border-neutral-700/50 hover:bg-neutral-800"} disabled:opacity-50 disabled:cursor-not-allowed`,children:p?"Prompt Copied!":"Copy Prompt"}),g.jsxs("button",{onClick:$,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${f?"bg-green-500/20 text-green-400 border border-green-500/30":"bg-studio-accent/15 text-studio-accent border border-studio-accent/25 hover:bg-studio-accent/25"}`,children:[f?"Copied!":"Copy to Agent",!f&&g.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}const UC={clip:"#1c2028",accent:"#3CE6AC",label:"#dde1e8",iconBackground:"rgba(255,255,255,0.06)"},Mv={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.045)",rowBackground:"#0A0A0B",rowBorder:"rgba(255,255,255,0.05)",gutterBackground:"#0A0A0B",gutterBorder:"rgba(255,255,255,0.05)",textPrimary:"#E8EDF5",textSecondary:"#8391A8",tickText:"rgba(131,145,168,0.92)",tickMajor:"rgba(255,255,255,0.13)",tickMinor:"rgba(255,255,255,0.08)",clipBackground:"#141922",clipBackgroundActive:"#181e28",clipBorder:"rgba(255,255,255,0.10)",clipBorderHover:"rgba(255,255,255,0.18)",clipBorderActive:"rgba(255,255,255,0.24)",clipShadow:"none",clipShadowHover:"0 2px 8px rgba(0,0,0,0.2)",clipShadowActive:"0 2px 8px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.04)",clipShadowDragging:"0 8px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06)",handleColor:"rgba(255,255,255,0.2)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"6px"};function WC(t){return UC}function GC({isHovered:t,isSelected:e,isDragging:n}){return n?.95:e?.82:t?.76:0}function KC({element:t,draggedElementId:e,previewStart:n,previewTrack:r}){return(t.key??t.id)!==e||n===null||r===null?t:{...t,start:n,track:r}}const Ut=32,Jc=72,io=24,i3=3,JC=18,eE=20;function tE(t,e){const n=[.25,.5,1,2,5,10,15,30,60,120,300,600];if(Number.isFinite(e)&&(e??0)>0)return n.find(o=>o*(e??0)>=128)??600;const r=[.25,.5,1,2,5,10,15,30,60],i=t/6;return r.find(l=>l>=i)??60}function nE(t,e){let n=t/2;return t>=30?n=t/6:t>=15?n=t/3:t>=5?n=t/5:t>=1&&(n=t/4),Number.isFinite(e)&&(e??0)>0&&n*(e??0)<20?Math.max(.25,t/2):Math.max(.25,n)}function rE(t,e){if(t<=0||!Number.isFinite(t)||t>7200)return{major:[],minor:[]};const n=tE(t,e),r=nE(n,e),i=[],l=[],o=2e3;for(let c=0;c<=t+.001&&i.length+l.length<o;c+=r){const f=Math.round(c*100)/100;Math.abs(f%n)<.01||Math.abs(f%n-n)<.01?i.push(f):l.push(f)}return{major:i,minor:l}}function iE(t,e,n){if(!Number.isFinite(t))return"0:00";const r=Math.max(0,t);if(n<1){const i=Math.round(r*10),l=Math.floor(i/10),o=i%10;return`${Qn(l)}.${o}`}if(e>=3600||r>=3600){const i=Math.floor(r),l=Math.floor(i/3600),o=Math.floor(i%3600/60),c=i%60;return`${l}:${o.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`}return Qn(r)}function a3(t,e,n){return t==="fit"||!Number.isFinite(e)||!Number.isFinite(n)?!1:e-n>1}function aE(t,e,n){return t==="manual"&&e==="fit"?0:n}function lE(t){const e=Math.max(0,t.currentPixelsPerSecond),n=Math.max(0,t.nextPixelsPerSecond);if(!Number.isFinite(t.pointerX)||!Number.isFinite(t.currentScrollLeft)||!Number.isFinite(t.duration)||t.duration<=0||e<=0||n<=0)return Math.max(0,t.currentScrollLeft);const r=Math.max(0,t.currentScrollLeft+t.pointerX-t.gutter),i=Math.max(0,Math.min(t.duration,r/e));return Math.max(0,t.gutter+i*n-t.pointerX)}function l3(t,e){return!Number.isFinite(t)||!Number.isFinite(e)?Ut:Ut+Math.max(0,t)*Math.max(0,e)}function sE(t){return io+Math.max(0,t)*Jc+eE}function oE(t,e){return!Number.isFinite(t)||!Number.isFinite(e)?!0:t-e<=1}function cE(t,e){return t.length===0?0:e==null||e<0?t[0]:e>=t.length?Math.max(...t)+1:t[e]??t[t.length-1]??0}function w2(t,e,n){const r=e-t.rectLeft+t.scrollLeft-Ut,i=n-t.rectTop+t.scrollTop-io,l=Math.max(0,Math.min(t.duration,Math.round(r/Math.max(t.pixelsPerSecond,1)*100)/100)),o=Math.floor(i/Math.max(t.trackHeight,1));return{start:l,track:cE(t.trackOrder,o)}}function uE({scrollRef:t,ppsRef:e,effectiveDuration:n,pps:r,onSeek:i,seekFromX:l,autoScrollDuringDrag:o,dragScrollRaf:c,isDragging:f,setShowPopover:m}){const p=d.useRef(!1),O=d.useRef(0),[y,b]=d.useState(null),S=d.useRef(null),w=d.useRef(0),A=d.useRef(0),k=d.useCallback(C=>{var M,Z;if(C.button===0){if(C.shiftKey){C.currentTarget.setPointerCapture(C.pointerId),p.current=!0,m(!1);const E=(M=t.current)==null?void 0:M.getBoundingClientRect();if(E){const j=C.clientX-E.left+(((Z=t.current)==null?void 0:Z.scrollLeft)??0)-Ut,_=Math.max(0,j/r);O.current=_,b({start:_,end:_,anchorX:C.clientX,anchorY:C.clientY})}return}S.current=null,!C.target.closest("[data-clip]")&&(C.currentTarget.setPointerCapture(C.pointerId),f.current=!0,b(null),m(!1),l(C.clientX))}},[l,r,t,f,m]),$=d.useCallback(C=>{var Z,E;if(p.current){const j=(Z=t.current)==null?void 0:Z.getBoundingClientRect();if(j){const _=C.clientX-j.left+(((E=t.current)==null?void 0:E.scrollLeft)??0)-Ut;b(H=>H?{...H,end:Math.max(0,_/r),anchorX:C.clientX,anchorY:C.clientY}:null)}return}if(!f.current)return;A.current=C.clientX;const M=t.current;if(M){const j=M.getBoundingClientRect(),_=C.clientX-j.left+M.scrollLeft-Ut;if(_>=0){const H=M.scrollWidth/r;Qr.notify(Math.max(0,Math.min(H,_/r)))}}w.current||(w.current=requestAnimationFrame(()=>{w.current=0,f.current&&(l(A.current),o(A.current))}))},[l,o,r,t,f]),Q=d.useCallback(()=>{if(p.current){p.current=!1;const C=S.current;S.current=null,b(M=>M&&C&&Math.abs(M.end-M.start)<=.2?(m(!0),YC(C.element,C)):M&&Math.abs(M.end-M.start)>.2?(m(!0),M):null);return}w.current&&(cancelAnimationFrame(w.current),w.current=0),l(A.current),f.current=!1,cancelAnimationFrame(c.current)},[f,c,m,l]);return{rangeSelection:y,setRangeSelection:b,shiftClickClipRef:S,handlePointerDown:k,handlePointerMove:$,handlePointerUp:Q}}const fE=10,dE=2e3,hE=.8,mE=1.25,pE=.0035;function xg(t){return Number.isFinite(t)?Math.max(fE,Math.min(dE,Math.round(t))):100}function jf(t,e){return t==="fit"?100:xg(e)}function gE(t,e,n){if(!Number.isFinite(t)||t<=0)return 100;const r=jf(e,n);return e==="fit"?t:t*(r/100)}function s3(t,e,n){const r=jf(e,n),i=t==="in"?r*mE:r*hE;return xg(i)}function OE(t,e,n){const r=jf(e,n);return!Number.isFinite(t)||t===0?r:xg(r*Math.exp(-t*pE))}function xE({playheadRef:t,scrollRef:e,ppsRef:n,durationRef:r,isDragging:i,currentTime:l,zoomMode:o,zoomModeRef:c,manualZoomPercentRef:f,fitPps:m,fitPpsRef:p,effectiveDuration:O,pps:y,timelineReady:b,elementsLength:S,setZoomMode:w,setManualZoomPercent:A,onSeek:k}){const $=d.useRef(0),Q=d.useRef(o),C=d.useCallback(j=>{!t.current||r.current<=0||(t.current.style.left=`${l3(j,n.current)}px`)},[t,r,n]);d.useEffect(()=>{C(l)},[l,y,C]),d.useEffect(()=>{const j=e.current;if(!j){Q.current=o;return}j.scrollLeft=aE(Q.current,o,j.scrollLeft),Q.current=o},[o,e]),Qt(()=>Qr.subscribe(_=>{if(!t.current||r.current<=0)return;const H=l3(_,n.current);t.current.style.left=`${H}px`;const L=e.current;if(L&&!i.current&&a3(c.current,L.scrollWidth,L.clientWidth)){const z=L.clientWidth*.12;H>L.scrollLeft+L.clientWidth-z?L.scrollLeft=H-L.clientWidth*.15:H<L.scrollLeft+Ut&&(L.scrollLeft=Math.max(0,H-Ut))}}));const M=d.useCallback(j=>{const _=e.current;if(!_||O<=0)return;const H=_.getBoundingClientRect(),L=j-H.left+_.scrollLeft-Ut;if(L<0)return;const z=Math.max(0,Math.min(O,L/y));Qr.notify(z),k==null||k(z)},[e,O,y,k]),Z=d.useCallback(j=>{cancelAnimationFrame($.current);const _=e.current;if(!_||!i.current||!a3(c.current,_.scrollWidth,_.clientWidth))return;const H=_.getBoundingClientRect(),L=40,z=12;let F=0;j<H.left+L?F=-z*Math.max(0,1-(j-H.left)/L):j>H.right-L&&(F=z*Math.max(0,1-(H.right-j)/L)),F!==0&&(_.scrollLeft+=F,M(j),$.current=requestAnimationFrame(()=>Z(j)))},[e,i,c,M]),E=d.useCallback(j=>{if(!j.ctrlKey)return;const _=e.current;if(!_||r.current<=0||p.current<=0||n.current<=0)return;j.preventDefault(),j.stopPropagation();const H=_.getBoundingClientRect(),L=OE(j.deltaY,c.current,f.current);if(L===f.current&&c.current==="manual")return;const z=p.current*(L/100),F=lE({pointerX:j.clientX-H.left,currentScrollLeft:_.scrollLeft,gutter:Ut,currentPixelsPerSecond:n.current,nextPixelsPerSecond:z,duration:r.current});w("manual"),A(L),requestAnimationFrame(()=>{const ee=Math.max(0,_.scrollWidth-_.clientWidth);_.scrollLeft=Math.min(ee,F)})},[e,r,p,n,c,f,A,w]);return d.useEffect(()=>{const j=e.current;if(j)return j.addEventListener("wheel",E,{passive:!1,capture:!0}),()=>{j.removeEventListener("wheel",E,{capture:!0})}},[E,e,b,S]),{seekFromX:M,autoScrollDuringDrag:Z,dragScrollRaf:$}}const yo="/icons/timeline";function bo({src:t}){return g.jsx("img",{src:t,alt:"",width:12,height:12,style:{filter:"brightness(0) invert(1)"},draggable:!1})}const yE=g.jsx(bo,{src:`${yo}/captions.svg`}),o3=g.jsx(bo,{src:`${yo}/image.svg`}),bE=g.jsx(bo,{src:`${yo}/music.svg`}),c3=g.jsx(bo,{src:`${yo}/text.svg`}),qm=g.jsx(bo,{src:`${yo}/composition.svg`}),vE=g.jsx(bo,{src:`${yo}/audio.svg`}),u3={video:o3,audio:bE,img:o3,div:qm,span:yE,p:c3,h1:c3,section:qm,sfx:vE};function f3(t){const e=WC(),n=t.toLowerCase(),r=n.startsWith("h")&&n.length===2&&"123456".includes(n[1]??"")?u3.h1:u3[n]??qm;return{...e,icon:r}}const eu=/\.(jpg|jpeg|png|gif|webp|svg|ico)$/i,yg=/\.(mp4|webm|mov)$/i,bg=/\.(mp3|wav|ogg|m4a|aac)$/i,Z1=/\.(woff|woff2|ttf|ttc|otf|eot)$/i,Tv=/\.(mp4|webm|mov|mp3|wav|ogg|m4a|aac|jpg|jpeg|png|gif|webp|svg|ico)$/i;function Cv(t){return Tv.test(t)}const Im="application/x-hyperframes-asset",tu="application/x-hyperframes-block",SE=5;function d3(t){return eu.test(t)?"image":yg.test(t)?"video":bg.test(t)?"audio":null}function wE(t,e){const i=(t.split("/").pop()??"asset").replace(/\.[^.]+$/,"").replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").toLowerCase()||"asset",l=new Set(e);if(!l.has(i))return i;let o=2;for(;l.has(`${i}_${o}`);)o+=1;return`${i}_${o}`}function AE(t,e){const n=t.includes("/")?t.slice(0,t.lastIndexOf("/")):"";if(!n)return e;const r=n.split("/").filter(Boolean),i=e.split("/").filter(Boolean);for(;r.length>0&&i.length>0&&r[0]===i[0];)r.shift(),i.shift();return[...r.map(()=>".."),...i].join("/")||e.split("/").pop()||e}function kE(t,e,n=[]){let r=Math.round(Math.max(0,t.start)*100)/100;const i=r,l=e.map(m=>Number.isFinite(m)&&m>0?m:SE),o=l.reduce((m,p)=>Math.round((m+p)*100)/100,i),f=n.some(m=>{if(m.track!==t.track)return!1;const p=Math.max(0,m.start),O=p+Math.max(0,m.duration);return i<O&&o>p})?Math.max(t.track,...n.map(m=>m.track))+1:t.track;return l.map(m=>{const p=r;return r=Math.round((r+m)*100)/100,{start:p,track:f}})}function Ev(t){var r,i;const e=Number.parseFloat(((r=t.match(/\bdata-width=(["'])([^"']+)\1/i))==null?void 0:r[2])??""),n=Number.parseFloat(((i=t.match(/\bdata-height=(["'])([^"']+)\1/i))==null?void 0:i[2])??"");return{left:0,top:0,width:Number.isFinite(e)&&e>0?Math.round(e):640,height:Number.isFinite(n)&&n>0?Math.round(n):360}}function ME(t){const e=`id="${t.id}" class="clip" src="${t.assetPath}" data-start="${t.start}" data-duration="${t.duration}" data-track-index="${t.track}"`,n=t.geometry??{left:0,top:0,width:640,height:360},r=`position: absolute; left: ${n.left}px; top: ${n.top}px; width: ${n.width}px; height: ${n.height}px; object-fit: contain; z-index: ${t.zIndex}`;return t.kind==="image"?`<img ${e} style="${r}" />`:t.kind==="video"?`<video ${e} muted playsinline style="${r}"></video>`:`<audio ${e} style="z-index: ${t.zIndex}"></audio>`}function vg(t,e){var m;const r=/<[^>]*data-composition-id="[^"]+"[^>]*>/i.exec(t);if(!r||r.index==null)throw new Error("No composition root found in target source");const i=r.index+r[0].length,l=t.lastIndexOf(`
|
|
64
|
-
`,r.index),c=(((m=t.slice(l+1,r.index).match(/^(\s*)/))==null?void 0:m[1])??"")+" ",f=e.split(`
|
|
65
|
-
`).map((p,O)=>O===0?p:c+p).join(`
|
|
66
|
-
`);return`${t.slice(0,i)}
|
|
67
|
-
${c}${f}${t.slice(i)}`}function TE({isDragOver:t,onFileDrop:e,onDragOver:n,onDragLeave:r,onDrop:i}){return g.jsxs("div",{className:`h-full border-t bg-[#0a0a0b] flex flex-col select-none transition-colors duration-150 ${t?"border-studio-accent/50 bg-studio-accent/[0.03]":"border-neutral-800/50"}`,onDragOver:n,onDragLeave:r,onDrop:i,children:[g.jsx("div",{className:"flex-shrink-0 border-b border-neutral-800/40 flex items-end relative",style:{height:io,paddingLeft:Ut},children:[0,10,20,30,40,50].map(l=>g.jsxs("div",{className:"flex flex-col items-center",style:{position:"absolute",left:Ut+l*14},children:[g.jsx("span",{className:"text-[9px] text-neutral-600 font-mono tabular-nums leading-none mb-0.5",children:`${Math.floor(l/60)}:${(l%60).toString().padStart(2,"0")}`}),g.jsx("div",{className:"w-px h-[5px] bg-neutral-700/40"})]},l))}),g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsx("div",{className:`flex items-center gap-3 px-6 py-3 border border-dashed rounded-lg transition-colors duration-150 ${t?"border-studio-accent/60 bg-studio-accent/[0.06]":"border-neutral-700/50"}`,children:t?g.jsxs(g.Fragment,{children:[g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-studio-accent flex-shrink-0",children:[g.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),g.jsx("polyline",{points:"7 10 12 15 17 10"}),g.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),g.jsx("span",{className:"text-[13px] text-studio-accent",children:"Drop media files to import"})]}):g.jsxs(g.Fragment,{children:[g.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-neutral-600 flex-shrink-0",children:[g.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2"}),g.jsx("path",{d:"M7 2v20"}),g.jsx("path",{d:"M17 2v20"}),g.jsx("path",{d:"M2 7h20"}),g.jsx("path",{d:"M2 17h20"})]}),g.jsx("span",{className:"text-[13px] text-neutral-500",children:e?"Drop media here or describe your video to start":"Describe your video to start creating"})]})})})]})}const h3=d.memo(function({el:e,pps:n,clipY:r,isSelected:i,isHovered:l,isDragging:o=!1,hasCustomContent:c,capabilities:f,theme:m=Mv,trackStyle:p,isComposition:O,onHoverStart:y,onHoverEnd:b,onPointerDown:S,onResizeStart:w,onClick:A,onDoubleClick:k,children:$}){const Q=e.start*n,C=Math.max(e.duration*n,4),M=GC({isHovered:l,isSelected:i,isDragging:o}),Z=i?p.accent+"60":l?m.clipBorderHover:m.clipBorder,E=o?m.clipShadowDragging:i?`0 0 0 1px ${p.accent}40`:l?m.clipShadowHover:m.clipShadow,j=e.label||e.id||e.tag,_=M>.01;return g.jsxs("div",{"data-clip":"true",className:c?"absolute overflow-hidden":"absolute flex items-center overflow-hidden",style:{left:Q,width:C,top:r,bottom:r,borderRadius:m.clipRadius,background:p.clip,border:`1px solid ${Z}`,boxShadow:E,transition:"border-color 100ms, box-shadow 100ms",zIndex:o?20:i?10:l?5:1,cursor:f.canMove?"grab":"default",transform:o?"translateY(-1px)":void 0,opacity:o?.92:1},title:O?`${e.compositionSrc} • Double-click to open`:`${j} • ${e.start.toFixed(1)}s – ${(e.start+e.duration).toFixed(1)}s`,onPointerEnter:y,onPointerLeave:b,onPointerDown:S,onClick:A,onDoubleClick:k,children:[g.jsx("div",{"aria-hidden":"true",style:{position:"absolute",left:0,top:0,bottom:0,width:3,background:p.accent,opacity:i?.7:.3,borderRadius:`${m.clipRadius} 0 0 ${m.clipRadius}`,zIndex:2,pointerEvents:"none"}}),_&&f.canTrimStart&&g.jsx("div",{"aria-hidden":"true",onPointerDown:H=>w==null?void 0:w("start",H),style:{position:"absolute",left:0,top:0,bottom:0,width:14,cursor:"col-resize",zIndex:4},children:g.jsx("div",{style:{position:"absolute",left:4,top:6,bottom:6,width:2,borderRadius:1,background:p.accent,opacity:M*.6}})}),_&&f.canTrimEnd&&g.jsx("div",{"aria-hidden":"true",onPointerDown:H=>w==null?void 0:w("end",H),style:{position:"absolute",right:0,top:0,bottom:0,width:14,cursor:"col-resize",zIndex:4},children:g.jsx("div",{style:{position:"absolute",right:4,top:6,bottom:6,width:2,borderRadius:1,background:p.accent,opacity:M*.6}})}),$]})}),CE=d.memo(function({major:e,minor:n,pps:r,trackContentWidth:i,totalH:l,effectiveDuration:o,majorTickInterval:c,shiftHeld:f,rangeSelection:m,theme:p}){return g.jsxs(g.Fragment,{children:[g.jsx("svg",{className:"absolute pointer-events-none",style:{left:Ut,width:i},height:l,children:e.map(O=>{const y=O*r;return g.jsx("line",{x1:y,y1:io,x2:y,y2:l,stroke:p.tickMinor,strokeWidth:"1"},`g-${O}`)})}),g.jsxs("div",{className:"relative overflow-hidden",style:{height:io,marginLeft:Ut,width:i},children:[f&&!m&&g.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none z-10",children:g.jsx("span",{className:"text-[9px] font-medium",style:{color:p.textSecondary},children:"Drag or click a clip to edit range"})}),n.map(O=>g.jsx("div",{className:"absolute bottom-0",style:{left:O*r},children:g.jsx("div",{className:"w-px h-[3px]",style:{background:p.tickMinor}})},`m-${O}`)),e.map(O=>g.jsxs("div",{className:"absolute bottom-0 flex flex-col items-center",style:{left:O*r},children:[g.jsx("span",{className:"text-[9px] font-mono tabular-nums leading-none mb-0.5",style:{color:p.tickText},children:iE(O,o,c)}),g.jsx("div",{className:"w-px h-[5px]",style:{background:p.tickMajor}})]},`M-${O}`))]})]})}),EE=d.memo(function({major:e,minor:n,pps:r,trackContentWidth:i,totalH:l,effectiveDuration:o,majorTickInterval:c,shiftHeld:f,rangeSelection:m,theme:p,displayTrackOrder:O,trackOrder:y,tracks:b,trackStyles:S,selectedElementId:w,hoveredClip:A,draggedClip:k,resizingClip:$,blockedClipRef:Q,suppressClickRef:C,scrollRef:M,renderClipContent:Z,renderClipOverlay:E,playheadRef:j,onResizeElement:_,onMoveElement:H,onDrillDown:L,onSelectElement:z,setHoveredClip:F,setShowPopover:ee,setRangeSelection:W,setResizingClip:V,setDraggedClip:G,setSelectedElementId:q,syncClipDragAutoScroll:B,shiftClickClipRef:D,getPreviewElement:P,getTrackStyle:R}){const X=(k==null?void 0:k.element)??null,Y=(k==null?void 0:k.started)===!0&&X?KC({element:X,draggedElementId:X.key??X.id,previewStart:k.previewStart,previewTrack:k.previewTrack}):null,U=(k==null?void 0:k.started)===!0&&Y&&M.current?{left:k.pointerClientX-M.current.getBoundingClientRect().left+M.current.scrollLeft-k.pointerOffsetX,top:k.pointerClientY-M.current.getBoundingClientRect().top+M.current.scrollTop-k.pointerOffsetY}:null,te=(ne,ce)=>g.jsxs(g.Fragment,{children:[E==null?void 0:E(ne),g.jsx("div",{className:Z?"absolute inset-0 overflow-hidden":"flex items-center overflow-hidden flex-1 min-w-0 px-3 gap-2",children:(Z==null?void 0:Z(ne,ce))??g.jsx("span",{className:"truncate text-[10px] font-medium leading-none",style:{color:ce.label},children:ne.label||ne.id||ne.tag})})]});return g.jsxs("div",{className:"relative",style:{height:l,width:Ut+i},children:[g.jsx(CE,{major:e,minor:n,pps:r,trackContentWidth:i,totalH:l,effectiveDuration:o,majorTickInterval:c,shiftHeld:f,rangeSelection:m,theme:p}),O.map(ne=>{var pe;const ce=((pe=b.find(([ae])=>ae===ne))==null?void 0:pe[1])??[],me=S.get(ne)??R(""),Se=(k==null?void 0:k.started)===!0&&!y.includes(ne)&&ce.length===0;return g.jsxs("div",{className:"relative flex",style:{height:Jc,background:p.rowBackground,borderBottom:`1px solid ${p.rowBorder}`},children:[g.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",style:{width:Ut,background:p.gutterBackground,borderRight:`1px solid ${p.gutterBorder}`},children:g.jsx("div",{className:"flex items-center justify-center",style:{width:18,height:18,borderRadius:6,backgroundColor:me.iconBackground,border:`1px solid ${p.gutterBorder}`,color:"#fff"},children:me.icon})}),g.jsxs("div",{style:{width:i},className:"relative",children:[Se&&g.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:me.label,fontSize:11,letterSpacing:"0.06em",textTransform:"uppercase",opacity:.5},children:"New track"}),ce.map((ae,xe)=>{const Qe=R(ae.tag),$e=ae.key??ae.id,Ze=t3(ae),Je=w===$e,Ue=!!ae.compositionSrc,ve=`${$e}-${xe}`;if((k==null?void 0:k.started)===!0&&((X==null?void 0:X.key)??(X==null?void 0:X.id))===$e)return null;const nt=P(ae);return g.jsx(h3,{el:nt,pps:r,clipY:i3,isSelected:Je,isHovered:A===ve,isDragging:!1,hasCustomContent:!!Z,capabilities:Ze,theme:p,trackStyle:Qe,isComposition:Ue,onHoverStart:()=>F(ve),onHoverEnd:()=>F(null),onResizeStart:(Re,kt)=>{kt.button!==0||kt.shiftKey||!_||Re==="start"&&!Ze.canTrimStart||Re==="end"&&!Ze.canTrimEnd||(kt.stopPropagation(),Q.current=null,ee(!1),W(null),V({element:ae,edge:Re,originClientX:kt.clientX,previewStart:ae.start,previewDuration:ae.duration,previewPlaybackStart:ae.playbackStart,started:!1}))},onPointerDown:Re=>{var Lt,st;if(Re.button!==0)return;if(Re.shiftKey){D.current={element:ae,anchorX:Re.clientX,anchorY:Re.clientY};return}const Fe=Re.currentTarget.getBoundingClientRect(),Gt=FC({width:Fe.width,offsetX:Re.clientX-Fe.left,handleWidth:JC,capabilities:Ze});if(Gt&&(Gt==="move"&&H||Gt!=="move"&&_)){Q.current={element:ae,intent:Gt,originClientX:Re.clientX,originClientY:Re.clientY,started:!1};return}!H||!Ze.canMove||(Q.current=null,ee(!1),W(null),G({element:ae,originClientX:Re.clientX,originClientY:Re.clientY,originScrollLeft:((Lt=M.current)==null?void 0:Lt.scrollLeft)??0,originScrollTop:((st=M.current)==null?void 0:st.scrollTop)??0,pointerClientX:Re.clientX,pointerClientY:Re.clientY,pointerOffsetX:Re.clientX-Fe.left,pointerOffsetY:Re.clientY-Fe.top,previewStart:ae.start,previewTrack:ae.track,started:!1}),B(Re.clientX,Re.clientY))},onClick:Re=>{if(Re.stopPropagation(),C.current)return;const kt=Je?null:ae;q(kt?$e:null),z==null||z(kt)},onDoubleClick:Re=>{Re.stopPropagation(),!C.current&&Ue&&L&&L(ae)},children:te(nt,Qe)},ve)})]})]},ne)}),Y&&U&&g.jsx("div",{className:"absolute pointer-events-none",style:{top:U.top,left:U.left,width:Math.max(Y.duration*r,4),height:Jc-i3*2,zIndex:40},children:g.jsx(h3,{el:{...Y,start:0},pps:r,clipY:0,isSelected:w===(Y.key??Y.id),isHovered:!1,isDragging:!0,hasCustomContent:!!Z,capabilities:t3(Y),theme:p,trackStyle:R(Y.tag),isComposition:!!Y.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:te(Y,R(Y.tag))})}),m&&g.jsx("div",{className:"absolute pointer-events-none",style:{left:Ut+Math.min(m.start,m.end)*r,width:Math.abs(m.end-m.start)*r,top:io,bottom:0,backgroundColor:"rgba(59, 130, 246, 0.12)",borderLeft:"1px solid rgba(59, 130, 246, 0.4)",borderRight:"1px solid rgba(59, 130, 246, 0.4)",zIndex:50}}),g.jsxs("div",{ref:j,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${Ut}px`,zIndex:100},children:[g.jsx("div",{className:"absolute top-0 bottom-0",style:{left:"50%",width:2,marginLeft:-1,background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 8px rgba(60,230,172,0.5)"}}),g.jsx("div",{className:"absolute",style:{left:"50%",top:0,transform:"translateX(-50%)"},children:g.jsx("div",{style:{width:0,height:0,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderTop:"8px solid var(--hf-accent, #3CE6AC)",filter:"drop-shadow(0 1px 3px rgba(0,0,0,0.6))"}})})]})]})});function $E({scrollRef:t,ppsRef:e,durationRef:n,trackOrderRef:r,onMoveElement:i,onResizeElement:l,onBlockedEditAttempt:o,setShowPopover:c,setRangeSelectionRef:f}){const m=ge(F=>F.updateElement),[p,O]=d.useState(null),y=d.useRef(null);y.current=p;const[b,S]=d.useState(null),w=d.useRef(null);w.current=b;const A=d.useRef(null),k=d.useRef(!1),$=d.useRef(i);$.current=i;const Q=d.useRef(l);Q.current=l;const C=d.useRef(0),M=d.useRef(null),Z=d.useCallback((F,ee,W)=>{const V=t.current,G=DC({start:F.element.start,track:F.element.track,duration:F.element.duration,originClientX:F.originClientX,originClientY:F.originClientY,originScrollLeft:F.originScrollLeft,originScrollTop:F.originScrollTop,currentScrollLeft:(V==null?void 0:V.scrollLeft)??F.originScrollLeft,currentScrollTop:(V==null?void 0:V.scrollTop)??F.originScrollTop,pixelsPerSecond:e.current,trackHeight:Jc,maxStart:Math.max(0,n.current-F.element.duration),trackOrder:r.current},ee,W);return{...F,started:!0,pointerClientX:ee,pointerClientY:W,previewStart:G.start,previewTrack:G.track}},[t,e,n,r]),E=d.useCallback(()=>{M.current=null,C.current&&(cancelAnimationFrame(C.current),C.current=0)},[]),j=d.useCallback(()=>{C.current=0;const F=y.current,ee=M.current,W=t.current;if(!F||!ee||!W)return;const V=W.getBoundingClientRect(),G=e3(V,ee.clientX,ee.clientY);if(G.x===0&&G.y===0)return;const q=Math.max(0,W.scrollWidth-W.clientWidth),B=Math.max(0,W.scrollHeight-W.clientHeight),D=Math.max(0,Math.min(q,W.scrollLeft+G.x)),P=Math.max(0,Math.min(B,W.scrollTop+G.y));D===W.scrollLeft&&P===W.scrollTop||(W.scrollLeft=D,W.scrollTop=P,O(R=>R&&Z(R,ee.clientX,ee.clientY)),C.current=requestAnimationFrame(j))},[t,Z]),_=d.useCallback((F,ee)=>{M.current={clientX:F,clientY:ee};const W=t.current;if(!W)return;const V=W.getBoundingClientRect(),G=e3(V,F,ee);if(G.x===0&&G.y===0){C.current&&(cancelAnimationFrame(C.current),C.current=0);return}C.current||(C.current=requestAnimationFrame(j))},[t,j]),H=d.useRef(Z);H.current=Z;const L=d.useRef(_);L.current=_;const z=d.useRef(E);return z.current=E,Qt(()=>{const F=()=>{requestAnimationFrame(()=>{k.current=!1})},ee=V=>{var P,R,X;const G=y.current,q=w.current,B=A.current;if(q){const Y=Math.abs(V.clientX-q.originClientX);if(!q.started&&Y<2)return;c(!1),(P=f.current)==null||P.call(f,null);const U=q.element.sourceDuration!=null?Math.max(0,(q.element.sourceDuration-(q.element.playbackStart??0))/Math.max(q.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,te=q.element.tag.toLowerCase(),ne=te==="audio"||te==="video",ce=HC({start:q.element.start,duration:q.element.duration,originClientX:q.originClientX,pixelsPerSecond:e.current,minStart:0,maxEnd:Math.min(n.current,q.element.start+U),playbackStart:q.edge==="start"&&ne?q.element.playbackStart??0:q.element.playbackStart,playbackRate:q.element.playbackRate},q.edge,V.clientX);S(me=>me&&{...me,started:!0,previewStart:ce.start,previewDuration:ce.duration,previewPlaybackStart:ce.playbackStart});return}if(B){const Y=Math.hypot(V.clientX-B.originClientX,V.clientY-B.originClientY),U=B.intent==="move"?4:2;if(!B.started&&Y<U)return;B.started||(B.started=!0,A.current=B,k.current=!0,c(!1),(R=f.current)==null||R.call(f,null),o==null||o(B.element,B.intent));return}if(!G)return;const D=Math.hypot(V.clientX-G.originClientX,V.clientY-G.originClientY);!G.started&&D<4||(c(!1),(X=f.current)==null||X.call(f,null),O(Y=>Y&&H.current(Y,V.clientX,V.clientY)),L.current(V.clientX,V.clientY))},W=()=>{var D,P;z.current();const V=w.current;if(V){if(w.current=null,S(null),!V.started||(k.current=!0,F(),!(V.previewStart!==V.element.start||V.previewDuration!==V.element.duration||V.previewPlaybackStart!==V.element.playbackStart)))return;m(V.element.key??V.element.id,{start:V.previewStart,duration:V.previewDuration,playbackStart:V.previewPlaybackStart}),Promise.resolve((D=Q.current)==null?void 0:D.call(Q,V.element,{start:V.previewStart,duration:V.previewDuration,playbackStart:V.previewPlaybackStart})).catch(X=>{m(V.element.key??V.element.id,{start:V.element.start,duration:V.element.duration,playbackStart:V.element.playbackStart}),console.error("[Timeline] Failed to persist clip resize",X)});return}const G=A.current;if(G){if(A.current=null,!G.started)return;F();return}const q=y.current;!q||(y.current=null,O(null),!q.started)||(k.current=!0,F(),!(q.previewStart!==q.element.start||q.previewTrack!==q.element.track))||(m(q.element.key??q.element.id,{start:q.previewStart,track:q.previewTrack}),Promise.resolve((P=$.current)==null?void 0:P.call($,q.element,{start:q.previewStart,track:q.previewTrack})).catch(R=>{m(q.element.key??q.element.id,{start:q.element.start,track:q.element.track}),console.error("[Timeline] Failed to persist clip move",R)}))};return window.addEventListener("pointermove",ee),window.addEventListener("pointerup",W),window.addEventListener("pointercancel",W),()=>{z.current(),window.removeEventListener("pointermove",ee),window.removeEventListener("pointerup",W),window.removeEventListener("pointercancel",W)}}),{draggedClip:p,setDraggedClip:O,resizingClip:b,setResizingClip:S,blockedClipRef:A,suppressClickRef:k,syncClipDragAutoScroll:_,stopClipDragAutoScroll:E}}const QE=d.memo(function({onSeek:e,onDrillDown:n,renderClipContent:r,renderClipOverlay:i,onFileDrop:l,onAssetDrop:o,onBlockDrop:c,onDeleteElement:f,onMoveElement:m,onResizeElement:p,onBlockedEditAttempt:O,onSelectElement:y,theme:b}={}){const S=d.useMemo(()=>({...Mv,...b}),[b]),w=ge(ye=>ye.elements),A=ge(ye=>ye.duration),k=ge(ye=>ye.timelineReady),$=ge(ye=>ye.selectedElementId),Q=ge(ye=>ye.setSelectedElementId),C=ge(ye=>ye.currentTime),M=ge(ye=>ye.zoomMode),Z=ge(ye=>ye.manualZoomPercent),E=ge(ye=>ye.setZoomMode),j=ge(ye=>ye.setManualZoomPercent),_=d.useRef(null),H=d.useRef(null),L=d.useRef(null),[z,F]=d.useState(null),ee=d.useRef(!1),[W,V]=d.useState(!1);Qt(()=>{const ye=Oe=>Oe.key==="Shift"&&V(!0),He=Oe=>Oe.key==="Shift"&&V(!1),ft=()=>V(!1);return window.addEventListener("keydown",ye),window.addEventListener("keyup",He),window.addEventListener("blur",ft),()=>{window.removeEventListener("keydown",ye),window.removeEventListener("keyup",He),window.removeEventListener("blur",ft)}});const[G,q]=d.useState(!1),[B,D]=d.useState(!0),[P,R]=d.useState(0),X=d.useRef(null),Y=d.useRef(0),U=d.useCallback(()=>{const ye=L.current;D(ye?oE(ye.scrollHeight,ye.clientHeight):!0)},[]),te=d.useCallback(()=>{Y.current&&cancelAnimationFrame(Y.current),Y.current=requestAnimationFrame(()=>{Y.current=0,U()})},[U]),ne=d.useCallback(ye=>{X.current&&(X.current.disconnect(),X.current=null),H.current=ye,ye&&(R(ye.clientWidth),te(),X.current=new ResizeObserver(([He])=>{R(He.contentRect.width),te()}),X.current.observe(ye))},[te]);Qt(()=>()=>{var ye;(ye=X.current)==null||ye.disconnect(),Y.current&&cancelAnimationFrame(Y.current)});const ce=d.useMemo(()=>{const ye=Number.isFinite(A)?A:0;if(w.length===0)return ye;const He=Math.max(...w.map(Oe=>Oe.start+Oe.duration)),ft=Math.max(ye,He);return Number.isFinite(ft)?ft:ye},[w,A]),me=d.useMemo(()=>{const ye=new Map;for(const He of w){const ft=ye.get(He.track)??[];ft.push(He),ye.set(He.track,ft)}return Array.from(ye.entries()).sort(([He],[ft])=>He-ft)},[w]),Se=d.useMemo(()=>{var He;const ye=new Map;for(const[ft,Oe]of me)ye.set(ft,f3(((He=Oe[0])==null?void 0:He.tag)??""));return ye},[me]),pe=d.useMemo(()=>me.map(([ye])=>ye),[me]),ae=d.useRef(pe);ae.current=pe;const xe=d.useRef(100),Qe=d.useRef(ce);Qe.current=ce;const $e=d.useRef(null),{draggedClip:Ze,setDraggedClip:Je,resizingClip:Ue,setResizingClip:ve,blockedClipRef:bt,suppressClickRef:nt,syncClipDragAutoScroll:Re}=$E({scrollRef:L,ppsRef:xe,durationRef:Qe,trackOrderRef:ae,onMoveElement:m,onResizeElement:p,onBlockedEditAttempt:O,setShowPopover:q,setRangeSelectionRef:$e}),kt=d.useMemo(()=>!(Ze!=null&&Ze.started)||pe.length===0||pe.includes(Ze.previewTrack)?pe:[...pe,Ze.previewTrack].sort((ye,He)=>ye-He),[Ze,pe]),Fe=sE(kt.length),Gt=d.useMemo(()=>w.find(ye=>(ye.key??ye.id)===$)??null,[w,$]),Lt=d.useRef(Gt);Lt.current=Gt;const st=P>Ut&&ce>0?(P-Ut-2)/ce:100,tn=gE(st,M,Z);xe.current=tn;const Ci=Math.max(0,ce*tn),mr=d.useRef(M);mr.current=M;const Ne=d.useRef(Z);Ne.current=Z;const Mt=d.useRef(st);Mt.current=st;const{seekFromX:St,autoScrollDuringDrag:ze,dragScrollRaf:rt}=xE({playheadRef:_,scrollRef:L,ppsRef:xe,durationRef:Qe,isDragging:ee,currentTime:C,zoomMode:M,zoomModeRef:mr,manualZoomPercentRef:Ne,fitPps:st,fitPpsRef:Mt,effectiveDuration:ce,pps:tn,timelineReady:k,elementsLength:w.length,setZoomMode:E,setManualZoomPercent:j,onSeek:e}),{rangeSelection:Ye,setRangeSelection:nn,shiftClickClipRef:Rn,handlePointerDown:pr,handlePointerMove:Cn,handlePointerUp:Kt}=uE({scrollRef:L,ppsRef:xe,effectiveDuration:ce,pps:tn,onSeek:e,seekFromX:St,autoScrollDuringDrag:ze,dragScrollRaf:rt,isDragging:ee,setShowPopover:q});$e.current=nn;const Gn=d.useRef(Lt.current);d.useEffect(()=>{const ye=Gn.current,He=Lt.current;Gn.current=He,ye&&!He&&(q(!1),nn(null))});const{major:un,minor:gr}=d.useMemo(()=>rE(ce,tn),[ce,tn]),Or=un.length>=2?Math.max(.25,un[1]-un[0]):ce;d.useEffect(()=>{U()},[U,k,w.length,Fe]);const sa=d.useCallback(ye=>Ue&&(Ue.element.key??Ue.element.id)===(ye.key??ye.id)?{...ye,start:Ue.previewStart,duration:Ue.previewDuration,playbackStart:Ue.previewPlaybackStart}:ye,[Ue]),[Ka,_r]=d.useState(!1),xr=d.useCallback(ye=>{const He=ye.dataTransfer.files.length>0,ft=Array.from(ye.dataTransfer.types),Oe=ft.includes(Im),et=ft.includes(tu);!He&&!Oe&&!et||(ye.preventDefault(),(Oe||et)&&(ye.dataTransfer.dropEffect="copy"),_r(!0))},[]),Il=d.useCallback(ye=>{ye.preventDefault(),_r(!1);const He=L.current,ft=He==null?void 0:He.getBoundingClientRect(),Oe={rectLeft:(ft==null?void 0:ft.left)??0,rectTop:(ft==null?void 0:ft.top)??0,scrollLeft:(He==null?void 0:He.scrollLeft)??0,scrollTop:(He==null?void 0:He.scrollTop)??0,pixelsPerSecond:xe.current,duration:Qe.current,trackHeight:Jc,trackOrder:ae.current};if(l&&ye.dataTransfer.files.length>0){l(Array.from(ye.dataTransfer.files),He&&ft?w2(Oe,ye.clientX,ye.clientY):void 0);return}const et=ye.dataTransfer.getData(Im);if(et&&o&&He&&ft){try{const oa=JSON.parse(et);oa.path&&o(oa.path,w2(Oe,ye.clientX,ye.clientY))}catch{}return}const ni=ye.dataTransfer.getData(tu);if(ni&&c&&He&&ft)try{const oa=JSON.parse(ni);oa.name&&c(oa.name,w2(Oe,ye.clientX,ye.clientY))}catch{}},[o,c,l]);return!k||w.length===0?g.jsx(TE,{isDragOver:Ka,onFileDrop:!!l,onDragOver:xr,onDragLeave:()=>_r(!1),onDrop:Il}):g.jsxs("div",{ref:ne,"aria-label":"Timeline",className:`relative border-t select-none h-full overflow-hidden ${W?"cursor-crosshair":"cursor-default"}`,style:{touchAction:"pan-x pan-y",background:S.shellBackground,borderColor:S.shellBorder},children:[g.jsx("div",{ref:L,className:`${M==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full`,onDragOver:xr,onDragLeave:()=>_r(!1),onDrop:Il,onPointerDown:pr,onPointerMove:Cn,onPointerUp:Kt,onLostPointerCapture:Kt,children:g.jsx(EE,{major:un,minor:gr,pps:tn,trackContentWidth:Ci,totalH:Fe,effectiveDuration:ce,majorTickInterval:Or,shiftHeld:W,rangeSelection:Ye,theme:S,displayTrackOrder:kt,trackOrder:pe,tracks:me,trackStyles:Se,selectedElementId:$,hoveredClip:z,draggedClip:Ze,resizingClip:Ue,blockedClipRef:bt,suppressClickRef:nt,scrollRef:L,renderClipContent:r,renderClipOverlay:i,playheadRef:_,onResizeElement:p,onMoveElement:m,onDrillDown:n,onSelectElement:y,setHoveredClip:F,setShowPopover:q,setRangeSelection:nn,setResizingClip:ve,setDraggedClip:Je,setSelectedElementId:Q,syncClipDragAutoScroll:Re,shiftClickClipRef:Rn,getPreviewElement:sa,getTrackStyle:f3})}),B&&!G&&!Ye&&g.jsx("div",{className:"absolute bottom-2 right-3 pointer-events-none z-20",children:g.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-1 rounded-md border",style:{background:"rgba(17,23,35,0.84)",borderColor:S.gutterBorder},children:[g.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:S.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),g.jsx("span",{className:"text-[9px]",style:{color:S.textSecondary},children:"+ drag/click to edit range"})]})}),G&&Ye&&g.jsx(IC,{rangeStart:Ye.start,rangeEnd:Ye.end,anchorX:Ye.anchorX,anchorY:Ye.anchorY,onClose:()=>{q(!1),nn(null)}})]})}),m3=66,p3=6,PE=d.memo(function({videoSrc:e,label:n,labelColor:r,duration:i=5}){const[l,o]=d.useState(0),[c,f]=d.useState(!1),[m,p]=d.useState([]),[O,y]=d.useState(16/9),b=d.useRef(null),S=d.useRef(null),w=d.useRef(!1),A=d.useCallback(Q=>{var Z,E,j;if((Z=b.current)==null||Z.disconnect(),(E=S.current)==null||E.disconnect(),!Q)return;const C=((j=Q.parentElement)==null?void 0:j.clientWidth)||Q.clientWidth;o(C),b.current=new IntersectionObserver(([_])=>{var H;_.isIntersecting&&(f(!0),(H=b.current)==null||H.disconnect())},{rootMargin:"200px"}),b.current.observe(Q);const M=Q.parentElement||Q;S.current=new ResizeObserver(([_])=>{o(_.contentRect.width)}),S.current.observe(M)},[]);Qt(()=>()=>{var Q,C;(Q=b.current)==null||Q.disconnect(),(C=S.current)==null||C.disconnect()}),d.useEffect(()=>{if(!c||w.current)return;w.current=!0;const Q=document.createElement("video");Q.crossOrigin="anonymous",Q.muted=!0,Q.preload="auto";const C=document.createElement("canvas"),M=C.getContext("2d");if(!M){w.current=!1;return}const Z=[],E=Math.min(.4,i*.05);for(let L=0;L<p3;L++){const z=L/(p3-1)*i;Z.push(Math.max(z,E))}let j=0,_=!1;const H=()=>{if(_||j>=Z.length){_||(Q.src="",Q.load());return}Q.currentTime=Z[j]};return Q.addEventListener("loadedmetadata",()=>{if(Q.videoWidth>0&&Q.videoHeight>0){y(Q.videoWidth/Q.videoHeight);const L=m3*2,z=Math.round(L*(Q.videoWidth/Q.videoHeight));C.width=z,C.height=L}H()}),Q.addEventListener("seeked",()=>{if(_)return;M.drawImage(Q,0,0,C.width,C.height);const L=C.toDataURL("image/jpeg",.6);p(z=>[...z,L]),j++,H()}),Q.addEventListener("error",()=>{}),Q.src=e,Q.load(),()=>{_=!0,w.current=!1,p([]),Q.src="",Q.load()}},[c,e,i]);const k=Math.round(m3*O),$=l>0?Math.max(1,Math.ceil(l/k)):1;return g.jsxs("div",{ref:A,className:"absolute inset-0 overflow-hidden",children:[c&&m.length>0&&g.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:$}).map((Q,C)=>{const M=m[C%m.length];return g.jsx("div",{className:"flex-shrink-0 h-full relative overflow-hidden bg-neutral-900",style:{width:k},children:g.jsx("img",{src:M,alt:"",draggable:!1,className:"absolute inset-0 w-full h-full object-cover"})},C)})}),c&&m.length===0&&g.jsx("div",{className:"absolute inset-0 animate-pulse",style:{background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),g.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-1.5 pb-0.5 pt-3",style:{background:"linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%)"},children:g.jsx("span",{className:"text-[9px] font-semibold truncate block leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:n})})]})}),ZE=66,jE="v3";function RE({previewUrl:t,seekTime:e=2,duration:n=5,selector:r,selectorIndex:i,origin:l}){const o=t.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),c=e+n/2,f=new URL(o,l);return f.searchParams.set("t",c.toFixed(2)),f.searchParams.set("v",jE),r&&(f.searchParams.set("selector",r),i!=null&&i>0&&f.searchParams.set("selectorIndex",String(i))),f.toString()}const A2=d.memo(function({previewUrl:e,label:n,labelColor:r,selector:i,selectorIndex:l,seekTime:o=2,duration:c=5}){const[f,m]=d.useState(0),[p,O]=d.useState(!1),[y,b]=d.useState(16/9),S=d.useRef(null),w=d.useCallback(Q=>{var Z,E;if((Z=S.current)==null||Z.disconnect(),!Q)return;const C=((E=Q.parentElement)==null?void 0:E.clientWidth)||Q.clientWidth;m(C);const M=Q.parentElement||Q;S.current=new ResizeObserver(([j])=>{m(j.contentRect.width)}),S.current.observe(M)},[]);Qt(()=>()=>{var Q;(Q=S.current)==null||Q.disconnect()});const A=RE({previewUrl:e,seekTime:o,duration:c,selector:i,selectorIndex:l,origin:window.location.origin}),k=Math.max(48,Math.round(ZE*y)),$=f>0?Math.max(1,Math.ceil(f/k)):1;return g.jsxs("div",{ref:w,className:"absolute inset-0 overflow-hidden",children:[g.jsx("img",{src:A,alt:"",draggable:!1,loading:"eager",onLoad:Q=>{const C=Q.currentTarget;C.naturalWidth>0&&C.naturalHeight>0&&b(C.naturalWidth/C.naturalHeight),O(!0)},className:"hidden"}),p&&g.jsx("div",{className:"absolute inset-0 flex",style:{animation:"hf-thumb-fade 200ms ease-out",mixBlendMode:"lighten"},children:Array.from({length:$}).map((Q,C)=>g.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:k},children:g.jsx("img",{src:A,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover",style:{opacity:.7}})},C))}),g.jsx("div",{className:"absolute left-3 top-0 bottom-0 flex items-center",style:{zIndex:10},children:g.jsx("span",{className:"block max-w-full truncate text-[10px] font-semibold leading-none",style:{color:r,textShadow:p?"0 1px 4px rgba(0,0,0,0.9), 0 0 8px rgba(0,0,0,0.6)":"none"},children:n})})]})});let NE=0;const g3={isEditMode:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null},at=yv(t=>({...g3,setEditMode:e=>t({isEditMode:e}),setModel:e=>t({model:e}),setSourceFilePath:e=>t({sourceFilePath:e}),selectSegment:(e,n=!1)=>t(r=>{if(n){const i=new Set(r.selectedSegmentIds);return i.has(e)?i.delete(e):i.add(e),{selectedSegmentIds:i,selectedGroupId:null}}return{selectedSegmentIds:new Set([e]),selectedGroupId:null}}),selectGroup:e=>t(n=>{var i;const r=(i=n.model)==null?void 0:i.groups.get(e);return r?{selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:e}:{}}),selectAll:()=>t(e=>e.model?{selectedSegmentIds:new Set(e.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>t({selectedSegmentIds:new Set,selectedGroupId:null}),updateSegmentStyle:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const l=new Map(r.model.segments);return l.set(e,{...i,style:{...i.style,...n}}),{model:{...r.model,segments:l}}}),updateSegmentText:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const l=new Map(r.model.segments);return l.set(e,{...i,text:n}),{model:{...r.model,segments:l}}}),updateSegmentTiming:(e,n,r)=>t(i=>{if(!i.model)return{};const l=i.model.segments.get(e);if(!l)return{};const o=new Map(i.model.segments);return o.set(e,{...l,start:n,end:r}),{model:{...i.model,segments:o}}}),updateGroupStyle:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const l=new Map(r.model.groups);return l.set(e,{...i,style:{...i.style,...n}}),{model:{...r.model,groups:l}}}),updateGroupContainer:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const l=new Map(r.model.groups);return l.set(e,{...i,containerStyle:{...i.containerStyle,...n}}),{model:{...r.model,groups:l}}}),updateGroupAnimation:(e,n,r)=>t(i=>{if(!i.model)return{};const l=i.model.groups.get(e);if(!l)return{};const o=new Map(i.model.groups),c=l.animation[n],f=c!==null?{...c,...r}:r;return o.set(e,{...l,animation:{...l.animation,[n]:f}}),{model:{...i.model,groups:o}}}),splitGroup:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const l=i.segmentIds.indexOf(n);if(l<=0)return{};const o=i.segmentIds.slice(0,l),c=i.segmentIds.slice(l),f=`group-split-${NE++}`,m=new Map(r.model.groups);m.set(e,{...i,segmentIds:o}),m.set(f,{...i,id:f,segmentIds:c});const p=r.model.groupOrder.indexOf(e),O=[...r.model.groupOrder];O.splice(p+1,0,f);const y=new Map(r.model.segments);return c.forEach((b,S)=>{const w=y.get(b);w&&y.set(b,{...w,groupIndex:S})}),{model:{...r.model,groups:m,segments:y,groupOrder:O}}}),mergeGroups:(e,n)=>t(r=>{if(!r.model)return{};const i=r.model.groups.get(e),l=r.model.groups.get(n);if(!i||!l)return{};const o=[...i.segmentIds,...l.segmentIds],c=new Map(r.model.groups);c.set(e,{...i,segmentIds:o}),c.delete(n);const f=r.model.groupOrder.filter(O=>O!==n),m=new Map(r.model.segments);l.segmentIds.forEach((O,y)=>{const b=m.get(O);b&&m.set(O,{...b,groupIndex:i.segmentIds.length+y})});const p=r.selectedGroupId===n?null:r.selectedGroupId;return{model:{...r.model,groups:c,segments:m,groupOrder:f},selectedGroupId:p}}),updateSelectedStyle:e=>t(n=>{if(!n.model||n.selectedSegmentIds.size===0)return{};const r=new Map(n.model.segments);for(const i of n.selectedSegmentIds){const l=r.get(i);l&&r.set(i,{...l,style:{...l.style,...e}})}return{model:{...n.model,segments:r}}}),applyAnimationToAll:e=>t(n=>{if(!n.model)return{};const r=new Map(n.model.groups);for(const[i,l]of r)r.set(i,{...l,animation:e});return{model:{...n.model,groups:r}}}),reset:()=>t({...g3,selectedSegmentIds:new Set})})),VE=new Set(["ArrowLeft","ArrowRight"]),LE=["input","textarea","select","button","a[href]","[contenteditable='true']","[role='button']","[role='checkbox']","[role='combobox']","[role='menuitem']","[role='radio']","[role='slider']","[role='spinbutton']","[role='switch']","[role='textbox']"].join(",");function _E(t){if(!t||typeof t!="object")return!1;const e=t;return typeof e.closest!="function"?!1:e.closest.call(t,LE)!==null}function DE(t,e={isCaptionEditMode:!1,selectedCaptionSegmentCount:0}){return t.metaKey||t.ctrlKey||t.altKey||_E(t.target)?!0:VE.has(t.code)&&e.isCaptionEditMode&&e.selectedCaptionSegmentCount>0}const O3=[1,2,4];function HE({iframeRef:t,shuttleDirectionRef:e,shuttleSpeedIndexRef:n,iframeShortcutCleanupRef:r,getAdapter:i,play:l,playBackward:o,pause:c,seek:f}){const m=d.useRef(new Set),p=d.useRef(()=>{}),O=d.useRef(()=>{}),y=d.useCallback($=>{const Q=i(),C=(Q==null?void 0:Q.getTime())??ge.getState().currentTime;f(zm(C,$,xu))},[i,f]),b=d.useCallback($=>{e.current===$?n.current=Math.min(n.current+1,O3.length-1):n.current=0;const Q=O3[n.current];ge.getState().setPlaybackRate(Q),$==="forward"?l():o(Q)},[l,o,e,n]),S=d.useCallback(()=>{ge.getState().isPlaying?c():l()},[l,c]),w=d.useCallback($=>{var M,Z,E;if($.defaultPrevented)return;const Q=at.getState();if(DE($,{isCaptionEditMode:Q.isEditMode,selectedCaptionSegmentCount:Q.selectedSegmentIds.size}))return;const C=$.key.toLowerCase();if(m.current.add(C),$.code==="Space"){$.preventDefault(),S();return}if($.code==="ArrowLeft"){$.preventDefault(),y($.shiftKey?-10:-1);return}if($.code==="ArrowRight"){$.preventDefault(),y($.shiftKey?10:1);return}if(!$.repeat){if(C==="m"){$.preventDefault();const j=ge.getState();j.playbackRate<=1&&j.setAudioMuted(!j.audioMuted);return}if(C==="l"&&$.shiftKey){$.preventDefault();const j=ge.getState();j.setLoopEnabled(!j.loopEnabled);return}if(C==="k"){$.preventDefault(),c();return}if(C==="j"){if($.preventDefault(),m.current.has("k")){y(-1);return}b("backward");return}if(C==="l"){if($.preventDefault(),m.current.has("k")){y(1);return}b("forward");return}if(C==="i"){$.preventDefault();const j=((M=i())==null?void 0:M.getTime())??ge.getState().currentTime;ge.getState().setInPoint($.shiftKey?null:j);return}if(C==="o"){$.preventDefault();const j=((Z=i())==null?void 0:Z.getTime())??ge.getState().currentTime;ge.getState().setOutPoint($.shiftKey?null:j);return}if(C==="a"){$.preventDefault(),f(ge.getState().inPoint??0,{keepPlaying:!0});return}if(C==="e"){$.preventDefault();const{outPoint:j}=ge.getState();f(j??((E=i())==null?void 0:E.getDuration())??ge.getState().duration,{keepPlaying:!0});return}}},[c,b,y,S,i,f]),A=d.useCallback($=>{m.current.delete($.key.toLowerCase())},[]);p.current=w,O.current=A;const k=d.useCallback(()=>{var Z,E,j;(Z=r.current)==null||Z.call(r),r.current=null;const $=(E=t.current)==null?void 0:E.contentWindow,Q=(j=t.current)==null?void 0:j.contentDocument;if(!$&&!Q)return;const C=_=>p.current(_),M=_=>O.current(_);$==null||$.addEventListener("keydown",C,!0),$==null||$.addEventListener("keyup",M,!0),Q==null||Q.addEventListener("keydown",C,!0),Q==null||Q.addEventListener("keyup",M,!0),r.current=()=>{$==null||$.removeEventListener("keydown",C,!0),$==null||$.removeEventListener("keyup",M,!0),Q==null||Q.removeEventListener("keydown",C,!0),Q==null||Q.removeEventListener("keyup",M,!0)}},[t,r]);return{playbackKeyDownRef:p,playbackKeyUpRef:O,attachIframeShortcutListeners:k,togglePlay:S}}function XE(t){const{clip:e,fallbackIndex:n,doc:r}=t;let i=t.hostEl??null;const l=yu({id:e.id,label:e.label,tag:e.tagName||e.kind});let o,c,f,m;i&&(o=i.id||void 0,c=Ml(i),f=r&&c?qc(r,i,c):void 0,m=Bc(i));const p=Ic({preferredId:e.id,label:l,fallbackIndex:n,domId:o,selector:c,selectorIndex:f,sourceFile:m}),O={id:p.id,label:l,key:p.key,tag:e.tagName||e.kind,start:e.start,duration:e.duration,track:e.track,domId:o,selector:c,selectorIndex:f,sourceFile:m};if(i&&pv(O,i),e.assetUrl&&(O.src=e.assetUrl),e.kind==="composition"&&e.compositionId){let y=e.compositionSrc;if(y||(i=(r==null?void 0:r.querySelector(`[data-composition-id="${e.compositionId}"]`))??i,y=(i==null?void 0:i.getAttribute("data-composition-src"))??(i==null?void 0:i.getAttribute("data-composition-file"))??null),y)O.compositionSrc=y;else if(i){const b=i.querySelector("video[src]");b&&(O.src=b.getAttribute("src")||void 0,O.tag="video")}if(i){O.domId=i.id||void 0,O.selector=Ml(i),O.selectorIndex=r&&O.selector?qc(r,i,O.selector):void 0,O.sourceFile=Bc(i);const b=Ic({preferredId:e.id,label:l,fallbackIndex:n,domId:O.domId,selector:O.selector,selectorIndex:O.selectorIndex,sourceFile:O.sourceFile});O.id=b.id,O.key=b.key}}return O}function $v(t,e,n=[]){if(!Number.isFinite(e)||e<=0)return[];const r=t.querySelector("[data-composition-id]");if(!r)return[];const i=new Set(n.map(Bm)),l=n.reduce((c,f)=>Math.max(c,Number.isFinite(f.track)?f.track:0),-1),o=[];for(const c of Array.from(r.children)){if(!vC(r,c))continue;const f=Ml(c);if(!f)continue;const m=qc(t,c,f),p=Bc(c),O=gC(c),y=Ic({preferredId:c.id||null,label:O,fallbackIndex:n.length+o.length,domId:c.id||void 0,selector:f,selectorIndex:m,sourceFile:p});i.has(y.key)||i.has(y.id)||o.push({domId:c.id||void 0,duration:e,id:y.id,key:y.key,label:O,selector:f,selectorIndex:m,sourceFile:p,start:0,tag:c.tagName.toLowerCase(),timingSource:"implicit",track:l+1+o.length})}return o}function Qv(t,e){const n=t.querySelector("[data-composition-id]"),r=t.querySelectorAll("[data-start]"),i=[];let l=0;return r.forEach(o=>{if(o===n)return;const c=o,f=c.getAttribute("data-start");if(f==null)return;const m=parseFloat(f);if(isNaN(m)||Number.isFinite(e)&&e>0&&m>=e)return;const p=c.tagName.toLowerCase();let O=0;const y=c.getAttribute("data-duration");if(y!=null&&(O=parseFloat(y)),(isNaN(O)||O<=0)&&(O=Math.max(0,e-m)),Number.isFinite(e)&&e>0&&(O=Math.min(O,Math.max(0,e-m))),!Number.isFinite(O)||O<=0)return;const b=c.getAttribute("data-track-index"),S=b!=null?parseInt(b,10):l++,w=c.getAttribute("data-composition-id"),A=Ml(c),k=Bc(c),$=qc(t,c,A),Q=yu({id:c.id||w||null,label:c.getAttribute("data-timeline-label")??c.getAttribute("data-label"),tag:p}),C=Ic({preferredId:c.id||w||null,label:Q,fallbackIndex:i.length,domId:c.id||void 0,selector:A,selectorIndex:$,sourceFile:k}),M={id:C.id,label:Q,key:C.key,tag:p,start:m,duration:O,track:isNaN(S)?0:S,domId:c.id||void 0,selector:A,selectorIndex:$,sourceFile:k,timingSource:"authored"},Z=mv(c);if(Z){Z.tagName==="IMG"&&(M.tag="img");const j=Z.getAttribute("src");j&&(M.src=j);const _=c.getAttribute("data-volume")??Z.getAttribute("data-volume");_&&(M.volume=parseFloat(_)),pv(M,c)}c.hasAttribute("data-timeline-locked")&&(M.timelineLocked=!0);const E=c.getAttribute("data-composition-src")||c.getAttribute("data-composition-file");if(E)M.compositionSrc=E;else if(w&&w!==(n==null?void 0:n.getAttribute("data-composition-id"))){const j=c.querySelector("video[src]");j&&(M.src=j.getAttribute("src")||void 0,M.tag="video")}i.push(M)}),[...i,...$v(t,e,i)]}function zE(t,e,n,r){const i=Number.isFinite(n)?n:0,l=Number.isFinite(r)?r:0;if(t.length===0||e.length>=t.length||l>i)return e;const o=new Set(e.map(Bm)),c=t.filter(f=>!o.has(Bm(f)));return c.length===0?e:[...e,...c]}function FE(t){const e=t.match(/\/preview\/comp\/(.+?)(?:\?|$)/);return e?decodeURIComponent(e[1]):void 0}function YE(t){if(!Number.isFinite(t.rootDuration)||t.rootDuration<=0)return null;const e=FE(t.iframeSrc);return{id:t.compositionId,label:yu({id:t.compositionId,tag:t.tagName}),key:Ym({id:t.compositionId,fallbackIndex:0,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}),tag:t.tagName.toLowerCase()||"div",start:0,duration:t.rootDuration,track:0,compositionSrc:e,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:e}}function BE({iframeRef:t,probeIntervalRef:e,pendingSeekRef:n,isRefreshingRef:r,getAdapter:i,syncTimelineElements:l,setDuration:o,setCurrentTime:c,setTimelineReady:f,setIsPlaying:m,attachIframeShortcutListeners:p,applyPreviewAudioState:O}){const y=d.useCallback($=>{var F;if(!$.clips||$.clips.length===0)return;const Q=new Set($.clips.map(ee=>ee.compositionId).filter(Boolean)),C=$.clips.filter(ee=>!ee.parentCompositionId||!Q.has(ee.parentCompositionId));let M=null;try{M=((F=t.current)==null?void 0:F.contentDocument)??null}catch{M=null}const Z=new Set,E=C.map((ee,W)=>{const V=M?bC(M,ee,W,Z):null;return V&&Z.add(V),XE({clip:ee,fallbackIndex:W,doc:M,hostEl:V})}),j=$.durationInFrames/30,_=Number.isFinite(j)&&j<7200?j:0,H=_>0?_:ge.getState().duration,L=H>0?E.filter(ee=>ee.start<H).map(ee=>({...ee,duration:Math.min(ee.duration,H-ee.start)})).filter(ee=>ee.duration>0):E,z=M&&H>0?[...L,...$v(M,H,L)]:L;z.length>0&&l(z,_>0?_:void 0)},[t,l]),b=d.useCallback(()=>{try{const $=t.current,Q=$==null?void 0:$.contentDocument,C=$==null?void 0:$.contentWindow;if(!Q||!C)return;const M=ge.getState().elements,Z=ge.getState().duration,{missing:E,updatedEls:j,patched:_}=TC(Q,C,M,Z);if(E.length>0||_){const H=new Set(j.map(z=>z.id)),L=E.filter(z=>!H.has(z.id));l([...j,...L])}}catch($){console.warn("[useTimelinePlayer] enrichMissingCompositions failed",$)}},[t,l]),S=d.useCallback(()=>{const $=i();if(!$||$.getDuration()<=0)return!1;$.pause();const Q=n.current;n.current=null;const C=Q!=null?Math.min(Q,$.getDuration()):0;$.seek(C),Qr.notify(C);const M=$.getDuration();Number.isFinite(M)&&M>0&&M<7200&&M!==ge.getState().duration&&o(M),c(C),r.current||f(!0),r.current=!1,m(!1);try{const Z=t.current,E=Z==null?void 0:Z.contentDocument,j=Z==null?void 0:Z.contentWindow;E&&j&&(SC(E,j),wC(E),p());const _=j==null?void 0:j.__clipManifest;if(_&&_.clips.length>0&&y(_),b(),O(),ge.getState().elements.length===0&&E){const H=Qv(E,$.getDuration());H.length>0&&l(H)}if(ge.getState().elements.length===0&&E){const H=E.querySelector("[data-composition-id]"),L=$.getDuration();if(H&&L>0){const z=YE({compositionId:H.getAttribute("data-composition-id")||"composition",tagName:H.tagName||"div",rootDuration:L,iframeSrc:(Z==null?void 0:Z.src)||"",selector:Ml(H)});z&&l([z])}}}catch(Z){console.warn("[useTimelinePlayer] Could not read timeline elements from iframe",Z)}return!0},[i,o,c,f,m,y,b,l,p,O,t,r,n]),w=d.useCallback(()=>{if(O(),e.current&&clearInterval(e.current),S())return;const $=t.current;let Q=!1;const C=()=>{Q||S()&&(Q=!0,window.removeEventListener("message",M),e.current&&clearInterval(e.current))},M=Z=>{if(Z.source&&$&&Z.source!==$.contentWindow)return;const E=Z.data;(E==null?void 0:E.source)==="hf-preview"&&((E==null?void 0:E.type)==="state"||(E==null?void 0:E.type)==="timeline")&&C()};window.addEventListener("message",M),e.current=setTimeout(()=>{Q||(C(),Q||console.warn("[useTimelinePlayer] Runtime did not signal readiness within 5s")),window.removeEventListener("message",M)},5e3)},[S,t,e,O]);return{processTimelineMessage:y,processTimelineMessageRef:{current:y},enrichMissingCompositions:b,enrichMissingCompositionsRef:{current:b},initializeAdapter:S,onIframeLoad:w}}const Um=new Map,k2=new Map;let Rs=null;async function qE(){if(Rs===!1)return null;if(Rs)return Rs;try{return Rs=await cv(()=>import("./index-DSLrl2tB.js"),[]),Rs}catch{return Rs=!1,null}}function Pv(t){try{return new URL(t,window.location.href).href}catch{return t}}async function IE(t){const e=await qE();if(!e)return null;const n=new e.Input({source:new e.UrlSource(t),formats:e.ALL_FORMATS});try{const r=await n.getDurationFromMetadata();if(r==null||!Number.isFinite(r)||r<=0)return null;const i=await n.getPrimaryVideoTrack(),l=await n.getAudioTracks();return{duration:r,width:i==null?void 0:i.displayWidth,height:i==null?void 0:i.displayHeight,hasVideo:i!=null,hasAudio:l.length>0}}catch{return null}finally{n.dispose()}}function UE(t){return Um.get(Pv(t))}async function WE(t){const e=Pv(t),n=Um.get(e);if(n)return n;let r=k2.get(e);return r||(r=IE(e).then(i=>(k2.delete(e),i&&Um.set(e,i),i)),k2.set(e,r),r)}function GE(){const t=d.useRef(null),e=d.useRef(0),n=d.useRef(void 0),r=d.useRef(null),i=d.useRef(!1),l=d.useRef(0),o=d.useRef(null),c=d.useRef(0),f=d.useRef(null),m=d.useRef(0),p=d.useRef(null),{setIsPlaying:O,setCurrentTime:y,setDuration:b,setTimelineReady:S,setElements:w}=ge.getState(),A=d.useCallback((R,X)=>{const Y=ge.getState(),U=X??Y.duration,te=zE(Y.elements,R,Y.duration,U);(te.length!==Y.elements.length||te.some((me,Se)=>{const pe=Y.elements[Se];return!pe||me.id!==pe.id||me.start!==pe.start||me.duration!==pe.duration||me.track!==pe.track}))&&w(te),Number.isFinite(X)&&(X??0)>0&&X!==Y.duration&&b(X??0),Y.timelineReady||S(!0);const ce=te.filter(me=>me.src&&me.sourceDuration==null&&["video","audio"].includes(me.tag.toLowerCase())&&!UE(me.src));ce.length>0&&Promise.allSettled(ce.map(async me=>{const Se=await WE(me.src);if(!Se)return;const pe=me.key??me.id;ge.setState(ae=>{const xe=ae.elements.findIndex($e=>($e.key??$e.id)===pe);if(xe===-1||ae.elements[xe].sourceDuration!=null)return{};const Qe=ae.elements.slice();return Qe[xe]={...ae.elements[xe],sourceDuration:Se.duration},{elements:Qe}})}))},[w,S,b]),k=d.useCallback(()=>{var R,X;try{const Y=t.current,U=Y==null?void 0:Y.contentWindow;if(!Y||!U)return null;const te=U.__player&&typeof U.__player.play=="function"?U.__player:null,ne=mC(Y.contentDocument),ce=v2(te);if(ce>0&&ne<=ce)return te;let me=null;if(U.__timeline){const ae=z5(U.__timeline),xe=v2(ae);if(xe>0&&ne<=xe)return ae;xe>0&&(me??(me=ae))}if(U.__timelines){const ae=Object.keys(U.__timelines);if(ae.length>0){const xe=(X=(R=Y==null?void 0:Y.contentDocument)==null?void 0:R.querySelector("[data-composition-id]"))==null?void 0:X.getAttribute("data-composition-id"),Qe=xe&&xe in U.__timelines?xe:ae[ae.length-1],$e=z5(U.__timelines[Qe]),Ze=v2($e);if(Ze>0&&ne<=Ze)return $e;Ze>0&&(me??(me=$e))}}const Se=te??me,pe=Math.max(ge.getState().duration,ne,ce);if(Se&&pe>0&&("renderSeek"in Se||typeof Se.seek=="function")){const ae=p.current;if((ae==null?void 0:ae.player)===Se&&ae.duration===pe)return ae.adapter;ae==null||ae.adapter.pause();const xe=hC(Se,pe,dC(U),()=>ge.getState().playbackRate);return p.current={player:Se,duration:pe,adapter:xe},xe}return Se}catch(Y){return console.warn("[useTimelinePlayer] Could not get playback adapter (cross-origin)",Y),null}},[]),$=d.useCallback(()=>{cancelAnimationFrame(l.current)},[]),Q=d.useCallback(()=>{const R=()=>{const X=k();if(X){const Y=X.getTime(),U=X.getDuration();Qr.notify(Y);const{inPoint:te,outPoint:ne}=ge.getState(),ce=ne!==null?ne:U,me=te!==null?te:0,Se=me<ce?ce:U,pe=me<ce?me:0;if(Y>=Se){if(ge.getState().loopEnabled&&U>0){X.seek(pe),Qr.notify(pe),X.play(),O(!0),e.current=requestAnimationFrame(R);return}X.isPlaying()&&X.pause(),y(Y),O(!1),cancelAnimationFrame(e.current);return}}e.current=requestAnimationFrame(R)};e.current=requestAnimationFrame(R)},[k,y,O]),C=d.useCallback(()=>{cancelAnimationFrame(e.current)},[]),M=d.useCallback(R=>{const X=t.current;if(X){MC(X,R);try{const Y=X.contentWindow;if(Y!=null&&Y.__timelines)for(const U of Object.values(Y.__timelines))U&&typeof U.timeScale=="function"&&U.timeScale(R)}catch(Y){console.warn("[useTimelinePlayer] Could not set playback rate (cross-origin)",Y)}}},[]),Z=d.useCallback(R=>{const{audioMuted:X,playbackRate:Y}=ge.getState(),U=R??Y;kC(t.current,xv(X,U))},[]),E=d.useCallback(()=>{C(),$();const R=k();R&&(R.getTime()>=R.getDuration()&&R.seek(ge.getState().inPoint??0),M(ge.getState().playbackRate),Z(),R.play(),o.current="forward",O(!0),Q())},[k,O,Q,M,Z,C,$]),j=d.useCallback(R=>{C(),$();const X=k();if(!X)return;const Y=Math.max(0,X.getDuration()),U=X.getTime()<=0&&Y>0?Y:X.getTime();X.pause(),U!==X.getTime()&&X.seek(U);const te=Math.max(.1,Math.min(4,R));M(te),Z(te);let ne=U,ce=performance.now();const me=Se=>{const pe=(Se-ce)/1e3*te;let ae=ne-pe;const{inPoint:xe,outPoint:Qe}=ge.getState(),$e=Qe!==null?Qe:Y,Ze=xe!==null?xe:0,Je=Ze<$e?$e:Y,Ue=Ze<$e?Ze:0;if(ae<=Ue)if(ge.getState().loopEnabled&&Y>0)ne=Je,ce=Se,ae=Je;else{X.seek(Ue),Qr.notify(Ue),y(Ue),O(!1),o.current=null,l.current=0;return}X.seek(Math.max(0,ae)),Qr.notify(Math.max(0,ae)),O(!0),l.current=requestAnimationFrame(me)};O(!0),o.current="backward",l.current=requestAnimationFrame(me)},[k,y,O,M,Z,C,$]),_=d.useCallback(()=>{$();const R=k();R&&(R.pause(),y(R.getTime()),O(!1),o.current=null,c.current=0,C())},[k,y,O,C,$]),H=d.useCallback((R,X)=>{const Y=o.current==="backward";$();const U=k();if(!U)return r.current=Math.max(0,R),!1;const te=Math.max(0,U.getDuration()),ne=Math.max(0,te>0?Math.min(te,R):R);return U.seek(ne,X),Qr.notify(ne),y(ne),(!(X!=null&&X.keepPlaying)||Y)&&(C(),ge.getState().isPlaying&&O(!1),o.current=null,c.current=0),!0},[k,r,y,O,C,$,o,c]);d.useEffect(()=>ge.subscribe((R,X)=>{R.requestedSeekTime!==null&&R.requestedSeekTime!==X.requestedSeekTime&&(H(R.requestedSeekTime),ge.getState().clearSeekRequest())}),[H]);const{playbackKeyDownRef:L,playbackKeyUpRef:z,attachIframeShortcutListeners:F,togglePlay:ee}=HE({iframeRef:t,shuttleDirectionRef:o,shuttleSpeedIndexRef:c,iframeShortcutCleanupRef:f,getAdapter:k,play:E,playBackward:j,pause:_,seek:H}),{processTimelineMessageRef:W,enrichMissingCompositionsRef:V,onIframeLoad:G}=BE({iframeRef:t,probeIntervalRef:n,pendingSeekRef:r,isRefreshingRef:i,getAdapter:k,syncTimelineElements:A,setDuration:b,setCurrentTime:y,setTimelineReady:S,setIsPlaying:O,attachIframeShortcutListeners:F,applyPreviewAudioState:Z}),q=d.useCallback(()=>{const R=k();r.current=R?R.getTime():ge.getState().currentTime??0,i.current=!0,C(),$(),O(!1)},[k,C,O,$]),B=d.useCallback(()=>{const R=t.current;if(!R)return;q();const X=R.src,Y=new URL(X,window.location.origin);Y.searchParams.set("_t",String(Date.now())),R.src=Y.toString()},[q]),D=d.useRef(k);D.current=k,Qt(()=>{const R=te=>L.current(te),X=te=>z.current(te),Y=te=>{const ne=te.data,ce=t.current;if(!(te.source&&ce&&te.source!==ce.contentWindow)){if((ne==null?void 0:ne.source)==="hf-preview"&&(ne==null?void 0:ne.type)==="state")try{if(ge.getState().elements.length===0){const Se=ce==null?void 0:ce.contentWindow,pe=Se==null?void 0:Se.__clipManifest;pe&&pe.clips.length>0&&W.current(pe)}Date.now()-m.current>500&&V.current()}catch(me){console.warn("[useTimelinePlayer] Could not read clip manifest from iframe",me)}if((ne==null?void 0:ne.source)==="hf-preview"&&(ne==null?void 0:ne.type)==="timeline"&&Array.isArray(ne.clips)&&(m.current=Date.now(),W.current(ne),V.current(),ge.getState().elements.length===0))try{const me=ce==null?void 0:ce.contentDocument,Se=k();if(me&&Se){const pe=Qv(me,Se.getDuration());pe.length>0&&A(pe)}}catch(me){console.warn("[useTimelinePlayer] Could not read timeline elements on navigate (cross-origin)",me)}}},U=()=>{var te;if(document.hidden&&ge.getState().isPlaying){const ne=(te=D.current)==null?void 0:te.call(D);ne&&(ne.pause(),O(!1),C())}};return window.addEventListener("keydown",R,!0),window.addEventListener("keyup",X,!0),window.addEventListener("message",Y),document.addEventListener("visibilitychange",U),()=>{var te;window.removeEventListener("keydown",R,!0),window.removeEventListener("keyup",X,!0),(te=f.current)==null||te.call(f),f.current=null,window.removeEventListener("message",Y),document.removeEventListener("visibilitychange",U),C(),$(),n.current&&clearInterval(n.current)}});const P=d.useCallback(()=>{C(),$(),n.current&&clearInterval(n.current),ge.getState().reset()},[C,$]);return d.useEffect(()=>ge.subscribe((R,X)=>{const Y=R.playbackRate!==X.playbackRate,U=R.audioMuted!==X.audioMuted;!Y&&!U||(Y&&M(R.playbackRate),Z())}),[M,Z]),{iframeRef:t,play:E,pause:_,togglePlay:ee,seek:H,onIframeLoad:G,refreshPlayer:B,saveSeekPosition:q,resetPlayer:P}}const KE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"}))]]),JE=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"}))]]),e$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H69l51.52,51.51a12,12,0,0,1-17,17l-72-72a12,12,0,0,1,0-17l72-72a12,12,0,0,1,17,17L69,116H216A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),d.createElement("path",{d:"M216,120H120V56a8,8,0,0,0-13.66-5.66l-72,72a8,8,0,0,0,0,11.32l72,72A8,8,0,0,0,120,200V136h96a8,8,0,0,0,0-16ZM104,180.69,51.31,128,104,75.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H120v64a8,8,0,0,1-13.66,5.66l-72-72a8,8,0,0,1,0-11.32l72-72A8,8,0,0,1,120,56v64h96A8,8,0,0,1,224,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H54.49l61.75,61.76a6,6,0,1,1-8.48,8.48l-72-72a6,6,0,0,1,0-8.48l72-72a6,6,0,0,1,8.48,8.48L54.49,122H216A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H49.66l65.17,65.17a4,4,0,0,1-5.66,5.66l-72-72a4,4,0,0,1,0-5.66l72-72a4,4,0,0,1,5.66,5.66L49.66,124H216A4,4,0,0,1,220,128Z"}))]]),t$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.51,64.49a12,12,0,0,1,0-17l32-32a12,12,0,0,1,17,0l32,32a12,12,0,0,1-17,17L140,53V96a12,12,0,0,1-24,0V53L104.49,64.49A12,12,0,0,1,87.51,64.49Zm64,127L140,203V160a12,12,0,0,0-24,0v43l-11.51-11.52a12,12,0,0,0-17,17l32,32a12,12,0,0,0,17,0l32-32a12,12,0,0,0-17-17Zm89-72-32-32a12,12,0,0,0-17,17L203,116H160a12,12,0,0,0,0,24h43l-11.52,11.51a12,12,0,0,0,17,17l32-32A12,12,0,0,0,240.49,119.51ZM53,140H96a12,12,0,0,0,0-24H53l11.52-11.51a12,12,0,1,0-17-17l-32,32a12,12,0,0,0,0,17l32,32a12,12,0,1,0,17-17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,128,128,232,24,128,128,24Z",opacity:"0.2"}),d.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,136H64v24a8,8,0,0,1-13.66,5.66l-32-32a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,64,96v24H96a8,8,0,0,1,0,16Zm0-72h24V96a8,8,0,0,0,16,0V64h24a8,8,0,0,0,5.66-13.66l-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,96,64Zm141.66,58.34-32-32A8,8,0,0,0,192,96v24H160a8,8,0,0,0,0,16h32v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,237.66,122.34ZM160,192H136V160a8,8,0,0,0-16,0v32H96a8,8,0,0,0-5.66,13.66l32,32a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,160,192Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M91.76,60.24a6,6,0,0,1,0-8.48l32-32a6,6,0,0,1,8.48,0l32,32a6,6,0,1,1-8.48,8.48L134,38.49V96a6,6,0,0,1-12,0V38.49L100.24,60.24A6,6,0,0,1,91.76,60.24Zm64,135.52L134,217.51V160a6,6,0,0,0-12,0v57.51l-21.76-21.75a6,6,0,0,0-8.48,8.48l32,32a6,6,0,0,0,8.48,0l32-32a6,6,0,0,0-8.48-8.48Zm80.48-72-32-32a6,6,0,0,0-8.48,8.48L217.51,122H160a6,6,0,0,0,0,12h57.51l-21.75,21.76a6,6,0,1,0,8.48,8.48l32-32A6,6,0,0,0,236.24,123.76ZM38.49,134H96a6,6,0,0,0,0-12H38.49l21.75-21.76a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48l32,32a6,6,0,0,0,8.48-8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M90.34,61.66a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,0l32,32a8,8,0,0,1-11.32,11.32L136,43.31V96a8,8,0,0,1-16,0V43.31L101.66,61.66A8,8,0,0,1,90.34,61.66Zm64,132.68L136,212.69V160a8,8,0,0,0-16,0v52.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm83.32-72-32-32a8,8,0,0,0-11.32,11.32L212.69,120H160a8,8,0,0,0,0,16h52.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,237.66,122.34ZM43.31,136H96a8,8,0,0,0,0-16H43.31l18.35-18.34A8,8,0,0,0,50.34,90.34l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M93.17,58.83a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,0l32,32a4,4,0,0,1-5.66,5.66L132,33.66V96a4,4,0,0,1-8,0V33.66L98.83,58.83A4,4,0,0,1,93.17,58.83Zm64,138.34L132,222.34V160a4,4,0,0,0-8,0v62.34L98.83,197.17a4,4,0,0,0-5.66,5.66l32,32a4,4,0,0,0,5.66,0l32-32a4,4,0,0,0-5.66-5.66Zm77.66-72-32-32a4,4,0,0,0-5.66,5.66L222.34,124H160a4,4,0,0,0,0,8h62.34l-25.17,25.17a4,4,0,0,0,5.66,5.66l32-32A4,4,0,0,0,234.83,125.17ZM33.66,132H96a4,4,0,0,0,0-8H33.66L58.83,98.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66l32,32a4,4,0,1,0,5.66-5.66Z"}))]]),n$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"}))]]),r$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),d.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),i$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),a$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M84,100A12,12,0,0,1,96,88h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,100Zm12,52h64a12,12,0,0,0,0-24H96a12,12,0,0,0,0,24ZM236,56V184a20,20,0,0,1-20,20H157.89l-12.52,21.92a20,20,0,0,1-34.74,0L98.11,204H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56Zm-24,4H44V180h61.07a12,12,0,0,1,10.42,6.05L128,207.94l12.51-21.89A12,12,0,0,1,150.93,180H212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V184a8,8,0,0,1-8,8H150.93l-16,28a8,8,0,0,1-13.9,0l-16-28H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.createElement("path",{d:"M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V184a16,16,0,0,0,16,16h60.43l13.68,23.94a16,16,0,0,0,27.78,0L155.57,200H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM160,144H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M166,104a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,104Zm-6,26H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm70-74V184a14,14,0,0,1-14,14H154.41L140.16,223a14,14,0,0,1-24.32,0L101.59,198H40a14,14,0,0,1-14-14V56A14,14,0,0,1,40,42H216A14,14,0,0,1,230,56Zm-12,0a2,2,0,0,0-2-2H40a2,2,0,0,0-2,2V184a2,2,0,0,0,2,2h65.07a6,6,0,0,1,5.21,3l16,28a2,2,0,0,0,3.48,0l16-28a6,6,0,0,1,5.21-3H216a2,2,0,0,0,2-2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M88,104a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,104Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16ZM232,56V184a16,16,0,0,1-16,16H155.57l-13.68,23.94a16,16,0,0,1-27.78,0L100.43,200H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Zm-16,0H40V184h65.07a8,8,0,0,1,7,4l16,28,16-28a8,8,0,0,1,7-4H216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M164,104a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,104Zm-4,28H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm68-76V184a12,12,0,0,1-12,12H153.25L138.42,222a12,12,0,0,1-20.84,0L102.75,196H40a12,12,0,0,1-12-12V56A12,12,0,0,1,40,44H216A12,12,0,0,1,228,56Zm-8,0a4,4,0,0,0-4-4H40a4,4,0,0,0-4,4V184a4,4,0,0,0,4,4h65.07a4,4,0,0,1,3.47,2l16,28a4,4,0,0,0,6.94,0l16-28a4,4,0,0,1,3.47-2H216a4,4,0,0,0,4-4Z"}))]]),l$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),s$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"}))]]),o$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M172,164a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,164Zm-12-52H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24Zm60-64V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V48A20,20,0,0,1,56,28H90.53a51.88,51.88,0,0,1,74.94,0H200A20,20,0,0,1,220,48ZM100.29,60h55.42a28,28,0,0,0-55.42,0ZM196,52H178.59A52.13,52.13,0,0,1,180,64v8a12,12,0,0,1-12,12H88A12,12,0,0,1,76,72V64a52.13,52.13,0,0,1,1.41-12H60V212H196Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,48V216a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H96a39.83,39.83,0,0,0-8,24v8h80V64a39.83,39.83,0,0,0-8-24h40A8,8,0,0,1,208,48Z",opacity:"0.2"}),d.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,32H163.74a47.92,47.92,0,0,0-71.48,0H56A16,16,0,0,0,40,48V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V48A16,16,0,0,0,200,32Zm-72,0a32,32,0,0,1,32,32H96A32,32,0,0,1,128,32Zm32,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M166,152a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,152Zm-6-38H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12Zm54-66V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V48A14,14,0,0,1,56,34H93.17a45.91,45.91,0,0,1,69.66,0H200A14,14,0,0,1,214,48ZM94,64v2h68V64a34,34,0,0,0-68,0ZM202,48a2,2,0,0,0-2-2H170.33A45.77,45.77,0,0,1,174,64v8a6,6,0,0,1-6,6H88a6,6,0,0,1-6-6V64a45.77,45.77,0,0,1,3.67-18H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200a2,2,0,0,0,2-2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M168,152a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,152Zm-8-40H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16Zm56-64V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V48A16,16,0,0,1,56,32H92.26a47.92,47.92,0,0,1,71.48,0H200A16,16,0,0,1,216,48ZM96,64h64a32,32,0,0,0-64,0ZM200,48H173.25A47.93,47.93,0,0,1,176,64v8a8,8,0,0,1-8,8H88a8,8,0,0,1-8-8V64a47.93,47.93,0,0,1,2.75-16H56V216H200Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M164,152a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,152Zm-4-36H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8Zm52-68V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V48A12,12,0,0,1,56,36H94.08a44,44,0,0,1,67.84,0H200A12,12,0,0,1,212,48ZM92,64v4h72V64a36,36,0,0,0-72,0ZM204,48a4,4,0,0,0-4-4H167.17A43.71,43.71,0,0,1,172,64v8a4,4,0,0,1-4,4H88a4,4,0,0,1-4-4V64a43.71,43.71,0,0,1,4.83-20H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200a4,4,0,0,0,4-4Z"}))]]),c$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z"}))]]),u$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32Zm-8,128H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,34H88a6,6,0,0,0-6,6V82H40a6,6,0,0,0-6,6V216a6,6,0,0,0,6,6H168a6,6,0,0,0,6-6V174h42a6,6,0,0,0,6-6V40A6,6,0,0,0,216,34ZM162,210H46V94H162Zm48-48H174V88a6,6,0,0,0-6-6H94V46H210Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,32H88a8,8,0,0,0-8,8V80H40a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H168a8,8,0,0,0,8-8V176h40a8,8,0,0,0,8-8V40A8,8,0,0,0,216,32ZM160,208H48V96H160Zm48-48H176V88a8,8,0,0,0-8-8H96V48H208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,36H88a4,4,0,0,0-4,4V84H40a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H168a4,4,0,0,0,4-4V172h44a4,4,0,0,0,4-4V40A4,4,0,0,0,216,36ZM164,212H44V92H164Zm48-48H172V88a4,4,0,0,0-4-4H92V44H212Z"}))]]),f$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),d$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Z"}))]]),h$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.49,143.51a12,12,0,0,1,0,17l-24,24a12,12,0,0,1-17-17L155,152l-15.52-15.51a12,12,0,1,1,17-17Zm-64-24a12,12,0,0,0-17,0l-24,24a12,12,0,0,0,0,17l24,24a12,12,0,0,0,17-17L101,152l15.52-15.51A12,12,0,0,0,116.49,119.51ZM220,88V216a20,20,0,0,1-20,20H56a20,20,0,0,1-20-20V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88ZM160,57V80h23Zm36,155V104H148a12,12,0,0,1-12-12V44H60V212Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34Zm-104,88a8,8,0,0,1-11.32,11.32l-24-24a8,8,0,0,1,0-11.32l24-24a8,8,0,0,1,11.32,11.32L91.31,152Zm72-12.68-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32l24,24A8,8,0,0,1,181.66,157.66ZM152,88V44l44,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M180.24,147.76a6,6,0,0,1,0,8.48l-24,24a6,6,0,0,1-8.48-8.48L167.51,152l-19.75-19.76a6,6,0,1,1,8.48-8.48Zm-72-24a6,6,0,0,0-8.48,0l-24,24a6,6,0,0,0,0,8.48l24,24a6,6,0,1,0,8.48-8.48L88.49,152l19.75-19.76A6,6,0,0,0,108.24,123.76ZM214,88V216a14,14,0,0,1-14,14H56a14,14,0,0,1-14-14V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-56-6h35.52L158,46.48Zm44,134V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2V216a2,2,0,0,0,2,2H200A2,2,0,0,0,202,216Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M181.66,146.34a8,8,0,0,1,0,11.32l-24,24a8,8,0,0,1-11.32-11.32L164.69,152l-18.35-18.34a8,8,0,0,1,11.32-11.32Zm-72-24a8,8,0,0,0-11.32,0l-24,24a8,8,0,0,0,0,11.32l24,24a8,8,0,0,0,11.32-11.32L91.31,152l18.35-18.34A8,8,0,0,0,109.66,122.34ZM216,88V216a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm40,136V96H152a8,8,0,0,1-8-8V40H56V216H200Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M178.83,149.17a4,4,0,0,1,0,5.66l-24,24a4,4,0,0,1-5.66-5.66L170.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66Zm-72-24a4,4,0,0,0-5.66,0l-24,24a4,4,0,0,0,0,5.66l24,24a4,4,0,1,0,5.66-5.66L85.66,152l21.17-21.17A4,4,0,0,0,106.83,125.17ZM212,88V216a12,12,0,0,1-12,12H56a12,12,0,0,1-12-12V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-56-4h42.34L156,41.65Zm48,132V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4V216a4,4,0,0,0,4,4H200A4,4,0,0,0,204,216Z"}))]]),m$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,8.67,5.5,16,12,16a10.27,10.27,0,0,0,7.33-3.43,12,12,0,1,1,17.34,16.6A34,34,0,0,1,60,220C40.15,220,24,202,24,180s16.15-40,36-40a34,34,0,0,1,24.67,10.83,12,12,0,1,1-17.34,16.6A10.27,10.27,0,0,0,60,164C53.5,164,48,171.31,48,180Zm97.51-5.71c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,143,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,125.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C157,187.53,153.33,179.53,145.51,174.27Zm68,0c-5.12-3.45-11.32-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,211,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.49,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,193.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C225,187.53,221.33,179.53,213.51,174.27ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.2,14.2,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.18,14.18,0,0,0,10.06-4.5,8.2,8.2,0,0,1,10.9-.91,8,8,0,0,1,.81,11.81A30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.38,9.19,8.26,8.26,0,0,1,.74,11.09,8,8,0,0,1-11.9.38A14.2,14.2,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.35-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M46,180c0,12.13,8.07,22,18,22a16.21,16.21,0,0,0,11.66-5.28,6,6,0,0,1,8.67,8.3A28.09,28.09,0,0,1,64,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a28.09,28.09,0,0,1,20.33,9,6,6,0,0,1-8.67,8.3A16.21,16.21,0,0,0,64,158C54.07,158,46,167.86,46,180Zm81-6.77c-10.85-3.13-13.4-4.69-13-7.91a6.56,6.56,0,0,1,2.88-5.08c5.59-3.79,17.66-1.82,21.44-.84a6,6,0,1,0,3.06-11.6c-2-.53-20.09-5-31.2,2.48a18.62,18.62,0,0,0-8.09,13.54c-1.79,14.19,12.27,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.21,9.76a6.89,6.89,0,0,1-3,5.34c-5.6,3.73-17.48,1.64-21.18.62A6,6,0,1,0,110.48,212a59.29,59.29,0,0,0,14.67,2c5.49,0,11.55-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C151.83,180.39,136.92,176.08,127,173.22Zm64,0c-10.85-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.65-1.83,21.44-.84a6,6,0,0,0,3.07-11.6c-2-.54-20.1-5-31.21,2.48a18.64,18.64,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.77,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,174.47,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C215.83,180.39,200.91,176.08,191,173.22ZM202,94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.24,1.76l56,56A6,6,0,0,1,214,88v24a6,6,0,1,1-12,0ZM193.5,82,158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,1,1,85.77,206.4,30,30,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30,30,0,0,1,21.77,9.6,8,8,0,1,1-11.55,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.26-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56a8,8,0,0,0,4.07-15.48c-2.12-.55-21-5.22-32.83,2.76a20.55,20.55,0,0,0-9,14.95c-2,15.88,13.64,20.41,23,23.11,12.07,3.49,13.13,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36a8,8,0,0,0-4.3,15.41,61.23,61.23,0,0,0,15.18,2c5.83,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.48,174.17,127.6,171.31Zm64,0c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56a8,8,0,0,0,4.07-15.48c-2.11-.55-21-5.22-32.83,2.76a20.58,20.58,0,0,0-8.95,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.15,3.93-4.6,3.06-15.16,1.56-19.54.36A8,8,0,0,0,173.93,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.81,20.81,0,0,0,9.18-15.23C218,179,201.48,174.17,191.59,171.31ZM40,112V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v24a8,8,0,1,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0ZM160,80h28.68L160,51.31Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,180c0,13.23,9,24,20,24a18.15,18.15,0,0,0,13.11-5.9,4,4,0,0,1,5.78,5.54A26.13,26.13,0,0,1,64,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a26.13,26.13,0,0,1,18.89,8.36,4,4,0,0,1-5.78,5.54A18.15,18.15,0,0,0,64,156C53,156,44,166.77,44,180Zm82.49-4.85c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.11,61.11,0,0,0-10.47-1.61c-8.12-.54-14.54.75-19.1,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.25,3.25,16.47,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.79,57.79,0,0,0,125.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C149.64,181.84,136.26,178,126.49,175.15Zm64,0c-10.53-3-15.08-4.91-14.43-10.08a8.57,8.57,0,0,1,3.75-6.49c6.26-4.23,18.77-2.24,23.07-1.11a4,4,0,0,0,2-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.11-.54-14.54.75-19.09,3.82a16.63,16.63,0,0,0-7.22,12.13c-1.59,12.49,10.46,16,20.14,18.77,11.25,3.25,16.46,5.49,15.63,11.94a8.93,8.93,0,0,1-3.9,6.75c-6.28,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.7,57.7,0,0,0,189.19,212c5.17,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C213.63,181.84,200.26,178,190.49,175.15ZM204,92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88v24a4,4,0,0,1-8,0Zm-5.65-8L156,41.65V84Z"}))]]),p$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,128a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v12a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v76A12,12,0,0,0,48,128ZM183,80H160V57ZM68,160v48a12,12,0,0,1-24,0V196H32v12a12,12,0,0,1-24,0V160a12,12,0,0,1,24,0v12H44V160a12,12,0,0,1,24,0Zm60,0a12,12,0,0,1-12,12h-4v36a12,12,0,0,1-24,0V172H84a12,12,0,0,1,0-24h32A12,12,0,0,1,128,160Zm72,0v48a12,12,0,0,1-24,0v-9.36l-.11.16a12,12,0,0,1-19.78,0l-.11-.16V208a12,12,0,0,1-24,0V160a12,12,0,0,1,21.89-6.8L166,170.82l12.11-17.62A12,12,0,0,1,200,160Zm56,48a12,12,0,0,1-12,12H220a12,12,0,0,1-12-12V160a12,12,0,0,1,24,0v36h12A12,12,0,0,1,256,208Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,128H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v84A4,4,0,0,0,44,128ZM152,44l44,44H152ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M214,120V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v80a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v26a6,6,0,0,0,12,0ZM158,46.48,193.52,82H158ZM66,160v48a6,6,0,0,1-12,0V190H30v18a6,6,0,0,1-12,0V160a6,6,0,0,1,12,0v18H54V160a6,6,0,0,1,12,0Zm56,0a6,6,0,0,1-6,6H106v42a6,6,0,0,1-12,0V166H84a6,6,0,0,1,0-12h32A6,6,0,0,1,122,160Zm72,0v48a6,6,0,0,1-12,0V178l-13.2,17.6a6,6,0,0,1-9.6,0L146,178v30a6,6,0,0,1-12,0V160a6,6,0,0,1,10.8-3.6L164,182l19.2-25.6A6,6,0,0,1,194,160Zm56,48a6,6,0,0,1-6,6H216a6,6,0,0,1-6-6V160a6,6,0,0,1,12,0v42h22A6,6,0,0,1,250,208Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,120V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v80a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v24a8,8,0,0,0,16,0ZM160,51.31,188.69,80H160ZM68,160v48a8,8,0,0,1-16,0V192H32v16a8,8,0,0,1-16,0V160a8,8,0,0,1,16,0v16H52V160a8,8,0,0,1,16,0Zm56,0a8,8,0,0,1-8,8h-8v40a8,8,0,0,1-16,0V168H84a8,8,0,0,1,0-16h32A8,8,0,0,1,124,160Zm72,0v48a8,8,0,0,1-16,0V184l-9.6,12.8a8,8,0,0,1-12.8,0L148,184v24a8,8,0,0,1-16,0V160a8,8,0,0,1,14.4-4.8L164,178.67l17.6-23.47A8,8,0,0,1,196,160Zm56,48a8,8,0,0,1-8,8H216a8,8,0,0,1-8-8V160a8,8,0,0,1,16,0v40h20A8,8,0,0,1,252,208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212,88a4,4,0,0,0-1.17-2.83l-2-2h0l-54-54A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v80a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v28a4,4,0,0,0,8,0ZM156,41.65,198.34,84H156ZM64,160v48a4,4,0,0,1-8,0V188H28v20a4,4,0,0,1-8,0V160a4,4,0,0,1,8,0v20H56V160a4,4,0,0,1,8,0Zm56,0a4,4,0,0,1-4,4H104v44a4,4,0,0,1-8,0V164H84a4,4,0,0,1,0-8h32A4,4,0,0,1,120,160Zm72,0v48a4,4,0,0,1-8,0V172l-16.8,22.4a4,4,0,0,1-6.4,0L144,172v36a4,4,0,0,1-8,0V160a4,4,0,0,1,7.2-2.4L164,185.33l20.8-27.73A4,4,0,0,1,192,160Zm56,48a4,4,0,0,1-4,4H216a4,4,0,0,1-4-4V160a4,4,0,0,1,8,0v44h24A4,4,0,0,1,248,208Z"}))]]),g$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,140H104a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40h-4V164h4a8,8,0,0,1,0,16Zm104,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4a12,12,0,0,1,12,12ZM80,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM120,144H104a8,8,0,0,0-8,8v55.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8v-8h7.4c15.24,0,28.13-11.92,28.59-27.15A28,28,0,0,0,120,144Zm-.35,40H112V160h8a12,12,0,0,1,11.94,13.16A12.23,12.23,0,0,1,119.65,184ZM216,200.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H208a8,8,0,0,1,8,8ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,146H104a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198h10a26,26,0,0,0,0-52Zm0,40H110V158h10a14,14,0,0,1,0,28Zm94-2v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,192,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0ZM212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,82V46.48L193.52,82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,144H104a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40h-8V160h8a12,12,0,0,1,0,24Zm96,0v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-9,13.26A13.21,13.21,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.63,13.63,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0ZM213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,80V51.31L188.69,80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M120,148H104a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196h12a24,24,0,0,0,0-48Zm0,40H108V156h12a16,16,0,0,1,0,32Zm92-4v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0ZM210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,84V41.65L198.34,84Z"}))]]),O$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.84,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM84,152v38a30,30,0,0,1-60,0,12,12,0,0,1,24,0,6,6,0,0,0,12,0V152a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.09,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.41c0,14.22-11.18,26.26-25.41,26.58A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.75,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM78,152v38a24,24,0,0,1-48,0,6,6,0,0,1,12,0,12,12,0,0,0,24,0V152a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM80,152v38a26,26,0,0,1-52,0,8,8,0,0,1,16,0,10,10,0,0,0,20,0V152a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM76,152v38a22,22,0,0,1-44,0,4,4,0,0,1,8,0,14,14,0,0,0,28,0V152a4,4,0,0,1,8,0Z"}))]]),x$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M151.78,196.8a24.73,24.73,0,0,1-10.95,18c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.81,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.63-4.92-11.21-12.45-10.11-21.19a24.45,24.45,0,0,1,10.69-17.76c6.06-4.09,14.17-5.83,24.1-5.17A69,69,0,0,1,139,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.47,1.58,11.68,3.37,16.8,6.82C149.33,179.53,153,187.53,151.78,196.8ZM68,140a12,12,0,0,0-12,12v38a6,6,0,0,1-12,0,12,12,0,0,0-24,0,30,30,0,0,0,60,0V152A12,12,0,0,0,68,140Zm138.75,40,15-21a12,12,0,0,0-19.53-14L192,159.34,181.76,145a12,12,0,0,0-19.53,14l15,21-15,21A12,12,0,1,0,181.76,215L192,200.62,202.23,215A12,12,0,0,0,221.76,201ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.57,4.57,0,0,0-2,3.67c-.11.9-.13,1.08,1.12,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM80,152v37.4c0,14.23-11.18,26.27-25.41,26.59A26,26,0,0,1,28,190.37,8.17,8.17,0,0,1,35.31,182,8,8,0,0,1,44,190.22a8.89,8.89,0,0,0,4,8c7.85,4.82,16-.76,16-8.2V152.27A8.17,8.17,0,0,1,71.47,144,8,8,0,0,1,80,152Zm134.51,4.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M145.83,196.05a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a59.41,59.41,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.08,147.84,180.39,145.83,196.05ZM72,146a6,6,0,0,0-6,6v38a12,12,0,0,1-24,0,6,6,0,0,0-12,0,24,24,0,0,0,48,0V152A6,6,0,0,0,72,146Zm139.49,1.12a6,6,0,0,0-8.37,1.39L188,169.67,172.88,148.5a6,6,0,0,0-9.76,7L180.63,180,163.12,204.5a6,6,0,1,0,9.76,7L188,190.31l15.12,21.16a6,6,0,1,0,9.76-7L195.37,180l17.51-24.51A6,6,0,0,0,211.49,147.11ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a60.63,60.63,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.58,20.58,0,0,1,9-14.95c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM72,144a8,8,0,0,0-8,8v38a10,10,0,0,1-20,0,8,8,0,0,0-16,0,26,26,0,0,0,52,0V152A8,8,0,0,0,72,144Zm140.65,1.49a8,8,0,0,0-11.16,1.86L188,166.24l-13.49-18.89a8,8,0,0,0-13,9.3L178.17,180l-16.68,23.35a8,8,0,0,0,13,9.3L188,193.76l13.49,18.89a8,8,0,0,0,13-9.3L197.83,180l16.68-23.35A8,8,0,0,0,212.65,145.49ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM72,148a4,4,0,0,0-4,4v38a14,14,0,0,1-28,0,4,4,0,0,0-8,0,22,22,0,0,0,44,0V152A4,4,0,0,0,72,148Zm138.32.75a4,4,0,0,0-5.58.92L188,173.12l-16.75-23.45a4,4,0,0,0-6.51,4.66L183.08,180l-18.34,25.67a4,4,0,0,0,.93,5.58,4,4,0,0,0,5.58-.92L188,186.88l16.74,23.45A4,4,0,0,0,208,212a3.91,3.91,0,0,0,2.32-.75,4,4,0,0,0,.93-5.58L192.92,180l18.33-25.67A4,4,0,0,0,210.32,148.75ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),y$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M100,152v56a12,12,0,0,1-24,0V190.07l-6.17,8.81a12,12,0,0,1-19.66,0L44,190.07V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.83-6.88L60,171.07l18.17-25.95A12,12,0,0,1,100,152Zm84,28a40,40,0,0,1-40,40H128a12,12,0,0,1-12-12V152a12,12,0,0,1,12-12h16A40,40,0,0,1,184,180Zm-24,0a16,16,0,0,0-16-16h-4v32h4A16,16,0,0,0,160,180Zm60-92V224a12,12,0,0,1-24,0V104H148a12,12,0,0,1-12-12V44H60v64a12,12,0,0,1-24,0V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.52l56,56A12,12,0,0,1,220,88Zm-60-8h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H196a4,4,0,0,1,4,4V224a8,8,0,0,0,9.19,7.91,8.15,8.15,0,0,0,6.81-8.16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-8,56H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h15.32c19.66,0,36.21-15.48,36.67-35.13A36,36,0,0,0,144,144Zm-.49,56H136V160h8a20,20,0,0,1,20,20.77C163.58,191.59,154.34,200,143.51,200ZM104,152v55.73A8.17,8.17,0,0,1,96.53,216,8,8,0,0,1,88,208V177.38l-13.32,19a8.3,8.3,0,0,1-4.2,3.2,8,8,0,0,1-9-3L48,177.38v30.35A8.17,8.17,0,0,1,40.53,216,8,8,0,0,1,32,208V152.31a8.27,8.27,0,0,1,4.56-7.53,8,8,0,0,1,10,2.63L68,178.05l21.27-30.39a8.28,8.28,0,0,1,8.06-3.55A8,8,0,0,1,104,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V224a6,6,0,0,0,12,0V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM144,146H128a6,6,0,0,0-6,6v56a6,6,0,0,0,6,6h16a34,34,0,0,0,0-68Zm0,56H134V158h10a22,22,0,0,1,0,44Zm-42-50v56a6,6,0,0,1-12,0V171L72.92,195.44a6,6,0,0,1-9.84,0L46,171v37a6,6,0,0,1-12,0V152a6,6,0,0,1,10.92-3.44l23.08,33,23.08-33A6,6,0,0,1,102,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V224a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM144,144H128a8,8,0,0,0-8,8v56a8,8,0,0,0,8,8h16a36,36,0,0,0,0-72Zm0,56h-8V160h8a20,20,0,0,1,0,40Zm-40-48v56a8,8,0,0,1-16,0V177.38L74.55,196.59a8,8,0,0,1-13.1,0L48,177.38V208a8,8,0,0,1-16,0V152a8,8,0,0,1,14.55-4.59L68,178.05l21.45-30.64A8,8,0,0,1,104,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V224a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM144,148H128a4,4,0,0,0-4,4v56a4,4,0,0,0,4,4h16a32,32,0,0,0,0-64Zm0,56H132V156h12a24,24,0,0,1,0,48Zm-44-52v56a4,4,0,0,1-8,0V164.69l-20.72,29.6a4,4,0,0,1-6.56,0L44,164.69V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.28-2.29L68,185l24.72-35.31A4,4,0,0,1,100,152Z"}))]]),b$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm104-60a12,12,0,0,1-12,12H140v12a12,12,0,0,1-24,0V164H104a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,164,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,160H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Zm0-72V43.31L196.69,88Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-42-66a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V158H104a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-40-64a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V160H104a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-44-68a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V156H104a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,152Z"}))]]),v$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M56,140H40a12,12,0,0,0-12,12v56a12,12,0,0,0,24,0v-4h4a32,32,0,0,0,0-64Zm0,40H52V164h4a8,8,0,0,1,0,16Zm176,20.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,204,220c-19.85,0-36-17.95-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,204,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,216,176h4a12,12,0,0,1,12,12ZM160,152v56a12,12,0,0,1-8.34,11.43A12.15,12.15,0,0,1,148,220a12,12,0,0,1-9.76-5L120,189.44V208a12,12,0,0,1-24,0V152a12,12,0,0,1,21.76-7L136,170.55V152a12,12,0,0,1,24,0ZM48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM160,57l23,23H160Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M44,120H212a4,4,0,0,0,4-4V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76A4,4,0,0,0,44,120ZM152,44l44,44H152ZM60,144H44a8,8,0,0,0-8,8v55.72A8.17,8.17,0,0,0,43.47,216,8,8,0,0,0,52,208v-8h7.4c15.24,0,28.14-11.92,28.59-27.15A28,28,0,0,0,60,144Zm-.35,40H52V160h8a12,12,0,0,1,12,13.16A12.25,12.25,0,0,1,59.65,184ZM224,200.87a8,8,0,0,1-2.26,5.57A30.07,30.07,0,0,1,200,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.21,8.21,0,0,1,3,10.64,8,8,0,0,1-11.55,2.88A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1-8-8.53,8.17,8.17,0,0,1,8.25-7.47H216a8,8,0,0,1,8,8ZM156,152v55.76a8.22,8.22,0,0,1-4.12,7.24,8,8,0,0,1-10.39-2.35L116,177v30.76a8.17,8.17,0,0,1-7.47,8.26,8,8,0,0,1-8.53-8V152.31a8.27,8.27,0,0,1,4.53-7.52,8,8,0,0,1,10,2.56L140,183V152.27a8.17,8.17,0,0,1,7.47-8.25A8,8,0,0,1,156,152Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,146H44a6,6,0,0,0-6,6v56a6,6,0,0,0,12,0V198H60a26,26,0,0,0,0-52Zm0,40H50V158H60a14,14,0,0,1,0,28Zm162,14.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,200,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,9.95A15.25,15.25,0,0,0,200,158c-9.93,0-18,9.87-18,22s8.07,22,18,22a15.75,15.75,0,0,0,10-3.73V190h-2a6,6,0,0,1,0-12h8a6,6,0,0,1,6,6ZM154,152v56a6,6,0,0,1-4.17,5.71A5.78,5.78,0,0,1,148,214a6,6,0,0,1-4.88-2.51L114,170.72V208a6,6,0,0,1-12,0V152a6,6,0,0,1,10.88-3.49L142,189.28V152a6,6,0,0,1,12,0ZM48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,144H44a8,8,0,0,0-8,8v56a8,8,0,0,0,16,0v-8h8a28,28,0,0,0,0-56Zm0,40H52V160h8a12,12,0,0,1,0,24Zm164,16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,200,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a29.45,29.45,0,0,1,16.48,5.11,8,8,0,0,1-9,13.27A13.21,13.21,0,0,0,200,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.57,13.57,0,0,0,8-2.72V192a8,8,0,0,1,0-16h8a8,8,0,0,1,8,8ZM156,152v56a8,8,0,0,1-5.56,7.62A7.91,7.91,0,0,1,148,216a8,8,0,0,1-6.51-3.35L116,177v31a8,8,0,0,1-16,0V152a8,8,0,0,1,14.51-4.65L140,183V152a8,8,0,0,1,16,0ZM48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,148H44a4,4,0,0,0-4,4v56a4,4,0,0,0,8,0V196H60a24,24,0,0,0,0-48Zm0,40H48V156H60a16,16,0,0,1,0,32Zm160,12.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,200,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.45,17.45,0,0,0,200,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8a4,4,0,0,1,4,4ZM152,152v56a4,4,0,0,1-2.78,3.81A3.93,3.93,0,0,1,148,212a4,4,0,0,1-3.25-1.67L112,164.48V208a4,4,0,0,1-8,0V152a4,4,0,0,1,7.25-2.33L144,195.52V152a4,4,0,0,1,8,0Zm52-40a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,84V41.65L198.34,84Z"}))]]),S$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,1,0,24,0V88a12,12,0,0,0-3.51-8.48l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57ZM87.78,196.8a24.72,24.72,0,0,1-10.94,18c-6,4-13.27,5.15-19.74,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,1,1,6.46-23.11c6.82,1.85,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.82-2.64-9.88-3.53-5.39-1.56-11-3.17-15.75-6.26-7.62-4.92-11.21-12.45-10.1-21.19a24.44,24.44,0,0,1,10.68-17.76c6.07-4.09,14.17-5.82,24.1-5.17A69,69,0,0,1,75,142a12,12,0,0,1-6.1,23.21c-6.35-1.63-13.61-1.51-16.07-.33a79.69,79.69,0,0,0,7.92,2.59c5.47,1.58,11.67,3.37,16.8,6.82C85.33,179.53,89,187.53,87.78,196.8ZM155.3,156l-20,56a12,12,0,0,1-22.6,0l-20-56A12,12,0,1,1,115.3,148L124,172.3,132.7,148A12,12,0,1,1,155.3,156ZM224,188v12.87a12,12,0,0,1-3.33,8.3A34,34,0,0,1,196,220c-19.85,0-36-17.94-36-40s16.15-40,36-40a33.39,33.39,0,0,1,18.71,5.8,12,12,0,1,1-13.42,19.89A9.39,9.39,0,0,0,196,164c-6.5,0-12,7.33-12,16s5.5,16,12,16a9,9,0,0,0,2.7-.42A12,12,0,0,1,208,176h4A12,12,0,0,1,224,188Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,1,0,16,0V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-72.18,145a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-20,56a8,8,0,0,1-15.07,0l-20-56a8,8,0,1,1,15.06-5.38L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.22,5.53A30.06,30.06,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.38,29.38,0,0,1,16.48,5.12,8,8,0,0,1-8.95,13.26A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1,0-16h8A8,8,0,0,1,216,184Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44ZM87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31Zm63.72-41.62-19.9,55.72a8.25,8.25,0,0,1-6.5,5.51,8,8,0,0,1-8.67-5.23L96.59,155a8.21,8.21,0,0,1,4.5-10.45,8,8,0,0,1,10.45,4.76L124,184.21l12.46-34.9a8,8,0,0,1,15.07,5.38ZM216,184v16.87a8,8,0,0,1-2.26,5.57A30,30,0,0,1,192,216c-17.64,0-32-16.15-32-36s14.36-36,32-36a29.36,29.36,0,0,1,16.09,4.86,8.22,8.22,0,0,1,3,10.64,8,8,0,0,1-11.54,2.88A13.27,13.27,0,0,0,192,160c-8.82,0-16,9-16,20s7.18,20,16,20a13.38,13.38,0,0,0,8-2.71V192a8,8,0,0,1-8-8.53,8.18,8.18,0,0,1,8.26-7.47H208A8,8,0,0,1,216,184Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.75l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,1,0,12,0V88A6,6,0,0,0,212.24,83.75ZM158,46.48,193.52,82H158ZM85.83,196.05a18.85,18.85,0,0,1-8.3,13.81C72.71,213.05,66.66,214,61.16,214a59.38,59.38,0,0,1-14.67-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.57-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.2-2.48a6,6,0,0,1-3,11.6c-3.79-1-15.85-2.95-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C72.93,176.08,87.85,180.39,85.83,196.05Zm63.82-42-20,56a6,6,0,0,1-11.3,0l-20-56a6,6,0,1,1,11.3-4L124,190.15,138.35,150a6,6,0,0,1,11.3,4ZM214,184v16.87a6,6,0,0,1-1.67,4.15A28.06,28.06,0,0,1,192,214c-16.54,0-30-15.25-30-34s13.46-34,30-34a27.43,27.43,0,0,1,15.36,4.77,6,6,0,0,1-6.72,10A15.25,15.25,0,0,0,192,158c-9.92,0-18,9.87-18,22s8.08,22,18,22a15.7,15.7,0,0,0,10-3.74V190h-2a6,6,0,0,1,0-12h8A6,6,0,0,1,214,184Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.82,196.31a20.82,20.82,0,0,1-9.19,15.23C73.44,215,67,216,61.14,216A61.23,61.23,0,0,1,46,214a8,8,0,0,1,4.3-15.41c4.38,1.2,14.95,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.55,20.55,0,0,1,9-14.95c11.84-8,30.72-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.48-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.11.9-.14,1.09,1.12,1.9,2.31,1.49,6.44,2.68,10.45,3.84C73.5,174.17,90.06,179,87.82,196.31ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,1,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.65,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31Zm-13.3,64.47a8,8,0,0,0-10.23,4.84L124,184.21l-12.47-34.9a8,8,0,1,0-15.06,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,146.7,144.47ZM208,176h-8a8,8,0,0,0,0,16v5.29a13.38,13.38,0,0,1-8,2.71c-8.82,0-16-9-16-20s7.18-20,16-20a13.27,13.27,0,0,1,7.53,2.38,8,8,0,0,0,8.95-13.26A29.38,29.38,0,0,0,192,144c-17.64,0-32,16.15-32,36s14.36,36,32,36a30.06,30.06,0,0,0,21.78-9.6,8,8,0,0,0,2.22-5.53V184A8,8,0,0,0,208,176Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,1,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52v20a4,4,0,0,0,8,0V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM83.85,195.8a17,17,0,0,1-7.43,12.41C72,211.12,66.38,212,61.2,212A57.89,57.89,0,0,1,47,210.11a4,4,0,1,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.11,61.11,0,0,1,10.47,1.61,4,4,0,0,1-2,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C72.27,178,85.65,181.84,83.85,195.8Zm63.92-42.45-20,56a4,4,0,0,1-7.53,0l-20-56a4,4,0,1,1,7.53-2.7L124,196.11l16.23-45.46a4,4,0,1,1,7.53,2.7ZM212,184v16.87a4,4,0,0,1-1.11,2.77A26.11,26.11,0,0,1,192,212c-15.44,0-28-14.36-28-32s12.56-32,28-32a25.41,25.41,0,0,1,14.24,4.43,4,4,0,1,1-4.48,6.63A17.43,17.43,0,0,0,192,156c-11,0-20,10.77-20,24s9,24,20,24a17.87,17.87,0,0,0,12-4.82V188h-4a4,4,0,0,1,0-8h8A4,4,0,0,1,212,184Z"}))]]),w$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212H180a12,12,0,0,0,0,24h20a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-4.22,139.85a24.75,24.75,0,0,1-10.95,18.06c-6,4-13.27,5.15-19.73,5.15a63.75,63.75,0,0,1-16.23-2.21,12,12,0,0,1,6.46-23.12c6.81,1.86,15,1.61,16.39.06a2.48,2.48,0,0,0,.21-.71c-1.94-1.23-6.83-2.64-9.88-3.52-5.39-1.56-11-3.18-15.75-6.27-7.62-4.92-11.21-12.45-10.11-21.2a24.45,24.45,0,0,1,10.69-17.75c6.06-4.09,14.17-5.83,24.1-5.18A68.53,68.53,0,0,1,143,142a12,12,0,0,1-6.1,23.21c-6.36-1.63-13.62-1.51-16.07-.33a79.5,79.5,0,0,0,7.91,2.59c5.48,1.58,11.68,3.37,16.8,6.82C153.33,179.55,157,187.55,155.78,196.82ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216H176a8,8,0,0,0,0,16h24a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160Zm-12.19,145a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152a8,8,0,0,1-8,8H68v48a8,8,0,0,1-16,0V160H40a8,8,0,0,1,0-16H80A8,8,0,0,1,88,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H164a4,4,0,0,1,4,4V228a4,4,0,0,0,4,4h28a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm-4.19,108.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A61.14,61.14,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.35-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM88,152.53A8.17,8.17,0,0,1,79.73,160H68v47.73A8.17,8.17,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.17,8.17,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2H176a6,6,0,0,0,0,12h24a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM145.83,196.06a18.89,18.89,0,0,1-8.31,13.81c-4.82,3.19-10.87,4.14-16.36,4.14a58.89,58.89,0,0,1-14.68-2,6,6,0,0,1,3.23-11.56c3.71,1,15.58,3.11,21.19-.62a6.85,6.85,0,0,0,3-5.34c.58-4.43-2.08-6.26-14.2-9.76-9.31-2.69-23.37-6.75-21.57-20.94a18.61,18.61,0,0,1,8.08-13.54c11.11-7.49,29.18-3,31.21-2.48a6,6,0,0,1-3.06,11.6c-3.78-1-15.85-3-21.45.84a6.59,6.59,0,0,0-2.88,5.08c-.41,3.22,2.14,4.78,13,7.91C132.92,176.09,147.84,180.4,145.83,196.06ZM86,152a6,6,0,0,1-6,6H66v50a6,6,0,0,1-12,0V158H40a6,6,0,0,1,0-12H80A6,6,0,0,1,86,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M147.81,196.31a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216a61.34,61.34,0,0,1-15.19-2,8,8,0,0,1,4.31-15.41c4.38,1.2,15,2.7,19.55-.36.88-.59,1.83-1.52,2.14-3.93.34-2.67-.71-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.11a20.56,20.56,0,0,1,9-14.95c11.84-8,30.71-3.31,32.83-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.09,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150.05,179,147.81,196.31ZM216,88V216a16,16,0,0,1-16,16H176a8,8,0,0,1,0-16h24V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-56-8h28.69L160,51.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4H176a4,4,0,0,0,0,8h24a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM143.84,195.8a17,17,0,0,1-7.43,12.41c-4.39,2.91-10,3.77-15.22,3.77A57.89,57.89,0,0,1,107,210.11a4,4,0,0,1,2.15-7.7c4.22,1.17,16.56,3.29,22.83-.88a8.94,8.94,0,0,0,3.91-6.75c.83-6.45-4.38-8.69-15.64-11.94-9.68-2.8-21.72-6.28-20.14-18.77a16.66,16.66,0,0,1,7.22-12.13c4.56-3.07,11-4.36,19.1-3.82a61.33,61.33,0,0,1,10.48,1.61,4,4,0,0,1-2.05,7.74c-4.29-1.13-16.81-3.12-23.06,1.11a8.51,8.51,0,0,0-3.75,6.49c-.66,5.17,3.89,7,14.42,10.08C132.26,178,145.64,181.84,143.84,195.8ZM84,152a4,4,0,0,1-4,4H64v52a4,4,0,0,1-8,0V156H40a4,4,0,0,1,0-8H80A4,4,0,0,1,84,152Z"}))]]),A$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.76,201A12,12,0,1,1,202.23,215L192,200.62,181.76,215A12,12,0,1,1,162.23,201l15-21-15-21a12,12,0,0,1,19.53-14L192,159.34,202.23,145a12,12,0,0,1,19.53,14l-15,21Zm-80.25-26.73c-5.12-3.45-11.33-5.24-16.8-6.82a79.5,79.5,0,0,1-7.91-2.59c2.45-1.18,9.71-1.3,16.07.33A12,12,0,0,0,139,142a69,69,0,0,0-12-1.86c-9.93-.66-18,1.08-24.1,5.17a24.45,24.45,0,0,0-10.69,17.76c-1.1,8.74,2.48,16.27,10.11,21.19,4.78,3.09,10.36,4.7,15.75,6.26,3,.89,7.94,2.3,9.88,3.53a2.48,2.48,0,0,1-.21.71c-1.37,1.55-9.58,1.79-16.39-.06a12,12,0,1,0-6.46,23.11A63.75,63.75,0,0,0,121.1,220c6.46,0,13.73-1.17,19.73-5.15a24.73,24.73,0,0,0,10.95-18C153,187.53,149.33,179.53,141.51,174.27ZM76,140H36a12,12,0,0,0,0,24h8v44a12,12,0,0,0,24,0V164h8a12,12,0,0,0,0-24ZM36,108V40A20,20,0,0,1,56,20h96a12,12,0,0,1,8.49,3.51l56,56A12,12,0,0,1,220,88v20a12,12,0,1,1-24,0v-4H148a12,12,0,0,1-12-12V44H60v64a12,12,0,1,1-24,0ZM160,80h23L160,57Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.94c-2,15.89,13.65,20.42,23,23.12,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,1,0,106,214a60.43,60.43,0,0,0,15.18,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v76a4,4,0,0,0,4,4H212a4,4,0,0,0,4-4V88A8,8,0,0,0,213.66,82.34ZM152,88V44l44,44Zm62.51,68.65L197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,2.3-11.46,8.19,8.19,0,0,1,10.88,2.38L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3Zm-66.7,39.66a20.82,20.82,0,0,1-9.19,15.23C133.43,215,127,216,121.13,216A60.43,60.43,0,0,1,106,214a8,8,0,1,1,4.3-15.41c4.38,1.21,15,2.71,19.55-.35.88-.6,1.83-1.52,2.14-3.93.34-2.67-.72-4.1-12.78-7.59-9.35-2.7-25-7.23-23-23.12a20.58,20.58,0,0,1,9-14.94c11.85-8,30.72-3.31,32.84-2.76a8,8,0,0,1-4.07,15.48c-4.49-1.17-15.23-2.56-19.83.56a4.54,4.54,0,0,0-2,3.67c-.12.9-.14,1.08,1.11,1.9,2.31,1.49,6.45,2.68,10.45,3.84C133.49,174.17,150,179,147.81,196.31ZM88,152.53A8.18,8.18,0,0,1,79.73,160H68v47.72A8.18,8.18,0,0,1,60.53,216,8,8,0,0,1,52,208V160H40.27A8.18,8.18,0,0,1,32,152.53,8,8,0,0,1,40,144H80A8,8,0,0,1,88,152.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.88,155.48,195.37,180l17.51,24.51a6,6,0,1,1-9.76,7L188,190.31l-15.12,21.16a6,6,0,1,1-9.76-7L180.63,180l-17.51-24.51a6,6,0,0,1,9.76-7L188,169.67l15.12-21.17a6,6,0,1,1,9.76,7Zm-89.83,17.74c-10.86-3.13-13.41-4.69-13-7.91a6.59,6.59,0,0,1,2.88-5.08c5.6-3.79,17.66-1.83,21.45-.84a6,6,0,0,0,3.06-11.6c-2-.53-20.1-5-31.21,2.48a18.61,18.61,0,0,0-8.08,13.54c-1.8,14.19,12.26,18.25,21.57,20.94,12.12,3.5,14.78,5.33,14.2,9.76a6.85,6.85,0,0,1-3,5.34c-5.61,3.73-17.48,1.64-21.19.62A6,6,0,0,0,106.48,212a59.41,59.41,0,0,0,14.68,2c5.49,0,11.54-.95,16.36-4.14a18.89,18.89,0,0,0,8.31-13.81C147.84,180.39,132.92,176.08,123.05,173.22ZM80,146H40a6,6,0,0,0,0,12H54v50a6,6,0,0,0,12,0V158H80a6,6,0,0,0,0-12ZM214,88v24a6,6,0,1,1-12,0V94H152a6,6,0,0,1-6-6V38H56a2,2,0,0,0-2,2v72a6,6,0,1,1-12,0V40A14,14,0,0,1,56,26h96a6,6,0,0,1,4.25,1.76l56,56A6,6,0,0,1,214,88Zm-20.49-6L158,46.48V82Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M214.51,156.65,197.83,180l16.68,23.35a8,8,0,0,1-13,9.3L188,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L178.17,180l-16.68-23.35a8,8,0,0,1,13-9.3L188,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM123.6,171.31c-4-1.16-8.14-2.35-10.45-3.84-1.25-.82-1.23-1-1.11-1.9a4.54,4.54,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.83-.56A8,8,0,0,0,138,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.33-2.14,3.93-4.6,3.06-15.17,1.56-19.55.35A8,8,0,0,0,105.94,214a60.63,60.63,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C150,179,133.49,174.17,123.6,171.31ZM80,144H40a8,8,0,0,0,0,16H52v48a8,8,0,0,0,16,0V160H80a8,8,0,0,0,0-16ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.25,154.33,192.92,180l18.33,25.67a4,4,0,0,1-.93,5.58A3.91,3.91,0,0,1,208,212a4,4,0,0,1-3.26-1.67L188,186.88l-16.75,23.45a4,4,0,0,1-6.51-4.66L183.08,180l-18.34-25.67a4,4,0,0,1,6.51-4.66L188,173.12l16.74-23.45a4,4,0,0,1,6.51,4.66Zm-88.76,20.82c-10.53-3-15.08-4.91-14.42-10.08a8.51,8.51,0,0,1,3.75-6.49c6.25-4.23,18.77-2.24,23.06-1.11a4,4,0,0,0,2.05-7.74,61.33,61.33,0,0,0-10.48-1.61c-8.12-.54-14.54.75-19.1,3.82a16.66,16.66,0,0,0-7.22,12.13c-1.58,12.49,10.46,16,20.14,18.77,11.26,3.25,16.47,5.49,15.64,11.94a8.94,8.94,0,0,1-3.91,6.75c-6.27,4.17-18.61,2.05-22.83.88a4,4,0,1,0-2.15,7.7A57.89,57.89,0,0,0,121.19,212c5.18,0,10.83-.86,15.22-3.77a17,17,0,0,0,7.43-12.41C145.64,181.84,132.26,178,122.49,175.15ZM80,148H40a4,4,0,0,0,0,8H56v52a4,4,0,0,0,8,0V156H80a4,4,0,0,0,0-8ZM212,88v24a4,4,0,0,1-8,0V92H152a4,4,0,0,1-4-4V36H56a4,4,0,0,0-4,4v72a4,4,0,0,1-8,0V40A12,12,0,0,1,56,28h96a4,4,0,0,1,2.83,1.17l56,56A4,4,0,0,1,212,88Zm-13.66-4L156,41.65V84Z"}))]]),k$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a12,12,0,0,0,12-12V44h76V92a12,12,0,0,0,12,12h48v4a12,12,0,0,0,24,0V88a12,12,0,0,0-3.51-8.49l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68A12,12,0,0,0,48,120ZM183,80H160V57Zm-25.27,79-15,21,15,21A12,12,0,1,1,138.24,215L128,200.65,117.76,215A12,12,0,1,1,98.24,201l15-21-15-21A12,12,0,1,1,117.76,145L128,159.35,138.24,145A12,12,0,1,1,157.76,159ZM92,152a12,12,0,0,1-12,12H72v44a12,12,0,0,1-24,0V164H40a12,12,0,0,1,0-24H80A12,12,0,0,1,92,152Zm136,0a12,12,0,0,1-12,12h-8v44a12,12,0,0,1-24,0V164h-8a12,12,0,0,1,0-24h40A12,12,0,0,1,228,152Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),d.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M154.31,156.92,137.83,180l16.53,23.14a8.18,8.18,0,0,1-1.22,11,8,8,0,0,1-11.65-1.48L128,193.76l-13.49,18.89a8,8,0,0,1-11.64,1.49,8.17,8.17,0,0,1-1.23-11L118.17,180l-16.48-23.08a8.22,8.22,0,0,1,1.46-11.28,8,8,0,0,1,11.36,1.71L128,166.24l13.49-18.89a8,8,0,0,1,11.36-1.71A8.22,8.22,0,0,1,154.31,156.92ZM84,144H44.27A8.18,8.18,0,0,0,36,151.47,8,8,0,0,0,44,160H56v47.73A8.17,8.17,0,0,0,63.47,216,8,8,0,0,0,72,208V160H83.73A8.18,8.18,0,0,0,92,152.53,8,8,0,0,0,84,144Zm128,0H172.27a8.18,8.18,0,0,0-8.25,7.47,8,8,0,0,0,8,8.53h12v47.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V160h11.73a8.18,8.18,0,0,0,8.25-7.47A8,8,0,0,0,212,144ZM40,116V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88v28a4,4,0,0,1-4,4H44A4,4,0,0,1,40,116ZM152,88h44L152,44Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,118a6,6,0,0,0,6-6V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50v18a6,6,0,0,0,12,0V88a6,6,0,0,0-1.76-4.24l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72A6,6,0,0,0,48,118ZM158,46.48,193.52,82H158Zm-5.12,109L135.37,180l17.51,24.51a6,6,0,1,1-9.76,7L128,190.32l-15.12,21.17a6,6,0,0,1-9.76-7L120.63,180l-17.51-24.51a6,6,0,1,1,9.76-7L128,169.68l15.12-21.17a6,6,0,0,1,9.76,7ZM90,152a6,6,0,0,1-6,6H70v50a6,6,0,0,1-12,0V158H44a6,6,0,0,1,0-12H84A6,6,0,0,1,90,152Zm128,0a6,6,0,0,1-6,6H198v50a6,6,0,0,1-12,0V158H172a6,6,0,0,1,0-12h40A6,6,0,0,1,218,152Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M48,120a8,8,0,0,0,8-8V40h88V88a8,8,0,0,0,8,8h48v16a8,8,0,0,0,16,0V88a8,8,0,0,0-2.34-5.66l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72A8,8,0,0,0,48,120ZM160,51.31,188.69,80H160Zm-5.49,105.34L137.83,180l16.68,23.35a8,8,0,0,1-13,9.3L128,193.76l-13.49,18.89a8,8,0,1,1-13-9.3L118.17,180l-16.68-23.35a8,8,0,1,1,13-9.3L128,166.24l13.49-18.89a8,8,0,0,1,13,9.3ZM92,152a8,8,0,0,1-8,8H72v48a8,8,0,0,1-16,0V160H44a8,8,0,0,1,0-16H84A8,8,0,0,1,92,152Zm128,0a8,8,0,0,1-8,8H200v48a8,8,0,0,1-16,0V160H172a8,8,0,0,1,0-16h40A8,8,0,0,1,220,152Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204,112a4,4,0,0,0,8,0V88a4,4,0,0,0-1.17-2.83l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52ZM156,41.65,198.34,84H156Zm-4.75,112.67L132.92,180l18.33,25.67a4,4,0,1,1-6.5,4.65L128,186.88l-16.75,23.44a4,4,0,1,1-6.5-4.65L123.08,180l-18.33-25.68a4,4,0,1,1,6.5-4.65L128,173.12l16.75-23.45a4,4,0,1,1,6.5,4.65ZM88,152a4,4,0,0,1-4,4H68v52a4,4,0,0,1-8,0V156H44a4,4,0,0,1,0-8H84A4,4,0,0,1,88,152Zm128,0a4,4,0,0,1-4,4H196v52a4,4,0,0,1-8,0V156H172a4,4,0,0,1,0-8h40A4,4,0,0,1,216,152Z"}))]]),M$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216.49,79.51l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40v68a12,12,0,0,0,24,0V44h76V92a12,12,0,0,0,12,12h48V212a12,12,0,0,0,0,24h4a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.51ZM160,57l23,23H160Zm-1.91,84.69a12,12,0,0,0-11.92-.15L126.5,152.44A20,20,0,0,0,108,140H48a20,20,0,0,0-20,20v48a20,20,0,0,0,20,20h60a20,20,0,0,0,18.5-12.44l19.67,10.93A12,12,0,0,0,164,216V152A12,12,0,0,0,158.09,141.66ZM104,204H52V164h52Zm36-8.39-12-6.67v-9.88l12-6.67Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,88H152V32Zm-88,72a8,8,0,0,0-8-8H48a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V196l32,20V152l-32,20Z",opacity:"0.2"}),d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM144,201.57l-16-10V176.43l16-10Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40v72a6,6,0,0,0,12,0V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216a2,2,0,0,1-2,2h-8a6,6,0,0,0,0,12h8a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158Zm-3.09,100.27a6,6,0,0,0-6.09.16L126,161.17V160a14,14,0,0,0-14-14H48a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h64a14,14,0,0,0,14-14v-1.17l22.82,14.26A6,6,0,0,0,158,216V152A6,6,0,0,0,154.91,146.75ZM114,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V160a2,2,0,0,1,2-2h64a2,2,0,0,1,2,2Zm32-2.83-20-12.5V175.33l20-12.5Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40v72a8,8,0,0,0,16,0V40h88V88a8,8,0,0,0,8,8h48V216h-8a8,8,0,0,0,0,16h8a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM155.88,145a8,8,0,0,0-8.12.22l-19.95,12.46A16,16,0,0,0,112,144H48a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h64a16,16,0,0,0,15.81-13.68l19.95,12.46A8,8,0,0,0,160,216V152A8,8,0,0,0,155.88,145ZM112,208H48V160h64v48Zm32-6.43-16-10V176.43l16-10Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40v72a4,4,0,0,0,8,0V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216a4,4,0,0,1-4,4h-8a4,4,0,0,0,0,8h8a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM153.94,148.5a4,4,0,0,0-4.06.11L124,164.78V160a12,12,0,0,0-12-12H48a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12v-4.78l25.88,16.17A4,4,0,0,0,152,220a4.06,4.06,0,0,0,1.94-.5A4,4,0,0,0,156,216V152A4,4,0,0,0,153.94,148.5ZM116,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V160a4,4,0,0,1,4-4h64a4,4,0,0,1,4,4Zm32,.78-24-15V174.22l24-15Z"}))]]),T$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,100h72v56H44Zm96-24V60h24V76Zm-24,0H92V60h24Zm0,104v16H92V180Zm24,0h24v16H140Zm0-24V100h72v56Zm72-80H188V60h24ZM68,60V76H44V60ZM44,180H68v16H44Zm144,16V180h24v16Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M32,176H224v24a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8ZM216,48H40a8,8,0,0,0-8,8V80H224V56A8,8,0,0,0,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM184,56h32V72H184ZM72,200H40V184H72ZM72,72H40V56H72Zm48,128H88V184h32Zm0-128H88V56h32Zm48,128H136V184h32Zm0-128H136V56h32Zm48,128H184V184h32v16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,86h84v84H38Zm96-12V54h36V74Zm-12,0H86V54h36Zm0,108v20H86V182Zm12,0h36v20H134Zm0-12V86h84v84ZM218,56V74H182V54h34A2,2,0,0,1,218,56ZM40,54H74V74H38V56A2,2,0,0,1,40,54ZM38,200V182H74v20H40A2,2,0,0,1,38,200Zm178,2H182V182h36v18A2,2,0,0,1,216,202Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,88h80v80H40Zm96-16V56h32V72Zm-16,0H88V56h32Zm0,112v16H88V184Zm16,0h32v16H136Zm0-16V88h80v80Zm80-96H184V56h32ZM72,56V72H40V56ZM40,184H72v16H40Zm176,16H184V184h32v16Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,84h88v88H36Zm96-8V52h40V76Zm-8,0H84V52h40Zm0,104v24H84V180Zm8,0h40v24H132Zm0-8V84h88v88ZM220,56V76H180V52h36A4,4,0,0,1,220,56ZM40,52H76V76H36V56A4,4,0,0,1,40,52ZM36,200V180H76v24H40A4,4,0,0,1,36,200Zm180,4H180V180h40v20A4,4,0,0,1,216,204Z"}))]]),C$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,88V200.89A15.13,15.13,0,0,1,216.89,216H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H93.33a16.12,16.12,0,0,1,9.6,3.2L130.67,72H216A16,16,0,0,1,232,88Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4Z"}))]]),E$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,68H132L105.33,48a20.12,20.12,0,0,0-12-4H40A20,20,0,0,0,20,64V200a20,20,0,0,0,20,20H216.89A19.13,19.13,0,0,0,236,200.89V88A20,20,0,0,0,216,68Zm-4,128H44V68H92l28.8,21.6A12,12,0,0,0,128,92h84Zm-84-88a12,12,0,0,1,12,12v12h12a12,12,0,0,1,0,24H140v12a12,12,0,0,1-24,0V156H104a12,12,0,0,1,0-24h12V120A12,12,0,0,1,128,108Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,88V200.89a7.11,7.11,0,0,1-7.11,7.11H40a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H93.33a8,8,0,0,1,4.8,1.6L128,80h88A8,8,0,0,1,224,88Z",opacity:"0.2"}),d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm-64,80H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,74H130L101.73,52.8a14,14,0,0,0-8.4-2.8H40A14,14,0,0,0,26,64V200a14,14,0,0,0,14,14H216.89A13.12,13.12,0,0,0,230,200.89V88A14,14,0,0,0,216,74Zm2,126.89a1.11,1.11,0,0,1-1.11,1.11H40a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H93.33a2,2,0,0,1,1.2.4L124.4,84.8A6,6,0,0,0,128,86h88a2,2,0,0,1,2,2ZM158,144a6,6,0,0,1-6,6H134v18a6,6,0,0,1-12,0V150H104a6,6,0,0,1,0-12h18V120a6,6,0,0,1,12,0v18h18A6,6,0,0,1,158,144Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,72H130.67L102.93,51.2a16.12,16.12,0,0,0-9.6-3.2H40A16,16,0,0,0,24,64V200a16,16,0,0,0,16,16H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72Zm0,128H40V64H93.33L123.2,86.4A8,8,0,0,0,128,88h88Zm-56-56a8,8,0,0,1-8,8H136v16a8,8,0,0,1-16,0V152H104a8,8,0,0,1,0-16h16V120a8,8,0,0,1,16,0v16h16A8,8,0,0,1,160,144Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,76H129.33l-28.8-21.6a12.05,12.05,0,0,0-7.2-2.4H40A12,12,0,0,0,28,64V200a12,12,0,0,0,12,12H216.89A11.12,11.12,0,0,0,228,200.89V88A12,12,0,0,0,216,76Zm4,124.89a3.12,3.12,0,0,1-3.11,3.11H40a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H93.33a4,4,0,0,1,2.4.8L125.6,83.2a4,4,0,0,0,2.4.8h88a4,4,0,0,1,4,4ZM156,144a4,4,0,0,1-4,4H132v20a4,4,0,0,1-8,0V148H104a4,4,0,0,1,0-8h20V120a4,4,0,0,1,8,0v20h20A4,4,0,0,1,156,144Z"}))]]),$$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),Q$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M144,96a16,16,0,1,1,16,16A16,16,0,0,1,144,96Zm92-40V200a20,20,0,0,1-20,20H40a20,20,0,0,1-20-20V56A20,20,0,0,1,40,36H216A20,20,0,0,1,236,56ZM44,60v79.72l33.86-33.86a20,20,0,0,1,28.28,0L147.31,147l17.18-17.17a20,20,0,0,1,28.28,0L212,149.09V60Zm0,136H162.34L92,125.66l-48,48Zm168,0V183l-33.37-33.37L164.28,164l32,32Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,56V178.06l-39.72-39.72a8,8,0,0,0-11.31,0L147.31,164,97.66,114.34a8,8,0,0,0-11.32,0L32,168.69V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM156,88a12,12,0,1,1-12,12A12,12,0,0,1,156,88Zm60,112H40V160.69l46.34-46.35a8,8,0,0,1,11.32,0h0L165,181.66a8,8,0,0,0,11.32-11.32l-17.66-17.65L173,138.34a8,8,0,0,1,11.31,0L216,170.07V200Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM40,54H216a2,2,0,0,1,2,2V163.57L188.53,134.1a14,14,0,0,0-19.8,0l-21.42,21.42L101.9,110.1a14,14,0,0,0-19.8,0L38,154.2V56A2,2,0,0,1,40,54ZM38,200V171.17l52.58-52.58a2,2,0,0,1,2.84,0L176.83,202H40A2,2,0,0,1,38,200Zm178,2H193.8l-38-38,21.41-21.42a2,2,0,0,1,2.83,0l38,38V200A2,2,0,0,1,216,202ZM146,100a10,10,0,1,1,10,10A10,10,0,0,1,146,100Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,16V158.75l-26.07-26.06a16,16,0,0,0-22.63,0l-20,20-44-44a16,16,0,0,0-22.62,0L40,149.37V56ZM40,172l52-52,80,80H40Zm176,28H194.63l-36-36,20-20L216,181.38V200ZM144,100a12,12,0,1,1,12,12A12,12,0,0,1,144,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM40,52H216a4,4,0,0,1,4,4V168.4l-32.89-32.89a12,12,0,0,0-17,0l-22.83,22.83-46.82-46.83a12,12,0,0,0-17,0L36,159V56A4,4,0,0,1,40,52ZM36,200V170.34l53.17-53.17a4,4,0,0,1,5.66,0L181.66,204H40A4,4,0,0,1,36,200Zm180,4H193l-40-40,22.83-22.83a4,4,0,0,1,5.66,0L220,179.71V200A4,4,0,0,1,216,204ZM148,100a8,8,0,1,1,8,8A8,8,0,0,1,148,100Z"}))]]),P$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M96,240l16-80L48,136,160,16,144,96l64,24Z",opacity:"0.2"}),d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"}))]]),Z$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M211.45,52.51l-80-24A12,12,0,0,0,116,40V140.22A52,52,0,1,0,140,184V104.13l64.55,19.36A12,12,0,0,0,220,112V64A12,12,0,0,0,211.45,52.51ZM88,212a28,28,0,1,1,28-28A28,28,0,0,1,88,212ZM196,95.87l-56-16.8V56.13l56,16.8Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M128,184a40,40,0,1,1-40-40A40,40,0,0,1,128,184Z",opacity:"0.2"}),d.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M209.72,58.25l-80-24A6,6,0,0,0,122,40V153.05A46,46,0,1,0,134,184V96.06l72.28,21.69A6,6,0,0,0,214,112V64A6,6,0,0,0,209.72,58.25ZM88,218a34,34,0,1,1,34-34A34,34,0,0,1,88,218ZM202,103.94l-68-20.4V48.06l68,20.4Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M210.3,56.34l-80-24A8,8,0,0,0,120,40V148.26A48,48,0,1,0,136,184V98.75l69.7,20.91A8,8,0,0,0,216,112V64A8,8,0,0,0,210.3,56.34ZM88,216a32,32,0,1,1,32-32A32,32,0,0,1,88,216ZM200,101.25l-64-19.2V50.75L200,70Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M209.15,60.17l-80-24A4,4,0,0,0,124,40V158.75A44,44,0,1,0,132,184V93.38l74.85,22.45A4,4,0,0,0,212,112V64A4,4,0,0,0,209.15,60.17ZM88,220a36,36,0,1,1,36-36A36,36,0,0,1,88,220ZM204,106.62,132,85V45.38L204,67Z"}))]]),j$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M203.57,51A107.9,107.9,0,0,0,20,128c0,44.72,27.6,82.25,72,97.94A36,36,0,0,0,140,192a12,12,0,0,1,12-12h46.21a35.79,35.79,0,0,0,35.1-28A108.6,108.6,0,0,0,236,127.09,107.23,107.23,0,0,0,203.57,51Zm6.34,95.67a11.91,11.91,0,0,1-11.7,9.3H152a36,36,0,0,0-36,36,12,12,0,0,1-16,11.3c-16.65-5.88-30.65-15.76-40.48-28.56A76,76,0,0,1,44,128a84,84,0,0,1,83.13-84H128a84.35,84.35,0,0,1,84,83.29A84.72,84.72,0,0,1,209.91,146.71ZM144,76a16,16,0,1,1-16-16A16,16,0,0,1,144,76Zm-44,24A16,16,0,1,1,84,84,16,16,0,0,1,100,100Zm0,56a16,16,0,1,1-16-16A16,16,0,0,1,100,156Zm88-56a16,16,0,1,1-16-16A16,16,0,0,1,188,100Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,127.17a96.48,96.48,0,0,1-2.39,22.18A24,24,0,0,1,198.21,168H152a24,24,0,0,0-24,24,24,24,0,0,1-32,22.61C58.73,201.44,32,169.81,32,128a96,96,0,0,1,95-96C179.84,31.47,223.55,74.35,224,127.17Z",opacity:"0.2"}),d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89ZM84,168a12,12,0,1,1,12-12A12,12,0,0,1,84,168Zm0-56a12,12,0,1,1,12-12A12,12,0,0,1,84,112Zm44-24a12,12,0,1,1,12-12A12,12,0,0,1,128,88Zm44,24a12,12,0,1,1,12-12A12,12,0,0,1,172,112Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M199.37,55.31A101.32,101.32,0,0,0,128,26h-1A102,102,0,0,0,26,128c0,42.09,26.07,77.44,68,92.26A30.21,30.21,0,0,0,104.11,222,30.06,30.06,0,0,0,134,192a18,18,0,0,1,18-18h46.21a29.82,29.82,0,0,0,29.25-23.31A102.71,102.71,0,0,0,230,127.11,101.25,101.25,0,0,0,199.37,55.31ZM215.76,148a17.89,17.89,0,0,1-17.55,14H152a30,30,0,0,0-30,30,18,18,0,0,1-24,17C61,195.86,38,164.85,38,128a90,90,0,0,1,89.07-90H128a90.34,90.34,0,0,1,90,89.22A90.46,90.46,0,0,1,215.76,148ZM138,76a10,10,0,1,1-10-10A10,10,0,0,1,138,76ZM94,100A10,10,0,1,1,84,90,10,10,0,0,1,94,100Zm0,56a10,10,0,1,1-10-10A10,10,0,0,1,94,156Zm88-56a10,10,0,1,1-10-10A10,10,0,0,1,182,100Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M198,56.74A99.31,99.31,0,0,0,128,28h-1A100,100,0,0,0,28,128c0,41.22,25.55,75.85,66.69,90.38a28.34,28.34,0,0,0,9.42,1.63A28,28,0,0,0,132,192a20,20,0,0,1,20-20h46.21a27.84,27.84,0,0,0,27.3-21.76,100.37,100.37,0,0,0,2.49-23.1A99.26,99.26,0,0,0,198,56.74Zm19.74,91.72A19.89,19.89,0,0,1,198.21,164H152a28,28,0,0,0-28,28,20,20,0,0,1-26.64,18.83C59.51,197.46,36,165.72,36,128a92,92,0,0,1,91.05-92H128a92,92,0,0,1,89.72,112.46ZM136,76a8,8,0,1,1-8-8A8,8,0,0,1,136,76ZM92,100a8,8,0,1,1-8-8A8,8,0,0,1,92,100Zm0,56a8,8,0,1,1-8-8A8,8,0,0,1,92,156Zm88-56a8,8,0,1,1-8-8A8,8,0,0,1,180,100Z"}))]]),R$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),N$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),V$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28Zm-4,176H52V52H204Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,48V208a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34Zm2,174a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32Zm0,176H48V48H208V208Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36Zm4,172a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"}))]]),L$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M234.36,170A12,12,0,0,1,230,186.37l-96,56a12,12,0,0,1-12.1,0l-96-56a12,12,0,0,1,12.09-20.74l90,52.48L218,165.63A12,12,0,0,1,234.36,170ZM218,117.63,128,170.11,38.05,117.63A12,12,0,0,0,26,138.37l96,56a12,12,0,0,0,12.1,0l96-56A12,12,0,0,0,218,117.63ZM20,80a12,12,0,0,1,6-10.37l96-56a12.06,12.06,0,0,1,12.1,0l96,56a12,12,0,0,1,0,20.74l-96,56a12,12,0,0,1-12.1,0l-96-56A12,12,0,0,1,20,80Zm35.82,0L128,122.11,200.18,80,128,37.89Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),d.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M220,169.09l-92,53.65L36,169.09A8,8,0,0,0,28,182.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,169.09Z"}),d.createElement("path",{d:"M220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09Z"}),d.createElement("path",{d:"M28,86.91l96,56a8,8,0,0,0,8.06,0l96-56a8,8,0,0,0,0-13.82l-96-56a8,8,0,0,0-8.06,0l-96,56a8,8,0,0,0,0,13.82Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M229.18,173a6,6,0,0,1-2.16,8.2l-96,56a6,6,0,0,1-6,0l-96-56a6,6,0,0,1,6-10.36l93,54.23,93-54.23A6,6,0,0,1,229.18,173ZM221,122.82l-93,54.23L35,122.82a6,6,0,0,0-6,10.36l96,56a6,6,0,0,0,6,0l96-56a6,6,0,0,0-6-10.36ZM26,80a6,6,0,0,1,3-5.18l96-56a6,6,0,0,1,6,0l96,56a6,6,0,0,1,0,10.36l-96,56a6,6,0,0,1-6,0l-96-56A6,6,0,0,1,26,80Zm17.91,0L128,129.05,212.09,80,128,31Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M230.91,172A8,8,0,0,1,228,182.91l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,36,169.09l92,53.65,92-53.65A8,8,0,0,1,230.91,172ZM220,121.09l-92,53.65L36,121.09A8,8,0,0,0,28,134.91l96,56a8,8,0,0,0,8.06,0l96-56A8,8,0,1,0,220,121.09ZM24,80a8,8,0,0,1,4-6.91l96-56a8,8,0,0,1,8.06,0l96,56a8,8,0,0,1,0,13.82l-96,56a8,8,0,0,1-8.06,0l-96-56A8,8,0,0,1,24,80Zm23.88,0L128,126.74,208.12,80,128,33.26Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M227.45,174a4,4,0,0,1-1.44,5.48l-96,56a4,4,0,0,1-4,0l-96-56a4,4,0,0,1,4-6.92l94,54.83,94-54.83A4,4,0,0,1,227.45,174ZM222,124.54l-94,54.83L34,124.54a4,4,0,0,0-4,6.92l96,56a4,4,0,0,0,4,0l96-56a4,4,0,0,0-4-6.92ZM28,80a4,4,0,0,1,2-3.46l96-56a4,4,0,0,1,4,0l96,56a4,4,0,0,1,0,6.92l-96,56a4,4,0,0,1-4,0l-96-56A4,4,0,0,1,28,80Zm11.94,0L128,131.37,216.06,80,128,28.63Z"}))]]),_$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M90.86,50.89a12,12,0,0,0-21.72,0l-64,136a12,12,0,0,0,21.71,10.22L42.44,164h75.12l15.58,33.11a12,12,0,0,0,21.72-10.22ZM53.74,140,80,84.18,106.27,140ZM200,84c-13.85,0-24.77,3.86-32.45,11.48a12,12,0,1,0,16.9,17c3-3,8.26-4.52,15.55-4.52,11,0,20,7.18,20,16v4.39A47.28,47.28,0,0,0,200,124c-24.26,0-44,17.94-44,40s19.74,40,44,40a47.18,47.18,0,0,0,22-5.38A12,12,0,0,0,244,192V124C244,101.94,224.26,84,200,84Zm0,96c-11,0-20-7.18-20-16s9-16,20-16,20,7.18,20,16S211,180,200,180Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M232,164c0,15.46-14.33,28-32,28s-32-12.54-32-28,14.33-28,32-28S232,148.54,232,164ZM34.82,152h90.36L80,56Z",opacity:"0.2"}),d.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,156c0,6.5-7.33,12-16,12s-16-5.5-16-12,7.33-12,16-12S200,149.5,200,156ZM232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56ZM143.37,172.88l-44-104a8,8,0,0,0-14.74,0l-44,104a8,8,0,0,0,14.74,6.24L66.84,152h50.32l11.47,27.12a8,8,0,0,0,14.74-6.24ZM216,124c0-15.44-14.36-28-32-28a34.86,34.86,0,0,0-20.78,6.68,8,8,0,0,0,9.56,12.83A18.84,18.84,0,0,1,184,112c8.56,0,15.8,5.36,16,11.76v8A35.24,35.24,0,0,0,184,128c-17.64,0-32,12.56-32,28s14.36,28,32,28a35.13,35.13,0,0,0,16.93-4.26A8,8,0,0,0,216,176ZM73.61,136h36.78L92,92.53Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M85.43,53.45a6,6,0,0,0-10.86,0l-64,136a6,6,0,1,0,10.86,5.11L38.63,158h82.74l17.2,36.55a6,6,0,1,0,10.86-5.11ZM44.28,146,80,70.09,115.72,146ZM200,98c-12.21,0-21.71,3.28-28.23,9.74a6,6,0,0,0,8.46,8.52c4.18-4.15,10.84-6.26,19.77-6.26,14.34,0,26,9.87,26,22v7.24A40.36,40.36,0,0,0,200,130c-20.95,0-38,15.25-38,34s17.05,34,38,34a40.36,40.36,0,0,0,26-9.24V192a6,6,0,0,0,12,0V132C238,113.25,221,98,200,98Zm0,88c-14.34,0-26-9.87-26-22s11.66-22,26-22,26,9.87,26,22S214.34,186,200,186Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M87.24,52.59a8,8,0,0,0-14.48,0l-64,136a8,8,0,1,0,14.48,6.81L39.9,160h80.2l16.66,35.4a8,8,0,1,0,14.48-6.81ZM47.43,144,80,74.79,112.57,144ZM200,96c-12.76,0-22.73,3.47-29.63,10.32a8,8,0,0,0,11.26,11.36c3.8-3.77,10-5.68,18.37-5.68,13.23,0,24,9,24,20v3.22A42.76,42.76,0,0,0,200,128c-22.06,0-40,16.15-40,36s17.94,36,40,36a42.73,42.73,0,0,0,24-7.25,8,8,0,0,0,16-.75V132C240,112.15,222.06,96,200,96Zm0,88c-13.23,0-24-9-24-20s10.77-20,24-20,24,9,24,20S213.23,184,200,184Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M83.62,54.3a4,4,0,0,0-7.24,0l-64,136a4,4,0,0,0,7.24,3.4L37.36,156h85.28l17.74,37.7a4,4,0,1,0,7.24-3.4ZM41.13,148,80,65.39,118.87,148ZM200,100c-11.67,0-20.69,3.08-26.82,9.16a4,4,0,1,0,5.64,5.68c4.57-4.54,11.7-6.84,21.18-6.84,15.44,0,28,10.77,28,24v11.92A37.78,37.78,0,0,0,200,132c-19.85,0-36,14.35-36,32s16.15,32,36,32a37.78,37.78,0,0,0,28-11.92V192a4,4,0,0,0,8,0V132C236,114.36,219.85,100,200,100Zm0,88c-15.44,0-28-10.77-28-24s12.56-24,28-24,28,10.77,28,24S215.44,188,200,188Z"}))]]),D$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M212,56V88a12,12,0,0,1-24,0V68H140V188h20a12,12,0,0,1,0,24H96a12,12,0,0,1,0-24h20V68H68V88a12,12,0,0,1-24,0V56A12,12,0,0,1,56,44H200A12,12,0,0,1,212,56Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V184a16,16,0,0,1-16,16H72a16,16,0,0,1-16-16V56Z",opacity:"0.2"}),d.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,96a8,8,0,0,1-16,0V88H136v88h12a8,8,0,0,1,0,16H108a8,8,0,0,1,0-16h12V88H88v8a8,8,0,0,1-16,0V80a8,8,0,0,1,8-8h96a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M206,56V88a6,6,0,0,1-12,0V62H134V194h26a6,6,0,0,1,0,12H96a6,6,0,0,1,0-12h26V62H62V88a6,6,0,0,1-12,0V56a6,6,0,0,1,6-6H200A6,6,0,0,1,206,56Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,56V88a8,8,0,0,1-16,0V64H136V192h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V64H64V88a8,8,0,0,1-16,0V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204,56V88a4,4,0,0,1-8,0V60H132V196h28a4,4,0,0,1,0,8H96a4,4,0,0,1,0-8h28V60H60V88a4,4,0,0,1-8,0V56a4,4,0,0,1,4-4H200A4,4,0,0,1,204,56Z"}))]]),H$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),X$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z",opacity:"0.2"}),d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"}))]]),z$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M60,96v64a12,12,0,0,1-24,0V96a12,12,0,0,1,24,0ZM88,20A12,12,0,0,0,76,32V224a12,12,0,0,0,24,0V32A12,12,0,0,0,88,20Zm40,32a12,12,0,0,0-12,12V192a12,12,0,0,0,24,0V64A12,12,0,0,0,128,52Zm40,32a12,12,0,0,0-12,12v64a12,12,0,0,0,24,0V96A12,12,0,0,0,168,84Zm40-16a12,12,0,0,0-12,12v96a12,12,0,0,0,24,0V80A12,12,0,0,0,208,68Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),d.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM72,152a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,32a8,8,0,0,1-16,0V72a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V88a8,8,0,0,1,16,0Zm32-16a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm32,8a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M54,96v64a6,6,0,0,1-12,0V96a6,6,0,0,1,12,0ZM88,26a6,6,0,0,0-6,6V224a6,6,0,0,0,12,0V32A6,6,0,0,0,88,26Zm40,32a6,6,0,0,0-6,6V192a6,6,0,0,0,12,0V64A6,6,0,0,0,128,58Zm40,32a6,6,0,0,0-6,6v64a6,6,0,0,0,12,0V96A6,6,0,0,0,168,90Zm40-16a6,6,0,0,0-6,6v96a6,6,0,0,0,12,0V80A6,6,0,0,0,208,74Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M56,96v64a8,8,0,0,1-16,0V96a8,8,0,0,1,16,0ZM88,24a8,8,0,0,0-8,8V224a8,8,0,0,0,16,0V32A8,8,0,0,0,88,24Zm40,32a8,8,0,0,0-8,8V192a8,8,0,0,0,16,0V64A8,8,0,0,0,128,56Zm40,32a8,8,0,0,0-8,8v64a8,8,0,0,0,16,0V96A8,8,0,0,0,168,88Zm40-16a8,8,0,0,0-8,8v96a8,8,0,0,0,16,0V80A8,8,0,0,0,208,72Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M52,96v64a4,4,0,0,1-8,0V96a4,4,0,0,1,8,0ZM88,28a4,4,0,0,0-4,4V224a4,4,0,0,0,8,0V32A4,4,0,0,0,88,28Zm40,32a4,4,0,0,0-4,4V192a4,4,0,0,0,8,0V64A4,4,0,0,0,128,60Zm40,32a4,4,0,0,0-4,4v64a4,4,0,0,0,8,0V96A4,4,0,0,0,168,92Zm40-16a4,4,0,0,0-4,4v96a4,4,0,0,0,8,0V80A4,4,0,0,0,208,76Z"}))]]),F$=new Map([["bold",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",d.createElement(d.Fragment,null,d.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",d.createElement(d.Fragment,null,d.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",d.createElement(d.Fragment,null,d.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",d.createElement(d.Fragment,null,d.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",d.createElement(d.Fragment,null,d.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Y$=d.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),je=d.forwardRef((t,e)=>{const{alt:n,color:r,size:i,weight:l,mirrored:o,children:c,weights:f,...m}=t,{color:p="currentColor",size:O,weight:y="regular",mirrored:b=!1,...S}=d.useContext(Y$);return d.createElement("svg",{ref:e,xmlns:"http://www.w3.org/2000/svg",width:i??O,height:i??O,fill:r??p,viewBox:"0 0 256 256",transform:o||b?"scale(-1, 1)":void 0,...S,...m},!!n&&d.createElement("title",null,n),c,f.get(l??y))});je.displayName="IconBase";const Zv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:KE}));Zv.displayName="ArrowClockwiseIcon";const B$=Zv,jv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:JE}));jv.displayName="ArrowCounterClockwiseIcon";const q$=jv,Rv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:e$}));Rv.displayName="ArrowLeftIcon";const I$=Rv,Nv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:t$}));Nv.displayName="ArrowsOutCardinalIcon";const U$=Nv,Vv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:n$}));Vv.displayName="CameraIcon";const W$=Vv,Lv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:r$}));Lv.displayName="CaretDownIcon";const G$=Lv,q1=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:i$}));q1.displayName="CaretRightIcon";const _v=q1,Dv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:a$}));Dv.displayName="ChatCenteredTextIcon";const K$=Dv,Hv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:l$}));Hv.displayName="CheckIcon";const J$=Hv,Xv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:s$}));Xv.displayName="CheckCircleIcon";const zv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:o$}));zv.displayName="ClipboardTextIcon";const eQ=zv,Fv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:c$}));Fv.displayName="ClockIcon";const tQ=Fv,Yv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:u$}));Yv.displayName="CopyIcon";const nQ=Yv,Bv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:f$}));Bv.displayName="EyeIcon";const rQ=Bv,qv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:d$}));qv.displayName="FileIcon";const iQ=qv,Iv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:h$}));Iv.displayName="FileCodeIcon";const aQ=Iv,Uv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:m$}));Uv.displayName="FileCssIcon";const lQ=Uv,Wv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:p$}));Wv.displayName="FileHtmlIcon";const sQ=Wv,Gv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:g$}));Gv.displayName="FileJpgIcon";const oQ=Gv,Kv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:O$}));Kv.displayName="FileJsIcon";const cQ=Kv,Jv=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:x$}));Jv.displayName="FileJsxIcon";const uQ=Jv,eS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:y$}));eS.displayName="FileMdIcon";const fQ=eS,tS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:b$}));tS.displayName="FilePlusIcon";const x3=tS,nS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:v$}));nS.displayName="FilePngIcon";const dQ=nS,rS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:S$}));rS.displayName="FileSvgIcon";const hQ=rS,iS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:w$}));iS.displayName="FileTsIcon";const mQ=iS,aS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:A$}));aS.displayName="FileTsxIcon";const pQ=aS,lS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:k$}));lS.displayName="FileTxtIcon";const gQ=lS,sS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:M$}));sS.displayName="FileVideoIcon";const OQ=sS,oS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:T$}));oS.displayName="FilmStripIcon";const xQ=oS,cS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:C$}));cS.displayName="FolderSimpleIcon";const yQ=cS,uS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:E$}));uS.displayName="FolderSimplePlusIcon";const fS=uS,dS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:$$}));dS.displayName="GearIcon";const bQ=dS,hS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:Q$}));hS.displayName="ImageIcon";const vQ=hS,mS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:P$}));mS.displayName="LightningIcon";const SQ=mS,pS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:Z$}));pS.displayName="MusicNoteIcon";const wQ=pS,gS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:j$}));gS.displayName="PaletteIcon";const AQ=gS,OS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:R$}));OS.displayName="PencilSimpleIcon";const kQ=OS,xS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:N$}));xS.displayName="PlusIcon";const yS=xS,bS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:V$}));bS.displayName="SquareIcon";const MQ=bS,vS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:L$}));vS.displayName="StackIcon";const TQ=vS,SS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:_$}));SS.displayName="TextAaIcon";const CQ=SS,wS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:D$}));wS.displayName="TextTIcon";const EQ=wS,AS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:H$}));AS.displayName="TrashIcon";const $Q=AS,j1=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:X$}));j1.displayName="WarningIcon";const kS=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:z$}));kS.displayName="WaveformIcon";const QQ=kS,Sg=d.forwardRef((t,e)=>d.createElement(je,{ref:e,...t,weights:F$}));Sg.displayName="XIcon";const PQ=Sg;function y3({findings:t,projectId:e,onClose:n}){const r=t.filter(m=>m.severity==="error"),i=t.filter(m=>m.severity==="warning"),l=t.length>0,[o,c]=d.useState(!1),f=async()=>{const m=t.map(y=>{let b=`[${y.severity}] ${y.message}`;return y.file&&(b+=`
|
|
68
|
-
File: ${y.file}`),y.fixHint&&(b+=`
|
|
69
|
-
Fix: ${y.fixHint}`),b}),p=`Fix these HyperFrames lint issues for project "${e}":
|
|
70
|
-
|
|
71
|
-
Project path: ${window.location.href}
|
|
72
|
-
|
|
73
|
-
${m.join(`
|
|
74
|
-
|
|
75
|
-
`)}`;await Kc(p)&&(c(!0),setTimeout(()=>c(!1),2e3))};return g.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:n,children:g.jsxs("div",{className:"bg-neutral-950 border border-neutral-800 rounded-xl shadow-2xl w-full max-w-xl max-h-[80vh] flex flex-col overflow-hidden",onClick:m=>m.stopPropagation(),children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-neutral-800",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[l?g.jsx("div",{className:"w-8 h-8 rounded-full bg-red-500/10 flex items-center justify-center",children:g.jsx(j1,{size:18,className:"text-red-400",weight:"fill"})}):g.jsx("div",{className:"w-8 h-8 rounded-full bg-studio-accent/10 flex items-center justify-center",children:g.jsx(Xv,{size:18,className:"text-studio-accent",weight:"fill"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-neutral-200",children:l?`${r.length} error${r.length!==1?"s":""}, ${i.length} warning${i.length!==1?"s":""}`:"All checks passed"}),g.jsx("p",{className:"text-xs text-neutral-500",children:"HyperFrame Lint Results"})]})]}),g.jsx("button",{onClick:n,className:"p-1.5 rounded-lg text-neutral-500 hover:text-neutral-200 hover:bg-neutral-800 transition-colors",children:g.jsx(Sg,{size:16})})]}),l&&g.jsx("div",{className:"flex items-center justify-end px-5 py-2 border-b border-neutral-800/50",children:g.jsx("button",{onClick:f,className:`px-3 py-1 text-xs font-medium rounded-lg transition-colors ${o?"bg-green-600 text-white":"bg-studio-accent hover:bg-studio-accent/80 text-white"}`,children:o?"Copied!":"Copy to Agent"})}),g.jsxs("div",{className:"flex-1 overflow-y-auto px-5 py-3",children:[!l&&g.jsx("div",{className:"py-8 text-center text-neutral-500 text-sm",children:"No errors or warnings found. Your composition looks good!"}),r.map((m,p)=>g.jsx("div",{className:"py-3 border-b border-neutral-800/50 last:border-0",children:g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx(j1,{size:14,className:"text-red-400 flex-shrink-0 mt-0.5",weight:"fill"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm text-neutral-200",children:m.message}),m.file&&g.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:m.file}),m.fixHint&&g.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[g.jsx(q1,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),g.jsx("p",{className:"text-xs text-studio-accent",children:m.fixHint})]})]})]})},`e-${p}`)),i.map((m,p)=>g.jsx("div",{className:"py-3 border-b border-neutral-800/50 last:border-0",children:g.jsxs("div",{className:"flex items-start gap-2",children:[g.jsx(j1,{size:14,className:"text-amber-400 flex-shrink-0 mt-0.5"}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("p",{className:"text-sm text-neutral-300",children:m.message}),m.file&&g.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:m.file}),m.fixHint&&g.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[g.jsx(q1,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),g.jsx("p",{className:"text-xs text-studio-accent",children:m.fixHint})]})]})]})},`w-${p}`))]})]})})}function ZQ(t){const e=[];let n=0;for(const r of t.groupOrder){const i=t.groups.get(r);if(i)for(const l of i.segmentIds){const o=t.segments.get(l);if(o&&Object.keys(o.style).length>0){const c={wordIndex:n};o.wordId&&(c.wordId=o.wordId);const f=o.style;f.x!==void 0&&(c.x=f.x),f.y!==void 0&&(c.y=f.y),f.scaleX!==void 0&&(c.scale=f.scaleX),f.rotation!==void 0&&(c.rotation=f.rotation),f.activeColor!==void 0&&(c.activeColor=f.activeColor),f.dimColor!==void 0&&(c.dimColor=f.dimColor),f.opacity!==void 0&&(c.opacity=f.opacity),f.fontSize!==void 0&&(c.fontSize=f.fontSize),f.fontWeight!==void 0&&(c.fontWeight=f.fontWeight),f.fontFamily!==void 0&&(c.fontFamily=f.fontFamily),e.push(c)}n++}}return e}function jQ(t){const e=d.useRef(t);e.current=t;const n=d.useRef(null),r=d.useRef(!1),i=d.useCallback(()=>{const o=at.getState();if(!o.model||!o.sourceFilePath||!o.isEditMode)return;const c=e.current;if(!c)return;const f=ZQ(o.model);fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:JSON.stringify(f,null,2)}).catch(m=>console.warn("[captions] auto-save failed:",m))},[]);Qt(()=>{let o=at.getState().model;const c=at.subscribe(f=>{if(!(!f.isEditMode||f.model===o||!f.model)){if(o=f.model,r.current){r.current=!1;return}n.current&&clearTimeout(n.current),n.current=setTimeout(i,800)}});return()=>{c(),n.current&&clearTimeout(n.current)}});const l=d.useCallback(async()=>{const o=at.getState();if(!o.model||!o.sourceFilePath)return;const c=e.current;if(c)try{const f=await fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`);if(!f.ok)return;const m=await f.json();if(!m.content)return;const p=JSON.parse(m.content);if(!Array.isArray(p))return;const O=o.model,y=[],b=new Map;for(const w of O.groupOrder){const A=O.groups.get(w);if(A)for(const k of A.segmentIds){y.push(k);const $=O.segments.get(k);$!=null&&$.wordId&&b.set($.wordId,k)}}const S=new Map(O.segments);for(const w of p){const A=(w.wordId?b.get(w.wordId):void 0)??y[w.wordIndex];if(!A)continue;const k=S.get(A);if(!k)continue;const $={...k.style};w.x!==void 0&&($.x=w.x),w.y!==void 0&&($.y=w.y),w.scale!==void 0&&($.scaleX=w.scale,$.scaleY=w.scale),w.rotation!==void 0&&($.rotation=w.rotation),w.activeColor!==void 0&&($.activeColor=w.activeColor),w.dimColor!==void 0&&($.dimColor=w.dimColor),w.opacity!==void 0&&($.opacity=w.opacity),w.fontSize!==void 0&&($.fontSize=w.fontSize),w.fontWeight!==void 0&&($.fontWeight=w.fontWeight),w.fontFamily!==void 0&&($.fontFamily=w.fontFamily),S.set(A,{...k,style:$})}r.current=!0,at.getState().setModel({...O,segments:S})}catch{}},[]);return{save:i,loadOverrides:l}}const RQ=100,NQ=1500;function Wm(t){let e=2166136261;for(let n=0;n<t.length;n+=1)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(16).padStart(8,"0")}function Gm(t){return{version:1,updatedAt:0,undo:[],redo:[]}}function VQ(t){const e={};for(const[n,r]of Object.entries(t.files))r.before!==r.after&&(e[n]={before:r.before,after:r.after,beforeHash:Wm(r.before),afterHash:Wm(r.after)});return{id:t.id,projectId:t.projectId,label:t.label,kind:t.kind??"manual",coalesceKey:t.coalesceKey,createdAt:t.now,files:e}}function LQ(t,e,n){if(Object.keys(e.files).length===0)return t;const r=NQ,i=RQ,l=t.undo[t.undo.length-1];let o=t.undo;if(l&&l.coalesceKey&&l.coalesceKey===e.coalesceKey&&e.createdAt-l.createdAt<=r){const c={};for(const[f,m]of Object.entries(e.files)){const p=l.files[f];c[f]=p?{before:p.before,after:m.after,beforeHash:p.beforeHash,afterHash:m.afterHash}:m}o=[...t.undo.slice(0,-1),{...e,files:c}]}else o=[...t.undo,e];return{version:1,updatedAt:e.createdAt,undo:o.slice(Math.max(0,o.length-i)),redo:[]}}function MS(t,e,n){for(const[r,i]of Object.entries(t.files)){const l=e==="undo"?i.afterHash:i.beforeHash;if(n[r]!==l)return{ok:!1,reason:"content-mismatch",path:r}}return{ok:!0}}function _Q(t,e,n){const r=t.undo[t.undo.length-1];if(!r)return{ok:!1,reason:"empty",state:t,filesToWrite:{}};const i=MS(r,"undo",e);return i.ok?{ok:!0,entry:r,filesToWrite:Object.fromEntries(Object.entries(r.files).map(([l,o])=>[l,o.before])),state:{version:1,updatedAt:n,undo:t.undo.slice(0,-1),redo:[...t.redo,r]}}:{ok:!1,reason:i.reason,path:i.path,state:t,filesToWrite:{}}}function DQ(t,e,n){const r=t.redo[t.redo.length-1];if(!r)return{ok:!1,reason:"empty",state:t,filesToWrite:{}};const i=MS(r,"redo",e);return i.ok?{ok:!0,entry:r,filesToWrite:Object.fromEntries(Object.entries(r.files).map(([l,o])=>[l,o.after])),state:{version:1,updatedAt:n,undo:[...t.undo,r],redo:t.redo.slice(0,-1)}}:{ok:!1,reason:i.reason,path:i.path,state:t,filesToWrite:{}}}const HQ="hyperframes-studio-edit-history",XQ=1,I1="project-history";function zQ(){return new Promise((t,e)=>{if(!globalThis.indexedDB){e(new Error("IndexedDB is not available"));return}const n=globalThis.indexedDB.open(HQ,XQ);n.onupgradeneeded=()=>{const r=n.result;r.objectStoreNames.contains(I1)||r.createObjectStore(I1)},n.onerror=()=>e(n.error??new Error("Failed to open edit history db")),n.onsuccess=()=>t(n.result)})}function M2(t,e){return zQ().then(n=>new Promise((r,i)=>{const l=n.transaction(I1,t),o=e(l.objectStore(I1));o.onerror=()=>i(o.error??new Error("IndexedDB request failed")),o.onsuccess=()=>r(o.result),l.oncomplete=()=>n.close(),l.onerror=()=>{n.close(),i(l.error??new Error("IndexedDB transaction failed"))}}))}function FQ(){return{async get(t){return await M2("readonly",e=>e.get(t))??null},async set(t,e){await M2("readwrite",n=>n.put(e,t))},async delete(t){await M2("readwrite",e=>e.delete(t))}}}async function YQ(t,e){return await t.get(e)??Gm()}async function BQ(t,e,n){await t.set(e,n)}function qQ(t){return`edit-${t.toString(36)}-${Math.random().toString(36).slice(2,10)}`}function TS(t){const e=t.undo[t.undo.length-1]??null,n=t.redo[t.redo.length-1]??null;return{canUndo:!!e,canRedo:!!n,undoLabel:(e==null?void 0:e.label)??null,redoLabel:(n==null?void 0:n.label)??null,undoPaths:e?Object.keys(e.files):[],redoPaths:n?Object.keys(n.files):[],state:t}}async function b3(t,e){const n={},r={};for(const i of t){const l=await e(i);n[i]=l,r[i]=Wm(l)}return{currentFiles:n,currentHashes:r}}async function v3({files:t,rollbackFiles:e,writeFile:n}){const r=[];try{for(const[i,l]of Object.entries(t))await n(i,l),r.push(i)}catch(i){try{for(const l of r.reverse())await n(l,e[l])}catch(l){throw new AggregateError([i,l],"Failed to apply edit history and rollback did not complete")}throw i}}function S3({projectId:t,storage:e,initialState:n,now:r=Date.now,onChange:i}){let l=n,o=Promise.resolve();const c=async m=>{l=m,i(m);try{await BQ(e,t,m)}catch{}},f=async m=>{const p=o.then(async()=>{const{state:O,result:y}=await m(l);return O!==l&&await c(O),y});return o=p.then(()=>{},()=>{}),p};return{snapshot:()=>TS(l),async recordEdit(m){await f(async p=>{const O=r(),y=VQ({...m,id:qQ(O),projectId:t,now:O});return{state:LQ(p,y),result:void 0}})},async undo(m){return f(async p=>{const O=p.undo[p.undo.length-1];if(!O)return{state:p,result:{ok:!1,reason:"empty"}};const{currentFiles:y,currentHashes:b}=await b3(Object.keys(O.files),m.readFile),S=_Q(p,b,r());return S.ok?(await v3({files:S.filesToWrite,rollbackFiles:y,writeFile:m.writeFile}),{state:S.state,result:{ok:!0,label:S.entry.label,paths:Object.keys(S.entry.files)}}):{state:p,result:{ok:!1,reason:S.reason}}})},async redo(m){return f(async p=>{const O=p.redo[p.redo.length-1];if(!O)return{state:p,result:{ok:!1,reason:"empty"}};const{currentFiles:y,currentHashes:b}=await b3(Object.keys(O.files),m.readFile),S=DQ(p,b,r());return S.ok?(await v3({files:S.filesToWrite,rollbackFiles:y,writeFile:m.writeFile}),{state:S.state,result:{ok:!0,label:S.entry.label,paths:Object.keys(S.entry.files)}}):{state:p,result:{ok:!1,reason:S.reason}}})}}}function IQ(t){const e=d.useMemo(()=>t.storage??FQ(),[t.storage]),n=t.now??Date.now,[r,i]=d.useState(()=>Gm()),[l,o]=d.useState(!1),c=t.projectId,f=d.useRef(null);d.useEffect(()=>{let y=!1;const b=Gm();if(f.current=null,i(b),o(!1),!c){o(!0);return}return YQ(e,c).then(S=>{y||(f.current=S3({projectId:c,storage:e,initialState:S,now:n,onChange:i}),i(S))}).catch(()=>{y||(f.current=S3({projectId:c,storage:e,initialState:b,now:n,onChange:i}),i(b))}).finally(()=>{y||o(!0)}),()=>{y=!0}},[n,c,e]);const m=d.useCallback(async y=>{var b;await((b=f.current)==null?void 0:b.recordEdit(y))},[]),p=d.useCallback(async y=>{var b;return((b=f.current)==null?void 0:b.undo(y))??{ok:!1,reason:"empty"}},[]),O=d.useCallback(async y=>{var b;return((b=f.current)==null?void 0:b.redo(y))??{ok:!1,reason:"empty"}},[]);return{loaded:l,...TS(r),recordEdit:m,undo:p,redo:O}}function UQ(t){const[e,n]=d.useState(240),[r,i]=d.useState(400),[l,o]=d.useState(()=>Uc().leftCollapsed??!1),[c,f]=d.useState((t==null?void 0:t.rightCollapsed)??!0),[m,p]=d.useState((t==null?void 0:t.rightPanelTab)??"renders"),O=d.useRef(null),y=d.useCallback(()=>{o(k=>(Wc({leftCollapsed:!k}),Nt("panel_toggle",{panel:"left_sidebar",collapsed:!k}),!k))},[]),b=d.useCallback((k,$)=>{$.preventDefault(),$.target.setPointerCapture($.pointerId),O.current={side:k,startX:$.clientX,startW:k==="left"?e:r}},[e,r]),S=d.useCallback(k=>{const $=O.current;if(!$)return;const Q=k.clientX-$.startX,C=Math.floor(window.innerWidth*.5),M=Math.max(160,Math.min($.side==="left"?C:600,$.startW+($.side==="left"?Q:-Q)));$.side==="left"?n(M):i(M)},[]),w=d.useCallback(()=>{O.current=null},[]),A=d.useCallback(k=>{p(k),Nt("tab_switch",{panel:"right_panel",tab:k})},[p]);return{leftWidth:e,setLeftWidth:n,rightWidth:r,leftCollapsed:l,setLeftCollapsed:o,rightCollapsed:c,setRightCollapsed:f,rightPanelTab:m,setRightPanelTab:A,toggleLeftSidebar:y,handlePanelResizeStart:b,handlePanelResizeMove:S,handlePanelResizeEnd:w}}const WQ=/\.(eot|otf|ttc|ttf|woff2?)$/i,w3=/\s+(thin|extralight|extra light|light|regular|roman|medium|semibold|semi bold|bold|extrabold|extra bold|black|italic|oblique|variable)$/i;function A3(t){return JSON.stringify(t)}function ao(t){const e=decodeURIComponent(t.split(/[\\/]/).pop()??t).replace(WQ,"");let n=e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim();for(;w3.test(n);)n=n.replace(w3,"").trim();return n||e}function wg(t,e=t.url){return`@font-face { font-family: ${A3(t.family)}; src: url(${A3(e)}); font-display: swap; }`}async function Tl({label:t,kind:e,coalesceKey:n,files:r,readFile:i,writeFile:l,recordEdit:o}){const c={};for(const[p,O]of Object.entries(r)){const y=await i(p);y!==O&&(c[p]={before:y,after:O})}const f=Object.keys(c);if(f.length===0)return[];const m=[];try{for(const p of f)await l(p,c[p].after),m.push(p);await o({label:t,kind:e,coalesceKey:n,files:c})}catch(p){try{for(const O of m.reverse())await l(O,c[O].before)}catch(O){throw new AggregateError([p,O],"Failed to save project files and rollback did not complete")}throw p}return f}function Pn(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function k3(t,e){return e==='"'?t.replace(/"/g,"""):t.replace(/'/g,"'")}function Ag(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function GQ(t){return t.replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")}function KQ(t){const e=[];let n="",r=null,i=!1,l=0;for(const o of t){if(i){n+=o,o===";"&&(i=!1);continue}if(o==="&"){i=!0,n+=o;continue}if(r){n+=o,o===r&&(r=null);continue}if(o==='"'||o==="'"){r=o,n+=o;continue}if(o==="("){l+=1,n+=o;continue}if(o===")"){l=Math.max(0,l-1),n+=o;continue}if(o===";"&&l===0){e.push(n),n="";continue}n+=o}return n&&e.push(n),e}function JQ(t,e,n,r){const l=new RegExp(`(<[^>]*\\bid=(["'])${Pn(e)}\\2[^>]*)>`,"i").exec(t);if(!l)return t;const o=l[1];return CS(t,o,n,r)}function CS(t,e,n,r){if(!e)return t;const i=/\bstyle=(["'])([\s\S]*?)\1/.exec(e);if(i){const l=i[2],o=i[1],c=new Map;for(const p of KQ(l)){const O=p.indexOf(":");if(O<0)continue;const y=p.slice(0,O).trim(),b=p.slice(O+1).trim();y&&c.set(y,b)}r===null?c.delete(n):c.set(n,r);const f=Array.from(c.entries()).map(([p,O])=>`${p}: ${k3(O,o)}`).join("; "),m=e.replace(i[0],`style=${o}${f}${o}`);return t.replace(e,m)}else{if(r===null)return t;const l=/\s*\/$/.test(e),c=`${l?e.replace(/\s*\/$/,""):e} style="${n}: ${k3(r,'"')}"${l?" /":""}`;return t.replace(e,c)}}function eP(t,e,n,r){const i=za(t,e);if(!i)return t;const l=CS(i.tag,i.tag,n,r);return Nc(t,i,l)}function Nc(t,e,n){return`${t.slice(0,e.start)}${n}${t.slice(e.end)}`}function za(t,e){if(e.id){const l=new RegExp(`(<[^>]*\\bid=(["'])${Pn(e.id)}\\2[^>]*)>`,"i").exec(t);if((l==null?void 0:l.index)!=null)return{tag:l[1],start:l.index,end:l.index+l[1].length}}if(!e.selector)return null;const n=e.selector.match(/^\[data-composition-id="([^"]+)"\]$/);if(n){const i=n[1],o=new RegExp(`(<[^>]*\\bdata-composition-id=(["'])${Pn(i)}\\2[^>]*)>`,"i").exec(t);if((o==null?void 0:o.index)!=null)return{tag:o[1],start:o.index,end:o.index+o[1].length}}const r=e.selector.match(/^\.([a-zA-Z0-9_-]+)$/);if(r){const i=r[1],l=new RegExp(`(<[^>]*\\bclass=(["'])[^"']*\\b${Pn(i)}\\b[^"']*\\2[^>]*)>`,"gi"),o=e.selectorIndex??0;let c,f=0;for(;(c=l.exec(t))!==null;){if(f===o&&c.index!=null)return{tag:c[1],start:c.index,end:c.index+c[1].length};f+=1}}return null}function M3(t,e,n){const r=za(t,e);if(!r)return;const i=n.startsWith("data-")?n:`data-${n}`,l=new RegExp(`\\b${i}=(["'])([^"']*)\\1`).exec(r.tag);return(l==null?void 0:l[2])!=null?GQ(l[2]):void 0}function tP(t,e){const n=za(t,e);return n==null?void 0:n.tag}function nP(t,e,n,r){const i=za(t,e);if(!i)return t;const l=n.startsWith("data-")?n:`data-${n}`,o=new RegExp(`\\b${Pn(l)}=(["'])([^"']*)\\1`),c=i.tag;if(r===null){if(!o.test(c))return t;const p=new RegExp(`\\s+${Pn(l)}=(["'])[^"']*\\1`),O=c.replace(p,"");return Nc(t,i,O)}const f=Ag(r);if(o.test(c)){const p=c.replace(o,`${l}="${f}"`);return Nc(t,i,p)}const m=c+` ${l}="${f}"`;return Nc(t,i,m)}function rP(t,e,n,r){const l=new RegExp(`(<[^>]*\\bid=(["'])${Pn(e)}\\2[^>]*)>`,"i").exec(t);if(!l)return t;const o=l[1],c=n.startsWith("data-")?n:`data-${n}`,f=new RegExp(`\\b${Pn(c)}=(["'])([^"']*)\\1`);if(r===null){if(!f.test(o))return t;const p=new RegExp(`\\s+${Pn(c)}=(["'])[^"']*\\1`),O=o.replace(p,"");return t.replace(o,O)}const m=Ag(r);if(f.test(o)){const p=o.replace(f,`${c}="${m}"`);return t.replace(o,p)}else{const p=o+` ${c}="${m}"`;return t.replace(o,p)}}function iP(t,e,n){const i=new RegExp(`(<([a-z0-9-]+)[^>]*\\bid=(["'])${Pn(e)}\\3[^>]*>)`,"i").exec(t);if(!i||i.index==null)return t;const l=i[1],o=i[2],c=i.index+l.length,f=ES(t,o,c);return f<0?t:`${t.slice(0,c)}${n}${t.slice(f)}`}function ES(t,e,n){const r=new RegExp(`</?${Pn(e)}\\b[^>]*>`,"gi");r.lastIndex=n;let i=1,l;for(;(l=r.exec(t))!==null;){const o=l[0];if(o.startsWith("</")){if(i-=1,i===0)return l.index;continue}o.endsWith("/>")||(i+=1)}return-1}const aP=new Set(["loop","muted","autoplay","playsinline","controls","default","defer","disabled","hidden","nomodule","open","readonly","required","reversed","selected"]);function $S(t,e,n,r){if(!e)return t;if(aP.has(n)){const f=Pn(n),m=new RegExp(`(?:^|\\s)${f}(?:\\s|=|$)`).test(e);if(r===null||r===""||r==="false"){if(!m)return t;const O=new RegExp(`\\s+${f}(?:=(["'])[^"']*\\1)?`),y=e.replace(O,"");return t.replace(e,y)}if(m)return t;const p=e+` ${n}`;return t.replace(e,p)}const l=new RegExp(`\\b${Pn(n)}=(["'])([^"']*)\\1`);if(r===null){if(!l.test(e))return t;const f=new RegExp(`\\s+${Pn(n)}=(["'])[^"']*\\1`),m=e.replace(f,"");return t.replace(e,m)}const o=Ag(r);if(l.test(e)){const f=e.replace(l,`${n}="${o}"`);return t.replace(e,f)}const c=e+` ${n}="${o}"`;return t.replace(e,c)}function lP(t,e,n,r){const l=new RegExp(`(<[^>]*\\bid=(["'])${Pn(e)}\\2[^>]*)>`,"i").exec(t);return l?$S(t,l[1],n,r):t}function sP(t,e,n,r){const i=za(t,e);if(!i)return t;const l=$S(i.tag,i.tag,n,r);return Nc(t,i,l)}function oP(t,e,n){const r=za(t,e);if(!r)return t;const i=/^<([a-z0-9-]+)/i.exec(r.tag),l=i==null?void 0:i[1];if(!l)return t;const o=ES(t,l,r.end+1);return o<0?t:`${t.slice(0,r.end+1)}${n}${t.slice(o)}`}function cP(t,e,n){switch(n.type){case"inline-style":return JQ(t,e,n.property,n.value);case"attribute":return rP(t,e,n.property,n.value);case"html-attribute":return lP(t,e,n.property,n.value);case"text-content":return n.value!==null?iP(t,e,n.value):t;default:return t}}function Oc(t,e,n){if(e.id){const r=cP(t,e.id,n);if(r!==t||!e.selector)return r}switch(n.type){case"inline-style":return eP(t,e,n.property,n.value);case"attribute":return nP(t,e,n.property,n.value);case"html-attribute":return sP(t,e,n.property,n.value);case"text-content":return n.value!==null?oP(t,e,n.value):t;default:return t}}function uP({projectId:t,showToast:e,recordEdit:n,domEditSaveTimestampRef:r,setRefreshKey:i}){const[l,o]=d.useState(null),[c,f]=d.useState(null),[m,p]=d.useState([]),[O,y]=d.useState(!1),[b,S]=d.useState(null),w=d.useRef(l==null?void 0:l.path);w.current=l==null?void 0:l.path;const A=d.useRef(t);A.current=t;const k=d.useRef(null),$=d.useRef(null),Q=d.useRef([]);d.useEffect(()=>{if(!t){y(!1);return}let U=!1;return y(!1),fetch(`/api/projects/${t}`).then(te=>te.json()).then(te=>{!U&&te.files&&p(te.files),U||f(typeof te.dir=="string"?te.dir:null)}).catch(()=>{U||f(null)}).finally(()=>{U||y(!0)}),()=>{U=!0}},[t]);const C=d.useCallback(async U=>{const te=A.current;if(!te)throw new Error("No active project");const ne=await fetch(`/api/projects/${te}/files/${encodeURIComponent(U)}`);if(!ne.ok)throw new Error(`Failed to read ${U}`);const ce=await ne.json();if(typeof ce.content!="string")throw new Error(`Missing file contents for ${U}`);return ce.content},[]),M=d.useCallback(async(U,te)=>{const ne=A.current;if(!ne)throw new Error("No active project");if(!(await fetch(`/api/projects/${ne}/files/${encodeURIComponent(U)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:te})).ok)throw new Error(`Failed to save ${U}`);w.current===U&&o({path:U,content:te})},[]),Z=d.useCallback(async U=>{const te=A.current;if(!te)throw new Error("No active project");const ne=await fetch(`/api/projects/${te}/files/${encodeURIComponent(U)}?optional=1`);if(!ne.ok)throw new Error(`Failed to read ${U}`);const ce=await ne.json();return typeof ce.content=="string"?ce.content:""},[]),E=d.useCallback(U=>{var ne;const te=A.current;if(te){if((ne=H.current)==null||ne.abort(),H.current=null,_.current++,Cv(U)){o({path:U,content:null});return}fetch(`/api/projects/${te}/files/${encodeURIComponent(U)}`).then(ce=>ce.json()).then(ce=>{ce.content!=null&&o({path:U,content:ce.content})}).catch(()=>{})}},[]),j=d.useCallback(U=>{const te=A.current;if(!te)return;const ne=w.current;ne&&(k.current!=null&&cancelAnimationFrame(k.current),k.current=requestAnimationFrame(()=>{r.current=Date.now(),Tl({projectId:te,label:"Edit source",kind:"source",coalesceKey:`source:${ne}`,files:{[ne]:U},readFile:C,writeFile:M,recordEdit:n}).then(()=>{$.current!=null&&cancelAnimationFrame($.current),$.current=requestAnimationFrame(()=>i(ce=>ce+1))}).catch(ce=>{Nt("save_failure",{source:"code_editor",error_message:ce instanceof Error?ce.message:"unknown"})})}))},[r,C,n,i,M]),_=d.useRef(0),H=d.useRef(null),L=d.useCallback((U,te)=>{var Se;const ne=A.current;if(!ne||!U)return;if((Se=H.current)==null||Se.abort(),H.current=null,w.current===U&&(l==null?void 0:l.content)!=null){const pe=za(l.content,te);S(pe?pe.start:null);return}const ce=++_.current,me=new AbortController;H.current=me,fetch(`/api/projects/${ne}/files/${encodeURIComponent(U)}`,{signal:me.signal}).then(pe=>pe.json()).then(pe=>{if(ce===_.current&&pe.content!=null){o({path:U,content:pe.content});const ae=za(pe.content,te);S(ae?ae.start:null)}}).catch(()=>{})},[l==null?void 0:l.content]),z=d.useCallback(async()=>{const U=A.current;if(!U)return;const ne=await(await fetch(`/api/projects/${U}`)).json();ne.files&&p(ne.files)},[]),F=d.useCallback(async(U,te)=>{var pe,ae;const ne=A.current,ce=Array.from(U);if(!ne||ce.length===0)return[];const me=new FormData;for(const xe of ce)me.append("file",xe);const Se=te?`?dir=${encodeURIComponent(te)}`:"";try{const xe=await fetch(`/api/projects/${ne}/upload${Se}`,{method:"POST",body:me});if(xe.ok){const Qe=await xe.json();if((pe=Qe.skipped)!=null&&pe.length&&e(`Skipped (too large): ${Qe.skipped.join(", ")}`),(ae=Qe.invalid)!=null&&ae.length){const $e=Qe.invalid.map(Ze=>Ze.name).join(", ");e(`Unsupported media skipped: ${$e}`)}return await z(),i($e=>$e+1),Array.isArray(Qe.files)?Qe.files:[]}else xe.status===413?e("Upload rejected: payload too large"):e(`Upload failed (${xe.status})`)}catch{e("Upload failed: network error")}return[]},[z,i,e]),ee=d.useCallback(async U=>{const te=A.current;if(!te)return;let ne="";U.endsWith(".html")&&(ne=`<!DOCTYPE html>
|
|
76
|
-
<html>
|
|
77
|
-
<head>
|
|
78
|
-
<meta charset="UTF-8">
|
|
79
|
-
</head>
|
|
80
|
-
<body>
|
|
81
|
-
|
|
82
|
-
</body>
|
|
83
|
-
</html>
|
|
84
|
-
`);const ce=await fetch(`/api/projects/${te}/files/${encodeURIComponent(U)}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:ne});if(ce.ok)await z(),E(U);else{const me=await ce.json().catch(()=>({error:"unknown"}));console.error(`Create file failed: ${me.error}`)}},[z,E]),W=d.useCallback(async U=>{const te=A.current;if(!te)return;const ne=await fetch(`/api/projects/${te}/files/${encodeURIComponent(U+"/.gitkeep")}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:""});if(ne.ok)await z();else{const ce=await ne.json().catch(()=>({error:"unknown"}));console.error(`Create folder failed: ${ce.error}`)}},[z]),V=d.useCallback(async U=>{const te=A.current;if(!te)return;const ne=await fetch(`/api/projects/${te}/files/${encodeURIComponent(U)}`,{method:"DELETE"});if(ne.ok)w.current===U&&o(null),await z();else{const ce=await ne.json().catch(()=>({error:"unknown"}));console.error(`Delete failed: ${ce.error}`)}},[z]),G=d.useCallback(async(U,te)=>{const ne=A.current;if(!ne)return;const ce=await fetch(`/api/projects/${ne}/files/${encodeURIComponent(U)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({newPath:te})});if(ce.ok)w.current===U&&E(te),await z(),i(me=>me+1);else{const me=await ce.json().catch(()=>({error:"unknown"}));console.error(`Rename failed: ${me.error}`)}},[z,E,i]),q=d.useCallback(async U=>{const te=A.current;if(!te)return;const ne=await fetch(`/api/projects/${te}/duplicate-file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:U})});if(ne.ok){const ce=await ne.json();await z(),ce.path&&E(ce.path)}else{const ce=await ne.json().catch(()=>({error:"unknown"}));console.error(`Duplicate failed: ${ce.error}`)}},[z,E]),B=G,D=d.useCallback(async(U,te)=>F(Array.from(U),te),[F]),P=d.useCallback(async U=>{const te=await F(Array.from(U).filter(me=>Z1.test(me.name)),"assets/fonts"),ne=A.current,ce=te.filter(me=>Z1.test(me)).map(me=>({family:ao(me),path:me,url:`/api/projects/${ne}/preview/${me}`}));return Q.current=[...ce,...Q.current.filter(me=>!ce.some(Se=>Se.family.toLowerCase()===me.family.toLowerCase()))],ce},[F]),R=d.useMemo(()=>m.filter(U=>U==="index.html"||U.startsWith("compositions/")),[m]),X=d.useMemo(()=>m.filter(U=>!U.endsWith(".html")&&!U.endsWith(".md")&&!U.endsWith(".json")),[m]),Y=d.useMemo(()=>X.filter(U=>Z1.test(U)).map(U=>({family:ao(U),path:U,url:`/api/projects/${t}/preview/${U}`})),[X,t]);return{editingFile:l,setEditingFile:o,projectDir:c,fileTree:m,fileTreeLoaded:O,setFileTree:p,editingPathRef:w,projectIdRef:A,saveRafRef:k,importedFontAssetsRef:Q,readProjectFile:C,writeProjectFile:M,readOptionalProjectFile:Z,revealSourceOffset:b,openSourceForSelection:L,handleFileSelect:E,handleContentChange:j,refreshFileTree:z,uploadProjectFiles:F,handleCreateFile:ee,handleCreateFolder:W,handleDeleteFile:V,handleRenameFile:G,handleDuplicateFile:q,handleMoveFile:B,handleImportFiles:D,handleImportFonts:P,compositions:R,assets:X,fontAssets:Y}}const Rr="--hf-studio-offset-x",Nr="--hf-studio-offset-y",vi="--hf-studio-width",Si="--hf-studio-height",Vr="--hf-studio-rotation",ea="data-hf-studio-path-offset",nu="data-hf-studio-manual-edit-gesture",ta="data-hf-studio-box-size",na="data-hf-studio-rotation",wi="data-hf-studio-original-translate",Ai="data-hf-studio-original-inline-translate",Cl="data-hf-studio-original-width",El="data-hf-studio-original-height",$l="data-hf-studio-original-min-width",Ql="data-hf-studio-original-min-height",Pl="data-hf-studio-original-max-width",Zl="data-hf-studio-original-max-height",jl="data-hf-studio-original-flex-basis",Rl="data-hf-studio-original-flex-grow",Nl="data-hf-studio-original-flex-shrink",Vl="data-hf-studio-original-box-sizing",Wr="data-hf-studio-original-scale",ra="data-hf-studio-original-transform-origin",Ll="data-hf-studio-original-display",ki="data-hf-studio-original-rotate",Mi="data-hf-studio-original-inline-rotate",Kr="data-hf-studio-original-rotation-transform-origin",Fl="data-hf-studio-rotation-draft",Mn="data-hf-studio-original-transform-display",fP="__hfStudioManualEditsApply",Km="__hfStudioManualEditsWrapped",Y0="__hfStudioManualEditsPlaybackFrame",dP="center center";function hP(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function QS(t){return Math.round(t*10)/10}function B0(t){return t.trim().replace(/\\/g,"/").replace(/^\.?\//,"")}function Jm(t){if(typeof t=="string"){const n=t.trim();if(!n)return null;if(n.startsWith("{"))try{return Jm(JSON.parse(n))}catch{return B0(n)}return B0(n)}if(!t||typeof t!="object")return null;const e=t;return typeof e.path=="string"?B0(e.path):typeof e.filePath=="string"?B0(e.filePath):"data"in e?Jm(e.data):null}function mP(t){return Jm(t)}const ep=".hyperframes/studio-motion.json",T2="studio-motion",Fa="data-hf-studio-motion",_l="data-hf-studio-motion-original-transform",lo="data-hf-studio-motion-original-opacity",so="data-hf-studio-motion-original-visibility",q0=["none","power1.in","power1.out","power1.inOut","power2.in","power2.out","power2.inOut","power3.in","power3.out","power3.inOut","power4.in","power4.out","power4.inOut","sine.in","sine.out","sine.inOut","expo.in","expo.out","expo.inOut","circ.in","circ.out","circ.inOut","back.in(1.7)","back.out(1.7)","back.inOut(1.7)","elastic.out(1, 0.45)","bounce.out"],Cc={x1:.215,y1:.61,x2:.355,y2:1},pP={none:{x1:0,y1:0,x2:1,y2:1},"power1.in":{x1:.55,y1:.085,x2:.68,y2:.53},"power1.out":{x1:.25,y1:.46,x2:.45,y2:.94},"power1.inOut":{x1:.455,y1:.03,x2:.515,y2:.955},"power2.in":{x1:.55,y1:.055,x2:.675,y2:.19},"power2.out":{x1:.215,y1:.61,x2:.355,y2:1},"power2.inOut":{x1:.645,y1:.045,x2:.355,y2:1},"power3.in":{x1:.895,y1:.03,x2:.685,y2:.22},"power3.out":{x1:.165,y1:.84,x2:.44,y2:1},"power3.inOut":{x1:.77,y1:0,x2:.175,y2:1},"power4.in":{x1:.755,y1:.05,x2:.855,y2:.06},"power4.out":{x1:.23,y1:1,x2:.32,y2:1},"power4.inOut":{x1:.86,y1:0,x2:.07,y2:1},"sine.in":{x1:.47,y1:0,x2:.745,y2:.715},"sine.out":{x1:.39,y1:.575,x2:.565,y2:1},"sine.inOut":{x1:.445,y1:.05,x2:.55,y2:.95},"expo.in":{x1:.95,y1:.05,x2:.795,y2:.035},"expo.out":{x1:.19,y1:1,x2:.22,y2:1},"expo.inOut":{x1:1,y1:0,x2:0,y2:1},"circ.in":{x1:.6,y1:.04,x2:.98,y2:.335},"circ.out":{x1:.075,y1:.82,x2:.165,y2:1},"circ.inOut":{x1:.785,y1:.135,x2:.15,y2:.86},"back.in(1.7)":{x1:.6,y1:-.28,x2:.735,y2:.045},"back.out(1.7)":{x1:.175,y1:.885,x2:.32,y2:1.275},"back.inOut(1.7)":{x1:.68,y1:-.55,x2:.265,y2:1.55},"elastic.out(1, 0.45)":{x1:.16,y1:1.32,x2:.28,y2:.86},"bounce.out":{x1:.34,y1:1.56,x2:.64,y2:.74}},gP=/^M\s*0\s*,\s*0\s*C\s*(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s+(-?\d+(?:\.\d+)?)\s*,\s*(-?\d+(?:\.\d+)?)\s+1\s*,\s*1\s*$/i;function T3(t,e){return Number.isFinite(t)&&t>0?t:e}function OP(t,e){return Number.isFinite(t)&&t>=0?t:e}function xP(t){return t.trim()||"none"}function Ec(t){return Math.round(t*1e3)/1e3}function I0(t,e,n,r){return Number.isFinite(t)?Math.min(n,Math.max(e,t)):r}function U0(t){const e=Ec(t);return Object.is(e,-0)?"0":`${e}`}function tp(t){return typeof t=="number"&&Number.isFinite(t)?t:null}function kg(t){return{x1:Ec(I0(t.x1??Cc.x1,0,1,.215)),y1:Ec(I0(t.y1??Cc.y1,-.6,1.6,.61)),x2:Ec(I0(t.x2??Cc.x2,0,1,.355)),y2:Ec(I0(t.y2??Cc.y2,-.6,1.6,1))}}function C3(t){if(!t)return null;const e=t.trim().match(gP);if(!e)return null;const n={x1:Number.parseFloat(e[1]??""),y1:Number.parseFloat(e[2]??""),x2:Number.parseFloat(e[3]??""),y2:Number.parseFloat(e[4]??"")};return Object.values(n).every(Number.isFinite)?kg(n):null}function PS(t){const e=kg(t);return`M0,0 C${U0(e.x1)},${U0(e.y1)} ${U0(e.x2)},${U0(e.y2)} 1,1`}function ZS(t){return pP[t]??Cc}function yP(t,e){const n=OP(e.start,0),r=T3(e.duration,.6),i=T3(e.distance,32),l=xP(e.ease),o=e.direction??"up",c={start:n,duration:r,ease:l,customEase:e.customEase};if(t==="pop")return{...c,from:{scale:.88,autoAlpha:0},to:{scale:1,autoAlpha:1}};if(t==="slide"){const f=o==="right"?-i:o==="left"?i:0,m=o==="down"?-i:o==="up"?i:0;return{...c,from:{x:f,y:m,autoAlpha:0},to:{x:0,y:0,autoAlpha:1}}}return{...c,from:{y:o==="down"?-i:i,autoAlpha:0},to:{y:0,autoAlpha:1}}}function E3(t){if(!t||typeof t!="object")return null;const e=t,n={};for(const r of["x","y","scale","rotation","opacity","autoAlpha"]){const i=tp(e[r]);i!=null&&(n[r]=i)}return Object.keys(n).length>0?n:null}function bP(t){if(!t||typeof t!="object")return;const e=t,n=typeof e.id=="string"?e.id.trim():"",r=typeof e.data=="string"?e.data.trim():"";if(!(!n||!r))return{id:n,data:r}}function jS(t){const e=t.getAttribute(Fa);if(!e||e==="true")return null;try{const n=JSON.parse(e);if(!n||typeof n!="object")return null;const r=n,i=tp(r.start),l=tp(r.duration);if(i==null||l==null||i<0||l<=0)return null;const o=typeof r.ease=="string"&&r.ease.trim()?r.ease.trim():"none",c=E3(r.from),f=E3(r.to);return!c||!f?null:{start:i,duration:l,ease:o,customEase:bP(r.customEase),from:c,to:f}}catch{return null}}function vP(t,e){t.getAttribute(_l)||(t.setAttribute(_l,t.style.transform),t.setAttribute(lo,t.style.opacity),t.setAttribute(so,t.style.visibility));const n={start:e.start,duration:e.duration,ease:e.ease,from:e.from,to:e.to};e.customEase&&(n.customEase=e.customEase),t.setAttribute(Fa,JSON.stringify(n))}function SP(t,e){var n;t.hasAttribute(Fa)&&((n=e==null?void 0:e.set)==null||n.call(e,t,{clearProps:"transform,opacity,visibility"}),t.style.transform=t.getAttribute(_l)??"",t.style.opacity=t.getAttribute(lo)??"",t.style.visibility=t.getAttribute(so)??"",t.removeAttribute(Fa),t.removeAttribute(_l),t.removeAttribute(lo),t.removeAttribute(so))}function wP(t,e){var n,r,i,l;try{const o=(r=(n=t.__player)==null?void 0:n.getTime)==null?void 0:r.call(n);if(typeof o=="number"&&Number.isFinite(o))return Math.max(0,o)}catch{}try{const o=(l=(i=t.__timeline)==null?void 0:i.time)==null?void 0:l.call(i);if(typeof o=="number"&&Number.isFinite(o))return Math.max(0,o)}catch{}return 0}function np(t,e){var m,p,O,y,b,S;const n=t.defaultView;if(!n)return 0;const r=n.gsap;n.__timelines=n.__timelines??{},(p=(m=n.__timelines[T2])==null?void 0:m.kill)==null||p.call(m),delete n.__timelines[T2];const i=(O=t.defaultView)==null?void 0:O.HTMLElement;if(!i)return 0;const l=[];for(const w of Array.from(t.querySelectorAll(`[${Fa}]`))){if(!(w instanceof i))continue;const A=jS(w);A&&l.push({element:w,motion:A})}if(!(r!=null&&r.timeline)||l.length===0)return 0;const o=r.timeline({paused:!0,defaults:{overwrite:"auto"}});let c=0;for(const{element:w,motion:A}of l){if(!o.fromTo)continue;const k={...A.from},$=AP(n,A),Q={...A.to,duration:A.duration,ease:$,overwrite:"auto",immediateRender:!1};o.fromTo(w,k,Q,A.start),c+=1}if(c===0)return(y=o.kill)==null||y.call(o),0;n.__timelines[T2]=o,(b=o.pause)==null||b.call(o);const f=wP(n);return o.totalTime?o.totalTime(f,!1):(S=o.time)==null||S.call(o,f),c}function AP(t,e){var i,l;const n=e.customEase;if(!n)return e.ease;const r=t.CustomEase;if(typeof(r==null?void 0:r.create)!="function")return e.ease;try{return(l=(i=t.gsap)==null?void 0:i.registerPlugin)==null||l.call(i,r),r.create(n.id,n.data),n.id}catch{return e.ease}}let $3=0;function RS(t){$3+=1;const e=`gesture-${$3}`;return t.setAttribute(nu,e),e}function zr(t,e){e&&t.getAttribute(nu)!==e||t.removeAttribute(nu)}function NS(t){return t.hasAttribute(nu)}function W0(t,e){return t.getAttribute(nu)===e}function U1(t,e){const n=Number.parseFloat(t.style.getPropertyValue(e));return Number.isFinite(n)?n:0}function rp(t){return{x:U1(t,Rr),y:U1(t,Nr)}}function W1(t){return{width:U1(t,vi),height:U1(t,Si)}}function VS(t){const e=Number.parseFloat(t.style.getPropertyValue(Vr));return{angle:Number.isFinite(e)?e:0}}function Mg(t,e){var n;try{return((n=t.ownerDocument.defaultView)==null?void 0:n.getComputedStyle(t).getPropertyValue(e))??""}catch{return""}}function ip(t,e){return t.style.getPropertyValue(e)||Mg(t,e)}function LS(t,e){const n=ip(t,e).trim();return n==="none"?"":n}function ap(t){return t.includes(Rr)||t.includes(Nr)}function Q3(t){return t.includes(vi)||t.includes(Si)}function lp(t){return t.includes(Vr)}function P3(t){return t.replace(/\s+/g,"").toLowerCase()}function kP(t,e){if(!t.hasAttribute(Fl))return!1;const n=t.style.getPropertyValue(Vr).trim();return!n||!e.trim()?!1:P3(e)===P3(Eg(t,n))}function vo(t){Mg(t,"display")==="inline"&&(t.hasAttribute(Mn)||t.setAttribute(Mn,t.style.getPropertyValue("display")),t.style.setProperty("display","inline-block"))}function Tg(t){const e=t.getAttribute(Mn);e!=null&&(e===""?t.style.removeProperty("display"):t.style.setProperty("display",e),t.removeAttribute(Mn))}function MP(t){const e=[];let n=0,r="";for(const i of t.trim())i==="("&&(n+=1),i===")"&&(n=Math.max(0,n-1)),/\s/.test(i)&&n===0?(r&&e.push(r),r=""):r+=i;return r&&e.push(r),e}function _S(t,e,n){var l;const r=(l=t.getAttribute(wi))==null?void 0:l.trim();if(!r||r==="none")return`${e} ${n}`;const i=MP(r);return i.length===1?`calc(${i[0]} + ${e}) ${n}`:i.length===2?`calc(${i[0]} + ${e}) calc(${i[1]} + ${n})`:i.length===3?`calc(${i[0]} + ${e}) calc(${i[1]} + ${n}) ${i[2]}`:`${e} ${n}`}function TP(t,e){const n=t.style.getPropertyValue("translate"),r=LS(t,"translate"),i=t.hasAttribute(ea),l=!ap(r);i?e&&l&&!NS(t)&&t.setAttribute(wi,r):(t.setAttribute(Ai,ap(n)?"":n),t.setAttribute(wi,l?r:""))}function DS(t,e,n={}){TP(t,n.updateBase??!0),t.setAttribute(ea,"true"),t.style.setProperty(Rr,`${Math.round(e.x)}px`),t.style.setProperty(Nr,`${Math.round(e.y)}px`)}function HS(t){const e=t.style.getPropertyValue("transform");if(!e||e==="none")return;const n=t.ownerDocument.defaultView,r=n==null?void 0:n.DOMMatrix;if(r)try{const i=new r(e);if(i.m41===0&&i.m42===0)return;i.m41=0,i.m42=0,i.is2D&&i.a===1&&i.b===0&&i.c===0&&i.d===1?t.style.removeProperty("transform"):t.style.setProperty("transform",i.toString())}catch{}}function G1(t,e,n={}){vo(t),DS(t,e,{updateBase:n.updateBase??!0}),t.style.setProperty("translate",_S(t,`var(${Rr}, 0px)`,`var(${Nr}, 0px)`)),HS(t)}function R1(t,e){vo(t),DS(t,e,{updateBase:!1}),t.style.setProperty("translate",_S(t,`${Math.round(e.x)}px`,`${Math.round(e.y)}px`)),HS(t)}function CP(t,e){const n=t.parentElement;if(!n)return null;const r=ip(n,"display").trim();if(r!=="flex"&&r!=="inline-flex")return null;const i=ip(n,"flex-direction").trim();return Math.round(Math.max(1,i.startsWith("column")?e.height:e.width))}function EP(t){if(!t.hasAttribute(Wr))return;const e=t.getAttribute(Wr);e==null||e===""?t.style.removeProperty("scale"):t.style.setProperty("scale",e),t.removeAttribute(Wr);const n=t.getAttribute(ra);n==null||n===""?t.style.removeProperty("transform-origin"):t.style.setProperty("transform-origin",n),t.removeAttribute(ra)}function $P(t,e){t.hasAttribute(ta)||(t.setAttribute(Cl,t.style.getPropertyValue("width")),t.setAttribute(El,t.style.getPropertyValue("height")),t.setAttribute($l,t.style.getPropertyValue("min-width")),t.setAttribute(Ql,t.style.getPropertyValue("min-height")),t.setAttribute(Pl,t.style.getPropertyValue("max-width")),t.setAttribute(Zl,t.style.getPropertyValue("max-height")),t.setAttribute(jl,t.style.getPropertyValue("flex-basis")),t.setAttribute(Rl,t.style.getPropertyValue("flex-grow")),t.setAttribute(Nl,t.style.getPropertyValue("flex-shrink")),t.setAttribute(Vl,t.style.getPropertyValue("box-sizing")),t.setAttribute(Wr,t.style.getPropertyValue("scale")),t.setAttribute(ra,t.style.getPropertyValue("transform-origin")),t.setAttribute(Ll,t.style.getPropertyValue("display"))),t.setAttribute(ta,"true"),t.style.setProperty(vi,`${Math.round(Math.max(1,e.width))}px`),t.style.setProperty(Si,`${Math.round(Math.max(1,e.height))}px`)}function XS(t,e){$P(t,e),EP(t);const n=Math.round(Math.max(1,e.width)),r=Math.round(Math.max(1,e.height));t.style.setProperty("box-sizing","border-box"),t.style.setProperty("width",`${n}px`),t.style.setProperty("height",`${r}px`),t.style.setProperty("min-width","0px"),t.style.setProperty("min-height","0px"),t.style.setProperty("max-width","none"),t.style.setProperty("max-height","none");const i=CP(t,e);i!=null&&(t.style.setProperty("flex-basis",`${i}px`),t.style.setProperty("flex-grow","0"),t.style.setProperty("flex-shrink","0")),Mg(t,"display")==="inline"&&t.style.setProperty("display","inline-block")}function Cg(t,e){vo(t),XS(t,e)}function QP(t,e){vo(t),XS(t,e)}function PP(t){return/^-?(?:\d+(?:\.\d+)?|\.\d+)(?:deg|rad|turn|grad)$/.test(t.trim())}function Eg(t,e){var r;const n=(r=t.getAttribute(ki))==null?void 0:r.trim();return!n||n==="none"||!PP(n)?e:`calc(${n} + ${e})`}function ZP(t,e){const n=t.style.getPropertyValue("rotate"),r=LS(t,"rotate"),i=t.hasAttribute(na),l=!lp(r)&&!kP(t,r);i?e&&l&&!NS(t)&&t.setAttribute(ki,r):(t.setAttribute(Mi,lp(n)?"":n),t.setAttribute(ki,l?r:"")),t.hasAttribute(Kr)||t.setAttribute(Kr,t.style.getPropertyValue("transform-origin"))}function zS(t,e,n={}){ZP(t,n.updateBase??!0),t.setAttribute(na,"true"),t.style.setProperty(Vr,`${QS(e.angle)}deg`),t.style.setProperty("transform-origin",dP)}function $g(t,e){vo(t),zS(t,e),t.removeAttribute(Fl),t.style.setProperty("rotate",Eg(t,`var(${Vr}, 0deg)`))}function jP(t,e){vo(t),zS(t,e,{updateBase:!1}),t.setAttribute(Fl,"true"),t.style.setProperty("rotate",Eg(t,`${QS(e.angle)}deg`))}function Z3(t){const e=t.style.getPropertyValue(Rr),n=t.style.getPropertyValue(Nr),r=t.style.getPropertyValue("translate"),i=t.getAttribute(wi),l=t.getAttribute(Ai),o=t.style.getPropertyValue("display"),c=t.getAttribute(Mn),f=[];return e&&f.push({type:"inline-style",property:Rr,value:e}),n&&f.push({type:"inline-style",property:Nr,value:n}),r&&f.push({type:"inline-style",property:"translate",value:r}),f.push({type:"attribute",property:ea,value:"true"}),i!==null&&f.push({type:"attribute",property:wi,value:i}),l!==null&&f.push({type:"attribute",property:Ai,value:l}),o&&f.push({type:"inline-style",property:"display",value:o}),c!==null&&f.push({type:"attribute",property:Mn,value:c}),f}function RP(t){const e=t.getAttribute(Ai),n=[{type:"inline-style",property:Rr,value:null},{type:"inline-style",property:Nr,value:null},{type:"inline-style",property:"translate",value:e||null},{type:"attribute",property:ea,value:null},{type:"attribute",property:wi,value:null},{type:"attribute",property:Ai,value:null}],r=t.getAttribute(Mn);return r!==null&&(n.push({type:"inline-style",property:"display",value:r||null}),n.push({type:"attribute",property:Mn,value:null})),n}function NP(t){const e=[],n=t.style.getPropertyValue(vi),r=t.style.getPropertyValue(Si);n&&e.push({type:"inline-style",property:vi,value:n}),r&&e.push({type:"inline-style",property:Si,value:r});const i=t.style.getPropertyValue("width"),l=t.style.getPropertyValue("height"),o=t.style.getPropertyValue("min-width"),c=t.style.getPropertyValue("min-height"),f=t.style.getPropertyValue("max-width"),m=t.style.getPropertyValue("max-height"),p=t.style.getPropertyValue("flex-basis"),O=t.style.getPropertyValue("flex-grow"),y=t.style.getPropertyValue("flex-shrink"),b=t.style.getPropertyValue("box-sizing"),S=t.style.getPropertyValue("scale"),w=t.style.getPropertyValue("transform-origin"),A=t.style.getPropertyValue("display");i&&e.push({type:"inline-style",property:"width",value:i}),l&&e.push({type:"inline-style",property:"height",value:l}),o&&e.push({type:"inline-style",property:"min-width",value:o}),c&&e.push({type:"inline-style",property:"min-height",value:c}),f&&e.push({type:"inline-style",property:"max-width",value:f}),m&&e.push({type:"inline-style",property:"max-height",value:m}),p&&e.push({type:"inline-style",property:"flex-basis",value:p}),O&&e.push({type:"inline-style",property:"flex-grow",value:O}),y&&e.push({type:"inline-style",property:"flex-shrink",value:y}),b&&e.push({type:"inline-style",property:"box-sizing",value:b}),S&&e.push({type:"inline-style",property:"scale",value:S}),w&&e.push({type:"inline-style",property:"transform-origin",value:w}),A&&e.push({type:"inline-style",property:"display",value:A}),e.push({type:"attribute",property:ta,value:"true"});const k=t.getAttribute(Cl),$=t.getAttribute(El),Q=t.getAttribute($l),C=t.getAttribute(Ql),M=t.getAttribute(Pl),Z=t.getAttribute(Zl),E=t.getAttribute(jl),j=t.getAttribute(Rl),_=t.getAttribute(Nl),H=t.getAttribute(Vl),L=t.getAttribute(Wr),z=t.getAttribute(ra),F=t.getAttribute(Ll),ee=t.getAttribute(Mn);return k!==null&&e.push({type:"attribute",property:Cl,value:k}),$!==null&&e.push({type:"attribute",property:El,value:$}),Q!==null&&e.push({type:"attribute",property:$l,value:Q}),C!==null&&e.push({type:"attribute",property:Ql,value:C}),M!==null&&e.push({type:"attribute",property:Pl,value:M}),Z!==null&&e.push({type:"attribute",property:Zl,value:Z}),E!==null&&e.push({type:"attribute",property:jl,value:E}),j!==null&&e.push({type:"attribute",property:Rl,value:j}),_!==null&&e.push({type:"attribute",property:Nl,value:_}),H!==null&&e.push({type:"attribute",property:Vl,value:H}),L!==null&&e.push({type:"attribute",property:Wr,value:L}),z!==null&&e.push({type:"attribute",property:ra,value:z}),F!==null&&e.push({type:"attribute",property:Ll,value:F}),ee!==null&&e.push({type:"attribute",property:Mn,value:ee}),e}function VP(t){const e=[{type:"inline-style",property:vi,value:null},{type:"inline-style",property:Si,value:null},{type:"attribute",property:ta,value:null}],n=[[Cl,"width"],[El,"height"],[$l,"min-width"],[Ql,"min-height"],[Pl,"max-width"],[Zl,"max-height"],[jl,"flex-basis"],[Rl,"flex-grow"],[Nl,"flex-shrink"],[Vl,"box-sizing"],[Wr,"scale"],[ra,"transform-origin"],[Ll,"display"]];for(const[i,l]of n){const o=t.getAttribute(i);o!==null&&e.push({type:"inline-style",property:l,value:o||null}),e.push({type:"attribute",property:i,value:null})}const r=t.getAttribute(Mn);return r!==null&&(e.push({type:"inline-style",property:"display",value:r||null}),e.push({type:"attribute",property:Mn,value:null})),e}function LP(t){const e=[],n=t.style.getPropertyValue(Vr),r=t.style.getPropertyValue("rotate"),i=t.style.getPropertyValue("transform-origin"),l=t.style.getPropertyValue("display");n&&e.push({type:"inline-style",property:Vr,value:n}),r&&e.push({type:"inline-style",property:"rotate",value:r}),i&&e.push({type:"inline-style",property:"transform-origin",value:i}),l&&e.push({type:"inline-style",property:"display",value:l}),e.push({type:"attribute",property:na,value:"true"});const o=t.getAttribute(ki),c=t.getAttribute(Mi),f=t.getAttribute(Kr),m=t.getAttribute(Mn);return o!==null&&e.push({type:"attribute",property:ki,value:o}),c!==null&&e.push({type:"attribute",property:Mi,value:c}),f!==null&&e.push({type:"attribute",property:Kr,value:f}),m!==null&&e.push({type:"attribute",property:Mn,value:m}),e}function _P(t){const e=t.getAttribute(Mi),n=t.getAttribute(Kr),r=[{type:"inline-style",property:Vr,value:null},{type:"inline-style",property:"rotate",value:e||null},{type:"inline-style",property:"transform-origin",value:n!==null&&n||null},{type:"attribute",property:na,value:null},{type:"attribute",property:Fl,value:null},{type:"attribute",property:ki,value:null},{type:"attribute",property:Mi,value:null},{type:"attribute",property:Kr,value:null}],i=t.getAttribute(Mn);return i!==null&&(r.push({type:"inline-style",property:"display",value:i||null}),r.push({type:"attribute",property:Mn,value:null})),r}function DP(t){const e=t.getAttribute(Fa);if(!e)return[];const n=[{type:"attribute",property:Fa,value:e}],r=t.getAttribute(_l);r!==null&&n.push({type:"attribute",property:_l,value:r});const i=t.getAttribute(lo);i!==null&&n.push({type:"attribute",property:lo,value:i});const l=t.getAttribute(so);return l!==null&&n.push({type:"attribute",property:so,value:l}),n}function HP(t){return[{type:"attribute",property:Fa,value:null},{type:"attribute",property:_l,value:null},{type:"attribute",property:lo,value:null},{type:"attribute",property:so,value:null}]}function XP(t){var l;const e=(l=t.defaultView)==null?void 0:l.HTMLElement;if(!e)return;const n=Array.from(t.querySelectorAll(`[${ea}="true"]`)).filter(o=>o instanceof e);for(const o of n){const c=o.style.getPropertyValue(Rr),f=o.style.getPropertyValue(Nr);(c||f)&&G1(o,{x:Number.parseFloat(c)||0,y:Number.parseFloat(f)||0})}const r=Array.from(t.querySelectorAll(`[${ta}="true"]`)).filter(o=>o instanceof e);for(const o of r){const c=Number.parseFloat(o.style.getPropertyValue(vi)),f=Number.parseFloat(o.style.getPropertyValue(Si));Number.isFinite(c)&&Number.isFinite(f)&&c>0&&f>0&&Cg(o,{width:c,height:f})}const i=Array.from(t.querySelectorAll(`[${na}="true"]`)).filter(o=>o instanceof e);for(const o of i){const c=Number.parseFloat(o.style.getPropertyValue(Vr));Number.isFinite(c)&&$g(o,{angle:c})}np(t)}function zP(t){return{width:t.style.getPropertyValue("width"),height:t.style.getPropertyValue("height"),minWidth:t.style.getPropertyValue("min-width"),minHeight:t.style.getPropertyValue("min-height"),maxWidth:t.style.getPropertyValue("max-width"),maxHeight:t.style.getPropertyValue("max-height"),flexBasis:t.style.getPropertyValue("flex-basis"),flexGrow:t.style.getPropertyValue("flex-grow"),flexShrink:t.style.getPropertyValue("flex-shrink"),boxSizing:t.style.getPropertyValue("box-sizing"),scale:t.style.getPropertyValue("scale"),transformOrigin:t.style.getPropertyValue("transform-origin"),display:t.style.getPropertyValue("display"),studioWidth:t.style.getPropertyValue(vi),studioHeight:t.style.getPropertyValue(Si),marker:t.getAttribute(ta),originalWidth:t.getAttribute(Cl),originalHeight:t.getAttribute(El),originalMinWidth:t.getAttribute($l),originalMinHeight:t.getAttribute(Ql),originalMaxWidth:t.getAttribute(Pl),originalMaxHeight:t.getAttribute(Zl),originalFlexBasis:t.getAttribute(jl),originalFlexGrow:t.getAttribute(Rl),originalFlexShrink:t.getAttribute(Nl),originalBoxSizing:t.getAttribute(Vl),originalScale:t.getAttribute(Wr),originalTransformOrigin:t.getAttribute(ra),originalDisplay:t.getAttribute(Ll)}}function FP(t){return{rotate:t.style.getPropertyValue("rotate"),transformOrigin:t.style.getPropertyValue("transform-origin"),studioRotation:t.style.getPropertyValue(Vr),marker:t.getAttribute(na),draftMarker:t.getAttribute(Fl),originalRotate:t.getAttribute(ki),originalInlineRotate:t.getAttribute(Mi),originalTransformOrigin:t.getAttribute(Kr)}}function Qg(t){return{translate:t.style.getPropertyValue("translate"),x:t.style.getPropertyValue(Rr),y:t.style.getPropertyValue(Nr),marker:t.getAttribute(ea),originalTranslate:t.getAttribute(wi),originalInlineTranslate:t.getAttribute(Ai)}}function jt(t,e,n){n==null?t.removeAttribute(e):t.setAttribute(e,n)}function ln(t,e,n){n?t.style.setProperty(e,n):t.style.removeProperty(e)}function C2(t,e){ln(t,"width",e.width),ln(t,"height",e.height),ln(t,"min-width",e.minWidth),ln(t,"min-height",e.minHeight),ln(t,"max-width",e.maxWidth),ln(t,"max-height",e.maxHeight),ln(t,"flex-basis",e.flexBasis),ln(t,"flex-grow",e.flexGrow),ln(t,"flex-shrink",e.flexShrink),ln(t,"box-sizing",e.boxSizing),ln(t,"scale",e.scale),ln(t,"transform-origin",e.transformOrigin),ln(t,"display",e.display),ln(t,vi,e.studioWidth),ln(t,Si,e.studioHeight),jt(t,ta,e.marker),jt(t,Cl,e.originalWidth),jt(t,El,e.originalHeight),jt(t,$l,e.originalMinWidth),jt(t,Ql,e.originalMinHeight),jt(t,Pl,e.originalMaxWidth),jt(t,Zl,e.originalMaxHeight),jt(t,jl,e.originalFlexBasis),jt(t,Rl,e.originalFlexGrow),jt(t,Nl,e.originalFlexShrink),jt(t,Vl,e.originalBoxSizing),jt(t,Wr,e.originalScale),jt(t,ra,e.originalTransformOrigin),jt(t,Ll,e.originalDisplay)}function E2(t,e){ln(t,"rotate",e.rotate),ln(t,"transform-origin",e.transformOrigin),ln(t,Vr,e.studioRotation),jt(t,na,e.marker),jt(t,Fl,e.draftMarker),jt(t,ki,e.originalRotate),jt(t,Mi,e.originalInlineRotate),jt(t,Kr,e.originalTransformOrigin)}function yl(t,e){e.translate?t.style.setProperty("translate",e.translate):t.style.removeProperty("translate"),e.x?t.style.setProperty(Rr,e.x):t.style.removeProperty(Rr),e.y?t.style.setProperty(Nr,e.y):t.style.removeProperty(Nr),jt(t,ea,e.marker),jt(t,wi,e.originalTranslate),jt(t,Ai,e.originalInlineTranslate)}function ar(t,e,n){const r=t.getAttribute(n);r==null||r===""?t.style.removeProperty(e):t.style.setProperty(e,r),t.removeAttribute(n)}function YP(t){const e=t.getAttribute(Mi);e==null||e===""?t.style.removeProperty("rotate"):t.style.setProperty("rotate",e),t.removeAttribute(Mi),t.removeAttribute(ki);const n=t.getAttribute(Kr);n!=null&&(n===""?t.style.removeProperty("transform-origin"):t.style.setProperty("transform-origin",n)),t.removeAttribute(Kr)}function BP(t){const e=t.getAttribute(Ai);e==null||e===""?t.style.removeProperty("translate"):t.style.setProperty("translate",e),t.removeAttribute(Ai),t.removeAttribute(wi)}function qP(t){(t.hasAttribute(ea)||ap(t.style.getPropertyValue("translate")))&&BP(t),Tg(t),t.style.removeProperty(Rr),t.style.removeProperty(Nr),t.removeAttribute(ea),t.removeAttribute(wi),t.removeAttribute(Ai)}function IP(t){(t.hasAttribute(na)||lp(t.style.getPropertyValue("rotate")))&&YP(t),Tg(t),t.style.removeProperty(Vr),t.removeAttribute(na),t.removeAttribute(Fl),t.removeAttribute(ki),t.removeAttribute(Mi),t.removeAttribute(Kr)}function UP(t){(t.hasAttribute(ta)||Q3(t.style.getPropertyValue("width"))||Q3(t.style.getPropertyValue("height"))||t.hasAttribute(Wr))&&(ar(t,"width",Cl),ar(t,"height",El),ar(t,"min-width",$l),ar(t,"min-height",Ql),ar(t,"max-width",Pl),ar(t,"max-height",Zl),ar(t,"flex-basis",jl),ar(t,"flex-grow",Rl),ar(t,"flex-shrink",Nl),ar(t,"box-sizing",Vl),ar(t,"scale",Wr),ar(t,"transform-origin",ra),ar(t,"display",Ll)),Tg(t),t.style.removeProperty(vi),t.style.removeProperty(Si),t.removeAttribute(ta)}function Pg(t){try{Object.defineProperty(t,Km,{configurable:!1,enumerable:!1,value:!0})}catch{try{t[Km]=!0}catch{}}}function Zg(t){return!!t[Km]}function xc(t,e,n){const r=e==null?void 0:e[n];if(!e||typeof r!="function")return!1;const i=r;if(Zg(i))return!0;const l=function(...o){var f;const c=i.apply(this,o);return(f=t.__hfStudioManualEditsApply)==null||f.call(t),c};Pg(l);try{e[n]=l}catch{return!1}return!0}function yc(t,e){const n=t[e];if(typeof n!="function")return null;try{return hP(n.call(t))}catch{return null}}function WP(t){const e=yc(t,"duration")??yc(t,"getDuration");if(e==null)return!0;if(e<=0)return!1;const n=yc(t,"time")??yc(t,"totalTime")??yc(t,"getTime");return n==null?!0:n<e}function $2(t){if(!t)return!1;const e=t.isPlaying;if(typeof e=="function")try{return!!e.call(t)}catch{return!1}const n=t.paused;if(typeof n=="function"){try{if(n.call(t))return!1}catch{return!1}const i=t.isActive;if(typeof i=="function")try{if(i.call(t))return!0}catch{return!1}return WP(t)}const r=t.isActive;if(typeof r=="function")try{return!!r.call(t)}catch{return!1}return!1}function FS(t){return $2(t.__player)||$2(t.__timeline)?!0:Object.values(t.__timelines??{}).some($2)}function YS(t){var n;if((n=t.__hfStudioManualEditsApply)==null||n.call(t),t[Y0]!=null)return;const e=()=>{var r;if((r=t.__hfStudioManualEditsApply)==null||r.call(t),!FS(t)){t[Y0]=null;return}t[Y0]=t.requestAnimationFrame(e)};t[Y0]=t.requestAnimationFrame(e)}function Q2(t,e,n){const r=e==null?void 0:e[n];if(!e||typeof r!="function")return!1;const i=r;if(Zg(i))return!0;const l=function(...o){const c=i.apply(this,o);return YS(t),c};Pg(l);try{e[n]=l}catch{return!1}return!0}function P2(t,e,n){const r=e==null?void 0:e[n];if(!e||typeof r!="function")return!1;const i=r;if(Zg(i))return!0;const l=function(...o){var f;const c=i.apply(this,o);return(f=t.__hfStudioManualEditsApply)==null||f.call(t),c};Pg(l);try{e[n]=l}catch{return!1}return!0}function GP(t,e){const n=t;n[fP]=e;const r=xc(n,n.__hf,"seek"),i=xc(n,n.__player,"seek"),l=xc(n,n.__player,"renderSeek"),o=xc(n,n.__timeline,"seek"),c=Q2(n,n.__player,"play"),f=Q2(n,n.__timeline,"play"),m=P2(n,n.__player,"pause"),p=P2(n,n.__timeline,"pause");let O=!1,y=!1,b=!1;for(const S of Object.values(n.__timelines??{}))O=xc(n,S,"seek")||O,y=Q2(n,S,"play")||y,b=P2(n,S,"pause")||b;return FS(n)&&YS(n),r||i||l||o||c||f||m||p||O||y||b}function KP({projectId:t,showToast:e,readOptionalProjectFile:n,writeProjectFile:r,recordEdit:i,previewIframeRef:l,activeCompPathRef:o,domEditSaveTimestampRef:c,reloadPreview:f,pendingTimelineEditPathRef:m}){const p=d.useRef(0),O=d.useRef(Promise.resolve()),y=d.useRef(async()=>{}),b=d.useRef(t);b.current=t;const S=d.useCallback(Q=>{const C=O.current.catch(()=>{}).then(Q);return O.current=C.then(()=>{},()=>{}),C},[]),w=d.useCallback(async()=>{await O.current.catch(()=>{})},[]),A=d.useCallback((Q=l.current)=>{var j,_,H,L,z,F;if(!Q)return;let C=null;try{C=Q.contentDocument}catch{return}if(!C)return;const M=()=>{let ee=null;try{ee=Q.contentDocument}catch{return}ee&&XP(ee)},Z=()=>{M(),Q.contentWindow&&GP(Q.contentWindow,M)},E=Q.contentWindow;Z(),(j=E==null?void 0:E.requestAnimationFrame)==null||j.call(E,Z),(_=E==null?void 0:E.setTimeout)==null||_.call(E,Z,80),(H=E==null?void 0:E.setTimeout)==null||H.call(E,Z,250),(L=E==null?void 0:E.setTimeout)==null||L.call(E,Z,500),(z=E==null?void 0:E.setTimeout)==null||z.call(E,Z,1e3),(F=E==null?void 0:E.setTimeout)==null||F.call(E,Z,2e3)},[l]),k=d.useCallback(async(Q=l.current)=>{A(Q)},[A,l]);y.current=k;const $=d.useCallback(async Q=>{f()},[f]);return Qt(()=>{n(ep).then(Q=>{if(Q){try{const C=JSON.parse(Q);if(!Array.isArray(C.motions)||C.motions.length===0)return}catch{return}return r(ep,JSON.stringify({version:1,motions:[]}))}}).catch(()=>{})}),Qt(()=>{const Q=M=>{const Z=mP(M);if(!Z)return;const E=Date.now()-c.current<4e3;if(m!=null&&m.current.has(Z)){m.current.delete(Z);return}E||f()},C=new EventSource("/api/events");return C.addEventListener("file-change",Q),()=>C.close()}),{domTextCommitVersionRef:p,domEditSaveQueueRef:O,applyStudioManualEditsToPreviewRef:y,queueDomEditSave:S,waitForPendingDomEditSaves:w,applyCurrentStudioManualEditsToPreview:A,applyStudioManualEditsToPreview:k,syncHistoryPreviewAfterApply:$}}function Vs(t){return t.label||t.id||t.tag}function j3(t){const e=t.trim(),n=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(n).replace(/\\/g,"/").replace(/^\.?\//,"")}function JP(t,e){const n=j3(t).split("/").filter(Boolean),r=j3(e).split("/").filter(Boolean);for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return[...n.map(()=>".."),...r].join("/")||e}function eZ(t){return/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(t)}function tZ(t,e){const n=e.trim();if(!n)return;const r=n.replace(/\\/g,"/");if(eZ(r))return r;const i=t==null?void 0:t.trim().replace(/\\/g,"/").replace(/\/+$/,"");if(i)return`${i}/${r.replace(/^\.?\//,"")}`}function Z2(t,e){const n=e.trim();return n&&(["border-radius","border-width","font-size","letter-spacing"].includes(t)&&/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n)}function R3(t){return/^url\(/i.test(t.trim())}function nZ(t){return t==="left"||t==="top"||t==="width"||t==="height"}function BS(t){if(!t||typeof t!="object")return null;const e=t;return e.nodeType===1?t:e.nodeType===3&&e.parentElement?e.parentElement:null}function N3(t){const e=BS(t);return e?!!e.closest("input, textarea, select, [contenteditable='true'], [role='textbox'], .cm-editor"):!1}function G0(t){const n=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/i.test(navigator.platform)?"Cmd":"Ctrl";return t==="undo"?`${n}+Z`:`${n}+Shift+Z`}function sp(t,e){const n=t.sourceFile||"index.html";for(const r of e){const i=r.sourceFile||"index.html";if(t.id&&r.domId===t.id&&i===n||t.isCompositionHost&&t.compositionSrc&&r.compositionSrc===t.compositionSrc||t.selector&&r.selector===t.selector&&(r.selectorIndex??0)===(t.selectorIndex??0)&&(r.sourceFile??"index.html")===t.sourceFile)return r.key??r.id}return null}function rZ(t,e){if(!e||!Number.isFinite(e.start)||!Number.isFinite(e.duration))return null;const n=Math.max(0,e.start),r=Math.max(n,n+Math.max(0,e.duration)),i=Number.isFinite(t)?t:n;return ru(i,n,r)}function ru(t,e,n){return n<e?e:Math.min(Math.max(t,e),n)}function jg(t){return Array.from(t.matchAll(/\bid="([^"]+)"/g),e=>e[1]??"")}const K0={image:3,video:5,audio:5};async function V3(t,e,n){if(n==="image")return K0.image;const r=document.createElement(n==="video"?"video":"audio");r.preload="metadata",r.src=`/api/projects/${t}/preview/${e}`;const i=await new Promise(l=>{const o=window.setTimeout(()=>l(K0[n]),3e3),c=f=>{window.clearTimeout(o),l(f)};r.addEventListener("loadedmetadata",()=>{const f=Number(r.duration);c(Number.isFinite(f)&&f>0?Math.round(f*100)/100:K0[n])},{once:!0}),r.addEventListener("error",()=>c(K0[n]),{once:!0})});return r.src="",r.load(),i}function qS(t){return t.domId?{id:t.domId,selector:t.selector,selectorIndex:t.selectorIndex}:t.selector?{selector:t.selector,selectorIndex:t.selectorIndex}:null}function L3(t,e,n){try{const r=t==null?void 0:t.contentDocument;if(!r)return;const i=e.domId?r.getElementById(e.domId):e.selector?r.querySelectorAll(e.selector)[e.selectorIndex??0]??null:null;if(!i)return;for(const[l,o]of n)i.setAttribute(l,o)}catch{}}function iZ(t,e,n,r){if(r.playbackStart!=null)return{attrName:n.playbackStartAttr==="playback-start"?"playback-start":"media-start",value:r.playbackStart};const i=r.start-n.start;if(i===0)return null;const l=M3(t,e,"playback-start")??M3(t,e,"media-start"),o=l!=null?parseFloat(l):void 0;return o==null||!Number.isFinite(o)?null:{attrName:n.playbackStartAttr==="playback-start"?"playback-start":"media-start",value:Math.max(0,o+i*Math.max(n.playbackRate??1,.1))}}async function aZ(t){const e=t.element.sourceFile||t.activeCompPath||"index.html",n=await op(t.projectId,e),r=qS(t.element);if(!r)throw new Error(`Timeline element ${t.element.id} is missing a patchable target`);const i=t.buildPatches(n,r);if(i===n)throw new Error(`Unable to patch timeline element ${t.element.id} in ${e}`);t.pendingTimelineEditPathRef.current.add(e),t.domEditSaveTimestampRef.current=Date.now(),await Tl({projectId:t.projectId,label:t.label,kind:"timeline",files:{[e]:i},readFile:async()=>n,writeFile:t.writeProjectFile,recordEdit:t.recordEdit}),t.domEditSaveTimestampRef.current=Date.now()}async function op(t,e){const n=await fetch(`/api/projects/${t}/files/${encodeURIComponent(e)}`);if(!n.ok)throw new Error(`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}function lZ({projectId:t,activeCompPath:e,timelineElements:n,showToast:r,writeProjectFile:i,recordEdit:l,domEditSaveTimestampRef:o,reloadPreview:c,previewIframeRef:f,pendingTimelineEditPathRef:m,uploadProjectFiles:p}){const O=d.useRef(t);O.current=t;const y=d.useRef(Promise.resolve()),b=d.useRef(0),S=d.useCallback((M,Z,E)=>{const j=O.current;if(!j)return Promise.resolve();const _=y.current.then(()=>aZ({projectId:j,element:M,activeCompPath:e,label:Z,buildPatches:E,writeProjectFile:i,recordEdit:l,domEditSaveTimestampRef:o,pendingTimelineEditPathRef:m}));return y.current=_.catch(H=>{console.error(`[Timeline] Failed to persist: ${Z}`,H)}),_},[e,l,i,o,m]),w=d.useCallback((M,Z)=>(L3(f.current,M,[["data-start",vn(Z.start)],["data-track-index",String(Z.track)]]),S(M,"Move timeline clip",(E,j)=>{let _=Oc(E,j,{type:"attribute",property:"start",value:vn(Z.start)});return Oc(_,j,{type:"attribute",property:"track-index",value:String(Z.track)})})),[f,S]),A=d.useCallback((M,Z)=>(L3(f.current,M,[["data-start",vn(Z.start)],["data-duration",vn(Z.duration)]]),S(M,"Resize timeline clip",(E,j)=>{const _=iZ(E,j,M,Z);let H=Oc(E,j,{type:"attribute",property:"start",value:vn(Z.start)});return H=Oc(H,j,{type:"attribute",property:"duration",value:vn(Z.duration)}),_&&(H=Oc(H,j,{type:"attribute",property:_.attrName,value:vn(_.value)})),H})),[f,S]),k=d.useCallback(async M=>{const Z=O.current;if(!Z)throw new Error("No active project");const E=Vs(M),j=M.sourceFile||e||"index.html";try{const _=await op(Z,j),H=qS(M);if(!H)throw new Error(`Timeline element ${M.id} is missing a patchable target`);const L=await fetch(`/api/projects/${Z}/file-mutations/remove-element/${encodeURIComponent(j)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:H})});if(!L.ok)throw new Error(`Failed to delete ${M.id} from ${j}`);const z=await L.json(),F=typeof z.content=="string"?z.content:_;o.current=Date.now(),await Tl({projectId:Z,label:"Delete timeline clip",kind:"timeline",files:{[j]:F},readFile:async()=>_,writeFile:i,recordEdit:l}),ge.getState().setElements(n.filter(ee=>(ee.key??ee.id)!==(M.key??M.id))),ge.getState().setSelectedElementId(null),c(),r(`Deleted ${E}. Use Undo to restore it.`,"info")}catch(_){const H=_ instanceof Error?_.message:"Failed to delete timeline clip";r(H)}},[e,l,r,n,i,o,c]),$=d.useCallback(async(M,Z,E)=>{const j=O.current;if(!j)throw new Error("No active project");const _=d3(M);if(!_){r("Only image, video, and audio assets can be dropped onto the timeline.");return}const H=e||"index.html";try{const L=await op(j,H),z=Number(vn(Z.start)),F=Number.isFinite(E)&&E!=null&&E>0?E:await V3(j,M,_),ee=Number(vn(F)),W=wE(M,jg(L)),V=AE(H,M),G=H||"index.html",q=n.filter(P=>(P.sourceFile||e||"index.html")===G),B=Math.max(1,q.length+1),D=vg(L,ME({id:W,assetPath:V,kind:_,start:z,duration:ee,track:Z.track,zIndex:B,geometry:Ev(L)}));o.current=Date.now(),await Tl({projectId:j,label:"Add timeline asset",kind:"timeline",files:{[H]:D},readFile:async()=>L,writeFile:i,recordEdit:l}),c()}catch(L){const z=L instanceof Error?L.message:"Failed to drop asset onto timeline";r(z)}},[e,l,r,n,i,o,c]),Q=d.useCallback(async(M,Z)=>{const E=O.current;if(!E)return;const j=await p(M);if(j.length===0)return;const _=[];for(const L of j){const z=d3(L),F=z?await V3(E,L,z):0;_.push(Number(vn(F)))}const H=kE(Z??{start:0,track:0},_,n.filter(L=>(L.sourceFile||e||"index.html")===(e||"index.html")).map(L=>({start:L.start,duration:L.duration,track:L.track})));for(const[L,z]of j.entries())await $(z,H[L]??H[0],_[L])},[e,$,n,p]),C=d.useCallback(M=>{const Z=Date.now();Z-b.current<1500||(b.current=Z,r("This clip can't be moved or resized from the timeline yet.","info"))},[r]);return{handleTimelineElementMove:w,handleTimelineElementResize:A,handleTimelineElementDelete:k,handleTimelineAssetDrop:$,handleTimelineFileDrop:Q,handleBlockedTimelineEdit:C}}function sZ(t){try{const e=t==null?void 0:t.contentDocument;if(!e)return 0;let n=0;for(const r of e.body.querySelectorAll("*")){const i=parseInt(getComputedStyle(r).zIndex,10);Number.isFinite(i)&&i>n&&(n=i)}return n}catch{return 0}}function oZ(t,e){const n=new Set(e);if(!n.has(t))return t;let r=2;for(;n.has(`${t}_${r}`);)r++;return`${t}_${r}`}async function j2(t){const{projectId:e,blockName:n,activeCompPath:r,placement:i,visualPosition:l,timelineElements:o,readProjectFile:c,writeProjectFile:f,recordEdit:m,refreshFileTree:p,reloadPreview:O,showToast:y}=t;try{const b=await fetch(`/api/projects/${e}/registry/install`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({blockName:n})});if(!b.ok){const k=await b.json().catch(()=>({error:"Install failed"}));return y(k.error||"Failed to install block"),null}const{written:S,block:w}=await b.json(),A=S.find(k=>k.endsWith(".html"))??S[0];if(!A)return y("Installed but no composition file was written"),null;if(w.type==="hyperframes:component"){const k=await c(A),$=k.replace(/background:\s*(?:#(?:0a0a0a|000000|000|0a0805)|rgba?\([^)]*\))\s*;/g,"background: transparent;");$!==k&&await f(A,$)}{const k=r||"index.html",$=await c(k),Q=jg($),C=oZ(w.name,Q),M=k||"index.html",Z=o.filter(X=>(X.sourceFile||r||"index.html")===M),E=w.type==="hyperframes:block",j=Ev($),_=t.currentTime??0,H=Number(vn(i?i.start:_)),z=("duration"in w?w.duration:void 0)??Z.reduce((X,Y)=>Math.max(X,(Y.start??0)+(Y.duration??0)),10),F=(i==null?void 0:i.track)??(E?0:Z.length>0?Math.max(...Z.map(X=>X.track))+1:1),ee=sZ(t.previewIframe??null)+1,W=j.width,V=j.height,G=l?Math.round(l.left):0,q=l?Math.round(l.top):0,B=["<div",` data-composition-id="${C}"`,` data-composition-src="${A}"`,` data-start="${vn(H)}"`,` data-duration="${vn(z)}"`,` data-track-index="${F}"`,` data-width="${W}"`,` data-height="${V}"`,` style="position: absolute; left: ${G}px; top: ${q}px; width: ${W}px; height: ${V}px; z-index: ${ee}"`,"></div>"].join(`
|
|
85
|
-
`);let D=vg($,B);const P=H+z,R=D.match(/(<[^>]*data-composition-id="[^"]*"[^>]*data-duration=")([^"]*)(")/);if(R){const X=parseFloat(R[2]);P>X&&(D=D.replace(R[0],`${R[1]}${vn(P)}${R[3]}`))}await Tl({projectId:e,label:`Add ${E?"block":"component"}: ${w.title}`,kind:"timeline",files:{[k]:D},readFile:async()=>$,writeFile:f,recordEdit:m})}return await p(),O(),{block:w,compositionPath:A}}catch(b){const S=b instanceof Error?b.message:"Failed to add block";return y(S),null}}const cZ={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},uZ="VITE_STUDIO_ENABLE_PREVIEW_MANUAL_DRAGGING",fZ="VITE_STUDIO_ENABLE_INSPECTOR_PANELS",dZ="VITE_STUDIO_ENABLE_MOTION_PANEL",hZ=new Set(["1","true","yes","on","enabled"]),mZ=new Set(["0","false","no","off","disabled"]);function Rf(t,e,n){for(const r of e){const i=t[r];if(typeof i=="boolean")return i;if(typeof i!="string")continue;const l=i.trim().toLowerCase();if(l){if(hZ.has(l))return!0;if(mZ.has(l))return!1}}return n}const pZ=typeof window<"u"?window.__HF_STUDIO_ENV__??{}:{},Nf={...cZ??{},...pZ},gZ=Rf(Nf,[uZ,"VITE_STUDIO_PREVIEW_MANUAL_EDITING_ENABLED"],!0),on=Rf(Nf,[fZ,"VITE_STUDIO_INSPECTOR_PANELS_ENABLED"],!0),Rg=Rf(Nf,[dZ,"VITE_STUDIO_MOTION_PANEL_ENABLED"],!1),R2=Rf(Nf,["VITE_STUDIO_ENABLE_BLOCKS_PANEL","VITE_STUDIO_BLOCKS_PANEL_ENABLED"],!1),cp=on,_3="Manual editing is temporarily disabled",IS=["position","display","top","left","right","bottom","inset","width","height","gap","justify-content","align-items","flex-direction","font-size","font-style","font-weight","font-family","line-height","letter-spacing","text-align","text-transform","color","background-color","background-image","opacity","mix-blend-mode","border-radius","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","outline-color","overflow","clip-path","box-shadow","filter","backdrop-filter","z-index","transform","object-fit","object-position"];function Gr(t){return typeof t=="object"&&t!==null&&"nodeType"in t&&typeof t.nodeType=="number"&&t.nodeType===1}function Za(t){if(!t)return null;const e=t.trim();if(!e.endsWith("px"))return null;const n=parseFloat(e);return Number.isFinite(n)?n:null}function OZ(t){const e=(t??"none").trim();if(!e||e==="none")return!0;const n=e.match(/^matrix\(([^)]+)\)$/i);if(n){const o=n[1].split(",").map(c=>Number.parseFloat(c.trim()));return o.length!==6||o.some(c=>!Number.isFinite(c))?!1:Math.abs(o[0]-1)<1e-4&&Math.abs(o[1])<1e-4&&Math.abs(o[2])<1e-4&&Math.abs(o[3]-1)<1e-4&&Math.abs(o[4])<1e-4&&Math.abs(o[5])<1e-4}const r=e.match(/^matrix3d\(([^)]+)\)$/i);if(!r)return!1;const i=r[1].split(",").map(o=>Number.parseFloat(o.trim()));if(i.length!==16||i.some(o=>!Number.isFinite(o)))return!1;const l=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return i.every((o,c)=>Math.abs(o-l[c])<1e-4)}function xZ(t){return["div","span","p","strong","h1","h2","h3","h4","h5","h6"].includes(t)}function US(t){var r;const e={},n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);if(!n)return e;for(const i of IS){const l=n.getPropertyValue(i);l&&(e[i]=l)}return e}function WS(t){const e={};for(const n of IS){const r=t.style.getPropertyValue(n);r&&(e[n]=r)}return e}function yZ(t){const e={};for(const n of t.attributes)n.name.startsWith("data-")&&(e[n.name.slice(5)]=n.value);return e}function up(t,e){let n=t;for(;n;){const r=n;if(e.some(i=>r.hasAttribute(i)))return r;n=n.parentElement}return null}function kl(t,e){const n=up(t,["data-composition-file","data-composition-src"]),r=up(t,["data-composition-id"]),i=(n==null?void 0:n.getAttribute("data-composition-file"))??(n==null?void 0:n.getAttribute("data-composition-src"))??(r==null?void 0:r.getAttribute("data-composition-file"))??(r==null?void 0:r.getAttribute("data-composition-src"))??e??"index.html";return{sourceFile:i,compositionPath:i}}function D3(t){const e=t==null?void 0:t.trim();if(!e)return;let n=e;try{n=new URL(e,"http://studio.local").pathname}catch{n=e}for(const r of["/preview/comp/","/preview/"]){const i=n.indexOf(r);if(i<0)continue;return n.slice(i+r.length).replace(/^\/+/,"")||e}return e}function GS(t){const e=globalThis.CSS;if(typeof(e==null?void 0:e.escape)=="function")return e.escape(t);if(t==="-")return"\\-";let n="";for(let r=0;r<t.length;r+=1){const i=t[r]??"",l=i.charCodeAt(0);if(l===0){n+="�";continue}const o=l>=48&&l<=57,c=l>=65&&l<=90,f=l>=97&&l<=122,m=l>=1&&l<=31||l===127,p=r===0&&o,O=r===1&&t.startsWith("-")&&o;if(m||p||O){n+=`\\${l.toString(16)} `;continue}if(c||f||o||i==="-"||i==="_"||l>=128){n+=i;continue}n+=`\\${i}`}return n}function fp(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\a ").replace(/\r/g,"\\d ").replace(/\f/g,"\\c ")}function dp(t,e){try{return Array.from(t.querySelectorAll(e))}catch{return[]}}function J0(t){var e;return((e=t.replace(/\.html$/i,"").replace(/^compositions\//i,"").split("/").at(-1))==null?void 0:e.replace(/[-_]+/g," ").replace(/\b\w/g,n=>n.toUpperCase()))??t}function KS(t){if(t.id)return`#${GS(t.id)}`;const e=t.getAttribute("data-composition-id");return e?`[data-composition-id="${fp(e)}"]`:JS(t)}function JS(t){const e=Array.from(t.classList).map(r=>r.trim()).filter(Boolean);if(e.length===0)return;const n=e.find(r=>r!=="clip"&&!r.startsWith("__hf-"))??e[0];return n?`.${GS(n)}`:void 0}function e7(t,e,n,r,i){if(!(n!=null&&n.startsWith(".")))return;const o=dp(t,n).filter(c=>Gr(c)&&kl(c,i).sourceFile===r).indexOf(e);return o>=0?o:void 0}function Ng(t){const e=t.ownerDocument.defaultView;if(!e)return!0;let n=t;for(;n;){const r=e.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;const i=Number.parseFloat(r.opacity);if(Number.isFinite(i)&&i<=.01)return!1;n=n.parentElement}return!0}const H3=new Set(["img","video","canvas","svg","audio"]);function bZ(t){const e=t.tagName.toLowerCase();if(H3.has(e))return!1;const{children:n}=t;if(n.length===0)return(t.textContent??"").trim().length===0;for(let r=0;r<n.length;r+=1){const i=n[r];if(Gr(i)&&(H3.has(i.tagName.toLowerCase())||Ng(i)))return!1}return!0}function vZ(t){const e=t.getBoundingClientRect();return!(e.width<=1||e.height<=1||!Ng(t)||bZ(t))}const SZ=new Set(["base","br","canvas","link","meta","script","source","style","template","track","wbr"]);function wZ(t){var r;const e=t.tagName.toLowerCase();if(SZ.has(e))return!1;const n=(r=t.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(t);return!((n==null?void 0:n.display)==="none"||(n==null?void 0:n.visibility)==="hidden")}function Vf(t,e){if(!wZ(t)||t.hasAttribute("data-composition-id"))return null;const n=KS(t);if(!n)return null;const{sourceFile:r}=kl(t,e);return{id:t.id||void 0,selector:n,selectorIndex:e7(t.ownerDocument,t,n,r,e),sourceFile:r}}function AZ(t){let e=t;for(;e;){if(e.classList.contains("clip")&&(!(e.hasAttribute("data-composition-src")||e.hasAttribute("data-composition-file"))||e===t))return e;e=e.parentElement}return null}function kZ(t,e){if(e.preferClipAncestor){const n=AZ(t);if(n)return n}return t}function MZ(t,e){const n=[];for(const i of t)Gr(i)&&vZ(i)&&Vf(i,e.activeCompositionPath)&&n.push(i);if(n.length===0)return null;let r=n[0];for(let i=1;i<n.length;i++){const l=n[i];r.contains(l)&&(r=l)}return r}function Yn(t,e,n=null){if(e.id){const i=t.getElementById(e.id);if(Gr(i)&&(!e.sourceFile||kl(i,n).sourceFile===e.sourceFile))return i}return e.selector?e.selector.startsWith(".")&&e.selectorIndex!=null?dp(t,e.selector).filter(l=>Gr(l)&&(!e.sourceFile||kl(l,n).sourceFile===e.sourceFile))[e.selectorIndex]??null:dp(t,e.selector).filter(i=>Gr(i)&&(!e.sourceFile||kl(i,n).sourceFile===e.sourceFile))[0]??null:null}function TZ(t,e,n){var O;const r=typeof e.id=="string"?e.id:"",i=D3(e.compositionSrc)??((O=n.compIdToSrc)==null?void 0:O.get(r)),l=i??D3(e.sourceFile)??n.activeCompositionPath??"index.html",o=fp(r),c=i?fp(i):null,f=e.selector??(i?`[data-composition-src="${c}"],[data-composition-file="${c}"],[data-composition-id="${o}"]`:o?`[data-composition-id="${o}"]`:void 0);if(f||e.domId){const y=Yn(t,{id:e.domId??void 0,selector:f,selectorIndex:e.selectorIndex,sourceFile:l},n.activeCompositionPath);if(y)return y}const m=!!(e.domId||e.selector||i);if(n.isMasterView||m||!n.activeCompositionPath)return null;const p=t.querySelector("[data-composition-id]");return Gr(p)&&kl(p,n.activeCompositionPath).sourceFile===l?p:null}function CZ(t,e){return Array.from(t.children).filter(n=>Gr(n)&&Vf(n,e.activeCompositionPath)!==null)}function N2(t){return xZ(t.tagName.toLowerCase())&&t.children.length===0}function EZ(t,e,n,r){return r==="self"||n===1?"Content":`Text ${e+1}`}function V2(t,e,n,r){const i=t.tagName.toLowerCase();return{key:t.getAttribute("data-hf-text-key")??`${r}:${e}:${i}`,label:EZ(i,e,n,r),value:t.textContent??"",tagName:i,attributes:Array.from(t.attributes).filter(o=>o.name!=="style").map(o=>({name:o.name,value:o.value})),inlineStyles:WS(t),computedStyles:US(t),source:r}}function $Z(t){const e=Array.from(t.children).filter(Gr).filter(N2);if(e.length>0){if(Array.from(t.childNodes).some(r=>{var i;return r.nodeType===3&&((i=r.textContent)==null?void 0:i.trim())})){const r=[];let i=0;for(const l of t.childNodes)if(l.nodeType===3){const o=l.textContent??"";if(!o.trim())continue;r.push({key:`text-node:${i}`,label:`Text ${i+1}`,value:o,tagName:"#text",attributes:[],inlineStyles:{},computedStyles:{},source:"text-node"}),i++}else Gr(l)&&N2(l)&&(r.push(V2(l,i,e.length,"child")),i++);return r}return e.map((r,i)=>V2(r,i,e.length,"child"))}return N2(t)?[V2(t,0,1,"self")]:[]}function X3(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function QZ(t){const e=Object.entries(t.inlineStyles).filter(([,n])=>!!n);return e.length===0?"":e.map(([n,r])=>`${n}: ${r}`).join("; ")}function z3(t){return t.filter(e=>e.source==="child"||e.source==="text-node").map(e=>{if(e.source==="text-node")return X3(e.value);const n=[...e.attributes.filter(l=>l.name!=="data-hf-text-key"),{name:"data-hf-text-key",value:e.key}].map(l=>` ${l.name}="${l.value.replace(/"/g,""")}"`).join(""),r=QZ(e),i=r?` style="${r.replace(/"/g,""")}"`:"";return`<${e.tagName}${n}${i}>${X3(e.value)}</${e.tagName}>`}).join("")}function PZ(t){var e,n,r,i;return{key:`child:new:${Date.now()}`,label:"Text",value:"New text",tagName:"span",attributes:[],inlineStyles:{"font-family":((e=t==null?void 0:t.computedStyles)==null?void 0:e["font-family"])??"inherit","font-size":((n=t==null?void 0:t.computedStyles)==null?void 0:n["font-size"])??"16px","font-weight":((r=t==null?void 0:t.computedStyles)==null?void 0:r["font-weight"])??"400",color:((i=t==null?void 0:t.computedStyles)==null?void 0:i.color)??"inherit"},computedStyles:{},source:"child"}}function ZZ(t){if(!t.selector||t.isInsideLockedComposition)return{canSelect:!t.isInsideLockedComposition,canEditStyles:!1,canMove:!1,canResize:!1,canApplyManualOffset:!1,canApplyManualSize:!1,canApplyManualRotation:!1,reasonIfDisabled:t.isInsideLockedComposition?"This element belongs to a locked composition.":"Studio could not resolve a stable patch target for this element."};const e=t.computedStyles.position,n=Za(t.inlineStyles.left)??Za(t.computedStyles.left),r=Za(t.inlineStyles.top)??Za(t.computedStyles.top),i=Za(t.inlineStyles.width)??Za(t.computedStyles.width),l=Za(t.inlineStyles.height)??Za(t.computedStyles.height),o=!OZ(t.computedStyles.transform),c=(e==="absolute"||e==="fixed")&&n!=null&&r!=null&&!o,f=c&&(i!=null||l!=null),m=!t.isCompositionHost,p=m,O=m,y=m,b=m?void 0:"Select an internal layer to transform it.";return t.isCompositionHost&&t.isMasterView?{canSelect:!0,canEditStyles:!1,canMove:c,canResize:f,canApplyManualOffset:p,canApplyManualSize:O,canApplyManualRotation:y,reasonIfDisabled:b}:{canSelect:!0,canEditStyles:!0,canMove:c,canResize:f,canApplyManualOffset:p,canApplyManualSize:O,canApplyManualRotation:y,reasonIfDisabled:b}}function t7(t){const e=t.getAttribute("data-composition-id");if(e&&e!=="main")return J0(e);const n=t.getAttribute("data-composition-src")??t.getAttribute("data-composition-file");if(n)return J0(n);if(t.id)return J0(t.id);const r=JS(t);if(r)return J0(r.replace(/^\./,""));const i=(t.textContent??"").trim().replace(/\s+/g," ");return i?i.length>40?`${i.slice(0,39)}…`:i:t.tagName.toLowerCase()}function n7(t,e){var i;if(!t)return null;const n=t.ownerDocument;let r=kZ(t,e);for(;r&&r!==n.body&&r!==n.documentElement;){const l=KS(r);if(!l){r=r.parentElement;continue}const{sourceFile:o,compositionPath:c}=kl(r,e.activeCompositionPath),f=e7(n,r,l,o,e.activeCompositionPath),m=r.getAttribute("data-composition-src")??r.getAttribute("data-composition-file")??void 0,p=WS(r),O=US(r),y=$Z(r),b=!!up(r,["data-timeline-locked"]),S=ZZ({selector:l,tagName:r.tagName.toLowerCase(),className:r.className,inlineStyles:p,computedStyles:O,isCompositionHost:!!m,isInsideLockedComposition:b,isMasterView:e.isMasterView}),w=r.getBoundingClientRect();return{element:r,id:r.id||void 0,selector:l,selectorIndex:f,sourceFile:o,compositionPath:c,compositionSrc:m,isCompositionHost:!!m,isInsideLockedComposition:b,label:t7(r),tagName:r.tagName.toLowerCase(),boundingBox:{x:w.left,y:w.top,width:w.width,height:w.height},textContent:((i=r.textContent)==null?void 0:i.trim())||null,dataAttributes:yZ(r),inlineStyles:p,computedStyles:O,textFields:y,capabilities:S}}return null}function r7(t){const e=t.selectorIndex??0;return`${t.sourceFile}:${t.id??t.selector??"layer"}:${e}`}function jZ(t,e,n=80){if(!t)return[];const r=[],i=(l,o)=>{if(r.length>=n)return;const c=Vf(l,e.activeCompositionPath);c&&r.push({key:r7(c),element:l,label:t7(l),tagName:l.tagName.toLowerCase(),depth:o,childCount:CZ(l,e).length,id:c.id??void 0,selector:c.selector??void 0,selectorIndex:c.selectorIndex,sourceFile:c.sourceFile});const f=c?o+1:o;for(const m of Array.from(l.children))if(Gr(m)&&(i(m,f),r.length>=n))return};return i(t,0),r}function e1(t,e){return{type:"inline-style",property:t,value:e}}function F3(t){return{type:"text-content",property:"text",value:t}}function Fr(t){return[t.sourceFile||"index.html",t.id??"",t.selector??"",t.selectorIndex??""].join("|")}function Vg(t){return t.textFields.length>0&&!t.isCompositionHost&&!t.isInsideLockedComposition}function RZ(t){return`x=${Math.round(t.x)}, y=${Math.round(t.y)}, width=${Math.round(t.width)}, height=${Math.round(t.height)}`}function Y3(t){return Object.entries(t).filter(([,e])=>e&&e!=="initial").map(([e,n])=>`${e}: ${n}`).join(`
|
|
86
|
-
`)}function NZ(t){return t.map(e=>`- key=${e.key}; tag=<${e.tagName}>; source=${e.source}; text=${JSON.stringify(e.value)}`).join(`
|
|
87
|
-
`)}function VZ({selection:t,currentTime:e,tagSnippet:n,selectionContext:r,userInstruction:i,sourceFilePath:l}){const o=(l==null?void 0:l.trim())||t.sourceFile,c=["## HyperFrames element edit request v1","Schema version: 1","",(i==null?void 0:i.trim())||"Edit this selected HyperFrames element.","",`Composition: ${t.compositionPath}`,`Playback time: ${Qn(e)}`,`Source file: ${o}`,`DOM id: ${t.id??"(none)"}`,`Selector: ${t.selector??"(none)"}`,`Selector index: ${t.selectorIndex??0}`,`Tag: <${t.tagName}>`,`Bounds: ${RZ(t.boundingBox)}`];t.textContent&&c.push(`Text: ${t.textContent}`);const f=r==null?void 0:r.trim();f&&c.push("","Selection context:",f);const m=NZ(t.textFields);m&&c.push("","Text fields:",m);const p=Y3(t.inlineStyles);p&&c.push("","Inline styles:",p);const O=Y3(t.computedStyles);return O&&c.push("","Computed styles (browser-resolved):",O),n&&c.push("","Target HTML:",n),c.push("","Guardrails:","- Make a targeted change to this element only.","- Preserve the rest of the composition and its timing.","- Do not modify other elements' data-* attributes or positioning.","- Prefer existing inline styles or existing CSS rules for this element over adding unrelated selectors."),c.join(`
|
|
88
|
-
`)}function LZ({activeCompPath:t,projectDir:e,projectIdRef:n,currentTime:r,showToast:i,domEditSelectionRef:l,domEditSelection:o}){const[c,f]=d.useState(),[m,p]=d.useState(),[O,y]=d.useState(null),[b,S]=d.useState(!1),[w,A]=d.useState(!1),k=d.useRef(null),$=d.useCallback(async M=>{const Z=n.current;if(!Z)return;const E=M.sourceFile||t||"index.html";try{const j=await fetch(`/api/projects/${Z}/files/${encodeURIComponent(E)}`);if(!j.ok)return;const H=(await j.json()).content,L=typeof H=="string"?tP(H,M):void 0;f(z=>l.current!==M?z:L)}catch{}},[t,l,n]),Q=d.useCallback(()=>{o&&(f(void 0),p(void 0),y(null),$(o),A(!0))},[o,$]),C=d.useCallback(async M=>{if(!o)return;const Z=o.sourceFile||t||"index.html",E=c??o.element.outerHTML,j=VZ({selection:o,currentTime:r,tagSnippet:E,selectionContext:m,userInstruction:M,sourceFilePath:tZ(e,Z)});if(!await Kc(j)){i("Could not copy prompt to clipboard.","error");return}A(!1),p(void 0),y(null),k.current&&clearTimeout(k.current),S(!0),k.current=setTimeout(()=>S(!1),1600)},[t,m,c,r,o,e,i]);return d.useEffect(()=>{f(void 0),p(void 0),y(null),S(!1)},[o]),d.useEffect(()=>()=>{k.current&&clearTimeout(k.current)},[]),{agentModalOpen:w,agentModalAnchorPoint:O,copiedAgentPrompt:b,agentPromptSelectionContext:m,setAgentModalOpen:A,setAgentPromptSelectionContext:p,setAgentModalAnchorPoint:y,preloadAgentPromptSnippet:$,handleAskAgent:Q,handleAgentModalSubmit:C}}function _Z(t,e,n,r,i){const l=t.getBoundingClientRect(),o=e.querySelector("[data-composition-id]")??e.documentElement??null,c=o==null?void 0:o.getBoundingClientRect(),f=(c==null?void 0:c.width)||n.innerWidth,m=(c==null?void 0:c.height)||n.innerHeight;if(!f||!m)return null;const p=l.width/f,O=l.height/m;return{x:(r-l.left)/p,y:(i-l.top)/O,viewport:{width:f,height:m}}}const DZ="__hf_studio_pointer_events_override__";function HZ(t){try{const e=t.createElement("style");return e.id=DZ,e.textContent="* { pointer-events: auto !important; }",t.head.appendChild(e),e}catch{return null}}function XZ(t){try{t==null||t.remove()}catch{}}function zZ(t,e,n,r){let i=null,l=null;try{i=t.contentDocument,l=t.contentWindow}catch{return null}if(!i||!l)return null;const o=_Z(t,i,l,e,n);if(!o)return null;const c=HZ(i);try{if(typeof i.elementsFromPoint=="function"){const m=MZ(i.elementsFromPoint(o.x,o.y),{activeCompositionPath:r});if(m)return m}const f=BS(i.elementFromPoint(o.x,o.y));return!f||!Vf(f,r)||!Ng(f)?null:f}finally{XZ(c)}}function t1(t){return t&&(typeof t=="object"||typeof t=="function")?t:null}function L2(t,e){const n=t?Reflect.get(t,e):null;if(typeof n=="function")try{n.call(t)}catch{}}function _2(t,e){const n=t?Reflect.get(t,e):null;if(typeof n!="function")return null;try{const r=n.call(t);return typeof r=="number"&&Number.isFinite(r)?r:null}catch{return null}}function FZ(t){const e=t==null?void 0:t.contentWindow;if(!e)return null;try{const n=t1(Reflect.get(e,"__player")),r=_2(n,"getTime");if(typeof(n?Reflect.get(n,"pause"):null)=="function")return L2(n,"pause"),r;let l=null;const o=t1(Reflect.get(e,"__timeline"));l=l??_2(o,"time"),L2(o,"pause");const c=t1(Reflect.get(e,"__timelines"));if(c)for(const f of Object.values(c)){const m=t1(f);l=l??_2(m,"time"),L2(m,"pause")}return l}catch{return null}}function bl(t,e){return t===e?!0:!t||!e?!1:Fr(t)===Fr(e)}function Vc(t,e){return e?t.some(n=>bl(n,e)):!1}function YZ(t,e){return Vc(t,e)?t.filter(n=>!bl(n,e)):[...t,e]}function BZ(t,e){let n=!1;const r=t.map(i=>bl(i,e)?(n=!0,e):i);return n?r:[...t,e]}function qZ(t,e){return!e||Vc(t,e)?t:[e,...t]}function IZ({projectId:t,activeCompPath:e,isMasterView:n,compIdToSrc:r,captionEditMode:i,previewIframeRef:l,timelineElements:o,setSelectedTimelineElementId:c,setRightCollapsed:f,setRightPanelTab:m,previewIframe:p,refreshKey:O,rightPanelTab:y}){const[b,S]=d.useState(null),[w,A]=d.useState([]),[k,$]=d.useState(null),Q=d.useRef(b),C=d.useRef(w),M=d.useRef(k);Q.current=b,C.current=w,M.current=k;const Z=d.useCallback((W,V)=>{if(!W){Q.current=null,C.current=[],S(null),A([]),c(null);return}if(!on){Q.current=null,C.current=[],S(null),A([]),c(null);return}const G=!!(V!=null&&V.additive),q=Q.current,B=C.current,D=G?qZ(B,q):B,P=Vc(D,W),R=V!=null&&V.preserveGroup?BZ(D,W):G?YZ(D,W):[W],X=V!=null&&V.preserveGroup?W:G&&P?bl(q,W)?R[0]??null:Vc(R,q)?q:R[0]??null:W;if(Q.current=X,C.current=R,S(X),A(R),X){(V==null?void 0:V.revealPanel)!==!1&&(f(!1),y!=="layers"&&m("design"));const Y=sp(X,o);c(Y);return}c(null)},[c,o,f,m,y]),E=d.useCallback(()=>{Z(null,{revealPanel:!1})},[Z]),j=d.useCallback((W,V)=>n7(W,{activeCompositionPath:e,isMasterView:n,preferClipAncestor:V==null?void 0:V.preferClipAncestor}),[e,n]),_=d.useCallback((W,V,G)=>{const q=l.current;if(!q||i)return null;const B=zZ(q,W,V,e);return B?j(B,{preferClipAncestor:G==null?void 0:G.preferClipAncestor}):null},[e,j,i,l]),H=d.useCallback(W=>{bl(M.current,W)||(M.current=W,$(W))},[]),L=d.useCallback(W=>{const V=l.current;let G=null;try{G=(V==null?void 0:V.contentDocument)??null}catch{return null}if(!G)return null;const q=TZ(G,W,{activeCompositionPath:e,compIdToSrc:r,isMasterView:n});return q?j(q,{preferClipAncestor:!1}):null},[e,j,r,n,l]),z=d.useCallback(W=>{if(!on)return;if(!W){Z(null,{revealPanel:!1});return}const V=L(W);V&&Z(V)},[Z,L]),F=d.useCallback(W=>{const V=l.current;let G=null;try{G=(V==null?void 0:V.contentDocument)??null}catch{return}if(!G)return;const q=Yn(G,W,e);if(!q)return;const B=j(q);B&&Z(B,{revealPanel:!1,preserveGroup:!0})},[e,Z,j,l]),ee=d.useCallback(W=>{const V=l.current;let G=null;try{G=(V==null?void 0:V.contentDocument)??null}catch{return}if(!G)return;const q=[];for(const P of W){const R=Yn(G,P,e);if(!R)continue;const X=j(R);X&&q.push(X)}if(q.length===0)return;const B=Q.current,D=q.find(P=>bl(P,B))??q[0]??null;Q.current=D,C.current=q,S(D),A(q),c(D?sp(D,o):null)},[e,j,c,o,l]);return d.useEffect(()=>{i&&H(null)},[i,H]),d.useEffect(()=>{H(null)},[e,t,p,O,H]),d.useEffect(()=>{if(!k)return;const W=bl(k,b),V=Vc(w,k);!W&&!V||H(null)},[w,k,b,H]),d.useEffect(()=>{k&&(k.element.isConnected||H(null))},[k,H]),d.useEffect(()=>{i&&Z(null,{revealPanel:!1})},[Z,i]),d.useEffect(()=>{on||(H(null),Z(null,{revealPanel:!1}),y!=="renders"&&m("renders"))},[Z,y,H,m]),{domEditSelection:b,domEditGroupSelections:w,domEditHoverSelection:k,domEditSelectionRef:Q,domEditGroupSelectionsRef:C,domEditHoverSelectionRef:M,setDomEditSelection:S,setDomEditGroupSelections:A,applyDomSelection:Z,clearDomSelection:E,buildDomSelectionFromTarget:j,resolveDomSelectionFromPreviewPoint:_,updateDomEditHoverSelection:H,buildDomSelectionForTimelineElement:L,handleTimelineElementSelect:z,refreshDomEditSelectionFromPreview:F,refreshDomEditGroupSelectionsFromPreview:ee}}function UZ({captionEditMode:t,compositionLoading:e,previewIframeRef:n,showToast:r,applyDomSelection:i,resolveDomSelectionFromPreviewPoint:l,updateDomEditHoverSelection:o,onClickToSource:c}){const f=d.useCallback((b,S)=>{if(!cp||t||e)return;const w=l(b.clientX,b.clientY,{preferClipAncestor:(S==null?void 0:S.preferClipAncestor)??!1});if(!w){b.shiftKey||i(null,{revealPanel:!1});return}b.preventDefault(),b.stopPropagation(),i(w,{additive:b.shiftKey}),!b.shiftKey&&b.altKey&&c&&c(w)},[i,t,e,c,l]),m=d.useCallback((b,S)=>{if(!cp||t||e)return o(null),null;const w=l(b.clientX,b.clientY,{preferClipAncestor:(S==null?void 0:S.preferClipAncestor)??!1});return o(w),w},[t,e,l,o]),p=d.useCallback(()=>{o(null)},[o]),O=d.useCallback(b=>{r(b.capabilities.reasonIfDisabled??"This element can't be adjusted directly from the preview.","info")},[r]),y=d.useCallback(()=>{const b=FZ(n.current),S=ge.getState();S.setIsPlaying(!1),b!=null&&(S.setCurrentTime(b),Qr.notify(b))},[n]);return{handlePreviewCanvasMouseDown:f,handlePreviewCanvasPointerMove:m,handlePreviewCanvasPointerLeave:p,handleBlockedDomMove:O,handleDomManualDragStart:y}}const B3=["ABeeZee","Abel","Abril Fatface","Alegreya","Alegreya Sans","Anton","Archivo","Archivo Black","Arimo","Assistant","Barlow","Barlow Condensed","Bebas Neue","Bitter","Bricolage Grotesque","Cabin","Cardo","Catamaran","Caveat","Chivo","Cormorant Garamond","Crimson Text","Dancing Script","DM Sans","DM Serif Display","Domine","EB Garamond","Exo 2","Figtree","Fira Code","Fira Sans","Fraunces","Fredoka","IBM Plex Mono","IBM Plex Sans","IBM Plex Serif","Inconsolata","Instrument Sans","Instrument Serif","Inter","JetBrains Mono","Josefin Sans","Jost","Kanit","Karla","Lato","League Gothic","Lexend","Libre Baskerville","Libre Franklin","Lora","Manrope","Merriweather","Montserrat","Mukta","Mulish","Newsreader","Noto Sans","Noto Sans JP","Noto Serif","Nunito","Nunito Sans","Open Sans","Oswald","Outfit","Overpass","Pacifico","Pathway Extreme","Permanent Marker","Playfair Display","Plus Jakarta Sans","Poppins","Prata","PT Sans","PT Serif","Public Sans","Quicksand","Raleway","Red Hat Display","Roboto","Roboto Condensed","Roboto Mono","Roboto Serif","Rubik","Schibsted Grotesk","Signika","Source Code Pro","Source Sans 3","Source Serif 4","Space Grotesk","Space Mono","Spectral","Sora","Syne","Teko","Titillium Web","Ubuntu","Ubuntu Mono","Unbounded","Urbanist","Varela Round","Work Sans","Young Serif","Zilla Slab"],hp=["TT Norms Pro","SF Pro Display","SF Pro Text","Avenir","Avenir Next","Helvetica Neue","Arial","Georgia","Times New Roman","Menlo","Monaco","Courier New"];function i7(t){return`https://fonts.googleapis.com/css2?family=${encodeURIComponent(t.trim()).replace(/%20/g,"+")}:wght@300;400;500;600;700;800;900&display=swap`}const WZ=new Set(["inherit","initial","revert","revert-layer","serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function GZ(t){return(t.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function KZ(t){var e;return((e=t.split(",")[0])==null?void 0:e.trim().replace(/^["']|["']$/g,"").trim())??""}function q3(t,e){const n=GZ(e);if(!n||WZ.has(n.toLowerCase()))return;const r=`studio-preview-google-font-${n.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(t.getElementById(r))return;const i=t.createElement("link");i.id=r,i.rel="stylesheet",i.href=i7(n),t.head.appendChild(i)}function I3(t,e){const n=`studio-imported-font-${e.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(t.getElementById(n))return;const r=t.createElement("style");r.id=n,r.textContent=wg(e),t.head.appendChild(r)}function U3(t,e,n){const r=wg(e,JP(n,e.path));if(t.includes(r))return t;const l=/<style\b[^>]*data-hf-studio-fonts=(["'])true\1[^>]*>([\s\S]*?)<\/style>/i.exec(t);if(l){const c=`${l[2].trim()}
|
|
89
|
-
${r}`.trim();return t.replace(l[0],`<style data-hf-studio-fonts="true">
|
|
90
|
-
${c}
|
|
91
|
-
</style>`)}const o=`<style data-hf-studio-fonts="true">
|
|
92
|
-
${r}
|
|
93
|
-
</style>`;return/<\/head>/i.test(t)?t.replace(/<\/head>/i,` ${o}
|
|
94
|
-
</head>`):`${o}
|
|
95
|
-
${t}`}function JZ({activeCompPath:t,previewIframeRef:e,domEditSelection:n,applyDomSelection:r,refreshDomEditSelectionFromPreview:i,buildDomSelectionFromTarget:l,persistDomEditOperations:o,resolveImportedFontAsset:c}){const f=d.useRef(0),m=d.useCallback(async(k,$)=>{if(!n||nZ(k)||!n.capabilities.canEditStyles)return;const Q=k==="font-family"?c($):null,C=e.current,M=C==null?void 0:C.contentDocument;if(M){const j=Yn(M,n,t);j&&(j.style.setProperty(k,Z2(k,$)),k==="font-family"&&(q3(M,$),Q&&I3(M,Q)),k==="background-image"&&R3($)&&(j.style.setProperty("background-position","center"),j.style.setProperty("background-repeat","no-repeat"),j.style.setProperty("background-size","contain")))}const Z=[e1(k,Z2(k,$))];k==="background-image"&&R3($)&&Z.push(e1("background-position","center"),e1("background-repeat","no-repeat"),e1("background-size","contain"));const E=k!=="z-index";try{await o(n,Z,{label:"Edit layer style",skipRefresh:E,prepareContent:Q?(j,_)=>U3(j,Q,_):void 0})}catch(j){console.warn("[Studio] Style persist failed:",j instanceof Error?j.message:j)}i(n)},[t,n,o,i,c,e]),p=d.useCallback(async(k,$)=>{if(!n)return;const Q=e.current,C=Q==null?void 0:Q.contentDocument;if(C){const Z=Yn(C,n,t);Z&&Z.setAttribute(`data-${k}`,$)}const M={type:"attribute",property:k,value:$};try{await o(n,[M],{label:`Edit ${k.replace(/-/g," ")}`,coalesceKey:`attr:${k}:${Fr(n)}`,skipRefresh:!1})}catch(Z){console.warn("[Studio] Attribute persist failed:",Z instanceof Error?Z.message:Z)}i(n)},[t,n,o,i,e]),O=d.useCallback(async(k,$)=>{if(!n)return;const Q=e.current,C=Q==null?void 0:Q.contentDocument;if(C){const Z=Yn(C,n,t);Z&&($===null||$===""||$==="false"?Z.removeAttribute(k):Z.setAttribute(k,$))}const M={type:"html-attribute",property:k,value:$};try{await o(n,[M],{label:`Edit ${k}`,coalesceKey:`html-attr:${k}:${Fr(n)}`,skipRefresh:!1})}catch(Z){console.warn("[Studio] HTML attribute persist failed:",Z instanceof Error?Z.message:Z)}i(n)},[t,n,o,i,e]),y=d.useCallback(async(k,$)=>{if(!n||!Vg(n))return;const Q=f.current+1;f.current=Q;const C=n.textFields.length>0?n.textFields.map(j=>j.key===$?{...j,value:k}:j):[],M=C.length>1||C.some(j=>j.source==="child")?z3(C):k,Z=e.current,E=Z==null?void 0:Z.contentDocument;if(E){const j=Yn(E,n,t);j&&(C.length>1||C.some(_=>_.source==="child")?j.innerHTML=M:j.textContent=k)}if(await o(n,[F3(M)],{label:"Edit text",skipRefresh:!0,shouldSave:()=>f.current===Q}),f.current===Q&&E){const j=Yn(E,n,t);if(j){const _=l(j);_&&r(_,{revealPanel:!1,preserveGroup:!0})}}},[t,r,l,n,o,e]),b=d.useCallback(async(k,$,Q)=>{var j;const C=$.length>1||$.some(_=>_.source==="child")?z3($):((j=$[0])==null?void 0:j.value)??"",M=e.current,Z=M==null?void 0:M.contentDocument;if(Z){const _=Yn(Z,k,t);_&&($.length>1||$.some(H=>H.source==="child")?_.innerHTML=C:_.textContent=C)}const E=(Q==null?void 0:Q.importedFont)??null;if(await o(k,[F3(C)],{label:"Edit text",skipRefresh:!0,prepareContent:E?(_,H)=>U3(_,E,H):void 0}),Z){const _=Yn(Z,k,t);if(_){const H=l(_);H&&r(H,{revealPanel:!1,preserveGroup:!0})}}},[t,r,l,o,e]),S=d.useCallback(async(k,$,Q)=>{var j;if(!n)return;const C=n.textFields.find(_=>_.key===k);if(!C)return;if(C.source==="self"){await m($,Q);return}const M=Z2($,Q),Z=$==="font-family"?c(Q):null;if($==="font-family"){const _=(j=e.current)==null?void 0:j.contentDocument;_&&(q3(_,M),Z&&I3(_,Z))}const E=n.textFields.map(_=>_.key===k?{..._,inlineStyles:{..._.inlineStyles,[$]:M},computedStyles:{..._.computedStyles,[$]:M}}:_);await b(n,E,{importedFont:Z})},[b,n,m,c,e]),w=d.useCallback(async k=>{if(!n||!n.textFields.some(Z=>Z.source==="child"))return null;const $=n.textFields.findIndex(Z=>Z.key===k),Q=n.textFields[$>=0?$:0]??n.textFields[0],C=PZ(Q),M=[...n.textFields];return M.splice($>=0?$+1:M.length,0,C),await b(n,M),C.key},[b,n]),A=d.useCallback(async k=>{if(!n)return;const $=n.textFields.find(C=>C.key===k);if(!$)return;if($.source==="self"){await y("",k);return}const Q=n.textFields.filter(C=>C.key!==k);await b(n,Q)},[b,n,y]);return{handleDomStyleCommit:m,handleDomAttributeCommit:p,handleDomHtmlAttributeCommit:O,handleDomTextCommit:y,commitDomTextFields:b,handleDomTextFieldStyleCommit:S,handleDomAddTextField:w,handleDomRemoveTextField:A}}function ej({activeCompPath:t,previewIframeRef:e,showToast:n,queueDomEditSave:r,writeProjectFile:i,domEditSaveTimestampRef:l,editHistory:o,fileTree:c,importedFontAssetsRef:f,projectId:m,projectIdRef:p,reloadPreview:O,domEditSelection:y,applyDomSelection:b,clearDomSelection:S,refreshDomEditSelectionFromPreview:w,buildDomSelectionFromTarget:A}){const k=d.useCallback(D=>{const P=KZ(D);if(!P)return null;const R=f.current.find(Y=>Y.family.toLowerCase()===P.toLowerCase());if(R)return R;const X=c.find(Y=>Z1.test(Y)&&ao(Y).toLowerCase()===P.toLowerCase());return X?{family:ao(X),path:X,url:`/api/projects/${m}/preview/${X}`}:null},[c,m,f]),$=d.useCallback(async(D,P,R)=>{const X=p.current;if(!X)throw new Error("No active project");if(R!=null&&R.shouldSave&&!R.shouldSave())return;const Y=D.sourceFile||t||"index.html",U=await fetch(`/api/projects/${X}/files/${encodeURIComponent(Y)}`);if(!U.ok)throw new Error(`Failed to read ${Y}`);const ne=(await U.json()).content;if(typeof ne!="string")throw new Error(`Missing file contents for ${Y}`);if(R!=null&&R.shouldSave&&!R.shouldSave())return;const ce={id:D.id,selector:D.selector,selectorIndex:D.selectorIndex},me=await fetch(`/api/projects/${X}/file-mutations/patch-element/${encodeURIComponent(Y)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:ce,operations:P})});if(!me.ok)throw new Error(`Failed to patch ${Y}`);const Se=await me.json();if(!Se.changed)throw new Error(`Unable to patch ${D.selector??D.id??"selection"}`);const pe=typeof Se.content=="string"?Se.content:ne;let ae=pe;R!=null&&R.prepareContent&&(ae=R.prepareContent(pe,Y),ae!==pe&&await i(Y,ae)),await o.recordEdit({label:(R==null?void 0:R.label)??"Edit layer",kind:"manual",coalesceKey:R==null?void 0:R.coalesceKey,files:{[Y]:{before:ne,after:ae}}}),R!=null&&R.skipRefresh?l.current=Date.now():O()},[t,o,i,p,l,O]),{handleDomStyleCommit:Q,handleDomAttributeCommit:C,handleDomHtmlAttributeCommit:M,handleDomTextCommit:Z,commitDomTextFields:E,handleDomTextFieldStyleCommit:j,handleDomAddTextField:_,handleDomRemoveTextField:H}=JZ({activeCompPath:t,previewIframeRef:e,domEditSelection:y,applyDomSelection:b,refreshDomEditSelectionFromPreview:w,buildDomSelectionFromTarget:A,persistDomEditOperations:$,resolveImportedFontAsset:k}),L=d.useCallback((D,P,R)=>{r(async()=>{await $(D,P,{label:R.label,coalesceKey:R.coalesceKey,skipRefresh:R.skipRefresh??!0})}).catch(X=>{const Y=X instanceof Error?X.message:"Failed to save position";n(Y),Nt("save_failure",{source:"dom_edit",label:R.label,error_message:Y})})},[$,r,n]),z=d.useCallback((D,P)=>{G1(D.element,P),L(D,Z3(D.element),{label:"Move layer",coalesceKey:`path-offset:${Fr(D)}`})},[L]),F=d.useCallback(D=>{if(D.length===0)return;const P=D.map(R=>Fr(R.selection)).sort().join(":");for(const{selection:R,next:X}of D)G1(R.element,X),L(R,Z3(R.element),{label:`Move ${D.length} layers`,coalesceKey:`group-path-offset:${P}`})},[L]),ee=d.useCallback((D,P)=>{Cg(D.element,P),L(D,NP(D.element),{label:"Resize layer box",coalesceKey:`box-size:${Fr(D)}`})},[L]),W=d.useCallback((D,P)=>{$g(D.element,P),L(D,LP(D.element),{label:"Rotate layer",coalesceKey:`rotation:${Fr(D)}`})},[L]),V=d.useCallback(D=>{const P=D.element,R=[...RP(P),...VP(P),..._P(P)];qP(P),UP(P),IP(P),L(D,R,{label:"Reset layer edits",coalesceKey:`manual-reset:${Fr(D)}`,skipRefresh:!1})},[L]),G=d.useCallback((D,P)=>{var Y;vP(D.element,P);let R=null;try{R=((Y=e.current)==null?void 0:Y.contentDocument)??null}catch{}R&&np(R);const X=DP(D.element);L(D,X,{label:"Set GSAP motion",coalesceKey:`motion:${Fr(D)}`}),w(D)},[L,e,w]),q=d.useCallback(D=>{var Y,U,te;const P=HP(D.element);let R;try{R=(U=(Y=e.current)==null?void 0:Y.contentWindow)==null?void 0:U.gsap}catch{}SP(D.element,R);let X=null;try{X=((te=e.current)==null?void 0:te.contentDocument)??null}catch{}X&&np(X),L(D,P,{label:"Clear GSAP motion",coalesceKey:`motion:${Fr(D)}`,skipRefresh:!1}),w(D)},[L,e,w]),B=d.useCallback(async D=>{const P=p.current;if(!P)return;const R=D.label||D.id||D.selector||D.tagName,X=D.sourceFile||t||"index.html";try{const Y=await fetch(`/api/projects/${P}/files/${encodeURIComponent(X)}`);if(!Y.ok)throw new Error(`Failed to read ${X}`);const te=(await Y.json()).content;if(typeof te!="string")throw new Error(`Missing file contents for ${X}`);const ne=D.id?{id:D.id,selector:D.selector,selectorIndex:D.selectorIndex}:D.selector?{selector:D.selector,selectorIndex:D.selectorIndex}:{};if(!ne.id&&!ne.selector)throw new Error("Selected element has no patchable target");const ce=await fetch(`/api/projects/${P}/file-mutations/remove-element/${encodeURIComponent(X)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:ne})});if(!ce.ok)throw new Error(`Failed to delete element from ${X}`);const me=await ce.json(),Se=typeof me.content=="string"?me.content:te;l.current=Date.now(),await Tl({projectId:P,label:"Delete element",kind:"timeline",files:{[X]:Se},readFile:async()=>te,writeFile:i,recordEdit:o.recordEdit}),S(),ge.getState().setSelectedElementId(null),O(),n(`Deleted ${R}. Use Undo to restore it.`,"info")}catch(Y){const U=Y instanceof Error?Y.message:"Failed to delete element";n(U)}},[t,S,l,o.recordEdit,p,O,n,i]);return{resolveImportedFontAsset:k,handleDomStyleCommit:Q,handleDomAttributeCommit:C,handleDomHtmlAttributeCommit:M,handleDomTextCommit:Z,commitDomTextFields:E,handleDomTextFieldStyleCommit:j,handleDomAddTextField:_,handleDomRemoveTextField:H,handleDomPathOffsetCommit:z,handleDomGroupPathOffsetCommit:F,handleDomBoxSizeCommit:ee,handleDomRotationCommit:W,handleDomManualEditsReset:V,handleDomMotionCommit:G,handleDomMotionClear:q,handleDomEditElementDelete:B}}function tj({projectId:t,activeCompPath:e,isMasterView:n,compIdToSrc:r,captionEditMode:i,compositionLoading:l,previewIframeRef:o,timelineElements:c,currentTime:f,setSelectedTimelineElementId:m,setRightCollapsed:p,setRightPanelTab:O,showToast:y,refreshPreviewDocumentVersion:b,queueDomEditSave:S,readProjectFile:w,writeProjectFile:A,domEditSaveTimestampRef:k,editHistory:$,fileTree:Q,importedFontAssetsRef:C,projectDir:M,projectIdRef:Z,previewIframe:E,refreshKey:j,rightPanelTab:_,applyStudioManualEditsToPreviewRef:H,syncPreviewHistoryHotkey:L,reloadPreview:z,setRefreshKey:F,openSourceForSelection:ee,selectSidebarTab:W,getSidebarTab:V}){const G=d.useCallback(Kt=>{!ee||!W||Kt.sourceFile&&(W("code"),ee(Kt.sourceFile,{id:Kt.id,selector:Kt.selector,selectorIndex:Kt.selectorIndex}))},[ee,W]),{domEditSelection:q,domEditGroupSelections:B,domEditHoverSelection:D,domEditSelectionRef:P,applyDomSelection:R,clearDomSelection:X,buildDomSelectionFromTarget:Y,resolveDomSelectionFromPreviewPoint:U,updateDomEditHoverSelection:te,buildDomSelectionForTimelineElement:ne,handleTimelineElementSelect:ce,refreshDomEditSelectionFromPreview:me}=IZ({projectId:t,activeCompPath:e,isMasterView:n,compIdToSrc:r,captionEditMode:i,previewIframeRef:o,timelineElements:c,setSelectedTimelineElementId:m,setRightCollapsed:p,setRightPanelTab:O,previewIframe:E,refreshKey:j,rightPanelTab:_}),{agentModalOpen:Se,agentModalAnchorPoint:pe,copiedAgentPrompt:ae,agentPromptSelectionContext:xe,setAgentModalOpen:Qe,setAgentPromptSelectionContext:$e,setAgentModalAnchorPoint:Ze,handleAskAgent:Je,handleAgentModalSubmit:Ue}=LZ({activeCompPath:e,projectDir:M,projectIdRef:Z,currentTime:f,showToast:y,domEditSelectionRef:P,domEditSelection:q}),{handlePreviewCanvasMouseDown:ve,handlePreviewCanvasPointerMove:bt,handlePreviewCanvasPointerLeave:nt,handleBlockedDomMove:Re,handleDomManualDragStart:kt}=UZ({captionEditMode:i,compositionLoading:l,previewIframeRef:o,showToast:y,applyDomSelection:R,resolveDomSelectionFromPreviewPoint:U,updateDomEditHoverSelection:te,onClickToSource:G}),{resolveImportedFontAsset:Fe,handleDomStyleCommit:Gt,handleDomAttributeCommit:Lt,handleDomHtmlAttributeCommit:st,handleDomTextCommit:tn,handleDomTextFieldStyleCommit:Ci,handleDomAddTextField:mr,handleDomRemoveTextField:Ne,handleDomPathOffsetCommit:Mt,handleDomGroupPathOffsetCommit:St,handleDomBoxSizeCommit:ze,handleDomRotationCommit:rt,handleDomManualEditsReset:Ye,handleDomMotionCommit:nn,handleDomMotionClear:Rn,handleDomEditElementDelete:pr}=ej({activeCompPath:e,previewIframeRef:o,showToast:y,queueDomEditSave:S,writeProjectFile:A,domEditSaveTimestampRef:k,editHistory:$,fileTree:Q,importedFontAssetsRef:C,projectId:t,projectIdRef:Z,reloadPreview:z,domEditSelection:q,applyDomSelection:R,clearDomSelection:X,refreshDomEditSelectionFromPreview:me,buildDomSelectionFromTarget:Y});d.useEffect(()=>{if(!E)return;const Kt=()=>{if(!on||i)return;const un=P.current;if(!un)return;let gr=null;try{gr=E.contentDocument}catch{return}if(!gr)return;const Or=Yn(gr,un,e);if(!Or){R(null,{revealPanel:!1});return}const sa=Y(Or);sa&&R(sa,{revealPanel:!1,preserveGroup:!0})};L(E),H.current(E),Kt(),b();const Gn=()=>{L(E),H.current(E),Kt(),b()};return E.addEventListener("load",Gn),()=>{E.removeEventListener("load",Gn)}},[e,R,Y,i,P,E,b,L,H]);const Cn=d.useRef(ee);return Cn.current=ee,d.useEffect(()=>{!q||!Cn.current||!V||q.sourceFile&&V()==="code"&&Cn.current(q.sourceFile,{id:q.id,selector:q.selector,selectorIndex:q.selectorIndex})},[q,V]),{domEditSelection:q,domEditGroupSelections:B,domEditHoverSelection:D,agentModalOpen:Se,agentModalAnchorPoint:pe,copiedAgentPrompt:ae,agentPromptSelectionContext:xe,domEditSelectionRef:P,handleTimelineElementSelect:ce,handlePreviewCanvasMouseDown:ve,handlePreviewCanvasPointerMove:bt,handlePreviewCanvasPointerLeave:nt,applyDomSelection:R,clearDomSelection:X,handleDomStyleCommit:Gt,handleDomAttributeCommit:Lt,handleDomHtmlAttributeCommit:st,handleDomPathOffsetCommit:Mt,handleDomGroupPathOffsetCommit:St,handleDomBoxSizeCommit:ze,handleDomRotationCommit:rt,handleDomManualEditsReset:Ye,handleDomMotionCommit:nn,handleDomMotionClear:Rn,handleDomTextCommit:tn,handleDomTextFieldStyleCommit:Ci,handleDomAddTextField:mr,handleDomRemoveTextField:Ne,handleAskAgent:Je,handleAgentModalSubmit:Ue,handleBlockedDomMove:Re,handleDomManualDragStart:kt,handleDomEditElementDelete:pr,buildDomSelectionFromTarget:Y,buildDomSelectionForTimelineElement:ne,updateDomEditHoverSelection:te,resolveImportedFontAsset:Fe,setAgentModalOpen:Qe,setAgentPromptSelectionContext:$e,setAgentModalAnchorPoint:Ze}}const a7="Shift+T";function Ls(t){var i,l,o;if(!t||typeof t!="object")return!1;const e=t,n=(i=e.tagName)==null?void 0:i.toLowerCase();if(n==="input"||n==="textarea"||n==="select"||e.isContentEditable)return!0;const r=(l=e.getAttribute)==null?void 0:l.call(e,"role");return r==="textbox"||r==="searchbox"||r==="combobox"?!0:!!((o=e.closest)!=null&&o.call(e,"input, textarea, select, [contenteditable='true'], [role='textbox'], .cm-editor"))}function nj(t){return t.metaKey||t.ctrlKey||t.altKey||!t.shiftKey||t.key.toLowerCase()!=="t"?!1:!Ls(t.target)}function l7(t){return`${t?"Hide":"Show"} timeline editor (${a7})`}function rj({toggleTimelineVisibility:t,handleTimelineElementDelete:e,handleDomEditElementDelete:n,domEditSelectionRef:r,editHistory:i,readOptionalProjectFile:l,readProjectFile:o,writeProjectFile:c,domEditSaveTimestampRef:f,showToast:m,syncHistoryPreviewAfterApply:p,waitForPendingDomEditSaves:O,leftSidebarRef:y,handleCopy:b,handlePaste:S,handleCut:w}){const A=d.useRef(null),k=d.useRef(void 0),$=d.useRef(null),Q=d.useCallback(D=>{nj(D)&&(D.preventDefault(),t())},[t]),C=d.useCallback(async D=>D===ep?l(D):o(D),[l,o]),M=d.useCallback(async(D,P)=>{f.current=Date.now(),await c(D,P)},[f,c]),Z=d.useCallback(async()=>{await O();const D=await i.undo({readFile:C,writeFile:M});if(!D.ok&&D.reason==="content-mismatch"){m("File changed outside Studio. Undo history was not applied.","info");return}D.ok&&D.label&&(await p(D.paths),m(`Undid ${D.label}`,"info"))},[i,C,m,p,O,M]),E=d.useCallback(async()=>{await O();const D=await i.redo({readFile:C,writeFile:M});if(!D.ok&&D.reason==="content-mismatch"){m("File changed outside Studio. Redo history was not applied.","info");return}D.ok&&D.label&&(await p(D.paths),m(`Redid ${D.label}`,"info"))},[i,C,m,p,O,M]),j=d.useRef(Q);j.current=Q;const _=d.useRef(e);_.current=e;const H=d.useRef(n);H.current=n;const L=d.useRef(Z);L.current=Z;const z=d.useRef(E);z.current=E;const F=d.useRef(b);F.current=b;const ee=d.useRef(S);ee.current=S;const W=d.useRef(w);W.current=w,k.current=D=>{var P,R,X;if(j.current(D),D.metaKey||D.ctrlKey){if(!N3(D.target)){const U=D.key.toLowerCase();if(U==="z"&&!D.shiftKey){D.preventDefault(),L.current();return}if(U==="z"&&D.shiftKey||D.ctrlKey&&!D.metaKey&&U==="y"){D.preventDefault(),z.current();return}}if(D.key==="1"){D.preventDefault(),(P=y.current)==null||P.selectTab("compositions");return}if(D.key==="2"){D.preventDefault(),(R=y.current)==null||R.selectTab("assets");return}const Y=D.key.toLowerCase();if(Y==="c"&&!D.shiftKey&&!D.altKey&&!Ls(D.target)){F.current()&&D.preventDefault();return}if(Y==="v"&&!D.shiftKey&&!D.altKey&&!Ls(D.target)){D.preventDefault(),ee.current();return}if(Y==="x"&&!D.shiftKey&&!D.altKey&&!Ls(D.target)){(!!ge.getState().selectedElementId||!!r.current)&&(D.preventDefault(),W.current());return}}if(D.key.toLowerCase()==="f"&&!D.metaKey&&!D.ctrlKey&&!D.altKey&&!D.shiftKey&&!Ls(D.target)){D.preventDefault(),document.fullscreenElement?document.exitFullscreen():(X=document.querySelector("[data-studio-fullscreen-target]"))==null||X.requestFullscreen();return}if((D.key==="Delete"||D.key==="Backspace")&&!D.metaKey&&!D.ctrlKey&&!D.altKey&&!Ls(D.target)){const{selectedElementId:Y,elements:U}=ge.getState();if(Y){const ne=U.find(ce=>(ce.key??ce.id)===Y);if(ne){D.preventDefault(),_.current(ne);return}}const te=r.current;te&&(D.preventDefault(),H.current(te))}},d.useEffect(()=>{function D(P){var R;(R=k.current)==null||R.call(k,P)}return window.addEventListener("keydown",D,!0),()=>window.removeEventListener("keydown",D,!0)},[]);const V=d.useCallback(D=>{var P;(P=k.current)==null||P.call(k,D)},[]),G=d.useCallback(D=>{const P=(D==null?void 0:D.contentWindow)??null;A.current!==P&&(A.current&&A.current.removeEventListener("keydown",V),A.current=P,P==null||P.addEventListener("keydown",V,!0))},[V]);d.useEffect(()=>()=>{A.current&&(A.current.removeEventListener("keydown",V),A.current=null)},[V]);const q=d.useCallback(D=>{if(!(D.metaKey||D.ctrlKey)||N3(D.target))return;const P=D.key.toLowerCase();if(P==="z"&&!D.shiftKey){D.preventDefault(),L.current();return}(P==="z"&&D.shiftKey||D.ctrlKey&&!D.metaKey&&P==="y")&&(D.preventDefault(),z.current())},[]),B=d.useCallback(D=>{var X;(X=$.current)==null||X.call($),$.current=null;const P=(D==null?void 0:D.contentWindow)??null;let R=null;try{R=(D==null?void 0:D.contentDocument)??null}catch{R=null}!P&&!R||(P==null||P.addEventListener("keydown",q,!0),R==null||R.addEventListener("keydown",q,!0),$.current=()=>{P==null||P.removeEventListener("keydown",q,!0),R==null||R.removeEventListener("keydown",q,!0)})},[q]);return d.useEffect(()=>()=>{var D;(D=$.current)==null||D.call($),$.current=null},[]),{handleUndo:Z,handleRedo:E,syncPreviewTimelineHotkey:G,syncPreviewHistoryHotkey:B,handleTimelineToggleHotkey:Q}}function ij(t,e,n,r){if(n){const o=r??0;let c=0,f=null;if(n.startsWith("#")){const m=n.slice(1);f=new RegExp(`<[a-z][^>]*\\bid="${m}"[^>]*>`,"gi")}else if(n.startsWith(".")){const m=n.slice(1);f=new RegExp(`<[a-z][^>]*\\bclass="[^"]*\\b${m}\\b[^"]*"[^>]*>`,"gi")}else if(n.startsWith("[")){const m=n.slice(1,-1);f=new RegExp(`<[a-z][^>]*\\b${m}[^>]*>`,"gi")}if(f){let m;for(;(m=f.exec(t))!==null;){if(c===o){const p=aj(t,m.index);if(p>0)return t.slice(0,p)+`
|
|
96
|
-
`+e+t.slice(p)}c++}}}const l=/<[^>]*data-composition-id="[^"]+"[^>]*>/i.exec(t);if(l&&l.index!=null){const o=l.index+l[0].length;return t.slice(0,o)+e+t.slice(o)}return t+e}function aj(t,e){const n=t.indexOf(">",e);if(n<0)return-1;if(t[n-1]==="/")return n+1;const r=t.slice(e).match(/^<([a-z][a-z0-9]*)/i);if(!r)return-1;const i=r[1];let l=1,o=n+1;const c=new RegExp(`<${i}(?:\\s|>|/>)`,"gi"),f=new RegExp(`</${i}\\s*>`,"gi");for(;l>0&&o<t.length;){c.lastIndex=o,f.lastIndex=o;const m=c.exec(t),p=f.exec(t);if(!p)return-1;if(m&&m.index<p.index)t.lastIndexOf("/",t.indexOf(">",m.index))>m.index||l++,o=t.indexOf(">",m.index)+1;else{if(l--,l===0)return p.index+p[0].length;o=p.index+p[0].length}}return-1}function lj(t,e){const n=new Set(e);return t.replace(new RegExp('(?<=\\s)id="([^"]+)"',"g"),(r,i)=>{if(!n.has(i))return r;let l=2;for(;n.has(`${i}-${l}`);)l++;const o=`${i}-${l}`;return n.add(o),`id="${o}"`})}async function sj(t,e){const n=await fetch(`/api/projects/${t}/files/${encodeURIComponent(e)}`);if(!n.ok)throw new Error(`Failed to read ${e}`);const r=await n.json();if(typeof r.content!="string")throw new Error(`Missing file contents for ${e}`);return r.content}function oj(t,e){var i;let n=null;try{n=((i=t.current)==null?void 0:i.contentDocument)??null}catch{return null}if(!n)return null;let r=null;return e.id&&(r=n.getElementById(e.id)),!r&&e.selector&&(r=n.querySelectorAll(e.selector)[e.selectorIndex??0]??null),r&&"outerHTML"in r?r.outerHTML:null}function cj({projectId:t,activeCompPath:e,domEditSelectionRef:n,showToast:r,writeProjectFile:i,recordEdit:l,domEditSaveTimestampRef:o,reloadPreview:c,handleTimelineElementDelete:f,handleDomEditElementDelete:m,previewIframeRef:p}){const O=d.useRef(null),y=d.useRef(t);y.current=t;const b=d.useCallback(()=>{var Q;const{selectedElementId:A,elements:k}=ge.getState();if(A){const C=k.find(j=>(j.key??j.id)===A);if(!C)return!1;const M=C.sourceFile||e||"index.html";let Z=null;try{const j=(Q=p.current)==null?void 0:Q.contentDocument;if(j){let _=null;C.domId&&(_=j.getElementById(C.domId)),!_&&C.selector&&(_=j.querySelectorAll(C.selector)[C.selectorIndex??0]??null),_&&"outerHTML"in _&&(Z=_.outerHTML)}}catch{}if(!Z)return r("Unable to copy this element.","info"),!1;const E={kind:"timeline-clip",html:Z,sourceFile:M};return O.current=E,r("Copied clip","info"),!0}const $=n.current;if($){const C=oj(p,$);if(!C)return r("Unable to copy this element.","info"),!1;const M=$.sourceFile||e||"index.html",Z={kind:"dom-element",html:C,sourceFile:M,originSelector:$.selector,originSelectorIndex:$.selectorIndex};return O.current=Z,r("Copied element","info"),!0}return!1},[e,n,p,r]),S=d.useCallback(async()=>{const A=O.current;if(!A){r("Nothing to paste.","info");return}const k=y.current;if(!k)return;const $=e||"index.html";try{const Q=await sj(k,$),C=jg(Q),M=lj(A.html,C);let Z;if(A.kind==="timeline-clip"){const{currentTime:E}=ge.getState(),j=M.indexOf(">"),L=(j>=0?M.slice(0,j+1):M).replace(/data-start="[^"]*"/,`data-start="${vn(E)}"`)+M.slice(j+1);Z=vg(Q,L)}else Z=ij(Q,M,A.originSelector,A.originSelectorIndex);o.current=Date.now(),await Tl({projectId:k,label:A.kind==="timeline-clip"?"Paste clip":"Paste element",kind:"timeline",files:{[$]:Z},readFile:async()=>Q,writeFile:i,recordEdit:l}),c(),r(A.kind==="timeline-clip"?"Pasted clip":"Pasted element","info")}catch(Q){const C=Q instanceof Error?Q.message:"Failed to paste";r(C)}},[e,o,l,c,r,i]),w=d.useCallback(async()=>{if(!b())return!1;const{selectedElementId:k,elements:$}=ge.getState();if(k){const C=$.find(M=>(M.key??M.id)===k);if(C)return await f(C),!0}const Q=n.current;return Q&&await m(Q),!0},[b,n,f,m]);return{handleCopy:b,handlePaste:S,handleCut:w}}const s7={fontFamily:"sans-serif",fontSize:48,fontWeight:700,fontStyle:"normal",textDecoration:"none",textTransform:"none",letterSpacing:0,lineHeight:1.2,color:"#ffffff",activeColor:"#ffffff",dimColor:"rgba(255, 255, 255, 0.3)",opacity:1,gradientFill:null,strokeWidth:0,strokeColor:"#000000",shadows:[],glow:null,x:0,y:0,rotation:0,scaleX:1,scaleY:1,skewX:0,skewY:0,transformOrigin:"center center",blendMode:"normal"},uj={backgroundColor:"transparent",backgroundOpacity:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,borderRadius:0,borderWidth:0,borderColor:"transparent",borderStyle:"solid",boxShadow:"none"},W3={preset:"fade",duration:.2,ease:"power2.out",stagger:0,staggerDirection:"start",intensity:1},Ns={entrance:W3,highlight:null,exit:{...W3}};function fj(t,e){const{width:n,height:r,duration:i,wordsPerGroup:l=5}=e,o=new Map,c=new Map,f=[];for(let m=0;m<t.length;m+=l){const p=t.slice(m,m+l),O=`group-${m/l}`,y=[];p.forEach((S,w)=>{const A=`segment-${m+w}`,k={id:A,wordId:S.id??`w${m+w}`,text:S.text,start:S.start,end:S.end,groupIndex:w,style:{},animation:{}};o.set(A,k),y.push(A)});const b={id:O,segmentIds:y,style:{...s7},animation:{entrance:{...Ns.entrance},highlight:Ns.highlight,exit:{...Ns.exit}},containerStyle:{...uj}};c.set(O,b),f.push(O)}return{width:n,height:r,duration:i,segments:o,groups:c,groupOrder:f,defaultAnimation:{entrance:{...Ns.entrance},highlight:Ns.highlight,exit:{...Ns.exit}}}}function dj(t){const e=/(?:const|let|var)\s+(?:TRANSCRIPT|script)\s*=\s*(\[[\s\S]*?\]);/,n=t.match(e);if(!n)return[];const r=n[1];try{return mj(r)}catch{return[]}}function hj(t,e,n,r,i,l){const o=dj(n);if(o.length===0)return null;const c=t.querySelectorAll(".caption-group, .caption-line, .caption-block"),f=t.querySelectorAll(".word, .caption-word");let m=5;c.length>0&&f.length>0&&(m=Math.round(f.length/c.length),m<1&&(m=1));const p=fj(o,{width:r,height:i,duration:l,wordsPerGroup:m}),O=f.item(0),y=c.item(0),b=O??y;if(b){const S=e.getComputedStyle(b),w={},A=parseFloat(S.fontSize);!isNaN(A)&&A>0&&(w.fontSize=A);const k=S.fontWeight;if(k){const E=parseInt(k,10);w.fontWeight=isNaN(E)?k:E}const $=S.fontFamily;$&&(w.fontFamily=$);const Q=S.color;Q&&(w.color=Q);const C=S.textTransform;(C==="none"||C==="uppercase"||C==="lowercase"||C==="capitalize")&&(w.textTransform=C);const M=S.letterSpacing;if(M&&M!=="normal"){const E=parseFloat(M),j=w.fontSize??s7.fontSize;!isNaN(E)&&j>0&&(w.letterSpacing=E/j)}const Z={};if(y){const E=e.getComputedStyle(y),j=E.backgroundColor;j&&j!=="rgba(0, 0, 0, 0)"&&j!=="transparent"&&(Z.backgroundColor=j,Z.backgroundOpacity=1);const _=parseFloat(E.borderRadius);!isNaN(_)&&_>0&&(Z.borderRadius=_);const H=parseFloat(E.paddingTop),L=parseFloat(E.paddingRight),z=parseFloat(E.paddingBottom),F=parseFloat(E.paddingLeft);isNaN(H)||(Z.paddingTop=H),isNaN(L)||(Z.paddingRight=L),isNaN(z)||(Z.paddingBottom=z),isNaN(F)||(Z.paddingLeft=F)}for(const E of p.groupOrder){const j=p.groups.get(E);j&&(j.style={...j.style,...w},j.containerStyle={...j.containerStyle,...Z})}}return p}function mj(t){let e;try{e=JSON.parse(t)}catch{let r=t;r=r.replace(/'((?:[^'\\]|\\.)*)'/g,(i,l)=>`"${l.replace(/\\'/g,"'").replace(/"/g,'\\"')}"`),r=r.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g,'$1"$2":'),r=r.replace(/,(\s*[}\]])/g,"$1"),e=JSON.parse(r)}if(!Array.isArray(e))return[];const n=[];for(const r of e)if(r!==null&&typeof r=="object"&&typeof r.text=="string"&&typeof r.start=="number"&&typeof r.end=="number"){const i=r;n.push({...typeof i.id=="string"?{id:i.id}:{},text:i.text,start:i.start,end:i.end})}return n}function pj({projectId:t,activeCompPath:e,compIdToSrc:n,captionEditMode:r,captionHasSelection:i,previewIframeRef:l,captionSync:o,setRightCollapsed:c}){d.useEffect(()=>{if(!t)return;let f=!1;const m=()=>{if(at.getState().isEditMode||f)return;const O=l.current;let y=null,b=null;try{y=(O==null?void 0:O.contentDocument)??null,b=(O==null?void 0:O.contentWindow)??null}catch{return}if(!y||!b||y.querySelectorAll(".caption-group").length===0)return;let w=null;const A=y.querySelectorAll("[data-composition-src], [data-composition-file]");for(const $ of A){const Q=$.getAttribute("data-composition-src")||$.getAttribute("data-composition-file");if(Q&&Q.includes("captions")){w=Q;break}}if(!w){for(const[$,Q]of n)if($.includes("caption")||Q.includes("caption")){w=Q;break}}if(!w&&(e!=null&&e.includes("captions"))&&(w=e),!w){const $=y.querySelector('[data-composition-id*="caption"]');if($){const Q=$.getAttribute("data-composition-id")||"";w=n.get(Q)||null}}if(!w)return;f=!0;const k=w;fetch(`/api/projects/${t}/files/${encodeURIComponent(k)}`).then($=>$.json()).then($=>{if(!$.content||!y||!b||at.getState().isEditMode)return;const Q=y.querySelector("[data-composition-id]"),C=parseInt((Q==null?void 0:Q.getAttribute("data-width"))??"1920",10),M=parseInt((Q==null?void 0:Q.getAttribute("data-height"))??"1080",10),Z=parseFloat((Q==null?void 0:Q.getAttribute("data-duration"))??"0"),E=hj(y,b,$.content,C,M,Z);if(!E)return;const j=at.getState();j.setModel(E),j.setSourceFilePath(k),j.setEditMode(!0),o.loadOverrides()}).catch(()=>{}).finally(()=>{f=!1})},p=O=>{const y=O.data;(y==null?void 0:y.source)==="hf-preview"&&((y==null?void 0:y.type)==="state"||(y==null?void 0:y.type)==="timeline")&&m()};return window.addEventListener("message",p),m(),()=>{window.removeEventListener("message",p)}},[e,t,n,o,l]),d.useEffect(()=>{r&&c(!i)},[i,r,c])}const o7=2,gj=1,G3=o7+gj;function Oj(t,e){const n=[],r=Math.floor(t.length/e);if(r===0)return Array(e).fill(0);for(let l=0;l<e;l++){let o=0;const c=l*r,f=Math.min(c+r,t.length);for(let m=c;m<f;m++){const p=Math.abs(t[m]??0);p>o&&(o=p)}n.push(o)}const i=Math.max(...n,.001);return n.map(l=>l/i)}function xj(t,e){let n=0;for(let l=0;l<t.length;l++)n=(n<<5)-n+t.charCodeAt(l)|0;n=Math.abs(n)||42;const r=()=>(n=n*16807%2147483647,(n&2147483647)/2147483647),i=[];for(let l=0;l<e;l++){const o=l/e,c=.3+.3*Math.sin(o*Math.PI*3.2)+.2*Math.sin(o*Math.PI*7.1);i.push(Math.max(.05,Math.min(1,c*(.4+.6*r()))))}return i}const K3=new Map,D2=new Map,yj=d.memo(function({audioUrl:e,waveformUrl:n,label:r,labelColor:i}){const l=d.useRef(null),o=d.useRef(null),c=d.useRef(null),f=n??e,[m,p]=d.useState(K3.get(f)??null);d.useEffect(()=>{if(m||!f)return;let b=!1,S=D2.get(f);return S||(S=(n?fetch(n).then(w=>w.json()).then(w=>{if(!Array.isArray(w.peaks))throw new Error("bad response");return w.peaks}):fetch(e).then(w=>w.arrayBuffer()).then(w=>{const A=new AudioContext;return A.decodeAudioData(w).finally(()=>A.close())}).then(w=>Oj(w.getChannelData(0),4e3))).catch(()=>xj(f,4e3)).then(w=>(K3.set(f,w),w)).finally(()=>D2.delete(f)),D2.set(f,S)),S.then(w=>{b||p(w)}),()=>{b=!0}},[e,n,f,m]);const O=d.useCallback(()=>{const b=l.current,S=o.current;if(!b||!S||!m)return;const w=b.clientWidth||400,A=Math.min(Math.floor(w/G3),m.length);let k="";for(let $=0;$<A;$++){const Q=Math.floor($/A*m.length),C=m[Q]??0,M=Math.max(3,Math.round(C*100)),Z=(.45+C*.4).toFixed(2);k+=`<div style="position:absolute;bottom:0;left:${$*G3}px;width:${o7}px;height:${M}%;background:rgba(75,163,210,${Z})"></div>`}S.innerHTML=k},[m]),y=d.useCallback(b=>{var S;(S=c.current)==null||S.disconnect(),l.current=b,b&&(O(),c.current=new ResizeObserver(()=>O()),c.current.observe(b))},[O]);return d.useEffect(()=>{O()},[O]),d.useEffect(()=>()=>{var b;(b=c.current)==null||b.disconnect()},[]),g.jsxs("div",{ref:y,className:"absolute inset-0 overflow-hidden",children:[g.jsx("div",{ref:o,className:"absolute left-0 right-0 bottom-0",style:{top:16}}),!m&&g.jsx("div",{className:"absolute left-0 right-0 bottom-0 animate-pulse",style:{top:16,background:"linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.02) 100%)"}}),g.jsx("div",{className:"absolute top-0 left-0 right-0 px-1.5 py-0.5 z-10",children:g.jsx("span",{className:"text-[9px] font-semibold truncate block leading-tight",style:{color:i,textShadow:"0 1px 3px rgba(0,0,0,0.9)"},children:r})})]})});function bj(t,e,n){try{const r=new URL(t,n),i=`/api/projects/${e}/preview/`;if(r.pathname.startsWith(i))return r.pathname.slice(i.length)}catch{}return t}function vj({projectIdRef:t,compIdToSrc:e,activePreviewUrl:n,effectiveTimelineDuration:r}){return d.useCallback((i,l)=>{var m;const o=t.current;if(!o)return null;let c=i.compositionSrc;if(c&&(c=bj(c,o,window.location.origin)),c&&e.size>0){const p=e.get(i.id)||e.get(c.replace(/^compositions\//,"").replace(/\.html$/,""));p&&(c=p)}if(c)return d.createElement(A2,{previewUrl:`/api/projects/${o}/preview/comp/${c}`,label:Vs(i),labelColor:l.label,seekTime:0,duration:i.duration});if(n&&i.duration>0)return d.createElement(A2,{previewUrl:n,label:Vs(i),labelColor:l.label,selector:i.selector,selectorIndex:i.selectorIndex,seekTime:i.start,duration:i.duration});const f=i.duration>0&&r>0&&i.duration<r*.92&&!/(backdrop|background|overlay|scrim|mask)/i.test(i.id);if(i.tag==="audio"){const p=`/api/projects/${o}/preview/`,O=(m=i.src)!=null&&m.startsWith("http")?i.src.indexOf(p):-1,y=i.src?O!==-1?decodeURIComponent(i.src.slice(O+p.length)):i.src.startsWith("http")?null:i.src:null,b=y?`/api/projects/${o}/preview/${y}`:i.src??"",S=y?`/api/projects/${o}/waveform/${y}`:void 0;return d.createElement(yj,{audioUrl:b,waveformUrl:S,label:Vs(i),labelColor:l.label})}if((i.tag==="video"||i.tag==="img")&&i.src){const p=i.src.startsWith("http")?i.src:`/api/projects/${o}/preview/${i.src}`;return d.createElement(PE,{videoSrc:p,label:Vs(i),labelColor:l.label,duration:i.duration})}return f?d.createElement(A2,{previewUrl:`/api/projects/${o}/preview`,label:Vs(i),labelColor:l.label,selector:i.selector,selectorIndex:i.selectorIndex,seekTime:i.start,duration:i.duration}):null},[t,e,n,r])}function Sj(t){const[e,n]=d.useState(null),r=d.useRef([]),i=d.useCallback(()=>{r.current=[],n(null)},[]);return d.useEffect(()=>{if(!t)return;const l=()=>{try{const c=t.contentWindow;if(!c||c.__hfErrorCapture)return;c.__hfErrorCapture=!0;const f=c.console.error.bind(c.console);c.console.error=function(...m){f(...m);const p=m.map(O=>O instanceof Error?O.message:String(O)).join(" ");p.includes("favicon")||(r.current=[...r.current,{severity:"error",message:p}],n([...r.current]))},c.addEventListener("error",m=>{const p=m.message||String(m);r.current=[...r.current,{severity:"error",message:p}],n([...r.current])})}catch{}};l();const o=()=>{r.current=[],n(null),l()};return t.addEventListener("load",o),()=>t.removeEventListener("load",o)},[t]),{consoleErrors:e,setConsoleErrors:n,resetErrors:i}}const mp="#project/";function wj(t){try{return decodeURIComponent(t)}catch{return t}}function Aj(t){if(!t)return new URLSearchParams;if(t instanceof URLSearchParams)return t;const e=new URLSearchParams;for(const[n,r]of Object.entries(t))!n||r==null||r===""||e.set(n,r);return e}function c7(t){return encodeURIComponent(t)}function u7(t,e){const n=Aj(e).toString();return`${mp}${c7(t)}${n?`?${n}`:""}`}function f7(t){if(!t.startsWith(mp))return null;const e=t.slice(mp.length),n=e.indexOf("?"),r=n>=0?e.slice(0,n):e;if(!r||r.includes("/"))return null;const i=n>=0?e.slice(n+1):"";return{projectId:wj(r),params:new URLSearchParams(i)}}function J3(t){var e;return((e=f7(t))==null?void 0:e.projectId)??null}function kj(t,e=""){const n=e&&!e.startsWith("/")?`/${e}`:e;return`/api/projects/${c7(t)}${n}`}function d7(t){return t&&t!=="master"?t:"index.html"}function ex({projectId:t,compositionPath:e,currentTime:n,origin:r=window.location.origin}){const i=d7(e),l=new URL(kj(t,`/thumbnail/${encodeURIComponent(i)}`),r);return l.searchParams.set("t",Math.max(0,n).toFixed(3)),l.searchParams.set("format","png"),l.searchParams.set("v",String(Date.now())),l.toString()}function tx(t,e){var l;const r=((l=d7(t).split("/").pop())==null?void 0:l.replace(/\.html$/i,""))||"frame",i=Math.max(0,e).toFixed(3).replace(".","-");return`${r}-${i}s.png`}function Mj({projectId:t,activeCompPath:e,showToast:n,waitForPendingDomEditSaves:r}){const[i,l]=d.useState(0);Qt(()=>(l(ge.getState().currentTime),Qr.subscribe(l)));const o=d.useCallback(()=>{l(ge.getState().currentTime)},[]),c=d.useCallback(async p=>{if(t){p.preventDefault();try{const O=ge.getState().currentTime;l(O),await Promise.race([r(),new Promise((A,k)=>setTimeout(()=>k(new Error("Save queue timed out")),5e3))]);const y=ex({projectId:t,compositionPath:e,currentTime:O}),b=tx(e,O),S=new AbortController,w=setTimeout(()=>S.abort(),3e4);try{const A=await fetch(y,{cache:"no-store",signal:S.signal});if(clearTimeout(w),!A.ok){let C=`Capture failed (${A.status})`;try{const M=await A.json();M!=null&&M.error&&(C=M.error)}catch{}throw new Error(C)}const k=await A.blob(),$=URL.createObjectURL(k),Q=document.createElement("a");Q.href=$,Q.download=b,document.body.appendChild(Q),Q.click(),Q.remove(),setTimeout(()=>URL.revokeObjectURL($),0)}catch(A){throw clearTimeout(w),A instanceof DOMException&&A.name==="AbortError"?new Error("Capture timed out — the server took too long to respond"):A}}catch(O){n(O instanceof Error?O.message:"Capture failed","error")}}},[e,t,n,r]),f=t?ex({projectId:t,compositionPath:e,currentTime:i}):"#",m=tx(e,i);return{captureFrameHref:f,captureFrameFilename:m,handleCaptureFrameClick:c,refreshCaptureFrameTime:o}}function Tj(t){const[e,n]=d.useState(null),[r,i]=d.useState(!1),l=d.useCallback(async()=>{if(t){i(!0);try{const f=await(await fetch(`/api/projects/${t}/lint`)).json();n((f.findings??[]).map(m=>({severity:m.severity==="error"?"error":"warning",message:m.message??"",file:m.file,fixHint:m.fixHint})))}catch(c){const f=c instanceof Error?c.message:String(c);n([{severity:"error",message:`Failed to run lint: ${f}`}])}finally{i(!1)}}},[t]),o=d.useCallback(()=>n(null),[]);return{lintModal:e,linting:r,handleLint:l,closeLintModal:o}}function Cj(){const[t,e]=d.useState(null);return Qt(()=>{const n=r=>{const i=r.data;if((i==null?void 0:i.source)!=="hf-preview"||(i==null?void 0:i.type)!=="stage-size")return;const{width:l,height:o}=i;!(l>0)||!(o>0)||e(c=>c&&c.width===l&&c.height===o?c:{width:l,height:o})};return window.addEventListener("message",n),()=>window.removeEventListener("message",n)}),t}function Ej(){const[t,e]=d.useState(null),n=d.useRef(null),r=d.useCallback((i,l="error")=>{n.current&&clearTimeout(n.current),e({message:i,tone:l}),n.current=setTimeout(()=>e(null),4e3)},[]);return Qt(()=>()=>{n.current&&clearTimeout(n.current)}),{appToast:t,showToast:r}}const h7=["layers","design","motion","renders"];function $j(t,e={}){if(!t||!h7.includes(t))return null;const n=e.inspectorPanelsEnabled??on,r=e.motionPanelEnabled??Rg;return!n&&t!=="renders"?"renders":t==="motion"&&!r?"design":t}function Qj(t,e){return!t||t==="index.html"?null:e.includes(t)?t:null}function nx(t){return t==="1"?!0:t==="0"?!1:null}function m7(t){if(t==null||t==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function Pj(t){return h7.includes(t)?t:null}function Zj(t){const e=t.get("selFile")||void 0,n=t.get("selId")||void 0,r=t.get("selSelector")||void 0,i=m7(t.get("selIndex"));return!e&&!n&&!r?null:{sourceFile:e,id:n,selector:r,selectorIndex:i!=null?Math.max(0,Math.floor(i)):void 0}}function p7(){return{activeCompPath:null,currentTime:null,rightPanelTab:null,rightCollapsed:null,timelineVisible:null,selection:null}}function jj(t){const e=f7(t);if(!e)return p7();const{params:n}=e;return{activeCompPath:n.get("comp")||null,currentTime:m7(n.get("t")),rightPanelTab:$j(Pj(n.get("tab"))),rightCollapsed:nx(n.get("rc")),timelineVisible:nx(n.get("tv")),selection:Zj(n)}}function Rj(){return typeof window>"u"?p7():jj(window.location.hash)}function rx(t,e){const n=new URLSearchParams;return n.set("v","1"),e.activeCompPath&&n.set("comp",e.activeCompPath),e.currentTime!=null&&Number.isFinite(e.currentTime)&&n.set("t",String(Math.max(0,Math.round(e.currentTime*1e3)/1e3))),e.rightPanelTab&&n.set("tab",e.rightPanelTab),e.rightCollapsed!=null&&n.set("rc",e.rightCollapsed?"1":"0"),e.timelineVisible!=null&&n.set("tv",e.timelineVisible?"1":"0"),e.selection&&(e.selection.sourceFile&&n.set("selFile",e.selection.sourceFile),e.selection.id&&n.set("selId",e.selection.id),e.selection.selector&&n.set("selSelector",e.selection.selector),typeof e.selection.selectorIndex=="number"&&n.set("selIndex",String(Math.max(0,Math.floor(e.selection.selectorIndex))))),u7(t,n)}function Nj(t){return!t||!t.id&&!t.selector?null:{sourceFile:t.sourceFile||void 0,id:t.id||void 0,selector:t.selector||void 0,selectorIndex:t.selectorIndex??void 0}}function ix(t){typeof window>"u"||window.location.hash!==t&&window.history.replaceState(null,"",t)}function Vj({projectId:t,activeCompPath:e,currentTime:n,duration:r,isPlaying:i,compositionLoading:l,refreshKey:o,previewIframeRef:c,rightPanelTab:f,rightCollapsed:m,timelineVisible:p,activeCompPathHydrated:O,domEditSelection:y,buildDomSelectionFromTarget:b,applyDomSelection:S,initialState:w}){const A=d.useRef(w.currentTime==null),k=d.useRef(w.currentTime==null),$=d.useRef(w.selection==null),Q=d.useRef(w.selection),C=d.useRef(w.currentTime),M=d.useCallback(()=>({activeCompPath:e,currentTime:C.current,rightPanelTab:f,rightCollapsed:m,timelineVisible:p,selection:$.current?Nj(y):Q.current}),[e,y,m,f,p]);d.useEffect(()=>{if(!t||A.current||l)return;const Z=r>0?ru(w.currentTime??0,0,r):Math.max(0,w.currentTime??0);ge.getState().requestSeek(Z),C.current=Z,A.current=!0},[t,l,r,w.currentTime]),d.useEffect(()=>{var L;if(!t||$.current||l||!A.current||w.currentTime!=null&&Math.abs(n-C.current)>.05)return;const E=Q.current;if(!E){$.current=!0;return}let j=null;try{j=((L=c.current)==null?void 0:L.contentDocument)??null}catch{return}if(!j)return;const _=Yn(j,{sourceFile:E.sourceFile??"",id:E.id,selector:E.selector,selectorIndex:E.selectorIndex},e);if(!_){S(null,{revealPanel:!1}),$.current=!0,Q.current=null;return}const H=b(_,{preferClipAncestor:!1});S(H,{revealPanel:!1}),$.current=!0,Q.current=null},[e,S,b,l,n,w.currentTime,c,t,o]),d.useEffect(()=>{if(k.current)return;const Z=C.current;if(Z==null){k.current=!0;return}Math.abs(n-Z)>.05||(k.current=!0)},[n]),d.useEffect(()=>{if(!O||!A.current||!k.current||!t||i)return;const Z=window.setTimeout(()=>{C.current=ru(n,0,Math.max(0,r)),ix(rx(t,M()))},200);return()=>window.clearTimeout(Z)},[O,M,n,r,i,t]),d.useEffect(()=>{O&&t&&ix(rx(t,M()))},[O,M,t])}function Lj(t){if(!t||typeof window>"u")return;const e=480,n=270,r=16,i=ru(t.x,r+e/2,window.innerWidth-r-e/2),l=ru(t.y+12,r,window.innerHeight-r-n);return{left:i,top:l,transform:"translateX(-50%)"}}function _j({selectionLabel:t,anchorPoint:e=null,onSubmit:n,onClose:r}){const[i,l]=d.useState(""),o=d.useRef(null),c=Lj(e);Qt(()=>{requestAnimationFrame(()=>{var m;return(m=o.current)==null?void 0:m.focus()})});const f=()=>{i.trim()&&n(i.trim())};return g.jsx("div",{className:e?"fixed inset-0 z-[100] bg-black/60 backdrop-blur-sm":"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:r,children:g.jsxs("div",{className:`w-[480px] rounded-2xl border border-neutral-800 bg-neutral-950 shadow-2xl ${e?"fixed":""}`,style:c,onClick:m=>m.stopPropagation(),children:[g.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-neutral-800/60",children:[g.jsxs("div",{children:[g.jsx("h3",{className:"text-sm font-medium text-neutral-200",children:"Ask agent"}),g.jsx("p",{className:"text-xs text-neutral-500 mt-0.5",children:t.length>50?`${t.slice(0,49)}…`:t})]}),g.jsx("button",{className:"p-1 rounded-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/50",onClick:r,children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),g.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),g.jsx("div",{className:"px-5 py-4",children:g.jsx("textarea",{ref:o,className:"w-full h-24 px-3 py-2 rounded-lg border border-neutral-800 bg-neutral-900/60 text-sm text-neutral-200 placeholder-neutral-600 resize-none focus:outline-none focus:border-studio-accent/60 focus:ring-1 focus:ring-studio-accent/30",placeholder:"Describe what you want to change…",value:i,onChange:m=>l(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.metaKey||m.ctrlKey)&&f(),m.key==="Escape"&&r()}})}),g.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-t border-neutral-800/60",children:[g.jsxs("span",{className:"text-[11px] text-neutral-600",children:[navigator.platform.includes("Mac")?"⌘":"Ctrl","+Enter to copy"]}),g.jsx("button",{className:"px-4 py-1.5 rounded-lg bg-studio-accent/90 text-xs font-medium text-neutral-950 hover:bg-studio-accent disabled:opacity-40 disabled:cursor-not-allowed",disabled:!i.trim(),onClick:f,children:"Copy prompt"})]})]})})}function Dj(){return g.jsx("div",{className:"absolute inset-0 z-[90] flex items-center justify-center bg-black/50 backdrop-blur-sm pointer-events-none",children:g.jsxs("div",{className:"flex flex-col items-center gap-3 px-8 py-6 rounded-xl border-2 border-dashed border-studio-accent/60 bg-studio-accent/[0.06]",children:[g.jsxs("svg",{width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"text-studio-accent",children:[g.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),g.jsx("polyline",{points:"7 10 12 15 17 10"}),g.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]}),g.jsx("span",{className:"text-sm font-medium text-studio-accent",children:"Drop files to import into project"})]})})}const Ft=t=>({title:n,...r})=>g.jsx(t,{alt:n,"aria-label":n,"aria-hidden":n?void 0:!0,...r}),Hj=Ft(J$),Xj=Ft(tQ),g7=Ft(rQ),zj=Ft(xQ),K1=Ft(TQ),Fj=Ft(K$),Yj=Ft(U$),Bj=Ft(wQ),qj=Ft(AQ),Lg=Ft(yS),Ij=Ft(MQ),ax=Ft(EQ),Lf=Ft(PQ),_g=Ft(SQ),Uj=Ft(G$),Wj=Ft(_v),Gj=Ft(eQ),Dg=Ft(q$),Kj=Ft(W$),Jj=Ft(B$),eR=Ft(bQ),O7=d.createContext(null);function bu(){const t=d.useContext(O7);if(!t)throw new Error("useStudioContext must be used within StudioProvider");return t}function tR({value:t,children:e}){const{projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:l,previewIframeRef:o,captionEditMode:c,compositionLoading:f,refreshKey:m,setRefreshKey:p,currentTime:O,timelineElements:y,isPlaying:b,editHistory:S,handleUndo:w,handleRedo:A,renderQueue:k,compositionDimensions:$,waitForPendingDomEditSaves:Q,handlePreviewIframeRef:C,refreshPreviewDocumentVersion:M,timelineVisible:Z,toggleTimelineVisibility:E}=t,j=d.useMemo(()=>({projectId:n,activeCompPath:r,setActiveCompPath:i,showToast:l,previewIframeRef:o,captionEditMode:c,compositionLoading:f,refreshKey:m,setRefreshKey:p,currentTime:O,timelineElements:y,isPlaying:b,editHistory:S,handleUndo:w,handleRedo:A,renderQueue:k,compositionDimensions:$,waitForPendingDomEditSaves:Q,handlePreviewIframeRef:C,refreshPreviewDocumentVersion:M,timelineVisible:Z,toggleTimelineVisibility:E}),[n,r,c,f,m,O,b,$,Z,S,y,k,i,l,o,p,w,A,Q,C,M,E]);return g.jsx(O7,{value:j,children:e})}const x7=d.createContext(null);function Hg(){const t=d.useContext(x7);if(!t)throw new Error("usePanelLayoutContext must be used within PanelLayoutProvider");return t}function nR({value:{leftWidth:t,setLeftWidth:e,rightWidth:n,leftCollapsed:r,setLeftCollapsed:i,rightCollapsed:l,setRightCollapsed:o,rightPanelTab:c,setRightPanelTab:f,toggleLeftSidebar:m,handlePanelResizeStart:p,handlePanelResizeMove:O,handlePanelResizeEnd:y},children:b}){const S=d.useMemo(()=>({leftWidth:t,setLeftWidth:e,rightWidth:n,leftCollapsed:r,setLeftCollapsed:i,rightCollapsed:l,setRightCollapsed:o,rightPanelTab:c,setRightPanelTab:f,toggleLeftSidebar:m,handlePanelResizeStart:p,handlePanelResizeMove:O,handlePanelResizeEnd:y}),[t,e,n,r,i,l,o,c,f,m,p,O,y]);return g.jsx(x7,{value:S,children:b})}const y7=d.createContext(null);function _f(){const t=d.useContext(y7);if(!t)throw new Error("useDomEditContext must be used within DomEditProvider");return t}function rR({value:{domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:l,agentPromptSelectionContext:o,domEditSelectionRef:c,handleTimelineElementSelect:f,handlePreviewCanvasMouseDown:m,handlePreviewCanvasPointerMove:p,handlePreviewCanvasPointerLeave:O,applyDomSelection:y,clearDomSelection:b,handleDomStyleCommit:S,handleDomAttributeCommit:w,handleDomHtmlAttributeCommit:A,handleDomPathOffsetCommit:k,handleDomGroupPathOffsetCommit:$,handleDomBoxSizeCommit:Q,handleDomRotationCommit:C,handleDomManualEditsReset:M,handleDomMotionCommit:Z,handleDomMotionClear:E,handleDomTextCommit:j,handleDomTextFieldStyleCommit:_,handleDomAddTextField:H,handleDomRemoveTextField:L,handleAskAgent:z,handleAgentModalSubmit:F,handleBlockedDomMove:ee,handleDomManualDragStart:W,handleDomEditElementDelete:V,buildDomSelectionFromTarget:G,buildDomSelectionForTimelineElement:q,updateDomEditHoverSelection:B,resolveImportedFontAsset:D,setAgentModalOpen:P,setAgentPromptSelectionContext:R,setAgentModalAnchorPoint:X},children:Y}){const U=d.useMemo(()=>({domEditSelection:t,domEditGroupSelections:e,domEditHoverSelection:n,agentModalOpen:r,agentModalAnchorPoint:i,copiedAgentPrompt:l,agentPromptSelectionContext:o,domEditSelectionRef:c,handleTimelineElementSelect:f,handlePreviewCanvasMouseDown:m,handlePreviewCanvasPointerMove:p,handlePreviewCanvasPointerLeave:O,applyDomSelection:y,clearDomSelection:b,handleDomStyleCommit:S,handleDomAttributeCommit:w,handleDomHtmlAttributeCommit:A,handleDomPathOffsetCommit:k,handleDomGroupPathOffsetCommit:$,handleDomBoxSizeCommit:Q,handleDomRotationCommit:C,handleDomManualEditsReset:M,handleDomMotionCommit:Z,handleDomMotionClear:E,handleDomTextCommit:j,handleDomTextFieldStyleCommit:_,handleDomAddTextField:H,handleDomRemoveTextField:L,handleAskAgent:z,handleAgentModalSubmit:F,handleBlockedDomMove:ee,handleDomManualDragStart:W,handleDomEditElementDelete:V,buildDomSelectionFromTarget:G,buildDomSelectionForTimelineElement:q,updateDomEditHoverSelection:B,resolveImportedFontAsset:D,setAgentModalOpen:P,setAgentPromptSelectionContext:R,setAgentModalAnchorPoint:X}),[t,e,n,r,i,l,o,c,f,m,p,O,y,b,S,w,A,k,$,Q,C,M,Z,E,j,_,H,L,z,F,ee,W,V,G,q,B,D,P,R,X]);return g.jsx(y7,{value:U,children:Y})}function iR(){const e=Math.round(93.21518987341773);return g.jsxs("svg",{width:e,height:28,viewBox:"0 0 263 79",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"Hyperframes",children:[g.jsxs("defs",{children:[g.jsxs("linearGradient",{id:"hf-g0",x1:"225.869",y1:"0",x2:"222.845",y2:"37.482",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#06E3FA"}),g.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),g.jsxs("linearGradient",{id:"hf-g1",x1:"230.87",y1:"39",x2:"244.661",y2:"6.303",gradientUnits:"userSpaceOnUse",children:[g.jsx("stop",{stopColor:"#06E3FA"}),g.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]}),g.jsx("path",{d:"M0 16.6738H4.96V23.3838H11.53V16.6738H16.49V35.4538H11.53V27.6738H4.96V35.4538H0V16.6738Z",fill:"white"}),g.jsx("path",{d:"M17.8899 28.0137C17.8899 23.4237 21.2399 20.0237 25.7999 20.0237C30.0099 20.0237 32.9399 23.0837 32.9399 27.5637C32.9399 28.2037 32.8599 28.8237 32.8299 29.3337H22.6099C23.0399 31.1337 24.6199 32.1237 27.1399 32.1237C28.7199 32.1237 30.2199 31.7237 31.2999 31.0237V34.6737C30.1699 35.3937 28.2999 35.8537 26.3599 35.8537C21.2599 35.8537 17.8799 32.6037 17.8799 28.0237L17.8899 28.0137ZM28.5699 26.1937C28.4899 24.5337 27.3899 23.5637 25.7499 23.5637C24.1099 23.5637 22.9599 24.5337 22.6099 26.1937H28.5699Z",fill:"white"}),g.jsx("path",{d:"M37.85 33.8638L32 20.4238H37.29L40.46 28.1538L43.6 20.4238H48.48L40.33 39.5738H35.26L37.86 33.8638H37.85Z",fill:"white"}),g.jsx("path",{d:"M48.1797 26.1138C48.1797 20.4238 52.7097 16.2438 58.9397 16.2438C61.2997 16.2438 63.5297 16.8038 64.8197 17.7238V21.9338C63.5597 20.9138 61.6797 20.2938 59.7497 20.2938C55.7797 20.2938 53.2597 22.6238 53.2597 26.1438C53.2597 29.6638 55.5697 31.8838 58.8897 31.8838C59.6397 31.8838 60.4997 31.7538 61.1997 31.5038V27.8838H57.4697V24.2338H65.5197V33.7038C63.6697 35.0938 61.1997 35.8738 58.5997 35.8738C52.5397 35.8738 48.1897 31.7438 48.1897 26.1138H48.1797Z",fill:"white"}),g.jsx("path",{d:"M66.6604 28.0137C66.6604 23.4237 70.0104 20.0237 74.5704 20.0237C78.7804 20.0237 81.7104 23.0837 81.7104 27.5637C81.7104 28.2037 81.6304 28.8237 81.6004 29.3337H71.3804C71.8104 31.1337 73.3904 32.1237 75.9104 32.1237C77.4904 32.1237 78.9904 31.7237 80.0704 31.0237V34.6737C78.9404 35.3937 77.0704 35.8537 75.1304 35.8537C70.0304 35.8537 66.6504 32.6037 66.6504 28.0237L66.6604 28.0137ZM77.3404 26.1937C77.2604 24.5337 76.1604 23.5637 74.5204 23.5637C72.8804 23.5637 71.7304 24.5337 71.3804 26.1937H77.3404Z",fill:"white"}),g.jsx("path",{d:"M82.9688 20.4238H87.8488V22.4138C88.7588 20.9638 90.3488 20.1038 92.3288 20.1038C95.4988 20.1038 97.3988 22.3338 97.3988 25.8138V35.4438H92.5188V26.8638C92.5188 25.0438 91.8188 24.1838 90.4788 24.1838C88.9488 24.1838 87.8488 25.3638 87.8488 27.2638V35.4438H82.9688V20.4238Z",fill:"white"}),g.jsx("path",{d:"M195.219 26.1937L213.529 38.9937C216.009 40.7237 220.239 38.7637 221.009 35.5337L228.419 4.33374C229.189 1.10374 225.879 -0.856262 222.589 0.873738L198.199 13.6737C192.649 16.5837 191.059 23.2837 195.219 26.1937Z",fill:"url(#hf-g0)"}),g.jsx("path",{d:"M256.97 25.9638L232.58 38.7638C229.28 40.4938 225.98 38.5338 226.75 35.3038L234.16 4.10376C234.93 0.873757 239.16 -1.08624 241.64 0.643757L259.95 13.4438C264.12 16.3538 262.52 23.0538 256.97 25.9638Z",fill:"url(#hf-g1)"}),g.jsx("path",{d:"M0 71.9996V42.7256H7.7367V53.1806H17.9826V42.7256H25.7193V71.9996H17.9826V59.8718H7.7367V71.9996H0Z",fill:"white"}),g.jsx("path",{d:"M31.9606 78.4405L36.0171 69.5329L26.9004 48.5811H35.1389L40.0737 60.6252L44.9666 48.5811H52.5779L39.8646 78.4405H31.9606Z",fill:"white"}),g.jsx("path",{d:"M53.3711 78.4404V48.5809H60.9823V52.052C62.446 49.501 65.0807 48.0791 68.3008 48.0791C74.3647 48.0791 78.9649 53.3066 78.9649 60.2487C78.9649 67.2745 74.3229 72.4602 68.259 72.4602C65.0807 72.4602 62.446 71.1637 60.9823 68.78V78.4404H53.3711ZM66.1262 66.1872C69.2627 66.1872 71.3119 63.7616 71.3119 60.2905C71.3119 56.8195 69.2627 54.4357 66.1262 54.4357C62.7388 54.4357 60.9823 57.2795 60.9823 59.7051V60.9178C60.9823 63.3434 62.7388 66.1872 66.1262 66.1872Z",fill:"white"}),g.jsx("path",{d:"M93.4397 72.6269C85.4939 72.6269 80.2246 67.5667 80.2246 60.4155C80.2246 53.2643 85.4521 47.9531 92.5615 47.9531C99.1273 47.9531 103.686 52.7206 103.686 59.7045C103.686 60.7082 103.56 61.6701 103.518 62.4647H87.5849C88.2541 65.2666 90.7214 66.8139 94.6525 66.8139C97.1199 66.8139 99.4618 66.1866 101.135 65.0993V70.7868C99.3782 71.916 96.4508 72.6269 93.4397 72.6269ZM87.5849 57.5717H96.869C96.7435 54.9789 95.0289 53.4734 92.4779 53.4734C89.9687 53.4734 88.1286 54.9789 87.5849 57.5717Z",fill:"white"}),g.jsx("path",{d:"M105.645 72V48.5808H113.214V52.9719C114.218 50.0445 116.183 48.2881 118.692 48.2881C119.361 48.2881 119.989 48.4135 120.407 48.6645V55.8993C119.822 55.5648 119.111 55.4393 118.274 55.4393C115.138 55.4393 113.256 57.6558 113.256 61.2941V72H105.645Z",fill:"white"}),g.jsx("path",{d:"M122.643 71.9996V42.7256H139.371V49.124H130.379V54.477H138.911V60.5827H130.379V71.9996H122.643Z",fill:"white"}),g.jsx("path",{d:"M141.258 72V48.5808H148.827V52.9719C149.831 50.0445 151.796 48.2881 154.306 48.2881C154.975 48.2881 155.602 48.4135 156.02 48.6645V55.8993C155.435 55.5648 154.724 55.4393 153.887 55.4393C150.751 55.4393 148.869 57.6558 148.869 61.2941V72H141.258Z",fill:"white"}),g.jsx("path",{d:"M167.26 72.4602C161.154 72.4602 156.596 67.2745 156.596 60.3324C156.596 53.3066 161.196 48.0791 167.302 48.0791C170.438 48.0791 173.031 49.4173 174.536 51.8429V48.5809H182.148V72.0001H174.536V68.4873C173.031 71.0801 170.438 72.4602 167.26 72.4602ZM169.393 66.1872C172.78 66.1872 174.536 63.3434 174.536 60.876V59.6632C174.536 57.2377 172.78 54.4357 169.393 54.4357C166.298 54.4357 164.207 56.7777 164.207 60.2905C164.207 63.7616 166.298 66.1872 169.393 66.1872Z",fill:"white"}),g.jsx("path",{d:"M184.998 72.0001V48.5809H192.609V51.6756C193.989 49.4173 196.373 48.0791 199.426 48.0791C202.521 48.0791 204.779 49.5428 206.075 52.052C207.497 49.5846 210.132 48.0791 213.352 48.0791C218.245 48.0791 221.214 51.592 221.214 57.0286V72.0001H213.603V58.5341C213.603 55.774 212.557 54.4357 210.634 54.4357C208.459 54.4357 206.912 56.234 206.912 59.0778V72.0001H199.3V58.5341C199.3 55.774 198.255 54.4357 196.373 54.4357C194.157 54.4357 192.609 56.234 192.609 59.0778V72.0001H184.998Z",fill:"white"}),g.jsx("path",{d:"M236.338 72.6269C228.392 72.6269 223.123 67.5667 223.123 60.4155C223.123 53.2643 228.351 47.9531 235.46 47.9531C242.026 47.9531 246.584 52.7206 246.584 59.7045C246.584 60.7082 246.459 61.6701 246.417 62.4647H230.483C231.152 65.2666 233.62 66.8139 237.551 66.8139C240.018 66.8139 242.36 66.1866 244.033 65.0993V70.7868C242.277 71.916 239.349 72.6269 236.338 72.6269ZM230.483 57.5717H239.767C239.642 54.9789 237.927 53.4734 235.376 53.4734C232.867 53.4734 231.027 54.9789 230.483 57.5717Z",fill:"white"}),g.jsx("path",{d:"M252.115 72.502C250.192 72.502 248.268 72.0838 246.93 71.3728V65.6853C247.808 66.3126 248.937 66.689 250.066 66.689C251.739 66.689 252.784 65.8526 252.784 64.5562C252.784 63.8452 252.492 63.0925 251.655 62.0888L249.899 59.956C248.728 58.4923 248.226 56.9031 248.226 55.2721C248.226 51.0065 251.864 48.0791 256.883 48.0791C258.723 48.0791 260.438 48.4555 261.65 49.0828V54.7703C260.898 54.2266 259.768 53.8503 258.723 53.8503C257.092 53.8503 256.046 54.6867 256.046 55.8994C256.046 56.6522 256.423 57.405 257.259 58.4086L258.974 60.4996C260.187 62.047 260.73 63.5943 260.73 65.2671C260.73 69.5746 257.05 72.502 252.115 72.502Z",fill:"white"})]})}function aR({captureFrameHref:t,captureFrameFilename:e,handleCaptureFrameClick:n,refreshCaptureFrameTime:r,inspectorButtonActive:i,inspectorPanelActive:l}){const{projectId:o,editHistory:c,handleUndo:f,handleRedo:m}=bu(),{rightCollapsed:p,setRightCollapsed:O,setRightPanelTab:y}=Hg(),{clearDomSelection:b}=_f();return g.jsxs("div",{className:"flex items-center justify-between h-10 px-3 bg-neutral-900 border-b border-neutral-800 flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(iR,{}),g.jsx("span",{className:"text-neutral-700 select-none","aria-hidden":"true",children:"|"}),g.jsx("span",{className:"text-[11px] font-medium text-neutral-300",children:o})]}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("button",{type:"button",onClick:()=>{Nt("toolbar_action",{action:"undo"}),f()},disabled:!c.canUndo,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${c.canUndo?"border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800":"border-neutral-900 text-neutral-700"}`,title:c.undoLabel?`Undo ${c.undoLabel} (${G0("undo")})`:`Undo (${G0("undo")})`,"aria-label":"Undo",children:g.jsx(Dg,{size:14})}),g.jsx("button",{type:"button",onClick:()=>{Nt("toolbar_action",{action:"redo"}),m()},disabled:!c.canRedo,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${c.canRedo?"border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800":"border-neutral-900 text-neutral-700"}`,title:c.redoLabel?`Redo ${c.redoLabel} (${G0("redo")})`:`Redo (${G0("redo")})`,"aria-label":"Redo",children:g.jsx(Jj,{size:14})}),g.jsxs("a",{href:t,download:e,onClick:S=>{Nt("toolbar_action",{action:"capture_frame"}),n(S)},onFocus:r,onPointerDown:r,className:"h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border border-neutral-700 text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800",title:"Capture current frame","aria-label":"Capture current frame",children:[g.jsx(Kj,{size:14}),g.jsx("span",{children:"Capture"})]}),g.jsxs("button",{type:"button",onClick:()=>{if(on){if(p||!l){Nt("panel_toggle",{panel:"inspector",collapsed:!1}),y("design"),O(!1);return}Nt("panel_toggle",{panel:"inspector",collapsed:!0}),b(),O(!0)}},disabled:!on,className:`h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border transition-colors ${i?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":on?"text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 border-transparent":"cursor-not-allowed border-transparent text-neutral-700"}`,title:on?"Inspector":_3,"aria-label":on?"Inspector":_3,children:[g.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10"}),g.jsx("polygon",{points:"10 8 16 12 10 16",fill:"currentColor",stroke:"none"})]}),"Inspector"]})]})]})}let pp=[],b7=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?b7:pp).push(n=n+t[e])})();function lR(t){if(t<768)return!1;for(let e=0,n=pp.length;;){let r=e+n>>1;if(t<pp[r])n=r;else if(t>=b7[r])e=r+1;else return!0;if(e==n)return!1}}function lx(t){return t>=127462&&t<=127487}const sx=8205;function sR(t,e,n=!0,r=!0){return(n?v7:oR)(t,e,r)}function v7(t,e,n){if(e==t.length)return e;e&&S7(t.charCodeAt(e))&&w7(t.charCodeAt(e-1))&&e--;let r=H2(t,e);for(e+=ox(r);e<t.length;){let i=H2(t,e);if(r==sx||i==sx||n&&lR(i))e+=ox(i),r=i;else if(lx(i)){let l=0,o=e-2;for(;o>=0&&lx(H2(t,o));)l++,o-=2;if(l%2==0)break;e+=2}else break}return e}function oR(t,e,n){for(;e>0;){let r=v7(t,e-2,n);if(r<e)return r;e--}return 0}function H2(t,e){let n=t.charCodeAt(e);if(!w7(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return S7(r)?(n-55296<<10)+(r-56320)+65536:n}function S7(t){return t>=56320&&t<57344}function w7(t){return t>=55296&&t<56320}function ox(t){return t<65536?1:2}class tt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=oo(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),di.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=oo(this,e,n);let r=[];return this.decompose(e,n,r,0),di.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Lc(this),l=new Lc(e);for(let o=n,c=n;;){if(i.next(o),l.next(o),o=0,i.lineBreak!=l.lineBreak||i.done!=l.done||i.value!=l.value)return!1;if(c+=i.value.length,i.done||c>=r)return!0}}iter(e=1){return new Lc(this,e)}iterRange(e,n=this.length){return new A7(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new k7(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?tt.empty:e.length<=32?new Ht(e):di.from(Ht.split(e,[]))}}class Ht extends tt{constructor(e,n=cR(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let l=0;;l++){let o=this.text[l],c=i+o.length;if((n?r:c)>=e)return new uR(i,c,r,o);i=c+1,r++}}decompose(e,n,r,i){let l=e<=0&&n>=this.length?this:new Ht(cx(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),c=N1(l.text,o.text.slice(),0,l.length);if(c.length<=32)r.push(new Ht(c,o.length+l.length));else{let f=c.length>>1;r.push(new Ht(c.slice(0,f)),new Ht(c.slice(f)))}}else r.push(l)}replace(e,n,r){if(!(r instanceof Ht))return super.replace(e,n,r);[e,n]=oo(this,e,n);let i=N1(this.text,N1(r.text,cx(this.text,0,e)),n),l=this.length+r.length-(n-e);return i.length<=32?new Ht(i,l):di.from(Ht.split(i,[]),l)}sliceString(e,n=this.length,r=`
|
|
97
|
-
`){[e,n]=oo(this,e,n);let i="";for(let l=0,o=0;l<=n&&o<this.text.length;o++){let c=this.text[o],f=l+c.length;l>e&&o&&(i+=r),e<f&&n>l&&(i+=c.slice(Math.max(0,e-l),n-l)),l=f+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let l of e)r.push(l),i+=l.length+1,r.length==32&&(n.push(new Ht(r,i)),r=[],i=-1);return i>-1&&n.push(new Ht(r,i)),n}}class di extends tt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let l=0;;l++){let o=this.children[l],c=i+o.length,f=r+o.lines-1;if((n?f:c)>=e)return o.lineInner(e,n,r,i);i=c+1,r=f+1}}decompose(e,n,r,i){for(let l=0,o=0;o<=n&&l<this.children.length;l++){let c=this.children[l],f=o+c.length;if(e<=f&&n>=o){let m=i&((o<=e?1:0)|(f>=n?2:0));o>=e&&f<=n&&!m?r.push(c):c.decompose(e-o,n-o,r,m)}o=f+1}}replace(e,n,r){if([e,n]=oo(this,e,n),r.lines<this.lines)for(let i=0,l=0;i<this.children.length;i++){let o=this.children[i],c=l+o.length;if(e>=l&&n<=c){let f=o.replace(e-l,n-l,r),m=this.lines-o.lines+f.lines;if(f.lines<m>>4&&f.lines>m>>6){let p=this.children.slice();return p[i]=f,new di(p,this.length-(n-e)+r.length)}return super.replace(l,c,f)}l=c+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=`
|
|
98
|
-
`){[e,n]=oo(this,e,n);let i="";for(let l=0,o=0;l<this.children.length&&o<=n;l++){let c=this.children[l],f=o+c.length;o>e&&l&&(i+=r),e<f&&n>o&&(i+=c.sliceString(e-o,n-o,r)),o=f+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof di))return 0;let r=0,[i,l,o,c]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,l+=n){if(i==o||l==c)return r;let f=this.children[i],m=e.children[l];if(f!=m)return r+f.scanIdentical(m,n);r+=f.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let b of e)r+=b.lines;if(r<32){let b=[];for(let S of e)S.flatten(b);return new Ht(b,n)}let i=Math.max(32,r>>5),l=i<<1,o=i>>1,c=[],f=0,m=-1,p=[];function O(b){let S;if(b.lines>l&&b instanceof di)for(let w of b.children)O(w);else b.lines>o&&(f>o||!f)?(y(),c.push(b)):b instanceof Ht&&f&&(S=p[p.length-1])instanceof Ht&&b.lines+S.lines<=32?(f+=b.lines,m+=b.length+1,p[p.length-1]=new Ht(S.text.concat(b.text),S.length+1+b.length)):(f+b.lines>i&&y(),f+=b.lines,m+=b.length+1,p.push(b))}function y(){f!=0&&(c.push(p.length==1?p[0]:di.from(p,m)),m=-1,f=p.length=0)}for(let b of e)O(b);return y(),c.length==1?c[0]:new di(c,n)}}tt.empty=new Ht([""],0);function cR(t){let e=-1;for(let n of t)e+=n.length+1;return e}function N1(t,e,n=0,r=1e9){for(let i=0,l=0,o=!0;l<t.length&&i<=r;l++){let c=t[l],f=i+c.length;f>=n&&(f>r&&(c=c.slice(0,r-i)),i<n&&(c=c.slice(n-i)),o?(e[e.length-1]+=c,o=!1):e.push(c)),i=f+1}return e}function cx(t,e,n){return N1(t,[""],e,n)}class Lc{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Ht?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],l=this.offsets[r],o=l>>1,c=i instanceof Ht?i.text.length:i.children.length;if(o==(n>0?c:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((l&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=`
|
|
99
|
-
`,this;e--}else if(i instanceof Ht){let f=i.text[o+(n<0?-1:0)];if(this.offsets[r]+=n,f.length>Math.max(0,e))return this.value=e==0?f:n>0?f.slice(e):f.slice(0,f.length-e),this;e-=f.length}else{let f=i.children[o+(n<0?-1:0)];e>f.length?(e-=f.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(f),this.offsets.push(n>0?1:(f instanceof Ht?f.text.length:f.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class A7{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Lc(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class k7{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(tt.prototype[Symbol.iterator]=function(){return this.iter()},Lc.prototype[Symbol.iterator]=A7.prototype[Symbol.iterator]=k7.prototype[Symbol.iterator]=function(){return this});class uR{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function oo(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function cn(t,e,n=!0,r=!0){return sR(t,e,n,r)}function fR(t){return t>=56320&&t<57344}function dR(t){return t>=55296&&t<56320}function Yl(t,e){let n=t.charCodeAt(e);if(!dR(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return fR(r)?(n-55296<<10)+(r-56320)+65536:n}function M7(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function vu(t){return t<65536?1:2}const gp=/\r\n?|\n/;var An=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(An||(An={}));class yi{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n+1];e+=r<0?this.sections[n]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,r=0,i=0;n<this.sections.length;){let l=this.sections[n++],o=this.sections[n++];o<0?(e(r,i,l),i+=l):i+=o,r+=l}}iterChangedRanges(e,n=!1){Op(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];i<0?e.push(r,i):e.push(i,r)}return new yi(e)}composeDesc(e){return this.empty?e:e.empty?this:T7(this,e)}mapDesc(e,n=!1){return e.empty?this:xp(this,e,n)}mapPos(e,n=-1,r=An.Simple){let i=0,l=0;for(let o=0;o<this.sections.length;){let c=this.sections[o++],f=this.sections[o++],m=i+c;if(f<0){if(m>e)return l+(e-i);l+=c}else{if(r!=An.Simple&&m>=e&&(r==An.TrackDel&&i<e&&m>e||r==An.TrackBefore&&i<e||r==An.TrackAfter&&m>e))return null;if(m>e||m==e&&n<0&&!c)return e==i||n<0?l:l+f;l+=f}i=m}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return l}touchesRange(e,n=e){for(let r=0,i=0;r<this.sections.length&&i<=n;){let l=this.sections[r++],o=this.sections[r++],c=i+l;if(o>=0&&i<=n&&c>=e)return i<e&&c>n?"cover":!0;i=c}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let r=this.sections[n++],i=this.sections[n++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new yi(e)}static create(e){return new yi(e)}}class en extends yi{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Op(this,(n,r,i,l,o)=>e=e.replace(i,i+(r-n),o),!1),e}mapDesc(e,n=!1){return xp(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,l=0;i<n.length;i+=2){let o=n[i],c=n[i+1];if(c>=0){n[i]=c,n[i+1]=o;let f=i>>1;for(;r.length<f;)r.push(tt.empty);r.push(o?e.slice(l,l+o):tt.empty)}l+=o}return new en(n,r)}compose(e){return this.empty?e:e.empty?this:T7(this,e,!0)}map(e,n=!1){return e.empty?this:xp(this,e,n,!0)}iterChanges(e,n=!1){Op(this,e,n)}get desc(){return yi.create(this.sections)}filter(e){let n=[],r=[],i=[],l=new iu(this);e:for(let o=0,c=0;;){let f=o==e.length?1e9:e[o++];for(;c<f||c==f&&l.len==0;){if(l.done)break e;let p=Math.min(l.len,f-c);Sn(i,p,-1);let O=l.ins==-1?-1:l.off==0?l.ins:0;Sn(n,p,O),O>0&&Da(r,n,l.text),l.forward(p),c+=p}let m=e[o++];for(;c<m;){if(l.done)break e;let p=Math.min(l.len,m-c);Sn(n,p,-1),Sn(i,p,l.ins==-1?-1:l.off==0?l.ins:0),l.forward(p),c+=p}}return{changes:new en(n,r),filtered:yi.create(i)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let r=this.sections[n],i=this.sections[n+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,r){let i=[],l=[],o=0,c=null;function f(p=!1){if(!p&&!i.length)return;o<n&&Sn(i,n-o,-1);let O=new en(i,l);c=c?c.compose(O.map(c)):O,i=[],l=[],o=0}function m(p){if(Array.isArray(p))for(let O of p)m(O);else if(p instanceof en){if(p.length!=n)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${n})`);f(),c=c?c.compose(p.map(c)):p}else{let{from:O,to:y=O,insert:b}=p;if(O>y||O<0||y>n)throw new RangeError(`Invalid change range ${O} to ${y} (in doc of length ${n})`);let S=b?typeof b=="string"?tt.of(b.split(r||gp)):b:tt.empty,w=S.length;if(O==y&&w==0)return;O<o&&f(),O>o&&Sn(i,O-o,-1),Sn(i,y-O,w),Da(l,i,S),o=y}}return m(e),f(!c),c}static empty(e){return new en(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;i<e.length;i++){let l=e[i];if(typeof l=="number")n.push(l,-1);else{if(!Array.isArray(l)||typeof l[0]!="number"||l.some((o,c)=>c&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(l.length==1)n.push(l[0],0);else{for(;r.length<i;)r.push(tt.empty);r[i]=tt.of(l.slice(1)),n.push(l[0],r[i].length)}}}return new en(n,r)}static createSet(e,n){return new en(e,n)}}function Sn(t,e,n,r=!1){if(e==0&&n<=0)return;let i=t.length-2;i>=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function Da(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<r;)t.push(tt.empty);t.push(n)}}function Op(t,e,n){let r=t.inserted;for(let i=0,l=0,o=0;o<t.sections.length;){let c=t.sections[o++],f=t.sections[o++];if(f<0)i+=c,l+=c;else{let m=i,p=l,O=tt.empty;for(;m+=c,p+=f,f&&r&&(O=O.append(r[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)c=t.sections[o++],f=t.sections[o++];e(i,m,l,p,O),i=m,l=p}}}function xp(t,e,n,r=!1){let i=[],l=r?[]:null,o=new iu(t),c=new iu(e);for(let f=-1;;){if(o.done&&c.len||c.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&c.ins==-1){let m=Math.min(o.len,c.len);Sn(i,m,-1),o.forward(m),c.forward(m)}else if(c.ins>=0&&(o.ins<0||f==o.i||o.off==0&&(c.len<o.len||c.len==o.len&&!n))){let m=c.len;for(Sn(i,c.ins,-1);m;){let p=Math.min(o.len,m);o.ins>=0&&f<o.i&&o.len<=p&&(Sn(i,0,o.ins),l&&Da(l,i,o.text),f=o.i),o.forward(p),m-=p}c.next()}else if(o.ins>=0){let m=0,p=o.len;for(;p;)if(c.ins==-1){let O=Math.min(p,c.len);m+=O,p-=O,c.forward(O)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;Sn(i,m,f<o.i?o.ins:0),l&&f<o.i&&Da(l,i,o.text),f=o.i,o.forward(o.len-p)}else{if(o.done&&c.done)return l?en.createSet(i,l):yi.create(i);throw new Error("Mismatched change set lengths")}}}function T7(t,e,n=!1){let r=[],i=n?[]:null,l=new iu(t),o=new iu(e);for(let c=!1;;){if(l.done&&o.done)return i?en.createSet(r,i):yi.create(r);if(l.ins==0)Sn(r,l.len,0,c),l.next();else if(o.len==0&&!o.done)Sn(r,0,o.ins,c),i&&Da(i,r,o.text),o.next();else{if(l.done||o.done)throw new Error("Mismatched change set lengths");{let f=Math.min(l.len2,o.len),m=r.length;if(l.ins==-1){let p=o.ins==-1?-1:o.off?0:o.ins;Sn(r,f,p,c),i&&p&&Da(i,r,o.text)}else o.ins==-1?(Sn(r,l.off?0:l.len,f,c),i&&Da(i,r,l.textBit(f))):(Sn(r,l.off?0:l.len,o.off?0:o.ins,c),i&&!o.off&&Da(i,r,o.text));c=(l.ins>f||o.ins>=0&&o.len>f)&&(c||r.length>m),l.forward2(f),o.forward(f)}}}}class iu{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?tt.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?tt.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class vl{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new vl(r,i,this.flags)}extend(e,n=e,r=0){if(e<=this.anchor&&n>=this.anchor)return he.range(e,n,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return he.range(this.anchor,i,void 0,void 0,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return he.range(e.anchor,e.head)}static create(e,n,r){return new vl(e,n,r)}}class he{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:he.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new he([this.main],0)}addRange(e,n=!0){return he.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let r=this.ranges.slice();return r[n]=e,he.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new he(e.ranges.map(n=>vl.fromJSON(n)),e.main)}static single(e,n=e){return new he([he.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let l=e[i];if(l.empty?l.from<=r:l.from<r)return he.normalized(e.slice(),n);r=l.to}return new he(e,n)}static cursor(e,n=0,r,i){return vl.create(e,e,(n==0?0:n<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,n,r,i,l){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!l&&e!=n&&(l=n<e?1:-1),n<e?vl.create(n,e,48|o):vl.create(e,n,(l?l<0?8:16:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,l)=>i.from-l.from),n=e.indexOf(r);for(let i=1;i<e.length;i++){let l=e[i],o=e[i-1];if(l.empty?l.from<=o.to:l.from<o.to){let c=o.from,f=Math.max(l.to,o.to);i<=n&&n--,e.splice(--i,2,l.anchor>l.head?he.range(f,c):he.range(c,f))}}return new he(e,n)}}function C7(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let Xg=0;class Me{constructor(e,n,r,i,l){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=Xg++,this.default=e([]),this.extensions=typeof l=="function"?l(this):l}get reader(){return this}static define(e={}){return new Me(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:zg),!!e.static,e.enables)}of(e){return new V1([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new V1(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new V1(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function zg(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class V1{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=Xg++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,l=this.id,o=e[l]>>1,c=this.type==2,f=!1,m=!1,p=[];for(let O of this.dependencies)O=="doc"?f=!0:O=="selection"?m=!0:(((n=e[O.id])!==null&&n!==void 0?n:1)&1)==0&&p.push(e[O.id]);return{create(O){return O.values[o]=r(O),1},update(O,y){if(f&&y.docChanged||m&&(y.docChanged||y.selection)||yp(O,p)){let b=r(O);if(c?!ux(b,O.values[o],i):!i(b,O.values[o]))return O.values[o]=b,1}return 0},reconfigure:(O,y)=>{let b,S=y.config.address[l];if(S!=null){let w=ef(y,S);if(this.dependencies.every(A=>A instanceof Me?y.facet(A)===O.facet(A):A instanceof dr?y.field(A,!1)==O.field(A,!1):!0)||(c?ux(b=r(O),w,i):i(b=r(O),w)))return O.values[o]=w,0}else b=r(O);return O.values[o]=b,1}}}}function ux(t,e,n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!n(t[r],e[r]))return!1;return!0}function yp(t,e){let n=!1;for(let r of e)_c(t,r)&1&&(n=!0);return n}function hR(t,e,n){let r=n.map(f=>t[f.id]),i=n.map(f=>f.type),l=r.filter(f=>!(f&1)),o=t[e.id]>>1;function c(f){let m=[];for(let p=0;p<r.length;p++){let O=ef(f,r[p]);if(i[p]==2)for(let y of O)m.push(y);else m.push(O)}return e.combine(m)}return{create(f){for(let m of r)_c(f,m);return f.values[o]=c(f),1},update(f,m){if(!yp(f,l))return 0;let p=c(f);return e.compare(p,f.values[o])?0:(f.values[o]=p,1)},reconfigure(f,m){let p=yp(f,r),O=m.config.facets[e.id],y=m.facet(e);if(O&&!p&&zg(n,O))return f.values[o]=y,0;let b=c(f);return e.compare(b,y)?(f.values[o]=y,0):(f.values[o]=b,1)}}}const n1=Me.define({static:!0});class dr{constructor(e,n,r,i,l){this.id=e,this.createF=n,this.updateF=r,this.compareF=i,this.spec=l,this.provides=void 0}static define(e){let n=new dr(Xg++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(n1).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let l=r.values[n],o=this.updateF(l,i);return this.compareF(l,o)?0:(r.values[n]=o,1)},reconfigure:(r,i)=>{let l=r.facet(n1),o=i.facet(n1),c;return(c=l.find(f=>f.field==this))&&c!=o.find(f=>f.field==this)?(r.values[n]=c.create(r),1):i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}}init(e){return[this,n1.of({field:this,create:e})]}get extension(){return this}}const xl={lowest:4,low:3,default:2,high:1,highest:0};function bc(t){return e=>new E7(e,t)}const Su={highest:bc(xl.highest),high:bc(xl.high),default:bc(xl.default),low:bc(xl.low),lowest:bc(xl.lowest)};class E7{constructor(e,n){this.inner=e,this.prec=n}}class Df{of(e){return new bp(this,e)}reconfigure(e){return Df.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class bp{constructor(e,n){this.compartment=e,this.inner=n}}class J1{constructor(e,n,r,i,l,o){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=l,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,r){let i=[],l=Object.create(null),o=new Map;for(let y of mR(e,n,o))y instanceof dr?i.push(y):(l[y.facet.id]||(l[y.facet.id]=[])).push(y);let c=Object.create(null),f=[],m=[];for(let y of i)c[y.id]=m.length<<1,m.push(b=>y.slot(b));let p=r==null?void 0:r.config.facets;for(let y in l){let b=l[y],S=b[0].facet,w=p&&p[y]||[];if(b.every(A=>A.type==0))if(c[S.id]=f.length<<1|1,zg(w,b))f.push(r.facet(S));else{let A=S.combine(b.map(k=>k.value));f.push(r&&S.compare(A,r.facet(S))?r.facet(S):A)}else{for(let A of b)A.type==0?(c[A.id]=f.length<<1|1,f.push(A.value)):(c[A.id]=m.length<<1,m.push(k=>A.dynamicSlot(k)));c[S.id]=m.length<<1,m.push(A=>hR(A,S,b))}}let O=m.map(y=>y(c));return new J1(e,o,O,c,f,l)}}function mR(t,e,n){let r=[[],[],[],[],[]],i=new Map;function l(o,c){let f=i.get(o);if(f!=null){if(f<=c)return;let m=r[f].indexOf(o);m>-1&&r[f].splice(m,1),o instanceof bp&&n.delete(o.compartment)}if(i.set(o,c),Array.isArray(o))for(let m of o)l(m,c);else if(o instanceof bp){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let m=e.get(o.compartment)||o.inner;n.set(o.compartment,m),l(m,c)}else if(o instanceof E7)l(o.inner,o.prec);else if(o instanceof dr)r[c].push(o),o.provides&&l(o.provides,c);else if(o instanceof V1)r[c].push(o),o.facet.extensions&&l(o.facet.extensions,xl.default);else{let m=o.extension;if(!m)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);l(m,c)}}return l(t,xl.default),r.reduce((o,c)=>o.concat(c))}function _c(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function ef(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const $7=Me.define(),vp=Me.define({combine:t=>t.some(e=>e),static:!0}),Q7=Me.define({combine:t=>t.length?t[0]:void 0,static:!0}),P7=Me.define(),Z7=Me.define(),j7=Me.define(),R7=Me.define({combine:t=>t.length?t[0]:!1});class la{constructor(e,n){this.type=e,this.value=n}static define(){return new pR}}class pR{of(e){return new la(this,e)}}class gR{constructor(e){this.map=e}of(e){return new lt(this,e)}}class lt{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new lt(this.type,n)}is(e){return this.type==e}static define(e={}){return new gR(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let l=i.map(n);l&&r.push(l)}return r}}lt.reconfigure=lt.define();lt.appendConfig=lt.define();class Wt{constructor(e,n,r,i,l,o){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=l,this.scrollIntoView=o,this._doc=null,this._state=null,r&&C7(r,n.newLength),l.some(c=>c.type==Wt.time)||(this.annotations=l.concat(Wt.time.of(Date.now())))}static create(e,n,r,i,l,o){return new Wt(e,n,r,i,l,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Wt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Wt.time=la.define();Wt.userEvent=la.define();Wt.addToHistory=la.define();Wt.remote=la.define();function OR(t,e){let n=[];for(let r=0,i=0;;){let l,o;if(r<t.length&&(i==e.length||e[i]>=t[r]))l=t[r++],o=t[r++];else if(i<e.length)l=e[i++],o=e[i++];else return n;!n.length||n[n.length-1]<l?n.push(l,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function N7(t,e,n){var r;let i,l,o;return n?(i=e.changes,l=en.empty(e.changes.length),o=t.changes.compose(e.changes)):(i=e.changes.map(t.changes),l=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(l):(r=t.selection)===null||r===void 0?void 0:r.map(i),effects:lt.mapEffects(t.effects,i).concat(lt.mapEffects(e.effects,l)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function Sp(t,e,n){let r=e.selection,i=Ws(e.annotations);return e.userEvent&&(i=i.concat(Wt.userEvent.of(e.userEvent))),{changes:e.changes instanceof en?e.changes:en.of(e.changes||[],n,t.facet(Q7)),selection:r&&(r instanceof he?r:he.single(r.anchor,r.head)),effects:Ws(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function V7(t,e,n){let r=Sp(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let l=1;l<e.length;l++){e[l].filter===!1&&(n=!1);let o=!!e[l].sequential;r=N7(r,Sp(t,e[l],o?r.changes.newLength:t.doc.length),o)}let i=Wt.create(t,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return yR(n?xR(i):i)}function xR(t){let e=t.startState,n=!0;for(let i of e.facet(P7)){let l=i(t);if(l===!1){n=!1;break}Array.isArray(l)&&(n=n===!0?l:OR(n,l))}if(n!==!0){let i,l;if(n===!1)l=t.changes.invertedDesc,i=en.empty(e.doc.length);else{let o=t.changes.filter(n);i=o.changes,l=o.filtered.mapDesc(o.changes).invertedDesc}t=Wt.create(e,i,t.selection&&t.selection.map(l),lt.mapEffects(t.effects,l),t.annotations,t.scrollIntoView)}let r=e.facet(Z7);for(let i=r.length-1;i>=0;i--){let l=r[i](t);l instanceof Wt?t=l:Array.isArray(l)&&l.length==1&&l[0]instanceof Wt?t=l[0]:t=V7(e,Ws(l),!1)}return t}function yR(t){let e=t.startState,n=e.facet(j7),r=t;for(let i=n.length-1;i>=0;i--){let l=n[i](t);l&&Object.keys(l).length&&(r=N7(r,Sp(e,l,t.changes.newLength),!0))}return r==t?t:Wt.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const bR=[];function Ws(t){return t==null?bR:Array.isArray(t)?t:[t]}var Et=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Et||(Et={}));const vR=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let wp;try{wp=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SR(t){if(wp)return wp.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>""&&(n.toUpperCase()!=n.toLowerCase()||vR.test(n)))return!0}return!1}function wR(t){return e=>{if(!/\S/.test(e))return Et.Space;if(SR(e))return Et.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Et.Word;return Et.Other}}class it{constructor(e,n,r,i,l,o){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=l,o&&(o._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)_c(this,c<<1);this.computeSlot=null}field(e,n=!0){let r=this.config.address[e.id];if(r==null){if(n)throw new RangeError("Field is not present in this state");return}return _c(this,r),ef(this,r)}update(...e){return V7(this,e,!0)}applyTransaction(e){let n=this.config,{base:r,compartments:i}=n;for(let c of e.effects)c.is(Df.reconfigure)?(n&&(i=new Map,n.compartments.forEach((f,m)=>i.set(m,f)),n=null),i.set(c.value.compartment,c.value.extension)):c.is(lt.reconfigure)?(n=null,r=c.value):c.is(lt.appendConfig)&&(n=null,r=Ws(r).concat(c.value));let l;n?l=e.startState.values.slice():(n=J1.resolve(r,i,this),l=new it(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(f,m)=>m.reconfigure(f,this),null).values);let o=e.startState.facet(vp)?e.newSelection:e.newSelection.asSingle();new it(n,e.newDoc,o,l,(c,f)=>f.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:he.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),l=[r.range],o=Ws(r.effects);for(let c=1;c<n.ranges.length;c++){let f=e(n.ranges[c]),m=this.changes(f.changes),p=m.map(i);for(let y=0;y<c;y++)l[y]=l[y].map(p);let O=i.mapDesc(m,!0);l.push(f.range.map(O)),i=i.compose(p),o=lt.mapEffects(o,p).concat(lt.mapEffects(Ws(f.effects),O))}return{changes:i,selection:he.create(l,n.mainIndex),effects:o}}changes(e=[]){return e instanceof en?e:en.of(e,this.doc.length,this.facet(it.lineSeparator))}toText(e){return tt.of(e.split(this.facet(it.lineSeparator)||gp))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(_c(this,n),ef(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof dr&&this.config.address[i.id]!=null&&(n[r]=i.spec.toJSON(this.field(e[r]),this))}return n}static fromJSON(e,n={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let l in r)if(Object.prototype.hasOwnProperty.call(e,l)){let o=r[l],c=e[l];i.push(o.init(f=>o.spec.fromJSON(c,f)))}}return it.create({doc:e.doc,selection:he.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=J1.resolve(e.extensions||[],new Map),r=e.doc instanceof tt?e.doc:tt.of((e.doc||"").split(n.staticFacet(it.lineSeparator)||gp)),i=e.selection?e.selection instanceof he?e.selection:he.single(e.selection.anchor,e.selection.head):he.single(0);return C7(i,r.length),n.staticFacet(vp)||(i=i.asSingle()),new it(n,r,i,n.dynamicSlots.map(()=>null),(l,o)=>o.create(l),null)}get tabSize(){return this.facet(it.tabSize)}get lineBreak(){return this.facet(it.lineSeparator)||`
|
|
100
|
-
`}get readOnly(){return this.facet(R7)}phrase(e,...n){for(let r of this.facet(it.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let l=+(i||1);return!l||l>n.length?r:n[l-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let l of this.facet($7))for(let o of l(this,n,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return wR(n.length?n[0]:"")}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),l=this.charCategorizer(e),o=e-r,c=e-r;for(;o>0;){let f=cn(n,o,!1);if(l(n.slice(f,o))!=Et.Word)break;o=f}for(;c<i;){let f=cn(n,c);if(l(n.slice(c,f))!=Et.Word)break;c=f}return o==c?null:he.range(o+r,c+r)}}it.allowMultipleSelections=vp;it.tabSize=Me.define({combine:t=>t.length?t[0]:4});it.lineSeparator=Q7;it.readOnly=R7;it.phrases=Me.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});it.languageData=$7;it.changeFilter=P7;it.transactionFilter=Z7;it.transactionExtender=j7;Df.reconfigure=lt.define();function So(t,e,n={}){let r={};for(let i of t)for(let l of Object.keys(i)){let o=i[l],c=r[l];if(c===void 0)r[l]=o;else if(!(c===o||o===void 0))if(Object.hasOwnProperty.call(n,l))r[l]=n[l](c,o);else throw new Error("Config merge conflict for field "+l)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class Ya{eq(e){return this==e}range(e,n=e){return Ap.create(e,n,this)}}Ya.prototype.startSide=Ya.prototype.endSide=0;Ya.prototype.point=!1;Ya.prototype.mapMode=An.TrackDel;function Fg(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let Ap=class L7{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new L7(e,n,r)}};function kp(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Yg{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let l=r?this.to:this.from;for(let o=i,c=l.length;;){if(o==c)return o;let f=o+c>>1,m=l[f]-e||(r?this.value[f].endSide:this.value[f].startSide)-n;if(f==o)return m>=0?o:c;m>=0?c=f:o=f+1}}between(e,n,r,i){for(let l=this.findIndex(n,-1e9,!0),o=this.findIndex(r,1e9,!1,l);l<o;l++)if(i(this.from[l]+e,this.to[l]+e,this.value[l])===!1)return!1}map(e,n){let r=[],i=[],l=[],o=-1,c=-1;for(let f=0;f<this.value.length;f++){let m=this.value[f],p=this.from[f]+e,O=this.to[f]+e,y,b;if(p==O){let S=n.mapPos(p,m.startSide,m.mapMode);if(S==null||(y=b=S,m.startSide!=m.endSide&&(b=n.mapPos(p,m.endSide),b<y)))continue}else if(y=n.mapPos(p,m.startSide),b=n.mapPos(O,m.endSide),y>b||y==b&&m.startSide>0&&m.endSide<=0)continue;(b-y||m.endSide-m.startSide)<0||(o<0&&(o=y),m.point&&(c=Math.max(c,b-y)),r.push(m),i.push(y-o),l.push(b-o))}return{mapped:r.length?new Yg(i,l,r,c):null,pos:o}}}class Ie{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ie(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:l=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(r&&(n=n.slice().sort(kp)),this.isEmpty)return n.length?Ie.of(n):this;let c=new _7(this,null,-1).goto(0),f=0,m=[],p=new Dl;for(;c.value||f<n.length;)if(f<n.length&&(c.from-n[f].from||c.startSide-n[f].value.startSide)>=0){let O=n[f++];p.addInner(O.from,O.to,O.value)||m.push(O)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(f==n.length||this.chunkEnd(c.chunkIndex)<n[f].from)&&(!o||i>this.chunkEnd(c.chunkIndex)||l<this.chunkPos[c.chunkIndex])&&p.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!o||i>c.to||l<c.from||o(c.from,c.to,c.value))&&(p.addInner(c.from,c.to,c.value)||m.push(Ap.create(c.from,c.to,c.value))),c.next());return p.finishInner(this.nextLayer.isEmpty&&!m.length?Ie.empty:this.nextLayer.update({add:m,filter:o,filterFrom:i,filterTo:l}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let c=this.chunkPos[o],f=this.chunk[o],m=e.touchesRange(c,c+f.length);if(m===!1)i=Math.max(i,f.maxPoint),n.push(f),r.push(e.mapPos(c));else if(m===!0){let{mapped:p,pos:O}=f.map(c,e);p&&(i=Math.max(i,p.maxPoint),n.push(p),r.push(O))}}let l=this.nextLayer.map(e);return n.length==0?l:new Ie(r,n,l||Ie.empty,i)}between(e,n,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let l=this.chunkPos[i],o=this.chunk[i];if(n>=l&&e<=l+o.length&&o.between(l,e-l,n-l,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return au.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return au.from(e).goto(n)}static compare(e,n,r,i,l=-1){let o=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=l),c=n.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=l),f=fx(o,c,r),m=new vc(o,f,l),p=new vc(c,f,l);r.iterGaps((O,y,b)=>dx(m,O,p,y,b,i)),r.empty&&r.length==0&&dx(m,0,p,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=999999999);let l=e.filter(p=>!p.isEmpty&&n.indexOf(p)<0),o=n.filter(p=>!p.isEmpty&&e.indexOf(p)<0);if(l.length!=o.length)return!1;if(!l.length)return!0;let c=fx(l,o),f=new vc(l,c,0).goto(r),m=new vc(o,c,0).goto(r);for(;;){if(f.to!=m.to||!Mp(f.active,m.active)||f.point&&(!m.point||!Fg(f.point,m.point)))return!1;if(f.to>i)return!0;f.next(),m.next()}}static spans(e,n,r,i,l=-1){let o=new vc(e,null,l).goto(n),c=n,f=o.openStart;for(;;){let m=Math.min(o.to,r);if(o.point){let p=o.activeForPoint(o.to),O=o.pointFrom<n?p.length+1:o.point.startSide<0?p.length:Math.min(p.length,f);i.point(c,m,o.point,p,O,o.pointRank),f=Math.min(o.openEnd(m),p.length)}else m>c&&(i.span(c,m,o.active,f),f=o.openEnd(m));if(o.to>r)return f+(o.point&&o.to>r?1:0);c=o.to,o.next()}}static of(e,n=!1){let r=new Dl;for(let i of e instanceof Ap?[e]:n?AR(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ie.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ie.empty;i=i.nextLayer)n=new Ie(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ie.empty=new Ie([],[],null,-1);function AR(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let r=t[n];if(kp(e,r)>0)return t.slice().sort(kp);e=r}return t}Ie.empty.nextLayer=Ie.empty;class Dl{finishChunk(e){this.chunks.push(new Yg(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Dl)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ie.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ie.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function fx(t,e,n){let r=new Map;for(let l of t)for(let o=0;o<l.chunk.length;o++)l.chunk[o].maxPoint<=0&&r.set(l.chunk[o],l.chunkPos[o]);let i=new Set;for(let l of e)for(let o=0;o<l.chunk.length;o++){let c=r.get(l.chunk[o]);c!=null&&(n?n.mapPos(c):c)==l.chunkPos[o]&&!(n!=null&&n.touchesRange(c,c+l.chunk[o].length))&&i.add(l.chunk[o])}return i}class _7{constructor(e,n,r,i=0){this.layer=e,this.skip=n,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],r=e+n.from[this.rangeIndex];if(this.from=r,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class au{constructor(e){this.heap=e}static from(e,n=null,r=-1){let i=[];for(let l=0;l<e.length;l++)for(let o=e[l];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new _7(o,n,r,l));return i.length==1?i[0]:new au(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)X2(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)X2(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),X2(this.heap,0)}}}function X2(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1<t.length&&i.compare(t[r+1])>=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class vc{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=au.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){r1(this.active,e),r1(this.activeTo,e),r1(this.activeRank,e),this.minActive=hx(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:l}=this.cursor;for(;n<this.activeRank.length&&(l-this.activeRank[n]||i-this.activeTo[n])>0;)n++;i1(this.active,n,r),i1(this.activeTo,n,i),i1(this.activeRank,n,l),e&&i1(e,n,this.cursor.from),this.minActive=hx(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&r1(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let l=this.cursor.value;if(!l.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=l,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=l.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function dx(t,e,n,r,i,l){t.goto(e),n.goto(r);let o=r+i,c=r,f=r-e,m=!!l.boundChange;for(let p=!1;;){let O=t.to+f-n.to,y=O||t.endSide-n.endSide,b=y<0?t.to+f:n.to,S=Math.min(b,o);if(t.point||n.point?(t.point&&n.point&&Fg(t.point,n.point)&&Mp(t.activeForPoint(t.to),n.activeForPoint(n.to))||l.comparePoint(c,S,t.point,n.point),p=!1):(p&&l.boundChange(c),S>c&&!Mp(t.active,n.active)&&l.compareRange(c,S,t.active,n.active),m&&S<o&&(O||t.openEnd(b)!=n.openEnd(b))&&(p=!0)),b>o)break;c=b,y<=0&&t.next(),y>=0&&n.next()}}function Mp(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!Fg(t[n],e[n]))return!1;return!0}function r1(t,e){for(let n=e,r=t.length-1;n<r;n++)t[n]=t[n+1];t.pop()}function i1(t,e,n){for(let r=t.length-1;r>=e;r--)t[r+1]=t[r];t[e]=n}function hx(t,e){let n=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||t[i].endSide-t[n].endSide)<0&&(n=i,r=e[i]);return n}function Hf(t,e,n=t.length){let r=0;for(let i=0;i<n&&i<t.length;)t.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=cn(t,i));return r}function kR(t,e,n,r){for(let i=0,l=0;;){if(l>=e)return i;if(i==t.length)break;l+=t.charCodeAt(i)==9?n-l%n:1,i=cn(t,i)}return t.length}const Tp="ͼ",mx=typeof Symbol>"u"?"__"+Tp:Symbol.for(Tp),Cp=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),px=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Ba{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function l(o,c,f,m){let p=[],O=/^@(\w+)\b/.exec(o[0]),y=O&&O[1]=="keyframes";if(O&&c==null)return f.push(o[0]+";");for(let b in c){let S=c[b];if(/&/.test(b))l(b.split(/,\s*/).map(w=>o.map(A=>w.replace(/&/,A))).reduce((w,A)=>w.concat(A)),S,f);else if(S&&typeof S=="object"){if(!O)throw new RangeError("The value of a property ("+b+") should be a primitive value.");l(i(b),S,p,y)}else S!=null&&p.push(b.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+S+";")}(p.length||y)&&f.push((r&&!O&&!m?o.map(r):o).join(", ")+" {"+p.join(" ")+"}")}for(let o in e)l(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
|
|
101
|
-
`)}static newName(){let e=px[mx]||1;return px[mx]=e+1,Tp+e.toString(36)}static mount(e,n,r){let i=e[Cp],l=r&&r.nonce;i?l&&i.setNonce(l):i=new MR(e,l),i.mount(Array.isArray(n)?n:[n],e)}}let gx=new Map;class MR{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let l=gx.get(r);if(l)return e[Cp]=l;this.sheet=new i.CSSStyleSheet,gx.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[Cp]=this}mount(e,n){let r=this.sheet,i=0,l=0;for(let o=0;o<e.length;o++){let c=e[o],f=this.modules.indexOf(c);if(f<l&&f>-1&&(this.modules.splice(f,1),l--,f=-1),f==-1){if(this.modules.splice(l++,0,c),r)for(let m=0;m<c.rules.length;m++)r.insertRule(c.rules[m],i++)}else{for(;l<f;)i+=this.modules[l++].rules.length;i+=c.rules.length,l++}}if(r)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let f=0;f<this.modules.length;f++)o+=this.modules[f].getRules()+`
|
|
102
|
-
`;this.styleTag.textContent=o;let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var qa={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},lu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},TR=typeof navigator<"u"&&/Mac/.test(navigator.platform),CR=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var yn=0;yn<10;yn++)qa[48+yn]=qa[96+yn]=String(yn);for(var yn=1;yn<=24;yn++)qa[yn+111]="F"+yn;for(var yn=65;yn<=90;yn++)qa[yn]=String.fromCharCode(yn+32),lu[yn]=String.fromCharCode(yn);for(var z2 in qa)lu.hasOwnProperty(z2)||(lu[z2]=qa[z2]);function ER(t){var e=TR&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||CR&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?lu:qa)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function sn(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;e<arguments.length;e++)D7(t,arguments[e]);return t}function D7(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)D7(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let $n=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Ep=typeof document<"u"?document:{documentElement:{style:{}}};const $p=/Edge\/(\d+)/.exec($n.userAgent),H7=/MSIE \d/.test($n.userAgent),Qp=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($n.userAgent),Xf=!!(H7||Qp||$p),Ox=!Xf&&/gecko\/(\d+)/i.test($n.userAgent),F2=!Xf&&/Chrome\/(\d+)/.exec($n.userAgent),$R="webkitFontSmoothing"in Ep.documentElement.style,Pp=!Xf&&/Apple Computer/.test($n.vendor),xx=Pp&&(/Mobile\/\w+/.test($n.userAgent)||$n.maxTouchPoints>2);var we={mac:xx||/Mac/.test($n.platform),windows:/Win/.test($n.platform),linux:/Linux|X11/.test($n.platform),ie:Xf,ie_version:H7?Ep.documentMode||6:Qp?+Qp[1]:$p?+$p[1]:0,gecko:Ox,gecko_version:Ox?+(/Firefox\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,chrome:!!F2,chrome_version:F2?+F2[1]:0,ios:xx,android:/Android\b/.test($n.userAgent),webkit_version:$R?+(/\bAppleWebKit\/(\d+)/.exec($n.userAgent)||[0,0])[1]:0,safari:Pp,safari_version:Pp?+(/\bVersion\/(\d+(\.\d+)?)/.exec($n.userAgent)||[0,0])[1]:0,tabSize:Ep.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Bg(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const tf=Object.create(null);function qg(t,e,n){if(t==e)return!0;t||(t=tf),e||(e=tf);let r=Object.keys(t),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let l of r)if(l!=n&&(i.indexOf(l)==-1||t[l]!==e[l]))return!1;return!0}function QR(t,e){for(let n=t.attributes.length-1;n>=0;n--){let r=t.attributes[n].name;e[r]==null&&t.removeAttribute(r)}for(let n in e){let r=e[n];n=="style"?t.style.cssText=r:t.getAttribute(n)!=r&&t.setAttribute(n,r)}}function yx(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function PR(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let r=t.attributes[n];e[r.name]=r.value}return e}class Bl{eq(e){return!1}updateDOM(e,n,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var In=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(In||(In={}));class Le extends Ya{constructor(e,n,r,i){super(),this.startSide=e,this.endSide=n,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new wu(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return n+=r&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Hl(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:l,end:o}=X7(e,n);r=(l?n?-3e8:-1:5e8)-1,i=(o?n?2e8:1:-6e8)+1}return new Hl(e,r,i,n,e.widget||null,!0)}static line(e){return new Au(e)}static set(e,n=!1){return Ie.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Le.none=Ie.empty;class wu extends Le{constructor(e){let{start:n,end:r}=X7(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Bg(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||tf}eq(e){return this==e||e instanceof wu&&this.tagName==e.tagName&&qg(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}wu.prototype.point=!1;class Au extends Le{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Au&&this.spec.class==e.spec.class&&qg(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Au.prototype.mapMode=An.TrackBefore;Au.prototype.point=!0;class Hl extends Le{constructor(e,n,r,i,l,o){super(n,r,l,e),this.block=i,this.isReplace=o,this.mapMode=i?n<=0?An.TrackBefore:An.TrackAfter:An.TrackDel}get type(){return this.startSide!=this.endSide?In.WidgetRange:this.startSide<=0?In.WidgetBefore:In.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Hl&&ZR(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Hl.prototype.point=!0;function X7(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n??e,end:r??e}}function ZR(t,e){return t==e||!!(t&&e&&t.compare(e))}function Gs(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class su extends Ya{constructor(e,n){super(),this.tagName=e,this.attributes=n}eq(e){return e==this||e instanceof su&&this.tagName==e.tagName&&qg(this.attributes,e.attributes)}static create(e){return new su(e.tagName,e.attributes||tf)}static set(e,n=!1){return Ie.of(e,n)}}su.prototype.startSide=su.prototype.endSide=-1;function ou(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function Zp(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function Dc(t,e){if(!e.anchorNode)return!1;try{return Zp(t,e.anchorNode)}catch{return!1}}function L1(t){return t.nodeType==3?cu(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Hc(t,e,n,r){return n?bx(t,e,n,r,-1)||bx(t,e,n,r,1):!1}function Ia(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function nf(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function bx(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:ia(t))){if(t.nodeName=="DIV")return!1;let l=t.parentNode;if(!l||l.nodeType!=1)return!1;e=Ia(t)+(i<0?0:1),t=l}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?ia(t):0}else return!1}}function ia(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function rf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function jR(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function z7(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function RR(t,e,n,r,i,l,o,c){let f=t.ownerDocument,m=f.defaultView||window;for(let p=t,O=!1;p&&!O;)if(p.nodeType==1){let y,b=p==f.body,S=1,w=1;if(b)y=jR(m);else{if(/^(fixed|sticky)$/.test(getComputedStyle(p).position)&&(O=!0),p.scrollHeight<=p.clientHeight&&p.scrollWidth<=p.clientWidth){p=p.assignedSlot||p.parentNode;continue}let $=p.getBoundingClientRect();({scaleX:S,scaleY:w}=z7(p,$)),y={left:$.left,right:$.left+p.clientWidth*S,top:$.top,bottom:$.top+p.clientHeight*w}}let A=0,k=0;if(i=="nearest")e.top<y.top?(k=e.top-(y.top+o),n>0&&e.bottom>y.bottom+k&&(k=e.bottom-y.bottom+o)):e.bottom>y.bottom&&(k=e.bottom-y.bottom+o,n<0&&e.top-k<y.top&&(k=e.top-(y.top+o)));else{let $=e.bottom-e.top,Q=y.bottom-y.top;k=(i=="center"&&$<=Q?e.top+$/2-Q/2:i=="start"||i=="center"&&n<0?e.top-o:e.bottom-Q+o)-y.top}if(r=="nearest"?e.left<y.left?(A=e.left-(y.left+l),n>0&&e.right>y.right+A&&(A=e.right-y.right+l)):e.right>y.right&&(A=e.right-y.right+l,n<0&&e.left<y.left+A&&(A=e.left-(y.left+l))):A=(r=="center"?e.left+(e.right-e.left)/2-(y.right-y.left)/2:r=="start"==c?e.left-l:e.right-(y.right-y.left)+l)-y.left,A||k)if(b)m.scrollBy(A,k);else{let $=0,Q=0;if(k){let C=p.scrollTop;p.scrollTop+=k/w,Q=(p.scrollTop-C)*w}if(A){let C=p.scrollLeft;p.scrollLeft+=A/S,$=(p.scrollLeft-C)*S}e={left:e.left-$,top:e.top-Q,right:e.right-$,bottom:e.bottom-Q},$&&Math.abs($-A)<1&&(r="nearest"),Q&&Math.abs(Q-k)<1&&(i="nearest")}if(b)break;(e.top<y.top||e.bottom>y.bottom||e.left<y.left||e.right>y.right)&&(e={left:Math.max(e.left,y.left),right:Math.min(e.right,y.right),top:Math.max(e.top,y.top),bottom:Math.min(e.bottom,y.bottom)}),p=p.assignedSlot||p.parentNode}else if(p.nodeType==11)p=p.host;else break}function F7(t,e=!0){let n=t.ownerDocument,r=null,i=null;for(let l=t.parentNode;l&&!(l==n.body||(!e||r)&&i);)if(l.nodeType==1)!i&&l.scrollHeight>l.clientHeight&&(i=l),e&&!r&&l.scrollWidth>l.clientWidth&&(r=l),l=l.assignedSlot||l.parentNode;else if(l.nodeType==11)l=l.host;else break;return{x:r,y:i}}class NR{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?ia(n):0),r,Math.min(e.focusOffset,r?ia(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let Ol=null;we.safari&&we.safari_version>=26&&(Ol=!1);function Y7(t){if(t.setActive)return t.setActive();if(Ol)return t.focus(Ol);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(Ol==null?{get preventScroll(){return Ol={preventScroll:!0},!0}}:void 0),!Ol){Ol=!1;for(let n=0;n<e.length;){let r=e[n++],i=e[n++],l=e[n++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=l&&(r.scrollLeft=l)}}}let vx;function cu(t,e,n=e){let r=vx||(vx=document.createRange());return r.setEnd(t,n),r.setStart(t,e),r}function Ks(t,e,n,r){let i={key:e,code:e,keyCode:n,which:n,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let l=new KeyboardEvent("keydown",i);l.synthetic=!0,t.dispatchEvent(l);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,t.dispatchEvent(o),l.defaultPrevented||o.defaultPrevented}function VR(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function LR(t,e){let n=e.focusNode,r=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=r)return!1;for(r=Math.min(r,ia(n));;)if(r){if(n.nodeType!=1)return!1;let i=n.childNodes[r-1];i.contentEditable=="false"?r--:(n=i,r=ia(n))}else{if(n==t)return!0;r=Ia(n),n=n.parentNode}}function B7(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function q7(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=ia(n)}else if(n.parentNode&&!nf(n))r=Ia(n),n=n.parentNode;else return null}}function I7(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r<n.nodeValue.length)return{node:n,offset:r};if(n.nodeType==1&&r<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[r],r=0}else if(n.parentNode&&!nf(n))r=Ia(n)+1,n=n.parentNode;else return null}}class Ir{constructor(e,n,r=!0){this.node=e,this.offset=n,this.precise=r}static before(e,n){return new Ir(e.parentNode,Ia(e),n)}static after(e,n){return new Ir(e.parentNode,Ia(e)+1,n)}}var Xt=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Xt||(Xt={}));const Xl=Xt.LTR,Ig=Xt.RTL;function U7(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const _R=U7("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),DR=U7("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),jp=Object.create(null),si=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);jp[e]=n,jp[n]=-e}function W7(t){return t<=247?_R[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?DR[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const HR=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class mi{get dir(){return this.level%2?Ig:Xl}constructor(e,n,r){this.from=e,this.to=n,this.level=r}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,r,i){let l=-1;for(let o=0;o<e.length;o++){let c=e[o];if(c.from<=n&&c.to>=n){if(c.level==r)return o;(l<0||(i!=0?i<0?c.from<n:c.to>n:e[l].level>c.level))&&(l=o)}}if(l<0)throw new RangeError("Index out of range");return l}}function G7(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!G7(r.inner,i.inner))return!1}return!0}const yt=[];function XR(t,e,n,r,i){for(let l=0;l<=r.length;l++){let o=l?r[l-1].to:e,c=l<r.length?r[l].from:n,f=l?256:i;for(let m=o,p=f,O=f;m<c;m++){let y=W7(t.charCodeAt(m));y==512?y=p:y==8&&O==4&&(y=16),yt[m]=y==4?2:y,y&7&&(O=y),p=y}for(let m=o,p=f,O=f;m<c;m++){let y=yt[m];if(y==128)m<c-1&&p==yt[m+1]&&p&24?y=yt[m]=p:yt[m]=256;else if(y==64){let b=m+1;for(;b<c&&yt[b]==64;)b++;let S=m&&p==8||b<n&&yt[b]==8?O==1?1:8:256;for(let w=m;w<b;w++)yt[w]=S;m=b-1}else y==8&&O==1&&(yt[m]=1);p=y,y&7&&(O=y)}}}function zR(t,e,n,r,i){let l=i==1?2:1;for(let o=0,c=0,f=0;o<=r.length;o++){let m=o?r[o-1].to:e,p=o<r.length?r[o].from:n;for(let O=m,y,b,S;O<p;O++)if(b=jp[y=t.charCodeAt(O)])if(b<0){for(let w=c-3;w>=0;w-=3)if(si[w+1]==-b){let A=si[w+2],k=A&2?i:A&4?A&1?l:i:0;k&&(yt[O]=yt[si[w]]=k),c=w;break}}else{if(si.length==189)break;si[c++]=O,si[c++]=y,si[c++]=f}else if((S=yt[O])==2||S==1){let w=S==i;f=w?0:1;for(let A=c-3;A>=0;A-=3){let k=si[A+2];if(k&2)break;if(w)si[A+2]|=2;else{if(k&4)break;si[A+2]|=4}}}}}function FR(t,e,n,r){for(let i=0,l=r;i<=n.length;i++){let o=i?n[i-1].to:t,c=i<n.length?n[i].from:e;for(let f=o;f<c;){let m=yt[f];if(m==256){let p=f+1;for(;;)if(p==c){if(i==n.length)break;p=n[i++].to,c=i<n.length?n[i].from:e}else if(yt[p]==256)p++;else break;let O=l==1,y=(p<e?yt[p]:r)==1,b=O==y?O?1:2:r;for(let S=p,w=i,A=w?n[w-1].to:t;S>f;)S==A&&(S=n[--w].from,A=w?n[w-1].to:t),yt[--S]=b;f=p}else l=m,f++}}}function Rp(t,e,n,r,i,l,o){let c=r%2?2:1;if(r%2==i%2)for(let f=e,m=0;f<n;){let p=!0,O=!1;if(m==l.length||f<l[m].from){let w=yt[f];w!=c&&(p=!1,O=w==16)}let y=!p&&c==1?[]:null,b=p?r:r+1,S=f;e:for(;;)if(m<l.length&&S==l[m].from){if(O)break e;let w=l[m];if(!p)for(let A=w.to,k=m+1;;){if(A==n)break e;if(k<l.length&&l[k].from==A)A=l[k++].to;else{if(yt[A]==c)break e;break}}if(m++,y)y.push(w);else{w.from>f&&o.push(new mi(f,w.from,b));let A=w.direction==Xl!=!(b%2);Np(t,A?r+1:r,i,w.inner,w.from,w.to,o),f=w.to}S=w.to}else{if(S==n||(p?yt[S]!=c:yt[S]==c))break;S++}y?Rp(t,f,S,r+1,i,y,o):f<S&&o.push(new mi(f,S,b)),f=S}else for(let f=n,m=l.length;f>e;){let p=!0,O=!1;if(!m||f>l[m-1].to){let w=yt[f-1];w!=c&&(p=!1,O=w==16)}let y=!p&&c==1?[]:null,b=p?r:r+1,S=f;e:for(;;)if(m&&S==l[m-1].to){if(O)break e;let w=l[--m];if(!p)for(let A=w.from,k=m;;){if(A==e)break e;if(k&&l[k-1].to==A)A=l[--k].from;else{if(yt[A-1]==c)break e;break}}if(y)y.push(w);else{w.to<f&&o.push(new mi(w.to,f,b));let A=w.direction==Xl!=!(b%2);Np(t,A?r+1:r,i,w.inner,w.from,w.to,o),f=w.from}S=w.from}else{if(S==e||(p?yt[S-1]!=c:yt[S-1]==c))break;S--}y?Rp(t,S,f,r+1,i,y,o):S<f&&o.push(new mi(S,f,b)),f=S}}function Np(t,e,n,r,i,l,o){let c=e%2?2:1;XR(t,i,l,r,c),zR(t,i,l,r,c),FR(i,l,r,c),Rp(t,i,l,e,n,r,o)}function YR(t,e,n){if(!t)return[new mi(0,0,e==Ig?1:0)];if(e==Xl&&!n.length&&!HR.test(t))return K7(t.length);if(n.length)for(;t.length>yt.length;)yt[yt.length]=256;let r=[],i=e==Xl?0:1;return Np(t,i,i,n,0,t.length,r),r}function K7(t){return[new mi(0,t,0)]}let J7="";function BR(t,e,n,r,i){var l;let o=r.head-t.from,c=mi.find(e,o,(l=r.bidiLevel)!==null&&l!==void 0?l:-1,r.assoc),f=e[c],m=f.side(i,n);if(o==m){let y=c+=i?1:-1;if(y<0||y>=e.length)return null;f=e[c=y],o=f.side(!i,n),m=f.side(i,n)}let p=cn(t.text,o,f.forward(i,n));(p<f.from||p>f.to)&&(p=m),J7=t.text.slice(Math.min(o,p),Math.max(o,p));let O=c==(i?e.length-1:0)?null:e[c+(i?1:-1)];return O&&p==m&&O.level+(i?0:1)<f.level?he.cursor(O.side(!i,n)+t.from,O.forward(i,n)?1:-1,O.level):he.cursor(p+t.from,f.forward(i,n)?-1:1,f.level)}function qR(t,e,n){for(let r=e;r<n;r++){let i=W7(t.charCodeAt(r));if(i==1)return Xl;if(i==2||i==4)return Ig}return Xl}const e9=Me.define(),t9=Me.define(),n9=Me.define(),r9=Me.define(),Vp=Me.define(),i9=Me.define(),a9=Me.define(),Ug=Me.define(),Wg=Me.define(),l9=Me.define({combine:t=>t.some(e=>e)}),IR=Me.define({combine:t=>t.some(e=>e)}),s9=Me.define();class Js{constructor(e,n="nearest",r="nearest",i=5,l=5,o=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=l,this.isSnapshot=o}map(e){return e.empty?this:new Js(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Js(he.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const a1=lt.define({map:(t,e)=>t.map(e)}),o9=lt.define();function pi(t,e,n){let r=t.facet(r9);r.length?r[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Ui=Me.define({combine:t=>t.length?t[0]:!0});let UR=0;const zs=Me.define({combine(t){return t.filter((e,n)=>{for(let r=0;r<n;r++)if(t[r].plugin==e.plugin)return!1;return!0})}});class Un{constructor(e,n,r,i,l){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=l(this),this.extension=this.baseExtensions.concat(zs.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(zs.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:l,decorations:o}=n||{};return new Un(UR++,e,r,i,c=>{let f=[];return o&&f.push(zf.of(m=>{let p=m.plugin(c);return p?o(p):Le.none})),l&&f.push(l(c)),f})}static fromClass(e,n){return Un.define((r,i)=>new e(r,i),n)}}class Y2{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(pi(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){pi(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){pi(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const c9=Me.define(),Gg=Me.define(),zf=Me.define(),u9=Me.define(),Kg=Me.define(),ku=Me.define(),f9=Me.define();function Sx(t,e){let n=t.state.facet(f9);if(!n.length)return n;let r=n.map(l=>l instanceof Function?l(t):l),i=[];return Ie.spans(r,e.from,e.to,{point(){},span(l,o,c,f){let m=l-e.from,p=o-e.from,O=i;for(let y=c.length-1;y>=0;y--,f--){let b=c[y].spec.bidiIsolate,S;if(b==null&&(b=qR(e.text,m,p)),f>0&&O.length&&(S=O[O.length-1]).to==m&&S.direction==b)S.to=p,O=S.inner;else{let w={from:m,to:p,direction:b,inner:[]};O.push(w),O=w.inner}}}}),i}const d9=Me.define();function h9(t){let e=0,n=0,r=0,i=0;for(let l of t.state.facet(d9)){let o=l(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:n,top:r,bottom:i}}const $c=Me.define();class Pr{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new Pr(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(n-1,1)}}return e.splice(n,0,r),e}static extendWithRanges(e,n){if(n.length==0)return e;let r=[];for(let i=0,l=0,o=0;;){let c=i<e.length?e[i].fromB:1e9,f=l<n.length?n[l]:1e9,m=Math.min(c,f);if(m==1e9)break;let p=m+o,O=m,y=p;for(;;)if(l<n.length&&n[l]<=O){let b=n[l+1];l+=2,O=Math.max(O,b);for(let S=i;S<e.length&&e[S].fromB<=O;S++)o=e[S].toA-e[S].toB;y=Math.max(y,b+o)}else if(i<e.length&&e[i].fromB<=O){let b=e[i++];O=Math.max(O,b.toB),y=Math.max(y,b.toA),o=b.toA-b.toB}else break;r.push(new Pr(p,y,m,O))}return r}}class af{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=en.empty(this.startState.doc.length);for(let l of r)this.changes=this.changes.compose(l.changes);let i=[];this.changes.iterChangedRanges((l,o,c,f)=>i.push(new Pr(l,o,c,f))),this.changedRanges=i}static create(e,n,r){return new af(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const WR=[];class Vt{constructor(e,n,r=0){this.dom=e,this.length=n,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return WR}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&QR(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let r=n;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n){return null}domPosFor(e,n){let r=Ia(this.dom),i=this.length?e>0:n>0;return new Ir(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Yf)return e;return null}static get(e){return e.cmTile}}class Ff extends Vt{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,r=null,i,l=(e==null?void 0:e.node)==n?e:null,o=0;for(let c of this.children){if(c.sync(e),o+=c.length+c.breakAfter,i=r?r.nextSibling:n.firstChild,l&&i!=c.dom&&(l.written=!0),c.dom.parentNode==n)for(;i&&i!=c.dom;)i=wx(i);else n.insertBefore(c.dom,i);r=c.dom}for(i=r?r.nextSibling:n.firstChild,l&&i&&(l.written=!0);i;)i=wx(i);this.length=o}}function wx(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Yf extends Ff{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=Vt.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],r=this,i=0,l=0;;)if(i==r.children.length){if(!n.length)return;r=r.parent,r.breakAfter&&l++,i=n.pop()}else{let o=r.children[i++];if(o instanceof Gi)n.push(i),r=o,i=0;else{let c=l+o.length,f=e(o,l);if(f!==void 0)return f;l=c+o.breakAfter}}}resolveBlock(e,n){let r,i=-1,l,o=-1;if(this.blockTiles((c,f)=>{let m=f+c.length;if(e>=f&&e<=m){if(c.isWidget()&&n>=-1&&n<=1){if(c.flags&32)return!0;c.flags&16&&(r=void 0)}(f<e||e==m&&(n<-1?c.length:c.covers(1)))&&(!r||!c.isWidget()&&r.isWidget())&&(r=c,i=e-f),(m>e||e==f&&(n>1?c.length:c.covers(-1)))&&(!l||!c.isWidget()&&l.isWidget())&&(l=c,o=e-f)}}),!r&&!l)throw new Error("No tile at position "+e);return r&&n<0||!l?{tile:r,offset:i}:{tile:l,offset:o}}}class Gi extends Ff{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let r=new Gi(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class co extends Ff{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,r){let i=new co(n||document.createElement("div"),e);return(!n||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,n,r){let i=null,l=-1,o=null,c=-1;function f(p,O){for(let y=0,b=0;y<p.children.length&&b<=O;y++){let S=p.children[y],w=b+S.length;w>=O&&(S.isComposite()?f(S,O-b):(!o||o.isHidden&&(n>0||r&&KR(o,S)))&&(w>O||S.flags&32)?(o=S,c=O-b):(b<O||S.flags&16&&!S.isHidden)&&(i=S,l=O-b)),b=w}}f(this,e);let m=(n<0?i:o)||i||o;return m?{tile:m,offset:m==i?l:c}:null}coordsIn(e,n){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n):GR(this)}domIn(e,n){let r=this.resolveInline(e,n);if(r){let{tile:i,offset:l}=r;if(this.dom.contains(i.dom))return i.isText()?new Ir(i.dom,Math.min(i.dom.nodeValue.length,l)):i.domPosFor(l,i.flags&16?1:i.flags&32?-1:n);let o=r.tile.parent,c=!1;for(let f of o.children){if(c)return new Ir(f.dom,0);f==r.tile&&(c=!0)}}return new Ir(this.dom,0)}}function GR(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=L1(e);return n[n.length-1]||null}function KR(t,e){let n=t.coordsIn(0,1),r=e.coordsIn(0,1);return n&&r&&r.top<n.bottom}class Bn extends Ff{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let r=new Bn(n||document.createElement(e.tagName),e);return n||(r.flags|=4),r}}class Sl extends Vt{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,l=e,o=0;e==0&&n<0||e==r&&n>=0?we.chrome||we.gecko||(e?(i--,o=1):l<r&&(l++,o=-1)):n<0?i--:l<r&&l++;let c=cu(this.dom,i,l).getClientRects();if(!c.length)return null;let f=c[(o?o<0:n>=0)?0:c.length-1];return we.safari&&!o&&f.width==0&&(f=Array.prototype.find.call(c,m=>m.width)||f),o?rf(f,o<0):f||null}static of(e,n){let r=new Sl(n||document.createTextNode(e),e);return n||(r.flags|=2),r}}class zl extends Vt{constructor(e,n,r,i){super(e,n,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,r){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;if(r)return rf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let l=this.dom.getClientRects(),o=null;if(!l.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let f=c?l.length-1:0;o=l[f],!(e>0?f==0:f==l.length-1||o.top<o.bottom);f+=c?-1:1);return rf(o,!c)}}get overrideDOMText(){if(!this.length)return tt.empty;let{root:e}=this;if(!e)return tt.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,r,i,l){return l||(l=e.toDOM(n),e.editable||(l.contentEditable="false")),new zl(l,r,e,i)}}class lf extends Vt{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return tt.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class JR{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,r){let{tile:i,index:l,beforeBreak:o,parents:c}=this;for(;e||n>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(l==i.children.length){if(!e&&!c.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:l}=c.pop(),l++}else{let f=i.children[l],m=f.breakAfter;(n>0?f.length<=e:f.length<e)&&(!r||r.skip(f,0,f.length)!==!1||!f.isComposite)?(o=!!m,l++,e-=f.length):(c.push({tile:i,index:l}),i=f,l=0,r&&f.isComposite()&&r.enter(f))}else if(l==i.length)o=!!i.breakAfter,{tile:i,index:l}=c.pop(),l++;else if(e){let f=Math.min(e,i.length-l);r&&r.skip(i,l,l+f),e-=f,l+=f}else break;return this.tile=i,this.index=l,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class eN{constructor(e,n,r,i){this.from=e,this.to=n,this.wrapper=r,this.rank=i}}class tN{constructor(e,n,r){this.cache=e,this.root=n,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,r,i){var l;this.flushBuffer();let o=this.ensureMarks(n,r),c=o.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let f=o.children[o.children.length-1]=new Sl(c.dom,c.text+e);f.parent=o}else o.append(i||Sl.of(e,(l=this.cache.find(Sl))===null||l===void 0?void 0:l.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let r=this.curLine;r.dom!=n.line.dom&&(r.setDOM(this.cache.reused.has(n.line)?B2(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let i=r;for(let c=n.marks.length-1;c>=0;c--){let f=n.marks[c],m=i.lastChild;if(m instanceof Bn&&m.mark.eq(f.mark))m.dom!=f.dom&&m.setDOM(B2(f.dom)),i=m;else{if(this.cache.reused.get(f)){let O=Vt.get(f.dom);O&&O.setDOM(B2(f.dom))}let p=Bn.of(f.mark,f.dom);i.append(p),i=p}this.cache.reused.set(f,2)}let l=Vt.get(e.text);l&&this.cache.reused.set(l,2);let o=new Sl(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,n,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let l=this.ensureMarks(n,r);!i&&!(e.flags&16)&&l.append(this.getBuffer(1)),l.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,r){this.flushBuffer(),this.ensureMarks(n,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var r;e||(e=m9);let i=co.start(e,n||((r=this.cache.find(co))===null||r===void 0?void 0:r.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var r;let i=this.curLine;for(let l=e.length-1;l>=0;l--){let o=e[l],c;if(n>0&&(c=i.lastChild)&&c instanceof Bn&&c.mark.eq(o))i=c,n--;else{let f=Bn.of(o,(r=this.cache.find(Bn,m=>m.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(f),i=f,n=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Ax(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(we.ios&&Ax(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(q2,0,32)||new zl(q2.toDOM(),0,q2,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=new eN(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-n.rank||this.wrappers[r-1].to-n.to)<0;)r--;this.wrappers.splice(r,0,n)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let r of this.wrappers){let i=n.lastChild;if(r.from<this.pos&&i instanceof Gi&&i.wrapper.eq(r.wrapper))n=i;else{let l=Gi.of(r.wrapper,(e=this.cache.find(Gi,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);n.append(l),n=l}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),r=this.cache.find(lf,void 0,1);return r&&(r.flags=n),r||new lf(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class nN{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:l,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let c=this.textOff=Math.min(e,i.length);return l?null:i.slice(0,c)}let n=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,n);return this.textOff=n,r}}const sf=[zl,co,Sl,Bn,lf,Gi,Yf];for(let t=0;t<sf.length;t++)sf[t].bucket=t;class rN{constructor(e){this.view=e,this.buckets=sf.map(()=>[]),this.index=sf.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,r=this.buckets[n];r.length<6?r.push(e):r[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,r=2){let i=e.bucket,l=this.buckets[i],o=this.index[i];for(let c=l.length-1;c>=0;c--){let f=(c+o)%l.length,m=l[f];if((!n||n(m))&&!this.reused.has(m))return l.splice(f,1),f<o&&this.index[i]--,this.reused.set(m,r),m}return null}findWidget(e,n,r){let i=this.buckets[0];if(i.length)for(let l=0,o=0;;l++){if(l==i.length){if(o)return null;o=1,l=0}let c=i[l];if(!this.reused.has(c)&&(o==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view,c.widget)))return i.splice(l,1),l<this.index[0]&&this.index[0]--,c.widget==e&&c.length==n&&(c.flags&497)==r?(this.reused.set(c,1),c):(this.reused.set(c,2),new zl(c.dom,n,e,c.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class iN{constructor(e,n,r,i,l){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=l,this.openWidget=!1,this.openMarks=0,this.cache=new rN(e),this.text=new nN(e.state.doc),this.builder=new tN(this.cache,new Yf(e,e.contentDOM),Ie.iter(r)),this.cache.reused.set(n,2),this.old=new JR(n),this.reuseWalker={skip:(o,c,f)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,n){let r=n&&this.getCompositionContext(n.text);for(let i=0,l=0,o=0;;){let c=o<e.length?e[o++]:null,f=c?c.fromA:this.old.root.length;if(f>i){let m=f-i;this.preserve(m,!o,!c),i=f,l+=m}if(!c)break;n&&c.fromA<=n.range.fromA&&c.toA>=n.range.toA?(this.forward(c.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(l,n.range.fromB),this.cache.clear(),this.builder.addComposition(n,r),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,c.toA),this.emit(n.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(l,c.toB)),l=c.toB,i=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,r){let i=sN(this.old),l=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,c,f)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(f-c);else{let m=f>0||c<o.length?zl.of(o.widget,this.view,f-c,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);m.flags&256?(m.flags&=-2,this.builder.addBlockWidget(m)):(this.builder.ensureLine(null),this.builder.addInlineWidget(m,i,l),l=i.length)}else if(o.isText())this.builder.ensureLine(null),!c&&f==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,l,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(c,f),i,l)),l=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof lf)this.cache.add(o);else if(o instanceof Bn)this.builder.ensureLine(null),this.builder.addMark(o,i,l),this.cache.reused.set(o,1),l=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof Bn&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=l=0):o instanceof Bn&&(i.shift(),l=Math.min(l,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let r=null,i=this.builder,l=0,o=Ie.spans(this.decorations,e,n,{point:(c,f,m,p,O,y)=>{if(m instanceof Hl){if(this.disallowBlockEffectsFor[y]){if(m.block)throw new RangeError("Block decorations may not be specified via plugins");if(f>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(l=p.length,O>p.length)i.continueWidget(f-c);else{let b=m.widget||(m.block?uo.block:uo.inline),S=aN(m),w=this.cache.findWidget(b,f-c,S)||zl.of(b,this.view,f-c,S);m.block?(m.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(w)):(i.ensureLine(r),i.addInlineWidget(w,p,O))}r=null}else r=lN(r,m);f>c&&this.text.skip(f-c)},span:(c,f,m,p)=>{for(let O=c;O<f;){let y=this.text.next(Math.min(512,f-O));y==null?(i.addLineStartIfNotCovered(r),i.addBreak(),O++):(i.ensureLine(r),i.addText(y,m,O==c?p:m.length),O+=y.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>l,this.openMarks=o}forward(e,n,r=1){n-e<=10?this.old.advance(n-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let n=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let l=Vt.get(i);if(i==this.view.contentDOM)break;l instanceof Bn?n.push(l):l!=null&&l.isLine()?r=l:l instanceof Gi||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new co(i,m9):r||n.push(Bn.of(new wu({tagName:i.nodeName.toLowerCase(),attributes:PR(i)}),i)))}return{line:r,marks:n}}}function Ax(t,e){let n=r=>{for(let i of r.children)if((e?i.isText():i.length)||n(i))return!0;return!1};return n(t)}function aN(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const m9={class:"cm-line"};function lN(t,e){let n=e.spec.attributes,r=e.spec.class;return!n&&!r||(t||(t={class:"cm-line"}),n&&Bg(n,t),r&&(t.class+=" "+r)),t}function sN(t){let e=[];for(let n=t.parents.length;n>1;n--){let r=n==t.parents.length?t.tile:t.parents[n].tile;r instanceof Bn&&e.push(r.mark)}return e}function B2(t){let e=Vt.get(t);return e&&e.setDOM(t.cloneNode()),t}class uo extends Bl{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}uo.inline=new uo("span");uo.block=new uo("div");const q2=new class extends Bl{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class kx{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Le.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Yf(e,e.contentDOM),this.updateInner([new Pr(0,0,0,e.state.doc.length)],null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:p,toA:O})=>O<this.minWidthFrom||p>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!gN(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let l=i>-1?cN(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:p,to:O}=this.hasComposition;r=new Pr(p,O,e.changes.mapPos(p,-1),e.changes.mapPos(O,1)).addToSet(r.slice())}this.hasComposition=l?{from:l.range.fromB,to:l.range.toB}:null,(we.ie||we.chrome)&&!l&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,c=this.blockWrappers;this.updateDeco();let f=dN(o,this.decorations,e.changes);f.length&&(r=Pr.extendWithRanges(r,f));let m=mN(c,this.blockWrappers,e.changes);return m.length&&(r=Pr.extendWithRanges(r,m)),l&&!r.some(p=>p.fromA<=l.range.fromA&&p.toA>=l.range.toA)&&(r=l.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,l),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(n||e.length){let o=this.tile,c=new iN(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&Vt.get(n.text)&&c.cache.reused.set(Vt.get(n.text),2),this.tile=c.run(e,n),Lp(o,c.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let l=we.chrome||we.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(l),l&&(l.written||r.selectionRange.focusNode!=l.node||!this.tile.dom.contains(l.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let l of this.tile.children)l.isWidget()&&l.widget instanceof I2&&i.push(l.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(o9)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,l=i==r,o=!l&&!(this.view.state.facet(Ui)||r.tabIndex>-1)&&Dc(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(l||n||o))return;let c=this.forceSelection;this.forceSelection=!1;let f=this.view.state.selection.main,m,p;if(f.empty?p=m=this.inlineDOMNearPos(f.anchor,f.assoc||1):(p=this.inlineDOMNearPos(f.head,f.head==f.from?1:-1),m=this.inlineDOMNearPos(f.anchor,f.anchor==f.from?1:-1)),we.gecko&&f.empty&&!this.hasComposition&&oN(m)){let y=document.createTextNode("");this.view.observer.ignore(()=>m.node.insertBefore(y,m.node.childNodes[m.offset]||null)),m=p=new Ir(y,0),c=!0}let O=this.view.observer.selectionRange;(c||!O.focusNode||(!Hc(m.node,m.offset,O.anchorNode,O.anchorOffset)||!Hc(p.node,p.offset,O.focusNode,O.focusOffset))&&!this.suppressWidgetCursorChange(O,f))&&(this.view.observer.ignore(()=>{we.android&&we.chrome&&r.contains(O.focusNode)&&pN(O.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let y=ou(this.view.root);if(y)if(f.empty){if(we.gecko){let b=uN(m.node,m.offset);if(b&&b!=3){let S=(b==1?q7:I7)(m.node,m.offset);S&&(m=new Ir(S.node,S.offset))}}y.collapse(m.node,m.offset),f.bidiLevel!=null&&y.caretBidiLevel!==void 0&&(y.caretBidiLevel=f.bidiLevel)}else if(y.extend){y.collapse(m.node,m.offset);try{y.extend(p.node,p.offset)}catch{}}else{let b=document.createRange();f.anchor>f.head&&([m,p]=[p,m]),b.setEnd(p.node,p.offset),b.setStart(m.node,m.offset),y.removeAllRanges(),y.addRange(b)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(m,p)),this.impreciseAnchor=m.precise?null:new Ir(O.anchorNode,O.anchorOffset),this.impreciseHead=p.precise?null:new Ir(O.focusNode,O.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Hc(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=ou(e.root),{anchorNode:i,anchorOffset:l}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let o=this.lineAt(n.head,n.assoc);if(!o)return;let c=o.posAtStart;if(n.head==c||n.head==c+o.length)return;let f=this.coordsAt(n.head,-1),m=this.coordsAt(n.head,1);if(!f||!m||f.bottom>m.top)return;let p=this.domAtPos(n.head+n.assoc,n.assoc);r.collapse(p.node,p.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=n.from&&r.collapse(i,l)}posFromDOM(e,n){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let l;if(e==r.dom)l=r.dom.childNodes[n];else{let o=ia(e)==0?0:n==0?-1:1;for(;;){let c=e.parentNode;if(c==r.dom)break;o==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?o=-1:o=1),e=c}o<0?l=e:l=e.nextSibling}if(l==r.dom.firstChild)return i;for(;l&&!Vt.get(l);)l=l.nextSibling;if(!l)return i+r.length;for(let o=0,c=i;;o++){let f=r.children[o];if(f.dom==l)return c;c+=f.length+f.breakAfter}}else return r.isText()?e==r.dom?i+n:i+(n?r.length:0):i}domAtPos(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.domPosFor(e,n):r.domIn(i,n)}inlineDOMNearPos(e,n){let r,i=-1,l=!1,o,c=-1,f=!1;return this.tile.blockTiles((m,p)=>{if(m.isWidget()){if(m.flags&32&&p>=e)return!0;m.flags&16&&(l=!0)}else{let O=p+m.length;if(p<=e&&(r=m,i=e-p,l=O<e),O>=e&&!o&&(o=m,c=e-p,f=p>e),p>e&&o)return!0}}),!r&&!o?this.domAtPos(e,n):(l&&o?r=null:f&&r&&(o=null),r&&n<0||!o?r.domIn(i,n):o.domIn(c,n))}coordsAt(e,n){let{tile:r,offset:i}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof I2?null:r.coordsInWidget(i,n,!0):r.coordsIn(i,n)}lineAt(e,n){let{tile:r}=this.tile.resolveBlock(e,n);return r.isLine()?r:null}coordsForChar(e){let{tile:n,offset:r}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function i(l,o){if(l.isComposite())for(let c of l.children){if(c.length>=o){let f=i(c,o);if(f)return f}if(o-=c.length,o<0)break}else if(l.isText()&&o<l.length){let c=cn(l.text,o);if(c==o)return null;let f=cu(l.dom,o,c).getClientRects();for(let m=0;m<f.length;m++){let p=f[m];if(m==f.length-1||p.top<p.bottom&&p.left<p.right)return p}}return null}return i(n,r)}measureVisibleLineHeights(e){let n=[],{from:r,to:i}=e,l=this.view.contentDOM.clientWidth,o=l>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,f=this.view.textDirection==Xt.LTR,m=0,p=(O,y,b)=>{for(let S=0;S<O.children.length&&!(y>i);S++){let w=O.children[S],A=y+w.length,k=w.dom.getBoundingClientRect(),{height:$}=k;if(b&&!S&&(m+=k.top-b.top),w instanceof Gi)A>r&&p(w,y,k);else if(y>=r&&(m>0&&n.push(-m),n.push($+m),m=0,o)){let Q=w.dom.lastChild,C=Q?L1(Q):[];if(C.length){let M=C[C.length-1],Z=f?M.right-k.left:k.right-M.left;Z>c&&(c=Z,this.minWidth=l,this.minWidthFrom=y,this.minWidthTo=A)}}b&&S==O.children.length-1&&(m+=b.bottom-k.bottom),y=A+w.breakAfter}};return p(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?Xt.RTL:Xt.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let c=0,f;for(let m of o.children){if(!m.isText()||/[^ -~]/.test(m.text))return;let p=L1(m.dom);if(p.length!=1)return;c+=p[0].width,f=p[0].height}if(c)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:c/o.length,textHeight:f}}});if(e)return e;let n=document.createElement("div"),r,i,l;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let o=L1(n.firstChild)[0];r=n.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,l=o&&o.height?o.height:r,n.remove()}),{lineHeight:r,charWidth:i,textHeight:l}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let l=i==n.viewports.length?null:n.viewports[i],o=l?l.from-1:this.view.state.doc.length;if(o>r){let c=(n.lineBlockAt(o).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(Le.replace({widget:new I2(c),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!l)break;r=l.to+1}return Le.set(e)}updateDeco(){let e=1,n=this.view.state.facet(zf).map(l=>(this.dynamicDecorationMap[e++]=typeof l=="function")?l(this.view):l),r=!1,i=this.view.state.facet(Kg).map((l,o)=>{let c=typeof l=="function";return c&&(r=!0),c?l(this.view):l});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ie.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(u9).map(l=>typeof l=="function"?l(this.view):l)}scrollIntoView(e){var n;if(e.isSnapshot){let p=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=p.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let p of this.view.state.facet(s9))try{if(p(this.view,e.range,e))return!0}catch(O){pi(this.view.state,O,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(n=r.assoc)!==null&&n!==void 0?n:r.empty?0:r.head>r.anchor?-1:1),l;if(!i)return;!r.empty&&(l=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,l.left),top:Math.min(i.top,l.top),right:Math.max(i.right,l.right),bottom:Math.max(i.bottom,l.bottom)});let o=h9(this.view),c={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:f,offsetHeight:m}=this.view.scrollDOM;if(RR(this.view.scrollDOM,c,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,f),-f),Math.max(Math.min(e.yMargin,m),-m),this.view.textDirection==Xt.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let p=this.view.docView.lineAt(r.head,1);p&&p.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let n=r=>r.isWidget()||r.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){Lp(this.tile)}}function Lp(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let r of t.children)Lp(r,e)}}function oN(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function p9(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let r=q7(n.focusNode,n.focusOffset),i=I7(n.focusNode,n.focusOffset),l=r||i;if(i&&r&&i.node!=r.node){let c=Vt.get(i.node);if(!c||c.isText()&&c.text!=i.node.nodeValue)l=i;else if(t.docView.lastCompositionAfterCursor){let f=Vt.get(r.node);!f||f.isText()&&f.text!=r.node.nodeValue||(l=i)}}if(t.docView.lastCompositionAfterCursor=l!=r,!l)return null;let o=e-l.offset;return{from:o,to:o+l.node.nodeValue.length,node:l.node}}function cN(t,e,n){let r=p9(t,n);if(!r)return null;let{node:i,from:l,to:o}=r,c=i.nodeValue;if(/[\n\r]/.test(c)||t.state.doc.sliceString(r.from,r.to)!=c)return null;let f=e.invertedDesc;return{range:new Pr(f.mapPos(l),f.mapPos(o),l,o),text:i}}function uN(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let fN=class{constructor(){this.changes=[]}compareRange(e,n){Gs(e,n,this.changes)}comparePoint(e,n){Gs(e,n,this.changes)}boundChange(e){Gs(e,e,this.changes)}};function dN(t,e,n){let r=new fN;return Ie.compare(t,e,n,r),r.changes}class hN{constructor(){this.changes=[]}compareRange(e,n){Gs(e,n,this.changes)}comparePoint(){}boundChange(e){Gs(e,e,this.changes)}}function mN(t,e,n){let r=new hN;return Ie.compare(t,e,n,r),r.changes}function pN(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function gN(t,e){let n=!1;return e&&t.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(n=!0)}),n}class I2 extends Bl{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function ON(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),l=e-i.from;if(i.length==0)return he.cursor(e);l==0?n=1:l==i.length&&(n=-1);let o=l,c=l;n<0?o=cn(i.text,l,!1):c=cn(i.text,l);let f=r(i.text.slice(o,c));for(;o>0;){let m=cn(i.text,o,!1);if(r(i.text.slice(m,o))!=f)break;o=m}for(;c<i.length;){let m=cn(i.text,c);if(r(i.text.slice(c,m))!=f)break;c=m}return he.range(o+i.from,c+i.from)}function xN(t,e,n,r,i){let l=Math.round((r-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let c=t.viewState.heightOracle.textHeight,f=Math.floor((i-n.top-(t.defaultLineHeight-c)*.5)/c);l+=f*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+kR(o,l,t.state.tabSize)}function yN(t,e,n){let r=t.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let l of r.type){if(l.from>e)break;if(!(l.to<e)){if(l.from<e&&l.to>e)return l;(!i||l.type==In.Text&&(i.type!=l.type||(n<0?l.from<e:l.to>e)))&&(i=l)}}return i||r}return r}function bN(t,e,n,r){let i=yN(t,e.head,e.assoc||-1),l=!r||i.type!=In.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(l){let o=t.dom.getBoundingClientRect(),c=t.textDirectionAt(i.from),f=t.posAtCoords({x:n==(c==Xt.LTR)?o.right-1:o.left+1,y:(l.top+l.bottom)/2});if(f!=null)return he.cursor(f,n?-1:1)}return he.cursor(n?i.to:i.from,n?-1:1)}function Mx(t,e,n,r){let i=t.state.doc.lineAt(e.head),l=t.bidiSpans(i),o=t.textDirectionAt(i.from);for(let c=e,f=null;;){let m=BR(i,l,o,c,n),p=J7;if(!m){if(i.number==(n?t.state.doc.lines:1))return c;p=`
|
|
103
|
-
`,i=t.state.doc.line(i.number+(n?1:-1)),l=t.bidiSpans(i),m=t.visualLineSide(i,!n)}if(f){if(!f(p))return c}else{if(!r)return m;f=r(p)}c=m}}function vN(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return l=>{let o=r(l);return i==Et.Space&&(i=o),i==o}}function SN(t,e,n,r){let i=e.head,l=n?1:-1;if(i==(n?t.state.doc.length:0))return he.cursor(i,e.assoc);let o=e.goalColumn,c,f=t.contentDOM.getBoundingClientRect(),m=t.coordsAtPos(i,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),p=t.documentTop;if(m)o==null&&(o=m.left-f.left),c=l<0?m.top:m.bottom;else{let S=t.viewState.lineBlockAt(i);o==null&&(o=Math.min(f.right-f.left,t.defaultCharacterWidth*(i-S.from))),c=(l<0?S.top:S.bottom)+p}let O=f.left+o,y=t.viewState.heightOracle.textHeight>>1,b=r??y;for(let S=0;;S+=y){let w=c+(b+S)*l,A=_p(t,{x:O,y:w},!1,l);if(n?w>f.bottom:w<f.top)return he.cursor(A.pos,A.assoc);let k=t.coordsAtPos(A.pos,A.assoc),$=k?(k.top+k.bottom)/2:0;if(!k||(n?$>c:$<c))return he.cursor(A.pos,A.assoc,void 0,o)}}function Xc(t,e,n){for(;;){let r=0;for(let i of t)i.between(e-1,e+1,(l,o,c)=>{if(e>l&&e<o){let f=r||n||(e-l<o-e?-1:1);e=f<0?l:o,r=f}});if(!r)return e}}function g9(t,e){let n=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],l=null;if(i.empty){let o=Xc(t,i.from,0);o!=i.from&&(l=he.cursor(o,-1))}else{let o=Xc(t,i.from,-1),c=Xc(t,i.to,1);(o!=i.from||c!=i.to)&&(l=he.range(i.from==i.anchor?o:c,i.from==i.head?o:c))}l&&(n||(n=e.ranges.slice()),n[r]=l)}return n?he.create(n,e.mainIndex):e}function U2(t,e,n){let r=Xc(t.state.facet(ku).map(i=>i(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:he.cursor(r,r<n.from?1:-1)}class hi{constructor(e,n){this.pos=e,this.assoc=n}}function _p(t,e,n,r){let i=t.contentDOM.getBoundingClientRect(),l=i.top+t.viewState.paddingTop,{x:o,y:c}=e,f=c-l,m;for(;;){if(f<0)return new hi(0,1);if(f>t.viewState.docHeight)return new hi(t.state.doc.length,-1);if(m=t.elementAtHeight(f),r==null)break;if(m.type==In.Text){if(r<0?m.to<t.viewport.from:m.from>t.viewport.to)break;let y=t.docView.coordsAt(r<0?m.from:m.to,r>0?-1:1);if(y&&(r<0?y.top<=f+l:y.bottom>=f+l))break}let O=t.viewState.heightOracle.textHeight/2;f=r>0?m.bottom+O:m.top-O}if(t.viewport.from>=m.to||t.viewport.to<=m.from){if(n)return null;if(m.type==In.Text){let O=xN(t,i,m,o,c);return new hi(O,O==m.from?1:-1)}}if(m.type!=In.Text)return f<(m.top+m.bottom)/2?new hi(m.from,1):new hi(m.to,-1);let p=t.docView.lineAt(m.from,2);return(!p||p.length!=m.length)&&(p=t.docView.lineAt(m.from,-2)),new wN(t,o,c,t.textDirectionAt(m.from)).scanTile(p,m.from)}class wN{constructor(e,n,r,i){this.view=e,this.x=n,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[mi.find(i,e-r.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:r,spans:i}=this.bidiSpansAt(e);return i[mi.find(i,e-r.from,-1,n)].dir}bidiIn(e,n){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<n)}scan(e,n){let r=0,i=e.length-1,l=new Set,o=this.bidiIn(e[0],e[i]),c,f,m=-1,p=1e9,O;e:for(;r<i;){let b=i-r,S=r+i>>1;t:if(l.has(S)){let A=r+Math.floor(Math.random()*b);for(let k=0;k<b;k++){if(!l.has(A)){S=A;break t}A++,A==i&&(A=r)}break e}l.add(S);let w=n(S);if(w)for(let A=0;A<w.length;A++){let k=w[A],$=0;if(!(k.width==0&&w.length>1)){if(k.bottom<this.y)(!c||c.bottom<k.bottom)&&(c=k),$=1;else if(k.top>this.y)(!f||f.top>k.top)&&(f=k),$=-1;else{let Q=k.left>this.x?this.x-k.left:k.right<this.x?this.x-k.right:0,C=Math.abs(Q);C<p&&(m=S,p=C,O=k),Q&&($=Q<0==(this.baseDir==Xt.LTR)?-1:1)}$==-1&&(!o||this.baseDirAt(e[S],1))?i=S:$==1&&(!o||this.baseDirAt(e[S+1],-1))&&(r=S+1)}}}if(!O){let b=c&&(!f||this.y-c.bottom<f.top-this.y)?c:f;return this.y=(b.top+b.bottom)/2,this.scan(e,n)}let y=(o?this.dirAt(e[m],1):this.baseDir)==Xt.LTR;return{i:m,after:this.x>(O.left+O.right)/2==y}}scanText(e,n){let r=[];for(let l=0;l<e.length;l=cn(e.text,l))r.push(n+l);r.push(n+e.length);let i=this.scan(r,l=>{let o=r[l]-n,c=r[l+1]-n;return cu(e.dom,o,c).getClientRects()});return i.after?new hi(r[i.i+1],-1):new hi(r[i.i],1)}scanTile(e,n){if(!e.length)return new hi(n,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,n);if(c.isComposite())return this.scanTile(c,n)}let r=[n];for(let c=0,f=n;c<e.children.length;c++)r.push(f+=e.children[c].length);let i=this.scan(r,c=>{let f=e.children[c];return f.flags&48?null:(f.dom.nodeType==1?f.dom:cu(f.dom,0,f.length)).getClientRects()}),l=e.children[i.i],o=r[i.i];return l.isText()?this.scanText(l,o):l.isComposite()?this.scanTile(l,o):i.after?new hi(r[i.i+1],-1):new hi(o,1)}}const _s="";class AN{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(it.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=_s}readRange(e,n){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let l=this.text.length;this.readNode(i);let o=Vt.get(i),c=i.nextSibling;if(c==n){o!=null&&o.breakAfter&&!c&&r!=this.view.contentDOM&&this.lineBreak();break}let f=Vt.get(c);(o&&f?o.breakAfter:(o?o.breakAfter:nf(i))||nf(c)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>l)&&!MN(c,n)&&this.lineBreak(),i=c}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let l=-1,o=1,c;if(this.lineSeparator?(l=n.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(c=i.exec(n))&&(l=c.index,o=c[0].length),this.append(n.slice(r,l<0?n.length:l)),l<0)break;if(this.lineBreak(),o>1)for(let f of this.points)f.node==e&&f.pos>this.text.length&&(f.pos-=o-1);r=l+o}}readNode(e){let n=Vt.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(kN(e,r.node,r.offset)?n:0))}}function kN(t,e,n){for(;;){if(!e||n<ia(e))return!1;if(e==t)return!0;n=Ia(e)+1,e=e.parentNode}}function MN(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let r=Vt.get(t);if(!(r!=null&&r.isWidget()))return!1;r&&(n||(n=[])).push(r)}if(n)for(let r of n){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class Tx{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class TN{constructor(e,n,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:l,impreciseAnchor:o}=e.docView,c=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=O9(e.docView.tile,n,r,0))){let f=l||o?[]:EN(e),m=new AN(f,e);m.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=m.text,this.newSel=$N(f,this.bounds.from)}else{let f=e.observer.selectionRange,m=l&&l.node==f.focusNode&&l.offset==f.focusOffset||!Zp(e.contentDOM,f.focusNode)?c.main.head:e.docView.posFromDOM(f.focusNode,f.focusOffset),p=o&&o.node==f.anchorNode&&o.offset==f.anchorOffset||!Zp(e.contentDOM,f.anchorNode)?c.main.anchor:e.docView.posFromDOM(f.anchorNode,f.anchorOffset),O=e.viewport;if((we.ios||we.chrome)&&c.main.empty&&m!=p&&(O.from>0||O.to<e.state.doc.length)){let y=Math.min(m,p),b=Math.max(m,p),S=O.from-y,w=O.to-b;(S==0||S==1||y==0)&&(w==0||w==-1||b==e.state.doc.length)&&(m=0,p=e.state.doc.length)}if(e.inputState.composing>-1&&c.ranges.length>1)this.newSel=c.replaceRange(he.range(p,m));else if(e.lineWrapping&&p==m&&!(c.main.empty&&c.main.head==m)&&e.inputState.lastTouchTime>Date.now()-100){let y=e.coordsAtPos(m,-1),b=0;y&&(b=e.inputState.lastTouchY<=y.bottom?-1:1),this.newSel=he.create([he.cursor(m,b)])}else this.newSel=he.single(p,m)}}}function O9(t,e,n,r){if(t.isComposite()){let i=-1,l=-1,o=-1,c=-1;for(let f=0,m=r,p=r;f<t.children.length;f++){let O=t.children[f],y=m+O.length;if(m<e&&y>n)return O9(O,e,n,m);if(y>=e&&i==-1&&(i=f,l=m),m>n&&O.dom.parentNode==t.dom){o=f,c=p;break}p=y,m=y+O.breakAfter}return{from:l,to:c<0?r+t.length:c,startDOM:(i?t.children[i-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:o<t.children.length&&o>=0?t.children[o].dom:null}}else return t.isText()?{from:r,to:r+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function x9(t,e){let n,{newSel:r}=e,{state:i}=t,l=i.selection.main,o=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:c,to:f}=e.bounds,m=l.from,p=null;(o===8||we.android&&e.text.length<f-c)&&(m=l.to,p="end");let O=i.doc.sliceString(c,f,_s),y,b;!l.empty&&l.from>=c&&l.to<=f&&(e.typeOver||O!=e.text)&&O.slice(0,l.from-c)==e.text.slice(0,l.from-c)&&O.slice(l.to-c)==e.text.slice(y=e.text.length-(O.length-(l.to-c)))?n={from:l.from,to:l.to,insert:tt.of(e.text.slice(l.from-c,y).split(_s))}:(b=y9(O,e.text,m-c,p))&&(we.chrome&&o==13&&b.toB==b.from+2&&e.text.slice(b.from,b.toB)==_s+_s&&b.toB--,n={from:c+b.from,to:c+b.toA,insert:tt.of(e.text.slice(b.from,b.toB).split(_s))})}else r&&(!t.hasFocus&&i.facet(Ui)||of(r,l))&&(r=null);if(!n&&!r)return!1;if((we.mac||we.android)&&n&&n.from==n.to&&n.from==l.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=he.single(r.main.anchor-1,r.main.head-1)),n={from:n.from,to:n.to,insert:tt.of([n.insert.toString().replace("."," ")])}):i.doc.lineAt(l.from).to<l.to&&t.docView.lineHasWidget(l.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:l.from,to:l.to,insert:i.toText(t.inputState.insertingText)}:we.chrome&&n&&n.from==n.to&&n.from==l.head&&n.insert.toString()==`
|
|
104
|
-
`&&t.lineWrapping&&(r&&(r=he.single(r.main.anchor-1,r.main.head-1)),n={from:l.from,to:l.to,insert:tt.of([" "])}),n)return Jg(t,n,r,o);if(r&&!of(r,l)){let c=!1,f="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(c=!0),f=t.inputState.lastSelectionOrigin,f=="select.pointer"&&(r=g9(i.facet(ku).map(m=>m(t)),r))),t.dispatch({selection:r,scrollIntoView:c,userEvent:f}),!0}else return!1}function Jg(t,e,n,r=-1){if(we.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(we.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Ks(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Ks(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Ks(t.contentDOM,"Delete",46)))return!0;let l=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,c=()=>o||(o=CN(t,e,n));return t.state.facet(i9).some(f=>f(t,e.from,e.to,l,c))||t.dispatch(c()),!0}function CN(t,e,n){let r,i=t.state,l=i.selection.main,o=-1;if(e.from==e.to&&e.from<l.from||e.from>l.to){let f=e.from<l.from?-1:1,m=f<0?l.from:l.to,p=Xc(i.facet(ku).map(O=>O(t)),m,f);e.from==p&&(o=p)}if(o>-1)r={changes:e,selection:he.cursor(e.from+e.insert.length,-1)};else if(e.from>=l.from&&e.to<=l.to&&e.to-e.from>=(l.to-l.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let f=l.from<e.from?i.sliceDoc(l.from,e.from):"",m=l.to>e.to?i.sliceDoc(e.to,l.to):"";r=i.replaceSelection(t.state.toText(f+e.insert.sliceString(0,void 0,t.state.lineBreak)+m))}else{let f=i.changes(e),m=n&&n.main.to<=f.newLength?n.main:void 0;if(i.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=l.to+10&&e.to>=l.to-10){let p=t.state.sliceDoc(e.from,e.to),O,y=n&&p9(t,n.main.head);if(y){let S=e.insert.length-(e.to-e.from);O={from:y.from,to:y.to-S}}else O=t.state.doc.lineAt(l.head);let b=l.to-e.to;r=i.changeByRange(S=>{if(S.from==l.from&&S.to==l.to)return{changes:f,range:m||S.map(f)};let w=S.to-b,A=w-p.length;if(t.state.sliceDoc(A,w)!=p||w>=O.from&&A<=O.to)return{range:S};let k=i.changes({from:A,to:w,insert:e.insert}),$=S.to-l.to;return{changes:k,range:m?he.range(Math.max(0,m.anchor+$),Math.max(0,m.head+$)):S.map(k)}})}else r={changes:f,selection:m&&i.selection.replaceRange(m)}}let c="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,c+=".compose",t.inputState.compositionFirstChange&&(c+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:c,scrollIntoView:!0})}function y9(t,e,n,r){let i=Math.min(t.length,e.length),l=0;for(;l<i&&t.charCodeAt(l)==e.charCodeAt(l);)l++;if(l==i&&t.length==e.length)return null;let o=t.length,c=e.length;for(;o>0&&c>0&&t.charCodeAt(o-1)==e.charCodeAt(c-1);)o--,c--;if(r=="end"){let f=Math.max(0,l-Math.min(o,c));n-=o+f-l}if(o<l&&t.length<e.length){let f=n<=l&&n>=o?l-n:0;l-=f,c=l+(c-o),o=l}else if(c<l){let f=n<=l&&n>=c?l-n:0;l-=f,o=l+(o-c),c=l}return{from:l,toA:o,toB:c}}function EN(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:l}=t.observer.selectionRange;return n&&(e.push(new Tx(n,r)),(i!=n||l!=r)&&e.push(new Tx(i,l))),e}function $N(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?he.single(n+e,r+e):null}function of(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class QN{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,we.safari&&e.contentDOM.addEventListener("input",()=>null),we.gecko&&BN(e.contentDOM.ownerDocument)}handleEvent(e){!_N(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=PN(e),r=this.handlers,i=this.view.contentDOM;for(let l in n)if(l!="scroll"){let o=!n[l].handlers.length,c=r[l];c&&o!=!c.handlers.length&&(i.removeEventListener(l,this.handleEvent),c=null),c||i.addEventListener(l,this.handleEvent,{passive:o})}for(let l in r)l!="scroll"&&!n[l]&&i.removeEventListener(l,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&v9.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),we.android&&we.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return we.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((n=b9.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||ZN.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Ks(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:we.safari&&!we.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Cx(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){pi(n.state,i)}}}function PN(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec,l=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(l)for(let c in l){let f=l[c];f&&n(c).handlers.push(Cx(r.value,f))}if(o)for(let c in o){let f=o[c];f&&n(c).observers.push(Cx(r.value,f))}}for(let r in Jr)n(r).handlers.push(Jr[r]);for(let r in Wn)n(r).observers.push(Wn[r]);return e}const b9=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],ZN="dthko",v9=[16,17,18,20,91,92,224,225],l1=6;function s1(t){return Math.max(0,t)*.7+8}function jN(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class RN{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=F7(e.contentDOM),this.atoms=e.state.facet(ku).map(o=>o(e));let l=e.contentDOM.ownerDocument;l.addEventListener("mousemove",this.move=this.move.bind(this)),l.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(it.allowMultipleSelections)&&NN(e,n),this.dragging=LN(e,n)&&A9(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&jN(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,l=0,o=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:l,bottom:c}=this.scrollParents.y.getBoundingClientRect());let f=h9(this.view);e.clientX-f.left<=i+l1?n=-s1(i-e.clientX):e.clientX+f.right>=o-l1&&(n=s1(e.clientX-o)),e.clientY-f.top<=l+l1?r=-s1(l-e.clientY):e.clientY+f.bottom>=c-l1&&(r=s1(e.clientY-c)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,r=g9(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function NN(t,e){let n=t.state.facet(e9);return n.length?n[0](e):we.mac?e.metaKey:e.ctrlKey}function VN(t,e){let n=t.state.facet(t9);return n.length?n[0](e):we.mac?!e.altKey:!e.ctrlKey}function LN(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=ou(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let l=0;l<i.length;l++){let o=i[l];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function _N(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=Vt.get(n))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Jr=Object.create(null),Wn=Object.create(null),S9=we.ie&&we.ie_version<15||we.ios&&we.webkit_version<604;function DN(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),w9(t,n.value)},50)}function Bf(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function w9(t,e){e=Bf(t.state,Ug,e);let{state:n}=t,r,i=1,l=n.toText(e),o=l.lines==n.selection.ranges.length;if(Dp!=null&&n.selection.ranges.every(f=>f.empty)&&Dp==l.toString()){let f=-1;r=n.changeByRange(m=>{let p=n.doc.lineAt(m.from);if(p.from==f)return{range:m};f=p.from;let O=n.toText((o?l.line(i++).text:e)+n.lineBreak);return{changes:{from:p.from,insert:O},range:he.cursor(m.from+O.length)}})}else o?r=n.changeByRange(f=>{let m=l.line(i++);return{changes:{from:f.from,to:f.to,insert:m.text},range:he.cursor(f.from+m.length)}}):r=n.replaceSelection(l);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Wn.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};Wn.wheel=Wn.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};Jr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Wn.touchstart=(t,e)=>{let n=t.inputState,r=e.targetTouches[0];n.lastTouchTime=Date.now(),r&&(n.lastTouchX=r.clientX,n.lastTouchY=r.clientY),n.setSelectionOrigin("select.pointer")};Wn.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};Jr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(n9))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=XN(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new RN(t,e,n,r)),r&&t.observer.ignore(()=>{Y7(t.contentDOM);let l=t.root.activeElement;l&&!l.contains(t.contentDOM)&&l.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function Ex(t,e,n,r){if(r==1)return he.cursor(e,n);if(r==2)return ON(t.state,e,n);{let i=t.docView.lineAt(e,n),l=t.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:l.from,c=i?i.posAtEnd:l.to;return c<t.state.doc.length&&c==l.to&&c++,he.range(o,c)}}const HN=we.ie&&we.ie_version<=11;let $x=null,Qx=0,Px=0;function A9(t){if(!HN)return t.detail;let e=$x,n=Px;return $x=t,Px=Date.now(),Qx=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(Qx+1)%3:1}function XN(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=A9(e),i=t.state.selection;return{update(l){l.docChanged&&(n.pos=l.changes.mapPos(n.pos),i=i.map(l.changes))},get(l,o,c){let f=t.posAndSideAtCoords({x:l.clientX,y:l.clientY},!1),m,p=Ex(t,f.pos,f.assoc,r);if(n.pos!=f.pos&&!o){let O=Ex(t,n.pos,n.assoc,r),y=Math.min(O.from,p.from),b=Math.max(O.to,p.to);p=y<p.from?he.range(y,b,p.assoc):he.range(b,y,p.assoc)}return o?i.replaceRange(i.main.extend(p.from,p.to,p.assoc)):c&&r==1&&i.ranges.length>1&&(m=zN(i,f.pos))?m:c?i.addRange(p):he.create([p])}}}function zN(t,e){for(let n=0;n<t.ranges.length;n++){let{from:r,to:i}=t.ranges[n];if(r<=e&&i>=e)return he.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Jr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.tile.nearest(e.target);if(i&&i.isWidget()){let l=i.posAtStart,o=l+i.length;(l>=n.to||o<=n.from)&&(n=he.range(l,o))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",Bf(t.state,Wg,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Jr.dragend=t=>(t.inputState.draggedContent=null,!1);function Zx(t,e,n,r){if(n=Bf(t.state,Ug,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:l}=t.inputState,o=r&&l&&VN(t,e)?{from:l.from,to:l.to}:null,c={from:i,insert:n},f=t.state.changes(o?[o,c]:c);t.focus(),t.dispatch({changes:f,selection:{anchor:f.mapPos(i,-1),head:f.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Jr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,l=()=>{++i==n.length&&Zx(t,e,r.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let c=new FileReader;c.onerror=l,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(r[o]=c.result),l()},c.readAsText(n[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Zx(t,e,r,!0),!0}return!1};Jr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=S9?null:e.clipboardData;return n?(w9(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(DN(t),!1)};function FN(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function YN(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:l}of t.selection.ranges){let o=t.doc.lineAt(l);o.number>i&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),i=o.number}r=!0}return{text:Bf(t,Wg,e.join(t.lineBreak)),ranges:n,linewise:r}}let Dp=null;Jr.copy=Jr.cut=(t,e)=>{if(!Dc(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:r,linewise:i}=YN(t.state);if(!n&&!i)return!1;Dp=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let l=S9?null:e.clipboardData;return l?(l.clearData(),l.setData("text/plain",n),!0):(FN(t,n),!1)};const k9=la.define();function M9(t,e){let n=[];for(let r of t.facet(a9)){let i=r(t,e);i&&n.push(i)}return n.length?t.update({effects:n,annotations:k9.of(!0)}):null}function T9(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=M9(t.state,e);n?t.dispatch(n):t.update([])}},10)}Wn.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),T9(t)};Wn.blur=t=>{t.observer.clearSelectionRange(),T9(t)};Wn.compositionstart=Wn.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Wn.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,we.chrome&&we.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Wn.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Jr.beforeinput=(t,e)=>{var n,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let l=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(l&&o.length){let c=o[0],f=t.posAtDOM(c.startContainer,c.startOffset),m=t.posAtDOM(c.endContainer,c.endOffset);return Jg(t,{from:f,to:m,insert:t.state.toText(l)},null),!0}}let i;if(we.chrome&&we.android&&(i=b9.find(l=>l.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let l=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>l+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return we.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),we.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Wn.compositionend(t,e),20),!1};const jx=new Set;function BN(t){jx.has(t)||(jx.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const Rx=["pre-wrap","normal","pre-line","break-spaces"];let fo=!1;function Nx(){fo=!1}class qN{constructor(e){this.lineWrapping=e,this.doc=tt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Rx.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(n=!0,this.heightSamples[Math.floor(i*10)]=!0)}return n}refresh(e,n,r,i,l,o){let c=Rx.indexOf(e)>-1,f=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=l,f){this.heightSamples={};for(let m=0;m<o.length;m++){let p=o[m];p<0?m++:this.heightSamples[Math.floor(p*10)]=!0}}return f}}class IN{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Br{constructor(e,n,r,i,l){this.from=e,this.length=n,this.top=r,this.height=i,this._content=l}get type(){return typeof this._content=="number"?In.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Hl?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Br(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var vt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(vt||(vt={}));const _1=.001;class Zn{constructor(e,n,r=2){this.length=e,this.height=n,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>_1&&(fo=!0),this.height=e)}replace(e,n,r){return Zn.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let l=this,o=r.doc;for(let c=i.length-1;c>=0;c--){let{fromA:f,toA:m,fromB:p,toB:O}=i[c],y=l.lineAt(f,vt.ByPosNoHeight,r.setDoc(n),0,0),b=y.to>=m?y:l.lineAt(m,vt.ByPosNoHeight,r,0,0);for(O+=b.to-m,m=b.to;c>0&&y.from<=i[c-1].toA;)f=i[c-1].fromA,p=i[c-1].fromB,c--,f<y.from&&(y=l.lineAt(f,vt.ByPosNoHeight,r,0,0));p+=y.from-f,f=y.from;let S=e8.build(r.setDoc(o),e,p,O);l=cf(l,l.replace(f,m,S))}return l.updateHeight(r,0)}static empty(){return new cr(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,r=e.length,i=0,l=0;for(;;)if(n==r)if(i>l*2){let c=e[n-1];c.break?e.splice(--n,1,c.left,null,c.right):e.splice(--n,1,c.left,c.right),r+=1+c.break,i-=c.size}else if(l>i*2){let c=e[r];c.break?e.splice(r,1,c.left,null,c.right):e.splice(r,1,c.left,c.right),r+=2+c.break,l-=c.size}else break;else if(i<l){let c=e[n++];c&&(i+=c.size)}else{let c=e[--r];c&&(l+=c.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,r++),new WN(Zn.of(e.slice(0,n)),o,Zn.of(e.slice(r)))}}function cf(t,e){return t==e?t:(t.constructor!=e.constructor&&(fo=!0),e)}Zn.prototype.size=1;const UN=Le.replace({});class C9 extends Zn{constructor(e,n,r){super(e,n),this.deco=r,this.spaceAbove=0}mainBlock(e,n){return new Br(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Br(i,0,r,this.spaceAbove,UN):this.mainBlock(r,i)}lineAt(e,n,r,i,l){let o=this.mainBlock(i,l);return this.spaceAbove?this.blockAt(0,r,i,l).join(o):o}forEachLine(e,n,r,i,l,o){e<=l+this.length&&n>=l&&o(this.lineAt(0,vt.ByPos,r,i,l))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class cr extends C9{constructor(e,n,r){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,n){return new Br(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof cr||i instanceof xn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof xn?i=new cr(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):Zn.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class xn extends Zn{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,l=i-r+1,o,c=0;if(e.lineWrapping){let f=Math.min(this.height,e.lineHeight*l);o=f/l,this.length>l+1&&(c=(this.height-f)/(this.length-l-1))}else o=this.height/l;return{firstLine:r,lastLine:i,perLine:o,perChar:c}}blockAt(e,n,r,i){let{firstLine:l,lastLine:o,perLine:c,perChar:f}=this.heightMetrics(n,i);if(n.lineWrapping){let m=i+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),p=n.doc.lineAt(m),O=c+p.length*f,y=Math.max(r,e-O/2);return new Br(p.from,p.length,y,O,0)}else{let m=Math.max(0,Math.min(o-l,Math.floor((e-r)/c))),{from:p,length:O}=n.doc.line(l+m);return new Br(p,O,r+c*m,c,0)}}lineAt(e,n,r,i,l){if(n==vt.ByHeight)return this.blockAt(e,r,i,l);if(n==vt.ByPosNoHeight){let{from:b,to:S}=r.doc.lineAt(e);return new Br(b,S-b,0,0,0)}let{firstLine:o,perLine:c,perChar:f}=this.heightMetrics(r,l),m=r.doc.lineAt(e),p=c+m.length*f,O=m.number-o,y=i+c*O+f*(m.from-l-O);return new Br(m.from,m.length,Math.max(i,Math.min(y,i+this.height-p)),p,0)}forEachLine(e,n,r,i,l,o){e=Math.max(e,l),n=Math.min(n,l+this.length);let{firstLine:c,perLine:f,perChar:m}=this.heightMetrics(r,l);for(let p=e,O=i;p<=n;){let y=r.doc.lineAt(p);if(p==e){let S=y.number-c;O+=f*S+m*(e-l-S)}let b=f+m*y.length;o(new Br(y.from,y.length,O,b,0)),O+=b,p=y.to+1}}replace(e,n,r){let i=this.length-n;if(i>0){let l=r[r.length-1];l instanceof xn?r[r.length-1]=new xn(l.length+i):r.push(null,new xn(i-1))}if(e>0){let l=r[0];l instanceof xn?r[0]=new xn(e+l.length):r.unshift(new xn(e-1),null)}return Zn.of(r)}decomposeLeft(e,n){n.push(new xn(e-1),null)}decomposeRight(e,n){n.push(null,new xn(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let l=n+this.length;if(i&&i.from<=n+this.length&&i.more){let o=[],c=Math.max(n,i.from),f=-1;for(i.from>n&&o.push(new xn(i.from-n-1).updateHeight(e,n));c<=l&&i.more;){let p=e.doc.lineAt(c).length;o.length&&o.push(null);let O=i.heights[i.index++],y=0;O<0&&(y=-O,O=i.heights[i.index++]),f==-1?f=O:Math.abs(O-f)>=_1&&(f=-2);let b=new cr(p,O,y);b.outdated=!1,o.push(b),c+=p+1}c<=l&&o.push(null,new xn(l-c).updateHeight(e,c));let m=Zn.of(o);return(f<0||Math.abs(m.height-this.height)>=_1||Math.abs(f-this.heightMetrics(e,n).perLine)>=_1)&&(fo=!0),cf(this,m)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class WN extends Zn{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let l=r+this.left.height;return e<l?this.left.blockAt(e,n,r,i):this.right.blockAt(e,n,l,i+this.left.length+this.break)}lineAt(e,n,r,i,l){let o=i+this.left.height,c=l+this.left.length+this.break,f=n==vt.ByHeight?e<o:e<c,m=f?this.left.lineAt(e,n,r,i,l):this.right.lineAt(e,n,r,o,c);if(this.break||(f?m.to<c:m.from>c))return m;let p=n==vt.ByPosNoHeight?vt.ByPosNoHeight:vt.ByPos;return f?m.join(this.right.lineAt(c,p,r,o,c)):this.left.lineAt(c,p,r,i,l).join(m)}forEachLine(e,n,r,i,l,o){let c=i+this.left.height,f=l+this.left.length+this.break;if(this.break)e<f&&this.left.forEachLine(e,n,r,i,l,o),n>=f&&this.right.forEachLine(e,n,r,c,f,o);else{let m=this.lineAt(f,vt.ByPos,r,i,l);e<m.from&&this.left.forEachLine(e,m.from-1,r,i,l,o),m.to>=e&&m.from<=n&&o(m),n>m.to&&this.right.forEachLine(m.to+1,n,r,c,f,o)}}replace(e,n,r){let i=this.left.length+this.break;if(n<i)return this.balanced(this.left.replace(e,n,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let l=[];e>0&&this.decomposeLeft(e,l);let o=l.length;for(let c of r)l.push(c);if(e>0&&Vx(l,o-1),n<this.length){let c=l.length;this.decomposeRight(n,l),Vx(l,c)}return Zn.of(l)}decomposeLeft(e,n){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(r++,e>=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e<r&&this.left.decomposeRight(e,n),this.break&&e<i&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?Zn.of(this.break?[e,null,n]:[e,n]):(this.left=cf(this.left,e),this.right=cf(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:l,right:o}=this,c=n+l.length+this.break,f=null;return i&&i.from<=n+l.length&&i.more?f=l=l.updateHeight(e,n,r,i):l.updateHeight(e,n,r),i&&i.from<=c+o.length&&i.more?f=o=o.updateHeight(e,c,r,i):o.updateHeight(e,c,r),f?this.balanced(l,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Vx(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof xn&&(r=t[e+1])instanceof xn&&t.splice(e-1,3,new xn(n.length+1+r.length))}const GN=5;class e8{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof cr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new cr(r-this.pos,-1,0)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e<n||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,l=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=n-e;r.block?this.addBlock(new C9(o,i,r)):(o||l||i>=GN)&&this.addLineDeco(i,l,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new cr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let r=new xn(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof cr)return e;let n=new cr(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof cr)&&!this.isCovered?this.nodes.push(new cr(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof cr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,n,r,i){let l=new e8(r,e);return Ie.spans(n,r,i,l,0),l.finish(r)}}function KN(t,e,n){let r=new JN;return Ie.compare(t,e,n,r,0),r.changes}class JN{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,r,i){(e<n||r&&r.heightRelevant||i&&i.heightRelevant)&&Gs(e,n,this.changes,5)}}function eV(t,e){let n=t.getBoundingClientRect(),r=t.ownerDocument,i=r.defaultView||window,l=Math.max(0,n.left),o=Math.min(i.innerWidth,n.right),c=Math.max(0,n.top),f=Math.min(i.innerHeight,n.bottom);for(let m=t.parentNode;m&&m!=r.body;)if(m.nodeType==1){let p=m,O=window.getComputedStyle(p);if((p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth)&&O.overflow!="visible"){let y=p.getBoundingClientRect();l=Math.max(l,y.left),o=Math.min(o,y.right),c=Math.max(c,y.top),f=Math.min(m==t.parentNode?i.innerHeight:f,y.bottom)}m=O.position=="absolute"||O.position=="fixed"?p.offsetParent:p.parentNode}else if(m.nodeType==11)m=m.host;else break;return{left:l-n.left,right:Math.max(l,o)-n.left,top:c-(n.top+e),bottom:Math.max(c,f)-(n.top+e)}}function tV(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function nV(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class W2{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],l=n[r];if(i.from!=l.from||i.to!=l.to||i.size!=l.size)return!1}return!0}draw(e,n){return Le.replace({widget:new rV(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class rV extends Bl{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class Lx{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=_x,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Xt.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=n.facet(Gg).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new qN(r),this.stateDeco=Dx(n),this.heightMap=Zn.empty().applyChanges(this.stateDeco,tt.empty,this.heightOracle.setDoc(n.doc),[new Pr(0,0,0,n.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Le.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:l,to:o})=>i>=l&&i<=o)){let{from:l,to:o}=this.lineBlockAt(i);e.push(new o1(l,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?_x:new t8(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Qc(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=Dx(this.state);let i=e.changedRanges,l=Pr.extendWithRanges(i,KN(r,this.stateDeco,e?e.changes:en.empty(this.state.doc.length))),o=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);Nx(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),l),(this.heightMap.height!=o||fo)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let f=l.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<f.from||n.range.head>f.to)||!this.viewportIsAppropriate(f))&&(f=this.getViewport(0,n));let m=f.from!=this.viewport.from||f.to!=this.viewport.to;this.viewport=f,e.flags|=this.updateForViewport(),(m||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(IR)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,l=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Xt.RTL:Xt.LTR;let o=this.heightOracle.mustRefreshForWrapping(l)||this.mustMeasureContent==="refresh",c=n.getBoundingClientRect(),f=o||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let m=0,p=0;if(c.width&&c.height){let{scaleX:M,scaleY:Z}=z7(n,c);(M>.005&&Math.abs(this.scaleX-M)>.005||Z>.005&&Math.abs(this.scaleY-Z)>.005)&&(this.scaleX=M,this.scaleY=Z,m|=16,o=f=!0)}let O=(parseInt(r.paddingTop)||0)*this.scaleY,y=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=O||this.paddingBottom!=y)&&(this.paddingTop=O,this.paddingBottom=y,m|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(f=!0),this.editorWidth=e.scrollDOM.clientWidth,m|=16);let b=F7(this.view.contentDOM,!1).y;b!=this.scrollParent&&(this.scrollParent=b,this.scrollAnchorHeight=-1,this.scrollOffset=0);let S=this.getScrollOffset();this.scrollOffset!=S&&(this.scrollAnchorHeight=-1,this.scrollOffset=S),this.scrolledToBottom=B7(this.scrollParent||e.win);let w=(this.printing?nV:eV)(n,this.paddingTop),A=w.top-this.pixelViewport.top,k=w.bottom-this.pixelViewport.bottom;this.pixelViewport=w;let $=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if($!=this.inView&&(this.inView=$,$&&(f=!0)),!this.inView&&!this.scrollTarget&&!tV(e.dom))return 0;let Q=c.width;if((this.contentDOMWidth!=Q||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,m|=16),f){let M=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(M)&&(o=!0),o||i.lineWrapping&&Math.abs(Q-this.contentDOMWidth)>i.charWidth){let{lineHeight:Z,charWidth:E,textHeight:j}=e.docView.measureTextSize();o=Z>0&&i.refresh(l,Z,E,j,Math.max(5,Q/E),M),o&&(e.docView.minWidth=0,m|=16)}A>0&&k>0?p=Math.max(A,k):A<0&&k<0&&(p=Math.min(A,k)),Nx();for(let Z of this.viewports){let E=Z.from==this.viewport.from?M:e.docView.measureVisibleLineHeights(Z);this.heightMap=(o?Zn.empty().applyChanges(this.stateDeco,tt.empty,this.heightOracle,[new Pr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new IN(Z.from,E))}fo&&(m|=2)}let C=!this.viewportIsAppropriate(this.viewport,p)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return C&&(m&2&&(m|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),m|=this.updateForViewport()),(m&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),m|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),m}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,l=this.heightOracle,{visibleTop:o,visibleBottom:c}=this,f=new o1(i.lineAt(o-r*1e3,vt.ByHeight,l,0,0).from,i.lineAt(c+(1-r)*1e3,vt.ByHeight,l,0,0).to);if(n){let{head:m}=n.range;if(m<f.from||m>f.to){let p=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=i.lineAt(m,vt.ByPos,l,0,0),y;n.y=="center"?y=(O.top+O.bottom)/2-p/2:n.y=="start"||n.y=="nearest"&&m<f.from?y=O.top:y=O.bottom-p,f=new o1(i.lineAt(y-1e3/2,vt.ByHeight,l,0,0).from,i.lineAt(y+p+1e3/2,vt.ByHeight,l,0,0).to)}}return f}mapViewport(e,n){let r=n.mapPos(e.from,-1),i=n.mapPos(e.to,1);return new o1(this.heightMap.lineAt(r,vt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,vt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),{bottom:l}=this.heightMap.lineAt(n,vt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:c}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(n==this.state.doc.length||l>=c+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&l<c+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let r=[];for(let i of e)n.touchesRange(i.from,i.to)||r.push(new W2(n.mapPos(i.from),n.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,n){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,l=i>>1,o=i<<1;if(this.defaultTextDirection!=Xt.LTR&&!r)return[];let c=[],f=(p,O,y,b)=>{if(O-p<l)return;let S=this.state.selection.main,w=[S.from];S.empty||w.push(S.to);for(let k of w)if(k>p&&k<O){f(p,k-10,y,b),f(k+10,O,y,b);return}let A=aV(e,k=>k.from>=y.from&&k.to<=y.to&&Math.abs(k.from-p)<l&&Math.abs(k.to-O)<l&&!w.some($=>k.from<$&&k.to>$));if(!A){if(O<y.to&&n&&r&&n.visibleRanges.some(Q=>Q.from<=O&&Q.to>=O)){let Q=n.moveToLineBoundary(he.cursor(O),!1,!0).head;Q>p&&(O=Q)}let k=this.gapSize(y,p,O,b),$=r||k<2e6?k:2e6;A=new W2(p,O,k,$)}c.push(A)},m=p=>{if(p.length<o||p.type!=In.Text)return;let O=iV(p.from,p.to,this.stateDeco);if(O.total<o)return;let y=this.scrollTarget?this.scrollTarget.range.head:null,b,S;if(r){let w=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,A,k;if(y!=null){let $=u1(O,y),Q=((this.visibleBottom-this.visibleTop)/2+w)/p.height;A=$-Q,k=$+Q}else A=(this.visibleTop-p.top-w)/p.height,k=(this.visibleBottom-p.top+w)/p.height;b=c1(O,A),S=c1(O,k)}else{let w=O.total*this.heightOracle.charWidth,A=i*this.heightOracle.charWidth,k=0;if(w>2e6)for(let Z of e)Z.from>=p.from&&Z.from<p.to&&Z.size!=Z.displaySize&&Z.from*this.heightOracle.charWidth+k<this.pixelViewport.left&&(k=Z.size-Z.displaySize);let $=this.pixelViewport.left+k,Q=this.pixelViewport.right+k,C,M;if(y!=null){let Z=u1(O,y),E=((Q-$)/2+A)/w;C=Z-E,M=Z+E}else C=($-A)/w,M=(Q+A)/w;b=c1(O,C),S=c1(O,M)}b>p.from&&f(p.from,b,p,O),S<p.to&&f(S,p.to,p,O)};for(let p of this.viewportLines)Array.isArray(p.type)?p.type.forEach(m):m(p);return c}gapSize(e,n,r,i){let l=u1(i,r)-u1(i,n);return this.heightOracle.lineWrapping?e.height*l:i.total*this.heightOracle.charWidth*l}updateLineGaps(e){W2.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Le.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let r=[];Ie.spans(n,this.viewport.from,this.viewport.to,{span(l,o){r.push({from:l,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let l=0;l<r.length&&!(i&8);l++){let o=this.visibleRanges[l],c=r[l];(o.from!=c.from||o.to!=c.to)&&(i|=4,e&&e.mapPos(o.from,-1)==c.from&&e.mapPos(o.to,1)==c.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Qc(this.heightMap.lineAt(e,vt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Qc(this.heightMap.lineAt(this.scaler.fromDOM(e),vt.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Qc(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class o1{constructor(e,n){this.from=e,this.to=n}}function iV(t,e,n){let r=[],i=t,l=0;return Ie.spans(n,t,e,{span(){},point(o,c){o>i&&(r.push({from:i,to:o}),l+=o-i),i=c}},20),i<e&&(r.push({from:i,to:e}),l+=e-i),{total:l,ranges:r}}function c1({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:l,to:o}=e[i],c=o-l;if(r<=c)return l+r;r-=c}}function u1(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function aV(t,e){for(let n of t)if(e(n))return n}const _x={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function Dx(t){let e=t.facet(zf).filter(r=>typeof r!="function"),n=t.facet(Kg).filter(r=>typeof r!="function");return n.length&&e.push(Ie.join(n)),e}class t8{constructor(e,n,r){let i=0,l=0,o=0;this.viewports=r.map(({from:c,to:f})=>{let m=n.lineAt(c,vt.ByPos,e,0,0).top,p=n.lineAt(f,vt.ByPos,e,0,0).bottom;return i+=p-m,{from:c,to:f,top:m,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let c of this.viewports)c.domTop=o+(c.top-l)*this.scale,o=c.domBottom=c.domTop+(c.bottom-c.top),l=c.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let l=n<this.viewports.length?this.viewports[n]:null;if(!l||e<l.top)return i+(e-r)*this.scale;if(e<=l.bottom)return l.domTop+(e-l.top);r=l.bottom,i=l.domBottom}}fromDOM(e){for(let n=0,r=0,i=0;;n++){let l=n<this.viewports.length?this.viewports[n]:null;if(!l||e<l.domTop)return r+(e-i)/this.scale;if(e<=l.domBottom)return l.top+(e-l.domTop);r=l.bottom,i=l.domBottom}}eq(e){return e instanceof t8?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,r)=>n.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function Qc(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Br(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>Qc(i,e)):t._content)}const f1=Me.define({combine:t=>t.join(" ")}),Hp=Me.define({combine:t=>t.indexOf(!0)>-1}),Xp=Ba.newName(),E9=Ba.newName(),$9=Ba.newName(),Q9={"&light":"."+E9,"&dark":"."+$9};function zp(t,e,n){return new Ba(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const lV=zp("."+Xp,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Q9),sV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},G2=we.ie&&we.ie_version<=11;class oV{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new NR,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(we.ie&&we.ie_version<=11||we.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&we.android&&e.constructor.EDIT_CONTEXT!==!1&&!(we.chrome&&we.chrome_version<126)&&(this.editContext=new uV(e),e.state.facet(Ui)&&(e.contentDOM.editContext=this.editContext.editContext)),G2&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Ui)?r.root.activeElement!=this.dom:!Dc(this.dom,i))return;let l=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(l&&l.isWidget()&&l.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(we.ie&&we.ie_version<=11||we.android&&we.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Hc(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=ou(e.root);if(!n)return!1;let r=we.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&cV(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=Dc(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&LR(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let r=this.dom;r;)if(r.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=n)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,sV),G2&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),G2&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var r;if(!this.delayedAndroidKey){let i=()=>{let l=this.delayedAndroidKey;l&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=l.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&l.force&&Ks(this.dom,l.key,l.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let l of e){let o=this.readMutation(l);o&&(o.typeOver&&(i=!0),n==-1?{from:n,to:r}=o:(n=Math.min(o.from,n),r=Math.max(o.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Dc(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let l=new TN(this.view,e,n,r);return this.view.docView.domChanged={newSel:l.newSel?l.newSel.main:null},l}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=x9(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!of(this.view.state.selection,n.newSel.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let r=Hx(n,e.previousSibling||e.target.previousSibling,-1),i=Hx(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ui)!=e.state.facet(Ui)&&(e.view.contentDOM.editContext=e.state.facet(Ui)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function Hx(t,e,n){for(;e;){let r=Vt.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function Xx(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,l=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor,1);return Hc(o.node,o.offset,i,l)&&([n,r,i,l]=[i,l,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:l}}function cV(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return Xx(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?Xx(t,n):null}class uV{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:l,head:o}=i,c=this.toEditorPos(r.updateRangeStart),f=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:c,drifted:!1});let m=f-c>r.text.length;c==this.from&&l<this.from?c=l:f==this.to&&l>this.to&&(f=l);let p=y9(e.state.sliceDoc(c,f),r.text,(m?i.from:i.to)-c,m?"end":null);if(!p){let y=he.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));of(y,i)||e.dispatch({selection:y,userEvent:"select"});return}let O={from:p.from+c,to:p.toA+c,insert:tt.of(r.text.slice(p.from,p.toB).split(`
|
|
105
|
-
`))};if((we.mac||we.android)&&O.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(O={from:c,to:f,insert:tt.of([r.text.replace("."," ")])}),this.pendingContextChange=O,!e.state.readOnly){let y=this.to-this.from+(O.to-O.from+O.insert.length);Jg(e,O,he.single(this.toEditorPos(r.selectionStart,y),this.toEditorPos(r.selectionEnd,y)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),O.from<O.to&&!O.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(n.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],l=null;for(let o=this.toEditorPos(r.rangeStart),c=this.toEditorPos(r.rangeEnd);o<c;o++){let f=e.coordsForChar(o);l=f&&new DOMRect(f.left,f.top,f.right-f.left,f.bottom-f.top)||l||new DOMRect,i.push(l)}n.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let l of r.getTextFormats()){let o=l.underlineStyle,c=l.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(c)){let f=this.toEditorPos(l.rangeStart),m=this.toEditorPos(l.rangeEnd);if(f<m){let p=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;i.push(Le.mark({attributes:{style:p}}).range(f,m))}}}e.dispatch({effects:o9.of(Le.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=ou(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((l,o,c,f,m)=>{if(r)return;let p=m.length-(o-l);if(i&&o>=i.to)if(i.from==l&&i.to==o&&i.insert.eq(m)){i=this.pendingContextChange=null,n+=p,this.to+=p;return}else i=null,this.revertPending(e.state);if(l+=n,o+=n,o<=this.from)this.from+=p,this.to+=p;else if(l<this.to){if(l<this.from||o>this.to||this.to-this.from+m.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(l),this.toContextPos(o),m.toString()),this.to+=p}n+=p}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ke{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(l=>r(l,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||VR(e.parent)||document,this.viewState=new Lx(this,e.state||it.create(e)),e.scrollTo&&e.scrollTo.is(a1)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(zs).map(i=>new Y2(i));for(let i of this.plugins)i.update(this);this.observer=new oV(this),this.inputState=new QN(this),this.inputState.ensureHandlers(this.plugins),this.docView=new kx(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Wt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,l=this.state;for(let y of e){if(y.startState!=l)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");l=y.state}if(this.destroyed){this.viewState.state=l;return}let o=this.hasFocus,c=0,f=null;e.some(y=>y.annotation(k9))?(this.inputState.notifiedFocused=o,c=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,f=M9(l,o),f||(c=1));let m=this.observer.delayedAndroidKey,p=null;if(m?(this.observer.clearDelayedAndroidKey(),p=this.observer.readChange(),(p&&!this.state.doc.eq(l.doc)||!this.state.selection.eq(l.selection))&&(p=null)):this.observer.clear(),l.facet(it.phrases)!=this.state.facet(it.phrases))return this.setState(l);i=af.create(this,l,e),i.flags|=c;let O=this.viewState.scrollTarget;try{this.updateState=2;for(let y of e){if(O&&(O=O.map(y.changes)),y.scrollIntoView){let{main:b}=y.state.selection;O=new Js(b.empty?b:he.cursor(b.head,b.head>b.anchor?-1:1))}for(let b of y.effects)b.is(a1)&&(O=b.value.clip(this.state))}this.viewState.update(i,O),this.bidiCache=uf.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet($c)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(y=>y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(f1)!=i.state.facet(f1)&&(this.viewState.mustMeasureContent=!0),(n||r||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let y of this.state.facet(Vp))try{y(i)}catch(b){pi(this.state,b,"update listener")}(f||p)&&Promise.resolve().then(()=>{f&&this.state==f.startState&&this.dispatch(f),p&&!x9(this,p)&&m.force&&Ks(this.contentDOM,m.key,m.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new Lx(this,e),this.plugins=e.facet(zs).map(r=>new Y2(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new kx(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(zs),r=e.state.facet(zs);if(n!=r){let i=[];for(let l of r){let o=n.indexOf(l);if(o<0)i.push(new Y2(l));else{let c=this.plugins[o];c.mustUpdate=e,i.push(c)}}for(let l of this.plugins)l.mustUpdate!=e&&l.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);n!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(r){pi(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:l,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let c=0;;c++){if(o<0)if(B7(r||this.win))l=-1,o=this.viewState.heightMap.height;else{let b=this.viewState.scrollAnchorAt(i);l=b.from,o=b.top}this.updateState=1;let f=this.viewState.measure();if(!f&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(c>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let m=[];f&4||([this.measureRequests,m]=[m,this.measureRequests]);let p=m.map(b=>{try{return b.read(this)}catch(S){return pi(this.state,S),zx}}),O=af.create(this,this.state,[]),y=!1;O.flags|=f,n?n.flags|=f:n=O,this.updateState=2,O.empty||(this.updatePlugins(O),this.inputState.update(O),this.updateAttrs(),y=this.docView.update(O),y&&this.docViewUpdate());for(let b=0;b<m.length;b++)if(p[b]!=zx)try{let S=m[b];S.write&&S.write(p[b],this)}catch(S){pi(this.state,S)}if(y&&this.docView.updateSelection(!0),!O.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let S=((l<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(l).top)-o)/this.scaleY;if((S>1||S<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+S,r?r.scrollTop+=S:this.win.scrollBy(0,S),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let c of this.state.facet(Vp))c(n)}get themeClasses(){return Xp+" "+(this.state.facet(Hp)?$9:E9)+" "+this.state.facet(f1)}updateAttrs(){let e=Fx(this,c9,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ui)?"true":"false",class:"cm-content",style:`${we.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),Fx(this,Gg,n);let r=this.observer.ignore(()=>{let i=yx(this.contentDOM,this.contentAttrs,n),l=yx(this.dom,this.editorAttrs,e);return i||l});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(ke.announce)){n&&(this.announceDOM.textContent=""),n=!1;let l=this.announceDOM.appendChild(document.createElement("div"));l.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet($c);let e=this.state.facet(ke.cspNonce);Ba.mount(this.root,this.styleModules.concat(lV).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(r=>r.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return U2(this,e,Mx(this,e,n,r))}moveByGroup(e,n){return U2(this,e,Mx(this,e,n,r=>vN(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),l=r[n?r.length-1:0];return he.cursor(l.side(n,i)+e.from,l.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return bN(this,e,n,r)}moveVertically(e,n,r){return U2(this,e,SN(this,e,n,r))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let r=_p(this,e,n);return r&&r.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),_p(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),l=this.bidiSpans(i),o=l[mi.find(l,e-i.from,-1,n)];return rf(r,o.dir==Xt.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(l9)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>fV)return K7(e.length);let n=this.textDirectionAt(e.from),r;for(let l of this.bidiCache)if(l.from==e.from&&l.dir==n&&(l.fresh||G7(l.isolates,r=Sx(this,e))))return l.order;r||(r=Sx(this,e));let i=YR(e.text,n,r);return this.bidiCache.push(new uf(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||we.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{Y7(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return a1.of(new Js(typeof e=="number"?he.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return a1.of(new Js(he.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Un.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Un.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=Ba.newName(),i=[f1.of(r),$c.of(zp(`.${r}`,e))];return n&&n.dark&&i.push(Hp.of(!0)),i}static baseTheme(e){return Su.lowest($c.of(zp("."+Xp,e,Q9)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&Vt.get(r)||Vt.get(e);return((n=i==null?void 0:i.root)===null||n===void 0?void 0:n.view)||null}}ke.styleModule=$c;ke.inputHandler=i9;ke.clipboardInputFilter=Ug;ke.clipboardOutputFilter=Wg;ke.scrollHandler=s9;ke.focusChangeEffect=a9;ke.perLineTextDirection=l9;ke.exceptionSink=r9;ke.updateListener=Vp;ke.editable=Ui;ke.mouseSelectionStyle=n9;ke.dragMovesSelection=t9;ke.clickAddsSelectionRange=e9;ke.decorations=zf;ke.blockWrappers=u9;ke.outerDecorations=Kg;ke.atomicRanges=ku;ke.bidiIsolatedRanges=f9;ke.scrollMargins=d9;ke.darkTheme=Hp;ke.cspNonce=Me.define({combine:t=>t.length?t[0]:""});ke.contentAttributes=Gg;ke.editorAttributes=c9;ke.lineWrapping=ke.contentAttributes.of({class:"cm-lineWrapping"});ke.announce=lt.define();const fV=4096,zx={};class uf{constructor(e,n,r,i,l,o){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=l,this.order=o}static update(e,n){if(n.empty&&!e.some(l=>l.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Xt.LTR;for(let l=Math.max(0,e.length-10);l<e.length;l++){let o=e[l];o.dir==i&&!n.touchesRange(o.from,o.to)&&r.push(new uf(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function Fx(t,e,n){for(let r=t.state.facet(e),i=r.length-1;i>=0;i--){let l=r[i],o=typeof l=="function"?l(t):l;o&&Bg(o,n)}return n}const dV=we.mac?"mac":we.windows?"win":we.linux?"linux":"key";function hV(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,l,o,c;for(let f=0;f<n.length-1;++f){const m=n[f];if(/^(cmd|meta|m)$/i.test(m))c=!0;else if(/^a(lt)?$/i.test(m))i=!0;else if(/^(c|ctrl|control)$/i.test(m))l=!0;else if(/^s(hift)?$/i.test(m))o=!0;else if(/^mod$/i.test(m))e=="mac"?c=!0:l=!0;else throw new Error("Unrecognized modifier name: "+m)}return i&&(r="Alt-"+r),l&&(r="Ctrl-"+r),c&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function d1(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const mV=Su.default(ke.domEventHandlers({keydown(t,e){return Z9(P9(e.state),t,e,"editor")}})),n8=Me.define({enables:mV}),Yx=new WeakMap;function P9(t){let e=t.facet(n8),n=Yx.get(e);return n||Yx.set(e,n=OV(e.reduce((r,i)=>r.concat(i),[]))),n}function pV(t,e,n){return Z9(P9(t.state),e,t,n)}let _a=null;const gV=4e3;function OV(t,e=dV){let n=Object.create(null),r=Object.create(null),i=(o,c)=>{let f=r[o];if(f==null)r[o]=c;else if(f!=c)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},l=(o,c,f,m,p)=>{var O,y;let b=n[o]||(n[o]=Object.create(null)),S=c.split(/ (?!$)/).map(k=>hV(k,e));for(let k=1;k<S.length;k++){let $=S.slice(0,k).join(" ");i($,!0),b[$]||(b[$]={preventDefault:!0,stopPropagation:!1,run:[Q=>{let C=_a={view:Q,prefix:$,scope:o};return setTimeout(()=>{_a==C&&(_a=null)},gV),!0}]})}let w=S.join(" ");i(w,!1);let A=b[w]||(b[w]={preventDefault:!1,stopPropagation:!1,run:((y=(O=b._any)===null||O===void 0?void 0:O.run)===null||y===void 0?void 0:y.slice())||[]});f&&A.run.push(f),m&&(A.preventDefault=!0),p&&(A.stopPropagation=!0)};for(let o of t){let c=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let m of c){let p=n[m]||(n[m]=Object.create(null));p._any||(p._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:O}=o;for(let y in p)p[y].run.push(b=>O(b,Fp))}let f=o[e]||o.key;if(f)for(let m of c)l(m,f,o.run,o.preventDefault,o.stopPropagation),o.shift&&l(m,"Shift-"+f,o.shift,o.preventDefault,o.stopPropagation)}return n}let Fp=null;function Z9(t,e,n,r){Fp=e;let i=ER(e),l=Yl(i,0),o=vu(l)==i.length&&i!=" ",c="",f=!1,m=!1,p=!1;_a&&_a.view==n&&_a.scope==r&&(c=_a.prefix+" ",v9.indexOf(e.keyCode)<0&&(m=!0,_a=null));let O=new Set,y=A=>{if(A){for(let k of A.run)if(!O.has(k)&&(O.add(k),k(n)))return A.stopPropagation&&(p=!0),!0;A.preventDefault&&(A.stopPropagation&&(p=!0),m=!0)}return!1},b=t[r],S,w;return b&&(y(b[c+d1(i,e,!o)])?f=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(we.windows&&e.ctrlKey&&e.altKey)&&!(we.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(S=qa[e.keyCode])&&S!=i?(y(b[c+d1(S,e,!0)])||e.shiftKey&&(w=lu[e.keyCode])!=i&&w!=S&&y(b[c+d1(w,e,!1)]))&&(f=!0):o&&e.shiftKey&&y(b[c+d1(i,e,!0)])&&(f=!0),!f&&y(b._any)&&(f=!0)),m&&(f=!0),f&&p&&e.stopPropagation(),Fp=null,f}function xV(){return bV}const yV=Le.line({class:"cm-activeLine"}),bV=Un.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(yV.range(i.from)),e=i.from)}return Le.set(n)}},{decorations:t=>t.decorations}),Bx=Me.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function j9(t,e){let n=t.plugin(R9),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const R9=Un.fromClass(class{constructor(t){this.input=t.state.facet(ff),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(Bx);this.top=new h1(t,!0,e.topContainer),this.bottom=new h1(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(Bx);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new h1(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new h1(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(ff);if(n!=this.input){let r=n.filter(f=>f),i=[],l=[],o=[],c=[];for(let f of r){let m=this.specs.indexOf(f),p;m<0?(p=f(t.view),c.push(p)):(p=this.panels[m],p.update&&p.update(t)),i.push(p),(p.top?l:o).push(p)}this.specs=r,this.panels=i,this.top.sync(l),this.bottom.sync(o);for(let f of c)f.dom.classList.add("cm-panel"),f.mount&&f.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ke.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class h1{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=qx(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=qx(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function qx(t){let e=t.nextSibling;return t.remove(),e}const ff=Me.define({enables:R9});function vV(t,e){let n,r=new Promise(o=>n=o),i=o=>SV(o,e,n);t.state.field(K2,!1)?t.dispatch({effects:N9.of(i)}):t.dispatch({effects:lt.appendConfig.of(K2.init(()=>[i]))});let l=V9.of(i);return{close:l,result:r.then(o=>((t.win.queueMicrotask||(f=>t.win.setTimeout(f,10)))(()=>{t.state.field(K2).indexOf(i)>-1&&t.dispatch({effects:l})}),o))}}const K2=dr.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(N9)?t=[n.value].concat(t):n.is(V9)&&(t=t.filter(r=>r!=n.value));return t},provide:t=>ff.computeN([t],e=>e.field(t))}),N9=lt.define(),V9=lt.define();function SV(t,e,n){let r=e.content?e.content(t,()=>o(null)):null;if(!r){if(r=sn("form"),e.input){let c=sn("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),r.appendChild(sn("label",(e.label||"")+": ",c))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(sn("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let i=r.nodeName=="FORM"?[r]:r.querySelectorAll("form");for(let c=0;c<i.length;c++){let f=i[c];f.addEventListener("keydown",m=>{m.keyCode==27?(m.preventDefault(),o(null)):m.keyCode==13&&(m.preventDefault(),o(f))}),f.addEventListener("submit",m=>{m.preventDefault(),o(f)})}let l=sn("div",r,sn("button",{onclick:()=>o(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(l.className=e.class),l.classList.add("cm-dialog");function o(c){l.contains(l.ownerDocument.activeElement)&&t.focus(),n(c)}return{dom:l,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=r.querySelector(e.focus):c=r.querySelector("input")||r.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class aa extends Ya{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}aa.prototype.elementClass="";aa.prototype.toDOM=void 0;aa.prototype.mapMode=An.TrackBefore;aa.prototype.startSide=aa.prototype.endSide=-1;aa.prototype.point=!0;const D1=Me.define(),wV=Me.define(),AV={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ie.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},zc=Me.define();function kV(t){return[L9(),zc.of({...AV,...t})]}const Ix=Me.define({combine:t=>t.some(e=>e)});function L9(t){return[MV]}const MV=Un.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(zc).map(e=>new Wx(t,e)),this.fixed=!t.state.facet(Ix);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(Ix)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=Ie.iter(this.view.state.facet(D1),this.view.viewport.from),r=[],i=this.gutters.map(l=>new TV(l,this.view.viewport,-this.view.documentPadding.top));for(let l of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(l.type)){let o=!0;for(let c of l.type)if(c.type==In.Text&&o){Yp(n,r,c.from);for(let f of i)f.line(this.view,c,r);o=!1}else if(c.widget)for(let f of i)f.widget(this.view,c)}else if(l.type==In.Text){Yp(n,r,l.from);for(let o of i)o.line(this.view,l,r)}else if(l.widget)for(let o of i)o.widget(this.view,l);for(let l of i)l.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(zc),n=t.state.facet(zc),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ie.eq(t.startState.facet(D1),t.state.facet(D1),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let l of n){let o=e.indexOf(l);o<0?i.push(new Wx(this.view,l)):(this.gutters[o].update(t),i.push(this.gutters[o]))}for(let l of this.gutters)l.dom.remove(),i.indexOf(l)<0&&l.destroy();for(let l of i)l.config.side=="after"?this.getDOMAfter().appendChild(l.dom):this.dom.appendChild(l.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ke.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let r=n.dom.offsetWidth*e.scaleX,i=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Xt.LTR?{left:r,right:i}:{right:r,left:i}})});function Ux(t){return Array.isArray(t)?t:[t]}function Yp(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class TV{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ie.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,l=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==i.elements.length){let c=new _9(e,o,l,r);i.elements.push(c),i.dom.appendChild(c.dom)}else i.elements[this.i].update(e,o,l,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];Yp(this.cursor,i,n.from),r.length&&(i=i.concat(r));let l=this.gutter.config.lineMarker(e,n,i);l&&i.unshift(l);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let l of e.state.facet(wV)){let o=l(e,n.widget,n);o&&(i||(i=[])).push(o)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class Wx{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let l=i.target,o;if(l!=this.dom&&this.dom.contains(l)){for(;l.parentNode!=this.dom;)l=l.parentNode;let f=l.getBoundingClientRect();o=(f.top+f.bottom)/2}else o=i.clientY;let c=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[r](e,c,i)&&i.preventDefault()});this.markers=Ux(n.markers(e)),n.initialSpacer&&(this.spacer=new _9(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=Ux(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ie.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class _9{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),CV(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let l=0,o=0;;){let c=o,f=l<n.length?n[l++]:null,m=!1;if(f){let p=f.elementClass;p&&(r+=" "+p);for(let O=o;O<this.markers.length;O++)if(this.markers[O].compare(f)){c=O,m=!0;break}}else c=this.markers.length;for(;o<c;){let p=this.markers[o++];if(p.toDOM){p.destroy(i);let O=i.nextSibling;i.remove(),i=O}}if(!f)break;f.toDOM&&(m?i=i.nextSibling:this.dom.insertBefore(f.toDOM(e),i)),m&&o++}this.dom.className=r,this.markers=n}destroy(){this.setMarkers(null,[])}}function CV(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const EV=Me.define(),$V=Me.define(),Fs=Me.define({combine(t){return So(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let r=Object.assign({},e);for(let i in n){let l=r[i],o=n[i];r[i]=l?(c,f,m)=>l(c,f,m)||o(c,f,m):o}return r}})}});class J2 extends aa{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function em(t,e){return t.state.facet(Fs).formatNumber(e,t.state)}const QV=zc.compute([Fs],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(EV)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new J2(em(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet($V)){let l=i(e,n,r);if(l)return l}return null},lineMarkerChange:e=>e.startState.facet(Fs)!=e.state.facet(Fs),initialSpacer(e){return new J2(em(e,Gx(e.state.doc.lines)))},updateSpacer(e,n){let r=em(n.view,Gx(n.view.state.doc.lines));return r==e.number?e:new J2(r)},domEventHandlers:t.facet(Fs).domEventHandlers,side:"before"}));function PV(t={}){return[Fs.of(t),L9(),QV]}function Gx(t){let e=9;for(;e<t;)e=e*10+9;return e}const ZV=new class extends aa{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},jV=D1.compute(["selection"],t=>{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(ZV.range(i)))}return Ie.of(e)});function RV(){return jV}const D9=1024;let NV=0;class Zr{constructor(e,n){this.from=e,this.to=n}}class Xe{constructor(e={}){this.id=NV++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=jn.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}Xe.closedBy=new Xe({deserialize:t=>t.split(" ")});Xe.openedBy=new Xe({deserialize:t=>t.split(" ")});Xe.group=new Xe({deserialize:t=>t.split(" ")});Xe.isolate=new Xe({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Xe.contextHash=new Xe({perNode:!0});Xe.lookAhead=new Xe({perNode:!0});Xe.mounted=new Xe({perNode:!0});class eo{constructor(e,n,r,i=!1){this.tree=e,this.overlay=n,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Xe.mounted.id]}}const VV=Object.create(null);class jn{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):VV,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new jn(e.name||"",n,e.id,r);if(e.props){for(let l of e.props)if(Array.isArray(l)||(l=l(i)),l){if(l[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[l[0].id]=l[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Xe.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(Xe.group),l=-1;l<(i?i.length:0);l++){let o=n[l<0?r.name:i[l]];if(o)return o}}}}jn.none=new jn("",Object.create(null),0,8);class r8{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let r of this.types){let i=null;for(let l of e){let o=l(r);if(o){i||(i=Object.assign({},r.props));let c=o[1],f=o[0];f.combine&&f.id in i&&(c=f.combine(i[f.id],c)),i[f.id]=c}}n.push(i?new jn(r.name,i,r.id,r.flags):r)}return new r8(n)}}const m1=new WeakMap,Kx=new WeakMap;var dt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(dt||(dt={}));class $t{constructor(e,n,r,i,l){if(this.type=e,this.children=n,this.positions=r,this.length=i,this.props=null,l&&l.length){this.props=Object.create(null);for(let[o,c]of l)this.props[typeof o=="number"?o:o.id]=c}}toString(){let e=eo.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let r of this.children){let i=r.toString();i&&(n&&(n+=","),n+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new df(this.topNode,e)}cursorAt(e,n=0,r=0){let i=m1.get(this)||this.topNode,l=new df(i);return l.moveTo(e,n),m1.set(this,l._tree),l}get topNode(){return new kn(this,0,0,null)}resolve(e,n=0){let r=uu(m1.get(this)||this.topNode,e,n,!1);return m1.set(this,r),r}resolveInner(e,n=0){let r=uu(Kx.get(this)||this.topNode,e,n,!0);return Kx.set(this,r),r}resolveStack(e,n=0){return DV(this,e,n)}iterate(e){let{enter:n,leave:r,from:i=0,to:l=this.length}=e,o=e.mode||0,c=(o&dt.IncludeAnonymous)>0;for(let f=this.cursor(o|dt.IncludeAnonymous);;){let m=!1;if(f.from<=l&&f.to>=i&&(!c&&f.type.isAnonymous||n(f)!==!1)){if(f.firstChild())continue;m=!0}for(;m&&r&&(c||!f.type.isAnonymous)&&r(f),!f.nextSibling();){if(!f.parent())return;m=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:l8(jn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new $t(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new $t(jn.none,n,r,i)))}static build(e){return HV(e)}}$t.empty=new $t(jn.none,[],[],0);class i8{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new i8(this.buffer,this.index)}}class Ua{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return jn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],r=this.buffer[e+3],i=this.set.types[n],l=i.name;if(/\W/.test(l)&&!i.isError&&(l=JSON.stringify(l)),e+=4,r==e)return l;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return l+"("+o.join(",")+")"}findChild(e,n,r,i,l){let{buffer:o}=this,c=-1;for(let f=e;f!=n&&!(H9(l,i,o[f+1],o[f+2])&&(c=f,r>0));f=o[f+3]);return c}slice(e,n,r){let i=this.buffer,l=new Uint16Array(n-e),o=0;for(let c=e,f=0;c<n;){l[f++]=i[c++],l[f++]=i[c++]-r;let m=l[f++]=i[c++]-r;l[f++]=i[c++]-e,o=Math.max(o,m)}return new Ua(l,o,this.set)}}function H9(t,e,n,r){switch(t){case-2:return n<e;case-1:return r>=e&&n<e;case 0:return n<e&&r>e;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function uu(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!r&&t instanceof kn&&t.index<0?null:t.parent;if(!o)return t;t=o}let l=r?0:dt.IgnoreOverlays;if(r)for(let o=t,c=o.parent;c;o=c,c=o.parent)o instanceof kn&&o.index<0&&((i=c.enter(e,n,l))===null||i===void 0?void 0:i.from)!=o.from&&(t=c);for(;;){let o=t.enter(e,n,l);if(!o)return t;t=o}}class X9{cursor(e=0){return new df(this,e)}getChild(e,n=null,r=null){let i=Jx(this,e,n,r);return i.length?i[0]:null}getChildren(e,n=null,r=null){return Jx(this,e,n,r)}resolve(e,n=0){return uu(this,e,n,!1)}resolveInner(e,n=0){return uu(this,e,n,!0)}matchContext(e){return Bp(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),r=this;for(;n;){let i=n.lastChild;if(!i||i.to!=n.to)break;i.type.isError&&i.from==i.to?(r=n,n=i.prevSibling):n=i}return r}get node(){return this}get next(){return this.parent}}class kn extends X9{constructor(e,n,r,i){super(),this._tree=e,this.from=n,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,r,i,l=0){for(let o=this;;){for(let{children:c,positions:f}=o._tree,m=n>0?c.length:-1;e!=m;e+=n){let p=c[e],O=f[e]+o.from,y;if(!(!(l&dt.EnterBracketed&&p instanceof $t&&(y=eo.get(p))&&!y.overlay&&y.bracketed&&r>=O&&r<=O+p.length)&&!H9(i,r,O,O+p.length))){if(p instanceof Ua){if(l&dt.ExcludeBuffers)continue;let b=p.findChild(0,p.buffer.length,n,r-O,i);if(b>-1)return new gi(new LV(o,p,e,O),null,b)}else if(l&dt.IncludeAnonymous||!p.type.isAnonymous||a8(p)){let b;if(!(l&dt.IgnoreMounts)&&(b=eo.get(p))&&!b.overlay)return new kn(b.tree,O,e,o);let S=new kn(p,O,e,o);return l&dt.IncludeAnonymous||!S.type.isAnonymous?S:S.nextChild(n<0?p.children.length-1:0,n,r,i,l)}}}if(l&dt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,r=0){let i;if(!(r&dt.IgnoreOverlays)&&(i=eo.get(this._tree))&&i.overlay){let l=e-this.from,o=r&dt.EnterBracketed&&i.bracketed;for(let{from:c,to:f}of i.overlay)if((n>0||o?c<=l:c<l)&&(n<0||o?f>=l:f>l))return new kn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function Jx(t,e,n,r){let i=t.cursor(),l=[];if(!i.firstChild())return l;if(n!=null){for(let o=!1;!o;)if(o=i.type.is(n),!i.nextSibling())return l}for(;;){if(r!=null&&i.type.is(r))return l;if(i.type.is(e)&&l.push(i.node),!i.nextSibling())return r==null?l:[]}}function Bp(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class LV{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class gi extends X9{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return l<0?null:new gi(this.context,this,l)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,r=0){if(r&dt.ExcludeBuffers)return null;let{buffer:i}=this.context,l=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return l<0?null:new gi(this.context,this,l)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new gi(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new gi(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,l=r.buffer[this.index+3];if(l>i){let o=r.buffer[this.index+1];e.push(r.slice(i,l,o)),n.push(0)}return new $t(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function z9(t){if(!t.length)return null;let e=0,n=t[0];for(let l=1;l<t.length;l++){let o=t[l];(o.from>n.from||o.to<n.to)&&(n=o,e=l)}let r=n instanceof kn&&n.index<0?null:n.parent,i=t.slice();return r?i[e]=r:i.splice(e,1),new _V(i,n)}class _V{constructor(e,n){this.heads=e,this.node=n}get next(){return z9(this.heads)}}function DV(t,e,n){let r=t.resolveInner(e,n),i=null;for(let l=r instanceof kn?r:r.context.parent;l;l=l.parent)if(l.index<0){let o=l.parent;(i||(i=[r])).push(o.resolve(e,n)),l=o}else{let o=eo.get(l.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let c=new kn(o.tree,o.overlay[0].from+l.from,-1,l);(i||(i=[r])).push(uu(c,e,n,!1))}}return i?z9(i):r}class df{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~dt.EnterBracketed,e instanceof kn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof kn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,l=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return l<0?!1:(this.stack.push(this.index),this.yieldBuf(l))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&dt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&dt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&dt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let l=0;l<this.index;l++)if(i.buffer.buffer[l+3]<this.index)return!1;({index:n,parent:r}=i)}else({index:n,_parent:r}=this._tree);for(;r;{index:n,_parent:r}=r)if(n>-1)for(let l=n+e,o=e<0?-1:r._tree.children.length;l!=o;l+=e){let c=r._tree.children[l];if(this.mode&dt.IncludeAnonymous||c instanceof Ua||!c.type.isAnonymous||a8(c))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,l=this.stack.length;l>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;n=o,r=l+1;break e}i=this.stack[--l]}for(let i=r;i<this.stack.length;i++)n=new gi(this.buffer,n,this.stack[i]);return this.bufferNode=new gi(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&n&&n(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return Bp(this.node.parent,e);let{buffer:n}=this.buffer,{types:r}=n.set;for(let i=e.length-1,l=this.stack.length-1;i>=0;l--){if(l<0)return Bp(this._tree,e,i);let o=r[n.buffer[this.stack[l]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function a8(t){return t.children.some(e=>e instanceof Ua||!e.type.isAnonymous||a8(e))}function HV(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=D9,reused:l=[],minRepeatType:o=r.types.length}=t,c=Array.isArray(n)?new i8(n,n.length):n,f=r.types,m=0,p=0;function O(M,Z,E,j,_,H){let{id:L,start:z,end:F,size:ee}=c,W=p,V=m;if(ee<0)if(c.next(),ee==-1){let P=l[L];E.push(P),j.push(z-M);return}else if(ee==-3){m=L;return}else if(ee==-4){p=L;return}else throw new RangeError(`Unrecognized record size: ${ee}`);let G=f[L],q,B,D=z-M;if(F-z<=i&&(B=A(c.pos-Z,_))){let P=new Uint16Array(B.size-B.skip),R=c.pos-B.size,X=P.length;for(;c.pos>R;)X=k(B.start,P,X);q=new Ua(P,F-B.start,r),D=B.start-M}else{let P=c.pos-ee;c.next();let R=[],X=[],Y=L>=o?L:-1,U=0,te=F;for(;c.pos>P;)Y>=0&&c.id==Y&&c.size>=0?(c.end<=te-i&&(S(R,X,z,U,c.end,te,Y,W,V),U=R.length,te=c.end),c.next()):H>2500?y(z,P,R,X):O(z,P,R,X,Y,H+1);if(Y>=0&&U>0&&U<R.length&&S(R,X,z,U,z,te,Y,W,V),R.reverse(),X.reverse(),Y>-1&&U>0){let ne=b(G,V);q=l8(G,R,X,0,R.length,0,F-z,ne,ne)}else q=w(G,R,X,F-z,W-F,V)}E.push(q),j.push(D)}function y(M,Z,E,j){let _=[],H=0,L=-1;for(;c.pos>Z;){let{id:z,start:F,end:ee,size:W}=c;if(W>4)c.next();else{if(L>-1&&F<L)break;L<0&&(L=ee-i),_.push(z,F,ee),H++,c.next()}}if(H){let z=new Uint16Array(H*4),F=_[_.length-2];for(let ee=_.length-3,W=0;ee>=0;ee-=3)z[W++]=_[ee],z[W++]=_[ee+1]-F,z[W++]=_[ee+2]-F,z[W++]=W;E.push(new Ua(z,_[2]-F,r)),j.push(F-M)}}function b(M,Z){return(E,j,_)=>{let H=0,L=E.length-1,z,F;if(L>=0&&(z=E[L])instanceof $t){if(!L&&z.type==M&&z.length==_)return z;(F=z.prop(Xe.lookAhead))&&(H=j[L]+z.length+F)}return w(M,E,j,_,H,Z)}}function S(M,Z,E,j,_,H,L,z,F){let ee=[],W=[];for(;M.length>j;)ee.push(M.pop()),W.push(Z.pop()+E-_);M.push(w(r.types[L],ee,W,H-_,z-H,F)),Z.push(_-E)}function w(M,Z,E,j,_,H,L){if(H){let z=[Xe.contextHash,H];L=L?[z].concat(L):[z]}if(_>25){let z=[Xe.lookAhead,_];L=L?[z].concat(L):[z]}return new $t(M,Z,E,j,L)}function A(M,Z){let E=c.fork(),j=0,_=0,H=0,L=E.end-i,z={size:0,start:0,skip:0};e:for(let F=E.pos-M;E.pos>F;){let ee=E.size;if(E.id==Z&&ee>=0){z.size=j,z.start=_,z.skip=H,H+=4,j+=4,E.next();continue}let W=E.pos-ee;if(ee<0||W<F||E.start<L)break;let V=E.id>=o?4:0,G=E.start;for(E.next();E.pos>W;){if(E.size<0)if(E.size==-3||E.size==-4)V+=4;else break e;else E.id>=o&&(V+=4);E.next()}_=G,j+=ee,H+=V}return(Z<0||j==M)&&(z.size=j,z.start=_,z.skip=H),z.size>4?z:void 0}function k(M,Z,E){let{id:j,start:_,end:H,size:L}=c;if(c.next(),L>=0&&j<o){let z=E;if(L>4){let F=c.pos-(L-4);for(;c.pos>F;)E=k(M,Z,E)}Z[--E]=z,Z[--E]=H-M,Z[--E]=_-M,Z[--E]=j}else L==-3?m=j:L==-4&&(p=j);return E}let $=[],Q=[];for(;c.pos>0;)O(t.start||0,t.bufferStart||0,$,Q,-1,0);let C=(e=t.length)!==null&&e!==void 0?e:$.length?Q[0]+$[0].length:0;return new $t(f[t.topID],$.reverse(),Q.reverse(),C)}const ey=new WeakMap;function H1(t,e){if(!t.isAnonymous||e instanceof Ua||e.type!=t)return 1;let n=ey.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof $t)){n=1;break}n+=H1(t,r)}ey.set(e,n)}return n}function l8(t,e,n,r,i,l,o,c,f){let m=0;for(let S=r;S<i;S++)m+=H1(t,e[S]);let p=Math.ceil(m*1.5/8),O=[],y=[];function b(S,w,A,k,$){for(let Q=A;Q<k;){let C=Q,M=w[Q],Z=H1(t,S[Q]);for(Q++;Q<k;Q++){let E=H1(t,S[Q]);if(Z+E>=p)break;Z+=E}if(Q==C+1){if(Z>p){let E=S[C];b(E.children,E.positions,0,E.children.length,w[C]+$);continue}O.push(S[C])}else{let E=w[Q-1]+S[Q-1].length-M;O.push(l8(t,S,w,C,Q,M,E,null,f))}y.push(M+$-l)}}return b(e,n,r,i,0),(c||f)(O,y,o)}class F9{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof gi?this.setBuffer(e.context.buffer,e.index,n):e instanceof kn&&this.map.set(e.tree,n)}get(e){return e instanceof gi?this.getBuffer(e.context.buffer,e.index):e instanceof kn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ki{constructor(e,n,r,i,l=!1,o=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(l?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new Ki(0,e.length,e,0,!1,r)];for(let l of n)l.to>e.length&&i.push(l);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],l=1,o=e.length?e[0]:null;for(let c=0,f=0,m=0;;c++){let p=c<n.length?n[c]:null,O=p?p.fromA:1e9;if(O-f>=r)for(;o&&o.from<O;){let y=o;if(f>=y.from||O<=y.to||m){let b=Math.max(y.from,f)-m,S=Math.min(y.to,O)-m;y=b>=S?null:new Ki(b,S,y.tree,y.offset+m,c>0,!!p)}if(y&&i.push(y),o.to>O)break;o=l<e.length?e[l++]:null}if(!p)break;f=p.toA,m=p.toA-p.toB}return i}}class Y9{startParse(e,n,r){return typeof e=="string"&&(e=new XV(e)),r=r?r.length?r.map(i=>new Zr(i.from,i.to)):[new Zr(0,0)]:[new Zr(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let l=i.advance();if(l)return l}}}class XV{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function zV(t){return(e,n,r,i)=>new YV(e,t,n,r,i)}class ty{constructor(e,n,r,i,l,o){this.parser=e,this.parse=n,this.overlay=r,this.bracketed=i,this.target=l,this.from=o}}function ny(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class FV{constructor(e,n,r,i,l,o,c,f){this.parser=e,this.predicate=n,this.mounts=r,this.index=i,this.start=l,this.bracketed=o,this.target=c,this.prev=f,this.depth=0,this.ranges=[]}}const qp=new Xe({perNode:!0});class YV{constructor(e,n,r,i,l){this.nest=n,this.input=r,this.fragments=i,this.ranges=l,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new $t(r.type,r.children,r.positions,r.length,r.propValues.concat([[qp,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Xe.mounted.id]=new eo(n,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new IV(this.fragments),n=null,r=null,i=new df(new kn(this.baseTree,this.ranges[0].from,0,null),dt.IncludeAnonymous|dt.IgnoreMounts);e:for(let l,o;;){let c=!0,f;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)c=!1;else if(e.hasNode(i)){if(n){let m=n.mounts.find(p=>p.frag.from<=i.from&&p.frag.to>=i.to&&p.mount.overlay);if(m)for(let p of m.mount.overlay){let O=p.from+m.pos,y=p.to+m.pos;O>=i.from&&y<=i.to&&!n.ranges.some(b=>b.from<y&&b.to>O)&&n.ranges.push({from:O,to:y})}}c=!1}else if(r&&(o=BV(r.ranges,i.from,i.to)))c=o!=2;else if(!i.type.isAnonymous&&(l=this.nest(i,this.input))&&(i.from<i.to||!l.overlay)){i.tree||(qV(i),n&&n.depth++,r&&r.depth++);let m=e.findMounts(i.from,l.parser);if(typeof l.overlay=="function")n=new FV(l.parser,l.overlay,m,this.inner.length,i.from,!!l.bracketed,i.tree,n);else{let p=ay(this.ranges,l.overlay||(i.from<i.to?[new Zr(i.from,i.to)]:[]));p.length&&ny(p),(p.length||!l.overlay)&&this.inner.push(new ty(l.parser,p.length?l.parser.startParse(this.input,ly(m,p),p):l.parser.startParse(""),l.overlay?l.overlay.map(O=>new Zr(O.from-i.from,O.to-i.from)):null,!!l.bracketed,i.tree,p.length?p[0].from:i.from)),l.overlay?p.length&&(r={ranges:p,depth:0,prev:r}):c=!1}}else if(n&&(f=n.predicate(i))&&(f===!0&&(f=new Zr(i.from,i.to)),f.from<f.to)){let m=n.ranges.length-1;m>=0&&n.ranges[m].to==f.from?n.ranges[m]={from:n.ranges[m].from,to:f.to}:n.ranges.push(f)}if(c&&i.firstChild())n&&n.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(n&&!--n.depth){let m=ay(this.ranges,n.ranges);m.length&&(ny(m),this.inner.splice(n.index,0,new ty(n.parser,n.parser.startParse(this.input,ly(n.mounts,m),m),n.ranges.map(p=>new Zr(p.from-n.start,p.to-n.start)),n.bracketed,n.target,m[0].from))),n=n.prev}r&&!--r.depth&&(r=r.prev)}}}}function BV(t,e,n){for(let r of t){if(r.from>=n)break;if(r.to>e)return r.from<=e&&r.to>=n?2:1}return 0}function ry(t,e,n,r,i,l){if(e<n){let o=t.buffer[e+1];r.push(t.slice(e,n,o)),i.push(o-l)}}function qV(t){let{node:e}=t,n=[],r=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let i=t.tree,l=i.children.indexOf(r),o=i.children[l],c=o.buffer,f=[l];function m(p,O,y,b,S,w){let A=n[w],k=[],$=[];ry(o,p,A,k,$,b);let Q=c[A+1],C=c[A+2];f.push(k.length);let M=w?m(A+4,c[A+3],o.set.types[c[A]],Q,C-Q,w-1):e.toTree();return k.push(M),$.push(Q-b),ry(o,c[A+3],O,k,$,b),new $t(y,k,$,S)}i.children[l]=m(0,c.length,jn.none,0,o.length,n.length-1);for(let p of f){let O=t.tree.children[p],y=t.tree.positions[p];t.yield(new kn(O,y+t.from,p,t._tree))}}class iy{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(dt.IncludeAnonymous|dt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,r=e-this.offset;for(;!this.done&&n.from<r;)if(!(n.to>=e&&n.enter(r,1,dt.IgnoreOverlays|dt.ExcludeBuffers)))if(n.to<=e)n.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof $t)n=n.children[0];else break}return!1}}let IV=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(n=r.tree.prop(qp))!==null&&n!==void 0?n:r.to,this.inner=new iy(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(qp))!==null&&e!==void 0?e:n.to,this.inner=new iy(n.tree,-n.offset)}}findMounts(e,n){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let l=this.inner.cursor.node;l;l=l.parent){let o=(r=l.tree)===null||r===void 0?void 0:r.prop(Xe.mounted);if(o&&o.parser==n)for(let c=this.fragI;c<this.fragments.length;c++){let f=this.fragments[c];if(f.from>=l.to)break;f.tree==this.curFrag.tree&&i.push({frag:f,pos:l.from-f.offset,mount:o})}}}return i}};function ay(t,e){let n=null,r=e;for(let i=1,l=0;i<t.length;i++){let o=t[i-1].to,c=t[i].from;for(;l<r.length;l++){let f=r[l];if(f.from>=c)break;f.to<=o||(n||(r=n=e.slice()),f.from<o?(n[l]=new Zr(f.from,o),f.to>c&&n.splice(l+1,0,new Zr(c,f.to))):f.to>c?n[l--]=new Zr(c,f.to):n.splice(l--,1))}}return r}function UV(t,e,n,r){let i=0,l=0,o=!1,c=!1,f=-1e9,m=[];for(;;){let p=i==t.length?1e9:o?t[i].to:t[i].from,O=l==e.length?1e9:c?e[l].to:e[l].from;if(o!=c){let y=Math.max(f,n),b=Math.min(p,O,r);y<b&&m.push(new Zr(y,b))}if(f=Math.min(p,O),f==1e9)break;p==f&&(o?(o=!1,i++):o=!0),O==f&&(c?(c=!1,l++):c=!0)}return m}function ly(t,e){let n=[];for(let{pos:r,mount:i,frag:l}of t){let o=r+(i.overlay?i.overlay[0].from:0),c=o+i.tree.length,f=Math.max(l.from,o),m=Math.min(l.to,c);if(i.overlay){let p=i.overlay.map(y=>new Zr(y.from+r,y.to+r)),O=UV(e,p,f,m);for(let y=0,b=f;;y++){let S=y==O.length,w=S?m:O[y].from;if(w>b&&n.push(new Ki(b,w,i.tree,-o,l.from>=b||l.openStart,l.to<=w||l.openEnd)),S)break;b=O[y].to}}else n.push(new Ki(f,m,i.tree,-o,l.from>=o||l.openStart,l.to<=c||l.openEnd))}return n}let WV=0;class $r{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=WV++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof $r&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new $r(r,[],null,[]);if(i.set.push(i),n)for(let l of n.set)i.set.push(l);return i}static defineModifier(e){let n=new hf(e);return r=>r.modified.indexOf(n)>-1?r:hf.get(r.base||r,r.modified.concat(n).sort((i,l)=>i.id-l.id))}}let GV=0;class hf{constructor(e){this.name=e,this.instances=[],this.id=GV++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(c=>c.base==e&&KV(n,c.modified));if(r)return r;let i=[],l=new $r(e.name,i,e,n);for(let c of n)c.instances.push(l);let o=JV(n);for(let c of e.set)if(!c.modified.length)for(let f of o)i.push(hf.get(c,f));return l}}function KV(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function JV(t){let e=[[]];for(let n=0;n<t.length;n++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(t[n]));return e.sort((n,r)=>r.length-n.length)}function qf(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let l=[],o=2,c=i;for(let O=0;;){if(c=="..."&&O>0&&O+3==i.length){o=1;break}let y=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!y)throw new RangeError("Invalid path: "+i);if(l.push(y[0]=="*"?"":y[0][0]=='"'?JSON.parse(y[0]):y[0]),O+=y[0].length,O==i.length)break;let b=i[O++];if(O==i.length&&b=="!"){o=0;break}if(b!="/")throw new RangeError("Invalid path: "+i);c=i.slice(O)}let f=l.length-1,m=l[f];if(!m)throw new RangeError("Invalid path: "+i);let p=new fu(r,o,f>0?l.slice(0,f):null);e[m]=p.sort(e[m])}}return B9.add(e)}const B9=new Xe({combine(t,e){let n,r,i;for(;t||e;){if(!t||e&&t.depth>=e.depth?(i=e,e=e.next):(i=t,t=t.next),n&&n.mode==i.mode&&!i.context&&!n.context)continue;let l=new fu(i.tags,i.mode,i.context);n?n.next=l:r=l,n=l}return r}});class fu{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}fu.empty=new fu([],2,null);function q9(t,e){let n=Object.create(null);for(let l of t)if(!Array.isArray(l.tag))n[l.tag.id]=l.class;else for(let o of l.tag)n[o.id]=l.class;let{scope:r,all:i=null}=e||{};return{style:l=>{let o=i;for(let c of l)for(let f of c.set){let m=n[f.id];if(m){o=o?o+" "+m:m;break}}return o},scope:r}}function eL(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function tL(t,e,n,r=0,i=t.length){let l=new nL(r,Array.isArray(e)?e:[e],n);l.highlightRange(t.cursor(),r,i,"",l.highlighters),l.flush(i)}class nL{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,l){let{type:o,from:c,to:f}=e;if(c>=r||f<=n)return;o.isTop&&(l=this.highlighters.filter(b=>!b.scope||b.scope(o)));let m=i,p=rL(e)||fu.empty,O=eL(l,p.tags);if(O&&(m&&(m+=" "),m+=O,p.mode==1&&(i+=(i?" ":"")+O)),this.startSpan(Math.max(n,c),m),p.opaque)return;let y=e.tree&&e.tree.prop(Xe.mounted);if(y&&y.overlay){let b=e.node.enter(y.overlay[0].from+c,1),S=this.highlighters.filter(A=>!A.scope||A.scope(y.tree.type)),w=e.firstChild();for(let A=0,k=c;;A++){let $=A<y.overlay.length?y.overlay[A]:null,Q=$?$.from+c:f,C=Math.max(n,k),M=Math.min(r,Q);if(C<M&&w)for(;e.from<M&&(this.highlightRange(e,C,M,i,l),this.startSpan(Math.min(M,e.to),m),!(e.to>=Q||!e.nextSibling())););if(!$||Q>r)break;k=$.to+c,k>n&&(this.highlightRange(b.cursor(),Math.max(n,$.from+c),Math.min(r,k),"",S),this.startSpan(Math.min(r,k),m))}w&&e.parent()}else if(e.firstChild()){y&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,l),this.startSpan(Math.min(r,e.to),m)}while(e.nextSibling());e.parent()}}}function rL(t){let e=t.type.prop(B9);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const be=$r.define,p1=be(),ja=be(),sy=be(ja),oy=be(ja),Ra=be(),g1=be(Ra),tm=be(Ra),ui=be(),gl=be(ui),oi=be(),ci=be(),Ip=be(),Sc=be(Ip),O1=be(),K={comment:p1,lineComment:be(p1),blockComment:be(p1),docComment:be(p1),name:ja,variableName:be(ja),typeName:sy,tagName:be(sy),propertyName:oy,attributeName:be(oy),className:be(ja),labelName:be(ja),namespace:be(ja),macroName:be(ja),literal:Ra,string:g1,docString:be(g1),character:be(g1),attributeValue:be(g1),number:tm,integer:be(tm),float:be(tm),bool:be(Ra),regexp:be(Ra),escape:be(Ra),color:be(Ra),url:be(Ra),keyword:oi,self:be(oi),null:be(oi),atom:be(oi),unit:be(oi),modifier:be(oi),operatorKeyword:be(oi),controlKeyword:be(oi),definitionKeyword:be(oi),moduleKeyword:be(oi),operator:ci,derefOperator:be(ci),arithmeticOperator:be(ci),logicOperator:be(ci),bitwiseOperator:be(ci),compareOperator:be(ci),updateOperator:be(ci),definitionOperator:be(ci),typeOperator:be(ci),controlOperator:be(ci),punctuation:Ip,separator:be(Ip),bracket:Sc,angleBracket:be(Sc),squareBracket:be(Sc),paren:be(Sc),brace:be(Sc),content:ui,heading:gl,heading1:be(gl),heading2:be(gl),heading3:be(gl),heading4:be(gl),heading5:be(gl),heading6:be(gl),contentSeparator:be(ui),list:be(ui),quote:be(ui),emphasis:be(ui),strong:be(ui),link:be(ui),monospace:be(ui),strikethrough:be(ui),inserted:be(),deleted:be(),changed:be(),invalid:be(),meta:O1,documentMeta:be(O1),annotation:be(O1),processingInstruction:be(O1),definition:$r.defineModifier("definition"),constant:$r.defineModifier("constant"),function:$r.defineModifier("function"),standard:$r.defineModifier("standard"),local:$r.defineModifier("local"),special:$r.defineModifier("special")};for(let t in K){let e=K[t];e instanceof $r&&(e.name=t)}q9([{tag:K.link,class:"tok-link"},{tag:K.heading,class:"tok-heading"},{tag:K.emphasis,class:"tok-emphasis"},{tag:K.strong,class:"tok-strong"},{tag:K.keyword,class:"tok-keyword"},{tag:K.atom,class:"tok-atom"},{tag:K.bool,class:"tok-bool"},{tag:K.url,class:"tok-url"},{tag:K.labelName,class:"tok-labelName"},{tag:K.inserted,class:"tok-inserted"},{tag:K.deleted,class:"tok-deleted"},{tag:K.literal,class:"tok-literal"},{tag:K.string,class:"tok-string"},{tag:K.number,class:"tok-number"},{tag:[K.regexp,K.escape,K.special(K.string)],class:"tok-string2"},{tag:K.variableName,class:"tok-variableName"},{tag:K.local(K.variableName),class:"tok-variableName tok-local"},{tag:K.definition(K.variableName),class:"tok-variableName tok-definition"},{tag:K.special(K.variableName),class:"tok-variableName2"},{tag:K.definition(K.propertyName),class:"tok-propertyName tok-definition"},{tag:K.typeName,class:"tok-typeName"},{tag:K.namespace,class:"tok-namespace"},{tag:K.className,class:"tok-className"},{tag:K.macroName,class:"tok-macroName"},{tag:K.propertyName,class:"tok-propertyName"},{tag:K.operator,class:"tok-operator"},{tag:K.comment,class:"tok-comment"},{tag:K.meta,class:"tok-meta"},{tag:K.invalid,class:"tok-invalid"},{tag:K.punctuation,class:"tok-punctuation"}]);var nm;const Ys=new Xe;function I9(t){return Me.define({combine:t?e=>e.concat(t):void 0})}const s8=new Xe;class Ur{constructor(e,n,r=[],i=""){this.data=e,this.name=i,it.prototype.hasOwnProperty("tree")||Object.defineProperty(it.prototype,"tree",{get(){return zt(this)}}),this.parser=n,this.extension=[Wa.of(this),it.languageData.of((l,o,c)=>{let f=cy(l,o,c),m=f.type.prop(Ys);if(!m)return[];let p=l.facet(m),O=f.type.prop(s8);if(O){let y=f.resolve(o-f.from,c);for(let b of O)if(b.test(y,l)){let S=l.facet(b.facet);return b.type=="replace"?S:S.concat(p)}}return p})].concat(r)}isActiveAt(e,n,r=-1){return cy(e,n,r).type.prop(Ys)==this.data}findRegions(e){let n=e.facet(Wa);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(l,o)=>{if(l.prop(Ys)==this.data){r.push({from:o,to:o+l.length});return}let c=l.prop(Xe.mounted);if(c){if(c.tree.prop(Ys)==this.data){if(c.overlay)for(let f of c.overlay)r.push({from:f.from+o,to:f.to+o});else r.push({from:o,to:o+l.length});return}else if(c.overlay){let f=r.length;if(i(c.tree,c.overlay[0].from+o),r.length>f)return}}for(let f=0;f<l.children.length;f++){let m=l.children[f];m instanceof $t&&i(m,l.positions[f]+o)}};return i(zt(e),0),r}get allowsNesting(){return!0}}Ur.setState=lt.define();function cy(t,e,n){let r=t.facet(Wa),i=zt(t).topNode;if(!r||r.allowsNesting)for(let l=i;l;l=l.enter(e,n,dt.ExcludeBuffers|dt.EnterBracketed))l.type.isTop&&(i=l);return i}class ho extends Ur{constructor(e,n,r){super(e,n,[],r),this.parser=n}static define(e){let n=I9(e.languageData);return new ho(n,e.parser.configure({props:[Ys.add(r=>r.isTop?n:void 0)]}),e.name)}configure(e,n){return new ho(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function zt(t){let e=t.field(Ur.state,!1);return e?e.tree:$t.empty}class iL{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e<r||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let wc=null;class mf{constructor(e,n,r=[],i,l,o,c,f){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=l,this.viewport=o,this.skipped=c,this.scheduleOn=f,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new mf(e,n,[],$t.empty,0,r,[],null)}startParse(){return this.parser.startParse(new iL(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=$t.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Ki.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Ki.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=wc;wc=this;try{return e()}finally{wc=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=uy(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:l,viewport:o,skipped:c}=this;if(this.takeTree(),!e.empty){let f=[];if(e.iterChangedRanges((m,p,O,y)=>f.push({fromA:m,toA:p,fromB:O,toB:y})),r=Ki.applyChanges(r,f),i=$t.empty,l=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){c=[];for(let m of this.skipped){let p=e.mapPos(m.from,1),O=e.mapPos(m.to,-1);p<O&&c.push({from:p,to:O})}}}return new mf(this.parser,n,r,i,l,o,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:l}=this.skipped[r];i<e.to&&l>e.from&&(this.fragments=uy(this.fragments,i,l),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Y9{createParse(n,r,i){let l=i[0].from,o=i[i.length-1].to;return{parsedPos:l,advance(){let f=wc;if(f){for(let m of i)f.tempSkipped.push(m);e&&(f.scheduleOn=f.scheduleOn?Promise.all([f.scheduleOn,e]):e)}return this.parsedPos=o,new $t(jn.none,[],[],o-l)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return wc}}function uy(t,e,n){return Ki.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class mo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new mo(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=mf.create(e.facet(Wa).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new mo(r)}}Ur.state=dr.define({create:mo.init,update(t,e){for(let n of e.effects)if(n.is(Ur.setState))return n.value;return e.startState.facet(Wa)!=e.state.facet(Wa)?mo.init(e.state):t.apply(e)}});let U9=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(U9=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const rm=typeof navigator<"u"&&(!((nm=navigator.scheduling)===null||nm===void 0)&&nm.isInputPending)?()=>navigator.scheduling.isInputPending():null,aL=Un.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Ur.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Ur.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=U9(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,l=r.field(Ur.state);if(l.tree==l.context.tree&&l.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!rm?Math.max(25,e.timeRemaining()-5):1e9),c=l.context.treeLen<i&&r.doc.length>i+1e3,f=l.context.work(()=>rm&&rm()||Date.now()>o,i+(c?0:1e5));this.chunkBudget-=Date.now()-n,(f||this.chunkBudget<=0)&&(l.context.takeTree(),this.view.dispatch({effects:Ur.setState.of(new mo(l.context))})),this.chunkBudget>0&&!(f&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(l.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>pi(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Wa=Me.define({combine(t){return t.length?t[0]:null},enables:t=>[Ur.state,aL,ke.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class o8{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const lL=Me.define(),If=Me.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function pf(t){let e=t.facet(If);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function du(t,e){let n="",r=t.tabSize,i=t.facet(If)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let l=0;l<e;l++)n+=i;return n}function c8(t,e){t instanceof it&&(t=new Uf(t));for(let r of t.state.facet(lL)){let i=r(t,e);if(i!==void 0)return i}let n=zt(t.state);return n.length>=e?sL(t,n,e):null}class Uf{constructor(e,n={}){this.state=e,this.options=n,this.unit=pf(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:l}=this.options;return i!=null&&i>=r.from&&i<=r.to?l&&i==e?{text:"",from:e}:(n<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,n);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,n=1){let{text:r,from:i}=this.lineAt(e,n),l=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(l+=o-this.countColumn(r,r.search(/\S|$/))),l}countColumn(e,n=e.length){return Hf(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),l=this.options.overrideIndentation;if(l){let o=l(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Wf=new Xe;function sL(t,e,n){let r=e.resolveStack(n),i=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(i!=r.node){let l=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)l.push(o);for(let o=l.length-1;o>=0;o--)r={node:l[o],next:r}}return W9(r,t,n)}function W9(t,e,n){for(let r=t;r;r=r.next){let i=cL(r.node);if(i)return i(u8.create(e,n,r))}return 0}function oL(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function cL(t){let e=t.type.prop(Wf);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(Xe.closedBy))){let i=t.lastChild,l=i&&r.indexOf(i.name)>-1;return o=>G9(o,!0,1,void 0,l&&!oL(o)?i.from:void 0)}return t.parent==null?uL:null}function uL(){return 0}class u8 extends Uf{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new u8(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(fL(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return W9(this.context.next,this.base,this.pos)}}function fL(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function dL(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,l=t.state.doc.lineAt(n.from),o=i==null||i<=l.from?l.to:Math.min(l.to,i);for(let c=n.to;;){let f=e.childAfter(c);if(!f||f==r)return null;if(!f.type.isSkipped){if(f.from>=o)return null;let m=/^ */.exec(l.text.slice(n.to-l.from))[0].length;return{from:n.from,to:n.to+m}}c=f.to}}function hL({closing:t,align:e=!0,units:n=1}){return r=>G9(r,e,n,t)}function G9(t,e,n,r,i){let l=t.textAfter,o=l.match(/^\s*/)[0].length,c=r&&l.slice(o,o+r.length)==r||i==t.pos+o,f=e?dL(t):null;return f?c?t.column(f.from):t.column(f.to):t.baseIndent+(c?0:t.unit*n)}const mL=t=>t.baseIndent;function X1({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const pL=200;function gL(){return it.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+pL)return t;let l=n.sliceString(i.from,r);if(!e.some(m=>m.test(l)))return t;let{state:o}=t,c=-1,f=[];for(let{head:m}of o.selection.ranges){let p=o.doc.lineAt(m);if(p.from==c)continue;c=p.from;let O=c8(o,p.from);if(O==null)continue;let y=/^\s*/.exec(p.text)[0],b=du(o,O);y!=b&&f.push({from:p.from,to:p.from+y.length,insert:b})}return f.length?[t,{changes:f,sequential:!0}]:t})}const OL=Me.define(),Gf=new Xe;function K9(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function xL(t,e,n){let r=zt(t);if(r.length<n)return null;let i=r.resolveStack(n,1),l=null;for(let o=i;o;o=o.next){let c=o.node;if(c.to<=n||c.from>n)continue;if(l&&c.from<e)break;let f=c.type.prop(Gf);if(f&&(c.to<r.length-50||r.length==t.doc.length||!yL(c))){let m=f(c,t);m&&m.from<=n&&m.from>=e&&m.to>n&&(l=m)}}return l}function yL(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function fy(t,e,n){for(let r of t.facet(OL)){let i=r(t,e,n);if(i)return i}return xL(t,e,n)}function J9(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const ew=lt.define({map:J9}),f8=lt.define({map:J9}),gf=dr.define({create(){return Le.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,r)=>t=dy(t,n,r)),t=t.map(e.changes);for(let n of e.effects)if(n.is(ew)&&!bL(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(tw),i=r?Le.replace({widget:new wL(r(e.state,n.value))}):hy;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(f8)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=dy(t,e.selection.main.head)),t},provide:t=>ke.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let r=t[n++],i=t[n++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(hy.range(r,i))}return Le.set(e,!0)}});function dy(t,e,n=e){let r=!1;return t.between(e,n,(i,l)=>{i<n&&l>e&&(r=!0)}),r?t.update({filterFrom:e,filterTo:n,filter:(i,l)=>i>=n||l<=e}):t}function Up(t,e,n){var r;let i=null;return(r=t.field(gf,!1))===null||r===void 0||r.between(e,n,(l,o)=>{(!i||i.from>l)&&(i={from:l,to:o})}),i}function bL(t,e,n){let r=!1;return t.between(e,e,(i,l)=>{i==e&&l==n&&(r=!0)}),r}const vL={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},tw=Me.define({combine(t){return So(t,vL)}});function SL(t){return[gf,ML]}function nw(t,e){let{state:n}=t,r=n.facet(tw),i=o=>{let c=t.lineBlockAt(t.posAtDOM(o.target)),f=Up(t.state,c.from,c.to);f&&t.dispatch({effects:f8.of(f)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let l=document.createElement("span");return l.textContent=r.placeholderText,l.setAttribute("aria-label",n.phrase("folded code")),l.title=n.phrase("unfold"),l.className="cm-foldPlaceholder",l.onclick=i,l}const hy=Le.replace({widget:new class extends Bl{toDOM(t){return nw(t,null)}}});class wL extends Bl{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return nw(e,this.value)}}const AL={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class im extends aa{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function kL(t={}){let e={...AL,...t},n=new im(e,!0),r=new im(e,!1),i=Un.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Wa)!=o.state.facet(Wa)||o.startState.field(gf,!1)!=o.state.field(gf,!1)||zt(o.startState)!=zt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let c=new Dl;for(let f of o.viewportLineBlocks){let m=Up(o.state,f.from,f.to)?r:fy(o.state,f.from,f.to)?n:null;m&&c.add(f.from,f.from,m)}return c.finish()}}),{domEventHandlers:l}=e;return[i,kV({class:"cm-foldGutter",markers(o){var c;return((c=o.plugin(i))===null||c===void 0?void 0:c.markers)||Ie.empty},initialSpacer(){return new im(e,!1)},domEventHandlers:{...l,click:(o,c,f)=>{if(l.click&&l.click(o,c,f))return!0;let m=Up(o.state,c.from,c.to);if(m)return o.dispatch({effects:f8.of(m)}),!0;let p=fy(o.state,c.from,c.to);return p?(o.dispatch({effects:ew.of(p)}),!0):!1}}}),SL()]}const ML=ke.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class Kf{constructor(e,n){this.specs=e;let r;function i(c){let f=Ba.newName();return(r||(r=Object.create(null)))["."+f]=c,f}const l=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,o=n.scope;this.scope=o instanceof Ur?c=>c.prop(Ys)==o.data:o?c=>c==o:void 0,this.style=q9(e.map(c=>({tag:c.tag,class:c.class||i(Object.assign({},c,{tag:null}))})),{all:l}).style,this.module=r?new Ba(r):null,this.themeType=n.themeType}static define(e,n){return new Kf(e,n||{})}}const Wp=Me.define(),TL=Me.define({combine(t){return t.length?[t[0]]:null}});function am(t){let e=t.facet(Wp);return e.length?e:t.facet(TL)}function CL(t,e){let n=[$L],r;return t instanceof Kf&&(t.module&&n.push(ke.styleModule.of(t.module)),r=t.themeType),r?n.push(Wp.computeN([ke.darkTheme],i=>i.facet(ke.darkTheme)==(r=="dark")?[t]:[])):n.push(Wp.of(t)),n}class EL{constructor(e){this.markCache=Object.create(null),this.tree=zt(e.state),this.decorations=this.buildDeco(e,am(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=zt(e.state),r=am(e.state),i=r!=am(e.startState),{viewport:l}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<l.to&&!i&&n.type==this.tree.type&&o>=l.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=l.to)}buildDeco(e,n){if(!n||!this.tree.length)return Le.none;let r=new Dl;for(let{from:i,to:l}of e.visibleRanges)tL(this.tree,n,(o,c,f)=>{r.add(o,c,this.markCache[f]||(this.markCache[f]=Le.mark({class:f})))},i,l);return r.finish()}}const $L=Su.high(Un.fromClass(EL,{decorations:t=>t.decorations})),QL=ke.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),rw=1e4,iw="()[]{}",aw=Me.define({combine(t){return So(t,{afterCursor:!0,brackets:iw,maxScanDistance:rw,renderMatch:jL})}}),PL=Le.mark({class:"cm-matchingBracket"}),ZL=Le.mark({class:"cm-nonmatchingBracket"});function jL(t){let e=[],n=t.matched?PL:ZL;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function my(t){let e=[],n=t.facet(aw);for(let r of t.selection.ranges){if(!r.empty)continue;let i=Oi(t,r.head,-1,n)||r.head>0&&Oi(t,r.head-1,1,n)||n.afterCursor&&(Oi(t,r.head,1,n)||r.head<t.doc.length&&Oi(t,r.head+1,-1,n));i&&(e=e.concat(n.renderMatch(i,t)))}return Le.set(e,!0)}const RL=Un.fromClass(class{constructor(t){this.paused=!1,this.decorations=my(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=my(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),NL=[RL,QL];function VL(t={}){return[aw.of(t),NL]}const lw=new Xe;function Gp(t,e,n){let r=t.prop(e<0?Xe.openedBy:Xe.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function Kp(t){let e=t.type.prop(lw);return e?e(t.node):t}function Oi(t,e,n,r={}){let i=r.maxScanDistance||rw,l=r.brackets||iw,o=zt(t),c=o.resolveInner(e,n);for(let f=c;f;f=f.parent){let m=Gp(f.type,n,l);if(m&&f.from<f.to){let p=Kp(f);if(p&&(n>0?e>=p.from&&e<p.to:e>p.from&&e<=p.to))return LL(t,e,n,f,p,m,l)}}return _L(t,e,n,o,c.type,i,l)}function LL(t,e,n,r,i,l,o){let c=r.parent,f={from:i.from,to:i.to},m=0,p=c==null?void 0:c.cursor();if(p&&(n<0?p.childBefore(r.from):p.childAfter(r.to)))do if(n<0?p.to<=r.from:p.from>=r.to){if(m==0&&l.indexOf(p.type.name)>-1&&p.from<p.to){let O=Kp(p);return{start:f,end:O?{from:O.from,to:O.to}:void 0,matched:!0}}else if(Gp(p.type,n,o))m++;else if(Gp(p.type,-n,o)){if(m==0){let O=Kp(p);return{start:f,end:O&&O.from<O.to?{from:O.from,to:O.to}:void 0,matched:!1}}m--}}while(n<0?p.prevSibling():p.nextSibling());return{start:f,matched:!1}}function _L(t,e,n,r,i,l,o){if(n<0?!e:e==t.doc.length)return null;let c=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),f=o.indexOf(c);if(f<0||f%2==0!=n>0)return null;let m={from:n<0?e-1:e,to:n>0?e+1:e},p=t.doc.iterRange(e,n>0?t.doc.length:0),O=0;for(let y=0;!p.next().done&&y<=l;){let b=p.value;n<0&&(y+=b.length);let S=e+y*n;for(let w=n>0?0:b.length-1,A=n>0?b.length:-1;w!=A;w+=n){let k=o.indexOf(b[w]);if(!(k<0||r.resolveInner(S+w,1).type!=i))if(k%2==0==n>0)O++;else{if(O==1)return{start:m,end:{from:S+w,to:S+w+1},matched:k>>1==f>>1};O--}}n>0&&(y+=b.length)}return p.done?{start:m,matched:!1}:null}const DL=Object.create(null),py=[jn.none],gy=[],Oy=Object.create(null),HL=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])HL[t]=XL(DL,e);function lm(t,e){gy.indexOf(t)>-1||(gy.push(t),console.warn(e))}function XL(t,e){let n=[];for(let c of e.split(" ")){let f=[];for(let m of c.split(".")){let p=t[m]||K[m];p?typeof p=="function"?f.length?f=f.map(p):lm(m,`Modifier ${m} used at start of tag`):f.length?lm(m,`Tag ${m} used as modifier`):f=Array.isArray(p)?p:[p]:lm(m,`Unknown highlighting tag ${m}`)}for(let m of f)n.push(m)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(c=>c.id),l=Oy[i];if(l)return l.id;let o=Oy[i]=jn.define({id:py.length,name:r,props:[qf({[r]:n})]});return py.push(o),o.id}Xt.RTL,Xt.LTR;const zL=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=h8(t.state,n.from);return r.line?FL(t):r.block?BL(t):!1};function d8(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const FL=d8(UL,0),YL=d8(sw,0),BL=d8((t,e)=>sw(t,e,IL(e)),0);function h8(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Ac=50;function qL(t,{open:e,close:n},r,i){let l=t.sliceDoc(r-Ac,r),o=t.sliceDoc(i,i+Ac),c=/\s*$/.exec(l)[0].length,f=/^\s*/.exec(o)[0].length,m=l.length-c;if(l.slice(m-e.length,m)==e&&o.slice(f,f+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+f,margin:f&&1}};let p,O;i-r<=2*Ac?p=O=t.sliceDoc(r,i):(p=t.sliceDoc(r,r+Ac),O=t.sliceDoc(i-Ac,i));let y=/^\s*/.exec(p)[0].length,b=/\s*$/.exec(O)[0].length,S=O.length-b-n.length;return p.slice(y,y+e.length)==e&&O.slice(S,S+n.length)==n?{open:{pos:r+y+e.length,margin:/\s/.test(p.charAt(y+e.length))?1:0},close:{pos:i-b-n.length,margin:/\s/.test(O.charAt(S-1))?1:0}}:null}function IL(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let l=e.length-1;l>=0&&e[l].to>r.from?e[l].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function sw(t,e,n=e.selection.ranges){let r=n.map(l=>h8(e,l.from).block);if(!r.every(l=>l))return null;let i=n.map((l,o)=>qL(e,r[o],l.from,l.to));if(t!=2&&!i.every(l=>l))return{changes:e.changes(n.map((l,o)=>i[o]?[]:[{from:l.from,insert:r[o].open+" "},{from:l.to,insert:" "+r[o].close}]))};if(t!=1&&i.some(l=>l)){let l=[];for(let o=0,c;o<i.length;o++)if(c=i[o]){let f=r[o],{open:m,close:p}=c;l.push({from:m.pos-f.open.length,to:m.pos+m.margin},{from:p.pos-p.margin,to:p.pos+f.close.length})}return{changes:l}}return null}function UL(t,e,n=e.selection.ranges){let r=[],i=-1;e:for(let{from:l,to:o}of n){let c=r.length,f=1e9,m;for(let p=l;p<=o;){let O=e.doc.lineAt(p);if(m==null&&(m=h8(e,O.from).line,!m))continue e;if(O.from>i&&(l==o||o>O.from)){i=O.from;let y=/^\s*/.exec(O.text)[0].length,b=y==O.length,S=O.text.slice(y,y+m.length)==m?y:-1;y<O.text.length&&y<f&&(f=y),r.push({line:O,comment:S,token:m,indent:y,empty:b,single:!1})}p=O.to+1}if(f<1e9)for(let p=c;p<r.length;p++)r[p].indent<r[p].line.text.length&&(r[p].indent=f);r.length==c+1&&(r[c].single=!0)}if(t!=2&&r.some(l=>l.comment<0&&(!l.empty||l.single))){let l=[];for(let{line:c,token:f,indent:m,empty:p,single:O}of r)(O||!p)&&l.push({from:c.from+m,insert:f+" "});let o=e.changes(l);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&r.some(l=>l.comment>=0)){let l=[];for(let{line:o,comment:c,token:f}of r)if(c>=0){let m=o.from+c,p=m+f.length;o.text[p-o.from]==" "&&p++,l.push({from:m,to:p})}return{changes:l}}return null}const Jp=la.define(),WL=la.define(),GL=Me.define(),ow=Me.define({combine(t){return So(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),cw=dr.define({create(){return xi.empty},update(t,e){let n=e.state.facet(ow),r=e.annotation(Jp);if(r){let f=qn.fromTransaction(e,r.selection),m=r.side,p=m==0?t.undone:t.done;return f?p=Of(p,p.length,n.minDepth,f):p=dw(p,e.startState.selection),new xi(m==0?r.rest:p,m==0?p:r.rest)}let i=e.annotation(WL);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Wt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let l=qn.fromTransaction(e),o=e.annotation(Wt.time),c=e.annotation(Wt.userEvent);return l?t=t.addChanges(l,o,c,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,c,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new xi(t.done.map(qn.fromJSON),t.undone.map(qn.fromJSON))}});function KL(t={}){return[cw,ow.of(t),ke.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?uw:e.inputType=="historyRedo"?eg:null;return r?(e.preventDefault(),r(n)):!1}})]}function Jf(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(cw,!1);if(!i)return!1;let l=i.pop(t,n,e);return l?(r(l),!0):!1}}const uw=Jf(0,!1),eg=Jf(1,!1),JL=Jf(0,!0),e_=Jf(1,!0);class qn{constructor(e,n,r,i,l){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=l}setSelAfter(e){return new qn(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new qn(e.changes&&en.fromJSON(e.changes),[],e.mapped&&yi.fromJSON(e.mapped),e.startSelection&&he.fromJSON(e.startSelection),e.selectionsAfter.map(he.fromJSON))}static fromTransaction(e,n){let r=jr;for(let i of e.startState.facet(GL)){let l=i(e);l.length&&(r=r.concat(l))}return!r.length&&e.changes.empty?null:new qn(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,jr)}static selection(e){return new qn(void 0,jr,void 0,void 0,e)}}function Of(t,e,n,r){let i=e+1>n+20?e-n-1:0,l=t.slice(i,e);return l.push(r),l}function t_(t,e){let n=[],r=!1;return t.iterChangedRanges((i,l)=>n.push(i,l)),e.iterChangedRanges((i,l,o,c)=>{for(let f=0;f<n.length;){let m=n[f++],p=n[f++];c>=m&&o<=p&&(r=!0)}}),r}function n_(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function fw(t,e){return t.length?e.length?t.concat(e):t:e}const jr=[],r_=200;function dw(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-r_));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),Of(t,t.length-1,1e9,n.setSelAfter(r)))}else return[qn.selection([e])]}function i_(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function sm(t,e){if(!t.length)return t;let n=t.length,r=jr;for(;n;){let i=a_(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let l=t.slice(0,n);return l[n-1]=i,l}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[qn.selection(r)]:jr}function a_(t,e,n){let r=fw(t.selectionsAfter.length?t.selectionsAfter.map(c=>c.map(e)):jr,n);if(!t.changes)return qn.selection(r);let i=t.changes.map(e),l=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(l):l;return new qn(i,lt.mapEffects(t.effects,e),o,t.startSelection.map(l),r)}const l_=/^(input\.type|delete)($|\.)/;class xi{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new xi(this.done,this.undone):this}addChanges(e,n,r,i,l){let o=this.done,c=o[o.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!r||l_.test(r))&&(!c.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(l,t_(c.changes,e.changes))||r=="input.type.compose")?o=Of(o,o.length-1,i.minDepth,new qn(e.changes.compose(c.changes),fw(lt.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,jr)):o=Of(o,o.length,i.minDepth,e),new xi(o,jr,n,r)}addSelection(e,n,r,i){let l=this.done.length?this.done[this.done.length-1].selectionsAfter:jr;return l.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&n_(l[l.length-1],e)?this:new xi(dw(this.done,e),this.undone,n,r)}addMapping(e){return new xi(sm(this.done,e),sm(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let l=i[i.length-1],o=l.selectionsAfter[0]||(l.startSelection?l.startSelection.map(l.changes.invertedDesc,1):n.selection);if(r&&l.selectionsAfter.length)return n.update({selection:l.selectionsAfter[l.selectionsAfter.length-1],annotations:Jp.of({side:e,rest:i_(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(l.changes){let c=i.length==1?jr:i.slice(0,i.length-1);return l.mapped&&(c=sm(c,l.mapped)),n.update({changes:l.changes,selection:l.startSelection,effects:l.effects,annotations:Jp.of({side:e,rest:c,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}xi.empty=new xi(jr,jr);const s_=[{key:"Mod-z",run:uw,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:eg,preventDefault:!0},{linux:"Ctrl-Shift-z",run:eg,preventDefault:!0},{key:"Mod-u",run:JL,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:e_,preventDefault:!0}];function wo(t,e){return he.create(t.ranges.map(e),t.mainIndex)}function ei(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ti({state:t,dispatch:e},n){let r=wo(t.selection,n);return r.eq(t.selection,!0)?!1:(e(ei(t,r)),!0)}function ed(t,e){return he.cursor(e?t.to:t.from)}function hw(t,e){return ti(t,n=>n.empty?t.moveByChar(n,e):ed(n,e))}function Tn(t){return t.textDirectionAt(t.state.selection.main.head)==Xt.LTR}const mw=t=>hw(t,!Tn(t)),pw=t=>hw(t,Tn(t));function gw(t,e){return ti(t,n=>n.empty?t.moveByGroup(n,e):ed(n,e))}const o_=t=>gw(t,!Tn(t)),c_=t=>gw(t,Tn(t));function u_(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function td(t,e,n){let r=zt(t).resolveInner(e.head),i=n?Xe.closedBy:Xe.openedBy;for(let f=e.head;;){let m=n?r.childAfter(f):r.childBefore(f);if(!m)break;u_(t,m,i)?r=m:f=n?m.to:m.from}let l=r.type.prop(i),o,c;return l&&(o=n?Oi(t,r.from,1):Oi(t,r.to,-1))&&o.matched?c=n?o.end.to:o.end.from:c=n?r.to:r.from,he.cursor(c,n?-1:1)}const f_=t=>ti(t,e=>td(t.state,e,!Tn(t))),d_=t=>ti(t,e=>td(t.state,e,Tn(t)));function Ow(t,e){return ti(t,n=>{if(!n.empty)return ed(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const xw=t=>Ow(t,!1),yw=t=>Ow(t,!0);function bw(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,r=0,i;if(e){for(let l of t.state.facet(ke.scrollMargins)){let o=l(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=t.scrollDOM.clientHeight-n-r}else i=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:e,height:Math.max(t.defaultLineHeight,i-5)}}function vw(t,e){let n=bw(t),{state:r}=t,i=wo(r.selection,o=>o.empty?t.moveVertically(o,e,n.height):ed(o,e));if(i.eq(r.selection))return!1;let l;if(n.selfScroll){let o=t.coordsAtPos(r.selection.main.head),c=t.scrollDOM.getBoundingClientRect(),f=c.top+n.marginTop,m=c.bottom-n.marginBottom;o&&o.top>f&&o.bottom<m&&(l=ke.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-f}))}return t.dispatch(ei(r,i),{effects:l}),!0}const xy=t=>vw(t,!1),tg=t=>vw(t,!0);function Ga(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let l=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;l&&e.head!=r.from+l&&(i=he.cursor(r.from+l))}return i}const h_=t=>ti(t,e=>Ga(t,e,!0)),m_=t=>ti(t,e=>Ga(t,e,!1)),p_=t=>ti(t,e=>Ga(t,e,!Tn(t))),g_=t=>ti(t,e=>Ga(t,e,Tn(t))),O_=t=>ti(t,e=>he.cursor(t.lineBlockAt(e.head).from,1)),x_=t=>ti(t,e=>he.cursor(t.lineBlockAt(e.head).to,-1));function y_(t,e,n){let r=!1,i=wo(t.selection,l=>{let o=Oi(t,l.head,-1)||Oi(t,l.head,1)||l.head>0&&Oi(t,l.head-1,1)||l.head<t.doc.length&&Oi(t,l.head+1,-1);if(!o||!o.end)return l;r=!0;let c=o.start.from==l.head?o.end.to:o.end.from;return he.cursor(c)});return r?(e(ei(t,i)),!0):!1}const b_=({state:t,dispatch:e})=>y_(t,e);function Lr(t,e){let n=wo(t.state.selection,r=>{let i=e(r);return he.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return n.eq(t.state.selection)?!1:(t.dispatch(ei(t.state,n)),!0)}function Sw(t,e){return Lr(t,n=>t.moveByChar(n,e))}const ww=t=>Sw(t,!Tn(t)),Aw=t=>Sw(t,Tn(t));function kw(t,e){return Lr(t,n=>t.moveByGroup(n,e))}const v_=t=>kw(t,!Tn(t)),S_=t=>kw(t,Tn(t)),w_=t=>Lr(t,e=>td(t.state,e,!Tn(t))),A_=t=>Lr(t,e=>td(t.state,e,Tn(t)));function Mw(t,e){return Lr(t,n=>t.moveVertically(n,e))}const Tw=t=>Mw(t,!1),Cw=t=>Mw(t,!0);function Ew(t,e){return Lr(t,n=>t.moveVertically(n,e,bw(t).height))}const yy=t=>Ew(t,!1),by=t=>Ew(t,!0),k_=t=>Lr(t,e=>Ga(t,e,!0)),M_=t=>Lr(t,e=>Ga(t,e,!1)),T_=t=>Lr(t,e=>Ga(t,e,!Tn(t))),C_=t=>Lr(t,e=>Ga(t,e,Tn(t))),E_=t=>Lr(t,e=>he.cursor(t.lineBlockAt(e.head).from)),$_=t=>Lr(t,e=>he.cursor(t.lineBlockAt(e.head).to)),vy=({state:t,dispatch:e})=>(e(ei(t,{anchor:0})),!0),Sy=({state:t,dispatch:e})=>(e(ei(t,{anchor:t.doc.length})),!0),wy=({state:t,dispatch:e})=>(e(ei(t,{anchor:t.selection.main.anchor,head:0})),!0),Ay=({state:t,dispatch:e})=>(e(ei(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),Q_=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),P_=({state:t,dispatch:e})=>{let n=nd(t).map(({from:r,to:i})=>he.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:he.create(n),userEvent:"select"})),!0},Z_=({state:t,dispatch:e})=>{let n=wo(t.selection,r=>{let i=zt(t),l=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=l.node.from&&o.node.to<=l.node.to&&(l=o)}for(let o=l;o;o=o.next){let{node:c}=o;if((c.from<r.from&&c.to>=r.to||c.to>r.to&&c.from<=r.from)&&o.next)return he.range(c.to,c.from)}return r});return n.eq(t.selection)?!1:(e(ei(t,n)),!0)};function $w(t,e){let{state:n}=t,r=n.selection,i=n.selection.ranges.slice();for(let l of n.selection.ranges){let o=n.doc.lineAt(l.head);if(e?o.to<t.state.doc.length:o.from>0)for(let c=l;;){let f=t.moveVertically(c,e);if(f.head<o.from||f.head>o.to){i.some(m=>m.head==f.head)||i.push(f);break}else{if(f.head==c.head)break;c=f}}}return i.length==r.ranges.length?!1:(t.dispatch(ei(n,he.create(i,i.length-1))),!0)}const j_=t=>$w(t,!1),R_=t=>$w(t,!0),N_=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=he.create([n.main]):n.main.empty||(r=he.create([he.cursor(n.main.head)])),r?(e(ei(t,r)),!0):!1};function Mu(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(l=>{let{from:o,to:c}=l;if(o==c){let f=e(l);f<o?(n="delete.backward",f=x1(t,f,!1)):f>o&&(n="delete.forward",f=x1(t,f,!0)),o=Math.min(o,f),c=Math.max(c,f)}else o=x1(t,o,!1),c=x1(t,c,!0);return o==c?{range:l}:{changes:{from:o,to:c},range:he.cursor(o,o<l.head?-1:1)}});return i.changes.empty?!1:(t.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ke.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function x1(t,e,n){if(t instanceof ke)for(let r of t.state.facet(ke.atomicRanges).map(i=>i(t)))r.between(e,e,(i,l)=>{i<e&&l>e&&(e=n?l:i)});return e}const Qw=(t,e,n)=>Mu(t,r=>{let i=r.from,{state:l}=t,o=l.doc.lineAt(i),c,f;if(n&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(c=o.text.slice(0,i-o.from))){if(c[c.length-1]==" ")return i-1;let m=Hf(c,l.tabSize),p=m%pf(l)||pf(l);for(let O=0;O<p&&c[c.length-1-O]==" ";O++)i--;f=i}else f=cn(o.text,i-o.from,e,e)+o.from,f==i&&o.number!=(e?l.doc.lines:1)?f+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(f-o.from,i-o.from))&&(f=cn(o.text,f-o.from,!1,!1)+o.from);return f}),ng=t=>Qw(t,!1,!0),Pw=t=>Qw(t,!0,!1),Zw=(t,e)=>Mu(t,n=>{let r=n.head,{state:i}=t,l=i.doc.lineAt(r),o=i.charCategorizer(r);for(let c=null;;){if(r==(e?l.to:l.from)){r==n.head&&l.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let f=cn(l.text,r-l.from,e)+l.from,m=l.text.slice(Math.min(r,f)-l.from,Math.max(r,f)-l.from),p=o(m);if(c!=null&&p!=c)break;(m!=" "||r!=n.head)&&(c=p),r=f}return r}),jw=t=>Zw(t,!1),V_=t=>Zw(t,!0),L_=t=>Mu(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),__=t=>Mu(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),D_=t=>Mu(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),H_=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:tt.of(["",""])},range:he.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},X_=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,l=t.doc.lineAt(i),o=i==l.from?i-1:cn(l.text,i-l.from,!1)+l.from,c=i==l.to?i+1:cn(l.text,i-l.from,!0)+l.from;return{changes:{from:o,to:c,insert:t.doc.slice(i,c).append(t.doc.slice(o,i))},range:he.cursor(c)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function nd(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),l=t.doc.lineAt(r.to);if(!r.empty&&r.to==l.from&&(l=t.doc.lineAt(r.to-1)),n>=i.number){let o=e[e.length-1];o.to=l.to,o.ranges.push(r)}else e.push({from:i.from,to:l.to,ranges:[r]});n=l.number+1}return e}function Rw(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let l of nd(t)){if(n?l.to==t.doc.length:l.from==0)continue;let o=t.doc.lineAt(n?l.to+1:l.from-1),c=o.length+1;if(n){r.push({from:l.to,to:o.to},{from:l.from,insert:o.text+t.lineBreak});for(let f of l.ranges)i.push(he.range(Math.min(t.doc.length,f.anchor+c),Math.min(t.doc.length,f.head+c)))}else{r.push({from:o.from,to:l.from},{from:l.to,insert:t.lineBreak+o.text});for(let f of l.ranges)i.push(he.range(f.anchor-c,f.head-c))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:he.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const z_=({state:t,dispatch:e})=>Rw(t,e,!1),F_=({state:t,dispatch:e})=>Rw(t,e,!0);function Nw(t,e,n){if(t.readOnly)return!1;let r=[];for(let l of nd(t))n?r.push({from:l.from,insert:t.doc.slice(l.from,l.to)+t.lineBreak}):r.push({from:l.to,insert:t.lineBreak+t.doc.slice(l.from,l.to)});let i=t.changes(r);return e(t.update({changes:i,selection:t.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Y_=({state:t,dispatch:e})=>Nw(t,e,!1),B_=({state:t,dispatch:e})=>Nw(t,e,!0),q_=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(nd(e).map(({from:i,to:l})=>(i>0?i--:l<e.doc.length&&l++,{from:i,to:l}))),r=wo(e.selection,i=>{let l;if(t.lineWrapping){let o=t.lineBlockAt(i.head),c=t.coordsAtPos(i.head,i.assoc||1);c&&(l=o.bottom+t.documentTop-c.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,l)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function I_(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=zt(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),l;return r&&i&&r.to<=e&&i.from>=e&&(l=r.type.prop(Xe.closedBy))&&l.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const ky=Vw(!1),U_=Vw(!0);function Vw(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:l,to:o}=i,c=e.doc.lineAt(l),f=!t&&l==o&&I_(e,l);t&&(l=o=(o<=c.to?c:e.doc.lineAt(o)).to);let m=new Uf(e,{simulateBreak:l,simulateDoubleBreak:!!f}),p=c8(m,l);for(p==null&&(p=Hf(/^\s*/.exec(e.doc.lineAt(l).text)[0],e.tabSize));o<c.to&&/\s/.test(c.text[o-c.from]);)o++;f?{from:l,to:o}=f:l>c.from&&l<c.from+100&&!/\S/.test(c.text.slice(0,l))&&(l=c.from);let O=["",du(e,p)];return f&&O.push(du(e,m.lineIndent(c.from,-1))),{changes:{from:l,to:o,insert:tt.of(O)},range:he.cursor(l+1+O[1].length)}});return n(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function m8(t,e){let n=-1;return t.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let c=t.doc.lineAt(o);c.number>n&&(r.empty||r.to>c.from)&&(e(c,i,r),n=c.number),o=c.to+1}let l=t.changes(i);return{changes:i,range:he.range(l.mapPos(r.anchor,1),l.mapPos(r.head,1))}})}const W_=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new Uf(t,{overrideIndentation:l=>{let o=n[l];return o??-1}}),i=m8(t,(l,o,c)=>{let f=c8(r,l.from);if(f==null)return;/\S/.test(l.text)||(f=0);let m=/^\s*/.exec(l.text)[0],p=du(t,f);(m!=p||c.from<l.from+m.length)&&(n[l.from]=f,o.push({from:l.from,to:l.from+m.length,insert:p}))});return i.changes.empty||e(t.update(i,{userEvent:"indent"})),!0},G_=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(m8(t,(n,r)=>{r.push({from:n.from,insert:t.facet(If)})}),{userEvent:"input.indent"})),!0),K_=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(m8(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let l=Hf(i,t.tabSize),o=0,c=du(t,Math.max(0,l-pf(t)));for(;o<i.length&&o<c.length&&i.charCodeAt(o)==c.charCodeAt(o);)o++;r.push({from:n.from+o,to:n.from+i.length,insert:c.slice(o)})}),{userEvent:"delete.dedent"})),!0),J_=t=>(t.setTabFocusMode(),!0),eD=[{key:"Ctrl-b",run:mw,shift:ww,preventDefault:!0},{key:"Ctrl-f",run:pw,shift:Aw},{key:"Ctrl-p",run:xw,shift:Tw},{key:"Ctrl-n",run:yw,shift:Cw},{key:"Ctrl-a",run:O_,shift:E_},{key:"Ctrl-e",run:x_,shift:$_},{key:"Ctrl-d",run:Pw},{key:"Ctrl-h",run:ng},{key:"Ctrl-k",run:L_},{key:"Ctrl-Alt-h",run:jw},{key:"Ctrl-o",run:H_},{key:"Ctrl-t",run:X_},{key:"Ctrl-v",run:tg}],tD=[{key:"ArrowLeft",run:mw,shift:ww,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:o_,shift:v_,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:p_,shift:T_,preventDefault:!0},{key:"ArrowRight",run:pw,shift:Aw,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:c_,shift:S_,preventDefault:!0},{mac:"Cmd-ArrowRight",run:g_,shift:C_,preventDefault:!0},{key:"ArrowUp",run:xw,shift:Tw,preventDefault:!0},{mac:"Cmd-ArrowUp",run:vy,shift:wy},{mac:"Ctrl-ArrowUp",run:xy,shift:yy},{key:"ArrowDown",run:yw,shift:Cw,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Sy,shift:Ay},{mac:"Ctrl-ArrowDown",run:tg,shift:by},{key:"PageUp",run:xy,shift:yy},{key:"PageDown",run:tg,shift:by},{key:"Home",run:m_,shift:M_,preventDefault:!0},{key:"Mod-Home",run:vy,shift:wy},{key:"End",run:h_,shift:k_,preventDefault:!0},{key:"Mod-End",run:Sy,shift:Ay},{key:"Enter",run:ky,shift:ky},{key:"Mod-a",run:Q_},{key:"Backspace",run:ng,shift:ng,preventDefault:!0},{key:"Delete",run:Pw,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:jw,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:V_,preventDefault:!0},{mac:"Mod-Backspace",run:__,preventDefault:!0},{mac:"Mod-Delete",run:D_,preventDefault:!0}].concat(eD.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),nD=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:f_,shift:w_},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:d_,shift:A_},{key:"Alt-ArrowUp",run:z_},{key:"Shift-Alt-ArrowUp",run:Y_},{key:"Alt-ArrowDown",run:F_},{key:"Shift-Alt-ArrowDown",run:B_},{key:"Mod-Alt-ArrowUp",run:j_},{key:"Mod-Alt-ArrowDown",run:R_},{key:"Escape",run:N_},{key:"Mod-Enter",run:U_},{key:"Alt-l",mac:"Ctrl-l",run:P_},{key:"Mod-i",run:Z_,preventDefault:!0},{key:"Mod-[",run:K_},{key:"Mod-]",run:G_},{key:"Mod-Alt-\\",run:W_},{key:"Shift-Mod-k",run:q_},{key:"Shift-Mod-\\",run:b_},{key:"Mod-/",run:zL},{key:"Alt-A",run:YL},{key:"Ctrl-m",mac:"Shift-Alt-m",run:J_}].concat(tD);function My(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function rD(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let l=1;l<i.length;l++)n[i[l]]=!0}let r=My(e)+My(n)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function iD(t){let e=t.map(i=>typeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:rD(e);return i=>{let l=i.matchBefore(r);return l||i.explicit?{from:l?l.from:i.pos,options:e,validFor:n}:null}}function aD(t,e){return n=>{for(let r=zt(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}const lD=la.define(),sD=ke.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class oD{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class p8{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,An.TrackDel),r=e.mapPos(this.to,1,An.TrackDel);return n==null||r==null?null:new p8(this.field,n,r)}}class g8{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],l=e.doc.lineAt(n),o=/^\s*/.exec(l.text)[0];for(let f of this.lines){if(r.length){let m=o,p=/^\t*/.exec(f)[0].length;for(let O=0;O<p;O++)m+=e.facet(If);i.push(n+m.length-p),f=m+f.slice(p)}r.push(f),n+=f.length+1}let c=this.fieldPositions.map(f=>new p8(f.field,i[f.line]+f.from,i[f.line]+f.to));return{text:r,ranges:c}}static parse(e){let n=[],r=[],i=[],l;for(let o of e.split(/\r\n?|\n/)){for(;l=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let c=l[1]?+l[1]:null,f=l[2]||l[3]||"",m=-1,p=f.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O<n.length;O++)(c!=null?n[O].seq==c:p&&n[O].name==p)&&(m=O);if(m<0){let O=0;for(;O<n.length&&(c==null||n[O].seq!=null&&n[O].seq<c);)O++;n.splice(O,0,{seq:c,name:p}),m=O;for(let y of i)y.field>=m&&y.field++}for(let O of i)if(O.line==r.length&&O.from>l.index){let y=l[2]?3+(l[1]||"").length:2;O.from-=y,O.to-=y}i.push(new oD(m,r.length,l.index,l.index+p.length)),o=o.slice(0,l.index)+f+o.slice(l.index+l[0].length)}o=o.replace(/\\([{}])/g,(c,f,m)=>{for(let p of i)p.line==r.length&&p.from>m&&(p.from--,p.to--);return f}),r.push(o)}return new g8(r,i)}}let cD=Le.widget({widget:new class extends Bl{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),uD=Le.mark({class:"cm-snippetField"});class Ao{constructor(e,n){this.ranges=e,this.active=n,this.deco=Le.set(e.map(r=>(r.from==r.to?cD:uD).range(r.from,r.to)),!0)}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new Ao(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Tu=lt.define({map(t,e){return t&&t.map(e)}}),fD=lt.define(),hu=dr.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Tu))return n.value;if(n.is(fD)&&t)return new Ao(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ke.decorations.from(t,e=>e?e.deco:Le.none)});function O8(t,e){return he.create(t.filter(n=>n.field==e).map(n=>he.range(n.from,n.to)))}function dD(t){let e=g8.parse(t);return(n,r,i,l)=>{let{text:o,ranges:c}=e.instantiate(n.state,i),{main:f}=n.state.selection,m={changes:{from:i,to:l==f.from?f.to:l,insert:tt.of(o)},scrollIntoView:!0,annotations:r?[lD.of(r),Wt.userEvent.of("input.complete")]:void 0};if(c.length&&(m.selection=O8(c,0)),c.some(p=>p.field>0)){let p=new Ao(c,0),O=m.effects=[Tu.of(p)];n.state.field(hu,!1)===void 0&&O.push(lt.appendConfig.of([hu,OD,xD,sD]))}n.dispatch(n.state.update(m))}}function Lw(t){return({state:e,dispatch:n})=>{let r=e.field(hu,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,l=t>0&&!r.ranges.some(o=>o.field==i+t);return n(e.update({selection:O8(r.ranges,i),effects:Tu.of(l?null:new Ao(r.ranges,i)),scrollIntoView:!0})),!0}}const hD=({state:t,dispatch:e})=>t.field(hu,!1)?(e(t.update({effects:Tu.of(null)})),!0):!1,mD=Lw(1),pD=Lw(-1),gD=[{key:"Tab",run:mD,shift:pD},{key:"Escape",run:hD}],Ty=Me.define({combine(t){return t.length?t[0]:gD}}),OD=Su.highest(n8.compute([Ty],t=>t.facet(Ty)));function Fn(t,e){return{...e,apply:dD(t)}}const xD=ke.domEventHandlers({mousedown(t,e){let n=e.state.field(hu,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(l=>l.from<=r&&l.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:O8(n.ranges,i.field),effects:Tu.of(n.ranges.some(l=>l.field>i.field)?new Ao(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),mu={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},wl=lt.define({map(t,e){let n=e.mapPos(t,-1,An.TrackAfter);return n??void 0}}),x8=new class extends Ya{};x8.startSide=1;x8.endSide=-1;const _w=dr.define({create(){return Ie.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(wl)&&(t=t.update({add:[x8.range(n.value,n.value+1)]}));return t}});function yD(){return[vD,_w]}const om="()[]{}<>«»»«[]{}";function Dw(t){for(let e=0;e<om.length;e+=2)if(om.charCodeAt(e)==t)return om.charAt(e+1);return M7(t<128?t:t+1)}function Hw(t,e){return t.languageDataAt("closeBrackets",e)[0]||mu}const bD=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),vD=ke.inputHandler.of((t,e,n,r)=>{if((bD?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&vu(Yl(r,0))==1||e!=i.from||n!=i.to)return!1;let l=AD(t.state,r);return l?(t.dispatch(l),!0):!1}),SD=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=Hw(t,t.selection.main.head).brackets||mu.brackets,i=null,l=t.changeByRange(o=>{if(o.empty){let c=kD(t.doc,o.head);for(let f of r)if(f==c&&rd(t.doc,o.head)==Dw(Yl(f,0)))return{changes:{from:o.head-f.length,to:o.head+f.length},range:he.cursor(o.head-f.length)}}return{range:i=o}});return i||e(t.update(l,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},wD=[{key:"Backspace",run:SD}];function AD(t,e){let n=Hw(t,t.selection.main.head),r=n.brackets||mu.brackets;for(let i of r){let l=Dw(Yl(i,0));if(e==i)return l==i?CD(t,i,r.indexOf(i+i+i)>-1,n):MD(t,i,l,n.before||mu.before);if(e==l&&Xw(t,t.selection.main.from))return TD(t,i,l)}return null}function Xw(t,e){let n=!1;return t.field(_w).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function rd(t,e){let n=t.sliceString(e,e+2);return n.slice(0,vu(Yl(n,0)))}function kD(t,e){let n=t.sliceString(e-2,e);return vu(Yl(n,0))==n.length?n:n.slice(1)}function MD(t,e,n,r){let i=null,l=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:wl.of(o.to+e.length),range:he.range(o.anchor+e.length,o.head+e.length)};let c=rd(t.doc,o.head);return!c||/\s/.test(c)||r.indexOf(c)>-1?{changes:{insert:e+n,from:o.head},effects:wl.of(o.head+e.length),range:he.cursor(o.head+e.length)}:{range:i=o}});return i?null:t.update(l,{scrollIntoView:!0,userEvent:"input.type"})}function TD(t,e,n){let r=null,i=t.changeByRange(l=>l.empty&&rd(t.doc,l.head)==n?{changes:{from:l.head,to:l.head+n.length,insert:n},range:he.cursor(l.head+n.length)}:r={range:l});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function CD(t,e,n,r){let i=r.stringPrefixes||mu.stringPrefixes,l=null,o=t.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:wl.of(c.to+e.length),range:he.range(c.anchor+e.length,c.head+e.length)};let f=c.head,m=rd(t.doc,f),p;if(m==e){if(Cy(t,f))return{changes:{insert:e+e,from:f},effects:wl.of(f+e.length),range:he.cursor(f+e.length)};if(Xw(t,f)){let y=n&&t.sliceDoc(f,f+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:f,to:f+y.length,insert:y},range:he.cursor(f+y.length)}}}else{if(n&&t.sliceDoc(f-2*e.length,f)==e+e&&(p=Ey(t,f-2*e.length,i))>-1&&Cy(t,p))return{changes:{insert:e+e+e+e,from:f},effects:wl.of(f+e.length),range:he.cursor(f+e.length)};if(t.charCategorizer(f)(m)!=Et.Word&&Ey(t,f,i)>-1&&!ED(t,f,e,i))return{changes:{insert:e+e,from:f},effects:wl.of(f+e.length),range:he.cursor(f+e.length)}}return{range:l=c}});return l?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function Cy(t,e){let n=zt(t).resolveInner(e+1);return n.parent&&n.from==e}function ED(t,e,n,r){let i=zt(t).resolveInner(e,-1),l=r.reduce((o,c)=>Math.max(o,c.length),0);for(let o=0;o<5;o++){let c=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+l)),f=c.indexOf(n);if(!f||f>-1&&r.indexOf(c.slice(0,f))>-1){let p=i.firstChild;for(;p&&p.from==i.from&&p.to-p.from>n.length+f;){if(t.sliceDoc(p.to-n.length,p.to)==n)return!1;p=p.firstChild}return!0}let m=i.to==e&&i.parent;if(!m)break;i=m}return!1}function Ey(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=Et.Word)return e;for(let i of n){let l=e-i.length;if(t.sliceDoc(l,e)==i&&r(t.sliceDoc(l-1,l))!=Et.Word)return l}return-1}const $y=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class po{constructor(e,n,r=0,i=e.length,l,o){this.test=o,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=l?c=>l($y(c)):$y,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return Yl(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=M7(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=vu(e);let i=this.normalize(n);if(i.length)for(let l=0,o=r,c=!0;;l++){let f=i.charCodeAt(l),m=this.match(f,o,c,this.bufferPos+this.bufferStart,l==i.length-1);if(m)return this.value=m,this;if(l==i.length-1)break;c&&l<n.length&&n.charCodeAt(l)==f?o++:c=!1}}}match(e,n,r,i,l){let o=null;for(let c=0;c<this.matches.length;){let f=this.matches[c],m=!1;this.query.charCodeAt(f.index)==e&&(f.index==this.query.length-1?o={from:f.from,to:i,precise:l&&f.precise}:(f.index++,m=!0)),m?c++:this.matches.splice(c,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?o={from:n,to:i,precise:r&&l}:this.matches.push({from:n,index:1,precise:r})),o&&this.test&&!this.test(o.from,o.to,this.buffer,this.bufferStart)&&(o=null),o}}typeof Symbol<"u"&&(po.prototype[Symbol.iterator]=function(){return this});const zw={from:-1,to:-1,match:/.*/.exec(""),precise:!0},y8="gm"+(/x/.unicode==null?"":"u");class Fw{constructor(e,n,r,i=0,l=e.length){if(this.text=e,this.to=l,this.curLine="",this.done=!1,this.value=zw,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new Yw(e,n,r,i,l);this.re=new RegExp(n,y8+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.iter=e.iter();let o=e.lineAt(i);this.curLineStart=o.from,this.matchPos=xf(e,i),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=xf(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(r<i||r>this.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,precise:!0,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const cm=new WeakMap;class to{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,r){let i=cm.get(e);if(!i||i.from>=r||i.to<=n){let c=new to(n,e.sliceString(n,r));return cm.set(e,c),c}if(i.from==n&&i.to==r)return i;let{text:l,from:o}=i;return o>n&&(l=e.sliceString(n,o)+l,o=n),i.to<r&&(l+=e.sliceString(i.to,r)),cm.set(e,new to(o,l)),new to(n,l.slice(n-o,r-o))}}class Yw{constructor(e,n,r,i,l){this.text=e,this.to=l,this.done=!1,this.value=zw,this.matchPos=xf(e,i),this.re=new RegExp(n,y8+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=to.get(e,i,this.chunkEnd(i+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,precise:!0,match:n},this.matchPos=xf(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=to.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(Fw.prototype[Symbol.iterator]=Yw.prototype[Symbol.iterator]=function(){return this});function $D(t){try{return new RegExp(t,y8),!0}catch{return!1}}function xf(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e<n.to&&(r=n.text.charCodeAt(e-n.from))>=56320&&r<57344;)e++;return e}const QD=t=>{let{state:e}=t,n=String(e.doc.lineAt(t.state.selection.main.head).number),{close:r,result:i}=vV(t,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:n},focus:!0,submitLabel:e.phrase("go")});return i.then(l=>{let o=l&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(l.elements.line.value);if(!o){t.dispatch({effects:r});return}let c=e.doc.lineAt(e.selection.main.head),[,f,m,p,O]=o,y=p?+p.slice(1):0,b=m?+m:c.number;if(m&&O){let A=b/100;f&&(A=A*(f=="-"?-1:1)+c.number/e.doc.lines),b=Math.round(e.doc.lines*A)}else m&&f&&(b=b*(f=="-"?-1:1)+c.number);let S=e.doc.line(Math.max(1,Math.min(e.doc.lines,b))),w=he.cursor(S.from+Math.max(0,Math.min(y,S.length)));t.dispatch({effects:[r,ke.scrollIntoView(w.from,{y:"center"})],selection:w})}),!0},PD={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},ZD=Me.define({combine(t){return So(t,PD,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function jD(t){return[_D,LD]}const RD=Le.mark({class:"cm-selectionMatch"}),ND=Le.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Qy(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=Et.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=Et.Word)}function VD(t,e,n,r){return t(e.sliceDoc(n,n+1))==Et.Word&&t(e.sliceDoc(r-1,r))==Et.Word}const LD=Un.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(ZD),{state:n}=t,r=n.selection;if(r.ranges.length>1)return Le.none;let i=r.main,l,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Le.none;let f=n.wordAt(i.head);if(!f)return Le.none;o=n.charCategorizer(i.head),l=n.sliceDoc(f.from,f.to)}else{let f=i.to-i.from;if(f<e.minSelectionLength||f>200)return Le.none;if(e.wholeWords){if(l=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Qy(o,n,i.from,i.to)&&VD(o,n,i.from,i.to)))return Le.none}else if(l=n.sliceDoc(i.from,i.to),!l)return Le.none}let c=[];for(let f of t.visibleRanges){let m=new po(n.doc,l,f.from,f.to);for(;!m.next().done;){let{from:p,to:O}=m.value;if((!o||Qy(o,n,p,O))&&(i.empty&&p<=i.from&&O>=i.to?c.push(ND.range(p,O)):(p>=i.to||O<=i.from)&&c.push(RD.range(p,O)),c.length>e.maxMatches))return Le.none}}return Le.set(c)}},{decorations:t=>t.decorations}),_D=ke.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),DD=({state:t,dispatch:e})=>{let{selection:n}=t,r=he.create(n.ranges.map(i=>t.wordAt(i.head)||he.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function HD(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),l=i&&i.from==n.from&&i.to==n.to;for(let o=!1,c=new po(t.doc,e,r[r.length-1].to);;)if(c.next(),c.done){if(o)return null;c=new po(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(f=>f.from==c.value.from))continue;if(l){let f=t.wordAt(c.value.from);if(!f||f.from!=c.value.from||f.to!=c.value.to)continue}return c.value}}const XD=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(l=>l.from===l.to))return DD({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(l=>t.sliceDoc(l.from,l.to)!=r))return!1;let i=HD(t,r);return i?(e(t.update({selection:t.selection.addRange(he.range(i.from,i.to),!1),effects:ke.scrollIntoView(i.to)})),!0):!1},ko=Me.define({combine(t){return So(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new nH(e),scrollToMatch:e=>ke.scrollIntoView(e)})}});class Bw{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||$D(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?`
|
|
106
|
-
`:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new ID(this):new YD(this)}getCursor(e,n=0,r){let i=e.doc?e:it.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?Hs(this,i,n,r):Ds(this,i,n,r)}}class qw{constructor(e){this.spec=e}}function zD(t,e,n){return(r,i,l,o)=>{if(n&&!n(r,i,l,o))return!1;let c=r>=o&&i<=o+l.length?l.slice(r-o,i-o):e.doc.sliceString(r,i);return t(c,e,r,i)}}function Ds(t,e,n,r){let i;return t.wholeWord&&(i=FD(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(i=zD(t.test,e,i)),new po(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:l=>l.toLowerCase(),i)}function FD(t,e){return(n,r,i,l)=>((l>n||l+i.length<r)&&(l=Math.max(0,n-2),i=t.sliceString(l,Math.min(t.length,r+2))),(e(yf(i,n-l))!=Et.Word||e(bf(i,n-l))!=Et.Word)&&(e(bf(i,r-l))!=Et.Word||e(yf(i,r-l))!=Et.Word))}class YD extends qw{constructor(e){super(e)}nextMatch(e,n,r){let i=Ds(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let l=Math.min(e.doc.length,n+this.spec.unquoted.length);i=Ds(this.spec,e,0,l).nextOverlapping()}return i.done||i.value.from==n&&i.value.to==r?null:i.value}prevMatchInRange(e,n,r){for(let i=r;;){let l=Math.max(n,i-1e4-this.spec.unquoted.length),o=Ds(this.spec,e,l,i),c=null;for(;!o.nextOverlapping().done;)c=o.value;if(c)return c;if(l==n)return null;i-=1e4}}prevMatch(e,n,r){let i=this.prevMatchInRange(e,0,n);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=n||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let r=Ds(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let l=Ds(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}function BD(t,e,n){return(r,i,l)=>(!n||n(r,i,l))&&t(l[0],e,r,i)}function Hs(t,e,n,r){let i;return t.wholeWord&&(i=qD(e.charCategorizer(e.selection.main.head))),t.test&&(i=BD(t.test,e,i)),new Fw(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:i},n,r)}function yf(t,e){return t.slice(cn(t,e,!1),e)}function bf(t,e){return t.slice(e,cn(t,e))}function qD(t){return(e,n,r)=>!r[0].length||(t(yf(r.input,r.index))!=Et.Word||t(bf(r.input,r.index))!=Et.Word)&&(t(bf(r.input,r.index+r[0].length))!=Et.Word||t(yf(r.input,r.index+r[0].length))!=Et.Word)}class ID extends qw{nextMatch(e,n,r){let i=Hs(this.spec,e,r,e.doc.length).next();return i.done&&(i=Hs(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let l=Math.max(n,r-i*1e4),o=Hs(this.spec,e,l,r),c=null;for(;!o.next().done;)c=o.value;if(c&&(l==n||c.from>l+10))return c;if(l==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let l=+r.slice(0,i);if(l>0&&l<e.match.length)return e.match[l]+r.slice(i)}return n})}matchAll(e,n){let r=Hs(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let l=Hs(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!l.next().done;)i(l.value.from,l.value.to)}}const pu=lt.define(),b8=lt.define(),Xa=dr.define({create(t){return new um(rg(t).create(),null)},update(t,e){for(let n of e.effects)n.is(pu)?t=new um(n.value.create(),t.panel):n.is(b8)&&(t=new um(t.query,n.value?v8:null));return t},provide:t=>ff.from(t,e=>e.panel)});class um{constructor(e,n){this.query=e,this.panel=n}}const UD=Le.mark({class:"cm-searchMatch"}),WD=Le.mark({class:"cm-searchMatch cm-searchMatch-selected"}),GD=Un.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(Xa))}update(t){let e=t.state.field(Xa);(e!=t.startState.field(Xa)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return Le.none;let{view:n}=this,r=new Dl;for(let i=0,l=n.visibleRanges,o=l.length;i<o;i++){let{from:c,to:f}=l[i];for(;i<o-1&&f>l[i+1].from-500;)f=l[++i].to;t.highlight(n.state,c,f,(m,p)=>{let O=n.state.selection.ranges.some(y=>y.from==m&&y.to==p);r.add(m,p,O?WD:UD)})}return r.finish()}},{decorations:t=>t.decorations});function Cu(t){return e=>{let n=e.state.field(Xa,!1);return n&&n.query.spec.valid?t(e,n):Ww(e)}}const vf=Cu((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=he.single(r.from,r.to),l=t.state.facet(ko);return t.dispatch({selection:i,effects:[S8(t,r),l.scrollToMatch(i.main,t)],userEvent:"select.search"}),Uw(t),!0}),Sf=Cu((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let l=he.single(i.from,i.to),o=t.state.facet(ko);return t.dispatch({selection:l,effects:[S8(t,i),o.scrollToMatch(l.main,t)],userEvent:"select.search"}),Uw(t),!0}),KD=Cu((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:he.create(n.map(r=>he.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),JD=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,l=[],o=0;for(let c=new po(t.doc,t.sliceDoc(r,i));!c.next().done;){if(l.length>1e3)return!1;c.value.from==r&&(o=l.length),l.push(he.range(c.value.from,c.value.to))}return e(t.update({selection:he.create(l,o),userEvent:"select.search.matches"})),!0},Py=Cu((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let l=e.nextMatch(n,r,r);if(!l)return!1;let o=l,c=[],f,m,p=[];o.precise?o.from==r&&o.to==i&&(m=n.toText(e.getReplacement(o)),c.push({from:o.from,to:o.to,insert:m}),p.push(ke.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))):o=e.nextMatch(n,o.from,o.to);let O=t.state.changes(c);return o&&(f=he.single(o.from,o.to).map(O),p.push(S8(t,o)),p.push(n.facet(ko).scrollToMatch(f.main,t))),t.dispatch({changes:O,selection:f,effects:p,userEvent:"input.replace"}),!0}),eH=Cu((t,{query:e})=>{if(t.state.readOnly)return!1;let n=[];for(let i of e.matchAll(t.state,1e9)){let{from:l,to:o,precise:c}=i;c&&n.push({from:l,to:o,insert:e.getReplacement(i)})}if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ke.announce.of(r),userEvent:"input.replace.all"}),!0});function v8(t){return t.state.facet(ko).createPanel(t)}function rg(t,e){var n,r,i,l,o;let c=t.selection.main,f=c.empty||c.to>c.from+100?"":t.sliceDoc(c.from,c.to);if(e&&!f)return e;let m=t.facet(ko);return new Bw({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:m.literal)?f:f.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:m.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:m.literal,regexp:(l=e==null?void 0:e.regexp)!==null&&l!==void 0?l:m.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:m.wholeWord})}function Iw(t){let e=j9(t,v8);return e&&e.dom.querySelector("[main-field]")}function Uw(t){let e=Iw(t);e&&e==t.root.activeElement&&e.select()}const Ww=t=>{let e=t.state.field(Xa,!1);if(e&&e.panel){let n=Iw(t);if(n&&n!=t.root.activeElement){let r=rg(t.state,e.query.spec);r.valid&&t.dispatch({effects:pu.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[b8.of(!0),e?pu.of(rg(t.state,e.query.spec)):lt.appendConfig.of(iH)]});return!0},Gw=t=>{let e=t.state.field(Xa,!1);if(!e||!e.panel)return!1;let n=j9(t,v8);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:b8.of(!1)}),!0},tH=[{key:"Mod-f",run:Ww,scope:"editor search-panel"},{key:"F3",run:vf,shift:Sf,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:vf,shift:Sf,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:Gw,scope:"editor search-panel"},{key:"Mod-Shift-l",run:JD},{key:"Mod-Alt-g",run:QD},{key:"Mod-d",run:XD,preventDefault:!0}];class nH{constructor(e){this.view=e;let n=this.query=e.state.field(Xa).query.spec;this.commit=this.commit.bind(this),this.searchField=sn("input",{value:n.search,placeholder:lr(e,"Find"),"aria-label":lr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=sn("input",{value:n.replace,placeholder:lr(e,"Replace"),"aria-label":lr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=sn("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=sn("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=sn("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,l,o){return sn("button",{class:"cm-button",name:i,onclick:l,type:"button"},o)}this.dom=sn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>vf(e),[lr(e,"next")]),r("prev",()=>Sf(e),[lr(e,"previous")]),r("select",()=>KD(e),[lr(e,"all")]),sn("label",null,[this.caseField,lr(e,"match case")]),sn("label",null,[this.reField,lr(e,"regexp")]),sn("label",null,[this.wordField,lr(e,"by word")]),...e.state.readOnly?[]:[sn("br"),this.replaceField,r("replace",()=>Py(e),[lr(e,"replace")]),r("replaceAll",()=>eH(e),[lr(e,"replace all")])],sn("button",{name:"close",onclick:()=>Gw(e),"aria-label":lr(e,"close"),type:"button"},["×"])])}commit(){let e=new Bw({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:pu.of(e)}))}keydown(e){pV(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Sf:vf)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),Py(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(pu)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ko).top}}function lr(t,e){return t.state.phrase(e)}const y1=30,b1=/[\s\.,:;?!]/;function S8(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,l=Math.max(r.from,e-y1),o=Math.min(i,n+y1),c=t.state.sliceDoc(l,o);if(l!=r.from){for(let f=0;f<y1;f++)if(!b1.test(c[f+1])&&b1.test(c[f])){c=c.slice(f);break}}if(o!=i){for(let f=c.length-1;f>c.length-y1;f--)if(!b1.test(c[f-1])&&b1.test(c[f])){c=c.slice(0,f);break}}return ke.announce.of(`${t.state.phrase("current match")}. ${c} ${t.state.phrase("on line")} ${r.number}.`)}const rH=ke.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),iH=[Xa,Su.low(GD),rH],aH="#e5c07b",Zy="#e06c75",lH="#56b6c2",sH="#ffffff",z1="#abb2bf",ig="#7d8799",oH="#61afef",cH="#98c379",jy="#d19a66",uH="#c678dd",fH="#21252b",Ry="#2c313a",Ny="#282c34",fm="#353a42",dH="#3E4451",Vy="#528bff",hH=ke.theme({"&":{color:z1,backgroundColor:Ny},".cm-content":{caretColor:Vy},".cm-cursor, .cm-dropCursor":{borderLeftColor:Vy},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:dH},".cm-panels":{backgroundColor:fH,color:z1},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Ny,color:ig,border:"none"},".cm-activeLineGutter":{backgroundColor:Ry},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:fm},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:fm,borderBottomColor:fm},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ry,color:z1}}},{dark:!0}),mH=Kf.define([{tag:K.keyword,color:uH},{tag:[K.name,K.deleted,K.character,K.propertyName,K.macroName],color:Zy},{tag:[K.function(K.variableName),K.labelName],color:oH},{tag:[K.color,K.constant(K.name),K.standard(K.name)],color:jy},{tag:[K.definition(K.name),K.separator],color:z1},{tag:[K.typeName,K.className,K.number,K.changed,K.annotation,K.modifier,K.self,K.namespace],color:aH},{tag:[K.operator,K.operatorKeyword,K.url,K.escape,K.regexp,K.link,K.special(K.string)],color:lH},{tag:[K.meta,K.comment],color:ig},{tag:K.strong,fontWeight:"bold"},{tag:K.emphasis,fontStyle:"italic"},{tag:K.strikethrough,textDecoration:"line-through"},{tag:K.link,color:ig,textDecoration:"underline"},{tag:K.heading,fontWeight:"bold",color:Zy},{tag:[K.atom,K.bool,K.special(K.variableName)],color:jy},{tag:[K.processingInstruction,K.string,K.inserted],color:cH},{tag:K.invalid,color:sH}]),pH=[hH,CL(mH)];var Ly={};class wf{constructor(e,n,r,i,l,o,c,f,m,p=0,O){this.p=e,this.stack=n,this.state=r,this.reducePos=i,this.pos=l,this.score=o,this.buffer=c,this.bufferBase=f,this.curContext=m,this.lookAhead=p,this.parent=O}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new wf(e,[],n,r,r,0,[],0,i?new _y(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:l}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=l.dynamicPrecedence(i);if(c&&(this.score+=c),r==0){i<l.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(l.getGoto(this.state,i,!0),this.reducePos),i<l.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let f=this.stack.length-(r-1)*3-(e&262144?6:0),m=f?this.stack[f-2]:this.p.ranges[0].from;i<l.minRepeatTerm&&m==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let p=this.reducePos-m;p>=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(m==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=m,this.p.lastBigReductionSize=p));let O=f?this.stack[f-1]:0,y=this.bufferBase+this.buffer.length-O;if(i<l.minRepeatTerm||e&131072){let b=l.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,m,b,y+4,!0)}if(e&262144)this.state=this.stack[f];else{let b=this.stack[f-3];this.state=l.getGoto(b,i,!0)}for(;this.stack.length>f;)this.stack.pop();this.reduceContext(i,m)}storeNode(e,n,r,i=4,l=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this.buffer.length;if(o>0&&this.buffer[o-4]==0&&this.buffer[o-1]>-1){if(n==r)return;if(this.buffer[o-2]>=n){this.buffer[o-2]=r;return}}}if(!l||this.pos==r)this.buffer.push(e,n,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let c=!1;for(let f=o;f>0&&this.buffer[f-2]>r;f-=4)if(this.buffer[f-1]>=0){c=!0;break}if(c)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let l=e,{parser:o}=this.p;this.pos=i;let c=o.stateFlag(l,1);!c&&(i>r||n<=o.maxNode)&&(this.reducePos=i),this.pushState(l,c?r:Math.min(r,this.reducePos)),this.shiftContext(n,r),n<=o.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(n&&e.buffer[n-4]==0&&(n-=4);n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new wf(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new gH(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let i=[];for(let l=0,o;l<n.length;l+=2)(o=n[l+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(n[l],o);if(this.stack.length<120)for(let l=0;i.length<8&&l<n.length;l+=2){let o=n[l+1];i.some((c,f)=>f&1&&c==o)||i.push(n[l],o)}n=i}let r=[];for(let i=0;i<n.length&&r.length<4;i+=2){let l=n[i+1];if(l==this.state)continue;let o=this.split();o.pushState(l,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let r=n>>19,i=n&65535,l=this.stack.length-r*3;if(l<0||e.getGoto(this.stack[l],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,l)=>{if(!n.includes(i))return n.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let c=(o>>19)-l;if(c>1){let f=o&65535,m=this.stack.length-c*3;if(m>=0&&e.getGoto(this.stack[m],f,!1)>=0)return c<<19|65536|f}}else{let c=r(o,l+1);if(c!=null)return c}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new _y(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class _y{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class gH{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class Af{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Af(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Af(this.stack,this.pos,this.index)}}function Pc(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r<t.length;){let l=0;for(;;){let o=t.charCodeAt(r++),c=!1;if(o==126){l=65535;break}o>=92&&o--,o>=34&&o--;let f=o-32;if(f>=46&&(f-=46,c=!0),l+=f,c)break;l*=46}n?n[i++]=l:n=new e(l)}return n}class F1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const Dy=new F1;class OH{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=Dy,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,l=this.pos+e;for(;l<r.from;){if(!i)return null;let o=this.ranges[--i];l-=r.from-o.to,r=o}for(;n<0?l>r.to:l>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];l+=o.from-r.to,r=o}return l}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(n);else{let l=this.resolveOffset(e,1);if(l==null)return-1;if(r=l,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,c=this.range;for(;c.to<=r;)c=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=Dy,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class no{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;Kw(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}no.prototype.contextual=no.prototype.fallback=no.prototype.extend=!1;class kf{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?Pc(e):e}token(e,n){let r=e.pos,i=0;for(;;){let l=e.next<0,o=e.resolveOffset(1,1);if(Kw(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(l||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}kf.prototype.contextual=no.prototype.fallback=no.prototype.extend=!1;class hr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function Kw(t,e,n,r,i,l){let o=0,c=1<<r,{dialect:f}=n.p.parser;e:for(;(c&t[o])!=0;){let m=t[o+1];for(let b=o+3;b<m;b+=2)if((t[b+1]&c)>0){let S=t[b];if(f.allows(S)&&(e.token.value==-1||e.token.value==S||xH(S,e.token.value,i,l))){e.acceptToken(S);break}}let p=e.next,O=0,y=t[o+2];if(e.next<0&&y>O&&t[m+y*3-3]==65535){o=t[m+y*3-1];continue e}for(;O<y;){let b=O+y>>1,S=m+b+(b<<1),w=t[S],A=t[S+1]||65536;if(p<w)y=b;else if(p>=A)O=b+1;else{o=t[S+2],e.advance();continue e}}break}}function Hy(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function xH(t,e,n,r){let i=Hy(n,r,e);return i<0||Hy(n,r,t)<i}const sr=typeof process<"u"&&Ly&&/\bparse\b/.test(Ly.LOG);let dm=null;function Xy(t,e,n){let r=t.cursor(dt.IncludeAnonymous);for(r.moveTo(e);;)if(!(n<0?r.childBefore(e):r.childAfter(e)))for(;;){if((n<0?r.to<e:r.from>e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class yH{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?Xy(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?Xy(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let r=this.trees[n],i=this.index[n];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let l=r.children[i],o=this.start[n]+r.positions[i];if(o>e)return this.nextStart=o,null;if(l instanceof $t){if(o==e){if(o<this.safeFrom)return null;let c=o+l.length;if(c<=this.safeTo){let f=l.prop(Xe.lookAhead);if(!f||c+f<this.fragment.to)return l}}this.index[n]++,o+l.length>=Math.max(this.safeFrom,e)&&(this.trees.push(l),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+l.length}}}class bH{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new F1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:l}=i,o=i.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,f=0;for(let m=0;m<l.length;m++){if((1<<m&o)==0)continue;let p=l[m],O=this.tokens[m];if(!(r&&!p.fallback)&&((p.contextual||O.start!=e.pos||O.mask!=o||O.context!=c)&&(this.updateCachedToken(O,p,e),O.mask=o,O.context=c),O.lookAhead>O.end+25&&(f=Math.max(O.lookAhead,f)),O.value!=0)){let y=n;if(O.extended>-1&&(n=this.addActions(e,O.extended,O.end,n)),n=this.addActions(e,O.value,O.end,n),!p.extend&&(r=O,n>y))break}}for(;this.actions.length>n;)this.actions.pop();return f&&e.setLookAhead(f),!r&&e.pos==this.stream.end&&(r=new F1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new F1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:l}=r.p;for(let o=0;o<l.specialized.length;o++)if(l.specialized[o]==e.value){let c=l.specializers[o](this.stream.read(e.start,e.end),r);if(c>=0&&r.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let l=0;l<i;l+=3)if(this.actions[l]==e)return i;return this.actions[i++]=e,this.actions[i++]=n,this.actions[i++]=r,i}addActions(e,n,r,i){let{state:l}=e,{parser:o}=e.p,{data:c}=o;for(let f=0;f<2;f++)for(let m=o.stateSlot(l,f?2:1);;m+=3){if(c[m]==65535)if(c[m+1]==1)m=Ii(c,m+2);else{i==0&&c[m+1]==2&&(i=this.putAction(Ii(c,m+2),n,r,i));break}c[m]==n&&(i=this.putAction(Ii(c,m+1),n,r,i))}return i}}class vH{constructor(e,n,r,i){this.parser=e,this.input=n,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new OH(n,i),this.tokens=new bH(e,this.stream),this.topTerm=e.top[1];let{from:l}=i[0];this.stacks=[wf.start(this,e.top[0],l)],this.fragments=r.length&&this.stream.end-l>e.bufferLength*4?new yH(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,l;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let c=e[o];for(;;){if(this.tokens.mainToken=null,c.pos>n)r.push(c);else{if(this.advanceStack(c,r,e))continue;{i||(i=[],l=[]),i.push(c);let f=this.tokens.getMainToken(c);l.push(f.value,f.end)}}break}}if(!r.length){let o=i&&wH(i);if(o)return sr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw sr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,l,r);if(o)return sr&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((c,f)=>f.score-c.score);r.length>o;)r.pop();r.some(c=>c.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let c=r[o];for(let f=o+1;f<r.length;f++){let m=r[f];if(c.sameState(m)||c.buffer.length>500&&m.buffer.length>500)if((c.score-m.score||c.buffer.length-m.buffer.length)>0)r.splice(f--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,c)=>c.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,r){let i=e.pos,{parser:l}=this,o=sr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let m=e.curContext&&e.curContext.tracker.strict,p=m?e.curContext.hash:0;for(let O=this.fragments.nodeAt(i);O;){let y=this.parser.nodeSet.types[O.type.id]==O.type?l.getGoto(e.state,O.type.id):-1;if(y>-1&&O.length&&(!m||(O.prop(Xe.contextHash)||0)==p))return e.useNode(O,y),sr&&console.log(o+this.stackID(e)+` (via reuse of ${l.getName(O.type.id)})`),!0;if(!(O instanceof $t)||O.children.length==0||O.positions[0]>0)break;let b=O.children[0];if(b instanceof $t&&O.positions[0]==0)O=b;else break}}let c=l.stateSlot(e.state,4);if(c>0)return e.reduce(c),sr&&console.log(o+this.stackID(e)+` (via always-reduce ${l.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let f=this.tokens.getActions(e);for(let m=0;m<f.length;){let p=f[m++],O=f[m++],y=f[m++],b=m==f.length||!r,S=b?e:e.split(),w=this.tokens.mainToken;if(S.apply(p,O,w?w.start:S.pos,y),sr&&console.log(o+this.stackID(S)+` (via ${(p&65536)==0?"shift":`reduce of ${l.getName(p&65535)}`} for ${l.getName(O)} @ ${i}${S==e?"":", split"})`),b)return!0;S.pos>i?n.push(S):r.push(S)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return zy(e,n),!0}}runRecovery(e,n,r){let i=null,l=!1;for(let o=0;o<e.length;o++){let c=e[o],f=n[o<<1],m=n[(o<<1)+1],p=sr?this.stackID(c)+" -> ":"";if(c.deadEnd&&(l||(l=!0,c.restart(),sr&&console.log(p+this.stackID(c)+" (restarted)"),this.advanceFully(c,r))))continue;let O=c.split(),y=p;for(let b=0;b<10&&O.forceReduce()&&(sr&&console.log(y+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,r));b++)sr&&(y=this.stackID(O)+" -> ");for(let b of c.recoverByInsert(f))sr&&console.log(p+this.stackID(b)+" (via recover-insert)"),this.advanceFully(b,r);this.stream.end>c.pos?(m==c.pos&&(m++,f=0),c.recoverByDelete(f,m),sr&&console.log(p+this.stackID(c)+` (via recover-delete ${this.parser.getName(f)})`),zy(c,r)):(!i||i.score<O.score)&&(i=O)}return i}stackToTree(e){return e.close(),$t.build({buffer:Af.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(dm||(dm=new WeakMap)).get(e);return n||dm.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function zy(t,e){for(let n=0;n<e.length;n++){let r=e[n];if(r.pos==t.pos&&r.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class SH{constructor(e,n,r){this.source=e,this.flags=n,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const hm=t=>t;class Jw{constructor(e){this.start=e.start,this.shift=e.shift||hm,this.reduce=e.reduce||hm,this.reuse=e.reuse||hm,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class go extends Y9{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<e.repeatNodeCount;c++)n.push("");let r=Object.keys(e.topRules).map(c=>e.topRules[c][1]),i=[];for(let c=0;c<n.length;c++)i.push([]);function l(c,f,m){i[c].push([f,f.deserialize(String(m))])}if(e.nodeProps)for(let c of e.nodeProps){let f=c[0];typeof f=="string"&&(f=Xe[f]);for(let m=1;m<c.length;){let p=c[m++];if(p>=0)l(p,f,c[m++]);else{let O=c[m+-p];for(let y=-p;y>0;y--)l(c[m++],f,O);m++}}}this.nodeSet=new r8(n.map((c,f)=>jn.define({name:f>=this.minRepeatTerm?void 0:c,id:f,props:i[f],top:r.indexOf(f)>-1,error:f==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(f)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=D9;let o=Pc(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(Fy),this.states=Pc(e.states,Uint32Array),this.data=Pc(e.stateData),this.goto=Pc(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new no(o,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new vH(this,e,n,r);for(let l of this.wrappers)i=l(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let l=i[n+1];;){let o=i[l++],c=o&1,f=i[l++];if(c&&r)return f;for(let m=l+(o>>1);l<m;l++)if(i[l]==e)return f;if(c)return-1}}hasAction(e,n){let r=this.data;for(let i=0;i<2;i++)for(let l=this.stateSlot(e,i?2:1),o;;l+=3){if((o=r[l])==65535)if(r[l+1]==1)o=r[l=Ii(r,l+2)];else{if(r[l+1]==2)return Ii(r,l+2);break}if(o==n||o==0)return Ii(r,l+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let l=this.stateSlot(e,1);i==null;l+=3){if(this.data[l]==65535)if(this.data[l+1]==1)l=Ii(this.data,l+2);else break;i=n(Ii(this.data,l+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Ii(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((l,o)=>o&1&&l==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(go.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(l=>l.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let l=e.specializers.find(c=>c.from==r.external);if(!l)return r;let o=Object.assign(Object.assign({},r),{external:l.to});return n.specializers[i]=Fy(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let l of e.split(" ")){let o=n.indexOf(l);o>=0&&(r[o]=!0)}let i=null;for(let l=0;l<n.length;l++)if(!r[l])for(let o=this.dialects[n[l]],c;(c=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[c]=1;return new SH(e,r,i)}static deserialize(e){return new go(e)}}function Ii(t,e){return t[e]|t[e+1]<<16}function wH(t){let e=null;for(let n of t){let r=n.p.stoppedAt;(n.pos==n.p.stream.end||r!=null&&n.pos>r)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function Fy(t){if(t.external){let e=t.extend?1:0;return(n,r)=>t.external(n,r)<<1|e}return t.get}const AH=55,kH=1,MH=56,TH=2,CH=57,EH=3,Yy=4,$H=5,w8=6,eA=7,tA=8,nA=9,rA=10,QH=11,PH=12,ZH=13,mm=58,jH=14,RH=15,By=59,iA=21,NH=23,aA=24,VH=25,ag=27,lA=28,LH=29,_H=32,DH=35,HH=37,XH=38,zH=0,FH=1,YH={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},BH={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},qy={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function qH(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let Iy=null,Uy=null,Wy=0;function lg(t,e){let n=t.pos+e;if(Wy==n&&Uy==t)return Iy;let r=t.peek(e),i="";for(;qH(r);)i+=String.fromCharCode(r),r=t.peek(++e);return Uy=t,Wy=n,Iy=i?i.toLowerCase():r==IH||r==UH?void 0:null}const sA=60,Mf=62,A8=47,IH=63,UH=33,WH=45;function Gy(t,e){this.name=t,this.parent=e}const GH=[w8,rA,eA,tA,nA],KH=new Jw({start:null,shift(t,e,n,r){return GH.indexOf(e)>-1?new Gy(lg(r,1)||"",t):t},reduce(t,e){return e==iA&&t?t.parent:t},reuse(t,e,n,r){let i=e.type.id;return i==w8||i==HH?new Gy(lg(r,1)||"",t):t},strict:!1}),JH=new hr((t,e)=>{if(t.next!=sA){t.next<0&&e.context&&t.acceptToken(mm);return}t.advance();let n=t.next==A8;n&&t.advance();let r=lg(t,0);if(r===void 0)return;if(!r)return t.acceptToken(n?RH:jH);let i=e.context?e.context.name:null;if(n){if(r==i)return t.acceptToken(QH);if(i&&BH[i])return t.acceptToken(mm,-2);if(e.dialectEnabled(zH))return t.acceptToken(PH);for(let l=e.context;l;l=l.parent)if(l.name==r)return;t.acceptToken(ZH)}else{if(r=="script")return t.acceptToken(eA);if(r=="style")return t.acceptToken(tA);if(r=="textarea")return t.acceptToken(nA);if(YH.hasOwnProperty(r))return t.acceptToken(rA);i&&qy[i]&&qy[i][r]?t.acceptToken(mm,-1):t.acceptToken(w8)}},{contextual:!0}),eX=new hr(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(By);break}if(t.next==WH)e++;else if(t.next==Mf&&e>=2){n>=3&&t.acceptToken(By,-2);break}else e=0;t.advance()}});function tX(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const nX=new hr((t,e)=>{if(t.next==A8&&t.peek(1)==Mf){let n=e.dialectEnabled(FH)||tX(e.context);t.acceptToken(n?$H:Yy,2)}else t.next==Mf&&t.acceptToken(Yy,1)});function k8(t,e,n){let r=2+t.length;return new hr(i=>{for(let l=0,o=0,c=0;;c++){if(i.next<0){c&&i.acceptToken(e);break}if(l==0&&i.next==sA||l==1&&i.next==A8||l>=2&&l<r&&i.next==t.charCodeAt(l-2))l++,o++;else if(l==r&&i.next==Mf){c>o?i.acceptToken(e,-o):i.acceptToken(n,-(o-2));break}else if((i.next==10||i.next==13)&&c){i.acceptToken(e,1);break}else l=o=0;i.advance()}})}const rX=k8("script",AH,kH),iX=k8("style",MH,TH),aX=k8("textarea",CH,EH),lX=qf({"Text RawText IncompleteTag IncompleteCloseTag":K.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":K.angleBracket,TagName:K.tagName,"MismatchedCloseTag/TagName":[K.tagName,K.invalid],AttributeName:K.attributeName,"AttributeValue UnquotedAttributeValue":K.attributeValue,Is:K.definitionOperator,"EntityReference CharacterReference":K.character,Comment:K.blockComment,ProcessingInst:K.processingInstruction,DoctypeDecl:K.documentMeta}),sX=go.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tO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y^O|_O!eZO~OgaO~OgbO~OgcO~OgdO~OgeO~O!XfOPmP![mP~O!YiOQpP![pP~O!ZlORsP![sP~OUSOVPOWQOXROYTOZqO[]O][O^^O_^Oa^Ob^Oc^Od^Oy^O!eZO~O![rO~P#gO!]sO!fuO~OgvO~OgwO~OS|OT}OiyO~OS!POT}OiyO~OS!ROT}OiyO~OS!TOT}OiyO~OS}OT}OiyO~O!XfOPmX![mX~OP!WO![!XO~O!YiOQpX![pX~OQ!ZO![!XO~O!ZlORsX![sX~OR!]O![!XO~O![!XO~P#gOg!_O~O!]sO!f!aO~OS!bO~OS!cO~Oj!dOShXThXihX~OS!fOT!gOiyO~OS!hOT!gOiyO~OS!iOT!gOiyO~OS!jOT!gOiyO~OS!gOT!gOiyO~Og!kO~Og!lO~Og!mO~OS!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:KH,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[lX],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bXaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UVaP!dpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pTaPOv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!dpOv(Vx;'S(V;'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!5ksv!4tvw!6Vwx!8]x!a!4t!a!b!:]!b;'S!4t;'S;=`!;r<%lO!4tq!5pV!dpOv!5kvx!6Vx!a!5k!a!b!7W!b;'S!5k;'S;=`!8V<%lO!5kP!6YTO!a!6V!a!b!6i!b;'S!6V;'S;=`!7Q<%lO!6VP!6lTO!`!6V!`!a!6{!a;'S!6V;'S;=`!7Q<%lO!6VP!7QOyPP!7TP;=`<%l!6Vq!7]V!dpOv!5kvx!6Vx!`!5k!`!a!7r!a;'S!5k;'S;=`!8V<%lO!5kq!7yS!dpyPOv(Vx;'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[rX,iX,aX,nX,JH,eX,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function oA(t,e){let n=Object.create(null);for(let r of t.getChildren(aA)){let i=r.getChild(VH),l=r.getChild(ag)||r.getChild(lA);i&&(n[e.read(i.from,i.to)]=l?l.type.id==ag?e.read(l.from+1,l.to-1):e.read(l.from,l.to):"")}return n}function Ky(t,e){let n=t.getChild(NH);return n?e.read(n.from,n.to):" "}function pm(t,e,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=oA(t.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function cA(t=[],e=[]){let n=[],r=[],i=[],l=[];for(let c of t)(c.tag=="script"?n:c.tag=="style"?r:c.tag=="textarea"?i:l).push(c);let o=e.length?Object.create(null):null;for(let c of e)(o[c.name]||(o[c.name]=[])).push(c);return zV((c,f)=>{let m=c.type.id;if(m==LH)return pm(c,f,n);if(m==_H)return pm(c,f,r);if(m==DH)return pm(c,f,i);if(m==iA&&l.length){let p=c.node,O=p.firstChild,y=O&&Ky(O,f),b;if(y){for(let S of l)if(S.tag==y&&(!S.attrs||S.attrs(b||(b=oA(O,f))))){let w=p.lastChild,A=w.type.id==XH?w.from:p.to;if(A>O.to)return{parser:S.parser,overlay:[{from:O.to,to:A}]}}}}if(o&&m==aA){let p=c.node,O;if(O=p.firstChild){let y=o[f.read(O.from,O.to)];if(y)for(let b of y){if(b.tagName&&b.tagName!=Ky(p.parent,f))continue;let S=p.lastChild;if(S.type.id==ag){let w=S.from+1,A=S.lastChild,k=S.to-(A&&A.isError?0:1);if(k>w)return{parser:b.parser,overlay:[{from:w,to:k}],bracketed:!0}}else if(S.type.id==lA)return{parser:b.parser,overlay:[{from:S.from,to:S.to}]}}}}return null})}const oX=135,Jy=1,cX=136,uX=137,uA=2,fX=138,dX=3,hX=4,fA=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],mX=58,pX=40,dA=95,gX=91,Y1=45,OX=46,xX=35,yX=37,bX=38,vX=92,SX=10,wX=42;function gu(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function M8(t){return t>=48&&t<=57}function eb(t){return M8(t)||t>=97&&t<=102||t>=65&&t<=70}const hA=(t,e,n)=>(r,i)=>{for(let l=!1,o=0,c=0;;c++){let{next:f}=r;if(gu(f)||f==Y1||f==dA||l&&M8(f))!l&&(f!=Y1||c>0)&&(l=!0),o===c&&f==Y1&&o++,r.advance();else if(f==vX&&r.peek(1)!=SX){if(r.advance(),eb(r.next)){do r.advance();while(eb(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();l=!0}else{l&&r.acceptToken(o==2&&i.canShift(uA)?e:f==pX?n:t);break}}},AX=new hr(hA(cX,uA,uX),{contextual:!0}),kX=new hr(hA(fX,dX,hX),{contextual:!0}),MX=new hr(t=>{if(fA.includes(t.peek(-1))){let{next:e}=t;(gu(e)||e==dA||e==xX||e==OX||e==wX||e==gX||e==mX&&gu(t.peek(1))||e==Y1||e==bX)&&t.acceptToken(oX)}}),TX=new hr(t=>{if(!fA.includes(t.peek(-1))){let{next:e}=t;if(e==yX&&(t.advance(),t.acceptToken(Jy)),gu(e)){do t.advance();while(gu(t.next)||M8(t.next));t.acceptToken(Jy)}}}),CX=qf({"AtKeyword import charset namespace keyframes media supports font-feature-values":K.definitionKeyword,"from to selector scope MatchFlag":K.keyword,NamespaceName:K.namespace,KeyframeName:K.labelName,KeyframeRangeName:K.operatorKeyword,TagName:K.tagName,ClassName:K.className,PseudoClassName:K.constant(K.className),IdName:K.labelName,"FeatureName PropertyName":K.propertyName,AttributeName:K.attributeName,NumberLiteral:K.number,KeywordQuery:K.keyword,UnaryQueryOp:K.operatorKeyword,"CallTag ValueName FontName":K.atom,VariableName:K.variableName,Callee:K.operatorKeyword,Unit:K.unit,"UniversalSelector NestingSelector":K.definitionOperator,"MatchOp CompareOp":K.compareOperator,"ChildOp SiblingOp, LogicOp":K.logicOperator,BinOp:K.arithmeticOperator,Important:K.modifier,Comment:K.blockComment,ColorLiteral:K.color,"ParenthesizedContent StringLiteral":K.string,":":K.punctuation,"PseudoOp #":K.derefOperator,"; , |":K.separator,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace}),EX={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},$X={__proto__:null,or:104,and:104,not:112,only:112,layer:186},QX={__proto__:null,selector:118,layer:182},PX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RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[CX],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zvw3Rwx3dxy5Ryz5dz{5i{|6S|}:u}!O;W!O!P;u!P!Q<^!Q![=V![!]>Q!]!^>|!^!_?_!_!`@Z!`!a@n!a!b%Z!b!cAo!c!k%Z!k!lC|!l!u%Z!u!vC|!v!}%Z!}#OD_#O#P%Z#P#QDp#Q#R2X#R#]%Z#]#^ER#^#g%Z#g#hC|#h#o%Z#o#pIf#p#qIw#q#rJ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S%j;'S;=`%{<%lO%jbFoU!e`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!e`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!e`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[MX,TX,AX,kX,1,2,3,4,new kf("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:t=>EX[t]||-1},{term:138,get:t=>$X[t]||-1},{term:4,get:t=>QX[t]||-1},{term:28,get:t=>PX[t]||-1},{term:136,get:t=>ZX[t]||-1}],tokenPrec:2256});let gm=null;function Om(){if(!gm&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let r in t)r!="cssText"&&r!="cssFloat"&&typeof t[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),n.has(r)||(e.push(r),n.add(r)));gm=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return gm||[]}const tb=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),nb=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),RX=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),NX=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),qi=/^(\w[\w-]*|-\w[\w-]*|)$/,VX=/^-(-[\w-]*)?$/;function LX(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let r=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const rb=new F9,_X=["Declaration"];function DX(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function mA(t,e,n){if(e.to-e.from>4096){let r=rb.get(e);if(r)return r;let i=[],l=new Set,o=e.cursor(dt.IncludeAnonymous);if(o.firstChild())do for(let c of mA(t,o.node,n))l.has(c.label)||(l.add(c.label),i.push(c));while(o.nextSibling());return rb.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(l=>{var o;if(n(l)&&l.matchContext(_X)&&((o=l.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let c=t.sliceString(l.from,l.to);i.has(c)||(i.add(c),r.push({label:c,type:"variable"}))}}),r}}const HX=t=>e=>{let{state:n,pos:r}=e,i=zt(n).resolveInner(r,-1),l=i.type.isError&&i.from==i.to-1&&n.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(l||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:Om(),validFor:qi};if(i.name=="ValueName")return{from:i.from,options:nb,validFor:qi};if(i.name=="PseudoClassName")return{from:i.from,options:tb,validFor:qi};if(t(i)||(e.explicit||l)&&LX(i,n.doc))return{from:t(i)||l?i.from:r,options:mA(n.doc,DX(i),t),validFor:VX};if(i.name=="TagName"){for(let{parent:f}=i;f;f=f.parent)if(f.name=="Block")return{from:i.from,options:Om(),validFor:qi};return{from:i.from,options:RX,validFor:qi}}if(i.name=="AtKeyword")return{from:i.from,options:NX,validFor:qi};if(!e.explicit)return null;let o=i.resolve(r),c=o.childBefore(r);return c&&c.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:tb,validFor:qi}:c&&c.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:nb,validFor:qi}:o.name=="Block"||o.name=="Styles"?{from:r,options:Om(),validFor:qi}:null},XX=HX(t=>t.name=="VariableName"),Tf=ho.define({name:"css",parser:jX.configure({props:[Wf.add({Declaration:X1()}),Gf.add({"Block KeyframeList":K9})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function pA(){return new o8(Tf,Tf.data.of({autocomplete:XX}))}const zX=316,FX=317,ib=1,YX=2,BX=3,qX=4,IX=318,UX=320,WX=321,GX=5,KX=6,JX=0,sg=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],gA=125,ez=59,og=47,tz=42,nz=43,rz=45,iz=60,az=44,lz=63,sz=46,oz=91,cz=new Jw({start:!1,shift(t,e){return e==GX||e==KX||e==UX?t:e==WX},strict:!1}),uz=new hr((t,e)=>{let{next:n}=t;(n==gA||n==-1||e.context)&&t.acceptToken(IX)},{contextual:!0,fallback:!0}),fz=new hr((t,e)=>{let{next:n}=t,r;sg.indexOf(n)>-1||n==og&&((r=t.peek(1))==og||r==tz)||n!=gA&&n!=ez&&n!=-1&&!e.context&&t.acceptToken(zX)},{contextual:!0}),dz=new hr((t,e)=>{t.next==oz&&!e.context&&t.acceptToken(FX)},{contextual:!0}),hz=new hr((t,e)=>{let{next:n}=t;if(n==nz||n==rz){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(ib);t.acceptToken(r?ib:YX)}}else n==lz&&t.peek(1)==sz&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(BX))},{contextual:!0});function xm(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const mz=new hr((t,e)=>{if(t.next!=iz||!e.dialectEnabled(JX)||(t.advance(),t.next==og))return;let n=0;for(;sg.indexOf(t.next)>-1;)t.advance(),n++;if(xm(t.next,!0)){for(t.advance(),n++;xm(t.next,!1);)t.advance(),n++;for(;sg.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==az)return;for(let r=0;;r++){if(r==7){if(!xm(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(qX,-n)}),pz=qf({"get set async static":K.modifier,"for while do if else switch try catch finally return throw break continue default case defer":K.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":K.operatorKeyword,"let var const using function class extends":K.definitionKeyword,"import export from":K.moduleKeyword,"with debugger new":K.keyword,TemplateString:K.special(K.string),super:K.atom,BooleanLiteral:K.bool,this:K.self,null:K.null,Star:K.modifier,VariableName:K.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":K.function(K.variableName),VariableDefinition:K.definition(K.variableName),Label:K.labelName,PropertyName:K.propertyName,PrivatePropertyName:K.special(K.propertyName),"CallExpression/MemberExpression/PropertyName":K.function(K.propertyName),"FunctionDeclaration/VariableDefinition":K.function(K.definition(K.variableName)),"ClassDeclaration/VariableDefinition":K.definition(K.className),"NewExpression/VariableName":K.className,PropertyDefinition:K.definition(K.propertyName),PrivatePropertyDefinition:K.definition(K.special(K.propertyName)),UpdateOp:K.updateOperator,"LineComment Hashbang":K.lineComment,BlockComment:K.blockComment,Number:K.number,String:K.string,Escape:K.escape,ArithOp:K.arithmeticOperator,LogicOp:K.logicOperator,BitOp:K.bitwiseOperator,CompareOp:K.compareOperator,RegExp:K.regexp,Equals:K.definitionOperator,Arrow:K.function(K.punctuation),": Spread":K.punctuation,"( )":K.paren,"[ ]":K.squareBracket,"{ }":K.brace,"InterpolationStart InterpolationEnd":K.special(K.brace),".":K.derefOperator,", ;":K.separator,"@":K.meta,TypeName:K.typeName,TypeDefinition:K.definition(K.typeName),"type enum interface implements namespace module declare":K.definitionKeyword,"abstract global Privacy readonly override":K.modifier,"is keyof unique infer asserts":K.operatorKeyword,JSXAttributeValue:K.attributeValue,JSXText:K.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":K.angleBracket,"JSXIdentifier JSXNameSpacedName":K.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":K.attributeName,"JSXBuiltin/JSXIdentifier":K.standard(K.tagName)}),gz={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},Oz={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},xz={__proto__:null,"<":193},yz=go.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#I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R)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:cz,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[pz],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(WpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#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~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new kf("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>gz[t]||-1},{term:343,get:t=>Oz[t]||-1},{term:95,get:t=>xz[t]||-1}],tokenPrec:15201}),OA=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try {
|
|
107
|
-
\${}
|
|
108
|
-
} catch (\${error}) {
|
|
109
|
-
\${}
|
|
110
|
-
}`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) {
|
|
111
|
-
\${}
|
|
112
|
-
} else {
|
|
113
|
-
\${}
|
|
114
|
-
}`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} {
|
|
115
|
-
constructor(\${params}) {
|
|
116
|
-
\${}
|
|
117
|
-
}
|
|
118
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],bz=OA.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),ab=new F9,xA=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function kc(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const vz=["FunctionDeclaration"],Sz={FunctionDeclaration:kc("function"),ClassDeclaration:kc("class"),ClassExpression:()=>!0,EnumDeclaration:kc("constant"),TypeAliasDeclaration:kc("type"),NamespaceDeclaration:kc("namespace"),VariableDefinition(t,e){t.matchContext(vz)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function yA(t,e){let n=ab.get(e);if(n)return n;let r=[],i=!0;function l(o,c){let f=t.sliceString(o.from,o.to);r.push({label:f,type:c})}return e.cursor(dt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let c=Sz[o.name];if(c&&c(o,l)||xA.has(o.name))return!1}else if(o.to-o.from>8192){for(let c of yA(t,o.node))r.push(c);return!1}}),ab.set(e,r),r}const lb=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,bA=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function wz(t){let e=zt(t.state).resolveInner(t.pos,-1);if(bA.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&lb.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)xA.has(i.name)&&(r=r.concat(yA(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:lb}}const bi=ho.define({name:"javascript",parser:yz.configure({props:[Wf.add({IfStatement:X1({except:/^\s*({|else\b)/}),TryStatement:X1({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:mL,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:hL({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":X1({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Gf.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":K9,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let n=t.lastChild;return{from:e.to,to:n.type.isError?t.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let n=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,r=t.lastChild;return!n||n.type.isError?null:{from:n.to,to:r.type.isError?t.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),vA={test:t=>/^JSX/.test(t.name),facet:I9({commentTokens:{block:{open:"{/*",close:"*/}"}}})},SA=bi.configure({dialect:"ts"},"typescript"),wA=bi.configure({dialect:"jsx",props:[s8.add(t=>t.isTop?[vA]:void 0)]}),AA=bi.configure({dialect:"jsx ts",props:[s8.add(t=>t.isTop?[vA]:void 0)]},"typescript");let kA=t=>({label:t,type:"keyword"});const MA="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(kA),Az=MA.concat(["declare","implements","private","protected","public"].map(kA));function TA(t={}){let e=t.jsx?t.typescript?AA:wA:t.typescript?SA:bi,n=t.typescript?bz.concat(Az):OA.concat(MA);return new o8(e,[bi.data.of({autocomplete:aD(bA,iD(n))}),bi.data.of({autocomplete:wz}),t.jsx?Tz:[]])}function kz(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function sb(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const Mz=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Tz=ke.inputHandler.of((t,e,n,r,i)=>{if((Mz?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!bi.isActiveAt(t.state,e,-1))return!1;let l=i(),{state:o}=l,c=o.changeByRange(f=>{var m;let{head:p}=f,O=zt(o).resolveInner(p-1,-1),y;if(O.name=="JSXStartTag"&&(O=O.parent),!(o.doc.sliceString(p-1,p)!=r||O.name=="JSXAttributeValue"&&O.to>p)){if(r==">"&&O.name=="JSXFragmentTag")return{range:f,changes:{from:p,insert:"</>"}};if(r=="/"&&O.name=="JSXStartCloseTag"){let b=O.parent,S=b.parent;if(S&&b.from==p-2&&((y=sb(o.doc,S.firstChild,p))||((m=S.firstChild)===null||m===void 0?void 0:m.name)=="JSXFragmentTag")){let w=`${y}>`;return{range:he.cursor(p+w.length,-1),changes:{from:p,insert:w}}}}else if(r==">"){let b=kz(O);if(b&&b.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(p,p+2))&&(y=sb(o.doc,b,p)))return{range:f,changes:{from:p,insert:`</${y}>`}}}}return{range:f}});return c.changes.empty?!1:(t.dispatch([l,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Mc=["_blank","_self","_top","_parent"],ym=["ascii","utf-8","utf-16","latin1","latin1"],bm=["get","post","put","delete"],vm=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],or=["true","false"],Ce={},Cz={a:{attrs:{href:null,ping:null,type:null,media:null,target:Mc,hreflang:null}},abbr:Ce,address:Ce,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Ce,aside:Ce,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Ce,base:{attrs:{href:null,target:Mc}},bdi:Ce,bdo:Ce,blockquote:{attrs:{cite:null}},body:Ce,br:Ce,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:vm,formmethod:bm,formnovalidate:["novalidate"],formtarget:Mc,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Ce,center:Ce,cite:Ce,code:Ce,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Ce,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Ce,div:Ce,dl:Ce,dt:Ce,em:Ce,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Ce,figure:Ce,footer:Ce,form:{attrs:{action:null,name:null,"accept-charset":ym,autocomplete:["on","off"],enctype:vm,method:bm,novalidate:["novalidate"],target:Mc}},h1:Ce,h2:Ce,h3:Ce,h4:Ce,h5:Ce,h6:Ce,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Ce,hgroup:Ce,hr:Ce,html:{attrs:{manifest:null}},i:Ce,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:vm,formmethod:bm,formnovalidate:["novalidate"],formtarget:Mc,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Ce,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Ce,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Ce,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:ym,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Ce,noscript:Ce,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Ce,param:{attrs:{name:null,value:null}},pre:Ce,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Ce,rt:Ce,ruby:Ce,samp:Ce,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:ym}},section:Ce,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Ce,source:{attrs:{src:null,type:null,media:null}},span:Ce,strong:Ce,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Ce,summary:Ce,sup:Ce,table:Ce,tbody:Ce,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Ce,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Ce,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Ce,time:{attrs:{datetime:null}},title:Ce,tr:Ce,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Ce,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Ce},CA={accesskey:null,class:null,contenteditable:or,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:or,autocorrect:or,autocapitalize:or,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":or,"aria-autocomplete":["inline","list","both","none"],"aria-busy":or,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":or,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":or,"aria-hidden":or,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":or,"aria-multiselectable":or,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":or,"aria-relevant":null,"aria-required":or,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},EA="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of EA)CA[t]=null;class Cf{constructor(e,n){this.tags={...Cz,...e},this.globalAttrs={...CA,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Cf.default=new Cf;function Oo(t,e,n=t.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?t.sliceString(i.from,Math.min(i.to,n)):""}function xo(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function $A(t,e,n){let r=n.tags[Oo(t,xo(e))];return(r==null?void 0:r.children)||n.allTags}function T8(t,e){let n=[];for(let r=xo(e);r&&!r.type.isTop;r=xo(r.parent)){let i=Oo(t,r);if(i&&r.lastChild.name=="CloseTag")break;i&&n.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&n.push(i)}return n}const QA=/^[:\-\.\w\u00b7-\uffff]*$/;function ob(t,e,n,r,i){let l=/\s*>/.test(t.sliceDoc(i,i+5))?"":">",o=xo(n,n.name=="StartTag"||n.name=="TagName");return{from:r,to:i,options:$A(t.doc,o,e).map(c=>({label:c,type:"type"})).concat(T8(t.doc,n).map((c,f)=>({label:"/"+c,apply:"/"+c+l,type:"type",boost:99-f}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function cb(t,e,n,r){let i=/\s*>/.test(t.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:T8(t.doc,e).map((l,o)=>({label:l,apply:l+i,type:"type",boost:99-o})),validFor:QA}}function Ez(t,e,n,r){let i=[],l=0;for(let o of $A(t.doc,n,e))i.push({label:"<"+o,type:"type"});for(let o of T8(t.doc,n))i.push({label:"</"+o+">",type:"type",boost:99-l++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function $z(t,e,n,r,i){let l=xo(n),o=l?e.tags[Oo(t.doc,l)]:null,c=o&&o.attrs?Object.keys(o.attrs):[],f=o&&o.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:f.map(m=>({label:m,type:"property"})),validFor:QA}}function Qz(t,e,n,r,i){var l;let o=(l=n.parent)===null||l===void 0?void 0:l.getChild("AttributeName"),c=[],f;if(o){let m=t.sliceDoc(o.from,o.to),p=e.globalAttrs[m];if(!p){let O=xo(n),y=O?e.tags[Oo(t.doc,O)]:null;p=(y==null?void 0:y.attrs)&&y.attrs[m]}if(p){let O=t.sliceDoc(r,i).toLowerCase(),y='"',b='"';/^['"]/.test(O)?(f=O[0]=='"'?/^[^"]*$/:/^[^']*$/,y="",b=t.sliceDoc(i,i+1)==O[0]?"":O[0],O=O.slice(1),r++):f=/^[^\s<>='"]*$/;for(let S of p)c.push({label:S,apply:y+S+b,type:"constant"})}}return{from:r,to:i,options:c,validFor:f}}function Pz(t,e){let{state:n,pos:r}=e,i=zt(n).resolveInner(r,-1),l=i.resolve(r);for(let o=r,c;l==i&&(c=i.childBefore(o));){let f=c.lastChild;if(!f||!f.type.isError||f.from<f.to)break;l=i=c,o=f.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?cb(n,i,i.from,r):ob(n,t,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?ob(n,t,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?cb(n,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?$z(n,t,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?Qz(n,t,i,i.name=="Is"?r:i.from,r):e.explicit&&(l.name=="Element"||l.name=="Text"||l.name=="Document")?Ez(n,t,i,r):null}function Zz(t){let{extraTags:e,extraGlobalAttributes:n}=t,r=n||e?new Cf(e,n):Cf.default;return i=>Pz(r,i)}const jz=bi.parser.configure({top:"SingleExpression"}),PA=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:SA.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:wA.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:AA.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:jz},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:bi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Tf.parser}],ZA=[{name:"style",parser:Tf.parser.configure({top:"Styles"})}].concat(EA.map(t=>({name:t,parser:bi.parser}))),jA=ho.define({name:"html",parser:sX.configure({props:[Wf.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let r=t.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Gf.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),lw.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),B1=jA.configure({wrap:cA(PA,ZA)});function ub(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=cA((t.nestedLanguages||[]).concat(PA),(t.nestedAttributes||[]).concat(ZA)));let r=n?jA.configure({wrap:n,dialect:e}):e?B1.configure({dialect:e}):B1;return new o8(r,[B1.data.of({autocomplete:Zz(t)}),t.autoCloseTags!==!1?Rz:[],TA().support,pA().support])}const fb=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),Rz=ke.inputHandler.of((t,e,n,r,i)=>{if(t.composing||t.state.readOnly||e!=n||r!=">"&&r!="/"||!B1.isActiveAt(t.state,e,-1))return!1;let l=i(),{state:o}=l,c=o.changeByRange(f=>{var m,p,O;let y=o.doc.sliceString(f.from-1,f.to)==r,{head:b}=f,S=zt(o).resolveInner(b,-1),w;if(y&&r==">"&&S.name=="EndTag"){let A=S.parent;if(((p=(m=A.parent)===null||m===void 0?void 0:m.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(w=Oo(o.doc,A.parent,b))&&!fb.has(w)){let k=b+(o.doc.sliceString(b,b+1)===">"?1:0),$=`</${w}>`;return{range:f,changes:{from:b,to:k,insert:$}}}}else if(y&&r=="/"&&S.name=="IncompleteCloseTag"){let A=S.parent;if(S.from==b-2&&((O=A.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(w=Oo(o.doc,A,b))&&!fb.has(w)){let k=b+(o.doc.sliceString(b,b+1)===">"?1:0),$=`${w}>`;return{range:he.cursor(b+$.length,-1),changes:{from:b,to:k,insert:$}}}}return{range:f}});return c.changes.empty?!1:(t.dispatch([l,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Nz(t){switch(t){case"html":return ub();case"css":return pA();case"javascript":case"js":case"typescript":case"ts":return TA({typescript:t==="typescript"||t==="ts"});default:return ub()}}function Vz(t){var r;const e=((r=t.split(".").pop())==null?void 0:r.toLowerCase())??"";return{html:"html",htm:"html",css:"css",js:"javascript",ts:"typescript",jsx:"javascript",tsx:"typescript",json:"javascript"}[e]??"html"}const Lz=d.memo(function({content:e,filePath:n,language:r,onChange:i,readOnly:l=!1,revealOffset:o}){const c=d.useRef(null),f=d.useRef(null),m=d.useRef(i);m.current=i;const p=d.useRef(e);p.current=e;const O=d.useCallback(y=>{if(c.current&&(c.current.destroy(),c.current=null),!y)return;f.current=y;const b=r??(n?Vz(n):"html"),S=ke.updateListener.of(A=>{A.docChanged&&m.current&&m.current(A.state.doc.toString())}),w=it.create({doc:p.current,extensions:[PV(),xV(),RV(),KL(),kL(),gL(),VL(),yD(),jD(),n8.of([...wD,...nD,...tH,...s_]),Nz(b),pH,S,it.readOnly.of(l),ke.theme({"&":{height:"100%"},".cm-scroller":{overflow:"auto"}})]});c.current=new ke({state:w,parent:y})},[n,r,l]);return d.useEffect(()=>{const y=c.current;if(!y)return;const b=y.state.doc.toString();b!==e&&y.dispatch({changes:{from:0,to:b.length,insert:e}})},[e]),d.useEffect(()=>{const y=c.current;if(!y||o==null||o<0)return;const b=y.state.doc.length,S=Math.min(o,b);y.dispatch({selection:{anchor:S},effects:ke.scrollIntoView(S,{y:"center"})}),y.focus()},[o]),g.jsx("div",{ref:O,className:"h-full w-full overflow-hidden"})}),Bs={width:1920,height:1080},db=80,hb=45,mb=3,_z=10;function Dz(t){const e=Number.isFinite(t.stageWidth)&&t.stageWidth>0?t.stageWidth:Bs.width,n=Number.isFinite(t.stageHeight)&&t.stageHeight>0?t.stageHeight:Bs.height,r=t.cardWidth/e,i=t.cardHeight/n;return Math.min(r,i)}function Hz(t){return Number.isFinite(t)&&t!=null&&t>0&&t<mb?t/2:mb}function pb(t){if(t==null)return null;const e=Number.parseFloat(t);return Number.isFinite(e)&&e>0?e:null}function Xz(t){var l,o;const e=t==null?void 0:t.contentWindow,n=(o=(l=e==null?void 0:e.__player)==null?void 0:l.getDuration)==null?void 0:o.call(l);if(Number.isFinite(n)&&n!=null&&n>0)return n;const r=t==null?void 0:t.contentDocument,i=(r==null?void 0:r.querySelector("[data-composition-id]"))??(r==null?void 0:r.documentElement)??null;return pb((i==null?void 0:i.getAttribute("data-composition-duration"))??null)??pb((i==null?void 0:i.getAttribute("data-duration"))??null)}function zz(t,e){var r,i,l,o;const n=(r=t==null?void 0:t.contentWindow)==null?void 0:r.__player;return n?e?((i=n.play)==null||i.call(n),!0):((l=n.pause)==null||l.call(n),(o=n.seek)==null||o.call(n,Hz(Xz(t))),!0):!1}function Fz({projectId:t,comp:e,isActive:n,onSelect:r,onRender:i,isRendering:l}){const[o,c]=d.useState(!1),[f,m]=d.useState(Bs),p=d.useRef(null),O=d.useRef(null),y=d.useRef(null),b=d.useCallback(M=>{y.current&&(clearTimeout(y.current),y.current=null);const Z=E=>{zz(p.current,M)||E<=0||(y.current=setTimeout(()=>Z(E-1),100))};Z(_z)},[]),S=()=>{O.current=setTimeout(()=>c(!0),300)},w=()=>{O.current&&(clearTimeout(O.current),O.current=null),c(!1)},A=e.replace(/^compositions\//,"").replace(/\.html$/,""),k=`/api/projects/${t}/preview/comp/${e}`,$=Dz({cardWidth:db,cardHeight:hb,stageWidth:f.width,stageHeight:f.height}),Q=(db-f.width*$)/2,C=(hb-f.height*$)/2;return d.useEffect(()=>{b(o)},[o,b]),d.useEffect(()=>()=>{O.current&&clearTimeout(O.current),y.current&&clearTimeout(y.current)},[]),g.jsxs("div",{onClick:r,onPointerEnter:S,onPointerLeave:w,className:`group/card w-full text-left px-2 py-1.5 flex items-center gap-2.5 transition-colors cursor-pointer ${n?"bg-studio-accent/10 border-l-2 border-studio-accent":"border-l-2 border-transparent hover:bg-neutral-800/50"}`,children:[g.jsx("div",{className:"w-20 h-[45px] rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:g.jsx("iframe",{ref:p,src:k,sandbox:"allow-scripts allow-same-origin",loading:"lazy",className:"absolute border-none pointer-events-none",style:{transformOrigin:"0 0",width:f.width,height:f.height,left:Q,top:C,transform:`scale(${$})`},onLoad:M=>{var Z;try{const j=(Z=M.currentTarget.contentDocument)==null?void 0:Z.querySelector("[data-composition-id]"),_=Number(j==null?void 0:j.getAttribute("data-width"))||Bs.width,H=Number(j==null?void 0:j.getAttribute("data-height"))||Bs.height;m({width:_,height:H}),b(o)}catch{m(Bs)}},title:`${A} preview`,tabIndex:-1})}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate block",children:A}),g.jsx("span",{className:"text-[9px] text-neutral-600 truncate block",children:e})]}),i&&g.jsx("button",{type:"button",title:l?"Rendering...":`Render ${A}`,"aria-label":l?"Rendering...":`Render ${A}`,disabled:l,onClick:M=>{M.stopPropagation(),i()},className:`flex-shrink-0 p-1 rounded transition-colors ${l?"text-neutral-600 cursor-not-allowed":"text-neutral-600 hover:text-studio-accent hover:bg-neutral-800"}`,children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),g.jsx("polyline",{points:"7 10 12 15 17 10"}),g.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})})]})}const Yz=d.memo(function({projectId:e,compositions:n,activeComposition:r,onSelect:i,onRenderComposition:l,isRendering:o}){return n.length===0?g.jsx("div",{className:"flex-1 flex items-center justify-center px-4",children:g.jsx("p",{className:"text-xs text-neutral-600 text-center",children:"No compositions found"})}):g.jsx("div",{className:"flex-1 overflow-y-auto",children:n.map(c=>g.jsx(Fz,{projectId:e,comp:c,isActive:r===c,onSelect:()=>i(c),onRender:l?()=>l(c):void 0,isRendering:o},c))})});function RA({src:t}){const[e,n]=d.useState(null);return d.useEffect(()=>{const r=document.createElement("video");r.crossOrigin="anonymous",r.muted=!0,r.preload="metadata";const i=document.createElement("canvas"),l=i.getContext("2d"),o=()=>{r.src="",r.load()};return r.addEventListener("loadedmetadata",()=>{r.currentTime=Math.min(2,r.duration*.1||2)}),r.addEventListener("seeked",()=>{l&&(i.width=r.videoWidth,i.height=r.videoHeight,l.drawImage(r,0,0),n(i.toDataURL("image/jpeg",.7)),o())}),r.addEventListener("error",o),r.src=t,r.load(),o},[t]),e?g.jsx("img",{src:e,alt:"",draggable:!1,className:"w-full h-full object-contain"}):g.jsx("div",{className:"w-full h-full bg-neutral-800 animate-pulse"})}function Bz({serveUrl:t,name:e,isImage:n,isVideo:r,isAudio:i}){return g.jsxs(g.Fragment,{children:[n&&g.jsx("img",{src:t,alt:e,loading:"lazy",className:"w-full h-full object-contain",onError:l=>{l.target.style.display="none"}}),r&&g.jsx(RA,{src:t}),i&&g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:g.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-purple-400",children:[g.jsx("path",{d:"M9 18V5l12-2v13",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("circle",{cx:"6",cy:"18",r:"3"}),g.jsx("circle",{cx:"18",cy:"16",r:"3"})]})}),!n&&!r&&!i&&g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[g.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("polyline",{points:"14 2 14 8 20 8",strokeLinecap:"round",strokeLinejoin:"round"})]})})]})}function qz({projectId:t,asset:e,onCopy:n,isCopied:r,onDelete:i,onRename:l}){const[o,c]=d.useState(!1),[f,m]=d.useState(null),[p,O]=d.useState(!1),[y,b]=d.useState(""),[S,w]=d.useState(!1),A=e.split("/").pop()??e,k=`/api/projects/${t}/preview/${e}`,$=yg.test(e);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{draggable:!0,onClick:()=>n(e),onDragStart:Q=>{Q.dataTransfer.effectAllowed="copy",Q.dataTransfer.setData(Im,JSON.stringify({path:e})),Q.dataTransfer.setData("text/plain",e)},onContextMenu:Q=>{Q.preventDefault(),m({x:Q.clientX,y:Q.clientY})},onPointerEnter:()=>c(!0),onPointerLeave:()=>c(!1),className:`w-full text-left px-2 py-1.5 flex items-center gap-2.5 transition-colors cursor-pointer ${r?"bg-studio-accent/10 border-l-2 border-studio-accent":"border-l-2 border-transparent hover:bg-neutral-800/50"}`,children:[g.jsxs("div",{className:"w-16 h-10 rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:[g.jsx(Bz,{serveUrl:k,name:A,isImage:eu.test(e),isVideo:$,isAudio:bg.test(e)}),$&&o&&g.jsx("video",{src:k,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-contain"})]}),g.jsx("div",{className:"min-w-0 flex-1",children:p?g.jsx("input",{autoFocus:!0,value:y,onChange:Q=>b(Q.target.value),onKeyDown:Q=>{if(Q.key==="Enter"){Q.preventDefault();const C=y.trim();if(C&&C!==A){const M=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";l==null||l(e,M+C)}O(!1)}else Q.key==="Escape"&&O(!1)},onBlur:()=>{const Q=y.trim();if(Q&&Q!==A){const C=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";l==null||l(e,C+Q)}O(!1)},onClick:Q=>Q.stopPropagation(),className:"w-full bg-neutral-800 text-neutral-200 text-[11px] px-1.5 py-0.5 rounded border border-neutral-600 outline-none focus:border-studio-accent",spellCheck:!1}):g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate block",children:A}),r?g.jsx("span",{className:"text-[9px] text-studio-accent",children:"Copied!"}):g.jsx("span",{className:"text-[9px] text-neutral-600 truncate block",children:e})]})})]}),f&&g.jsx("div",{className:"fixed inset-0 z-[200]",onClick:()=>m(null),onContextMenu:Q=>{Q.preventDefault(),m(null)},children:g.jsxs("div",{className:"absolute bg-neutral-900 border border-neutral-700 rounded-lg shadow-xl py-1 min-w-[140px] text-xs",style:{left:f.x,top:f.y},children:[g.jsx("button",{onClick:Q=>{Q.stopPropagation(),n(e),m(null)},className:"w-full text-left px-3 py-1.5 text-neutral-300 hover:bg-neutral-800 transition-colors",children:"Copy path"}),l&&g.jsx("button",{onClick:Q=>{Q.stopPropagation(),b(A),O(!0),m(null)},className:"w-full text-left px-3 py-1.5 text-neutral-300 hover:bg-neutral-800 transition-colors",children:"Rename"}),i&&g.jsx("button",{onClick:Q=>{Q.stopPropagation(),w(!0),m(null)},className:"w-full text-left px-3 py-1.5 text-red-400 hover:bg-neutral-800 transition-colors",children:"Delete"})]})}),S&&g.jsxs("div",{className:"px-2 py-1.5 bg-red-950/30 border-l-2 border-red-500 flex items-center justify-between gap-2",children:[g.jsxs("span",{className:"text-[10px] text-red-400 truncate",children:["Delete ",A,"?"]}),g.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[g.jsx("button",{onClick:Q=>{Q.stopPropagation(),i==null||i(e),w(!1)},className:"px-2 py-0.5 text-[10px] rounded bg-red-600 text-white hover:bg-red-500 transition-colors",children:"Delete"}),g.jsx("button",{onClick:Q=>{Q.stopPropagation(),w(!1)},className:"px-2 py-0.5 text-[10px] rounded text-neutral-400 hover:text-neutral-200 transition-colors",children:"Cancel"})]})]})]})}const Iz=d.memo(function({projectId:e,assets:n,onImport:r,onDelete:i,onRename:l}){const o=d.useRef(null),[c,f]=d.useState(!1),[m,p]=d.useState(null),O=d.useCallback(S=>{S.preventDefault(),f(!1),S.dataTransfer.files.length&&(r==null||r(S.dataTransfer.files))},[r]),y=d.useCallback(async S=>{await Kc(S)&&(p(S),setTimeout(()=>p(null),1500))},[]),b=n.filter(S=>Tv.test(S));return g.jsxs("div",{className:`flex-1 flex flex-col min-h-0 transition-colors ${c?"bg-studio-accent/[0.05]":""}`,onDragOver:S=>{S.preventDefault(),f(!0)},onDragLeave:()=>f(!1),onDrop:O,children:[r&&g.jsxs("div",{className:"px-3 py-2 border-b border-neutral-800/40 flex-shrink-0",children:[g.jsxs("button",{onClick:()=>{var S;return(S=o.current)==null?void 0:S.click()},className:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 text-[11px] rounded-lg border border-dashed border-neutral-700/50 text-neutral-500 hover:text-neutral-300 hover:border-neutral-600 transition-colors",children:[g.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:g.jsx("path",{d:"M12 5v14M5 12h14"})}),"Import media"]}),g.jsx("input",{ref:o,type:"file",accept:"video/*,image/*,audio/*",multiple:!0,className:"hidden",onChange:S=>{var w;(w=S.target.files)!=null&&w.length&&(r(S.target.files),S.target.value="")}})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:b.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 gap-2",children:[g.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-700",children:[g.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("polyline",{points:"17 8 12 3 7 8",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15",strokeLinecap:"round"})]}),g.jsx("p",{className:"text-[10px] text-neutral-600 text-center",children:"Drop media files here"})]}):b.map(S=>g.jsx(qz,{projectId:e,asset:S,onCopy:y,isCopied:m===S,onDelete:i,onRename:l},S))})]})}),NA=[{id:"captions",label:"Captions",color:"cyan"},{id:"vfx",label:"VFX",color:"purple"},{id:"transitions",label:"Transitions",color:"blue"},{id:"effects",label:"Effects",color:"rose"},{id:"social",label:"Social",color:"pink"},{id:"data",label:"Data",color:"green"},{id:"scenes",label:"Scenes",color:"amber"}];function Uz(t){if(!t||t.length===0)return"scenes";const e=new Set(t);return e.has("captions")||e.has("caption-style")?"captions":e.has("transition")?"transitions":e.has("social")||e.has("overlay")?"social":e.has("data")||e.has("chart")||e.has("map")?"data":e.has("html-in-canvas")||e.has("webgl")||e.has("shader")?"vfx":e.has("effect")||e.has("grain")||e.has("vignette")?"effects":"scenes"}const Wz={transitions:{bg:"bg-blue-500/15",text:"text-blue-400",dot:"bg-blue-400"},vfx:{bg:"bg-purple-500/15",text:"text-purple-400",dot:"bg-purple-400"},social:{bg:"bg-pink-500/15",text:"text-pink-400",dot:"bg-pink-400"},data:{bg:"bg-green-500/15",text:"text-green-400",dot:"bg-green-400"},scenes:{bg:"bg-amber-500/15",text:"text-amber-400",dot:"bg-amber-400"},captions:{bg:"bg-cyan-500/15",text:"text-cyan-400",dot:"bg-cyan-400"},effects:{bg:"bg-rose-500/15",text:"text-rose-400",dot:"bg-rose-400"}};function VA(t){return Wz[t]}function Gz(){const[t,e]=d.useState([]),[n,r]=d.useState(!0),[i,l]=d.useState(null),[o,c]=d.useState(""),[f,m]=d.useState(null);d.useEffect(()=>{const O={captions:0,vfx:1,transitions:2,effects:3,social:4,data:5,scenes:6};let y=!1;return(async()=>{try{const b=await fetch("/api/registry/blocks");if(!b.ok)throw new Error("Failed to load catalog");const S=await b.json();if(y)return;const w=S.map(A=>({...A,category:Uz(A.tags)})).sort((A,k)=>(O[A.category]??9)-(O[k.category]??9));e(w)}catch(b){if(y)return;l(b instanceof Error?b.message:"Failed to load catalog")}finally{y||r(!1)}})(),()=>{y=!0}},[]);const p=d.useMemo(()=>{let O=t;if(f&&(O=O.filter(y=>y.category===f)),o.trim()){const y=o.toLowerCase();O=O.filter(b=>b.title.toLowerCase().includes(y)||b.description.toLowerCase().includes(y))}return O},[t,f,o]);return{blocks:t,loading:n,error:i,search:o,setSearch:c,category:f,setCategory:m,filteredBlocks:p}}const Kz=d.memo(function({onAddBlock:e,onPreviewBlock:n}){const{loading:r,error:i,search:l,setSearch:o,category:c,setCategory:f,filteredBlocks:m}=Gz();return r?g.jsx("div",{className:"flex flex-1 items-center justify-center text-neutral-600 text-xs",children:"Loading blocks…"}):i?g.jsx("div",{className:"flex flex-1 items-center justify-center text-red-400 text-xs px-4 text-center",children:i}):g.jsxs("div",{className:"flex flex-col flex-1 min-h-0",children:[g.jsx("div",{className:"px-3 pt-2 pb-1 flex-shrink-0",children:g.jsxs("div",{className:"relative",children:[g.jsxs("svg",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-neutral-500",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("circle",{cx:"11",cy:"11",r:"8"}),g.jsx("path",{d:"m21 21-4.35-4.35"})]}),g.jsx("input",{type:"text",value:l,onChange:p=>o(p.target.value),placeholder:"Search blocks…",className:"w-full bg-neutral-900 border border-neutral-800 rounded-md pl-7 pr-2 py-1.5 text-[11px] text-neutral-200 placeholder:text-neutral-600 focus:outline-none focus:border-neutral-700 transition-colors"})]})}),g.jsx("div",{className:"px-3 pt-1 pb-2 flex-shrink-0 overflow-x-auto",children:g.jsxs("div",{className:"flex gap-1",children:[g.jsx(gb,{label:"All",active:c===null,onClick:()=>f(null)}),NA.map(p=>g.jsx(gb,{label:p.label,category:p.id,active:c===p.id,onClick:()=>f(c===p.id?null:p.id)},p.id))]})}),g.jsxs("div",{className:"flex-1 overflow-y-auto min-h-0 px-2 pb-2",children:[c==="vfx"&&g.jsxs("div",{className:"mb-2 px-2 py-1.5 rounded-md bg-purple-500/10 border border-purple-500/20 text-[9px] text-purple-300 leading-relaxed",children:["VFX blocks use WebGL via HTML-in-Canvas. Enable"," ",g.jsx("span",{className:"font-mono text-purple-200",children:"chrome://flags/#html-in-canvas"})," for preview."]}),m.length===0?g.jsx("div",{className:"flex items-center justify-center h-32 text-neutral-600 text-xs",children:"No blocks match your search"}):g.jsx("div",{className:"grid gap-1.5",style:{gridTemplateColumns:"repeat(auto-fill, minmax(120px, 1fr))"},children:m.map(p=>{var b,S;const O="duration"in p?p.duration:void 0,y="dimensions"in p?p.dimensions:void 0;return g.jsx(Jz,{name:p.name,title:p.title,duration:O,category:p.category,tags:p.tags,posterUrl:(b=p.preview)==null?void 0:b.poster,videoUrl:(S=p.preview)==null?void 0:S.video,dimensions:y,onAdd:()=>e(p.name),onPreview:n},p.name)})})]})]})});function gb({label:t,category:e,active:n,onClick:r}){const i=e?VA(e):null;return g.jsx("button",{type:"button",onClick:r,className:`flex-shrink-0 px-2 py-1 rounded-full text-[10px] font-medium transition-colors ${n?i?`${i.bg} ${i.text}`:"bg-neutral-700 text-neutral-200":"bg-neutral-900 text-neutral-500 hover:text-neutral-300"}`,children:t})}function Jz({name:t,title:e,duration:n,category:r,tags:i,posterUrl:l,videoUrl:o,dimensions:c,onAdd:f,onPreview:m}){var M;const[p,O]=d.useState(!1),[y,b]=d.useState(!1),S=d.useRef(null),w=VA(r),A=(i==null?void 0:i.includes("html-in-canvas"))||(i==null?void 0:i.includes("webgl")),k=d.useCallback(()=>{S.current=setTimeout(()=>{O(!0),m==null||m({videoUrl:o,posterUrl:l,title:e})},300)},[m,o,l,e]),$=d.useCallback(()=>{S.current&&(clearTimeout(S.current),S.current=null),O(!1),m==null||m(null)},[m]);d.useEffect(()=>()=>{S.current&&clearTimeout(S.current)},[]);const Q=d.useCallback(Z=>{Z.stopPropagation(),!y&&(b(!0),f(),setTimeout(()=>b(!1),1e3))},[f,y]),C=d.useCallback(Z=>{Z.dataTransfer.effectAllowed="copy",Z.dataTransfer.setData(tu,JSON.stringify({name:t,duration:n,dimensions:c}))},[t,n,c]);return g.jsxs("div",{className:"group/card rounded-md overflow-hidden cursor-pointer transition-colors bg-neutral-900 hover:bg-neutral-800",onPointerEnter:k,onPointerLeave:$,draggable:!0,onDragStart:C,children:[g.jsxs("div",{className:"aspect-video w-full overflow-hidden relative",children:[p&&o?g.jsx("video",{src:o,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full object-cover"}):l?g.jsx("img",{src:l,alt:e,loading:"lazy",className:"w-full h-full object-cover"}):o?g.jsx("video",{src:o,muted:!0,playsInline:!0,preload:"metadata",className:"w-full h-full object-cover"}):g.jsx("div",{className:`w-full h-full flex items-center justify-center ${w.bg}`,children:g.jsx("span",{className:`text-[9px] font-medium ${w.text}`,children:r.toUpperCase()})}),g.jsx("button",{type:"button",onClick:Q,className:"absolute inset-0 flex items-center justify-center bg-black/60 opacity-0 group-hover/card:opacity-100 transition-opacity",children:g.jsx("span",{className:"text-[10px] font-semibold text-white",children:y?"Added":"Add"})}),g.jsxs("div",{className:"absolute top-1 right-1 flex items-center gap-0.5 pointer-events-none",children:[A&&g.jsx("span",{className:"px-1 py-px rounded text-[7px] font-semibold text-purple-300 bg-purple-900/70",children:"WebGL"}),n!=null&&g.jsxs("span",{className:"px-1 py-px rounded text-[8px] font-medium text-white/80 bg-black/50",children:[n,"s"]})]})]}),g.jsxs("div",{className:"px-1.5 py-1.5",children:[g.jsx("div",{className:"text-[10px] font-medium text-neutral-200 truncate leading-tight",children:e}),g.jsxs("div",{className:"flex items-center gap-1 mt-0.5",children:[g.jsx("span",{className:`w-1.5 h-1.5 rounded-full flex-shrink-0 ${w.dot}`}),g.jsx("span",{className:`text-[8px] ${w.text}`,children:(M=NA.find(Z=>Z.id===r))==null?void 0:M.label})]})]})]})}const gn=14,On="duotone";function LA({path:t}){var r;const e=((r=t.split(".").pop())==null?void 0:r.toLowerCase())??"",n="flex-shrink-0";return e==="html"?g.jsx(sQ,{size:gn,weight:On,color:"#E44D26",className:n}):e==="css"?g.jsx(lQ,{size:gn,weight:On,color:"#264DE4",className:n}):e==="js"||e==="mjs"||e==="cjs"?g.jsx(cQ,{size:gn,weight:On,color:"#F0DB4F",className:n}):e==="jsx"?g.jsx(uQ,{size:gn,weight:On,color:"#61DAFB",className:n}):e==="ts"||e==="mts"?g.jsx(mQ,{size:gn,weight:On,color:"#3178C6",className:n}):e==="tsx"?g.jsx(pQ,{size:gn,weight:On,color:"#3178C6",className:n}):e==="json"?g.jsx(aQ,{size:gn,weight:On,color:"#4ADE80",className:n}):e==="svg"?g.jsx(hQ,{size:gn,weight:On,color:"#F97316",className:n}):e==="md"||e==="mdx"?g.jsx(fQ,{size:gn,weight:On,color:"#9CA3AF",className:n}):e==="txt"?g.jsx(gQ,{size:gn,weight:On,color:"#9CA3AF",className:n}):e==="png"?g.jsx(dQ,{size:gn,weight:On,color:"#22C55E",className:n}):e==="jpg"||e==="jpeg"?g.jsx(oQ,{size:gn,weight:On,color:"#22C55E",className:n}):e==="webp"||e==="gif"||e==="ico"?g.jsx(vQ,{size:gn,weight:On,color:"#22C55E",className:n}):e==="mp4"||e==="webm"||e==="mov"?g.jsx(OQ,{size:gn,weight:On,color:"#A855F7",className:n}):e==="mp3"||e==="wav"||e==="ogg"||e==="m4a"?g.jsx(QQ,{size:gn,weight:On,color:"#3CE6AC",className:n}):e==="woff"||e==="woff2"||e==="ttf"||e==="otf"?g.jsx(CQ,{size:gn,weight:On,color:"#6B7280",className:n}):g.jsx(iQ,{size:gn,weight:On,color:"#6B7280",className:n})}function eF(t){const e={name:"",fullPath:"",children:new Map,isFile:!1};for(const n of t){const r=n.split("/");let i=e;for(let l=0;l<r.length;l++){const o=r[l],c=l===r.length-1,f=r.slice(0,l+1).join("/");i.children.has(o)||i.children.set(o,{name:o,fullPath:f,children:new Map,isFile:c}),i=i.children.get(o),c&&(i.isFile=!0)}}return e}function _A(t){return Array.from(t.values()).sort((e,n)=>e.name==="index.html"?-1:n.name==="index.html"?1:!e.isFile&&n.isFile?-1:e.isFile&&!n.isFile?1:e.name.localeCompare(n.name))}function C8(t,e){if(!e)return!1;if(t.fullPath===e)return!0;for(const n of t.children.values())if(C8(n,e))return!0;return!1}const tF=14;function nF({state:t,onClose:e,onNewFile:n,onNewFolder:r,onRename:i,onDuplicate:l,onDelete:o}){const c=d.useRef(null);d.useEffect(()=>{const O=b=>{c.current&&!c.current.contains(b.target)&&e()},y=b=>{b.key==="Escape"&&e()};return document.addEventListener("mousedown",O),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",y)}},[e]);const f=Math.min(t.x,window.innerWidth-180),m=Math.min(t.y,window.innerHeight-200),p=t.targetIsFolder?t.targetPath:t.targetPath.includes("/")?t.targetPath.slice(0,t.targetPath.lastIndexOf("/")):"";return g.jsxs("div",{ref:c,className:"fixed z-50 bg-neutral-900 border border-neutral-700 rounded-md shadow-lg py-1 min-w-[160px]",style:{left:f,top:m},children:[t.targetIsFolder&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{n(t.targetPath),e()},children:[g.jsx(x3,{size:12,weight:"duotone",className:"text-neutral-500"}),"New File"]}),g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{r(t.targetPath),e()},children:[g.jsx(fS,{size:12,weight:"duotone",className:"text-neutral-500"}),"New Folder"]}),g.jsx("div",{className:"border-t border-neutral-700 my-1"})]}),!t.targetIsFolder&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{n(p),e()},children:[g.jsx(x3,{size:12,weight:"duotone",className:"text-neutral-500"}),"New File"]}),g.jsx("div",{className:"border-t border-neutral-700 my-1"})]}),g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{i(t.targetPath),e()},children:[g.jsx(kQ,{size:12,weight:"duotone",className:"text-neutral-500"}),"Rename"]}),!t.targetIsFolder&&g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-neutral-300 hover:bg-neutral-800 cursor-pointer text-left",onClick:()=>{l(t.targetPath),e()},children:[g.jsx(nQ,{size:12,weight:"duotone",className:"text-neutral-500"}),"Duplicate"]}),g.jsx("div",{className:"border-t border-neutral-700 my-1"}),g.jsxs("button",{className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-red-400 hover:bg-red-900/30 cursor-pointer text-left",onClick:()=>{o(t.targetPath),e()},children:[g.jsx($Q,{size:12,weight:"duotone"}),"Delete"]})]})}function Ef({defaultValue:t,depth:e,isFolder:n,onCommit:r,onCancel:i}){const l=d.useRef(null),o=d.useRef(!1),[c,f]=d.useState(t);d.useEffect(()=>{const y=l.current;if(y)if(y.focus(),t&&t.includes(".")){const b=t.lastIndexOf(".");y.setSelectionRange(0,b)}else y.select()},[t]);const m=y=>{o.current||(o.current=!0,r(y))},p=y=>{if(y.key==="Enter"){y.preventDefault();const b=c.trim();b&&!(/[/\\]/.test(b)||b.includes(".."))?m(b):i()}else y.key==="Escape"&&(y.preventDefault(),i())},O=()=>{const y=c.trim();y&&y!==t&&!(/[/\\]/.test(y)||y.includes(".."))?m(y):i()};return g.jsxs("div",{className:"flex items-center gap-2 py-0.5 min-h-7",style:{paddingLeft:`${8+e*12+(n?0:14)}px`},children:[n?g.jsx(yQ,{size:tF,weight:"duotone",color:"#6B7280",className:"flex-shrink-0"}):g.jsx(LA,{path:c}),g.jsx("input",{ref:l,value:c,onChange:y=>f(y.target.value),onKeyDown:p,onBlur:O,className:"flex-1 min-w-0 bg-neutral-800 text-neutral-200 text-xs px-1.5 py-0.5 rounded border border-neutral-600 outline-none focus:border-[#3CE6AC]",spellCheck:!1})]})}function rF({name:t,onConfirm:e,onCancel:n}){const r=d.useRef(null);return d.useEffect(()=>{const i=o=>{o.key==="Escape"&&n()},l=o=>{r.current&&!r.current.contains(o.target)&&n()};return document.addEventListener("keydown",i),document.addEventListener("mousedown",l),()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",l)}},[n]),g.jsxs("div",{ref:r,className:"mx-1 my-0.5 p-2 bg-neutral-800 border border-neutral-700 rounded-md text-xs",children:[g.jsxs("p",{className:"text-neutral-300 mb-2",children:["Delete ",g.jsx("span",{className:"font-medium text-neutral-100",children:t}),"?"]}),g.jsxs("div",{className:"flex gap-1.5",children:[g.jsx("button",{onClick:n,className:"flex-1 px-2 py-1 rounded bg-neutral-700 text-neutral-300 hover:bg-neutral-600 transition-colors",children:"Cancel"}),g.jsx("button",{onClick:e,className:"flex-1 px-2 py-1 rounded bg-red-900/60 text-red-300 hover:bg-red-800/60 transition-colors",children:"Delete"})]})]})}const cg=d.memo(function({node:e,depth:n,activeFile:r,onSelectFile:i,onContextMenu:l,inlineInput:o,onDragStart:c}){const f=e.fullPath===r;return(o==null?void 0:o.mode)==="rename"&&o.originalPath===e.fullPath?g.jsx(Ef,{defaultValue:o.originalName??e.name,depth:n,isFolder:!1,onCommit:p=>{var O;(O=o==null?void 0:o.onCommit)==null||O.call(o,p)},onCancel:()=>{var p;(p=o==null?void 0:o.onCancel)==null||p.call(o)}}):g.jsxs("button",{draggable:!0,onDragStart:p=>c(p,e.fullPath),onClick:()=>i(e.fullPath),onContextMenu:p=>{p.preventDefault(),l(p,e.fullPath,!1)},className:`w-full flex items-center gap-2 py-1 min-h-7 text-left transition-all text-xs ${f?"bg-neutral-800/60 text-neutral-200":"text-neutral-500 hover:bg-neutral-800/30 hover:text-neutral-300"}`,style:{paddingLeft:`${8+n*12+14}px`},children:[g.jsx(LA,{path:e.name}),g.jsx("span",{className:"truncate",children:e.name})]})}),iF=d.memo(function t({node:e,depth:n,activeFile:r,onSelectFile:i,defaultOpen:l,onContextMenu:o,inlineInput:c,onDragStart:f,onDragOver:m,onDrop:p,onDragLeave:O,dragOverFolder:y}){const[b,S]=d.useState(l),w=d.useCallback(()=>S(C=>!C),[]),A=d.useMemo(()=>_A(e.children),[e.children]),k=b?Uj:Wj,$=y===e.fullPath;return(c==null?void 0:c.mode)==="rename"&&c.originalPath===e.fullPath?g.jsx(Ef,{defaultValue:c.originalName??e.name,depth:n,isFolder:!0,onCommit:C=>{var M;(M=c==null?void 0:c.onCommit)==null||M.call(c,C)},onCancel:()=>{var C;(C=c==null?void 0:c.onCancel)==null||C.call(c)}}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{draggable:!0,onDragStart:C=>f(C,e.fullPath),onClick:w,onContextMenu:C=>{C.preventDefault(),o(C,e.fullPath,!0)},onDragOver:C=>{C.preventDefault(),C.stopPropagation(),m(C,e.fullPath)},onDrop:C=>{C.preventDefault(),C.stopPropagation(),p(C,e.fullPath)},onDragLeave:O,className:`w-full flex items-center gap-1.5 px-2.5 py-1 min-h-7 text-left text-xs text-neutral-400 hover:bg-neutral-800/30 hover:text-neutral-300 transition-colors ${$?"bg-[#3CE6AC]/10 outline outline-1 outline-[#3CE6AC]/40":""}`,style:{paddingLeft:`${8+n*12}px`},children:[g.jsx(k,{size:10,className:"flex-shrink-0 text-neutral-600"}),g.jsx("span",{className:"truncate font-medium",children:e.name})]}),b&&g.jsxs(g.Fragment,{children:[c&&(c.mode==="new-file"||c.mode==="new-folder")&&c.parentPath===e.fullPath&&g.jsx(Ef,{defaultValue:"",depth:n+1,isFolder:c.mode==="new-folder",onCommit:C=>{var M;(M=c==null?void 0:c.onCommit)==null||M.call(c,C)},onCancel:()=>{var C;(C=c==null?void 0:c.onCancel)==null||C.call(c)}}),A.map(C=>C.isFile&&C.children.size===0?g.jsx(cg,{node:C,depth:n+1,activeFile:r,onSelectFile:i,onContextMenu:o,inlineInput:c,onDragStart:f},C.fullPath):C.children.size>0?g.jsx(t,{node:C,depth:n+1,activeFile:r,onSelectFile:i,defaultOpen:C8(C,r),onContextMenu:o,inlineInput:c,onDragStart:f,onDragOver:m,onDrop:p,onDragLeave:O,dragOverFolder:y},C.fullPath):g.jsx(cg,{node:C,depth:n+1,activeFile:r,onSelectFile:i,onContextMenu:o,inlineInput:c,onDragStart:f},C.fullPath))]})]})}),aF=d.memo(function({files:e,activeFile:n,onSelectFile:r,onCreateFile:i,onCreateFolder:l,onDeleteFile:o,onRenameFile:c,onDuplicateFile:f,onMoveFile:m,onImportFiles:p}){const O=d.useMemo(()=>eF(e),[e]),y=d.useMemo(()=>_A(O.children),[O]),[b,S]=d.useState(null),[w,A]=d.useState(null),[k,$]=d.useState(null),[Q,C]=d.useState(null),M=d.useRef(null),Z=!!(i||l||o||c||f),E=d.useCallback((P,R,X)=>{Z&&(P.preventDefault(),S({x:P.clientX,y:P.clientY,targetPath:R,targetIsFolder:X}))},[Z]),j=d.useCallback(()=>S(null),[]),_=d.useCallback(P=>{A({parentPath:P,mode:"new-file",onCommit:R=>{const X=P?`${P}/${R}`:R;i==null||i(X),A(null)},onCancel:()=>A(null)})},[i]),H=d.useCallback(P=>{A({parentPath:P,mode:"new-folder",onCommit:R=>{const X=P?`${P}/${R}`:R;l==null||l(X),A(null)},onCancel:()=>A(null)})},[l]),L=d.useCallback(P=>{const R=P.includes("/")?P.slice(P.lastIndexOf("/")+1):P,X=P.includes("/")?P.slice(0,P.lastIndexOf("/")):"";A({parentPath:X,mode:"rename",originalPath:P,originalName:R,onCommit:Y=>{if(Y!==R){const U=X?`${X}/${Y}`:Y;c==null||c(P,U)}A(null)},onCancel:()=>A(null)})},[c]),z=d.useCallback(P=>{f==null||f(P)},[f]),F=d.useCallback(P=>{$(P)},[]),ee=d.useCallback(()=>{k&&(o==null||o(k),$(null))},[k,o]),W=d.useCallback(()=>{$(null)},[]),V=d.useCallback((P,R)=>{M.current=R,P.dataTransfer.effectAllowed="move",P.dataTransfer.setData("text/plain",R)},[]),G=d.useCallback((P,R)=>{C(R)},[]),q=d.useCallback((P,R)=>{if(P.dataTransfer.files.length>0&&!M.current){P.preventDefault(),p==null||p(P.dataTransfer.files,R||void 0),C(null);return}const X=M.current;if(!X||!m){C(null);return}const Y=X.includes("/")?X.slice(X.lastIndexOf("/")+1):X,U=R?`${R}/${Y}`:Y;U!==X&&!R.startsWith(X+"/")&&m(X,U),C(null),M.current=null},[m,p]),B=d.useCallback(()=>{C(null)},[]),D=d.useCallback(P=>{Z&&P.target===P.currentTarget&&(P.preventDefault(),S({x:P.clientX,y:P.clientY,targetPath:"",targetIsFolder:!0}))},[Z]);return g.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[Z&&g.jsxs("div",{className:"flex items-center justify-between px-2.5 py-1.5 border-b border-neutral-800/50 flex-shrink-0",children:[g.jsx("span",{className:"text-[10px] font-semibold tracking-wider text-neutral-600 uppercase",children:"Files"}),g.jsxs("div",{className:"flex items-center gap-0.5",children:[g.jsx("button",{onClick:()=>_(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New File",children:g.jsx(yS,{size:12,weight:"bold"})}),g.jsx("button",{onClick:()=>H(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New Folder",children:g.jsx(fS,{size:12,weight:"duotone"})})]})]}),g.jsxs("div",{className:`flex-1 overflow-y-auto py-1 transition-colors ${Q===""?"bg-[#3CE6AC]/5 outline outline-1 outline-[#3CE6AC]/30 -outline-offset-1":""}`,onContextMenu:D,onDragOver:P=>{P.preventDefault(),P.target===P.currentTarget&&C("")},onDragLeave:P=>{P.target===P.currentTarget&&C(null)},onDrop:P=>{P.preventDefault(),q(P,"")},children:[w&&(w.mode==="new-file"||w.mode==="new-folder")&&w.parentPath===""&&g.jsx(Ef,{defaultValue:"",depth:0,isFolder:w.mode==="new-folder",onCommit:P=>{var R;return(R=w.onCommit)==null?void 0:R.call(w,P)},onCancel:()=>{var P;return(P=w.onCancel)==null?void 0:P.call(w)}}),y.map(P=>P.isFile&&P.children.size===0?g.jsx(cg,{node:P,depth:0,activeFile:n,onSelectFile:r,onContextMenu:E,inlineInput:w,onDragStart:V},P.fullPath):g.jsx(iF,{node:P,depth:0,activeFile:n,onSelectFile:r,defaultOpen:C8(P,n),onContextMenu:E,inlineInput:w,onDragStart:V,onDragOver:G,onDrop:q,onDragLeave:B,dragOverFolder:Q},P.fullPath))]}),k&&g.jsx("div",{className:"border-t border-neutral-800/50 flex-shrink-0",children:g.jsx(rF,{name:k.includes("/")?k.slice(k.lastIndexOf("/")+1):k,onConfirm:ee,onCancel:W})}),b&&g.jsx(nF,{state:b,onClose:j,onNewFile:_,onNewFolder:H,onRename:L,onDuplicate:z,onDelete:F})]})}),DA="hf-studio-sidebar-tab";function lF(){const t=localStorage.getItem(DA);return t==="assets"?"assets":t==="code"?"code":t==="blocks"?"blocks":"compositions"}const sF=d.memo(d.forwardRef(function({width:e=240,projectId:n,compositions:r,assets:i,activeComposition:l,onSelectComposition:o,onImportFiles:c,fileTree:f,editingFile:m,onSelectFile:p,onCreateFile:O,onCreateFolder:y,onDeleteFile:b,onRenameFile:S,onDuplicateFile:w,onMoveFile:A,codeChildren:k,onRenderComposition:$,isRendering:Q,onLint:C,linting:M,onToggleCollapse:Z,onAddBlock:E,onPreviewBlock:j,takeoverContent:_},H){const[L,z]=d.useState(lF),F=d.useRef(L);F.current=L;const ee=d.useCallback(V=>{z(V),localStorage.setItem(DA,V),Nt("tab_switch",{panel:"left_sidebar",tab:V})},[]),W=d.useCallback(()=>F.current,[]);return d.useImperativeHandle(H,()=>({selectTab:ee,getTab:W}),[ee,W]),g.jsx("div",{className:"flex flex-col h-full bg-neutral-950 border-r border-neutral-800/50",style:{width:e},children:_?g.jsx("div",{className:"flex min-h-0 flex-1",children:_}):g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"border-b border-neutral-800/50 px-3 py-3 flex-shrink-0",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsxs("div",{className:"grid min-w-0 flex-1 gap-0.5 rounded-[18px] bg-neutral-900 p-1 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",style:{gridTemplateColumns:R2?"1fr 1fr 1fr 1fr":"1fr 1fr 1fr"},children:[g.jsx("button",{type:"button",onClick:()=>ee("code"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${L==="code"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Code"}),g.jsx("button",{type:"button",onClick:()=>ee("compositions"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${L==="compositions"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Comps"}),g.jsx("button",{type:"button",onClick:()=>ee("assets"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${L==="assets"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Assets"}),R2&&g.jsx("button",{type:"button",onClick:()=>ee("blocks"),className:`rounded-[14px] px-1.5 py-2 text-[10px] font-semibold truncate transition-all ${L==="blocks"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Catalog"})]}),Z&&g.jsx("button",{type:"button",onClick:Z,className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border border-transparent text-neutral-500 transition-colors hover:border-neutral-800 hover:bg-neutral-900 hover:text-neutral-300",title:"Hide sidebar","aria-label":"Hide sidebar",children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"m14 7-5 5 5 5"}),g.jsx("path",{d:"M19 4v16"})]})})]})}),L==="compositions"&&g.jsx(Yz,{projectId:n,compositions:r,activeComposition:l,onSelect:o,onRenderComposition:$,isRendering:Q}),L==="assets"&&g.jsx(Iz,{projectId:n,assets:i,onImport:c,onDelete:b,onRename:S}),L==="code"&&g.jsxs("div",{className:"flex flex-1 min-h-0",children:[((f==null?void 0:f.length)??0)>0&&g.jsx("div",{className:"w-[160px] flex-shrink-0 border-r border-neutral-800 overflow-y-auto",children:g.jsx(aF,{files:f??[],activeFile:(m==null?void 0:m.path)??null,onSelectFile:p??(()=>{}),onCreateFile:O,onCreateFolder:y,onDeleteFile:b,onRenameFile:S,onDuplicateFile:w,onMoveFile:A,onImportFiles:c})}),g.jsx("div",{className:"flex-1 overflow-hidden min-w-0",children:k??g.jsx("div",{className:"flex items-center justify-center h-full text-neutral-600 text-sm",children:"Select a file to edit"})})]}),R2&&L==="blocks"&&E&&g.jsx(Kz,{onAddBlock:E,onPreviewBlock:j}),C&&g.jsx("div",{className:"border-t border-neutral-800 p-2 flex-shrink-0",children:g.jsxs("button",{onClick:C,disabled:M,className:"w-full flex items-center justify-center gap-1.5 px-2 py-1.5 rounded-md text-[11px] font-medium text-neutral-500 hover:text-amber-300 hover:bg-neutral-800 transition-colors disabled:opacity-40",children:[g.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[g.jsx("path",{d:"M9 11l3 3L22 4"}),g.jsx("path",{d:"M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11"})]}),M?"Linting…":"Lint"]})})]})})}));function oF({projectId:t,filePath:e}){const n=`/api/projects/${t}/preview/${e}`,r=e.split("/").pop()??e;return eu.test(e)?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950",children:[g.jsx("img",{src:n,alt:r,className:"max-w-full max-h-[70%] object-contain rounded border border-neutral-800"}),g.jsx("span",{className:"mt-3 text-[11px] text-neutral-500 font-mono",children:e})]}):yg.test(e)?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950",children:[g.jsx("video",{src:n,controls:!0,className:"max-w-full max-h-[70%] rounded border border-neutral-800"}),g.jsx("span",{className:"mt-3 text-[11px] text-neutral-500 font-mono",children:e})]}):bg.test(e)?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950 gap-3",children:[g.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[g.jsx("path",{d:"M9 18V5l12-2v13",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("circle",{cx:"6",cy:"18",r:"3"}),g.jsx("circle",{cx:"18",cy:"16",r:"3"})]}),g.jsx("audio",{src:n,controls:!0,className:"w-full max-w-[280px]"}),g.jsx("span",{className:"text-[11px] text-neutral-500 font-mono",children:e})]}):g.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-4 bg-neutral-950 gap-2",children:[g.jsxs("svg",{width:"40",height:"40",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-600",children:[g.jsx("path",{d:"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("polyline",{points:"14 2 14 8 20 8",strokeLinecap:"round",strokeLinejoin:"round"})]}),g.jsx("span",{className:"text-sm text-neutral-400 font-medium",children:r}),g.jsx("span",{className:"text-[11px] text-neutral-600 font-mono",children:e}),g.jsx("span",{className:"text-[10px] text-neutral-600",children:"Binary file — preview not available"})]})}const HA=d.createContext(null);function XA(){const t=d.useContext(HA);if(!t)throw new Error("useFileManagerContext must be used within FileManagerProvider");return t}function cF({value:{editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:l,editingPathRef:o,projectIdRef:c,saveRafRef:f,importedFontAssetsRef:m,readProjectFile:p,writeProjectFile:O,readOptionalProjectFile:y,revealSourceOffset:b,openSourceForSelection:S,handleFileSelect:w,handleContentChange:A,refreshFileTree:k,uploadProjectFiles:$,handleCreateFile:Q,handleCreateFolder:C,handleDeleteFile:M,handleRenameFile:Z,handleDuplicateFile:E,handleMoveFile:j,handleImportFiles:_,handleImportFonts:H,compositions:L,assets:z,fontAssets:F},children:ee}){const W=d.useMemo(()=>({editingFile:t,setEditingFile:e,projectDir:n,fileTree:r,fileTreeLoaded:i,setFileTree:l,editingPathRef:o,projectIdRef:c,saveRafRef:f,importedFontAssetsRef:m,readProjectFile:p,writeProjectFile:O,readOptionalProjectFile:y,revealSourceOffset:b,openSourceForSelection:S,handleFileSelect:w,handleContentChange:A,refreshFileTree:k,uploadProjectFiles:$,handleCreateFile:Q,handleCreateFolder:C,handleDeleteFile:M,handleRenameFile:Z,handleDuplicateFile:E,handleMoveFile:j,handleImportFiles:_,handleImportFonts:H,compositions:L,assets:z,fontAssets:F}),[t,e,n,r,i,l,o,c,f,m,p,O,y,b,S,w,A,k,$,Q,C,M,Z,E,j,_,H,L,z,F]);return g.jsx(HA,{value:W,children:ee})}const zA="hf-studio-render-settings";function FA(){try{const t=localStorage.getItem(zA);if(t){const e=JSON.parse(t);return{format:["mp4","webm","mov"].includes(e.format)?e.format:"mp4",quality:["draft","standard","high"].includes(e.quality)?e.quality:"standard",fps:[24,30,60].includes(e.fps)?e.fps:30}}}catch{}return{format:"mp4",quality:"standard",fps:30}}function Sm(t,e,n){try{localStorage.setItem(zA,JSON.stringify({format:t,quality:e,fps:n}))}catch{}}function uF({leftSidebarRef:t,onSelectComposition:e,onAddBlock:n,onPreviewBlock:r,onLint:i,linting:l}){const{leftCollapsed:o,leftWidth:c,toggleLeftSidebar:f,handlePanelResizeStart:m,handlePanelResizeMove:p,handlePanelResizeEnd:O}=Hg(),{projectId:y,renderQueue:b,waitForPendingDomEditSaves:S}=bu(),{compositions:w,assets:A,editingFile:k,fileTree:$,revealSourceOffset:Q,handleFileSelect:C,handleCreateFile:M,handleCreateFolder:Z,handleDeleteFile:E,handleRenameFile:j,handleDuplicateFile:_,handleMoveFile:H,handleImportFiles:L,handleContentChange:z}=XA(),F=d.useCallback(async ee=>{await S();const{format:W,quality:V,fps:G}=FA();await b.startRender({composition:ee,format:W,quality:V,fps:G})},[b,S]);return o?g.jsx("div",{className:"flex w-10 flex-shrink-0 flex-col items-center border-r border-neutral-800/50 bg-neutral-950 pt-1",children:g.jsx("button",{type:"button",onClick:f,className:"flex h-8 w-8 items-center justify-center rounded-md border border-transparent text-neutral-500 transition-colors hover:border-neutral-800 hover:bg-neutral-900 hover:text-neutral-300",title:"Show sidebar","aria-label":"Show sidebar",children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M5 4v16"}),g.jsx("path",{d:"m10 7 5 5-5 5"})]})})}):g.jsxs(g.Fragment,{children:[g.jsx(sF,{ref:t,width:c,projectId:y,compositions:w,assets:A,activeComposition:(k==null?void 0:k.path)??null,onSelectComposition:e,fileTree:$,editingFile:k,onSelectFile:C,onCreateFile:M,onCreateFolder:Z,onDeleteFile:E,onRenameFile:j,onDuplicateFile:_,onMoveFile:H,onImportFiles:L,codeChildren:k?Cv(k.path)?g.jsx(oF,{projectId:y,filePath:k.path}):g.jsx(Lz,{content:k.content??"",filePath:k.path,onChange:z,revealOffset:Q}):void 0,onRenderComposition:F,isRendering:b.isRendering,onLint:i,linting:l,onToggleCollapse:f,onAddBlock:n,onPreviewBlock:r}),g.jsx("div",{className:"group w-2 flex-shrink-0 cursor-col-resize flex items-center justify-center",style:{touchAction:"none"},onPointerDown:ee=>m("left",ee),onPointerMove:p,onPointerUp:O,children:g.jsx("div",{className:"h-[52px] w-px bg-white/12 transition-colors group-hover:bg-white/18 group-active:bg-white/24"})})]})}const fF=25,dF=400,hF='[data-preview-pan-surface="true"]',$f=48,ug={zoomPercent:100,panX:0,panY:0},mF=.007,Ob=10;function Na(t){return Math.round(t*1e4)/1e4}function Ji(t){return Number.isFinite(t)?Math.min(dF,Math.max(fF,t)):100}function pF(t){return t===1}function wm(t,e){return t instanceof Element?e!=null&&e.contains(t)?!0:!!t.closest(hF):!1}function gF(t,e){if(!Number.isFinite(t))return Ji(e);const r=-(Math.abs(t)>Ob?Ob*Math.sign(t):t)*mF,i=Ji(e);return Ji(i*Math.exp(r))}function YA(t){const e=Ji(t.zoomPercent)/100,n=t.contentWidth??t.viewportWidth,r=t.contentHeight??t.viewportHeight,i=Math.max(0,(n*e-t.viewportWidth)/2)+$f,l=Math.max(0,(r*e-t.viewportHeight)/2)+$f;return{panX:Math.min(i,Math.max(-i,t.panX)),panY:Math.min(l,Math.max(-l,t.panY))}}function OF(t,e,n,r,i,l,o){const c=Ji(n)/100,f=Math.abs(l*c-r)/2+$f,m=Math.abs(o*c-i)/2+$f;return{panX:Math.min(f,Math.max(-f,t)),panY:Math.min(m,Math.max(-m,e))}}function xF(t){const e=Ji(t.state.zoomPercent),n=gF(t.deltaY,e),r=e/100,i=n/100;let l=t.state.panX,o=t.state.panY;if(t.cursorX!==void 0&&t.cursorY!==void 0){const p=i/r;l=t.cursorX*(1-p)+l*p,o=t.cursorY*(1-p)+o*p}const c=t.contentWidth??t.viewportWidth,f=t.contentHeight??t.viewportHeight,m=OF(l,o,n,t.viewportWidth,t.viewportHeight,c,f);return{zoomPercent:n,...m}}function yF(t){const e=YA({panX:t.state.panX-t.deltaX,panY:t.state.panY-t.deltaY,zoomPercent:t.state.zoomPercent,viewportWidth:t.viewportWidth,viewportHeight:t.viewportHeight,contentWidth:t.contentWidth,contentHeight:t.contentHeight});return{zoomPercent:Ji(t.state.zoomPercent),...e}}function bF({projectId:t,directUrl:e}){return e??t}const vF=1200,SF=200,xb=16;function Am(t){return Math.abs(t.zoomPercent-100)<.5&&Math.abs(t.panX)<.1&&Math.abs(t.panY)<.1}function wF(){const t=Uc().previewZoom;return t?{zoomPercent:Ji(t.zoomPercent),panX:t.panX,panY:t.panY}:ug}function yb(t,e,n){const r=Math.max(0,t-xb),i=Math.max(0,e-xb),l=n?9/16:16/9;if(r===0||i===0)return{width:0,height:0};let o=r,c=o/l;return c>i&&(c=i,o=c*l),{width:Na(o),height:Na(c)}}const AF=d.memo(function({projectId:e,iframeRef:n,onIframeLoad:r,onCompositionLoadingChange:i,portrait:l,directUrl:o,suppressLoadingOverlay:c,onStageRef:f}){const m=bF({projectId:e,directUrl:o}),p=d.useRef(null),O=d.useRef(null);d.useEffect(()=>{f==null||f(O)},[f]);const[y,b]=d.useState(()=>yb(0,0,l)),S=d.useRef(wF()),[w,A]=d.useState(()=>S.current),k=d.useRef(null),$=d.useRef(null),Q=d.useRef(null),C=d.useRef(!1),M=d.useRef(null);d.useEffect(()=>()=>{Q.current&&clearTimeout(Q.current),$.current&&clearTimeout($.current)},[]),d.useEffect(()=>{const F=p.current;if(!F)return;const ee=()=>{const V=F.getBoundingClientRect();b(yb(V.width,V.height,l))};ee();const W=new ResizeObserver(ee);return W.observe(F),()=>W.disconnect()},[l]);const Z=d.useRef(y);Z.current=y;const E=d.useCallback(F=>{const ee=O.current;if(!ee)return;const W=Na(F.zoomPercent/100),V=Na(F.panX),G=Na(F.panY);ee.style.transform=`translate3d(${V}px, ${G}px, 0) scale(${W})`},[]),j=d.useCallback((F,ee)=>{const W={zoomPercent:Ji(F.zoomPercent),panX:Number.isFinite(F.panX)?F.panX:0,panY:Number.isFinite(F.panY)?F.panY:0};if(S.current=W,ee&&!C.current){C.current=!0;const V=k.current;V&&(V.style.opacity="1")}E(W),Q.current&&clearTimeout(Q.current),Q.current=setTimeout(()=>{C.current=!1;const V=S.current;if(Wc({previewZoom:V}),A(G=>G.zoomPercent===V.zoomPercent&&G.panX===V.panX&&G.panY===V.panY?G:V),ee){const G=k.current;G&&(G.textContent=Am(V)?"Fit":`${Math.round(V.zoomPercent)}%`,$.current&&clearTimeout($.current),$.current=setTimeout(()=>{k.current&&(k.current.style.opacity="0")},vF))}},SF)},[E]),_=d.useCallback(F=>j(F,!0),[j]),H=d.useCallback(F=>j(F,!1),[j]),L=d.useCallback(()=>{const F=S.current;(Math.abs(F.zoomPercent-100)>.5||Math.abs(F.panX)>.1||Math.abs(F.panY)>.1)&&E(F)},[E]);d.useEffect(()=>{const F=p.current;if(!F)return;const ee=W=>{const V=F.getBoundingClientRect();if(W.clientX<V.left||W.clientX>V.right||W.clientY<V.top||W.clientY>V.bottom)return;if(W.ctrlKey||W.metaKey){W.preventDefault(),W.stopPropagation();const D=Z.current,P=W.clientX-(V.left+V.width/2),R=W.clientY-(V.top+V.height/2),X=xF({state:S.current,deltaY:W.deltaY,viewportWidth:V.width,viewportHeight:V.height,contentWidth:D.width,contentHeight:D.height,cursorX:P,cursorY:R});_(X);return}if(!wm(W.target,O.current))return;W.preventDefault(),W.stopPropagation();const q=Z.current,B=yF({state:S.current,deltaX:W.deltaX,deltaY:W.deltaY,viewportWidth:V.width,viewportHeight:V.height,contentWidth:q.width,contentHeight:q.height});H(B)};return document.addEventListener("wheel",ee,{passive:!1,capture:!0}),()=>document.removeEventListener("wheel",ee,{capture:!0})},[_,H]),d.useEffect(()=>{const F=p.current;if(!F)return;const ee=W=>{if(Am(S.current))return;const V=F.getBoundingClientRect();W.clientX<V.left||W.clientX>V.right||W.clientY<V.top||W.clientY>V.bottom||_(ug)};return document.addEventListener("dblclick",ee,{capture:!0}),()=>document.removeEventListener("dblclick",ee,{capture:!0})},[_]),d.useEffect(()=>{const F=(q,B)=>{const D=p.current;if(!D)return null;const P=D.getBoundingClientRect();return q<P.left||q>P.right||B<P.top||B>P.bottom?null:P},ee=q=>{F(q.clientX,q.clientY)&&wm(q.target,O.current)&&pF(q.button)&&(q.preventDefault(),M.current={pointerId:q.pointerId,startX:q.clientX,startY:q.clientY,originX:S.current.panX,originY:S.current.panY})},W=q=>{const B=M.current,D=p.current;if(!B||!D||B.pointerId!==q.pointerId)return;q.preventDefault();const P=D.getBoundingClientRect(),R=Z.current,X=YA({panX:B.originX+q.clientX-B.startX,panY:B.originY+q.clientY-B.startY,zoomPercent:S.current.zoomPercent,viewportWidth:P.width,viewportHeight:P.height,contentWidth:R.width,contentHeight:R.height});H({...S.current,...X})},V=q=>{var B;((B=M.current)==null?void 0:B.pointerId)===q.pointerId&&(M.current=null)},G=q=>{q.button===1&&F(q.clientX,q.clientY)&&wm(q.target,O.current)&&q.preventDefault()};return document.addEventListener("pointerdown",ee,{capture:!0}),document.addEventListener("pointermove",W,{capture:!0}),document.addEventListener("pointerup",V,{capture:!0}),document.addEventListener("pointercancel",V,{capture:!0}),document.addEventListener("auxclick",G,{capture:!0}),()=>{document.removeEventListener("pointerdown",ee,{capture:!0}),document.removeEventListener("pointermove",W,{capture:!0}),document.removeEventListener("pointerup",V,{capture:!0}),document.removeEventListener("pointercancel",V,{capture:!0}),document.removeEventListener("auxclick",G,{capture:!0})}},[H]);const z=S.current;return g.jsx("div",{className:"flex flex-col h-full min-h-0",children:g.jsxs("div",{ref:p,className:"relative flex-1 flex items-center justify-center p-2 overflow-hidden min-h-0 outline-none focus:ring-1 focus:ring-studio-accent/40 bg-neutral-700",tabIndex:0,"aria-label":"Composition preview",children:[g.jsx("div",{className:"absolute inset-2 flex items-center justify-center pointer-events-none",children:g.jsx("div",{ref:O,className:"relative shrink-0 pointer-events-auto",style:{width:`${y.width}px`,height:`${y.height}px`,transform:`translate3d(${Na(z.panX)}px, ${Na(z.panY)}px, 0) scale(${Na(z.zoomPercent/100)})`,transformOrigin:"center center"},"data-testid":"preview-zoom-stage",children:g.jsx(fv,{ref:n,projectId:o?void 0:e,directUrl:o,onLoad:()=>{r(),L()},onCompositionLoadingChange:i,portrait:l,suppressLoadingOverlay:c},m)})}),g.jsx("div",{ref:k,className:"pointer-events-none absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-50 rounded-lg px-4 py-2 text-sm font-mono tabular-nums text-white/90 bg-black/60 backdrop-blur-sm shadow-lg",style:{opacity:0,transition:"opacity 300ms ease-out"},"aria-live":"polite"}),!Am(w)&&g.jsxs("button",{type:"button",className:"absolute bottom-3 right-3 z-50 rounded-md px-2.5 py-1 text-xs font-medium text-white/80 bg-black/50 backdrop-blur-sm hover:bg-black/70 hover:text-white transition-colors",onClick:()=>_(ug),"aria-label":"Reset zoom to fit","data-testid":"preview-reset-zoom",children:[Math.round(w.zoomPercent),"% — Reset"]})]})})});function kF({stack:t,onNavigate:e}){return t.length<=1?null:g.jsxs("nav",{"aria-label":"Composition navigation",className:"flex items-center gap-1 px-2 h-8 border-b border-neutral-800/50 bg-neutral-900/50 flex-shrink-0",children:[g.jsx("button",{type:"button",onClick:()=>{var n;Nt("navigation",{action:"back",target:(n=t[t.length-2])==null?void 0:n.label}),e(t.length-2)},className:"flex items-center gap-1 px-1.5 py-0.5 rounded text-xs text-neutral-400 hover:text-white hover:bg-neutral-800 transition-colors",title:"Back (Esc)",children:g.jsx(I$,{size:12,weight:"bold"})}),t.map((n,r)=>{const i=r===t.length-1;return g.jsxs("span",{className:"flex items-center gap-1",children:[r>0&&g.jsx(_v,{size:10,className:"text-neutral-600 flex-shrink-0"}),i?g.jsx("span",{className:"text-xs text-neutral-200 font-medium",children:n.label}):g.jsx("button",{type:"button",onClick:()=>{Nt("navigation",{action:"breadcrumb",target:n.label}),e(r)},className:"text-xs text-neutral-500 hover:text-neutral-200 transition-colors",children:n.label})]},n.id)})]})}function MF(t){try{const e=JSON.parse(t);return e.name?e:null}catch{return null}}function TF(t,e,n,r){if(n.width===0||n.height===0)return null;const i=(t-n.left)/n.width,l=(e-n.top)/n.height,o=r?1080:1920,c=r?1920:1080;return{left:Math.max(0,Math.min(i*o,o)),top:Math.max(0,Math.min(l*c,c))}}function CF(t,e){var i,l;const n=((i=e.dimensions)==null?void 0:i.width)??0,r=((l=e.dimensions)==null?void 0:l.height)??0;return{left:Math.max(0,t.left-n/2),top:Math.max(0,t.top-r/2)}}function EF({portrait:t,stageRef:e,onBlockDrop:n}){const[r,i]=d.useState(!1),l=d.useCallback(f=>{n&&f.dataTransfer.types.includes(tu)&&(f.preventDefault(),f.dataTransfer.dropEffect="copy",i(!0))},[n]),o=d.useCallback(()=>{i(!1)},[]),c=d.useCallback(f=>{if(i(!1),!n)return;const m=f.dataTransfer.getData(tu);if(!m)return;f.preventDefault();const p=MF(m),O=e.current;if(!p||!O)return;const y=TF(f.clientX,f.clientY,O.getBoundingClientRect(),t);y&&n(p.name,CF(y,p))},[n,e,t]);return{isDragOver:r,handleDragOver:l,handleDragLeave:o,handleDrop:c}}function $F({projectId:t,activeCompositionPath:e,onCompositionChange:n}){const[r,i]=d.useState([{id:"master",label:"Master",previewUrl:`/api/projects/${t}/preview`}]),l=d.useRef(n);l.current=n;const o=d.useCallback(b=>{i(S=>{var k;const w=typeof b=="function"?b(S):b,A=(k=w[w.length-1])==null?void 0:k.id;return queueMicrotask(()=>{var $;return($=l.current)==null?void 0:$.call(l,A==="master"?null:A)}),w})},[]),c=d.useRef(0),[f,m]=d.useState(new Map),p=d.useRef(f);p.current=f;const O=d.useCallback(b=>{b===0&&c.current>0&&ge.getState().setCurrentTime(c.current),ge.getState().setElements([]),o(S=>S.slice(0,b+1))},[]),y=d.useCallback(b=>{if(!b.compositionSrc)return;c.current=ge.getState().currentTime;const S=b.id;let w=p.current.get(S);if(!w){const A=b.compositionSrc,k=A.match(/compositions\/.*\.html/);w=k?k[0]:A}ge.getState().setElements([]),o(A=>{var C;if(A[A.length-1].id===w&&A.length>1)return A.slice(0,-1);const $=((C=w.split("/").pop())==null?void 0:C.replace(/\.html$/,""))||w,Q=`/api/projects/${t}/preview/comp/${w}`;return[...A,{id:w,label:$,previewUrl:Q}]})},[t]);return d.useEffect(()=>{if(e==="index.html")ge.getState().setElements([]),o(b=>b.length>1?[b[0]]:b);else if(e&&e.startsWith("compositions/")){const b=e.replace(/^compositions\//,"").replace(/\.html$/,""),S=`/api/projects/${t}/preview/comp/${e}`;ge.getState().setElements([]),o(w=>{var A;return((A=w[w.length-1])==null?void 0:A.id)===e?w:[{id:"master",label:"Master",previewUrl:`/api/projects/${t}/preview`},{id:e,label:b,previewUrl:S}]})}else e||ge.getState().setElements([])},[e,t,o]),{compositionStack:r,updateCompositionStack:o,handleNavigateComposition:O,handleDrillDown:y,masterSeekRef:c,compIdToSrc:f,setCompIdToSrc:m}}const QF=100,PF=220,ZF=120;function jF(t){return document.addEventListener("fullscreenchange",t),()=>document.removeEventListener("fullscreenchange",t)}function RF(){return document.fullscreenElement}const NF=d.memo(function({projectId:e,portrait:n,previewOverlay:r,timelineToolbar:i,timelineFooter:l,refreshKey:o,activeCompositionPath:c,onIframeRef:f,onCompositionChange:m,renderClipContent:p,onFileDrop:O,onDeleteElement:y,onAssetDrop:b,onBlockDrop:S,onPreviewBlockDrop:w,onMoveElement:A,onResizeElement:k,onBlockedEditAttempt:$,onSelectTimelineElement:Q,onCompIdToSrcChange:C,timelineVisible:M,onToggleTimeline:Z,onCompositionLoadingChange:E}){const{iframeRef:j,togglePlay:_,seek:H,onIframeLoad:L,refreshPlayer:z}=GE(),F=d.useRef(e);F.current!==e&&(F.current=e,ge.getState().reset());const ee=d.useRef(null),W=d.useCallback(Ne=>{ee.current=Ne.current},[]),{isDragOver:V,handleDragOver:G,handleDragLeave:q,handleDrop:B}=EF({portrait:n,stageRef:ee,onBlockDrop:w}),D=d.useRef(o);d.useEffect(()=>{o!==D.current&&(D.current=o,z())},[o,z]);const P=d.useCallback(()=>{L(),f==null||f(j.current)},[L,j,f]),{compositionStack:R,updateCompositionStack:X,handleNavigateComposition:Y,handleDrillDown:U,compIdToSrc:te,setCompIdToSrc:ne}=$F({projectId:e,activeCompositionPath:c,onCompositionChange:m}),ce=j,me=d.useCallback(Ne=>{var ze;if(!Ne.compositionSrc)return;const Mt=Ne.id;let St=te.get(Mt);if(!St)try{const rt=(ze=ce.current)==null?void 0:ze.contentDocument;if(rt){const Ye=rt.querySelector(`[data-composition-id="${Mt}"][data-composition-src]`);Ye&&(St=Ye.getAttribute("data-composition-src")||void 0)}}catch{}U({id:Mt,compositionSrc:St??Ne.compositionSrc})},[te,U,ce]),Se=d.useRef(te);Se.current=te,Qt(()=>{fetch(`/api/projects/${e}/files/index.html`).then(Ne=>Ne.json()).then(Ne=>{const Mt=Ne.content||"",St=new Map,ze=/data-composition-id=["']([^"']+)["'][^>]*data-composition-src=["']([^"']+)["']|data-composition-src=["']([^"']+)["'][^>]*data-composition-id=["']([^"']+)["']/g;let rt;for(;(rt=ze.exec(Mt))!==null;){const Ye=rt[1]||rt[4],nn=rt[2]||rt[3];Ye&&nn&&St.set(Ye,nn)}ne(St),C==null||C(St)}).catch(()=>{})}),d.useEffect(()=>{if(te.size===0)return;const Ne=ze=>{const rt=Se.current;if(rt.size===0)return null;let Ye=!1;const nn=ze.map(Rn=>{if(Rn.compositionSrc)return Rn;const pr=rt.get(Rn.id)??rt.get(Rn.id.replace(/-(host|comp|layer)$/,""));return pr?(Ye=!0,{...Rn,compositionSrc:pr}):Rn});return Ye?nn:null},Mt=Ne(ge.getState().elements);Mt&&ge.getState().setElements(Mt);let St=!1;return ge.subscribe((ze,rt)=>{if(St||ze.elements===rt.elements||ze.elements.length===0||ze.elements.every(nn=>nn.compositionSrc))return;St=!0;const Ye=Ne(ze.elements);Ye&&ze.setElements(Ye),St=!1})},[te]);const[pe,ae]=d.useState(PF),xe=d.useRef(!1),[Qe,$e]=d.useState(!0),Ze=d.useCallback(Ne=>{Ne||(xe.current=!0),!(Ne&&xe.current)&&$e(Ne)},[]),Je=Qe;d.useEffect(()=>{E==null||E(Qe)},[Qe,E]);const Ue=d.useSyncExternalStore(jF,RF),ve=M??!0,bt=d.useRef(!1),nt=d.useRef(null),Re=Ue===nt.current&&Ue!=null,kt=d.useCallback(()=>{nt.current&&(document.fullscreenElement?document.exitFullscreen():nt.current.requestFullscreen())},[]),Fe=R[R.length-1],Gt=R.length>1?Fe.previewUrl:void 0,Lt=d.useRef(f);Lt.current=f,d.useEffect(()=>{var Ne;(Ne=Lt.current)==null||Ne.call(Lt,j.current)},[R.length,o,j]);const st=d.useCallback(Ne=>{Je||(Ne.preventDefault(),bt.current=!0,Ne.target.setPointerCapture(Ne.pointerId))},[Je]),tn=d.useCallback(Ne=>{if(Je||!bt.current||!nt.current)return;const Mt=nt.current.getBoundingClientRect(),St=Ne.clientY-Mt.top,ze=Mt.height,rt=Math.max(QF,Math.min(ze-ZF,ze-St));ae(rt)},[Je]),Ci=d.useCallback(()=>{bt.current=!1},[]),mr=d.useCallback(Ne=>{Ne.key==="Escape"&&R.length>1&&X(Mt=>Mt.slice(0,-1))},[R.length]);return g.jsxs("div",{ref:nt,className:"flex flex-col h-full min-h-0 bg-neutral-950",onKeyDown:mr,tabIndex:-1,"data-studio-fullscreen-target":"",children:[g.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[g.jsxs("div",{className:"flex-1 min-h-0 relative","data-preview-pan-surface":"true",onDragOver:G,onDragLeave:q,onDrop:B,children:[g.jsx(AF,{projectId:e,iframeRef:j,onIframeLoad:P,onCompositionLoadingChange:Ze,portrait:n,directUrl:Gt,suppressLoadingOverlay:xe.current,onStageRef:W}),V&&g.jsx("div",{className:"absolute inset-2 z-40 rounded-lg border-2 border-dashed border-studio-accent/50 bg-studio-accent/[0.04] pointer-events-none"}),!Re&&r]}),g.jsxs("div",{className:"bg-neutral-950 border-t border-neutral-800/50 flex-shrink-0",children:[!Re&&R.length>1&&g.jsx(kF,{stack:R,onNavigate:Y}),g.jsx(_C,{onTogglePlay:_,onSeek:H,disabled:Je,isFullscreen:Re,onToggleFullscreen:kt})]})]}),!Re&&ve?g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"group h-2 flex-shrink-0 cursor-row-resize flex items-center justify-center z-10",style:{touchAction:"none"},onPointerDown:st,onPointerMove:tn,onPointerUp:Ci,children:g.jsx("div",{className:"h-px w-full bg-white/10 transition-colors group-hover:bg-white/16 group-active:bg-white/22"})}),g.jsxs("div",{className:"relative flex flex-col flex-shrink-0",style:{height:pe},"aria-disabled":Je||void 0,children:[g.jsxs("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden bg-neutral-950",onDoubleClick:Ne=>{Ne.target.closest("[data-clip]")||Je||R.length>1&&X(Mt=>Mt.slice(0,-1))},children:[g.jsx("div",{className:"flex-shrink-0",children:i}),g.jsx(QE,{onSeek:H,onDrillDown:me,renderClipContent:p,onFileDrop:O,onDeleteElement:y,onAssetDrop:b,onBlockDrop:S,onMoveElement:A,onResizeElement:k,onBlockedEditAttempt:$,onSelectElement:Q})]}),l&&g.jsx("div",{className:"flex-shrink-0",children:l}),Je&&g.jsx("div",{className:"absolute inset-0 z-30 cursor-not-allowed bg-black/18","data-testid":"timeline-loading-disabled-overlay","aria-hidden":"true",onPointerDown:Ne=>Ne.preventDefault(),onDragOver:Ne=>Ne.preventDefault(),onDrop:Ne=>Ne.preventDefault()})]})]}):!Re&&Z?g.jsx("div",{className:"flex-shrink-0 border-t border-neutral-800/50 bg-neutral-950/96",children:g.jsxs("div",{className:"flex h-10 items-center justify-between px-3",children:[g.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-500",children:"Timeline"}),g.jsxs("button",{type:"button",onClick:Z,className:"flex h-7 items-center gap-1.5 rounded-md border border-neutral-800 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-700 hover:bg-neutral-900 hover:text-neutral-100",title:l7(!1),"aria-label":"Show timeline editor",children:[g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),g.jsx("path",{d:"M7 9h10"}),g.jsx("path",{d:"M8 5h8"})]}),g.jsx("span",{children:"Show"}),g.jsx("span",{className:"hidden rounded bg-white/5 px-1 py-0.5 font-mono text-[9px] text-neutral-500 sm:inline",children:a7})]})]})}):null]})}),VF=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]);function LF(t){return t.metaKey||t.ctrlKey||t.altKey?!1:VF.has(t.key)}function _F(t,e,n){var b,S;let r=null,i=null;try{r=t.contentDocument,i=t.contentWindow}catch{return[]}if(!r||!i)return[];const l=t.getBoundingClientRect(),o=n.getBoundingClientRect(),c=parseFloat(t.style.width)||l.width,f=l.width/c,m=l.left-o.left,p=l.top-o.top,O=r.querySelectorAll(".caption-group"),y=[];for(let w=0;w<e.groupOrder.length;w++){const A=e.groupOrder[w],k=e.groups.get(A);if(!k)continue;const $=O[w];if(!$)continue;const Q=i.getComputedStyle($);if(parseFloat(Q.opacity)<=.01||Q.visibility==="hidden")continue;const C=[];for(const M of $.children){const Z=M;if(Z.dataset.captionWrapper==="true"){const E=Z.querySelector(":scope > span");E&&C.push(E)}else Z.tagName==="SPAN"&&C.push(Z)}if(C.length===0&&((b=$.textContent)!=null&&b.trim())){const M=$.childNodes[0];if(M&&M.nodeType===Node.TEXT_NODE){const Z=(M.textContent||"").split(/\s+/).filter(Boolean),E=r.createDocumentFragment();for(const j of Z){const _=r.createElement("span");_.textContent=j+" ",_.style.display="inline",E.appendChild(_),C.push(_)}$.replaceChild(E,M)}else{const Z=$.querySelector(":scope > span");if(Z&&((S=Z.textContent)!=null&&S.trim())){const E=Z.textContent.split(/\s+/).filter(Boolean),j=r.createDocumentFragment();for(const _ of E){const H=r.createElement("span");H.textContent=_+" ",H.style.display="inline",j.appendChild(H),C.push(H)}Z.replaceWith(j)}}}for(let M=0;M<k.segmentIds.length;M++){const Z=k.segmentIds[M],E=C[M];if(!E)continue;const j=E.getBoundingClientRect();y.push({segmentId:Z,groupId:A,groupIndex:w,wordIndex:M,x:j.left*f+m,y:j.top*f+p,width:j.width*f,height:j.height*f})}}return y}function v1(t,e,n){let r=null;try{r=t.contentDocument}catch{return null}if(!r)return null;const i=r.querySelectorAll(".caption-group")[e];if(!i)return null;const l=[];for(const o of i.children){const c=o;if(c.dataset.captionWrapper==="true"){const f=c.querySelector(":scope > span");f&&l.push(f)}else c.tagName==="SPAN"&&l.push(c)}return l[n]??null}function Zc(t,e){const n=e.gsap;if(n&&n.getProperty)return{x:n.getProperty(t,"x")||0,y:n.getProperty(t,"y")||0,scale:n.getProperty(t,"scale")||1,rotation:n.getProperty(t,"rotation")||0};const r=t.style.transform||"",i=r.match(/scale\(([^)]+)\)/),l=r.match(/rotate\(([^)]+)deg\)/),o=r.match(/translate\(([^,]+)px,\s*([^)]+)px\)/);return{x:o?parseFloat(o[1]):0,y:o?parseFloat(o[2]):0,scale:i?parseFloat(i[1]):1,rotation:l?parseFloat(l[1]):0}}function qs(t){var i;if(t.dataset.captionWrapper==="true")return t;const e=t.parentElement;if(e&&e.dataset.captionWrapper==="true")return e;const r=t.ownerDocument.createElement("span");return r.style.display="inline-block",r.dataset.captionWrapper="true",(i=t.parentNode)==null||i.insertBefore(r,t),r.appendChild(t),r}function S1(t,e,n,r,i,l){const o=qs(t),c=e.gsap;c&&c.set?c.set(o,{x:n,y:r,scale:i,rotation:l}):o.style.transform=`translate(${n.toFixed(1)}px, ${r.toFixed(1)}px) rotate(${l.toFixed(1)}deg) scale(${i.toFixed(3)})`}function DF(t,e){const n=qs(t),{x:r,y:i,scale:l,rotation:o}=Zc(n,e),c={};return Math.abs(r)>.5&&(c.x=r),Math.abs(i)>.5&&(c.y=i),Math.abs(l-1)>.001&&(c.scaleX=l,c.scaleY=l),Math.abs(o)>.1&&(c.rotation=o),c}const zn=8,km=20;function bb(t,e,n){const r=DF(e,n);Object.keys(r).length>0&&at.getState().updateSegmentStyle(t,r)}const HF=d.memo(function({iframeRef:e}){const n=at(C=>C.isEditMode),r=at(C=>C.model),i=at(C=>C.selectedSegmentIds),l=at(C=>C.selectSegment),o=at(C=>C.clearSelection),[c,f]=d.useState([]),m=d.useRef(null),p=d.useRef(r);p.current=r;const O=d.useRef(null);Qt(()=>{if(!n)return;let C=[];const M=()=>{const j=e.current,_=p.current,H=m.current;if(!j||!_||!H)return;const L=_F(j,_,H);L.length===C.length&&L.every((z,F)=>Math.abs(z.x-C[F].x)<.5&&Math.abs(z.y-C[F].y)<.5)||(C=L,f(L))},Z=setInterval(M,66);M();const E=j=>{const{selectedSegmentIds:_,model:H}=at.getState();if(_.size===0||!H)return;const L=j.key;if(!LF(j))return;j.preventDefault();const z=j.shiftKey?10:1,F=L==="ArrowLeft"?-z:L==="ArrowRight"?z:0,ee=L==="ArrowUp"?-z:L==="ArrowDown"?z:0,W=e.current,V=W==null?void 0:W.contentWindow;if(!(!W||!V))for(const G of _)for(let q=0;q<H.groupOrder.length;q++){const B=H.groups.get(H.groupOrder[q]);if(!B)continue;const D=B.segmentIds.indexOf(G);if(D<0)continue;const P=v1(W,q,D);if(!P)continue;const R=qs(P),X=Zc(R,V);S1(P,V,X.x+F,X.y+ee,X.scale,X.rotation),bb(G,P,V);break}};return window.addEventListener("keydown",E),()=>{clearInterval(Z),window.removeEventListener("keydown",E)}});const y=d.useCallback(()=>{const C=e.current;if(!C)return 1;const M=C.getBoundingClientRect(),Z=parseFloat(C.style.width)||M.width;return M.width/Z},[e]),b=d.useCallback((C,M,Z,E)=>{E.stopPropagation(),E.currentTarget.setPointerCapture(E.pointerId);const j=e.current;if(!j)return;const _=v1(j,C,M),H=j.contentWindow;if(!_||!H)return;const L=Zc(qs(_),H);O.current={type:"move",wordEl:_,segmentId:Z,startMX:E.clientX,startMY:E.clientY,origTX:L.x,origTY:L.y,origScale:L.scale,origRotation:L.rotation}},[e]),S=d.useCallback((C,M,Z,E)=>{var W;E.stopPropagation(),E.preventDefault(),E.currentTarget.setPointerCapture(E.pointerId);const j=e.current;if(!j)return;const _=v1(j,C,M),H=j.contentWindow;if(!_||!H)return;const L=_.getBoundingClientRect(),z=y(),F=L.left*z+(((W=e.current)==null?void 0:W.getBoundingClientRect().left)??0)+L.width*z/2,ee=Zc(qs(_),H);O.current={type:"scale",wordEl:_,segmentId:Z,startMX:E.clientX,startDxFromCenter:E.clientX-F,origTX:ee.x,origTY:ee.y,origScale:ee.scale,origRotation:ee.rotation}},[e,y]),w=d.useCallback((C,M)=>{M.stopPropagation(),M.preventDefault(),M.currentTarget.setPointerCapture(M.pointerId);const Z=e.current;if(!Z)return;const E=v1(Z,C.groupIndex,C.wordIndex),j=Z.contentWindow;if(!E||!j)return;const _=Zc(qs(E),j);O.current={type:"rotate",wordEl:E,segmentId:C.segmentId,startMX:M.clientX,origTX:_.x,origTY:_.y,origRotation:_.rotation,origScale:_.scale}},[e]),A=d.useCallback(()=>{var C;try{return((C=e.current)==null?void 0:C.contentWindow)??null}catch{return null}},[e]),k=d.useCallback(C=>{const M=O.current;if(!M)return;const Z=A();if(Z){if(M.type==="move"){const E=y(),j=(C.clientX-M.startMX)/E,_=(C.clientY-M.startMY)/E;S1(M.wordEl,Z,M.origTX+j,M.origTY+_,M.origScale,M.origRotation)}else if(M.type==="scale"){const E=M.startMX-M.startDxFromCenter,j=Math.abs(M.startDxFromCenter),_=Math.abs(C.clientX-E),H=j>5?_/j:1,L=Math.max(.1,M.origScale*H);S1(M.wordEl,Z,M.origTX,M.origTY,L,M.origRotation)}else if(M.type==="rotate"){const j=(C.clientX-M.startMX)/200*90;S1(M.wordEl,Z,M.origTX,M.origTY,M.origScale,M.origRotation+j)}}},[y,A]),$=d.useCallback(()=>{const C=O.current;if(C){const M=A();M&&bb(C.segmentId,C.wordEl,M),O.current=null}},[A]),Q=d.useCallback(C=>{C.target===C.currentTarget&&o()},[o]);return n?g.jsx("div",{ref:m,className:"absolute inset-0 z-50",style:{pointerEvents:"auto"},onClick:Q,onPointerMove:k,onPointerUp:$,onLostPointerCapture:$,children:c.map(C=>{const M=i.has(C.segmentId);return g.jsx("div",{className:["absolute",M?"ring-2 ring-studio-accent":"hover:ring-1 hover:ring-white/30"].join(" "),style:{left:C.x,top:C.y,width:C.width,height:C.height,cursor:M?"move":"pointer",touchAction:"none",borderRadius:2},onClick:Z=>{Z.stopPropagation(),l(C.segmentId,Z.shiftKey)},onPointerDown:Z=>{M&&b(C.groupIndex,C.wordIndex,C.segmentId,Z)},children:M&&g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{position:"absolute",left:"50%",top:-km-zn,marginLeft:-zn/2,width:zn,height:zn,borderRadius:"50%",backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",cursor:"grab",touchAction:"none"},onPointerDown:Z=>w(C,Z)}),g.jsx("div",{style:{position:"absolute",left:"50%",top:-km,width:1,height:km,marginLeft:-.5,backgroundColor:"var(--hf-accent, #3CE6AC)",opacity:.5,pointerEvents:"none"}}),[{right:-zn/2,bottom:-zn/2,cursor:"nwse-resize"},{left:-zn/2,top:-zn/2,cursor:"nwse-resize"},{right:-zn/2,top:-zn/2,cursor:"nesw-resize"},{left:-zn/2,bottom:-zn/2,cursor:"nesw-resize"}].map((Z,E)=>g.jsx("div",{style:{position:"absolute",...Z,width:zn,height:zn,backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",borderRadius:2,touchAction:"none"},onPointerDown:j=>S(C.groupIndex,C.wordIndex,C.segmentId,j)},E))]})},C.segmentId)})}):null}),vb=["#3CE6AC","#FF6B6B","#4ECDC4","#FFE66D","#A78BFA","#F472B6","#34D399","#FB923C","#60A5FA","#C084FC"],XF=d.memo(function({pixelsPerSecond:e,onSeek:n}){const r=at(w=>w.model),i=at(w=>w.selectedSegmentIds),l=at(w=>w.selectSegment),o=at(w=>w.updateSegmentTiming),c=at(w=>w.splitGroup),f=d.useRef(null),m=d.useCallback((w,A,k,$,Q)=>{w.stopPropagation(),w.preventDefault(),w.target.setPointerCapture(w.pointerId),f.current={segId:A,edge:k,originalStart:$,originalEnd:Q,startX:w.clientX}},[]),p=d.useCallback(w=>{const A=f.current;if(!A)return;const k=(w.clientX-A.startX)/e;if(A.edge==="start"){const $=Math.max(0,A.originalStart+k),Q=Math.min($,A.originalEnd-.05);o(A.segId,Q,A.originalEnd)}else{const $=Math.max(A.originalStart+.05,A.originalEnd+k),Q=Math.max(0,$);o(A.segId,A.originalStart,Q)}},[e,o]),O=d.useCallback(()=>{f.current=null},[]),y=d.useCallback((w,A)=>{w.stopPropagation(),l(A,w.shiftKey)},[l]),b=d.useCallback((w,A,k)=>{w.stopPropagation(),c(A,k)},[c]),S=d.useCallback(w=>{if(!n)return;const A=w.currentTarget.getBoundingClientRect(),k=w.clientX-A.left-32,$=Math.max(0,k/e);n($)},[n,e]);return r?g.jsx("div",{className:"relative select-none overflow-x-auto",style:{height:40,minWidth:"100%"},onPointerMove:p,onPointerUp:O,onPointerLeave:O,onClick:S,children:r.groupOrder.map((w,A)=>{const k=r.groups.get(w);if(!k)return null;const $=vb[A%vb.length];return k.segmentIds.map(Q=>{const C=r.segments.get(Q);if(!C)return null;const M=32+C.start*e,Z=Math.max((C.end-C.start)*e,4),E=i.has(Q);return g.jsxs("div",{className:`absolute top-1 bottom-1 rounded flex items-center overflow-hidden cursor-pointer${E?" ring-1 ring-white/50 z-10":""}`,style:{left:M,width:Z,backgroundColor:$,zIndex:E?10:1},onClick:j=>y(j,Q),onDoubleClick:j=>b(j,w,Q),children:[g.jsx("div",{className:"absolute left-0 top-0 bottom-0 cursor-col-resize z-20",style:{width:6},onPointerDown:j=>m(j,Q,"start",C.start,C.end)}),g.jsx("span",{className:"flex-1 truncate px-2 pointer-events-none",style:{fontSize:9,color:"#000000",lineHeight:1},children:C.text}),g.jsx("div",{className:"absolute right-0 top-0 bottom-0 cursor-col-resize z-20",style:{width:6},onPointerDown:j=>m(j,Q,"end",C.start,C.end)})]},Q)})})}):null});function zF(t){const e=t.ownerDocument.defaultView;if(!e)return!0;let n=t;for(;n;){const r=e.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden")return!1;const i=Number.parseFloat(r.opacity);if(Number.isFinite(i)&&i<=.01)return!1;n=n.parentElement}return!0}function Sb(t){if(!t)return null;const e=Number.parseFloat(t);return Number.isFinite(e)&&e>0?e:null}function FF(t){let e=t;for(;e;){if(e.hasAttribute("data-composition-file")||e.hasAttribute("data-composition-src"))return e;e=e.parentElement}return null}function YF(t){const e=t.rootScaleX>0?t.rootScaleX:1,n=t.rootScaleY>0?t.rootScaleY:1,r=t.sourceRectWidth&&t.sourceRectWidth>0&&t.sourceWidth&&t.sourceWidth>0?t.sourceRectWidth*e/t.sourceWidth:e,i=t.sourceRectHeight&&t.sourceRectHeight>0&&t.sourceHeight&&t.sourceHeight>0?t.sourceRectHeight*n/t.sourceHeight:n;return{scaleX:r>0?r:e,scaleY:i>0?i:n}}function Fc(t,e,n){const r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),l=e.contentDocument,o=(l==null?void 0:l.querySelector("[data-composition-id]"))??(l==null?void 0:l.documentElement)??null,c=o==null?void 0:o.getBoundingClientRect(),f=c==null?void 0:c.width,m=c==null?void 0:c.height;if(!f||!m)return null;const p=n.getBoundingClientRect(),O=r.width/f,y=r.height/m,b=FF(n),S=b==null?void 0:b.getBoundingClientRect(),w=YF({rootScaleX:O,rootScaleY:y,sourceRectWidth:S==null?void 0:S.width,sourceRectHeight:S==null?void 0:S.height,sourceWidth:Sb((b==null?void 0:b.getAttribute("data-width"))??null),sourceHeight:Sb((b==null?void 0:b.getAttribute("data-height"))??null)});return{left:r.left-i.left+(p.left-c.left)*O,top:r.top-i.top+(p.top-c.top)*y,width:p.width*O,height:p.height*y,editScaleX:w.scaleX,editScaleY:w.scaleY}}const w1=.5;function fg(t,e){return t===e?!0:!t||!e?!1:Math.abs(t.left-e.left)<w1&&Math.abs(t.top-e.top)<w1&&Math.abs(t.width-e.width)<w1&&Math.abs(t.height-e.height)<w1&&Math.abs(t.editScaleX-e.editScaleX)<.001&&Math.abs(t.editScaleY-e.editScaleY)<.001}function BF(t,e){return t===e?!0:t.length!==e.length?!1:t.every((n,r)=>{const i=e[r];return!!(i&&n.key===i.key&&n.element===i.element&&n.selection===i.selection&&fg(n.rect,i.rect))})}function qF(t){const e=t[0];if(!e)return null;let n=e.left,r=e.top,i=e.left+e.width,l=e.top+e.height;for(const o of t.slice(1))n=Math.min(n,o.left),r=Math.min(r,o.top),i=Math.max(i,o.left+o.width),l=Math.max(l,o.top+o.height);return{left:n,top:r,width:i-n,height:l-r,editScaleX:1,editScaleY:1}}function IF(t){return t.filter(e=>!t.some(n=>n!==e&&n.element.contains(e.element)))}function Va(t){return[t.sourceFile??"",t.id??"",t.selector??"",t.selectorIndex??""].join("|")}function wb(t,e,n,r){const i=Va(e),l=r.current;if((l==null?void 0:l.key)===i&&l.element.isConnected&&l.element.ownerDocument===t)return l.element;const o=Yn(t,e,n);return r.current=o?{key:i,element:o}:null,o}const A1=4,k1=20,UF=.05,Ab=15;function WF(t){t==null||t.focus({preventScroll:!0})}function GF(t){const e=t.scaleX>0?t.scaleX:1,n=t.scaleY>0?t.scaleY:1;if(t.uniform){const r=t.dx/e,i=t.dy/n,l=Math.abs(r)>=Math.abs(i)?r:i,o=Math.max(1,Math.max(t.actualWidth,t.actualHeight)+l);return{overlayWidth:Math.max(k1,o*e),overlayHeight:Math.max(k1,o*n),width:o,height:o}}return{overlayWidth:Math.max(k1,t.originWidth+t.dx),overlayHeight:Math.max(k1,t.originHeight+t.dy),width:Math.max(1,t.actualWidth+t.dx/e),height:Math.max(1,t.actualHeight+t.dy/n)}}function kb(t,e,n,r){return Math.atan2(r-e,n-t)*180/Math.PI}function KF(t){return((t+180)%360+360)%360-180}function JF(t){return Math.round(t*10)/10}function Mb(t){const e=kb(t.centerX,t.centerY,t.startX,t.startY),n=kb(t.centerX,t.centerY,t.currentX,t.currentY),r=KF(n-e),i=t.actualAngle+r;return{angle:t.snap?Math.round(i/Ab)*Ab:JF(i)}}function eY(t,e){return Math.abs(e-t)>=UF}function tY({iframeRef:t,overlayRef:e,selectionRef:n,activeCompositionPathRef:r,groupSelectionsRef:i,hoverSelectionRef:l,rafPausedRef:o}){const[c,f]=d.useState(null),[m,p]=d.useState(null),[O,y]=d.useState([]),b=d.useRef(null),S=d.useRef(null),w=d.useRef([]),A=d.useRef(null),k=d.useRef(null),$=d.useRef(new Map),Q=E=>{fg(b.current,E)||(b.current=E,f(E))},C=E=>{fg(S.current,E)||(S.current=E,p(E))},M=E=>{BF(w.current,E)||(w.current=E,y(E))},Z=(E,j)=>{const _=Va(j),H=$.current.get(_);if(H!=null&&H.isConnected&&H.ownerDocument===E)return H;const L=Yn(E,j,r.current);return L?$.current.set(_,L):$.current.delete(_),L};return Qt(()=>{let E=0;const j=()=>{Q(null),C(null),M([])},_=()=>{if(E=requestAnimationFrame(_),o.current)return;const H=n.current,L=t.current,z=e.current;if(!L||!z){A.current=null,k.current=null,$.current.clear(),j();return}const F=L.contentDocument;if(!F){A.current=null,k.current=null,$.current.clear(),j();return}if(H){const B=wb(F,H,r.current,A);B&&zF(B)?Q(Fc(z,L,B)):Q(null)}else A.current=null,Q(null);const ee=i.current;if(ee.length>0){const B=[],D=new Set;for(const P of ee){const R=Va(P);D.add(R);const X=Z(F,P),Y=X?Fc(z,L,X):null;X&&Y&&B.push({key:R,selection:P,element:X,rect:Y})}for(const P of $.current.keys())D.has(P)||$.current.delete(P);M(B)}else $.current.clear(),M([]);const W=l.current,V=!!(H&&W&&Va(H)===Va(W)),G=!!(W&&ee.some(B=>Va(B)===Va(W)));if(!W||V||G){k.current=null,C(null);return}const q=wb(F,W,r.current,k);if(!q){C(null);return}C(Fc(z,L,q))};return E=requestAnimationFrame(_),()=>cancelAnimationFrame(E)}),{overlayRect:c,overlayRectRef:b,setOverlayRect:Q,hoverRect:m,hoverRectRef:S,setHoverRect:C,groupOverlayItems:O,groupOverlayItemsRef:w,setGroupOverlayItems:M}}const nY=100,Tb=.01,rY=1e-6;function Cb(t){return Number.isFinite(t.x)&&Number.isFinite(t.y)}function Eb(t){return Math.hypot(t.x,t.y)}function $b(t){return Number.isFinite(t.left)&&Number.isFinite(t.top)&&Number.isFinite(t.width)&&Number.isFinite(t.height)}function iY(t){const e=t.document.documentElement,n=t.innerWidth||e.clientWidth||1,r=t.innerHeight||e.clientHeight||1;return{width:n>0?n:1,height:r>0?r:1}}function aY(t){try{const e=t.frameElement;if(!e)return null;const n=e.ownerDocument.defaultView,r=n==null?void 0:n.HTMLElement;return r&&e instanceof r?e:null}catch{return null}}function Mm(t){const e=t.getBoundingClientRect();if(!$b(e)||e.width<=0&&e.height<=0)return null;let n={x:e.left+e.width/2,y:e.top+e.height/2},r=t.ownerDocument.defaultView;for(;r;){const i=aY(r);if(!i)break;const l=i.getBoundingClientRect();if(!$b(l)||l.width<=0||l.height<=0)return null;const o=iY(r);n={x:l.left+n.x*(l.width/o.width),y:l.top+n.y*(l.height/o.height)},r=i.ownerDocument.defaultView}return n}function lY(t){const e=t.a*t.d-t.b*t.c;return!Number.isFinite(e)||Math.abs(e)<rY?null:{a:t.d/e,b:-t.b/e,c:-t.c/e,d:t.a/e}}function sY(t,e){return{x:t.a*e.x+t.c*e.y,y:t.b*e.x+t.d*e.y}}function oY(t,e,n={}){const r=n.probeSize??nY;if(!Number.isFinite(r)||r<=0)return{ok:!1,reason:"Invalid movement probe size."};const i=Qg(t);try{R1(t,e);const l=Mm(t);if(!l)return{ok:!1,reason:"Element has no measurable box."};R1(t,{x:e.x+r,y:e.y});const o=Mm(t);if(!o)return{ok:!1,reason:"Element X movement could not be measured."};R1(t,{x:e.x,y:e.y+r});const c=Mm(t);if(!c)return{ok:!1,reason:"Element Y movement could not be measured."};const f={x:(o.x-l.x)/r,y:(o.y-l.y)/r},m={x:(c.x-l.x)/r,y:(c.y-l.y)/r};if(!Cb(f)||!Cb(m)||Eb(f)<Tb||Eb(m)<Tb)return{ok:!1,reason:"Element movement response is too small to measure."};const p={a:f.x,b:f.y,c:m.x,d:m.y},O=lY(p);return O?{ok:!0,matrix:O}:{ok:!1,reason:"Element movement response is not invertible."}}finally{yl(t,i)}}function cY(t){const e=sY(t.screenToOffset,{x:t.dx,y:t.dy});return{x:t.initialOffset.x+e.x,y:t.initialOffset.y+e.y}}function BA(t){const e=rp(t.element),n=Qg(t.element),r=RS(t.element),i=oY(t.element,e);return i.ok?{ok:!0,member:{key:t.key,selection:t.selection,element:t.element,initialOffset:e,initialPathOffset:n,gestureToken:r,screenToOffset:i.matrix,originRect:t.rect}}:(yl(t.element,n),zr(t.element,r),{ok:!1,reason:i.reason,selection:t.selection})}function qA(t,e,n){return cY({initialOffset:t.initialOffset,screenToOffset:t.screenToOffset,dx:e,dy:n})}function Qb(t,e,n){const r=qA(t,e,n);return R1(t.element,r),r}function Pb(t,e,n){const r=qA(t,e,n);return G1(t.element,r),r}function uY(t){yl(t.element,t.initialPathOffset),zr(t.element,t.gestureToken)}function IA(t){for(const e of t)uY(e)}function Zb(t){for(const e of t)zr(e.element,e.gestureToken)}function fY(t,e){var o,c,f;const n=e.groupOverlayItemsRef.current;if(n.length<=1)return!1;const r=(o=n.find(m=>!m.selection.capabilities.canApplyManualOffset))==null?void 0:o.selection;if(r)return t.preventDefault(),t.stopPropagation(),e.onBlockedMoveRef.current(r),!1;(f=(c=e.onManualDragStartRef).current)==null||f.call(c);const i=IF(n),l=[];for(const m of i){const p=BA({key:m.key,selection:m.selection,element:m.element,rect:m.rect});if(!p.ok)return IA(l),t.preventDefault(),t.stopPropagation(),e.onBlockedMoveRef.current(p.selection),!1;l.push(p.member)}return t.preventDefault(),t.stopPropagation(),t.currentTarget.setPointerCapture(t.pointerId),e.rafPausedRef.current=!0,e.groupGestureRef.current={startX:t.clientX,startY:t.clientY,originItems:n,members:l},!0}function dY(t,e,n,r){var Q,C;const i=(r==null?void 0:r.selection)??n.selectionRef.current,l=(r==null?void 0:r.rect)??n.overlayRectRef.current,o=n.boxRef.current,c=n.overlayRef.current;if(!i||!l||t!=="drag"&&!o)return!1;const f=t==="rotate"?"rotation":t==="drag"?"path-offset":"box-size";if(t==="drag"&&!i.capabilities.canApplyManualOffset||t==="resize"&&!i.capabilities.canApplyManualSize||t==="rotate"&&!i.capabilities.canApplyManualRotation||t==="resize"&&(!Number.isFinite(l.width)||!Number.isFinite(l.height)))return!1;const m=W1(i.element),p=VS(i.element),O=m.width>0?m.width:l.width/l.editScaleX,y=m.height>0?m.height:l.height/l.editScaleY;let b=Qg(i.element),S,w;if(t==="drag"){(C=(Q=n.onManualDragStartRef).current)==null||C.call(Q);const M=BA({key:Va(i),selection:i,element:i.element,rect:l});if(!M.ok)return n.onBlockedMoveRef.current(M.selection),!1;w=M.member,b=M.member.initialPathOffset,S=M.member.gestureToken}else S=RS(i.element);const A=c==null?void 0:c.getBoundingClientRect(),k=((A==null?void 0:A.left)??0)+l.left+l.width/2,$=((A==null?void 0:A.top)??0)+l.top+l.height/2;return e.preventDefault(),e.stopPropagation(),e.currentTarget.setPointerCapture(e.pointerId),n.rafPausedRef.current=!0,n.gestureRef.current={kind:t,mode:f,selection:i,startX:e.clientX,startY:e.clientY,centerX:k,centerY:$,initialPathOffset:b,initialRotation:FP(i.element),initialBoxSize:zP(i.element),pathOffsetMember:w,originLeft:l.left,originTop:l.top,originWidth:l.width,originHeight:l.height,actualWidth:O,actualHeight:y,actualRotation:p.angle,editScaleX:l.editScaleX,editScaleY:l.editScaleY,manualEditDragToken:S},!0}function hY(t){const e=p=>{t.setOverlayRect(p)},n=p=>{e({left:p.originLeft,top:p.originTop,width:p.originWidth,height:p.originHeight,editScaleX:p.editScaleX,editScaleY:p.editScaleY})},r=p=>{t.setGroupOverlayItems(p)},i=p=>{IA(p.members),r(p.originItems)};return{startGesture:(p,O,y)=>dY(p,O,t,y),startGroupDrag:p=>fY(p,t),onPointerMove:p=>{const O=t.gestureRef.current,y=t.groupGestureRef.current,b=(O==null?void 0:O.selection)??t.selectionRef.current,S=t.boxRef.current,w=t.blockedMoveRef.current;if(!w&&!O&&!y&&t.onCanvasPointerMoveRef.current(p,{preferClipAncestor:!1}),w&&b){const $=p.clientX-w.startX,Q=p.clientY-w.startY;!w.notified&&Math.hypot($,Q)>=A1&&(w.notified=!0,t.suppressNextBoxClickRef.current=!0,t.onBlockedMoveRef.current(b));return}if(y){const $=p.clientX-y.startX,Q=p.clientY-y.startY;r(y.originItems.map(C=>({...C,rect:{...C.rect,left:C.rect.left+$,top:C.rect.top+Q}})));for(const C of y.members)Qb(C,$,Q);return}if(!O||!b)return;const A=p.clientX-O.startX,k=p.clientY-O.startY;if(O.kind==="rotate"){jP(b.element,Mb({centerX:O.centerX,centerY:O.centerY,startX:O.startX,startY:O.startY,currentX:p.clientX,currentY:p.clientY,actualAngle:O.actualRotation,snap:p.shiftKey}));return}if(O.kind==="drag"){const $=O.originLeft+A,Q=O.originTop+k;e({left:$,top:Q,width:O.originWidth,height:O.originHeight,editScaleX:O.editScaleX,editScaleY:O.editScaleY}),S&&(S.style.left=`${$}px`,S.style.top=`${Q}px`),O.pathOffsetMember&&Qb(O.pathOffsetMember,A,k)}else{if(!S)return;const $=GF({originWidth:O.originWidth,originHeight:O.originHeight,actualWidth:O.actualWidth,actualHeight:O.actualHeight,scaleX:O.editScaleX,scaleY:O.editScaleY,dx:A,dy:k,uniform:p.shiftKey});QP(b.element,$);const Q=t.overlayRef.current,C=t.iframeRef.current,M=Q&&C?Fc(Q,C,b.element):null,Z=M?M.left:O.originLeft,E=M?M.top:O.originTop,j=M?M.width:$.overlayWidth,_=M?M.height:$.overlayHeight;S.style.left=`${Z}px`,S.style.top=`${E}px`,S.style.width=`${j}px`,S.style.height=`${_}px`,e({left:Z,top:E,width:j,height:_,editScaleX:O.editScaleX,editScaleY:O.editScaleY})}},onPointerUp:p=>{const O=t.gestureRef.current,y=t.groupGestureRef.current,b=(O==null?void 0:O.selection)??t.selectionRef.current,S=t.boxRef.current;if(t.blockedMoveRef.current=null,y){t.groupGestureRef.current=null,t.rafPausedRef.current=!1;const A=p.clientX-y.startX,k=p.clientY-y.startY;if(Math.hypot(A,k)<A1){i(y),t.suppressNextBoxClickRef.current=!0;return}r(y.originItems.map(Q=>({...Q,rect:{...Q.rect,left:Q.rect.left+A,top:Q.rect.top+k}})));const $=y.members.map(Q=>({selection:Q.selection,next:Pb(Q,A,k)}));Promise.resolve(t.onGroupPathOffsetCommitRef.current($)).catch(()=>{for(const Q of y.members)Q.gestureToken&&W0(Q.element,Q.gestureToken)&&yl(Q.element,Q.initialPathOffset)}).finally(()=>Zb(y.members));return}if(!O||!b){t.gestureRef.current=null,t.rafPausedRef.current=!1;return}t.gestureRef.current=null,t.rafPausedRef.current=!1;const w=Math.hypot(p.clientX-O.startX,p.clientY-O.startY);if(O.kind==="drag"&&w<A1){yl(b.element,O.initialPathOffset),zr(b.element,O.manualEditDragToken),S&&(S.style.left=`${O.originLeft}px`,S.style.top=`${O.originTop}px`),n(O),t.suppressNextBoxClickRef.current=!0,t.onCanvasMouseDown(p,{preferClipAncestor:!1});return}if(O.kind==="resize"&&w<A1){C2(b.element,O.initialBoxSize),zr(b.element,O.manualEditDragToken),S&&(S.style.width=`${O.originWidth}px`,S.style.height=`${O.originHeight}px`),n(O),t.suppressNextBoxClickRef.current=!0;return}if(O.kind==="rotate"){const A=Mb({centerX:O.centerX,centerY:O.centerY,startX:O.startX,startY:O.startY,currentX:p.clientX,currentY:p.clientY,actualAngle:O.actualRotation,snap:p.shiftKey});if(!eY(O.actualRotation,A.angle)){E2(b.element,O.initialRotation),zr(b.element,O.manualEditDragToken);return}$g(b.element,A),Promise.resolve(t.onRotationCommitRef.current(b,A)).catch(()=>{O.manualEditDragToken&&W0(b.element,O.manualEditDragToken)&&E2(b.element,O.initialRotation)}).finally(()=>zr(b.element,O.manualEditDragToken))}else if(O.kind==="drag"){const A=p.clientX-O.startX,k=p.clientY-O.startY;if(!O.pathOffsetMember)return;const $=Pb(O.pathOffsetMember,A,k),Q=O.originLeft+A,C=O.originTop+k;e({left:Q,top:C,width:O.originWidth,height:O.originHeight,editScaleX:O.editScaleX,editScaleY:O.editScaleY}),S&&(S.style.left=`${Q}px`,S.style.top=`${C}px`),Promise.resolve(t.onPathOffsetCommitRef.current(b,$)).catch(()=>{var M;(M=O.pathOffsetMember)!=null&&M.gestureToken&&W0(b.element,O.pathOffsetMember.gestureToken)&&yl(b.element,O.initialPathOffset)}).finally(()=>{O.pathOffsetMember&&Zb([O.pathOffsetMember])})}else{t.suppressNextBoxClickRef.current=!0;const A=W1(b.element);Cg(b.element,A),Promise.resolve(t.onBoxSizeCommitRef.current(b,A)).catch(()=>{O.manualEditDragToken&&W0(b.element,O.manualEditDragToken)&&C2(b.element,O.initialBoxSize)}).finally(()=>zr(b.element,O.manualEditDragToken))}},clearPointerState:p=>{const O=t.groupGestureRef.current;O&&i(O);const y=t.gestureRef.current,b=(y==null?void 0:y.selection)??p.current;(y==null?void 0:y.mode)==="path-offset"&&b&&(yl(b.element,y.initialPathOffset),zr(b.element,y.manualEditDragToken),n(y)),(y==null?void 0:y.mode)==="box-size"&&b&&(C2(b.element,y.initialBoxSize),zr(b.element,y.manualEditDragToken),n(y)),(y==null?void 0:y.mode)==="rotation"&&b&&(E2(b.element,y.initialRotation),zr(b.element,y.manualEditDragToken)),t.blockedMoveRef.current=null,t.groupGestureRef.current=null,t.gestureRef.current=null,t.rafPausedRef.current=!1}}}const mY=d.memo(function({iframeRef:e,activeCompositionPath:n,selection:r,groupSelections:i=[],hoverSelection:l,allowCanvasMovement:o=!0,onCanvasMouseDown:c,onCanvasPointerMove:f,onCanvasPointerLeave:m,onSelectionChange:p,onBlockedMove:O,onManualDragStart:y,onPathOffsetCommit:b,onGroupPathOffsetCommit:S,onBoxSizeCommit:w,onRotationCommit:A}){const k=d.useRef(null),$=d.useRef(null),Q=d.useRef(null),C=d.useRef(null),M=d.useRef(null),Z=d.useRef(!1),E=d.useRef(!1),j=d.useRef(!1),_=d.useRef(!1),H=d.useRef(r);H.current=r;const L=d.useRef(n);L.current=n;const z=d.useRef(i);z.current=i;const F=d.useRef(l);F.current=l;const ee=d.useRef(b);ee.current=b;const W=d.useRef(S);W.current=S;const V=d.useRef(w);V.current=w;const G=d.useRef(A);G.current=A;const q=d.useRef(O);q.current=O;const B=d.useRef(y);B.current=y;const D=d.useRef(f);D.current=f;const P=d.useRef(m);P.current=m;const R=d.useRef(p);R.current=p;const{overlayRect:X,overlayRectRef:Y,setOverlayRect:U,hoverRect:te,groupOverlayItems:ne,groupOverlayItemsRef:ce,setGroupOverlayItems:me}=tY({iframeRef:e,overlayRef:k,selectionRef:H,activeCompositionPathRef:L,groupSelectionsRef:z,hoverSelectionRef:F,rafPausedRef:_}),Se=hY({overlayRef:k,iframeRef:e,boxRef:$,selectionRef:H,overlayRectRef:Y,groupOverlayItemsRef:ce,gestureRef:Q,groupGestureRef:C,blockedMoveRef:M,rafPausedRef:_,suppressNextBoxClickRef:Z,setOverlayRect:U,setGroupOverlayItems:me,onBlockedMoveRef:q,onManualDragStartRef:B,onPathOffsetCommitRef:ee,onGroupPathOffsetCommitRef:W,onBoxSizeCommitRef:V,onRotationCommitRef:G,onCanvasPointerMoveRef:D,onCanvasMouseDown:c}),pe=d.useMemo(()=>r?`${r.sourceFile}:${r.id??r.selector??r.label}:${r.selectorIndex??0}`:"none",[r]),ae=d.useMemo(()=>qF(ne.map(ve=>ve.rect)),[ne]),xe=i.length>1,Qe=xe&&ne.length>1&&ne.every(ve=>ve.selection.capabilities.canApplyManualOffset),$e=ve=>{if(j.current){j.current=!1,E.current=!1,Z.current=!1,ve.preventDefault(),ve.stopPropagation();return}const bt=ve.target;bt!=null&&bt.closest('[data-dom-edit-selection-box="true"]')||(c(ve,{preferClipAncestor:!1}),ve.shiftKey&&(E.current=!0,Z.current=!0))},Ze=ve=>{if(!o||ve.button!==0)return;if(ve.shiftKey){const Lt=D.current(ve,{preferClipAncestor:!1})??F.current;if(!Lt)return;ve.preventDefault(),ve.stopPropagation(),j.current=!0,E.current=!0,Z.current=!0,R.current(Lt,{additive:!0});return}const bt=ve.target;if(bt!=null&&bt.closest('[data-dom-edit-selection-box="true"]'))return;const nt=D.current(ve,{preferClipAncestor:!1})??F.current;if(!(nt!=null&&nt.capabilities.canApplyManualOffset))return;const Re=k.current,kt=e.current,Fe=Re&&kt?Fc(Re,kt,nt.element):null;if(!Fe)return;if(j.current=!0,H.current=nt,U(Fe),!Se.startGesture("drag",ve,{selection:nt,rect:Fe})){j.current=!1;return}R.current(nt)},Je=ve=>{if(!(Q.current||C.current)){if(Z.current){Z.current=!1,ve.stopPropagation();return}c(ve,{preferClipAncestor:!1})}},Ue=ve=>{E.current&&(E.current=!1,ve.preventDefault(),ve.stopPropagation())};return g.jsxs("div",{ref:k,className:"absolute inset-0 z-10 pointer-events-auto outline-none",tabIndex:-1,"aria-label":"Composition canvas",onPointerDownCapture:ve=>WF(ve.currentTarget),onPointerDown:Ze,onMouseDown:$e,onPointerMove:Se.onPointerMove,onPointerLeave:()=>P.current(),onPointerUp:Se.onPointerUp,onPointerCancel:()=>Se.clearPointerState(H),children:[l&&te&&g.jsx("div",{"aria-hidden":"true","data-dom-edit-hover-box":"true",className:"pointer-events-none absolute rounded-xl border border-studio-accent/80 bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.25)]",style:{left:te.left,top:te.top,width:te.width,height:te.height}}),xe&&ne.length>1&&ae&&g.jsxs(g.Fragment,{children:[ne.map(ve=>g.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute rounded-xl border border-studio-accent/70 bg-studio-accent/[0.03]",style:{left:ve.rect.left,top:ve.rect.top,width:ve.rect.width,height:ve.rect.height}},ve.key)),g.jsx("div",{"data-dom-edit-selection-box":"true",className:"pointer-events-auto absolute rounded-xl border border-studio-accent bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.3)]",style:{left:ae.left,top:ae.top,width:ae.width,height:ae.height,cursor:o&&Qe?"move":"default"},onPointerDown:ve=>{!o||!Qe||ve.shiftKey||Se.startGroupDrag(ve)},onMouseDown:Ue,onClick:Je})]}),!xe&&r&&X&&g.jsxs(g.Fragment,{children:[o&&r.capabilities.canApplyManualRotation&&g.jsxs("div",{className:"pointer-events-none absolute",style:{left:X.left+X.width/2,top:X.top-34,width:28,height:34,transform:"translateX(-50%)"},children:[g.jsx("div",{className:"absolute left-1/2 top-3 bottom-0 w-px -translate-x-1/2 bg-studio-accent/60"}),g.jsx("button",{type:"button",className:"pointer-events-auto absolute left-1/2 top-0 h-3 w-3 -translate-x-1/2 rounded-full border border-studio-accent bg-studio-accent p-0 shadow-[0_0_0_2px_rgba(60,230,172,0.18)]",style:{cursor:"grab",touchAction:"none"},title:"Rotate","aria-label":"Rotate selection",onPointerDown:ve=>{ve.stopPropagation(),Se.startGesture("rotate",ve)}})]}),g.jsx("div",{ref:$,"data-dom-edit-selection-box":"true",className:"pointer-events-auto absolute rounded-xl border border-studio-accent/80 bg-studio-accent/5 shadow-[0_0_0_1px_rgba(60,230,172,0.25)]",style:{left:X.left,top:X.top,width:X.width,height:X.height,cursor:o&&r.capabilities.canApplyManualOffset?"move":"default"},onPointerDown:ve=>{if(!(!o||ve.shiftKey)){if(r.capabilities.canApplyManualOffset){Se.startGesture("drag",ve);return}ve.preventDefault(),ve.stopPropagation(),ve.currentTarget.setPointerCapture(ve.pointerId),M.current={pointerId:ve.pointerId,startX:ve.clientX,startY:ve.clientY,notified:!1}}},onMouseDown:Ue,onClick:Je,children:o&&r.capabilities.canApplyManualSize&&g.jsx("div",{className:"absolute -right-1.5 -bottom-1.5 w-3 h-3 rounded-sm bg-studio-accent border border-studio-accent/60",style:{cursor:"se-resize",touchAction:"none"},onPointerDown:ve=>{ve.stopPropagation(),Se.startGesture("resize",ve)}})},pe)]})]})});function pY({timelineToolbar:t,renderClipContent:e,handleTimelineElementDelete:n,handleTimelineAssetDrop:r,handleTimelineBlockDrop:i,handlePreviewBlockDrop:l,handleTimelineFileDrop:o,handleTimelineElementMove:c,handleTimelineElementResize:f,handleBlockedTimelineEdit:m,setCompIdToSrc:p,setCompositionLoading:O,shouldShowSelectedDomBounds:y,blockPreview:b}){const{projectId:S,refreshKey:w,activeCompPath:A,setActiveCompPath:k,captionEditMode:$,compositionLoading:Q,isPlaying:C,previewIframeRef:M,refreshPreviewDocumentVersion:Z,handlePreviewIframeRef:E,timelineVisible:j,toggleTimelineVisibility:_}=bu(),{domEditHoverSelection:H,domEditSelection:L,domEditGroupSelections:z,handleTimelineElementSelect:F,handlePreviewCanvasMouseDown:ee,handlePreviewCanvasPointerMove:W,handlePreviewCanvasPointerLeave:V,applyDomSelection:G,handleBlockedDomMove:q,handleDomManualDragStart:B,handleDomPathOffsetCommit:D,handleDomGroupPathOffsetCommit:P,handleDomBoxSizeCommit:R,handleDomRotationCommit:X}=_f();return g.jsx("div",{className:"flex-1 relative min-w-0",children:g.jsx(NF,{projectId:S,refreshKey:w,activeCompositionPath:A,timelineToolbar:t,renderClipContent:e,onDeleteElement:n,onAssetDrop:r,onBlockDrop:i,onPreviewBlockDrop:l,onFileDrop:o,onMoveElement:c,onResizeElement:f,onBlockedEditAttempt:m,onSelectTimelineElement:F,onCompIdToSrcChange:p,onCompositionLoadingChange:O,onCompositionChange:Y=>{Y!==A&&(k(Y),Z())},onIframeRef:E,previewOverlay:b?g.jsx("div",{className:"absolute inset-0 z-30 bg-black pointer-events-none",children:b.videoUrl?g.jsx("video",{src:b.videoUrl,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"w-full h-full object-contain"}):b.posterUrl?g.jsx("img",{src:b.posterUrl,alt:b.title,className:"w-full h-full object-contain"}):null}):$?g.jsx(HF,{iframeRef:M}):on?g.jsx(mY,{iframeRef:M,activeCompositionPath:A,hoverSelection:cp&&!$&&!Q&&!C?H:null,selection:y?L:null,groupSelections:y?z:[],allowCanvasMovement:gZ,onCanvasMouseDown:ee,onCanvasPointerMove:W,onCanvasPointerLeave:V,onSelectionChange:G,onBlockedMove:q,onManualDragStart:B,onPathOffsetCommit:D,onGroupPathOffsetCommit:P,onBoxSizeCommit:R,onRotationCommit:X}):null,timelineFooter:$?g.jsxs("div",{className:"border-t border-neutral-800/30 flex-shrink-0",style:{height:60},children:[g.jsx("div",{className:"flex items-center gap-1.5 px-2 py-0.5",children:g.jsx("span",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider",children:"Captions"})}),g.jsx(XF,{pixelsPerSecond:100})]}):void 0,timelineVisible:j,onToggleTimeline:_})})}function fr(t){return Math.max(0,Math.min(255,Math.round(t)))}function E8(t){return Math.max(0,Math.min(1,t))}function Tm(t){return fr(t).toString(16).padStart(2,"0")}function gY(t){return`${Math.round(E8(t)*100)/100}`}function UA(t){const e=t.trim().toLowerCase();if(!e)return null;if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const n=e.match(/^#([0-9a-f]{3})$/i);if(n){const[l,o,c]=n[1].split("");return{red:Number.parseInt(l+l,16),green:Number.parseInt(o+o,16),blue:Number.parseInt(c+c,16),alpha:1}}const r=e.match(/^#([0-9a-f]{6})$/i);if(r)return{red:Number.parseInt(r[1].slice(0,2),16),green:Number.parseInt(r[1].slice(2,4),16),blue:Number.parseInt(r[1].slice(4,6),16),alpha:1};const i=e.match(/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i);return i?{red:fr(Number.parseFloat(i[1])),green:fr(Number.parseFloat(i[2])),blue:fr(Number.parseFloat(i[3])),alpha:E8(i[4]!=null?Number.parseFloat(i[4]):1)}:null}function Cm(t){return`#${Tm(t.red)}${Tm(t.green)}${Tm(t.blue)}`}function M1(t){const e=fr(t.red),n=fr(t.green),r=fr(t.blue),i=E8(t.alpha);return i>=1?`rgb(${e}, ${n}, ${r})`:`rgba(${e}, ${n}, ${r}, ${gY(i)})`}function OY(t){const e=fr(t.red)/255,n=fr(t.green)/255,r=fr(t.blue)/255,i=Math.max(e,n,r),l=Math.min(e,n,r),o=i-l;let c=0;return o!==0&&(i===e?c=60*((n-r)/o%6):i===n?c=60*((r-e)/o+2):c=60*((e-n)/o+4)),c<0&&(c+=360),{hue:c,saturation:i===0?0:o/i,value:i}}function jb(t){const e=(t.hue%360+360)%360/60,n=Math.max(0,Math.min(1,t.saturation)),r=Math.max(0,Math.min(1,t.value)),i=r*n,l=i*(1-Math.abs(e%2-1)),o=r-i;let c=0,f=0,m=0;return e>=0&&e<1?(c=i,f=l):e>=1&&e<2?(c=l,f=i):e>=2&&e<3?(f=i,m=l):e>=3&&e<4?(f=l,m=i):e>=4&&e<5?(c=l,m=i):(c=i,m=l),{red:fr((c+o)*255),green:fr((f+o)*255),blue:fr((m+o)*255)}}const WA=new Set(["inherit","initial","revert","revert-layer","serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-sans-serif","ui-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]),xY=[...hp,"Inter","system-ui","sans-serif","serif","monospace"];function Rb(t){return t.replace(/[^\w .-]+/g," ").replace(/\s+/g," ").trim()}function T1(t){var r,i;const e=((r=t.style)==null?void 0:r.toLowerCase())??"",n=((i=t.fullName)==null?void 0:i.toLowerCase())??"";return e==="regular"||n.endsWith(" regular")?0:e==="normal"||n.endsWith(" normal")?1:e==="medium"||n.endsWith(" medium")?2:3}function Em(t){const e=new Set;return t.reduce((n,r)=>{const i=r.trim();if(!i)return n;const l=i.toLowerCase();return e.has(l)||(e.add(l),n.push(i)),n},[])}function Nb(t){const e=new Set;return t.reduce((n,r)=>{const i=r.family.trim();if(!i)return n;const l=i.toLowerCase();return e.has(l)||(e.add(l),n.push({family:i,source:r.source})),n},[])}function yY(t){return[...t].sort((e,n)=>{const r=Vb(e.source)-Vb(n.source);if(r!==0)return r;const i=hp.findIndex(c=>c.toLowerCase()===e.family.toLowerCase()),l=hp.findIndex(c=>c.toLowerCase()===n.family.toLowerCase()),o=(i===-1?Number.MAX_SAFE_INTEGER:i)-(l===-1?Number.MAX_SAFE_INTEGER:l);return o===0?e.family.localeCompare(n.family):o})}function Vb(t){return t==="Current"?0:t==="Document"?1:t==="Imported"?2:t==="Google"?3:t==="Local"?4:5}const Ti="min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600",Rt="text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",ur="grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3",bY={},dg="none",GA={none:"none",soft:"0 12px 36px rgba(0, 0, 0, 0.28)",lift:"0 18px 54px rgba(0, 0, 0, 0.38)",glow:"0 0 0 1px rgba(60, 230, 172, 0.34), 0 18px 56px rgba(60, 230, 172, 0.2)"};function $m(t){return UA(t)??{red:0,green:0,blue:0,alpha:1}}function hg(t){if(!t)return null;const e=Number.parseFloat(t);return Number.isFinite(e)?e:null}function Ct(t){const e=Math.round(t*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function ql(t){if(!t)return null;const e=t.trim().match(/^(-?\d+(?:\.\d+)?)([a-z%]*)$/i);if(!e)return null;const n=Number.parseFloat(e[1]);return Number.isFinite(n)?{value:n,unit:e[2]??""}:null}function La(t){const e=ql(t);return!e||e.unit&&e.unit.toLowerCase()!=="px"?null:e.value}function KA(t,e,n,r){return Number.isFinite(t)?Math.max(e,Math.min(n,t)):r}function vY(t,e={}){const n=ql(t.trim());if(!n||n.unit&&n.unit.toLowerCase()!=="px")return null;const r=KA(n.value,e.min??Number.NEGATIVE_INFINITY,e.max??Number.POSITIVE_INFINITY,e.fallback??0);return`${Ct(r)}px`}function Is(t){return`${Ct(t)}px`}function Lb(t,e){const n=e.trim();if(!n||n==="normal")return n||"normal";const r=ql(n);return r?t==="letter-spacing"?r.unit?n:`${Ct(r.value)}px`:r.unit?n:r.value>4?`${Ct(r.value)}px`:Ct(r.value):n}function SY(t){const e=[];let n="",r=0;for(const i of t.trim()){if(i==="("&&(r+=1),i===")"&&(r=Math.max(0,r-1)),/\s/.test(i)&&r===0){n.trim()&&e.push(n.trim()),n="";continue}n+=i}return n.trim()&&e.push(n.trim()),e}function _b(t,e){const n=t==null?void 0:t.trim();if(!n||n===dg)return 0;const r=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp(`(?:^|\\s)${r}\\((-?\\d+(?:\\.\\d+)?)px\\)`,"i").exec(n);if(!i)return 0;const l=Number.parseFloat(i[1]);return Number.isFinite(l)?Math.max(0,l):0}function Db(t,e,n){const r=KA(n,0,200,0),i=SY(t&&t.trim()!==dg?t:""),l=e.toLowerCase(),o=i.filter(c=>!c.toLowerCase().startsWith(`${l}(`));return r>0&&o.push(`${e}(${Ct(r)}px)`),o.length>0?o.join(" "):dg}function wY(t){const e=(t==null?void 0:t.trim())||"none";for(const[n,r]of Object.entries(GA))if(e===r)return n;return e==="none"?"none":"custom"}function AY(t,e){return t==="custom"?(e==null?void 0:e.trim())||"none":GA[t]}function kY(t){const e=t==null?void 0:t.trim();return!e||e==="none"?"none":/^inset\(/i.test(e)?"inset":/^circle\(/i.test(e)?"circle":"custom"}function MY(t){const e=/^inset\(\s*(-?\d+(?:\.\d+)?)px\b/i.exec((t==null?void 0:t.trim())??"");if(!e)return 0;const n=Number.parseFloat(e[1]);return Number.isFinite(n)?Math.max(0,n):0}function TY(t,e){const n=[["border-width",t]],r=ql(t),i=(e==null?void 0:e.trim().toLowerCase())||"none";return r&&r.value>0&&(i==="none"||i==="hidden")&&n.push(["border-style","solid"]),n}function CY(t,e){const n=[["border-style",t]],r=t.trim().toLowerCase();if(!r||r==="none"||r==="hidden")return n;const i=ql((e==null?void 0:e.trim())||"0");return(!i||i.value<=0)&&n.push(["border-width","1px"]),n}function EY(t,e,n){return t==="custom"?(n==null?void 0:n.trim())||"none":t==="circle"?"circle(50% at 50% 50%)":t==="inset"?`inset(0 round ${Ct(Math.max(0,e))}px)`:"none"}function $Y(t,e){return`inset(${Ct(Math.max(0,t))}px round ${Ct(Math.max(0,e))}px)`}function Hb(t,e,n){const r=ql(t);if(!r)return null;const i=n!=null&&n.altKey?.1:n!=null&&n.shiftKey?10:1,l=r.value+i*e;return`${Ct(l)}${r.unit}`}function QY(t){if(!t)return"";const n=t.toLowerCase().indexOf("url(");if(n<0)return"";let r=n+4;for(;r<t.length&&(t[r]===" "||t[r]===`
|
|
119
|
-
`||t[r]==="\r"||t[r]===" "||t[r]==="\f");)r+=1;const i=t[r]==='"'||t[r]==="'"?t[r]:null;if(i){r+=1;const o=t.indexOf(i,r);return o>=r?t.slice(r,o):""}const l=t.indexOf(")",r);return l<r?"":t.slice(r,l).trim()}function JA({value:t,disabled:e,liveCommit:n,onCommit:r}){const[i,l]=d.useState(t),o=d.useRef(null),c=d.useRef(t),f=d.useRef(i),m=d.useRef(null);c.current=t,f.current=i,d.useEffect(()=>{l(t)},[t]),d.useEffect(()=>{const b=m.current;if(!b)return;const S=w=>{if(e)return;const A=w.deltaY===0?w.deltaX:w.deltaY;if(A===0)return;const k=Hb(f.current,A<0?1:-1,w);k&&(w.preventDefault(),w.stopPropagation(),l(k),y.current(k))};return b.addEventListener("wheel",S,{passive:!1}),()=>b.removeEventListener("wheel",S)},[e]),d.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const p=b=>{o.current&&clearTimeout(o.current),b!==c.current&&r(b)},O=b=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{b!==c.current&&r(b)},120)},y=d.useRef(O);return y.current=O,g.jsx("input",{ref:m,type:"text",value:i,disabled:e,onChange:b=>{l(b.target.value),n&&O(b.target.value)},onBlur:()=>p(i),onKeyDown:b=>{if(b.key==="Enter"){b.target.blur();return}if(b.key!=="ArrowUp"&&b.key!=="ArrowDown")return;const S=Hb(i,b.key==="ArrowUp"?1:-1,b);S&&(b.preventDefault(),l(S),O(S))},title:ql(t)?"Scroll or use Arrow keys to adjust":void 0,className:"min-w-0 w-full bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})}function Yr({label:t,value:e,disabled:n,liveCommit:r,scrub:i,onCommit:l}){const o=d.useRef(null),c=d.useCallback(O=>{if(n||!i)return;const y=parseFloat(e);Number.isFinite(y)&&(O.target.setPointerCapture(O.pointerId),o.current={startX:O.clientX,startValue:y,pointerId:O.pointerId})},[n,i,e]),f=d.useCallback(O=>{const y=o.current;if(!y)return;const b=O.clientX-y.startX;l(String(Math.round(y.startValue+b)))},[l]),m=d.useCallback(()=>{o.current=null},[]),p=i&&!n?{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500 cursor-ew-resize select-none",onPointerDown:c,onPointerMove:f,onPointerUp:m}:{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500"};return g.jsx("div",{className:Ti,children:g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("span",{...p,children:t}),g.jsx(JA,{value:e,disabled:n,liveCommit:r,onCommit:l})]})})}function $8({label:t,value:e,disabled:n,onCommit:r}){return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:t}),g.jsx("div",{className:Ti,children:g.jsx(JA,{value:e,disabled:n,onCommit:r})})]})}function qr({value:t,min:e,max:n,step:r,displayValue:i,formatDisplayValue:l,disabled:o,onCommit:c}){const[f,m]=d.useState(t),p=d.useRef(null),O=d.useRef(t);O.current=t,d.useEffect(()=>{m(t)},[t]),d.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const y=S=>{p.current&&clearTimeout(p.current),S!==O.current&&c(S)},b=S=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{S!==O.current&&c(S)},40)};return g.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-2",children:[g.jsx("input",{type:"range",min:e,max:n,step:r,value:f,disabled:o,onChange:S=>{const w=Number(S.target.value);m(w),b(w)},onMouseUp:()=>y(f),onTouchEnd:()=>y(f),onBlur:()=>y(f),className:"h-2 min-w-0 w-full cursor-pointer appearance-none rounded-full bg-neutral-800 accent-[#3ce6ac] disabled:cursor-not-allowed"}),g.jsx("div",{className:"min-w-[52px] rounded-xl border border-neutral-800 bg-neutral-900 px-2 py-2 text-right text-[11px] font-medium text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",children:(l==null?void 0:l(f))??i})]})}function ro({options:t,value:e,disabled:n,onChange:r}){return g.jsx("div",{className:"grid min-w-0 gap-1 rounded-xl bg-neutral-900 p-1 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",style:{gridTemplateColumns:`repeat(${t.length}, minmax(0, 1fr))`},children:t.map(i=>g.jsx("button",{type:"button",disabled:n,onClick:()=>r(i.value),className:`min-w-0 truncate rounded-lg px-2 py-1.5 text-[11px] font-medium transition-colors disabled:cursor-not-allowed ${i.value===e?"bg-neutral-800 text-white shadow-[0_1px_3px_rgba(0,0,0,0.28)]":"text-neutral-500 hover:text-neutral-200"}`,children:i.label},i.value))})}function wn({label:t,value:e,disabled:n,options:r,onChange:i}){const l=e&&!r.includes(e)?[e,...r]:r;return g.jsxs("label",{className:`${Ti} flex items-center gap-3`,children:[g.jsx("span",{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500",children:t}),g.jsx("select",{value:e,disabled:n,onChange:o=>i(o.target.value),className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:l.map(o=>g.jsx("option",{value:o,children:o},o))})]})}function Er({title:t,icon:e,children:n,accessory:r,defaultCollapsed:i=!1}){const[l,o]=d.useState(i);return g.jsxs("section",{className:"min-w-0 border-t border-neutral-800/80",children:[g.jsxs("button",{type:"button",onClick:()=>o(c=>!c),className:"flex w-full items-center justify-between gap-2 px-4 py-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[g.jsx("span",{className:"flex-shrink-0 text-neutral-500",children:e}),g.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.12em] text-neutral-300",children:t})]}),g.jsxs("div",{className:"flex items-center gap-2",children:[r,g.jsx("svg",{width:"10",height:"10",viewBox:"0 0 10 10",fill:"currentColor",className:`flex-shrink-0 text-neutral-500 transition-transform ${l?"-rotate-90":""}`,children:g.jsx("path",{d:"M2 3l3 4 3-4z"})})]})]}),!l&&g.jsx("div",{className:"px-4 pb-4",children:n})]})}const PY=new Set(["video","audio"]);function ZY(t){return PY.has(t.tagName)}function Xb(t){return!Number.isFinite(t)||t<0?"0.00s":`${t.toFixed(2)}s`}function jY({projectDir:t,element:e,styles:n,onSetStyle:r,onSetAttribute:i,onSetHtmlAttribute:l}){const o=e.tagName==="video",c=e.element,f=hg(e.dataAttributes.volume??"")??1,m=Math.round(f*100),p=Number.parseFloat(e.dataAttributes["media-start"]??e.dataAttributes["playback-start"]??"0")||0,O=c.hasAttribute("loop"),y=c.hasAttribute("muted"),b=e.dataAttributes["has-audio"]==="true",S=Number.parseFloat(e.dataAttributes["playback-rate"]??"1")||1,w=n["object-fit"]||"contain",A=n["object-position"]||"center",k=Number.parseFloat(e.dataAttributes["source-duration"]??"")||c.duration||0,$=Math.max(30,Math.ceil(k||p+10)),Q=c.getAttribute("src")??"",[C,M]=d.useState(!1),Z=t&&Q&&!Q.startsWith("http")?`${t}/${Q}`:Q;return g.jsx(Er,{title:o?"Video":"Audio",icon:o?g.jsx(zj,{size:15}):g.jsx(Bj,{size:15}),children:g.jsxs("div",{className:"space-y-4",children:[Q&&g.jsxs("div",{className:"min-w-0",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:"Source"}),g.jsxs("button",{type:"button",onClick:()=>{navigator.clipboard.writeText(Z).then(()=>{M(!0),setTimeout(()=>M(!1),1500)})},className:"flex h-6 items-center gap-1 rounded-lg border border-neutral-700 bg-neutral-950 px-2 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-200",children:[C?g.jsx(Hj,{size:11}):g.jsx(Gj,{size:11}),g.jsx("span",{children:C?"Copied":"Copy"})]})]}),g.jsx("div",{className:"mt-1 truncate text-[11px] font-medium text-neutral-300",title:Z,children:Z})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Volume"}),g.jsx(qr,{value:m,min:0,max:100,step:1,displayValue:`${m}%`,formatDisplayValue:E=>`${Math.round(E)}%`,onCommit:E=>{i("volume",Ct(E/100))}})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Playback rate"}),g.jsx(qr,{value:S*100,min:25,max:300,step:5,displayValue:`${Ct(S)}x`,formatDisplayValue:E=>`${Ct(E/100)}x`,onCommit:E=>{i("playback-rate",Ct(E/100))}})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Media start"}),g.jsx(qr,{value:Math.round(p*100),min:0,max:$*100,step:10,displayValue:Xb(p),formatDisplayValue:E=>Xb(E/100),onCommit:E=>{i("media-start",(E/100).toFixed(2))}})]}),g.jsxs("div",{className:ur,children:[g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Loop"}),g.jsx(ro,{value:O?"on":"off",onChange:E=>{l("loop",E==="on"?"true":null)},options:[{label:"On",value:"on"},{label:"Off",value:"off"}]})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Muted"}),g.jsx(ro,{value:y?"on":"off",onChange:E=>{l("muted",E==="on"?"true":null)},options:[{label:"On",value:"on"},{label:"Off",value:"off"}]})]})]}),o&&g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Has audio track"}),g.jsx(ro,{value:b?"yes":"no",onChange:E=>{E==="yes"?(i("has-audio","true"),l("muted",null)):(i("has-audio",""),l("muted","true"))},options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}]})]}),o&&g.jsx(g.Fragment,{children:g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Fit",value:w,onChange:E=>{r("object-fit",E)},options:["contain","cover","fill","none","scale-down"]}),g.jsx(wn,{label:"Position",value:A,onChange:E=>{r("object-position",E)},options:["center","top","bottom","left","right","left top","right top","left bottom","right bottom"]})]})})]})})}var RY=rv();function Qm(t,e,n){return Math.max(e,Math.min(n,t))}function NY(t,e,n,r){const o=Math.max(12,e.width-n.width-12),c=t.left+t.width/2-n.width/2,f=Qm(c,12,o),m=t.bottom+8,p=t.top-n.height-8,O=m+n.height<=e.height-12,y=p>=12;return O||!y?{left:f,top:Qm(m,12,Math.max(12,e.height-n.height-12)),placement:"bottom"}:{left:f,top:Qm(p,12,Math.max(12,e.height-n.height-12)),placement:"top"}}const zb={width:292,height:386};function Fb({label:t,value:e,min:n,max:r,step:i,displayValue:l,background:o,thumbColor:c,disabled:f,onCommit:m}){const p=d.useRef(null),O=(e-n)/(r-n)*100,y=S=>{var $;const w=($=p.current)==null?void 0:$.getBoundingClientRect();if(!w||w.width<=0)return;const A=n+(S-w.left)/w.width*(r-n),k=Math.round(A/i)*i;m(Math.max(n,Math.min(r,k)))},b=S=>{m(Math.max(n,Math.min(r,S)))};return g.jsxs("div",{className:"grid gap-1.5",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:Rt,children:t}),g.jsx("span",{className:"text-[10px] font-medium text-neutral-400",children:l})]}),g.jsx("div",{ref:p,role:"slider",tabIndex:f?-1:0,"aria-label":t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":e,"aria-disabled":f,className:`relative h-4 rounded-full border border-neutral-700 shadow-[inset_0_1px_2px_rgba(0,0,0,0.55)] outline-none focus:border-[#f5a400] focus:ring-2 focus:ring-[#f5a400]/40 ${f?"cursor-not-allowed opacity-50":"cursor-ew-resize"}`,style:{background:o},onPointerDown:S=>{f||(S.currentTarget.setPointerCapture(S.pointerId),y(S.clientX))},onPointerMove:S=>{f||S.buttons!==1||y(S.clientX)},onKeyDown:S=>{f||(S.key==="ArrowRight"||S.key==="ArrowUp"?(S.preventDefault(),b(e+i)):S.key==="ArrowLeft"||S.key==="ArrowDown"?(S.preventDefault(),b(e-i)):S.key==="Home"?(S.preventDefault(),b(n)):S.key==="End"&&(S.preventDefault(),b(r)))},children:g.jsx("div",{className:"pointer-events-none absolute top-1/2 h-6 w-6 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.85),0_6px_14px_rgba(0,0,0,0.5)]",style:{left:`${Math.max(0,Math.min(100,O))}%`,backgroundColor:c}})})]})}function Yc({label:t,value:e,disabled:n,onCommit:r}){const i=d.useRef(null),l=d.useRef(null),[o,c]=d.useState(!1),[f,m]=d.useState(null),[p,O]=d.useState(()=>$m(e)),[y,b]=d.useState(()=>Cm($m(e)).toUpperCase()),S=OY(p),w=M1({...jb({hue:S.hue,saturation:1,value:1}),alpha:1}),A=M1({...p,alpha:1}),k=M1(p),$=Math.round(S.saturation*100),Q=Math.round(S.value*100),C=Math.round(p.alpha*100);d.useEffect(()=>{const z=$m(e);O(z),b(Cm(z).toUpperCase())},[e]);const M=d.useCallback(()=>{var ee,W;const z=(ee=i.current)==null?void 0:ee.getBoundingClientRect();if(!z)return;const F=(W=l.current)==null?void 0:W.getBoundingClientRect();m(NY(z,{width:window.innerWidth,height:window.innerHeight},{width:(F==null?void 0:F.width)||zb.width,height:(F==null?void 0:F.height)||zb.height}))},[]);d.useLayoutEffect(()=>{if(!o)return;M();const z=()=>M();return window.addEventListener("resize",z),window.addEventListener("scroll",z,!0),()=>{window.removeEventListener("resize",z),window.removeEventListener("scroll",z,!0)}},[o,M]),d.useEffect(()=>{if(!o)return;const z=ee=>{var V,G;const W=ee.target;W&&((V=l.current)!=null&&V.contains(W)||(G=i.current)!=null&&G.contains(W)||c(!1))},F=ee=>{ee.key==="Escape"&&c(!1)};return document.addEventListener("pointerdown",z),document.addEventListener("keydown",F),()=>{document.removeEventListener("pointerdown",z),document.removeEventListener("keydown",F)}},[o]);const Z=z=>{O(z),b(Cm(z).toUpperCase()),r(M1(z))},E=z=>{const F=jb({hue:z.hue??S.hue,saturation:z.saturation??S.saturation,value:z.value??S.value});Z({...F,alpha:p.alpha})},j=(z,F,ee)=>{const W=ee.getBoundingClientRect(),V=Math.max(0,Math.min(1,(z-W.left)/W.width)),G=Math.max(0,Math.min(1,1-(F-W.top)/W.height));E({saturation:V,value:G})},_=z=>{b(z);const F=z.trim().startsWith("#")?z.trim():`#${z.trim()}`,ee=UA(F);ee&&Z({...ee,alpha:p.alpha})},H=o?RY.createPortal(g.jsxs("div",{ref:l,className:"fixed z-[9999] w-[292px] overflow-hidden rounded-2xl border border-neutral-700 bg-neutral-950 shadow-2xl shadow-black/50",style:{left:(f==null?void 0:f.left)??-9999,top:(f==null?void 0:f.top)??-9999},children:[g.jsxs("div",{className:"flex items-center justify-between border-b border-neutral-800 px-3 py-2",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:t}),g.jsx("div",{className:"text-[9px] uppercase tracking-[0.16em] text-neutral-600",children:"Color"})]}),g.jsx("button",{type:"button",onClick:()=>c(!1),className:"flex h-7 w-7 items-center justify-center rounded-lg text-neutral-500 transition-colors hover:bg-neutral-900 hover:text-neutral-200","aria-label":"Close color picker",children:g.jsx(Lf,{size:13})})]}),g.jsxs("div",{className:"space-y-3 p-3",children:[g.jsxs("div",{className:"relative h-36 cursor-crosshair overflow-hidden rounded-xl border border-neutral-700 shadow-[inset_0_0_0_1px_rgba(255,255,255,0.06)]",style:{backgroundColor:w},onPointerDown:z=>{z.currentTarget.setPointerCapture(z.pointerId),j(z.clientX,z.clientY,z.currentTarget)},onPointerMove:z=>{z.buttons===1&&j(z.clientX,z.clientY,z.currentTarget)},children:[g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-white to-transparent"}),g.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black to-transparent"}),g.jsx("div",{className:"pointer-events-none absolute top-0 h-full w-px -translate-x-1/2 bg-white/70 shadow-[0_0_0_1px_rgba(0,0,0,0.45)] mix-blend-difference",style:{left:`${S.saturation*100}%`}}),g.jsx("div",{className:"pointer-events-none absolute left-0 h-px w-full -translate-y-1/2 bg-white/70 shadow-[0_0_0_1px_rgba(0,0,0,0.45)] mix-blend-difference",style:{top:`${(1-S.value)*100}%`}}),g.jsx("div",{className:"pointer-events-none absolute h-6 w-6 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-[0_0_0_1px_rgba(0,0,0,0.85),0_8px_18px_rgba(0,0,0,0.45)]",style:{left:`${S.saturation*100}%`,top:`${(1-S.value)*100}%`,backgroundColor:A}})]}),g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("div",{className:"h-9 w-9 flex-shrink-0 rounded-xl border border-neutral-600 shadow-[inset_0_1px_0_rgba(255,255,255,0.08)]",style:{backgroundColor:k}}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:k}),g.jsxs("div",{className:"mt-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-600",children:["S ",$,"% · B ",Q,"% · A ",C,"%"]})]})]}),g.jsx(Fb,{label:"Hue",value:S.hue,min:0,max:360,step:1,displayValue:`${Math.round(S.hue)}°`,background:"linear-gradient(90deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)",thumbColor:w,disabled:n,onCommit:z=>E({hue:z})}),g.jsx(Fb,{label:"Alpha",value:p.alpha,min:0,max:1,step:.01,displayValue:`${C}%`,background:`linear-gradient(90deg, transparent, ${A})`,thumbColor:k,disabled:n,onCommit:z=>Z({...p,alpha:z})}),g.jsxs("label",{className:"grid gap-1.5",children:[g.jsx("span",{className:Rt,children:"Hex"}),g.jsx("input",{value:y,onChange:z=>_(z.target.value),className:`${Ti} h-10 w-full text-[11px] font-medium outline-none`,spellCheck:!1})]})]})]}),document.body):null,L=()=>{n||(c(z=>!z),o||requestAnimationFrame(M))};return g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:t}),g.jsxs("button",{type:"button",disabled:n,"aria-label":`Pick ${t.toLowerCase()} color`,ref:i,onClick:L,className:`${Ti} flex items-center gap-3 text-left hover:border-neutral-700 disabled:cursor-not-allowed ${o?"border-neutral-600":""}`,children:[g.jsx("div",{className:"relative h-7 w-7 flex-shrink-0 overflow-hidden rounded-lg border border-neutral-700 bg-neutral-950 shadow-[inset_0_1px_0_rgba(255,255,255,0.04)]",style:{backgroundColor:e||"transparent"}}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-neutral-100",children:e})]}),H]})}function VY(t){const e=[];let n="",r=null;for(const i of t){if((i==='"'||i==="'")&&!r){r=i;continue}if(i===r){r=null;continue}if(i===","&&!r){n.trim()&&e.push(n.trim()),n="";continue}n+=i}return n.trim()&&e.push(n.trim()),e.map(i=>i.replace(/^["']|["']$/g,"").trim()).filter(Boolean)}function LY(t){return VY(t)[0]??"inherit"}function _Y(t){const e=t.trim();return WA.has(e.toLowerCase())?e:`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function C1(t){const e=t.trim();return e?WA.has(e.toLowerCase())?e:`${_Y(e)}, ui-sans-serif, system-ui, sans-serif`:"inherit"}function DY(){if(typeof document>"u")return[];const t=document.fonts;return t?Array.from(t,e=>e.family.replace(/^["']|["']$/g,"").trim()).filter(Boolean).sort((e,n)=>e.localeCompare(n)):[]}function Yb(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"")}function HY(t,e){const n=e.trim().toLowerCase();return!n||t.toLowerCase().includes(n)?!0:Yb(t).includes(Yb(n))}function Bb(t){if(typeof document>"u")return;const e=t.trim();if(!e)return;const n=`studio-google-font-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(n))return;if(!document.querySelector('link[data-studio-google-font-preconnect="true"]')){const l=document.createElement("link");l.setAttribute("data-studio-google-font-preconnect","true"),l.rel="preconnect",l.href="https://fonts.gstatic.com",l.crossOrigin="anonymous",document.head.appendChild(l)}const i=document.createElement("link");i.id=n,i.rel="stylesheet",i.href=i7(e),document.head.appendChild(i)}function E1(t){if(typeof document>"u")return;const e=`studio-imported-font-${t.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(e))return;const n=document.createElement("style");n.id=e,n.textContent=wg(t),document.head.appendChild(n)}function XY({value:t,disabled:e,importedFonts:n,onImportFonts:r,onCommit:i}){const l=LY(t),o=d.useRef(null),c=d.useRef(null),f=d.useRef(null),[m,p]=d.useState(!1),[O,y]=d.useState(""),[b,S]=d.useState([]),[w,A]=d.useState([]),[k,$]=d.useState(()=>[...B3]),[Q,C]=d.useState(!1),[M,Z]=d.useState(!1),[E,j]=d.useState(!1),[_,H]=d.useState(null),L=typeof window<"u"&&typeof window.queryLocalFonts=="function";d.useEffect(()=>{if(!m)return;const B=D=>{var R;const P=D.target;P instanceof Node&&((R=o.current)!=null&&R.contains(P)||p(!1))};return document.addEventListener("pointerdown",B),()=>document.removeEventListener("pointerdown",B)},[m]),d.useEffect(()=>{m&&requestAnimationFrame(()=>{var B;return(B=c.current)==null?void 0:B.focus()})},[m]),d.useEffect(()=>{let B=!1;return fetch("/api/fonts").then(D=>D.ok?D.json():null).then(D=>{B||!Array.isArray(D==null?void 0:D.fonts)||S(P=>Em([...P,...D.fonts]))}).catch(()=>{}),()=>{B=!0}},[]),d.useEffect(()=>{let B=!1;return Z(!0),fetch("/api/fonts/google").then(D=>D.ok?D.json():null).then(D=>{B||!Array.isArray(D==null?void 0:D.fonts)||$(Em([...D.fonts,...B3]))}).catch(()=>{}).finally(()=>{B||Z(!1)}),()=>{B=!0}},[]),d.useEffect(()=>{k.some(D=>D.toLowerCase()===l.toLowerCase())&&Bb(l);const B=n.find(D=>D.family.toLowerCase()===l.toLowerCase());B&&E1(B)},[l,k,n]);const z=async()=>{if(!L||!window.queryLocalFonts){H("This browser does not expose installed fonts. Import a font file instead.");return}C(!0),H(null);try{const B=await window.queryLocalFonts(),D=[...B].sort((R,X)=>T1(R)-T1(X)),P=D.map(R=>R.family).filter(R=>!!R).map(R=>ao(`${R}.ttf`));A(D),S(R=>Em([...R,...P])),H(B.length===0?"No browser-local fonts were returned.":null)}catch(B){const D=B instanceof Error?B.name:"";H(D==="NotAllowedError"?"Local font access was denied. Import a font file instead.":"Local font access is unavailable. Import a font file instead.")}finally{C(!1)}},F=async B=>{if(!(!(B!=null&&B.length)||!r)){j(!0),H(null);try{const D=await r(B);for(const R of D)E1(R);const P=D[0];P?(i(C1(P.family)),y(""),p(!1)):H("No supported font files were imported.")}finally{j(!1)}}},ee=d.useMemo(()=>Nb(n.map(B=>({family:B.family,source:"Imported"}))),[n]),W=d.useMemo(()=>{const B=DY(),D=new Set(k.map(R=>R.toLowerCase())),P=b.map(R=>({family:R,source:D.has(R.toLowerCase())?"Google":"Local"}));return yY(Nb([{family:l,source:"Current"},...B.map(R=>({family:R,source:"Document"})),...ee,...k.map(R=>({family:R,source:"Google"})),...P,...xY.map(R=>({family:R,source:"System"}))]))},[l,k,b,ee]),V=d.useMemo(()=>{const B=W.filter(R=>HY(R.family,O));if(O.trim())return B.slice(0,200);const D=new Map;for(const R of B){const X=D.get(R.source)??[];X.push(R),D.set(R.source,X)}const P=[];for(const R of["Current","Document","Imported"])P.push(...D.get(R)??[]);return P.push(...(D.get("Google")??[]).slice(0,100)),P.push(...(D.get("Local")??[]).slice(0,80)),P.push(...D.get("System")??[]),P},[W,O]),G=async B=>{if(!r)return null;const P=w.filter(ne=>ao(`${ne.family}.ttf`)===B).sort((ne,ce)=>T1(ne)-T1(ce)).find(ne=>typeof ne.blob=="function");if(!(P!=null&&P.blob))return null;const R=await P.blob(),X=Rb(P.style??"Regular")||"Regular",Y=Rb(`${B} ${X}`)||B,U=new File([R],`${Y}.ttf`,{type:R.type||"font/ttf"}),te=await r([U]);return te.find(ne=>ne.family.toLowerCase()===B.toLowerCase())??te[0]??null},q=async B=>{if(B.source==="Local"){j(!0),H(null);try{const P=await G(B.family);if(P){E1(P),i(C1(P.family)),y(""),p(!1);return}i(C1(B.family)),y(""),p(!1)}finally{j(!1)}return}B.source==="Google"&&Bb(B.family);const D=n.find(P=>P.family.toLowerCase()===B.family.toLowerCase());D&&E1(D),i(C1(B.family)),y(""),p(!1)};return g.jsxs("div",{ref:o,className:"relative grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Font family"}),g.jsxs("button",{type:"button",disabled:e,onClick:()=>p(B=>!B),className:`${Ti} flex h-10 items-center justify-between gap-3 text-left hover:border-neutral-700 disabled:cursor-not-allowed`,children:[g.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px] font-medium text-neutral-100",style:{fontFamily:t},children:l}),g.jsx("span",{className:"flex-shrink-0 text-[10px] uppercase tracking-[0.14em] text-neutral-600",children:"Font"})]}),m&&g.jsxs("div",{className:"absolute left-0 right-0 top-[calc(100%+6px)] z-50 overflow-hidden rounded-xl border border-neutral-700 bg-neutral-950 shadow-2xl",children:[g.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto_auto] gap-2 border-b border-neutral-800 p-2",children:[g.jsx("input",{ref:c,type:"text",value:O,disabled:e,placeholder:M?"Loading Google Fonts...":"Search fonts",onChange:B=>y(B.target.value),onKeyDown:B=>{B.key==="Escape"&&(B.preventDefault(),p(!1)),B.key==="Enter"&&V[0]&&(B.preventDefault(),q(V[0]))},className:"min-w-0 rounded-lg border border-neutral-800 bg-neutral-900 px-2.5 py-2 text-[11px] font-medium text-neutral-100 outline-none placeholder:text-neutral-600 focus:border-neutral-600"}),L&&g.jsx("button",{type:"button",disabled:e||Q,onClick:z,className:"rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700",children:Q?"...":"Local"}),g.jsx("button",{type:"button",disabled:e||E||!r,onClick:()=>{var B;return(B=f.current)==null?void 0:B.click()},className:"rounded-lg border border-neutral-700 bg-neutral-900 px-2.5 text-[10px] font-medium text-neutral-400 transition-colors hover:border-neutral-600 hover:text-neutral-100 disabled:cursor-not-allowed disabled:text-neutral-700",children:E?"...":"Import"}),g.jsx("input",{ref:f,type:"file",accept:".ttf,.otf,.ttc,.woff,.woff2,.eot,font/*",multiple:!0,"aria-label":"Import local font files",disabled:e||E||!r,className:"hidden",onChange:async B=>{await F(B.target.files),B.target.value=""}})]}),_&&g.jsx("div",{className:"border-b border-neutral-800 px-3 py-2 text-[10px] leading-4 text-neutral-500",children:_}),g.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:V.length===0?g.jsx("div",{className:"px-2 py-3 text-[11px] text-neutral-500",children:"No fonts found."}):V.map(B=>g.jsxs("button",{type:"button",onClick:()=>q(B),className:`flex w-full min-w-0 items-center justify-between gap-3 rounded-lg px-2 py-2 text-left text-[11px] transition-colors ${B.family===l?"bg-studio-accent/15 text-neutral-50":"text-neutral-300 hover:bg-neutral-900 hover:text-neutral-100"}`,children:[g.jsx("span",{className:"min-w-0 truncate font-medium",children:B.family}),g.jsx("span",{className:"flex-shrink-0 text-[9px] uppercase tracking-[0.14em] text-neutral-600",children:B.source})]},`${B.source}-${B.family}`))})]})]})}const zY=["closest-side","closest-corner","farthest-side","farthest-corner"];function ek(t){return t===" "||t===`
|
|
120
|
-
`||t==="\r"||t===" "||t==="\f"}function mg(t){return t!=null&&t>="0"&&t<="9"}function tk(t){if(!t)return!1;let e=t[0]==="-"?1:0,n=0;for(;mg(t[e]);)e+=1,n+=1;if(t[e]===".")for(e+=1;mg(t[e]);)e+=1,n+=1;return n>0&&e===t.length}function Q8(t){if(!t)return null;const e=t.trim();if(!tk(e))return null;const n=Number(e);return Number.isFinite(n)?n:null}function P8(t){const e=[];let n="";for(const r of t){if(ek(r)){n&&(e.push(n),n="");continue}n+=r}return n&&e.push(n),e}function Us(t,e){return P8(t.toLowerCase()).includes(e)}function Qf(t,e){if(!(t!=null&&t.endsWith("%")))return e;const n=Q8(t.slice(0,-1));return n==null?e:Eu(n,0,100)}function nk(t){const e=t==null?void 0:t.trim().toLowerCase();return e!=null&&e.endsWith("deg")?Q8(e.slice(0,-3)):null}function FY(t){if(!t.endsWith("%"))return null;const e=t.slice(0,-1).trimEnd();let n=e.length;for(;n>0&&(mg(e[n-1])||e[n-1]===".");)n-=1;n>0&&e[n-1]==="-"&&(n-=1);const r=e.slice(n);return!tk(r)||n===0||!ek(e[n-1])?null:n}function Eu(t,e,n){return Math.min(n,Math.max(e,t))}function fi(t){return Math.round(t*100)/100}function YY(t,e){const n=Q8(t);return n==null?e:Eu(n,0,100)}function Z8(t){const e=t.trim(),n=FY(e);if(n==null)return{color:e,position:null};const r=e.slice(0,-1).trimEnd();return{color:r.slice(0,n).trim(),position:YY(r.slice(n),0)}}function id(t){return t.length===0?[{color:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}]:t.length===1?[{color:t[0].color,position:0},{color:t[0].color,position:100}]:t.map((n,r)=>({color:n.color,position:n.position??r/(t.length-1)*100})).map(n=>({color:n.color,position:fi(Eu(n.position,0,100))}))}function BY(t){const e=[];let n="",r=0;for(const i of t){if(i==="("&&(r+=1),i===")"&&(r=Math.max(0,r-1)),i===","&&r===0){n.trim()&&e.push(n.trim()),n="";continue}n+=i}return n.trim()&&e.push(n.trim()),e}function qY(t){const e=t.trim().toLowerCase(),n={"to top":0,"to top right":45,"to right top":45,"to right":90,"to bottom right":135,"to right bottom":135,"to bottom":180,"to bottom left":225,"to left bottom":225,"to left":270,"to top left":315,"to left top":315};return e in n?n[e]:null}function IY(t){const e=t[0]??"",n=qY(e),r=nk(e),i=r!=null,l=r??n??180,o=i||n!=null?t.slice(1):t;return{kind:"linear",repeating:!1,angle:l,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:id(o.map(Z8))}}function UY(t){const e=t[0]??"",n=e.toLowerCase(),r=Us(n,"at")||Us(n,"circle")||Us(n,"ellipse")||n.includes("closest-")||n.includes("farthest-"),i=r?e:"",l=r?t.slice(1):t,o=i.toLowerCase(),c=P8(o),f=c.indexOf("at"),m=Us(o,"circle")?"circle":"ellipse",p=zY.find(O=>c.includes(O))??"farthest-corner";return{kind:"radial",repeating:!1,angle:180,centerX:Qf(c[f+1],50),centerY:Qf(c[f+2],50),shape:m,radialSize:p,stops:id(l.map(Z8))}}function WY(t){const e=t[0]??"",n=e.toLowerCase(),r=Us(n,"from")||Us(n,"at"),i=r?e:"",l=r?t.slice(1):t,o=P8(i.toLowerCase()),c=o.indexOf("from"),f=o.indexOf("at");return{kind:"conic",repeating:!1,angle:nk(o[c+1])??0,centerX:Qf(o[f+1],50),centerY:Qf(o[f+2],50),shape:"ellipse",radialSize:"farthest-corner",stops:id(l.map(Z8))}}function pg(t){return{kind:"linear",repeating:!1,angle:135,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:id([{color:t&&t!=="transparent"?t:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}])}}function GY(t){if(!t||t==="none")return null;const e=t.trim(),n=e.indexOf("(");if(n<=0||!e.endsWith(")"))return null;const r=e.slice(0,n).toLowerCase(),l={"linear-gradient":{kind:"linear",repeating:!1},"radial-gradient":{kind:"radial",repeating:!1},"conic-gradient":{kind:"conic",repeating:!1},"repeating-linear-gradient":{kind:"linear",repeating:!0},"repeating-radial-gradient":{kind:"radial",repeating:!0},"repeating-conic-gradient":{kind:"conic",repeating:!0}}[r];if(!l)return null;const{kind:o,repeating:c}=l,f=BY(e.slice(n+1,-1));return{...o==="linear"?IY(f):o==="radial"?UY(f):WY(f),repeating:c}}function KY(t){return`${t.color} ${fi(t.position)}%`}function Pf(t){const e=`${t.repeating?"repeating-":""}${t.kind}-gradient`,n=t.stops.map(KY).join(", ");return t.kind==="linear"?`${e}(${fi(t.angle)}deg, ${n})`:t.kind==="radial"?`${e}(${t.shape} ${t.radialSize} at ${fi(t.centerX)}% ${fi(t.centerY)}%, ${n})`:`${e}(from ${fi(t.angle)}deg at ${fi(t.centerX)}% ${fi(t.centerY)}%, ${n})`}function Pm(t,e,n){return Math.round(t+(e-t)*n)}function Zm(t){return t.toString(16).padStart(2,"0")}function JY(t,e){var A;const n=Eu(e,0,100),r=[...t.stops].sort((k,$)=>k.position-$.position),i=r.find(k=>Math.abs(k.position-n)<.001);if(i)return i.color;const l=r.find(k=>k.position>n)??r.at(-1),o=[...r].reverse().find(k=>k.position<n)??r[0];if(!o||!l)return((A=r[0])==null?void 0:A.color)??"rgba(255, 255, 255, 1)";if(o===l)return o.color;const c=o.color,f=l.color,m=c?Ib(c):null,p=f?Ib(f):null;if(!m||!p)return o.color;const O=(n-o.position)/Math.max(1,l.position-o.position),y=Pm(m.red,p.red,O),b=Pm(m.green,p.green,O),S=Pm(m.blue,p.blue,O),w=fi(m.alpha+(p.alpha-m.alpha)*O);return w>=1?`#${Zm(y)}${Zm(b)}${Zm(S)}`.toUpperCase():`rgba(${y}, ${b}, ${S}, ${w})`}function qb(t,e){const n=fi(Eu(e,0,100)),r=JY(t,n),i=[...t.stops,{color:r,position:n}].sort((l,o)=>l.position-o.position);return{...t,stops:i}}function Ib(t){const e=t.trim().toLowerCase();if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const n=e.match(/^#([0-9a-f]{6})$/i);if(n)return{red:Number.parseInt(n[1].slice(0,2),16),green:Number.parseInt(n[1].slice(2,4),16),blue:Number.parseInt(n[1].slice(4,6),16),alpha:1};const r=e.match(/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i);return r?{red:Number.parseFloat(r[1]),green:Number.parseFloat(r[2]),blue:Number.parseFloat(r[3]),alpha:r[4]!=null?Number.parseFloat(r[4]):1}:null}function Ou(t){const e=t.trim(),n=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(n).replace(/\\/g,"/").replace(/^\.?\//,"")}function eB(t,e){const n=Ou(t).split("/").filter(Boolean),r=Ou(e).split("/").filter(Boolean);for(n.pop();n.length>0&&r.length>0&&n[0]===r[0];)n.shift(),r.shift();return[...n.map(()=>".."),...r].join("/")||e}function Ub(t){return Ou(t)}function tB(t,e,n){const r=Ou(t);if(!r)return null;for(const i of n){const l=Ou(i),o=eB(e,i);if(r===l||r===o||r.endsWith(`/${l}`)||r.endsWith(`/${o}`))return i}return null}function nB({projectId:t,sourceFile:e,value:n,assets:r,disabled:i,onCommit:l,onImportAssets:o}){const c=d.useRef(null),[f,m]=d.useState(!1),p=d.useMemo(()=>r.filter(S=>eu.test(S)),[r]),O=d.useMemo(()=>tB(n,e,p),[p,e,n]),y=O?"":n,b=async S=>{if(!(!(S!=null&&S.length)||!o)){m(!0);try{const A=(await o(S)).find(k=>eu.test(k));A&&l(`url("${Ub(A)}")`)}finally{m(!1)}}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2",children:[g.jsx("span",{className:Rt,children:"Project asset"}),g.jsxs("button",{type:"button",disabled:i||f,onClick:()=>{var S;return(S=c.current)==null?void 0:S.click()},className:`inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors ${i||f?"cursor-not-allowed text-neutral-600":"cursor-pointer hover:border-neutral-600 hover:text-white"}`,children:[g.jsx(Lg,{size:12,className:"flex-shrink-0"}),g.jsx("span",{className:"truncate",children:f?"Uploading…":"Upload image"})]}),g.jsx("input",{ref:c,type:"file",accept:"image/*","aria-label":"Upload image asset",disabled:i||f,className:"hidden",onChange:async S=>{await b(S.target.files),S.target.value=""}})]}),p.length>0?g.jsxs("div",{className:"space-y-3",children:[O&&g.jsx("div",{className:"overflow-hidden rounded-xl border border-neutral-800 bg-neutral-900/80",children:g.jsx("img",{src:`/api/projects/${t}/preview/${O}`,alt:O.split("/").pop()??O,className:"h-28 w-full object-contain bg-neutral-950/80"})}),g.jsx("div",{className:Ti,children:g.jsxs("select",{value:O??"",disabled:i,onChange:S=>{const w=S.target.value;if(!w){l("none");return}l(`url("${Ub(w)}")`)},className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:[g.jsx("option",{value:"",children:"None"}),p.map(S=>g.jsx("option",{value:S,children:S},S))]})})]}):g.jsx("div",{className:"rounded-xl border border-dashed border-neutral-800 bg-neutral-900/50 px-3 py-3 text-[11px] leading-5 text-neutral-500",children:"No image assets yet. Upload one here and Studio will also add it to the Assets tab."})]}),g.jsx($8,{label:"External URL",value:y,disabled:i,onCommit:S=>l(S.trim()?`url("${S.trim()}")`:"none")})]})}function rB({value:t,fallbackColor:e,disabled:n,onCommit:r}){const i=d.useRef(null),l=GY(t)??pg(e),o=y=>r(Pf(y)),c=y=>o({...l,...y}),f=(y,b)=>{const S=l.stops.map((w,A)=>A===y?{...w,...b}:w);o({...l,stops:S})},m=y=>{var S,w;const b=y!=null?qb(l,y):qb(l,((S=l.stops.at(-1))==null?void 0:S.position)!=null?Math.min(100,(((w=l.stops.at(-1))==null?void 0:w.position)??90)+10):100);o(b)},p=y=>{l.stops.length<=2||o({...l,stops:l.stops.filter((b,S)=>S!==y)})},O={backgroundImage:Pf(l)};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:`${Ti} space-y-3 p-3`,children:[g.jsx("div",{ref:i,className:"relative h-11 overflow-hidden rounded-lg border border-neutral-700",style:O,onClick:y=>{var S;if(n)return;const b=(S=i.current)==null?void 0:S.getBoundingClientRect();!b||b.width<=0||m((y.clientX-b.left)/b.width*100)},children:l.stops.map((y,b)=>g.jsx("div",{className:"absolute top-1/2 h-4 w-4 -translate-y-1/2 rounded-full border-2 border-white/90 shadow-[0_0_0_1px_rgba(0,0,0,0.35)]",style:{left:`calc(${y.position}% - 8px)`,backgroundColor:y.color}},`stop-preview-${b}`))}),g.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[g.jsx(ro,{disabled:n,value:l.kind,onChange:y=>c({kind:y}),options:[{label:"Linear",value:"linear"},{label:"Radial",value:"radial"},{label:"Conic",value:"conic"}]}),g.jsxs("label",{className:"flex items-center gap-2 text-[11px] font-medium text-neutral-400",children:[g.jsx("input",{type:"checkbox",checked:l.repeating,disabled:n,onChange:y=>c({repeating:y.target.checked}),className:"h-4 w-4 rounded border-neutral-700 bg-neutral-950 text-[#3ce6ac] focus:ring-[#3ce6ac]"}),"Repeat"]}),g.jsxs("button",{type:"button",disabled:n,onClick:()=>o({...l,stops:[...l.stops].reverse().map(y=>({...y,position:100-y.position}))}),className:"inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-600",children:[g.jsx(Dg,{size:12}),"Reverse"]})]})]}),(l.kind==="linear"||l.kind==="conic")&&g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx("span",{className:Rt,children:l.kind==="linear"?"Angle":"Start angle"}),g.jsx(qr,{value:l.angle,min:0,max:360,step:1,disabled:n,displayValue:`${Math.round(l.angle)}°`,formatDisplayValue:y=>`${Math.round(y)}°`,onCommit:y=>c({angle:y})})]}),l.kind==="radial"&&g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Shape",value:l.shape,disabled:n,onChange:y=>c({shape:y}),options:["ellipse","circle"]}),g.jsx(wn,{label:"Size",value:l.radialSize,disabled:n,onChange:y=>c({radialSize:y}),options:["closest-side","closest-corner","farthest-side","farthest-corner"]})]}),(l.kind==="radial"||l.kind==="conic")&&g.jsxs("div",{className:ur,children:[g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Center X"}),g.jsx(qr,{value:l.centerX,min:0,max:100,step:1,disabled:n,displayValue:`${Math.round(l.centerX)}%`,formatDisplayValue:y=>`${Math.round(y)}%`,onCommit:y=>c({centerX:y})})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Center Y"}),g.jsx(qr,{value:l.centerY,min:0,max:100,step:1,disabled:n,displayValue:`${Math.round(l.centerY)}%`,formatDisplayValue:y=>`${Math.round(y)}%`,onCommit:y=>c({centerY:y})})]})]}),g.jsxs("div",{className:"space-y-3",children:[g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsx("span",{className:Rt,children:"Stops"}),g.jsxs("button",{type:"button",disabled:n||l.stops.length>=6,onClick:()=>m(),className:"inline-flex h-7 items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-600",children:[g.jsx(Lg,{size:12}),"Add stop"]})]}),g.jsx("div",{className:"space-y-3",children:l.stops.map((y,b)=>g.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_68px_28px] gap-2",children:[g.jsx(Yc,{label:`Stop ${b+1}`,value:y.color,disabled:n,onCommit:S=>f(b,{color:S})}),g.jsx($8,{label:"Pos",value:`${Math.round(y.position)}%`,disabled:n,onCommit:S=>f(b,{position:Number.parseFloat(S.replace("%",""))||0})}),g.jsx("button",{type:"button",disabled:n||l.stops.length<=2,onClick:()=>p(b),className:"mt-[22px] flex h-10 items-center justify-center rounded-lg border border-neutral-700 bg-neutral-950 text-neutral-400 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:text-neutral-700","aria-label":`Remove stop ${b+1}`,children:g.jsx(Lf,{size:12})})]},`stop-editor-${b}`))})]})]})}function iB({projectId:t,element:e,styles:n,assets:r,onSetStyle:i,onImportAssets:l}){const o=!e.capabilities.canEditStyles,c=n.display==="flex"||n.display==="inline-flex",f=hg(n["border-radius"])??0,m=Math.round((hg(n.opacity)??1)*100),p=La(n["border-width"]??"")??La(n["border-top-width"]??"")??0,O=n.background!=null&&n.background!=="none"&&n.background!==""||n["background-color"]!=null&&n["background-color"]!=="transparent"&&n["background-color"]!=="rgba(0, 0, 0, 0)"&&n["background-color"]!==""||n["background-image"]!=null&&n["background-image"]!=="none"&&n["background-image"]!==""||p>0,y=n["border-style"]||n["border-top-style"]||"none",b=n["border-color"]||n["border-top-color"]||"rgba(255, 255, 255, 0.18)",S=wY(n["box-shadow"]),w=_b(n.filter,"blur"),A=_b(n["backdrop-filter"],"blur"),k=n["clip-path"]||"none",$=kY(k),Q=MY(k),C=n["background-image"]??"none",M=Vg(e),Z=C&&C!=="none"?C.includes("gradient")?"Gradient":"Image":"Solid",[E,j]=d.useState(Z),_=QY(C);d.useEffect(()=>{j(Z)},[Z,e.id,e.selector,C]);const H=L=>{if(j(L),L==="Solid"){i("background-image","none");return}L==="Gradient"&&!C.includes("gradient")&&i("background-image",Pf(pg(n["background-color"])))};return g.jsxs(g.Fragment,{children:[c&&g.jsx(Er,{title:"Flex",icon:g.jsx(K1,{size:15}),defaultCollapsed:!0,children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(ro,{disabled:o,value:n["flex-direction"]||"row",onChange:L=>i("flex-direction",L),options:[{label:"→ Row",value:"row"},{label:"↓ Column",value:"column"}]}),g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Justify",value:n["justify-content"]||"flex-start",disabled:o,onChange:L=>i("justify-content",L),options:["flex-start","center","space-between","space-around","space-evenly","flex-end"]}),g.jsx(wn,{label:"Align",value:n["align-items"]||"stretch",disabled:o,onChange:L=>i("align-items",L),options:["stretch","flex-start","center","flex-end","baseline"]})]}),g.jsx($8,{label:"Gap",value:n.gap??"0px",disabled:o,onCommit:L=>i("gap",L.endsWith("px")?L:`${L}px`)})]})}),O&&g.jsx(Er,{title:"Radius",icon:g.jsx(eR,{size:15}),defaultCollapsed:!0,children:g.jsx(qr,{value:f,min:0,max:Math.max(240,Math.ceil(f)),step:1,disabled:o,displayValue:`${Ct(f)}px`,formatDisplayValue:L=>`${Ct(L)}px`,onCommit:L=>i("border-radius",`${Ct(L)}px`)})}),g.jsx(Er,{title:"Stroke",icon:g.jsx(Ij,{size:15}),defaultCollapsed:!0,children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:ur,children:[g.jsx(Yr,{label:"Width",value:Is(p),disabled:o,liveCommit:!0,onCommit:async L=>{const z=vY(L,{min:0,max:200,fallback:p});if(z)for(const[F,ee]of TY(z,y))await i(F,ee)}}),g.jsx(wn,{label:"Style",value:y,disabled:o,onChange:async L=>{for(const[z,F]of CY(L,Is(p)))await i(z,F)},options:["none","solid","dashed","dotted","double","hidden","groove","ridge","inset","outset"]})]}),g.jsx(Yc,{label:"Stroke color",value:b,disabled:o,onCommit:L=>i("border-color",L)})]})}),g.jsx(Er,{title:"Effects",icon:g.jsx(_g,{size:15}),defaultCollapsed:!0,children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(wn,{label:"Shadow",value:S,disabled:o,onChange:L=>{L!=="custom"&&i("box-shadow",AY(L,n["box-shadow"]))},options:["custom","none","soft","lift","glow"]}),g.jsxs("div",{className:ur,children:[g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Layer blur"}),g.jsx(qr,{value:w,min:0,max:Math.max(40,Math.ceil(w)),step:1,disabled:o,displayValue:`${Ct(w)}px`,formatDisplayValue:L=>`${Ct(L)}px`,onCommit:L=>i("filter",Db(n.filter,"blur",L))})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Backdrop"}),g.jsx(qr,{value:A,min:0,max:Math.max(60,Math.ceil(A)),step:1,disabled:o,displayValue:`${Ct(A)}px`,formatDisplayValue:L=>`${Ct(L)}px`,onCommit:L=>i("backdrop-filter",Db(n["backdrop-filter"],"blur",L))})]})]})]})}),g.jsx(Er,{title:"Clip",icon:g.jsx(K1,{size:15}),defaultCollapsed:!0,children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Overflow",value:n.overflow||"visible",disabled:o,onChange:L=>i("overflow",L),options:["visible","hidden","clip","auto","scroll"]}),g.jsx(wn,{label:"Mask",value:$,disabled:o,onChange:L=>{L!=="custom"&&i("clip-path",EY(L,f,k))},options:["custom","none","inset","circle"]})]}),g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:"Mask inset"}),g.jsx(qr,{value:Q,min:0,max:Math.max(120,Math.ceil(Q)),step:1,disabled:o,displayValue:`${Ct(Q)}px`,formatDisplayValue:L=>`${Ct(L)}px`,onCommit:L=>i("clip-path",$Y(L,f))})]})]})}),g.jsx(Er,{title:"Transparency",icon:g.jsx(g7,{size:15}),defaultCollapsed:!0,children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(qr,{value:m,min:0,max:100,step:1,disabled:o,displayValue:`${m}%`,formatDisplayValue:L=>`${Math.round(L)}%`,onCommit:L=>i("opacity",Ct(L/100))}),g.jsx(wn,{label:"Mode",value:n["mix-blend-mode"]||"normal",disabled:o,onChange:L=>i("mix-blend-mode",L),options:["normal","multiply","screen","overlay","darken","lighten"]})]})}),g.jsx(Er,{title:"Fill",icon:g.jsx(qj,{size:15}),accessory:g.jsx("div",{className:"rounded-full border border-neutral-700 bg-neutral-900 px-2.5 py-1 text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-400",children:E}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(ro,{disabled:o,value:E,onChange:H,options:[{label:"Solid",value:"Solid"},{label:"Gradient",value:"Gradient"},{label:"Image",value:"Image"}]}),E==="Solid"?g.jsx(Yc,{label:"Fill color",value:n["background-color"]??"transparent",disabled:o,onCommit:L=>i("background-color",L)}):E==="Gradient"?g.jsx(rB,{value:C!=="none"?C:Pf(pg(n["background-color"])),fallbackColor:n["background-color"],disabled:o,onCommit:L=>i("background-image",L)}):g.jsx(nB,{projectId:t,sourceFile:e.sourceFile,value:_,assets:r,disabled:o,onCommit:L=>i("background-image",L),onImportAssets:l}),!M&&g.jsx(Yc,{label:"Text color",value:n.color??"rgb(0, 0, 0)",disabled:o,onCommit:L=>i("color",L)})]})})]})}function rk(t){const e=t.trim().replace(/\s+/g," ");return e.length<=56?e:`${e.slice(0,55)}…`}function ik(t,e){return t.computedStyles.color||e.color||"rgb(0, 0, 0)"}function Tc(t,e,n,r){return t.computedStyles[n]||e[n]||r}const jc=["100","200","300","400","500","600","700","800","900"],aB={100:"100 · Thin",200:"200 · Extra Light",300:"300 · Light",400:"400 · Regular",500:"500 · Medium",600:"600 · Semi Bold",700:"700 · Bold",800:"800 · Extra Bold",900:"900 · Black"};function lB(t){var i;const e=document.fonts;if(!e)return jc;const n=(i=t.split(",")[0])==null?void 0:i.trim().replace(/['"]/g,"");if(!n)return jc;const r=[];for(const l of jc)e.check(`${l} 16px "${n}"`)&&r.push(l);return r.length>0?r:jc}function sB({label:t,value:e,disabled:n,autoFocus:r,onCommit:i}){const[l,o]=d.useState(e),c=d.useRef(null),f=d.useRef(null),m=d.useRef(!1),p=d.useRef(e);p.current=e,d.useEffect(()=>{m.current||o(e)},[e]),d.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),d.useEffect(()=>{var b;r&&((b=c.current)==null||b.focus())},[r]);const O=b=>{f.current&&clearTimeout(f.current),b!==p.current&&i(b)},y=b=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{b!==p.current&&i(b)},120)};return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:Rt,children:t}),g.jsx("div",{className:Ti,children:g.jsx("textarea",{ref:c,value:l,disabled:n,rows:4,onFocus:()=>{m.current=!0},onChange:b=>{o(b.target.value),y(b.target.value)},onBlur:()=>{m.current=!1,O(l)},className:"w-full resize-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})})]})}function oB({value:t,disabled:e,fontFamily:n,onCommit:r}){const i=n?lB(n):jc,l=t&&!i.includes(t)?[t,...i]:i;return g.jsx("div",{className:Ti,children:g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("span",{className:"flex-shrink-0 text-[11px] font-medium text-neutral-500",children:"Weight"}),g.jsx("select",{value:t,disabled:e,onChange:o=>r(o.target.value),className:"min-w-0 w-full appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600",children:l.map(o=>g.jsx("option",{value:o,children:aB[o]??o},o))})]})})}function cB({field:t,inheritedStyles:e,disabled:n,onCommit:r}){return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Line",value:Tc(t,e,"line-height","normal"),disabled:n,options:["normal","1","1.1","1.2","1.25","1.3","1.4","1.5","1.6","1.75","2"],onChange:i=>r("line-height",Lb("line-height",i))}),g.jsx(wn,{label:"Track",value:Tc(t,e,"letter-spacing","0px"),disabled:n,options:["0px","-0.05em","-0.04em","-0.03em","-0.02em","-0.01em","0em","0.01em","0.02em","0.03em","0.05em","0.1em","0.15em","0.2em"],onChange:i=>r("letter-spacing",Lb("letter-spacing",i))})]}),g.jsxs("div",{className:ur,children:[g.jsx(wn,{label:"Align",value:Tc(t,e,"text-align","start"),disabled:n,onChange:i=>r("text-align",i),options:["start","left","center","right","justify","end"]}),g.jsx(wn,{label:"Case",value:Tc(t,e,"text-transform","none"),disabled:n,onChange:i=>r("text-transform",i),options:["none","uppercase","lowercase","capitalize"]})]}),g.jsx(wn,{label:"Style",value:Tc(t,e,"font-style","normal"),disabled:n,onChange:i=>r("font-style",i),options:["normal","italic"]})]})}function Wb({field:t,styles:e,fontAssets:n,onImportFonts:r,showRemove:i,onSetText:l,onSetTextFieldStyle:o,onRemoveTextField:c}){return g.jsxs("div",{className:"space-y-4 rounded-xl border border-neutral-800 bg-neutral-900/60 p-3",children:[g.jsxs("div",{className:i?"flex min-w-0 items-center justify-between gap-2":"min-w-0",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:rk(t.value)||"Text"}),g.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:t.tagName})]}),i&&g.jsx("button",{type:"button",onClick:()=>c(t.key),className:"inline-flex h-7 flex-shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white",children:"Remove"})]}),g.jsx(sB,{label:"Content",value:t.value,disabled:!1,autoFocus:i,onCommit:f=>l(f,t.key)},t.key),g.jsx(Yc,{label:"Text color",value:ik(t,e),disabled:!1,onCommit:f=>o(t.key,"color",f)}),g.jsxs("div",{className:ur,children:[g.jsx(Yr,{label:"Size",value:t.computedStyles["font-size"]||e["font-size"]||"16px",disabled:!1,liveCommit:!0,onCommit:f=>o(t.key,"font-size",f)}),g.jsx(oB,{value:t.computedStyles["font-weight"]||e["font-weight"]||"400",fontFamily:t.computedStyles["font-family"]||e["font-family"],disabled:!1,onCommit:f=>o(t.key,"font-weight",f)})]}),g.jsx(XY,{value:t.computedStyles["font-family"]||e["font-family"]||"inherit",disabled:!1,importedFonts:n,onImportFonts:r,onCommit:f=>o(t.key,"font-family",f)}),g.jsx(cB,{field:t,inheritedStyles:e,disabled:!1,onCommit:(f,m)=>o(t.key,f,m)})]})}function uB({element:t,styles:e,fontAssets:n,onImportFonts:r,onSetText:i,onSetTextFieldStyle:l,onAddTextField:o,onRemoveTextField:c}){var b;const f=Vg(t),[m,p]=d.useState(((b=t.textFields[0])==null?void 0:b.key)??null);if(d.useEffect(()=>{const S=t.textFields;p(w=>{var A;return w&&S.some(k=>k.key===w)?w:((A=S[0])==null?void 0:A.key)??null})},[t.id,t.selector,t.textFields]),!f)return null;const O=t.textFields,y=O.find(S=>S.key===m)??O[0];return y?O.length===1?g.jsx(Er,{title:"Text",icon:g.jsx(ax,{size:15}),children:g.jsx(Wb,{field:y,styles:e,fontAssets:n,onImportFonts:r,showRemove:!1,onSetText:i,onSetTextFieldStyle:l,onRemoveTextField:c})}):g.jsx(Er,{title:"Text",icon:g.jsx(ax,{size:15}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:"grid gap-1.5",children:[g.jsxs("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2",children:[g.jsx("span",{className:Rt,children:"Text layers"}),g.jsxs("button",{type:"button",onClick:()=>{Promise.resolve(o(y.key)).then(S=>{S&&p(S)})},className:"inline-flex h-7 max-w-full items-center gap-1.5 rounded-lg border border-neutral-700 bg-neutral-950 px-2.5 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white",children:[g.jsx(Lg,{size:12,className:"flex-shrink-0"}),g.jsx("span",{className:"truncate",children:"Add text"})]})]}),g.jsx("div",{className:"grid gap-2",children:O.map((S,w)=>{const A=S.key===y.key;return g.jsx("button",{type:"button",onClick:()=>p(S.key),className:`min-w-0 w-full rounded-xl border px-3 py-2 text-left transition-colors ${A?"border-studio-accent/50 bg-studio-accent/10":"border-neutral-800 bg-neutral-900/80 hover:border-neutral-700 hover:bg-neutral-900"}`,children:g.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[g.jsx("span",{className:"h-4 w-4 flex-shrink-0 rounded border border-neutral-700 bg-neutral-950",style:{backgroundColor:ik(S,e)}}),g.jsx("span",{className:"min-w-0 truncate text-[11px] font-medium text-neutral-100",children:rk(S.value)||`Text ${w+1}`})]}),g.jsx("span",{className:"flex-shrink-0 rounded-md border border-neutral-700 bg-neutral-950 px-1.5 py-0.5 text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:S.tagName})]})},S.key)})})]}),g.jsx(Wb,{field:y,styles:e,fontAssets:n,onImportFonts:r,showRemove:!0,onSetText:i,onSetTextFieldStyle:l,onRemoveTextField:c})]})}):null}function jm(t){return!Number.isFinite(t)||t<0?"0.00s":`${t.toFixed(2)}s`}function Rm(t){const e=t.replace(/s$/i,"").trim(),n=Number.parseFloat(e);return Number.isFinite(n)&&n>=0?n:null}function fB({element:t,onSetAttribute:e}){const n=Number.parseFloat(t.dataAttributes.start??"0")||0,r=Number.parseFloat(t.dataAttributes.duration??t.dataAttributes["hf-authored-duration"]??"0")||0,i=n+r,l=f=>{const m=Rm(f);m!=null&&e("start",m.toFixed(2))},o=f=>{const m=Rm(f);m==null||m<=0||e("duration",m.toFixed(2))},c=f=>{const m=Rm(f);m==null||m<=n||e("duration",(m-n).toFixed(2))};return g.jsxs(Er,{title:"Timing",icon:g.jsx(Xj,{size:15}),children:[g.jsxs("div",{className:ur,children:[g.jsx(Yr,{label:"Start",value:jm(n),onCommit:l}),g.jsx(Yr,{label:"End",value:jm(i),onCommit:c})]}),g.jsx("div",{className:"mt-3",children:g.jsx(Yr,{label:"Duration",value:jm(r),onCommit:o})})]})}const dB=d.memo(function({projectId:e,projectDir:n,assets:r,element:i,multiSelectCount:l=0,copiedAgentPrompt:o,onClearSelection:c,onSetStyle:f,onSetAttribute:m,onSetHtmlAttribute:p,onSetManualOffset:O,onSetManualSize:y,onSetManualRotation:b,onSetText:S,onSetTextFieldStyle:w,onAddTextField:A,onRemoveTextField:k,onAskAgent:$,onImportAssets:Q,fontAssets:C=[],onImportFonts:M}){const Z=(i==null?void 0:i.computedStyles)??bY;if(!i)return g.jsx("div",{className:"flex h-full flex-col bg-neutral-900",children:g.jsx("div",{className:"flex flex-1 flex-col items-center justify-center px-6 text-center",children:l>1?g.jsxs(g.Fragment,{children:[g.jsx(K1,{size:18,className:"mb-3 text-neutral-600"}),g.jsxs("p",{className:"text-sm font-medium text-neutral-200",children:[l," elements selected"]}),g.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"Select a single element to edit its properties. Click an element in the preview or use the timeline layer panel."})]}):g.jsxs(g.Fragment,{children:[g.jsx(g7,{size:18,className:"mb-3 text-neutral-600"}),g.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Select an element in the preview."}),g.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"The inspector is tuned for element edits with safer geometry controls, color picking, and cleaner grouped layer controls."})]})})});const E=!i.capabilities.canApplyManualOffset,j=!i.capabilities.canApplyManualSize,_=i.id?`#${i.id}`:i.selector,H=i.capabilities.canEditStyles,L=rp(i.element),z=W1(i.element),F=z.width>0?z.width:La(Z.width??"")??i.boundingBox.width,ee=z.height>0?z.height:La(Z.height??"")??i.boundingBox.height,W=(B,D)=>{const P=La(D);if(P==null)return;const R=rp(i.element);O(i,{x:B==="x"?P:R.x,y:B==="y"?P:R.y})},V=(B,D)=>{const P=La(D);if(P==null||P<=0)return;const R=W1(i.element),X=R.width>0?R.width:La(Z.width??"")??i.boundingBox.width,Y=R.height>0?R.height:La(Z.height??"")??i.boundingBox.height;y(i,{width:B==="width"?P:X,height:B==="height"?P:Y})},G=VS(i.element),q=B=>{const D=Number.parseFloat(B);Number.isFinite(D)&&b(i,{angle:D})};return g.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-900 text-neutral-100",children:[g.jsxs("div",{className:"border-b border-neutral-800 px-4 py-5",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:Rt,children:"Document"}),g.jsx("div",{className:"mt-3 truncate text-[12px] font-semibold text-neutral-100",children:i.label}),g.jsx("div",{className:"mt-1 truncate text-[11px] text-neutral-500",children:_})]}),g.jsx("button",{type:"button","aria-label":"Clear selection",onClick:c,className:"flex h-9 w-9 items-center justify-center rounded-full border border-neutral-700 bg-neutral-950 text-neutral-500 shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-colors hover:border-neutral-600 hover:text-neutral-200",children:g.jsx(Lf,{size:13})})]}),g.jsx("div",{className:"mt-4 flex min-w-0 flex-wrap items-center gap-2",children:g.jsxs("button",{type:"button",onClick:$,className:"inline-flex h-8 items-center justify-center gap-2 rounded-xl border border-neutral-700 bg-neutral-950 px-3.5 text-[11px] font-medium text-neutral-100 transition-colors hover:border-studio-accent/40 hover:text-studio-accent",children:[g.jsx(Fj,{size:15}),g.jsx("span",{children:o?"Prompt copied":"Ask agent"})]})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto",children:[g.jsx(uB,{element:i,styles:Z,fontAssets:C,onImportFonts:M,onSetText:S,onSetTextFieldStyle:w,onAddTextField:A,onRemoveTextField:k}),i.dataAttributes.start!=null&&g.jsx(fB,{element:i,onSetAttribute:m}),ZY(i)&&g.jsx(jY,{projectDir:n,element:i,styles:Z,onSetStyle:f,onSetAttribute:m,onSetHtmlAttribute:p}),g.jsxs(Er,{title:"Layout",icon:g.jsx(Yj,{size:15}),children:[g.jsxs("div",{className:ur,children:[g.jsx(Yr,{label:"X",value:Is(L.x),disabled:E,scrub:!0,onCommit:B=>W("x",B)}),g.jsx(Yr,{label:"Y",value:Is(L.y),disabled:E,scrub:!0,onCommit:B=>W("y",B)}),g.jsx(Yr,{label:"W",value:Is(F),disabled:j,scrub:!0,onCommit:B=>V("width",B)}),g.jsx(Yr,{label:"H",value:Is(ee),disabled:j,scrub:!0,onCommit:B=>V("height",B)}),g.jsx(Yr,{label:"R",value:`${G.angle}°`,onCommit:B=>q(B.replace("°",""))})]}),g.jsx("div",{className:"mt-3",children:g.jsx(Yr,{label:"Z-index",value:String(parseInt(Z["z-index"]||"auto",10)||0),scrub:!0,onCommit:B=>f("z-index",B)})})]}),H&&g.jsx(iB,{projectId:e,element:i,styles:Z,assets:r,onSetStyle:f,onImportAssets:Q})]})]})}),ak="min-w-0 rounded-xl border border-neutral-800 bg-neutral-900/95 px-3 py-2 text-neutral-100 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)] transition-colors focus-within:border-neutral-600",j8="text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",Gb="grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3";function Nm(t){const e=Math.round(t*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function Vm(t,e,n,r){return t==null||!Number.isFinite(t)?r:Math.min(n,Math.max(e,t))}function Lm(t){const e=Number.parseFloat(t.trim());return Number.isFinite(e)?e:null}function hB({value:t,disabled:e,onCommit:n}){const[r,i]=d.useState(t),l=d.useRef(!1);d.useEffect(()=>{l.current||i(t)},[t]);const o=()=>{l.current=!1;const c=r.trim();c!==t&&n(c)};return g.jsx("input",{type:"text",value:r,disabled:e,onFocus:()=>{l.current=!0},onChange:c=>i(c.target.value),onBlur:o,onKeyDown:c=>{c.key==="Enter"&&c.target.blur()},className:"w-full min-w-0 bg-transparent text-[11px] font-medium text-neutral-100 outline-none disabled:cursor-not-allowed disabled:text-neutral-600"})}function $1({label:t,value:e,disabled:n,onCommit:r}){return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:j8,children:t}),g.jsx("div",{className:ak,children:g.jsx(hB,{value:e,disabled:n,onCommit:r})})]})}function mB({value:t,options:e,onChange:n}){return g.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-2xl border border-neutral-800 bg-neutral-950 p-1",children:e.map(r=>g.jsx("button",{type:"button",onClick:()=>n(r.value),className:`h-9 rounded-xl text-[11px] font-semibold transition-colors ${r.value===t?"bg-neutral-800 text-white shadow-sm":"text-neutral-500 hover:bg-neutral-900 hover:text-neutral-200"}`,children:r.label},r.value))})}function Kb({label:t,value:e,options:n,onChange:r}){return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:j8,children:t}),g.jsx("div",{className:ak,children:g.jsx("select",{value:e,onChange:i=>r(i.target.value),className:"w-full min-w-0 appearance-none bg-transparent text-[11px] font-medium text-neutral-100 outline-none",children:n.map(i=>g.jsx("option",{value:i,children:i},i))})})]})}function Jb({title:t,children:e,accessory:n}){return g.jsxs("section",{className:"border-b border-neutral-800 px-4 py-5",children:[g.jsxs("div",{className:"mb-4 flex items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(_g,{size:15,className:"text-neutral-500"}),g.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-[0.22em] text-neutral-300",children:t})]}),n]}),e]})}function Q1(t){const e=Math.round(t*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function pB(t,e){const n=1-t,r=n*n,i=t*t;return{x:3*r*t*e.x1+3*n*i*e.x2+i*t,y:3*r*t*e.y1+3*n*i*e.y2+i*t}}function gB(t,e){const n=[];for(let r=0;r<=48;r+=1){const i=e(pB(r/48,t));n.push(`${r===0?"M":"L"}${i.x.toFixed(2)},${i.y.toFixed(2)}`)}return n.join(" ")}function OB({points:t,onCommit:e}){const n=d.useRef(null),[r,i]=d.useState(t),l=d.useRef(null);d.useEffect(()=>{i(t)},[t]);const o=324,c=214,f={left:46,top:24,width:242,height:146},m=-.4,p=1.4,O=M=>({x:f.left+M.x*f.width,y:f.top+(p-M.y)/(p-m)*f.height}),y=M=>{var _;const Z=(_=n.current)==null?void 0:_.getBoundingClientRect();if(!Z)return null;const E=(M.clientX-Z.left)/Z.width*o,j=(M.clientY-Z.top)/Z.height*c;return kg({x1:l.current==="p1"?(E-f.left)/f.width:r.x1,y1:l.current==="p1"?p-(j-f.top)/f.height*(p-m):r.y1,x2:l.current==="p2"?(E-f.left)/f.width:r.x2,y2:l.current==="p2"?p-(j-f.top)/f.height*(p-m):r.y2})},b=O({x:0,y:0}),S=O({x:1,y:1}),w=O({x:r.x1,y:r.y1}),A=O({x:r.x2,y:r.y2}),k=gB(r,O),$=M=>{if(!l.current)return;M.preventDefault();const Z=y(M);Z&&i(Z)},Q=()=>{l.current&&(l.current=null,e(r))},C=(M,Z)=>{Z.preventDefault(),Z.stopPropagation(),l.current=M,Z.currentTarget.setPointerCapture(Z.pointerId)};return g.jsxs("div",{className:"overflow-hidden rounded-2xl border border-neutral-800 bg-black/40",children:[g.jsxs("div",{className:"flex items-center justify-between gap-3 border-b border-neutral-800 px-3 py-2",children:[g.jsxs("div",{children:[g.jsx("div",{className:j8,children:"CustomEase"}),g.jsx("div",{className:"mt-1 font-mono text-[10px] text-neutral-500",children:PS(r)})]}),g.jsxs("button",{type:"button",onClick:()=>{const M=ZS("power3.out");i(M),e(M)},className:"inline-flex h-8 items-center justify-center gap-2 rounded-xl border border-neutral-800 bg-neutral-950 px-3 text-[10px] font-semibold uppercase tracking-[0.14em] text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-100",children:[g.jsx(Dg,{size:13}),"Reset"]})]}),g.jsxs("svg",{ref:n,viewBox:`0 0 ${o} ${c}`,className:"block w-full select-none touch-none",onPointerMove:$,onPointerUp:Q,onPointerCancel:Q,children:[g.jsx("rect",{x:"0",y:"0",width:o,height:c,fill:"transparent"}),[0,.5,1].map(M=>{const Z=O({x:0,y:M});return g.jsxs("g",{children:[g.jsx("line",{x1:f.left,x2:f.left+f.width,y1:Z.y,y2:Z.y,stroke:"rgba(255,255,255,0.12)",strokeDasharray:"5 8"}),g.jsx("text",{x:f.left-12,y:Z.y+4,textAnchor:"end",className:"fill-neutral-500 text-[10px] font-semibold",children:M})]},M)}),g.jsx("line",{x1:f.left,x2:f.left+f.width,y1:f.top+f.height,y2:f.top+f.height,stroke:"rgba(255,255,255,0.18)"}),g.jsx("line",{x1:f.left,x2:f.left,y1:f.top,y2:f.top+f.height,stroke:"rgba(255,255,255,0.18)"}),g.jsx("line",{x1:b.x,y1:b.y,x2:w.x,y2:w.y,stroke:"rgba(255,221,87,0.34)"}),g.jsx("line",{x1:S.x,y1:S.y,x2:A.x,y2:A.y,stroke:"rgba(255,221,87,0.34)"}),g.jsx("path",{d:k,fill:"none",stroke:"#ffdd57",strokeWidth:"4",strokeLinecap:"round"}),g.jsx("circle",{cx:b.x,cy:b.y,r:"5",fill:"#ffdd57"}),g.jsx("circle",{cx:S.x,cy:S.y,r:"5",fill:"#ffdd57"}),g.jsx("circle",{cx:w.x,cy:w.y,r:"9",fill:"#141414",stroke:"#ffdd57",strokeWidth:"4",className:"cursor-grab active:cursor-grabbing",onPointerDown:M=>C("p1",M)}),g.jsx("circle",{cx:A.x,cy:A.y,r:"9",fill:"#141414",stroke:"#ffdd57",strokeWidth:"4",className:"cursor-grab active:cursor-grabbing",onPointerDown:M=>C("p2",M)}),g.jsx("text",{x:w.x+12,y:w.y-10,className:"fill-neutral-400 text-[10px] font-semibold",children:"P1"}),g.jsx("text",{x:A.x+12,y:A.y-10,className:"fill-neutral-400 text-[10px] font-semibold",children:"P2"})]}),g.jsxs("div",{className:"grid grid-cols-2 gap-2 border-t border-neutral-800 p-3",children:[g.jsxs("div",{className:"rounded-xl border border-neutral-800 bg-neutral-950 px-3 py-2 font-mono text-[10px] text-neutral-400",children:["P1 ",Q1(r.x1),", ",Q1(r.y1)]}),g.jsxs("div",{className:"rounded-xl border border-neutral-800 bg-neutral-950 px-3 py-2 font-mono text-[10px] text-neutral-400",children:["P2 ",Q1(r.x2),", ",Q1(r.y2)]})]})]})}const xB=[{label:"Fade Up",value:"fade-up"},{label:"Slide",value:"slide"},{label:"Pop",value:"pop"}],yB=["up","down","left","right"];function bB(t){return t?Math.max(Math.abs(t.from.x??0),Math.abs(t.from.y??0),1):32}function vB(t){return t?t.from.scale!=null||t.to.scale!=null?"pop":t.from.x!=null||t.to.x!=null?"slide":"fade-up":"fade-up"}function SB(t){if(!t)return"up";const e=t.from.x??0,n=t.from.y??0;return Math.abs(e)>Math.abs(n)?e<0?"right":"left":n<0?"down":"up"}function ev(t){return`studio-${(t.id||t.selector||t.label||"layer").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"layer"}-ease`}const wB=d.memo(function({element:e,motion:n,onClearSelection:r,onSetMotion:i,onClearMotion:l}){var C;const o=vB(n),c=SB(n),f=(n==null?void 0:n.start)??0,m=(n==null?void 0:n.duration)??.6,p=bB(n),O=(n==null?void 0:n.ease)??"power3.out",y=((C=n==null?void 0:n.customEase)==null?void 0:C.data)??"",b=y.trim().length>0,S=d.useMemo(()=>C3(y)??ZS(q0.includes(O)?O:"power3.out"),[O,y]);if(!e)return g.jsxs("div",{className:"flex h-full flex-col items-center justify-center bg-neutral-900 px-6 text-center",children:[g.jsx(_g,{size:18,className:"mb-3 text-neutral-600"}),g.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"Select an element for motion."}),g.jsx("p",{className:"mt-2 max-w-[260px] text-xs leading-5 text-neutral-500",children:"Timeline layers and inspector selections can receive Studio-authored GSAP motion."})]});const w=e.id?`#${e.id}`:e.selector,A=b?"CustomEase":q0.includes(O)?O:"power3.out",k=b?["CustomEase",...q0]:q0,$=M=>{var _;const Z=M.customEaseData??y,E=Z.trim()?{id:((_=n==null?void 0:n.customEase)==null?void 0:_.id)??ev(e),data:Z.trim()}:void 0,j=E?E.id:(M.ease??O).trim()||"none";i(e,yP(M.preset??o,{start:Vm(M.start??f,0,3600,0),duration:Vm(M.duration??m,.01,3600,.6),distance:Vm(M.distance??p,1,2e3,32),direction:M.direction??c,ease:j,customEase:E}))},Q=M=>{$({ease:ev(e),customEaseData:PS(M)})};return g.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-900 text-neutral-100",children:[g.jsx("div",{className:"border-b border-neutral-800 px-4 py-5",children:g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",children:"Motion Target"}),g.jsx("div",{className:"mt-3 truncate text-[12px] font-semibold text-neutral-100",children:e.label}),g.jsx("div",{className:"mt-1 truncate text-[11px] text-neutral-500",children:w})]}),g.jsx("button",{type:"button","aria-label":"Clear selection",onClick:r,className:"flex h-9 w-9 items-center justify-center rounded-full border border-neutral-700 bg-neutral-950 text-neutral-500 shadow-[0_1px_2px_rgba(0,0,0,0.2)] transition-colors hover:border-neutral-600 hover:text-neutral-200",children:g.jsx(Lf,{size:13})})]})}),g.jsxs("div",{className:"flex-1 overflow-y-auto",children:[g.jsx(Jb,{title:"GSAP Motion",accessory:g.jsx("div",{className:"rounded-full border border-studio-accent/40 bg-studio-accent/10 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-studio-accent",children:"GSAP"}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(mB,{value:o,onChange:M=>$({preset:M}),options:xB}),g.jsxs("div",{className:Gb,children:[g.jsx(Kb,{label:"Direction",value:c,onChange:M=>$({direction:M}),options:yB}),g.jsx(Kb,{label:"Ease",value:A,onChange:M=>{M!=="CustomEase"&&$({ease:M,customEaseData:""})},options:k})]}),g.jsxs("div",{className:Gb,children:[g.jsx($1,{label:"Start",value:Nm(f),onCommit:M=>$({start:Lm(M)??0})}),g.jsx($1,{label:"Duration",value:Nm(m),onCommit:M=>$({duration:Lm(M)??.6})}),g.jsx($1,{label:"Distance",value:Nm(p),onCommit:M=>$({distance:Lm(M)??32})})]})]})}),g.jsx(Jb,{title:"Ease Curve",accessory:g.jsx("div",{className:"rounded-full border border-yellow-400/30 bg-yellow-400/10 px-2.5 py-1 text-[10px] font-semibold uppercase tracking-[0.16em] text-yellow-300",children:"CustomEase"}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(OB,{points:S,onCommit:Q}),g.jsx($1,{label:"CustomEase path",value:y,onCommit:M=>{const Z=C3(M);Z&&Q(Z)}}),g.jsx("div",{className:"flex justify-end",children:g.jsx("button",{type:"button",onClick:()=>l(e),disabled:!n,className:"inline-flex h-8 items-center rounded-xl border border-neutral-700 bg-neutral-950 px-3 text-[11px] font-medium text-neutral-300 transition-colors hover:border-neutral-600 hover:text-white disabled:cursor-not-allowed disabled:border-neutral-800 disabled:text-neutral-600",children:"Clear motion"})})]})})]})]})}),AB={video:"Vi",audio:"Au",img:"Im",svg:"Sv",canvas:"Cn",div:"Di",section:"Se",span:"Sp",p:"P",h1:"H1",h2:"H2",h3:"H3",h4:"H4",h5:"H5",h6:"H6",a:"A",button:"Bt",ul:"Ul",ol:"Ol",li:"Li",style:"St",template:"Te"};function kB(t){return AB[t]??t.slice(0,2).toUpperCase()}function MB(t){return t.hasAttribute("data-composition-src")||t.hasAttribute("data-composition-file")}const TB=d.memo(function(){const{previewIframeRef:e,activeCompPath:n,refreshKey:r,compositionLoading:i,timelineElements:l,currentTime:o}=bu(),{domEditSelection:c,applyDomSelection:f,updateDomEditHoverSelection:m}=_f(),[p,O]=d.useState([]),[y,b]=d.useState({}),S=d.useRef(0),w=!n||n==="index.html",A=d.useCallback(()=>{const j=e.current;if(!j)return;let _=null;try{_=j.contentDocument}catch{return}if(!_)return;const H=_.querySelector("[data-composition-id]")??_.documentElement??null;if(!H)return;const L=jZ(H,{activeCompositionPath:n});O(L)},[e,n,w]);d.useEffect(()=>{A()},[A,r]),d.useEffect(()=>{const j=e.current;if(!j)return;const _=()=>{S.current+=1,A()};return j.addEventListener("load",_),()=>j.removeEventListener("load",_)},[e,A]),d.useEffect(()=>{if(!i){const j=setTimeout(A,100);return()=>clearTimeout(j)}},[i,A]);const k=d.useCallback(j=>n7(j.element,{activeCompositionPath:n,isMasterView:w,preferClipAncestor:!1}),[n,w]),$=d.useCallback(j=>{const _=k(j);if(!_)return;let H=sp(_,l);if(!H){const L=_.sourceFile??"index.html";let z=j.element.parentElement;for(;z&&!H;){const F=z.id;if(F){const ee=l.find(W=>W.domId===F&&(W.sourceFile??"index.html")===L);ee&&(H=ee.key??ee.id)}z=z.parentElement}}if(H){const L=l.find(z=>(z.key??z.id)===H);if(L){const z=rZ(o,L);z!=null&&ge.getState().requestSeek(z)}}},[o,k,l]),Q=d.useCallback(j=>{const _=k(j);_&&(f(_),$(j))},[k,f,$]),C=d.useCallback(j=>{if(!j){m(null);return}const _=k(j);m(_)},[k,m]),M=d.useCallback((j,_)=>{_.stopPropagation(),b(H=>({...H,[j]:!H[j]}))},[]),Z=c?r7(c):null,E=CB(p,y);return p.length===0?g.jsxs("div",{className:"flex h-full flex-col items-center justify-center bg-neutral-900 px-6 text-center",children:[g.jsx(K1,{size:18,className:"mb-3 text-neutral-600"}),g.jsx("p",{className:"text-sm font-medium text-neutral-200",children:"No layers"}),g.jsx("p",{className:"mt-1 text-xs text-neutral-500",children:"Load a composition to see its element tree"})]}):g.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-hidden bg-neutral-900",onPointerLeave:()=>C(null),children:[g.jsxs("div",{className:"border-b border-white/10 px-3 py-2 text-[11px] text-neutral-500",children:[p.length," layer",p.length===1?"":"s"]}),g.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto py-1",children:E.map(j=>{const _=j.key===Z,H=y[j.key]??!1,L=j.childCount>0,z=MB(j.element);return g.jsxs("div",{role:"button",tabIndex:0,onClick:()=>Q(j),onPointerEnter:()=>C(j),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),Q(j))},className:`group flex w-full cursor-pointer items-center gap-1.5 px-2 py-1 text-left transition-colors ${_?"bg-studio-accent/14 text-studio-accent":"text-neutral-300 hover:bg-white/[0.04] hover:text-neutral-100"}`,style:{paddingLeft:8+j.depth*16},children:[L?g.jsx("button",{type:"button",onClick:F=>M(j.key,F),className:"flex h-4 w-4 flex-shrink-0 items-center justify-center rounded text-neutral-500 hover:text-neutral-300",children:g.jsx("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:`transition-transform ${H?"":"rotate-90"}`,children:g.jsx("path",{d:"M2 1l4 3-4 3z"})})}):g.jsx("span",{className:"w-4 flex-shrink-0"}),g.jsx("span",{className:`flex h-5 w-5 flex-shrink-0 items-center justify-center rounded text-[8px] font-bold uppercase ${_?"bg-studio-accent/18 text-studio-accent":z?"bg-blue-900/40 text-blue-400":"bg-neutral-800 text-neutral-500"}`,children:kB(j.tagName)}),g.jsx("span",{className:"min-w-0 flex-1 truncate text-[11px]",children:j.label}),L&&g.jsx("span",{className:"text-[9px] tabular-nums text-neutral-600",children:j.childCount})]},j.key)})})]})});function CB(t,e){if(Object.keys(e).length===0)return t;const n=[];let r=-1;for(const i of t)r>=0&&i.depth>r||(r=-1,n.push(i),e[i.key]&&i.childCount>0&&(r=i.depth));return n}const Ha="w-full bg-neutral-900 border border-neutral-800 rounded px-1.5 py-0.5 text-2xs text-neutral-200 font-mono outline-none focus:border-neutral-600";function gg({label:t,children:e}){return g.jsxs("div",{className:"mb-3",children:[g.jsx("div",{className:"flex items-center gap-1.5 mt-2 mb-1.5",children:g.jsx("span",{className:"text-2xs font-medium text-neutral-500 uppercase tracking-wider",children:t})}),g.jsx("div",{className:"space-y-1",children:e})]})}function Wi({label:t,children:e}){return g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-2xs text-neutral-600 w-14 text-right flex-shrink-0",children:t}),g.jsx("div",{className:"flex-1 min-w-0",children:e})]})}const EB=["none","fade","slide-up","slide-down","slide-left","slide-right","pop","slam","bounce","typewriter","blur-in","flip","drop"],$B=["none","color-change","scale-pop","glow-pulse","underline-sweep","background-fill","bounce"],QB=["none","fade","slide-up","slide-down","slide-left","slide-right","scatter","drop","collapse","blur-out","shrink"],PB=["power1.out","power2.out","power3.out","power4.out","power1.in","power2.in","power3.in","power1.inOut","power2.inOut","back.out(1.7)","elastic.out(1,0.3)","bounce.out"];function _m({label:t,presets:e,animation:n,showIntensity:r,onChange:i}){const l=(n==null?void 0:n.preset)??"none",o=(n==null?void 0:n.duration)??.2,c=(n==null?void 0:n.ease)??"power2.out",f=(n==null?void 0:n.stagger)??0,m=(n==null?void 0:n.intensity)??1;return g.jsxs(gg,{label:t,children:[g.jsx(Wi,{label:"Preset",children:g.jsx("select",{value:l,onChange:p=>i({preset:p.target.value}),className:Ha,children:e.map(p=>g.jsx("option",{value:p,children:p},p))})}),g.jsx(Wi,{label:"Duration",children:g.jsx("input",{type:"number",value:o,step:.05,min:0,max:2,onChange:p=>i({duration:Number(p.target.value)}),className:Ha})}),g.jsx(Wi,{label:"Ease",children:g.jsx("select",{value:c,onChange:p=>i({ease:p.target.value}),className:Ha,children:PB.map(p=>g.jsx("option",{value:p,children:p},p))})}),g.jsx(Wi,{label:"Stagger",children:g.jsx("input",{type:"number",value:f,step:.02,min:0,max:.5,onChange:p=>i({stagger:Number(p.target.value)}),className:Ha})}),r&&g.jsx(Wi,{label:"Intensity",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"range",min:0,max:1,step:.01,value:m,onChange:p=>i({intensity:Number(p.target.value)}),className:"flex-1 accent-studio-accent"}),g.jsx("span",{className:"text-2xs text-neutral-400 font-mono w-8 text-right flex-shrink-0",children:m.toFixed(2)})]})})]})}const ZB=d.memo(function(){const e=at(b=>b.model),n=at(b=>b.selectedGroupId),r=at(b=>b.selectedSegmentIds),i=at(b=>b.updateGroupAnimation),l=at(b=>b.applyAnimationToAll);let o=n;if(!o&&e&&r.size>0){const b=[...r][0];if(b){for(const[S,w]of e.groups)if(w.segmentIds.includes(b)){o=S;break}}}const c=o?e==null?void 0:e.groups.get(o):void 0,f=c==null?void 0:c.animation,m=d.useCallback(b=>{o&&i(o,"entrance",b)},[o,i]),p=d.useCallback(b=>{o&&i(o,"highlight",b)},[o,i]),O=d.useCallback(b=>{o&&i(o,"exit",b)},[o,i]),y=d.useCallback(()=>{f&&l(f)},[f,l]);return!c||!o||!f?g.jsx("div",{className:"flex items-center justify-center h-full px-4 text-center",children:g.jsx("p",{className:"text-xs text-neutral-500",children:"Select a caption group to edit animations"})}):g.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[g.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[g.jsx(_m,{label:"Entrance",presets:EB,animation:f.entrance,onChange:m}),g.jsx(_m,{label:"Highlight",presets:$B,animation:f.highlight,showIntensity:!0,onChange:p}),g.jsx(_m,{label:"Exit",presets:QB,animation:f.exit,onChange:O})]}),g.jsx("div",{className:"flex-shrink-0 px-3 py-2 border-t border-neutral-800",children:g.jsx("button",{type:"button",onClick:y,className:"w-full py-1.5 rounded border border-neutral-700 text-2xs text-neutral-300 hover:border-studio-accent/50 hover:text-studio-accent transition-colors",children:"Apply to all groups"})})]})}),jB=d.memo(function({iframeRef:e}){var Z;const n=at(E=>E.model),r=at(E=>E.selectedSegmentIds),i=at(E=>E.selectedGroupId),l=at(E=>E.updateSelectedStyle),o=at(E=>E.updateGroupStyle),[c,f]=d.useState("style"),m=r.size>0?[...r][0]:void 0,p=n==null?void 0:n.segments.get(m??"");let O=null;if(n&&m)for(const E of n.groupOrder){const j=n.groups.get(E);if(j&&j.segmentIds.includes(m)){O=E;break}}const y=O?(Z=n==null?void 0:n.groups.get(O))==null?void 0:Z.style:void 0,b=(p==null?void 0:p.style)??{},S={...y,...b},w=d.useCallback(E=>{var F,ee,W;const j=e.current;if(!j||!n)return;let _=null;try{_=j.contentDocument}catch{return}if(!_)return;const H=_.querySelectorAll(".caption-group"),L=[];for(const V of r)for(let G=0;G<n.groupOrder.length;G++){const q=n.groups.get(n.groupOrder[G]);if(!q)continue;const B=q.segmentIds.indexOf(V);if(B<0)continue;const D=H[G];if(!D)continue;const P=D.children;let R=0;for(const X of P){const Y=X;if(Y.dataset.captionWrapper==="true"){const U=Y.querySelector(":scope > span");if(U&&R===B){L.push(U);break}}else if(Y.tagName==="SPAN"&&R===B){L.push(Y);break}R++}break}if(E.x!==void 0||E.y!==void 0||E.scaleX!==void 0||E.scaleY!==void 0||E.rotation!==void 0)try{const V=(ee=(F=e.current)==null?void 0:F.contentWindow)==null?void 0:ee.gsap;if(V)for(const G of L){let q=G.parentElement;(!q||q.dataset.captionWrapper!=="true")&&(q=_.createElement("span"),q.style.display="inline-block",q.dataset.captionWrapper="true",(W=G.parentNode)==null||W.insertBefore(q,G),q.appendChild(G));const B=V.getProperty(q,"x")||0,D=V.getProperty(q,"y")||0,P=V.getProperty(q,"scale")||1,R=V.getProperty(q,"rotation")||0;V.set(q,{x:E.x??B,y:E.y??D,scale:E.scaleX??P,rotation:E.rotation??R})}}catch{}},[e,n,r]),A=d.useCallback(E=>{i?o(i,E):l(E),w(E)},[i,o,l,w]);if(r.size===0)return g.jsx("div",{className:"flex items-center justify-center h-full px-4 text-center",children:g.jsx("p",{className:"text-xs text-neutral-500",children:"Select caption words to edit their style"})});const k=S.x??0,$=S.y??0,Q=S.rotation??0,C=S.scaleX??1,M=r.size===1?"1 word":`${r.size} words`;return g.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[g.jsxs("div",{className:"px-3 py-2 border-b border-neutral-800 flex-shrink-0",children:[g.jsx("div",{className:"flex items-center justify-between mb-1.5",children:g.jsx("span",{className:"text-2xs text-neutral-500",children:M})}),g.jsxs("div",{className:"flex gap-1",children:[g.jsx("button",{type:"button",onClick:()=>f("style"),className:["flex-1 py-0.5 rounded text-2xs font-medium transition-colors",c==="style"?"bg-studio-accent/20 text-studio-accent border border-studio-accent/50":"text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600"].join(" "),children:"Style"}),g.jsx("button",{type:"button",onClick:()=>f("animation"),className:["flex-1 py-0.5 rounded text-2xs font-medium transition-colors",c==="animation"?"bg-studio-accent/20 text-studio-accent border border-studio-accent/50":"text-neutral-500 border border-neutral-800 hover:text-neutral-300 hover:border-neutral-600"].join(" "),children:"Animation"})]})]}),c==="animation"&&g.jsx(ZB,{}),c==="style"&&g.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[g.jsxs(gg,{label:"Position",children:[g.jsx(Wi,{label:"X",children:g.jsx("input",{type:"number",value:k,onChange:E=>A({x:Number(E.target.value)}),className:Ha})}),g.jsx(Wi,{label:"Y",children:g.jsx("input",{type:"number",value:$,onChange:E=>A({y:Number(E.target.value)}),className:Ha})})]}),g.jsxs(gg,{label:"Transform",children:[g.jsx(Wi,{label:"Scale",children:g.jsx("input",{type:"number",value:C,step:.1,onChange:E=>A({scaleX:Number(E.target.value),scaleY:Number(E.target.value)}),className:Ha})}),g.jsx(Wi,{label:"Rotation",children:g.jsx("input",{type:"number",value:Q,onChange:E=>A({rotation:Number(E.target.value)}),className:Ha})})]})]})]})}),RB=d.memo(function({blockTitle:e,params:n,compositionPath:r,onClose:i}){const[l,o]=d.useState(()=>{const f={};for(const m of n)f[m.key]=m.default;return f}),c=d.useCallback((f,m)=>{o(p=>({...p,[f]:m})),console.log(`[BlockParams] ${r} ${f}: ${m}`)},[r]);return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-neutral-800",children:[g.jsx("div",{className:"text-[11px] font-semibold text-neutral-200 truncate",children:e}),g.jsx("button",{type:"button",onClick:i,className:"text-neutral-500 hover:text-neutral-300 transition-colors",children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"M18 6 6 18"}),g.jsx("path",{d:"m6 6 12 12"})]})})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto p-3 space-y-3",children:[g.jsx("div",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider",children:"Parameters"}),n.map(f=>g.jsx(NB,{param:f,value:l[f.key]??f.default,onChange:m=>c(f.key,m)},f.key))]})]})});function NB({param:t,value:e,onChange:n}){return g.jsxs("div",{className:"space-y-1",children:[g.jsx("label",{className:"text-[10px] font-medium text-neutral-400",children:t.label}),t.type==="color"&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"color",value:e,onChange:r=>n(r.target.value),className:"w-7 h-7 rounded border border-neutral-700 bg-transparent cursor-pointer"}),g.jsx("input",{type:"text",value:e,onChange:r=>n(r.target.value),className:"flex-1 bg-neutral-900 border border-neutral-800 rounded px-2 py-1 text-[10px] text-neutral-200 font-mono focus:outline-none focus:border-neutral-700"})]}),t.type==="number"&&g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("input",{type:"range",min:t.min??0,max:t.max??100,step:t.step??1,value:e,onChange:r=>n(r.target.value),className:"flex-1"}),g.jsx("span",{className:"text-[10px] text-neutral-400 w-8 text-right tabular-nums",children:e})]}),t.type==="text"&&g.jsx("input",{type:"text",value:e,onChange:r=>n(r.target.value),className:"w-full bg-neutral-900 border border-neutral-800 rounded px-2 py-1 text-[10px] text-neutral-200 focus:outline-none focus:border-neutral-700"}),t.type==="select"&&t.options&&g.jsx("select",{value:e,onChange:r=>n(r.target.value),className:"w-full bg-neutral-900 border border-neutral-800 rounded px-2 py-1 text-[10px] text-neutral-200 focus:outline-none focus:border-neutral-700",children:t.options.map(r=>g.jsx("option",{value:r.value,children:r.label},r.value))})]})}function VB(t){if(t<1e3)return`${t}ms`;const e=Math.round(t/1e3);return e<60?`${e}s`:`${Math.floor(e/60)}m ${e%60}s`}function LB(t){const e=Date.now()-t;return e<6e4?"just now":e<36e5?`${Math.floor(e/6e4)}m ago`:`${Math.floor(e/36e5)}h ago`}const _B=d.memo(function({job:e,projectId:n,onDelete:r}){const[i,l]=d.useState(!1),o=`/api/projects/${n}/renders/file/${e.filename}`,c=d.useCallback(()=>{window.open(o,"_blank")},[o]),f=d.useCallback(O=>{O.stopPropagation();const y=document.createElement("a");y.href=o,y.download=e.filename,y.click()},[o,e.filename]),m=o,p=e.status==="complete";return g.jsx("div",{onPointerEnter:()=>l(!0),onPointerLeave:()=>l(!1),onClick:p?c:void 0,className:["px-3 py-2.5 border-b border-neutral-800/30 last:border-0 transition-colors duration-150",p?"cursor-pointer hover:bg-neutral-800/30":""].filter(Boolean).join(" "),children:g.jsxs("div",{className:"flex items-center gap-2.5",children:[g.jsxs("div",{className:"w-20 h-[45px] rounded overflow-hidden bg-neutral-900 flex-shrink-0 relative",children:[p&&g.jsxs(g.Fragment,{children:[i&&g.jsx("video",{src:m,autoPlay:!0,muted:!0,loop:!0,playsInline:!0,className:"absolute inset-0 w-full h-full object-contain"}),g.jsx("div",{className:"absolute inset-0 transition-opacity duration-150",style:{opacity:i?0:1},children:g.jsx(RA,{src:m})})]}),e.status==="rendering"&&g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:g.jsx("div",{className:"w-2 h-2 rounded-full bg-studio-accent animate-pulse"})}),e.status==="failed"&&g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:g.jsx("div",{className:"w-2 h-2 rounded-full bg-red-400"})}),e.status==="cancelled"&&g.jsx("div",{className:"w-full h-full flex items-center justify-center",children:g.jsx("div",{className:"w-2 h-2 rounded-full bg-neutral-600"})})]}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"text-[11px] font-medium text-neutral-300 truncate",children:e.filename}),e.durationMs&&g.jsx("span",{className:"text-[9px] text-neutral-600 flex-shrink-0",children:VB(e.durationMs)})]}),e.status==="rendering"&&g.jsxs("div",{className:"mt-1",children:[g.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[g.jsx("span",{className:"text-[9px] text-neutral-500",children:e.stage||"Rendering"}),g.jsxs("span",{className:"text-[9px] font-mono text-studio-accent",children:[e.progress,"%"]})]}),g.jsx("div",{className:"w-full h-1 bg-neutral-800 rounded-full overflow-hidden",children:g.jsx("div",{className:"h-full bg-studio-accent rounded-full transition-all duration-300",style:{width:`${e.progress}%`}})})]}),e.status==="failed"&&e.error&&g.jsx("span",{className:"text-[9px] text-red-400 mt-0.5 block",children:e.error}),e.status!=="rendering"&&g.jsx("span",{className:"text-[9px] text-neutral-600",children:LB(e.createdAt)})]}),i&&g.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[p&&g.jsx("button",{onClick:f,className:"p-1 rounded text-neutral-500 hover:text-green-400 transition-colors",title:"Download",children:g.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"}),g.jsx("polyline",{points:"7 10 12 15 17 10"}),g.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3"})]})}),g.jsx("button",{onClick:O=>{O.stopPropagation(),r()},className:"p-1 rounded text-neutral-500 hover:text-red-400 transition-colors",title:"Remove",children:g.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:g.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]})})}),DB=["auto","1080p","4k"],tv={auto:"Auto","1080p":"1080p","4k":"4K"},lk={landscape:{width:1920,height:1080},portrait:{width:1080,height:1920},"landscape-4k":{width:3840,height:2160},"portrait-4k":{width:2160,height:3840},square:{width:1080,height:1080},"square-4k":{width:2160,height:2160}};function HB(t){return t==null?"landscape":t.width===t.height?"square":t.height>t.width?"portrait":"landscape"}function sk(t,e){if(t==="auto")return"auto";const n=HB(e);return t==="1080p"?n:n==="landscape"?"landscape-4k":n==="portrait"?"portrait-4k":"square-4k"}function XB(t,e){if(t==="auto")return e??null;const n=sk(t,e);return n==="auto"?null:lk[n]}function zB(t,e){if(t==="auto"||e==null)return!0;const n=sk(t,e);if(n==="auto")return!0;const r=lk[n];return r.width*e.height!==r.height*e.width||r.width<e.width?!1:Number.isInteger(r.width/e.width)}function FB(t,e){const n=XB(t,e);return n?`${tv[t]} · ${n.width}×${n.height}`:tv[t]}const Dm={mp4:{label:"MP4",desc:"Best for general use. Smallest file, universal playback."},mov:{label:"MOV (ProRes 4444)",desc:"Transparent video. Works in CapCut, Final Cut Pro, Premiere, DaVinci Resolve, After Effects. Large files."},webm:{label:"WebM (VP9)",desc:"Transparent video for web. Smaller than MOV but limited editor support."}};function YB({format:t}){const[e,n]=d.useState(!1),r=d.useRef(void 0),i=()=>{clearTimeout(r.current),n(!0)},l=()=>{r.current=setTimeout(()=>n(!1),120)};d.useEffect(()=>()=>clearTimeout(r.current),[]);const o=Dm[t];return g.jsxs("div",{className:"relative",onPointerEnter:i,onPointerLeave:l,children:[g.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-neutral-600 hover:text-neutral-400 transition-colors cursor-help",children:[g.jsx("circle",{cx:"12",cy:"12",r:"10"}),g.jsx("path",{d:"M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3"}),g.jsx("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]}),e&&g.jsxs("div",{className:"absolute top-full right-0 mt-1.5 w-52 p-2 rounded bg-neutral-900 border border-neutral-700 shadow-lg z-50",children:[g.jsx("p",{className:"text-[10px] font-semibold text-neutral-200 mb-0.5",children:o.label}),g.jsx("p",{className:"text-[9px] text-neutral-400 leading-tight",children:o.desc}),g.jsx("div",{className:"mt-1.5 pt-1.5 border-t border-neutral-800",children:["mp4","mov","webm"].filter(c=>c!==t).map(c=>g.jsxs("p",{className:"text-[9px] text-neutral-500 leading-relaxed",children:[g.jsx("span",{className:"text-neutral-400 font-medium",children:Dm[c].label})," — ",Dm[c].desc]},c))})]})]})}const nv=[{value:"draft",label:"Draft",title:"Fast render, smaller file"},{value:"standard",label:"Standard",title:"Good quality, balanced file size"},{value:"high",label:"High Quality",title:"Best quality, larger file"}];function BB({onStartRender:t,isRendering:e,compositionDimensions:n}){var b;const r=FA(),[i,l]=d.useState(r.format),[o,c]=d.useState(r.quality),[f,m]=d.useState("auto"),[p,O]=d.useState(r.fps),y=i!=="mov";return g.jsxs("div",{className:"flex items-center gap-1 flex-wrap justify-end",children:[g.jsx(YB,{format:i}),g.jsx("select",{value:f,onChange:S=>m(S.target.value),disabled:e,className:"h-5 px-1 text-[10px] rounded-l bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:DB.map(S=>g.jsx("option",{value:S,disabled:!zB(S,n),children:FB(S,n)},S))}),y&&g.jsx("select",{value:o,onChange:S=>{const w=S.target.value;c(w),Sm(i,w,p)},disabled:e,title:(b=nv.find(S=>S.value===o))==null?void 0:b.title,className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:nv.map(S=>g.jsx("option",{value:S.value,title:S.title,children:S.label},S.value))}),g.jsxs("select",{value:p,onChange:S=>{const w=Number(S.target.value);O(w),Sm(i,o,w)},disabled:e,title:"Frames per second",className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:[g.jsx("option",{value:24,children:"24fps"}),g.jsx("option",{value:30,children:"30fps"}),g.jsx("option",{value:60,children:"60fps"})]}),g.jsxs("select",{value:i,onChange:S=>{const w=S.target.value;l(w),Sm(w,o,p)},disabled:e,className:"h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50",children:[g.jsx("option",{value:"mp4",children:"MP4"}),g.jsx("option",{value:"mov",children:"MOV"}),g.jsx("option",{value:"webm",children:"WebM"})]}),g.jsx("button",{onClick:()=>{Nt("render_start",{format:i,quality:o,resolution:f,fps:p}),t(i,o,f,p)},disabled:e,className:"flex items-center gap-1 px-2 py-0.5 text-[10px] font-semibold rounded-r bg-studio-accent text-[#09090B] hover:brightness-110 transition-colors disabled:opacity-50",children:e?"Rendering...":"Export"})]})}const qB=d.memo(function({jobs:e,projectId:n,onDelete:r,onClearCompleted:i,onStartRender:l,isRendering:o,compositionDimensions:c}){const f=d.useRef(null);d.useEffect(()=>{f.current&&f.current.scrollTo({top:f.current.scrollHeight,behavior:"smooth"})},[e.length]);const m=e.filter(p=>p.status!=="rendering").length;return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex items-center justify-end flex-wrap gap-y-1.5 px-3 py-2 border-b border-neutral-800/50 flex-shrink-0",children:g.jsxs("div",{className:"flex items-center gap-1.5",children:[m>0&&g.jsx("button",{onClick:i,className:"text-[10px] text-neutral-600 hover:text-neutral-400 transition-colors",children:"Clear"}),g.jsx(BB,{onStartRender:l,isRendering:o,compositionDimensions:c})]})}),g.jsx("div",{ref:f,className:"flex-1 overflow-y-auto",children:e.length===0?g.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 gap-2",children:[g.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",className:"text-neutral-700",children:[g.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"2.18",ry:"2.18",strokeLinecap:"round",strokeLinejoin:"round"}),g.jsx("path",{d:"M7 2v20M17 2v20M2 12h20M2 7h5M2 17h5M17 17h5M17 7h5",strokeLinecap:"round",strokeLinejoin:"round"})]}),g.jsx("p",{className:"text-[10px] text-neutral-600 text-center",children:"No renders yet"})]}):e.map(p=>g.jsx(_B,{job:p,projectId:n,onDelete:()=>r(p.id)},p.id))})]})});function IB({selectedStudioMotion:t,designPanelActive:e,motionPanelActive:n,activeBlockParams:r,onCloseBlockParams:i}){const{rightWidth:l,rightPanelTab:o,setRightPanelTab:c,handlePanelResizeStart:f,handlePanelResizeMove:m,handlePanelResizeEnd:p}=Hg(),{captionEditMode:O,previewIframeRef:y,projectId:b,activeCompPath:S,compositionDimensions:w,waitForPendingDomEditSaves:A,renderQueue:k}=bu(),{domEditSelection:$,domEditGroupSelections:Q,copiedAgentPrompt:C,clearDomSelection:M,handleDomStyleCommit:Z,handleDomAttributeCommit:E,handleDomHtmlAttributeCommit:j,handleDomPathOffsetCommit:_,handleDomBoxSizeCommit:H,handleDomRotationCommit:L,handleDomTextCommit:z,handleDomTextFieldStyleCommit:F,handleDomAddTextField:ee,handleDomRemoveTextField:W,handleAskAgent:V,handleDomMotionCommit:G,handleDomMotionClear:q}=_f(),{assets:B,fontAssets:D,projectDir:P,handleImportFiles:R,handleImportFonts:X}=XA(),Y=k.jobs;return g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"group w-2 flex-shrink-0 cursor-col-resize flex items-center justify-center",style:{touchAction:"none"},onPointerDown:U=>f("right",U),onPointerMove:m,onPointerUp:p,children:g.jsx("div",{className:"h-[52px] w-px bg-white/12 transition-colors group-hover:bg-white/18 group-active:bg-white/24"})}),g.jsx("div",{className:"flex flex-col border-l border-neutral-800 bg-neutral-900 flex-shrink-0",style:{width:l},children:O?g.jsx(jB,{iframeRef:y}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-1 border-b border-neutral-800 px-3 py-2",children:[on&&g.jsxs(g.Fragment,{children:[g.jsx("button",{type:"button",onClick:()=>c("design"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${o==="design"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:"Design"}),g.jsx("button",{type:"button",onClick:()=>c("layers"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${o==="layers"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:"Layers"}),Rg&&g.jsx("button",{type:"button",onClick:()=>c("motion"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${o==="motion"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:"Motion"})]}),g.jsx("button",{type:"button",onClick:()=>c("renders"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${o==="renders"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:Y.length>0?`Renders (${Y.length})`:"Renders"})]}),g.jsx("div",{className:"min-h-0 flex-1",children:o==="block-params"&&r?g.jsx(RB,{blockName:r.blockName,blockTitle:r.blockTitle,params:r.params,compositionPath:r.compositionPath,onClose:i??(()=>{})}):o==="layers"?g.jsx(TB,{}):e?g.jsx(dB,{projectId:b,projectDir:P,assets:B,element:Q.length>1?null:$,multiSelectCount:Q.length,copiedAgentPrompt:C,onClearSelection:M,onSetStyle:Z,onSetAttribute:E,onSetHtmlAttribute:j,onSetManualOffset:_,onSetManualSize:H,onSetManualRotation:L,onSetText:z,onSetTextFieldStyle:F,onAddTextField:ee,onRemoveTextField:W,onAskAgent:V,onImportAssets:R,fontAssets:D,onImportFonts:X}):n?g.jsx(wB,{element:Q.length>1?null:$,motion:t,onClearSelection:M,onSetMotion:G,onClearMotion:q}):g.jsx(qB,{jobs:Y,projectId:b,onDelete:k.deleteRender,onClearCompleted:k.clearCompleted,onStartRender:async(U,te,ne,ce)=>{await A();const me=S&&S!=="index.html"?S:void 0;await k.startRender({fps:ce,quality:te,format:U,resolution:ne,composition:me})},compositionDimensions:w,isRendering:k.isRendering})})]})})]})}function UB({toggleTimelineVisibility:t}){const e=ge(o=>o.zoomMode),n=ge(o=>o.manualZoomPercent),r=ge(o=>o.setZoomMode),i=ge(o=>o.setManualZoomPercent),l=jf(e,n);return g.jsx("div",{className:"border-b border-neutral-800/40 bg-neutral-950/96",children:g.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[g.jsx("div",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-neutral-500",children:"Timeline"}),g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx("button",{type:"button",onClick:()=>r("fit"),className:`h-7 px-2.5 rounded-md border text-[11px] font-medium transition-colors ${e==="fit"?"border-studio-accent/30 bg-studio-accent/10 text-studio-accent":"border-neutral-800 text-neutral-400 hover:border-neutral-700 hover:text-neutral-200"}`,title:"Fit timeline to width",children:"Fit"}),g.jsx("button",{type:"button",onClick:()=>{r("manual"),i(s3("out",e,n))},className:"h-7 w-7 rounded-md border border-neutral-800 text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-200",title:"Zoom out",children:"-"}),g.jsx("div",{className:"min-w-[58px] text-center text-[10px] font-medium tabular-nums text-neutral-500",children:`${l}%`}),g.jsx("button",{type:"button",onClick:()=>{r("manual"),i(s3("in",e,n))},className:"h-7 w-7 rounded-md border border-neutral-800 text-neutral-400 transition-colors hover:border-neutral-700 hover:text-neutral-200",title:"Zoom in",children:"+"}),g.jsx("button",{type:"button",onClick:t,className:"ml-1 flex h-7 w-7 items-center justify-center rounded-md text-neutral-500 transition-colors hover:bg-neutral-900 hover:text-neutral-200",title:l7(!0),"aria-label":"Hide timeline editor",children:g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[g.jsx("path",{d:"M5 7h14"}),g.jsx("path",{d:"m8 11 4 4 4-4"})]})})]})]})})}function WB({waiting:t}){return g.jsx("div",{className:"h-full w-full bg-neutral-950 flex items-center justify-center",children:t?g.jsxs("div",{className:"flex flex-col items-center gap-3 text-center px-6",children:[g.jsx("div",{className:"w-4 h-4 rounded-full border-2 border-neutral-700 border-t-neutral-500 animate-spin"}),g.jsxs("p",{className:"text-xs text-neutral-600",children:["Waiting for preview server… run"," ",g.jsx("code",{className:"text-neutral-500 font-mono",children:"npm run dev"})]})]}):g.jsx("div",{className:"w-4 h-4 rounded-full bg-studio-accent animate-pulse"})})}function GB(){const[t,e]=d.useState(null),[n,r]=d.useState(!0),[i,l]=d.useState(!1);return Qt(()=>{const o=J3(window.location.hash);let c=!1,f=null;function m(){l(!0),f=window.setTimeout(p,2e3)}function p(){fetch("/api/projects").then(O=>O.json()).then(O=>{if(!c)if(o)e(o),l(!1);else{const y=(O.projects??[])[0];y?(e(y.id),l(!1),window.location.hash=u7(y.id)):m()}}).catch(()=>{c||m()}).finally(()=>{c||r(!1)})}return p(),()=>{c=!0,f!==null&&clearTimeout(f)}}),d.useEffect(()=>{const o=()=>{const c=J3(window.location.hash);c&&c!==t&&e(c)};return window.addEventListener("hashchange",o),()=>window.removeEventListener("hashchange",o)},[t]),{projectId:t,resolving:n,waitingForServer:i}}function KB(){const{projectId:t,resolving:e,waitingForServer:n}=GB(),r=d.useRef(Rj());d.useEffect(()=>{e||n||LT()||(_T(),WT({has_project:t!=null}))},[t,e,n]);const[i,l]=d.useState(null),[o,c]=d.useState(()=>r.current.activeCompPath==null),[f,m]=d.useState(new Map),[p,O]=d.useState(null),[y,b]=d.useState(!0),[S,w]=d.useState(0),[,A]=d.useState(0),[k,$]=d.useState(null),[Q,C]=d.useState(null),M=d.useRef(null),Z=d.useRef(i);Z.current=i;const E=d.useRef(null),j=KT(t),_=at(Oe=>Oe.isEditMode),H=at(Oe=>Oe.selectedSegmentIds.size>0),L=jQ(t),z=ge(Oe=>Oe.currentTime),F=ge(Oe=>Oe.elements),ee=ge(Oe=>Oe.setSelectedElementId),W=ge(Oe=>Oe.duration),V=ge(Oe=>Oe.isPlaying),G=!i||i==="index.html",q=i?`/api/projects/${t}/preview/comp/${i}`:null,B=d.useMemo(()=>{const Oe=F.length>0?Math.max(...F.map(et=>et.start+et.duration)):0;return Math.max(W,Oe)},[W,F]),D=d.useCallback(()=>{A(Oe=>Oe+1),window.setTimeout(()=>A(Oe=>Oe+1),80),window.setTimeout(()=>A(Oe=>Oe+1),300)},[]),[P,R]=d.useState(()=>r.current.timelineVisible??Uc().timelineVisible??!0),X=d.useCallback(()=>{R(Oe=>(Wc({timelineVisible:!Oe}),!Oe))},[]),{appToast:Y,showToast:U}=Ej(),te=UQ({rightCollapsed:r.current.rightCollapsed,rightPanelTab:r.current.rightPanelTab}),ne=IQ({projectId:t}),ce=d.useRef(0),me=d.useRef(new Set),Se=d.useCallback(()=>{w(Oe=>Oe+1)},[]),pe=uP({projectId:t,showToast:U,recordEdit:ne.recordEdit,domEditSaveTimestampRef:ce,setRefreshKey:w});d.useEffect(()=>{if(o||!pe.fileTreeLoaded)return;const Oe=Qj(r.current.activeCompPath,pe.fileTree);l(et=>et===Oe?et:Oe),c(!0)},[o,pe.fileTree,pe.fileTreeLoaded]);const ae=KP({projectId:t,showToast:U,readOptionalProjectFile:pe.readOptionalProjectFile,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,previewIframeRef:M,activeCompPathRef:Z,domEditSaveTimestampRef:ce,reloadPreview:()=>w(Oe=>Oe+1),pendingTimelineEditPathRef:me}),xe=lZ({projectId:t,activeCompPath:i,timelineElements:F,showToast:U,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,domEditSaveTimestampRef:ce,reloadPreview:Se,previewIframeRef:M,pendingTimelineEditPathRef:me,uploadProjectFiles:pe.uploadProjectFiles}),Qe=d.useCallback(Oe=>{t&&(async()=>{const et=await j2({projectId:t,blockName:Oe,activeCompPath:i,previewIframe:M.current,currentTime:ge.getState().currentTime,timelineElements:F,readProjectFile:pe.readProjectFile,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,refreshFileTree:pe.refreshFileTree,reloadPreview:Se,showToast:U}),ni=(et==null?void 0:et.block.type)==="hyperframes:block"?et.block.params:void 0;ni!=null&&ni.length&&($({blockName:et.block.name,blockTitle:et.block.title,params:ni,compositionPath:et.compositionPath}),te.setRightCollapsed(!1),te.setRightPanelTab("block-params"))})()},[t,i,F,pe.readProjectFile,pe.writeProjectFile,pe.refreshFileTree,ne.recordEdit,Se,U,te]),$e=d.useCallback((Oe,et)=>{t&&j2({projectId:t,blockName:Oe,activeCompPath:i,placement:et,previewIframe:M.current,currentTime:ge.getState().currentTime,timelineElements:F,readProjectFile:pe.readProjectFile,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,refreshFileTree:pe.refreshFileTree,reloadPreview:Se,showToast:U})},[t,i,F,pe.readProjectFile,pe.writeProjectFile,pe.refreshFileTree,ne.recordEdit,Se,U]),Ze=d.useCallback((Oe,et)=>{t&&j2({projectId:t,blockName:Oe,activeCompPath:i,visualPosition:et,previewIframe:M.current,currentTime:ge.getState().currentTime,timelineElements:F,readProjectFile:pe.readProjectFile,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,refreshFileTree:pe.refreshFileTree,reloadPreview:Se,showToast:U})},[t,i,F,pe.readProjectFile,pe.writeProjectFile,pe.refreshFileTree,ne.recordEdit,Se,U]),Je=d.useRef(()=>{}),Ue=d.useRef(null),ve=d.useRef(async()=>{}),bt=async Oe=>ve.current(Oe),{handleCopy:nt,handlePaste:Re,handleCut:kt}=cj({projectId:t,activeCompPath:i,domEditSelectionRef:Ue,showToast:U,writeProjectFile:pe.writeProjectFile,recordEdit:ne.recordEdit,domEditSaveTimestampRef:ce,reloadPreview:Se,handleTimelineElementDelete:xe.handleTimelineElementDelete,handleDomEditElementDelete:bt,previewIframeRef:M}),Fe=rj({toggleTimelineVisibility:X,handleTimelineElementDelete:xe.handleTimelineElementDelete,handleDomEditElementDelete:bt,domEditSelectionRef:Ue,editHistory:ne,readOptionalProjectFile:pe.readOptionalProjectFile,readProjectFile:pe.readProjectFile,writeProjectFile:pe.writeProjectFile,domEditSaveTimestampRef:ce,showToast:U,syncHistoryPreviewAfterApply:ae.syncHistoryPreviewAfterApply,waitForPendingDomEditSaves:ae.waitForPendingDomEditSaves,leftSidebarRef:E,handleCopy:nt,handlePaste:Re,handleCut:kt}),Gt=d.useCallback(Oe=>{var et;return(et=E.current)==null?void 0:et.selectTab(Oe)},[]),Lt=d.useCallback(()=>{var Oe;return((Oe=E.current)==null?void 0:Oe.getTab())??"compositions"},[]),st=tj({projectId:t,activeCompPath:i,isMasterView:G,compIdToSrc:f,captionEditMode:_,compositionLoading:y,previewIframeRef:M,timelineElements:F,currentTime:z,setSelectedTimelineElementId:ee,setRightCollapsed:te.setRightCollapsed,setRightPanelTab:te.setRightPanelTab,showToast:U,refreshPreviewDocumentVersion:D,queueDomEditSave:ae.queueDomEditSave,readProjectFile:pe.readProjectFile,writeProjectFile:pe.writeProjectFile,domEditSaveTimestampRef:ce,editHistory:{recordEdit:ne.recordEdit},fileTree:pe.fileTree,importedFontAssetsRef:pe.importedFontAssetsRef,projectDir:pe.projectDir,projectIdRef:pe.projectIdRef,previewIframe:p,refreshKey:S,rightPanelTab:te.rightPanelTab,applyStudioManualEditsToPreviewRef:ae.applyStudioManualEditsToPreviewRef,syncPreviewHistoryHotkey:Fe.syncPreviewHistoryHotkey,reloadPreview:Se,setRefreshKey:w,openSourceForSelection:pe.openSourceForSelection,selectSidebarTab:Gt,getSidebarTab:Lt});Ue.current=st.domEditSelection,Je.current=st.clearDomSelection,ve.current=st.handleDomEditElementDelete,pj({projectId:t,activeCompPath:i,compIdToSrc:f,captionEditMode:_,captionHasSelection:H,previewIframeRef:M,captionSync:L,setRightCollapsed:te.setRightCollapsed});const tn=vj({projectIdRef:pe.projectIdRef,compIdToSrc:f,activePreviewUrl:q,effectiveTimelineDuration:B}),Ci=Cj(),{lintModal:mr,linting:Ne,handleLint:Mt,closeLintModal:St}=Tj(t),ze=Mj({projectId:t,activeCompPath:i,showToast:U,waitForPendingDomEditSaves:ae.waitForPendingDomEditSaves}),{consoleErrors:rt,setConsoleErrors:Ye,resetErrors:nn}=Sj(p),[Rn,pr]=d.useState(!1),Cn=d.useRef(0),{syncPreviewTimelineHotkey:Kt,syncPreviewHistoryHotkey:Gn}=Fe,un=d.useCallback(Oe=>{M.current=Oe,O(Oe),Kt(Oe),Gn(Oe),nn(),D()},[D,nn,Gn,Kt]),gr=d.useCallback(Oe=>{l(Oe==="index.html"||Oe.startsWith("compositions/")?Oe:null),pe.setEditingFile({path:Oe,content:null}),fetch(`/api/projects/${t}/files/${Oe}`).then(et=>et.json()).then(et=>pe.setEditingFile({path:Oe,content:et.content})).catch(()=>{})},[t,pe]),Or=on&&st.domEditSelection?jS(st.domEditSelection.element):null,sa=on&&te.rightPanelTab==="layers",Ka=on&&te.rightPanelTab==="design",_r=on&&Rg&&te.rightPanelTab==="motion",xr=sa||Ka||_r,Il=xr&&!te.rightCollapsed&&!V,ye=on&&!te.rightCollapsed&&xr;Vj({projectId:t,activeCompPath:i,currentTime:z,duration:B,isPlaying:V,compositionLoading:y,refreshKey:S,previewIframeRef:M,rightPanelTab:te.rightPanelTab,rightCollapsed:te.rightCollapsed,timelineVisible:P,activeCompPathHydrated:o,domEditSelection:st.domEditSelection,buildDomSelectionFromTarget:st.buildDomSelectionFromTarget,applyDomSelection:st.applyDomSelection,initialState:r.current});const He={projectId:t,activeCompPath:i,setActiveCompPath:l,showToast:U,previewIframeRef:M,captionEditMode:_,compositionLoading:y,refreshKey:S,setRefreshKey:w,currentTime:z,timelineElements:F,isPlaying:V,editHistory:{canUndo:ne.canUndo,canRedo:ne.canRedo,undoLabel:ne.undoLabel,redoLabel:ne.redoLabel},handleUndo:Fe.handleUndo,handleRedo:Fe.handleRedo,renderQueue:{jobs:j.jobs,isRendering:j.isRendering,deleteRender:j.deleteRender,clearCompleted:j.clearCompleted,startRender:j.startRender},compositionDimensions:Ci,waitForPendingDomEditSaves:ae.waitForPendingDomEditSaves,handlePreviewIframeRef:un,refreshPreviewDocumentVersion:D,timelineVisible:P,toggleTimelineVisibility:X};if(e||n||!t)return g.jsx(WB,{waiting:n});const ft=g.jsx(UB,{toggleTimelineVisibility:X});return g.jsx(tR,{value:He,children:g.jsx(nR,{value:te,children:g.jsx(cF,{value:pe,children:g.jsx(rR,{value:st,children:g.jsxs("div",{className:"flex flex-col h-full w-full bg-neutral-950 relative",onDragOver:Oe=>{Oe.dataTransfer.types.includes("Files")&&Oe.preventDefault()},onDragEnter:Oe=>{Oe.dataTransfer.types.includes("Files")&&(Oe.preventDefault(),Cn.current++,pr(!0))},onDragLeave:()=>{Cn.current--,Cn.current===0&&pr(!1)},onDrop:Oe=>{Cn.current=0,pr(!1),!Oe.defaultPrevented&&(Oe.preventDefault(),Oe.dataTransfer.files.length&&pe.handleImportFiles(Oe.dataTransfer.files))},children:[g.jsx(aR,{captureFrameHref:ze.captureFrameHref,captureFrameFilename:ze.captureFrameFilename,handleCaptureFrameClick:ze.handleCaptureFrameClick,refreshCaptureFrameTime:ze.refreshCaptureFrameTime,inspectorButtonActive:ye,inspectorPanelActive:xr}),g.jsxs("div",{className:"flex flex-1 min-h-0",children:[g.jsx(uF,{leftSidebarRef:E,onSelectComposition:gr,onAddBlock:Qe,onPreviewBlock:C,onLint:Mt,linting:Ne}),g.jsx(pY,{timelineToolbar:ft,renderClipContent:tn,handleTimelineElementDelete:xe.handleTimelineElementDelete,handleTimelineAssetDrop:xe.handleTimelineAssetDrop,handleTimelineBlockDrop:$e,handlePreviewBlockDrop:Ze,handleTimelineFileDrop:xe.handleTimelineFileDrop,handleTimelineElementMove:xe.handleTimelineElementMove,handleTimelineElementResize:xe.handleTimelineElementResize,handleBlockedTimelineEdit:xe.handleBlockedTimelineEdit,setCompIdToSrc:m,setCompositionLoading:b,shouldShowSelectedDomBounds:Il,blockPreview:Q}),!te.rightCollapsed&&g.jsx(IB,{selectedStudioMotion:Or,designPanelActive:Ka,motionPanelActive:_r,activeBlockParams:k,onCloseBlockParams:()=>{$(null),te.setRightPanelTab("design")}})]}),mr!==null&&g.jsx(y3,{findings:mr,projectId:t,onClose:St}),rt!==null&&rt.length>0&&g.jsx(y3,{findings:rt,projectId:t,onClose:()=>Ye(null)}),st.agentModalOpen&&st.domEditSelection&&g.jsx(_j,{selectionLabel:st.domEditSelection.label,anchorPoint:st.agentModalAnchorPoint,onSubmit:st.handleAgentModalSubmit,onClose:()=>{st.setAgentModalOpen(!1),st.setAgentPromptSelectionContext(void 0),st.setAgentModalAnchorPoint(null)}}),Rn&&g.jsx(Dj,{}),Y&&g.jsx("div",{className:`absolute bottom-6 left-1/2 -translate-x-1/2 z-[91] px-4 py-2 rounded-lg border text-sm shadow-lg animate-in fade-in slide-in-from-bottom-2 ${Y.tone==="error"?"bg-red-900/90 border-red-700/50 text-red-200":"bg-neutral-900/95 border-neutral-700/60 text-neutral-100"}`,children:Y.message})]})})})})})}class JB extends d.Component{constructor(){super(...arguments);k5(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,r){var i,l;console.error("[Studio] Uncaught error:",n,r.componentStack),Nt("crash",{error_message:n.message,error_name:n.name,stack_trace:((i=n.stack)==null?void 0:i.slice(0,4e3))??null,component_stack:((l=r.componentStack)==null?void 0:l.slice(0,2e3))??null})}render(){return this.state.error?g.jsxs("div",{style:{position:"fixed",inset:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",background:"#0a0a0a",color:"#e5e5e5",fontFamily:"system-ui, -apple-system, sans-serif",gap:16},children:[g.jsx("div",{style:{fontSize:18,fontWeight:600},children:"Something went wrong"}),g.jsx("div",{style:{fontSize:13,color:"#888",maxWidth:480,textAlign:"center"},children:this.state.error.message}),g.jsx("button",{onClick:()=>this.setState({error:null}),style:{marginTop:8,padding:"8px 20px",background:"#2563eb",color:"#fff",border:"none",borderRadius:6,fontSize:14,cursor:"pointer"},children:"Try again"})]}):this.props.children}}Nt("session_start");function ok(t){var e;return t instanceof Error?{error_message:t.message,error_name:t.name,stack_trace:((e=t.stack)==null?void 0:e.slice(0,4e3))??null}:{error_message:String(t),error_name:null,stack_trace:null}}window.addEventListener("error",t=>{var e;if((e=t.message)!=null&&e.includes("ResizeObserver loop")){t.stopImmediatePropagation(),t.preventDefault();return}Nt("unhandled_error",{...ok(t.error),error_message:t.message,filename:t.filename,lineno:t.lineno,colno:t.colno})});window.addEventListener("unhandledrejection",t=>{Nt("unhandled_promise_rejection",ok(t.reason))});QT.createRoot(document.getElementById("root")).render(g.jsx(d.StrictMode,{children:g.jsx(JB,{children:g.jsx(KB,{})})}));
|