@hyperframes/studio 0.5.0-alpha.8 → 0.5.0

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.
Files changed (69) hide show
  1. package/dist/assets/hyperframes-player-CoI5h1xv.js +353 -0
  2. package/dist/assets/index-BKjcNNNd.css +1 -0
  3. package/dist/assets/index-CqiisJmo.js +93 -0
  4. package/dist/index.html +2 -2
  5. package/package.json +4 -4
  6. package/src/App.tsx +208 -1436
  7. package/src/captions/components/CaptionOverlay.tsx +2 -1
  8. package/src/captions/generator.test.ts +19 -0
  9. package/src/captions/generator.ts +9 -2
  10. package/src/captions/hooks/useCaptionSync.ts +6 -1
  11. package/src/captions/keyboard.test.ts +38 -0
  12. package/src/captions/keyboard.ts +8 -0
  13. package/src/captions/parser.test.ts +14 -0
  14. package/src/captions/parser.ts +1 -0
  15. package/src/components/LintModal.tsx +4 -3
  16. package/src/components/editor/PropertyPanel.tsx +206 -2462
  17. package/src/components/nle/NLELayout.tsx +47 -17
  18. package/src/components/nle/NLEPreview.tsx +9 -50
  19. package/src/components/sidebar/AssetsTab.tsx +4 -3
  20. package/src/components/sidebar/CompositionsTab.test.ts +1 -16
  21. package/src/components/sidebar/CompositionsTab.tsx +45 -117
  22. package/src/components/sidebar/LeftSidebar.tsx +55 -34
  23. package/src/components/ui/HyperframesLoader.tsx +104 -0
  24. package/src/components/ui/index.ts +2 -0
  25. package/src/icons/SystemIcons.tsx +2 -0
  26. package/src/player/components/CompositionThumbnail.tsx +10 -42
  27. package/src/player/components/EditModal.tsx +20 -5
  28. package/src/player/components/Player.tsx +129 -28
  29. package/src/player/components/PlayerControls.tsx +117 -49
  30. package/src/player/components/Timeline.test.ts +0 -12
  31. package/src/player/components/Timeline.tsx +25 -52
  32. package/src/player/components/TimelineClip.tsx +9 -21
  33. package/src/player/components/timelineEditing.test.ts +4 -2
  34. package/src/player/components/timelineEditing.ts +3 -1
  35. package/src/player/components/timelineTheme.test.ts +19 -0
  36. package/src/player/components/timelineTheme.ts +8 -4
  37. package/src/player/hooks/useTimelinePlayer.test.ts +219 -1
  38. package/src/player/hooks/useTimelinePlayer.ts +487 -106
  39. package/src/player/lib/time.test.ts +29 -1
  40. package/src/player/lib/time.ts +26 -0
  41. package/src/player/store/playerStore.test.ts +11 -1
  42. package/src/player/store/playerStore.ts +6 -1
  43. package/src/styles/studio.css +112 -0
  44. package/src/utils/frameCapture.test.ts +26 -0
  45. package/src/utils/frameCapture.ts +40 -0
  46. package/src/utils/mediaTypes.ts +1 -1
  47. package/src/utils/projectRouting.test.ts +87 -0
  48. package/src/utils/projectRouting.ts +27 -0
  49. package/src/utils/sourcePatcher.test.ts +1 -128
  50. package/src/utils/sourcePatcher.ts +18 -130
  51. package/src/utils/timelineAssetDrop.test.ts +11 -31
  52. package/src/utils/timelineAssetDrop.ts +2 -22
  53. package/dist/assets/hyperframes-player-vibA20NC.js +0 -198
  54. package/dist/assets/index-0Zt0t13W.css +0 -1
  55. package/dist/assets/index-C9f5eif8.js +0 -105
  56. package/src/components/editor/DomEditOverlay.tsx +0 -442
  57. package/src/components/editor/colorValue.test.ts +0 -82
  58. package/src/components/editor/colorValue.ts +0 -175
  59. package/src/components/editor/domEditing.test.ts +0 -537
  60. package/src/components/editor/domEditing.ts +0 -762
  61. package/src/components/editor/floatingPanel.test.ts +0 -34
  62. package/src/components/editor/floatingPanel.ts +0 -54
  63. package/src/components/editor/fontAssets.ts +0 -32
  64. package/src/components/editor/fontCatalog.ts +0 -126
  65. package/src/components/editor/gradientValue.test.ts +0 -89
  66. package/src/components/editor/gradientValue.ts +0 -445
  67. package/src/player/components/CompositionThumbnail.test.ts +0 -19
  68. package/src/utils/clipboard.test.ts +0 -88
  69. package/src/utils/clipboard.ts +0 -57
@@ -1,105 +0,0 @@
1
- (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 s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function Xv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Sd={exports:{}},Jo={},bd={exports:{}},Ke={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its 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 W2;function _v(){if(W2)return Ke;W2=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),O=Symbol.iterator;function y($){return $===null||typeof $!="object"?null:($=O&&$[O]||$["@@iterator"],typeof $=="function"?$:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,b={};function P($,V,R){this.props=$,this.context=V,this.refs=b,this.updater=R||v}P.prototype.isReactComponent={},P.prototype.setState=function($,V){if(typeof $!="object"&&typeof $!="function"&&$!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,$,V,"setState")},P.prototype.forceUpdate=function($){this.updater.enqueueForceUpdate(this,$,"forceUpdate")};function A(){}A.prototype=P.prototype;function z($,V,R){this.props=$,this.context=V,this.refs=b,this.updater=R||v}var M=z.prototype=new A;M.constructor=z,S(M,P.prototype),M.isPureReactComponent=!0;var C=Array.isArray,Z=Object.prototype.hasOwnProperty,H={current:null},j={key:!0,ref:!0,__self:!0,__source:!0};function N($,V,R){var te,ie={},Ae=null,ye=null;if(V!=null)for(te in V.ref!==void 0&&(ye=V.ref),V.key!==void 0&&(Ae=""+V.key),V)Z.call(V,te)&&!j.hasOwnProperty(te)&&(ie[te]=V[te]);var Le=arguments.length-2;if(Le===1)ie.children=R;else if(1<Le){for(var Fe=Array(Le),rt=0;rt<Le;rt++)Fe[rt]=arguments[rt+2];ie.children=Fe}if($&&$.defaultProps)for(te in Le=$.defaultProps,Le)ie[te]===void 0&&(ie[te]=Le[te]);return{$$typeof:n,type:$,key:Ae,ref:ye,props:ie,_owner:H.current}}function ne($,V){return{$$typeof:n,type:$.type,key:V,ref:$.ref,props:$.props,_owner:$._owner}}function se($){return typeof $=="object"&&$!==null&&$.$$typeof===n}function le($){var V={"=":"=0",":":"=2"};return"$"+$.replace(/[=:]/g,function(R){return V[R]})}var T=/\/+/g;function re($,V){return typeof $=="object"&&$!==null&&$.key!=null?le(""+$.key):V.toString(36)}function ce($,V,R,te,ie){var Ae=typeof $;(Ae==="undefined"||Ae==="boolean")&&($=null);var ye=!1;if($===null)ye=!0;else switch(Ae){case"string":case"number":ye=!0;break;case"object":switch($.$$typeof){case n:case e:ye=!0}}if(ye)return ye=$,ie=ie(ye),$=te===""?"."+re(ye,0):te,C(ie)?(R="",$!=null&&(R=$.replace(T,"$&/")+"/"),ce(ie,V,R,"",function(rt){return rt})):ie!=null&&(se(ie)&&(ie=ne(ie,R+(!ie.key||ye&&ye.key===ie.key?"":(""+ie.key).replace(T,"$&/")+"/")+$)),V.push(ie)),1;if(ye=0,te=te===""?".":te+":",C($))for(var Le=0;Le<$.length;Le++){Ae=$[Le];var Fe=te+re(Ae,Le);ye+=ce(Ae,V,R,Fe,ie)}else if(Fe=y($),typeof Fe=="function")for($=Fe.call($),Le=0;!(Ae=$.next()).done;)Ae=Ae.value,Fe=te+re(Ae,Le++),ye+=ce(Ae,V,R,Fe,ie);else if(Ae==="object")throw V=String($),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys($).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return ye}function Y($,V,R){if($==null)return $;var te=[],ie=0;return ce($,te,"","",function(Ae){return V.call(R,Ae,ie++)}),te}function G($){if($._status===-1){var V=$._result;V=V(),V.then(function(R){($._status===0||$._status===-1)&&($._status=1,$._result=R)},function(R){($._status===0||$._status===-1)&&($._status=2,$._result=R)}),$._status===-1&&($._status=0,$._result=V)}if($._status===1)return $._result.default;throw $._result}var oe={current:null},B={transition:null},D={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:B,ReactCurrentOwner:H};function W(){throw Error("act(...) is not supported in production builds of React.")}return Ke.Children={map:Y,forEach:function($,V,R){Y($,function(){V.apply(this,arguments)},R)},count:function($){var V=0;return Y($,function(){V++}),V},toArray:function($){return Y($,function(V){return V})||[]},only:function($){if(!se($))throw Error("React.Children.only expected to receive a single React element child.");return $}},Ke.Component=P,Ke.Fragment=t,Ke.Profiler=i,Ke.PureComponent=z,Ke.StrictMode=r,Ke.Suspense=u,Ke.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,Ke.act=W,Ke.cloneElement=function($,V,R){if($==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+$+".");var te=S({},$.props),ie=$.key,Ae=$.ref,ye=$._owner;if(V!=null){if(V.ref!==void 0&&(Ae=V.ref,ye=H.current),V.key!==void 0&&(ie=""+V.key),$.type&&$.type.defaultProps)var Le=$.type.defaultProps;for(Fe in V)Z.call(V,Fe)&&!j.hasOwnProperty(Fe)&&(te[Fe]=V[Fe]===void 0&&Le!==void 0?Le[Fe]:V[Fe])}var Fe=arguments.length-2;if(Fe===1)te.children=R;else if(1<Fe){Le=Array(Fe);for(var rt=0;rt<Fe;rt++)Le[rt]=arguments[rt+2];te.children=Le}return{$$typeof:n,type:$.type,key:ie,ref:Ae,props:te,_owner:ye}},Ke.createContext=function($){return $={$$typeof:o,_currentValue:$,_currentValue2:$,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},$.Provider={$$typeof:s,_context:$},$.Consumer=$},Ke.createElement=N,Ke.createFactory=function($){var V=N.bind(null,$);return V.type=$,V},Ke.createRef=function(){return{current:null}},Ke.forwardRef=function($){return{$$typeof:c,render:$}},Ke.isValidElement=se,Ke.lazy=function($){return{$$typeof:p,_payload:{_status:-1,_result:$},_init:G}},Ke.memo=function($,V){return{$$typeof:f,type:$,compare:V===void 0?null:V}},Ke.startTransition=function($){var V=B.transition;B.transition={};try{$()}finally{B.transition=V}},Ke.unstable_act=W,Ke.useCallback=function($,V){return oe.current.useCallback($,V)},Ke.useContext=function($){return oe.current.useContext($)},Ke.useDebugValue=function(){},Ke.useDeferredValue=function($){return oe.current.useDeferredValue($)},Ke.useEffect=function($,V){return oe.current.useEffect($,V)},Ke.useId=function(){return oe.current.useId()},Ke.useImperativeHandle=function($,V,R){return oe.current.useImperativeHandle($,V,R)},Ke.useInsertionEffect=function($,V){return oe.current.useInsertionEffect($,V)},Ke.useLayoutEffect=function($,V){return oe.current.useLayoutEffect($,V)},Ke.useMemo=function($,V){return oe.current.useMemo($,V)},Ke.useReducer=function($,V,R){return oe.current.useReducer($,V,R)},Ke.useRef=function($){return oe.current.useRef($)},Ke.useState=function($){return oe.current.useState($)},Ke.useSyncExternalStore=function($,V,R){return oe.current.useSyncExternalStore($,V,R)},Ke.useTransition=function(){return oe.current.useTransition()},Ke.version="18.3.1",Ke}var B2;function Tf(){return B2||(B2=1,bd.exports=_v()),bd.exports}/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its 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 Y2;function Dv(){if(Y2)return Jo;Y2=1;var n=Tf(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(c,u,f){var p,O={},y=null,v=null;f!==void 0&&(y=""+f),u.key!==void 0&&(y=""+u.key),u.ref!==void 0&&(v=u.ref);for(p in u)r.call(u,p)&&!s.hasOwnProperty(p)&&(O[p]=u[p]);if(c&&c.defaultProps)for(p in u=c.defaultProps,u)O[p]===void 0&&(O[p]=u[p]);return{$$typeof:e,type:c,key:y,ref:v,props:O,_owner:i.current}}return Jo.Fragment=t,Jo.jsx=o,Jo.jsxs=o,Jo}var q2;function zv(){return q2||(q2=1,Sd.exports=Dv()),Sd.exports}var g=zv(),h=Tf();const Kc=Xv(h);var Jc={},kd={exports:{}},tr={},$d={exports:{}},Pd={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its 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 U2;function Iv(){return U2||(U2=1,(function(n){function e(B,D){var W=B.length;B.push(D);e:for(;0<W;){var $=W-1>>>1,V=B[$];if(0<i(V,D))B[$]=D,B[W]=V,W=$;else break e}}function t(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var D=B[0],W=B.pop();if(W!==D){B[0]=W;e:for(var $=0,V=B.length,R=V>>>1;$<R;){var te=2*($+1)-1,ie=B[te],Ae=te+1,ye=B[Ae];if(0>i(ie,W))Ae<V&&0>i(ye,ie)?(B[$]=ye,B[Ae]=W,$=Ae):(B[$]=ie,B[te]=W,$=te);else if(Ae<V&&0>i(ye,W))B[$]=ye,B[Ae]=W,$=Ae;else break e}}return D}function i(B,D){var W=B.sortIndex-D.sortIndex;return W!==0?W:B.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,c=o.now();n.unstable_now=function(){return o.now()-c}}var u=[],f=[],p=1,O=null,y=3,v=!1,S=!1,b=!1,P=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(B){for(var D=t(f);D!==null;){if(D.callback===null)r(f);else if(D.startTime<=B)r(f),D.sortIndex=D.expirationTime,e(u,D);else break;D=t(f)}}function C(B){if(b=!1,M(B),!S)if(t(u)!==null)S=!0,G(Z);else{var D=t(f);D!==null&&oe(C,D.startTime-B)}}function Z(B,D){S=!1,b&&(b=!1,A(N),N=-1),v=!0;var W=y;try{for(M(D),O=t(u);O!==null&&(!(O.expirationTime>D)||B&&!le());){var $=O.callback;if(typeof $=="function"){O.callback=null,y=O.priorityLevel;var V=$(O.expirationTime<=D);D=n.unstable_now(),typeof V=="function"?O.callback=V:O===t(u)&&r(u),M(D)}else r(u);O=t(u)}if(O!==null)var R=!0;else{var te=t(f);te!==null&&oe(C,te.startTime-D),R=!1}return R}finally{O=null,y=W,v=!1}}var H=!1,j=null,N=-1,ne=5,se=-1;function le(){return!(n.unstable_now()-se<ne)}function T(){if(j!==null){var B=n.unstable_now();se=B;var D=!0;try{D=j(!0,B)}finally{D?re():(H=!1,j=null)}}else H=!1}var re;if(typeof z=="function")re=function(){z(T)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,Y=ce.port2;ce.port1.onmessage=T,re=function(){Y.postMessage(null)}}else re=function(){P(T,0)};function G(B){j=B,H||(H=!0,re())}function oe(B,D){N=P(function(){B(n.unstable_now())},D)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_continueExecution=function(){S||v||(S=!0,G(Z))},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return y},n.unstable_getFirstCallbackNode=function(){return t(u)},n.unstable_next=function(B){switch(y){case 1:case 2:case 3:var D=3;break;default:D=y}var W=y;y=D;try{return B()}finally{y=W}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(B,D){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var W=y;y=B;try{return D()}finally{y=W}},n.unstable_scheduleCallback=function(B,D,W){var $=n.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?$+W:$):W=$,B){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=W+V,B={id:p++,callback:D,priorityLevel:B,startTime:W,expirationTime:V,sortIndex:-1},W>$?(B.sortIndex=W,e(f,B),t(u)===null&&B===t(f)&&(b?(A(N),N=-1):b=!0,oe(C,W-$))):(B.sortIndex=V,e(u,B),S||v||(S=!0,G(Z))),B},n.unstable_shouldYield=le,n.unstable_wrapCallback=function(B){var D=y;return function(){var W=y;y=D;try{return B.apply(this,arguments)}finally{y=W}}}})(Pd)),Pd}var G2;function Fv(){return G2||(G2=1,$d.exports=Iv()),$d.exports}/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its 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 K2;function Hv(){if(K2)return tr;K2=1;var n=Tf(),e=Fv();function t(l){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+l,d=1;d<arguments.length;d++)a+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+l+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(l,a){o(l,a),o(l+"Capture",a)}function o(l,a){for(i[l]=a,l=0;l<a.length;l++)r.add(a[l])}var c=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),u=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},O={};function y(l){return u.call(O,l)?!0:u.call(p,l)?!1:f.test(l)?O[l]=!0:(p[l]=!0,!1)}function v(l,a,d,m){if(d!==null&&d.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return m?!1:d!==null?!d.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function S(l,a,d,m){if(a===null||typeof a>"u"||v(l,a,d,m))return!0;if(m)return!1;if(d!==null)switch(d.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function b(l,a,d,m,x,w,k){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=m,this.attributeNamespace=x,this.mustUseProperty=d,this.propertyName=l,this.type=a,this.sanitizeURL=w,this.removeEmptyString=k}var P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){P[l]=new b(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var a=l[0];P[a]=new b(a,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){P[l]=new b(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){P[l]=new b(l,2,!1,l,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(l){P[l]=new b(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){P[l]=new b(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){P[l]=new b(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){P[l]=new b(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){P[l]=new b(l,5,!1,l.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function z(l){return l[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(l){var a=l.replace(A,z);P[a]=new b(a,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var a=l.replace(A,z);P[a]=new b(a,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var a=l.replace(A,z);P[a]=new b(a,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){P[l]=new b(l,1,!1,l.toLowerCase(),null,!1,!1)}),P.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){P[l]=new b(l,1,!1,l.toLowerCase(),null,!0,!0)});function M(l,a,d,m){var x=P.hasOwnProperty(a)?P[a]:null;(x!==null?x.type!==0:m||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(S(a,d,x,m)&&(d=null),m||x===null?y(a)&&(d===null?l.removeAttribute(a):l.setAttribute(a,""+d)):x.mustUseProperty?l[x.propertyName]=d===null?x.type===3?!1:"":d:(a=x.attributeName,m=x.attributeNamespace,d===null?l.removeAttribute(a):(x=x.type,d=x===3||x===4&&d===!0?"":""+d,m?l.setAttributeNS(m,a,d):l.setAttribute(a,d))))}var C=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Z=Symbol.for("react.element"),H=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),ne=Symbol.for("react.profiler"),se=Symbol.for("react.provider"),le=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),ce=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),B=Symbol.iterator;function D(l){return l===null||typeof l!="object"?null:(l=B&&l[B]||l["@@iterator"],typeof l=="function"?l:null)}var W=Object.assign,$;function V(l){if($===void 0)try{throw Error()}catch(d){var a=d.stack.trim().match(/\n( *(at )?)/);$=a&&a[1]||""}return`
34
- `+$+l}var R=!1;function te(l,a){if(!l||R)return"";R=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(ee){var m=ee}Reflect.construct(l,[],a)}else{try{a.call()}catch(ee){m=ee}l.call(a.prototype)}else{try{throw Error()}catch(ee){m=ee}l()}}catch(ee){if(ee&&m&&typeof ee.stack=="string"){for(var x=ee.stack.split(`
35
- `),w=m.stack.split(`
36
- `),k=x.length-1,E=w.length-1;1<=k&&0<=E&&x[k]!==w[E];)E--;for(;1<=k&&0<=E;k--,E--)if(x[k]!==w[E]){if(k!==1||E!==1)do if(k--,E--,0>E||x[k]!==w[E]){var L=`
37
- `+x[k].replace(" at new "," at ");return l.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",l.displayName)),L}while(1<=k&&0<=E);break}}}finally{R=!1,Error.prepareStackTrace=d}return(l=l?l.displayName||l.name:"")?V(l):""}function ie(l){switch(l.tag){case 5:return V(l.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return l=te(l.type,!1),l;case 11:return l=te(l.type.render,!1),l;case 1:return l=te(l.type,!0),l;default:return""}}function Ae(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case j:return"Fragment";case H:return"Portal";case ne:return"Profiler";case N:return"StrictMode";case re:return"Suspense";case ce:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case le:return(l.displayName||"Context")+".Consumer";case se:return(l._context.displayName||"Context")+".Provider";case T:var a=l.render;return l=l.displayName,l||(l=a.displayName||a.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Y:return a=l.displayName||null,a!==null?a:Ae(l.type)||"Memo";case G:a=l._payload,l=l._init;try{return Ae(l(a))}catch{}}return null}function ye(l){var a=l.type;switch(l.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=a.render,l=l.displayName||l.name||"",a.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ae(a);case 8:return a===N?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function Le(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function Fe(l){var a=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function rt(l){var a=Fe(l)?"checked":"value",d=Object.getOwnPropertyDescriptor(l.constructor.prototype,a),m=""+l[a];if(!l.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var x=d.get,w=d.set;return Object.defineProperty(l,a,{configurable:!0,get:function(){return x.call(this)},set:function(k){m=""+k,w.call(this,k)}}),Object.defineProperty(l,a,{enumerable:d.enumerable}),{getValue:function(){return m},setValue:function(k){m=""+k},stopTracking:function(){l._valueTracker=null,delete l[a]}}}}function rn(l){l._valueTracker||(l._valueTracker=rt(l))}function Ut(l){if(!l)return!1;var a=l._valueTracker;if(!a)return!0;var d=a.getValue(),m="";return l&&(m=Fe(l)?l.checked?"true":"false":l.value),l=m,l!==d?(a.setValue(l),!0):!1}function _e(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function He(l,a){var d=a.checked;return W({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??l._wrapperState.initialChecked})}function We(l,a){var d=a.defaultValue==null?"":a.defaultValue,m=a.checked!=null?a.checked:a.defaultChecked;d=Le(a.value!=null?a.value:d),l._wrapperState={initialChecked:m,initialValue:d,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function st(l,a){a=a.checked,a!=null&&M(l,"checked",a,!1)}function ze(l,a){st(l,a);var d=Le(a.value),m=a.type;if(d!=null)m==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+d):l.value!==""+d&&(l.value=""+d);else if(m==="submit"||m==="reset"){l.removeAttribute("value");return}a.hasOwnProperty("value")?pt(l,a.type,d):a.hasOwnProperty("defaultValue")&&pt(l,a.type,Le(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(l.defaultChecked=!!a.defaultChecked)}function et(l,a,d){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var m=a.type;if(!(m!=="submit"&&m!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+l._wrapperState.initialValue,d||a===l.value||(l.value=a),l.defaultValue=a}d=l.name,d!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,d!==""&&(l.name=d)}function pt(l,a,d){(a!=="number"||_e(l.ownerDocument)!==l)&&(d==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+d&&(l.defaultValue=""+d))}var gt=Array.isArray;function Mt(l,a,d,m){if(l=l.options,a){a={};for(var x=0;x<d.length;x++)a["$"+d[x]]=!0;for(d=0;d<l.length;d++)x=a.hasOwnProperty("$"+l[d].value),l[d].selected!==x&&(l[d].selected=x),x&&m&&(l[d].defaultSelected=!0)}else{for(d=""+Le(d),a=null,x=0;x<l.length;x++){if(l[x].value===d){l[x].selected=!0,m&&(l[x].defaultSelected=!0);return}a!==null||l[x].disabled||(a=l[x])}a!==null&&(a.selected=!0)}}function Vn(l,a){if(a.dangerouslySetInnerHTML!=null)throw Error(t(91));return W({},a,{value:void 0,defaultValue:void 0,children:""+l._wrapperState.initialValue})}function ti(l,a){var d=a.value;if(d==null){if(d=a.children,a=a.defaultValue,d!=null){if(a!=null)throw Error(t(92));if(gt(d)){if(1<d.length)throw Error(t(93));d=d[0]}a=d}a==null&&(a=""),d=a}l._wrapperState={initialValue:Le(d)}}function tt(l,a){var d=Le(a.value),m=Le(a.defaultValue);d!=null&&(d=""+d,d!==l.value&&(l.value=d),a.defaultValue==null&&l.defaultValue!==d&&(l.defaultValue=d)),m!=null&&(l.defaultValue=""+m)}function fn(l){var a=l.textContent;a===l._wrapperState.initialValue&&a!==""&&a!==null&&(l.value=a)}function ni(l){switch(l){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Tt(l,a){return l==null||l==="http://www.w3.org/1999/xhtml"?ni(a):l==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":l}var Ln,Hn=(function(l){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,d,m,x){MSApp.execUnsafeLocalFunction(function(){return l(a,d,m,x)})}:l})(function(l,a){if(l.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in l)l.innerHTML=a;else{for(Ln=Ln||document.createElement("div"),Ln.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=Ln.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;a.firstChild;)l.appendChild(a.firstChild)}});function Nn(l,a){if(a){var d=l.firstChild;if(d&&d===l.lastChild&&d.nodeType===3){d.nodeValue=a;return}}l.textContent=a}var sn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pn=["Webkit","ms","Moz","O"];Object.keys(sn).forEach(function(l){pn.forEach(function(a){a=a+l.charAt(0).toUpperCase()+l.substring(1),sn[a]=sn[l]})});function ri(l,a,d){return a==null||typeof a=="boolean"||a===""?"":d||typeof a!="number"||a===0||sn.hasOwnProperty(l)&&sn[l]?(""+a).trim():a+"px"}function vt(l,a){l=l.style;for(var d in a)if(a.hasOwnProperty(d)){var m=d.indexOf("--")===0,x=ri(d,a[d],m);d==="float"&&(d="cssFloat"),m?l.setProperty(d,x):l[d]=x}}var Nr=W({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function dr(l,a){if(a){if(Nr[l]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(t(137,l));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(t(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(t(61))}if(a.style!=null&&typeof a.style!="object")throw Error(t(62))}}function Xr(l,a){if(l.indexOf("-")===-1)return typeof a.is=="string";switch(l){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 hr=null;function Ci(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var kn=null,ln=null,Gt=null;function fr(l){if(l=No(l)){if(typeof kn!="function")throw Error(t(280));var a=l.stateNode;a&&(a=fc(a),kn(l.stateNode,l.type,a))}}function mn(l){ln?Gt?Gt.push(l):Gt=[l]:ln=l}function St(){if(ln){var l=ln,a=Gt;if(Gt=ln=null,fr(l),a)for(l=0;l<a.length;l++)fr(a[l])}}function Wt(l,a){return l(a)}function Wn(){}var pr=!1;function ii(l,a,d){if(pr)return l(a,d);pr=!0;try{return Wt(l,a,d)}finally{pr=!1,(ln!==null||Gt!==null)&&(Wn(),St())}}function $n(l,a){var d=l.stateNode;if(d===null)return null;var m=fc(d);if(m===null)return null;d=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(l=l.type,m=!(l==="button"||l==="input"||l==="select"||l==="textarea")),l=!m;break e;default:l=!1}if(l)return null;if(d&&typeof d!="function")throw Error(t(231,a,typeof d));return d}var Mi=!1;if(c)try{var Bn={};Object.defineProperty(Bn,"passive",{get:function(){Mi=!0}}),window.addEventListener("test",Bn,Bn),window.removeEventListener("test",Bn,Bn)}catch{Mi=!1}function Pn(l,a,d,m,x,w,k,E,L){var ee=Array.prototype.slice.call(arguments,3);try{a.apply(d,ee)}catch(he){this.onError(he)}}var Kt=!1,Ji=null,es=!1,ts=null,wt={onError:function(l){Kt=!0,Ji=l}};function ko(l,a,d,m,x,w,k,E,L){Kt=!1,Ji=null,Pn.apply(wt,arguments)}function $o(l,a,d,m,x,w,k,E,L){if(ko.apply(this,arguments),Kt){if(Kt){var ee=Ji;Kt=!1,Ji=null}else throw Error(t(198));es||(es=!0,ts=ee)}}function _r(l){var a=l,d=l;if(l.alternate)for(;a.return;)a=a.return;else{l=a;do a=l,(a.flags&4098)!==0&&(d=a.return),l=a.return;while(l)}return a.tag===3?d:null}function Ot(l){if(l.tag===13){var a=l.memoizedState;if(a===null&&(l=l.alternate,l!==null&&(a=l.memoizedState)),a!==null)return a.dehydrated}return null}function si(l){if(_r(l)!==l)throw Error(t(188))}function gn(l){var a=l.alternate;if(!a){if(a=_r(l),a===null)throw Error(t(188));return a!==l?null:l}for(var d=l,m=a;;){var x=d.return;if(x===null)break;var w=x.alternate;if(w===null){if(m=x.return,m!==null){d=m;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===d)return si(x),l;if(w===m)return si(x),a;w=w.sibling}throw Error(t(188))}if(d.return!==m.return)d=x,m=w;else{for(var k=!1,E=x.child;E;){if(E===d){k=!0,d=x,m=w;break}if(E===m){k=!0,m=x,d=w;break}E=E.sibling}if(!k){for(E=w.child;E;){if(E===d){k=!0,d=w,m=x;break}if(E===m){k=!0,m=w,d=x;break}E=E.sibling}if(!k)throw Error(t(189))}}if(d.alternate!==m)throw Error(t(190))}if(d.tag!==3)throw Error(t(188));return d.stateNode.current===d?l:a}function ns(l){return l=gn(l),l!==null?Dr(l):null}function Dr(l){if(l.tag===5||l.tag===6)return l;for(l=l.child;l!==null;){var a=Dr(l);if(a!==null)return a;l=l.sibling}return null}var Pt=e.unstable_scheduleCallback,Xn=e.unstable_cancelCallback,Rs=e.unstable_shouldYield,fl=e.unstable_requestPaint,_=e.unstable_now,me=e.unstable_getCurrentPriorityLevel,Oe=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,je=e.unstable_NormalPriority,we=e.unstable_LowPriority,ht=e.unstable_IdlePriority,Nt=null,ft=null;function Qn(l){if(ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Nt,l,void 0,(l.current.flags&128)===128)}catch{}}var Qt=Math.clz32?Math.clz32:Yn,rs=Math.log,Xt=Math.LN2;function Yn(l){return l>>>=0,l===0?32:31-(rs(l)/Xt|0)|0}var li=64,Vs=4194304;function oi(l){switch(l&-l){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: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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function xt(l,a){var d=l.pendingLanes;if(d===0)return 0;var m=0,x=l.suspendedLanes,w=l.pingedLanes,k=d&268435455;if(k!==0){var E=k&~x;E!==0?m=oi(E):(w&=k,w!==0&&(m=oi(w)))}else k=d&~x,k!==0?m=oi(k):w!==0&&(m=oi(w));if(m===0)return 0;if(a!==0&&a!==m&&(a&x)===0&&(x=m&-m,w=a&-a,x>=w||x===16&&(w&4194240)!==0))return a;if((m&4)!==0&&(m|=d&16),a=l.entangledLanes,a!==0)for(l=l.entanglements,a&=m;0<a;)d=31-Qt(a),x=1<<d,m|=l[d],a&=~x;return m}function Ti(l,a){switch(l){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ei(l,a){for(var d=l.suspendedLanes,m=l.pingedLanes,x=l.expirationTimes,w=l.pendingLanes;0<w;){var k=31-Qt(w),E=1<<k,L=x[k];L===-1?((E&d)===0||(E&m)!==0)&&(x[k]=Ti(E,a)):L<=a&&(l.expiredLanes|=E),w&=~E}}function ai(l){return l=l.pendingLanes&-1073741825,l!==0?l:l&1073741824?1073741824:0}function Ls(){var l=li;return li<<=1,(li&4194240)===0&&(li=64),l}function ci(l){for(var a=[],d=0;31>d;d++)a.push(l);return a}function Ns(l,a,d){l.pendingLanes|=a,a!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,a=31-Qt(a),l[a]=d}function B0(l,a){var d=l.pendingLanes&~a;l.pendingLanes=a,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=a,l.mutableReadLanes&=a,l.entangledLanes&=a,a=l.entanglements;var m=l.eventTimes;for(l=l.expirationTimes;0<d;){var x=31-Qt(d),w=1<<x;a[x]=0,m[x]=-1,l[x]=-1,d&=~w}}function pl(l,a){var d=l.entangledLanes|=a;for(l=l.entanglements;d;){var m=31-Qt(d),x=1<<m;x&a|l[m]&a&&(l[m]|=a),d&=~x}}var ct=0;function Po(l){return l&=-l,1<l?4<l?(l&268435455)!==0?16:536870912:4:1}var Ja,is,ec,Q,I,K=!1,J=[],ae=null,Se=null,ve=null,xe=new Map,be=new Map,Be=[],nt="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 submit".split(" ");function qe(l,a){switch(l){case"focusin":case"focusout":ae=null;break;case"dragenter":case"dragleave":Se=null;break;case"mouseover":case"mouseout":ve=null;break;case"pointerover":case"pointerout":xe.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":be.delete(a.pointerId)}}function On(l,a,d,m,x,w){return l===null||l.nativeEvent!==w?(l={blockedOn:a,domEventName:d,eventSystemFlags:m,nativeEvent:w,targetContainers:[x]},a!==null&&(a=No(a),a!==null&&is(a)),l):(l.eventSystemFlags|=m,a=l.targetContainers,x!==null&&a.indexOf(x)===-1&&a.push(x),l)}function yt(l,a,d,m,x){switch(a){case"focusin":return ae=On(ae,l,a,d,m,x),!0;case"dragenter":return Se=On(Se,l,a,d,m,x),!0;case"mouseover":return ve=On(ve,l,a,d,m,x),!0;case"pointerover":var w=x.pointerId;return xe.set(w,On(xe.get(w)||null,l,a,d,m,x)),!0;case"gotpointercapture":return w=x.pointerId,be.set(w,On(be.get(w)||null,l,a,d,m,x)),!0}return!1}function Ue(l){var a=_s(l.target);if(a!==null){var d=_r(a);if(d!==null){if(a=d.tag,a===13){if(a=Ot(d),a!==null){l.blockedOn=a,I(l.priority,function(){ec(d)});return}}else if(a===3&&d.stateNode.current.memoizedState.isDehydrated){l.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}l.blockedOn=null}function xn(l){if(l.blockedOn!==null)return!1;for(var a=l.targetContainers;0<a.length;){var d=q0(l.domEventName,l.eventSystemFlags,a[0],l.nativeEvent);if(d===null){d=l.nativeEvent;var m=new d.constructor(d.type,d);hr=m,d.target.dispatchEvent(m),hr=null}else return a=No(d),a!==null&&is(a),l.blockedOn=d,!1;a.shift()}return!0}function qn(l,a,d){xn(l)&&d.delete(a)}function ss(){K=!1,ae!==null&&xn(ae)&&(ae=null),Se!==null&&xn(Se)&&(Se=null),ve!==null&&xn(ve)&&(ve=null),xe.forEach(qn),be.forEach(qn)}function ml(l,a){l.blockedOn===a&&(l.blockedOn=null,K||(K=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ss)))}function Bt(l){function a(x){return ml(x,l)}if(0<J.length){ml(J[0],l);for(var d=1;d<J.length;d++){var m=J[d];m.blockedOn===l&&(m.blockedOn=null)}}for(ae!==null&&ml(ae,l),Se!==null&&ml(Se,l),ve!==null&&ml(ve,l),xe.forEach(a),be.forEach(a),d=0;d<Be.length;d++)m=Be[d],m.blockedOn===l&&(m.blockedOn=null);for(;0<Be.length&&(d=Be[0],d.blockedOn===null);)Ue(d),d.blockedOn===null&&Be.shift()}var Zi=C.ReactCurrentBatchConfig,Xs=!0;function uy(l,a,d,m){var x=ct,w=Zi.transition;Zi.transition=null;try{ct=1,Y0(l,a,d,m)}finally{ct=x,Zi.transition=w}}function dy(l,a,d,m){var x=ct,w=Zi.transition;Zi.transition=null;try{ct=4,Y0(l,a,d,m)}finally{ct=x,Zi.transition=w}}function Y0(l,a,d,m){if(Xs){var x=q0(l,a,d,m);if(x===null)h1(l,a,m,tc,d),qe(l,m);else if(yt(x,l,a,d,m))m.stopPropagation();else if(qe(l,m),a&4&&-1<nt.indexOf(l)){for(;x!==null;){var w=No(x);if(w!==null&&Ja(w),w=q0(l,a,d,m),w===null&&h1(l,a,m,tc,d),w===x)break;x=w}x!==null&&m.stopPropagation()}else h1(l,a,m,null,d)}}var tc=null;function q0(l,a,d,m){if(tc=null,l=Ci(m),l=_s(l),l!==null)if(a=_r(l),a===null)l=null;else if(d=a.tag,d===13){if(l=Ot(a),l!==null)return l;l=null}else if(d===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;l=null}else a!==l&&(l=null);return tc=l,null}function Ep(l){switch(l){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(me()){case Oe:return 1;case pe:return 4;case je:case we:return 16;case ht:return 536870912;default:return 16}default:return 16}}var ls=null,U0=null,nc=null;function Zp(){if(nc)return nc;var l,a=U0,d=a.length,m,x="value"in ls?ls.value:ls.textContent,w=x.length;for(l=0;l<d&&a[l]===x[l];l++);var k=d-l;for(m=1;m<=k&&a[d-m]===x[w-m];m++);return nc=x.slice(l,1<m?1-m:void 0)}function rc(l){var a=l.keyCode;return"charCode"in l?(l=l.charCode,l===0&&a===13&&(l=13)):l=a,l===10&&(l=13),32<=l||l===13?l:0}function ic(){return!0}function jp(){return!1}function mr(l){function a(d,m,x,w,k){this._reactName=d,this._targetInst=x,this.type=m,this.nativeEvent=w,this.target=k,this.currentTarget=null;for(var E in l)l.hasOwnProperty(E)&&(d=l[E],this[E]=d?d(w):w[E]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?ic:jp,this.isPropagationStopped=jp,this}return W(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ic)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ic)},persist:function(){},isPersistent:ic}),a}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(l){return l.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},G0=mr(gl),Qo=W({},gl,{view:0,detail:0}),hy=mr(Qo),K0,J0,Ao,sc=W({},Qo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:t1,button:0,buttons:0,relatedTarget:function(l){return l.relatedTarget===void 0?l.fromElement===l.srcElement?l.toElement:l.fromElement:l.relatedTarget},movementX:function(l){return"movementX"in l?l.movementX:(l!==Ao&&(Ao&&l.type==="mousemove"?(K0=l.screenX-Ao.screenX,J0=l.screenY-Ao.screenY):J0=K0=0,Ao=l),K0)},movementY:function(l){return"movementY"in l?l.movementY:J0}}),Rp=mr(sc),fy=W({},sc,{dataTransfer:0}),py=mr(fy),my=W({},Qo,{relatedTarget:0}),e1=mr(my),gy=W({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),Oy=mr(gy),xy=W({},gl,{clipboardData:function(l){return"clipboardData"in l?l.clipboardData:window.clipboardData}}),yy=mr(xy),vy=W({},gl,{data:0}),Vp=mr(vy),wy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Sy={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"},by={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ky(l){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(l):(l=by[l])?!!a[l]:!1}function t1(){return ky}var $y=W({},Qo,{key:function(l){if(l.key){var a=wy[l.key]||l.key;if(a!=="Unidentified")return a}return l.type==="keypress"?(l=rc(l),l===13?"Enter":String.fromCharCode(l)):l.type==="keydown"||l.type==="keyup"?Sy[l.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:t1,charCode:function(l){return l.type==="keypress"?rc(l):0},keyCode:function(l){return l.type==="keydown"||l.type==="keyup"?l.keyCode:0},which:function(l){return l.type==="keypress"?rc(l):l.type==="keydown"||l.type==="keyup"?l.keyCode:0}}),Py=mr($y),Qy=W({},sc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lp=mr(Qy),Ay=W({},Qo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:t1}),Cy=mr(Ay),My=W({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ty=mr(My),Ey=W({},sc,{deltaX:function(l){return"deltaX"in l?l.deltaX:"wheelDeltaX"in l?-l.wheelDeltaX:0},deltaY:function(l){return"deltaY"in l?l.deltaY:"wheelDeltaY"in l?-l.wheelDeltaY:"wheelDelta"in l?-l.wheelDelta:0},deltaZ:0,deltaMode:0}),Zy=mr(Ey),jy=[9,13,27,32],n1=c&&"CompositionEvent"in window,Co=null;c&&"documentMode"in document&&(Co=document.documentMode);var Ry=c&&"TextEvent"in window&&!Co,Np=c&&(!n1||Co&&8<Co&&11>=Co),Xp=" ",_p=!1;function Dp(l,a){switch(l){case"keyup":return jy.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zp(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ol=!1;function Vy(l,a){switch(l){case"compositionend":return zp(a);case"keypress":return a.which!==32?null:(_p=!0,Xp);case"textInput":return l=a.data,l===Xp&&_p?null:l;default:return null}}function Ly(l,a){if(Ol)return l==="compositionend"||!n1&&Dp(l,a)?(l=Zp(),nc=U0=ls=null,Ol=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Np&&a.locale!=="ko"?null:a.data;default:return null}}var Ny={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 Ip(l){var a=l&&l.nodeName&&l.nodeName.toLowerCase();return a==="input"?!!Ny[l.type]:a==="textarea"}function Fp(l,a,d,m){mn(m),a=uc(a,"onChange"),0<a.length&&(d=new G0("onChange","change",null,d,m),l.push({event:d,listeners:a}))}var Mo=null,To=null;function Xy(l){am(l,0)}function lc(l){var a=Sl(l);if(Ut(a))return l}function _y(l,a){if(l==="change")return a}var Hp=!1;if(c){var r1;if(c){var i1="oninput"in document;if(!i1){var Wp=document.createElement("div");Wp.setAttribute("oninput","return;"),i1=typeof Wp.oninput=="function"}r1=i1}else r1=!1;Hp=r1&&(!document.documentMode||9<document.documentMode)}function Bp(){Mo&&(Mo.detachEvent("onpropertychange",Yp),To=Mo=null)}function Yp(l){if(l.propertyName==="value"&&lc(To)){var a=[];Fp(a,To,l,Ci(l)),ii(Xy,a)}}function Dy(l,a,d){l==="focusin"?(Bp(),Mo=a,To=d,Mo.attachEvent("onpropertychange",Yp)):l==="focusout"&&Bp()}function zy(l){if(l==="selectionchange"||l==="keyup"||l==="keydown")return lc(To)}function Iy(l,a){if(l==="click")return lc(a)}function Fy(l,a){if(l==="input"||l==="change")return lc(a)}function Hy(l,a){return l===a&&(l!==0||1/l===1/a)||l!==l&&a!==a}var zr=typeof Object.is=="function"?Object.is:Hy;function Eo(l,a){if(zr(l,a))return!0;if(typeof l!="object"||l===null||typeof a!="object"||a===null)return!1;var d=Object.keys(l),m=Object.keys(a);if(d.length!==m.length)return!1;for(m=0;m<d.length;m++){var x=d[m];if(!u.call(a,x)||!zr(l[x],a[x]))return!1}return!0}function qp(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Up(l,a){var d=qp(l);l=0;for(var m;d;){if(d.nodeType===3){if(m=l+d.textContent.length,l<=a&&m>=a)return{node:d,offset:a-l};l=m}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=qp(d)}}function Gp(l,a){return l&&a?l===a?!0:l&&l.nodeType===3?!1:a&&a.nodeType===3?Gp(l,a.parentNode):"contains"in l?l.contains(a):l.compareDocumentPosition?!!(l.compareDocumentPosition(a)&16):!1:!1}function Kp(){for(var l=window,a=_e();a instanceof l.HTMLIFrameElement;){try{var d=typeof a.contentWindow.location.href=="string"}catch{d=!1}if(d)l=a.contentWindow;else break;a=_e(l.document)}return a}function s1(l){var a=l&&l.nodeName&&l.nodeName.toLowerCase();return a&&(a==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||a==="textarea"||l.contentEditable==="true")}function Wy(l){var a=Kp(),d=l.focusedElem,m=l.selectionRange;if(a!==d&&d&&d.ownerDocument&&Gp(d.ownerDocument.documentElement,d)){if(m!==null&&s1(d)){if(a=m.start,l=m.end,l===void 0&&(l=a),"selectionStart"in d)d.selectionStart=a,d.selectionEnd=Math.min(l,d.value.length);else if(l=(a=d.ownerDocument||document)&&a.defaultView||window,l.getSelection){l=l.getSelection();var x=d.textContent.length,w=Math.min(m.start,x);m=m.end===void 0?w:Math.min(m.end,x),!l.extend&&w>m&&(x=m,m=w,w=x),x=Up(d,w);var k=Up(d,m);x&&k&&(l.rangeCount!==1||l.anchorNode!==x.node||l.anchorOffset!==x.offset||l.focusNode!==k.node||l.focusOffset!==k.offset)&&(a=a.createRange(),a.setStart(x.node,x.offset),l.removeAllRanges(),w>m?(l.addRange(a),l.extend(k.node,k.offset)):(a.setEnd(k.node,k.offset),l.addRange(a)))}}for(a=[],l=d;l=l.parentNode;)l.nodeType===1&&a.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<a.length;d++)l=a[d],l.element.scrollLeft=l.left,l.element.scrollTop=l.top}}var By=c&&"documentMode"in document&&11>=document.documentMode,xl=null,l1=null,Zo=null,o1=!1;function Jp(l,a,d){var m=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;o1||xl==null||xl!==_e(m)||(m=xl,"selectionStart"in m&&s1(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Zo&&Eo(Zo,m)||(Zo=m,m=uc(l1,"onSelect"),0<m.length&&(a=new G0("onSelect","select",null,a,d),l.push({event:a,listeners:m}),a.target=xl)))}function oc(l,a){var d={};return d[l.toLowerCase()]=a.toLowerCase(),d["Webkit"+l]="webkit"+a,d["Moz"+l]="moz"+a,d}var yl={animationend:oc("Animation","AnimationEnd"),animationiteration:oc("Animation","AnimationIteration"),animationstart:oc("Animation","AnimationStart"),transitionend:oc("Transition","TransitionEnd")},a1={},em={};c&&(em=document.createElement("div").style,"AnimationEvent"in window||(delete yl.animationend.animation,delete yl.animationiteration.animation,delete yl.animationstart.animation),"TransitionEvent"in window||delete yl.transitionend.transition);function ac(l){if(a1[l])return a1[l];if(!yl[l])return l;var a=yl[l],d;for(d in a)if(a.hasOwnProperty(d)&&d in em)return a1[l]=a[d];return l}var tm=ac("animationend"),nm=ac("animationiteration"),rm=ac("animationstart"),im=ac("transitionend"),sm=new Map,lm="abort auxClick 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(" ");function os(l,a){sm.set(l,a),s(a,[l])}for(var c1=0;c1<lm.length;c1++){var u1=lm[c1],Yy=u1.toLowerCase(),qy=u1[0].toUpperCase()+u1.slice(1);os(Yy,"on"+qy)}os(tm,"onAnimationEnd"),os(nm,"onAnimationIteration"),os(rm,"onAnimationStart"),os("dblclick","onDoubleClick"),os("focusin","onFocus"),os("focusout","onBlur"),os(im,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var jo="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(" "),Uy=new Set("cancel close invalid load scroll toggle".split(" ").concat(jo));function om(l,a,d){var m=l.type||"unknown-event";l.currentTarget=d,$o(m,a,void 0,l),l.currentTarget=null}function am(l,a){a=(a&4)!==0;for(var d=0;d<l.length;d++){var m=l[d],x=m.event;m=m.listeners;e:{var w=void 0;if(a)for(var k=m.length-1;0<=k;k--){var E=m[k],L=E.instance,ee=E.currentTarget;if(E=E.listener,L!==w&&x.isPropagationStopped())break e;om(x,E,ee),w=L}else for(k=0;k<m.length;k++){if(E=m[k],L=E.instance,ee=E.currentTarget,E=E.listener,L!==w&&x.isPropagationStopped())break e;om(x,E,ee),w=L}}}if(es)throw l=ts,es=!1,ts=null,l}function At(l,a){var d=a[x1];d===void 0&&(d=a[x1]=new Set);var m=l+"__bubble";d.has(m)||(cm(a,l,2,!1),d.add(m))}function d1(l,a,d){var m=0;a&&(m|=4),cm(d,l,m,a)}var cc="_reactListening"+Math.random().toString(36).slice(2);function Ro(l){if(!l[cc]){l[cc]=!0,r.forEach(function(d){d!=="selectionchange"&&(Uy.has(d)||d1(d,!1,l),d1(d,!0,l))});var a=l.nodeType===9?l:l.ownerDocument;a===null||a[cc]||(a[cc]=!0,d1("selectionchange",!1,a))}}function cm(l,a,d,m){switch(Ep(a)){case 1:var x=uy;break;case 4:x=dy;break;default:x=Y0}d=x.bind(null,a,d,l),x=void 0,!Mi||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(x=!0),m?x!==void 0?l.addEventListener(a,d,{capture:!0,passive:x}):l.addEventListener(a,d,!0):x!==void 0?l.addEventListener(a,d,{passive:x}):l.addEventListener(a,d,!1)}function h1(l,a,d,m,x){var w=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var k=m.tag;if(k===3||k===4){var E=m.stateNode.containerInfo;if(E===x||E.nodeType===8&&E.parentNode===x)break;if(k===4)for(k=m.return;k!==null;){var L=k.tag;if((L===3||L===4)&&(L=k.stateNode.containerInfo,L===x||L.nodeType===8&&L.parentNode===x))return;k=k.return}for(;E!==null;){if(k=_s(E),k===null)return;if(L=k.tag,L===5||L===6){m=w=k;continue e}E=E.parentNode}}m=m.return}ii(function(){var ee=w,he=Ci(d),fe=[];e:{var de=sm.get(l);if(de!==void 0){var $e=G0,Ce=l;switch(l){case"keypress":if(rc(d)===0)break e;case"keydown":case"keyup":$e=Py;break;case"focusin":Ce="focus",$e=e1;break;case"focusout":Ce="blur",$e=e1;break;case"beforeblur":case"afterblur":$e=e1;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":$e=Rp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":$e=py;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":$e=Cy;break;case tm:case nm:case rm:$e=Oy;break;case im:$e=Ty;break;case"scroll":$e=hy;break;case"wheel":$e=Zy;break;case"copy":case"cut":case"paste":$e=yy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":$e=Lp}var Ee=(a&4)!==0,zt=!Ee&&l==="scroll",q=Ee?de!==null?de+"Capture":null:de;Ee=[];for(var F=ee,U;F!==null;){U=F;var ge=U.stateNode;if(U.tag===5&&ge!==null&&(U=ge,q!==null&&(ge=$n(F,q),ge!=null&&Ee.push(Vo(F,ge,U)))),zt)break;F=F.return}0<Ee.length&&(de=new $e(de,Ce,null,d,he),fe.push({event:de,listeners:Ee}))}}if((a&7)===0){e:{if(de=l==="mouseover"||l==="pointerover",$e=l==="mouseout"||l==="pointerout",de&&d!==hr&&(Ce=d.relatedTarget||d.fromElement)&&(_s(Ce)||Ce[ji]))break e;if(($e||de)&&(de=he.window===he?he:(de=he.ownerDocument)?de.defaultView||de.parentWindow:window,$e?(Ce=d.relatedTarget||d.toElement,$e=ee,Ce=Ce?_s(Ce):null,Ce!==null&&(zt=_r(Ce),Ce!==zt||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):($e=null,Ce=ee),$e!==Ce)){if(Ee=Rp,ge="onMouseLeave",q="onMouseEnter",F="mouse",(l==="pointerout"||l==="pointerover")&&(Ee=Lp,ge="onPointerLeave",q="onPointerEnter",F="pointer"),zt=$e==null?de:Sl($e),U=Ce==null?de:Sl(Ce),de=new Ee(ge,F+"leave",$e,d,he),de.target=zt,de.relatedTarget=U,ge=null,_s(he)===ee&&(Ee=new Ee(q,F+"enter",Ce,d,he),Ee.target=U,Ee.relatedTarget=zt,ge=Ee),zt=ge,$e&&Ce)t:{for(Ee=$e,q=Ce,F=0,U=Ee;U;U=vl(U))F++;for(U=0,ge=q;ge;ge=vl(ge))U++;for(;0<F-U;)Ee=vl(Ee),F--;for(;0<U-F;)q=vl(q),U--;for(;F--;){if(Ee===q||q!==null&&Ee===q.alternate)break t;Ee=vl(Ee),q=vl(q)}Ee=null}else Ee=null;$e!==null&&um(fe,de,$e,Ee,!1),Ce!==null&&zt!==null&&um(fe,zt,Ce,Ee,!0)}}e:{if(de=ee?Sl(ee):window,$e=de.nodeName&&de.nodeName.toLowerCase(),$e==="select"||$e==="input"&&de.type==="file")var Ze=_y;else if(Ip(de))if(Hp)Ze=Fy;else{Ze=zy;var Ne=Dy}else($e=de.nodeName)&&$e.toLowerCase()==="input"&&(de.type==="checkbox"||de.type==="radio")&&(Ze=Iy);if(Ze&&(Ze=Ze(l,ee))){Fp(fe,Ze,d,he);break e}Ne&&Ne(l,de,ee),l==="focusout"&&(Ne=de._wrapperState)&&Ne.controlled&&de.type==="number"&&pt(de,"number",de.value)}switch(Ne=ee?Sl(ee):window,l){case"focusin":(Ip(Ne)||Ne.contentEditable==="true")&&(xl=Ne,l1=ee,Zo=null);break;case"focusout":Zo=l1=xl=null;break;case"mousedown":o1=!0;break;case"contextmenu":case"mouseup":case"dragend":o1=!1,Jp(fe,d,he);break;case"selectionchange":if(By)break;case"keydown":case"keyup":Jp(fe,d,he)}var Xe;if(n1)e:{switch(l){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Ol?Dp(l,d)&&(De="onCompositionEnd"):l==="keydown"&&d.keyCode===229&&(De="onCompositionStart");De&&(Np&&d.locale!=="ko"&&(Ol||De!=="onCompositionStart"?De==="onCompositionEnd"&&Ol&&(Xe=Zp()):(ls=he,U0="value"in ls?ls.value:ls.textContent,Ol=!0)),Ne=uc(ee,De),0<Ne.length&&(De=new Vp(De,l,null,d,he),fe.push({event:De,listeners:Ne}),Xe?De.data=Xe:(Xe=zp(d),Xe!==null&&(De.data=Xe)))),(Xe=Ry?Vy(l,d):Ly(l,d))&&(ee=uc(ee,"onBeforeInput"),0<ee.length&&(he=new Vp("onBeforeInput","beforeinput",null,d,he),fe.push({event:he,listeners:ee}),he.data=Xe))}am(fe,a)})}function Vo(l,a,d){return{instance:l,listener:a,currentTarget:d}}function uc(l,a){for(var d=a+"Capture",m=[];l!==null;){var x=l,w=x.stateNode;x.tag===5&&w!==null&&(x=w,w=$n(l,d),w!=null&&m.unshift(Vo(l,w,x)),w=$n(l,a),w!=null&&m.push(Vo(l,w,x))),l=l.return}return m}function vl(l){if(l===null)return null;do l=l.return;while(l&&l.tag!==5);return l||null}function um(l,a,d,m,x){for(var w=a._reactName,k=[];d!==null&&d!==m;){var E=d,L=E.alternate,ee=E.stateNode;if(L!==null&&L===m)break;E.tag===5&&ee!==null&&(E=ee,x?(L=$n(d,w),L!=null&&k.unshift(Vo(d,L,E))):x||(L=$n(d,w),L!=null&&k.push(Vo(d,L,E)))),d=d.return}k.length!==0&&l.push({event:a,listeners:k})}var Gy=/\r\n?/g,Ky=/\u0000|\uFFFD/g;function dm(l){return(typeof l=="string"?l:""+l).replace(Gy,`
38
- `).replace(Ky,"")}function dc(l,a,d){if(a=dm(a),dm(l)!==a&&d)throw Error(t(425))}function hc(){}var f1=null,p1=null;function m1(l,a){return l==="textarea"||l==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var g1=typeof setTimeout=="function"?setTimeout:void 0,Jy=typeof clearTimeout=="function"?clearTimeout:void 0,hm=typeof Promise=="function"?Promise:void 0,ev=typeof queueMicrotask=="function"?queueMicrotask:typeof hm<"u"?function(l){return hm.resolve(null).then(l).catch(tv)}:g1;function tv(l){setTimeout(function(){throw l})}function O1(l,a){var d=a,m=0;do{var x=d.nextSibling;if(l.removeChild(d),x&&x.nodeType===8)if(d=x.data,d==="/$"){if(m===0){l.removeChild(x),Bt(a);return}m--}else d!=="$"&&d!=="$?"&&d!=="$!"||m++;d=x}while(d);Bt(a)}function as(l){for(;l!=null;l=l.nextSibling){var a=l.nodeType;if(a===1||a===3)break;if(a===8){if(a=l.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return l}function fm(l){l=l.previousSibling;for(var a=0;l;){if(l.nodeType===8){var d=l.data;if(d==="$"||d==="$!"||d==="$?"){if(a===0)return l;a--}else d==="/$"&&a++}l=l.previousSibling}return null}var wl=Math.random().toString(36).slice(2),ui="__reactFiber$"+wl,Lo="__reactProps$"+wl,ji="__reactContainer$"+wl,x1="__reactEvents$"+wl,nv="__reactListeners$"+wl,rv="__reactHandles$"+wl;function _s(l){var a=l[ui];if(a)return a;for(var d=l.parentNode;d;){if(a=d[ji]||d[ui]){if(d=a.alternate,a.child!==null||d!==null&&d.child!==null)for(l=fm(l);l!==null;){if(d=l[ui])return d;l=fm(l)}return a}l=d,d=l.parentNode}return null}function No(l){return l=l[ui]||l[ji],!l||l.tag!==5&&l.tag!==6&&l.tag!==13&&l.tag!==3?null:l}function Sl(l){if(l.tag===5||l.tag===6)return l.stateNode;throw Error(t(33))}function fc(l){return l[Lo]||null}var y1=[],bl=-1;function cs(l){return{current:l}}function Ct(l){0>bl||(l.current=y1[bl],y1[bl]=null,bl--)}function kt(l,a){bl++,y1[bl]=l.current,l.current=a}var us={},An=cs(us),Un=cs(!1),Ds=us;function kl(l,a){var d=l.type.contextTypes;if(!d)return us;var m=l.stateNode;if(m&&m.__reactInternalMemoizedUnmaskedChildContext===a)return m.__reactInternalMemoizedMaskedChildContext;var x={},w;for(w in d)x[w]=a[w];return m&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=a,l.__reactInternalMemoizedMaskedChildContext=x),x}function Gn(l){return l=l.childContextTypes,l!=null}function pc(){Ct(Un),Ct(An)}function pm(l,a,d){if(An.current!==us)throw Error(t(168));kt(An,a),kt(Un,d)}function mm(l,a,d){var m=l.stateNode;if(a=a.childContextTypes,typeof m.getChildContext!="function")return d;m=m.getChildContext();for(var x in m)if(!(x in a))throw Error(t(108,ye(l)||"Unknown",x));return W({},d,m)}function mc(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||us,Ds=An.current,kt(An,l),kt(Un,Un.current),!0}function gm(l,a,d){var m=l.stateNode;if(!m)throw Error(t(169));d?(l=mm(l,a,Ds),m.__reactInternalMemoizedMergedChildContext=l,Ct(Un),Ct(An),kt(An,l)):Ct(Un),kt(Un,d)}var Ri=null,gc=!1,v1=!1;function Om(l){Ri===null?Ri=[l]:Ri.push(l)}function iv(l){gc=!0,Om(l)}function ds(){if(!v1&&Ri!==null){v1=!0;var l=0,a=ct;try{var d=Ri;for(ct=1;l<d.length;l++){var m=d[l];do m=m(!0);while(m!==null)}Ri=null,gc=!1}catch(x){throw Ri!==null&&(Ri=Ri.slice(l+1)),Pt(Oe,ds),x}finally{ct=a,v1=!1}}return null}var $l=[],Pl=0,Oc=null,xc=0,Pr=[],Qr=0,zs=null,Vi=1,Li="";function Is(l,a){$l[Pl++]=xc,$l[Pl++]=Oc,Oc=l,xc=a}function xm(l,a,d){Pr[Qr++]=Vi,Pr[Qr++]=Li,Pr[Qr++]=zs,zs=l;var m=Vi;l=Li;var x=32-Qt(m)-1;m&=~(1<<x),d+=1;var w=32-Qt(a)+x;if(30<w){var k=x-x%5;w=(m&(1<<k)-1).toString(32),m>>=k,x-=k,Vi=1<<32-Qt(a)+x|d<<x|m,Li=w+l}else Vi=1<<w|d<<x|m,Li=l}function w1(l){l.return!==null&&(Is(l,1),xm(l,1,0))}function S1(l){for(;l===Oc;)Oc=$l[--Pl],$l[Pl]=null,xc=$l[--Pl],$l[Pl]=null;for(;l===zs;)zs=Pr[--Qr],Pr[Qr]=null,Li=Pr[--Qr],Pr[Qr]=null,Vi=Pr[--Qr],Pr[Qr]=null}var gr=null,Or=null,Et=!1,Ir=null;function ym(l,a){var d=Tr(5,null,null,0);d.elementType="DELETED",d.stateNode=a,d.return=l,a=l.deletions,a===null?(l.deletions=[d],l.flags|=16):a.push(d)}function vm(l,a){switch(l.tag){case 5:var d=l.type;return a=a.nodeType!==1||d.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(l.stateNode=a,gr=l,Or=as(a.firstChild),!0):!1;case 6:return a=l.pendingProps===""||a.nodeType!==3?null:a,a!==null?(l.stateNode=a,gr=l,Or=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(d=zs!==null?{id:Vi,overflow:Li}:null,l.memoizedState={dehydrated:a,treeContext:d,retryLane:1073741824},d=Tr(18,null,null,0),d.stateNode=a,d.return=l,l.child=d,gr=l,Or=null,!0):!1;default:return!1}}function b1(l){return(l.mode&1)!==0&&(l.flags&128)===0}function k1(l){if(Et){var a=Or;if(a){var d=a;if(!vm(l,a)){if(b1(l))throw Error(t(418));a=as(d.nextSibling);var m=gr;a&&vm(l,a)?ym(m,d):(l.flags=l.flags&-4097|2,Et=!1,gr=l)}}else{if(b1(l))throw Error(t(418));l.flags=l.flags&-4097|2,Et=!1,gr=l}}}function wm(l){for(l=l.return;l!==null&&l.tag!==5&&l.tag!==3&&l.tag!==13;)l=l.return;gr=l}function yc(l){if(l!==gr)return!1;if(!Et)return wm(l),Et=!0,!1;var a;if((a=l.tag!==3)&&!(a=l.tag!==5)&&(a=l.type,a=a!=="head"&&a!=="body"&&!m1(l.type,l.memoizedProps)),a&&(a=Or)){if(b1(l))throw Sm(),Error(t(418));for(;a;)ym(l,a),a=as(a.nextSibling)}if(wm(l),l.tag===13){if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(t(317));e:{for(l=l.nextSibling,a=0;l;){if(l.nodeType===8){var d=l.data;if(d==="/$"){if(a===0){Or=as(l.nextSibling);break e}a--}else d!=="$"&&d!=="$!"&&d!=="$?"||a++}l=l.nextSibling}Or=null}}else Or=gr?as(l.stateNode.nextSibling):null;return!0}function Sm(){for(var l=Or;l;)l=as(l.nextSibling)}function Ql(){Or=gr=null,Et=!1}function $1(l){Ir===null?Ir=[l]:Ir.push(l)}var sv=C.ReactCurrentBatchConfig;function Xo(l,a,d){if(l=d.ref,l!==null&&typeof l!="function"&&typeof l!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(t(309));var m=d.stateNode}if(!m)throw Error(t(147,l));var x=m,w=""+l;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===w?a.ref:(a=function(k){var E=x.refs;k===null?delete E[w]:E[w]=k},a._stringRef=w,a)}if(typeof l!="string")throw Error(t(284));if(!d._owner)throw Error(t(290,l))}return l}function vc(l,a){throw l=Object.prototype.toString.call(a),Error(t(31,l==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":l))}function bm(l){var a=l._init;return a(l._payload)}function km(l){function a(q,F){if(l){var U=q.deletions;U===null?(q.deletions=[F],q.flags|=16):U.push(F)}}function d(q,F){if(!l)return null;for(;F!==null;)a(q,F),F=F.sibling;return null}function m(q,F){for(q=new Map;F!==null;)F.key!==null?q.set(F.key,F):q.set(F.index,F),F=F.sibling;return q}function x(q,F){return q=ys(q,F),q.index=0,q.sibling=null,q}function w(q,F,U){return q.index=U,l?(U=q.alternate,U!==null?(U=U.index,U<F?(q.flags|=2,F):U):(q.flags|=2,F)):(q.flags|=1048576,F)}function k(q){return l&&q.alternate===null&&(q.flags|=2),q}function E(q,F,U,ge){return F===null||F.tag!==6?(F=gd(U,q.mode,ge),F.return=q,F):(F=x(F,U),F.return=q,F)}function L(q,F,U,ge){var Ze=U.type;return Ze===j?he(q,F,U.props.children,ge,U.key):F!==null&&(F.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===G&&bm(Ze)===F.type)?(ge=x(F,U.props),ge.ref=Xo(q,F,U),ge.return=q,ge):(ge=Fc(U.type,U.key,U.props,null,q.mode,ge),ge.ref=Xo(q,F,U),ge.return=q,ge)}function ee(q,F,U,ge){return F===null||F.tag!==4||F.stateNode.containerInfo!==U.containerInfo||F.stateNode.implementation!==U.implementation?(F=Od(U,q.mode,ge),F.return=q,F):(F=x(F,U.children||[]),F.return=q,F)}function he(q,F,U,ge,Ze){return F===null||F.tag!==7?(F=Gs(U,q.mode,ge,Ze),F.return=q,F):(F=x(F,U),F.return=q,F)}function fe(q,F,U){if(typeof F=="string"&&F!==""||typeof F=="number")return F=gd(""+F,q.mode,U),F.return=q,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case Z:return U=Fc(F.type,F.key,F.props,null,q.mode,U),U.ref=Xo(q,null,F),U.return=q,U;case H:return F=Od(F,q.mode,U),F.return=q,F;case G:var ge=F._init;return fe(q,ge(F._payload),U)}if(gt(F)||D(F))return F=Gs(F,q.mode,U,null),F.return=q,F;vc(q,F)}return null}function de(q,F,U,ge){var Ze=F!==null?F.key:null;if(typeof U=="string"&&U!==""||typeof U=="number")return Ze!==null?null:E(q,F,""+U,ge);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case Z:return U.key===Ze?L(q,F,U,ge):null;case H:return U.key===Ze?ee(q,F,U,ge):null;case G:return Ze=U._init,de(q,F,Ze(U._payload),ge)}if(gt(U)||D(U))return Ze!==null?null:he(q,F,U,ge,null);vc(q,U)}return null}function $e(q,F,U,ge,Ze){if(typeof ge=="string"&&ge!==""||typeof ge=="number")return q=q.get(U)||null,E(F,q,""+ge,Ze);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case Z:return q=q.get(ge.key===null?U:ge.key)||null,L(F,q,ge,Ze);case H:return q=q.get(ge.key===null?U:ge.key)||null,ee(F,q,ge,Ze);case G:var Ne=ge._init;return $e(q,F,U,Ne(ge._payload),Ze)}if(gt(ge)||D(ge))return q=q.get(U)||null,he(F,q,ge,Ze,null);vc(F,ge)}return null}function Ce(q,F,U,ge){for(var Ze=null,Ne=null,Xe=F,De=F=0,cn=null;Xe!==null&&De<U.length;De++){Xe.index>De?(cn=Xe,Xe=null):cn=Xe.sibling;var ut=de(q,Xe,U[De],ge);if(ut===null){Xe===null&&(Xe=cn);break}l&&Xe&&ut.alternate===null&&a(q,Xe),F=w(ut,F,De),Ne===null?Ze=ut:Ne.sibling=ut,Ne=ut,Xe=cn}if(De===U.length)return d(q,Xe),Et&&Is(q,De),Ze;if(Xe===null){for(;De<U.length;De++)Xe=fe(q,U[De],ge),Xe!==null&&(F=w(Xe,F,De),Ne===null?Ze=Xe:Ne.sibling=Xe,Ne=Xe);return Et&&Is(q,De),Ze}for(Xe=m(q,Xe);De<U.length;De++)cn=$e(Xe,q,De,U[De],ge),cn!==null&&(l&&cn.alternate!==null&&Xe.delete(cn.key===null?De:cn.key),F=w(cn,F,De),Ne===null?Ze=cn:Ne.sibling=cn,Ne=cn);return l&&Xe.forEach(function(vs){return a(q,vs)}),Et&&Is(q,De),Ze}function Ee(q,F,U,ge){var Ze=D(U);if(typeof Ze!="function")throw Error(t(150));if(U=Ze.call(U),U==null)throw Error(t(151));for(var Ne=Ze=null,Xe=F,De=F=0,cn=null,ut=U.next();Xe!==null&&!ut.done;De++,ut=U.next()){Xe.index>De?(cn=Xe,Xe=null):cn=Xe.sibling;var vs=de(q,Xe,ut.value,ge);if(vs===null){Xe===null&&(Xe=cn);break}l&&Xe&&vs.alternate===null&&a(q,Xe),F=w(vs,F,De),Ne===null?Ze=vs:Ne.sibling=vs,Ne=vs,Xe=cn}if(ut.done)return d(q,Xe),Et&&Is(q,De),Ze;if(Xe===null){for(;!ut.done;De++,ut=U.next())ut=fe(q,ut.value,ge),ut!==null&&(F=w(ut,F,De),Ne===null?Ze=ut:Ne.sibling=ut,Ne=ut);return Et&&Is(q,De),Ze}for(Xe=m(q,Xe);!ut.done;De++,ut=U.next())ut=$e(Xe,q,De,ut.value,ge),ut!==null&&(l&&ut.alternate!==null&&Xe.delete(ut.key===null?De:ut.key),F=w(ut,F,De),Ne===null?Ze=ut:Ne.sibling=ut,Ne=ut);return l&&Xe.forEach(function(Nv){return a(q,Nv)}),Et&&Is(q,De),Ze}function zt(q,F,U,ge){if(typeof U=="object"&&U!==null&&U.type===j&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case Z:e:{for(var Ze=U.key,Ne=F;Ne!==null;){if(Ne.key===Ze){if(Ze=U.type,Ze===j){if(Ne.tag===7){d(q,Ne.sibling),F=x(Ne,U.props.children),F.return=q,q=F;break e}}else if(Ne.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===G&&bm(Ze)===Ne.type){d(q,Ne.sibling),F=x(Ne,U.props),F.ref=Xo(q,Ne,U),F.return=q,q=F;break e}d(q,Ne);break}else a(q,Ne);Ne=Ne.sibling}U.type===j?(F=Gs(U.props.children,q.mode,ge,U.key),F.return=q,q=F):(ge=Fc(U.type,U.key,U.props,null,q.mode,ge),ge.ref=Xo(q,F,U),ge.return=q,q=ge)}return k(q);case H:e:{for(Ne=U.key;F!==null;){if(F.key===Ne)if(F.tag===4&&F.stateNode.containerInfo===U.containerInfo&&F.stateNode.implementation===U.implementation){d(q,F.sibling),F=x(F,U.children||[]),F.return=q,q=F;break e}else{d(q,F);break}else a(q,F);F=F.sibling}F=Od(U,q.mode,ge),F.return=q,q=F}return k(q);case G:return Ne=U._init,zt(q,F,Ne(U._payload),ge)}if(gt(U))return Ce(q,F,U,ge);if(D(U))return Ee(q,F,U,ge);vc(q,U)}return typeof U=="string"&&U!==""||typeof U=="number"?(U=""+U,F!==null&&F.tag===6?(d(q,F.sibling),F=x(F,U),F.return=q,q=F):(d(q,F),F=gd(U,q.mode,ge),F.return=q,q=F),k(q)):d(q,F)}return zt}var Al=km(!0),$m=km(!1),wc=cs(null),Sc=null,Cl=null,P1=null;function Q1(){P1=Cl=Sc=null}function A1(l){var a=wc.current;Ct(wc),l._currentValue=a}function C1(l,a,d){for(;l!==null;){var m=l.alternate;if((l.childLanes&a)!==a?(l.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),l===d)break;l=l.return}}function Ml(l,a){Sc=l,P1=Cl=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&a)!==0&&(Kn=!0),l.firstContext=null)}function Ar(l){var a=l._currentValue;if(P1!==l)if(l={context:l,memoizedValue:a,next:null},Cl===null){if(Sc===null)throw Error(t(308));Cl=l,Sc.dependencies={lanes:0,firstContext:l}}else Cl=Cl.next=l;return a}var Fs=null;function M1(l){Fs===null?Fs=[l]:Fs.push(l)}function Pm(l,a,d,m){var x=a.interleaved;return x===null?(d.next=d,M1(a)):(d.next=x.next,x.next=d),a.interleaved=d,Ni(l,m)}function Ni(l,a){l.lanes|=a;var d=l.alternate;for(d!==null&&(d.lanes|=a),d=l,l=l.return;l!==null;)l.childLanes|=a,d=l.alternate,d!==null&&(d.childLanes|=a),d=l,l=l.return;return d.tag===3?d.stateNode:null}var hs=!1;function T1(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qm(l,a){l=l.updateQueue,a.updateQueue===l&&(a.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function Xi(l,a){return{eventTime:l,lane:a,tag:0,payload:null,callback:null,next:null}}function fs(l,a,d){var m=l.updateQueue;if(m===null)return null;if(m=m.shared,(lt&2)!==0){var x=m.pending;return x===null?a.next=a:(a.next=x.next,x.next=a),m.pending=a,Ni(l,d)}return x=m.interleaved,x===null?(a.next=a,M1(m)):(a.next=x.next,x.next=a),m.interleaved=a,Ni(l,d)}function bc(l,a,d){if(a=a.updateQueue,a!==null&&(a=a.shared,(d&4194240)!==0)){var m=a.lanes;m&=l.pendingLanes,d|=m,a.lanes=d,pl(l,d)}}function Am(l,a){var d=l.updateQueue,m=l.alternate;if(m!==null&&(m=m.updateQueue,d===m)){var x=null,w=null;if(d=d.firstBaseUpdate,d!==null){do{var k={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};w===null?x=w=k:w=w.next=k,d=d.next}while(d!==null);w===null?x=w=a:w=w.next=a}else x=w=a;d={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:m.shared,effects:m.effects},l.updateQueue=d;return}l=d.lastBaseUpdate,l===null?d.firstBaseUpdate=a:l.next=a,d.lastBaseUpdate=a}function kc(l,a,d,m){var x=l.updateQueue;hs=!1;var w=x.firstBaseUpdate,k=x.lastBaseUpdate,E=x.shared.pending;if(E!==null){x.shared.pending=null;var L=E,ee=L.next;L.next=null,k===null?w=ee:k.next=ee,k=L;var he=l.alternate;he!==null&&(he=he.updateQueue,E=he.lastBaseUpdate,E!==k&&(E===null?he.firstBaseUpdate=ee:E.next=ee,he.lastBaseUpdate=L))}if(w!==null){var fe=x.baseState;k=0,he=ee=L=null,E=w;do{var de=E.lane,$e=E.eventTime;if((m&de)===de){he!==null&&(he=he.next={eventTime:$e,lane:0,tag:E.tag,payload:E.payload,callback:E.callback,next:null});e:{var Ce=l,Ee=E;switch(de=a,$e=d,Ee.tag){case 1:if(Ce=Ee.payload,typeof Ce=="function"){fe=Ce.call($e,fe,de);break e}fe=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=Ee.payload,de=typeof Ce=="function"?Ce.call($e,fe,de):Ce,de==null)break e;fe=W({},fe,de);break e;case 2:hs=!0}}E.callback!==null&&E.lane!==0&&(l.flags|=64,de=x.effects,de===null?x.effects=[E]:de.push(E))}else $e={eventTime:$e,lane:de,tag:E.tag,payload:E.payload,callback:E.callback,next:null},he===null?(ee=he=$e,L=fe):he=he.next=$e,k|=de;if(E=E.next,E===null){if(E=x.shared.pending,E===null)break;de=E,E=de.next,de.next=null,x.lastBaseUpdate=de,x.shared.pending=null}}while(!0);if(he===null&&(L=fe),x.baseState=L,x.firstBaseUpdate=ee,x.lastBaseUpdate=he,a=x.shared.interleaved,a!==null){x=a;do k|=x.lane,x=x.next;while(x!==a)}else w===null&&(x.shared.lanes=0);Bs|=k,l.lanes=k,l.memoizedState=fe}}function Cm(l,a,d){if(l=a.effects,a.effects=null,l!==null)for(a=0;a<l.length;a++){var m=l[a],x=m.callback;if(x!==null){if(m.callback=null,m=d,typeof x!="function")throw Error(t(191,x));x.call(m)}}}var _o={},di=cs(_o),Do=cs(_o),zo=cs(_o);function Hs(l){if(l===_o)throw Error(t(174));return l}function E1(l,a){switch(kt(zo,a),kt(Do,l),kt(di,_o),l=a.nodeType,l){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:Tt(null,"");break;default:l=l===8?a.parentNode:a,a=l.namespaceURI||null,l=l.tagName,a=Tt(a,l)}Ct(di),kt(di,a)}function Tl(){Ct(di),Ct(Do),Ct(zo)}function Mm(l){Hs(zo.current);var a=Hs(di.current),d=Tt(a,l.type);a!==d&&(kt(Do,l),kt(di,d))}function Z1(l){Do.current===l&&(Ct(di),Ct(Do))}var Rt=cs(0);function $c(l){for(var a=l;a!==null;){if(a.tag===13){var d=a.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===l)break;for(;a.sibling===null;){if(a.return===null||a.return===l)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var j1=[];function R1(){for(var l=0;l<j1.length;l++)j1[l]._workInProgressVersionPrimary=null;j1.length=0}var Pc=C.ReactCurrentDispatcher,V1=C.ReactCurrentBatchConfig,Ws=0,Vt=null,Jt=null,on=null,Qc=!1,Io=!1,Fo=0,lv=0;function Cn(){throw Error(t(321))}function L1(l,a){if(a===null)return!1;for(var d=0;d<a.length&&d<l.length;d++)if(!zr(l[d],a[d]))return!1;return!0}function N1(l,a,d,m,x,w){if(Ws=w,Vt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Pc.current=l===null||l.memoizedState===null?uv:dv,l=d(m,x),Io){w=0;do{if(Io=!1,Fo=0,25<=w)throw Error(t(301));w+=1,on=Jt=null,a.updateQueue=null,Pc.current=hv,l=d(m,x)}while(Io)}if(Pc.current=Mc,a=Jt!==null&&Jt.next!==null,Ws=0,on=Jt=Vt=null,Qc=!1,a)throw Error(t(300));return l}function X1(){var l=Fo!==0;return Fo=0,l}function hi(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return on===null?Vt.memoizedState=on=l:on=on.next=l,on}function Cr(){if(Jt===null){var l=Vt.alternate;l=l!==null?l.memoizedState:null}else l=Jt.next;var a=on===null?Vt.memoizedState:on.next;if(a!==null)on=a,Jt=l;else{if(l===null)throw Error(t(310));Jt=l,l={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},on===null?Vt.memoizedState=on=l:on=on.next=l}return on}function Ho(l,a){return typeof a=="function"?a(l):a}function _1(l){var a=Cr(),d=a.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=l;var m=Jt,x=m.baseQueue,w=d.pending;if(w!==null){if(x!==null){var k=x.next;x.next=w.next,w.next=k}m.baseQueue=x=w,d.pending=null}if(x!==null){w=x.next,m=m.baseState;var E=k=null,L=null,ee=w;do{var he=ee.lane;if((Ws&he)===he)L!==null&&(L=L.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),m=ee.hasEagerState?ee.eagerState:l(m,ee.action);else{var fe={lane:he,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};L===null?(E=L=fe,k=m):L=L.next=fe,Vt.lanes|=he,Bs|=he}ee=ee.next}while(ee!==null&&ee!==w);L===null?k=m:L.next=E,zr(m,a.memoizedState)||(Kn=!0),a.memoizedState=m,a.baseState=k,a.baseQueue=L,d.lastRenderedState=m}if(l=d.interleaved,l!==null){x=l;do w=x.lane,Vt.lanes|=w,Bs|=w,x=x.next;while(x!==l)}else x===null&&(d.lanes=0);return[a.memoizedState,d.dispatch]}function D1(l){var a=Cr(),d=a.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=l;var m=d.dispatch,x=d.pending,w=a.memoizedState;if(x!==null){d.pending=null;var k=x=x.next;do w=l(w,k.action),k=k.next;while(k!==x);zr(w,a.memoizedState)||(Kn=!0),a.memoizedState=w,a.baseQueue===null&&(a.baseState=w),d.lastRenderedState=w}return[w,m]}function Tm(){}function Em(l,a){var d=Vt,m=Cr(),x=a(),w=!zr(m.memoizedState,x);if(w&&(m.memoizedState=x,Kn=!0),m=m.queue,z1(Rm.bind(null,d,m,l),[l]),m.getSnapshot!==a||w||on!==null&&on.memoizedState.tag&1){if(d.flags|=2048,Wo(9,jm.bind(null,d,m,x,a),void 0,null),an===null)throw Error(t(349));(Ws&30)!==0||Zm(d,a,x)}return x}function Zm(l,a,d){l.flags|=16384,l={getSnapshot:a,value:d},a=Vt.updateQueue,a===null?(a={lastEffect:null,stores:null},Vt.updateQueue=a,a.stores=[l]):(d=a.stores,d===null?a.stores=[l]:d.push(l))}function jm(l,a,d,m){a.value=d,a.getSnapshot=m,Vm(a)&&Lm(l)}function Rm(l,a,d){return d(function(){Vm(a)&&Lm(l)})}function Vm(l){var a=l.getSnapshot;l=l.value;try{var d=a();return!zr(l,d)}catch{return!0}}function Lm(l){var a=Ni(l,1);a!==null&&Br(a,l,1,-1)}function Nm(l){var a=hi();return typeof l=="function"&&(l=l()),a.memoizedState=a.baseState=l,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:l},a.queue=l,l=l.dispatch=cv.bind(null,Vt,l),[a.memoizedState,l]}function Wo(l,a,d,m){return l={tag:l,create:a,destroy:d,deps:m,next:null},a=Vt.updateQueue,a===null?(a={lastEffect:null,stores:null},Vt.updateQueue=a,a.lastEffect=l.next=l):(d=a.lastEffect,d===null?a.lastEffect=l.next=l:(m=d.next,d.next=l,l.next=m,a.lastEffect=l)),l}function Xm(){return Cr().memoizedState}function Ac(l,a,d,m){var x=hi();Vt.flags|=l,x.memoizedState=Wo(1|a,d,void 0,m===void 0?null:m)}function Cc(l,a,d,m){var x=Cr();m=m===void 0?null:m;var w=void 0;if(Jt!==null){var k=Jt.memoizedState;if(w=k.destroy,m!==null&&L1(m,k.deps)){x.memoizedState=Wo(a,d,w,m);return}}Vt.flags|=l,x.memoizedState=Wo(1|a,d,w,m)}function _m(l,a){return Ac(8390656,8,l,a)}function z1(l,a){return Cc(2048,8,l,a)}function Dm(l,a){return Cc(4,2,l,a)}function zm(l,a){return Cc(4,4,l,a)}function Im(l,a){if(typeof a=="function")return l=l(),a(l),function(){a(null)};if(a!=null)return l=l(),a.current=l,function(){a.current=null}}function Fm(l,a,d){return d=d!=null?d.concat([l]):null,Cc(4,4,Im.bind(null,a,l),d)}function I1(){}function Hm(l,a){var d=Cr();a=a===void 0?null:a;var m=d.memoizedState;return m!==null&&a!==null&&L1(a,m[1])?m[0]:(d.memoizedState=[l,a],l)}function Wm(l,a){var d=Cr();a=a===void 0?null:a;var m=d.memoizedState;return m!==null&&a!==null&&L1(a,m[1])?m[0]:(l=l(),d.memoizedState=[l,a],l)}function Bm(l,a,d){return(Ws&21)===0?(l.baseState&&(l.baseState=!1,Kn=!0),l.memoizedState=d):(zr(d,a)||(d=Ls(),Vt.lanes|=d,Bs|=d,l.baseState=!0),a)}function ov(l,a){var d=ct;ct=d!==0&&4>d?d:4,l(!0);var m=V1.transition;V1.transition={};try{l(!1),a()}finally{ct=d,V1.transition=m}}function Ym(){return Cr().memoizedState}function av(l,a,d){var m=Os(l);if(d={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null},qm(l))Um(a,d);else if(d=Pm(l,a,d,m),d!==null){var x=Dn();Br(d,l,m,x),Gm(d,a,m)}}function cv(l,a,d){var m=Os(l),x={lane:m,action:d,hasEagerState:!1,eagerState:null,next:null};if(qm(l))Um(a,x);else{var w=l.alternate;if(l.lanes===0&&(w===null||w.lanes===0)&&(w=a.lastRenderedReducer,w!==null))try{var k=a.lastRenderedState,E=w(k,d);if(x.hasEagerState=!0,x.eagerState=E,zr(E,k)){var L=a.interleaved;L===null?(x.next=x,M1(a)):(x.next=L.next,L.next=x),a.interleaved=x;return}}catch{}finally{}d=Pm(l,a,x,m),d!==null&&(x=Dn(),Br(d,l,m,x),Gm(d,a,m))}}function qm(l){var a=l.alternate;return l===Vt||a!==null&&a===Vt}function Um(l,a){Io=Qc=!0;var d=l.pending;d===null?a.next=a:(a.next=d.next,d.next=a),l.pending=a}function Gm(l,a,d){if((d&4194240)!==0){var m=a.lanes;m&=l.pendingLanes,d|=m,a.lanes=d,pl(l,d)}}var Mc={readContext:Ar,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useInsertionEffect:Cn,useLayoutEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useDeferredValue:Cn,useTransition:Cn,useMutableSource:Cn,useSyncExternalStore:Cn,useId:Cn,unstable_isNewReconciler:!1},uv={readContext:Ar,useCallback:function(l,a){return hi().memoizedState=[l,a===void 0?null:a],l},useContext:Ar,useEffect:_m,useImperativeHandle:function(l,a,d){return d=d!=null?d.concat([l]):null,Ac(4194308,4,Im.bind(null,a,l),d)},useLayoutEffect:function(l,a){return Ac(4194308,4,l,a)},useInsertionEffect:function(l,a){return Ac(4,2,l,a)},useMemo:function(l,a){var d=hi();return a=a===void 0?null:a,l=l(),d.memoizedState=[l,a],l},useReducer:function(l,a,d){var m=hi();return a=d!==void 0?d(a):a,m.memoizedState=m.baseState=a,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:a},m.queue=l,l=l.dispatch=av.bind(null,Vt,l),[m.memoizedState,l]},useRef:function(l){var a=hi();return l={current:l},a.memoizedState=l},useState:Nm,useDebugValue:I1,useDeferredValue:function(l){return hi().memoizedState=l},useTransition:function(){var l=Nm(!1),a=l[0];return l=ov.bind(null,l[1]),hi().memoizedState=l,[a,l]},useMutableSource:function(){},useSyncExternalStore:function(l,a,d){var m=Vt,x=hi();if(Et){if(d===void 0)throw Error(t(407));d=d()}else{if(d=a(),an===null)throw Error(t(349));(Ws&30)!==0||Zm(m,a,d)}x.memoizedState=d;var w={value:d,getSnapshot:a};return x.queue=w,_m(Rm.bind(null,m,w,l),[l]),m.flags|=2048,Wo(9,jm.bind(null,m,w,d,a),void 0,null),d},useId:function(){var l=hi(),a=an.identifierPrefix;if(Et){var d=Li,m=Vi;d=(m&~(1<<32-Qt(m)-1)).toString(32)+d,a=":"+a+"R"+d,d=Fo++,0<d&&(a+="H"+d.toString(32)),a+=":"}else d=lv++,a=":"+a+"r"+d.toString(32)+":";return l.memoizedState=a},unstable_isNewReconciler:!1},dv={readContext:Ar,useCallback:Hm,useContext:Ar,useEffect:z1,useImperativeHandle:Fm,useInsertionEffect:Dm,useLayoutEffect:zm,useMemo:Wm,useReducer:_1,useRef:Xm,useState:function(){return _1(Ho)},useDebugValue:I1,useDeferredValue:function(l){var a=Cr();return Bm(a,Jt.memoizedState,l)},useTransition:function(){var l=_1(Ho)[0],a=Cr().memoizedState;return[l,a]},useMutableSource:Tm,useSyncExternalStore:Em,useId:Ym,unstable_isNewReconciler:!1},hv={readContext:Ar,useCallback:Hm,useContext:Ar,useEffect:z1,useImperativeHandle:Fm,useInsertionEffect:Dm,useLayoutEffect:zm,useMemo:Wm,useReducer:D1,useRef:Xm,useState:function(){return D1(Ho)},useDebugValue:I1,useDeferredValue:function(l){var a=Cr();return Jt===null?a.memoizedState=l:Bm(a,Jt.memoizedState,l)},useTransition:function(){var l=D1(Ho)[0],a=Cr().memoizedState;return[l,a]},useMutableSource:Tm,useSyncExternalStore:Em,useId:Ym,unstable_isNewReconciler:!1};function Fr(l,a){if(l&&l.defaultProps){a=W({},a),l=l.defaultProps;for(var d in l)a[d]===void 0&&(a[d]=l[d]);return a}return a}function F1(l,a,d,m){a=l.memoizedState,d=d(m,a),d=d==null?a:W({},a,d),l.memoizedState=d,l.lanes===0&&(l.updateQueue.baseState=d)}var Tc={isMounted:function(l){return(l=l._reactInternals)?_r(l)===l:!1},enqueueSetState:function(l,a,d){l=l._reactInternals;var m=Dn(),x=Os(l),w=Xi(m,x);w.payload=a,d!=null&&(w.callback=d),a=fs(l,w,x),a!==null&&(Br(a,l,x,m),bc(a,l,x))},enqueueReplaceState:function(l,a,d){l=l._reactInternals;var m=Dn(),x=Os(l),w=Xi(m,x);w.tag=1,w.payload=a,d!=null&&(w.callback=d),a=fs(l,w,x),a!==null&&(Br(a,l,x,m),bc(a,l,x))},enqueueForceUpdate:function(l,a){l=l._reactInternals;var d=Dn(),m=Os(l),x=Xi(d,m);x.tag=2,a!=null&&(x.callback=a),a=fs(l,x,m),a!==null&&(Br(a,l,m,d),bc(a,l,m))}};function Km(l,a,d,m,x,w,k){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(m,w,k):a.prototype&&a.prototype.isPureReactComponent?!Eo(d,m)||!Eo(x,w):!0}function Jm(l,a,d){var m=!1,x=us,w=a.contextType;return typeof w=="object"&&w!==null?w=Ar(w):(x=Gn(a)?Ds:An.current,m=a.contextTypes,w=(m=m!=null)?kl(l,x):us),a=new a(d,w),l.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Tc,l.stateNode=a,a._reactInternals=l,m&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=x,l.__reactInternalMemoizedMaskedChildContext=w),a}function e2(l,a,d,m){l=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(d,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(d,m),a.state!==l&&Tc.enqueueReplaceState(a,a.state,null)}function H1(l,a,d,m){var x=l.stateNode;x.props=d,x.state=l.memoizedState,x.refs={},T1(l);var w=a.contextType;typeof w=="object"&&w!==null?x.context=Ar(w):(w=Gn(a)?Ds:An.current,x.context=kl(l,w)),x.state=l.memoizedState,w=a.getDerivedStateFromProps,typeof w=="function"&&(F1(l,a,w,d),x.state=l.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(a=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),a!==x.state&&Tc.enqueueReplaceState(x,x.state,null),kc(l,d,x,m),x.state=l.memoizedState),typeof x.componentDidMount=="function"&&(l.flags|=4194308)}function El(l,a){try{var d="",m=a;do d+=ie(m),m=m.return;while(m);var x=d}catch(w){x=`
39
- Error generating stack: `+w.message+`
40
- `+w.stack}return{value:l,source:a,stack:x,digest:null}}function W1(l,a,d){return{value:l,source:null,stack:d??null,digest:a??null}}function B1(l,a){try{console.error(a.value)}catch(d){setTimeout(function(){throw d})}}var fv=typeof WeakMap=="function"?WeakMap:Map;function t2(l,a,d){d=Xi(-1,d),d.tag=3,d.payload={element:null};var m=a.value;return d.callback=function(){Nc||(Nc=!0,ad=m),B1(l,a)},d}function n2(l,a,d){d=Xi(-1,d),d.tag=3;var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var x=a.value;d.payload=function(){return m(x)},d.callback=function(){B1(l,a)}}var w=l.stateNode;return w!==null&&typeof w.componentDidCatch=="function"&&(d.callback=function(){B1(l,a),typeof m!="function"&&(ms===null?ms=new Set([this]):ms.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})}),d}function r2(l,a,d){var m=l.pingCache;if(m===null){m=l.pingCache=new fv;var x=new Set;m.set(a,x)}else x=m.get(a),x===void 0&&(x=new Set,m.set(a,x));x.has(d)||(x.add(d),l=Qv.bind(null,l,a,d),a.then(l,l))}function i2(l){do{var a;if((a=l.tag===13)&&(a=l.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return l;l=l.return}while(l!==null);return null}function s2(l,a,d,m,x){return(l.mode&1)===0?(l===a?l.flags|=65536:(l.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(a=Xi(-1,1),a.tag=2,fs(d,a,1))),d.lanes|=1),l):(l.flags|=65536,l.lanes=x,l)}var pv=C.ReactCurrentOwner,Kn=!1;function _n(l,a,d,m){a.child=l===null?$m(a,null,d,m):Al(a,l.child,d,m)}function l2(l,a,d,m,x){d=d.render;var w=a.ref;return Ml(a,x),m=N1(l,a,d,m,w,x),d=X1(),l!==null&&!Kn?(a.updateQueue=l.updateQueue,a.flags&=-2053,l.lanes&=~x,_i(l,a,x)):(Et&&d&&w1(a),a.flags|=1,_n(l,a,m,x),a.child)}function o2(l,a,d,m,x){if(l===null){var w=d.type;return typeof w=="function"&&!md(w)&&w.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(a.tag=15,a.type=w,a2(l,a,w,m,x)):(l=Fc(d.type,null,m,a,a.mode,x),l.ref=a.ref,l.return=a,a.child=l)}if(w=l.child,(l.lanes&x)===0){var k=w.memoizedProps;if(d=d.compare,d=d!==null?d:Eo,d(k,m)&&l.ref===a.ref)return _i(l,a,x)}return a.flags|=1,l=ys(w,m),l.ref=a.ref,l.return=a,a.child=l}function a2(l,a,d,m,x){if(l!==null){var w=l.memoizedProps;if(Eo(w,m)&&l.ref===a.ref)if(Kn=!1,a.pendingProps=m=w,(l.lanes&x)!==0)(l.flags&131072)!==0&&(Kn=!0);else return a.lanes=l.lanes,_i(l,a,x)}return Y1(l,a,d,m,x)}function c2(l,a,d){var m=a.pendingProps,x=m.children,w=l!==null?l.memoizedState:null;if(m.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},kt(jl,xr),xr|=d;else{if((d&1073741824)===0)return l=w!==null?w.baseLanes|d:d,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:l,cachePool:null,transitions:null},a.updateQueue=null,kt(jl,xr),xr|=l,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},m=w!==null?w.baseLanes:d,kt(jl,xr),xr|=m}else w!==null?(m=w.baseLanes|d,a.memoizedState=null):m=d,kt(jl,xr),xr|=m;return _n(l,a,x,d),a.child}function u2(l,a){var d=a.ref;(l===null&&d!==null||l!==null&&l.ref!==d)&&(a.flags|=512,a.flags|=2097152)}function Y1(l,a,d,m,x){var w=Gn(d)?Ds:An.current;return w=kl(a,w),Ml(a,x),d=N1(l,a,d,m,w,x),m=X1(),l!==null&&!Kn?(a.updateQueue=l.updateQueue,a.flags&=-2053,l.lanes&=~x,_i(l,a,x)):(Et&&m&&w1(a),a.flags|=1,_n(l,a,d,x),a.child)}function d2(l,a,d,m,x){if(Gn(d)){var w=!0;mc(a)}else w=!1;if(Ml(a,x),a.stateNode===null)Zc(l,a),Jm(a,d,m),H1(a,d,m,x),m=!0;else if(l===null){var k=a.stateNode,E=a.memoizedProps;k.props=E;var L=k.context,ee=d.contextType;typeof ee=="object"&&ee!==null?ee=Ar(ee):(ee=Gn(d)?Ds:An.current,ee=kl(a,ee));var he=d.getDerivedStateFromProps,fe=typeof he=="function"||typeof k.getSnapshotBeforeUpdate=="function";fe||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(E!==m||L!==ee)&&e2(a,k,m,ee),hs=!1;var de=a.memoizedState;k.state=de,kc(a,m,k,x),L=a.memoizedState,E!==m||de!==L||Un.current||hs?(typeof he=="function"&&(F1(a,d,he,m),L=a.memoizedState),(E=hs||Km(a,d,E,m,de,L,ee))?(fe||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=L),k.props=m,k.state=L,k.context=ee,m=E):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{k=a.stateNode,Qm(l,a),E=a.memoizedProps,ee=a.type===a.elementType?E:Fr(a.type,E),k.props=ee,fe=a.pendingProps,de=k.context,L=d.contextType,typeof L=="object"&&L!==null?L=Ar(L):(L=Gn(d)?Ds:An.current,L=kl(a,L));var $e=d.getDerivedStateFromProps;(he=typeof $e=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(E!==fe||de!==L)&&e2(a,k,m,L),hs=!1,de=a.memoizedState,k.state=de,kc(a,m,k,x);var Ce=a.memoizedState;E!==fe||de!==Ce||Un.current||hs?(typeof $e=="function"&&(F1(a,d,$e,m),Ce=a.memoizedState),(ee=hs||Km(a,d,ee,m,de,Ce,L)||!1)?(he||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(m,Ce,L),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(m,Ce,L)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||E===l.memoizedProps&&de===l.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||E===l.memoizedProps&&de===l.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=Ce),k.props=m,k.state=Ce,k.context=L,m=ee):(typeof k.componentDidUpdate!="function"||E===l.memoizedProps&&de===l.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||E===l.memoizedProps&&de===l.memoizedState||(a.flags|=1024),m=!1)}return q1(l,a,d,m,w,x)}function q1(l,a,d,m,x,w){u2(l,a);var k=(a.flags&128)!==0;if(!m&&!k)return x&&gm(a,d,!1),_i(l,a,w);m=a.stateNode,pv.current=a;var E=k&&typeof d.getDerivedStateFromError!="function"?null:m.render();return a.flags|=1,l!==null&&k?(a.child=Al(a,l.child,null,w),a.child=Al(a,null,E,w)):_n(l,a,E,w),a.memoizedState=m.state,x&&gm(a,d,!0),a.child}function h2(l){var a=l.stateNode;a.pendingContext?pm(l,a.pendingContext,a.pendingContext!==a.context):a.context&&pm(l,a.context,!1),E1(l,a.containerInfo)}function f2(l,a,d,m,x){return Ql(),$1(x),a.flags|=256,_n(l,a,d,m),a.child}var U1={dehydrated:null,treeContext:null,retryLane:0};function G1(l){return{baseLanes:l,cachePool:null,transitions:null}}function p2(l,a,d){var m=a.pendingProps,x=Rt.current,w=!1,k=(a.flags&128)!==0,E;if((E=k)||(E=l!==null&&l.memoizedState===null?!1:(x&2)!==0),E?(w=!0,a.flags&=-129):(l===null||l.memoizedState!==null)&&(x|=1),kt(Rt,x&1),l===null)return k1(a),l=a.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?((a.mode&1)===0?a.lanes=1:l.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(k=m.children,l=m.fallback,w?(m=a.mode,w=a.child,k={mode:"hidden",children:k},(m&1)===0&&w!==null?(w.childLanes=0,w.pendingProps=k):w=Hc(k,m,0,null),l=Gs(l,m,d,null),w.return=a,l.return=a,w.sibling=l,a.child=w,a.child.memoizedState=G1(d),a.memoizedState=U1,l):K1(a,k));if(x=l.memoizedState,x!==null&&(E=x.dehydrated,E!==null))return mv(l,a,k,m,E,x,d);if(w){w=m.fallback,k=a.mode,x=l.child,E=x.sibling;var L={mode:"hidden",children:m.children};return(k&1)===0&&a.child!==x?(m=a.child,m.childLanes=0,m.pendingProps=L,a.deletions=null):(m=ys(x,L),m.subtreeFlags=x.subtreeFlags&14680064),E!==null?w=ys(E,w):(w=Gs(w,k,d,null),w.flags|=2),w.return=a,m.return=a,m.sibling=w,a.child=m,m=w,w=a.child,k=l.child.memoizedState,k=k===null?G1(d):{baseLanes:k.baseLanes|d,cachePool:null,transitions:k.transitions},w.memoizedState=k,w.childLanes=l.childLanes&~d,a.memoizedState=U1,m}return w=l.child,l=w.sibling,m=ys(w,{mode:"visible",children:m.children}),(a.mode&1)===0&&(m.lanes=d),m.return=a,m.sibling=null,l!==null&&(d=a.deletions,d===null?(a.deletions=[l],a.flags|=16):d.push(l)),a.child=m,a.memoizedState=null,m}function K1(l,a){return a=Hc({mode:"visible",children:a},l.mode,0,null),a.return=l,l.child=a}function Ec(l,a,d,m){return m!==null&&$1(m),Al(a,l.child,null,d),l=K1(a,a.pendingProps.children),l.flags|=2,a.memoizedState=null,l}function mv(l,a,d,m,x,w,k){if(d)return a.flags&256?(a.flags&=-257,m=W1(Error(t(422))),Ec(l,a,k,m)):a.memoizedState!==null?(a.child=l.child,a.flags|=128,null):(w=m.fallback,x=a.mode,m=Hc({mode:"visible",children:m.children},x,0,null),w=Gs(w,x,k,null),w.flags|=2,m.return=a,w.return=a,m.sibling=w,a.child=m,(a.mode&1)!==0&&Al(a,l.child,null,k),a.child.memoizedState=G1(k),a.memoizedState=U1,w);if((a.mode&1)===0)return Ec(l,a,k,null);if(x.data==="$!"){if(m=x.nextSibling&&x.nextSibling.dataset,m)var E=m.dgst;return m=E,w=Error(t(419)),m=W1(w,m,void 0),Ec(l,a,k,m)}if(E=(k&l.childLanes)!==0,Kn||E){if(m=an,m!==null){switch(k&-k){case 4:x=2;break;case 16:x=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:x=32;break;case 536870912:x=268435456;break;default:x=0}x=(x&(m.suspendedLanes|k))!==0?0:x,x!==0&&x!==w.retryLane&&(w.retryLane=x,Ni(l,x),Br(m,l,x,-1))}return pd(),m=W1(Error(t(421))),Ec(l,a,k,m)}return x.data==="$?"?(a.flags|=128,a.child=l.child,a=Av.bind(null,l),x._reactRetry=a,null):(l=w.treeContext,Or=as(x.nextSibling),gr=a,Et=!0,Ir=null,l!==null&&(Pr[Qr++]=Vi,Pr[Qr++]=Li,Pr[Qr++]=zs,Vi=l.id,Li=l.overflow,zs=a),a=K1(a,m.children),a.flags|=4096,a)}function m2(l,a,d){l.lanes|=a;var m=l.alternate;m!==null&&(m.lanes|=a),C1(l.return,a,d)}function J1(l,a,d,m,x){var w=l.memoizedState;w===null?l.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:d,tailMode:x}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=d,w.tailMode=x)}function g2(l,a,d){var m=a.pendingProps,x=m.revealOrder,w=m.tail;if(_n(l,a,m.children,d),m=Rt.current,(m&2)!==0)m=m&1|2,a.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=a.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&m2(l,d,a);else if(l.tag===19)m2(l,d,a);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break e;for(;l.sibling===null;){if(l.return===null||l.return===a)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}m&=1}if(kt(Rt,m),(a.mode&1)===0)a.memoizedState=null;else switch(x){case"forwards":for(d=a.child,x=null;d!==null;)l=d.alternate,l!==null&&$c(l)===null&&(x=d),d=d.sibling;d=x,d===null?(x=a.child,a.child=null):(x=d.sibling,d.sibling=null),J1(a,!1,x,d,w);break;case"backwards":for(d=null,x=a.child,a.child=null;x!==null;){if(l=x.alternate,l!==null&&$c(l)===null){a.child=x;break}l=x.sibling,x.sibling=d,d=x,x=l}J1(a,!0,d,null,w);break;case"together":J1(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Zc(l,a){(a.mode&1)===0&&l!==null&&(l.alternate=null,a.alternate=null,a.flags|=2)}function _i(l,a,d){if(l!==null&&(a.dependencies=l.dependencies),Bs|=a.lanes,(d&a.childLanes)===0)return null;if(l!==null&&a.child!==l.child)throw Error(t(153));if(a.child!==null){for(l=a.child,d=ys(l,l.pendingProps),a.child=d,d.return=a;l.sibling!==null;)l=l.sibling,d=d.sibling=ys(l,l.pendingProps),d.return=a;d.sibling=null}return a.child}function gv(l,a,d){switch(a.tag){case 3:h2(a),Ql();break;case 5:Mm(a);break;case 1:Gn(a.type)&&mc(a);break;case 4:E1(a,a.stateNode.containerInfo);break;case 10:var m=a.type._context,x=a.memoizedProps.value;kt(wc,m._currentValue),m._currentValue=x;break;case 13:if(m=a.memoizedState,m!==null)return m.dehydrated!==null?(kt(Rt,Rt.current&1),a.flags|=128,null):(d&a.child.childLanes)!==0?p2(l,a,d):(kt(Rt,Rt.current&1),l=_i(l,a,d),l!==null?l.sibling:null);kt(Rt,Rt.current&1);break;case 19:if(m=(d&a.childLanes)!==0,(l.flags&128)!==0){if(m)return g2(l,a,d);a.flags|=128}if(x=a.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),kt(Rt,Rt.current),m)break;return null;case 22:case 23:return a.lanes=0,c2(l,a,d)}return _i(l,a,d)}var O2,ed,x2,y2;O2=function(l,a){for(var d=a.child;d!==null;){if(d.tag===5||d.tag===6)l.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===a)break;for(;d.sibling===null;){if(d.return===null||d.return===a)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},ed=function(){},x2=function(l,a,d,m){var x=l.memoizedProps;if(x!==m){l=a.stateNode,Hs(di.current);var w=null;switch(d){case"input":x=He(l,x),m=He(l,m),w=[];break;case"select":x=W({},x,{value:void 0}),m=W({},m,{value:void 0}),w=[];break;case"textarea":x=Vn(l,x),m=Vn(l,m),w=[];break;default:typeof x.onClick!="function"&&typeof m.onClick=="function"&&(l.onclick=hc)}dr(d,m);var k;d=null;for(ee in x)if(!m.hasOwnProperty(ee)&&x.hasOwnProperty(ee)&&x[ee]!=null)if(ee==="style"){var E=x[ee];for(k in E)E.hasOwnProperty(k)&&(d||(d={}),d[k]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(i.hasOwnProperty(ee)?w||(w=[]):(w=w||[]).push(ee,null));for(ee in m){var L=m[ee];if(E=x!=null?x[ee]:void 0,m.hasOwnProperty(ee)&&L!==E&&(L!=null||E!=null))if(ee==="style")if(E){for(k in E)!E.hasOwnProperty(k)||L&&L.hasOwnProperty(k)||(d||(d={}),d[k]="");for(k in L)L.hasOwnProperty(k)&&E[k]!==L[k]&&(d||(d={}),d[k]=L[k])}else d||(w||(w=[]),w.push(ee,d)),d=L;else ee==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,E=E?E.__html:void 0,L!=null&&E!==L&&(w=w||[]).push(ee,L)):ee==="children"?typeof L!="string"&&typeof L!="number"||(w=w||[]).push(ee,""+L):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(i.hasOwnProperty(ee)?(L!=null&&ee==="onScroll"&&At("scroll",l),w||E===L||(w=[])):(w=w||[]).push(ee,L))}d&&(w=w||[]).push("style",d);var ee=w;(a.updateQueue=ee)&&(a.flags|=4)}},y2=function(l,a,d,m){d!==m&&(a.flags|=4)};function Bo(l,a){if(!Et)switch(l.tailMode){case"hidden":a=l.tail;for(var d=null;a!==null;)a.alternate!==null&&(d=a),a=a.sibling;d===null?l.tail=null:d.sibling=null;break;case"collapsed":d=l.tail;for(var m=null;d!==null;)d.alternate!==null&&(m=d),d=d.sibling;m===null?a||l.tail===null?l.tail=null:l.tail.sibling=null:m.sibling=null}}function Mn(l){var a=l.alternate!==null&&l.alternate.child===l.child,d=0,m=0;if(a)for(var x=l.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags&14680064,m|=x.flags&14680064,x.return=l,x=x.sibling;else for(x=l.child;x!==null;)d|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=l,x=x.sibling;return l.subtreeFlags|=m,l.childLanes=d,a}function Ov(l,a,d){var m=a.pendingProps;switch(S1(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Mn(a),null;case 1:return Gn(a.type)&&pc(),Mn(a),null;case 3:return m=a.stateNode,Tl(),Ct(Un),Ct(An),R1(),m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null),(l===null||l.child===null)&&(yc(a)?a.flags|=4:l===null||l.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ir!==null&&(dd(Ir),Ir=null))),ed(l,a),Mn(a),null;case 5:Z1(a);var x=Hs(zo.current);if(d=a.type,l!==null&&a.stateNode!=null)x2(l,a,d,m,x),l.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!m){if(a.stateNode===null)throw Error(t(166));return Mn(a),null}if(l=Hs(di.current),yc(a)){m=a.stateNode,d=a.type;var w=a.memoizedProps;switch(m[ui]=a,m[Lo]=w,l=(a.mode&1)!==0,d){case"dialog":At("cancel",m),At("close",m);break;case"iframe":case"object":case"embed":At("load",m);break;case"video":case"audio":for(x=0;x<jo.length;x++)At(jo[x],m);break;case"source":At("error",m);break;case"img":case"image":case"link":At("error",m),At("load",m);break;case"details":At("toggle",m);break;case"input":We(m,w),At("invalid",m);break;case"select":m._wrapperState={wasMultiple:!!w.multiple},At("invalid",m);break;case"textarea":ti(m,w),At("invalid",m)}dr(d,w),x=null;for(var k in w)if(w.hasOwnProperty(k)){var E=w[k];k==="children"?typeof E=="string"?m.textContent!==E&&(w.suppressHydrationWarning!==!0&&dc(m.textContent,E,l),x=["children",E]):typeof E=="number"&&m.textContent!==""+E&&(w.suppressHydrationWarning!==!0&&dc(m.textContent,E,l),x=["children",""+E]):i.hasOwnProperty(k)&&E!=null&&k==="onScroll"&&At("scroll",m)}switch(d){case"input":rn(m),et(m,w,!0);break;case"textarea":rn(m),fn(m);break;case"select":case"option":break;default:typeof w.onClick=="function"&&(m.onclick=hc)}m=x,a.updateQueue=m,m!==null&&(a.flags|=4)}else{k=x.nodeType===9?x:x.ownerDocument,l==="http://www.w3.org/1999/xhtml"&&(l=ni(d)),l==="http://www.w3.org/1999/xhtml"?d==="script"?(l=k.createElement("div"),l.innerHTML="<script><\/script>",l=l.removeChild(l.firstChild)):typeof m.is=="string"?l=k.createElement(d,{is:m.is}):(l=k.createElement(d),d==="select"&&(k=l,m.multiple?k.multiple=!0:m.size&&(k.size=m.size))):l=k.createElementNS(l,d),l[ui]=a,l[Lo]=m,O2(l,a,!1,!1),a.stateNode=l;e:{switch(k=Xr(d,m),d){case"dialog":At("cancel",l),At("close",l),x=m;break;case"iframe":case"object":case"embed":At("load",l),x=m;break;case"video":case"audio":for(x=0;x<jo.length;x++)At(jo[x],l);x=m;break;case"source":At("error",l),x=m;break;case"img":case"image":case"link":At("error",l),At("load",l),x=m;break;case"details":At("toggle",l),x=m;break;case"input":We(l,m),x=He(l,m),At("invalid",l);break;case"option":x=m;break;case"select":l._wrapperState={wasMultiple:!!m.multiple},x=W({},m,{value:void 0}),At("invalid",l);break;case"textarea":ti(l,m),x=Vn(l,m),At("invalid",l);break;default:x=m}dr(d,x),E=x;for(w in E)if(E.hasOwnProperty(w)){var L=E[w];w==="style"?vt(l,L):w==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&Hn(l,L)):w==="children"?typeof L=="string"?(d!=="textarea"||L!=="")&&Nn(l,L):typeof L=="number"&&Nn(l,""+L):w!=="suppressContentEditableWarning"&&w!=="suppressHydrationWarning"&&w!=="autoFocus"&&(i.hasOwnProperty(w)?L!=null&&w==="onScroll"&&At("scroll",l):L!=null&&M(l,w,L,k))}switch(d){case"input":rn(l),et(l,m,!1);break;case"textarea":rn(l),fn(l);break;case"option":m.value!=null&&l.setAttribute("value",""+Le(m.value));break;case"select":l.multiple=!!m.multiple,w=m.value,w!=null?Mt(l,!!m.multiple,w,!1):m.defaultValue!=null&&Mt(l,!!m.multiple,m.defaultValue,!0);break;default:typeof x.onClick=="function"&&(l.onclick=hc)}switch(d){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}}m&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Mn(a),null;case 6:if(l&&a.stateNode!=null)y2(l,a,l.memoizedProps,m);else{if(typeof m!="string"&&a.stateNode===null)throw Error(t(166));if(d=Hs(zo.current),Hs(di.current),yc(a)){if(m=a.stateNode,d=a.memoizedProps,m[ui]=a,(w=m.nodeValue!==d)&&(l=gr,l!==null))switch(l.tag){case 3:dc(m.nodeValue,d,(l.mode&1)!==0);break;case 5:l.memoizedProps.suppressHydrationWarning!==!0&&dc(m.nodeValue,d,(l.mode&1)!==0)}w&&(a.flags|=4)}else m=(d.nodeType===9?d:d.ownerDocument).createTextNode(m),m[ui]=a,a.stateNode=m}return Mn(a),null;case 13:if(Ct(Rt),m=a.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(Et&&Or!==null&&(a.mode&1)!==0&&(a.flags&128)===0)Sm(),Ql(),a.flags|=98560,w=!1;else if(w=yc(a),m!==null&&m.dehydrated!==null){if(l===null){if(!w)throw Error(t(318));if(w=a.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(t(317));w[ui]=a}else Ql(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Mn(a),w=!1}else Ir!==null&&(dd(Ir),Ir=null),w=!0;if(!w)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=d,a):(m=m!==null,m!==(l!==null&&l.memoizedState!==null)&&m&&(a.child.flags|=8192,(a.mode&1)!==0&&(l===null||(Rt.current&1)!==0?en===0&&(en=3):pd())),a.updateQueue!==null&&(a.flags|=4),Mn(a),null);case 4:return Tl(),ed(l,a),l===null&&Ro(a.stateNode.containerInfo),Mn(a),null;case 10:return A1(a.type._context),Mn(a),null;case 17:return Gn(a.type)&&pc(),Mn(a),null;case 19:if(Ct(Rt),w=a.memoizedState,w===null)return Mn(a),null;if(m=(a.flags&128)!==0,k=w.rendering,k===null)if(m)Bo(w,!1);else{if(en!==0||l!==null&&(l.flags&128)!==0)for(l=a.child;l!==null;){if(k=$c(l),k!==null){for(a.flags|=128,Bo(w,!1),m=k.updateQueue,m!==null&&(a.updateQueue=m,a.flags|=4),a.subtreeFlags=0,m=d,d=a.child;d!==null;)w=d,l=m,w.flags&=14680066,k=w.alternate,k===null?(w.childLanes=0,w.lanes=l,w.child=null,w.subtreeFlags=0,w.memoizedProps=null,w.memoizedState=null,w.updateQueue=null,w.dependencies=null,w.stateNode=null):(w.childLanes=k.childLanes,w.lanes=k.lanes,w.child=k.child,w.subtreeFlags=0,w.deletions=null,w.memoizedProps=k.memoizedProps,w.memoizedState=k.memoizedState,w.updateQueue=k.updateQueue,w.type=k.type,l=k.dependencies,w.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),d=d.sibling;return kt(Rt,Rt.current&1|2),a.child}l=l.sibling}w.tail!==null&&_()>Rl&&(a.flags|=128,m=!0,Bo(w,!1),a.lanes=4194304)}else{if(!m)if(l=$c(k),l!==null){if(a.flags|=128,m=!0,d=l.updateQueue,d!==null&&(a.updateQueue=d,a.flags|=4),Bo(w,!0),w.tail===null&&w.tailMode==="hidden"&&!k.alternate&&!Et)return Mn(a),null}else 2*_()-w.renderingStartTime>Rl&&d!==1073741824&&(a.flags|=128,m=!0,Bo(w,!1),a.lanes=4194304);w.isBackwards?(k.sibling=a.child,a.child=k):(d=w.last,d!==null?d.sibling=k:a.child=k,w.last=k)}return w.tail!==null?(a=w.tail,w.rendering=a,w.tail=a.sibling,w.renderingStartTime=_(),a.sibling=null,d=Rt.current,kt(Rt,m?d&1|2:d&1),a):(Mn(a),null);case 22:case 23:return fd(),m=a.memoizedState!==null,l!==null&&l.memoizedState!==null!==m&&(a.flags|=8192),m&&(a.mode&1)!==0?(xr&1073741824)!==0&&(Mn(a),a.subtreeFlags&6&&(a.flags|=8192)):Mn(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function xv(l,a){switch(S1(a),a.tag){case 1:return Gn(a.type)&&pc(),l=a.flags,l&65536?(a.flags=l&-65537|128,a):null;case 3:return Tl(),Ct(Un),Ct(An),R1(),l=a.flags,(l&65536)!==0&&(l&128)===0?(a.flags=l&-65537|128,a):null;case 5:return Z1(a),null;case 13:if(Ct(Rt),l=a.memoizedState,l!==null&&l.dehydrated!==null){if(a.alternate===null)throw Error(t(340));Ql()}return l=a.flags,l&65536?(a.flags=l&-65537|128,a):null;case 19:return Ct(Rt),null;case 4:return Tl(),null;case 10:return A1(a.type._context),null;case 22:case 23:return fd(),null;case 24:return null;default:return null}}var jc=!1,Tn=!1,yv=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Zl(l,a){var d=l.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(m){_t(l,a,m)}else d.current=null}function td(l,a,d){try{d()}catch(m){_t(l,a,m)}}var v2=!1;function vv(l,a){if(f1=Xs,l=Kp(),s1(l)){if("selectionStart"in l)var d={start:l.selectionStart,end:l.selectionEnd};else e:{d=(d=l.ownerDocument)&&d.defaultView||window;var m=d.getSelection&&d.getSelection();if(m&&m.rangeCount!==0){d=m.anchorNode;var x=m.anchorOffset,w=m.focusNode;m=m.focusOffset;try{d.nodeType,w.nodeType}catch{d=null;break e}var k=0,E=-1,L=-1,ee=0,he=0,fe=l,de=null;t:for(;;){for(var $e;fe!==d||x!==0&&fe.nodeType!==3||(E=k+x),fe!==w||m!==0&&fe.nodeType!==3||(L=k+m),fe.nodeType===3&&(k+=fe.nodeValue.length),($e=fe.firstChild)!==null;)de=fe,fe=$e;for(;;){if(fe===l)break t;if(de===d&&++ee===x&&(E=k),de===w&&++he===m&&(L=k),($e=fe.nextSibling)!==null)break;fe=de,de=fe.parentNode}fe=$e}d=E===-1||L===-1?null:{start:E,end:L}}else d=null}d=d||{start:0,end:0}}else d=null;for(p1={focusedElem:l,selectionRange:d},Xs=!1,Pe=a;Pe!==null;)if(a=Pe,l=a.child,(a.subtreeFlags&1028)!==0&&l!==null)l.return=a,Pe=l;else for(;Pe!==null;){a=Pe;try{var Ce=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var Ee=Ce.memoizedProps,zt=Ce.memoizedState,q=a.stateNode,F=q.getSnapshotBeforeUpdate(a.elementType===a.type?Ee:Fr(a.type,Ee),zt);q.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var U=a.stateNode.containerInfo;U.nodeType===1?U.textContent="":U.nodeType===9&&U.documentElement&&U.removeChild(U.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(ge){_t(a,a.return,ge)}if(l=a.sibling,l!==null){l.return=a.return,Pe=l;break}Pe=a.return}return Ce=v2,v2=!1,Ce}function Yo(l,a,d){var m=a.updateQueue;if(m=m!==null?m.lastEffect:null,m!==null){var x=m=m.next;do{if((x.tag&l)===l){var w=x.destroy;x.destroy=void 0,w!==void 0&&td(a,d,w)}x=x.next}while(x!==m)}}function Rc(l,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var d=a=a.next;do{if((d.tag&l)===l){var m=d.create;d.destroy=m()}d=d.next}while(d!==a)}}function nd(l){var a=l.ref;if(a!==null){var d=l.stateNode;switch(l.tag){case 5:l=d;break;default:l=d}typeof a=="function"?a(l):a.current=l}}function w2(l){var a=l.alternate;a!==null&&(l.alternate=null,w2(a)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(a=l.stateNode,a!==null&&(delete a[ui],delete a[Lo],delete a[x1],delete a[nv],delete a[rv])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function S2(l){return l.tag===5||l.tag===3||l.tag===4}function b2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||S2(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function rd(l,a,d){var m=l.tag;if(m===5||m===6)l=l.stateNode,a?d.nodeType===8?d.parentNode.insertBefore(l,a):d.insertBefore(l,a):(d.nodeType===8?(a=d.parentNode,a.insertBefore(l,d)):(a=d,a.appendChild(l)),d=d._reactRootContainer,d!=null||a.onclick!==null||(a.onclick=hc));else if(m!==4&&(l=l.child,l!==null))for(rd(l,a,d),l=l.sibling;l!==null;)rd(l,a,d),l=l.sibling}function id(l,a,d){var m=l.tag;if(m===5||m===6)l=l.stateNode,a?d.insertBefore(l,a):d.appendChild(l);else if(m!==4&&(l=l.child,l!==null))for(id(l,a,d),l=l.sibling;l!==null;)id(l,a,d),l=l.sibling}var yn=null,Hr=!1;function ps(l,a,d){for(d=d.child;d!==null;)k2(l,a,d),d=d.sibling}function k2(l,a,d){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Nt,d)}catch{}switch(d.tag){case 5:Tn||Zl(d,a);case 6:var m=yn,x=Hr;yn=null,ps(l,a,d),yn=m,Hr=x,yn!==null&&(Hr?(l=yn,d=d.stateNode,l.nodeType===8?l.parentNode.removeChild(d):l.removeChild(d)):yn.removeChild(d.stateNode));break;case 18:yn!==null&&(Hr?(l=yn,d=d.stateNode,l.nodeType===8?O1(l.parentNode,d):l.nodeType===1&&O1(l,d),Bt(l)):O1(yn,d.stateNode));break;case 4:m=yn,x=Hr,yn=d.stateNode.containerInfo,Hr=!0,ps(l,a,d),yn=m,Hr=x;break;case 0:case 11:case 14:case 15:if(!Tn&&(m=d.updateQueue,m!==null&&(m=m.lastEffect,m!==null))){x=m=m.next;do{var w=x,k=w.destroy;w=w.tag,k!==void 0&&((w&2)!==0||(w&4)!==0)&&td(d,a,k),x=x.next}while(x!==m)}ps(l,a,d);break;case 1:if(!Tn&&(Zl(d,a),m=d.stateNode,typeof m.componentWillUnmount=="function"))try{m.props=d.memoizedProps,m.state=d.memoizedState,m.componentWillUnmount()}catch(E){_t(d,a,E)}ps(l,a,d);break;case 21:ps(l,a,d);break;case 22:d.mode&1?(Tn=(m=Tn)||d.memoizedState!==null,ps(l,a,d),Tn=m):ps(l,a,d);break;default:ps(l,a,d)}}function $2(l){var a=l.updateQueue;if(a!==null){l.updateQueue=null;var d=l.stateNode;d===null&&(d=l.stateNode=new yv),a.forEach(function(m){var x=Cv.bind(null,l,m);d.has(m)||(d.add(m),m.then(x,x))})}}function Wr(l,a){var d=a.deletions;if(d!==null)for(var m=0;m<d.length;m++){var x=d[m];try{var w=l,k=a,E=k;e:for(;E!==null;){switch(E.tag){case 5:yn=E.stateNode,Hr=!1;break e;case 3:yn=E.stateNode.containerInfo,Hr=!0;break e;case 4:yn=E.stateNode.containerInfo,Hr=!0;break e}E=E.return}if(yn===null)throw Error(t(160));k2(w,k,x),yn=null,Hr=!1;var L=x.alternate;L!==null&&(L.return=null),x.return=null}catch(ee){_t(x,a,ee)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)P2(a,l),a=a.sibling}function P2(l,a){var d=l.alternate,m=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:if(Wr(a,l),fi(l),m&4){try{Yo(3,l,l.return),Rc(3,l)}catch(Ee){_t(l,l.return,Ee)}try{Yo(5,l,l.return)}catch(Ee){_t(l,l.return,Ee)}}break;case 1:Wr(a,l),fi(l),m&512&&d!==null&&Zl(d,d.return);break;case 5:if(Wr(a,l),fi(l),m&512&&d!==null&&Zl(d,d.return),l.flags&32){var x=l.stateNode;try{Nn(x,"")}catch(Ee){_t(l,l.return,Ee)}}if(m&4&&(x=l.stateNode,x!=null)){var w=l.memoizedProps,k=d!==null?d.memoizedProps:w,E=l.type,L=l.updateQueue;if(l.updateQueue=null,L!==null)try{E==="input"&&w.type==="radio"&&w.name!=null&&st(x,w),Xr(E,k);var ee=Xr(E,w);for(k=0;k<L.length;k+=2){var he=L[k],fe=L[k+1];he==="style"?vt(x,fe):he==="dangerouslySetInnerHTML"?Hn(x,fe):he==="children"?Nn(x,fe):M(x,he,fe,ee)}switch(E){case"input":ze(x,w);break;case"textarea":tt(x,w);break;case"select":var de=x._wrapperState.wasMultiple;x._wrapperState.wasMultiple=!!w.multiple;var $e=w.value;$e!=null?Mt(x,!!w.multiple,$e,!1):de!==!!w.multiple&&(w.defaultValue!=null?Mt(x,!!w.multiple,w.defaultValue,!0):Mt(x,!!w.multiple,w.multiple?[]:"",!1))}x[Lo]=w}catch(Ee){_t(l,l.return,Ee)}}break;case 6:if(Wr(a,l),fi(l),m&4){if(l.stateNode===null)throw Error(t(162));x=l.stateNode,w=l.memoizedProps;try{x.nodeValue=w}catch(Ee){_t(l,l.return,Ee)}}break;case 3:if(Wr(a,l),fi(l),m&4&&d!==null&&d.memoizedState.isDehydrated)try{Bt(a.containerInfo)}catch(Ee){_t(l,l.return,Ee)}break;case 4:Wr(a,l),fi(l);break;case 13:Wr(a,l),fi(l),x=l.child,x.flags&8192&&(w=x.memoizedState!==null,x.stateNode.isHidden=w,!w||x.alternate!==null&&x.alternate.memoizedState!==null||(od=_())),m&4&&$2(l);break;case 22:if(he=d!==null&&d.memoizedState!==null,l.mode&1?(Tn=(ee=Tn)||he,Wr(a,l),Tn=ee):Wr(a,l),fi(l),m&8192){if(ee=l.memoizedState!==null,(l.stateNode.isHidden=ee)&&!he&&(l.mode&1)!==0)for(Pe=l,he=l.child;he!==null;){for(fe=Pe=he;Pe!==null;){switch(de=Pe,$e=de.child,de.tag){case 0:case 11:case 14:case 15:Yo(4,de,de.return);break;case 1:Zl(de,de.return);var Ce=de.stateNode;if(typeof Ce.componentWillUnmount=="function"){m=de,d=de.return;try{a=m,Ce.props=a.memoizedProps,Ce.state=a.memoizedState,Ce.componentWillUnmount()}catch(Ee){_t(m,d,Ee)}}break;case 5:Zl(de,de.return);break;case 22:if(de.memoizedState!==null){C2(fe);continue}}$e!==null?($e.return=de,Pe=$e):C2(fe)}he=he.sibling}e:for(he=null,fe=l;;){if(fe.tag===5){if(he===null){he=fe;try{x=fe.stateNode,ee?(w=x.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none"):(E=fe.stateNode,L=fe.memoizedProps.style,k=L!=null&&L.hasOwnProperty("display")?L.display:null,E.style.display=ri("display",k))}catch(Ee){_t(l,l.return,Ee)}}}else if(fe.tag===6){if(he===null)try{fe.stateNode.nodeValue=ee?"":fe.memoizedProps}catch(Ee){_t(l,l.return,Ee)}}else if((fe.tag!==22&&fe.tag!==23||fe.memoizedState===null||fe===l)&&fe.child!==null){fe.child.return=fe,fe=fe.child;continue}if(fe===l)break e;for(;fe.sibling===null;){if(fe.return===null||fe.return===l)break e;he===fe&&(he=null),fe=fe.return}he===fe&&(he=null),fe.sibling.return=fe.return,fe=fe.sibling}}break;case 19:Wr(a,l),fi(l),m&4&&$2(l);break;case 21:break;default:Wr(a,l),fi(l)}}function fi(l){var a=l.flags;if(a&2){try{e:{for(var d=l.return;d!==null;){if(S2(d)){var m=d;break e}d=d.return}throw Error(t(160))}switch(m.tag){case 5:var x=m.stateNode;m.flags&32&&(Nn(x,""),m.flags&=-33);var w=b2(l);id(l,w,x);break;case 3:case 4:var k=m.stateNode.containerInfo,E=b2(l);rd(l,E,k);break;default:throw Error(t(161))}}catch(L){_t(l,l.return,L)}l.flags&=-3}a&4096&&(l.flags&=-4097)}function wv(l,a,d){Pe=l,Q2(l)}function Q2(l,a,d){for(var m=(l.mode&1)!==0;Pe!==null;){var x=Pe,w=x.child;if(x.tag===22&&m){var k=x.memoizedState!==null||jc;if(!k){var E=x.alternate,L=E!==null&&E.memoizedState!==null||Tn;E=jc;var ee=Tn;if(jc=k,(Tn=L)&&!ee)for(Pe=x;Pe!==null;)k=Pe,L=k.child,k.tag===22&&k.memoizedState!==null?M2(x):L!==null?(L.return=k,Pe=L):M2(x);for(;w!==null;)Pe=w,Q2(w),w=w.sibling;Pe=x,jc=E,Tn=ee}A2(l)}else(x.subtreeFlags&8772)!==0&&w!==null?(w.return=x,Pe=w):A2(l)}}function A2(l){for(;Pe!==null;){var a=Pe;if((a.flags&8772)!==0){var d=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Tn||Rc(5,a);break;case 1:var m=a.stateNode;if(a.flags&4&&!Tn)if(d===null)m.componentDidMount();else{var x=a.elementType===a.type?d.memoizedProps:Fr(a.type,d.memoizedProps);m.componentDidUpdate(x,d.memoizedState,m.__reactInternalSnapshotBeforeUpdate)}var w=a.updateQueue;w!==null&&Cm(a,w,m);break;case 3:var k=a.updateQueue;if(k!==null){if(d=null,a.child!==null)switch(a.child.tag){case 5:d=a.child.stateNode;break;case 1:d=a.child.stateNode}Cm(a,k,d)}break;case 5:var E=a.stateNode;if(d===null&&a.flags&4){d=E;var L=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&d.focus();break;case"img":L.src&&(d.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var ee=a.alternate;if(ee!==null){var he=ee.memoizedState;if(he!==null){var fe=he.dehydrated;fe!==null&&Bt(fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Tn||a.flags&512&&nd(a)}catch(de){_t(a,a.return,de)}}if(a===l){Pe=null;break}if(d=a.sibling,d!==null){d.return=a.return,Pe=d;break}Pe=a.return}}function C2(l){for(;Pe!==null;){var a=Pe;if(a===l){Pe=null;break}var d=a.sibling;if(d!==null){d.return=a.return,Pe=d;break}Pe=a.return}}function M2(l){for(;Pe!==null;){var a=Pe;try{switch(a.tag){case 0:case 11:case 15:var d=a.return;try{Rc(4,a)}catch(L){_t(a,d,L)}break;case 1:var m=a.stateNode;if(typeof m.componentDidMount=="function"){var x=a.return;try{m.componentDidMount()}catch(L){_t(a,x,L)}}var w=a.return;try{nd(a)}catch(L){_t(a,w,L)}break;case 5:var k=a.return;try{nd(a)}catch(L){_t(a,k,L)}}}catch(L){_t(a,a.return,L)}if(a===l){Pe=null;break}var E=a.sibling;if(E!==null){E.return=a.return,Pe=E;break}Pe=a.return}}var Sv=Math.ceil,Vc=C.ReactCurrentDispatcher,sd=C.ReactCurrentOwner,Mr=C.ReactCurrentBatchConfig,lt=0,an=null,Yt=null,vn=0,xr=0,jl=cs(0),en=0,qo=null,Bs=0,Lc=0,ld=0,Uo=null,Jn=null,od=0,Rl=1/0,Di=null,Nc=!1,ad=null,ms=null,Xc=!1,gs=null,_c=0,Go=0,cd=null,Dc=-1,zc=0;function Dn(){return(lt&6)!==0?_():Dc!==-1?Dc:Dc=_()}function Os(l){return(l.mode&1)===0?1:(lt&2)!==0&&vn!==0?vn&-vn:sv.transition!==null?(zc===0&&(zc=Ls()),zc):(l=ct,l!==0||(l=window.event,l=l===void 0?16:Ep(l.type)),l)}function Br(l,a,d,m){if(50<Go)throw Go=0,cd=null,Error(t(185));Ns(l,d,m),((lt&2)===0||l!==an)&&(l===an&&((lt&2)===0&&(Lc|=d),en===4&&xs(l,vn)),er(l,m),d===1&&lt===0&&(a.mode&1)===0&&(Rl=_()+500,gc&&ds()))}function er(l,a){var d=l.callbackNode;Ei(l,a);var m=xt(l,l===an?vn:0);if(m===0)d!==null&&Xn(d),l.callbackNode=null,l.callbackPriority=0;else if(a=m&-m,l.callbackPriority!==a){if(d!=null&&Xn(d),a===1)l.tag===0?iv(E2.bind(null,l)):Om(E2.bind(null,l)),ev(function(){(lt&6)===0&&ds()}),d=null;else{switch(Po(m)){case 1:d=Oe;break;case 4:d=pe;break;case 16:d=je;break;case 536870912:d=ht;break;default:d=je}d=_2(d,T2.bind(null,l))}l.callbackPriority=a,l.callbackNode=d}}function T2(l,a){if(Dc=-1,zc=0,(lt&6)!==0)throw Error(t(327));var d=l.callbackNode;if(Vl()&&l.callbackNode!==d)return null;var m=xt(l,l===an?vn:0);if(m===0)return null;if((m&30)!==0||(m&l.expiredLanes)!==0||a)a=Ic(l,m);else{a=m;var x=lt;lt|=2;var w=j2();(an!==l||vn!==a)&&(Di=null,Rl=_()+500,qs(l,a));do try{$v();break}catch(E){Z2(l,E)}while(!0);Q1(),Vc.current=w,lt=x,Yt!==null?a=0:(an=null,vn=0,a=en)}if(a!==0){if(a===2&&(x=ai(l),x!==0&&(m=x,a=ud(l,x))),a===1)throw d=qo,qs(l,0),xs(l,m),er(l,_()),d;if(a===6)xs(l,m);else{if(x=l.current.alternate,(m&30)===0&&!bv(x)&&(a=Ic(l,m),a===2&&(w=ai(l),w!==0&&(m=w,a=ud(l,w))),a===1))throw d=qo,qs(l,0),xs(l,m),er(l,_()),d;switch(l.finishedWork=x,l.finishedLanes=m,a){case 0:case 1:throw Error(t(345));case 2:Us(l,Jn,Di);break;case 3:if(xs(l,m),(m&130023424)===m&&(a=od+500-_(),10<a)){if(xt(l,0)!==0)break;if(x=l.suspendedLanes,(x&m)!==m){Dn(),l.pingedLanes|=l.suspendedLanes&x;break}l.timeoutHandle=g1(Us.bind(null,l,Jn,Di),a);break}Us(l,Jn,Di);break;case 4:if(xs(l,m),(m&4194240)===m)break;for(a=l.eventTimes,x=-1;0<m;){var k=31-Qt(m);w=1<<k,k=a[k],k>x&&(x=k),m&=~w}if(m=x,m=_()-m,m=(120>m?120:480>m?480:1080>m?1080:1920>m?1920:3e3>m?3e3:4320>m?4320:1960*Sv(m/1960))-m,10<m){l.timeoutHandle=g1(Us.bind(null,l,Jn,Di),m);break}Us(l,Jn,Di);break;case 5:Us(l,Jn,Di);break;default:throw Error(t(329))}}}return er(l,_()),l.callbackNode===d?T2.bind(null,l):null}function ud(l,a){var d=Uo;return l.current.memoizedState.isDehydrated&&(qs(l,a).flags|=256),l=Ic(l,a),l!==2&&(a=Jn,Jn=d,a!==null&&dd(a)),l}function dd(l){Jn===null?Jn=l:Jn.push.apply(Jn,l)}function bv(l){for(var a=l;;){if(a.flags&16384){var d=a.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var m=0;m<d.length;m++){var x=d[m],w=x.getSnapshot;x=x.value;try{if(!zr(w(),x))return!1}catch{return!1}}}if(d=a.child,a.subtreeFlags&16384&&d!==null)d.return=a,a=d;else{if(a===l)break;for(;a.sibling===null;){if(a.return===null||a.return===l)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function xs(l,a){for(a&=~ld,a&=~Lc,l.suspendedLanes|=a,l.pingedLanes&=~a,l=l.expirationTimes;0<a;){var d=31-Qt(a),m=1<<d;l[d]=-1,a&=~m}}function E2(l){if((lt&6)!==0)throw Error(t(327));Vl();var a=xt(l,0);if((a&1)===0)return er(l,_()),null;var d=Ic(l,a);if(l.tag!==0&&d===2){var m=ai(l);m!==0&&(a=m,d=ud(l,m))}if(d===1)throw d=qo,qs(l,0),xs(l,a),er(l,_()),d;if(d===6)throw Error(t(345));return l.finishedWork=l.current.alternate,l.finishedLanes=a,Us(l,Jn,Di),er(l,_()),null}function hd(l,a){var d=lt;lt|=1;try{return l(a)}finally{lt=d,lt===0&&(Rl=_()+500,gc&&ds())}}function Ys(l){gs!==null&&gs.tag===0&&(lt&6)===0&&Vl();var a=lt;lt|=1;var d=Mr.transition,m=ct;try{if(Mr.transition=null,ct=1,l)return l()}finally{ct=m,Mr.transition=d,lt=a,(lt&6)===0&&ds()}}function fd(){xr=jl.current,Ct(jl)}function qs(l,a){l.finishedWork=null,l.finishedLanes=0;var d=l.timeoutHandle;if(d!==-1&&(l.timeoutHandle=-1,Jy(d)),Yt!==null)for(d=Yt.return;d!==null;){var m=d;switch(S1(m),m.tag){case 1:m=m.type.childContextTypes,m!=null&&pc();break;case 3:Tl(),Ct(Un),Ct(An),R1();break;case 5:Z1(m);break;case 4:Tl();break;case 13:Ct(Rt);break;case 19:Ct(Rt);break;case 10:A1(m.type._context);break;case 22:case 23:fd()}d=d.return}if(an=l,Yt=l=ys(l.current,null),vn=xr=a,en=0,qo=null,ld=Lc=Bs=0,Jn=Uo=null,Fs!==null){for(a=0;a<Fs.length;a++)if(d=Fs[a],m=d.interleaved,m!==null){d.interleaved=null;var x=m.next,w=d.pending;if(w!==null){var k=w.next;w.next=x,m.next=k}d.pending=m}Fs=null}return l}function Z2(l,a){do{var d=Yt;try{if(Q1(),Pc.current=Mc,Qc){for(var m=Vt.memoizedState;m!==null;){var x=m.queue;x!==null&&(x.pending=null),m=m.next}Qc=!1}if(Ws=0,on=Jt=Vt=null,Io=!1,Fo=0,sd.current=null,d===null||d.return===null){en=1,qo=a,Yt=null;break}e:{var w=l,k=d.return,E=d,L=a;if(a=vn,E.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var ee=L,he=E,fe=he.tag;if((he.mode&1)===0&&(fe===0||fe===11||fe===15)){var de=he.alternate;de?(he.updateQueue=de.updateQueue,he.memoizedState=de.memoizedState,he.lanes=de.lanes):(he.updateQueue=null,he.memoizedState=null)}var $e=i2(k);if($e!==null){$e.flags&=-257,s2($e,k,E,w,a),$e.mode&1&&r2(w,ee,a),a=$e,L=ee;var Ce=a.updateQueue;if(Ce===null){var Ee=new Set;Ee.add(L),a.updateQueue=Ee}else Ce.add(L);break e}else{if((a&1)===0){r2(w,ee,a),pd();break e}L=Error(t(426))}}else if(Et&&E.mode&1){var zt=i2(k);if(zt!==null){(zt.flags&65536)===0&&(zt.flags|=256),s2(zt,k,E,w,a),$1(El(L,E));break e}}w=L=El(L,E),en!==4&&(en=2),Uo===null?Uo=[w]:Uo.push(w),w=k;do{switch(w.tag){case 3:w.flags|=65536,a&=-a,w.lanes|=a;var q=t2(w,L,a);Am(w,q);break e;case 1:E=L;var F=w.type,U=w.stateNode;if((w.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||U!==null&&typeof U.componentDidCatch=="function"&&(ms===null||!ms.has(U)))){w.flags|=65536,a&=-a,w.lanes|=a;var ge=n2(w,E,a);Am(w,ge);break e}}w=w.return}while(w!==null)}V2(d)}catch(Ze){a=Ze,Yt===d&&d!==null&&(Yt=d=d.return);continue}break}while(!0)}function j2(){var l=Vc.current;return Vc.current=Mc,l===null?Mc:l}function pd(){(en===0||en===3||en===2)&&(en=4),an===null||(Bs&268435455)===0&&(Lc&268435455)===0||xs(an,vn)}function Ic(l,a){var d=lt;lt|=2;var m=j2();(an!==l||vn!==a)&&(Di=null,qs(l,a));do try{kv();break}catch(x){Z2(l,x)}while(!0);if(Q1(),lt=d,Vc.current=m,Yt!==null)throw Error(t(261));return an=null,vn=0,en}function kv(){for(;Yt!==null;)R2(Yt)}function $v(){for(;Yt!==null&&!Rs();)R2(Yt)}function R2(l){var a=X2(l.alternate,l,xr);l.memoizedProps=l.pendingProps,a===null?V2(l):Yt=a,sd.current=null}function V2(l){var a=l;do{var d=a.alternate;if(l=a.return,(a.flags&32768)===0){if(d=Ov(d,a,xr),d!==null){Yt=d;return}}else{if(d=xv(d,a),d!==null){d.flags&=32767,Yt=d;return}if(l!==null)l.flags|=32768,l.subtreeFlags=0,l.deletions=null;else{en=6,Yt=null;return}}if(a=a.sibling,a!==null){Yt=a;return}Yt=a=l}while(a!==null);en===0&&(en=5)}function Us(l,a,d){var m=ct,x=Mr.transition;try{Mr.transition=null,ct=1,Pv(l,a,d,m)}finally{Mr.transition=x,ct=m}return null}function Pv(l,a,d,m){do Vl();while(gs!==null);if((lt&6)!==0)throw Error(t(327));d=l.finishedWork;var x=l.finishedLanes;if(d===null)return null;if(l.finishedWork=null,l.finishedLanes=0,d===l.current)throw Error(t(177));l.callbackNode=null,l.callbackPriority=0;var w=d.lanes|d.childLanes;if(B0(l,w),l===an&&(Yt=an=null,vn=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||Xc||(Xc=!0,_2(je,function(){return Vl(),null})),w=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||w){w=Mr.transition,Mr.transition=null;var k=ct;ct=1;var E=lt;lt|=4,sd.current=null,vv(l,d),P2(d,l),Wy(p1),Xs=!!f1,p1=f1=null,l.current=d,wv(d),fl(),lt=E,ct=k,Mr.transition=w}else l.current=d;if(Xc&&(Xc=!1,gs=l,_c=x),w=l.pendingLanes,w===0&&(ms=null),Qn(d.stateNode),er(l,_()),a!==null)for(m=l.onRecoverableError,d=0;d<a.length;d++)x=a[d],m(x.value,{componentStack:x.stack,digest:x.digest});if(Nc)throw Nc=!1,l=ad,ad=null,l;return(_c&1)!==0&&l.tag!==0&&Vl(),w=l.pendingLanes,(w&1)!==0?l===cd?Go++:(Go=0,cd=l):Go=0,ds(),null}function Vl(){if(gs!==null){var l=Po(_c),a=Mr.transition,d=ct;try{if(Mr.transition=null,ct=16>l?16:l,gs===null)var m=!1;else{if(l=gs,gs=null,_c=0,(lt&6)!==0)throw Error(t(331));var x=lt;for(lt|=4,Pe=l.current;Pe!==null;){var w=Pe,k=w.child;if((Pe.flags&16)!==0){var E=w.deletions;if(E!==null){for(var L=0;L<E.length;L++){var ee=E[L];for(Pe=ee;Pe!==null;){var he=Pe;switch(he.tag){case 0:case 11:case 15:Yo(8,he,w)}var fe=he.child;if(fe!==null)fe.return=he,Pe=fe;else for(;Pe!==null;){he=Pe;var de=he.sibling,$e=he.return;if(w2(he),he===ee){Pe=null;break}if(de!==null){de.return=$e,Pe=de;break}Pe=$e}}}var Ce=w.alternate;if(Ce!==null){var Ee=Ce.child;if(Ee!==null){Ce.child=null;do{var zt=Ee.sibling;Ee.sibling=null,Ee=zt}while(Ee!==null)}}Pe=w}}if((w.subtreeFlags&2064)!==0&&k!==null)k.return=w,Pe=k;else e:for(;Pe!==null;){if(w=Pe,(w.flags&2048)!==0)switch(w.tag){case 0:case 11:case 15:Yo(9,w,w.return)}var q=w.sibling;if(q!==null){q.return=w.return,Pe=q;break e}Pe=w.return}}var F=l.current;for(Pe=F;Pe!==null;){k=Pe;var U=k.child;if((k.subtreeFlags&2064)!==0&&U!==null)U.return=k,Pe=U;else e:for(k=F;Pe!==null;){if(E=Pe,(E.flags&2048)!==0)try{switch(E.tag){case 0:case 11:case 15:Rc(9,E)}}catch(Ze){_t(E,E.return,Ze)}if(E===k){Pe=null;break e}var ge=E.sibling;if(ge!==null){ge.return=E.return,Pe=ge;break e}Pe=E.return}}if(lt=x,ds(),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Nt,l)}catch{}m=!0}return m}finally{ct=d,Mr.transition=a}}return!1}function L2(l,a,d){a=El(d,a),a=t2(l,a,1),l=fs(l,a,1),a=Dn(),l!==null&&(Ns(l,1,a),er(l,a))}function _t(l,a,d){if(l.tag===3)L2(l,l,d);else for(;a!==null;){if(a.tag===3){L2(a,l,d);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(ms===null||!ms.has(m))){l=El(d,l),l=n2(a,l,1),a=fs(a,l,1),l=Dn(),a!==null&&(Ns(a,1,l),er(a,l));break}}a=a.return}}function Qv(l,a,d){var m=l.pingCache;m!==null&&m.delete(a),a=Dn(),l.pingedLanes|=l.suspendedLanes&d,an===l&&(vn&d)===d&&(en===4||en===3&&(vn&130023424)===vn&&500>_()-od?qs(l,0):ld|=d),er(l,a)}function N2(l,a){a===0&&((l.mode&1)===0?a=1:(a=Vs,Vs<<=1,(Vs&130023424)===0&&(Vs=4194304)));var d=Dn();l=Ni(l,a),l!==null&&(Ns(l,a,d),er(l,d))}function Av(l){var a=l.memoizedState,d=0;a!==null&&(d=a.retryLane),N2(l,d)}function Cv(l,a){var d=0;switch(l.tag){case 13:var m=l.stateNode,x=l.memoizedState;x!==null&&(d=x.retryLane);break;case 19:m=l.stateNode;break;default:throw Error(t(314))}m!==null&&m.delete(a),N2(l,d)}var X2;X2=function(l,a,d){if(l!==null)if(l.memoizedProps!==a.pendingProps||Un.current)Kn=!0;else{if((l.lanes&d)===0&&(a.flags&128)===0)return Kn=!1,gv(l,a,d);Kn=(l.flags&131072)!==0}else Kn=!1,Et&&(a.flags&1048576)!==0&&xm(a,xc,a.index);switch(a.lanes=0,a.tag){case 2:var m=a.type;Zc(l,a),l=a.pendingProps;var x=kl(a,An.current);Ml(a,d),x=N1(null,a,m,l,x,d);var w=X1();return a.flags|=1,typeof x=="object"&&x!==null&&typeof x.render=="function"&&x.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Gn(m)?(w=!0,mc(a)):w=!1,a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,T1(a),x.updater=Tc,a.stateNode=x,x._reactInternals=a,H1(a,m,l,d),a=q1(null,a,m,!0,w,d)):(a.tag=0,Et&&w&&w1(a),_n(null,a,x,d),a=a.child),a;case 16:m=a.elementType;e:{switch(Zc(l,a),l=a.pendingProps,x=m._init,m=x(m._payload),a.type=m,x=a.tag=Tv(m),l=Fr(m,l),x){case 0:a=Y1(null,a,m,l,d);break e;case 1:a=d2(null,a,m,l,d);break e;case 11:a=l2(null,a,m,l,d);break e;case 14:a=o2(null,a,m,Fr(m.type,l),d);break e}throw Error(t(306,m,""))}return a;case 0:return m=a.type,x=a.pendingProps,x=a.elementType===m?x:Fr(m,x),Y1(l,a,m,x,d);case 1:return m=a.type,x=a.pendingProps,x=a.elementType===m?x:Fr(m,x),d2(l,a,m,x,d);case 3:e:{if(h2(a),l===null)throw Error(t(387));m=a.pendingProps,w=a.memoizedState,x=w.element,Qm(l,a),kc(a,m,null,d);var k=a.memoizedState;if(m=k.element,w.isDehydrated)if(w={element:m,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},a.updateQueue.baseState=w,a.memoizedState=w,a.flags&256){x=El(Error(t(423)),a),a=f2(l,a,m,d,x);break e}else if(m!==x){x=El(Error(t(424)),a),a=f2(l,a,m,d,x);break e}else for(Or=as(a.stateNode.containerInfo.firstChild),gr=a,Et=!0,Ir=null,d=$m(a,null,m,d),a.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(Ql(),m===x){a=_i(l,a,d);break e}_n(l,a,m,d)}a=a.child}return a;case 5:return Mm(a),l===null&&k1(a),m=a.type,x=a.pendingProps,w=l!==null?l.memoizedProps:null,k=x.children,m1(m,x)?k=null:w!==null&&m1(m,w)&&(a.flags|=32),u2(l,a),_n(l,a,k,d),a.child;case 6:return l===null&&k1(a),null;case 13:return p2(l,a,d);case 4:return E1(a,a.stateNode.containerInfo),m=a.pendingProps,l===null?a.child=Al(a,null,m,d):_n(l,a,m,d),a.child;case 11:return m=a.type,x=a.pendingProps,x=a.elementType===m?x:Fr(m,x),l2(l,a,m,x,d);case 7:return _n(l,a,a.pendingProps,d),a.child;case 8:return _n(l,a,a.pendingProps.children,d),a.child;case 12:return _n(l,a,a.pendingProps.children,d),a.child;case 10:e:{if(m=a.type._context,x=a.pendingProps,w=a.memoizedProps,k=x.value,kt(wc,m._currentValue),m._currentValue=k,w!==null)if(zr(w.value,k)){if(w.children===x.children&&!Un.current){a=_i(l,a,d);break e}}else for(w=a.child,w!==null&&(w.return=a);w!==null;){var E=w.dependencies;if(E!==null){k=w.child;for(var L=E.firstContext;L!==null;){if(L.context===m){if(w.tag===1){L=Xi(-1,d&-d),L.tag=2;var ee=w.updateQueue;if(ee!==null){ee=ee.shared;var he=ee.pending;he===null?L.next=L:(L.next=he.next,he.next=L),ee.pending=L}}w.lanes|=d,L=w.alternate,L!==null&&(L.lanes|=d),C1(w.return,d,a),E.lanes|=d;break}L=L.next}}else if(w.tag===10)k=w.type===a.type?null:w.child;else if(w.tag===18){if(k=w.return,k===null)throw Error(t(341));k.lanes|=d,E=k.alternate,E!==null&&(E.lanes|=d),C1(k,d,a),k=w.sibling}else k=w.child;if(k!==null)k.return=w;else for(k=w;k!==null;){if(k===a){k=null;break}if(w=k.sibling,w!==null){w.return=k.return,k=w;break}k=k.return}w=k}_n(l,a,x.children,d),a=a.child}return a;case 9:return x=a.type,m=a.pendingProps.children,Ml(a,d),x=Ar(x),m=m(x),a.flags|=1,_n(l,a,m,d),a.child;case 14:return m=a.type,x=Fr(m,a.pendingProps),x=Fr(m.type,x),o2(l,a,m,x,d);case 15:return a2(l,a,a.type,a.pendingProps,d);case 17:return m=a.type,x=a.pendingProps,x=a.elementType===m?x:Fr(m,x),Zc(l,a),a.tag=1,Gn(m)?(l=!0,mc(a)):l=!1,Ml(a,d),Jm(a,m,x),H1(a,m,x,d),q1(null,a,m,!0,l,d);case 19:return g2(l,a,d);case 22:return c2(l,a,d)}throw Error(t(156,a.tag))};function _2(l,a){return Pt(l,a)}function Mv(l,a,d,m){this.tag=l,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tr(l,a,d,m){return new Mv(l,a,d,m)}function md(l){return l=l.prototype,!(!l||!l.isReactComponent)}function Tv(l){if(typeof l=="function")return md(l)?1:0;if(l!=null){if(l=l.$$typeof,l===T)return 11;if(l===Y)return 14}return 2}function ys(l,a){var d=l.alternate;return d===null?(d=Tr(l.tag,a,l.key,l.mode),d.elementType=l.elementType,d.type=l.type,d.stateNode=l.stateNode,d.alternate=l,l.alternate=d):(d.pendingProps=a,d.type=l.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=l.flags&14680064,d.childLanes=l.childLanes,d.lanes=l.lanes,d.child=l.child,d.memoizedProps=l.memoizedProps,d.memoizedState=l.memoizedState,d.updateQueue=l.updateQueue,a=l.dependencies,d.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},d.sibling=l.sibling,d.index=l.index,d.ref=l.ref,d}function Fc(l,a,d,m,x,w){var k=2;if(m=l,typeof l=="function")md(l)&&(k=1);else if(typeof l=="string")k=5;else e:switch(l){case j:return Gs(d.children,x,w,a);case N:k=8,x|=8;break;case ne:return l=Tr(12,d,a,x|2),l.elementType=ne,l.lanes=w,l;case re:return l=Tr(13,d,a,x),l.elementType=re,l.lanes=w,l;case ce:return l=Tr(19,d,a,x),l.elementType=ce,l.lanes=w,l;case oe:return Hc(d,x,w,a);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case se:k=10;break e;case le:k=9;break e;case T:k=11;break e;case Y:k=14;break e;case G:k=16,m=null;break e}throw Error(t(130,l==null?l:typeof l,""))}return a=Tr(k,d,a,x),a.elementType=l,a.type=m,a.lanes=w,a}function Gs(l,a,d,m){return l=Tr(7,l,m,a),l.lanes=d,l}function Hc(l,a,d,m){return l=Tr(22,l,m,a),l.elementType=oe,l.lanes=d,l.stateNode={isHidden:!1},l}function gd(l,a,d){return l=Tr(6,l,null,a),l.lanes=d,l}function Od(l,a,d){return a=Tr(4,l.children!==null?l.children:[],l.key,a),a.lanes=d,a.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},a}function Ev(l,a,d,m,x){this.tag=a,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ci(0),this.expirationTimes=ci(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.identifierPrefix=m,this.onRecoverableError=x,this.mutableSourceEagerHydrationData=null}function xd(l,a,d,m,x,w,k,E,L){return l=new Ev(l,a,d,E,L),a===1?(a=1,w===!0&&(a|=8)):a=0,w=Tr(3,null,null,a),l.current=w,w.stateNode=l,w.memoizedState={element:m,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},T1(w),l}function Zv(l,a,d){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:H,key:m==null?null:""+m,children:l,containerInfo:a,implementation:d}}function D2(l){if(!l)return us;l=l._reactInternals;e:{if(_r(l)!==l||l.tag!==1)throw Error(t(170));var a=l;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(Gn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(l.tag===1){var d=l.type;if(Gn(d))return mm(l,d,a)}return a}function z2(l,a,d,m,x,w,k,E,L){return l=xd(d,m,!0,l,x,w,k,E,L),l.context=D2(null),d=l.current,m=Dn(),x=Os(d),w=Xi(m,x),w.callback=a??null,fs(d,w,x),l.current.lanes=x,Ns(l,x,m),er(l,m),l}function Wc(l,a,d,m){var x=a.current,w=Dn(),k=Os(x);return d=D2(d),a.context===null?a.context=d:a.pendingContext=d,a=Xi(w,k),a.payload={element:l},m=m===void 0?null:m,m!==null&&(a.callback=m),l=fs(x,a,k),l!==null&&(Br(l,x,k,w),bc(l,x,k)),k}function Bc(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return l.child.stateNode;default:return l.child.stateNode}}function I2(l,a){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var d=l.retryLane;l.retryLane=d!==0&&d<a?d:a}}function yd(l,a){I2(l,a),(l=l.alternate)&&I2(l,a)}function jv(){return null}var F2=typeof reportError=="function"?reportError:function(l){console.error(l)};function vd(l){this._internalRoot=l}Yc.prototype.render=vd.prototype.render=function(l){var a=this._internalRoot;if(a===null)throw Error(t(409));Wc(l,a,null,null)},Yc.prototype.unmount=vd.prototype.unmount=function(){var l=this._internalRoot;if(l!==null){this._internalRoot=null;var a=l.containerInfo;Ys(function(){Wc(null,l,null,null)}),a[ji]=null}};function Yc(l){this._internalRoot=l}Yc.prototype.unstable_scheduleHydration=function(l){if(l){var a=Q();l={blockedOn:null,target:l,priority:a};for(var d=0;d<Be.length&&a!==0&&a<Be[d].priority;d++);Be.splice(d,0,l),d===0&&Ue(l)}};function wd(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)}function qc(l){return!(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11&&(l.nodeType!==8||l.nodeValue!==" react-mount-point-unstable "))}function H2(){}function Rv(l,a,d,m,x){if(x){if(typeof m=="function"){var w=m;m=function(){var ee=Bc(k);w.call(ee)}}var k=z2(a,m,l,0,null,!1,!1,"",H2);return l._reactRootContainer=k,l[ji]=k.current,Ro(l.nodeType===8?l.parentNode:l),Ys(),k}for(;x=l.lastChild;)l.removeChild(x);if(typeof m=="function"){var E=m;m=function(){var ee=Bc(L);E.call(ee)}}var L=xd(l,0,!1,null,null,!1,!1,"",H2);return l._reactRootContainer=L,l[ji]=L.current,Ro(l.nodeType===8?l.parentNode:l),Ys(function(){Wc(a,L,d,m)}),L}function Uc(l,a,d,m,x){var w=d._reactRootContainer;if(w){var k=w;if(typeof x=="function"){var E=x;x=function(){var L=Bc(k);E.call(L)}}Wc(a,k,l,x)}else k=Rv(d,a,l,x,m);return Bc(k)}Ja=function(l){switch(l.tag){case 3:var a=l.stateNode;if(a.current.memoizedState.isDehydrated){var d=oi(a.pendingLanes);d!==0&&(pl(a,d|1),er(a,_()),(lt&6)===0&&(Rl=_()+500,ds()))}break;case 13:Ys(function(){var m=Ni(l,1);if(m!==null){var x=Dn();Br(m,l,1,x)}}),yd(l,1)}},is=function(l){if(l.tag===13){var a=Ni(l,134217728);if(a!==null){var d=Dn();Br(a,l,134217728,d)}yd(l,134217728)}},ec=function(l){if(l.tag===13){var a=Os(l),d=Ni(l,a);if(d!==null){var m=Dn();Br(d,l,a,m)}yd(l,a)}},Q=function(){return ct},I=function(l,a){var d=ct;try{return ct=l,a()}finally{ct=d}},kn=function(l,a,d){switch(a){case"input":if(ze(l,d),a=d.name,d.type==="radio"&&a!=null){for(d=l;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<d.length;a++){var m=d[a];if(m!==l&&m.form===l.form){var x=fc(m);if(!x)throw Error(t(90));Ut(m),ze(m,x)}}}break;case"textarea":tt(l,d);break;case"select":a=d.value,a!=null&&Mt(l,!!d.multiple,a,!1)}},Wt=hd,Wn=Ys;var Vv={usingClientEntryPoint:!1,Events:[No,Sl,fc,mn,St,hd]},Ko={findFiberByHostInstance:_s,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Lv={bundleType:Ko.bundleType,version:Ko.version,rendererPackageName:Ko.rendererPackageName,rendererConfig:Ko.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(l){return l=ns(l),l===null?null:l.stateNode},findFiberByHostInstance:Ko.findFiberByHostInstance||jv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{Nt=Gc.inject(Lv),ft=Gc}catch{}}return tr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vv,tr.createPortal=function(l,a){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!wd(a))throw Error(t(200));return Zv(l,a,null,d)},tr.createRoot=function(l,a){if(!wd(l))throw Error(t(299));var d=!1,m="",x=F2;return a!=null&&(a.unstable_strictMode===!0&&(d=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onRecoverableError!==void 0&&(x=a.onRecoverableError)),a=xd(l,1,!1,null,null,d,!1,m,x),l[ji]=a.current,Ro(l.nodeType===8?l.parentNode:l),new vd(a)},tr.findDOMNode=function(l){if(l==null)return null;if(l.nodeType===1)return l;var a=l._reactInternals;if(a===void 0)throw typeof l.render=="function"?Error(t(188)):(l=Object.keys(l).join(","),Error(t(268,l)));return l=ns(a),l=l===null?null:l.stateNode,l},tr.flushSync=function(l){return Ys(l)},tr.hydrate=function(l,a,d){if(!qc(a))throw Error(t(200));return Uc(null,l,a,!0,d)},tr.hydrateRoot=function(l,a,d){if(!wd(l))throw Error(t(405));var m=d!=null&&d.hydratedSources||null,x=!1,w="",k=F2;if(d!=null&&(d.unstable_strictMode===!0&&(x=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onRecoverableError!==void 0&&(k=d.onRecoverableError)),a=z2(a,null,l,1,d??null,x,!1,w,k),l[ji]=a.current,Ro(l),m)for(l=0;l<m.length;l++)d=m[l],x=d._getVersion,x=x(d._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[d,x]:a.mutableSourceEagerHydrationData.push(d,x);return new Yc(a)},tr.render=function(l,a,d){if(!qc(a))throw Error(t(200));return Uc(null,l,a,!1,d)},tr.unmountComponentAtNode=function(l){if(!qc(l))throw Error(t(40));return l._reactRootContainer?(Ys(function(){Uc(null,null,l,!1,function(){l._reactRootContainer=null,l[ji]=null})}),!0):!1},tr.unstable_batchedUpdates=hd,tr.unstable_renderSubtreeIntoContainer=function(l,a,d,m){if(!qc(d))throw Error(t(200));if(l==null||l._reactInternals===void 0)throw Error(t(38));return Uc(l,a,d,!1,m)},tr.version="18.3.1-next-f1338f8080-20240426",tr}var J2;function Z6(){if(J2)return kd.exports;J2=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),kd.exports=Hv(),kd.exports}var eg;function Wv(){if(eg)return Jc;eg=1;var n=Z6();return Jc.createRoot=n.createRoot,Jc.hydrateRoot=n.hydrateRoot,Jc}var Bv=Wv();function Lt(n){h.useEffect(n,[])}const Yv="modulepreload",qv=function(n){return"/"+n},tg={},Uv=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let o=function(f){return Promise.all(f.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]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(t.map(f=>{if(f=qv(f),f in tg)return;tg[f]=!0;const p=f.endsWith(".css"),O=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${O}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":Yv,p||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),p)return new Promise((v,S)=>{y.addEventListener("load",v),y.addEventListener("error",()=>S(new Error(`Unable to preload CSS for ${f}`)))})}))}function s(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"&&s(c.reason);return e().catch(s)})};function Gv(n){const e=n.shadowRoot;if(!e)return;const t=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");t==null||t.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function Kv(n){if(typeof n!="object"||n===null)return!0;const e=n;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function ng(n,e){try{const t=n.contentWindow,r=n.contentDocument;if(!t||!r)return e;for(const s of r.querySelectorAll("video, audio"))if(s instanceof HTMLMediaElement&&s.readyState<HTMLMediaElement.HAVE_FUTURE_DATA)return!0;const i=t.__hfLottie;if(i!=null&&i.length){for(const s of i)if(!Kv(s))return!0}return!1}catch{return e}}const kh=h.forwardRef(({projectId:n,directUrl:e,onLoad:t,portrait:r,style:i},s)=>{const o=h.useRef(null),c=h.useRef(null),[u,f]=h.useState(!1);return Lt(()=>{const p=o.current;if(!p)return;let O=!1,y;return Uv(()=>import("./hyperframes-player-vibA20NC.js"),[]).then(()=>{if(O)return;const v=document.createElement("hyperframes-player"),S=e||`/api/projects/${n}/preview`;v.setAttribute("src",S),v.setAttribute("width",String(r?1080:1920)),v.setAttribute("height",String(r?1920:1080)),v.style.width="100%",v.style.height="100%",v.style.display="block",p.appendChild(v),Gv(v);const b=v.iframeElement;typeof s=="function"?s(b):s&&(s.current=b);const P=z=>z.stopImmediatePropagation();v.addEventListener("click",P,{capture:!0});const A=()=>{t(),c.current&&clearInterval(c.current);let z=ng(b,!1);if(z){f(!0);let M=0;c.current=setInterval(()=>{M+=1,z=ng(b,z),(!z||M>100)&&(c.current&&clearInterval(c.current),c.current=null,f(!1))},100)}else f(!1)};b.addEventListener("load",A),y=()=>{b.removeEventListener("load",A),v.removeEventListener("click",P,{capture:!0}),c.current&&clearInterval(c.current),c.current=null,p.removeChild(v),typeof s=="function"?s(null):s&&(s.current=null)}}),()=>{O=!0,y==null||y()}}),g.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",style:i,children:[g.jsx("div",{ref:o,className:"w-full h-full"}),u&&g.jsxs("div",{className:"absolute inset-0 bg-black/80 flex flex-col items-center justify-center z-20 pointer-events-none",children:[g.jsx("div",{className:"w-8 h-8 border-2 border-white/20 border-t-white rounded-full animate-spin"}),g.jsx("span",{className:"text-white/60 text-xs mt-3",children:"Loading assets…"})]})]})});kh.displayName="Player";const Ef="Shift+T",j6="hf-studio-timeline-editor-hint-dismissed";function Jv(n){var i,s,o;if(!n||typeof n!="object")return!1;const e=n,t=(i=e.tagName)==null?void 0:i.toLowerCase();if(t==="input"||t==="textarea"||t==="select"||e.isContentEditable)return!0;const r=(s=e.getAttribute)==null?void 0:s.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 ew(n){return n.metaKey||n.ctrlKey||n.altKey||!n.shiftKey||n.key.toLowerCase()!=="t"?!1:!Jv(n.target)}function R6(n){return`${n?"Hide":"Show"} timeline editor (${Ef})`}function tw(){return typeof window>"u"?!1:window.localStorage.getItem(j6)==="1"}function nw(n){if(!(typeof window>"u")){window.localStorage.setItem(j6,"1");return}}function sr(n){if(!Number.isFinite(n)||n<0)return"0:00";const e=Math.floor(n/60),t=Math.floor(n%60);return`${e}:${t.toString().padStart(2,"0")}`}const rg=n=>{let e;const t=new Set,r=(f,p)=>{const O=typeof f=="function"?f(e):f;if(!Object.is(O,e)){const y=e;e=p??(typeof O!="object"||O===null)?O:Object.assign({},e,O),t.forEach(v=>v(e,y))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(t.add(f),()=>t.delete(f))},u=e=n(r,i,c);return c},rw=(n=>n?rg(n):rg),iw=n=>n;function sw(n,e=iw){const t=Kc.useSyncExternalStore(n.subscribe,Kc.useCallback(()=>e(n.getState()),[n,e]),Kc.useCallback(()=>e(n.getInitialState()),[n,e]));return Kc.useDebugValue(t),t}const ig=n=>{const e=rw(n),t=r=>sw(e,r);return Object.assign(t,e),t},V6=(n=>n?ig(n):ig),Qd=new Set,ka={notify:n=>Qd.forEach(e=>e(n)),subscribe:n=>(Qd.add(n),()=>Qd.delete(n))},Ve=V6(n=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,zoomMode:"fit",manualZoomPercent:100,setIsPlaying:e=>n({isPlaying:e}),setPlaybackRate:e=>n({playbackRate:e}),setZoomMode:e=>n({zoomMode:e}),setManualZoomPercent:e=>n({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>n({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>n({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>n({timelineReady:e}),setElements:e=>n({elements:e}),setSelectedElementId:e=>n({selectedElementId:e}),updateElement:(e,t)=>n(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...t}:i)})),reset:()=>n({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),lw=[.25,.5,1,1.5,2],ow=8;function aw(n,e,t){if(!Number.isFinite(t)||t<=0)return 0;const r=(n-e)/t,i=Math.max(0,Math.min(1,r)),s=Math.min(.5,ow/t);return i<=s?0:i>=1-s?1:i}const cw=h.memo(function({onTogglePlay:e,onSeek:t,timelineVisible:r,onToggleTimeline:i}){const s=Ve(N=>N.isPlaying),o=Ve(N=>N.duration),c=Ve(N=>N.timelineReady),u=Ve(N=>N.playbackRate),f=Ve.getState().setPlaybackRate,[p,O]=h.useState(!1),y=h.useRef(null),v=h.useRef(null),S=h.useRef(null),b=h.useRef(null),P=h.useRef(null),A=h.useRef(null),z=h.useRef(!1),M=h.useRef(0),C=h.useRef(o);C.current=o,Lt(()=>{const N=le=>{M.current=le;const T=C.current,re=T>0?Math.min(100,le/T*100):0;y.current&&(y.current.style.width=`${re}%`),v.current&&(v.current.style.left=`${re}%`),S.current&&(S.current.textContent=sr(le)),P.current&&P.current.setAttribute("aria-valuenow",String(Math.round(le)))},ne=ka.subscribe(N);N(Ve.getState().currentTime);const se=setInterval(()=>{const le=Ve.getState().currentTime,T=Ve.getState().duration;if(T>0&&le>0){const re=Math.min(100,le/T*100);y.current&&(y.current.style.width=`${re}%`),v.current&&(v.current.style.left=`${re}%`)}},500);return()=>{ne(),clearInterval(se)}}),h.useEffect(()=>{if(!p)return;const N=ne=>{A.current&&!A.current.contains(ne.target)&&O(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[p]);const Z=h.useCallback(N=>{const ne=b.current;if(!ne||o<=0)return;const se=ne.getBoundingClientRect(),le=aw(N,se.left,se.width),T=le*100;y.current&&(y.current.style.width=`${T}%`),v.current&&(v.current.style.left=`${T}%`),t(le*o)},[o,t]),H=h.useCallback(N=>{if(N.button!==0)return;N.preventDefault(),N.currentTarget.focus(),z.current=!0;const ne=N.currentTarget,se=N.pointerId;try{ne.setPointerCapture(se)}catch{}Z(N.clientX);const le=Y=>{Y.pointerId===se&&z.current&&Z(Y.clientX)},T=()=>{z.current=!1;try{ne.releasePointerCapture(se)}catch{}ne.removeEventListener("pointermove",le),ne.removeEventListener("pointerup",re),ne.removeEventListener("pointercancel",re),window.removeEventListener("pointerup",re),window.removeEventListener("pointercancel",re),document.removeEventListener("visibilitychange",ce),window.removeEventListener("blur",T)},re=Y=>{Y.pointerId===se&&T()},ce=()=>{document.visibilityState==="hidden"&&T()};ne.addEventListener("pointermove",le),ne.addEventListener("pointerup",re),ne.addEventListener("pointercancel",re),window.addEventListener("pointerup",re),window.addEventListener("pointercancel",re),document.addEventListener("visibilitychange",ce),window.addEventListener("blur",T)},[Z]),j=h.useCallback(N=>{if(!c||o<=0)return;const ne=N.shiftKey?5:1;N.key==="ArrowLeft"?(N.preventDefault(),t(Math.max(0,M.current-ne))):N.key==="ArrowRight"&&(N.preventDefault(),t(Math.min(o,M.current+ne)))},[c,o,t]);return g.jsxs("div",{className:"px-4 py-2 flex items-center gap-3",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":s?"Pause":"Play",onClick:e,disabled:!c,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:s?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("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 min-w-[72px]",style:{color:"#A1A1AA"},children:[g.jsx("span",{ref:S,children:sr(0)}),g.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),g.jsx("span",{style:{color:"#52525B"},children:sr(o)})]}),g.jsx("div",{ref:N=>{b.current=N,P.current=N},role:"slider",tabIndex:0,"aria-label":"Seek","aria-valuemin":0,"aria-valuemax":Math.round(o),"aria-valuenow":0,className:"flex-1 h-6 flex items-center cursor-pointer group",style:{touchAction:"none"},onPointerDown:H,onKeyDown:j,children:g.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[g.jsx("div",{ref:y,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),g.jsx("div",{ref:v,className:"absolute top-1/2 z-[2] 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.jsxs("div",{ref:A,className:"relative flex-shrink-0",children:[g.jsx("button",{type:"button",onClick:()=>O(N=>!N),className:"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:u===1?"1x":`${u}x`}),p&&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:lw.map(N=>g.jsxs("button",{onClick:()=>{f(N),O(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:N===u?"#FAFAFA":"#71717A",background:N===u?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:ne=>{N!==u&&(ne.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:ne=>{N!==u&&(ne.currentTarget.style.background="transparent")},children:[N,"x"]},N))})]}),i!==void 0&&g.jsxs("button",{type:"button",onClick:i,className:`h-7 flex items-center gap-1.5 rounded-md border px-2.5 text-[11px] font-medium transition-colors ${r?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-300 hover:border-neutral-500 hover:bg-neutral-800"}`,title:R6(!!r),"aria-label":r?"Hide timeline editor":"Show timeline editor",children:[g.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[g.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),g.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),g.jsx("line",{x1:"3",y1:"5",x2:"21",y2:"5"})]}),g.jsx("span",{children:"Timeline"}),g.jsx("span",{className:"hidden md:inline rounded bg-black/20 px-1 py-0.5 text-[9px] font-mono opacity-70",children:Ef})]})]})}),sg="#3CE6AC",uw="#E9FFF6",dw="rgba(60,230,172,0.12)";function Oi(){return{clip:sg,accent:sg,label:uw,iconBackground:dw}}const lg={video:Oi(),audio:Oi(),img:Oi(),div:Oi(),span:Oi(),p:Oi(),h1:Oi(),section:Oi(),sfx:Oi()},hw=Oi(),L6={shellBackground:"#0A0E15",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.045)",rowBackground:"#0A0E15",rowBorder:"rgba(255,255,255,0.05)",gutterBackground:"#0D121B",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:"linear-gradient(180deg, rgba(20,25,34,0.98), rgba(14,18,27,0.98))",clipBackgroundActive:"linear-gradient(180deg, rgba(24,30,40,0.99), rgba(15,20,29,0.99))",clipBorder:"rgba(255,255,255,0.07)",clipBorderHover:"rgba(255,255,255,0.11)",clipBorderActive:"rgba(255,255,255,0.14)",clipShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.18)",clipShadowHover:"inset 0 1px 0 rgba(255,255,255,0.035), 0 8px 20px rgba(0,0,0,0.2)",clipShadowActive:"inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.035)",clipShadowDragging:"inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 36px rgba(0,0,0,0.34), 0 8px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04)",handleColor:"rgba(255,255,255,0.11)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"11px 15px 13px 9px / 10px 14px 12px 10px"};function fw(n){const e=n.toLowerCase();return e.startsWith("h")&&e.length===2&&"123456".includes(e[1]??"")?lg.h1:lg[e]??hw}function pw({isHovered:n,isSelected:e,isDragging:t}){return t?.95:e?.82:n?.76:0}function mw({element:n,draggedElementId:e,previewStart:t,previewTrack:r}){return n.id!==e||t===null||r===null?n:{...n,start:t,track:r}}const og=100;function Il(n){return Math.round(n*og)/og}function $a(n,e,t){return Math.min(Math.max(n,e),t)}const ag=.55,eu=40,cg=12;function ug(n,e,t){const r=(i,s,o)=>{if(o<i+eu){const c=Math.max(0,1-(o-i)/eu);return-Math.round(cg*c)}if(o>s-eu){const c=Math.max(0,1-(s-o)/eu);return Math.round(cg*c)}return 0};return{x:r(n.left,n.right,e),y:r(n.top,n.bottom,t)}}function gw(n,e,t){const r=(n.currentScrollLeft??0)-(n.originScrollLeft??0),i=(n.currentScrollTop??0)-(n.originScrollTop??0),s=(e-n.originClientX+r)/Math.max(n.pixelsPerSecond,1),o=(t-n.originClientY+i)/Math.max(n.trackHeight,1),c=Math.round(o),u=Math.max(0,n.trackOrder.indexOf(n.track)),f=u+c,p=$a(f,0,Math.max(0,n.trackOrder.length-1)),O=Math.min(...n.trackOrder),y=Math.max(...n.trackOrder);let v=n.trackOrder[p]??n.track;const S=u===0,b=u===n.trackOrder.length-1;return S&&f<0&&u+o<=-ag?v=O-1:b&&f>n.trackOrder.length-1&&u+o>=n.trackOrder.length-1+ag&&(v=y+1),{start:$a(Il(n.start+s),0,Math.max(0,n.maxStart)),track:v}}function Ad(n){const e=Array.from(new Set(n)).sort((r,i)=>r-i),t=e.length;return new Map(e.map((r,i)=>[r,t-i]))}function Ow(n,e,t){const r=Math.max(.05,n.minDuration??.1),i=(t-n.originClientX)/Math.max(n.pixelsPerSecond,1);if(e==="end"){const v=$a(Il(n.duration+i),r,Math.max(r,n.maxEnd-n.start));return{start:n.start,duration:v,playbackStart:n.playbackStart}}const s=Math.max(.1,n.playbackRate??1),o=n.playbackStart!=null?n.playbackStart/s:Number.POSITIVE_INFINITY,c=-Math.min(n.start-n.minStart,o),u=n.duration-r,f=$a(i,c,u),p=Il(n.start+f),O=Il(n.duration-f),y=n.playbackStart!=null?Il(Math.max(0,n.playbackStart+f*s)):void 0;return{start:p,duration:O,playbackStart:y}}function xw(n){if(n.compositionSrc||n.playbackStartAttr!=null||n.sourceDuration!=null&&Number.isFinite(n.sourceDuration)&&n.sourceDuration>0)return!0;const e=n.tag.toLowerCase();return["video","audio","img"].includes(e)}function yw(n){return!!(n.domId||n.selector)}function vw(n){if(n.playbackStartAttr!=null||n.playbackStart!=null)return!0;const e=n.tag.toLowerCase();return["video","audio"].includes(e)}function N6(n){const e=yw(n),t=Number.isFinite(n.duration)&&n.duration>0,r=xw(n);return{canMove:e&&(r||t),canTrimEnd:e&&t&&r,canTrimStart:e&&t&&vw(n)}}function ww(n){if(n.capabilities.canMove)return null;const e=Math.max(0,n.width),t=$a(n.offsetX,0,e),r=Math.max(0,n.handleWidth);return t<=r&&!n.capabilities.canTrimStart?"resize-start":t>=Math.max(0,e-r)&&!n.capabilities.canTrimEnd?"resize-end":"move"}function Sw(n,e){return{start:n.start,end:n.start+n.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function bw({rangeStart:n,rangeEnd:e,elements:t,prompt:r}){const i=Math.min(n,e),s=Math.max(n,e),o=t.map(c=>`- #${c.id} (${c.tag}) — ${sr(c.start)} to ${sr(c.start+c.duration)}, track ${c.track}`).join(`
41
- `);return`Edit the following HyperFrames composition:
42
-
43
- Time range: ${sr(i)} — ${sr(s)}
44
-
45
- Elements in range:
46
- ${o||"(none)"}
47
-
48
- User request:
49
- ${r.trim()||"(no prompt provided)"}
50
-
51
- Instructions:
52
- Modify only the elements listed above within the specified time range.
53
- The composition uses HyperFrames data attributes (data-start, data-duration, data-track-index) and GSAP for animations.
54
- Preserve all other elements and timing outside this range.`}function dg(n){return n.trim()}function Ks(n){return Number(Il(n).toFixed(2)).toString()}const hg=h.memo(function({el:e,pps:t,clipY:r,isSelected:i,isHovered:s,isDragging:o=!1,hasCustomContent:c,theme:u=L6,trackStyle:f,isComposition:p,onHoverStart:O,onHoverEnd:y,onPointerDown:v,onResizeStart:S,onClick:b,onDoubleClick:P,children:A}){const z=e.start*t,M=Math.max(e.duration*t,4),C=pw({isHovered:s,isSelected:i,isDragging:o}),Z=i?u.clipBorderActive:s?u.clipBorderHover:u.clipBorder,H=o?u.clipShadowDragging:i?u.clipShadowActive:s?u.clipShadowHover:u.clipShadow,j=N6(e),N=C>.01,ne=i?u.clipBackgroundActive:u.clipBackground,se=i?"linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0))":"linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0))",le=`linear-gradient(120deg, ${f.accent}${i?"22":"1e"}, transparent 28%)`,re=[p&&!c?"repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(255,255,255,0.05) 3px, rgba(255,255,255,0.05) 6px)":void 0,se,le,ne].filter(Boolean).join(", ");return g.jsxs("div",{"data-clip":"true",className:c?"absolute overflow-hidden":"absolute flex items-center overflow-hidden",style:{left:z,width:M,top:r,bottom:r,borderRadius:u.clipRadius,backgroundImage:re,border:`1px solid ${Z}`,boxShadow:H,transition:"border-color 120ms ease-out, box-shadow 140ms ease-out, background 140ms ease-out",zIndex:o?20:i?10:s?5:1,cursor:j.canMove?"grab":"default",transform:o?"translateY(-1px)":void 0},title:p?`${e.compositionSrc} • Double-click to open`:`${e.id||e.tag} • ${e.start.toFixed(1)}s – ${(e.start+e.duration).toFixed(1)}s`,onPointerEnter:O,onPointerLeave:y,onPointerDown:v,onClick:b,onDoubleClick:P,children:[g.jsx("div",{"aria-hidden":"true",role:"presentation",onPointerDown:ce=>S==null?void 0:S("start",ce),style:{position:"absolute",left:0,top:0,bottom:0,width:18,opacity:N&&j.canTrimStart?1:0,pointerEvents:S&&j.canTrimStart?"auto":"none",zIndex:4,transition:"opacity 120ms ease-out",cursor:"col-resize",background:N&&j.canTrimStart?`linear-gradient(90deg, ${f.accent}4d 0%, ${f.accent}22 42%, transparent 100%)`:"transparent"},children:g.jsx("div",{style:{position:"absolute",left:6,top:7,bottom:7,width:3,borderRadius:999,background:u.handleColor,boxShadow:`0 0 0 1px ${f.accent}38, 0 0 12px ${f.accent}18`,opacity:C,pointerEvents:"none"}})}),g.jsx("div",{"aria-hidden":"true",role:"presentation",onPointerDown:ce=>S==null?void 0:S("end",ce),style:{position:"absolute",right:0,top:0,bottom:0,width:18,opacity:N&&j.canTrimEnd?1:0,pointerEvents:S&&j.canTrimEnd?"auto":"none",zIndex:4,transition:"opacity 120ms ease-out",cursor:"col-resize",background:N&&j.canTrimEnd?`linear-gradient(270deg, ${f.accent}4d 0%, ${f.accent}22 42%, transparent 100%)`:"transparent"},children:g.jsx("div",{style:{position:"absolute",right:6,top:7,bottom:7,width:3,borderRadius:999,background:u.handleColor,boxShadow:`0 0 0 1px ${f.accent}38, 0 0 12px ${f.accent}18`,opacity:C,pointerEvents:"none"}})}),A]})});function fg(n){if(typeof document>"u"||!document.body||!document.execCommand)return!1;const e=document.createElement("textarea");e.value=n,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,n.length);try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(e)}}function kw(){if(typeof navigator>"u")return!1;const n=navigator.userAgent;return/Safari/i.test(n)&&!/Chrome|Chromium|CriOS|FxiOS|Edg|OPR/i.test(n)}async function Pa(n){const e=kw();if(e&&fg(n))return!0;const t=typeof navigator<"u"?navigator.clipboard:void 0;if(t!=null&&t.writeText)try{return await t.writeText(n),!0}catch{}return!e&&fg(n)}function $w({rangeStart:n,rangeEnd:e,anchorX:t,anchorY:r,onClose:i}){const s=Ve(Z=>Z.elements),[o,c]=h.useState(""),[u,f]=h.useState(!1),[p,O]=h.useState(!1),y=h.useRef(null),v=h.useRef(null),S=Math.min(n,e),b=Math.max(n,e),P=h.useMemo(()=>s.filter(Z=>{const H=Z.start+Z.duration;return Z.start<b&&H>S}),[s,S,b]);Lt(()=>{setTimeout(()=>{var Z;return(Z=v.current)==null?void 0:Z.focus()},50)}),Lt(()=>{const Z=H=>{H.key==="Escape"&&i()};return window.addEventListener("keydown",Z),()=>window.removeEventListener("keydown",Z)}),Lt(()=>{const Z=H=>{y.current&&!y.current.contains(H.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",Z),100),()=>window.removeEventListener("mousedown",Z)});const A=h.useCallback(()=>bw({rangeStart:S,rangeEnd:b,elements:P,prompt:o}),[S,b,P,o]),z=h.useCallback(async()=>{await Pa(A())&&(f(!0),setTimeout(()=>{f(!1),i()},800))},[A,i]),M=h.useCallback(async()=>{const Z=dg(o);!Z||!await Pa(Z)||(O(!0),setTimeout(()=>{O(!1)},800))},[o]),C={position:"fixed",left:Math.max(8,Math.min(t-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:[sr(S)," — ",sr(b)]})]}),g.jsxs("span",{className:"text-[10px] text-neutral-600",children:[P.length," element",P.length!==1?"s":""]})]}),P.length>0&&g.jsx("div",{className:"px-4 py-2 border-b border-neutral-800/40 max-h-24 overflow-y-auto",children:P.map(Z=>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:["#",Z.id]}),g.jsx("span",{className:"text-[10px] text-neutral-600",children:Z.tag})]},Z.id))}),g.jsx("div",{className:"p-3",children:g.jsx("textarea",{ref:v,value:o,onChange:Z=>c(Z.target.value),onKeyDown:Z=>{Z.key==="Enter"&&(Z.metaKey||Z.ctrlKey)&&(Z.preventDefault(),z())},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:M,disabled:!dg(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:z,className:`py-1.5 text-[11px] font-medium rounded-lg transition-all ${u?"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:[u?"Copied!":"Copy to Agent",!u&&g.jsx("span",{className:"text-[9px] text-studio-accent/50 ml-1.5",children:"Cmd+Enter"})]})]})]})})}const Pw=10,Qw=2e3,Aw=.8,Cw=1.25,Mw=.0035;function Zf(n){return Number.isFinite(n)?Math.max(Pw,Math.min(Qw,Math.round(n))):100}function Q0(n,e){return n==="fit"?100:Zf(e)}function Tw(n,e,t){if(!Number.isFinite(n)||n<=0)return 100;const r=Q0(e,t);return e==="fit"?n:n*(r/100)}function pg(n,e,t){const r=Q0(e,t),i=n==="in"?r*Cw:r*Aw;return Zf(i)}function Ew(n,e,t){const r=Q0(e,t);return!Number.isFinite(n)||n===0?r:Zf(r*Math.exp(-n*Mw))}const Qa=/\.(jpg|jpeg|png|gif|webp|svg|ico)$/i,jf=/\.(mp4|webm|mov)$/i,Rf=/\.(mp3|wav|ogg|m4a|aac)$/i,tu=/\.(woff|woff2|ttf|ttc|otf|eot)$/i,X6=/\.(mp4|webm|mov|mp3|wav|ogg|m4a|aac|jpg|jpeg|png|gif|webp|svg|ico)$/i;function mg(n){return X6.test(n)}const $h="application/x-hyperframes-asset",Zw=5;function gg(n){return Qa.test(n)?"image":jf.test(n)?"video":Rf.test(n)?"audio":null}function jw(n,e){const i=(n.split("/").pop()??"asset").replace(/\.[^.]+$/,"").replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").toLowerCase()||"asset",s=new Set(e);if(!s.has(i))return i;let o=2;for(;s.has(`${i}_${o}`);)o+=1;return`${i}_${o}`}function Rw(n,e){const t=n.includes("/")?n.slice(0,n.lastIndexOf("/")):"";if(!t)return e;const r=t.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 Vw(n,e,t=[]){let r=Math.round(Math.max(0,n.start)*100)/100;const i=r,s=e.map(f=>Number.isFinite(f)&&f>0?f:Zw),o=s.reduce((f,p)=>Math.round((f+p)*100)/100,i),u=t.some(f=>{if(f.track!==n.track)return!1;const p=Math.max(0,f.start),O=p+Math.max(0,f.duration);return i<O&&o>p})?Math.max(n.track,...t.map(f=>f.track))+1:n.track;return s.map(f=>{const p=r;return r=Math.round((r+f)*100)/100,{start:p,track:u}})}function Lw(n){var r,i;const e=Number.parseFloat(((r=n.match(/\bdata-width=(["'])([^"']+)\1/i))==null?void 0:r[2])??""),t=Number.parseFloat(((i=n.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(t)&&t>0?Math.round(t):360}}function Nw(n){const e=`id="${n.id}" class="clip" src="${n.assetPath}" data-start="${n.start}" data-duration="${n.duration}" data-track-index="${n.track}"`,t=n.geometry??{left:0,top:0,width:640,height:360},r=`position: absolute; left: ${t.left}px; top: ${t.top}px; width: ${t.width}px; height: ${t.height}px; object-fit: contain; z-index: ${n.zIndex}`;return n.kind==="image"?`<img ${e} style="${r}" />`:n.kind==="video"?`<video ${e} muted playsinline style="${r}"></video>`:`<audio ${e} style="z-index: ${n.zIndex}"></audio>`}function Xw(n,e){const r=/<[^>]*data-composition-id="[^"]+"[^>]*>/i.exec(n);if(!r||r.index==null)throw new Error("No composition root found in target source");const i=r.index+r[0].length;return`${n.slice(0,i)}${e}${n.slice(i)}`}const tn=32,Xl=72,Fl=24,Og=3,_w=18,Dw=20,xo="/icons/timeline";function yo({src:n}){return g.jsx("img",{src:n,alt:"",width:12,height:12,style:{filter:"brightness(0) invert(1)"},draggable:!1})}const zw=g.jsx(yo,{src:`${xo}/captions.svg`}),xg=g.jsx(yo,{src:`${xo}/image.svg`}),Iw=g.jsx(yo,{src:`${xo}/music.svg`}),yg=g.jsx(yo,{src:`${xo}/text.svg`}),Ph=g.jsx(yo,{src:`${xo}/composition.svg`}),Fw=g.jsx(yo,{src:`${xo}/audio.svg`}),vg={video:xg,audio:Iw,img:xg,div:Ph,span:zw,p:yg,h1:yg,section:Ph,sfx:Fw};function ea(n){const e=fw(n),t=n.toLowerCase(),r=t.startsWith("h")&&t.length===2&&"123456".includes(t[1]??"")?vg.h1:vg[t]??Ph;return{...e,icon:r}}function Hw(n,e){const t=[.25,.5,1,2,5,10,15,30,60,120,300,600];if(Number.isFinite(e)&&(e??0)>0)return t.find(o=>o*(e??0)>=128)??600;const r=[.25,.5,1,2,5,10,15,30,60],i=n/6;return r.find(s=>s>=i)??60}function Ww(n,e){let t=n/2;return n>=30?t=n/6:n>=15?t=n/3:n>=5?t=n/5:n>=1&&(t=n/4),Number.isFinite(e)&&(e??0)>0&&t*(e??0)<20?Math.max(.25,n/2):Math.max(.25,t)}function Bw(n,e){if(n<=0||!Number.isFinite(n)||n>7200)return{major:[],minor:[]};const t=Hw(n,e),r=Ww(t,e),i=[],s=[],o=2e3;for(let c=0;c<=n+.001&&i.length+s.length<o;c+=r){const u=Math.round(c*100)/100;Math.abs(u%t)<.01||Math.abs(u%t-t)<.01?i.push(u):s.push(u)}return{major:i,minor:s}}function Yw(n,e,t){if(!Number.isFinite(n))return"0:00";const r=Math.max(0,n);if(t<1){const i=Math.round(r*10),s=Math.floor(i/10),o=i%10;return`${sr(s)}.${o}`}if(e>=3600||r>=3600){const i=Math.floor(r),s=Math.floor(i/3600),o=Math.floor(i%3600/60),c=i%60;return`${s}:${o.toString().padStart(2,"0")}:${c.toString().padStart(2,"0")}`}return sr(r)}function wg(n,e,t){return n==="fit"||!Number.isFinite(e)||!Number.isFinite(t)?!1:e-t>1}function qw(n,e,t){return n==="manual"&&e==="fit"?0:t}function Uw(n){const e=Math.max(0,n.currentPixelsPerSecond),t=Math.max(0,n.nextPixelsPerSecond);if(!Number.isFinite(n.pointerX)||!Number.isFinite(n.currentScrollLeft)||!Number.isFinite(n.duration)||n.duration<=0||e<=0||t<=0)return Math.max(0,n.currentScrollLeft);const r=Math.max(0,n.currentScrollLeft+n.pointerX-n.gutter),i=Math.max(0,Math.min(n.duration,r/e));return Math.max(0,n.gutter+i*t-n.pointerX)}function Sg(n,e){return!Number.isFinite(n)||!Number.isFinite(e)?tn:tn+Math.max(0,n)*Math.max(0,e)}function Gw(n){return Fl+Math.max(0,n)*Xl+Dw}function Kw(n,e){return!Number.isFinite(n)||!Number.isFinite(e)?!0:n-e<=1}function Jw(n){var t;if(n.key!=="Delete"&&n.key!=="Backspace"||n.metaKey||n.ctrlKey||n.altKey)return!1;const e=n.target&&typeof n.target=="object"?n.target:null;if(e){const r=((t=e.tagName)==null?void 0:t.toLowerCase())??"";if(e.isContentEditable||["input","textarea","select"].includes(r)||typeof e.closest=="function"&&e.closest("[contenteditable='true']"))return!1}return!0}function eS(n,e){return n.length===0?0:e==null||e<0?n[0]:e>=n.length?Math.max(...n)+1:n[e]??n[n.length-1]??0}function bg(n,e,t){const r=e-n.rectLeft+n.scrollLeft-tn,i=t-n.rectTop+n.scrollTop-Fl,s=Math.max(0,Math.min(n.duration,Math.round(r/Math.max(n.pixelsPerSecond,1)*100)/100)),o=Math.floor(i/Math.max(n.trackHeight,1));return{start:s,track:eS(n.trackOrder,o)}}const tS=h.memo(function({onSeek:e,onDrillDown:t,renderClipContent:r,renderClipOverlay:i,onFileDrop:s,onAssetDrop:o,onDeleteElement:c,onMoveElement:u,onResizeElement:f,onBlockedEditAttempt:p,theme:O}={}){const y=h.useMemo(()=>({...L6,...O}),[O]),v=Ve(_=>_.elements),S=Ve(_=>_.duration),b=Ve(_=>_.timelineReady),P=Ve(_=>_.selectedElementId),A=Ve(_=>_.setSelectedElementId),z=Ve(_=>_.updateElement),M=Ve(_=>_.currentTime),C=Ve(_=>_.zoomMode),Z=Ve(_=>_.manualZoomPercent),H=Ve(_=>_.setZoomMode),j=Ve(_=>_.setManualZoomPercent),N=h.useRef(null),ne=h.useRef(null),se=h.useRef(null),[le,T]=h.useState(null),re=h.useRef(!1),ce=h.useRef(null),[Y,G]=h.useState(!1);Lt(()=>{const _=pe=>pe.key==="Shift"&&G(!0),me=pe=>pe.key==="Shift"&&G(!1),Oe=()=>G(!1);return window.addEventListener("keydown",_),window.addEventListener("keyup",me),window.addEventListener("blur",Oe),()=>{window.removeEventListener("keydown",_),window.removeEventListener("keyup",me),window.removeEventListener("blur",Oe)}});const oe=h.useRef(!1),B=h.useRef(0),[D,W]=h.useState(null),[$,V]=h.useState(null),R=h.useRef(null);R.current=$;const[te,ie]=h.useState(null),Ae=h.useRef(null);Ae.current=te;const ye=h.useRef(null),Le=h.useRef(!1),Fe=h.useRef(u);Fe.current=u;const rt=h.useRef(f);rt.current=f;const rn=h.useRef(c);rn.current=c;const Ut=h.useRef(!1),[_e,He]=h.useState(!1),[We,st]=h.useState(!0),[ze,et]=h.useState(0),pt=h.useRef(null),gt=h.useRef(0),Mt=h.useCallback(()=>{const _=se.current;st(_?Kw(_.scrollHeight,_.clientHeight):!0)},[]),Vn=h.useCallback(()=>{gt.current&&cancelAnimationFrame(gt.current),gt.current=requestAnimationFrame(()=>{gt.current=0,Mt()})},[Mt]),ti=h.useCallback(_=>{pt.current&&(pt.current.disconnect(),pt.current=null),ne.current=_,_&&(et(_.clientWidth),Vn(),pt.current=new ResizeObserver(([me])=>{et(me.contentRect.width),Vn()}),pt.current.observe(_))},[Vn]);Lt(()=>()=>{var _;(_=pt.current)==null||_.disconnect(),gt.current&&cancelAnimationFrame(gt.current)});const tt=h.useMemo(()=>{const _=Number.isFinite(S)?S:0;if(v.length===0)return _;const me=Math.max(...v.map(pe=>pe.start+pe.duration)),Oe=Math.max(_,me);return Number.isFinite(Oe)?Oe:_},[v,S]),fn=h.useMemo(()=>{const _=new Map;for(const me of v){const Oe=_.get(me.track)??[];Oe.push(me),_.set(me.track,Oe)}return Array.from(_.entries()).sort(([me],[Oe])=>me-Oe)},[v]),ni=h.useMemo(()=>{var me;const _=new Map;for(const[Oe,pe]of fn)_.set(Oe,ea(((me=pe[0])==null?void 0:me.tag)??""));return _},[fn]),Tt=h.useMemo(()=>fn.map(([_])=>_),[fn]),Ln=h.useRef(Tt);Ln.current=Tt;const Hn=h.useMemo(()=>!($!=null&&$.started)||Tt.length===0||Tt.includes($.previewTrack)?Tt:[...Tt,$.previewTrack].sort((_,me)=>_-me),[$,Tt]),Nn=Gw(Hn.length),sn=h.useMemo(()=>v.find(_=>(_.key??_.id)===P)??null,[v,P]),pn=h.useRef(sn);pn.current=sn;const ri=ze>tn&&tt>0?(ze-tn-2)/tt:100,vt=Tw(ri,C,Z),Nr=Math.max(0,tt*vt),dr=h.useRef(C);dr.current=C;const Xr=h.useRef(Z);Xr.current=Z;const hr=h.useRef(C),Ci=h.useRef(ri);Ci.current=ri;const kn=h.useRef(tt);kn.current=tt;const ln=h.useRef(vt);ln.current=vt;const Gt=h.useCallback(_=>{!N.current||kn.current<=0||(N.current.style.left=`${Sg(_,ln.current)}px`)},[]);h.useEffect(()=>{Gt(M)},[M,vt,Gt]),h.useEffect(()=>{const _=se.current;if(!_){hr.current=C;return}_.scrollLeft=qw(hr.current,C,_.scrollLeft),hr.current=C},[C]),Lt(()=>ka.subscribe(me=>{const Oe=kn.current;if(!N.current||Oe<=0)return;const pe=Sg(me,ln.current);N.current.style.left=`${pe}px`;const je=se.current;if(je&&!re.current&&wg(dr.current,je.scrollWidth,je.clientWidth)){const we=je.scrollLeft+je.clientWidth,ht=je.scrollLeft,Nt=je.clientWidth*.12;pe>we-Nt?je.scrollLeft=pe-je.clientWidth*.15:pe<ht+tn&&(je.scrollLeft=Math.max(0,pe-tn))}}));const fr=h.useRef(0),mn=h.useRef(0),St=h.useRef(null),Wt=h.useCallback((_,me,Oe)=>{const pe=se.current,je=gw({start:_.element.start,track:_.element.track,duration:_.element.duration,originClientX:_.originClientX,originClientY:_.originClientY,originScrollLeft:_.originScrollLeft,originScrollTop:_.originScrollTop,currentScrollLeft:(pe==null?void 0:pe.scrollLeft)??_.originScrollLeft,currentScrollTop:(pe==null?void 0:pe.scrollTop)??_.originScrollTop,pixelsPerSecond:ln.current,trackHeight:Xl,maxStart:Math.max(0,kn.current-_.element.duration),trackOrder:Ln.current},me,Oe);return{..._,started:!0,pointerClientX:me,pointerClientY:Oe,previewStart:je.start,previewTrack:je.track}},[]),Wn=h.useCallback(()=>{St.current=null,mn.current&&(cancelAnimationFrame(mn.current),mn.current=0)},[]),pr=h.useCallback(()=>{mn.current=0;const _=R.current,me=St.current,Oe=se.current;if(!_||!me||!Oe)return;const pe=Oe.getBoundingClientRect(),je=ug(pe,me.clientX,me.clientY);if(je.x===0&&je.y===0)return;const we=Math.max(0,Oe.scrollWidth-Oe.clientWidth),ht=Math.max(0,Oe.scrollHeight-Oe.clientHeight),Nt=Math.max(0,Math.min(we,Oe.scrollLeft+je.x)),ft=Math.max(0,Math.min(ht,Oe.scrollTop+je.y));(Nt!==Oe.scrollLeft||ft!==Oe.scrollTop)&&(Oe.scrollLeft=Nt,Oe.scrollTop=ft,V(Qt=>Qt&&Wt(Qt,me.clientX,me.clientY)),mn.current=requestAnimationFrame(pr))},[Wt]),ii=h.useCallback((_,me)=>{St.current={clientX:_,clientY:me};const Oe=se.current;if(!Oe)return;const pe=Oe.getBoundingClientRect(),je=ug(pe,_,me);if(je.x===0&&je.y===0){mn.current&&(cancelAnimationFrame(mn.current),mn.current=0);return}mn.current||(mn.current=requestAnimationFrame(pr))},[pr]),$n=h.useRef(Wt);$n.current=Wt;const Mi=h.useRef(ii);Mi.current=ii;const Bn=h.useRef(Wn);Bn.current=Wn;const Pn=h.useCallback(_=>{const me=se.current;if(!me||tt<=0)return;const Oe=me.getBoundingClientRect(),pe=me.scrollLeft,je=_-Oe.left+pe-tn;if(je<0)return;const we=Math.max(0,Math.min(tt,je/vt));ka.notify(we),e==null||e(we)},[tt,e,vt]),Kt=h.useCallback(_=>{cancelAnimationFrame(fr.current);const me=se.current;if(!me||!re.current||!wg(dr.current,me.scrollWidth,me.clientWidth))return;const Oe=me.getBoundingClientRect(),pe=40,je=12;let we=0;if(_<Oe.left+pe){const ht=Math.max(0,1-(_-Oe.left)/pe);we=-je*ht}else if(_>Oe.right-pe){const ht=Math.max(0,1-(Oe.right-_)/pe);we=je*ht}we!==0&&(me.scrollLeft+=we,Pn(_),fr.current=requestAnimationFrame(()=>Kt(_)))},[Pn]);Lt(()=>{const _=()=>{requestAnimationFrame(()=>{Ut.current=!1})},me=pe=>{const je=R.current,we=Ae.current,ht=ye.current;if(we){const ft=Math.abs(pe.clientX-we.originClientX);if(!we.started&&ft<2)return;He(!1),W(null);const Qn=we.element.sourceDuration!=null?Math.max(0,(we.element.sourceDuration-(we.element.playbackStart??0))/Math.max(we.element.playbackRate??1,.1)):Number.POSITIVE_INFINITY,Qt=we.element.tag.toLowerCase(),rs=Qt==="audio"||Qt==="video",Xt=Ow({start:we.element.start,duration:we.element.duration,originClientX:we.originClientX,pixelsPerSecond:ln.current,minStart:0,maxEnd:Math.min(kn.current,we.element.start+Qn),playbackStart:we.edge==="start"&&rs?we.element.playbackStart??0:we.element.playbackStart,playbackRate:we.element.playbackRate},we.edge,pe.clientX);ie(Yn=>Yn&&{...Yn,started:!0,previewStart:Xt.start,previewDuration:Xt.duration,previewPlaybackStart:Xt.playbackStart});return}if(ht){const ft=Math.hypot(pe.clientX-ht.originClientX,pe.clientY-ht.originClientY),Qn=ht.intent==="move"?4:2;if(!ht.started&&ft<Qn)return;ht.started||(ht.started=!0,ye.current=ht,Ut.current=!0,He(!1),W(null),p==null||p(ht.element,ht.intent));return}if(!je)return;const Nt=Math.hypot(pe.clientX-je.originClientX,pe.clientY-je.originClientY);!je.started&&Nt<4||(He(!1),W(null),V(ft=>ft&&$n.current(ft,pe.clientX,pe.clientY)),Mi.current(pe.clientX,pe.clientY))},Oe=()=>{var Nt,ft;Bn.current();const pe=Ae.current;if(pe){if(Ae.current=null,ie(null),!pe.started||(Ut.current=!0,_(),!(pe.previewStart!==pe.element.start||pe.previewDuration!==pe.element.duration||pe.previewPlaybackStart!==pe.element.playbackStart)))return;z(pe.element.key??pe.element.id,{start:pe.previewStart,duration:pe.previewDuration,playbackStart:pe.previewPlaybackStart}),Promise.resolve((Nt=rt.current)==null?void 0:Nt.call(rt,pe.element,{start:pe.previewStart,duration:pe.previewDuration,playbackStart:pe.previewPlaybackStart})).catch(Qt=>{z(pe.element.key??pe.element.id,{start:pe.element.start,duration:pe.element.duration,playbackStart:pe.element.playbackStart}),console.error("[Timeline] Failed to persist clip resize",Qt)});return}const je=ye.current;if(je){if(ye.current=null,!je.started)return;_();return}const we=R.current;!we||(R.current=null,V(null),!we.started)||(Ut.current=!0,_(),!(we.previewStart!==we.element.start||we.previewTrack!==we.element.track))||(z(we.element.key??we.element.id,{start:we.previewStart,track:we.previewTrack}),Promise.resolve((ft=Fe.current)==null?void 0:ft.call(Fe,we.element,{start:we.previewStart,track:we.previewTrack})).catch(Qn=>{z(we.element.key??we.element.id,{start:we.element.start,track:we.element.track}),console.error("[Timeline] Failed to persist clip move",Qn)}))};return window.addEventListener("pointermove",me),window.addEventListener("pointerup",Oe),window.addEventListener("pointercancel",Oe),()=>{Bn.current(),window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",Oe),window.removeEventListener("pointercancel",Oe)}}),Lt(()=>{const _=me=>{if(!Jw(me))return;const Oe=pn.current,pe=rn.current;!Oe||!pe||Le.current||(me.preventDefault(),Le.current=!0,Ut.current=!0,He(!1),W(null),Promise.resolve(pe(Oe)).finally(()=>{Le.current=!1,requestAnimationFrame(()=>{Ut.current=!1})}))};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)});const Ji=h.useCallback(_=>{var me,Oe;if(_.button===0){if(_.shiftKey){_.currentTarget.setPointerCapture(_.pointerId),oe.current=!0,He(!1);const pe=(me=se.current)==null?void 0:me.getBoundingClientRect();if(pe){const je=_.clientX-pe.left+(((Oe=se.current)==null?void 0:Oe.scrollLeft)??0)-tn,we=Math.max(0,je/vt);B.current=we,W({start:we,end:we,anchorX:_.clientX,anchorY:_.clientY})}return}ce.current=null,!_.target.closest("[data-clip]")&&(_.currentTarget.setPointerCapture(_.pointerId),re.current=!0,W(null),He(!1),Pn(_.clientX))}},[Pn,vt]),es=h.useCallback(_=>{var me,Oe;if(oe.current){const pe=(me=se.current)==null?void 0:me.getBoundingClientRect();if(pe){const je=_.clientX-pe.left+(((Oe=se.current)==null?void 0:Oe.scrollLeft)??0)-tn,we=Math.max(0,je/vt);W(ht=>ht?{...ht,end:we,anchorX:_.clientX,anchorY:_.clientY}:null)}return}re.current&&(Pn(_.clientX),Kt(_.clientX))},[Pn,Kt,vt]),ts=h.useCallback(()=>{if(oe.current){oe.current=!1;const _=ce.current;ce.current=null,W(me=>me&&_&&Math.abs(me.end-me.start)<=.2?(He(!0),Sw(_.element,_)):me&&Math.abs(me.end-me.start)>.2?(He(!0),me):null);return}re.current=!1,cancelAnimationFrame(fr.current)},[]),{major:wt,minor:ko}=h.useMemo(()=>Bw(tt,vt),[tt,vt]),$o=wt.length>=2?Math.max(.25,wt[1]-wt[0]):tt;h.useEffect(()=>{Mt()},[Mt,b,v.length,Nn]);const _r=h.useCallback(_=>(te==null?void 0:te.element.id)===_.id?{..._,start:te.previewStart,duration:te.previewDuration,playbackStart:te.previewPlaybackStart}:_,[te]),[Ot,si]=h.useState(!1),gn=h.useCallback(_=>{const me=_.dataTransfer.files.length>0,Oe=Array.from(_.dataTransfer.types).includes($h);!me&&!Oe||(_.preventDefault(),Oe&&(_.dataTransfer.dropEffect="copy"),si(!0))},[]),ns=h.useCallback(_=>{if(_.preventDefault(),si(!1),s&&_.dataTransfer.files.length>0){const Oe=se.current,pe=Oe==null?void 0:Oe.getBoundingClientRect(),je=Oe&&pe?bg({rectLeft:pe.left,rectTop:pe.top,scrollLeft:Oe.scrollLeft,scrollTop:Oe.scrollTop,pixelsPerSecond:ln.current,duration:kn.current,trackHeight:Xl,trackOrder:Ln.current},_.clientX,_.clientY):void 0;s(Array.from(_.dataTransfer.files),je);return}const me=_.dataTransfer.getData($h);if(!(!me||!o))try{const Oe=JSON.parse(me);if(!Oe.path)return;const pe=se.current,je=pe==null?void 0:pe.getBoundingClientRect();if(!pe||!je)return;const we=bg({rectLeft:je.left,rectTop:je.top,scrollLeft:pe.scrollLeft,scrollTop:pe.scrollTop,pixelsPerSecond:ln.current,duration:kn.current,trackHeight:Xl,trackOrder:Ln.current},_.clientX,_.clientY);o(Oe.path,we)}catch{}},[o,s]),Dr=h.useCallback(_=>{if(!_.ctrlKey)return;const me=se.current;if(!me||kn.current<=0||Ci.current<=0||ln.current<=0)return;_.preventDefault(),_.stopPropagation();const Oe=me.getBoundingClientRect(),pe=_.clientX-Oe.left,je=Ew(_.deltaY,dr.current,Xr.current);if(je===Xr.current&&dr.current==="manual")return;const we=Ci.current*(je/100),ht=Uw({pointerX:pe,currentScrollLeft:me.scrollLeft,gutter:tn,currentPixelsPerSecond:ln.current,nextPixelsPerSecond:we,duration:kn.current});H("manual"),j(je),requestAnimationFrame(()=>{const Nt=Math.max(0,me.scrollWidth-me.clientWidth);me.scrollLeft=Math.min(Nt,ht)})},[j,H]);if(h.useEffect(()=>{const _=se.current;if(_)return _.addEventListener("wheel",Dr,{passive:!1,capture:!0}),()=>{_.removeEventListener("wheel",Dr,{capture:!0})}},[Dr,b,v.length]),!b||v.length===0)return g.jsxs("div",{className:`h-full border-t bg-[#0a0a0b] flex flex-col select-none transition-colors duration-150 ${Ot?"border-studio-accent/50 bg-studio-accent/[0.03]":"border-neutral-800/50"}`,onDragOver:gn,onDragLeave:()=>si(!1),onDrop:ns,children:[g.jsx("div",{className:"flex-shrink-0 border-b border-neutral-800/40 flex items-end relative",style:{height:Fl,paddingLeft:tn},children:[0,10,20,30,40,50].map(_=>g.jsxs("div",{className:"flex flex-col items-center",style:{position:"absolute",left:tn+_*14},children:[g.jsx("span",{className:"text-[9px] text-neutral-600 font-mono tabular-nums leading-none mb-0.5",children:`${Math.floor(_/60)}:${(_%60).toString().padStart(2,"0")}`}),g.jsx("div",{className:"w-px h-[5px] bg-neutral-700/40"})]},_))}),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 ${Ot?"border-studio-accent/60 bg-studio-accent/[0.06]":"border-neutral-700/50"}`,children:Ot?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:s?"Drop media here or describe your video to start":"Describe your video to start creating"})]})})})]});const Pt=($==null?void 0:$.element)??null,Xn=($==null?void 0:$.started)===!0&&Pt?mw({element:Pt,draggedElementId:Pt.id,previewStart:$.previewStart,previewTrack:$.previewTrack}):null,Rs=($==null?void 0:$.started)===!0&&Xn&&se.current?{left:$.pointerClientX-se.current.getBoundingClientRect().left+se.current.scrollLeft-$.pointerOffsetX,top:$.pointerClientY-se.current.getBoundingClientRect().top+se.current.scrollTop-$.pointerOffsetY}:null,fl=(_,me)=>g.jsxs(g.Fragment,{children:[i==null?void 0:i(_),g.jsx("div",{className:r?"absolute inset-0 overflow-hidden":"flex flex-col justify-center overflow-hidden flex-1 min-w-0 px-6",children:(r==null?void 0:r(_,me))??g.jsxs("div",{className:"flex h-full min-h-0 flex-col justify-between py-3",children:[g.jsx("div",{className:"flex items-start",children:g.jsx("span",{className:"max-w-full truncate rounded-md px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-[0.08em] leading-none",style:{color:me.label,background:`${me.accent}26`,boxShadow:`inset 0 0 0 1px ${me.accent}33`},children:_.tag})}),g.jsx("div",{className:"flex items-center",children:g.jsxs("span",{className:"max-w-full truncate rounded-md px-1.5 py-0.5 text-[10px] font-medium tabular-nums leading-none",style:{color:y.textSecondary,background:"rgba(255,255,255,0.04)"},children:[sr(_.start)," ","→"," ",sr(_.start+_.duration)]})})]})})]});return g.jsxs("div",{ref:ti,"aria-label":"Timeline",className:`relative border-t select-none h-full overflow-hidden ${Y?"cursor-crosshair":"cursor-default"}`,style:{touchAction:"pan-x pan-y",background:y.shellBackground,borderColor:y.shellBorder},children:[g.jsx("div",{ref:se,className:`${C==="fit"?"overflow-x-hidden":"overflow-x-auto"} overflow-y-auto h-full`,onDragOver:gn,onDragLeave:()=>si(!1),onDrop:ns,onPointerDown:Ji,onPointerMove:es,onPointerUp:ts,onLostPointerCapture:ts,children:g.jsxs("div",{className:"relative",style:{height:Nn,width:tn+Nr},children:[g.jsx("svg",{className:"absolute pointer-events-none",style:{left:tn,width:Nr},height:Nn,children:wt.map(_=>{const me=_*vt;return g.jsx("line",{x1:me,y1:Fl,x2:me,y2:Nn,stroke:y.tickMinor,strokeWidth:"1"},`g-${_}`)})}),g.jsxs("div",{className:"relative overflow-hidden",style:{height:Fl,marginLeft:tn,width:Nr},children:[Y&&!D&&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:y.textSecondary},children:"Drag or click a clip to edit range"})}),ko.map(_=>g.jsx("div",{className:"absolute bottom-0",style:{left:_*vt},children:g.jsx("div",{className:"w-px h-[3px]",style:{background:y.tickMinor}})},`m-${_}`)),wt.map(_=>g.jsxs("div",{className:"absolute bottom-0 flex flex-col items-center",style:{left:_*vt},children:[g.jsx("span",{className:"text-[9px] font-mono tabular-nums leading-none mb-0.5",style:{color:y.tickText},children:Yw(_,tt,$o)}),g.jsx("div",{className:"w-px h-[5px]",style:{background:y.tickMajor}})]},`M-${_}`))]}),Hn.map(_=>{var je;const me=((je=fn.find(([we])=>we===_))==null?void 0:je[1])??[],Oe=ni.get(_)??ea(""),pe=($==null?void 0:$.started)===!0&&!Tt.includes(_)&&me.length===0;return g.jsxs("div",{className:"relative flex",style:{height:Xl,background:y.rowBackground,borderBottom:`1px solid ${y.rowBorder}`},children:[g.jsx("div",{className:"flex-shrink-0 flex items-center justify-center",style:{width:tn,background:y.gutterBackground,borderRight:`1px solid ${y.gutterBorder}`},children:g.jsx("div",{className:"flex items-center justify-center",style:{width:18,height:18,borderRadius:6,backgroundColor:Oe.iconBackground,border:`1px solid ${y.gutterBorder}`,color:"#fff"},children:Oe.icon})}),g.jsxs("div",{style:{width:Nr},className:"relative",children:[pe&&g.jsx("div",{className:"absolute inset-0 flex items-center",style:{paddingLeft:16,color:Oe.label,fontSize:11,letterSpacing:"0.08em",textTransform:"uppercase",background:`linear-gradient(90deg, ${Oe.accent}14, transparent 28%)`,boxShadow:`inset 0 0 0 1px ${Oe.accent}24`},children:"New track"}),me.map((we,ht)=>{const Nt=ea(we.tag),ft=we.key??we.id,Qn=N6(we),Qt=P===ft,rs=!!we.compositionSrc,Xt=`${ft}-${ht}`,Yn=le===Xt,li=!!r;if(($==null?void 0:$.started)===!0&&((Pt==null?void 0:Pt.key)??(Pt==null?void 0:Pt.id))===ft)return null;const oi=_r(we);return g.jsx(hg,{el:oi,pps:vt,clipY:Og,isSelected:Qt,isHovered:Yn,isDragging:!1,hasCustomContent:li,theme:y,trackStyle:Nt,isComposition:rs,onHoverStart:()=>T(Xt),onHoverEnd:()=>T(null),onResizeStart:(xt,Ti)=>{Ti.button!==0||Ti.shiftKey||!f||xt==="start"&&!Qn.canTrimStart||xt==="end"&&!Qn.canTrimEnd||(Ti.stopPropagation(),ye.current=null,He(!1),W(null),ie({element:we,edge:xt,originClientX:Ti.clientX,previewStart:we.start,previewDuration:we.duration,previewPlaybackStart:we.playbackStart,started:!1}))},onPointerDown:xt=>{var Ls,ci;if(xt.button!==0)return;if(xt.shiftKey){ce.current={element:we,anchorX:xt.clientX,anchorY:xt.clientY};return}const Ei=xt.currentTarget.getBoundingClientRect(),ai=ww({width:Ei.width,offsetX:xt.clientX-Ei.left,handleWidth:_w,capabilities:Qn});if(ai&&(ai==="move"&&u||ai!=="move"&&f)){ye.current={element:we,intent:ai,originClientX:xt.clientX,originClientY:xt.clientY,started:!1};return}!u||!Qn.canMove||(ye.current=null,He(!1),W(null),V({element:we,originClientX:xt.clientX,originClientY:xt.clientY,originScrollLeft:((Ls=se.current)==null?void 0:Ls.scrollLeft)??0,originScrollTop:((ci=se.current)==null?void 0:ci.scrollTop)??0,pointerClientX:xt.clientX,pointerClientY:xt.clientY,pointerOffsetX:xt.clientX-Ei.left,pointerOffsetY:xt.clientY-Ei.top,previewStart:we.start,previewTrack:we.track,started:!1}))},onClick:xt=>{xt.stopPropagation(),!Ut.current&&A(Qt?null:ft)},onDoubleClick:xt=>{xt.stopPropagation(),!Ut.current&&rs&&t&&t(we)},children:fl(oi,Nt)},Xt)})]})]},_)}),Xn&&Rs&&g.jsx("div",{className:"absolute pointer-events-none",style:{top:Rs.top,left:Rs.left,width:Math.max(Xn.duration*vt,4),height:Xl-Og*2,zIndex:40},children:g.jsx(hg,{el:{...Xn,start:0},pps:vt,clipY:0,isSelected:P===(Xn.key??Xn.id),isHovered:!1,isDragging:!0,hasCustomContent:!!r,theme:y,trackStyle:ea(Xn.tag),isComposition:!!Xn.compositionSrc,onHoverStart:()=>{},onHoverEnd:()=>{},onResizeStart:()=>{},onClick:()=>{},onDoubleClick:()=>{},children:fl(Xn,ea(Xn.tag))})}),D&&g.jsx("div",{className:"absolute pointer-events-none",style:{left:tn+Math.min(D.start,D.end)*vt,width:Math.abs(D.end-D.start)*vt,top:Fl,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:N,className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${tn}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))"}})})]})]})}),We&&!_e&&!D&&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:y.gutterBorder},children:[g.jsx("kbd",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:y.textSecondary,background:"rgba(255,255,255,0.06)"},children:"Shift"}),g.jsx("span",{className:"text-[9px]",style:{color:y.textSecondary},children:"+ drag/click to edit range"})]})}),_e&&D&&g.jsx($w,{rangeStart:D.start,rangeEnd:D.end,anchorX:D.anchorX,anchorY:D.anchorY,onClose:()=>{He(!1),W(null)}})]})}),kg=66,$g=6,nS=h.memo(function({videoSrc:e,label:t,labelColor:r,duration:i=5}){const[s,o]=h.useState(0),[c,u]=h.useState(!1),[f,p]=h.useState([]),[O,y]=h.useState(16/9),v=h.useRef(null),S=h.useRef(null),b=h.useRef(!1),P=h.useCallback(M=>{var H,j,N;if((H=v.current)==null||H.disconnect(),(j=S.current)==null||j.disconnect(),!M)return;const C=((N=M.parentElement)==null?void 0:N.clientWidth)||M.clientWidth;o(C),v.current=new IntersectionObserver(([ne])=>{var se;ne.isIntersecting&&(u(!0),(se=v.current)==null||se.disconnect())},{rootMargin:"200px"}),v.current.observe(M);const Z=M.parentElement||M;S.current=new ResizeObserver(([ne])=>{o(ne.contentRect.width)}),S.current.observe(Z)},[]);Lt(()=>()=>{var M,C;(M=v.current)==null||M.disconnect(),(C=S.current)==null||C.disconnect()}),h.useEffect(()=>{if(!c||b.current)return;b.current=!0;const M=document.createElement("video");M.crossOrigin="anonymous",M.muted=!0,M.preload="auto";const C=document.createElement("canvas"),Z=C.getContext("2d");if(!Z){b.current=!1;return}const H=[],j=Math.min(.4,i*.05);for(let le=0;le<$g;le++){const T=le/($g-1)*i;H.push(Math.max(T,j))}let N=0,ne=!1;const se=()=>{if(ne||N>=H.length){ne||(M.src="",M.load());return}M.currentTime=H[N]};return M.addEventListener("loadedmetadata",()=>{if(M.videoWidth>0&&M.videoHeight>0){y(M.videoWidth/M.videoHeight);const le=kg*2,T=Math.round(le*(M.videoWidth/M.videoHeight));C.width=T,C.height=le}se()}),M.addEventListener("seeked",()=>{if(ne)return;Z.drawImage(M,0,0,C.width,C.height);const le=C.toDataURL("image/jpeg",.6);p(T=>[...T,le]),N++,se()}),M.addEventListener("error",()=>{}),M.src=e,M.load(),()=>{ne=!0,b.current=!1,p([]),M.src="",M.load()}},[c,e,i]);const A=Math.round(kg*O),z=s>0?Math.max(1,Math.ceil(s/A)):1;return g.jsxs("div",{ref:P,className:"absolute inset-0 overflow-hidden",children:[c&&f.length>0&&g.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:z}).map((M,C)=>{const Z=f[C%f.length];return g.jsx("div",{className:"flex-shrink-0 h-full relative overflow-hidden bg-neutral-900",style:{width:A},children:g.jsx("img",{src:Z,alt:"",draggable:!1,className:"absolute inset-0 w-full h-full object-cover"})},C)})}),c&&f.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:t})})]})}),rS=66,iS="v2";function sS({previewUrl:n,seekTime:e=2,duration:t=5,selector:r,selectorIndex:i,origin:s}){const o=n.replace("/preview/comp/","/thumbnail/").replace(/\/preview$/,"/thumbnail/index.html"),c=e+t/2,u=new URL(o,s);return u.searchParams.set("t",c.toFixed(2)),u.searchParams.set("v",iS),r&&(u.searchParams.set("selector",r),i!=null&&i>0&&u.searchParams.set("selectorIndex",String(i))),u.toString()}const Cd=h.memo(function({previewUrl:e,label:t,labelColor:r,accentColor:i="#6B7280",selector:s,selectorIndex:o,seekTime:c=2,duration:u=5}){const[f,p]=h.useState(0),[O,y]=h.useState(!1),[v,S]=h.useState(16/9),b=h.useRef(null),P=h.useCallback(C=>{var j,N;if((j=b.current)==null||j.disconnect(),!C)return;const Z=((N=C.parentElement)==null?void 0:N.clientWidth)||C.clientWidth;p(Z);const H=C.parentElement||C;b.current=new ResizeObserver(([ne])=>{p(ne.contentRect.width)}),b.current.observe(H)},[]);Lt(()=>()=>{var C;(C=b.current)==null||C.disconnect()});const A=sS({previewUrl:e,seekTime:c,duration:u,selector:s,selectorIndex:o,origin:window.location.origin}),z=Math.max(48,Math.round(rS*v)),M=f>0?Math.max(1,Math.ceil(f/z)):1;return g.jsxs("div",{ref:P,className:"absolute inset-0 overflow-hidden",children:[g.jsx("img",{src:A,alt:"",draggable:!1,loading:"eager",onLoad:C=>{const Z=C.currentTarget;Z.naturalWidth>0&&Z.naturalHeight>0&&S(Z.naturalWidth/Z.naturalHeight),y(!0)},className:"hidden"}),O?g.jsx("div",{className:"absolute inset-0 flex",children:Array.from({length:M}).map((C,Z)=>g.jsx("div",{className:"relative h-full flex-shrink-0 overflow-hidden",style:{width:z},children:g.jsx("img",{src:A,alt:"",draggable:!1,className:"absolute inset-0 h-full w-full object-cover opacity-60"})},Z))}):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 inset-0",style:{background:`linear-gradient(120deg, ${i}2e, transparent 34%), linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.08))`}}),g.jsx("div",{className:"absolute left-2 top-2 z-10",children:g.jsx("span",{className:"block max-w-full truncate rounded-md px-1.5 py-0.5 text-[9px] font-semibold uppercase leading-none",style:{color:r,background:`${i}2e`,boxShadow:`inset 0 0 0 1px ${i}40`},children:t})}),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:"block truncate text-[9px] font-semibold leading-tight",style:{color:r,textShadow:"0 1px 2px rgba(0,0,0,0.9)"},children:t})})]})});function Pg(n){return{play:()=>n.play(),pause:()=>n.pause(),seek:e=>{n.pause(),n.seek(e)},getTime:()=>n.time(),getDuration:()=>n.duration(),isPlaying:()=>n.isActive()}}function _6(n){if(n instanceof HTMLMediaElement||n instanceof HTMLImageElement)return n;const e=n.querySelector("video, audio, img");return e instanceof HTMLMediaElement||e instanceof HTMLImageElement?e:null}function D6(n,e){const t=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 f=parseFloat(r);Number.isFinite(f)&&(n.playbackStart=f)}t&&(n.playbackStartAttr=t);const i=_6(e);if(!i)return;n.tag=i.tagName.toLowerCase();const s=i.getAttribute("src");if(s&&(n.src=s),!(i instanceof HTMLMediaElement))return;const o=e.getAttribute("data-source-duration")??i.getAttribute("data-source-duration"),c=o?parseFloat(o):i.duration;Number.isFinite(c)&&c>0&&(n.sourceDuration=c);const u=i.defaultPlaybackRate;Number.isFinite(u)&&u>0&&(n.playbackRate=u)}function Qg(n,e){const t=n.querySelector("[data-composition-id]"),r=n.querySelectorAll("[data-start]"),i=[];let s=0;return r.forEach(o=>{var j;if(o===t)return;const c=o,u=c.getAttribute("data-start");if(u==null)return;const f=parseFloat(u);if(isNaN(f)||Number.isFinite(e)&&e>0&&f>=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-f)),Number.isFinite(e)&&e>0&&(O=Math.min(O,Math.max(0,e-f))),!Number.isFinite(O)||O<=0)return;const v=c.getAttribute("data-track-index"),S=v!=null?parseInt(v,10):s++,b=c.getAttribute("data-composition-id"),P=aa(c),A=Eu(c),z=Zu(n,c,P),M=c.id||b||((j=c.className)==null?void 0:j.split(" ")[0])||p,C={id:M,key:Bu({id:M,fallbackIndex:i.length,domId:c.id||void 0,selector:P,selectorIndex:z,sourceFile:A}),tag:p,start:f,duration:O,track:isNaN(S)?0:S,domId:c.id||void 0,selector:P,selectorIndex:z,sourceFile:A},Z=_6(c);if(Z){Z.tagName==="IMG"&&(C.tag="img");const N=Z.getAttribute("src");N&&(C.src=N);const ne=c.getAttribute("data-volume")??Z.getAttribute("data-volume");ne&&(C.volume=parseFloat(ne)),D6(C,c)}const H=c.getAttribute("data-composition-src")||c.getAttribute("data-composition-file");if(H)C.compositionSrc=H;else if(b&&b!==(t==null?void 0:t.getAttribute("data-composition-id"))){const N=c.querySelector("video[src]");N&&(C.src=N.getAttribute("src")||void 0,C.tag="video")}i.push(C)}),i}function Ag(n){var t;const e=((t=n.ownerDocument.defaultView)==null?void 0:t.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&n instanceof e}function aa(n){if(Ag(n)&&n.id)return`#${n.id}`;const e=n.getAttribute("data-composition-id");if(e)return`[data-composition-id="${e}"]`;if(Ag(n)){const t=n.className.split(/\s+/).filter(Boolean),r=t.find(i=>i!=="clip")??t[0];if(r)return`.${r}`}}function Eu(n){var t;const e=(t=n.parentElement)==null?void 0:t.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 Zu(n,e,t){if(!(!t||t.startsWith("#")||t.startsWith("[data-composition-id=")))try{const i=Array.from(n.querySelectorAll(t)).indexOf(e);return i>=0?i:void 0}catch{return}}function Bu(n){const e=n.sourceFile??"index.html";return n.domId?`${e}#${n.domId}`:n.selector?`${e}:${n.selector}:${n.selectorIndex??0}`:`${e}:${n.id}:${n.fallbackIndex}`}function lS(n){const e=n.querySelector("[data-composition-id]");return Array.from(n.querySelectorAll("[data-start]")).filter(t=>t!==e)}function Cg(n,e){return Math.abs(n-e)<.001}function oS(n,e){var o;const t=(o=e.tagName)==null?void 0:o.toLowerCase();if(t&&n.tagName.toLowerCase()!==t)return!1;const r=Number.parseFloat(n.getAttribute("data-start")??"");if(Number.isFinite(r)&&!Cg(r,e.start))return!1;const i=Number.parseFloat(n.getAttribute("data-duration")??"");if(Number.isFinite(i)&&!Cg(i,e.duration))return!1;const s=Number.parseInt(n.getAttribute("data-track-index")??"",10);return!(Number.isFinite(s)&&s!==e.track)}function aS(n,e,t,r=new Set){const i=e.id?cS(n,e.id):null;if(i&&!r.has(i))return i;const s=lS(n).filter(c=>!r.has(c)),o=s.find(c=>oS(c,e));return o||(s[t]??null)}function cS(n,e){return n.getElementById(e)??n.querySelector(`[data-composition-id="${e}"]`)??n.querySelector(`.${e}`)??null}function uS(n){const e=n.match(/\/preview\/comp\/(.+?)(?:\?|$)/);return e?decodeURIComponent(e[1]):void 0}function dS(n){if(!Number.isFinite(n.rootDuration)||n.rootDuration<=0)return null;const e=uS(n.iframeSrc);return{id:n.compositionId,key:Bu({id:n.compositionId,fallbackIndex:0,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:e}),tag:n.tagName.toLowerCase()||"div",start:0,duration:n.rootDuration,track:0,compositionSrc:e,selector:n.selector,selectorIndex:n.selectorIndex,sourceFile:e}}function hS(n,e){n.documentElement&&(n.documentElement.style.overflow="hidden",n.documentElement.style.margin="0"),n.body&&(n.body.style.overflow="hidden",n.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function fS(n){const e=/data-composition-id=["']([^"']+)["']/gi,t=new Set,r=Array.from(n.querySelectorAll("style, script"));for(const o of r){const c=o.textContent||"";if(!c)continue;let u;for(;(u=e.exec(c))!==null;){const f=(u[1]||"").trim();f&&t.add(f)}}if(t.size===0)return;const i=new Set,s=Array.from(n.querySelectorAll("[data-composition-id]"));for(const o of s){const c=o.getAttribute("data-composition-id");c&&i.add(c)}for(const o of t){if(o==="root"||i.has(o))continue;const c=n.getElementById(`${o}-layer`)||n.getElementById(`${o}-comp`)||n.getElementById(o);c&&(c.getAttribute("data-composition-id")||c.setAttribute("data-composition-id",o))}}function Mg(n){var e;if(n)try{(e=n.contentWindow)==null||e.postMessage({source:"hf-parent",type:"control",action:"set-muted",muted:!1},"*")}catch(t){console.warn("[useTimelinePlayer] Failed to unmute preview media",t)}}function pS(n,e,t,r){const i=Number.isFinite(t)?t:0,s=Number.isFinite(r)?r:0;if(n.length===0||e.length>=n.length||s>i)return e;const o=new Set(e.map(u=>u.id)),c=n.filter(u=>!o.has(u.id));return c.length===0?e:[...e,...c]}function mS(){const n=h.useRef(null),e=h.useRef(0),t=h.useRef(void 0),r=h.useRef(null),i=h.useRef(!1),{setIsPlaying:s,setCurrentTime:o,setDuration:c,setTimelineReady:u,setElements:f}=Ve.getState(),p=h.useCallback((T,re)=>{const ce=Ve.getState(),Y=pS(ce.elements,T,ce.duration,re??ce.duration);f(Y),Number.isFinite(re)&&(re??0)>0&&c(re??0),u(!0)},[f,u,c]),O=h.useCallback(()=>{var T,re;try{const ce=n.current,Y=ce==null?void 0:ce.contentWindow;if(!Y)return null;if(Y.__player&&typeof Y.__player.play=="function")return Y.__player;if(Y.__timeline)return Pg(Y.__timeline);if(Y.__timelines){const G=Object.keys(Y.__timelines);if(G.length>0){const oe=(re=(T=ce==null?void 0:ce.contentDocument)==null?void 0:T.querySelector("[data-composition-id]"))==null?void 0:re.getAttribute("data-composition-id"),B=oe&&oe in Y.__timelines?oe:G[G.length-1];return Pg(Y.__timelines[B])}}return null}catch(ce){return console.warn("[useTimelinePlayer] Could not get playback adapter (cross-origin)",ce),null}},[]),y=h.useCallback(()=>{const T=()=>{const re=O();if(re){const ce=re.getTime(),Y=re.getDuration();if(ka.notify(ce),ce>=Y&&!re.isPlaying()){o(ce),s(!1),cancelAnimationFrame(e.current);return}}e.current=requestAnimationFrame(T)};e.current=requestAnimationFrame(T)},[O,o,s]),v=h.useCallback(()=>{cancelAnimationFrame(e.current)},[]),S=h.useCallback(T=>{var ce;const re=n.current;if(re){(ce=re.contentWindow)==null||ce.postMessage({source:"hf-parent",type:"control",action:"set-playback-rate",playbackRate:T},"*");try{const Y=re.contentWindow;if(Y!=null&&Y.__timelines)for(const G of Object.values(Y.__timelines))G&&typeof G.timeScale=="function"&&G.timeScale(T)}catch(Y){console.warn("[useTimelinePlayer] Could not set playback rate (cross-origin)",Y)}}},[]),b=h.useCallback(()=>{const T=O();T&&(T.getTime()>=T.getDuration()&&T.seek(0),Mg(n.current),S(Ve.getState().playbackRate),T.play(),s(!0),y())},[O,s,y,S]),P=h.useCallback(()=>{const T=O();T&&(T.pause(),o(T.getTime()),s(!1),v())},[O,o,s,v]),A=h.useCallback(()=>{Ve.getState().isPlaying?P():b()},[b,P]),z=h.useCallback(T=>{const re=O();re&&(re.seek(T),ka.notify(T),o(T),v(),Ve.getState().isPlaying&&s(!1))},[O,o,s,v]),M=h.useCallback(T=>{var V;if(!T.clips||T.clips.length===0)return;const re=new Set(T.clips.map(R=>R.compositionId).filter(Boolean)),ce=T.clips.filter(R=>!R.parentCompositionId||!re.has(R.parentCompositionId));let Y=null;try{Y=((V=n.current)==null?void 0:V.contentDocument)??null}catch{Y=null}const G=new Set,oe=ce.map((R,te)=>{var Le;let ie=Y?aS(Y,R,te,G):null;ie&&G.add(ie);const Ae=R.id||R.label||R.tagName||"element",ye={id:Ae,tag:R.tagName||R.kind,start:R.start,duration:R.duration,track:R.track};if(ie&&(ye.domId=ie.id||void 0,ye.selector=aa(ie),ye.selectorIndex=Y&&ye.selector?Zu(Y,ie,ye.selector):void 0,ye.sourceFile=Eu(ie),D6(ye,ie)),R.assetUrl&&(ye.src=R.assetUrl),R.kind==="composition"&&R.compositionId){let Fe=R.compositionSrc;if(Fe||(ie=(Y==null?void 0:Y.querySelector(`[data-composition-id="${R.compositionId}"]`))??ie,Fe=(ie==null?void 0:ie.getAttribute("data-composition-src"))??(ie==null?void 0:ie.getAttribute("data-composition-file"))??null),Fe)ye.compositionSrc=Fe;else if(ie){const rt=ie.querySelector("video[src]");rt&&(ye.src=rt.getAttribute("src")||void 0,ye.tag="video")}if(ie){const rt=(Le=n.current)==null?void 0:Le.contentDocument;ye.domId=ie.id||void 0,ye.selector=aa(ie),ye.selectorIndex=rt&&ye.selector?Zu(rt,ie,ye.selector):void 0,ye.sourceFile=Eu(ie)}}return ye.key=Bu({id:Ae,fallbackIndex:te,domId:ye.domId,selector:ye.selector,selectorIndex:ye.selectorIndex,sourceFile:ye.sourceFile}),ye}),B=T.durationInFrames/30,D=Number.isFinite(B)&&B<7200?B:0,W=D>0?D:Ve.getState().duration,$=W>0?oe.filter(R=>R.start<W).map(R=>({...R,duration:Math.min(R.duration,W-R.start)})).filter(R=>R.duration>0):oe;$.length>0&&p($,D>0?D:void 0)},[p]),C=h.useCallback(()=>{try{const T=n.current,re=T==null?void 0:T.contentDocument,ce=T==null?void 0:T.contentWindow;if(!re||!ce)return;const Y=Ve.getState().elements,G=new Set(Y.map(R=>R.id)),oe=re.querySelector("[data-composition-id]"),B=oe==null?void 0:oe.getAttribute("data-composition-id"),D=re.querySelectorAll("[data-composition-id][data-start]"),W=[];D.forEach(R=>{var et,pt,gt,Mt,Vn,ti,tt,fn,ni;const te=R,ie=te.getAttribute("data-composition-id");if(!ie||ie===B||G.has(te.id)||G.has(ie))return;const Ae=te.getAttribute("data-start")??"0";let ye=parseFloat(Ae);if(isNaN(ye)){const Tt=re.getElementById(Ae)||re.querySelector(`[data-composition-id="${Ae}"]`);if(Tt){const Ln=Tt.getAttribute("data-start")??"0";let Hn=parseFloat(Ln);if(isNaN(Hn)){const pn=re.getElementById(Ln)||re.querySelector(`[data-composition-id="${Ln}"]`),ri=parseFloat((pn==null?void 0:pn.getAttribute("data-start"))??"0")||0,vt=pn==null?void 0:pn.getAttribute("data-composition-id"),Nr=parseFloat((pn==null?void 0:pn.getAttribute("data-duration"))??"")||(vt?((gt=(pt=(et=ce.__timelines)==null?void 0:et[vt])==null?void 0:pt.duration)==null?void 0:gt.call(pt))??0:0);Hn=ri+Nr}const Nn=Tt.getAttribute("data-composition-id"),sn=parseFloat(Tt.getAttribute("data-duration")??"")||(Nn?((ti=(Vn=(Mt=ce.__timelines)==null?void 0:Mt[Nn])==null?void 0:Vn.duration)==null?void 0:ti.call(Vn))??0:0);ye=Hn+sn}else ye=0}let Le=parseFloat(te.getAttribute("data-duration")??"");if((isNaN(Le)||Le<=0)&&(Le=((ni=(fn=(tt=ce.__timelines)==null?void 0:tt[ie])==null?void 0:fn.duration)==null?void 0:ni.call(fn))??0),!Number.isFinite(Le)||Le<=0)return;Number.isFinite(ye)||(ye=0);const Fe=Ve.getState().duration;if(Number.isFinite(Fe)&&Fe>0&&(ye>=Fe||(Le=Math.min(Le,Math.max(0,Fe-ye)),Le<=0)))return;const rt=te.getAttribute("data-track-index"),rn=rt!=null?parseInt(rt,10):0,Ut=te.getAttribute("data-composition-src")||te.getAttribute("data-composition-file"),_e=aa(te),He=Eu(te),We=Zu(re,te,_e),st=te.id||ie,ze={id:st,key:Bu({id:st,fallbackIndex:W.length,domId:te.id||void 0,selector:_e,selectorIndex:We,sourceFile:He}),tag:te.tagName.toLowerCase(),start:ye,duration:Le,track:isNaN(rn)?0:rn,domId:te.id||void 0,selector:_e,selectorIndex:We,sourceFile:He};if(Ut)ze.compositionSrc=Ut;else{const Tt=te.querySelector("video[src]");Tt&&(ze.src=Tt.getAttribute("src")||void 0,ze.tag="video")}W.push(ze)});let $=!1;const V=Y.map(R=>{if(R.compositionSrc)return R;const te=re.getElementById(R.id)??re.querySelector(`[data-composition-id="${R.id}"]`);if(!te)return R;const ie=te.getAttribute("data-composition-src")||te.getAttribute("data-composition-file");return ie?($=!0,{...R,compositionSrc:ie}):R});if(W.length>0||$){const R=new Set(V.map(ie=>ie.id)),te=W.filter(ie=>!R.has(ie.id));p([...V,...te])}}catch(T){console.warn("[useTimelinePlayer] enrichMissingCompositions failed",T)}},[p]),Z=h.useCallback(()=>{Mg(n.current);let T=0;const re=25;t.current&&clearInterval(t.current),t.current=setInterval(()=>{T++;const ce=O();if(ce&&ce.getDuration()>0){clearInterval(t.current),ce.pause();const Y=r.current;r.current=null;const G=Y!=null?Math.min(Y,ce.getDuration()):0;ce.seek(G);const oe=ce.getDuration();Number.isFinite(oe)&&oe>0&&oe<7200&&c(oe),o(G),i.current||u(!0),i.current=!1,s(!1);try{const B=n.current,D=B==null?void 0:B.contentDocument,W=B==null?void 0:B.contentWindow;D&&W&&(hS(D,W),fS(D));const $=W==null?void 0:W.__clipManifest;if($&&$.clips.length>0&&M($),C(),Ve.getState().elements.length===0&&D){const V=Qg(D,ce.getDuration());V.length>0&&p(V)}if(Ve.getState().elements.length===0&&D){const V=D.querySelector("[data-composition-id]"),R=ce.getDuration();if(V&&R>0){const te=dS({compositionId:V.getAttribute("data-composition-id")||"composition",tagName:V.tagName||"div",rootDuration:R,iframeSrc:(B==null?void 0:B.src)||"",selector:aa(V)});te&&p([te])}}}catch(B){console.warn("[useTimelinePlayer] Could not read timeline elements from iframe",B)}return}T>=re&&(clearInterval(t.current),console.warn("Could not find __player, __timeline, or __timelines on iframe after 5s"))},200)},[O,c,o,u,s,M,C,p]),H=h.useCallback(()=>{const T=O();r.current=T?T.getTime():Ve.getState().currentTime??0,i.current=!0,v(),s(!1)},[O,v,s]),j=h.useRef(A);j.current=A;const N=h.useRef(O);N.current=O;const ne=h.useRef(M);ne.current=M;const se=h.useRef(C);se.current=C,Lt(()=>{const T=Y=>{Y.code==="Space"&&Y.target===document.body&&(Y.preventDefault(),j.current())},re=Y=>{const G=Y.data,oe=n.current;if(!(Y.source&&oe&&Y.source!==oe.contentWindow)){if((G==null?void 0:G.source)==="hf-preview"&&(G==null?void 0:G.type)==="state")try{if(Ve.getState().elements.length===0){const B=oe==null?void 0:oe.contentWindow,D=B==null?void 0:B.__clipManifest;D&&D.clips.length>0&&ne.current(D)}se.current()}catch(B){console.warn("[useTimelinePlayer] Could not read clip manifest from iframe",B)}if((G==null?void 0:G.source)==="hf-preview"&&(G==null?void 0:G.type)==="timeline"&&Array.isArray(G.clips)){if(ne.current(G),se.current(),G.durationInFrames>0&&Number.isFinite(G.durationInFrames)){const D=G.durationInFrames/30;D>0&&D<7200&&Ve.getState().setDuration(D)}if(Ve.getState().elements.length===0)try{const B=oe==null?void 0:oe.contentDocument,D=O();if(B&&D){const W=Qg(B,D.getDuration());W.length>0&&p(W)}}catch(B){console.warn("[useTimelinePlayer] Could not read timeline elements on navigate (cross-origin)",B)}}}},ce=()=>{var Y;if(document.hidden&&Ve.getState().isPlaying){const G=(Y=N.current)==null?void 0:Y.call(N);G&&(G.pause(),s(!1),v())}};return window.addEventListener("keydown",T),window.addEventListener("message",re),document.addEventListener("visibilitychange",ce),()=>{window.removeEventListener("keydown",T),window.removeEventListener("message",re),document.removeEventListener("visibilitychange",ce),v(),t.current&&clearInterval(t.current)}});const le=h.useCallback(()=>{v(),t.current&&clearInterval(t.current),Ve.getState().reset()},[v]);return{iframeRef:n,play:b,pause:P,togglePlay:A,seek:z,onIframeLoad:Z,saveSeekPosition:H,resetPlayer:le}}function gS({projectId:n,directUrl:e}){return e??n}const OS=h.memo(function({projectId:e,iframeRef:t,onIframeLoad:r,portrait:i,directUrl:s,refreshKey:o}){const c=gS({projectId:e,directUrl:s}),u=h.useRef(o),[f,p]=h.useState(null),O=h.useRef(null);if(o!==u.current){const S=`${c}:${u.current??0}`;u.current=o,p(S)}const y=`${c}:${o??0}`,v=()=>{r(),O.current&&clearTimeout(O.current),O.current=setTimeout(()=>{p(null),O.current=null},160)};return g.jsx("div",{className:"flex flex-col h-full min-h-0",children:g.jsxs("div",{className:"relative flex-1 flex items-center justify-center p-2 overflow-hidden min-h-0",children:[f&&g.jsx(kh,{projectId:s?void 0:e,directUrl:s,onLoad:()=>{},portrait:i,style:{position:"absolute",inset:0,zIndex:0,opacity:1}},f),g.jsx(kh,{ref:t,projectId:s?void 0:e,directUrl:s,onLoad:f?v:r,portrait:i,style:f?{position:"absolute",inset:0,zIndex:1}:void 0},y)]})})}),xS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),yS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M112,56V200L40,128Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),vS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M232,128,128,232,24,128,128,24Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),wS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),SS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),bS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),kS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),$S=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M216,40V168H168V88H88V40Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),PS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),QS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),AS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),CS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),MS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),TS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),ES=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),ZS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),jS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),RS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),VS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),LS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),NS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),XS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),_S=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),DS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),zS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),IS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),FS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),HS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),WS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),BS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),YS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),qS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M224,80l-96,56L32,80l96-56Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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"}),h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),US=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),GS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,56V184a16,16,0,0,1-16,16H72a16,16,0,0,1-16-16V56Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),KS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),JS=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),eb=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.createElement("path",{d:"M208,96v64H48V96Z",opacity:"0.2"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),tb=new Map([["bold",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}),h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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",h.createElement(h.Fragment,null,h.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"}))]]),nb=h.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Ge=h.forwardRef((n,e)=>{const{alt:t,color:r,size:i,weight:s,mirrored:o,children:c,weights:u,...f}=n,{color:p="currentColor",size:O,weight:y="regular",mirrored:v=!1,...S}=h.useContext(nb);return h.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||v?"scale(-1, 1)":void 0,...S,...f},!!t&&h.createElement("title",null,t),c,u.get(s??y))});Ge.displayName="IconBase";const z6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:xS}));z6.displayName="ArrowCounterClockwiseIcon";const rb=z6,I6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:yS}));I6.displayName="ArrowLeftIcon";const ib=I6,F6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:vS}));F6.displayName="ArrowsOutCardinalIcon";const sb=F6,H6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:wS}));H6.displayName="CaretDownIcon";const lb=H6,Yu=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:SS}));Yu.displayName="CaretRightIcon";const W6=Yu,B6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:bS}));B6.displayName="ChatCenteredTextIcon";const ob=B6,Y6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:kS}));Y6.displayName="CheckCircleIcon";const q6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:$S}));q6.displayName="CopyIcon";const ab=q6,U6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:PS}));U6.displayName="EyeIcon";const cb=U6,G6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:QS}));G6.displayName="FileIcon";const ub=G6,K6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:AS}));K6.displayName="FileCodeIcon";const db=K6,J6=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:CS}));J6.displayName="FileCssIcon";const hb=J6,e4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:MS}));e4.displayName="FileHtmlIcon";const fb=e4,t4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:TS}));t4.displayName="FileJpgIcon";const pb=t4,n4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:ES}));n4.displayName="FileJsIcon";const mb=n4,r4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:ZS}));r4.displayName="FileJsxIcon";const gb=r4,i4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:jS}));i4.displayName="FileMdIcon";const Ob=i4,s4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:RS}));s4.displayName="FilePlusIcon";const Tg=s4,l4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:VS}));l4.displayName="FilePngIcon";const xb=l4,o4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:LS}));o4.displayName="FileSvgIcon";const yb=o4,a4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:NS}));a4.displayName="FileTsIcon";const vb=a4,c4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:XS}));c4.displayName="FileTsxIcon";const wb=c4,u4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:_S}));u4.displayName="FileTxtIcon";const Sb=u4,d4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:DS}));d4.displayName="FileVideoIcon";const bb=d4,h4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:zS}));h4.displayName="FolderSimpleIcon";const kb=h4,f4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:IS}));f4.displayName="FolderSimplePlusIcon";const p4=f4,m4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:FS}));m4.displayName="GearIcon";const $b=m4,g4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:HS}));g4.displayName="ImageIcon";const Pb=g4,O4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:WS}));O4.displayName="PaletteIcon";const Qb=O4,x4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:BS}));x4.displayName="PencilSimpleIcon";const Ab=x4,y4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:YS}));y4.displayName="PlusIcon";const v4=y4,w4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:qS}));w4.displayName="StackIcon";const Cb=w4,S4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:US}));S4.displayName="TextAaIcon";const Mb=S4,b4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:GS}));b4.displayName="TextTIcon";const Tb=b4,k4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:KS}));k4.displayName="TrashIcon";const Eb=k4,ju=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:JS}));ju.displayName="WarningIcon";const $4=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:eb}));$4.displayName="WaveformIcon";const Zb=$4,Vf=h.forwardRef((n,e)=>h.createElement(Ge,{ref:e,...n,weights:tb}));Vf.displayName="XIcon";const jb=Vf;function Rb({stack:n,onNavigate:e}){return n.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:()=>e(n.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(ib,{size:12,weight:"bold"})}),n.map((t,r)=>{const i=r===n.length-1;return g.jsxs("span",{className:"flex items-center gap-1",children:[r>0&&g.jsx(W6,{size:10,className:"text-neutral-600 flex-shrink-0"}),i?g.jsx("span",{className:"text-xs text-neutral-200 font-medium",children:t.label}):g.jsx("button",{type:"button",onClick:()=>e(r),className:"text-xs text-neutral-500 hover:text-neutral-200 transition-colors",children:t.label})]},t.id)})]})}const Vb=100,Lb=220,Nb=120,Xb=h.memo(function({projectId:e,portrait:t,previewOverlay:r,timelineToolbar:i,timelineFooter:s,refreshKey:o,activeCompositionPath:c,onIframeRef:u,onCompositionChange:f,renderClipContent:p,onFileDrop:O,onDeleteElement:y,onAssetDrop:v,onMoveElement:S,onResizeElement:b,onBlockedEditAttempt:P,onCompIdToSrcChange:A,timelineVisible:z,onToggleTimeline:M}){const{iframeRef:C,togglePlay:Z,seek:H,onIframeLoad:j,saveSeekPosition:N}=mS(),ne=h.useRef(e);ne.current!==e&&(ne.current=e,Ve.getState().reset());const se=h.useRef(o);h.useEffect(()=>{o!==se.current&&(se.current=o,N())},[o,N]);const le=h.useCallback(()=>{j(),u==null||u(C.current)},[j,C,u]),[T,re]=h.useState(new Map);Lt(()=>{fetch(`/api/projects/${e}/files/index.html`).then(_e=>_e.json()).then(_e=>{const He=_e.content||"",We=new Map,st=/data-composition-id=["']([^"']+)["'][^>]*data-composition-src=["']([^"']+)["']|data-composition-src=["']([^"']+)["'][^>]*data-composition-id=["']([^"']+)["']/g;let ze;for(;(ze=st.exec(He))!==null;){const et=ze[1]||ze[4],pt=ze[2]||ze[3];et&&pt&&We.set(et,pt)}re(We),A==null||A(We)}).catch(()=>{})});const ce=h.useRef(T);ce.current=T,h.useEffect(()=>{if(T.size===0)return;const _e=st=>{const ze=ce.current;if(ze.size===0)return null;let et=!1;const pt=st.map(gt=>{if(gt.compositionSrc)return gt;const Mt=ze.get(gt.id)??ze.get(gt.id.replace(/-(host|comp|layer)$/,""));return Mt?(et=!0,{...gt,compositionSrc:Mt}):gt});return et?pt:null},He=_e(Ve.getState().elements);He&&Ve.getState().setElements(He);let We=!1;return Ve.subscribe((st,ze)=>{if(We||st.elements===ze.elements||st.elements.length===0||st.elements.every(pt=>pt.compositionSrc))return;We=!0;const et=_e(st.elements);et&&st.setElements(et),We=!1})},[T]);const[Y,G]=h.useState([{id:"master",label:"Master",previewUrl:`/api/projects/${e}/preview`}]),oe=h.useRef(f);oe.current=f;const B=h.useCallback(_e=>{G(He=>{var ze;const We=typeof _e=="function"?_e(He):_e,st=(ze=We[We.length-1])==null?void 0:ze.id;return queueMicrotask(()=>{var et;return(et=oe.current)==null?void 0:et.call(oe,st==="master"?null:st)}),We})},[]),[D,W]=h.useState(Lb),$=h.useRef(!1),V=h.useRef(null),R=Y[Y.length-1],te=Y.length>1?R.previewUrl:void 0;h.useEffect(()=>{u==null||u(C.current)},[Y.length,u,o,C]);const ie=h.useRef(0),Ae=C,ye=h.useCallback(_e=>{var st;if(!_e.compositionSrc)return;ie.current=Ve.getState().currentTime,N();const He=_e.id;let We=T.get(He);if(!We)try{const ze=(st=Ae.current)==null?void 0:st.contentDocument;if(ze){const et=ze.querySelector(`[data-composition-id="${He}"][data-composition-src]`);et&&(We=et.getAttribute("data-composition-src")||void 0)}}catch{}if(!We){const ze=_e.compositionSrc,et=ze.match(/compositions\/.*\.html/);We=et?et[0]:ze}Ve.getState().setElements([]),B(ze=>{var Mt;if(ze[ze.length-1].id===We&&ze.length>1)return ze.slice(0,-1);const pt=((Mt=We.split("/").pop())==null?void 0:Mt.replace(/\.html$/,""))||We,gt=`/api/projects/${e}/preview/comp/${We}`;return[...ze,{id:We,label:pt,previewUrl:gt}]})},[e,T]),Le=h.useCallback(_e=>{_e===0&&ie.current>0&&Ve.getState().setCurrentTime(ie.current),N(),Ve.getState().setElements([]),B(He=>He.slice(0,_e+1))},[]);h.useEffect(()=>{if(c==="index.html")Ve.getState().setElements([]),B(_e=>_e.length>1?[_e[0]]:_e);else if(c&&c.startsWith("compositions/")){const _e=c.replace(/^compositions\//,"").replace(/\.html$/,""),He=`/api/projects/${e}/preview/comp/${c}`;Ve.getState().setElements([]),B(We=>{var st;return((st=We[We.length-1])==null?void 0:st.id)===c?We:[{id:"master",label:"Master",previewUrl:`/api/projects/${e}/preview`},{id:c,label:_e,previewUrl:He}]})}else c||Ve.getState().setElements([])},[c,e,B]);const Fe=h.useCallback(_e=>{_e.preventDefault(),$.current=!0,_e.target.setPointerCapture(_e.pointerId)},[]),rt=h.useCallback(_e=>{if(!$.current||!V.current)return;const He=V.current.getBoundingClientRect(),We=_e.clientY-He.top,st=He.height,ze=Math.max(Vb,Math.min(st-Nb,st-We));W(ze)},[]),rn=h.useCallback(()=>{$.current=!1},[]),Ut=h.useCallback(_e=>{_e.key==="Escape"&&Y.length>1&&B(He=>He.slice(0,-1))},[Y.length]);return g.jsxs("div",{ref:V,className:"flex flex-col h-full min-h-0 bg-neutral-950",onKeyDown:Ut,tabIndex:-1,children:[g.jsxs("div",{className:"flex-1 min-h-0 flex flex-col",children:[g.jsxs("div",{className:"flex-1 min-h-0 relative",children:[g.jsx(OS,{projectId:e,iframeRef:C,onIframeLoad:le,portrait:t,directUrl:te,refreshKey:o}),r]}),g.jsxs("div",{className:"bg-neutral-950 border-t border-neutral-800/50 flex-shrink-0",children:[Y.length>1&&g.jsx(Rb,{stack:Y,onNavigate:Le}),g.jsx(cw,{onTogglePlay:Z,onSeek:H,timelineVisible:z??!0,onToggleTimeline:M})]})]}),(z??!0)&&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:Fe,onPointerMove:rt,onPointerUp:rn,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:"flex flex-col flex-shrink-0",style:{height:D},children:[g.jsxs("div",{className:"flex flex-col flex-1 min-h-0 overflow-hidden bg-neutral-950",onDoubleClick:_e=>{_e.target.closest("[data-clip]")||Y.length>1&&B(He=>He.slice(0,-1))},children:[g.jsx("div",{className:"flex-shrink-0",children:i}),g.jsx(tS,{onSeek:H,onDrillDown:ye,renderClipContent:p,onFileDrop:O,onDeleteElement:y,onAssetDrop:v,onMoveElement:S,onResizeElement:b,onBlockedEditAttempt:P})]}),s&&g.jsx("div",{className:"flex-shrink-0",children:s})]})]})]})});let Qh=[],P4=[];(()=>{let n="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,t=0;e<n.length;e++)(e%2?P4:Qh).push(t=t+n[e])})();function _b(n){if(n<768)return!1;for(let e=0,t=Qh.length;;){let r=e+t>>1;if(n<Qh[r])t=r;else if(n>=P4[r])e=r+1;else return!0;if(e==t)return!1}}function Eg(n){return n>=127462&&n<=127487}const Zg=8205;function Db(n,e,t=!0,r=!0){return(t?Q4:zb)(n,e,r)}function Q4(n,e,t){if(e==n.length)return e;e&&A4(n.charCodeAt(e))&&C4(n.charCodeAt(e-1))&&e--;let r=Md(n,e);for(e+=jg(r);e<n.length;){let i=Md(n,e);if(r==Zg||i==Zg||t&&_b(i))e+=jg(i),r=i;else if(Eg(i)){let s=0,o=e-2;for(;o>=0&&Eg(Md(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function zb(n,e,t){for(;e>0;){let r=Q4(n,e-2,t);if(r<e)return r;e--}return 0}function Md(n,e){let t=n.charCodeAt(e);if(!C4(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return A4(r)?(t-55296<<10)+(r-56320)+65536:t}function A4(n){return n>=56320&&n<57344}function C4(n){return n>=55296&&n<56320}function jg(n){return n<65536?1:2}class it{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,t,r){[e,t]=oo(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),vi.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=oo(this,e,t);let r=[];return this.decompose(e,t,r,0),vi.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new ma(this),s=new ma(e);for(let o=t,c=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(c+=i.value.length,i.done||c>=r)return!0}}iter(e=1){return new ma(this,e)}iterRange(e,t=this.length){return new M4(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new T4(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]?it.empty:e.length<=32?new It(e):vi.from(It.split(e,[]))}}class It extends it{constructor(e,t=Ib(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],c=i+o.length;if((t?r:c)>=e)return new Fb(i,c,r,o);i=c+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new It(Rg(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),c=Ru(s.text,o.text.slice(),0,s.length);if(c.length<=32)r.push(new It(c,o.length+s.length));else{let u=c.length>>1;r.push(new It(c.slice(0,u)),new It(c.slice(u)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof It))return super.replace(e,t,r);[e,t]=oo(this,e,t);let i=Ru(this.text,Ru(r.text,Rg(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new It(i,s):vi.from(It.split(i,[]),s)}sliceString(e,t=this.length,r=`
55
- `){[e,t]=oo(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let c=this.text[o],u=s+c.length;s>e&&o&&(i+=r),e<u&&t>s&&(i+=c.slice(Math.max(0,e-s),t-s)),s=u+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new It(r,i)),r=[],i=-1);return i>-1&&t.push(new It(r,i)),t}}class vi extends it{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],c=i+o.length,u=r+o.lines-1;if((t?u:c)>=e)return o.lineInner(e,t,r,i);i=c+1,r=u+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let c=this.children[s],u=o+c.length;if(e<=u&&t>=o){let f=i&((o<=e?1:0)|(u>=t?2:0));o>=e&&u<=t&&!f?r.push(c):c.decompose(e-o,t-o,r,f)}o=u+1}}replace(e,t,r){if([e,t]=oo(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],c=s+o.length;if(e>=s&&t<=c){let u=o.replace(e-s,t-s,r),f=this.lines-o.lines+u.lines;if(u.lines<f>>4&&u.lines>f>>6){let p=this.children.slice();return p[i]=u,new vi(p,this.length-(t-e)+r.length)}return super.replace(s,c,u)}s=c+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
56
- `){[e,t]=oo(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let c=this.children[s],u=o+c.length;o>e&&s&&(i+=r),e<u&&t>o&&(i+=c.sliceString(e-o,t-o,r)),o=u+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof vi))return 0;let r=0,[i,s,o,c]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==c)return r;let u=this.children[i],f=e.children[s];if(u!=f)return r+u.scanIdentical(f,t);r+=u.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let v of e)r+=v.lines;if(r<32){let v=[];for(let S of e)S.flatten(v);return new It(v,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,c=[],u=0,f=-1,p=[];function O(v){let S;if(v.lines>s&&v instanceof vi)for(let b of v.children)O(b);else v.lines>o&&(u>o||!u)?(y(),c.push(v)):v instanceof It&&u&&(S=p[p.length-1])instanceof It&&v.lines+S.lines<=32?(u+=v.lines,f+=v.length+1,p[p.length-1]=new It(S.text.concat(v.text),S.length+1+v.length)):(u+v.lines>i&&y(),u+=v.lines,f+=v.length+1,p.push(v))}function y(){u!=0&&(c.push(p.length==1?p[0]:vi.from(p,f)),f=-1,u=p.length=0)}for(let v of e)O(v);return y(),c.length==1?c[0]:new vi(c,t)}}it.empty=new It([""],0);function Ib(n){let e=-1;for(let t of n)e+=t.length+1;return e}function Ru(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let c=n[s],u=i+c.length;u>=t&&(u>r&&(c=c.slice(0,r-i)),i<t&&(c=c.slice(t-i)),o?(e[e.length-1]+=c,o=!1):e.push(c)),i=u+1}return e}function Rg(n,e,t){return Ru(n,[""],e,t)}class ma{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof It?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,c=i instanceof It?i.text.length:i.children.length;if(o==(t>0?c:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
57
- `,this;e--}else if(i instanceof It){let u=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,u.length>Math.max(0,e))return this.value=e==0?u:t>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=i.children[o+(t<0?-1:0)];e>u.length?(e-=u.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(u),this.offsets.push(t>0?1:(u instanceof It?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class M4{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new ma(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<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)*t,this.value=i.length<=r?i:t<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 T4{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(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"&&(it.prototype[Symbol.iterator]=function(){return this.iter()},ma.prototype[Symbol.iterator]=M4.prototype[Symbol.iterator]=T4.prototype[Symbol.iterator]=function(){return this});class Fb{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}}function oo(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function hn(n,e,t=!0,r=!0){return Db(n,e,t,r)}function Hb(n){return n>=56320&&n<57344}function Wb(n){return n>=55296&&n<56320}function dl(n,e){let t=n.charCodeAt(e);if(!Wb(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return Hb(r)?(t-55296<<10)+(r-56320)+65536:t}function E4(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function za(n){return n<65536?1:2}const Ah=/\r\n?|\n/;var Zn=(function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n})(Zn||(Zn={}));class Qi{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){Ch(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new Qi(e)}composeDesc(e){return this.empty?e:e.empty?this:Z4(this,e)}mapDesc(e,t=!1){return e.empty?this:Mh(this,e,t)}mapPos(e,t=-1,r=Zn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let c=this.sections[o++],u=this.sections[o++],f=i+c;if(u<0){if(f>e)return s+(e-i);s+=c}else{if(r!=Zn.Simple&&f>=e&&(r==Zn.TrackDel&&i<e&&f>e||r==Zn.TrackBefore&&i<e||r==Zn.TrackAfter&&f>e))return null;if(f>e||f==e&&t<0&&!c)return e==i||t<0?s:s+u;s+=u}i=f}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],c=i+s;if(o>=0&&i<=t&&c>=e)return i<e&&c>t?"cover":!0;i=c}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Qi(e)}static create(e){return new Qi(e)}}class nn extends Qi{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return Ch(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return Mh(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],c=t[i+1];if(c>=0){t[i]=c,t[i+1]=o;let u=i>>1;for(;r.length<u;)r.push(it.empty);r.push(o?e.slice(s,s+o):it.empty)}s+=o}return new nn(t,r)}compose(e){return this.empty?e:e.empty?this:Z4(this,e,!0)}map(e,t=!1){return e.empty?this:Mh(this,e,t,!0)}iterChanges(e,t=!1){Ch(this,e,t)}get desc(){return Qi.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new Aa(this);e:for(let o=0,c=0;;){let u=o==e.length?1e9:e[o++];for(;c<u||c==u&&s.len==0;){if(s.done)break e;let p=Math.min(s.len,u-c);En(i,p,-1);let O=s.ins==-1?-1:s.off==0?s.ins:0;En(t,p,O),O>0&&$s(r,t,s.text),s.forward(p),c+=p}let f=e[o++];for(;c<f;){if(s.done)break e;let p=Math.min(s.len,f-c);En(t,p,-1),En(i,p,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(p),c+=p}}return{changes:new nn(t,r),filtered:Qi.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,c=null;function u(p=!1){if(!p&&!i.length)return;o<t&&En(i,t-o,-1);let O=new nn(i,s);c=c?c.compose(O.map(c)):O,i=[],s=[],o=0}function f(p){if(Array.isArray(p))for(let O of p)f(O);else if(p instanceof nn){if(p.length!=t)throw new RangeError(`Mismatched change set length (got ${p.length}, expected ${t})`);u(),c=c?c.compose(p.map(c)):p}else{let{from:O,to:y=O,insert:v}=p;if(O>y||O<0||y>t)throw new RangeError(`Invalid change range ${O} to ${y} (in doc of length ${t})`);let S=v?typeof v=="string"?it.of(v.split(r||Ah)):v:it.empty,b=S.length;if(O==y&&b==0)return;O<o&&u(),O>o&&En(i,O-o,-1),En(i,y-O,b),$s(s,i,S),o=y}}return f(e),u(!c),c}static empty(e){return new nn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,c)=>c&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(it.empty);r[i]=it.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new nn(t,r)}static createSet(e,t){return new nn(e,t)}}function En(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function $s(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(it.empty);n.push(t)}}function Ch(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let c=n.sections[o++],u=n.sections[o++];if(u<0)i+=c,s+=c;else{let f=i,p=s,O=it.empty;for(;f+=c,p+=u,u&&r&&(O=O.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)c=n.sections[o++],u=n.sections[o++];e(i,f,s,p,O),i=f,s=p}}}function Mh(n,e,t,r=!1){let i=[],s=r?[]:null,o=new Aa(n),c=new Aa(e);for(let u=-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 f=Math.min(o.len,c.len);En(i,f,-1),o.forward(f),c.forward(f)}else if(c.ins>=0&&(o.ins<0||u==o.i||o.off==0&&(c.len<o.len||c.len==o.len&&!t))){let f=c.len;for(En(i,c.ins,-1);f;){let p=Math.min(o.len,f);o.ins>=0&&u<o.i&&o.len<=p&&(En(i,0,o.ins),s&&$s(s,i,o.text),u=o.i),o.forward(p),f-=p}c.next()}else if(o.ins>=0){let f=0,p=o.len;for(;p;)if(c.ins==-1){let O=Math.min(p,c.len);f+=O,p-=O,c.forward(O)}else if(c.ins==0&&c.len<p)p-=c.len,c.next();else break;En(i,f,u<o.i?o.ins:0),s&&u<o.i&&$s(s,i,o.text),u=o.i,o.forward(o.len-p)}else{if(o.done&&c.done)return s?nn.createSet(i,s):Qi.create(i);throw new Error("Mismatched change set lengths")}}}function Z4(n,e,t=!1){let r=[],i=t?[]:null,s=new Aa(n),o=new Aa(e);for(let c=!1;;){if(s.done&&o.done)return i?nn.createSet(r,i):Qi.create(r);if(s.ins==0)En(r,s.len,0,c),s.next();else if(o.len==0&&!o.done)En(r,0,o.ins,c),i&&$s(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,o.len),f=r.length;if(s.ins==-1){let p=o.ins==-1?-1:o.off?0:o.ins;En(r,u,p,c),i&&p&&$s(i,r,o.text)}else o.ins==-1?(En(r,s.off?0:s.len,u,c),i&&$s(i,r,s.textBit(u))):(En(r,s.off?0:s.len,o.off?0:o.ins,c),i&&!o.off&&$s(i,r,o.text));c=(s.ins>u||o.ins>=0&&o.len>u)&&(c||r.length>f),s.forward2(u),o.forward(u)}}}}class Aa{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,t=this.i-2>>1;return t>=e.length?it.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?it.empty:t[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 rl{constructor(e,t,r){this.from=e,this.to=t,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,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new rl(r,i,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return ue.range(e,t,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return ue.range(this.anchor,i,void 0,void 0,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!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 ue.range(e.anchor,e.head)}static create(e,t,r){return new rl(e,t,r)}}class ue{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:ue.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!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],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ue([this.main],0)}addRange(e,t=!0){return ue.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,ue.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 ue(e.ranges.map(t=>rl.fromJSON(t)),e.main)}static single(e,t=e){return new ue([ue.range(e,t)],0)}static create(e,t=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 s=e[i];if(s.empty?s.from<=r:s.from<r)return ue.normalized(e.slice(),t);r=s.to}return new ue(e,t)}static cursor(e,t=0,r,i){return rl.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i,s){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=t&&(s=t<e?1:-1),t<e?rl.create(t,e,48|o):rl.create(e,t,(s?s<0?8:16:0)|o)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let c=o.from,u=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?ue.range(u,c):ue.range(c,u))}}return new ue(e,t)}}function j4(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let Lf=0;class Te{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=Lf++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Te(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:Nf),!!e.static,e.enables)}of(e){return new Vu([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Vu(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Vu(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function Nf(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class Vu{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=Lf++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,c=this.type==2,u=!1,f=!1,p=[];for(let O of this.dependencies)O=="doc"?u=!0:O=="selection"?f=!0:(((t=e[O.id])!==null&&t!==void 0?t:1)&1)==0&&p.push(e[O.id]);return{create(O){return O.values[o]=r(O),1},update(O,y){if(u&&y.docChanged||f&&(y.docChanged||y.selection)||Th(O,p)){let v=r(O);if(c?!Vg(v,O.values[o],i):!i(v,O.values[o]))return O.values[o]=v,1}return 0},reconfigure:(O,y)=>{let v,S=y.config.address[s];if(S!=null){let b=Uu(y,S);if(this.dependencies.every(P=>P instanceof Te?y.facet(P)===O.facet(P):P instanceof kr?y.field(P,!1)==O.field(P,!1):!0)||(c?Vg(v=r(O),b,i):i(v=r(O),b)))return O.values[o]=b,0}else v=r(O);return O.values[o]=v,1}}}}function Vg(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function Th(n,e){let t=!1;for(let r of e)ga(n,r)&1&&(t=!0);return t}function Bb(n,e,t){let r=t.map(u=>n[u.id]),i=t.map(u=>u.type),s=r.filter(u=>!(u&1)),o=n[e.id]>>1;function c(u){let f=[];for(let p=0;p<r.length;p++){let O=Uu(u,r[p]);if(i[p]==2)for(let y of O)f.push(y);else f.push(O)}return e.combine(f)}return{create(u){for(let f of r)ga(u,f);return u.values[o]=c(u),1},update(u,f){if(!Th(u,s))return 0;let p=c(u);return e.compare(p,u.values[o])?0:(u.values[o]=p,1)},reconfigure(u,f){let p=Th(u,r),O=f.config.facets[e.id],y=f.facet(e);if(O&&!p&&Nf(t,O))return u.values[o]=y,0;let v=c(u);return e.compare(v,y)?(u.values[o]=y,0):(u.values[o]=v,1)}}}const nu=Te.define({static:!0});class kr{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new kr(Lf++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(nu).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(nu),o=i.facet(nu),c;return(c=s.find(u=>u.field==this))&&c!=o.find(u=>u.field==this)?(r.values[t]=c.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,nu.of({field:this,create:e})]}get extension(){return this}}const nl={lowest:4,low:3,default:2,high:1,highest:0};function ta(n){return e=>new R4(e,n)}const Ia={highest:ta(nl.highest),high:ta(nl.high),default:ta(nl.default),low:ta(nl.low),lowest:ta(nl.lowest)};class R4{constructor(e,t){this.inner=e,this.prec=t}}class A0{of(e){return new Eh(this,e)}reconfigure(e){return A0.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Eh{constructor(e,t){this.compartment=e,this.inner=t}}class qu{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let y of Yb(e,t,o))y instanceof kr?i.push(y):(s[y.facet.id]||(s[y.facet.id]=[])).push(y);let c=Object.create(null),u=[],f=[];for(let y of i)c[y.id]=f.length<<1,f.push(v=>y.slot(v));let p=r==null?void 0:r.config.facets;for(let y in s){let v=s[y],S=v[0].facet,b=p&&p[y]||[];if(v.every(P=>P.type==0))if(c[S.id]=u.length<<1|1,Nf(b,v))u.push(r.facet(S));else{let P=S.combine(v.map(A=>A.value));u.push(r&&S.compare(P,r.facet(S))?r.facet(S):P)}else{for(let P of v)P.type==0?(c[P.id]=u.length<<1|1,u.push(P.value)):(c[P.id]=f.length<<1,f.push(A=>P.dynamicSlot(A)));c[S.id]=f.length<<1,f.push(P=>Bb(P,S,v))}}let O=f.map(y=>y(c));return new qu(e,o,O,c,u,s)}}function Yb(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,c){let u=i.get(o);if(u!=null){if(u<=c)return;let f=r[u].indexOf(o);f>-1&&r[u].splice(f,1),o instanceof Eh&&t.delete(o.compartment)}if(i.set(o,c),Array.isArray(o))for(let f of o)s(f,c);else if(o instanceof Eh){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let f=e.get(o.compartment)||o.inner;t.set(o.compartment,f),s(f,c)}else if(o instanceof R4)s(o.inner,o.prec);else if(o instanceof kr)r[c].push(o),o.provides&&s(o.provides,c);else if(o instanceof Vu)r[c].push(o),o.facet.extensions&&s(o.facet.extensions,nl.default);else{let f=o.extension;if(!f)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(f,c)}}return s(n,nl.default),r.reduce((o,c)=>o.concat(c))}function ga(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function Uu(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const V4=Te.define(),Zh=Te.define({combine:n=>n.some(e=>e),static:!0}),L4=Te.define({combine:n=>n.length?n[0]:void 0,static:!0}),N4=Te.define(),X4=Te.define(),_4=Te.define(),D4=Te.define({combine:n=>n.length?n[0]:!1});class Ki{constructor(e,t){this.type=e,this.value=t}static define(){return new qb}}class qb{of(e){return new Ki(this,e)}}class Ub{constructor(e){this.map=e}of(e){return new at(this,e)}}class at{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new at(this.type,t)}is(e){return this.type==e}static define(e={}){return new Ub(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}at.reconfigure=at.define();at.appendConfig=at.define();class qt{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&j4(r,t.newLength),s.some(c=>c.type==qt.time)||(this.annotations=s.concat(qt.time.of(Date.now())))}static create(e,t,r,i,s,o){return new qt(e,t,r,i,s,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 t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(qt.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}qt.time=Ki.define();qt.userEvent=Ki.define();qt.addToHistory=Ki.define();qt.remote=Ki.define();function Gb(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function z4(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=nn.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:at.mapEffects(n.effects,i).concat(at.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function jh(n,e,t){let r=e.selection,i=Jl(e.annotations);return e.userEvent&&(i=i.concat(qt.userEvent.of(e.userEvent))),{changes:e.changes instanceof nn?e.changes:nn.of(e.changes||[],t,n.facet(L4)),selection:r&&(r instanceof ue?r:ue.single(r.anchor,r.head)),effects:Jl(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function I4(n,e,t){let r=jh(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=z4(r,jh(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=qt.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return Jb(t?Kb(i):i)}function Kb(n){let e=n.startState,t=!0;for(let i of e.facet(N4)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:Gb(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=nn.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=qt.create(e,i,n.selection&&n.selection.map(s),at.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(X4);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof qt?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof qt?n=s[0]:n=I4(e,Jl(s),!1)}return n}function Jb(n){let e=n.startState,t=e.facet(_4),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=z4(r,jh(e,s,n.changes.newLength),!0))}return r==n?n:qt.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const e7=[];function Jl(n){return n==null?e7:Array.isArray(n)?n:[n]}var Zt=(function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n})(Zt||(Zt={}));const t7=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Rh;try{Rh=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function n7(n){if(Rh)return Rh.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||t7.test(t)))return!0}return!1}function r7(n){return e=>{if(!/\S/.test(e))return Zt.Space;if(n7(e))return Zt.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Zt.Word;return Zt.Other}}class ot{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)ga(this,c<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return ga(this,r),Uu(this,r)}update(...e){return I4(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let c of e.effects)c.is(A0.reconfigure)?(t&&(i=new Map,t.compartments.forEach((u,f)=>i.set(f,u)),t=null),i.set(c.value.compartment,c.value.extension)):c.is(at.reconfigure)?(t=null,r=c.value):c.is(at.appendConfig)&&(t=null,r=Jl(r).concat(c.value));let s;t?s=e.startState.values.slice():(t=qu.resolve(r,i,this),s=new ot(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(u,f)=>f.reconfigure(u,this),null).values);let o=e.startState.facet(Zh)?e.newSelection:e.newSelection.asSingle();new ot(t,e.newDoc,o,s,(c,u)=>u.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:ue.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=Jl(r.effects);for(let c=1;c<t.ranges.length;c++){let u=e(t.ranges[c]),f=this.changes(u.changes),p=f.map(i);for(let y=0;y<c;y++)s[y]=s[y].map(p);let O=i.mapDesc(f,!0);s.push(u.range.map(O)),i=i.compose(p),o=at.mapEffects(o,p).concat(at.mapEffects(Jl(u.effects),O))}return{changes:i,selection:ue.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof nn?e:nn.of(e,this.doc.length,this.facet(ot.lineSeparator))}toText(e){return it.of(e.split(this.facet(ot.lineSeparator)||Ah))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(ga(this,t),Uu(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof kr&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],c=e[s];i.push(o.init(u=>o.spec.fromJSON(c,u)))}}return ot.create({doc:e.doc,selection:ue.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=qu.resolve(e.extensions||[],new Map),r=e.doc instanceof it?e.doc:it.of((e.doc||"").split(t.staticFacet(ot.lineSeparator)||Ah)),i=e.selection?e.selection instanceof ue?e.selection:ue.single(e.selection.anchor,e.selection.head):ue.single(0);return j4(i,r.length),t.staticFacet(Zh)||(i=i.asSingle()),new ot(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(ot.tabSize)}get lineBreak(){return this.facet(ot.lineSeparator)||`
58
- `}get readOnly(){return this.facet(D4)}phrase(e,...t){for(let r of this.facet(ot.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(V4))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return r7(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,c=e-r;for(;o>0;){let u=hn(t,o,!1);if(s(t.slice(u,o))!=Zt.Word)break;o=u}for(;c<i;){let u=hn(t,c);if(s(t.slice(c,u))!=Zt.Word)break;c=u}return o==c?null:ue.range(o+r,c+r)}}ot.allowMultipleSelections=Zh;ot.tabSize=Te.define({combine:n=>n.length?n[0]:4});ot.lineSeparator=L4;ot.readOnly=D4;ot.phrases=Te.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});ot.languageData=V4;ot.changeFilter=N4;ot.transactionFilter=X4;ot.transactionExtender=_4;A0.reconfigure=at.define();function vo(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],c=r[s];if(c===void 0)r[s]=o;else if(!(c===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](c,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class As{eq(e){return this==e}range(e,t=e){return Vh.create(e,t,this)}}As.prototype.startSide=As.prototype.endSide=0;As.prototype.point=!1;As.prototype.mapMode=Zn.TrackDel;function Xf(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Vh=class F4{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new F4(e,t,r)}};function Lh(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class _f{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,c=s.length;;){if(o==c)return o;let u=o+c>>1,f=s[u]-e||(r?this.value[u].endSide:this.value[u].startSide)-t;if(u==o)return f>=0?o:c;f>=0?c=u:o=u+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,c=-1;for(let u=0;u<this.value.length;u++){let f=this.value[u],p=this.from[u]+e,O=this.to[u]+e,y,v;if(p==O){let S=t.mapPos(p,f.startSide,f.mapMode);if(S==null||(y=v=S,f.startSide!=f.endSide&&(v=t.mapPos(p,f.endSide),v<y)))continue}else if(y=t.mapPos(p,f.startSide),v=t.mapPos(O,f.endSide),y>v||y==v&&f.startSide>0&&f.endSide<=0)continue;(v-y||f.endSide-f.startSide)<0||(o<0&&(o=y),f.point&&(c=Math.max(c,v-y)),r.push(f),i.push(y-o),s.push(v-o))}return{mapped:r.length?new _f(i,s,r,c):null,pos:o}}}class Je{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Je(e,t,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 t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(Lh)),this.isEmpty)return t.length?Je.of(t):this;let c=new H4(this,null,-1).goto(0),u=0,f=[],p=new ol;for(;c.value||u<t.length;)if(u<t.length&&(c.from-t[u].from||c.startSide-t[u].value.startSide)>=0){let O=t[u++];p.addInner(O.from,O.to,O.value)||f.push(O)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(u==t.length||this.chunkEnd(c.chunkIndex)<t[u].from)&&(!o||i>this.chunkEnd(c.chunkIndex)||s<this.chunkPos[c.chunkIndex])&&p.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!o||i>c.to||s<c.from||o(c.from,c.to,c.value))&&(p.addInner(c.from,c.to,c.value)||f.push(Vh.create(c.from,c.to,c.value))),c.next());return p.finishInner(this.nextLayer.isEmpty&&!f.length?Je.empty:this.nextLayer.update({add:f,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let c=this.chunkPos[o],u=this.chunk[o],f=e.touchesRange(c,c+u.length);if(f===!1)i=Math.max(i,u.maxPoint),t.push(u),r.push(e.mapPos(c));else if(f===!0){let{mapped:p,pos:O}=u.map(c,e);p&&(i=Math.max(i,p.maxPoint),t.push(p),r.push(O))}}let s=this.nextLayer.map(e);return t.length==0?s:new Je(r,t,s||Je.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Ca.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Ca.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),c=t.filter(O=>O.maxPoint>0||!O.isEmpty&&O.maxPoint>=s),u=Lg(o,c,r),f=new na(o,u,s),p=new na(c,u,s);r.iterGaps((O,y,v)=>Ng(f,O,p,y,v,i)),r.empty&&r.length==0&&Ng(f,0,p,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(p=>!p.isEmpty&&t.indexOf(p)<0),o=t.filter(p=>!p.isEmpty&&e.indexOf(p)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let c=Lg(s,o),u=new na(s,c,0).goto(r),f=new na(o,c,0).goto(r);for(;;){if(u.to!=f.to||!Nh(u.active,f.active)||u.point&&(!f.point||!Xf(u.point,f.point)))return!1;if(u.to>i)return!0;u.next(),f.next()}}static spans(e,t,r,i,s=-1){let o=new na(e,null,s).goto(t),c=t,u=o.openStart;for(;;){let f=Math.min(o.to,r);if(o.point){let p=o.activeForPoint(o.to),O=o.pointFrom<t?p.length+1:o.point.startSide<0?p.length:Math.min(p.length,u);i.point(c,f,o.point,p,O,o.pointRank),u=Math.min(o.openEnd(f),p.length)}else f>c&&(i.span(c,f,o.active,u),u=o.openEnd(f));if(o.to>r)return u+(o.point&&o.to>r?1:0);c=o.to,o.next()}}static of(e,t=!1){let r=new ol;for(let i of e instanceof Vh?[e]:t?i7(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Je.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Je.empty;i=i.nextLayer)t=new Je(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Je.empty=new Je([],[],null,-1);function i7(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(Lh(e,r)>0)return n.slice().sort(Lh);e=r}return n}Je.empty.nextLayer=Je.empty;class ol{finishChunk(e){this.chunks.push(new _f(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,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new ol)).add(e,t,r)}addInner(e,t,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(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Je.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Je.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Lg(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let c=r.get(s.chunk[o]);c!=null&&(t?t.mapPos(c):c)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(c,c+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class H4{constructor(e,t,r,i=0){this.layer=e,this.skip=t,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,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,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],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!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],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.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 Ca{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new H4(o,t,r,s));return i.length==1?i[0]:new Ca(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)Td(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)Td(this.heap,r);(this.to-e||this.value.endSide-t)<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(),Td(this.heap,0)}}}function Td(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class na{constructor(e,t,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=Ca.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){ru(this.active,e),ru(this.activeTo,e),ru(this.activeRank,e),this.minActive=Xg(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;iu(this.active,t,r),iu(this.activeTo,t,i),iu(this.activeRank,t,s),e&&iu(e,t,this.cursor.from),this.minActive=Xg(this.active,this.activeTo)}next(){let e=this.to,t=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&&ru(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 s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.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 t=[];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)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function Ng(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,c=r,u=r-e,f=!!s.boundChange;for(let p=!1;;){let O=n.to+u-t.to,y=O||n.endSide-t.endSide,v=y<0?n.to+u:t.to,S=Math.min(v,o);if(n.point||t.point?(n.point&&t.point&&Xf(n.point,t.point)&&Nh(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(c,S,n.point,t.point),p=!1):(p&&s.boundChange(c),S>c&&!Nh(n.active,t.active)&&s.compareRange(c,S,n.active,t.active),f&&S<o&&(O||n.openEnd(v)!=t.openEnd(v))&&(p=!0)),v>o)break;c=v,y<=0&&n.next(),y>=0&&t.next()}}function Nh(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!Xf(n[t],e[t]))return!1;return!0}function ru(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function iu(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function Xg(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function C0(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=hn(n,i));return r}function s7(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=hn(n,i)}return n.length}const Xh="ͼ",_g=typeof Symbol>"u"?"__"+Xh:Symbol.for(Xh),_h=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Dg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Cs{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,c,u,f){let p=[],O=/^@(\w+)\b/.exec(o[0]),y=O&&O[1]=="keyframes";if(O&&c==null)return u.push(o[0]+";");for(let v in c){let S=c[v];if(/&/.test(v))s(v.split(/,\s*/).map(b=>o.map(P=>b.replace(/&/,P))).reduce((b,P)=>b.concat(P)),S,u);else if(S&&typeof S=="object"){if(!O)throw new RangeError("The value of a property ("+v+") should be a primitive value.");s(i(v),S,p,y)}else S!=null&&p.push(v.replace(/_.*/,"").replace(/[A-Z]/g,b=>"-"+b.toLowerCase())+": "+S+";")}(p.length||y)&&u.push((r&&!O&&!f?o.map(r):o).join(", ")+" {"+p.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
59
- `)}static newName(){let e=Dg[_g]||1;return Dg[_g]=e+1,Xh+e.toString(36)}static mount(e,t,r){let i=e[_h],s=r&&r.nonce;i?s&&i.setNonce(s):i=new l7(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let zg=new Map;class l7{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=zg.get(r);if(s)return e[_h]=s;this.sheet=new i.CSSStyleSheet,zg.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[_h]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let c=e[o],u=this.modules.indexOf(c);if(u<s&&u>-1&&(this.modules.splice(u,1),s--,u=-1),u==-1){if(this.modules.splice(s++,0,c),r)for(let f=0;f<c.rules.length;f++)r.insertRule(c.rules[f],i++)}else{for(;s<u;)i+=this.modules[s++].rules.length;i+=c.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let u=0;u<this.modules.length;u++)o+=this.modules[u].getRules()+`
60
- `;this.styleTag.textContent=o;let c=t.head||t;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 Ms={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:"'"},Ma={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o7=typeof navigator<"u"&&/Mac/.test(navigator.platform),a7=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var bn=0;bn<10;bn++)Ms[48+bn]=Ms[96+bn]=String(bn);for(var bn=1;bn<=24;bn++)Ms[bn+111]="F"+bn;for(var bn=65;bn<=90;bn++)Ms[bn]=String.fromCharCode(bn+32),Ma[bn]=String.fromCharCode(bn);for(var Ed in Ms)Ma.hasOwnProperty(Ed)||(Ma[Ed]=Ms[Ed]);function c7(n){var e=o7&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||a7&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Ma:Ms)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}function dn(){var n=arguments[0];typeof n=="string"&&(n=document.createElement(n));var e=1,t=arguments[1];if(t&&typeof t=="object"&&t.nodeType==null&&!Array.isArray(t)){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var i=t[r];typeof i=="string"?n.setAttribute(r,i):i!=null&&(n[r]=i)}e++}for(;e<arguments.length;e++)W4(n,arguments[e]);return n}function W4(n,e){if(typeof e=="string")n.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)n.appendChild(e);else if(Array.isArray(e))for(var t=0;t<e.length;t++)W4(n,e[t]);else throw new RangeError("Unsupported child node: "+e)}let zn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},Dh=typeof document<"u"?document:{documentElement:{style:{}}};const zh=/Edge\/(\d+)/.exec(zn.userAgent),B4=/MSIE \d/.test(zn.userAgent),Ih=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zn.userAgent),M0=!!(B4||Ih||zh),Ig=!M0&&/gecko\/(\d+)/i.test(zn.userAgent),Zd=!M0&&/Chrome\/(\d+)/.exec(zn.userAgent),u7="webkitFontSmoothing"in Dh.documentElement.style,Fh=!M0&&/Apple Computer/.test(zn.vendor),Fg=Fh&&(/Mobile\/\w+/.test(zn.userAgent)||zn.maxTouchPoints>2);var Qe={mac:Fg||/Mac/.test(zn.platform),windows:/Win/.test(zn.platform),linux:/Linux|X11/.test(zn.platform),ie:M0,ie_version:B4?Dh.documentMode||6:Ih?+Ih[1]:zh?+zh[1]:0,gecko:Ig,gecko_version:Ig?+(/Firefox\/(\d+)/.exec(zn.userAgent)||[0,0])[1]:0,chrome:!!Zd,chrome_version:Zd?+Zd[1]:0,ios:Fg,android:/Android\b/.test(zn.userAgent),webkit_version:u7?+(/\bAppleWebKit\/(\d+)/.exec(zn.userAgent)||[0,0])[1]:0,safari:Fh,safari_version:Fh?+(/\bVersion\/(\d+(\.\d+)?)/.exec(zn.userAgent)||[0,0])[1]:0,tabSize:Dh.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function Df(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Gu=Object.create(null);function zf(n,e,t){if(n==e)return!0;n||(n=Gu),e||(e=Gu);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function d7(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function Hg(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function h7(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class hl{eq(e){return!1}updateDOM(e,t,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,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var ar=(function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n})(ar||(ar={}));class Ie extends As{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new Fa(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new al(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=Y4(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new al(e,r,i,t,e.widget||null,!0)}static line(e){return new Ha(e)}static set(e,t=!1){return Je.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}Ie.none=Je.empty;class Fa extends Ie{constructor(e){let{start:t,end:r}=Y4(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?Df(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Gu}eq(e){return this==e||e instanceof Fa&&this.tagName==e.tagName&&zf(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Fa.prototype.point=!1;class Ha extends Ie{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Ha&&this.spec.class==e.spec.class&&zf(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Ha.prototype.mapMode=Zn.TrackBefore;Ha.prototype.point=!0;class al extends Ie{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Zn.TrackBefore:Zn.TrackAfter:Zn.TrackDel}get type(){return this.startSide!=this.endSide?ar.WidgetRange:this.startSide<=0?ar.WidgetBefore:ar.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof al&&f7(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}al.prototype.point=!0;function Y4(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function f7(n,e){return n==e||!!(n&&e&&n.compare(e))}function eo(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Ta extends As{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Ta&&this.tagName==e.tagName&&zf(this.attributes,e.attributes)}static create(e){return new Ta(e.tagName,e.attributes||Gu)}static set(e,t=!1){return Je.of(e,t)}}Ta.prototype.startSide=Ta.prototype.endSide=-1;function Ea(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function Hh(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Oa(n,e){if(!e.anchorNode)return!1;try{return Hh(n,e.anchorNode)}catch{return!1}}function Lu(n){return n.nodeType==3?Za(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function xa(n,e,t,r){return t?Wg(n,e,t,r,-1)||Wg(n,e,t,r,1):!1}function Ts(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Ku(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Wg(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Ui(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=Ts(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?Ui(n):0}else return!1}}function Ui(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Ju(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function p7(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function q4(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function m7(n,e,t,r,i,s,o,c){let u=n.ownerDocument,f=u.defaultView||window;for(let p=n,O=!1;p&&!O;)if(p.nodeType==1){let y,v=p==u.body,S=1,b=1;if(v)y=p7(f);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 z=p.getBoundingClientRect();({scaleX:S,scaleY:b}=q4(p,z)),y={left:z.left,right:z.left+p.clientWidth*S,top:z.top,bottom:z.top+p.clientHeight*b}}let P=0,A=0;if(i=="nearest")e.top<y.top?(A=e.top-(y.top+o),t>0&&e.bottom>y.bottom+A&&(A=e.bottom-y.bottom+o)):e.bottom>y.bottom&&(A=e.bottom-y.bottom+o,t<0&&e.top-A<y.top&&(A=e.top-(y.top+o)));else{let z=e.bottom-e.top,M=y.bottom-y.top;A=(i=="center"&&z<=M?e.top+z/2-M/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-M+o)-y.top}if(r=="nearest"?e.left<y.left?(P=e.left-(y.left+s),t>0&&e.right>y.right+P&&(P=e.right-y.right+s)):e.right>y.right&&(P=e.right-y.right+s,t<0&&e.left<y.left+P&&(P=e.left-(y.left+s))):P=(r=="center"?e.left+(e.right-e.left)/2-(y.right-y.left)/2:r=="start"==c?e.left-s:e.right-(y.right-y.left)+s)-y.left,P||A)if(v)f.scrollBy(P,A);else{let z=0,M=0;if(A){let C=p.scrollTop;p.scrollTop+=A/b,M=(p.scrollTop-C)*b}if(P){let C=p.scrollLeft;p.scrollLeft+=P/S,z=(p.scrollLeft-C)*S}e={left:e.left-z,top:e.top-M,right:e.right-z,bottom:e.bottom-M},z&&Math.abs(z-P)<1&&(r="nearest"),M&&Math.abs(M-A)<1&&(i="nearest")}if(v)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 U4(n,e=!0){let t=n.ownerDocument,r=null,i=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class g7{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:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?Ui(t):0),r,Math.min(e.focusOffset,r?Ui(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let tl=null;Qe.safari&&Qe.safari_version>=26&&(tl=!1);function G4(n){if(n.setActive)return n.setActive();if(tl)return n.focus(tl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(tl==null?{get preventScroll(){return tl={preventScroll:!0},!0}}:void 0),!tl){tl=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let Bg;function Za(n,e,t=e){let r=Bg||(Bg=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function to(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function O7(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function x7(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,Ui(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=Ui(t))}else{if(t==n)return!0;r=Ts(t),t=t.parentNode}}function K4(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function J4(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=Ui(t)}else if(t.parentNode&&!Ku(t))r=Ts(t),t=t.parentNode;else return null}}function e5(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Ku(t))r=Ts(t)+1,t=t.parentNode;else return null}}class qr{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new qr(e.parentNode,Ts(e),t)}static after(e,t){return new qr(e.parentNode,Ts(e)+1,t)}}var Ft=(function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n})(Ft||(Ft={}));const cl=Ft.LTR,If=Ft.RTL;function t5(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const y7=t5("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),v7=t5("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),Wh=Object.create(null),pi=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);Wh[e]=t,Wh[t]=-e}function n5(n){return n<=247?y7[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?v7[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const w7=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Si{get dir(){return this.level%2?If:cl}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let c=e[o];if(c.from<=t&&c.to>=t){if(c.level==r)return o;(s<0||(i!=0?i<0?c.from<t:c.to>t:e[s].level>c.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function r5(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!r5(r.inner,i.inner))return!1}return!0}const bt=[];function S7(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,c=s<r.length?r[s].from:t,u=s?256:i;for(let f=o,p=u,O=u;f<c;f++){let y=n5(n.charCodeAt(f));y==512?y=p:y==8&&O==4&&(y=16),bt[f]=y==4?2:y,y&7&&(O=y),p=y}for(let f=o,p=u,O=u;f<c;f++){let y=bt[f];if(y==128)f<c-1&&p==bt[f+1]&&p&24?y=bt[f]=p:bt[f]=256;else if(y==64){let v=f+1;for(;v<c&&bt[v]==64;)v++;let S=f&&p==8||v<t&&bt[v]==8?O==1?1:8:256;for(let b=f;b<v;b++)bt[b]=S;f=v-1}else y==8&&O==1&&(bt[f]=1);p=y,y&7&&(O=y)}}}function b7(n,e,t,r,i){let s=i==1?2:1;for(let o=0,c=0,u=0;o<=r.length;o++){let f=o?r[o-1].to:e,p=o<r.length?r[o].from:t;for(let O=f,y,v,S;O<p;O++)if(v=Wh[y=n.charCodeAt(O)])if(v<0){for(let b=c-3;b>=0;b-=3)if(pi[b+1]==-v){let P=pi[b+2],A=P&2?i:P&4?P&1?s:i:0;A&&(bt[O]=bt[pi[b]]=A),c=b;break}}else{if(pi.length==189)break;pi[c++]=O,pi[c++]=y,pi[c++]=u}else if((S=bt[O])==2||S==1){let b=S==i;u=b?0:1;for(let P=c-3;P>=0;P-=3){let A=pi[P+2];if(A&2)break;if(b)pi[P+2]|=2;else{if(A&4)break;pi[P+2]|=4}}}}}function k7(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,c=i<t.length?t[i].from:e;for(let u=o;u<c;){let f=bt[u];if(f==256){let p=u+1;for(;;)if(p==c){if(i==t.length)break;p=t[i++].to,c=i<t.length?t[i].from:e}else if(bt[p]==256)p++;else break;let O=s==1,y=(p<e?bt[p]:r)==1,v=O==y?O?1:2:r;for(let S=p,b=i,P=b?t[b-1].to:n;S>u;)S==P&&(S=t[--b].from,P=b?t[b-1].to:n),bt[--S]=v;u=p}else s=f,u++}}}function Bh(n,e,t,r,i,s,o){let c=r%2?2:1;if(r%2==i%2)for(let u=e,f=0;u<t;){let p=!0,O=!1;if(f==s.length||u<s[f].from){let b=bt[u];b!=c&&(p=!1,O=b==16)}let y=!p&&c==1?[]:null,v=p?r:r+1,S=u;e:for(;;)if(f<s.length&&S==s[f].from){if(O)break e;let b=s[f];if(!p)for(let P=b.to,A=f+1;;){if(P==t)break e;if(A<s.length&&s[A].from==P)P=s[A++].to;else{if(bt[P]==c)break e;break}}if(f++,y)y.push(b);else{b.from>u&&o.push(new Si(u,b.from,v));let P=b.direction==cl!=!(v%2);Yh(n,P?r+1:r,i,b.inner,b.from,b.to,o),u=b.to}S=b.to}else{if(S==t||(p?bt[S]!=c:bt[S]==c))break;S++}y?Bh(n,u,S,r+1,i,y,o):u<S&&o.push(new Si(u,S,v)),u=S}else for(let u=t,f=s.length;u>e;){let p=!0,O=!1;if(!f||u>s[f-1].to){let b=bt[u-1];b!=c&&(p=!1,O=b==16)}let y=!p&&c==1?[]:null,v=p?r:r+1,S=u;e:for(;;)if(f&&S==s[f-1].to){if(O)break e;let b=s[--f];if(!p)for(let P=b.from,A=f;;){if(P==e)break e;if(A&&s[A-1].to==P)P=s[--A].from;else{if(bt[P-1]==c)break e;break}}if(y)y.push(b);else{b.to<u&&o.push(new Si(b.to,u,v));let P=b.direction==cl!=!(v%2);Yh(n,P?r+1:r,i,b.inner,b.from,b.to,o),u=b.from}S=b.from}else{if(S==e||(p?bt[S-1]!=c:bt[S-1]==c))break;S--}y?Bh(n,S,u,r+1,i,y,o):S<u&&o.push(new Si(S,u,v)),u=S}}function Yh(n,e,t,r,i,s,o){let c=e%2?2:1;S7(n,i,s,r,c),b7(n,i,s,r,c),k7(i,s,r,c),Bh(n,i,s,e,t,r,o)}function $7(n,e,t){if(!n)return[new Si(0,0,e==If?1:0)];if(e==cl&&!t.length&&!w7.test(n))return i5(n.length);if(t.length)for(;n.length>bt.length;)bt[bt.length]=256;let r=[],i=e==cl?0:1;return Yh(n,i,i,t,0,n.length,r),r}function i5(n){return[new Si(0,n,0)]}let s5="";function P7(n,e,t,r,i){var s;let o=r.head-n.from,c=Si.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),u=e[c],f=u.side(i,t);if(o==f){let y=c+=i?1:-1;if(y<0||y>=e.length)return null;u=e[c=y],o=u.side(!i,t),f=u.side(i,t)}let p=hn(n.text,o,u.forward(i,t));(p<u.from||p>u.to)&&(p=f),s5=n.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==f&&O.level+(i?0:1)<u.level?ue.cursor(O.side(!i,t)+n.from,O.forward(i,t)?1:-1,O.level):ue.cursor(p+n.from,u.forward(i,t)?-1:1,u.level)}function Q7(n,e,t){for(let r=e;r<t;r++){let i=n5(n.charCodeAt(r));if(i==1)return cl;if(i==2||i==4)return If}return cl}const l5=Te.define(),o5=Te.define(),a5=Te.define(),c5=Te.define(),qh=Te.define(),u5=Te.define(),d5=Te.define(),Ff=Te.define(),Hf=Te.define(),h5=Te.define({combine:n=>n.some(e=>e)}),A7=Te.define({combine:n=>n.some(e=>e)}),f5=Te.define();class no{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new no(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 no(ue.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const su=at.define({map:(n,e)=>n.map(e)}),p5=at.define();function bi(n,e,t){let r=n.facet(c5);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Wi=Te.define({combine:n=>n.length?n[0]:!0});let C7=0;const Hl=Te.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class cr{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Hl.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Hl.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new cr(C7++,e,r,i,c=>{let u=[];return o&&u.push(T0.of(f=>{let p=f.plugin(c);return p?o(p):Ie.none})),s&&u.push(s(c)),u})}static fromClass(e,t){return cr.define((r,i)=>new e(r,i),t)}}class jd{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 t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(bi(t.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(t){bi(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){bi(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const m5=Te.define(),Wf=Te.define(),T0=Te.define(),g5=Te.define(),Bf=Te.define(),Wa=Te.define(),O5=Te.define();function Yg(n,e){let t=n.state.facet(O5);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Je.spans(r,e.from,e.to,{point(){},span(s,o,c,u){let f=s-e.from,p=o-e.from,O=i;for(let y=c.length-1;y>=0;y--,u--){let v=c[y].spec.bidiIsolate,S;if(v==null&&(v=Q7(e.text,f,p)),u>0&&O.length&&(S=O[O.length-1]).to==f&&S.direction==v)S.to=p,O=S.inner;else{let b={from:f,to:p,direction:v,inner:[]};O.push(b),O=b.inner}}}}),i}const x5=Te.define();function y5(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(x5)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const ca=Te.define();class Zr{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new Zr(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 t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let c=i<e.length?e[i].fromB:1e9,u=s<t.length?t[s]:1e9,f=Math.min(c,u);if(f==1e9)break;let p=f+o,O=f,y=p;for(;;)if(s<t.length&&t[s]<=O){let v=t[s+1];s+=2,O=Math.max(O,v);for(let S=i;S<e.length&&e[S].fromB<=O;S++)o=e[S].toA-e[S].toB;y=Math.max(y,v+o)}else if(i<e.length&&e[i].fromB<=O){let v=e[i++];O=Math.max(O,v.toB),y=Math.max(y,v.toA),o=v.toA-v.toB}else break;r.push(new Zr(p,y,f,O))}return r}}class e0{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=nn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,c,u)=>i.push(new Zr(s,o,c,u))),this.changedRanges=i}static create(e,t,r){return new e0(e,t,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 M7=[];class Dt{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return M7}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 t=this.domAttrs;t&&d7(this.dom,t)}}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,t=this.posAtStart){let r=t;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,t){return null}domPosFor(e,t){let r=Ts(this.dom),i=this.length?e>0:t>0;return new qr(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 Z0)return e;return null}static get(e){return e.cmTile}}class E0 extends Dt{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 t=this.dom,r=null,i,s=(e==null?void 0:e.node)==t?e:null,o=0;for(let c of this.children){if(c.sync(e),o+=c.length+c.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=c.dom&&(s.written=!0),c.dom.parentNode==t)for(;i&&i!=c.dom;)i=qg(i);else t.insertBefore(c.dom,i);r=c.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=qg(i);this.length=o}}function qg(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class Z0 extends E0{constructor(e,t){super(t),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 t=Dt.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Yi)t.push(i),r=o,i=0;else{let c=s+o.length,u=e(o,s);if(u!==void 0)return u;s=c+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((c,u)=>{let f=u+c.length;if(e>=u&&e<=f){if(c.isWidget()&&t>=-1&&t<=1){if(c.flags&32)return!0;c.flags&16&&(r=void 0)}(u<e||e==f&&(t<-1?c.length:c.covers(1)))&&(!r||!c.isWidget()&&r.isWidget())&&(r=c,i=e-u),(f>e||e==u&&(t>1?c.length:c.covers(-1)))&&(!s||!c.isWidget()&&s.isWidget())&&(s=c,o=e-u)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Yi extends E0{constructor(e,t){super(e),this.wrapper=t}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,t){let r=new Yi(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class ao extends E0{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new ao(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,c=-1;function u(p,O){for(let y=0,v=0;y<p.children.length&&v<=O;y++){let S=p.children[y],b=v+S.length;b>=O&&(S.isComposite()?u(S,O-v):(!o||o.isHidden&&(t>0||r&&E7(o,S)))&&(b>O||S.flags&32)?(o=S,c=O-v):(v<O||S.flags&16&&!S.isHidden)&&(i=S,s=O-v)),v=b}}u(this,e);let f=(t<0?i:o)||i||o;return f?{tile:f,offset:f==i?s:c}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):T7(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new qr(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,c=!1;for(let u of o.children){if(c)return new qr(u.dom,0);u==r.tile&&(c=!0)}}return new qr(this.dom,0)}}function T7(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=Lu(e);return t[t.length-1]||null}function E7(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class ir extends E0{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new ir(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class il extends Dt{constructor(e,t){super(e,t.length),this.text=t}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,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?Qe.chrome||Qe.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let c=Za(this.dom,i,s).getClientRects();if(!c.length)return null;let u=c[(o?o<0:t>=0)?0:c.length-1];return Qe.safari&&!o&&u.width==0&&(u=Array.prototype.find.call(c,f=>f.width)||u),o?Ju(u,o<0):u||null}static of(e,t){let r=new il(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class ul extends Dt{constructor(e,t,r,i){super(e,t,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,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Ju(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=c?s.length-1:0;o=s[u],!(e>0?u==0:u==s.length-1||o.top<o.bottom);u+=c?-1:1);return Ju(o,!c)}}get overrideDOMText(){if(!this.length)return it.empty;let{root:e}=this;if(!e)return it.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new ul(s,r,e,i)}}class t0 extends Dt{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return it.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class Z7{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:c}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!c.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=c.pop(),s++}else{let u=i.children[s],f=u.breakAfter;(t>0?u.length<=e:u.length<e)&&(!r||r.skip(u,0,u.length)!==!1||!u.isComposite)?(o=!!f,s++,e-=u.length):(c.push({tile:i,index:s}),i=u,s=0,r&&u.isComposite()&&r.enter(u))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=c.pop(),s++;else if(e){let u=Math.min(e,i.length-s);r&&r.skip(i,s,s+u),e-=u,s+=u}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class j7{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class R7{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),c=o.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let u=o.children[o.children.length-1]=new il(c.dom,c.text+e);u.parent=o}else o.append(i||il.of(e,(s=this.cache.find(il))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?Rd(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let c=t.marks.length-1;c>=0;c--){let u=t.marks[c],f=i.lastChild;if(f instanceof ir&&f.mark.eq(u.mark))f.dom!=u.dom&&f.setDOM(Rd(u.dom)),i=f;else{if(this.cache.reused.get(u)){let O=Dt.get(u.dom);O&&O.setDOM(Rd(u.dom))}let p=ir.of(u.mark,u.dom);i.append(p),i=p}this.cache.reused.set(u,2)}let s=Dt.get(e.text);s&&this.cache.reused.set(s,2);let o=new il(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,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 t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=v5);let i=ao.start(e,t||((r=this.cache.find(ao))===null||r===void 0?void 0:r.dom),!!t);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,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],c;if(t>0&&(c=i.lastChild)&&c instanceof ir&&c.mark.eq(o))i=c,t--;else{let u=ir.of(o,(r=this.cache.find(ir,f=>f.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(u),i=u,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Ug(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Qe.ios&&Ug(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(Vd,0,32)||new ul(Vd.toDOM(),0,Vd,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 t=new j7(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Yi&&i.wrapper.eq(r.wrapper))t=i;else{let s=Yi.of(r.wrapper,(e=this.cache.find(Yi,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(t0,void 0,1);return r&&(r.flags=t),r||new t0(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class V7{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:s,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 s?null:i.slice(0,c)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const n0=[ul,ao,il,ir,t0,Yi,Z0];for(let n=0;n<n0.length;n++)n0[n].bucket=n;class L7{constructor(e){this.view=e,this.buckets=n0.map(()=>[]),this.index=n0.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let c=s.length-1;c>=0;c--){let u=(c+o)%s.length,f=s[u];if((!t||t(f))&&!this.reused.has(f))return s.splice(u,1),u<o&&this.index[i]--,this.reused.set(f,r),f}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let c=i[s];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(s,1),s<this.index[0]&&this.index[0]--,c.widget==e&&c.length==t&&(c.flags&497)==r?(this.reused.set(c,1),c):(this.reused.set(c,2),new ul(c.dom,t,e,c.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class N7{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new L7(e),this.text=new V7(e.state.doc),this.builder=new R7(this.cache,new Z0(e,e.contentDOM),Je.iter(r)),this.cache.reused.set(t,2),this.old=new Z7(t),this.reuseWalker={skip:(o,c,u)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let c=o<e.length?e[o++]:null,u=c?c.fromA:this.old.root.length;if(u>i){let f=u-i;this.preserve(f,!o,!c),i=u,s+=f}if(!c)break;t&&c.fromA<=t.range.fromA&&c.toA>=t.range.toA?(this.forward(c.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,c.toA),this.emit(t.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(s,c.toB)),s=c.toB,i=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=D7(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,c,u)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(u-c);else{let f=u>0||c<o.length?ul.of(o.widget,this.view,u-c,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);f.flags&256?(f.flags&=-2,this.builder.addBlockWidget(f)):(this.builder.ensureLine(null),this.builder.addInlineWidget(f,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!c&&u==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(c,u),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof t0)this.cache.add(o);else if(o instanceof ir)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=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 ir&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof ir&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=Je.spans(this.decorations,e,t,{point:(c,u,f,p,O,y)=>{if(f instanceof al){if(this.disallowBlockEffectsFor[y]){if(f.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=p.length,O>p.length)i.continueWidget(u-c);else{let v=f.widget||(f.block?co.block:co.inline),S=X7(f),b=this.cache.findWidget(v,u-c,S)||ul.of(v,this.view,u-c,S);f.block?(f.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(b)):(i.ensureLine(r),i.addInlineWidget(b,p,O))}r=null}else r=_7(r,f);u>c&&this.text.skip(u-c)},span:(c,u,f,p)=>{for(let O=c;O<u;){let y=this.text.next(Math.min(512,u-O));y==null?(i.addLineStartIfNotCovered(r),i.addBreak(),O++):(i.ensureLine(r),i.addText(y,f,O==c?p:f.length),O+=y.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=Dt.get(i);if(i==this.view.contentDOM)break;s instanceof ir?t.push(s):s!=null&&s.isLine()?r=s:s instanceof Yi||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new ao(i,v5):r||t.push(ir.of(new Fa({tagName:i.nodeName.toLowerCase(),attributes:h7(i)}),i)))}return{line:r,marks:t}}}function Ug(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function X7(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const v5={class:"cm-line"};function _7(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&Df(t,n),r&&(n.class+=" "+r)),n}function D7(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof ir&&e.push(r.mark)}return e}function Rd(n){let e=Dt.get(n);return e&&e.setDOM(n.cloneNode()),n}class co extends hl{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}}co.inline=new co("span");co.block=new co("div");const Vd=new class extends hl{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Gg{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=Ie.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 Z0(e,e.contentDOM),this.updateInner([new Zr(0,0,0,e.state.doc.length)],null)}update(e){var t;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&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!U7(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?I7(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:p,to:O}=this.hasComposition;r=new Zr(p,O,e.changes.mapPos(p,-1),e.changes.mapPos(O,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Qe.ie||Qe.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,c=this.blockWrappers;this.updateDeco();let u=W7(o,this.decorations,e.changes);u.length&&(r=Zr.extendWithRanges(r,u));let f=Y7(c,this.blockWrappers,e.changes);return f.length&&(r=Zr.extendWithRanges(r,f)),s&&!r.some(p=>p.fromA<=s.range.fromA&&p.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,c=new N7(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&Dt.get(t.text)&&c.cache.reused.set(Dt.get(t.text),2),this.tile=c.run(e,t),Uh(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 s=Qe.chrome||Qe.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.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 s of this.tile.children)s.isWidget()&&s.widget instanceof Ld&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(p5)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Wi)||r.tabIndex>-1)&&Oa(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let c=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,f,p;if(u.empty?p=f=this.inlineDOMNearPos(u.anchor,u.assoc||1):(p=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),f=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),Qe.gecko&&u.empty&&!this.hasComposition&&z7(f)){let y=document.createTextNode("");this.view.observer.ignore(()=>f.node.insertBefore(y,f.node.childNodes[f.offset]||null)),f=p=new qr(y,0),c=!0}let O=this.view.observer.selectionRange;(c||!O.focusNode||(!xa(f.node,f.offset,O.anchorNode,O.anchorOffset)||!xa(p.node,p.offset,O.focusNode,O.focusOffset))&&!this.suppressWidgetCursorChange(O,u))&&(this.view.observer.ignore(()=>{Qe.android&&Qe.chrome&&r.contains(O.focusNode)&&q7(O.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let y=Ea(this.view.root);if(y)if(u.empty){if(Qe.gecko){let v=F7(f.node,f.offset);if(v&&v!=3){let S=(v==1?J4:e5)(f.node,f.offset);S&&(f=new qr(S.node,S.offset))}}y.collapse(f.node,f.offset),u.bidiLevel!=null&&y.caretBidiLevel!==void 0&&(y.caretBidiLevel=u.bidiLevel)}else if(y.extend){y.collapse(f.node,f.offset);try{y.extend(p.node,p.offset)}catch{}}else{let v=document.createRange();u.anchor>u.head&&([f,p]=[p,f]),v.setEnd(p.node,p.offset),v.setStart(f.node,f.offset),y.removeAllRanges(),y.addRange(v)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(f,p)),this.impreciseAnchor=f.precise?null:new qr(O.anchorNode,O.anchorOffset),this.impreciseHead=p.precise?null:new qr(O.focusNode,O.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&xa(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Ea(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let c=o.posAtStart;if(t.head==c||t.head==c+o.length)return;let u=this.coordsAt(t.head,-1),f=this.coordsAt(t.head,1);if(!u||!f||u.bottom>f.top)return;let p=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(p.node,p.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let O=e.observer.selectionRange;e.docView.posFromDOM(O.anchorNode,O.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){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 s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=Ui(e)==0?0:t==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?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!Dt.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,c=i;;o++){let u=r.children[o];if(u.dom==s)return c;c+=u.length+u.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,c=-1,u=!1;return this.tile.blockTiles((f,p)=>{if(f.isWidget()){if(f.flags&32&&p>=e)return!0;f.flags&16&&(s=!0)}else{let O=p+f.length;if(p<=e&&(r=f,i=e-p,s=O<e),O>=e&&!o&&(o=f,c=e-p,u=p>e),p>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:u&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(c,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof Ld?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let c of s.children){if(c.length>=o){let u=i(c,o);if(u)return u}if(o-=c.length,o<0)break}else if(s.isText()&&o<s.length){let c=hn(s.text,o);if(c==o)return null;let u=Za(s.dom,o,c).getClientRects();for(let f=0;f<u.length;f++){let p=u[f];if(f==u.length-1||p.top<p.bottom&&p.left<p.right)return p}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==Ft.LTR,f=0,p=(O,y,v)=>{for(let S=0;S<O.children.length&&!(y>i);S++){let b=O.children[S],P=y+b.length,A=b.dom.getBoundingClientRect(),{height:z}=A;if(v&&!S&&(f+=A.top-v.top),b instanceof Yi)P>r&&p(b,y,A);else if(y>=r&&(f>0&&t.push(-f),t.push(z+f),f=0,o)){let M=b.dom.lastChild,C=M?Lu(M):[];if(C.length){let Z=C[C.length-1],H=u?Z.right-A.left:A.right-Z.left;H>c&&(c=H,this.minWidth=s,this.minWidthFrom=y,this.minWidthTo=P)}}v&&S==O.children.length-1&&(f+=v.bottom-A.bottom),y=P+b.breakAfter}};return p(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?Ft.RTL:Ft.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let c=0,u;for(let f of o.children){if(!f.isText()||/[^ -~]/.test(f.text))return;let p=Lu(f.dom);if(p.length!=1)return;c+=p[0].width,u=p[0].height}if(c)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:c/o.length,textHeight:u}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=Lu(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let c=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(Ie.replace({widget:new Ld(c),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return Ie.set(e)}updateDeco(){let e=1,t=this.view.state.facet(T0).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(Bf).map((s,o)=>{let c=typeof s=="function";return c&&(r=!0),c?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Je.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(g5).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var t;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(f5))try{if(p(this.view,e.range,e))return!0}catch(O){bi(this.view.state,O,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(t=r.assoc)!==null&&t!==void 0?t:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let o=y5(this.view),c={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:u,offsetHeight:f}=this.view.scrollDOM;if(m7(this.view.scrollDOM,c,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,u),-u),Math.max(Math.min(e.yMargin,f),-f),this.view.textDirection==Ft.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 t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){Uh(this.tile)}}function Uh(n,e){let t=e==null?void 0:e.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)Uh(r,e)}}function z7(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function w5(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=J4(t.focusNode,t.focusOffset),i=e5(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let c=Dt.get(i.node);if(!c||c.isText()&&c.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let u=Dt.get(r.node);!u||u.isText()&&u.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function I7(n,e,t){let r=w5(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,c=i.nodeValue;if(/[\n\r]/.test(c)||n.state.doc.sliceString(r.from,r.to)!=c)return null;let u=e.invertedDesc;return{range:new Zr(u.mapPos(s),u.mapPos(o),s,o),text:i}}function F7(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let H7=class{constructor(){this.changes=[]}compareRange(e,t){eo(e,t,this.changes)}comparePoint(e,t){eo(e,t,this.changes)}boundChange(e){eo(e,e,this.changes)}};function W7(n,e,t){let r=new H7;return Je.compare(n,e,t,r),r.changes}class B7{constructor(){this.changes=[]}compareRange(e,t){eo(e,t,this.changes)}comparePoint(){}boundChange(e){eo(e,e,this.changes)}}function Y7(n,e,t){let r=new B7;return Je.compare(n,e,t,r),r.changes}function q7(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function U7(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class Ld extends hl{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 G7(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return ue.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,c=s;t<0?o=hn(i.text,s,!1):c=hn(i.text,s);let u=r(i.text.slice(o,c));for(;o>0;){let f=hn(i.text,o,!1);if(r(i.text.slice(f,o))!=u)break;o=f}for(;c<i.length;){let f=hn(i.text,c);if(r(i.text.slice(c,f))!=u)break;c=f}return ue.range(o+i.from,c+i.from)}function K7(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let c=n.viewState.heightOracle.textHeight,u=Math.floor((i-t.top-(n.defaultLineHeight-c)*.5)/c);s+=u*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+s7(o,s,n.state.tabSize)}function J7(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==ar.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function ek(n,e,t,r){let i=J7(n,e.head,e.assoc||-1),s=!r||i.type!=ar.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),c=n.textDirectionAt(i.from),u=n.posAtCoords({x:t==(c==Ft.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(u!=null)return ue.cursor(u,t?-1:1)}return ue.cursor(t?i.to:i.from,t?-1:1)}function Kg(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let c=e,u=null;;){let f=P7(i,s,o,c,t),p=s5;if(!f){if(i.number==(t?n.state.doc.lines:1))return c;p=`
61
- `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),f=n.visualLineSide(i,!t)}if(u){if(!u(p))return c}else{if(!r)return f;u=r(p)}c=f}}function tk(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==Zt.Space&&(i=o),i==o}}function nk(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return ue.cursor(i,e.assoc);let o=e.goalColumn,c,u=n.contentDOM.getBoundingClientRect(),f=n.coordsAtPos(i,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),p=n.documentTop;if(f)o==null&&(o=f.left-u.left),c=s<0?f.top:f.bottom;else{let S=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(u.right-u.left,n.defaultCharacterWidth*(i-S.from))),c=(s<0?S.top:S.bottom)+p}let O=u.left+o,y=n.viewState.heightOracle.textHeight>>1,v=r??y;for(let S=0;;S+=y){let b=c+(v+S)*s,P=Gh(n,{x:O,y:b},!1,s);if(t?b>u.bottom:b<u.top)return ue.cursor(P.pos,P.assoc);let A=n.coordsAtPos(P.pos,P.assoc),z=A?(A.top+A.bottom)/2:0;if(!A||(t?z>c:z<c))return ue.cursor(P.pos,P.assoc,void 0,o)}}function ya(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,c)=>{if(e>s&&e<o){let u=r||t||(e-s<o-e?-1:1);e=u<0?s:o,r=u}});if(!r)return e}}function S5(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=ya(n,i.from,0);o!=i.from&&(s=ue.cursor(o,-1))}else{let o=ya(n,i.from,-1),c=ya(n,i.to,1);(o!=i.from||c!=i.to)&&(s=ue.range(i.from==i.anchor?o:c,i.from==i.head?o:c))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?ue.create(t,e.mainIndex):e}function Nd(n,e,t){let r=ya(n.state.facet(Wa).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:ue.cursor(r,r<t.from?1:-1)}class wi{constructor(e,t){this.pos=e,this.assoc=t}}function Gh(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:c}=e,u=c-s,f;for(;;){if(u<0)return new wi(0,1);if(u>n.viewState.docHeight)return new wi(n.state.doc.length,-1);if(f=n.elementAtHeight(u),r==null)break;if(f.type==ar.Text){if(r<0?f.to<n.viewport.from:f.from>n.viewport.to)break;let y=n.docView.coordsAt(r<0?f.from:f.to,r>0?-1:1);if(y&&(r<0?y.top<=u+s:y.bottom>=u+s))break}let O=n.viewState.heightOracle.textHeight/2;u=r>0?f.bottom+O:f.top-O}if(n.viewport.from>=f.to||n.viewport.to<=f.from){if(t)return null;if(f.type==ar.Text){let O=K7(n,i,f,o,c);return new wi(O,O==f.from?1:-1)}}if(f.type!=ar.Text)return u<(f.top+f.bottom)/2?new wi(f.from,1):new wi(f.to,-1);let p=n.docView.lineAt(f.from,2);return(!p||p.length!=f.length)&&(p=n.docView.lineAt(f.from,-2)),new rk(n,o,c,n.textDirectionAt(f.from)).scanTile(p,f.from)}class rk{constructor(e,t,r,i){this.view=e,this.x=t,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,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Si.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[Si.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),c,u,f=-1,p=1e9,O;e:for(;r<i;){let v=i-r,S=r+i>>1;t:if(s.has(S)){let P=r+Math.floor(Math.random()*v);for(let A=0;A<v;A++){if(!s.has(P)){S=P;break t}P++,P==i&&(P=r)}break e}s.add(S);let b=t(S);if(b)for(let P=0;P<b.length;P++){let A=b[P],z=0;if(!(A.width==0&&b.length>1)){if(A.bottom<this.y)(!c||c.bottom<A.bottom)&&(c=A),z=1;else if(A.top>this.y)(!u||u.top>A.top)&&(u=A),z=-1;else{let M=A.left>this.x?this.x-A.left:A.right<this.x?this.x-A.right:0,C=Math.abs(M);C<p&&(f=S,p=C,O=A),M&&(z=M<0==(this.baseDir==Ft.LTR)?-1:1)}z==-1&&(!o||this.baseDirAt(e[S],1))?i=S:z==1&&(!o||this.baseDirAt(e[S+1],-1))&&(r=S+1)}}}if(!O){let v=c&&(!u||this.y-c.bottom<u.top-this.y)?c:u;return this.y=(v.top+v.bottom)/2,this.scan(e,t)}let y=(o?this.dirAt(e[f],1):this.baseDir)==Ft.LTR;return{i:f,after:this.x>(O.left+O.right)/2==y}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=hn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,c=r[s+1]-t;return Za(e.dom,o,c).getClientRects()});return i.after?new wi(r[i.i+1],-1):new wi(r[i.i],1)}scanTile(e,t){if(!e.length)return new wi(t,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,t);if(c.isComposite())return this.scanTile(c,t)}let r=[t];for(let c=0,u=t;c<e.children.length;c++)r.push(u+=e.children[c].length);let i=this.scan(r,c=>{let u=e.children[c];return u.flags&48?null:(u.dom.nodeType==1?u.dom:Za(u.dom,0,u.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new wi(r[i.i+1],-1):new wi(o,1)}}const _l="￿";class ik{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(ot.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=_l}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=Dt.get(i),c=i.nextSibling;if(c==t){o!=null&&o.breakAfter&&!c&&r!=this.view.contentDOM&&this.lineBreak();break}let u=Dt.get(c);(o&&u?o.breakAfter:(o?o.breakAfter:Ku(i))||Ku(c)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!lk(c,t)&&this.lineBreak(),i=c}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,c;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(c=i.exec(t))&&(s=c.index,o=c[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=o-1);r=s+o}}readNode(e){let t=Dt.get(e),r=t&&t.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,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(sk(e,r.node,r.offset)?t:0))}}function sk(n,e,t){for(;;){if(!e||t<Ui(e))return!1;if(e==n)return!0;t=Ts(e)+1,e=e.parentNode}}function lk(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=Dt.get(n);if(!(r!=null&&r.isWidget()))return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class Jg{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class ok{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,c=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=b5(e.docView.tile,t,r,0))){let u=s||o?[]:ck(e),f=new ik(u,e);f.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=f.text,this.newSel=uk(u,this.bounds.from)}else{let u=e.observer.selectionRange,f=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!Hh(e.contentDOM,u.focusNode)?c.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),p=o&&o.node==u.anchorNode&&o.offset==u.anchorOffset||!Hh(e.contentDOM,u.anchorNode)?c.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),O=e.viewport;if((Qe.ios||Qe.chrome)&&c.main.empty&&f!=p&&(O.from>0||O.to<e.state.doc.length)){let y=Math.min(f,p),v=Math.max(f,p),S=O.from-y,b=O.to-v;(S==0||S==1||y==0)&&(b==0||b==-1||v==e.state.doc.length)&&(f=0,p=e.state.doc.length)}if(e.inputState.composing>-1&&c.ranges.length>1)this.newSel=c.replaceRange(ue.range(p,f));else if(e.lineWrapping&&p==f&&!(c.main.empty&&c.main.head==f)&&e.inputState.lastTouchTime>Date.now()-100){let y=e.coordsAtPos(f,-1),v=0;y&&(v=e.inputState.lastTouchY<=y.bottom?-1:1),this.newSel=ue.create([ue.cursor(f,v)])}else this.newSel=ue.single(p,f)}}}function b5(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,c=-1;for(let u=0,f=r,p=r;u<n.children.length;u++){let O=n.children[u],y=f+O.length;if(f<e&&y>t)return b5(O,e,t,f);if(y>=e&&i==-1&&(i=u,s=f),f>t&&O.dom.parentNode==n.dom){o=u,c=p;break}p=y,f=y+O.breakAfter}return{from:s,to:c<0?r+n.length:c,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function k5(n,e){let t,{newSel:r}=e,{state:i}=n,s=i.selection.main,o=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:c,to:u}=e.bounds,f=s.from,p=null;(o===8||Qe.android&&e.text.length<u-c)&&(f=s.to,p="end");let O=i.doc.sliceString(c,u,_l),y,v;!s.empty&&s.from>=c&&s.to<=u&&(e.typeOver||O!=e.text)&&O.slice(0,s.from-c)==e.text.slice(0,s.from-c)&&O.slice(s.to-c)==e.text.slice(y=e.text.length-(O.length-(s.to-c)))?t={from:s.from,to:s.to,insert:it.of(e.text.slice(s.from-c,y).split(_l))}:(v=$5(O,e.text,f-c,p))&&(Qe.chrome&&o==13&&v.toB==v.from+2&&e.text.slice(v.from,v.toB)==_l+_l&&v.toB--,t={from:c+v.from,to:c+v.toA,insert:it.of(e.text.slice(v.from,v.toB).split(_l))})}else r&&(!n.hasFocus&&i.facet(Wi)||r0(r,s))&&(r=null);if(!t&&!r)return!1;if((Qe.mac||Qe.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=ue.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:it.of([t.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&n.docView.lineHasWidget(s.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.toText(n.inputState.insertingText)}:Qe.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
62
- `&&n.lineWrapping&&(r&&(r=ue.single(r.main.anchor-1,r.main.head-1)),t={from:s.from,to:s.to,insert:it.of([" "])}),t)return Yf(n,t,r,o);if(r&&!r0(r,s)){let c=!1,u="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(c=!0),u=n.inputState.lastSelectionOrigin,u=="select.pointer"&&(r=S5(i.facet(Wa).map(f=>f(n)),r))),n.dispatch({selection:r,scrollIntoView:c,userEvent:u}),!0}else return!1}function Yf(n,e,t,r=-1){if(Qe.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Qe.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&to(n.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)&&to(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&to(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,c=()=>o||(o=ak(n,e,t));return n.state.facet(u5).some(u=>u(n,e.from,e.to,s,c))||n.dispatch(c()),!0}function ak(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,f=u<0?s.from:s.to,p=ya(i.facet(Wa).map(O=>O(n)),f,u);e.from==p&&(o=p)}if(o>-1)r={changes:e,selection:ue.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let u=s.from<e.from?i.sliceDoc(s.from,e.from):"",f=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(u+e.insert.sliceString(0,void 0,n.state.lineBreak)+f))}else{let u=i.changes(e),f=t&&t.main.to<=u.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let p=n.state.sliceDoc(e.from,e.to),O,y=t&&w5(n,t.main.head);if(y){let S=e.insert.length-(e.to-e.from);O={from:y.from,to:y.to-S}}else O=n.state.doc.lineAt(s.head);let v=s.to-e.to;r=i.changeByRange(S=>{if(S.from==s.from&&S.to==s.to)return{changes:u,range:f||S.map(u)};let b=S.to-v,P=b-p.length;if(n.state.sliceDoc(P,b)!=p||b>=O.from&&P<=O.to)return{range:S};let A=i.changes({from:P,to:b,insert:e.insert}),z=S.to-s.to;return{changes:A,range:f?ue.range(Math.max(0,f.anchor+z),Math.max(0,f.head+z)):S.map(A)}})}else r={changes:u,selection:f&&i.selection.replaceRange(f)}}let c="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,c+=".compose",n.inputState.compositionFirstChange&&(c+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:c,scrollIntoView:!0})}function $5(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,c=e.length;for(;o>0&&c>0&&n.charCodeAt(o-1)==e.charCodeAt(c-1);)o--,c--;if(r=="end"){let u=Math.max(0,s-Math.min(o,c));t-=o+u-s}if(o<s&&n.length<e.length){let u=t<=s&&t>=o?s-t:0;s-=u,c=s+(c-o),o=s}else if(c<s){let u=t<=s&&t>=c?s-t:0;s-=u,o=s+(o-c),c=s}return{from:s,toA:o,toB:c}}function ck(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new Jg(t,r)),(i!=t||s!=r)&&e.push(new Jg(i,s))),e}function uk(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?ue.single(t+e,r+e):null}function r0(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class dk{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,Qe.safari&&e.contentDOM.addEventListener("input",()=>null),Qe.gecko&&Pk(e.contentDOM.ownerDocument)}handleEvent(e){!yk(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,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=hk(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,c=r[s];c&&o!=!c.handlers.length&&(i.removeEventListener(s,this.handleEvent),c=null),c||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}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&&Q5.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Qe.android&&Qe.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Qe.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=P5.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||fk.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,to(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Qe.safari&&!Qe.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 eO(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){bi(t.state,i)}}}function hk(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let c in s){let u=s[c];u&&t(c).handlers.push(eO(r.value,u))}if(o)for(let c in o){let u=o[c];u&&t(c).observers.push(eO(r.value,u))}}for(let r in Gr)t(r).handlers.push(Gr[r]);for(let r in ur)t(r).observers.push(ur[r]);return e}const P5=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],fk="dthko",Q5=[16,17,18,20,91,92,224,225],lu=6;function ou(n){return Math.max(0,n)*.7+8}function pk(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class mk{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=U4(e.contentDOM),this.atoms=e.state.facet(Wa).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ot.allowMultipleSelections)&&gk(e,t),this.dragging=xk(e,t)&&M5(t)==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&&pk(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=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:s,bottom:c}=this.scrollParents.y.getBoundingClientRect());let u=y5(this.view);e.clientX-u.left<=i+lu?t=-ou(i-e.clientX):e.clientX+u.right>=o-lu&&(t=ou(e.clientX-o)),e.clientY-u.top<=s+lu?r=-ou(s-e.clientY):e.clientY+u.bottom>=c-lu&&(r=ou(e.clientY-c)),this.setScrollSpeed(t,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,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=S5(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function gk(n,e){let t=n.state.facet(l5);return t.length?t[0](e):Qe.mac?e.metaKey:e.ctrlKey}function Ok(n,e){let t=n.state.facet(o5);return t.length?t[0](e):Qe.mac?!e.altKey:!e.ctrlKey}function xk(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Ea(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function yk(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=Dt.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Gr=Object.create(null),ur=Object.create(null),A5=Qe.ie&&Qe.ie_version<15||Qe.ios&&Qe.webkit_version<604;function vk(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),C5(n,t.value)},50)}function j0(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function C5(n,e){e=j0(n.state,Ff,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(Kh!=null&&t.selection.ranges.every(u=>u.empty)&&Kh==s.toString()){let u=-1;r=t.changeByRange(f=>{let p=t.doc.lineAt(f.from);if(p.from==u)return{range:f};u=p.from;let O=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:p.from,insert:O},range:ue.cursor(f.from+O.length)}})}else o?r=t.changeByRange(u=>{let f=s.line(i++);return{changes:{from:u.from,to:u.to,insert:f.text},range:ue.cursor(u.from+f.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}ur.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};ur.wheel=ur.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Gr.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);ur.touchstart=(n,e)=>{let t=n.inputState,r=e.targetTouches[0];t.lastTouchTime=Date.now(),r&&(t.lastTouchX=r.clientX,t.lastTouchY=r.clientY),t.setSelectionOrigin("select.pointer")};ur.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Gr.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(a5))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=Sk(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new mk(n,e,t,r)),r&&n.observer.ignore(()=>{G4(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function tO(n,e,t,r){if(r==1)return ue.cursor(e,t);if(r==2)return G7(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,c=i?i.posAtEnd:s.to;return c<n.state.doc.length&&c==s.to&&c++,ue.range(o,c)}}const wk=Qe.ie&&Qe.ie_version<=11;let nO=null,rO=0,iO=0;function M5(n){if(!wk)return n.detail;let e=nO,t=iO;return nO=n,iO=Date.now(),rO=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(rO+1)%3:1}function Sk(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=M5(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,c){let u=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),f,p=tO(n,u.pos,u.assoc,r);if(t.pos!=u.pos&&!o){let O=tO(n,t.pos,t.assoc,r),y=Math.min(O.from,p.from),v=Math.max(O.to,p.to);p=y<p.from?ue.range(y,v,p.assoc):ue.range(v,y,p.assoc)}return o?i.replaceRange(i.main.extend(p.from,p.to,p.assoc)):c&&r==1&&i.ranges.length>1&&(f=bk(i,u.pos))?f:c?i.addRange(p):ue.create([p])}}}function bk(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return ue.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Gr.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=ue.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",j0(n.state,Hf,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Gr.dragend=n=>(n.inputState.draggedContent=null,!1);function sO(n,e,t,r){if(t=j0(n.state,Ff,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&Ok(n,e)?{from:s.from,to:s.to}:null,c={from:i,insert:t},u=n.state.changes(o?[o,c]:c);n.focus(),n.dispatch({changes:u,selection:{anchor:u.mapPos(i,-1),head:u.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Gr.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&sO(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let c=new FileReader;c.onerror=s,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(r[o]=c.result),s()},c.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return sO(n,e,r,!0),!0}return!1};Gr.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=A5?null:e.clipboardData;return t?(C5(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(vk(n),!1)};function kk(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.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(),n.focus()},50)}function $k(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:j0(n,Hf,e.join(n.lineBreak)),ranges:t,linewise:r}}let Kh=null;Gr.copy=Gr.cut=(n,e)=>{if(!Oa(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=$k(n.state);if(!t&&!i)return!1;Kh=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=A5?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(kk(n,t),!1)};const T5=Ki.define();function E5(n,e){let t=[];for(let r of n.facet(d5)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:T5.of(!0)}):null}function Z5(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=E5(n.state,e);t?n.dispatch(t):n.update([])}},10)}ur.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),Z5(n)};ur.blur=n=>{n.observer.clearSelectionRange(),Z5(n)};ur.compositionstart=ur.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};ur.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Qe.chrome&&Qe.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};ur.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Gr.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let c=o[0],u=n.posAtDOM(c.startContainer,c.startOffset),f=n.posAtDOM(c.endContainer,c.endOffset);return Yf(n,{from:u,to:f,insert:n.state.toText(s)},null),!0}}let i;if(Qe.chrome&&Qe.android&&(i=P5.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((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)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Qe.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Qe.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>ur.compositionend(n,e),20),!1};const lO=new Set;function Pk(n){lO.has(n)||(lO.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const oO=["pre-wrap","normal","pre-line","break-spaces"];let uo=!1;function aO(){uo=!1}class Qk{constructor(e){this.lineWrapping=e,this.doc=it.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-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 oO.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let c=oO.indexOf(e)>-1,u=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=c||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=c,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,u){this.heightSamples={};for(let f=0;f<o.length;f++){let p=o[f];p<0?f++:this.heightSamples[Math.floor(p*10)]=!0}}return u}}class Ak{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class Yr{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?ar.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 al?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Yr(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var $t=(function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n})($t||($t={}));const Nu=.001;class In{constructor(e,t,r=2){this.length=e,this.height=t,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)>Nu&&(uo=!0),this.height=e)}replace(e,t,r){return In.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let c=i.length-1;c>=0;c--){let{fromA:u,toA:f,fromB:p,toB:O}=i[c],y=s.lineAt(u,$t.ByPosNoHeight,r.setDoc(t),0,0),v=y.to>=f?y:s.lineAt(f,$t.ByPosNoHeight,r,0,0);for(O+=v.to-f,f=v.to;c>0&&y.from<=i[c-1].toA;)u=i[c-1].fromA,p=i[c-1].fromB,c--,u<y.from&&(y=s.lineAt(u,$t.ByPosNoHeight,r,0,0));p+=y.from-u,u=y.from;let S=qf.build(r.setDoc(o),e,p,O);s=i0(s,s.replace(u,f,S))}return s.updateHeight(r,0)}static empty(){return new Sr(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let c=e[t-1];c.break?e.splice(--t,1,c.left,null,c.right):e.splice(--t,1,c.left,c.right),r+=1+c.break,i-=c.size}else if(s>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,s-=c.size}else break;else if(i<s){let c=e[t++];c&&(i+=c.size)}else{let c=e[--r];c&&(s+=c.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new Mk(In.of(e.slice(0,t)),o,In.of(e.slice(r)))}}function i0(n,e){return n==e?n:(n.constructor!=e.constructor&&(uo=!0),e)}In.prototype.size=1;const Ck=Ie.replace({});class j5 extends In{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new Yr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new Yr(i,0,r,this.spaceAbove,Ck):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,$t.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Sr extends j5{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new Yr(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Sr||i instanceof Sn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Sn?i=new Sr(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):In.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&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 Sn extends In{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,c=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);o=u/s,this.length>s+1&&(c=(this.height-u)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:c}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:c,perChar:u}=this.heightMetrics(t,i);if(t.lineWrapping){let f=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),p=t.doc.lineAt(f),O=c+p.length*u,y=Math.max(r,e-O/2);return new Yr(p.from,p.length,y,O,0)}else{let f=Math.max(0,Math.min(o-s,Math.floor((e-r)/c))),{from:p,length:O}=t.doc.line(s+f);return new Yr(p,O,r+c*f,c,0)}}lineAt(e,t,r,i,s){if(t==$t.ByHeight)return this.blockAt(e,r,i,s);if(t==$t.ByPosNoHeight){let{from:v,to:S}=r.doc.lineAt(e);return new Yr(v,S-v,0,0,0)}let{firstLine:o,perLine:c,perChar:u}=this.heightMetrics(r,s),f=r.doc.lineAt(e),p=c+f.length*u,O=f.number-o,y=i+c*O+u*(f.from-s-O);return new Yr(f.from,f.length,Math.max(i,Math.min(y,i+this.height-p)),p,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:c,perLine:u,perChar:f}=this.heightMetrics(r,s);for(let p=e,O=i;p<=t;){let y=r.doc.lineAt(p);if(p==e){let S=y.number-c;O+=u*S+f*(e-s-S)}let v=u+f*y.length;o(new Yr(y.from,y.length,O,v,0)),O+=v,p=y.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof Sn?r[r.length-1]=new Sn(s.length+i):r.push(null,new Sn(i-1))}if(e>0){let s=r[0];s instanceof Sn?r[0]=new Sn(e+s.length):r.unshift(new Sn(e-1),null)}return In.of(r)}decomposeLeft(e,t){t.push(new Sn(e-1),null)}decomposeRight(e,t){t.push(null,new Sn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],c=Math.max(t,i.from),u=-1;for(i.from>t&&o.push(new Sn(i.from-t-1).updateHeight(e,t));c<=s&&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++]),u==-1?u=O:Math.abs(O-u)>=Nu&&(u=-2);let v=new Sr(p,O,y);v.outdated=!1,o.push(v),c+=p+1}c<=s&&o.push(null,new Sn(s-c).updateHeight(e,c));let f=In.of(o);return(u<0||Math.abs(f.height-this.height)>=Nu||Math.abs(u-this.heightMetrics(e,t).perLine)>=Nu)&&(uo=!0),i0(this,f)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class Mk extends In{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(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,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,c=s+this.left.length+this.break,u=t==$t.ByHeight?e<o:e<c,f=u?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,c);if(this.break||(u?f.to<c:f.from>c))return f;let p=t==$t.ByPosNoHeight?$t.ByPosNoHeight:$t.ByPos;return u?f.join(this.right.lineAt(c,p,r,o,c)):this.left.lineAt(c,p,r,i,s).join(f)}forEachLine(e,t,r,i,s,o){let c=i+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,t,r,i,s,o),t>=u&&this.right.forEachLine(e,t,r,c,u,o);else{let f=this.lineAt(u,$t.ByPos,r,i,s);e<f.from&&this.left.forEachLine(e,f.from-1,r,i,s,o),f.to>=e&&f.from<=t&&o(f),t>f.to&&this.right.forEachLine(f.to+1,t,r,c,u,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let c of r)s.push(c);if(e>0&&cO(s,o-1),t<this.length){let c=s.length;this.decomposeRight(t,s),cO(s,c)}return In.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?In.of(this.break?[e,null,t]:[e,t]):(this.left=i0(this.left,e),this.right=i0(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,c=t+s.length+this.break,u=null;return i&&i.from<=t+s.length&&i.more?u=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=c+o.length&&i.more?u=o=o.updateHeight(e,c,r,i):o.updateHeight(e,c,r),u?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function cO(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof Sn&&(r=n[e+1])instanceof Sn&&n.splice(e-1,3,new Sn(t.length+1+r.length))}const Tk=5;class qf{constructor(e,t){this.pos=e,this.oracle=t,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,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Sr?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Sr(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new j5(o,i,r)):(o||s||i>=Tk)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);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:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,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 Sr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new Sn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Sr)return e;let t=new Sr(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Sr)&&!this.isCovered?this.nodes.push(new Sr(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Sr&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new qf(r,e);return Je.spans(t,r,i,s,0),s.finish(r)}}function Ek(n,e,t){let r=new Zk;return Je.compare(n,e,t,r,0),r.changes}class Zk{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&eo(e,t,this.changes,5)}}function jk(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),c=Math.max(0,t.top),u=Math.min(i.innerHeight,t.bottom);for(let f=n.parentNode;f&&f!=r.body;)if(f.nodeType==1){let p=f,O=window.getComputedStyle(p);if((p.scrollHeight>p.clientHeight||p.scrollWidth>p.clientWidth)&&O.overflow!="visible"){let y=p.getBoundingClientRect();s=Math.max(s,y.left),o=Math.min(o,y.right),c=Math.max(c,y.top),u=Math.min(f==n.parentNode?i.innerHeight:u,y.bottom)}f=O.position=="absolute"||O.position=="fixed"?p.offsetParent:p.parentNode}else if(f.nodeType==11)f=f.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:c-(t.top+e),bottom:Math.max(c,u)-(t.top+e)}}function Rk(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function Vk(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class Xd{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return Ie.replace({widget:new Lk(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class Lk extends hl{constructor(e,t){super(),this.size=e,this.vertical=t}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 uO{constructor(e,t){this.view=e,this.state=t,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=dO,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ft.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(Wf).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new Qk(r),this.stateDeco=hO(t),this.heightMap=In.empty().applyChanges(this.stateDeco,it.empty,this.heightOracle.setDoc(t.doc),[new Zr(0,0,0,t.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=Ie.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new au(s,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?dO:new Uf(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(ua(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=hO(this.state);let i=e.changedRanges,s=Zr.extendWithRanges(i,Ek(r,this.stateDeco,e?e.changes:nn.empty(this.state.doc.length))),o=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);aO(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||uo)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<u.from||t.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,t));let f=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(f||!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),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(A7)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?Ft.RTL:Ft.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",c=t.getBoundingClientRect(),u=o||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let f=0,p=0;if(c.width&&c.height){let{scaleX:Z,scaleY:H}=q4(t,c);(Z>.005&&Math.abs(this.scaleX-Z)>.005||H>.005&&Math.abs(this.scaleY-H)>.005)&&(this.scaleX=Z,this.scaleY=H,f|=16,o=u=!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,f|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,f|=16);let v=U4(this.view.contentDOM,!1).y;v!=this.scrollParent&&(this.scrollParent=v,this.scrollAnchorHeight=-1,this.scrollOffset=0);let S=this.getScrollOffset();this.scrollOffset!=S&&(this.scrollAnchorHeight=-1,this.scrollOffset=S),this.scrolledToBottom=K4(this.scrollParent||e.win);let b=(this.printing?Vk:jk)(t,this.paddingTop),P=b.top-this.pixelViewport.top,A=b.bottom-this.pixelViewport.bottom;this.pixelViewport=b;let z=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(z!=this.inView&&(this.inView=z,z&&(u=!0)),!this.inView&&!this.scrollTarget&&!Rk(e.dom))return 0;let M=c.width;if((this.contentDOMWidth!=M||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,f|=16),u){let Z=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(Z)&&(o=!0),o||i.lineWrapping&&Math.abs(M-this.contentDOMWidth)>i.charWidth){let{lineHeight:H,charWidth:j,textHeight:N}=e.docView.measureTextSize();o=H>0&&i.refresh(s,H,j,N,Math.max(5,M/j),Z),o&&(e.docView.minWidth=0,f|=16)}P>0&&A>0?p=Math.max(P,A):P<0&&A<0&&(p=Math.min(P,A)),aO();for(let H of this.viewports){let j=H.from==this.viewport.from?Z:e.docView.measureVisibleLineHeights(H);this.heightMap=(o?In.empty().applyChanges(this.stateDeco,it.empty,this.heightOracle,[new Zr(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new Ak(H.from,j))}uo&&(f|=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&&(f&2&&(f|=this.updateScaler()),this.viewport=this.getViewport(p,this.scrollTarget),f|=this.updateForViewport()),(f&2||C)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),f|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),f}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:c}=this,u=new au(i.lineAt(o-r*1e3,$t.ByHeight,s,0,0).from,i.lineAt(c+(1-r)*1e3,$t.ByHeight,s,0,0).to);if(t){let{head:f}=t.range;if(f<u.from||f>u.to){let p=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),O=i.lineAt(f,$t.ByPos,s,0,0),y;t.y=="center"?y=(O.top+O.bottom)/2-p/2:t.y=="start"||t.y=="nearest"&&f<u.from?y=O.top:y=O.bottom-p,u=new au(i.lineAt(y-1e3/2,$t.ByHeight,s,0,0).from,i.lineAt(y+p+1e3/2,$t.ByHeight,s,0,0).to)}}return u}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new au(this.heightMap.lineAt(r,$t.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,$t.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,$t.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,$t.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:c}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=c+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<c+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new Xd(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=Ft.LTR&&!r)return[];let c=[],u=(p,O,y,v)=>{if(O-p<s)return;let S=this.state.selection.main,b=[S.from];S.empty||b.push(S.to);for(let A of b)if(A>p&&A<O){u(p,A-10,y,v),u(A+10,O,y,v);return}let P=Xk(e,A=>A.from>=y.from&&A.to<=y.to&&Math.abs(A.from-p)<s&&Math.abs(A.to-O)<s&&!b.some(z=>A.from<z&&A.to>z));if(!P){if(O<y.to&&t&&r&&t.visibleRanges.some(M=>M.from<=O&&M.to>=O)){let M=t.moveToLineBoundary(ue.cursor(O),!1,!0).head;M>p&&(O=M)}let A=this.gapSize(y,p,O,v),z=r||A<2e6?A:2e6;P=new Xd(p,O,A,z)}c.push(P)},f=p=>{if(p.length<o||p.type!=ar.Text)return;let O=Nk(p.from,p.to,this.stateDeco);if(O.total<o)return;let y=this.scrollTarget?this.scrollTarget.range.head:null,v,S;if(r){let b=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,P,A;if(y!=null){let z=uu(O,y),M=((this.visibleBottom-this.visibleTop)/2+b)/p.height;P=z-M,A=z+M}else P=(this.visibleTop-p.top-b)/p.height,A=(this.visibleBottom-p.top+b)/p.height;v=cu(O,P),S=cu(O,A)}else{let b=O.total*this.heightOracle.charWidth,P=i*this.heightOracle.charWidth,A=0;if(b>2e6)for(let H of e)H.from>=p.from&&H.from<p.to&&H.size!=H.displaySize&&H.from*this.heightOracle.charWidth+A<this.pixelViewport.left&&(A=H.size-H.displaySize);let z=this.pixelViewport.left+A,M=this.pixelViewport.right+A,C,Z;if(y!=null){let H=uu(O,y),j=((M-z)/2+P)/b;C=H-j,Z=H+j}else C=(z-P)/b,Z=(M+P)/b;v=cu(O,C),S=cu(O,Z)}v>p.from&&u(p.from,v,p,O),S<p.to&&u(S,p.to,p,O)};for(let p of this.viewportLines)Array.isArray(p.type)?p.type.forEach(f):f(p);return c}gapSize(e,t,r,i){let s=uu(i,r)-uu(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){Xd.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=Ie.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Je.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],c=r[s];(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(t=>t.from<=e&&t.to>=e)||ua(this.heightMap.lineAt(e,$t.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(t=>t.top<=e&&t.bottom>=e)||ua(this.heightMap.lineAt(this.scaler.fromDOM(e),$t.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 t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return ua(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 au{constructor(e,t){this.from=e,this.to=t}}function Nk(n,e,t){let r=[],i=n,s=0;return Je.spans(t,n,e,{span(){},point(o,c){o>i&&(r.push({from:i,to:o}),s+=o-i),i=c}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function cu({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],c=o-s;if(r<=c)return s+r;r-=c}}function uu(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function Xk(n,e){for(let t of n)if(e(t))return t}const dO={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function hO(n){let e=n.facet(T0).filter(r=>typeof r!="function"),t=n.facet(Bf).filter(r=>typeof r!="function");return t.length&&e.push(Je.join(t)),e}class Uf{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:c,to:u})=>{let f=t.lineAt(c,$t.ByPos,e,0,0).top,p=t.lineAt(u,$t.ByPos,e,0,0).bottom;return i+=p-f,{from:c,to:u,top:f,bottom:p,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let c of this.viewports)c.domTop=o+(c.top-s)*this.scale,o=c.domBottom=c.domTop+(c.bottom-c.top),s=c.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Uf?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function ua(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new Yr(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>ua(i,e)):n._content)}const du=Te.define({combine:n=>n.join(" ")}),Jh=Te.define({combine:n=>n.indexOf(!0)>-1}),ef=Cs.newName(),R5=Cs.newName(),V5=Cs.newName(),L5={"&light":"."+R5,"&dark":"."+V5};function tf(n,e,t){return new Cs(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const _k=tf("."+ef,{"&":{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"}},L5),Dk={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},_d=Qe.ie&&Qe.ie_version<=11;class zk{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new g7,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(t=>{for(let r of t)this.queue.push(r);(Qe.ie&&Qe.ie_version<=11||Qe.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Qe.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Qe.chrome&&Qe.chrome_version<126)&&(this.editContext=new Fk(e),e.state.facet(Wi)&&(e.contentDOM.editContext=this.editContext.editContext)),_d&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.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 t;((t=this.view.docView)===null||t===void 0?void 0:t.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(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.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(t=>{t.length>0&&t[t.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((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Wi)?r.root.activeElement!=this.dom:!Oa(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Qe.ie&&Qe.ie_version<=11||Qe.android&&Qe.chrome)&&!r.state.selection.main.empty&&i.focusNode&&xa(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Ea(e.root);if(!t)return!1;let r=Qe.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&Ik(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Oa(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&x7(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)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,Dk),_d&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),_d&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&to(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,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 t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Oa(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 s=new ok(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=k5(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!r0(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=fO(t,e.previousSibling||e.target.previousSibling,-1),i=fO(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.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(Wi)!=e.state.facet(Wi)&&(e.view.contentDOM.editContext=e.state.facet(Wi)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.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 fO(n,e,t){for(;e;){let r=Dt.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function pO(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return xa(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function Ik(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return pO(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?pO(n,t):null}class Fk{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=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:s,head:o}=i,c=this.toEditorPos(r.updateRangeStart),u=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:c,drifted:!1});let f=u-c>r.text.length;c==this.from&&s<this.from?c=s:u==this.to&&s>this.to&&(u=s);let p=$5(e.state.sliceDoc(c,u),r.text,(f?i.from:i.to)-c,f?"end":null);if(!p){let y=ue.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));r0(y,i)||e.dispatch({selection:y,userEvent:"select"});return}let O={from:p.from+c,to:p.toA+c,insert:it.of(r.text.slice(p.from,p.toB).split(`
63
- `))};if((Qe.mac||Qe.android)&&O.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(O={from:c,to:u,insert:it.of([r.text.replace("."," ")])}),this.pendingContextChange=O,!e.state.readOnly){let y=this.to-this.from+(O.to-O.from+O.insert.length);Yf(e,O,ue.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(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),c=this.toEditorPos(r.rangeEnd);o<c;o++){let u=e.coordsForChar(o);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,c=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(c)){let u=this.toEditorPos(s.rangeStart),f=this.toEditorPos(s.rangeEnd);if(u<f){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(Ie.mark({attributes:{style:p}}).range(u,f))}}}e.dispatch({effects:p5.of(Ie.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)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Ea(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,c,u,f)=>{if(r)return;let p=f.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(f)){i=this.pendingContextChange=null,t+=p,this.to+=p;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=p,this.to+=p;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+f.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),f.toString()),this.to+=p}t+=p}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=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||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+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 t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Me{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 t;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(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||O7(e.parent)||document,this.viewState=new uO(this,e.state||ot.create(e)),e.scrollTo&&e.scrollTo.is(su)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Hl).map(i=>new jd(i));for(let i of this.plugins)i.update(this);this.observer=new zk(this),this.inputState=new dk(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Gg(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof qt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let y of e){if(y.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=y.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,c=0,u=null;e.some(y=>y.annotation(T5))?(this.inputState.notifiedFocused=o,c=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,u=E5(s,o),u||(c=1));let f=this.observer.delayedAndroidKey,p=null;if(f?(this.observer.clearDelayedAndroidKey(),p=this.observer.readChange(),(p&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(p=null)):this.observer.clear(),s.facet(ot.phrases)!=this.state.facet(ot.phrases))return this.setState(s);i=e0.create(this,s,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:v}=y.state.selection;O=new no(v.empty?v:ue.cursor(v.head,v.head>v.anchor?-1:1))}for(let v of y.effects)v.is(su)&&(O=v.value.clip(this.state))}this.viewState.update(i,O),this.bidiCache=s0.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(ca)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(y=>y.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(du)!=i.state.facet(du)&&(this.viewState.mustMeasureContent=!0),(t||r||O||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let y of this.state.facet(qh))try{y(i)}catch(v){bi(this.state,v,"update listener")}(u||p)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),p&&!k5(this,p)&&f.force&&to(this.contentDOM,f.key,f.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 t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new uO(this,e),this.plugins=e.facet(Hl).map(r=>new jd(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Gg(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Hl),r=e.state.facet(Hl);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new jd(s));else{let c=this.plugins[o];c.mustUpdate=e,i.push(c)}}for(let s of this.plugins)s.mustUpdate!=e&&s.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);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){bi(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 t=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,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(K4(r||this.win))s=-1,o=this.viewState.heightMap.height;else{let v=this.viewState.scrollAnchorAt(i);s=v.from,o=v.top}this.updateState=1;let u=this.viewState.measure();if(!u&&!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 f=[];u&4||([this.measureRequests,f]=[f,this.measureRequests]);let p=f.map(v=>{try{return v.read(this)}catch(S){return bi(this.state,S),mO}}),O=e0.create(this,this.state,[]),y=!1;O.flags|=u,t?t.flags|=u:t=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 v=0;v<f.length;v++)if(p[v]!=mO)try{let S=f[v];S.write&&S.write(p[v],this)}catch(S){bi(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=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).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(t&&!t.empty)for(let c of this.state.facet(qh))c(t)}get themeClasses(){return ef+" "+(this.state.facet(Jh)?V5:R5)+" "+this.state.facet(du)}updateAttrs(){let e=gO(this,m5,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Wi)?"true":"false",class:"cm-content",style:`${Qe.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),gO(this,Wf,t);let r=this.observer.ignore(()=>{let i=Hg(this.contentDOM,this.contentAttrs,t),s=Hg(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Me.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ca);let e=this.state.facet(Me.cspNonce);Cs.mount(this.root,this.styleModules.concat(_k).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 t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.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,t,r){return Nd(this,e,Kg(this,e,t,r))}moveByGroup(e,t){return Nd(this,e,Kg(this,e,t,r=>tk(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return ue.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return ek(this,e,t,r)}moveVertically(e,t,r){return Nd(this,e,nk(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=Gh(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),Gh(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[Si.find(s,e-i.from,-1,t)];return Ju(r,o.dir==Ft.LTR==t>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(h5)||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>Hk)return i5(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||r5(s.isolates,r=Yg(this,e))))return s.order;r||(r=Yg(this,e));let i=$7(e.text,t,r);return this.bidiCache.push(new s0(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Qe.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{G4(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,t={}){return su.of(new no(typeof e=="number"?ue.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return su.of(new no(ue.cursor(r.from),"start","start",r.top-e,t,!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 cr.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return cr.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=Cs.newName(),i=[du.of(r),ca.of(tf(`.${r}`,e))];return t&&t.dark&&i.push(Jh.of(!0)),i}static baseTheme(e){return Ia.lowest(ca.of(tf("."+ef,e,L5)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&Dt.get(r)||Dt.get(e);return((t=i==null?void 0:i.root)===null||t===void 0?void 0:t.view)||null}}Me.styleModule=ca;Me.inputHandler=u5;Me.clipboardInputFilter=Ff;Me.clipboardOutputFilter=Hf;Me.scrollHandler=f5;Me.focusChangeEffect=d5;Me.perLineTextDirection=h5;Me.exceptionSink=c5;Me.updateListener=qh;Me.editable=Wi;Me.mouseSelectionStyle=a5;Me.dragMovesSelection=o5;Me.clickAddsSelectionRange=l5;Me.decorations=T0;Me.blockWrappers=g5;Me.outerDecorations=Bf;Me.atomicRanges=Wa;Me.bidiIsolatedRanges=O5;Me.scrollMargins=x5;Me.darkTheme=Jh;Me.cspNonce=Te.define({combine:n=>n.length?n[0]:""});Me.contentAttributes=Wf;Me.editorAttributes=m5;Me.lineWrapping=Me.contentAttributes.of({class:"cm-lineWrapping"});Me.announce=at.define();const Hk=4096,mO={};class s0{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:Ft.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new s0(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function gO(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&Df(o,t)}return t}const Wk=Qe.mac?"mac":Qe.windows?"win":Qe.linux?"linux":"key";function Bk(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,c;for(let u=0;u<t.length-1;++u){const f=t[u];if(/^(cmd|meta|m)$/i.test(f))c=!0;else if(/^a(lt)?$/i.test(f))i=!0;else if(/^(c|ctrl|control)$/i.test(f))s=!0;else if(/^s(hift)?$/i.test(f))o=!0;else if(/^mod$/i.test(f))e=="mac"?c=!0:s=!0;else throw new Error("Unrecognized modifier name: "+f)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),c&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function hu(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const Yk=Ia.default(Me.domEventHandlers({keydown(n,e){return X5(N5(e.state),n,e,"editor")}})),Gf=Te.define({enables:Yk}),OO=new WeakMap;function N5(n){let e=n.facet(Gf),t=OO.get(e);return t||OO.set(e,t=Gk(e.reduce((r,i)=>r.concat(i),[]))),t}function qk(n,e,t){return X5(N5(n.state),e,n,t)}let ks=null;const Uk=4e3;function Gk(n,e=Wk){let t=Object.create(null),r=Object.create(null),i=(o,c)=>{let u=r[o];if(u==null)r[o]=c;else if(u!=c)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,c,u,f,p)=>{var O,y;let v=t[o]||(t[o]=Object.create(null)),S=c.split(/ (?!$)/).map(A=>Bk(A,e));for(let A=1;A<S.length;A++){let z=S.slice(0,A).join(" ");i(z,!0),v[z]||(v[z]={preventDefault:!0,stopPropagation:!1,run:[M=>{let C=ks={view:M,prefix:z,scope:o};return setTimeout(()=>{ks==C&&(ks=null)},Uk),!0}]})}let b=S.join(" ");i(b,!1);let P=v[b]||(v[b]={preventDefault:!1,stopPropagation:!1,run:((y=(O=v._any)===null||O===void 0?void 0:O.run)===null||y===void 0?void 0:y.slice())||[]});u&&P.run.push(u),f&&(P.preventDefault=!0),p&&(P.stopPropagation=!0)};for(let o of n){let c=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let f of c){let p=t[f]||(t[f]=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(v=>O(v,nf))}let u=o[e]||o.key;if(u)for(let f of c)s(f,u,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(f,"Shift-"+u,o.shift,o.preventDefault,o.stopPropagation)}return t}let nf=null;function X5(n,e,t,r){nf=e;let i=c7(e),s=dl(i,0),o=za(s)==i.length&&i!=" ",c="",u=!1,f=!1,p=!1;ks&&ks.view==t&&ks.scope==r&&(c=ks.prefix+" ",Q5.indexOf(e.keyCode)<0&&(f=!0,ks=null));let O=new Set,y=P=>{if(P){for(let A of P.run)if(!O.has(A)&&(O.add(A),A(t)))return P.stopPropagation&&(p=!0),!0;P.preventDefault&&(P.stopPropagation&&(p=!0),f=!0)}return!1},v=n[r],S,b;return v&&(y(v[c+hu(i,e,!o)])?u=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Qe.windows&&e.ctrlKey&&e.altKey)&&!(Qe.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(S=Ms[e.keyCode])&&S!=i?(y(v[c+hu(S,e,!0)])||e.shiftKey&&(b=Ma[e.keyCode])!=i&&b!=S&&y(v[c+hu(b,e,!1)]))&&(u=!0):o&&e.shiftKey&&y(v[c+hu(i,e,!0)])&&(u=!0),!u&&y(v._any)&&(u=!0)),f&&(u=!0),u&&p&&e.stopPropagation(),nf=null,u}function Kk(){return e9}const Jk=Ie.line({class:"cm-activeLine"}),e9=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(Jk.range(i.from)),e=i.from)}return Ie.set(t)}},{decorations:n=>n.decorations}),xO=Te.define({combine(n){let e,t;for(let r of n)e=e||r.topContainer,t=t||r.bottomContainer;return{topContainer:e,bottomContainer:t}}});function _5(n,e){let t=n.plugin(D5),r=t?t.specs.indexOf(e):-1;return r>-1?t.panels[r]:null}const D5=cr.fromClass(class{constructor(n){this.input=n.state.facet(l0),this.specs=this.input.filter(t=>t),this.panels=this.specs.map(t=>t(n));let e=n.state.facet(xO);this.top=new fu(n,!0,e.topContainer),this.bottom=new fu(n,!1,e.bottomContainer),this.top.sync(this.panels.filter(t=>t.top)),this.bottom.sync(this.panels.filter(t=>!t.top));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(n){let e=n.state.facet(xO);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new fu(n.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new fu(n.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let t=n.state.facet(l0);if(t!=this.input){let r=t.filter(u=>u),i=[],s=[],o=[],c=[];for(let u of r){let f=this.specs.indexOf(u),p;f<0?(p=u(n.view),c.push(p)):(p=this.panels[f],p.update&&p.update(n)),i.push(p),(p.top?s:o).push(p)}this.specs=r,this.panels=i,this.top.sync(s),this.bottom.sync(o);for(let u of c)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let r of this.panels)r.update&&r.update(n)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:n=>Me.scrollMargins.of(e=>{let t=e.plugin(n);return t&&{top:t.top.scrollMargin(),bottom:t.bottom.scrollMargin()}})});class fu{constructor(e,t,r){this.view=e,this.top=t,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.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 t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=yO(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=yO(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 yO(n){let e=n.nextSibling;return n.remove(),e}const l0=Te.define({enables:D5});function t9(n,e){let t,r=new Promise(o=>t=o),i=o=>n9(o,e,t);n.state.field(Dd,!1)?n.dispatch({effects:z5.of(i)}):n.dispatch({effects:at.appendConfig.of(Dd.init(()=>[i]))});let s=I5.of(i);return{close:s,result:r.then(o=>((n.win.queueMicrotask||(u=>n.win.setTimeout(u,10)))(()=>{n.state.field(Dd).indexOf(i)>-1&&n.dispatch({effects:s})}),o))}}const Dd=kr.define({create(){return[]},update(n,e){for(let t of e.effects)t.is(z5)?n=[t.value].concat(n):t.is(I5)&&(n=n.filter(r=>r!=t.value));return n},provide:n=>l0.computeN([n],e=>e.field(n))}),z5=at.define(),I5=at.define();function n9(n,e,t){let r=e.content?e.content(n,()=>o(null)):null;if(!r){if(r=dn("form"),e.input){let c=dn("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),r.appendChild(dn("label",(e.label||"")+": ",c))}else r.appendChild(document.createTextNode(e.label||""));r.appendChild(document.createTextNode(" ")),r.appendChild(dn("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 u=i[c];u.addEventListener("keydown",f=>{f.keyCode==27?(f.preventDefault(),o(null)):f.keyCode==13&&(f.preventDefault(),o(u))}),u.addEventListener("submit",f=>{f.preventDefault(),o(u)})}let s=dn("div",r,dn("button",{onclick:()=>o(null),"aria-label":n.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function o(c){s.contains(s.ownerDocument.activeElement)&&n.focus(),t(c)}return{dom:s,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 Gi extends As{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Gi.prototype.elementClass="";Gi.prototype.toDOM=void 0;Gi.prototype.mapMode=Zn.TrackBefore;Gi.prototype.startSide=Gi.prototype.endSide=-1;Gi.prototype.point=!0;const Xu=Te.define(),r9=Te.define(),i9={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Je.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},va=Te.define();function s9(n){return[F5(),va.of({...i9,...n})]}const vO=Te.define({combine:n=>n.some(e=>e)});function F5(n){return[l9]}const l9=cr.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.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=n.state.facet(va).map(e=>new SO(n,e)),this.fixed=!n.state.facet(vO);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),n.scrollDOM.insertBefore(this.dom,n.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(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.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(vO)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Je.iter(this.view.state.facet(Xu),this.view.viewport.from),r=[],i=this.gutters.map(s=>new o9(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let c of s.type)if(c.type==ar.Text&&o){rf(t,r,c.from);for(let u of i)u.line(this.view,c,r);o=!1}else if(c.widget)for(let u of i)u.widget(this.view,c)}else if(s.type==ar.Text){rf(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(va),t=n.state.facet(va),r=n.docChanged||n.heightChanged||n.viewportChanged||!Je.eq(n.startState.facet(Xu),n.state.facet(Xu),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new SO(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>Me.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ft.LTR?{left:r,right:i}:{right:r,left:i}})});function wO(n){return Array.isArray(n)?n:[n]}function rf(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class o9{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Je.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let c=new H5(e,o,s,r);i.elements.push(c),i.dom.appendChild(c.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];rf(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(r9)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class SO{constructor(e,t){this.view=e,this.config=t,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 t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();o=(u.top+u.bottom)/2}else o=i.clientY;let c=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,c,i)&&i.preventDefault()});this.markers=wO(t.markers(e)),t.initialSpacer&&(this.spacer=new H5(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=wO(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!Je.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class H5{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),a9(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let c=o,u=s<t.length?t[s++]:null,f=!1;if(u){let p=u.elementClass;p&&(r+=" "+p);for(let O=o;O<this.markers.length;O++)if(this.markers[O].compare(u)){c=O,f=!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(!u)break;u.toDOM&&(f?i=i.nextSibling:this.dom.insertBefore(u.toDOM(e),i)),f&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function a9(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const c9=Te.define(),u9=Te.define(),Wl=Te.define({combine(n){return vo(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(c,u,f)=>s(c,u,f)||o(c,u,f):o}return r}})}});class zd extends Gi{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Id(n,e){return n.state.facet(Wl).formatNumber(e,n.state)}const d9=va.compute([Wl],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(c9)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new zd(Id(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(u9)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(Wl)!=e.state.facet(Wl),initialSpacer(e){return new zd(Id(e,bO(e.state.doc.lines)))},updateSpacer(e,t){let r=Id(t.view,bO(t.view.state.doc.lines));return r==e.number?e:new zd(r)},domEventHandlers:n.facet(Wl).domEventHandlers,side:"before"}));function h9(n={}){return[Wl.of(n),F5(),d9]}function bO(n){let e=9;for(;e<n;)e=e*10+9;return e}const f9=new class extends Gi{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},p9=Xu.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(f9.range(i)))}return Je.of(e)});function m9(){return p9}const W5=1024;let g9=0;class jr{constructor(e,t){this.from=e,this.to=t}}class Ye{constructor(e={}){this.id=g9++,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=Fn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}Ye.closedBy=new Ye({deserialize:n=>n.split(" ")});Ye.openedBy=new Ye({deserialize:n=>n.split(" ")});Ye.group=new Ye({deserialize:n=>n.split(" ")});Ye.isolate=new Ye({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});Ye.contextHash=new Ye({perNode:!0});Ye.lookAhead=new Ye({perNode:!0});Ye.mounted=new Ye({perNode:!0});class ro{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[Ye.mounted.id]}}const O9=Object.create(null);class Fn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):O9,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Fn(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[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 t=this.prop(Ye.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(Ye.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Fn.none=new Fn("",Object.create(null),0,8);class Kf{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let c=o[1],u=o[0];u.combine&&u.id in i&&(c=u.combine(i[u.id],c)),i[u.id]=c}}t.push(i?new Fn(r.name,i,r.id,r.flags):r)}return new Kf(t)}}const pu=new WeakMap,kO=new WeakMap;var mt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(mt||(mt={}));class jt{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,c]of s)this.props[typeof o=="number"?o:o.id]=c}}toString(){let e=ro.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new o0(this.topNode,e)}cursorAt(e,t=0,r=0){let i=pu.get(this)||this.topNode,s=new o0(i);return s.moveTo(e,t),pu.set(this,s._tree),s}get topNode(){return new jn(this,0,0,null)}resolve(e,t=0){let r=ja(pu.get(this)||this.topNode,e,t,!1);return pu.set(this,r),r}resolveInner(e,t=0){let r=ja(kO.get(this)||this.topNode,e,t,!0);return kO.set(this,r),r}resolveStack(e,t=0){return v9(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,c=(o&mt.IncludeAnonymous)>0;for(let u=this.cursor(o|mt.IncludeAnonymous);;){let f=!1;if(u.from<=s&&u.to>=i&&(!c&&u.type.isAnonymous||t(u)!==!1)){if(u.firstChild())continue;f=!0}for(;f&&r&&(c||!u.type.isAnonymous)&&r(u),!u.nextSibling();){if(!u.parent())return;f=!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 t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:tp(Fn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new jt(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new jt(Fn.none,t,r,i)))}static build(e){return w9(e)}}jt.empty=new jt(Fn.none,[],[],0);class Jf{constructor(e,t){this.buffer=e,this.index=t}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 Jf(this.buffer,this.index)}}class Es{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Fn.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,c=-1;for(let u=e;u!=t&&!(B5(s,i,o[u+1],o[u+2])&&(c=u,r>0));u=o[u+3]);return c}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let c=e,u=0;c<t;){s[u++]=i[c++],s[u++]=i[c++]-r;let f=s[u++]=i[c++]-r;s[u++]=i[c++]-e,o=Math.max(o,f)}return new Es(s,o,this.set)}}function B5(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function ja(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof jn&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:mt.IgnoreOverlays;if(r)for(let o=n,c=o.parent;c;o=c,c=o.parent)o instanceof jn&&o.index<0&&((i=c.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=c);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class Y5{cursor(e=0){return new o0(this,e)}getChild(e,t=null,r=null){let i=$O(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return $O(this,e,t,r)}resolve(e,t=0){return ja(this,e,t,!1)}resolveInner(e,t=0){return ja(this,e,t,!0)}matchContext(e){return sf(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}class jn extends Y5{constructor(e,t,r,i){super(),this._tree=e,this.from=t,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,t,r,i,s=0){for(let o=this;;){for(let{children:c,positions:u}=o._tree,f=t>0?c.length:-1;e!=f;e+=t){let p=c[e],O=u[e]+o.from,y;if(!(!(s&mt.EnterBracketed&&p instanceof jt&&(y=ro.get(p))&&!y.overlay&&y.bracketed&&r>=O&&r<=O+p.length)&&!B5(i,r,O,O+p.length))){if(p instanceof Es){if(s&mt.ExcludeBuffers)continue;let v=p.findChild(0,p.buffer.length,t,r-O,i);if(v>-1)return new ki(new x9(o,p,e,O),null,v)}else if(s&mt.IncludeAnonymous||!p.type.isAnonymous||ep(p)){let v;if(!(s&mt.IgnoreMounts)&&(v=ro.get(p))&&!v.overlay)return new jn(v.tree,O,e,o);let S=new jn(p,O,e,o);return s&mt.IncludeAnonymous||!S.type.isAnonymous?S:S.nextChild(t<0?p.children.length-1:0,t,r,i,s)}}}if(s&mt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<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,t,r=0){let i;if(!(r&mt.IgnoreOverlays)&&(i=ro.get(this._tree))&&i.overlay){let s=e-this.from,o=r&mt.EnterBracketed&&i.bracketed;for(let{from:c,to:u}of i.overlay)if((t>0||o?c<=s:c<s)&&(t<0||o?u>=s:u>s))return new jn(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,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 $O(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function sf(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class x9{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class ki extends Y5{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,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new ki(this.context,this,s)}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,t,r=0){if(r&mt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new ki(this.context,this,s)}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,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new ki(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new ki(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new jt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function q5(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof jn&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new y9(i,t)}class y9{constructor(e,t){this.heads=e,this.node=t}get next(){return q5(this.heads)}}function v9(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof jn?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=ro.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let c=new jn(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(ja(c,e,t,!1))}}return i?q5(i):r}class o0{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~mt.EnterBracketed,e instanceof jn)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,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||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 jn?(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,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}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,t,r=this.mode){return this.buffer?r&mt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&mt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&mt.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:t}=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(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.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 t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let c=r._tree.children[s];if(this.mode&mt.IncludeAnonymous||c instanceof Es||!c.type.isAnonymous||ep(c))return!1}return!0}move(e,t){if(t&&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,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new ki(this.buffer,t,this.stack[i]);return this.bufferNode=new ki(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){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&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return sf(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return sf(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function ep(n){return n.children.some(e=>e instanceof Es||!e.type.isAnonymous||ep(e))}function w9(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=W5,reused:s=[],minRepeatType:o=r.types.length}=n,c=Array.isArray(t)?new Jf(t,t.length):t,u=r.types,f=0,p=0;function O(Z,H,j,N,ne,se){let{id:le,start:T,end:re,size:ce}=c,Y=p,G=f;if(ce<0)if(c.next(),ce==-1){let $=s[le];j.push($),N.push(T-Z);return}else if(ce==-3){f=le;return}else if(ce==-4){p=le;return}else throw new RangeError(`Unrecognized record size: ${ce}`);let oe=u[le],B,D,W=T-Z;if(re-T<=i&&(D=P(c.pos-H,ne))){let $=new Uint16Array(D.size-D.skip),V=c.pos-D.size,R=$.length;for(;c.pos>V;)R=A(D.start,$,R);B=new Es($,re-D.start,r),W=D.start-Z}else{let $=c.pos-ce;c.next();let V=[],R=[],te=le>=o?le:-1,ie=0,Ae=re;for(;c.pos>$;)te>=0&&c.id==te&&c.size>=0?(c.end<=Ae-i&&(S(V,R,T,ie,c.end,Ae,te,Y,G),ie=V.length,Ae=c.end),c.next()):se>2500?y(T,$,V,R):O(T,$,V,R,te,se+1);if(te>=0&&ie>0&&ie<V.length&&S(V,R,T,ie,T,Ae,te,Y,G),V.reverse(),R.reverse(),te>-1&&ie>0){let ye=v(oe,G);B=tp(oe,V,R,0,V.length,0,re-T,ye,ye)}else B=b(oe,V,R,re-T,Y-re,G)}j.push(B),N.push(W)}function y(Z,H,j,N){let ne=[],se=0,le=-1;for(;c.pos>H;){let{id:T,start:re,end:ce,size:Y}=c;if(Y>4)c.next();else{if(le>-1&&re<le)break;le<0&&(le=ce-i),ne.push(T,re,ce),se++,c.next()}}if(se){let T=new Uint16Array(se*4),re=ne[ne.length-2];for(let ce=ne.length-3,Y=0;ce>=0;ce-=3)T[Y++]=ne[ce],T[Y++]=ne[ce+1]-re,T[Y++]=ne[ce+2]-re,T[Y++]=Y;j.push(new Es(T,ne[2]-re,r)),N.push(re-Z)}}function v(Z,H){return(j,N,ne)=>{let se=0,le=j.length-1,T,re;if(le>=0&&(T=j[le])instanceof jt){if(!le&&T.type==Z&&T.length==ne)return T;(re=T.prop(Ye.lookAhead))&&(se=N[le]+T.length+re)}return b(Z,j,N,ne,se,H)}}function S(Z,H,j,N,ne,se,le,T,re){let ce=[],Y=[];for(;Z.length>N;)ce.push(Z.pop()),Y.push(H.pop()+j-ne);Z.push(b(r.types[le],ce,Y,se-ne,T-se,re)),H.push(ne-j)}function b(Z,H,j,N,ne,se,le){if(se){let T=[Ye.contextHash,se];le=le?[T].concat(le):[T]}if(ne>25){let T=[Ye.lookAhead,ne];le=le?[T].concat(le):[T]}return new jt(Z,H,j,N,le)}function P(Z,H){let j=c.fork(),N=0,ne=0,se=0,le=j.end-i,T={size:0,start:0,skip:0};e:for(let re=j.pos-Z;j.pos>re;){let ce=j.size;if(j.id==H&&ce>=0){T.size=N,T.start=ne,T.skip=se,se+=4,N+=4,j.next();continue}let Y=j.pos-ce;if(ce<0||Y<re||j.start<le)break;let G=j.id>=o?4:0,oe=j.start;for(j.next();j.pos>Y;){if(j.size<0)if(j.size==-3||j.size==-4)G+=4;else break e;else j.id>=o&&(G+=4);j.next()}ne=oe,N+=ce,se+=G}return(H<0||N==Z)&&(T.size=N,T.start=ne,T.skip=se),T.size>4?T:void 0}function A(Z,H,j){let{id:N,start:ne,end:se,size:le}=c;if(c.next(),le>=0&&N<o){let T=j;if(le>4){let re=c.pos-(le-4);for(;c.pos>re;)j=A(Z,H,j)}H[--j]=T,H[--j]=se-Z,H[--j]=ne-Z,H[--j]=N}else le==-3?f=N:le==-4&&(p=N);return j}let z=[],M=[];for(;c.pos>0;)O(n.start||0,n.bufferStart||0,z,M,-1,0);let C=(e=n.length)!==null&&e!==void 0?e:z.length?M[0]+z[0].length:0;return new jt(u[n.topID],z.reverse(),M.reverse(),C)}const PO=new WeakMap;function _u(n,e){if(!n.isAnonymous||e instanceof Es||e.type!=n)return 1;let t=PO.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof jt)){t=1;break}t+=_u(n,r)}PO.set(e,t)}return t}function tp(n,e,t,r,i,s,o,c,u){let f=0;for(let S=r;S<i;S++)f+=_u(n,e[S]);let p=Math.ceil(f*1.5/8),O=[],y=[];function v(S,b,P,A,z){for(let M=P;M<A;){let C=M,Z=b[M],H=_u(n,S[M]);for(M++;M<A;M++){let j=_u(n,S[M]);if(H+j>=p)break;H+=j}if(M==C+1){if(H>p){let j=S[C];v(j.children,j.positions,0,j.children.length,b[C]+z);continue}O.push(S[C])}else{let j=b[M-1]+S[M-1].length-Z;O.push(tp(n,S,b,C,M,Z,j,null,u))}y.push(Z+z-s)}}return v(e,t,r,i,0),(c||u)(O,y,o)}class U5{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof ki?this.setBuffer(e.context.buffer,e.index,t):e instanceof jn&&this.map.set(e.tree,t)}get(e){return e instanceof ki?this.getBuffer(e.context.buffer,e.index):e instanceof jn?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class qi{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new qi(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let c=0,u=0,f=0;;c++){let p=c<t.length?t[c]:null,O=p?p.fromA:1e9;if(O-u>=r)for(;o&&o.from<O;){let y=o;if(u>=y.from||O<=y.to||f){let v=Math.max(y.from,u)-f,S=Math.min(y.to,O)-f;y=v>=S?null:new qi(v,S,y.tree,y.offset+f,c>0,!!p)}if(y&&i.push(y),o.to>O)break;o=s<e.length?e[s++]:null}if(!p)break;u=p.toA,f=p.toA-p.toB}return i}}class G5{startParse(e,t,r){return typeof e=="string"&&(e=new S9(e)),r=r?r.length?r.map(i=>new jr(i.from,i.to)):[new jr(0,0)]:[new jr(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class S9{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function b9(n){return(e,t,r,i)=>new $9(e,n,t,r,i)}class QO{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function AO(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class k9{constructor(e,t,r,i,s,o,c,u){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=c,this.prev=u,this.depth=0,this.ranges=[]}}const lf=new Ye({perNode:!0});class $9{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,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 jt(r.type,r.children,r.positions,r.length,r.propValues.concat([[lf,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[Ye.mounted.id]=new ro(t,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 t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new A9(this.fragments),t=null,r=null,i=new o0(new jn(this.baseTree,this.ranges[0].from,0,null),mt.IncludeAnonymous|mt.IgnoreMounts);e:for(let s,o;;){let c=!0,u;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)c=!1;else if(e.hasNode(i)){if(t){let f=t.mounts.find(p=>p.frag.from<=i.from&&p.frag.to>=i.to&&p.mount.overlay);if(f)for(let p of f.mount.overlay){let O=p.from+f.pos,y=p.to+f.pos;O>=i.from&&y<=i.to&&!t.ranges.some(v=>v.from<y&&v.to>O)&&t.ranges.push({from:O,to:y})}}c=!1}else if(r&&(o=P9(r.ranges,i.from,i.to)))c=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(Q9(i),t&&t.depth++,r&&r.depth++);let f=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new k9(s.parser,s.overlay,f,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let p=TO(this.ranges,s.overlay||(i.from<i.to?[new jr(i.from,i.to)]:[]));p.length&&AO(p),(p.length||!s.overlay)&&this.inner.push(new QO(s.parser,p.length?s.parser.startParse(this.input,EO(f,p),p):s.parser.startParse(""),s.overlay?s.overlay.map(O=>new jr(O.from-i.from,O.to-i.from)):null,!!s.bracketed,i.tree,p.length?p[0].from:i.from)),s.overlay?p.length&&(r={ranges:p,depth:0,prev:r}):c=!1}}else if(t&&(u=t.predicate(i))&&(u===!0&&(u=new jr(i.from,i.to)),u.from<u.to)){let f=t.ranges.length-1;f>=0&&t.ranges[f].to==u.from?t.ranges[f]={from:t.ranges[f].from,to:u.to}:t.ranges.push(u)}if(c&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let f=TO(this.ranges,t.ranges);f.length&&(AO(f),this.inner.splice(t.index,0,new QO(t.parser,t.parser.startParse(this.input,EO(t.mounts,f),f),t.ranges.map(p=>new jr(p.from-t.start,p.to-t.start)),t.bracketed,t.target,f[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function P9(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function CO(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function Q9(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],c=o.buffer,u=[s];function f(p,O,y,v,S,b){let P=t[b],A=[],z=[];CO(o,p,P,A,z,v);let M=c[P+1],C=c[P+2];u.push(A.length);let Z=b?f(P+4,c[P+3],o.set.types[c[P]],M,C-M,b-1):e.toTree();return A.push(Z),z.push(M-v),CO(o,c[P+3],O,A,z,v),new jt(y,A,z,S)}i.children[s]=f(0,c.length,Fn.none,0,o.length,t.length-1);for(let p of u){let O=n.tree.children[p],y=n.tree.positions[p];n.yield(new jn(O,y+n.from,p,n._tree))}}class MO{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(mt.IncludeAnonymous|mt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,mt.IgnoreOverlays|mt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof jt)t=t.children[0];else break}return!1}}let A9=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(lf))!==null&&t!==void 0?t:r.to,this.inner=new MO(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 t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(lf))!==null&&e!==void 0?e:t.to,this.inner=new MO(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(Ye.mounted);if(o&&o.parser==t)for(let c=this.fragI;c<this.fragments.length;c++){let u=this.fragments[c];if(u.from>=s.to)break;u.tree==this.curFrag.tree&&i.push({frag:u,pos:s.from-u.offset,mount:o})}}}return i}};function TO(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,c=n[i].from;for(;s<r.length;s++){let u=r[s];if(u.from>=c)break;u.to<=o||(t||(r=t=e.slice()),u.from<o?(t[s]=new jr(u.from,o),u.to>c&&t.splice(s+1,0,new jr(c,u.to))):u.to>c?t[s--]=new jr(c,u.to):t.splice(s--,1))}}return r}function C9(n,e,t,r){let i=0,s=0,o=!1,c=!1,u=-1e9,f=[];for(;;){let p=i==n.length?1e9:o?n[i].to:n[i].from,O=s==e.length?1e9:c?e[s].to:e[s].from;if(o!=c){let y=Math.max(u,t),v=Math.min(p,O,r);y<v&&f.push(new jr(y,v))}if(u=Math.min(p,O),u==1e9)break;p==u&&(o?(o=!1,i++):o=!0),O==u&&(c?(c=!1,s++):c=!0)}return f}function EO(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),c=o+i.tree.length,u=Math.max(s.from,o),f=Math.min(s.to,c);if(i.overlay){let p=i.overlay.map(y=>new jr(y.from+r,y.to+r)),O=C9(e,p,u,f);for(let y=0,v=u;;y++){let S=y==O.length,b=S?f:O[y].from;if(b>v&&t.push(new qi(v,b,i.tree,-o,s.from>=v||s.openStart,s.to<=b||s.openEnd)),S)break;v=O[y].to}}else t.push(new qi(u,f,i.tree,-o,s.from>=o||s.openStart,s.to<=c||s.openEnd))}return t}let M9=0;class Er{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=M9++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Er&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Er(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new a0(e);return r=>r.modified.indexOf(t)>-1?r:a0.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let T9=0;class a0{constructor(e){this.name=e,this.instances=[],this.id=T9++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(c=>c.base==e&&E9(t,c.modified));if(r)return r;let i=[],s=new Er(e.name,i,e,t);for(let c of t)c.instances.push(s);let o=Z9(t);for(let c of e.set)if(!c.modified.length)for(let u of o)i.push(a0.get(c,u));return s}}function E9(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function Z9(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function R0(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],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(s.push(y[0]=="*"?"":y[0][0]=='"'?JSON.parse(y[0]):y[0]),O+=y[0].length,O==i.length)break;let v=i[O++];if(O==i.length&&v=="!"){o=0;break}if(v!="/")throw new RangeError("Invalid path: "+i);c=i.slice(O)}let u=s.length-1,f=s[u];if(!f)throw new RangeError("Invalid path: "+i);let p=new Ra(r,o,u>0?s.slice(0,u):null);e[f]=p.sort(e[f])}}return K5.add(e)}const K5=new Ye({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new Ra(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class Ra{constructor(e,t,r,i){this.tags=e,this.mode=t,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}}Ra.empty=new Ra([],2,null);function J5(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let c of s)for(let u of c.set){let f=t[u.id];if(f){o=o?o+" "+f:f;break}}return o},scope:r}}function j9(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function R9(n,e,t,r=0,i=n.length){let s=new V9(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class V9{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:c,to:u}=e;if(c>=r||u<=t)return;o.isTop&&(s=this.highlighters.filter(v=>!v.scope||v.scope(o)));let f=i,p=L9(e)||Ra.empty,O=j9(s,p.tags);if(O&&(f&&(f+=" "),f+=O,p.mode==1&&(i+=(i?" ":"")+O)),this.startSpan(Math.max(t,c),f),p.opaque)return;let y=e.tree&&e.tree.prop(Ye.mounted);if(y&&y.overlay){let v=e.node.enter(y.overlay[0].from+c,1),S=this.highlighters.filter(P=>!P.scope||P.scope(y.tree.type)),b=e.firstChild();for(let P=0,A=c;;P++){let z=P<y.overlay.length?y.overlay[P]:null,M=z?z.from+c:u,C=Math.max(t,A),Z=Math.min(r,M);if(C<Z&&b)for(;e.from<Z&&(this.highlightRange(e,C,Z,i,s),this.startSpan(Math.min(Z,e.to),f),!(e.to>=M||!e.nextSibling())););if(!z||M>r)break;A=z.to+c,A>t&&(this.highlightRange(v.cursor(),Math.max(t,z.from+c),Math.min(r,A),"",S),this.startSpan(Math.min(r,A),f))}b&&e.parent()}else if(e.firstChild()){y&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),f)}while(e.nextSibling());e.parent()}}}function L9(n){let e=n.type.prop(K5);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const ke=Er.define,mu=ke(),Ss=ke(),ZO=ke(Ss),jO=ke(Ss),bs=ke(),gu=ke(bs),Fd=ke(bs),xi=ke(),Js=ke(xi),mi=ke(),gi=ke(),of=ke(),ra=ke(of),Ou=ke(),X={comment:mu,lineComment:ke(mu),blockComment:ke(mu),docComment:ke(mu),name:Ss,variableName:ke(Ss),typeName:ZO,tagName:ke(ZO),propertyName:jO,attributeName:ke(jO),className:ke(Ss),labelName:ke(Ss),namespace:ke(Ss),macroName:ke(Ss),literal:bs,string:gu,docString:ke(gu),character:ke(gu),attributeValue:ke(gu),number:Fd,integer:ke(Fd),float:ke(Fd),bool:ke(bs),regexp:ke(bs),escape:ke(bs),color:ke(bs),url:ke(bs),keyword:mi,self:ke(mi),null:ke(mi),atom:ke(mi),unit:ke(mi),modifier:ke(mi),operatorKeyword:ke(mi),controlKeyword:ke(mi),definitionKeyword:ke(mi),moduleKeyword:ke(mi),operator:gi,derefOperator:ke(gi),arithmeticOperator:ke(gi),logicOperator:ke(gi),bitwiseOperator:ke(gi),compareOperator:ke(gi),updateOperator:ke(gi),definitionOperator:ke(gi),typeOperator:ke(gi),controlOperator:ke(gi),punctuation:of,separator:ke(of),bracket:ra,angleBracket:ke(ra),squareBracket:ke(ra),paren:ke(ra),brace:ke(ra),content:xi,heading:Js,heading1:ke(Js),heading2:ke(Js),heading3:ke(Js),heading4:ke(Js),heading5:ke(Js),heading6:ke(Js),contentSeparator:ke(xi),list:ke(xi),quote:ke(xi),emphasis:ke(xi),strong:ke(xi),link:ke(xi),monospace:ke(xi),strikethrough:ke(xi),inserted:ke(),deleted:ke(),changed:ke(),invalid:ke(),meta:Ou,documentMeta:ke(Ou),annotation:ke(Ou),processingInstruction:ke(Ou),definition:Er.defineModifier("definition"),constant:Er.defineModifier("constant"),function:Er.defineModifier("function"),standard:Er.defineModifier("standard"),local:Er.defineModifier("local"),special:Er.defineModifier("special")};for(let n in X){let e=X[n];e instanceof Er&&(e.name=n)}J5([{tag:X.link,class:"tok-link"},{tag:X.heading,class:"tok-heading"},{tag:X.emphasis,class:"tok-emphasis"},{tag:X.strong,class:"tok-strong"},{tag:X.keyword,class:"tok-keyword"},{tag:X.atom,class:"tok-atom"},{tag:X.bool,class:"tok-bool"},{tag:X.url,class:"tok-url"},{tag:X.labelName,class:"tok-labelName"},{tag:X.inserted,class:"tok-inserted"},{tag:X.deleted,class:"tok-deleted"},{tag:X.literal,class:"tok-literal"},{tag:X.string,class:"tok-string"},{tag:X.number,class:"tok-number"},{tag:[X.regexp,X.escape,X.special(X.string)],class:"tok-string2"},{tag:X.variableName,class:"tok-variableName"},{tag:X.local(X.variableName),class:"tok-variableName tok-local"},{tag:X.definition(X.variableName),class:"tok-variableName tok-definition"},{tag:X.special(X.variableName),class:"tok-variableName2"},{tag:X.definition(X.propertyName),class:"tok-propertyName tok-definition"},{tag:X.typeName,class:"tok-typeName"},{tag:X.namespace,class:"tok-namespace"},{tag:X.className,class:"tok-className"},{tag:X.macroName,class:"tok-macroName"},{tag:X.propertyName,class:"tok-propertyName"},{tag:X.operator,class:"tok-operator"},{tag:X.comment,class:"tok-comment"},{tag:X.meta,class:"tok-meta"},{tag:X.invalid,class:"tok-invalid"},{tag:X.punctuation,class:"tok-punctuation"}]);var Hd;const Bl=new Ye;function e3(n){return Te.define({combine:n?e=>e.concat(n):void 0})}const np=new Ye;class Ur{constructor(e,t,r=[],i=""){this.data=e,this.name=i,ot.prototype.hasOwnProperty("tree")||Object.defineProperty(ot.prototype,"tree",{get(){return Ht(this)}}),this.parser=t,this.extension=[Zs.of(this),ot.languageData.of((s,o,c)=>{let u=RO(s,o,c),f=u.type.prop(Bl);if(!f)return[];let p=s.facet(f),O=u.type.prop(np);if(O){let y=u.resolve(o-u.from,c);for(let v of O)if(v.test(y,s)){let S=s.facet(v.facet);return v.type=="replace"?S:S.concat(p)}}return p})].concat(r)}isActiveAt(e,t,r=-1){return RO(e,t,r).type.prop(Bl)==this.data}findRegions(e){let t=e.facet(Zs);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(Bl)==this.data){r.push({from:o,to:o+s.length});return}let c=s.prop(Ye.mounted);if(c){if(c.tree.prop(Bl)==this.data){if(c.overlay)for(let u of c.overlay)r.push({from:u.from+o,to:u.to+o});else r.push({from:o,to:o+s.length});return}else if(c.overlay){let u=r.length;if(i(c.tree,c.overlay[0].from+o),r.length>u)return}}for(let u=0;u<s.children.length;u++){let f=s.children[u];f instanceof jt&&i(f,s.positions[u]+o)}};return i(Ht(e),0),r}get allowsNesting(){return!0}}Ur.setState=at.define();function RO(n,e,t){let r=n.facet(Zs),i=Ht(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,mt.ExcludeBuffers|mt.EnterBracketed))s.type.isTop&&(i=s);return i}class ho extends Ur{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=e3(e.languageData);return new ho(t,e.parser.configure({props:[Bl.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new ho(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ht(n){let e=n.field(Ur.state,!1);return e?e.tree:jt.empty}class N9{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,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let ia=null;class c0{constructor(e,t,r=[],i,s,o,c,u){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=c,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new c0(e,t,[],jt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new N9(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=jt.empty&&this.isDone(t??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()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(qi.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<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(qi.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=ia;ia=this;try{return e()}finally{ia=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=VO(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:c}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((f,p,O,y)=>u.push({fromA:f,toA:p,fromB:O,toB:y})),r=qi.applyChanges(r,u),i=jt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){c=[];for(let f of this.skipped){let p=e.mapPos(f.from,1),O=e.mapPos(f.to,-1);p<O&&c.push({from:p,to:O})}}}return new c0(this.parser,t,r,i,s,o,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=VO(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends G5{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let u=ia;if(u){for(let f of i)u.tempSkipped.push(f);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=o,new jt(Fn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return ia}}function VO(n,e,t){return qi.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class fo{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=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),t.viewport.to);return t.work(20,r)||t.takeTree(),new fo(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=c0.create(e.facet(Zs).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new fo(r)}}Ur.state=kr.define({create:fo.init,update(n,e){for(let t of e.effects)if(t.is(Ur.setState))return t.value;return e.startState.facet(Zs)!=e.state.facet(Zs)?fo.init(e.state):n.apply(e)}});let t3=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(t3=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const Wd=typeof navigator<"u"&&(!((Hd=navigator.scheduling)===null||Hd===void 0)&&Hd.isInputPending)?()=>navigator.scheduling.isInputPending():null,X9=cr.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 t=this.view.state.field(Ur.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(Ur.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=t3(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(Ur.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Wd?Math.max(25,e.timeRemaining()-5):1e9),c=s.context.treeLen<i&&r.doc.length>i+1e3,u=s.context.work(()=>Wd&&Wd()||Date.now()>o,i+(c?0:1e5));this.chunkBudget-=Date.now()-t,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Ur.setState.of(new fo(s.context))})),this.chunkBudget>0&&!(u&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>bi(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Zs=Te.define({combine(n){return n.length?n[0]:null},enables:n=>[Ur.state,X9,Me.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class rp{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const _9=Te.define(),V0=Te.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function u0(n){let e=n.facet(V0);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Va(n,e){let t="",r=n.tabSize,i=n.facet(V0)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function ip(n,e){n instanceof ot&&(n=new L0(n));for(let r of n.state.facet(_9)){let i=r(n,e);if(i!==void 0)return i}let t=Ht(n.state);return t.length>=e?D9(n,t,e):null}class L0{constructor(e,t={}){this.state=e,this.options=t,this.unit=u0(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<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,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return C0(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const N0=new Ye;function D9(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];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)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return n3(r,n,t)}function n3(n,e,t){for(let r=n;r;r=r.next){let i=I9(r.node);if(i)return i(sp.create(e,t,r))}return 0}function z9(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function I9(n){let e=n.type.prop(N0);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(Ye.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>r3(o,!0,1,void 0,s&&!z9(o)?i.from:void 0)}return n.parent==null?F9:null}function F9(){return 0}class sp extends L0{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new sp(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(H9(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return n3(this.context.next,this.base,this.pos)}}function H9(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function W9(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let c=t.to;;){let u=e.childAfter(c);if(!u||u==r)return null;if(!u.type.isSkipped){if(u.from>=o)return null;let f=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+f}}c=u.to}}function B9({closing:n,align:e=!0,units:t=1}){return r=>r3(r,e,t,n)}function r3(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,c=r&&s.slice(o,o+r.length)==r||i==n.pos+o,u=e?W9(n):null;return u?c?n.column(u.from):n.column(u.to):n.baseIndent+(c?0:n.unit*t)}const Y9=n=>n.baseIndent;function Du({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const q9=200;function U9(){return ot.transactionFilter.of(n=>{if(!n.docChanged||!n.isUserEvent("input.type")&&!n.isUserEvent("input.complete"))return n;let e=n.startState.languageDataAt("indentOnInput",n.startState.selection.main.head);if(!e.length)return n;let t=n.newDoc,{head:r}=n.newSelection.main,i=t.lineAt(r);if(r>i.from+q9)return n;let s=t.sliceString(i.from,r);if(!e.some(f=>f.test(s)))return n;let{state:o}=n,c=-1,u=[];for(let{head:f}of o.selection.ranges){let p=o.doc.lineAt(f);if(p.from==c)continue;c=p.from;let O=ip(o,p.from);if(O==null)continue;let y=/^\s*/.exec(p.text)[0],v=Va(o,O);y!=v&&u.push({from:p.from,to:p.from+y.length,insert:v})}return u.length?[n,{changes:u,sequential:!0}]:n})}const G9=Te.define(),X0=new Ye;function i3(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function K9(n,e,t){let r=Ht(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let o=i;o;o=o.next){let c=o.node;if(c.to<=t||c.from>t)continue;if(s&&c.from<e)break;let u=c.type.prop(X0);if(u&&(c.to<r.length-50||r.length==n.doc.length||!J9(c))){let f=u(c,n);f&&f.from<=t&&f.from>=e&&f.to>t&&(s=f)}}return s}function J9(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function LO(n,e,t){for(let r of n.facet(G9)){let i=r(n,e,t);if(i)return i}return K9(n,e,t)}function s3(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const l3=at.define({map:s3}),lp=at.define({map:s3}),d0=kr.define({create(){return Ie.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=NO(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(l3)&&!e$(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(o3),i=r?Ie.replace({widget:new r$(r(e.state,t.value))}):XO;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(lp)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=NO(n,e.selection.main.head)),n},provide:n=>Me.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(XO.range(r,i))}return Ie.set(e,!0)}});function NO(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function af(n,e,t){var r;let i=null;return(r=n.field(d0,!1))===null||r===void 0||r.between(e,t,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function e$(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}const t$={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},o3=Te.define({combine(n){return vo(n,t$)}});function n$(n){return[d0,l$]}function a3(n,e){let{state:t}=n,r=t.facet(o3),i=o=>{let c=n.lineBlockAt(n.posAtDOM(o.target)),u=af(n.state,c.from,c.to);u&&n.dispatch({effects:lp.of(u)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const XO=Ie.replace({widget:new class extends hl{toDOM(n){return a3(n,null)}}});class r$ extends hl{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return a3(e,this.value)}}const i$={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Bd extends Gi{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function s$(n={}){let e={...i$,...n},t=new Bd(e,!0),r=new Bd(e,!1),i=cr.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Zs)!=o.state.facet(Zs)||o.startState.field(d0,!1)!=o.state.field(d0,!1)||Ht(o.startState)!=Ht(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let c=new ol;for(let u of o.viewportLineBlocks){let f=af(o.state,u.from,u.to)?r:LO(o.state,u.from,u.to)?t:null;f&&c.add(u.from,u.from,f)}return c.finish()}}),{domEventHandlers:s}=e;return[i,s9({class:"cm-foldGutter",markers(o){var c;return((c=o.plugin(i))===null||c===void 0?void 0:c.markers)||Je.empty},initialSpacer(){return new Bd(e,!1)},domEventHandlers:{...s,click:(o,c,u)=>{if(s.click&&s.click(o,c,u))return!0;let f=af(o.state,c.from,c.to);if(f)return o.dispatch({effects:lp.of(f)}),!0;let p=LO(o.state,c.from,c.to);return p?(o.dispatch({effects:l3.of(p)}),!0):!1}}}),n$()]}const l$=Me.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 _0{constructor(e,t){this.specs=e;let r;function i(c){let u=Cs.newName();return(r||(r=Object.create(null)))["."+u]=c,u}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof Ur?c=>c.prop(Bl)==o.data:o?c=>c==o:void 0,this.style=J5(e.map(c=>({tag:c.tag,class:c.class||i(Object.assign({},c,{tag:null}))})),{all:s}).style,this.module=r?new Cs(r):null,this.themeType=t.themeType}static define(e,t){return new _0(e,t||{})}}const cf=Te.define(),o$=Te.define({combine(n){return n.length?[n[0]]:null}});function Yd(n){let e=n.facet(cf);return e.length?e:n.facet(o$)}function a$(n,e){let t=[u$],r;return n instanceof _0&&(n.module&&t.push(Me.styleModule.of(n.module)),r=n.themeType),r?t.push(cf.computeN([Me.darkTheme],i=>i.facet(Me.darkTheme)==(r=="dark")?[n]:[])):t.push(cf.of(n)),t}class c${constructor(e){this.markCache=Object.create(null),this.tree=Ht(e.state),this.decorations=this.buildDeco(e,Yd(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ht(e.state),r=Yd(e.state),i=r!=Yd(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return Ie.none;let r=new ol;for(let{from:i,to:s}of e.visibleRanges)R9(this.tree,t,(o,c,u)=>{r.add(o,c,this.markCache[u]||(this.markCache[u]=Ie.mark({class:u})))},i,s);return r.finish()}}const u$=Ia.high(cr.fromClass(c$,{decorations:n=>n.decorations})),d$=Me.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),c3=1e4,u3="()[]{}",d3=Te.define({combine(n){return vo(n,{afterCursor:!0,brackets:u3,maxScanDistance:c3,renderMatch:p$})}}),h$=Ie.mark({class:"cm-matchingBracket"}),f$=Ie.mark({class:"cm-nonmatchingBracket"});function p$(n){let e=[],t=n.matched?h$:f$;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}function _O(n){let e=[],t=n.facet(d3);for(let r of n.selection.ranges){if(!r.empty)continue;let i=$i(n,r.head,-1,t)||r.head>0&&$i(n,r.head-1,1,t)||t.afterCursor&&($i(n,r.head,1,t)||r.head<n.doc.length&&$i(n,r.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,n)))}return Ie.set(e,!0)}const m$=cr.fromClass(class{constructor(n){this.paused=!1,this.decorations=_O(n.state)}update(n){(n.docChanged||n.selectionSet||this.paused)&&(n.view.composing?(this.decorations=this.decorations.map(n.changes),this.paused=!0):(this.decorations=_O(n.state),this.paused=!1))}},{decorations:n=>n.decorations}),g$=[m$,d$];function O$(n={}){return[d3.of(n),g$]}const h3=new Ye;function uf(n,e,t){let r=n.prop(e<0?Ye.openedBy:Ye.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function df(n){let e=n.type.prop(h3);return e?e(n.node):n}function $i(n,e,t,r={}){let i=r.maxScanDistance||c3,s=r.brackets||u3,o=Ht(n),c=o.resolveInner(e,t);for(let u=c;u;u=u.parent){let f=uf(u.type,t,s);if(f&&u.from<u.to){let p=df(u);if(p&&(t>0?e>=p.from&&e<p.to:e>p.from&&e<=p.to))return x$(n,e,t,u,p,f,s)}}return y$(n,e,t,o,c.type,i,s)}function x$(n,e,t,r,i,s,o){let c=r.parent,u={from:i.from,to:i.to},f=0,p=c==null?void 0:c.cursor();if(p&&(t<0?p.childBefore(r.from):p.childAfter(r.to)))do if(t<0?p.to<=r.from:p.from>=r.to){if(f==0&&s.indexOf(p.type.name)>-1&&p.from<p.to){let O=df(p);return{start:u,end:O?{from:O.from,to:O.to}:void 0,matched:!0}}else if(uf(p.type,t,o))f++;else if(uf(p.type,-t,o)){if(f==0){let O=df(p);return{start:u,end:O&&O.from<O.to?{from:O.from,to:O.to}:void 0,matched:!1}}f--}}while(t<0?p.prevSibling():p.nextSibling());return{start:u,matched:!1}}function y$(n,e,t,r,i,s,o){let c=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),u=o.indexOf(c);if(u<0||u%2==0!=t>0)return null;let f={from:t<0?e-1:e,to:t>0?e+1:e},p=n.doc.iterRange(e,t>0?n.doc.length:0),O=0;for(let y=0;!p.next().done&&y<=s;){let v=p.value;t<0&&(y+=v.length);let S=e+y*t;for(let b=t>0?0:v.length-1,P=t>0?v.length:-1;b!=P;b+=t){let A=o.indexOf(v[b]);if(!(A<0||r.resolveInner(S+b,1).type!=i))if(A%2==0==t>0)O++;else{if(O==1)return{start:f,end:{from:S+b,to:S+b+1},matched:A>>1==u>>1};O--}}t>0&&(y+=v.length)}return p.done?{start:f,matched:!1}:null}const v$=Object.create(null),DO=[Fn.none],zO=[],IO=Object.create(null),w$=Object.create(null);for(let[n,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"]])w$[n]=S$(v$,e);function qd(n,e){zO.indexOf(n)>-1||(zO.push(n),console.warn(e))}function S$(n,e){let t=[];for(let c of e.split(" ")){let u=[];for(let f of c.split(".")){let p=n[f]||X[f];p?typeof p=="function"?u.length?u=u.map(p):qd(f,`Modifier ${f} used at start of tag`):u.length?qd(f,`Tag ${f} used as modifier`):u=Array.isArray(p)?p:[p]:qd(f,`Unknown highlighting tag ${f}`)}for(let f of u)t.push(f)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(c=>c.id),s=IO[i];if(s)return s.id;let o=IO[i]=Fn.define({id:DO.length,name:r,props:[R0({[r]:t})]});return DO.push(o),o.id}Ft.RTL,Ft.LTR;const b$=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=ap(n.state,t.from);return r.line?k$(n):r.block?P$(n):!1};function op(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const k$=op(C$,0),$$=op(f3,0),P$=op((n,e)=>f3(n,e,A$(e)),0);function ap(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const sa=50;function Q$(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-sa,r),o=n.sliceDoc(i,i+sa),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(o)[0].length,f=s.length-c;if(s.slice(f-e.length,f)==e&&o.slice(u,u+t.length)==t)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};let p,O;i-r<=2*sa?p=O=n.sliceDoc(r,i):(p=n.sliceDoc(r,r+sa),O=n.sliceDoc(i-sa,i));let y=/^\s*/.exec(p)[0].length,v=/\s*$/.exec(O)[0].length,S=O.length-v-t.length;return p.slice(y,y+e.length)==e&&O.slice(S,S+t.length)==t?{open:{pos:r+y+e.length,margin:/\s/.test(p.charAt(y+e.length))?1:0},close:{pos:i-v-t.length,margin:/\s/.test(O.charAt(S-1))?1:0}}:null}function A$(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function f3(n,e,t=e.selection.ranges){let r=t.map(s=>ap(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>Q$(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,c;o<i.length;o++)if(c=i[o]){let u=r[o],{open:f,close:p}=c;s.push({from:f.pos-u.open.length,to:f.pos+f.margin},{from:p.pos-p.margin,to:p.pos+u.close.length})}return{changes:s}}return null}function C$(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let c=r.length,u=1e9,f;for(let p=s;p<=o;){let O=e.doc.lineAt(p);if(f==null&&(f=ap(e,O.from).line,!f))continue e;if(O.from>i&&(s==o||o>O.from)){i=O.from;let y=/^\s*/.exec(O.text)[0].length,v=y==O.length,S=O.text.slice(y,y+f.length)==f?y:-1;y<O.text.length&&y<u&&(u=y),r.push({line:O,comment:S,token:f,indent:y,empty:v,single:!1})}p=O.to+1}if(u<1e9)for(let p=c;p<r.length;p++)r[p].indent<r[p].line.text.length&&(r[p].indent=u);r.length==c+1&&(r[c].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:c,token:u,indent:f,empty:p,single:O}of r)(O||!p)&&s.push({from:c.from+f,insert:u+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:c,token:u}of r)if(c>=0){let f=o.from+c,p=f+u.length;o.text[p-o.from]==" "&&p++,s.push({from:f,to:p})}return{changes:s}}return null}const hf=Ki.define(),M$=Ki.define(),T$=Te.define(),p3=Te.define({combine(n){return vo(n,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(r,i)=>e(r,i)||t(r,i)})}}),m3=kr.define({create(){return Pi.empty},update(n,e){let t=e.state.facet(p3),r=e.annotation(hf);if(r){let u=lr.fromTransaction(e,r.selection),f=r.side,p=f==0?n.undone:n.done;return u?p=h0(p,p.length,t.minDepth,u):p=x3(p,e.startState.selection),new Pi(f==0?r.rest:p,f==0?p:r.rest)}let i=e.annotation(M$);if((i=="full"||i=="before")&&(n=n.isolate()),e.annotation(qt.addToHistory)===!1)return e.changes.empty?n:n.addMapping(e.changes.desc);let s=lr.fromTransaction(e),o=e.annotation(qt.time),c=e.annotation(qt.userEvent);return s?n=n.addChanges(s,o,c,t,e):e.selection&&(n=n.addSelection(e.startState.selection,o,c,t.newGroupDelay)),(i=="full"||i=="after")&&(n=n.isolate()),n},toJSON(n){return{done:n.done.map(e=>e.toJSON()),undone:n.undone.map(e=>e.toJSON())}},fromJSON(n){return new Pi(n.done.map(lr.fromJSON),n.undone.map(lr.fromJSON))}});function E$(n={}){return[m3,p3.of(n),Me.domEventHandlers({beforeinput(e,t){let r=e.inputType=="historyUndo"?g3:e.inputType=="historyRedo"?ff:null;return r?(e.preventDefault(),r(t)):!1}})]}function D0(n,e){return function({state:t,dispatch:r}){if(!e&&t.readOnly)return!1;let i=t.field(m3,!1);if(!i)return!1;let s=i.pop(n,t,e);return s?(r(s),!0):!1}}const g3=D0(0,!1),ff=D0(1,!1),Z$=D0(0,!0),j$=D0(1,!0);class lr{constructor(e,t,r,i,s){this.changes=e,this.effects=t,this.mapped=r,this.startSelection=i,this.selectionsAfter=s}setSelAfter(e){return new lr(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(t=this.mapped)===null||t===void 0?void 0:t.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 lr(e.changes&&nn.fromJSON(e.changes),[],e.mapped&&Qi.fromJSON(e.mapped),e.startSelection&&ue.fromJSON(e.startSelection),e.selectionsAfter.map(ue.fromJSON))}static fromTransaction(e,t){let r=Rr;for(let i of e.startState.facet(T$)){let s=i(e);s.length&&(r=r.concat(s))}return!r.length&&e.changes.empty?null:new lr(e.changes.invert(e.startState.doc),r,void 0,t||e.startState.selection,Rr)}static selection(e){return new lr(void 0,Rr,void 0,void 0,e)}}function h0(n,e,t,r){let i=e+1>t+20?e-t-1:0,s=n.slice(i,e);return s.push(r),s}function R$(n,e){let t=[],r=!1;return n.iterChangedRanges((i,s)=>t.push(i,s)),e.iterChangedRanges((i,s,o,c)=>{for(let u=0;u<t.length;){let f=t[u++],p=t[u++];c>=f&&o<=p&&(r=!0)}}),r}function V$(n,e){return n.ranges.length==e.ranges.length&&n.ranges.filter((t,r)=>t.empty!=e.ranges[r].empty).length===0}function O3(n,e){return n.length?e.length?n.concat(e):n:e}const Rr=[],L$=200;function x3(n,e){if(n.length){let t=n[n.length-1],r=t.selectionsAfter.slice(Math.max(0,t.selectionsAfter.length-L$));return r.length&&r[r.length-1].eq(e)?n:(r.push(e),h0(n,n.length-1,1e9,t.setSelAfter(r)))}else return[lr.selection([e])]}function N$(n){let e=n[n.length-1],t=n.slice();return t[n.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),t}function Ud(n,e){if(!n.length)return n;let t=n.length,r=Rr;for(;t;){let i=X$(n[t-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let s=n.slice(0,t);return s[t-1]=i,s}else e=i.mapped,t--,r=i.selectionsAfter}return r.length?[lr.selection(r)]:Rr}function X$(n,e,t){let r=O3(n.selectionsAfter.length?n.selectionsAfter.map(c=>c.map(e)):Rr,t);if(!n.changes)return lr.selection(r);let i=n.changes.map(e),s=e.mapDesc(n.changes,!0),o=n.mapped?n.mapped.composeDesc(s):s;return new lr(i,at.mapEffects(n.effects,e),o,n.startSelection.map(s),r)}const _$=/^(input\.type|delete)($|\.)/;class Pi{constructor(e,t,r=0,i=void 0){this.done=e,this.undone=t,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Pi(this.done,this.undone):this}addChanges(e,t,r,i,s){let o=this.done,c=o[o.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!r||_$.test(r))&&(!c.selectionsAfter.length&&t-this.prevTime<i.newGroupDelay&&i.joinToEvent(s,R$(c.changes,e.changes))||r=="input.type.compose")?o=h0(o,o.length-1,i.minDepth,new lr(e.changes.compose(c.changes),O3(at.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,Rr)):o=h0(o,o.length,i.minDepth,e),new Pi(o,Rr,t,r)}addSelection(e,t,r,i){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Rr;return s.length>0&&t-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&V$(s[s.length-1],e)?this:new Pi(x3(this.done,e),this.undone,t,r)}addMapping(e){return new Pi(Ud(this.done,e),Ud(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,r){let i=e==0?this.done:this.undone;if(i.length==0)return null;let s=i[i.length-1],o=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):t.selection);if(r&&s.selectionsAfter.length)return t.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:hf.of({side:e,rest:N$(i),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let c=i.length==1?Rr:i.slice(0,i.length-1);return s.mapped&&(c=Ud(c,s.mapped)),t.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:hf.of({side:e,rest:c,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Pi.empty=new Pi(Rr,Rr);const D$=[{key:"Mod-z",run:g3,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:ff,preventDefault:!0},{linux:"Ctrl-Shift-z",run:ff,preventDefault:!0},{key:"Mod-u",run:Z$,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:j$,preventDefault:!0}];function wo(n,e){return ue.create(n.ranges.map(e),n.mainIndex)}function Jr(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function ei({state:n,dispatch:e},t){let r=wo(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Jr(n,r)),!0)}function z0(n,e){return ue.cursor(e?n.to:n.from)}function y3(n,e){return ei(n,t=>t.empty?n.moveByChar(t,e):z0(t,e))}function Rn(n){return n.textDirectionAt(n.state.selection.main.head)==Ft.LTR}const v3=n=>y3(n,!Rn(n)),w3=n=>y3(n,Rn(n));function S3(n,e){return ei(n,t=>t.empty?n.moveByGroup(t,e):z0(t,e))}const z$=n=>S3(n,!Rn(n)),I$=n=>S3(n,Rn(n));function F$(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function I0(n,e,t){let r=Ht(n).resolveInner(e.head),i=t?Ye.closedBy:Ye.openedBy;for(let u=e.head;;){let f=t?r.childAfter(u):r.childBefore(u);if(!f)break;F$(n,f,i)?r=f:u=t?f.to:f.from}let s=r.type.prop(i),o,c;return s&&(o=t?$i(n,r.from,1):$i(n,r.to,-1))&&o.matched?c=t?o.end.to:o.end.from:c=t?r.to:r.from,ue.cursor(c,t?-1:1)}const H$=n=>ei(n,e=>I0(n.state,e,!Rn(n))),W$=n=>ei(n,e=>I0(n.state,e,Rn(n)));function b3(n,e){return ei(n,t=>{if(!t.empty)return z0(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const k3=n=>b3(n,!1),$3=n=>b3(n,!0);function P3(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(Me.scrollMargins)){let o=s(n);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function Q3(n,e){let t=P3(n),{state:r}=n,i=wo(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):z0(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),c=n.scrollDOM.getBoundingClientRect(),u=c.top+t.marginTop,f=c.bottom-t.marginBottom;o&&o.top>u&&o.bottom<f&&(s=Me.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-u}))}return n.dispatch(Jr(r,i),{effects:s}),!0}const FO=n=>Q3(n,!1),pf=n=>Q3(n,!0);function js(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=ue.cursor(r.from+s))}return i}const B$=n=>ei(n,e=>js(n,e,!0)),Y$=n=>ei(n,e=>js(n,e,!1)),q$=n=>ei(n,e=>js(n,e,!Rn(n))),U$=n=>ei(n,e=>js(n,e,Rn(n))),G$=n=>ei(n,e=>ue.cursor(n.lineBlockAt(e.head).from,1)),K$=n=>ei(n,e=>ue.cursor(n.lineBlockAt(e.head).to,-1));function J$(n,e,t){let r=!1,i=wo(n.selection,s=>{let o=$i(n,s.head,-1)||$i(n,s.head,1)||s.head>0&&$i(n,s.head-1,1)||s.head<n.doc.length&&$i(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let c=o.start.from==s.head?o.end.to:o.end.from;return ue.cursor(c)});return r?(e(Jr(n,i)),!0):!1}const eP=({state:n,dispatch:e})=>J$(n,e);function Vr(n,e){let t=wo(n.state.selection,r=>{let i=e(r);return ue.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return t.eq(n.state.selection)?!1:(n.dispatch(Jr(n.state,t)),!0)}function A3(n,e){return Vr(n,t=>n.moveByChar(t,e))}const C3=n=>A3(n,!Rn(n)),M3=n=>A3(n,Rn(n));function T3(n,e){return Vr(n,t=>n.moveByGroup(t,e))}const tP=n=>T3(n,!Rn(n)),nP=n=>T3(n,Rn(n)),rP=n=>Vr(n,e=>I0(n.state,e,!Rn(n))),iP=n=>Vr(n,e=>I0(n.state,e,Rn(n)));function E3(n,e){return Vr(n,t=>n.moveVertically(t,e))}const Z3=n=>E3(n,!1),j3=n=>E3(n,!0);function R3(n,e){return Vr(n,t=>n.moveVertically(t,e,P3(n).height))}const HO=n=>R3(n,!1),WO=n=>R3(n,!0),sP=n=>Vr(n,e=>js(n,e,!0)),lP=n=>Vr(n,e=>js(n,e,!1)),oP=n=>Vr(n,e=>js(n,e,!Rn(n))),aP=n=>Vr(n,e=>js(n,e,Rn(n))),cP=n=>Vr(n,e=>ue.cursor(n.lineBlockAt(e.head).from)),uP=n=>Vr(n,e=>ue.cursor(n.lineBlockAt(e.head).to)),BO=({state:n,dispatch:e})=>(e(Jr(n,{anchor:0})),!0),YO=({state:n,dispatch:e})=>(e(Jr(n,{anchor:n.doc.length})),!0),qO=({state:n,dispatch:e})=>(e(Jr(n,{anchor:n.selection.main.anchor,head:0})),!0),UO=({state:n,dispatch:e})=>(e(Jr(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),dP=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),hP=({state:n,dispatch:e})=>{let t=F0(n).map(({from:r,to:i})=>ue.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:ue.create(t),userEvent:"select"})),!0},fP=({state:n,dispatch:e})=>{let t=wo(n.selection,r=>{let i=Ht(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;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 ue.range(c.to,c.from)}return r});return t.eq(n.selection)?!1:(e(Jr(n,t)),!0)};function V3(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let c=s;;){let u=n.moveVertically(c,e);if(u.head<o.from||u.head>o.to){i.some(f=>f.head==u.head)||i.push(u);break}else{if(u.head==c.head)break;c=u}}}return i.length==r.ranges.length?!1:(n.dispatch(Jr(t,ue.create(i,i.length-1))),!0)}const pP=n=>V3(n,!1),mP=n=>V3(n,!0),gP=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=ue.create([t.main]):t.main.empty||(r=ue.create([ue.cursor(t.main.head)])),r?(e(Jr(n,r)),!0):!1};function Ba(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:c}=s;if(o==c){let u=e(s);u<o?(t="delete.backward",u=xu(n,u,!1)):u>o&&(t="delete.forward",u=xu(n,u,!0)),o=Math.min(o,u),c=Math.max(c,u)}else o=xu(n,o,!1),c=xu(n,c,!0);return o==c?{range:s}:{changes:{from:o,to:c},range:ue.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Me.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function xu(n,e,t){if(n instanceof Me)for(let r of n.state.facet(Me.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const L3=(n,e,t)=>Ba(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),c,u;if(t&&!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 f=C0(c,s.tabSize),p=f%u0(s)||u0(s);for(let O=0;O<p&&c[c.length-1-O]==" ";O++)i--;u=i}else u=hn(o.text,i-o.from,e,e)+o.from,u==i&&o.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(u-o.from,i-o.from))&&(u=hn(o.text,u-o.from,!1,!1)+o.from);return u}),mf=n=>L3(n,!1,!0),N3=n=>L3(n,!0,!1),X3=(n,e)=>Ba(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let c=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let u=hn(s.text,r-s.from,e)+s.from,f=s.text.slice(Math.min(r,u)-s.from,Math.max(r,u)-s.from),p=o(f);if(c!=null&&p!=c)break;(f!=" "||r!=t.head)&&(c=p),r=u}return r}),_3=n=>X3(n,!1),OP=n=>X3(n,!0),xP=n=>Ba(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),yP=n=>Ba(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),vP=n=>Ba(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),wP=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:it.of(["",""])},range:ue.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},SP=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:hn(s.text,i-s.from,!1)+s.from,c=i==s.to?i+1:hn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:c,insert:n.doc.slice(i,c).append(n.doc.slice(o,i))},range:ue.cursor(c)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function F0(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function D3(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of F0(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),c=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let u of s.ranges)i.push(ue.range(Math.min(n.doc.length,u.anchor+c),Math.min(n.doc.length,u.head+c)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let u of s.ranges)i.push(ue.range(u.anchor-c,u.head-c))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:ue.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const bP=({state:n,dispatch:e})=>D3(n,e,!1),kP=({state:n,dispatch:e})=>D3(n,e,!0);function z3(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of F0(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const $P=({state:n,dispatch:e})=>z3(n,e,!1),PP=({state:n,dispatch:e})=>z3(n,e,!0),QP=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(F0(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=wo(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),c=n.coordsAtPos(i.head,i.assoc||1);c&&(s=o.bottom+n.documentTop-c.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function AP(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Ht(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(Ye.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const GO=I3(!1),CP=I3(!0);function I3(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,c=e.doc.lineAt(s),u=!n&&s==o&&AP(e,s);n&&(s=o=(o<=c.to?c:e.doc.lineAt(o)).to);let f=new L0(e,{simulateBreak:s,simulateDoubleBreak:!!u}),p=ip(f,s);for(p==null&&(p=C0(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<c.to&&/\s/.test(c.text[o-c.from]);)o++;u?{from:s,to:o}=u:s>c.from&&s<c.from+100&&!/\S/.test(c.text.slice(0,s))&&(s=c.from);let O=["",Va(e,p)];return u&&O.push(Va(e,f.lineIndent(c.from,-1))),{changes:{from:s,to:o,insert:it.of(O)},range:ue.cursor(s+1+O[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function cp(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let c=n.doc.lineAt(o);c.number>t&&(r.empty||r.to>c.from)&&(e(c,i,r),t=c.number),o=c.to+1}let s=n.changes(i);return{changes:i,range:ue.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const MP=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new L0(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=cp(n,(s,o,c)=>{let u=ip(r,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let f=/^\s*/.exec(s.text)[0],p=Va(n,u);(f!=p||c.from<s.from+f.length)&&(t[s.from]=u,o.push({from:s.from,to:s.from+f.length,insert:p}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},TP=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cp(n,(t,r)=>{r.push({from:t.from,insert:n.facet(V0)})}),{userEvent:"input.indent"})),!0),EP=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(cp(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=C0(i,n.tabSize),o=0,c=Va(n,Math.max(0,s-u0(n)));for(;o<i.length&&o<c.length&&i.charCodeAt(o)==c.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:c.slice(o)})}),{userEvent:"delete.dedent"})),!0),ZP=n=>(n.setTabFocusMode(),!0),jP=[{key:"Ctrl-b",run:v3,shift:C3,preventDefault:!0},{key:"Ctrl-f",run:w3,shift:M3},{key:"Ctrl-p",run:k3,shift:Z3},{key:"Ctrl-n",run:$3,shift:j3},{key:"Ctrl-a",run:G$,shift:cP},{key:"Ctrl-e",run:K$,shift:uP},{key:"Ctrl-d",run:N3},{key:"Ctrl-h",run:mf},{key:"Ctrl-k",run:xP},{key:"Ctrl-Alt-h",run:_3},{key:"Ctrl-o",run:wP},{key:"Ctrl-t",run:SP},{key:"Ctrl-v",run:pf}],RP=[{key:"ArrowLeft",run:v3,shift:C3,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:z$,shift:tP,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:q$,shift:oP,preventDefault:!0},{key:"ArrowRight",run:w3,shift:M3,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:I$,shift:nP,preventDefault:!0},{mac:"Cmd-ArrowRight",run:U$,shift:aP,preventDefault:!0},{key:"ArrowUp",run:k3,shift:Z3,preventDefault:!0},{mac:"Cmd-ArrowUp",run:BO,shift:qO},{mac:"Ctrl-ArrowUp",run:FO,shift:HO},{key:"ArrowDown",run:$3,shift:j3,preventDefault:!0},{mac:"Cmd-ArrowDown",run:YO,shift:UO},{mac:"Ctrl-ArrowDown",run:pf,shift:WO},{key:"PageUp",run:FO,shift:HO},{key:"PageDown",run:pf,shift:WO},{key:"Home",run:Y$,shift:lP,preventDefault:!0},{key:"Mod-Home",run:BO,shift:qO},{key:"End",run:B$,shift:sP,preventDefault:!0},{key:"Mod-End",run:YO,shift:UO},{key:"Enter",run:GO,shift:GO},{key:"Mod-a",run:dP},{key:"Backspace",run:mf,shift:mf,preventDefault:!0},{key:"Delete",run:N3,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:_3,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:OP,preventDefault:!0},{mac:"Mod-Backspace",run:yP,preventDefault:!0},{mac:"Mod-Delete",run:vP,preventDefault:!0}].concat(jP.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),VP=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:H$,shift:rP},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:W$,shift:iP},{key:"Alt-ArrowUp",run:bP},{key:"Shift-Alt-ArrowUp",run:$P},{key:"Alt-ArrowDown",run:kP},{key:"Shift-Alt-ArrowDown",run:PP},{key:"Mod-Alt-ArrowUp",run:pP},{key:"Mod-Alt-ArrowDown",run:mP},{key:"Escape",run:gP},{key:"Mod-Enter",run:CP},{key:"Alt-l",mac:"Ctrl-l",run:hP},{key:"Mod-i",run:fP,preventDefault:!0},{key:"Mod-[",run:EP},{key:"Mod-]",run:TP},{key:"Mod-Alt-\\",run:MP},{key:"Shift-Mod-k",run:QP},{key:"Shift-Mod-\\",run:eP},{key:"Mod-/",run:b$},{key:"Alt-A",run:$$},{key:"Ctrl-m",mac:"Shift-Alt-m",run:ZP}].concat(RP);function KO(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function LP(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=KO(e)+KO(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function NP(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:LP(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function XP(n,e){return t=>{for(let r=Ht(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}const _P=Ki.define(),DP=Me.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"},".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 zP{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class up{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Zn.TrackDel),r=e.mapPos(this.to,1,Zn.TrackDel);return t==null||r==null?null:new up(this.field,t,r)}}class dp{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(r.length){let f=o,p=/^\t*/.exec(u)[0].length;for(let O=0;O<p;O++)f+=e.facet(V0);i.push(t+f.length-p),u=f+u.slice(p)}r.push(u),t+=u.length+1}let c=this.fieldPositions.map(u=>new up(u.field,i[u.line]+u.from,i[u.line]+u.to));return{text:r,ranges:c}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let c=s[1]?+s[1]:null,u=s[2]||s[3]||"",f=-1,p=u.replace(/\\[{}]/g,O=>O[1]);for(let O=0;O<t.length;O++)(c!=null?t[O].seq==c:p&&t[O].name==p)&&(f=O);if(f<0){let O=0;for(;O<t.length&&(c==null||t[O].seq!=null&&t[O].seq<c);)O++;t.splice(O,0,{seq:c,name:p}),f=O;for(let y of i)y.field>=f&&y.field++}for(let O of i)if(O.line==r.length&&O.from>s.index){let y=s[2]?3+(s[1]||"").length:2;O.from-=y,O.to-=y}i.push(new zP(f,r.length,s.index,s.index+p.length)),o=o.slice(0,s.index)+u+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(c,u,f)=>{for(let p of i)p.line==r.length&&p.from>f&&(p.from--,p.to--);return u}),r.push(o)}return new dp(r,i)}}let IP=Ie.widget({widget:new class extends hl{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),FP=Ie.mark({class:"cm-snippetField"});class So{constructor(e,t){this.ranges=e,this.active=t,this.deco=Ie.set(e.map(r=>(r.from==r.to?IP:FP).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new So(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const Ya=at.define({map(n,e){return n&&n.map(e)}}),HP=at.define(),La=kr.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(Ya))return t.value;if(t.is(HP)&&n)return new So(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Me.decorations.from(n,e=>e?e.deco:Ie.none)});function hp(n,e){return ue.create(n.filter(t=>t.field==e).map(t=>ue.range(t.from,t.to)))}function WP(n){let e=dp.parse(n);return(t,r,i,s)=>{let{text:o,ranges:c}=e.instantiate(t.state,i),{main:u}=t.state.selection,f={changes:{from:i,to:s==u.from?u.to:s,insert:it.of(o)},scrollIntoView:!0,annotations:r?[_P.of(r),qt.userEvent.of("input.complete")]:void 0};if(c.length&&(f.selection=hp(c,0)),c.some(p=>p.field>0)){let p=new So(c,0),O=f.effects=[Ya.of(p)];t.state.field(La,!1)===void 0&&O.push(at.appendConfig.of([La,GP,KP,DP]))}t.dispatch(t.state.update(f))}}function F3(n){return({state:e,dispatch:t})=>{let r=e.field(La,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:hp(r.ranges,i),effects:Ya.of(s?null:new So(r.ranges,i)),scrollIntoView:!0})),!0}}const BP=({state:n,dispatch:e})=>n.field(La,!1)?(e(n.update({effects:Ya.of(null)})),!0):!1,YP=F3(1),qP=F3(-1),UP=[{key:"Tab",run:YP,shift:qP},{key:"Escape",run:BP}],JO=Te.define({combine(n){return n.length?n[0]:UP}}),GP=Ia.highest(Gf.compute([JO],n=>n.facet(JO)));function rr(n,e){return{...e,apply:WP(n)}}const KP=Me.domEventHandlers({mousedown(n,e){let t=e.state.field(La,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:hp(t.ranges,i.field),effects:Ya.of(t.ranges.some(s=>s.field>i.field)?new So(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Na={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},sl=at.define({map(n,e){let t=e.mapPos(n,-1,Zn.TrackAfter);return t??void 0}}),fp=new class extends As{};fp.startSide=1;fp.endSide=-1;const H3=kr.define({create(){return Je.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(sl)&&(n=n.update({add:[fp.range(t.value,t.value+1)]}));return n}});function JP(){return[tQ,H3]}const Gd="()[]{}<>«»»«[]{}";function W3(n){for(let e=0;e<Gd.length;e+=2)if(Gd.charCodeAt(e)==n)return Gd.charAt(e+1);return E4(n<128?n:n+1)}function B3(n,e){return n.languageDataAt("closeBrackets",e)[0]||Na}const eQ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),tQ=Me.inputHandler.of((n,e,t,r)=>{if((eQ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&za(dl(r,0))==1||e!=i.from||t!=i.to)return!1;let s=iQ(n.state,r);return s?(n.dispatch(s),!0):!1}),nQ=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let r=B3(n,n.selection.main.head).brackets||Na.brackets,i=null,s=n.changeByRange(o=>{if(o.empty){let c=sQ(n.doc,o.head);for(let u of r)if(u==c&&H0(n.doc,o.head)==W3(dl(u,0)))return{changes:{from:o.head-u.length,to:o.head+u.length},range:ue.cursor(o.head-u.length)}}return{range:i=o}});return i||e(n.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},rQ=[{key:"Backspace",run:nQ}];function iQ(n,e){let t=B3(n,n.selection.main.head),r=t.brackets||Na.brackets;for(let i of r){let s=W3(dl(i,0));if(e==i)return s==i?aQ(n,i,r.indexOf(i+i+i)>-1,t):lQ(n,i,s,t.before||Na.before);if(e==s&&Y3(n,n.selection.main.from))return oQ(n,i,s)}return null}function Y3(n,e){let t=!1;return n.field(H3).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function H0(n,e){let t=n.sliceString(e,e+2);return t.slice(0,za(dl(t,0)))}function sQ(n,e){let t=n.sliceString(e-2,e);return za(dl(t,0))==t.length?t:t.slice(1)}function lQ(n,e,t,r){let i=null,s=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:sl.of(o.to+e.length),range:ue.range(o.anchor+e.length,o.head+e.length)};let c=H0(n.doc,o.head);return!c||/\s/.test(c)||r.indexOf(c)>-1?{changes:{insert:e+t,from:o.head},effects:sl.of(o.head+e.length),range:ue.cursor(o.head+e.length)}:{range:i=o}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function oQ(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&H0(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:ue.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function aQ(n,e,t,r){let i=r.stringPrefixes||Na.stringPrefixes,s=null,o=n.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:sl.of(c.to+e.length),range:ue.range(c.anchor+e.length,c.head+e.length)};let u=c.head,f=H0(n.doc,u),p;if(f==e){if(e8(n,u))return{changes:{insert:e+e,from:u},effects:sl.of(u+e.length),range:ue.cursor(u+e.length)};if(Y3(n,u)){let y=t&&n.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+y.length,insert:y},range:ue.cursor(u+y.length)}}}else{if(t&&n.sliceDoc(u-2*e.length,u)==e+e&&(p=t8(n,u-2*e.length,i))>-1&&e8(n,p))return{changes:{insert:e+e+e+e,from:u},effects:sl.of(u+e.length),range:ue.cursor(u+e.length)};if(n.charCategorizer(u)(f)!=Zt.Word&&t8(n,u,i)>-1&&!cQ(n,u,e,i))return{changes:{insert:e+e,from:u},effects:sl.of(u+e.length),range:ue.cursor(u+e.length)}}return{range:s=c}});return s?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function e8(n,e){let t=Ht(n).resolveInner(e+1);return t.parent&&t.from==e}function cQ(n,e,t,r){let i=Ht(n).resolveInner(e,-1),s=r.reduce((o,c)=>Math.max(o,c.length),0);for(let o=0;o<5;o++){let c=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),u=c.indexOf(t);if(!u||u>-1&&r.indexOf(c.slice(0,u))>-1){let p=i.firstChild;for(;p&&p.from==i.from&&p.to-p.from>t.length+u;){if(n.sliceDoc(p.to-t.length,p.to)==t)return!1;p=p.firstChild}return!0}let f=i.to==e&&i.parent;if(!f)break;i=f}return!1}function t8(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Zt.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=Zt.Word)return s}return-1}const n8=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class po{constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?c=>s(n8(c)):n8,this.query=this.normalize(t)}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 dl(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 t=E4(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=za(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let c=i.charCodeAt(s),u=this.match(c,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(u)return this.value=u,this;break}o==r&&s<t.length&&t.charCodeAt(s)==c&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],c=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,c=!0)),c||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(po.prototype[Symbol.iterator]=function(){return this});const q3={from:-1,to:-1,match:/.*/.exec("")},pp="gm"+(/x/.unicode==null?"":"u");class U3{constructor(e,t,r,i=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=q3,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new G3(e,t,r,i,s);this.re=new RegExp(t,pp+(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=f0(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 t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let r=this.curLineStart+t.index,i=r+t[0].length;if(this.matchPos=f0(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,t)))return this.value={from:r,to:i,match:t},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 Kd=new WeakMap;class io{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(e,t,r){let i=Kd.get(e);if(!i||i.from>=r||i.to<=t){let c=new io(t,e.sliceString(t,r));return Kd.set(e,c),c}if(i.from==t&&i.to==r)return i;let{text:s,from:o}=i;return o>t&&(s=e.sliceString(t,o)+s,o=t),i.to<r&&(s+=e.sliceString(i.to,r)),Kd.set(e,new io(o,s)),new io(t,s.slice(t-o,r-o))}}class G3{constructor(e,t,r,i,s){this.text=e,this.to=s,this.done=!1,this.value=q3,this.matchPos=f0(e,i),this.re=new RegExp(t,pp+(r!=null&&r.ignoreCase?"i":"")),this.test=r==null?void 0:r.test,this.flat=io.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,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let r=this.flat.from+t.index,i=r+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,t)))return this.value={from:r,to:i,match:t},this.matchPos=f0(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=io.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(U3.prototype[Symbol.iterator]=G3.prototype[Symbol.iterator]=function(){return this});function uQ(n){try{return new RegExp(n,pp),!0}catch{return!1}}function f0(n,e){if(e>=n.length)return e;let t=n.lineAt(e),r;for(;e<t.to&&(r=t.text.charCodeAt(e-t.from))>=56320&&r<57344;)e++;return e}const dQ=n=>{let{state:e}=n,t=String(e.doc.lineAt(n.state.selection.main.head).number),{close:r,result:i}=t9(n,{label:e.phrase("Go to line"),input:{type:"text",name:"line",value:t},focus:!0,submitLabel:e.phrase("go")});return i.then(s=>{let o=s&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(s.elements.line.value);if(!o){n.dispatch({effects:r});return}let c=e.doc.lineAt(e.selection.main.head),[,u,f,p,O]=o,y=p?+p.slice(1):0,v=f?+f:c.number;if(f&&O){let P=v/100;u&&(P=P*(u=="-"?-1:1)+c.number/e.doc.lines),v=Math.round(e.doc.lines*P)}else f&&u&&(v=v*(u=="-"?-1:1)+c.number);let S=e.doc.line(Math.max(1,Math.min(e.doc.lines,v))),b=ue.cursor(S.from+Math.max(0,Math.min(y,S.length)));n.dispatch({effects:[r,Me.scrollIntoView(b.from,{y:"center"})],selection:b})}),!0},hQ={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},fQ=Te.define({combine(n){return vo(n,hQ,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function pQ(n){return[yQ,xQ]}const mQ=Ie.mark({class:"cm-selectionMatch"}),gQ=Ie.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function r8(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Zt.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Zt.Word)}function OQ(n,e,t,r){return n(e.sliceDoc(t,t+1))==Zt.Word&&n(e.sliceDoc(r-1,r))==Zt.Word}const xQ=cr.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(fQ),{state:t}=n,r=t.selection;if(r.ranges.length>1)return Ie.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return Ie.none;let u=t.wordAt(i.head);if(!u)return Ie.none;o=t.charCategorizer(i.head),s=t.sliceDoc(u.from,u.to)}else{let u=i.to-i.from;if(u<e.minSelectionLength||u>200)return Ie.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(r8(o,t,i.from,i.to)&&OQ(o,t,i.from,i.to)))return Ie.none}else if(s=t.sliceDoc(i.from,i.to),!s)return Ie.none}let c=[];for(let u of n.visibleRanges){let f=new po(t.doc,s,u.from,u.to);for(;!f.next().done;){let{from:p,to:O}=f.value;if((!o||r8(o,t,p,O))&&(i.empty&&p<=i.from&&O>=i.to?c.push(gQ.range(p,O)):(p>=i.to||O<=i.from)&&c.push(mQ.range(p,O)),c.length>e.maxMatches))return Ie.none}}return Ie.set(c)}},{decorations:n=>n.decorations}),yQ=Me.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),vQ=({state:n,dispatch:e})=>{let{selection:t}=n,r=ue.create(t.ranges.map(i=>n.wordAt(i.head)||ue.cursor(i.head)),t.mainIndex);return r.eq(t)?!1:(e(n.update({selection:r})),!0)};function wQ(n,e){let{main:t,ranges:r}=n.selection,i=n.wordAt(t.head),s=i&&i.from==t.from&&i.to==t.to;for(let o=!1,c=new po(n.doc,e,r[r.length-1].to);;)if(c.next(),c.done){if(o)return null;c=new po(n.doc,e,0,Math.max(0,r[r.length-1].from-1)),o=!0}else{if(o&&r.some(u=>u.from==c.value.from))continue;if(s){let u=n.wordAt(c.value.from);if(!u||u.from!=c.value.from||u.to!=c.value.to)continue}return c.value}}const SQ=({state:n,dispatch:e})=>{let{ranges:t}=n.selection;if(t.some(s=>s.from===s.to))return vQ({state:n,dispatch:e});let r=n.sliceDoc(t[0].from,t[0].to);if(n.selection.ranges.some(s=>n.sliceDoc(s.from,s.to)!=r))return!1;let i=wQ(n,r);return i?(e(n.update({selection:n.selection.addRange(ue.range(i.from,i.to),!1),effects:Me.scrollIntoView(i.to)})),!0):!1},bo=Te.define({combine(n){return vo(n,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new VQ(e),scrollToMatch:e=>Me.scrollIntoView(e)})}});class K3{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||uQ(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,(t,r)=>r=="n"?`
64
- `: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 AQ(this):new $Q(this)}getCursor(e,t=0,r){let i=e.doc?e:ot.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?zl(this,i,t,r):Dl(this,i,t,r)}}class J3{constructor(e){this.spec=e}}function bQ(n,e,t){return(r,i,s,o)=>{if(t&&!t(r,i,s,o))return!1;let c=r>=o&&i<=o+s.length?s.slice(r-o,i-o):e.doc.sliceString(r,i);return n(c,e,r,i)}}function Dl(n,e,t,r){let i;return n.wholeWord&&(i=kQ(e.doc,e.charCategorizer(e.selection.main.head))),n.test&&(i=bQ(n.test,e,i)),new po(e.doc,n.unquoted,t,r,n.caseSensitive?void 0:s=>s.toLowerCase(),i)}function kQ(n,e){return(t,r,i,s)=>((s>t||s+i.length<r)&&(s=Math.max(0,t-2),i=n.sliceString(s,Math.min(n.length,r+2))),(e(p0(i,t-s))!=Zt.Word||e(m0(i,t-s))!=Zt.Word)&&(e(m0(i,r-s))!=Zt.Word||e(p0(i,r-s))!=Zt.Word))}class $Q extends J3{constructor(e){super(e)}nextMatch(e,t,r){let i=Dl(this.spec,e,r,e.doc.length).nextOverlapping();if(i.done){let s=Math.min(e.doc.length,t+this.spec.unquoted.length);i=Dl(this.spec,e,0,s).nextOverlapping()}return i.done||i.value.from==t&&i.value.to==r?null:i.value}prevMatchInRange(e,t,r){for(let i=r;;){let s=Math.max(t,i-1e4-this.spec.unquoted.length),o=Dl(this.spec,e,s,i),c=null;for(;!o.nextOverlapping().done;)c=o.value;if(c)return c;if(s==t)return null;i-=1e4}}prevMatch(e,t,r){let i=this.prevMatchInRange(e,0,t);return i||(i=this.prevMatchInRange(e,Math.max(0,r-this.spec.unquoted.length),e.doc.length)),i&&(i.from!=t||i.to!=r)?i:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let r=Dl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=Dl(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}function PQ(n,e,t){return(r,i,s)=>(!t||t(r,i,s))&&n(s[0],e,r,i)}function zl(n,e,t,r){let i;return n.wholeWord&&(i=QQ(e.charCategorizer(e.selection.main.head))),n.test&&(i=PQ(n.test,e,i)),new U3(e.doc,n.search,{ignoreCase:!n.caseSensitive,test:i},t,r)}function p0(n,e){return n.slice(hn(n,e,!1),e)}function m0(n,e){return n.slice(e,hn(n,e))}function QQ(n){return(e,t,r)=>!r[0].length||(n(p0(r.input,r.index))!=Zt.Word||n(m0(r.input,r.index))!=Zt.Word)&&(n(m0(r.input,r.index+r[0].length))!=Zt.Word||n(p0(r.input,r.index+r[0].length))!=Zt.Word)}class AQ extends J3{nextMatch(e,t,r){let i=zl(this.spec,e,r,e.doc.length).next();return i.done&&(i=zl(this.spec,e,0,t).next()),i.done?null:i.value}prevMatchInRange(e,t,r){for(let i=1;;i++){let s=Math.max(t,r-i*1e4),o=zl(this.spec,e,s,r),c=null;for(;!o.next().done;)c=o.value;if(c&&(s==t||c.from>s+10))return c;if(s==t)return null}}prevMatch(e,t,r){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,r)=>{if(r=="&")return e.match[0];if(r=="$")return"$";for(let i=r.length;i>0;i--){let s=+r.slice(0,i);if(s>0&&s<e.match.length)return e.match[s]+r.slice(i)}return t})}matchAll(e,t){let r=zl(this.spec,e,0,e.doc.length),i=[];for(;!r.next().done;){if(i.length>=t)return null;i.push(r.value)}return i}highlight(e,t,r,i){let s=zl(this.spec,e,Math.max(0,t-250),Math.min(r+250,e.doc.length));for(;!s.next().done;)i(s.value.from,s.value.to)}}const Xa=at.define(),mp=at.define(),Qs=kr.define({create(n){return new Jd(gf(n).create(),null)},update(n,e){for(let t of e.effects)t.is(Xa)?n=new Jd(t.value.create(),n.panel):t.is(mp)&&(n=new Jd(n.query,t.value?gp:null));return n},provide:n=>l0.from(n,e=>e.panel)});class Jd{constructor(e,t){this.query=e,this.panel=t}}const CQ=Ie.mark({class:"cm-searchMatch"}),MQ=Ie.mark({class:"cm-searchMatch cm-searchMatch-selected"}),TQ=cr.fromClass(class{constructor(n){this.view=n,this.decorations=this.highlight(n.state.field(Qs))}update(n){let e=n.state.field(Qs);(e!=n.startState.field(Qs)||n.docChanged||n.selectionSet||n.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:n,panel:e}){if(!e||!n.spec.valid)return Ie.none;let{view:t}=this,r=new ol;for(let i=0,s=t.visibleRanges,o=s.length;i<o;i++){let{from:c,to:u}=s[i];for(;i<o-1&&u>s[i+1].from-500;)u=s[++i].to;n.highlight(t.state,c,u,(f,p)=>{let O=t.state.selection.ranges.some(y=>y.from==f&&y.to==p);r.add(f,p,O?MQ:CQ)})}return r.finish()}},{decorations:n=>n.decorations});function qa(n){return e=>{let t=e.state.field(Qs,!1);return t&&t.query.spec.valid?n(e,t):nx(e)}}const g0=qa((n,{query:e})=>{let{to:t}=n.state.selection.main,r=e.nextMatch(n.state,t,t);if(!r)return!1;let i=ue.single(r.from,r.to),s=n.state.facet(bo);return n.dispatch({selection:i,effects:[Op(n,r),s.scrollToMatch(i.main,n)],userEvent:"select.search"}),tx(n),!0}),O0=qa((n,{query:e})=>{let{state:t}=n,{from:r}=t.selection.main,i=e.prevMatch(t,r,r);if(!i)return!1;let s=ue.single(i.from,i.to),o=n.state.facet(bo);return n.dispatch({selection:s,effects:[Op(n,i),o.scrollToMatch(s.main,n)],userEvent:"select.search"}),tx(n),!0}),EQ=qa((n,{query:e})=>{let t=e.matchAll(n.state,1e3);return!t||!t.length?!1:(n.dispatch({selection:ue.create(t.map(r=>ue.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),ZQ=({state:n,dispatch:e})=>{let t=n.selection;if(t.ranges.length>1||t.main.empty)return!1;let{from:r,to:i}=t.main,s=[],o=0;for(let c=new po(n.doc,n.sliceDoc(r,i));!c.next().done;){if(s.length>1e3)return!1;c.value.from==r&&(o=s.length),s.push(ue.range(c.value.from,c.value.to))}return e(n.update({selection:ue.create(s,o),userEvent:"select.search.matches"})),!0},i8=qa((n,{query:e})=>{let{state:t}=n,{from:r,to:i}=t.selection.main;if(t.readOnly)return!1;let s=e.nextMatch(t,r,r);if(!s)return!1;let o=s,c=[],u,f,p=[];o.from==r&&o.to==i&&(f=t.toText(e.getReplacement(o)),c.push({from:o.from,to:o.to,insert:f}),o=e.nextMatch(t,o.from,o.to),p.push(Me.announce.of(t.phrase("replaced match on line $",t.doc.lineAt(r).number)+".")));let O=n.state.changes(c);return o&&(u=ue.single(o.from,o.to).map(O),p.push(Op(n,o)),p.push(t.facet(bo).scrollToMatch(u.main,n))),n.dispatch({changes:O,selection:u,effects:p,userEvent:"input.replace"}),!0}),jQ=qa((n,{query:e})=>{if(n.state.readOnly)return!1;let t=e.matchAll(n.state,1e9).map(i=>{let{from:s,to:o}=i;return{from:s,to:o,insert:e.getReplacement(i)}});if(!t.length)return!1;let r=n.state.phrase("replaced $ matches",t.length)+".";return n.dispatch({changes:t,effects:Me.announce.of(r),userEvent:"input.replace.all"}),!0});function gp(n){return n.state.facet(bo).createPanel(n)}function gf(n,e){var t,r,i,s,o;let c=n.selection.main,u=c.empty||c.to>c.from+100?"":n.sliceDoc(c.from,c.to);if(e&&!u)return e;let f=n.facet(bo);return new K3({search:((t=e==null?void 0:e.literal)!==null&&t!==void 0?t:f.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:f.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:f.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:f.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:f.wholeWord})}function ex(n){let e=_5(n,gp);return e&&e.dom.querySelector("[main-field]")}function tx(n){let e=ex(n);e&&e==n.root.activeElement&&e.select()}const nx=n=>{let e=n.state.field(Qs,!1);if(e&&e.panel){let t=ex(n);if(t&&t!=n.root.activeElement){let r=gf(n.state,e.query.spec);r.valid&&n.dispatch({effects:Xa.of(r)}),t.focus(),t.select()}}else n.dispatch({effects:[mp.of(!0),e?Xa.of(gf(n.state,e.query.spec)):at.appendConfig.of(NQ)]});return!0},rx=n=>{let e=n.state.field(Qs,!1);if(!e||!e.panel)return!1;let t=_5(n,gp);return t&&t.dom.contains(n.root.activeElement)&&n.focus(),n.dispatch({effects:mp.of(!1)}),!0},RQ=[{key:"Mod-f",run:nx,scope:"editor search-panel"},{key:"F3",run:g0,shift:O0,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:g0,shift:O0,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:rx,scope:"editor search-panel"},{key:"Mod-Shift-l",run:ZQ},{key:"Mod-Alt-g",run:dQ},{key:"Mod-d",run:SQ,preventDefault:!0}];class VQ{constructor(e){this.view=e;let t=this.query=e.state.field(Qs).query.spec;this.commit=this.commit.bind(this),this.searchField=dn("input",{value:t.search,placeholder:yr(e,"Find"),"aria-label":yr(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=dn("input",{value:t.replace,placeholder:yr(e,"Replace"),"aria-label":yr(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=dn("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=dn("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=dn("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit});function r(i,s,o){return dn("button",{class:"cm-button",name:i,onclick:s,type:"button"},o)}this.dom=dn("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>g0(e),[yr(e,"next")]),r("prev",()=>O0(e),[yr(e,"previous")]),r("select",()=>EQ(e),[yr(e,"all")]),dn("label",null,[this.caseField,yr(e,"match case")]),dn("label",null,[this.reField,yr(e,"regexp")]),dn("label",null,[this.wordField,yr(e,"by word")]),...e.state.readOnly?[]:[dn("br"),this.replaceField,r("replace",()=>i8(e),[yr(e,"replace")]),r("replaceAll",()=>jQ(e),[yr(e,"replace all")])],dn("button",{name:"close",onclick:()=>rx(e),"aria-label":yr(e,"close"),type:"button"},["×"])])}commit(){let e=new K3({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:Xa.of(e)}))}keydown(e){qk(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?O0:g0)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),i8(this.view))}update(e){for(let t of e.transactions)for(let r of t.effects)r.is(Xa)&&!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(bo).top}}function yr(n,e){return n.state.phrase(e)}const yu=30,vu=/[\s\.,:;?!]/;function Op(n,{from:e,to:t}){let r=n.state.doc.lineAt(e),i=n.state.doc.lineAt(t).to,s=Math.max(r.from,e-yu),o=Math.min(i,t+yu),c=n.state.sliceDoc(s,o);if(s!=r.from){for(let u=0;u<yu;u++)if(!vu.test(c[u+1])&&vu.test(c[u])){c=c.slice(u);break}}if(o!=i){for(let u=c.length-1;u>c.length-yu;u--)if(!vu.test(c[u-1])&&vu.test(c[u])){c=c.slice(0,u);break}}return Me.announce.of(`${n.state.phrase("current match")}. ${c} ${n.state.phrase("on line")} ${r.number}.`)}const LQ=Me.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"}}),NQ=[Qs,Ia.low(TQ),LQ],XQ="#e5c07b",s8="#e06c75",_Q="#56b6c2",DQ="#ffffff",zu="#abb2bf",Of="#7d8799",zQ="#61afef",IQ="#98c379",l8="#d19a66",FQ="#c678dd",HQ="#21252b",o8="#2c313a",a8="#282c34",eh="#353a42",WQ="#3E4451",c8="#528bff",BQ=Me.theme({"&":{color:zu,backgroundColor:a8},".cm-content":{caretColor:c8},".cm-cursor, .cm-dropCursor":{borderLeftColor:c8},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:WQ},".cm-panels":{backgroundColor:HQ,color:zu},".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:a8,color:Of,border:"none"},".cm-activeLineGutter":{backgroundColor:o8},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:eh},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:eh,borderBottomColor:eh},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:o8,color:zu}}},{dark:!0}),YQ=_0.define([{tag:X.keyword,color:FQ},{tag:[X.name,X.deleted,X.character,X.propertyName,X.macroName],color:s8},{tag:[X.function(X.variableName),X.labelName],color:zQ},{tag:[X.color,X.constant(X.name),X.standard(X.name)],color:l8},{tag:[X.definition(X.name),X.separator],color:zu},{tag:[X.typeName,X.className,X.number,X.changed,X.annotation,X.modifier,X.self,X.namespace],color:XQ},{tag:[X.operator,X.operatorKeyword,X.url,X.escape,X.regexp,X.link,X.special(X.string)],color:_Q},{tag:[X.meta,X.comment],color:Of},{tag:X.strong,fontWeight:"bold"},{tag:X.emphasis,fontStyle:"italic"},{tag:X.strikethrough,textDecoration:"line-through"},{tag:X.link,color:Of,textDecoration:"underline"},{tag:X.heading,fontWeight:"bold",color:s8},{tag:[X.atom,X.bool,X.special(X.variableName)],color:l8},{tag:[X.processingInstruction,X.string,X.inserted],color:IQ},{tag:X.invalid,color:DQ}]),qQ=[BQ,a$(YQ)];var u8={};class x0{constructor(e,t,r,i,s,o,c,u,f,p=0,O){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=c,this.bufferBase=u,this.curContext=f,this.lookAhead=p,this.parent=O}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new x0(e,[],t,r,r,0,[],0,i?new d8(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=s.dynamicPrecedence(i);if(c&&(this.score+=c),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let u=this.stack.length-(r-1)*3-(e&262144?6:0),f=u?this.stack[u-2]:this.p.ranges[0].from,p=this.reducePos-f;p>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(f==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=p):this.p.lastBigReductionSize<p&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=f,this.p.lastBigReductionSize=p));let O=u?this.stack[u-1]:0,y=this.bufferBase+this.buffer.length-O;if(i<s.minRepeatTerm||e&131072){let v=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,f,v,y+4,!0)}if(e&262144)this.state=this.stack[u];else{let v=this.stack[u-3];this.state=s.getGoto(v,i,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(i,f)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,c=this.buffer.length;if(c==0&&o.parent&&(c=o.bufferBase-o.parent.bufferBase,o=o.parent),c>0&&o.buffer[c-4]==0&&o.buffer[c-1]>-1){if(t==r)return;if(o.buffer[c-2]>=t){o.buffer[c-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,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 u=o;u>0&&this.buffer[u-2]>r;u-=4)if(this.buffer[u-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]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let c=o.stateFlag(s,1);!c&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,c?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){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(t,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,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new x0(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new UQ(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((c,u)=>u&1&&c==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let c=(o>>19)-s;if(c>1){let u=o&65535,f=this.stack.length-c*3;if(f>=0&&e.getGoto(this.stack[f],u,!1)>=0)return c<<19|65536|u}}else{let c=r(o,s+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 t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}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 t=new d8(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}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 d8{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class UQ{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=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],t,!0);this.state=i}}class y0{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new y0(e,t,t-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 y0(this.stack,this.pos,this.index)}}function da(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),c=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let u=o-32;if(u>=46&&(u-=46,c=!0),s+=u,c)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class Iu{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const h8=new Iu;class GQ{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=h8,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,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,t=0){let r=t?this.resolveOffset(t,-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,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>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,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=h8,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,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class so{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;ix(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}so.prototype.contextual=so.prototype.fallback=so.prototype.extend=!1;class v0{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?da(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(ix(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}v0.prototype.contextual=so.prototype.fallback=so.prototype.extend=!1;class $r{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function ix(n,e,t,r,i,s){let o=0,c=1<<r,{dialect:u}=t.p.parser;e:for(;(c&n[o])!=0;){let f=n[o+1];for(let v=o+3;v<f;v+=2)if((n[v+1]&c)>0){let S=n[v];if(u.allows(S)&&(e.token.value==-1||e.token.value==S||KQ(S,e.token.value,i,s))){e.acceptToken(S);break}}let p=e.next,O=0,y=n[o+2];if(e.next<0&&y>O&&n[f+y*3-3]==65535){o=n[f+y*3-1];continue e}for(;O<y;){let v=O+y>>1,S=f+v+(v<<1),b=n[S],P=n[S+1]||65536;if(p<b)y=v;else if(p>=P)O=v+1;else{o=n[S+2],e.advance();continue e}}break}}function f8(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function KQ(n,e,t,r){let i=f8(t,r,e);return i<0||f8(t,r,n)<i}const vr=typeof process<"u"&&u8&&/\bparse\b/.test(u8.LOG);let th=null;function p8(n,e,t){let r=n.cursor(mt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}class JQ{constructor(e,t){this.fragments=e,this.nodeSet=t,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?p8(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?p8(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 t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof jt){if(o==e){if(o<this.safeFrom)return null;let c=o+s.length;if(c<=this.safeTo){let u=s.prop(Ye.lookAhead);if(!u||c+u<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}}class eA{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new Iu)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,u=0;for(let f=0;f<s.length;f++){if((1<<f&o)==0)continue;let p=s[f],O=this.tokens[f];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&&(u=Math.max(O.lookAhead,u)),O.value!=0)){let y=t;if(O.extended>-1&&(t=this.addActions(e,O.extended,O.end,t)),t=this.addActions(e,O.value,O.end,t),!p.extend&&(r=O,t>y))break}}for(;this.actions.length>t;)this.actions.pop();return u&&e.setLookAhead(u),!r&&e.pos==this.stream.end&&(r=new Iu,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new Iu,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let c=s.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,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:c}=o;for(let u=0;u<2;u++)for(let f=o.stateSlot(s,u?2:1);;f+=3){if(c[f]==65535)if(c[f+1]==1)f=Hi(c,f+2);else{i==0&&c[f+1]==2&&(i=this.putAction(Hi(c,f+2),t,r,i));break}c[f]==t&&(i=this.putAction(Hi(c,f+1),t,r,i))}return i}}class tA{constructor(e,t,r,i){this.parser=e,this.input=t,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 GQ(t,i),this.tokens=new eA(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[x0.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new JQ(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;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>t)r.push(c);else{if(this.advanceStack(c,r,e))continue;{i||(i=[],s=[]),i.push(c);let u=this.tokens.getMainToken(c);s.push(u.value,u.end)}}break}}if(!r.length){let o=i&&rA(i);if(o)return vr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw vr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return vr&&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,u)=>u.score-c.score);r.length>o;)r.pop();r.some(c=>c.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let c=r[o];for(let u=o+1;u<r.length;u++){let f=r[u];if(c.sameState(f)||c.buffer.length>500&&f.buffer.length>500)if((c.score-f.score||c.buffer.length-f.buffer.length)>0)r.splice(u--,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,t,r){let i=e.pos,{parser:s}=this,o=vr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let f=e.curContext&&e.curContext.tracker.strict,p=f?e.curContext.hash:0;for(let O=this.fragments.nodeAt(i);O;){let y=this.parser.nodeSet.types[O.type.id]==O.type?s.getGoto(e.state,O.type.id):-1;if(y>-1&&O.length&&(!f||(O.prop(Ye.contextHash)||0)==p))return e.useNode(O,y),vr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(O.type.id)})`),!0;if(!(O instanceof jt)||O.children.length==0||O.positions[0]>0)break;let v=O.children[0];if(v instanceof jt&&O.positions[0]==0)O=v;else break}}let c=s.stateSlot(e.state,4);if(c>0)return e.reduce(c),vr&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let f=0;f<u.length;){let p=u[f++],O=u[f++],y=u[f++],v=f==u.length||!r,S=v?e:e.split(),b=this.tokens.mainToken;if(S.apply(p,O,b?b.start:S.pos,y),vr&&console.log(o+this.stackID(S)+` (via ${(p&65536)==0?"shift":`reduce of ${s.getName(p&65535)}`} for ${s.getName(O)} @ ${i}${S==e?"":", split"})`),v)return!0;S.pos>i?t.push(S):r.push(S)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return m8(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let c=e[o],u=t[o<<1],f=t[(o<<1)+1],p=vr?this.stackID(c)+" -> ":"";if(c.deadEnd&&(s||(s=!0,c.restart(),vr&&console.log(p+this.stackID(c)+" (restarted)"),this.advanceFully(c,r))))continue;let O=c.split(),y=p;for(let v=0;v<10&&O.forceReduce()&&(vr&&console.log(y+this.stackID(O)+" (via force-reduce)"),!this.advanceFully(O,r));v++)vr&&(y=this.stackID(O)+" -> ");for(let v of c.recoverByInsert(u))vr&&console.log(p+this.stackID(v)+" (via recover-insert)"),this.advanceFully(v,r);this.stream.end>c.pos?(f==c.pos&&(f++,u=0),c.recoverByDelete(u,f),vr&&console.log(p+this.stackID(c)+` (via recover-delete ${this.parser.getName(u)})`),m8(c,r)):(!i||i.score<O.score)&&(i=O)}return i}stackToTree(e){return e.close(),jt.build({buffer:y0.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 t=(th||(th=new WeakMap)).get(e);return t||th.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function m8(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class nA{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const nh=n=>n;class sx{constructor(e){this.start=e.start,this.shift=e.shift||nh,this.reduce=e.reduce||nh,this.reuse=e.reuse||nh,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class mo extends G5{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let c=0;c<e.repeatNodeCount;c++)t.push("");let r=Object.keys(e.topRules).map(c=>e.topRules[c][1]),i=[];for(let c=0;c<t.length;c++)i.push([]);function s(c,u,f){i[c].push([u,u.deserialize(String(f))])}if(e.nodeProps)for(let c of e.nodeProps){let u=c[0];typeof u=="string"&&(u=Ye[u]);for(let f=1;f<c.length;){let p=c[f++];if(p>=0)s(p,u,c[f++]);else{let O=c[f+-p];for(let y=-p;y>0;y--)s(c[f++],u,O);f++}}}this.nodeSet=new Kf(t.map((c,u)=>Fn.define({name:u>=this.minRepeatTerm?void 0:c,id:u,props:i[u],top:r.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=W5;let o=da(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(g8),this.states=da(e.states,Uint32Array),this.data=da(e.stateData),this.goto=da(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new so(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,t,r){let i=new tA(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],c=o&1,u=i[s++];if(c&&r)return u;for(let f=s+(o>>1);s<f;s++)if(i[s]==e)return u;if(c)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Hi(r,s+2)];else{if(r[s+1]==2)return Hi(r,s+2);break}if(o==t||o==0)return Hi(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Hi(this.data,s+2);else break;i=t(Hi(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Hi(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(mo.prototype),this);if(e.props&&(t.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}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(c=>c.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=g8(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}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 t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],c;(c=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[c]=1;return new nA(e,r,i)}static deserialize(e){return new mo(e)}}function Hi(n,e){return n[e]|n[e+1]<<16}function rA(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function g8(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const iA=55,sA=1,lA=56,oA=2,aA=57,cA=3,O8=4,uA=5,xp=6,lx=7,ox=8,ax=9,cx=10,dA=11,hA=12,fA=13,rh=58,pA=14,mA=15,x8=59,ux=21,gA=23,dx=24,OA=25,xf=27,hx=28,xA=29,yA=32,vA=35,wA=37,SA=38,bA=0,kA=1,$A={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},PA={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},y8={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 QA(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let v8=null,w8=null,S8=0;function yf(n,e){let t=n.pos+e;if(S8==t&&w8==n)return v8;let r=n.peek(e),i="";for(;QA(r);)i+=String.fromCharCode(r),r=n.peek(++e);return w8=n,S8=t,v8=i?i.toLowerCase():r==AA||r==CA?void 0:null}const fx=60,w0=62,yp=47,AA=63,CA=33,MA=45;function b8(n,e){this.name=n,this.parent=e}const TA=[xp,cx,lx,ox,ax],EA=new sx({start:null,shift(n,e,t,r){return TA.indexOf(e)>-1?new b8(yf(r,1)||"",n):n},reduce(n,e){return e==ux&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==xp||i==wA?new b8(yf(r,1)||"",n):n},strict:!1}),ZA=new $r((n,e)=>{if(n.next!=fx){n.next<0&&e.context&&n.acceptToken(rh);return}n.advance();let t=n.next==yp;t&&n.advance();let r=yf(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?mA:pA);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(dA);if(i&&PA[i])return n.acceptToken(rh,-2);if(e.dialectEnabled(bA))return n.acceptToken(hA);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(fA)}else{if(r=="script")return n.acceptToken(lx);if(r=="style")return n.acceptToken(ox);if(r=="textarea")return n.acceptToken(ax);if($A.hasOwnProperty(r))return n.acceptToken(cx);i&&y8[i]&&y8[i][r]?n.acceptToken(rh,-1):n.acceptToken(xp)}},{contextual:!0}),jA=new $r(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(x8);break}if(n.next==MA)e++;else if(n.next==w0&&e>=2){t>=3&&n.acceptToken(x8,-2);break}else e=0;n.advance()}});function RA(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const VA=new $r((n,e)=>{if(n.next==yp&&n.peek(1)==w0){let t=e.dialectEnabled(kA)||RA(e.context);n.acceptToken(t?uA:O8,2)}else n.next==w0&&n.acceptToken(O8,1)});function vp(n,e,t){let r=2+n.length;return new $r(i=>{for(let s=0,o=0,c=0;;c++){if(i.next<0){c&&i.acceptToken(e);break}if(s==0&&i.next==fx||s==1&&i.next==yp||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==w0){c>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&c){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const LA=vp("script",iA,sA),NA=vp("style",lA,oA),XA=vp("textarea",aA,cA),_A=R0({"Text RawText IncompleteTag IncompleteCloseTag":X.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":X.angleBracket,TagName:X.tagName,"MismatchedCloseTag/TagName":[X.tagName,X.invalid],AttributeName:X.attributeName,"AttributeValue UnquotedAttributeValue":X.attributeValue,Is:X.definitionOperator,"EntityReference CharacterReference":X.character,Comment:X.blockComment,ProcessingInst:X.processingInstruction,DoctypeDecl:X.documentMeta}),DA=mo.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7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PPPPPPPP!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:EA,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:[_A],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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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:[LA,NA,XA,VA,ZA,jA,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function px(n,e){let t=Object.create(null);for(let r of n.getChildren(dx)){let i=r.getChild(OA),s=r.getChild(xf)||r.getChild(hx);i&&(t[e.read(i.from,i.to)]=s?s.type.id==xf?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function k8(n,e){let t=n.getChild(gA);return t?e.read(t.from,t.to):" "}function ih(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=px(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function mx(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let c of n)(c.tag=="script"?t:c.tag=="style"?r:c.tag=="textarea"?i:s).push(c);let o=e.length?Object.create(null):null;for(let c of e)(o[c.name]||(o[c.name]=[])).push(c);return b9((c,u)=>{let f=c.type.id;if(f==xA)return ih(c,u,t);if(f==yA)return ih(c,u,r);if(f==vA)return ih(c,u,i);if(f==ux&&s.length){let p=c.node,O=p.firstChild,y=O&&k8(O,u),v;if(y){for(let S of s)if(S.tag==y&&(!S.attrs||S.attrs(v||(v=px(O,u))))){let b=p.lastChild,P=b.type.id==SA?b.from:p.to;if(P>O.to)return{parser:S.parser,overlay:[{from:O.to,to:P}]}}}}if(o&&f==dx){let p=c.node,O;if(O=p.firstChild){let y=o[u.read(O.from,O.to)];if(y)for(let v of y){if(v.tagName&&v.tagName!=k8(p.parent,u))continue;let S=p.lastChild;if(S.type.id==xf){let b=S.from+1,P=S.lastChild,A=S.to-(P&&P.isError?0:1);if(A>b)return{parser:v.parser,overlay:[{from:b,to:A}],bracketed:!0}}else if(S.type.id==hx)return{parser:v.parser,overlay:[{from:S.from,to:S.to}]}}}}return null})}const zA=132,$8=1,IA=133,FA=134,gx=2,HA=135,WA=3,BA=4,Ox=[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],YA=58,qA=40,xx=95,UA=91,Fu=45,GA=46,KA=35,JA=37,eC=38,tC=92,nC=10,rC=42;function _a(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function wp(n){return n>=48&&n<=57}function P8(n){return wp(n)||n>=97&&n<=102||n>=65&&n<=70}const yx=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,c=0;;c++){let{next:u}=r;if(_a(u)||u==Fu||u==xx||s&&wp(u))!s&&(u!=Fu||c>0)&&(s=!0),o===c&&u==Fu&&o++,r.advance();else if(u==tC&&r.peek(1)!=nC){if(r.advance(),P8(r.next)){do r.advance();while(P8(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(gx)?e:u==qA?t:n);break}}},iC=new $r(yx(IA,gx,FA),{contextual:!0}),sC=new $r(yx(HA,WA,BA),{contextual:!0}),lC=new $r(n=>{if(Ox.includes(n.peek(-1))){let{next:e}=n;(_a(e)||e==xx||e==KA||e==GA||e==rC||e==UA||e==YA&&_a(n.peek(1))||e==Fu||e==eC)&&n.acceptToken(zA)}}),oC=new $r(n=>{if(!Ox.includes(n.peek(-1))){let{next:e}=n;if(e==JA&&(n.advance(),n.acceptToken($8)),_a(e)){do n.advance();while(_a(n.next)||wp(n.next));n.acceptToken($8)}}}),aC=R0({"AtKeyword import charset namespace keyframes media supports font-feature-values":X.definitionKeyword,"from to selector scope MatchFlag":X.keyword,NamespaceName:X.namespace,KeyframeName:X.labelName,KeyframeRangeName:X.operatorKeyword,TagName:X.tagName,ClassName:X.className,PseudoClassName:X.constant(X.className),IdName:X.labelName,"FeatureName PropertyName":X.propertyName,AttributeName:X.attributeName,NumberLiteral:X.number,KeywordQuery:X.keyword,UnaryQueryOp:X.operatorKeyword,"CallTag ValueName FontName":X.atom,VariableName:X.variableName,Callee:X.operatorKeyword,Unit:X.unit,"UniversalSelector NestingSelector":X.definitionOperator,"MatchOp CompareOp":X.compareOperator,"ChildOp SiblingOp, LogicOp":X.logicOperator,BinOp:X.arithmeticOperator,Important:X.modifier,Comment:X.blockComment,ColorLiteral:X.color,"ParenthesizedContent StringLiteral":X.string,":":X.punctuation,"PseudoOp #":X.derefOperator,"; , |":X.separator,"( )":X.paren,"[ ]":X.squareBracket,"{ }":X.brace}),cC={__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},uC={__proto__:null,or:104,and:104,not:112,only:112,layer:180},dC={__proto__:null,selector:118,layer:176},hC={__proto__:null,"@import":172,"@media":184,"@charset":188,"@namespace":192,"@keyframes":198,"@supports":210,"@scope":214,"@font-feature-values":220},fC={__proto__:null,to:217},pC=mo.deserialize({version:14,states:"HhQYQdOOO#wQdOOP$OO`OOO$xQaO'#CfOOQP'#Ce'#CeO%PQ`O'#CgO%UQdO'#CkO%uQaO'#CcO&PQdO'#CnO&[QdO'#DtO&aQdO'#DvO&fQdO'#DzO&fQdO'#D}OOQP'#Fa'#FaO'rQhO'#EpOOQS'#F`'#F`OOQS'#Es'#EsQYQdOOO'yQdO'#ETO)VQhO'#EZO'yQdO'#E]O)^QdO'#E_O)iQdO'#EbO(nQhO'#EhO)qQdO'#EjO)|QdO'#EmO*RQaO'#CfO*YQ`O'#EQO*_Q`O'#FkO*jQdO'#FkQOQ`OOP*tO&jO'#CaPOOO)CAO)CAOO+PQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO%UQdO,59VO+UQdO,59YO&[QdO,5:`O&aQdO,5:bO&fQdO,5:fO&fQdO,5:hO&fQdO,5:iO&fQdO'#EzO+aQ`O,58}O+iQdO'#EPOOQS,58},58}OOQP'#Cq'#CqOOQO'#Dr'#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mQ%e$XS%{$q%}Q&R$|Q&t%|R'X&g]$P!g!h!i$Q$S$UQ!^^U!rc!k$]Q!zgQ#p!]S#s!^#vQ#x!_Q%X#tQ%Y#uQ%^#yS%i$_%kQ%n$bR'Q&`Q#r!]Q&_%VR'a'PR%`#yR%P#jQnPR#i}Q!scQ$[!kR%h$]",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 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:156,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[aC],skippedNodes:[0,5,114],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!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{<%lO%jbEoU!e`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!e`Oy%jz#c%j#c#dFj#d;'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$`Q!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$UQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!rQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[lC,oC,iC,sC,1,2,3,4,new v0("m~RRYZ[z{a~~g~aO$Q~~dP!P!Qg~lO$R~~",28,139)],topRules:{StyleSheet:[0,6],Styles:[1,113]},dynamicPrecedences:{81:1},specialized:[{term:134,get:n=>cC[n]||-1},{term:135,get:n=>uC[n]||-1},{term:4,get:n=>dC[n]||-1},{term:28,get:n=>hC[n]||-1},{term:133,get:n=>fC[n]||-1}],tokenPrec:2182});let sh=null;function lh(){if(!sh&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));sh=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return sh||[]}const Q8=["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(n=>({type:"class",label:n})),A8=["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(n=>({type:"keyword",label:n})).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(n=>({type:"constant",label:n}))),mC=["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(n=>({type:"type",label:n})),gC=["@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(n=>({type:"keyword",label:n})),zi=/^(\w[\w-]*|-\w[\w-]*|)$/,OC=/^-(-[\w-]*)?$/;function xC(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const C8=new U5,yC=["Declaration"];function vC(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function vx(n,e,t){if(e.to-e.from>4096){let r=C8.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(mt.IncludeAnonymous);if(o.firstChild())do for(let c of vx(n,o.node,t))s.has(c.label)||(s.add(c.label),i.push(c));while(o.nextSibling());return C8.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(yC)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let c=n.sliceString(s.from,s.to);i.has(c)||(i.add(c),r.push({label:c,type:"variable"}))}}),r}}const wC=n=>e=>{let{state:t,pos:r}=e,i=Ht(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:lh(),validFor:zi};if(i.name=="ValueName")return{from:i.from,options:A8,validFor:zi};if(i.name=="PseudoClassName")return{from:i.from,options:Q8,validFor:zi};if(n(i)||(e.explicit||s)&&xC(i,t.doc))return{from:n(i)||s?i.from:r,options:vx(t.doc,vC(i),n),validFor:OC};if(i.name=="TagName"){for(let{parent:u}=i;u;u=u.parent)if(u.name=="Block")return{from:i.from,options:lh(),validFor:zi};return{from:i.from,options:mC,validFor:zi}}if(i.name=="AtKeyword")return{from:i.from,options:gC,validFor:zi};if(!e.explicit)return null;let o=i.resolve(r),c=o.childBefore(r);return c&&c.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:Q8,validFor:zi}:c&&c.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:A8,validFor:zi}:o.name=="Block"||o.name=="Styles"?{from:r,options:lh(),validFor:zi}:null},SC=wC(n=>n.name=="VariableName"),S0=ho.define({name:"css",parser:pC.configure({props:[N0.add({Declaration:Du()}),X0.add({"Block KeyframeList":i3})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function wx(){return new rp(S0,S0.data.of({autocomplete:SC}))}const bC=316,kC=317,M8=1,$C=2,PC=3,QC=4,AC=318,CC=320,MC=321,TC=5,EC=6,ZC=0,vf=[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],Sx=125,jC=59,wf=47,RC=42,VC=43,LC=45,NC=60,XC=44,_C=63,DC=46,zC=91,IC=new sx({start:!1,shift(n,e){return e==TC||e==EC||e==CC?n:e==MC},strict:!1}),FC=new $r((n,e)=>{let{next:t}=n;(t==Sx||t==-1||e.context)&&n.acceptToken(AC)},{contextual:!0,fallback:!0}),HC=new $r((n,e)=>{let{next:t}=n,r;vf.indexOf(t)>-1||t==wf&&((r=n.peek(1))==wf||r==RC)||t!=Sx&&t!=jC&&t!=-1&&!e.context&&n.acceptToken(bC)},{contextual:!0}),WC=new $r((n,e)=>{n.next==zC&&!e.context&&n.acceptToken(kC)},{contextual:!0}),BC=new $r((n,e)=>{let{next:t}=n;if(t==VC||t==LC){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(M8);n.acceptToken(r?M8:$C)}}else t==_C&&n.peek(1)==DC&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(PC))},{contextual:!0});function oh(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const YC=new $r((n,e)=>{if(n.next!=NC||!e.dialectEnabled(ZC)||(n.advance(),n.next==wf))return;let t=0;for(;vf.indexOf(n.next)>-1;)n.advance(),t++;if(oh(n.next,!0)){for(n.advance(),t++;oh(n.next,!1);)n.advance(),t++;for(;vf.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==XC)return;for(let r=0;;r++){if(r==7){if(!oh(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(QC,-t)}),qC=R0({"get set async static":X.modifier,"for while do if else switch try catch finally return throw break continue default case defer":X.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":X.operatorKeyword,"let var const using function class extends":X.definitionKeyword,"import export from":X.moduleKeyword,"with debugger new":X.keyword,TemplateString:X.special(X.string),super:X.atom,BooleanLiteral:X.bool,this:X.self,null:X.null,Star:X.modifier,VariableName:X.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":X.function(X.variableName),VariableDefinition:X.definition(X.variableName),Label:X.labelName,PropertyName:X.propertyName,PrivatePropertyName:X.special(X.propertyName),"CallExpression/MemberExpression/PropertyName":X.function(X.propertyName),"FunctionDeclaration/VariableDefinition":X.function(X.definition(X.variableName)),"ClassDeclaration/VariableDefinition":X.definition(X.className),"NewExpression/VariableName":X.className,PropertyDefinition:X.definition(X.propertyName),PrivatePropertyDefinition:X.definition(X.special(X.propertyName)),UpdateOp:X.updateOperator,"LineComment Hashbang":X.lineComment,BlockComment:X.blockComment,Number:X.number,String:X.string,Escape:X.escape,ArithOp:X.arithmeticOperator,LogicOp:X.logicOperator,BitOp:X.bitwiseOperator,CompareOp:X.compareOperator,RegExp:X.regexp,Equals:X.definitionOperator,Arrow:X.function(X.punctuation),": Spread":X.punctuation,"( )":X.paren,"[ ]":X.squareBracket,"{ }":X.brace,"InterpolationStart InterpolationEnd":X.special(X.brace),".":X.derefOperator,", ;":X.separator,"@":X.meta,TypeName:X.typeName,TypeDefinition:X.definition(X.typeName),"type enum interface implements namespace module declare":X.definitionKeyword,"abstract global Privacy readonly override":X.modifier,"is keyof unique infer asserts":X.operatorKeyword,JSXAttributeValue:X.attributeValue,JSXText:X.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":X.angleBracket,"JSXIdentifier JSXNameSpacedName":X.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":X.attributeName,"JSXBuiltin/JSXIdentifier":X.standard(X.tagName)}),UC={__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},GC={__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},KC={__proto__:null,"<":193},JC=mo.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`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&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:IC,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:[qC],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#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!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$i&j(Wp(Z!b'}0/l$]#t(T,2j(e$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[HC,WC,BC,YC,2,3,4,5,6,7,8,9,10,11,12,13,14,FC,new v0("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOx~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!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 v0("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:n=>UC[n]||-1},{term:343,get:n=>GC[n]||-1},{term:95,get:n=>KC[n]||-1}],tokenPrec:15201}),bx=[rr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),rr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),rr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),rr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),rr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),rr(`try {
65
- \${}
66
- } catch (\${error}) {
67
- \${}
68
- }`,{label:"try",detail:"/ catch block",type:"keyword"}),rr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),rr(`if (\${}) {
69
- \${}
70
- } else {
71
- \${}
72
- }`,{label:"if",detail:"/ else block",type:"keyword"}),rr(`class \${name} {
73
- constructor(\${params}) {
74
- \${}
75
- }
76
- }`,{label:"class",detail:"definition",type:"keyword"}),rr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),rr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],eM=bx.concat([rr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),rr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),rr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),T8=new U5,kx=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function la(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const tM=["FunctionDeclaration"],nM={FunctionDeclaration:la("function"),ClassDeclaration:la("class"),ClassExpression:()=>!0,EnumDeclaration:la("constant"),TypeAliasDeclaration:la("type"),NamespaceDeclaration:la("namespace"),VariableDefinition(n,e){n.matchContext(tM)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function $x(n,e){let t=T8.get(e);if(t)return t;let r=[],i=!0;function s(o,c){let u=n.sliceString(o.from,o.to);r.push({label:u,type:c})}return e.cursor(mt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let c=nM[o.name];if(c&&c(o,s)||kx.has(o.name))return!1}else if(o.to-o.from>8192){for(let c of $x(n,o.node))r.push(c);return!1}}),T8.set(e,r),r}const E8=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Px=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function rM(n){let e=Ht(n.state).resolveInner(n.pos,-1);if(Px.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&E8.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)kx.has(i.name)&&(r=r.concat($x(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:E8}}const Ai=ho.define({name:"javascript",parser:JC.configure({props:[N0.add({IfStatement:Du({except:/^\s*({|else\b)/}),TryStatement:Du({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Y9,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:B9({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":Du({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),X0.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":i3,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,r=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:r.type.isError?n.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Qx={test:n=>/^JSX/.test(n.name),facet:e3({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Ax=Ai.configure({dialect:"ts"},"typescript"),Cx=Ai.configure({dialect:"jsx",props:[np.add(n=>n.isTop?[Qx]:void 0)]}),Mx=Ai.configure({dialect:"jsx ts",props:[np.add(n=>n.isTop?[Qx]:void 0)]},"typescript");let Tx=n=>({label:n,type:"keyword"});const Ex="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(Tx),iM=Ex.concat(["declare","implements","private","protected","public"].map(Tx));function Zx(n={}){let e=n.jsx?n.typescript?Mx:Cx:n.typescript?Ax:Ai,t=n.typescript?eM.concat(iM):bx.concat(Ex);return new rp(e,[Ai.data.of({autocomplete:XP(Px,NP(t))}),Ai.data.of({autocomplete:rM}),n.jsx?oM:[]])}function sM(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function Z8(n,e,t=n.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 n.sliceString(r.from,Math.min(r.to,t));return""}const lM=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),oM=Me.inputHandler.of((n,e,t,r,i)=>{if((lM?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Ai.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,c=o.changeByRange(u=>{var f;let{head:p}=u,O=Ht(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:u,changes:{from:p,insert:"</>"}};if(r=="/"&&O.name=="JSXStartCloseTag"){let v=O.parent,S=v.parent;if(S&&v.from==p-2&&((y=Z8(o.doc,S.firstChild,p))||((f=S.firstChild)===null||f===void 0?void 0:f.name)=="JSXFragmentTag")){let b=`${y}>`;return{range:ue.cursor(p+b.length,-1),changes:{from:p,insert:b}}}}else if(r==">"){let v=sM(O);if(v&&v.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(p,p+2))&&(y=Z8(o.doc,v,p)))return{range:u,changes:{from:p,insert:`</${y}>`}}}}return{range:u}});return c.changes.empty?!1:(n.dispatch([s,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),oa=["_blank","_self","_top","_parent"],ah=["ascii","utf-8","utf-16","latin1","latin1"],ch=["get","post","put","delete"],uh=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],wr=["true","false"],Re={},aM={a:{attrs:{href:null,ping:null,type:null,media:null,target:oa,hreflang:null}},abbr:Re,address:Re,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Re,aside:Re,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Re,base:{attrs:{href:null,target:oa}},bdi:Re,bdo:Re,blockquote:{attrs:{cite:null}},body:Re,br:Re,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:uh,formmethod:ch,formnovalidate:["novalidate"],formtarget:oa,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Re,center:Re,cite:Re,code:Re,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:Re,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Re,div:Re,dl:Re,dt:Re,em:Re,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Re,figure:Re,footer:Re,form:{attrs:{action:null,name:null,"accept-charset":ah,autocomplete:["on","off"],enctype:uh,method:ch,novalidate:["novalidate"],target:oa}},h1:Re,h2:Re,h3:Re,h4:Re,h5:Re,h6:Re,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Re,hgroup:Re,hr:Re,html:{attrs:{manifest:null}},i:Re,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:uh,formmethod:ch,formnovalidate:["novalidate"],formtarget:oa,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:Re,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Re,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:Re,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:ah,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:Re,noscript:Re,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:Re,param:{attrs:{name:null,value:null}},pre:Re,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Re,rt:Re,ruby:Re,samp:Re,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:ah}},section:Re,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Re,source:{attrs:{src:null,type:null,media:null}},span:Re,strong:Re,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Re,summary:Re,sup:Re,table:Re,tbody:Re,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Re,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:Re,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Re,time:{attrs:{datetime:null}},title:Re,tr:Re,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Re,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:Re},jx={accesskey:null,class:null,contenteditable:wr,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:wr,autocorrect:wr,autocapitalize:wr,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":wr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":wr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":wr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":wr,"aria-hidden":wr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":wr,"aria-multiselectable":wr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":wr,"aria-relevant":null,"aria-required":wr,"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},Rx="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(n=>"on"+n);for(let n of Rx)jx[n]=null;class b0{constructor(e,t){this.tags={...aM,...e},this.globalAttrs={...jx,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}b0.default=new b0;function go(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Oo(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function Vx(n,e,t){let r=t.tags[go(n,Oo(e))];return(r==null?void 0:r.children)||t.allTags}function Sp(n,e){let t=[];for(let r=Oo(e);r&&!r.type.isTop;r=Oo(r.parent)){let i=go(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const Lx=/^[:\-\.\w\u00b7-\uffff]*$/;function j8(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Oo(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:Vx(n.doc,o,e).map(c=>({label:c,type:"type"})).concat(Sp(n.doc,t).map((c,u)=>({label:"/"+c,apply:"/"+c+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function R8(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:Sp(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:Lx}}function cM(n,e,t,r){let i=[],s=0;for(let o of Vx(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of Sp(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function uM(n,e,t,r,i){let s=Oo(t),o=s?e.tags[go(n.doc,s)]:null,c=o&&o.attrs?Object.keys(o.attrs):[],u=o&&o.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:u.map(f=>({label:f,type:"property"})),validFor:Lx}}function dM(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),c=[],u;if(o){let f=n.sliceDoc(o.from,o.to),p=e.globalAttrs[f];if(!p){let O=Oo(t),y=O?e.tags[go(n.doc,O)]:null;p=(y==null?void 0:y.attrs)&&y.attrs[f]}if(p){let O=n.sliceDoc(r,i).toLowerCase(),y='"',v='"';/^['"]/.test(O)?(u=O[0]=='"'?/^[^"]*$/:/^[^']*$/,y="",v=n.sliceDoc(i,i+1)==O[0]?"":O[0],O=O.slice(1),r++):u=/^[^\s<>='"]*$/;for(let S of p)c.push({label:S,apply:y+S+v,type:"constant"})}}return{from:r,to:i,options:c,validFor:u}}function hM(n,e){let{state:t,pos:r}=e,i=Ht(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,c;s==i&&(c=i.childBefore(o));){let u=c.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=i=c,o=u.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?R8(t,i,i.from,r):j8(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?j8(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?R8(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?uM(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?dM(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?cM(t,n,i,r):null}function fM(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new b0(e,t):b0.default;return i=>hM(r,i)}const pM=Ai.parser.configure({top:"SingleExpression"}),Nx=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:Ax.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:Cx.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:Mx.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:pM},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:Ai.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:S0.parser}],Xx=[{name:"style",parser:S0.parser.configure({top:"Styles"})}].concat(Rx.map(n=>({name:n,parser:Ai.parser}))),_x=ho.define({name:"html",parser:DA.configure({props:[N0.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),X0.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),h3.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Hu=_x.configure({wrap:mx(Nx,Xx)});function V8(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=mx((n.nestedLanguages||[]).concat(Nx),(n.nestedAttributes||[]).concat(Xx)));let r=t?_x.configure({wrap:t,dialect:e}):e?Hu.configure({dialect:e}):Hu;return new rp(r,[Hu.data.of({autocomplete:fM(n)}),n.autoCloseTags!==!1?mM:[],Zx().support,wx().support])}const L8=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),mM=Me.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!Hu.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,c=o.changeByRange(u=>{var f,p,O;let y=o.doc.sliceString(u.from-1,u.to)==r,{head:v}=u,S=Ht(o).resolveInner(v,-1),b;if(y&&r==">"&&S.name=="EndTag"){let P=S.parent;if(((p=(f=P.parent)===null||f===void 0?void 0:f.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(b=go(o.doc,P.parent,v))&&!L8.has(b)){let A=v+(o.doc.sliceString(v,v+1)===">"?1:0),z=`</${b}>`;return{range:u,changes:{from:v,to:A,insert:z}}}}else if(y&&r=="/"&&S.name=="IncompleteCloseTag"){let P=S.parent;if(S.from==v-2&&((O=P.lastChild)===null||O===void 0?void 0:O.name)!="CloseTag"&&(b=go(o.doc,P,v))&&!L8.has(b)){let A=v+(o.doc.sliceString(v,v+1)===">"?1:0),z=`${b}>`;return{range:ue.cursor(v+z.length,-1),changes:{from:v,to:A,insert:z}}}}return{range:u}});return c.changes.empty?!1:(n.dispatch([s,o.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function gM(n){switch(n){case"html":return V8();case"css":return wx();case"javascript":case"js":case"typescript":case"ts":return Zx({typescript:n==="typescript"||n==="ts"});default:return V8()}}function OM(n){var r;const e=((r=n.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 xM=h.memo(function({content:e,filePath:t,language:r,onChange:i,readOnly:s=!1}){const o=h.useRef(null),c=h.useRef(null),u=h.useRef(i);u.current=i;const f=h.useCallback(p=>{if(o.current&&(o.current.destroy(),o.current=null),!p)return;c.current=p;const O=r??(t?OM(t):"html"),y=Me.updateListener.of(S=>{S.docChanged&&u.current&&u.current(S.state.doc.toString())}),v=ot.create({doc:e,extensions:[h9(),Kk(),m9(),E$(),s$(),U9(),O$(),JP(),pQ(),Gf.of([...rQ,...VP,...RQ,...D$]),gM(O),qQ,y,ot.readOnly.of(s),Me.theme({"&":{height:"100%"},".cm-scroller":{overflow:"auto"}})]});o.current=new Me({state:v,parent:p})},[e,t,r,s]);return g.jsx("div",{ref:f,className:"h-full w-full overflow-hidden"})}),Yl={width:1920,height:1080},N8=3,yM=10;function vM(n){const e=Number.isFinite(n.stageWidth)&&n.stageWidth>0?n.stageWidth:Yl.width,t=Number.isFinite(n.stageHeight)&&n.stageHeight>0?n.stageHeight:Yl.height,r=n.cardWidth/e,i=n.cardHeight/t;return Math.min(r,i)}function wM(n){return Number.isFinite(n)&&n!=null&&n>0&&n<N8?n/2:N8}function X8(n){if(n==null)return null;const e=Number.parseFloat(n);return Number.isFinite(e)&&e>0?e:null}function SM(n){var s,o;const e=n==null?void 0:n.contentWindow,t=(o=(s=e==null?void 0:e.__player)==null?void 0:s.getDuration)==null?void 0:o.call(s);if(Number.isFinite(t)&&t!=null&&t>0)return t;const r=n==null?void 0:n.contentDocument,i=(r==null?void 0:r.querySelector("[data-composition-id]"))??(r==null?void 0:r.documentElement)??null;return X8((i==null?void 0:i.getAttribute("data-composition-duration"))??null)??X8((i==null?void 0:i.getAttribute("data-duration"))??null)}function bM(n,e){var r,i,s,o;const t=(r=n==null?void 0:n.contentWindow)==null?void 0:r.__player;return t?e?((i=t.play)==null||i.call(t),!0):((s=t.pause)==null||s.call(t),(o=t.seek)==null||o.call(t,wM(SM(n))),!0):!1}function kM({projectId:n,comp:e,isActive:t,onSelect:r}){const[i,s]=h.useState(!1),[o,c]=h.useState(Yl),u=h.useRef(null),f=h.useRef(null),p=h.useRef(null),O=h.useCallback(A=>{p.current&&(clearTimeout(p.current),p.current=null);const z=M=>{bM(u.current,A)||M<=0||(p.current=setTimeout(()=>z(M-1),100))};z(yM)},[]),y=()=>{f.current=setTimeout(()=>s(!0),300)},v=()=>{f.current&&(clearTimeout(f.current),f.current=null),s(!1)},S=e.replace(/^compositions\//,"").replace(/\.html$/,""),b=`/api/projects/${n}/preview/comp/${e}`,P=vM({cardWidth:80,cardHeight:45,stageWidth:o.width,stageHeight:o.height});return h.useEffect(()=>{O(i)},[i,O]),h.useEffect(()=>()=>{f.current&&clearTimeout(f.current),p.current&&clearTimeout(p.current)},[]),g.jsxs("div",{onClick:r,onPointerEnter:y,onPointerLeave:v,className:`w-full text-left px-2 py-1.5 flex items-center gap-2.5 transition-colors cursor-pointer ${t?"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:u,src:b,sandbox:"allow-scripts allow-same-origin",loading:"lazy",className:"absolute left-0 top-0 border-none pointer-events-none",style:{transformOrigin:"0 0",width:o.width,height:o.height,transform:`scale(${P})`},onLoad:A=>{var z;try{const C=(z=A.currentTarget.contentDocument)==null?void 0:z.querySelector("[data-composition-id]"),Z=Number(C==null?void 0:C.getAttribute("data-width"))||Yl.width,H=Number(C==null?void 0:C.getAttribute("data-height"))||Yl.height;c({width:Z,height:H}),O(i)}catch{c(Yl)}},title:`${S} 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:S}),g.jsx("span",{className:"text-[9px] text-neutral-600 truncate block",children:e})]})]})}const $M=h.memo(function({projectId:e,compositions:t,activeComposition:r,onSelect:i}){return t.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:t.map(s=>g.jsx(kM,{projectId:e,comp:s,isActive:r===s,onSelect:()=>i(s)},s))})});function Dx({src:n}){const[e,t]=h.useState(null);return h.useEffect(()=>{const r=document.createElement("video");r.crossOrigin="anonymous",r.muted=!0,r.preload="metadata";const i=document.createElement("canvas"),s=i.getContext("2d"),o=()=>{r.src="",r.load()};return r.addEventListener("loadedmetadata",()=>{r.currentTime=Math.min(2,r.duration*.1||2)}),r.addEventListener("seeked",()=>{s&&(i.width=r.videoWidth,i.height=r.videoHeight,s.drawImage(r,0,0),t(i.toDataURL("image/jpeg",.7)),o())}),r.addEventListener("error",o),r.src=n,r.load(),o},[n]),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 PM({serveUrl:n,name:e,isImage:t,isVideo:r,isAudio:i}){return g.jsxs(g.Fragment,{children:[t&&g.jsx("img",{src:n,alt:e,loading:"lazy",className:"w-full h-full object-contain",onError:s=>{s.target.style.display="none"}}),r&&g.jsx(Dx,{src:n}),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"})]})}),!t&&!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 QM({projectId:n,asset:e,onCopy:t,isCopied:r,onDelete:i,onRename:s}){const[o,c]=h.useState(!1),[u,f]=h.useState(null),[p,O]=h.useState(!1),[y,v]=h.useState(""),[S,b]=h.useState(!1),P=e.split("/").pop()??e,A=`/api/projects/${n}/preview/${e}`,z=jf.test(e);return g.jsxs(g.Fragment,{children:[g.jsxs("div",{draggable:!0,onClick:()=>t(e),onDragStart:M=>{M.dataTransfer.effectAllowed="copy",M.dataTransfer.setData($h,JSON.stringify({path:e})),M.dataTransfer.setData("text/plain",e)},onContextMenu:M=>{M.preventDefault(),f({x:M.clientX,y:M.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(PM,{serveUrl:A,name:P,isImage:Qa.test(e),isVideo:z,isAudio:Rf.test(e)}),z&&o&&g.jsx("video",{src:A,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:M=>v(M.target.value),onKeyDown:M=>{if(M.key==="Enter"){M.preventDefault();const C=y.trim();if(C&&C!==P){const Z=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";s==null||s(e,Z+C)}O(!1)}else M.key==="Escape"&&O(!1)},onBlur:()=>{const M=y.trim();if(M&&M!==P){const C=e.includes("/")?e.slice(0,e.lastIndexOf("/")+1):"";s==null||s(e,C+M)}O(!1)},onClick:M=>M.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:P}),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})]})})]}),u&&g.jsx("div",{className:"fixed inset-0 z-[200]",onClick:()=>f(null),onContextMenu:M=>{M.preventDefault(),f(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:u.x,top:u.y},children:[g.jsx("button",{onClick:M=>{M.stopPropagation(),t(e),f(null)},className:"w-full text-left px-3 py-1.5 text-neutral-300 hover:bg-neutral-800 transition-colors",children:"Copy path"}),s&&g.jsx("button",{onClick:M=>{M.stopPropagation(),v(P),O(!0),f(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:M=>{M.stopPropagation(),b(!0),f(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 ",P,"?"]}),g.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[g.jsx("button",{onClick:M=>{M.stopPropagation(),i==null||i(e),b(!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:M=>{M.stopPropagation(),b(!1)},className:"px-2 py-0.5 text-[10px] rounded text-neutral-400 hover:text-neutral-200 transition-colors",children:"Cancel"})]})]})]})}const AM=h.memo(function({projectId:e,assets:t,onImport:r,onDelete:i,onRename:s}){const o=h.useRef(null),[c,u]=h.useState(!1),[f,p]=h.useState(null),O=h.useCallback(S=>{S.preventDefault(),u(!1),S.dataTransfer.files.length&&(r==null||r(S.dataTransfer.files))},[r]),y=h.useCallback(async S=>{await Pa(S)&&(p(S),setTimeout(()=>p(null),1500))},[]),v=t.filter(S=>X6.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(),u(!0)},onDragLeave:()=>u(!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 b;(b=S.target.files)!=null&&b.length&&(r(S.target.files),S.target.value="")}})]}),g.jsx("div",{className:"flex-1 overflow-y-auto",children:v.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"})]}):v.map(S=>g.jsx(QM,{projectId:e,asset:S,onCopy:y,isCopied:f===S,onDelete:i,onRename:s},S))})]})}),Lr=n=>({title:t,...r})=>g.jsx(n,{alt:t,"aria-label":t,"aria-hidden":t?void 0:!0,...r}),_8=Lr(cb),CM=Lr(Cb),MM=Lr(ob),TM=Lr(sb),D8=Lr(Qb),bp=Lr(v4),EM=Lr(Tb),kp=Lr(jb),ZM=Lr(lb),jM=Lr(W6),RM=Lr(rb),VM=Lr($b),un=14,wn="duotone";function zx({path:n}){var r;const e=((r=n.split(".").pop())==null?void 0:r.toLowerCase())??"",t="flex-shrink-0";return e==="html"?g.jsx(fb,{size:un,weight:wn,color:"#E44D26",className:t}):e==="css"?g.jsx(hb,{size:un,weight:wn,color:"#264DE4",className:t}):e==="js"||e==="mjs"||e==="cjs"?g.jsx(mb,{size:un,weight:wn,color:"#F0DB4F",className:t}):e==="jsx"?g.jsx(gb,{size:un,weight:wn,color:"#61DAFB",className:t}):e==="ts"||e==="mts"?g.jsx(vb,{size:un,weight:wn,color:"#3178C6",className:t}):e==="tsx"?g.jsx(wb,{size:un,weight:wn,color:"#3178C6",className:t}):e==="json"?g.jsx(db,{size:un,weight:wn,color:"#4ADE80",className:t}):e==="svg"?g.jsx(yb,{size:un,weight:wn,color:"#F97316",className:t}):e==="md"||e==="mdx"?g.jsx(Ob,{size:un,weight:wn,color:"#9CA3AF",className:t}):e==="txt"?g.jsx(Sb,{size:un,weight:wn,color:"#9CA3AF",className:t}):e==="png"?g.jsx(xb,{size:un,weight:wn,color:"#22C55E",className:t}):e==="jpg"||e==="jpeg"?g.jsx(pb,{size:un,weight:wn,color:"#22C55E",className:t}):e==="webp"||e==="gif"||e==="ico"?g.jsx(Pb,{size:un,weight:wn,color:"#22C55E",className:t}):e==="mp4"||e==="webm"||e==="mov"?g.jsx(bb,{size:un,weight:wn,color:"#A855F7",className:t}):e==="mp3"||e==="wav"||e==="ogg"||e==="m4a"?g.jsx(Zb,{size:un,weight:wn,color:"#3CE6AC",className:t}):e==="woff"||e==="woff2"||e==="ttf"||e==="otf"?g.jsx(Mb,{size:un,weight:wn,color:"#6B7280",className:t}):g.jsx(ub,{size:un,weight:wn,color:"#6B7280",className:t})}function LM(n){const e={name:"",fullPath:"",children:new Map,isFile:!1};for(const t of n){const r=t.split("/");let i=e;for(let s=0;s<r.length;s++){const o=r[s],c=s===r.length-1,u=r.slice(0,s+1).join("/");i.children.has(o)||i.children.set(o,{name:o,fullPath:u,children:new Map,isFile:c}),i=i.children.get(o),c&&(i.isFile=!0)}}return e}function Ix(n){return Array.from(n.values()).sort((e,t)=>e.name==="index.html"?-1:t.name==="index.html"?1:!e.isFile&&t.isFile?-1:e.isFile&&!t.isFile?1:e.name.localeCompare(t.name))}function $p(n,e){if(!e)return!1;if(n.fullPath===e)return!0;for(const t of n.children.values())if($p(t,e))return!0;return!1}function NM({state:n,onClose:e,onNewFile:t,onNewFolder:r,onRename:i,onDuplicate:s,onDelete:o}){const c=h.useRef(null);h.useEffect(()=>{const O=v=>{c.current&&!c.current.contains(v.target)&&e()},y=v=>{v.key==="Escape"&&e()};return document.addEventListener("mousedown",O),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",O),document.removeEventListener("keydown",y)}},[e]);const u=Math.min(n.x,window.innerWidth-180),f=Math.min(n.y,window.innerHeight-200),p=n.targetIsFolder?n.targetPath:n.targetPath.includes("/")?n.targetPath.slice(0,n.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:u,top:f},children:[n.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:()=>{t(n.targetPath),e()},children:[g.jsx(Tg,{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(n.targetPath),e()},children:[g.jsx(p4,{size:12,weight:"duotone",className:"text-neutral-500"}),"New Folder"]}),g.jsx("div",{className:"border-t border-neutral-700 my-1"})]}),!n.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:()=>{t(p),e()},children:[g.jsx(Tg,{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(n.targetPath),e()},children:[g.jsx(Ab,{size:12,weight:"duotone",className:"text-neutral-500"}),"Rename"]}),!n.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:()=>{s(n.targetPath),e()},children:[g.jsx(ab,{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(n.targetPath),e()},children:[g.jsx(Eb,{size:12,weight:"duotone"}),"Delete"]})]})}function k0({defaultValue:n,depth:e,isFolder:t,onCommit:r,onCancel:i}){const s=h.useRef(null),o=h.useRef(!1),[c,u]=h.useState(n);h.useEffect(()=>{const y=s.current;if(y)if(y.focus(),n&&n.includes(".")){const v=n.lastIndexOf(".");y.setSelectionRange(0,v)}else y.select()},[n]);const f=y=>{o.current||(o.current=!0,r(y))},p=y=>{if(y.key==="Enter"){y.preventDefault();const v=c.trim();v&&!(/[/\\]/.test(v)||v.includes(".."))?f(v):i()}else y.key==="Escape"&&(y.preventDefault(),i())},O=()=>{const y=c.trim();y&&y!==n&&!(/[/\\]/.test(y)||y.includes(".."))?f(y):i()};return g.jsxs("div",{className:"flex items-center gap-2 py-0.5 min-h-7",style:{paddingLeft:`${8+e*12+(t?0:14)}px`},children:[t?g.jsx(kb,{size:un,weight:"duotone",color:"#6B7280",className:"flex-shrink-0"}):g.jsx(zx,{path:c}),g.jsx("input",{ref:s,value:c,onChange:y=>u(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 XM({name:n,onConfirm:e,onCancel:t}){const r=h.useRef(null);return h.useEffect(()=>{const i=o=>{o.key==="Escape"&&t()},s=o=>{r.current&&!r.current.contains(o.target)&&t()};return document.addEventListener("keydown",i),document.addEventListener("mousedown",s),()=>{document.removeEventListener("keydown",i),document.removeEventListener("mousedown",s)}},[t]),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:n}),"?"]}),g.jsxs("div",{className:"flex gap-1.5",children:[g.jsx("button",{onClick:t,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"})]})]})}function Fx({node:n,depth:e,activeFile:t,onSelectFile:r,defaultOpen:i,onContextMenu:s,inlineInput:o,onDragStart:c,onDragOver:u,onDrop:f,onDragLeave:p,dragOverFolder:O}){const[y,v]=h.useState(i),S=h.useCallback(()=>v(M=>!M),[]),b=h.useMemo(()=>Ix(n.children),[n.children]),P=y?ZM:jM,A=O===n.fullPath;return(o==null?void 0:o.mode)==="rename"&&o.originalPath===n.fullPath?g.jsx(k0,{defaultValue:o.originalName??n.name,depth:e,isFolder:!0,onCommit:M=>{var C;(C=o==null?void 0:o.onCommit)==null||C.call(o,M)},onCancel:()=>{var M;(M=o==null?void 0:o.onCancel)==null||M.call(o)}}):g.jsxs(g.Fragment,{children:[g.jsxs("button",{draggable:!0,onDragStart:M=>c(M,n.fullPath),onClick:S,onContextMenu:M=>{M.preventDefault(),s(M,n.fullPath,!0)},onDragOver:M=>{M.preventDefault(),M.stopPropagation(),u(M,n.fullPath)},onDrop:M=>{M.preventDefault(),M.stopPropagation(),f(M,n.fullPath)},onDragLeave:p,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 ${A?"bg-[#3CE6AC]/10 outline outline-1 outline-[#3CE6AC]/40":""}`,style:{paddingLeft:`${8+e*12}px`},children:[g.jsx(P,{size:10,className:"flex-shrink-0 text-neutral-600"}),g.jsx("span",{className:"truncate font-medium",children:n.name})]}),y&&g.jsxs(g.Fragment,{children:[o&&(o.mode==="new-file"||o.mode==="new-folder")&&o.parentPath===n.fullPath&&g.jsx(k0,{defaultValue:"",depth:e+1,isFolder:o.mode==="new-folder",onCommit:M=>{var C;(C=o==null?void 0:o.onCommit)==null||C.call(o,M)},onCancel:()=>{var M;(M=o==null?void 0:o.onCancel)==null||M.call(o)}}),b.map(M=>M.isFile&&M.children.size===0?g.jsx(Sf,{node:M,depth:e+1,activeFile:t,onSelectFile:r,onContextMenu:s,inlineInput:o,onDragStart:c},M.fullPath):M.children.size>0?g.jsx(Fx,{node:M,depth:e+1,activeFile:t,onSelectFile:r,defaultOpen:$p(M,t),onContextMenu:s,inlineInput:o,onDragStart:c,onDragOver:u,onDrop:f,onDragLeave:p,dragOverFolder:O},M.fullPath):g.jsx(Sf,{node:M,depth:e+1,activeFile:t,onSelectFile:r,onContextMenu:s,inlineInput:o,onDragStart:c},M.fullPath))]})]})}function Sf({node:n,depth:e,activeFile:t,onSelectFile:r,onContextMenu:i,inlineInput:s,onDragStart:o}){const c=n.fullPath===t;return(s==null?void 0:s.mode)==="rename"&&s.originalPath===n.fullPath?g.jsx(k0,{defaultValue:s.originalName??n.name,depth:e,isFolder:!1,onCommit:f=>{var p;(p=s==null?void 0:s.onCommit)==null||p.call(s,f)},onCancel:()=>{var f;(f=s==null?void 0:s.onCancel)==null||f.call(s)}}):g.jsxs("button",{draggable:!0,onDragStart:f=>o(f,n.fullPath),onClick:()=>r(n.fullPath),onContextMenu:f=>{f.preventDefault(),i(f,n.fullPath,!1)},className:`w-full flex items-center gap-2 py-1 min-h-7 text-left transition-all text-xs ${c?"bg-neutral-800/60 text-neutral-200":"text-neutral-500 hover:bg-neutral-800/30 hover:text-neutral-300"}`,style:{paddingLeft:`${8+e*12+14}px`},children:[g.jsx(zx,{path:n.name}),g.jsx("span",{className:"truncate",children:n.name})]})}const _M=h.memo(function({files:e,activeFile:t,onSelectFile:r,onCreateFile:i,onCreateFolder:s,onDeleteFile:o,onRenameFile:c,onDuplicateFile:u,onMoveFile:f,onImportFiles:p}){const O=h.useMemo(()=>LM(e),[e]),y=h.useMemo(()=>Ix(O.children),[O]),[v,S]=h.useState(null),[b,P]=h.useState(null),[A,z]=h.useState(null),[M,C]=h.useState(null),Z=h.useRef(null),H=!!(i||s||o||c||u),j=h.useCallback(($,V,R)=>{H&&($.preventDefault(),S({x:$.clientX,y:$.clientY,targetPath:V,targetIsFolder:R}))},[H]),N=h.useCallback(()=>S(null),[]),ne=h.useCallback($=>{P({parentPath:$,mode:"new-file",onCommit:V=>{const R=$?`${$}/${V}`:V;i==null||i(R),P(null)},onCancel:()=>P(null)})},[i]),se=h.useCallback($=>{P({parentPath:$,mode:"new-folder",onCommit:V=>{const R=$?`${$}/${V}`:V;s==null||s(R),P(null)},onCancel:()=>P(null)})},[s]),le=h.useCallback($=>{const V=$.includes("/")?$.slice($.lastIndexOf("/")+1):$,R=$.includes("/")?$.slice(0,$.lastIndexOf("/")):"";P({parentPath:R,mode:"rename",originalPath:$,originalName:V,onCommit:te=>{if(te!==V){const ie=R?`${R}/${te}`:te;c==null||c($,ie)}P(null)},onCancel:()=>P(null)})},[c]),T=h.useCallback($=>{u==null||u($)},[u]),re=h.useCallback($=>{z($)},[]),ce=h.useCallback(()=>{A&&(o==null||o(A),z(null))},[A,o]),Y=h.useCallback(()=>{z(null)},[]),G=h.useCallback(($,V)=>{Z.current=V,$.dataTransfer.effectAllowed="move",$.dataTransfer.setData("text/plain",V)},[]),oe=h.useCallback(($,V)=>{C(V)},[]),B=h.useCallback(($,V)=>{if($.dataTransfer.files.length>0&&!Z.current){$.preventDefault(),p==null||p($.dataTransfer.files,V||void 0),C(null);return}const R=Z.current;if(!R||!f){C(null);return}const te=R.includes("/")?R.slice(R.lastIndexOf("/")+1):R,ie=V?`${V}/${te}`:te;ie!==R&&!V.startsWith(R+"/")&&f(R,ie),C(null),Z.current=null},[f,p]),D=h.useCallback(()=>{C(null)},[]),W=h.useCallback($=>{H&&$.target===$.currentTarget&&($.preventDefault(),S({x:$.clientX,y:$.clientY,targetPath:"",targetIsFolder:!0}))},[H]);return g.jsxs("div",{className:"flex flex-col h-full min-h-0",children:[H&&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:()=>ne(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New File",children:g.jsx(v4,{size:12,weight:"bold"})}),g.jsx("button",{onClick:()=>se(""),className:"p-0.5 rounded hover:bg-neutral-800 text-neutral-600 hover:text-neutral-400 transition-colors",title:"New Folder",children:g.jsx(p4,{size:12,weight:"duotone"})})]})]}),g.jsxs("div",{className:`flex-1 overflow-y-auto py-1 transition-colors ${M===""?"bg-[#3CE6AC]/5 outline outline-1 outline-[#3CE6AC]/30 -outline-offset-1":""}`,onContextMenu:W,onDragOver:$=>{$.preventDefault(),$.target===$.currentTarget&&C("")},onDragLeave:$=>{$.target===$.currentTarget&&C(null)},onDrop:$=>{$.preventDefault(),B($,"")},children:[b&&(b.mode==="new-file"||b.mode==="new-folder")&&b.parentPath===""&&g.jsx(k0,{defaultValue:"",depth:0,isFolder:b.mode==="new-folder",onCommit:$=>{var V;return(V=b.onCommit)==null?void 0:V.call(b,$)},onCancel:()=>{var $;return($=b.onCancel)==null?void 0:$.call(b)}}),y.map($=>$.isFile&&$.children.size===0?g.jsx(Sf,{node:$,depth:0,activeFile:t,onSelectFile:r,onContextMenu:j,inlineInput:b,onDragStart:G},$.fullPath):g.jsx(Fx,{node:$,depth:0,activeFile:t,onSelectFile:r,defaultOpen:$p($,t),onContextMenu:j,inlineInput:b,onDragStart:G,onDragOver:oe,onDrop:B,onDragLeave:D,dragOverFolder:M},$.fullPath))]}),A&&g.jsx("div",{className:"border-t border-neutral-800/50 flex-shrink-0",children:g.jsx(XM,{name:A.includes("/")?A.slice(A.lastIndexOf("/")+1):A,onConfirm:ce,onCancel:Y})}),v&&g.jsx(NM,{state:v,onClose:N,onNewFile:ne,onNewFolder:se,onRename:le,onDuplicate:T,onDelete:re})]})}),Hx="hf-studio-sidebar-tab";function DM(){const n=localStorage.getItem(Hx);return n==="assets"?"assets":n==="code"?"code":"compositions"}const zM=h.memo(function({width:e=240,projectId:t,compositions:r,assets:i,activeComposition:s,onSelectComposition:o,onImportFiles:c,fileTree:u,editingFile:f,onSelectFile:p,onCreateFile:O,onCreateFolder:y,onDeleteFile:v,onRenameFile:S,onDuplicateFile:b,onMoveFile:P,codeChildren:A,onLint:z,linting:M}){const[C,Z]=h.useState(DM),H=h.useCallback(j=>{Z(j),localStorage.setItem(Hx,j)},[]);return Lt(()=>{const j=N=>{!N.metaKey&&!N.ctrlKey||(N.key==="1"&&(N.preventDefault(),H("compositions")),N.key==="2"&&(N.preventDefault(),H("assets")))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)}),g.jsxs("div",{className:"flex flex-col h-full bg-neutral-950 border-r border-neutral-800/50",style:{width:e},children:[g.jsx("div",{className:"border-b border-neutral-800/50 px-3 py-3 flex-shrink-0",children:g.jsxs("div",{className:"grid gap-1 rounded-[18px] bg-neutral-900 p-1 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",style:{gridTemplateColumns:"0.9fr 1.25fr 0.9fr"},children:[g.jsx("button",{type:"button",onClick:()=>H("code"),className:`rounded-[14px] px-2.5 py-2 text-[10px] font-semibold transition-all ${C==="code"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Code"}),g.jsx("button",{type:"button",onClick:()=>H("compositions"),className:`rounded-[14px] px-2.5 py-2 text-[10px] font-semibold transition-all ${C==="compositions"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Compositions"}),g.jsx("button",{type:"button",onClick:()=>H("assets"),className:`rounded-[14px] px-2.5 py-2 text-[10px] font-semibold transition-all ${C==="assets"?"bg-neutral-800 text-white":"text-neutral-500 hover:text-neutral-200"}`,children:"Assets"})]})}),C==="compositions"&&g.jsx($M,{projectId:t,compositions:r,activeComposition:s,onSelect:o}),C==="assets"&&g.jsx(AM,{projectId:t,assets:i,onImport:c,onDelete:v,onRename:S}),C==="code"&&g.jsxs("div",{className:"flex flex-1 min-h-0",children:[((u==null?void 0:u.length)??0)>0&&g.jsx("div",{className:"w-[160px] flex-shrink-0 border-r border-neutral-800 overflow-y-auto",children:g.jsx(_M,{files:u??[],activeFile:(f==null?void 0:f.path)??null,onSelectFile:p??(()=>{}),onCreateFile:O,onCreateFolder:y,onDeleteFile:v,onRenameFile:S,onDuplicateFile:b,onMoveFile:P,onImportFiles:c})}),g.jsx("div",{className:"flex-1 overflow-hidden min-w-0",children:A??g.jsx("div",{className:"flex items-center justify-center h-full text-neutral-600 text-sm",children:"Select a file to edit"})})]}),z&&g.jsx("div",{className:"border-t border-neutral-800 p-2 flex-shrink-0",children:g.jsxs("button",{onClick:z,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 IM(n){if(n<1e3)return`${n}ms`;const e=Math.round(n/1e3);return e<60?`${e}s`:`${Math.floor(e/60)}m ${e%60}s`}function FM(n){const e=Date.now()-n;return e<6e4?"just now":e<36e5?`${Math.floor(e/6e4)}m ago`:`${Math.floor(e/36e5)}h ago`}const HM=h.memo(function({job:e,projectId:t,onDelete:r}){const[i,s]=h.useState(!1),o=`/api/projects/${t}/renders/file/${e.filename}`,c=h.useCallback(()=>{window.open(o,"_blank")},[o]),u=h.useCallback(O=>{O.stopPropagation();const y=document.createElement("a");y.href=o,y.download=e.filename,y.click()},[o,e.filename]),f=o,p=e.status==="complete";return g.jsx("div",{onPointerEnter:()=>s(!0),onPointerLeave:()=>s(!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:f,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(Dx,{src:f})})]}),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:IM(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:FM(e.createdAt)})]}),i&&g.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[p&&g.jsx("button",{onClick:u,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"})})})]})]})})}),dh={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 WM({format:n}){const[e,t]=h.useState(!1),r=h.useRef(void 0),i=()=>{clearTimeout(r.current),t(!0)},s=()=>{r.current=setTimeout(()=>t(!1),120)};h.useEffect(()=>()=>clearTimeout(r.current),[]);const o=dh[n];return g.jsxs("div",{className:"relative",onPointerEnter:i,onPointerLeave:s,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!==n).map(c=>g.jsxs("p",{className:"text-[9px] text-neutral-500 leading-relaxed",children:[g.jsx("span",{className:"text-neutral-400 font-medium",children:dh[c].label})," — ",dh[c].desc]},c))})]})]})}const z8=[{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 BM({onStartRender:n,isRendering:e}){var c;const[t,r]=h.useState("mp4"),[i,s]=h.useState("standard"),o=t!=="mov";return g.jsxs("div",{className:"flex items-center gap-1",children:[g.jsx(WM,{format:t}),o&&g.jsx("select",{value:i,onChange:u=>s(u.target.value),disabled:e,title:(c=z8.find(u=>u.value===i))==null?void 0:c.title,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:z8.map(u=>g.jsx("option",{value:u.value,title:u.title,children:u.label},u.value))}),g.jsxs("select",{value:t,onChange:u=>r(u.target.value),disabled:e,className:`h-5 px-1 text-[10px] bg-neutral-800 border border-neutral-700 text-neutral-300 outline-none disabled:opacity-50 ${o?"":"rounded-l"}`,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:()=>n(t,i),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 YM=h.memo(function({jobs:e,projectId:t,onDelete:r,onClearCompleted:i,onStartRender:s,isRendering:o}){const c=h.useRef(null);h.useEffect(()=>{c.current&&c.current.scrollTo({top:c.current.scrollHeight,behavior:"smooth"})},[e.length]);const u=e.filter(f=>f.status!=="rendering").length;return g.jsxs("div",{className:"flex flex-col h-full",children:[g.jsx("div",{className:"flex items-center justify-end 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:[u>0&&g.jsx("button",{onClick:i,className:"text-[10px] text-neutral-600 hover:text-neutral-400 transition-colors",children:"Clear"}),g.jsx(BM,{onStartRender:s,isRendering:o})]})}),g.jsx("div",{ref:c,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(f=>g.jsx(HM,{job:f,projectId:t,onDelete:()=>r(f.id)},f.id))})]})});function qM(n){const[e,t]=h.useState([]),r=h.useRef(null),i=h.useRef(null),s=h.useCallback(async()=>{if(n)try{const f=await fetch(`/api/projects/${n}/renders`);if(!f.ok)return;const p=await f.json();Array.isArray(p.renders)&&t(O=>{const y=new Set(O.map(S=>S.id)),v=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,...v]})}catch{}},[n]);h.useEffect(()=>{s()},[s]);const o=h.useCallback(async(f=30,p="standard",O="mp4")=>{if(!n)return;const y=Date.now();let v;try{v=await fetch(`/api/projects/${n}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fps:f,quality:p,format:O})})}catch{const M={id:crypto.randomUUID(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:y};t(C=>[...C,M]);return}if(!v.ok){const M={id:crypto.randomUUID(),status:"failed",progress:0,error:`Server error (${v.status}). Check the terminal for details.`,filename:"Export failed",createdAt:y};t(C=>[...C,M]);return}const{jobId:S}=await v.json(),P={mp4:".mp4",webm:".webm",mov:".mov"}[O]??".mp4",A={id:S,status:"rendering",progress:0,filename:`${S}${P}`,createdAt:y};t(M=>[...M,A]),i.current=S;const z=new EventSource(`/api/render/${S}/progress`);return r.current=z,z.addEventListener("progress",M=>{try{const C=JSON.parse(M.data);t(Z=>Z.map(H=>H.id===S?{...H,progress:C.progress??H.progress,stage:C.stage??C.message??H.stage,status:C.status==="complete"?"complete":C.status==="failed"?"failed":H.status,durationMs:C.status==="complete"?Date.now()-y:void 0,error:C.error??H.error}:H)),(C.status==="complete"||C.status==="failed")&&(z.close(),i.current=null)}catch{}}),z.onerror=()=>{z.close(),t(M=>M.map(C=>C.id===S&&C.status==="rendering"?{...C,status:"failed",error:"Connection lost. Is the render server running?"}:C)),i.current=null},S},[n]),c=h.useCallback(async f=>{try{await fetch(`/api/render/${f}`,{method:"DELETE"})}catch{}t(p=>p.filter(O=>O.id!==f))},[]),u=h.useCallback(()=>{t(f=>f.filter(p=>p.status==="rendering"))},[]);return h.useEffect(()=>()=>{var f;(f=r.current)==null||f.close(),r.current=null},[n]),{jobs:e,startRender:o,deleteRender:c,clearCompleted:u,isRendering:e.some(f=>f.status==="rendering")}}const Wx=2,UM=1,I8=Wx+UM;function GM(n,e){const t=[],r=Math.floor(n.length/e);if(r===0)return Array(e).fill(0);for(let s=0;s<e;s++){let o=0;const c=s*r,u=Math.min(c+r,n.length);for(let f=c;f<u;f++){const p=Math.abs(n[f]??0);p>o&&(o=p)}t.push(o)}const i=Math.max(...t,.001);return t.map(s=>s/i)}function KM(n,e){let t=0;for(let s=0;s<n.length;s++)t=(t<<5)-t+n.charCodeAt(s)|0;t=Math.abs(t)||42;const r=()=>(t=t*16807%2147483647,(t&2147483647)/2147483647),i=[];for(let s=0;s<e;s++){const o=s/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 F8=new Map,hh=new Map,JM=h.memo(function({audioUrl:e,waveformUrl:t,label:r,labelColor:i}){const s=h.useRef(null),o=h.useRef(null),c=h.useRef(null),u=t??e,[f,p]=h.useState(F8.get(u)??null);h.useEffect(()=>{if(f||!u)return;let v=!1,S=hh.get(u);return S||(S=(t?fetch(t).then(b=>b.json()).then(b=>{if(!Array.isArray(b.peaks))throw new Error("bad response");return b.peaks}):fetch(e).then(b=>b.arrayBuffer()).then(b=>{const P=new AudioContext;return P.decodeAudioData(b).finally(()=>P.close())}).then(b=>GM(b.getChannelData(0),4e3))).catch(()=>KM(u,4e3)).then(b=>(F8.set(u,b),b)).finally(()=>hh.delete(u)),hh.set(u,S)),S.then(b=>{v||p(b)}),()=>{v=!0}},[e,t,u,f]);const O=h.useCallback(()=>{const v=s.current,S=o.current;if(!v||!S||!f)return;const b=v.clientWidth||400,P=Math.min(Math.floor(b/I8),f.length);let A="";for(let z=0;z<P;z++){const M=Math.floor(z/P*f.length),C=f[M]??0,Z=Math.max(3,Math.round(C*100)),H=(.45+C*.4).toFixed(2);A+=`<div style="position:absolute;bottom:0;left:${z*I8}px;width:${Wx}px;height:${Z}%;background:rgba(75,163,210,${H})"></div>`}S.innerHTML=A},[f]),y=h.useCallback(v=>{var S;(S=c.current)==null||S.disconnect(),s.current=v,v&&(O(),c.current=new ResizeObserver(()=>O()),c.current.observe(v))},[O]);return h.useEffect(()=>{O()},[O]),h.useEffect(()=>()=>{var v;(v=c.current)==null||v.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}}),!f&&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 H8({findings:n,projectId:e,onClose:t}){const r=n.filter(f=>f.severity==="error"),i=n.filter(f=>f.severity==="warning"),s=n.length>0,[o,c]=h.useState(!1),u=async()=>{const f=n.map(y=>{let v=`[${y.severity}] ${y.message}`;return y.file&&(v+=`
77
- File: ${y.file}`),y.fixHint&&(v+=`
78
- Fix: ${y.fixHint}`),v}),p=`Fix these HyperFrames lint issues for project "${e}":
79
-
80
- Project path: ${window.location.href}
81
-
82
- ${f.join(`
83
-
84
- `)}`;await Pa(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:t,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:f=>f.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:[s?g.jsx("div",{className:"w-8 h-8 rounded-full bg-red-500/10 flex items-center justify-center",children:g.jsx(ju,{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(Y6,{size:18,className:"text-studio-accent",weight:"fill"})}),g.jsxs("div",{children:[g.jsx("h2",{className:"text-sm font-semibold text-neutral-200",children:s?`${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:t,className:"p-1.5 rounded-lg text-neutral-500 hover:text-neutral-200 hover:bg-neutral-800 transition-colors",children:g.jsx(Vf,{size:16})})]}),s&&g.jsx("div",{className:"flex items-center justify-end px-5 py-2 border-b border-neutral-800/50",children:g.jsx("button",{onClick:u,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:[!s&&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((f,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(ju,{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:f.message}),f.file&&g.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:f.file}),f.fixHint&&g.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[g.jsx(Yu,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),g.jsx("p",{className:"text-xs text-studio-accent",children:f.fixHint})]})]})]})},`e-${p}`)),i.map((f,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(ju,{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:f.message}),f.file&&g.jsx("p",{className:"text-xs text-neutral-600 font-mono mt-0.5",children:f.file}),f.fixHint&&g.jsxs("div",{className:"flex items-start gap-1 mt-1.5",children:[g.jsx(Yu,{size:10,className:"text-studio-accent flex-shrink-0 mt-0.5"}),g.jsx("p",{className:"text-xs text-studio-accent",children:f.fixHint})]})]})]})},`w-${p}`))]})]})})}function eT({projectId:n,filePath:e}){const t=`/api/projects/${n}/preview/${e}`,r=e.split("/").pop()??e;return Qa.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:t,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})]}):jf.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:t,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})]}):Rf.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:t,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"})]})}let tT=0;const W8={isEditMode:!1,model:null,selectedSegmentIds:new Set,selectedGroupId:null,sourceFilePath:null},dt=V6(n=>({...W8,setEditMode:e=>n({isEditMode:e}),setModel:e=>n({model:e}),setSourceFilePath:e=>n({sourceFilePath:e}),selectSegment:(e,t=!1)=>n(r=>{if(t){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=>n(t=>{var i;const r=(i=t.model)==null?void 0:i.groups.get(e);return r?{selectedSegmentIds:new Set(r.segmentIds),selectedGroupId:e}:{}}),selectAll:()=>n(e=>e.model?{selectedSegmentIds:new Set(e.model.segments.keys()),selectedGroupId:null}:{}),clearSelection:()=>n({selectedSegmentIds:new Set,selectedGroupId:null}),updateSegmentStyle:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const s=new Map(r.model.segments);return s.set(e,{...i,style:{...i.style,...t}}),{model:{...r.model,segments:s}}}),updateSegmentText:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.segments.get(e);if(!i)return{};const s=new Map(r.model.segments);return s.set(e,{...i,text:t}),{model:{...r.model,segments:s}}}),updateSegmentTiming:(e,t,r)=>n(i=>{if(!i.model)return{};const s=i.model.segments.get(e);if(!s)return{};const o=new Map(i.model.segments);return o.set(e,{...s,start:t,end:r}),{model:{...i.model,segments:o}}}),updateGroupStyle:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=new Map(r.model.groups);return s.set(e,{...i,style:{...i.style,...t}}),{model:{...r.model,groups:s}}}),updateGroupContainer:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=new Map(r.model.groups);return s.set(e,{...i,containerStyle:{...i.containerStyle,...t}}),{model:{...r.model,groups:s}}}),updateGroupAnimation:(e,t,r)=>n(i=>{if(!i.model)return{};const s=i.model.groups.get(e);if(!s)return{};const o=new Map(i.model.groups),c=s.animation[t],u=c!==null?{...c,...r}:r;return o.set(e,{...s,animation:{...s.animation,[t]:u}}),{model:{...i.model,groups:o}}}),splitGroup:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e);if(!i)return{};const s=i.segmentIds.indexOf(t);if(s<=0)return{};const o=i.segmentIds.slice(0,s),c=i.segmentIds.slice(s),u=`group-split-${tT++}`,f=new Map(r.model.groups);f.set(e,{...i,segmentIds:o}),f.set(u,{...i,id:u,segmentIds:c});const p=r.model.groupOrder.indexOf(e),O=[...r.model.groupOrder];O.splice(p+1,0,u);const y=new Map(r.model.segments);return c.forEach((v,S)=>{const b=y.get(v);b&&y.set(v,{...b,groupIndex:S})}),{model:{...r.model,groups:f,segments:y,groupOrder:O}}}),mergeGroups:(e,t)=>n(r=>{if(!r.model)return{};const i=r.model.groups.get(e),s=r.model.groups.get(t);if(!i||!s)return{};const o=[...i.segmentIds,...s.segmentIds],c=new Map(r.model.groups);c.set(e,{...i,segmentIds:o}),c.delete(t);const u=r.model.groupOrder.filter(O=>O!==t),f=new Map(r.model.segments);s.segmentIds.forEach((O,y)=>{const v=f.get(O);v&&f.set(O,{...v,groupIndex:i.segmentIds.length+y})});const p=r.selectedGroupId===t?null:r.selectedGroupId;return{model:{...r.model,groups:c,segments:f,groupOrder:u},selectedGroupId:p}}),updateSelectedStyle:e=>n(t=>{if(!t.model||t.selectedSegmentIds.size===0)return{};const r=new Map(t.model.segments);for(const i of t.selectedSegmentIds){const s=r.get(i);s&&r.set(i,{...s,style:{...s.style,...e}})}return{model:{...t.model,segments:r}}}),applyAnimationToAll:e=>n(t=>{if(!t.model)return{};const r=new Map(t.model.groups);for(const[i,s]of r)r.set(i,{...s,animation:e});return{model:{...t.model,groups:r}}}),reset:()=>n({...W8,selectedSegmentIds:new Set})}));function nT(n,e,t){var v,S;let r=null,i=null;try{r=n.contentDocument,i=n.contentWindow}catch{return[]}if(!r||!i)return[];const s=n.getBoundingClientRect(),o=t.getBoundingClientRect(),c=parseFloat(n.style.width)||s.width,u=s.width/c,f=s.left-o.left,p=s.top-o.top,O=r.querySelectorAll(".caption-group"),y=[];for(let b=0;b<e.groupOrder.length;b++){const P=e.groupOrder[b],A=e.groups.get(P);if(!A)continue;const z=O[b];if(!z)continue;const M=i.getComputedStyle(z);if(parseFloat(M.opacity)<=.01||M.visibility==="hidden")continue;const C=[];for(const Z of z.children){const H=Z;if(H.dataset.captionWrapper==="true"){const j=H.querySelector(":scope > span");j&&C.push(j)}else H.tagName==="SPAN"&&C.push(H)}if(C.length===0&&((v=z.textContent)!=null&&v.trim())){const Z=z.childNodes[0];if(Z&&Z.nodeType===Node.TEXT_NODE){const H=(Z.textContent||"").split(/\s+/).filter(Boolean),j=r.createDocumentFragment();for(const N of H){const ne=r.createElement("span");ne.textContent=N+" ",ne.style.display="inline",j.appendChild(ne),C.push(ne)}z.replaceChild(j,Z)}else{const H=z.querySelector(":scope > span");if(H&&((S=H.textContent)!=null&&S.trim())){const j=H.textContent.split(/\s+/).filter(Boolean),N=r.createDocumentFragment();for(const ne of j){const se=r.createElement("span");se.textContent=ne+" ",se.style.display="inline",N.appendChild(se),C.push(se)}H.replaceWith(N)}}}for(let Z=0;Z<A.segmentIds.length;Z++){const H=A.segmentIds[Z],j=C[Z];if(!j)continue;const N=j.getBoundingClientRect();y.push({segmentId:H,groupId:P,groupIndex:b,wordIndex:Z,x:N.left*u+f,y:N.top*u+p,width:N.width*u,height:N.height*u})}}return y}function wu(n,e,t){let r=null;try{r=n.contentDocument}catch{return null}if(!r)return null;const i=r.querySelectorAll(".caption-group")[e];if(!i)return null;const s=[];for(const o of i.children){const c=o;if(c.dataset.captionWrapper==="true"){const u=c.querySelector(":scope > span");u&&s.push(u)}else c.tagName==="SPAN"&&s.push(c)}return s[t]??null}function ha(n,e){const t=e.gsap;if(t&&t.getProperty)return{x:t.getProperty(n,"x")||0,y:t.getProperty(n,"y")||0,scale:t.getProperty(n,"scale")||1,rotation:t.getProperty(n,"rotation")||0};const r=n.style.transform||"",i=r.match(/scale\(([^)]+)\)/),s=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:s?parseFloat(s[1]):0}}function ql(n){var i;if(n.dataset.captionWrapper==="true")return n;const e=n.parentElement;if(e&&e.dataset.captionWrapper==="true")return e;const r=n.ownerDocument.createElement("span");return r.style.display="inline-block",r.dataset.captionWrapper="true",(i=n.parentNode)==null||i.insertBefore(r,n),r.appendChild(n),r}function Su(n,e,t,r,i,s){const o=ql(n),c=e.gsap;c&&c.set?c.set(o,{x:t,y:r,scale:i,rotation:s}):o.style.transform=`translate(${t.toFixed(1)}px, ${r.toFixed(1)}px) rotate(${s.toFixed(1)}deg) scale(${i.toFixed(3)})`}function B8(n,e,t){const r=ql(e),{x:i,y:s,scale:o,rotation:c}=ha(r,t),u={};Math.abs(i)>.5&&(u.x=i),Math.abs(s)>.5&&(u.y=s),Math.abs(o-1)>.001&&(u.scaleX=o,u.scaleY=o),Math.abs(c)>.1&&(u.rotation=c),Object.keys(u).length>0&&dt.getState().updateSegmentStyle(n,u)}const nr=8,fh=20,rT=h.memo(function({iframeRef:e}){const t=dt(C=>C.isEditMode),r=dt(C=>C.model),i=dt(C=>C.selectedSegmentIds),s=dt(C=>C.selectSegment),o=dt(C=>C.clearSelection),[c,u]=h.useState([]),f=h.useRef(null),p=h.useRef(r);p.current=r;const O=h.useRef(null);Lt(()=>{if(!t)return;let C=[];const Z=()=>{const N=e.current,ne=p.current,se=f.current;if(!N||!ne||!se)return;const le=nT(N,ne,se);le.length===C.length&&le.every((T,re)=>Math.abs(T.x-C[re].x)<.5&&Math.abs(T.y-C[re].y)<.5)||(C=le,u(le))},H=setInterval(Z,66);Z();const j=N=>{const{selectedSegmentIds:ne,model:se}=dt.getState();if(ne.size===0||!se)return;const le=N.key;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(le))return;N.preventDefault();const T=N.shiftKey?10:1,re=le==="ArrowLeft"?-T:le==="ArrowRight"?T:0,ce=le==="ArrowUp"?-T:le==="ArrowDown"?T:0,Y=e.current,G=Y==null?void 0:Y.contentWindow;if(!(!Y||!G))for(const oe of ne)for(let B=0;B<se.groupOrder.length;B++){const D=se.groups.get(se.groupOrder[B]);if(!D)continue;const W=D.segmentIds.indexOf(oe);if(W<0)continue;const $=wu(Y,B,W);if(!$)continue;const V=ql($),R=ha(V,G);Su($,G,R.x+re,R.y+ce,R.scale,R.rotation),B8(oe,$,G);break}};return window.addEventListener("keydown",j),()=>{clearInterval(H),window.removeEventListener("keydown",j)}});const y=h.useCallback(()=>{const C=e.current;if(!C)return 1;const Z=C.getBoundingClientRect(),H=parseFloat(C.style.width)||Z.width;return Z.width/H},[e]),v=h.useCallback((C,Z,H,j)=>{j.stopPropagation(),j.currentTarget.setPointerCapture(j.pointerId);const N=e.current;if(!N)return;const ne=wu(N,C,Z),se=N.contentWindow;if(!ne||!se)return;const le=ha(ql(ne),se);O.current={type:"move",wordEl:ne,segmentId:H,startMX:j.clientX,startMY:j.clientY,origTX:le.x,origTY:le.y,origScale:le.scale,origRotation:le.rotation}},[e]),S=h.useCallback((C,Z,H,j)=>{var Y;j.stopPropagation(),j.preventDefault(),j.currentTarget.setPointerCapture(j.pointerId);const N=e.current;if(!N)return;const ne=wu(N,C,Z),se=N.contentWindow;if(!ne||!se)return;const le=ne.getBoundingClientRect(),T=y(),re=le.left*T+(((Y=e.current)==null?void 0:Y.getBoundingClientRect().left)??0)+le.width*T/2,ce=ha(ql(ne),se);O.current={type:"scale",wordEl:ne,segmentId:H,startMX:j.clientX,startDxFromCenter:j.clientX-re,origTX:ce.x,origTY:ce.y,origScale:ce.scale,origRotation:ce.rotation}},[e,y]),b=h.useCallback((C,Z)=>{Z.stopPropagation(),Z.preventDefault(),Z.currentTarget.setPointerCapture(Z.pointerId);const H=e.current;if(!H)return;const j=wu(H,C.groupIndex,C.wordIndex),N=H.contentWindow;if(!j||!N)return;const ne=ha(ql(j),N);O.current={type:"rotate",wordEl:j,segmentId:C.segmentId,startMX:Z.clientX,origTX:ne.x,origTY:ne.y,origRotation:ne.rotation,origScale:ne.scale}},[e]),P=h.useCallback(()=>{var C;try{return((C=e.current)==null?void 0:C.contentWindow)??null}catch{return null}},[e]),A=h.useCallback(C=>{const Z=O.current;if(!Z)return;const H=P();if(H){if(Z.type==="move"){const j=y(),N=(C.clientX-Z.startMX)/j,ne=(C.clientY-Z.startMY)/j;Su(Z.wordEl,H,Z.origTX+N,Z.origTY+ne,Z.origScale,Z.origRotation)}else if(Z.type==="scale"){const j=Z.startMX-Z.startDxFromCenter,N=Math.abs(Z.startDxFromCenter),ne=Math.abs(C.clientX-j),se=N>5?ne/N:1,le=Math.max(.1,Z.origScale*se);Su(Z.wordEl,H,Z.origTX,Z.origTY,le,Z.origRotation)}else if(Z.type==="rotate"){const N=(C.clientX-Z.startMX)/200*90;Su(Z.wordEl,H,Z.origTX,Z.origTY,Z.origScale,Z.origRotation+N)}}},[y,P]),z=h.useCallback(()=>{const C=O.current;if(C){const Z=P();Z&&B8(C.segmentId,C.wordEl,Z),O.current=null}},[P]),M=h.useCallback(C=>{C.target===C.currentTarget&&o()},[o]);return t?g.jsx("div",{ref:f,className:"absolute inset-0 z-50",style:{pointerEvents:"auto"},onClick:M,onPointerMove:A,onPointerUp:z,onLostPointerCapture:z,children:c.map(C=>{const Z=i.has(C.segmentId);return g.jsx("div",{className:["absolute",Z?"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:Z?"move":"pointer",touchAction:"none",borderRadius:2},onClick:H=>{H.stopPropagation(),s(C.segmentId,H.shiftKey)},onPointerDown:H=>{Z&&v(C.groupIndex,C.wordIndex,C.segmentId,H)},children:Z&&g.jsxs(g.Fragment,{children:[g.jsx("div",{style:{position:"absolute",left:"50%",top:-fh-nr,marginLeft:-nr/2,width:nr,height:nr,borderRadius:"50%",backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",cursor:"grab",touchAction:"none"},onPointerDown:H=>b(C,H)}),g.jsx("div",{style:{position:"absolute",left:"50%",top:-fh,width:1,height:fh,marginLeft:-.5,backgroundColor:"var(--hf-accent, #3CE6AC)",opacity:.5,pointerEvents:"none"}}),[{right:-nr/2,bottom:-nr/2,cursor:"nwse-resize"},{left:-nr/2,top:-nr/2,cursor:"nwse-resize"},{right:-nr/2,top:-nr/2,cursor:"nesw-resize"},{left:-nr/2,bottom:-nr/2,cursor:"nesw-resize"}].map((H,j)=>g.jsx("div",{style:{position:"absolute",...H,width:nr,height:nr,backgroundColor:"var(--hf-accent, #3CE6AC)",border:"1px solid rgba(0,0,0,0.5)",borderRadius:2,touchAction:"none"},onPointerDown:N=>S(C.groupIndex,C.wordIndex,C.segmentId,N)},j))]})},C.segmentId)})}):null}),Ps="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 bf({label:n,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:n})}),g.jsx("div",{className:"space-y-1",children:e})]})}function Bi({label:n,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:n}),g.jsx("div",{className:"flex-1 min-w-0",children:e})]})}const iT=["none","fade","slide-up","slide-down","slide-left","slide-right","pop","slam","bounce","typewriter","blur-in","flip","drop"],sT=["none","color-change","scale-pop","glow-pulse","underline-sweep","background-fill","bounce"],lT=["none","fade","slide-up","slide-down","slide-left","slide-right","scatter","drop","collapse","blur-out","shrink"],oT=["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 ph({label:n,presets:e,animation:t,showIntensity:r,onChange:i}){const s=(t==null?void 0:t.preset)??"none",o=(t==null?void 0:t.duration)??.2,c=(t==null?void 0:t.ease)??"power2.out",u=(t==null?void 0:t.stagger)??0,f=(t==null?void 0:t.intensity)??1;return g.jsxs(bf,{label:n,children:[g.jsx(Bi,{label:"Preset",children:g.jsx("select",{value:s,onChange:p=>i({preset:p.target.value}),className:Ps,children:e.map(p=>g.jsx("option",{value:p,children:p},p))})}),g.jsx(Bi,{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:Ps})}),g.jsx(Bi,{label:"Ease",children:g.jsx("select",{value:c,onChange:p=>i({ease:p.target.value}),className:Ps,children:oT.map(p=>g.jsx("option",{value:p,children:p},p))})}),g.jsx(Bi,{label:"Stagger",children:g.jsx("input",{type:"number",value:u,step:.02,min:0,max:.5,onChange:p=>i({stagger:Number(p.target.value)}),className:Ps})}),r&&g.jsx(Bi,{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:f,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:f.toFixed(2)})]})})]})}const aT=h.memo(function(){const e=dt(v=>v.model),t=dt(v=>v.selectedGroupId),r=dt(v=>v.selectedSegmentIds),i=dt(v=>v.updateGroupAnimation),s=dt(v=>v.applyAnimationToAll);let o=t;if(!o&&e&&r.size>0){const v=[...r][0];if(v){for(const[S,b]of e.groups)if(b.segmentIds.includes(v)){o=S;break}}}const c=o?e==null?void 0:e.groups.get(o):void 0,u=c==null?void 0:c.animation,f=h.useCallback(v=>{o&&i(o,"entrance",v)},[o,i]),p=h.useCallback(v=>{o&&i(o,"highlight",v)},[o,i]),O=h.useCallback(v=>{o&&i(o,"exit",v)},[o,i]),y=h.useCallback(()=>{u&&s(u)},[u,s]);return!c||!o||!u?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(ph,{label:"Entrance",presets:iT,animation:u.entrance,onChange:f}),g.jsx(ph,{label:"Highlight",presets:sT,animation:u.highlight,showIntensity:!0,onChange:p}),g.jsx(ph,{label:"Exit",presets:lT,animation:u.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"})})]})}),cT=h.memo(function({iframeRef:e}){var H;const t=dt(j=>j.model),r=dt(j=>j.selectedSegmentIds),i=dt(j=>j.selectedGroupId),s=dt(j=>j.updateSelectedStyle),o=dt(j=>j.updateGroupStyle),[c,u]=h.useState("style"),f=r.size>0?[...r][0]:void 0,p=t==null?void 0:t.segments.get(f??"");let O=null;if(t&&f)for(const j of t.groupOrder){const N=t.groups.get(j);if(N&&N.segmentIds.includes(f)){O=j;break}}const y=O?(H=t==null?void 0:t.groups.get(O))==null?void 0:H.style:void 0,v=(p==null?void 0:p.style)??{},S={...y,...v},b=h.useCallback(j=>{var re,ce,Y;const N=e.current;if(!N||!t)return;let ne=null;try{ne=N.contentDocument}catch{return}if(!ne)return;const se=ne.querySelectorAll(".caption-group"),le=[];for(const G of r)for(let oe=0;oe<t.groupOrder.length;oe++){const B=t.groups.get(t.groupOrder[oe]);if(!B)continue;const D=B.segmentIds.indexOf(G);if(D<0)continue;const W=se[oe];if(!W)continue;const $=W.children;let V=0;for(const R of $){const te=R;if(te.dataset.captionWrapper==="true"){const ie=te.querySelector(":scope > span");if(ie&&V===D){le.push(ie);break}}else if(te.tagName==="SPAN"&&V===D){le.push(te);break}V++}break}if(j.x!==void 0||j.y!==void 0||j.scaleX!==void 0||j.scaleY!==void 0||j.rotation!==void 0)try{const G=(ce=(re=e.current)==null?void 0:re.contentWindow)==null?void 0:ce.gsap;if(G)for(const oe of le){let B=oe.parentElement;(!B||B.dataset.captionWrapper!=="true")&&(B=ne.createElement("span"),B.style.display="inline-block",B.dataset.captionWrapper="true",(Y=oe.parentNode)==null||Y.insertBefore(B,oe),B.appendChild(oe));const D=G.getProperty(B,"x")||0,W=G.getProperty(B,"y")||0,$=G.getProperty(B,"scale")||1,V=G.getProperty(B,"rotation")||0;G.set(B,{x:j.x??D,y:j.y??W,scale:j.scaleX??$,rotation:j.rotation??V})}}catch{}},[e,t,r]),P=h.useCallback(j=>{i?o(i,j):s(j),b(j)},[i,o,s,b]);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 A=S.x??0,z=S.y??0,M=S.rotation??0,C=S.scaleX??1,Z=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:Z})}),g.jsxs("div",{className:"flex gap-1",children:[g.jsx("button",{type:"button",onClick:()=>u("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:()=>u("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(aT,{}),c==="style"&&g.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2",children:[g.jsxs(bf,{label:"Position",children:[g.jsx(Bi,{label:"X",children:g.jsx("input",{type:"number",value:A,onChange:j=>P({x:Number(j.target.value)}),className:Ps})}),g.jsx(Bi,{label:"Y",children:g.jsx("input",{type:"number",value:z,onChange:j=>P({y:Number(j.target.value)}),className:Ps})})]}),g.jsxs(bf,{label:"Transform",children:[g.jsx(Bi,{label:"Scale",children:g.jsx("input",{type:"number",value:C,step:.1,onChange:j=>P({scaleX:Number(j.target.value),scaleY:Number(j.target.value)}),className:Ps})}),g.jsx(Bi,{label:"Rotation",children:g.jsx("input",{type:"number",value:M,onChange:j=>P({rotation:Number(j.target.value)}),className:Ps})})]})]})]})}),Y8=["#3CE6AC","#FF6B6B","#4ECDC4","#FFE66D","#A78BFA","#F472B6","#34D399","#FB923C","#60A5FA","#C084FC"],uT=h.memo(function({pixelsPerSecond:e,onSeek:t}){const r=dt(b=>b.model),i=dt(b=>b.selectedSegmentIds),s=dt(b=>b.selectSegment),o=dt(b=>b.updateSegmentTiming),c=dt(b=>b.splitGroup),u=h.useRef(null),f=h.useCallback((b,P,A,z,M)=>{b.stopPropagation(),b.preventDefault(),b.target.setPointerCapture(b.pointerId),u.current={segId:P,edge:A,originalStart:z,originalEnd:M,startX:b.clientX}},[]),p=h.useCallback(b=>{const P=u.current;if(!P)return;const A=(b.clientX-P.startX)/e;if(P.edge==="start"){const z=Math.max(0,P.originalStart+A),M=Math.min(z,P.originalEnd-.05);o(P.segId,M,P.originalEnd)}else{const z=Math.max(P.originalStart+.05,P.originalEnd+A),M=Math.max(0,z);o(P.segId,P.originalStart,M)}},[e,o]),O=h.useCallback(()=>{u.current=null},[]),y=h.useCallback((b,P)=>{b.stopPropagation(),s(P,b.shiftKey)},[s]),v=h.useCallback((b,P,A)=>{b.stopPropagation(),c(P,A)},[c]),S=h.useCallback(b=>{if(!t)return;const P=b.currentTarget.getBoundingClientRect(),A=b.clientX-P.left-32,z=Math.max(0,A/e);t(z)},[t,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((b,P)=>{const A=r.groups.get(b);if(!A)return null;const z=Y8[P%Y8.length];return A.segmentIds.map(M=>{const C=r.segments.get(M);if(!C)return null;const Z=32+C.start*e,H=Math.max((C.end-C.start)*e,4),j=i.has(M);return g.jsxs("div",{className:`absolute top-1 bottom-1 rounded flex items-center overflow-hidden cursor-pointer${j?" ring-1 ring-white/50 z-10":""}`,style:{left:Z,width:H,backgroundColor:z,zIndex:j?10:1},onClick:N=>y(N,M),onDoubleClick:N=>v(N,b,M),children:[g.jsx("div",{className:"absolute left-0 top-0 bottom-0 cursor-col-resize z-20",style:{width:6},onPointerDown:N=>f(N,M,"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:N=>f(N,M,"end",C.start,C.end)})]},M)})})}):null});function dT(n){const e=[];let t=0;for(const r of n.groupOrder){const i=n.groups.get(r);if(i)for(const s of i.segmentIds){const o=n.segments.get(s);if(o&&Object.keys(o.style).length>0){const c={wordIndex:t};o.wordId&&(c.wordId=o.wordId);const u=o.style;u.x!==void 0&&(c.x=u.x),u.y!==void 0&&(c.y=u.y),u.scaleX!==void 0&&(c.scale=u.scaleX),u.rotation!==void 0&&(c.rotation=u.rotation),u.activeColor!==void 0&&(c.activeColor=u.activeColor),u.dimColor!==void 0&&(c.dimColor=u.dimColor),u.opacity!==void 0&&(c.opacity=u.opacity),u.fontSize!==void 0&&(c.fontSize=u.fontSize),u.fontWeight!==void 0&&(c.fontWeight=u.fontWeight),u.fontFamily!==void 0&&(c.fontFamily=u.fontFamily),e.push(c)}t++}}return e}function hT(n){const e=h.useRef(n);e.current=n;const t=h.useRef(null),r=h.useRef(!1),i=h.useCallback(()=>{const o=dt.getState();if(!o.model||!o.sourceFilePath||!o.isEditMode)return;const c=e.current;if(!c)return;const u=dT(o.model);fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:JSON.stringify(u,null,2)}).catch(f=>console.warn("[captions] auto-save failed:",f))},[]);Lt(()=>{let o=dt.getState().model;const c=dt.subscribe(u=>{if(!(!u.isEditMode||u.model===o||!u.model)){if(o=u.model,r.current){r.current=!1;return}t.current&&clearTimeout(t.current),t.current=setTimeout(i,800)}});return()=>{c(),t.current&&clearTimeout(t.current)}});const s=h.useCallback(async()=>{const o=dt.getState();if(!o.model||!o.sourceFilePath)return;const c=e.current;if(c)try{const u=await fetch(`/api/projects/${c}/files/${encodeURIComponent("caption-overrides.json")}`);if(!u.ok)return;const f=await u.json();if(!f.content)return;const p=JSON.parse(f.content);if(!Array.isArray(p))return;const O=o.model,y=[];for(const S of O.groupOrder){const b=O.groups.get(S);if(b)for(const P of b.segmentIds)y.push(P)}const v=new Map(O.segments);for(const S of p){const b=y[S.wordIndex];if(!b)continue;const P=v.get(b);if(!P)continue;const A={...P.style};S.x!==void 0&&(A.x=S.x),S.y!==void 0&&(A.y=S.y),S.scale!==void 0&&(A.scaleX=S.scale,A.scaleY=S.scale),S.rotation!==void 0&&(A.rotation=S.rotation),S.activeColor!==void 0&&(A.activeColor=S.activeColor),S.dimColor!==void 0&&(A.dimColor=S.dimColor),S.opacity!==void 0&&(A.opacity=S.opacity),S.fontSize!==void 0&&(A.fontSize=S.fontSize),S.fontWeight!==void 0&&(A.fontWeight=S.fontWeight),S.fontFamily!==void 0&&(A.fontFamily=S.fontFamily),v.set(b,{...P,style:A})}r.current=!0,dt.getState().setModel({...O,segments:v})}catch{}},[]);return{save:i,loadOverrides:s}}const Bx={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"},fT={backgroundColor:"transparent",backgroundOpacity:0,paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0,borderRadius:0,borderWidth:0,borderColor:"transparent",borderStyle:"solid",boxShadow:"none"},q8={preset:"fade",duration:.2,ease:"power2.out",stagger:0,staggerDirection:"start",intensity:1},Ll={entrance:q8,highlight:null,exit:{...q8}};function pT(n,e){const{width:t,height:r,duration:i,wordsPerGroup:s=5}=e,o=new Map,c=new Map,u=[];for(let f=0;f<n.length;f+=s){const p=n.slice(f,f+s),O=`group-${f/s}`,y=[];p.forEach((S,b)=>{const P=`segment-${f+b}`,A={id:P,wordId:S.id??`w${f+b}`,text:S.text,start:S.start,end:S.end,groupIndex:b,style:{},animation:{}};o.set(P,A),y.push(P)});const v={id:O,segmentIds:y,style:{...Bx},animation:{entrance:{...Ll.entrance},highlight:Ll.highlight,exit:{...Ll.exit}},containerStyle:{...fT}};c.set(O,v),u.push(O)}return{width:t,height:r,duration:i,segments:o,groups:c,groupOrder:u,defaultAnimation:{entrance:{...Ll.entrance},highlight:Ll.highlight,exit:{...Ll.exit}}}}function mT(n){const e=/(?:const|let|var)\s+(?:TRANSCRIPT|script)\s*=\s*(\[[\s\S]*?\]);/,t=n.match(e);if(!t)return[];const r=t[1];try{return OT(r)}catch{return[]}}function gT(n,e,t,r,i,s){const o=mT(t);if(o.length===0)return null;const c=n.querySelectorAll(".caption-group, .caption-line, .caption-block"),u=n.querySelectorAll(".word, .caption-word");let f=5;c.length>0&&u.length>0&&(f=Math.round(u.length/c.length),f<1&&(f=1));const p=pT(o,{width:r,height:i,duration:s,wordsPerGroup:f}),O=u.item(0),y=c.item(0),v=O??y;if(v){const S=e.getComputedStyle(v),b={},P=parseFloat(S.fontSize);!isNaN(P)&&P>0&&(b.fontSize=P);const A=S.fontWeight;if(A){const j=parseInt(A,10);b.fontWeight=isNaN(j)?A:j}const z=S.fontFamily;z&&(b.fontFamily=z);const M=S.color;M&&(b.color=M);const C=S.textTransform;(C==="none"||C==="uppercase"||C==="lowercase"||C==="capitalize")&&(b.textTransform=C);const Z=S.letterSpacing;if(Z&&Z!=="normal"){const j=parseFloat(Z),N=b.fontSize??Bx.fontSize;!isNaN(j)&&N>0&&(b.letterSpacing=j/N)}const H={};if(y){const j=e.getComputedStyle(y),N=j.backgroundColor;N&&N!=="rgba(0, 0, 0, 0)"&&N!=="transparent"&&(H.backgroundColor=N,H.backgroundOpacity=1);const ne=parseFloat(j.borderRadius);!isNaN(ne)&&ne>0&&(H.borderRadius=ne);const se=parseFloat(j.paddingTop),le=parseFloat(j.paddingRight),T=parseFloat(j.paddingBottom),re=parseFloat(j.paddingLeft);isNaN(se)||(H.paddingTop=se),isNaN(le)||(H.paddingRight=le),isNaN(T)||(H.paddingBottom=T),isNaN(re)||(H.paddingLeft=re)}for(const j of p.groupOrder){const N=p.groups.get(j);N&&(N.style={...N.style,...b},N.containerStyle={...N.containerStyle,...H})}}return p}function OT(n){let e;try{e=JSON.parse(n)}catch{let r=n;r=r.replace(/'((?:[^'\\]|\\.)*)'/g,(i,s)=>`"${s.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 t=[];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;t.push({text:i.text,start:i.start,end:i.end})}return t}function ll(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function U8(n,e){return e==='"'?n.replace(/"/g,"&quot;"):n.replace(/'/g,"&#39;")}function xT(n){const e=[];let t="",r=null,i=!1,s=0;for(const o of n){if(i){t+=o,o===";"&&(i=!1);continue}if(o==="&"){i=!0,t+=o;continue}if(r){t+=o,o===r&&(r=null);continue}if(o==='"'||o==="'"){r=o,t+=o;continue}if(o==="("){s+=1,t+=o;continue}if(o===")"){s=Math.max(0,s-1),t+=o;continue}if(o===";"&&s===0){e.push(t),t="";continue}t+=o}return t&&e.push(t),e}function yT(n,e,t,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${ll(e)}\\2[^>]*)>`,"i").exec(n);if(!s)return n;const o=s[1];return Yx(n,o,t,r)}function Yx(n,e,t,r){if(!e)return n;const i=/\bstyle=(["'])([\s\S]*?)\1/.exec(e);if(i){const s=i[2],o=i[1],c=new Map;for(const p of xT(s)){const O=p.indexOf(":");if(O<0)continue;const y=p.slice(0,O).trim(),v=p.slice(O+1).trim();y&&c.set(y,v)}c.set(t,r);const u=Array.from(c.entries()).map(([p,O])=>`${p}: ${U8(O,o)}`).join("; "),f=e.replace(i[0],`style=${o}${u}${o}`);return n.replace(e,f)}else{const s=e.replace(/>$/,"")+` style="${t}: ${U8(r,'"')}"`;return n.replace(e,s)}}function vT(n,e,t,r){const i=Ua(n,e);if(!i)return n;const s=Yx(i.tag,i.tag,t,r);return kf(n,i,s)}function kf(n,e,t){return`${n.slice(0,e.start)}${t}${n.slice(e.end)}`}function Ua(n,e){if(e.id){const s=new RegExp(`(<[^>]*\\bid=(["'])${ll(e.id)}\\2[^>]*)>`,"i").exec(n);if((s==null?void 0:s.index)!=null)return{tag:s[1],start:s.index,end:s.index+s[1].length}}if(!e.selector)return null;const t=e.selector.match(/^\[data-composition-id="([^"]+)"\]$/);if(t){const i=t[1],o=new RegExp(`(<[^>]*\\bdata-composition-id=(["'])${ll(i)}\\2[^>]*)>`,"i").exec(n);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],s=new RegExp(`(<[^>]*\\bclass=(["'])[^"']*\\b${ll(i)}\\b[^"']*\\2[^>]*)>`,"gi"),o=e.selectorIndex??0;let c,u=0;for(;(c=s.exec(n))!==null;){if(u===o&&c.index!=null)return{tag:c[1],start:c.index,end:c.index+c[1].length};u+=1}}return null}function G8(n,e,t){const r=Ua(n,e);if(!r)return;const i=t.startsWith("data-")?t:`data-${t}`,s=new RegExp(`\\b${i}=(["'])([^"']*)\\1`).exec(r.tag);return s==null?void 0:s[2]}function wT(n,e){const t=Ua(n,e);return t==null?void 0:t.tag}function ST(n,e,t,r){const i=Ua(n,e);if(!i)return n;const s=t.startsWith("data-")?t:`data-${t}`,o=new RegExp(`\\b${s}=(["'])([^"']*)\\1`),c=i.tag;if(o.test(c)){const f=c.replace(o,`${s}="${r}"`);return kf(n,i,f)}const u=c+` ${s}="${r}"`;return kf(n,i,u)}function bT(n,e,t,r){const s=new RegExp(`(<[^>]*\\bid=(["'])${ll(e)}\\2[^>]*)>`,"i").exec(n);if(!s)return n;const o=s[1],c=t.startsWith("data-")?t:`data-${t}`,u=new RegExp(`\\b${c}=(["'])([^"']*)\\1`);if(u.test(o)){const f=o.replace(u,`${c}="${r}"`);return n.replace(o,f)}else{const f=o+` ${c}="${r}"`;return n.replace(o,f)}}function kT(n,e,t){const i=new RegExp(`(<([a-z0-9-]+)[^>]*\\bid=(["'])${ll(e)}\\3[^>]*>)`,"i").exec(n);if(!i||i.index==null)return n;const s=i[1],o=i[2],c=i.index+s.length,u=qx(n,o,c);return u<0?n:`${n.slice(0,c)}${t}${n.slice(u)}`}function qx(n,e,t){const r=new RegExp(`</?${ll(e)}\\b[^>]*>`,"gi");r.lastIndex=t;let i=1,s;for(;(s=r.exec(n))!==null;){const o=s[0];if(o.startsWith("</")){if(i-=1,i===0)return s.index;continue}o.endsWith("/>")||(i+=1)}return-1}function $T(n,e,t){const r=Ua(n,e);if(!r)return n;const i=/^<([a-z0-9-]+)/i.exec(r.tag),s=i==null?void 0:i[1];if(!s)return n;const o=qx(n,s,r.end+1);return o<0?n:`${n.slice(0,r.end+1)}${t}${n.slice(o)}`}function PT(n,e,t){switch(t.type){case"inline-style":return yT(n,e,t.property,t.value);case"attribute":return bT(n,e,t.property,t.value);case"text-content":return kT(n,e,t.value);default:return n}}function Ii(n,e,t){if(e.id){const r=PT(n,e.id,t);if(r!==n||!e.selector)return r}switch(t.type){case"inline-style":return vT(n,e,t.property,t.value);case"attribute":return ST(n,e,t.property,t.value);case"text-content":return $T(n,e,t.value);default:return n}}var QT=Z6();function br(n){return Math.max(0,Math.min(255,Math.round(n)))}function Pp(n){return Math.max(0,Math.min(1,n))}function mh(n){return br(n).toString(16).padStart(2,"0")}function AT(n){return`${Math.round(Pp(n)*100)/100}`}function Ga(n){const e=n.trim().toLowerCase();if(!e)return null;if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const t=e.match(/^#([0-9a-f]{3})$/i);if(t){const[s,o,c]=t[1].split("");return{red:Number.parseInt(s+s,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:br(Number.parseFloat(i[1])),green:br(Number.parseFloat(i[2])),blue:br(Number.parseFloat(i[3])),alpha:Pp(i[4]!=null?Number.parseFloat(i[4]):1)}:null}function $f(n){const e=Ga(n);return e?Wu(e):"#000000"}function Wu(n){return`#${mh(n.red)}${mh(n.green)}${mh(n.blue)}`}function bu(n){const e=br(n.red),t=br(n.green),r=br(n.blue),i=Pp(n.alpha);return i>=1?`rgb(${e}, ${t}, ${r})`:`rgba(${e}, ${t}, ${r}, ${AT(i)})`}function CT(n){const e=br(n.red)/255,t=br(n.green)/255,r=br(n.blue)/255,i=Math.max(e,t,r),s=Math.min(e,t,r),o=i-s;let c=0;return o!==0&&(i===e?c=60*((t-r)/o%6):i===t?c=60*((r-e)/o+2):c=60*((e-t)/o+4)),c<0&&(c+=360),{hue:c,saturation:i===0?0:o/i,value:i}}function K8(n){const e=(n.hue%360+360)%360/60,t=Math.max(0,Math.min(1,n.saturation)),r=Math.max(0,Math.min(1,n.value)),i=r*t,s=i*(1-Math.abs(e%2-1)),o=r-i;let c=0,u=0,f=0;return e>=0&&e<1?(c=i,u=s):e>=1&&e<2?(c=s,u=i):e>=2&&e<3?(u=i,f=s):e>=3&&e<4?(u=s,f=i):e>=4&&e<5?(c=s,f=i):(c=i,f=s),{red:br((c+o)*255),green:br((u+o)*255),blue:br((f+o)*255)}}const MT=["closest-side","closest-corner","farthest-side","farthest-corner"];function Ux(n){return n===" "||n===`
85
- `||n==="\r"||n===" "||n==="\f"}function Pf(n){return n!=null&&n>="0"&&n<="9"}function Gx(n){if(!n)return!1;let e=n[0]==="-"?1:0,t=0;for(;Pf(n[e]);)e+=1,t+=1;if(n[e]===".")for(e+=1;Pf(n[e]);)e+=1,t+=1;return t>0&&e===n.length}function Qp(n){if(!n)return null;const e=n.trim();if(!Gx(e))return null;const t=Number(e);return Number.isFinite(t)?t:null}function Ap(n){const e=[];let t="";for(const r of n){if(Ux(r)){t&&(e.push(t),t="");continue}t+=r}return t&&e.push(t),e}function Ul(n,e){return Ap(n.toLowerCase()).includes(e)}function $0(n,e){if(!(n!=null&&n.endsWith("%")))return e;const t=Qp(n.slice(0,-1));return t==null?e:Ka(t,0,100)}function Kx(n){const e=n==null?void 0:n.trim().toLowerCase();return e!=null&&e.endsWith("deg")?Qp(e.slice(0,-3)):null}function TT(n){if(!n.endsWith("%"))return null;const e=n.slice(0,-1).trimEnd();let t=e.length;for(;t>0&&(Pf(e[t-1])||e[t-1]===".");)t-=1;t>0&&e[t-1]==="-"&&(t-=1);const r=e.slice(t);return!Gx(r)||t===0||!Ux(e[t-1])?null:t}function Ka(n,e,t){return Math.min(t,Math.max(e,n))}function yi(n){return Math.round(n*100)/100}function ET(n,e){const t=Qp(n);return t==null?e:Ka(t,0,100)}function Cp(n){const e=n.trim(),t=TT(e);if(t==null)return{color:e,position:null};const r=e.slice(0,-1).trimEnd();return{color:r.slice(0,t).trim(),position:ET(r.slice(t),0)}}function W0(n){return n.length===0?[{color:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}]:n.length===1?[{color:n[0].color,position:0},{color:n[0].color,position:100}]:n.map((t,r)=>({color:t.color,position:t.position??r/(n.length-1)*100})).map(t=>({color:t.color,position:yi(Ka(t.position,0,100))}))}function ZT(n){const e=[];let t="",r=0;for(const i of n){if(i==="("&&(r+=1),i===")"&&(r=Math.max(0,r-1)),i===","&&r===0){t.trim()&&e.push(t.trim()),t="";continue}t+=i}return t.trim()&&e.push(t.trim()),e}function jT(n){const e=n.trim().toLowerCase(),t={"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 t?t[e]:null}function RT(n){const e=n[0]??"",t=jT(e),r=Kx(e),i=r!=null,s=r??t??180,o=i||t!=null?n.slice(1):n;return{kind:"linear",repeating:!1,angle:s,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:W0(o.map(Cp))}}function VT(n){const e=n[0]??"",t=e.toLowerCase(),r=Ul(t,"at")||Ul(t,"circle")||Ul(t,"ellipse")||t.includes("closest-")||t.includes("farthest-"),i=r?e:"",s=r?n.slice(1):n,o=i.toLowerCase(),c=Ap(o),u=c.indexOf("at"),f=Ul(o,"circle")?"circle":"ellipse",p=MT.find(O=>c.includes(O))??"farthest-corner";return{kind:"radial",repeating:!1,angle:180,centerX:$0(c[u+1],50),centerY:$0(c[u+2],50),shape:f,radialSize:p,stops:W0(s.map(Cp))}}function LT(n){const e=n[0]??"",t=e.toLowerCase(),r=Ul(t,"from")||Ul(t,"at"),i=r?e:"",s=r?n.slice(1):n,o=Ap(i.toLowerCase()),c=o.indexOf("from"),u=o.indexOf("at");return{kind:"conic",repeating:!1,angle:Kx(o[c+1])??0,centerX:$0(o[u+1],50),centerY:$0(o[u+2],50),shape:"ellipse",radialSize:"farthest-corner",stops:W0(s.map(Cp))}}function Qf(n){return{kind:"linear",repeating:!1,angle:135,centerX:50,centerY:50,shape:"ellipse",radialSize:"farthest-corner",stops:W0([{color:n&&n!=="transparent"?n:"rgba(60, 230, 172, 0.18)",position:0},{color:"rgba(255, 255, 255, 0.04)",position:100}])}}function NT(n){if(!n||n==="none")return null;const e=n.trim(),t=e.indexOf("(");if(t<=0||!e.endsWith(")"))return null;const r=e.slice(0,t).toLowerCase(),s={"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(!s)return null;const{kind:o,repeating:c}=s,u=ZT(e.slice(t+1,-1));return{...o==="linear"?RT(u):o==="radial"?VT(u):LT(u),repeating:c}}function XT(n){return`${n.color} ${yi(n.position)}%`}function P0(n){const e=`${n.repeating?"repeating-":""}${n.kind}-gradient`,t=n.stops.map(XT).join(", ");return n.kind==="linear"?`${e}(${yi(n.angle)}deg, ${t})`:n.kind==="radial"?`${e}(${n.shape} ${n.radialSize} at ${yi(n.centerX)}% ${yi(n.centerY)}%, ${t})`:`${e}(from ${yi(n.angle)}deg at ${yi(n.centerX)}% ${yi(n.centerY)}%, ${t})`}function gh(n,e,t){return Math.round(n+(e-n)*t)}function Oh(n){return n.toString(16).padStart(2,"0")}function _T(n,e){var P;const t=Ka(e,0,100),r=[...n.stops].sort((A,z)=>A.position-z.position),i=r.find(A=>Math.abs(A.position-t)<.001);if(i)return i.color;const s=r.find(A=>A.position>t)??r.at(-1),o=[...r].reverse().find(A=>A.position<t)??r[0];if(!o||!s)return((P=r[0])==null?void 0:P.color)??"rgba(255, 255, 255, 1)";if(o===s)return o.color;const c=o.color,u=s.color,f=c?e6(c):null,p=u?e6(u):null;if(!f||!p)return o.color;const O=(t-o.position)/Math.max(1,s.position-o.position),y=gh(f.red,p.red,O),v=gh(f.green,p.green,O),S=gh(f.blue,p.blue,O),b=yi(f.alpha+(p.alpha-f.alpha)*O);return b>=1?`#${Oh(y)}${Oh(v)}${Oh(S)}`.toUpperCase():`rgba(${y}, ${v}, ${S}, ${b})`}function J8(n,e){const t=yi(Ka(e,0,100)),r=_T(n,t),i=[...n.stops,{color:r,position:t}].sort((s,o)=>s.position-o.position);return{...n,stops:i}}function e6(n){const e=n.trim().toLowerCase();if(e==="transparent")return{red:0,green:0,blue:0,alpha:0};const t=e.match(/^#([0-9a-f]{6})$/i);if(t)return{red:Number.parseInt(t[1].slice(0,2),16),green:Number.parseInt(t[1].slice(2,4),16),blue:Number.parseInt(t[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}const Jx=["position","display","top","left","right","bottom","inset","width","height","gap","justify-content","align-items","flex-direction","font-size","font-weight","font-family","color","background-color","background-image","opacity","mix-blend-mode","border-radius","border-color","outline-color","overflow","box-shadow","z-index","transform"];function lo(n){return typeof n=="object"&&n!==null&&"nodeType"in n&&typeof n.nodeType=="number"&&n.nodeType===1}function ws(n){if(!n)return null;const e=n.trim();if(!e.endsWith("px"))return null;const t=parseFloat(e);return Number.isFinite(t)?t:null}function DT(n){const e=(n??"none").trim();if(!e||e==="none")return!0;const t=e.match(/^matrix\(([^)]+)\)$/i);if(t){const o=t[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 s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return i.every((o,c)=>Math.abs(o-s[c])<1e-4)}function t6(n){return!!(n!=null&&n.split(/\s+/).includes("clip"))}function zT(n){return!!(n&&["a","b","em","i","small","span","strong","sub","sup"].includes(n.toLowerCase()))}function IT(n){return!!(n&&["article","aside","canvas","div","figure","footer","header","img","main","section","svg","video"].includes(n.toLowerCase()))}function FT(n){return!!(n&&["block","flex","flow-root","grid","inline-block","inline-flex","inline-grid","list-item","table"].includes(n))}function HT(n){return["div","span","p","strong","h1","h2","h3","h4","h5","h6"].includes(n)}function ey(n){var r;const e={},t=(r=n.ownerDocument.defaultView)==null?void 0:r.getComputedStyle(n);if(!t)return e;for(const i of Jx){const s=t.getPropertyValue(i);s&&(e[i]=s)}return e}function ty(n,e){let t=n;for(;t;){const r=t;if(e.some(i=>r.hasAttribute(i)))return r;t=t.parentElement}return null}function WT(n){return ty(n,["data-composition-src","data-composition-file"])}function wa(n,e){const t=ty(n,["data-composition-id"]),r=(t==null?void 0:t.getAttribute("data-composition-file"))??(t==null?void 0:t.getAttribute("data-composition-src"))??e??"index.html";return{sourceFile:r,compositionPath:r}}function BT(n,e){if(e.preferClipAncestor){const r=n.closest(".clip");if(lo(r))return r}if(!e.isMasterView)return n;const t=WT(n);return t&&t!==n?t:n}function ny(n){const e=n.className.split(/\s+/).map(r=>r.trim()).filter(Boolean);if(e.length===0)return;const t=e.find(r=>r!=="clip"&&!r.startsWith("__hf-"))??e[0];return t?`.${t}`:void 0}function ku(n){var e;return((e=n.replace(/\.html$/i,"").replace(/^compositions\//i,"").split("/").at(-1))==null?void 0:e.replace(/[-_]+/g," ").replace(/\b\w/g,t=>t.toUpperCase()))??n}function YT(n){if(n.id)return`#${n.id}`;const e=n.getAttribute("data-composition-id");return e?`[data-composition-id="${e}"]`:ny(n)}function qT(n,e,t,r,i){if(!(t!=null&&t.startsWith(".")))return;const o=Array.from(n.querySelectorAll(t)).filter(c=>lo(c)&&wa(c,i).sourceFile===r).indexOf(e);return o>=0?o:void 0}function UT(n){const e=n.getAttribute("data-composition-id");if(e&&e!=="main")return ku(e);const t=n.getAttribute("data-composition-src")??n.getAttribute("data-composition-file");if(t)return ku(t);if(n.id)return ku(n.id);const r=ny(n);if(r)return ku(r.replace(/^\./,""));const i=(n.textContent??"").trim().replace(/\s+/g," ");return i?i.length>40?`${i.slice(0,39)}…`:i:n.tagName.toLowerCase()}function GT(n){const e={};for(const t of n.attributes)t.name.startsWith("data-")&&(e[t.name.slice(5)]=t.value);return e}function ry(n){const e={};for(const t of Jx){const r=n.style.getPropertyValue(t);r&&(e[t]=r)}return e}function n6(n){return HT(n.tagName.toLowerCase())&&n.children.length===0}function KT(n,e,t,r){return r==="self"||t===1?"Content":`Text ${e+1}`}function r6(n,e,t,r){const i=n.tagName.toLowerCase();return{key:n.getAttribute("data-hf-text-key")??`${r}:${e}:${i}`,label:KT(i,e,t,r),value:n.textContent??"",tagName:i,attributes:Array.from(n.attributes).filter(o=>o.name!=="style").map(o=>({name:o.name,value:o.value})),inlineStyles:ry(n),computedStyles:ey(n),source:r}}function JT(n){const e=Array.from(n.children).filter(lo).filter(n6);return e.length>0?e.map((t,r)=>r6(t,r,e.length,"child")):n6(n)?[r6(n,0,1,"self")]:[]}function eE(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function tE(n){const e=Object.entries(n.inlineStyles).filter(([,t])=>!!t);return e.length===0?"":e.map(([t,r])=>`${t}: ${r}`).join("; ")}function i6(n){return n.filter(e=>e.source==="child").map(e=>{const t=[...e.attributes.filter(s=>s.name!=="data-hf-text-key"),{name:"data-hf-text-key",value:e.key}].map(s=>` ${s.name}="${s.value.replace(/"/g,"&quot;")}"`).join(""),r=tE(e),i=r?` style="${r.replace(/"/g,"&quot;")}"`:"";return`<${e.tagName}${t}${i}>${eE(e.value)}</${e.tagName}>`}).join("")}function nE(n){var e,t,r,i;return{key:`child:new:${Date.now()}`,label:"Text",value:"New text",tagName:"span",attributes:[],inlineStyles:{"font-family":((e=n==null?void 0:n.computedStyles)==null?void 0:e["font-family"])??"inherit","font-size":((t=n==null?void 0:n.computedStyles)==null?void 0:t["font-size"])??"16px","font-weight":((r=n==null?void 0:n.computedStyles)==null?void 0:r["font-weight"])??"400",color:((i=n==null?void 0:n.computedStyles)==null?void 0:i.color)??"inherit"},computedStyles:{},source:"child"}}function iy(n){if(!n.selector)return{canSelect:!1,canEditStyles:!1,canMove:!1,canResize:!1,canDetachFromLayout:!1,reasonIfDisabled:"Studio could not resolve a stable patch target for this element."};const e=n.computedStyles.position,t=ws(n.inlineStyles.left)??ws(n.computedStyles.left),r=ws(n.inlineStyles.top)??ws(n.computedStyles.top),i=ws(n.inlineStyles.width)??ws(n.computedStyles.width),s=ws(n.inlineStyles.height)??ws(n.computedStyles.height),o=!DT(n.computedStyles.transform),c=(e==="absolute"||e==="fixed")&&t!=null&&r!=null&&!o,u=c&&(i!=null||s!=null),f=n.isCompositionHost||t6(n.className)||IT(n.tagName)||FT(n.computedStyles.display),p=!c&&!o&&f&&(!zT(n.tagName)||t6(n.className)),O=c?void 0:p?"This layer is controlled by layout.":"Direct move/resize is limited to absolute or fixed elements with px geometry and no transform-driven layout.";return n.isCompositionHost&&n.isMasterView?{canSelect:!0,canEditStyles:!1,canMove:c,canResize:u,canDetachFromLayout:p,reasonIfDisabled:O}:{canSelect:!0,canEditStyles:!0,canMove:c,canResize:u,canDetachFromLayout:p,reasonIfDisabled:O}}function s6(n,e){var i;if(!n)return null;const t=n.ownerDocument;let r=BT(n,e);for(;r&&r!==t.body&&r!==t.documentElement;){const s=YT(r);if(!s){r=r.parentElement;continue}const{sourceFile:o,compositionPath:c}=wa(r,e.activeCompositionPath),u=qT(t,r,s,o,e.activeCompositionPath),f=r.getAttribute("data-composition-src")??r.getAttribute("data-composition-file")??void 0,p=ry(r),O=ey(r),y=JT(r),v=iy({selector:s,tagName:r.tagName.toLowerCase(),className:r.className,inlineStyles:p,computedStyles:O,isCompositionHost:!!f,isMasterView:e.isMasterView}),S=r.getBoundingClientRect();return{element:r,id:r.id||void 0,selector:s,selectorIndex:u,sourceFile:o,compositionPath:c,compositionSrc:f,isCompositionHost:!!f,label:UT(r),tagName:r.tagName.toLowerCase(),boundingBox:{x:S.left,y:S.top,width:S.width,height:S.height},textContent:((i=r.textContent)==null?void 0:i.trim())||null,dataAttributes:GT(r),inlineStyles:p,computedStyles:O,textFields:y,capabilities:v}}return null}function Fi(n,e,t=null){if(e.id){const i=n.getElementById(e.id);if(lo(i)&&(!e.sourceFile||wa(i,t).sourceFile===e.sourceFile))return i}return e.selector?e.selector.startsWith(".")&&e.selectorIndex!=null?Array.from(n.querySelectorAll(e.selector)).filter(s=>lo(s)&&(!e.sourceFile||wa(s,t).sourceFile===e.sourceFile))[e.selectorIndex]??null:Array.from(n.querySelectorAll(e.selector)).filter(i=>lo(i)&&(!e.sourceFile||wa(i,t).sourceFile===e.sourceFile))[0]??null:null}function rE(n,e){return[{type:"inline-style",property:"left",value:`${Math.round(n)}px`},{type:"inline-style",property:"top",value:`${Math.round(e)}px`}]}function iE(n,e){return[{type:"inline-style",property:"width",value:`${Math.round(n)}px`},{type:"inline-style",property:"height",value:`${Math.round(e)}px`}]}function sE(n){return[{type:"inline-style",property:"position",value:"absolute"},{type:"inline-style",property:"left",value:`${Math.round(n.left)}px`},{type:"inline-style",property:"top",value:`${Math.round(n.top)}px`},{type:"inline-style",property:"width",value:`${Math.round(n.width)}px`},{type:"inline-style",property:"height",value:`${Math.round(n.height)}px`},{type:"inline-style",property:"margin",value:"0"},{type:"inline-style",property:"right",value:"auto"},{type:"inline-style",property:"bottom",value:"auto"}]}function $u(n,e){return{type:"inline-style",property:n,value:e}}function l6(n){return{type:"text-content",property:"text",value:n}}function lE(n){return`x=${Math.round(n.x)}, y=${Math.round(n.y)}, width=${Math.round(n.width)}, height=${Math.round(n.height)}`}function o6(n){return Object.entries(n).filter(([,e])=>e&&e!=="initial").map(([e,t])=>`${e}: ${t}`).join(`
86
- `)}function oE(n){return n.map(e=>`- key=${e.key}; tag=<${e.tagName}>; source=${e.source}; text="${e.value.replace(/"/g,'\\"')}"`).join(`
87
- `)}function aE({selection:n,currentTime:e,tagSnippet:t,userInstruction:r,sourceFilePath:i}){const s=(i==null?void 0:i.trim())||n.sourceFile,o=["## HyperFrames element edit request v1","Schema version: 1","",(r==null?void 0:r.trim())||"Edit this selected HyperFrames element.","",`Composition: ${n.compositionPath}`,`Playback time: ${sr(e)}`,`Source file: ${s}`,`DOM id: ${n.id??"(none)"}`,`Selector: ${n.selector??"(none)"}`,`Selector index: ${n.selectorIndex??0}`,`Tag: <${n.tagName}>`,`Bounds: ${lE(n.boundingBox)}`];n.textContent&&o.push(`Text: ${n.textContent}`);const c=oE(n.textFields);c&&o.push("","Text fields:",c);const u=o6(n.inlineStyles);u&&o.push("","Inline styles:",u);const f=o6(n.computedStyles);return f&&o.push("","Computed styles (browser-resolved):",f),t&&o.push("","Target HTML:",t),o.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."),o.join(`
88
- `)}function sy(n){return n.textFields.length>0&&!n.isCompositionHost}const a6=["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"],Af=["TT Norms Pro","SF Pro Display","SF Pro Text","Avenir","Avenir Next","Helvetica Neue","Arial","Georgia","Times New Roman","Menlo","Monaco","Courier New"];function ly(n){return`https://fonts.googleapis.com/css2?family=${encodeURIComponent(n.trim()).replace(/%20/g,"+")}:wght@300;400;500;600;700;800;900&display=swap`}const cE=/\.(eot|otf|ttc|ttf|woff2?)$/i,c6=/\s+(thin|extralight|extra light|light|regular|roman|medium|semibold|semi bold|bold|extrabold|extra bold|black|italic|oblique|variable)$/i;function u6(n){return JSON.stringify(n)}function Gl(n){const e=decodeURIComponent(n.split(/[\\/]/).pop()??n).replace(cE,"");let t=e.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").replace(/\s+/g," ").trim();for(;c6.test(t);)t=t.replace(c6,"").trim();return t||e}function Mp(n,e=n.url){return`@font-face { font-family: ${u6(n.family)}; src: url(${u6(e)}); font-display: swap; }`}function xh(n,e,t){return Math.max(e,Math.min(t,n))}function uE(n,e,t,r){const o=Math.max(12,e.width-t.width-12),c=n.left+n.width/2-t.width/2,u=xh(c,12,o),f=n.bottom+8,p=n.top-t.height-8,O=f+t.height<=e.height-12,y=p>=12;return O||!y?{left:u,top:xh(f,12,Math.max(12,e.height-t.height-12)),placement:"bottom"}:{left:u,top:xh(p,12,Math.max(12,e.height-t.height-12)),placement:"top"}}const Kr="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",or="text-[11px] font-medium uppercase tracking-[0.18em] text-neutral-500",Kl="grid grid-cols-[repeat(auto-fit,minmax(118px,1fr))] gap-3",dE={},oy=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"]),hE=[...Af,"Inter","system-ui","sans-serif","serif","monospace"],d6={width:292,height:386};function fE(n){return["Make this selected HyperFrames element movable in Studio.",`Studio blocked direct move/resize because: ${n}`,"Refactor only this element safely.","Preserve its current visual position, timing, and sibling layout intent where possible.","If it is transform-driven, replace transform-based positioning with absolute pixel geometry.","If layout flow owns it, detach conservatively with position: absolute, px left/top/width/height, and margin: 0."].join(" ")}function yh(n){return Ga(n)??{red:0,green:0,blue:0,alpha:1}}function h6(n){return n.replace(/[^\w .-]+/g," ").replace(/\s+/g," ").trim()}function Pu(n){var r,i;const e=((r=n.style)==null?void 0:r.toLowerCase())??"",t=((i=n.fullName)==null?void 0:i.toLowerCase())??"";return e==="regular"||t.endsWith(" regular")?0:e==="normal"||t.endsWith(" normal")?1:e==="medium"||t.endsWith(" medium")?2:3}function f6(n){if(!n)return null;const e=Number.parseFloat(n);return Number.isFinite(e)?e:null}function fa(n){const e=Math.round(n*100)/100;return Number.isInteger(e)?`${e}`:e.toFixed(2).replace(/0+$/,"").replace(/\.$/,"")}function ay(n){if(!n)return null;const e=n.trim().match(/^(-?\d+(?:\.\d+)?)([a-z%]*)$/i);if(!e)return null;const t=Number.parseFloat(e[1]);return Number.isFinite(t)?{value:t,unit:e[2]??""}:null}function p6(n,e,t){const r=ay(n);if(!r)return null;const i=t!=null&&t.altKey?.1:t!=null&&t.shiftKey?10:1,s=r.value+i*e;return`${fa(s)}${r.unit}`}function pE(n){const e=Ga(n);return e?`${$f(n).replace(/^#/,"").toUpperCase()} / ${Math.round(e.alpha*100)}%`:n}function mE(n){if(!n)return"";const t=n.toLowerCase().indexOf("url(");if(t<0)return"";let r=t+4;for(;r<n.length&&(n[r]===" "||n[r]===`
89
- `||n[r]==="\r"||n[r]===" "||n[r]==="\f");)r+=1;const i=n[r]==='"'||n[r]==="'"?n[r]:null;if(i){r+=1;const o=n.indexOf(i,r);return o>=r?n.slice(r,o):""}const s=n.indexOf(")",r);return s<r?"":n.slice(r,s).trim()}function Da(n){const e=n.trim(),t=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(t).replace(/\\/g,"/").replace(/^\.?\//,"")}function gE(n,e){const t=Da(n).split("/").filter(Boolean),r=Da(e).split("/").filter(Boolean);for(t.pop();t.length>0&&r.length>0&&t[0]===r[0];)t.shift(),r.shift();return[...t.map(()=>".."),...r].join("/")||e}function m6(n){return Da(n)}function OE(n,e,t){const r=Da(n);if(!r)return null;for(const i of t){const s=Da(i),o=gE(e,i);if(r===s||r===o||r.endsWith(`/${s}`)||r.endsWith(`/${o}`))return i}return null}function xE(n){const e=[{source:"Fill",value:n["background-color"]},{source:"Text",value:n.color}],t=new Map;for(const r of e){if(!r.value)continue;const i=Ga(r.value);if(!i||i.alpha<=0)continue;const s=`${$f(r.value)}-${Math.round(i.alpha*100)}`,o=t.get(s);if(o){o.sources.push(r.source);continue}t.set(s,{swatch:$f(r.value),token:pE(r.value),sources:[r.source]})}return Array.from(t.values())}function cy({value:n,disabled:e,liveCommit:t,onCommit:r}){const[i,s]=h.useState(n),o=h.useRef(null),c=h.useRef(n);c.current=n,h.useEffect(()=>{s(n)},[n]),h.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const u=p=>{o.current&&clearTimeout(o.current),p!==c.current&&r(p)},f=p=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{p!==c.current&&r(p)},120)};return g.jsx("input",{type:"text",value:i,disabled:e,onChange:p=>{s(p.target.value),t&&f(p.target.value)},onBlur:()=>u(i),onWheel:p=>{if(e)return;const O=p.deltaY===0?p.deltaX:p.deltaY;if(O===0)return;const y=p6(i,O<0?1:-1,p);y&&(p.preventDefault(),s(y),f(y))},onKeyDown:p=>{if(p.key==="Enter"){p.target.blur();return}if(p.key!=="ArrowUp"&&p.key!=="ArrowDown")return;const O=p6(i,p.key==="ArrowUp"?1:-1,p);O&&(p.preventDefault(),s(O),f(O))},title:ay(n)?"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 Nl({label:n,value:e,disabled:t,liveCommit:r,onCommit:i}){return g.jsx("div",{className:Kr,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:n}),g.jsx(cy,{value:e,disabled:t,liveCommit:r,onCommit:i})]})})}function Tp({label:n,value:e,disabled:t,onCommit:r}){return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:n}),g.jsx("div",{className:Kr,children:g.jsx(cy,{value:e,disabled:t,onCommit:r})})]})}function g6({label:n,value:e,disabled:t,autoFocus:r,onCommit:i}){const[s,o]=h.useState(e),c=h.useRef(null),u=h.useRef(null),f=h.useRef(!1),p=h.useRef(e);p.current=e,h.useEffect(()=>{f.current||o(e)},[e]),h.useEffect(()=>()=>{u.current&&clearTimeout(u.current)},[]),h.useEffect(()=>{var v;r&&((v=c.current)==null||v.focus())},[r]);const O=v=>{u.current&&clearTimeout(u.current),v!==p.current&&i(v)},y=v=>{u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{v!==p.current&&i(v)},120)};return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:n}),g.jsx("div",{className:Kr,children:g.jsx("textarea",{ref:c,value:s,disabled:t,rows:4,onFocus:()=>{f.current=!0},onChange:v=>{o(v.target.value),y(v.target.value)},onBlur:()=>{f.current=!1,O(s)},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 vh(n){const e=n.trim().replace(/\s+/g," ");return e.length<=56?e:`${e.slice(0,55)}…`}function wh(n,e){return n.computedStyles.color||e.color||"rgb(0, 0, 0)"}function yE(n){const e=[];let t="",r=null;for(const i of n){if((i==='"'||i==="'")&&!r){r=i;continue}if(i===r){r=null;continue}if(i===","&&!r){t.trim()&&e.push(t.trim()),t="";continue}t+=i}return t.trim()&&e.push(t.trim()),e.map(i=>i.replace(/^["']|["']$/g,"").trim()).filter(Boolean)}function vE(n){return yE(n)[0]??"inherit"}function wE(n){const e=n.trim();return oy.has(e.toLowerCase())?e:`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Qu(n){const e=n.trim();return e?oy.has(e.toLowerCase())?e:`${wE(e)}, ui-sans-serif, system-ui, sans-serif`:"inherit"}function SE(){if(typeof document>"u")return[];const n=document.fonts;return n?Array.from(n,e=>e.family.replace(/^["']|["']$/g,"").trim()).filter(Boolean).sort((e,t)=>e.localeCompare(t)):[]}function Sh(n){const e=new Set,t=[];for(const r of n){const i=r.trim();if(!i)continue;const s=i.toLowerCase();e.has(s)||(e.add(s),t.push(i))}return t}function O6(n){const e=new Set,t=[];for(const r of n){const i=r.family.trim();if(!i)continue;const s=i.toLowerCase();e.has(s)||(e.add(s),t.push({family:i,source:r.source}))}return t}function x6(n){return n==="Current"?0:n==="Document"?1:n==="Imported"?2:n==="Local"?3:n==="Google"?4:5}function bE(n){return[...n].sort((e,t)=>{const r=x6(e.source)-x6(t.source);if(r!==0)return r;const i=Af.findIndex(c=>c.toLowerCase()===e.family.toLowerCase()),s=Af.findIndex(c=>c.toLowerCase()===t.family.toLowerCase()),o=(i===-1?Number.MAX_SAFE_INTEGER:i)-(s===-1?Number.MAX_SAFE_INTEGER:s);return o===0?e.family.localeCompare(t.family):o})}function y6(n){return n.toLowerCase().replace(/[^a-z0-9]+/g,"")}function kE(n,e){const t=e.trim().toLowerCase();return!t||n.toLowerCase().includes(t)?!0:y6(n).includes(y6(t))}function v6(n){if(typeof document>"u")return;const e=n.trim();if(!e)return;const t=`studio-google-font-${e.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(t))return;if(!document.querySelector('link[data-studio-google-font-preconnect="true"]')){const s=document.createElement("link");s.setAttribute("data-studio-google-font-preconnect","true"),s.rel="preconnect",s.href="https://fonts.gstatic.com",s.crossOrigin="anonymous",document.head.appendChild(s)}const i=document.createElement("link");i.id=t,i.rel="stylesheet",i.href=ly(e),document.head.appendChild(i)}function Au(n){if(typeof document>"u")return;const e=`studio-imported-font-${n.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(document.getElementById(e))return;const t=document.createElement("style");t.id=e,t.textContent=Mp(n),document.head.appendChild(t)}function w6({value:n,disabled:e,onCommit:t}){const r=["300","400","500","600","700","800"];return g.jsx("div",{className:Kr,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:n,disabled:e,onChange:i=>t(i.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:r.map(i=>g.jsx("option",{value:i,children:i},i))})]})})}function S6({value:n,disabled:e,importedFonts:t,onImportFonts:r,onCommit:i}){const s=vE(n),o=h.useRef(null),c=h.useRef(null),u=h.useRef(null),[f,p]=h.useState(!1),[O,y]=h.useState(""),[v,S]=h.useState([]),[b,P]=h.useState([]),[A,z]=h.useState(()=>[...a6]),[M,C]=h.useState(!1),[Z,H]=h.useState(!1),[j,N]=h.useState(!1),[ne,se]=h.useState(null),le=typeof window<"u"&&typeof window.queryLocalFonts=="function";h.useEffect(()=>{if(!f)return;const D=W=>{var V;const $=W.target;$ instanceof Node&&((V=o.current)!=null&&V.contains($)||p(!1))};return document.addEventListener("pointerdown",D),()=>{document.removeEventListener("pointerdown",D)}},[f]),h.useEffect(()=>{f&&requestAnimationFrame(()=>{var D;return(D=c.current)==null?void 0:D.focus()})},[f]),h.useEffect(()=>{let D=!1;return fetch("/api/fonts").then(W=>W.ok?W.json():null).then(W=>{const $=W==null?void 0:W.fonts;D||!Array.isArray($)||S(V=>Sh([...V,...$]))}).catch(()=>{}),()=>{D=!0}},[]),h.useEffect(()=>{let D=!1;return H(!0),fetch("/api/fonts/google").then(W=>W.ok?W.json():null).then(W=>{const $=W==null?void 0:W.fonts;D||!Array.isArray($)||z(Sh([...$,...a6]))}).catch(()=>{}).finally(()=>{D||H(!1)}),()=>{D=!0}},[]),h.useEffect(()=>{A.some(W=>W.toLowerCase()===s.toLowerCase())&&v6(s);const D=t.find(W=>W.family.toLowerCase()===s.toLowerCase());D&&Au(D)},[s,A,t]);const T=async()=>{if(!le||!window.queryLocalFonts){se("This browser does not expose installed fonts. Import a font file instead.");return}C(!0),se(null);try{const D=await window.queryLocalFonts(),W=[...D].sort((V,R)=>Pu(V)-Pu(R)),$=W.map(V=>V.family).filter(V=>!!V).map(V=>Gl(`${V}.ttf`));P(W),S(V=>Sh([...V,...$])),se(D.length===0?"No browser-local fonts were returned.":null)}catch(D){const W=D instanceof Error?D.name:"";se(W==="NotAllowedError"?"Local font access was denied. Import a font file instead.":"Local font access is unavailable. Import a font file instead.")}finally{C(!1)}},re=async D=>{if(!(!(D!=null&&D.length)||!r)){N(!0),se(null);try{const W=await r(D);for(const V of W)Au(V);const $=W[0];$?(i(Qu($.family)),y(""),p(!1)):se("No supported font files were imported.")}finally{N(!1)}}},ce=h.useMemo(()=>O6(t.map(D=>({family:D.family,source:"Imported"}))),[t]),Y=h.useMemo(()=>{const D=SE();return bE(O6([{family:s,source:"Current"},...D.map(W=>({family:W,source:"Document"})),...ce,...v.map(W=>({family:W,source:"Local"})),...A.map(W=>({family:W,source:"Google"})),...hE.map(W=>({family:W,source:"System"}))]))},[s,A,v,ce]),G=h.useMemo(()=>Y.filter(W=>kE(W.family,O)).slice(0,O.trim()?120:160),[Y,O]),oe=async D=>{if(!r)return null;const $=b.filter(ye=>Gl(`${ye.family}.ttf`)===D).sort((ye,Le)=>Pu(ye)-Pu(Le)).find(ye=>typeof ye.blob=="function");if(!($!=null&&$.blob))return null;const V=await $.blob(),R=h6($.style??"Regular")||"Regular",te=h6(`${D} ${R}`)||D,ie=new File([V],`${te}.ttf`,{type:V.type||"font/ttf"}),Ae=await r([ie]);return Ae.find(ye=>ye.family.toLowerCase()===D.toLowerCase())??Ae[0]??null},B=async D=>{if(D.source==="Local"){N(!0),se(null);try{const $=await oe(D.family);if($){Au($),i(Qu($.family)),y(""),p(!1);return}i(Qu(D.family)),y(""),p(!1)}finally{N(!1)}return}D.source==="Google"&&v6(D.family);const W=t.find($=>$.family.toLowerCase()===D.family.toLowerCase());W&&Au(W),i(Qu(D.family)),y(""),p(!1)};return g.jsxs("div",{ref:o,className:"relative grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:"Font family"}),g.jsxs("button",{type:"button",disabled:e,onClick:()=>p(D=>!D),className:`${Kr} 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:n},children:s}),g.jsx("span",{className:"flex-shrink-0 text-[10px] uppercase tracking-[0.14em] text-neutral-600",children:"Font"})]}),f&&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:Z?"Loading Google Fonts...":"Search fonts",onChange:D=>y(D.target.value),onKeyDown:D=>{D.key==="Escape"&&(D.preventDefault(),p(!1)),D.key==="Enter"&&G[0]&&(D.preventDefault(),B(G[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"}),le&&g.jsx("button",{type:"button",disabled:e||M,onClick:T,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:M?"...":"Local"}),g.jsx("button",{type:"button",disabled:e||j||!r,onClick:()=>{var D;return(D=u.current)==null?void 0:D.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:j?"...":"Import"}),g.jsx("input",{ref:u,type:"file",accept:".ttf,.otf,.ttc,.woff,.woff2,.eot,font/*",multiple:!0,"aria-label":"Import local font files",disabled:e||j||!r,className:"hidden",onChange:async D=>{await re(D.target.files),D.target.value=""}})]}),ne&&g.jsx("div",{className:"border-b border-neutral-800 px-3 py-2 text-[10px] leading-4 text-neutral-500",children:ne}),g.jsx("div",{className:"max-h-64 overflow-y-auto p-1",children:G.length===0?g.jsx("div",{className:"px-2 py-3 text-[11px] text-neutral-500",children:"No fonts found."}):G.map(D=>g.jsxs("button",{type:"button",onClick:()=>B(D),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 ${D.family===s?"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:D.family}),g.jsx("span",{className:"flex-shrink-0 text-[9px] uppercase tracking-[0.14em] text-neutral-600",children:D.source})]},`${D.source}-${D.family}`))})]})]})}function pa({label:n,value:e,disabled:t,onCommit:r}){const i=h.useRef(null),s=h.useRef(null),[o,c]=h.useState(!1),[u,f]=h.useState(null),[p,O]=h.useState(()=>yh(e)),[y,v]=h.useState(()=>Wu(yh(e)).toUpperCase()),S=CT(p),b=bu({...K8({hue:S.hue,saturation:1,value:1}),alpha:1}),P=bu({...p,alpha:1}),A=bu(p),z=Math.round(S.saturation*100),M=Math.round(S.value*100),C=Math.round(p.alpha*100);h.useEffect(()=>{const T=yh(e);O(T),v(Wu(T).toUpperCase())},[e]);const Z=h.useCallback(()=>{var ce,Y;const T=(ce=i.current)==null?void 0:ce.getBoundingClientRect();if(!T)return;const re=(Y=s.current)==null?void 0:Y.getBoundingClientRect();f(uE(T,{width:window.innerWidth,height:window.innerHeight},{width:(re==null?void 0:re.width)||d6.width,height:(re==null?void 0:re.height)||d6.height}))},[]);h.useLayoutEffect(()=>{if(!o)return;Z();const T=()=>Z();return window.addEventListener("resize",T),window.addEventListener("scroll",T,!0),()=>{window.removeEventListener("resize",T),window.removeEventListener("scroll",T,!0)}},[o,Z]),h.useEffect(()=>{if(!o)return;const T=ce=>{var G,oe;const Y=ce.target;Y&&((G=s.current)!=null&&G.contains(Y)||(oe=i.current)!=null&&oe.contains(Y)||c(!1))},re=ce=>{ce.key==="Escape"&&c(!1)};return document.addEventListener("pointerdown",T),document.addEventListener("keydown",re),()=>{document.removeEventListener("pointerdown",T),document.removeEventListener("keydown",re)}},[o]);const H=T=>{O(T),v(Wu(T).toUpperCase()),r(bu(T))},j=T=>{const re=K8({hue:T.hue??S.hue,saturation:T.saturation??S.saturation,value:T.value??S.value});H({...re,alpha:p.alpha})},N=(T,re,ce)=>{const Y=ce.getBoundingClientRect(),G=Math.max(0,Math.min(1,(T-Y.left)/Y.width)),oe=Math.max(0,Math.min(1,1-(re-Y.top)/Y.height));j({saturation:G,value:oe})},ne=T=>{v(T);const re=T.trim().startsWith("#")?T.trim():`#${T.trim()}`,ce=Ga(re);ce&&H({...ce,alpha:p.alpha})},se=o?QT.createPortal(g.jsxs("div",{ref:s,className:"fixed z-[9999] w-[292px] overflow-hidden rounded-2xl border border-neutral-700 bg-neutral-950 shadow-2xl shadow-black/50",style:{left:(u==null?void 0:u.left)??-9999,top:(u==null?void 0:u.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:n}),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(kp,{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:b},onPointerDown:T=>{T.currentTarget.setPointerCapture(T.pointerId),N(T.clientX,T.clientY,T.currentTarget)},onPointerMove:T=>{T.buttons===1&&N(T.clientX,T.clientY,T.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:P}})]}),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:A}}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:A}),g.jsxs("div",{className:"mt-0.5 text-[9px] uppercase tracking-[0.12em] text-neutral-600",children:["S ",z,"% · B ",M,"% · A ",C,"%"]})]})]}),g.jsx(b6,{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:b,disabled:t,onCommit:T=>j({hue:T})}),g.jsx(b6,{label:"Alpha",value:p.alpha,min:0,max:1,step:.01,displayValue:`${C}%`,background:`linear-gradient(90deg, transparent, ${P})`,thumbColor:A,disabled:t,onCommit:T=>H({...p,alpha:T})}),g.jsxs("label",{className:"grid gap-1.5",children:[g.jsx("span",{className:or,children:"Hex"}),g.jsx("input",{value:y,onChange:T=>ne(T.target.value),className:`${Kr} h-10 w-full text-[11px] font-medium outline-none`,spellCheck:!1})]})]})]}),document.body):null,le=()=>{t||(c(T=>!T),o||requestAnimationFrame(Z))};return g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:n}),g.jsxs("button",{type:"button",disabled:t,"aria-label":`Pick ${n.toLowerCase()} color`,ref:i,onClick:le,className:`${Kr} 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})]}),se]})}function b6({label:n,value:e,min:t,max:r,step:i,displayValue:s,background:o,thumbColor:c,disabled:u,onCommit:f}){const p=h.useRef(null),O=(e-t)/(r-t)*100,y=S=>{var z;const b=(z=p.current)==null?void 0:z.getBoundingClientRect();if(!b||b.width<=0)return;const P=t+(S-b.left)/b.width*(r-t),A=Math.round(P/i)*i;f(Math.max(t,Math.min(r,A)))},v=S=>{f(Math.max(t,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:or,children:n}),g.jsx("span",{className:"text-[10px] font-medium text-neutral-400",children:s})]}),g.jsx("div",{ref:p,role:"slider",tabIndex:u?-1:0,"aria-label":n,"aria-valuemin":t,"aria-valuemax":r,"aria-valuenow":e,"aria-disabled":u,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 ${u?"cursor-not-allowed opacity-50":"cursor-ew-resize"}`,style:{background:o},onPointerDown:S=>{u||(S.currentTarget.setPointerCapture(S.pointerId),y(S.clientX))},onPointerMove:S=>{u||S.buttons!==1||y(S.clientX)},onKeyDown:S=>{u||(S.key==="ArrowRight"||S.key==="ArrowUp"?(S.preventDefault(),v(e+i)):S.key==="ArrowLeft"||S.key==="ArrowDown"?(S.preventDefault(),v(e-i)):S.key==="Home"?(S.preventDefault(),v(t)):S.key==="End"&&(S.preventDefault(),v(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 $E({projectId:n,sourceFile:e,value:t,assets:r,disabled:i,onCommit:s,onImportAssets:o}){const c=h.useRef(null),[u,f]=h.useState(!1),p=h.useMemo(()=>r.filter(S=>Qa.test(S)),[r]),O=h.useMemo(()=>OE(t,e,p),[p,e,t]),y=O?"":t,v=async S=>{if(!(!(S!=null&&S.length)||!o)){f(!0);try{const P=(await o(S)).find(A=>Qa.test(A));P&&s(`url("${m6(P)}")`)}finally{f(!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:or,children:"Project asset"}),g.jsxs("button",{type:"button",disabled:i||u,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||u?"cursor-not-allowed text-neutral-600":"cursor-pointer hover:border-neutral-600 hover:text-white"}`,children:[g.jsx(bp,{size:12,className:"flex-shrink-0"}),g.jsx("span",{className:"truncate",children:u?"Uploading…":"Upload image"})]}),g.jsx("input",{ref:c,type:"file",accept:"image/*","aria-label":"Upload image asset",disabled:i||u,className:"hidden",onChange:async S=>{await v(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/${n}/preview/${O}`,alt:O.split("/").pop()??O,className:"h-28 w-full object-contain bg-neutral-950/80"})}),g.jsx("div",{className:Kr,children:g.jsxs("select",{value:O??"",disabled:i,onChange:S=>{const b=S.target.value;if(!b){s("none");return}s(`url("${m6(b)}")`)},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(Tp,{label:"External URL",value:y,disabled:i,onCommit:S=>s(S.trim()?`url("${S.trim()}")`:"none")})]})}function PE({value:n,fallbackColor:e,disabled:t,onCommit:r}){const i=h.useRef(null),s=NT(n)??Qf(e),o=y=>r(P0(y)),c=y=>o({...s,...y}),u=(y,v)=>{const S=s.stops.map((b,P)=>P===y?{...b,...v}:b);o({...s,stops:S})},f=y=>{var S,b;const v=y!=null?J8(s,y):J8(s,((S=s.stops.at(-1))==null?void 0:S.position)!=null?Math.min(100,(((b=s.stops.at(-1))==null?void 0:b.position)??90)+10):100);o(v)},p=y=>{s.stops.length<=2||o({...s,stops:s.stops.filter((v,S)=>S!==y)})},O={backgroundImage:P0(s)};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("div",{className:`${Kr} 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 b;if(t)return;const v=(b=i.current)==null?void 0:b.getBoundingClientRect();if(!v||v.width<=0)return;const S=(y.clientX-v.left)/v.width*100;f(S)},children:s.stops.map((y,v)=>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-${v}`))}),g.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[g.jsx(Cf,{disabled:t,value:s.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:s.repeating,disabled:t,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:t,onClick:()=>o({...s,stops:[...s.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(RM,{size:12}),"Reverse"]})]})]}),(s.kind==="linear"||s.kind==="conic")&&g.jsxs("div",{className:"grid gap-1.5",children:[g.jsx("span",{className:or,children:s.kind==="linear"?"Angle":"Start angle"}),g.jsx(Sa,{value:s.angle,min:0,max:360,step:1,disabled:t,displayValue:`${Math.round(s.angle)}°`,formatDisplayValue:y=>`${Math.round(y)}°`,onCommit:y=>c({angle:y})})]}),s.kind==="radial"&&g.jsxs("div",{className:Kl,children:[g.jsx(ba,{label:"Shape",value:s.shape,disabled:t,onChange:y=>c({shape:y}),options:["ellipse","circle"]}),g.jsx(ba,{label:"Size",value:s.radialSize,disabled:t,onChange:y=>c({radialSize:y}),options:["closest-side","closest-corner","farthest-side","farthest-corner"]})]}),(s.kind==="radial"||s.kind==="conic")&&g.jsxs("div",{className:Kl,children:[g.jsxs("div",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:"Center X"}),g.jsx(Sa,{value:s.centerX,min:0,max:100,step:1,disabled:t,displayValue:`${Math.round(s.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:or,children:"Center Y"}),g.jsx(Sa,{value:s.centerY,min:0,max:100,step:1,disabled:t,displayValue:`${Math.round(s.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:or,children:"Stops"}),g.jsxs("button",{type:"button",disabled:t||s.stops.length>=6,onClick:()=>f(),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(bp,{size:12}),"Add stop"]})]}),g.jsx("div",{className:"space-y-3",children:s.stops.map((y,v)=>g.jsxs("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_68px_28px] gap-2",children:[g.jsx(pa,{label:`Stop ${v+1}`,value:y.color,disabled:t,onCommit:S=>u(v,{color:S})}),g.jsx(Tp,{label:"Pos",value:`${Math.round(y.position)}%`,disabled:t,onCommit:S=>u(v,{position:Number.parseFloat(S.replace("%",""))||0})}),g.jsx("button",{type:"button",disabled:t||s.stops.length<=2,onClick:()=>p(v),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 ${v+1}`,children:g.jsx(kp,{size:12})})]},`stop-editor-${v}`))})]})]})}function Sa({value:n,min:e,max:t,step:r,displayValue:i,formatDisplayValue:s,disabled:o,onCommit:c}){const[u,f]=h.useState(n),p=h.useRef(null),O=h.useRef(n);O.current=n,h.useEffect(()=>{f(n)},[n]),h.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const y=b=>{p.current&&clearTimeout(p.current),b!==O.current&&c(b)},v=b=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{b!==O.current&&c(b)},40)},S=(s==null?void 0:s(u))??i;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:t,step:r,value:u,disabled:o,onChange:b=>{const P=Number(b.target.value);f(P),v(P)},onMouseUp:()=>y(u),onTouchEnd:()=>y(u),onBlur:()=>y(u),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:S})]})}function Cf({options:n,value:e,disabled:t,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(${n.length}, minmax(0, 1fr))`},children:n.map(i=>{const s=i.value===e;return g.jsx("button",{type:"button",disabled:t,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 ${s?"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 ba({label:n,value:e,disabled:t,options:r,onChange:i}){return g.jsxs("label",{className:"grid min-w-0 gap-1.5",children:[g.jsx("span",{className:or,children:n}),g.jsx("div",{className:Kr,children:g.jsx("select",{value:e,disabled:t,onChange:s=>i(s.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:r.map(s=>g.jsx("option",{value:s,children:s},s))})})]})}function el({title:n,icon:e,children:t,accessory:r}){return g.jsxs("section",{className:"min-w-0 border-t border-neutral-800/80 px-4 py-4",children:[g.jsxs("div",{className:"mb-3 flex min-w-0 flex-wrap items-center justify-between gap-2",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:n})]}),r]}),t]})}function QE({swatch:n,token:e,sources:t}){return g.jsxs("div",{className:`${Kr} flex min-w-0 items-center gap-3`,children:[g.jsx("div",{className:"h-7 w-7 flex-shrink-0 rounded-lg border border-neutral-700",style:{backgroundColor:n}}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:e}),g.jsx("div",{className:"truncate text-[11px] uppercase tracking-[0.18em] text-neutral-500",children:t.join(" · ")})]})]})}const AE=h.memo(function({projectId:e,assets:t,element:r,copiedAgentPrompt:i,onClearSelection:s,onSetStyle:o,onSetText:c,onSetTextFieldStyle:u,onAddTextField:f,onRemoveTextField:p,onDetachFromLayout:O,onAskAgent:y,onCopyAgentInstruction:v,onImportAssets:S,fontAssets:b=[],onImportFonts:P}){var V;const A=(r==null?void 0:r.computedStyles)??dE,z=h.useMemo(()=>xE(A),[A]),M=A["background-image"]??"none",C=M&&M!=="none"?M.includes("gradient")?"Gradient":"Image":"Solid",[Z,H]=h.useState(C),j=mE(M),[N,ne]=h.useState(((V=r==null?void 0:r.textFields[0])==null?void 0:V.key)??null),se=r!=null&&sy(r);if(h.useEffect(()=>{H(C)},[C,r==null?void 0:r.id,r==null?void 0:r.selector,M]),h.useEffect(()=>{const R=(r==null?void 0:r.textFields)??[];ne(te=>{var ie;return te&&R.some(Ae=>Ae.key===te)?te:((ie=R[0])==null?void 0:ie.key)??null})},[r==null?void 0:r.id,r==null?void 0:r.selector,r==null?void 0:r.textFields]),!r)return g.jsxs("div",{className:"flex h-full flex-col items-center justify-center bg-neutral-900 px-6 text-center",children:[g.jsx(_8,{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 direct DOM edits with safer geometry controls, color picking, and cleaner Paper-style grouping."})]});const le=!r.capabilities.canEditStyles,T=!r.capabilities.canMove,re=!r.capabilities.canResize,ce=A.display==="flex"||A.display==="inline-flex",Y=f6(A["border-radius"])??0,G=Math.round((f6(A.opacity)??1)*100),oe=["hidden","clip"].includes((A.overflow??"").trim()),B=r.id?`#${r.id}`:r.selector,D=r.capabilities.canEditStyles,W=r.capabilities.reasonIfDisabled&&!r.capabilities.canDetachFromLayout?r.capabilities.reasonIfDisabled:null,$=R=>{if(H(R),R==="Solid"){o("background-image","none");return}R==="Gradient"&&!M.includes("gradient")&&o("background-image",P0(Qf(A["background-color"])))};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:or,children:"Document"}),g.jsx("div",{className:"mt-3 truncate text-[12px] font-semibold text-neutral-100",children:r.label}),g.jsx("div",{className:"mt-1 truncate text-[11px] text-neutral-500",children:B})]}),g.jsx("button",{type:"button","aria-label":"Clear selection",onClick:s,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(kp,{size:13})})]}),g.jsxs("button",{type:"button",onClick:y,className:"mt-4 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(MM,{size:15}),g.jsx("span",{children:i?"Prompt copied":"Ask agent"})]})]}),g.jsxs("div",{className:"flex-1 overflow-y-auto",children:[g.jsxs(el,{title:"Layout",icon:g.jsx(TM,{size:15}),children:[g.jsxs("div",{className:Kl,children:[g.jsx(Nl,{label:"X",value:A.left??"auto",disabled:T,onCommit:R=>o("left",R)}),g.jsx(Nl,{label:"Y",value:A.top??"auto",disabled:T,onCommit:R=>o("top",R)}),g.jsx(Nl,{label:"W",value:A.width??"auto",disabled:re,onCommit:R=>o("width",R)}),g.jsx(Nl,{label:"H",value:A.height??"auto",disabled:re,onCommit:R=>o("height",R)})]}),W&&g.jsxs("div",{className:"mt-4 flex min-w-0 flex-wrap items-center justify-between gap-3 border-l border-amber-500/40 pl-3",children:[g.jsxs("div",{className:"min-w-0 text-[11px] leading-5 text-neutral-400",children:[g.jsx("div",{className:"font-medium text-amber-100",children:W}),g.jsx("div",{children:"Copy a targeted prompt so an agent can refactor this layer safely."})]}),g.jsx("button",{type:"button",onClick:()=>{Promise.resolve(v(fE(W)))},className:"inline-flex h-8 flex-shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-3 text-[11px] font-medium text-neutral-100 transition-colors hover:border-amber-400/70 hover:text-amber-100",children:i?"Prompt copied":"Ask agent to make movable"})]}),r.capabilities.canDetachFromLayout&&g.jsxs("div",{className:"mt-4 flex min-w-0 flex-wrap items-center justify-between gap-3 border-l border-amber-500/40 pl-3",children:[g.jsxs("div",{className:"min-w-0 text-[11px] leading-5 text-neutral-400",children:[g.jsx("div",{className:"font-medium text-neutral-200",children:"This layer is controlled by layout."}),g.jsx("div",{children:"Detaches from flex/grid flow and preserves current visual position."})]}),g.jsx("button",{type:"button",onClick:O,className:"inline-flex h-8 flex-shrink-0 items-center rounded-lg border border-neutral-700 bg-neutral-950 px-3 text-[11px] font-medium text-neutral-100 transition-colors hover:border-amber-400/70 hover:text-amber-100",children:"Make movable"})]})]}),D&&ce&&g.jsx(el,{title:"Flex",icon:g.jsx(CM,{size:15}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(Cf,{disabled:le,value:A["flex-direction"]||"row",onChange:R=>o("flex-direction",R),options:[{label:"→ Row",value:"row"},{label:"↓ Column",value:"column"}]}),g.jsxs("div",{className:Kl,children:[g.jsx(ba,{label:"Justify",value:A["justify-content"]||"flex-start",disabled:le,onChange:R=>o("justify-content",R),options:["flex-start","center","space-between","space-around","space-evenly","flex-end"]}),g.jsx(ba,{label:"Align",value:A["align-items"]||"stretch",disabled:le,onChange:R=>o("align-items",R),options:["stretch","flex-start","center","flex-end","baseline"]})]}),g.jsx(Tp,{label:"Gap",value:A.gap??"0px",disabled:le,onCommit:R=>o("gap",R.endsWith("px")?R:`${R}px`)}),g.jsxs("label",{className:"flex items-center gap-3 rounded-2xl border border-neutral-800 bg-neutral-900 px-3 py-3 text-[12px] text-neutral-300 shadow-[inset_0_1px_0_rgba(255,255,255,0.03)]",children:[g.jsx("input",{type:"checkbox",checked:oe,disabled:le,onChange:R=>o("overflow",R.target.checked?"hidden":"visible"),className:"h-4 w-4 rounded border-neutral-700 bg-neutral-950 text-[#3ce6ac] focus:ring-[#3ce6ac]"}),g.jsx("span",{children:"Clip content"})]})]})}),D&&g.jsxs(g.Fragment,{children:[g.jsx(el,{title:"Radius",icon:g.jsx(VM,{size:15}),children:g.jsx(Sa,{value:Y,min:0,max:Math.max(240,Math.ceil(Y)),step:1,disabled:le,displayValue:`${fa(Y)}px`,formatDisplayValue:R=>`${fa(R)}px`,onCommit:R=>o("border-radius",`${fa(R)}px`)})}),g.jsx(el,{title:"Blending",icon:g.jsx(_8,{size:15}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(Sa,{value:G,min:0,max:100,step:1,disabled:le,displayValue:`${G}%`,formatDisplayValue:R=>`${Math.round(R)}%`,onCommit:R=>o("opacity",fa(R/100))}),g.jsx(ba,{label:"Mode",value:A["mix-blend-mode"]||"normal",disabled:le,onChange:R=>o("mix-blend-mode",R),options:["normal","multiply","screen","overlay","darken","lighten"]})]})}),g.jsx(el,{title:"Fill",icon:g.jsx(D8,{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:Z}),children:g.jsxs("div",{className:"space-y-4",children:[g.jsx(Cf,{disabled:le,value:Z,onChange:$,options:[{label:"Solid",value:"Solid"},{label:"Gradient",value:"Gradient"},{label:"Image",value:"Image"}]}),Z==="Solid"?g.jsx(pa,{label:"Fill color",value:A["background-color"]??"transparent",disabled:le,onCommit:R=>o("background-color",R)}):Z==="Gradient"?g.jsx(PE,{value:M!=="none"?M:P0(Qf(A["background-color"])),fallbackColor:A["background-color"],disabled:le,onCommit:R=>o("background-image",R)}):g.jsx($E,{projectId:e,sourceFile:r.sourceFile,value:j,assets:t,disabled:le,onCommit:R=>o("background-image",R),onImportAssets:S}),!se&&g.jsx(pa,{label:"Text color",value:A.color??"rgb(0, 0, 0)",disabled:le,onCommit:R=>o("color",R)})]})}),se&&g.jsx(el,{title:"Text",icon:g.jsx(EM,{size:15}),children:(()=>{const R=r.textFields,te=R.find(ie=>ie.key===N)??R[0];return te?R.length===1?g.jsxs("div",{className:"space-y-4 rounded-xl border border-neutral-800 bg-neutral-900/60 p-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:vh(te.value)||"Text"}),g.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:te.tagName})]}),g.jsx(g6,{label:"Content",value:te.value,disabled:!1,onCommit:ie=>c(ie,te.key)},te.key),g.jsx(pa,{label:"Text color",value:wh(te,A),disabled:!1,onCommit:ie=>u(te.key,"color",ie)}),g.jsxs("div",{className:Kl,children:[g.jsx(Nl,{label:"Size",value:te.computedStyles["font-size"]||A["font-size"]||"16px",disabled:!1,liveCommit:!0,onCommit:ie=>u(te.key,"font-size",ie)}),g.jsx(w6,{value:te.computedStyles["font-weight"]||A["font-weight"]||"400",disabled:!1,onCommit:ie=>u(te.key,"font-weight",ie)})]}),g.jsx(S6,{value:te.computedStyles["font-family"]||A["font-family"]||"inherit",disabled:!1,importedFonts:b,onImportFonts:P,onCommit:ie=>u(te.key,"font-family",ie)})]}):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:or,children:"Text layers"}),g.jsxs("button",{type:"button",onClick:()=>{Promise.resolve(f(te.key)).then(ie=>{ie&&ne(ie)})},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(bp,{size:12,className:"flex-shrink-0"}),g.jsx("span",{className:"truncate",children:"Add text"})]})]}),g.jsx("div",{className:"grid gap-2",children:R.map((ie,Ae)=>{const ye=ie.key===te.key;return g.jsx("button",{type:"button",onClick:()=>ne(ie.key),className:`min-w-0 w-full rounded-xl border px-3 py-2 text-left transition-colors ${ye?"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:wh(ie,A)}}),g.jsx("span",{className:"min-w-0 truncate text-[11px] font-medium text-neutral-100",children:vh(ie.value)||`Text ${Ae+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:ie.tagName})]})},ie.key)})})]}),g.jsxs("div",{className:"space-y-4 rounded-xl border border-neutral-800 bg-neutral-900/60 p-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"truncate text-[11px] font-medium text-neutral-100",children:vh(te.value)||"Text"}),g.jsx("div",{className:"text-[10px] uppercase tracking-[0.12em] text-neutral-500",children:te.tagName})]}),g.jsx("button",{type:"button",onClick:()=>p(te.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(g6,{label:"Content",value:te.value,disabled:!1,autoFocus:!0,onCommit:ie=>c(ie,te.key)},te.key),g.jsx(pa,{label:"Text color",value:wh(te,A),disabled:!1,onCommit:ie=>u(te.key,"color",ie)}),g.jsxs("div",{className:Kl,children:[g.jsx(Nl,{label:"Size",value:te.computedStyles["font-size"]||"16px",disabled:!1,liveCommit:!0,onCommit:ie=>u(te.key,"font-size",ie)}),g.jsx(w6,{value:te.computedStyles["font-weight"]||"400",disabled:!1,onCommit:ie=>u(te.key,"font-weight",ie)})]}),g.jsx(S6,{value:te.computedStyles["font-family"]||A["font-family"]||"inherit",disabled:!1,importedFonts:b,onImportFonts:P,onCommit:ie=>u(te.key,"font-family",ie)})]})]}):null})()}),z.length>0&&g.jsx(el,{title:"Selection colors",icon:g.jsx(D8,{size:15}),children:g.jsx("div",{className:"space-y-3",children:z.map(R=>g.jsx(QE,{swatch:R.swatch,token:R.token,sources:R.sources},`${R.swatch}-${R.token}`))})})]})]})]})});function CE(n,e,t){const r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),s=e.contentDocument,o=(s==null?void 0:s.querySelector("[data-composition-id]"))??(s==null?void 0:s.documentElement)??null,c=o==null?void 0:o.getBoundingClientRect(),u=c==null?void 0:c.width,f=c==null?void 0:c.height;if(!u||!f)return null;const p=t.getBoundingClientRect(),O=r.width/u,y=r.height/f;return{left:r.left-i.left+p.left*O,top:r.top-i.top+p.top*y,width:p.width*O,height:p.height*y,scaleX:O,scaleY:y}}const k6=4,Cu=.5;function ME(n,e){return n===e?!0:!n||!e?!1:Math.abs(n.left-e.left)<Cu&&Math.abs(n.top-e.top)<Cu&&Math.abs(n.width-e.width)<Cu&&Math.abs(n.height-e.height)<Cu&&Math.abs(n.scaleX-e.scaleX)<.001&&Math.abs(n.scaleY-e.scaleY)<.001}function TE(n){return[n.sourceFile??"",n.id??"",n.selector??"",n.selectorIndex??""].join("|")}function $6(n,e,t){t?n.style.setProperty(e,t):n.style.removeProperty(e)}const EE=h.memo(function({iframeRef:e,selection:t,onCanvasMouseDown:r,onCanvasDoubleClick:i,onSelectedDoubleClick:s,onBlockedMove:o,onMoveCommit:c,onResizeCommit:u}){const f=h.useRef(null),p=h.useRef(null),[O,y]=h.useState(null),v=h.useRef(null),S=h.useRef(null),b=h.useRef(!1),P=h.useRef(!1),A=h.useRef(null),z=h.useRef(t);z.current=t;const M=h.useRef(O);M.current=O;const C=h.useRef(c);C.current=c;const Z=h.useRef(u);Z.current=u;const H=h.useRef(o);H.current=o,Lt(()=>{let Y=0;const G=()=>{M.current&&(M.current=null,y(null))},oe=W=>{ME(M.current,W)||(M.current=W,y(W))},B=(W,$)=>{const V=TE($),R=A.current;if((R==null?void 0:R.key)===V&&R.element.isConnected&&R.element.ownerDocument===W)return R.element;const te=Fi(W,$,$.sourceFile);return A.current=te?{key:V,element:te}:null,te},D=()=>{if(Y=requestAnimationFrame(D),P.current)return;const W=z.current,$=e.current,V=f.current;if(!W||!$||!V){A.current=null,G();return}const R=$.contentDocument;if(!R)return;const te=B(R,W);if(!te){G();return}const ie=CE(V,$,te);oe(ie)};return Y=requestAnimationFrame(D),()=>cancelAnimationFrame(Y)});const j=h.useMemo(()=>t?`${t.sourceFile}:${t.id??t.selector??t.label}:${t.selectorIndex??0}`:"none",[t]),N=(Y,G)=>{const oe=z.current,B=M.current,D=p.current;if(!oe||!B||!D)return;const W=Number.parseFloat(oe.computedStyles.left??""),$=Number.parseFloat(oe.computedStyles.top??""),V=Number.parseFloat(oe.computedStyles.width??""),R=Number.parseFloat(oe.computedStyles.height??"");!Number.isFinite(W)||!Number.isFinite($)||Y==="resize"&&!Number.isFinite(V)&&!Number.isFinite(R)||(G.preventDefault(),G.stopPropagation(),G.target.setPointerCapture(G.pointerId),P.current=!0,v.current={kind:Y,startX:G.clientX,startY:G.clientY,initialStyleLeft:oe.element.style.left,initialStyleTop:oe.element.style.top,originLeft:B.left,originTop:B.top,originWidth:B.width,originHeight:B.height,actualLeft:W,actualTop:$,actualWidth:Number.isFinite(V)?V:0,actualHeight:Number.isFinite(R)?R:0,scaleX:B.scaleX,scaleY:B.scaleY})},ne=Y=>{const G=v.current,oe=z.current,B=p.current,D=S.current;if(D&&oe){const V=Y.clientX-D.startX,R=Y.clientY-D.startY;!D.notified&&Math.hypot(V,R)>=k6&&(D.notified=!0,b.current=!0,H.current(oe));return}if(!G||!oe||!B)return;const W=Y.clientX-G.startX,$=Y.clientY-G.startY;if(G.kind==="drag"){const V=G.originLeft+W,R=G.originTop+$;B.style.left=`${V}px`,B.style.top=`${R}px`,oe.element.style.left=`${Math.round(G.actualLeft+W/G.scaleX)}px`,oe.element.style.top=`${Math.round(G.actualTop+$/G.scaleY)}px`}else{const V=Math.max(20,G.originWidth+W),R=Math.max(20,G.originHeight+$);B.style.width=`${V}px`,B.style.height=`${R}px`,oe.element.style.width=`${Math.round(G.actualWidth+W/G.scaleX)}px`,oe.element.style.height=`${Math.round(G.actualHeight+$/G.scaleY)}px`}},se=Y=>{const G=v.current,oe=z.current,B=p.current;if(S.current=null,!G||!oe){v.current=null,P.current=!1;return}v.current=null,P.current=!1;const D=Math.hypot(Y.clientX-G.startX,Y.clientY-G.startY);if(G.kind==="drag"&&D<k6){$6(oe.element,"left",G.initialStyleLeft),$6(oe.element,"top",G.initialStyleTop),B&&(B.style.left=`${G.originLeft}px`,B.style.top=`${G.originTop}px`),b.current=!0,r(Y,{preferClipAncestor:!1});return}if(G.kind==="drag"){const W=Number.parseFloat(oe.element.style.left)||G.actualLeft,$=Number.parseFloat(oe.element.style.top)||G.actualTop;Promise.resolve(C.current(oe,{left:W,top:$})).catch(()=>{oe.element.style.left=`${Math.round(G.actualLeft)}px`,oe.element.style.top=`${Math.round(G.actualTop)}px`})}else{const W=Number.parseFloat(oe.element.style.width)||G.actualWidth,$=Number.parseFloat(oe.element.style.height)||G.actualHeight;Promise.resolve(Z.current(oe,{width:W,height:$})).catch(()=>{G.actualWidth>0?oe.element.style.width=`${Math.round(G.actualWidth)}px`:oe.element.style.removeProperty("width"),G.actualHeight>0?oe.element.style.height=`${Math.round(G.actualHeight)}px`:oe.element.style.removeProperty("height")})}},le=Y=>{const G=Y.target;G!=null&&G.closest('[data-dom-edit-selection-box="true"]')||r(Y,{preferClipAncestor:!1})},T=Y=>{const G=Y.target;G!=null&&G.closest('[data-dom-edit-selection-box="true"]')||i(Y)},re=Y=>{if(!v.current){if(b.current){b.current=!1,Y.stopPropagation();return}r(Y,{preferClipAncestor:!1})}},ce=()=>{S.current=null,v.current=null,P.current=!1};return g.jsx("div",{ref:f,className:"absolute inset-0 z-10 pointer-events-auto",onMouseDown:le,onDoubleClick:T,onPointerMove:ne,onPointerUp:se,onPointerCancel:ce,children:t&&O&&g.jsx(g.Fragment,{children:g.jsx("div",{ref:p,"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:O.left,top:O.top,width:O.width,height:O.height,cursor:t.capabilities.canMove?"move":"default"},onPointerDown:Y=>{if(t.capabilities.canMove){N("drag",Y);return}Y.preventDefault(),Y.stopPropagation(),Y.currentTarget.setPointerCapture(Y.pointerId),S.current={pointerId:Y.pointerId,startX:Y.clientX,startY:Y.clientY,notified:!1}},onClick:re,onDoubleClick:s,children:t.capabilities.canResize&&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:Y=>{Y.stopPropagation(),N("resize",Y)}})},j)})},j)}),ZE=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 jE(n){return(n.split(",")[0]??"").trim().replace(/^["']|["']$/g,"")}function P6(n,e){const t=jE(e);if(!t||ZE.has(t.toLowerCase()))return;const r=`studio-preview-google-font-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(n.getElementById(r))return;const i=n.createElement("link");i.id=r,i.rel="stylesheet",i.href=ly(t),n.head.appendChild(i)}function RE(n){var e;return((e=n.split(",")[0])==null?void 0:e.trim().replace(/^["']|["']$/g,"").trim())??""}function Q6(n,e){const t=`studio-imported-font-${e.family.toLowerCase().replace(/[^a-z0-9]+/g,"-")}`;if(n.getElementById(t))return;const r=n.createElement("style");r.id=t,r.textContent=Mp(e),n.head.appendChild(r)}function A6(n){const e=n.trim(),t=/^[a-z]+:\/\//i.test(e)?new URL(e).pathname:e;return decodeURIComponent(t).replace(/\\/g,"/").replace(/^\.?\//,"")}function VE(n,e){const t=A6(n).split("/").filter(Boolean),r=A6(e).split("/").filter(Boolean);for(t.pop();t.length>0&&r.length>0&&t[0]===r[0];)t.shift(),r.shift();return[...t.map(()=>".."),...r].join("/")||e}function LE(n){return/^(?:\/|[A-Za-z]:[\\/]|\\\\)/.test(n)}function NE(n,e){const t=e.trim();if(!t)return;const r=t.replace(/\\/g,"/");if(LE(r))return r;const i=n==null?void 0:n.trim().replace(/\\/g,"/").replace(/\/+$/,"");if(i)return`${i}/${r.replace(/^\.?\//,"")}`}function C6(n,e,t){const r=Mp(e,VE(t,e.path));if(n.includes(r))return n;const s=/<style\b[^>]*data-hf-studio-fonts=(["'])true\1[^>]*>([\s\S]*?)<\/style>/i.exec(n);if(s){const c=`${s[2].trim()}
90
- ${r}`.trim();return n.replace(s[0],`<style data-hf-studio-fonts="true">
91
- ${c}
92
- </style>`)}const o=`<style data-hf-studio-fonts="true">
93
- ${r}
94
- </style>`;return/<\/head>/i.test(n)?n.replace(/<\/head>/i,` ${o}
95
- </head>`):`${o}
96
- ${n}`}function bh(n,e){const t=e.trim();return t&&(["left","top","width","height","border-radius","font-size"].includes(n)&&/^-?\d+(\.\d+)?$/.test(t)?`${t}px`:t)}function M6(n){return/^url\(/i.test(n.trim())}function Mf(n){return!!(n.inlineStyles.inset||n.inlineStyles.right||n.inlineStyles.bottom)}function Mu(n,e){if(!Mf(n))return[];const t=[];return(e==="width"||e==="both")&&t.push({type:"inline-style",property:"right",value:"auto"}),(e==="height"||e==="both")&&t.push({type:"inline-style",property:"bottom",value:"auto"}),t}function XE(n){if(!n||typeof n!="object")return null;const e=n;return e.nodeType===1?n:e.nodeType===3&&e.parentElement?e.parentElement:null}function _E(n,e){for(const t of e)if(n.id&&t.domId===n.id||n.isCompositionHost&&n.compositionSrc&&t.compositionSrc===n.compositionSrc||n.selector&&t.selector===n.selector&&(t.selectorIndex??0)===(n.selectorIndex??0)&&(t.sourceFile??"index.html")===n.sourceFile)return t.key??t.id;return null}function DE(n,e,t,r){var c,u;const i=((c=n.ownerDocument.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"))??null;let s=n;for(;s;){const f=s.getAttribute("data-composition-id");if(f&&f!==i){const p=(u=s.parentElement)==null?void 0:u.closest(".clip");if(p instanceof HTMLElement){const O=p.getAttribute("data-composition-id"),y=p.getAttribute("data-composition-src")??p.getAttribute("data-composition-file")??(O?t.get(O):void 0)??t.get(f)??r.find(v=>v.endsWith(`${f}.html`))??void 0;if(y)return{host:p,compositionSrc:y}}}s=s.parentElement}let o=n;for(;o;){const f=o.getAttribute("data-composition-id"),p=o.getAttribute("data-composition-src")??o.getAttribute("data-composition-file")??void 0,O=e.find(v=>!!v.compositionSrc&&(v.domId===(o==null?void 0:o.id)||(o==null?void 0:o.id)&&v.id===o.id||f&&v.id===f))??null,y=p??(O==null?void 0:O.compositionSrc)??(f?t.get(f):void 0)??(f?r.find(v=>v.endsWith(`${f}.html`)):void 0);if(y)return{host:o,compositionSrc:y};o=o.parentElement}return null}function zE(n){return n==="left"||n==="top"}function IE(n){return n==="width"||n==="height"}function FE(n){const e=n.offsetParent;if(e instanceof HTMLElement)return e;let t=n.parentElement;for(;t;){if(t.hasAttribute("data-composition-id"))return t;t=t.parentElement}return n.ownerDocument.body}function HE(n){const e=FE(n),t=n.getBoundingClientRect(),r=e.getBoundingClientRect();return{left:t.left-r.left+e.scrollLeft,top:t.top-r.top+e.scrollTop,width:t.width,height:t.height}}function WE(n){return n.id?`id:${n.id}`:`${n.selector??"unknown"}:${n.selectorIndex??0}`}function T6(n,e,t){let r=null,i=null;try{r=n.contentDocument,i=n.contentWindow}catch{return null}if(!r||!i)return null;const s=n.getBoundingClientRect(),o=r.querySelector("[data-composition-id]")??r.documentElement??null,c=o==null?void 0:o.getBoundingClientRect(),u=(c==null?void 0:c.width)||i.innerWidth,f=(c==null?void 0:c.height)||i.innerHeight;if(!u||!f)return null;const p=s.width/u,O=s.height/f,y=(e-s.left)/p,v=(t-s.top)/O;return XE(r.elementFromPoint(y,v))}function BE({selectionLabel:n,onSubmit:e,onClose:t}){const[r,i]=h.useState(""),s=h.useRef(null);Lt(()=>{requestAnimationFrame(()=>{var c;return(c=s.current)==null?void 0:c.focus()})});const o=()=>{r.trim()&&e(r.trim())};return g.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm",onClick:t,children:g.jsxs("div",{className:"w-[480px] rounded-2xl border border-neutral-800 bg-neutral-950 shadow-2xl",onClick:c=>c.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:n.length>50?`${n.slice(0,49)}…`:n})]}),g.jsx("button",{className:"p-1 rounded-md text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800/50",onClick:t,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:s,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:r,onChange:c=>i(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.metaKey||c.ctrlKey)&&o(),c.key==="Escape"&&t()}})}),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:!r.trim(),onClick:o,children:"Copy prompt"})]})]})})}const Tu={image:3,video:5,audio:5};function YE(n){return Array.from(n.matchAll(/\bid="([^"]+)"/g),e=>e[1]??"")}async function E6(n,e,t){if(t==="image")return Tu.image;const r=document.createElement(t==="video"?"video":"audio");r.preload="metadata",r.src=`/api/projects/${n}/preview/${e}`;const i=await new Promise(s=>{const o=window.setTimeout(()=>s(Tu[t]),3e3),c=u=>{window.clearTimeout(o),s(u)};r.addEventListener("loadedmetadata",()=>{const u=Number(r.duration);c(Number.isFinite(u)&&u>0?Math.round(u*100)/100:Tu[t])},{once:!0}),r.addEventListener("error",()=>c(Tu[t]),{once:!0})});return r.src="",r.load(),i}function qE(){const[n,e]=h.useState(null),[t,r]=h.useState(!0);Lt(()=>{const Q=window.location.hash.match(/^#project\/([^/]+)/);if(Q){e(Q[1]),r(!1);return}fetch("/api/projects").then(I=>I.json()).then(I=>{const K=(I.projects??[])[0];K&&(e(K.id),window.location.hash=`#project/${K.id}`)}).catch(()=>{}).finally(()=>r(!1))});const[i,s]=h.useState(null),[o,c]=h.useState(null),[u,f]=h.useState(null),[p,O]=h.useState([]),[y,v]=h.useState(new Map),S=qM(n),b=dt(Q=>Q.isEditMode),P=dt(Q=>Q.selectedSegmentIds.size>0),A=hT(n),[z,M]=h.useState(240),[C,Z]=h.useState(400),[H,j]=h.useState(!1),[N,ne]=h.useState(!0),[se,le]=h.useState("renders"),[T,re]=h.useState(null),[ce,Y]=h.useState(),[G,oe]=h.useState(!1),[B,D]=h.useState(!1),[W,$]=h.useState(null);h.useEffect(()=>{if(!n)return;let Q=!1;const I=()=>{if(dt.getState().isEditMode||Q)return;const J=Wt.current;let ae=null,Se=null;try{ae=(J==null?void 0:J.contentDocument)??null,Se=(J==null?void 0:J.contentWindow)??null}catch{return}if(!ae||!Se||ae.querySelectorAll(".caption-group").length===0)return;let xe=null;const be=ae.querySelectorAll("[data-composition-src], [data-composition-file]");for(const nt of be){const qe=nt.getAttribute("data-composition-src")||nt.getAttribute("data-composition-file");if(qe&&qe.includes("captions")){xe=qe;break}}if(!xe){for(const[nt,qe]of y)if(nt.includes("caption")||qe.includes("caption")){xe=qe;break}}if(!xe&&(u!=null&&u.includes("captions"))&&(xe=u),!xe){const nt=ae.querySelector('[data-composition-id*="caption"]');if(nt){const qe=nt.getAttribute("data-composition-id")||"";xe=y.get(qe)||null}}if(!xe)return;Q=!0;const Be=xe;fetch(`/api/projects/${n}/files/${encodeURIComponent(Be)}`).then(nt=>nt.json()).then(nt=>{if(!nt.content||!ae||!Se||dt.getState().isEditMode)return;const qe=ae.querySelector("[data-composition-id]"),On=parseInt((qe==null?void 0:qe.getAttribute("data-width"))??"1920",10),yt=parseInt((qe==null?void 0:qe.getAttribute("data-height"))??"1080",10),Ue=parseFloat((qe==null?void 0:qe.getAttribute("data-duration"))??"0"),xn=gT(ae,Se,nt.content,On,yt,Ue);if(!xn)return;const qn=dt.getState();qn.setModel(xn),qn.setSourceFilePath(Be),qn.setEditMode(!0),A.loadOverrides()}).catch(()=>{}).finally(()=>{Q=!1})},K=J=>{const ae=J.data;(ae==null?void 0:ae.source)==="hf-preview"&&((ae==null?void 0:ae.type)==="state"||(ae==null?void 0:ae.type)==="timeline")&&I()};return window.addEventListener("message",K),I(),()=>{window.removeEventListener("message",K)}},[u,n,y,A]),h.useEffect(()=>{b&&ne(!P)},[P,b]);const[V,R]=h.useState(!1),[te,ie]=h.useState(null),[Ae,ye]=h.useState(!0),[Le,Fe]=h.useState(tw),rt=h.useRef(0),rn=h.useRef(null),Ut=h.useRef(0),_e=h.useRef(0),He=h.useRef([]),We=h.useRef(null),st=h.useRef(null),ze=u?`/api/projects/${n}/preview/comp/${u}`:null,et=!u||u==="index.html",pt=Ve(Q=>Q.zoomMode),gt=Ve(Q=>Q.manualZoomPercent),Mt=Ve(Q=>Q.setZoomMode),Vn=Ve(Q=>Q.setManualZoomPercent),ti=Ve(Q=>Q.currentTime),tt=Ve(Q=>Q.elements),fn=Ve(Q=>Q.setSelectedElementId),ni=Ve(Q=>Q.duration),Tt=h.useMemo(()=>{const Q=tt.length>0?Math.max(...tt.map(I=>I.start+I.duration)):0;return Math.max(ni,Q)},[ni,tt]),Ln=h.useMemo(()=>Q0(pt,gt),[pt,gt]),Hn=h.useCallback(()=>{ye(Q=>!Q)},[]);Lt(()=>()=>{rn.current&&clearTimeout(rn.current)});const Nn=h.useCallback(()=>{Fe(!0),nw()},[]),sn=h.useCallback(Q=>{ew(Q)&&(Q.preventDefault(),Hn())},[Hn]);Lt(()=>(window.addEventListener("keydown",sn),()=>{window.removeEventListener("keydown",sn)}));const pn=h.useCallback(Q=>{const I=(Q==null?void 0:Q.contentWindow)??null;We.current!==I&&(We.current&&We.current.removeEventListener("keydown",sn),We.current=I,I==null||I.addEventListener("keydown",sn))},[sn]);h.useEffect(()=>()=>{We.current&&(We.current.removeEventListener("keydown",sn),We.current=null)},[sn]);const ri=h.useCallback((Q,I)=>{var Se;const K=St.current;if(!K)return null;let J=Q.compositionSrc;if(J&&y.size>0){const ve=y.get(Q.id)||y.get(J.replace(/^compositions\//,"").replace(/\.html$/,""));ve&&(J=ve)}if(J)return g.jsx(Cd,{previewUrl:`/api/projects/${K}/preview/comp/${J}`,label:Q.id||Q.tag,labelColor:I.label,accentColor:I.clip,seekTime:0,duration:Q.duration});if(ze&&Q.duration>0)return g.jsx(Cd,{previewUrl:ze,label:Q.id||Q.tag,labelColor:I.label,accentColor:I.clip,selector:Q.selector,selectorIndex:Q.selectorIndex,seekTime:Q.start,duration:Q.duration});const ae=Q.duration>0&&Tt>0&&Q.duration<Tt*.92&&!/(backdrop|background|overlay|scrim|mask)/i.test(Q.id);if(Q.tag==="audio"){const ve=`/api/projects/${K}/preview/`,xe=(Se=Q.src)!=null&&Se.startsWith("http")?Q.src.indexOf(ve):-1,be=Q.src?xe!==-1?decodeURIComponent(Q.src.slice(xe+ve.length)):Q.src.startsWith("http")?null:Q.src:null,Be=be?`/api/projects/${K}/preview/${be}`:Q.src??"",nt=be?`/api/projects/${K}/waveform/${be}`:void 0;return g.jsx(JM,{audioUrl:Be,waveformUrl:nt,label:Q.id||Q.tag,labelColor:I.label})}if((Q.tag==="video"||Q.tag==="img")&&Q.src){const ve=Q.src.startsWith("http")?Q.src:`/api/projects/${K}/preview/${Q.src}`;return g.jsx(nS,{videoSrc:ve,label:Q.id||Q.tag,labelColor:I.label,duration:Q.duration})}return ae?g.jsx(Cd,{previewUrl:`/api/projects/${K}/preview`,label:Q.id||Q.tag,labelColor:I.label,accentColor:I.clip,selector:Q.selector,selectorIndex:Q.selectorIndex,seekTime:Q.start,duration:Q.duration}):null},[y,ze,Tt]),vt=g.jsxs("div",{className:"border-b border-neutral-800/40 bg-neutral-950/96",children:[Ae&&tt.length>0&&!Le&&g.jsx("div",{className:"px-3 pt-3",children:g.jsxs("div",{className:"flex items-start justify-between gap-3 rounded-xl border border-studio-accent/20 bg-studio-accent/[0.07] px-3 py-3",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-[11px] font-semibold text-neutral-100",children:"Timeline editor"}),g.jsxs("p",{className:"mt-1 text-[11px] leading-5 text-neutral-300",children:["Drag clips to move timing, and drag clip edges to resize them when handles are available. Hide the panel anytime and bring it back with"," ",g.jsx("span",{className:"font-mono text-[10px] text-studio-accent",children:Ef}),"."]})]}),g.jsx("button",{type:"button",onClick:Nn,className:"flex-shrink-0 rounded-md border border-neutral-700 px-2 py-1 text-[10px] font-medium text-neutral-300 transition-colors hover:border-neutral-500 hover:text-neutral-100",children:"Dismiss"})]})}),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:()=>Mt("fit"),className:`h-7 px-2.5 rounded-md border text-[11px] font-medium transition-colors ${pt==="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:()=>{Mt("manual"),Vn(pg("out",pt,gt))},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:`${Ln}%`}),g.jsx("button",{type:"button",onClick:()=>{Mt("manual"),Vn(pg("in",pt,gt))},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:"+"})]})]})]}),[Nr,dr]=h.useState(null),[Xr,hr]=h.useState(null),[Ci,kn]=h.useState(!1),[ln,Gt]=h.useState(0),fr=h.useRef(null),mn=h.useRef(null),St=h.useRef(n),Wt=h.useRef(null),Wn=h.useRef([]),pr=h.useRef(null),ii=h.useRef(T),$n=h.useRef(null),Mi=h.useRef(0),Bn=h.useRef(0);Lt(()=>{const Q=()=>{Date.now()-Mi.current<1200||(fr.current&&clearTimeout(fr.current),fr.current=setTimeout(()=>Gt(K=>K+1),400))},I=new EventSource("/api/events");return I.addEventListener("file-change",Q),()=>I.close()}),St.current=n,ii.current=T,h.useEffect(()=>{if(!n)return;let Q=!1;return fetch(`/api/projects/${n}`).then(I=>I.json()).then(I=>{!Q&&I.files&&O(I.files),Q||c(typeof I.dir=="string"?I.dir:null)}).catch(()=>{Q||c(null)}),()=>{Q=!0}},[n]);const Pn=h.useCallback(Q=>{const I=St.current;if(I){if(M(K=>Math.max(K,Math.floor(window.innerWidth*.5))),mg(Q)){s({path:Q,content:null});return}fetch(`/api/projects/${I}/files/${encodeURIComponent(Q)}`).then(K=>K.json()).then(K=>{K.content!=null&&s({path:Q,content:K.content})}).catch(()=>{})}},[]),Kt=h.useRef(i==null?void 0:i.path);Kt.current=i==null?void 0:i.path;const Ji=h.useCallback(Q=>{const I=St.current;if(!I)return;const K=Kt.current;K&&(mn.current&&clearTimeout(mn.current),mn.current=setTimeout(()=>{fetch(`/api/projects/${I}/files/${encodeURIComponent(K)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:Q}).then(()=>{fr.current&&clearTimeout(fr.current),fr.current=setTimeout(()=>Gt(J=>J+1),600)}).catch(()=>{})},600))},[]),es=h.useCallback(async(Q,I)=>{const K=St.current;if(!K)throw new Error("No active project");const J=Q.sourceFile||u||"index.html",ae=await fetch(`/api/projects/${K}/files/${encodeURIComponent(J)}`);if(!ae.ok)throw new Error(`Failed to read ${J}`);const ve=(await ae.json()).content;if(typeof ve!="string")throw new Error(`Missing file contents for ${J}`);const xe=Q.domId?{id:Q.domId,selector:Q.selector,selectorIndex:Q.selectorIndex}:Q.selector?{selector:Q.selector,selectorIndex:Q.selectorIndex}:null;if(!xe)throw new Error(`Timeline element ${Q.id} is missing a patchable target`);const be=J,Be=tt.map(yt=>(yt.key??yt.id)===(Q.key??Q.id)?{...yt,start:I.start,track:I.track}:yt).filter(yt=>(yt.sourceFile||u||"index.html")===be),nt=Ad(Be.map(yt=>yt.track));let qe=Ii(ve,xe,{type:"attribute",property:"start",value:Ks(I.start)});qe=Ii(qe,xe,{type:"attribute",property:"track-index",value:String(I.track)});for(const yt of Be){const Ue=yt.domId?{id:yt.domId,selector:yt.selector,selectorIndex:yt.selectorIndex}:yt.selector?{selector:yt.selector,selectorIndex:yt.selectorIndex}:null;if(!Ue)continue;const xn=nt.get(yt.track);xn!=null&&(qe=Ii(qe,Ue,{type:"inline-style",property:"z-index",value:String(xn)}))}if(qe===ve)throw new Error(`Unable to patch timeline element ${Q.id} in ${J}`);if(!(await fetch(`/api/projects/${K}/files/${encodeURIComponent(J)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:qe})).ok)throw new Error(`Failed to save ${J}`);Kt.current===J&&s({path:J,content:qe}),Gt(yt=>yt+1)},[u,tt]),ts=h.useCallback(async(Q,I)=>{const K=St.current;if(!K)throw new Error("No active project");const J=Q.sourceFile||u||"index.html",ae=await fetch(`/api/projects/${K}/files/${encodeURIComponent(J)}`);if(!ae.ok)throw new Error(`Failed to read ${J}`);const ve=(await ae.json()).content;if(typeof ve!="string")throw new Error(`Missing file contents for ${J}`);const xe=Q.domId?{id:Q.domId,selector:Q.selector,selectorIndex:Q.selectorIndex}:Q.selector?{selector:Q.selector,selectorIndex:Q.selectorIndex}:null;if(!xe)throw new Error(`Timeline element ${Q.id} is missing a patchable target`);const be=Q.playbackStartAttr==="playback-start"?"playback-start":"media-start",Be=G8(ve,xe,"playback-start")??G8(ve,xe,"media-start"),nt=Be!=null?parseFloat(Be):void 0,qe=I.start-Q.start,On=I.playbackStart==null&&qe!==0&&Number.isFinite(nt)&&nt!=null?Math.max(0,nt+qe*Math.max(Q.playbackRate??1,.1)):void 0,yt=I.playbackStart??On;let Ue=ve;if(Ue=Ii(Ue,xe,{type:"attribute",property:"start",value:Ks(I.start)}),Ue=Ii(Ue,xe,{type:"attribute",property:"duration",value:Ks(I.duration)}),yt!=null&&(Ue=Ii(Ue,xe,{type:"attribute",property:be,value:Ks(yt)})),Ue===ve)throw new Error(`Unable to patch timeline element ${Q.id} in ${J}`);if(!(await fetch(`/api/projects/${K}/files/${encodeURIComponent(J)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:Ue})).ok)throw new Error(`Failed to save ${J}`);Kt.current===J&&s({path:J,content:Ue}),Gt(qn=>qn+1)},[u]),wt=h.useCallback((Q,I="error")=>{rn.current&&clearTimeout(rn.current),ie({message:Q,tone:I}),rn.current=setTimeout(()=>ie(null),4e3)},[]),ko=h.useCallback(async Q=>{const I=St.current;if(!I)throw new Error("No active project");const K=Q.sourceFile||u||"index.html";try{const J=await fetch(`/api/projects/${I}/files/${encodeURIComponent(K)}`);if(!J.ok)throw new Error(`Failed to read ${K}`);const Se=(await J.json()).content;if(typeof Se!="string")throw new Error(`Missing file contents for ${K}`);const ve=Q.domId?{id:Q.domId,selector:Q.selector,selectorIndex:Q.selectorIndex}:Q.selector?{selector:Q.selector,selectorIndex:Q.selectorIndex}:null;if(!ve)throw new Error(`Timeline element ${Q.id} is missing a patchable target`);const xe=K||"index.html",be=tt.filter(Ue=>(Ue.key??Ue.id)!==(Q.key??Q.id)&&(Ue.sourceFile||u||"index.html")===xe),Be=Ad(be.map(Ue=>Ue.track)),nt=await fetch(`/api/projects/${I}/file-mutations/remove-element/${encodeURIComponent(K)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({target:ve})});if(!nt.ok)throw new Error(`Failed to delete ${Q.id} from ${K}`);const qe=await nt.json();let On=typeof qe.content=="string"?qe.content:Se;for(const Ue of be){const xn=Ue.domId?{id:Ue.domId,selector:Ue.selector,selectorIndex:Ue.selectorIndex}:Ue.selector?{selector:Ue.selector,selectorIndex:Ue.selectorIndex}:null;if(!xn)continue;const qn=Be.get(Ue.track);qn!=null&&(On=Ii(On,xn,{type:"inline-style",property:"z-index",value:String(qn)}))}if(!(await fetch(`/api/projects/${I}/files/${encodeURIComponent(K)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:On})).ok)throw new Error(`Failed to save ${K}`);Kt.current===K&&s({path:K,content:On}),Ve.getState().setElements(tt.filter(Ue=>(Ue.key??Ue.id)!==(Q.key??Q.id))),Ve.getState().setSelectedElementId(null),Gt(Ue=>Ue+1)}catch(J){const ae=J instanceof Error?J.message:"Failed to delete timeline clip";wt(ae)}},[u,wt,tt]),$o=h.useCallback(Q=>{const I=Date.now();I-Ut.current<1500||(Ut.current=I,wt("This clip can’t be moved or resized from the timeline yet.","info"))},[wt]),_r=h.useCallback(Q=>{const I=Date.now();I-_e.current<1500||(_e.current=I,wt(Q.capabilities.canDetachFromLayout?"This layer is controlled by layout. Use Make movable in the panel to detach it.":Q.capabilities.reasonIfDisabled??"This element can’t be moved directly from the preview.","info"))},[wt]),Ot=h.useCallback((Q,I)=>{if(re(Q),Y(void 0),oe(!1),Q){(I==null?void 0:I.revealPanel)!==!1&&(ne(!1),le("design"));const K=_E(Q,tt);fn(K);return}fn(null)},[fn,tt]),si=h.useCallback(()=>{Ot(null,{revealPanel:!1})},[Ot]),gn=h.useCallback((Q,I)=>{if(et){const K=DE(Q,tt,y,p);if(K){const J=s6(K.host,{activeCompositionPath:u,isMasterView:et,preferClipAncestor:I==null?void 0:I.preferClipAncestor});return J?{...J,compositionSrc:K.compositionSrc,isCompositionHost:!0,capabilities:iy({selector:J.selector,tagName:J.tagName,className:J.element.className,inlineStyles:J.inlineStyles,computedStyles:J.computedStyles,isCompositionHost:!0,isMasterView:!0})}:null}}return s6(Q,{activeCompositionPath:u,isMasterView:et,preferClipAncestor:I==null?void 0:I.preferClipAncestor})},[u,y,p,et,tt]),ns=h.useCallback(async Q=>{const I=St.current;if(!I)return;const K=Q.sourceFile||u||"index.html";try{const J=await fetch(`/api/projects/${I}/files/${encodeURIComponent(K)}`);if(!J.ok)return;const Se=(await J.json()).content,ve=typeof Se=="string"?wT(Se,Q):void 0;Y(xe=>ii.current!==Q?xe:ve)}catch{}},[u]),Dr=h.useCallback(Q=>{const I=RE(Q);if(!I)return null;const K=He.current.find(ae=>ae.family.toLowerCase()===I.toLowerCase());if(K)return K;const J=p.find(ae=>tu.test(ae)&&Gl(ae).toLowerCase()===I.toLowerCase());return J?{family:Gl(J),path:J,url:`/api/projects/${n}/preview/${J}`}:null},[p,n]),Pt=h.useCallback(async(Q,I,K)=>{const J=St.current;if(!J)throw new Error("No active project");if(K!=null&&K.shouldSave&&!K.shouldSave())return;const ae=Q.sourceFile||u||"index.html",Se=await fetch(`/api/projects/${J}/files/${encodeURIComponent(ae)}`);if(!Se.ok)throw new Error(`Failed to read ${ae}`);const xe=(await Se.json()).content;if(typeof xe!="string")throw new Error(`Missing file contents for ${ae}`);let be=xe;for(const nt of I)be=Ii(be,Q,nt);if(K!=null&&K.prepareContent&&(be=K.prepareContent(be,ae)),K!=null&&K.shouldSave&&!K.shouldSave())return;if(be===xe)throw new Error(`Unable to patch ${Q.selector??Q.id??"selection"}`);if(!(await fetch(`/api/projects/${J}/files/${encodeURIComponent(ae)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:be})).ok)throw new Error(`Failed to save ${ae}`);Kt.current===ae&&s({path:ae,content:be}),K!=null&&K.skipRefresh?Mi.current=Date.now():Gt(nt=>nt+1)},[u]),Xn=h.useCallback(async(Q,I)=>{await Pt(Q,[...rE(I.left,I.top),...Mu(Q,"both")],{skipRefresh:!0})},[Pt]),Rs=h.useCallback(async(Q,I)=>{Mf(Q)&&(Q.element.style.right="auto",Q.element.style.bottom="auto"),await Pt(Q,[...iE(I.width,I.height),...Mu(Q,"both")],{skipRefresh:!0})},[Pt]),fl=h.useCallback(async()=>{var ve;const Q=T;if(!(Q!=null&&Q.capabilities.canDetachFromLayout))return;const I=(ve=Wt.current)==null?void 0:ve.contentDocument,K=I?Fi(I,Q,Q.sourceFile):Q.element;if(!K){wt("Could not find the selected layer in the preview.","info");return}const J=HE(K),ae=sE(J);for(const xe of ae)K.style.setProperty(xe.property,xe.value);await Pt(Q,ae,{skipRefresh:!0});const Se=I?Fi(I,Q,Q.sourceFile):K;if(Se){const xe=gn(Se);xe&&Ot(xe,{revealPanel:!1})}wt("Layer detached from layout. You can move it now.","info")},[Ot,gn,T,Pt,wt]),_=h.useCallback(async(Q,I)=>{if(!T)return;const K=zE(Q),J=IE(Q);if(K&&!T.capabilities.canMove||J&&!T.capabilities.canResize||!K&&!J&&!T.capabilities.canEditStyles)return;const ae=Q==="font-family"?Dr(I):null,Se=Wt.current,ve=Se==null?void 0:Se.contentDocument;if(ve){const be=Fi(ve,T,T.sourceFile);be&&(be.style.setProperty(Q,bh(Q,I)),Q==="font-family"&&(P6(ve,I),ae&&Q6(ve,ae)),Mf(T)&&(Q==="width"&&(be.style.right="auto"),Q==="height"&&(be.style.bottom="auto")),Q==="background-image"&&M6(I)&&(be.style.setProperty("background-position","center"),be.style.setProperty("background-repeat","no-repeat"),be.style.setProperty("background-size","contain")))}const xe=[$u(Q,bh(Q,I))];Q==="width"?xe.push(...Mu(T,"width")):Q==="height"?xe.push(...Mu(T,"height")):Q==="background-image"&&M6(I)&&xe.push($u("background-position","center"),$u("background-repeat","no-repeat"),$u("background-size","contain")),await Pt(T,xe,{skipRefresh:!0,prepareContent:ae?(be,Be)=>C6(be,ae,Be):void 0})},[T,Pt,Dr]),me=h.useCallback(async(Q,I)=>{if(!T||!sy(T))return;const K=Bn.current+1;Bn.current=K;const J=T.textFields.length>0?T.textFields.map(xe=>xe.key===I?{...xe,value:Q}:xe):[],ae=J.length>1||J.some(xe=>xe.source==="child")?i6(J):Q,Se=Wt.current,ve=Se==null?void 0:Se.contentDocument;if(ve){const xe=Fi(ve,T,T.sourceFile);xe&&(J.length>1||J.some(be=>be.source==="child")?xe.innerHTML=ae:xe.textContent=Q)}if(await Pt(T,[l6(ae)],{skipRefresh:!0,shouldSave:()=>Bn.current===K}),Bn.current===K&&ve){const xe=Fi(ve,T,T.sourceFile);if(xe){const be=gn(xe);be&&Ot(be,{revealPanel:!1})}}},[Ot,gn,T,Pt]),Oe=h.useCallback(async(Q,I,K)=>{var xe;const J=I.length>1||I.some(be=>be.source==="child")?i6(I):((xe=I[0])==null?void 0:xe.value)??"",ae=Wt.current,Se=ae==null?void 0:ae.contentDocument;if(Se){const be=Fi(Se,Q,Q.sourceFile);be&&(I.length>1||I.some(Be=>Be.source==="child")?be.innerHTML=J:be.textContent=J)}const ve=(K==null?void 0:K.importedFont)??null;if(await Pt(Q,[l6(J)],{skipRefresh:!0,prepareContent:ve?(be,Be)=>C6(be,ve,Be):void 0}),Se){const be=Fi(Se,Q,Q.sourceFile);if(be){const Be=gn(be);Be&&Ot(Be,{revealPanel:!1})}}},[Ot,gn,Pt]),pe=h.useCallback(async(Q,I,K)=>{var xe;if(!T)return;const J=T.textFields.find(be=>be.key===Q);if(!J)return;if(J.source==="self"){await _(I,K);return}const ae=bh(I,K),Se=I==="font-family"?Dr(K):null;if(I==="font-family"){const be=(xe=Wt.current)==null?void 0:xe.contentDocument;be&&(P6(be,ae),Se&&Q6(be,Se))}const ve=T.textFields.map(be=>be.key===Q?{...be,inlineStyles:{...be.inlineStyles,[I]:ae},computedStyles:{...be.computedStyles,[I]:ae}}:be);await Oe(T,ve,{importedFont:Se})},[Oe,T,_,Dr]),je=h.useCallback(async Q=>{if(!T||!T.textFields.some(Se=>Se.source==="child"))return null;const I=T.textFields.findIndex(Se=>Se.key===Q),K=T.textFields[I>=0?I:0]??T.textFields[0],J=nE(K),ae=[...T.textFields];return ae.splice(I>=0?I+1:ae.length,0,J),await Oe(T,ae),J.key},[Oe,T]),we=h.useCallback(async Q=>{if(!T)return;const I=T.textFields.find(J=>J.key===Q);if(!I)return;if(I.source==="self"){await me("",Q);return}const K=T.textFields.filter(J=>J.key!==Q);await Oe(T,K)},[Oe,T,me]),ht=h.useCallback(()=>{T&&(Y(void 0),ns(T),D(!0))},[T,ns]),Nt=h.useCallback(async Q=>{if(!T)return;const I=T.sourceFile||u||"index.html",K=ce??T.element.outerHTML,J=aE({selection:T,currentTime:ti,tagSnippet:K,userInstruction:Q,sourceFilePath:NE(o,I)});if(!await Pa(J)){wt("Could not copy prompt to clipboard.","error");return}D(!1),pr.current&&clearTimeout(pr.current),oe(!0),pr.current=setTimeout(()=>oe(!1),1600)},[u,ce,ti,T,o,wt]),ft=h.useCallback(Q=>{Wt.current=Q,$(Q),pn(Q),Wn.current=[],hr(null)},[pn]),Qn=h.useCallback((Q,I)=>{const K=Wt.current;if(!K||b)return;const J=T6(K,Q.clientX,Q.clientY);if(!J){$n.current=null,Ot(null,{revealPanel:!1});return}Q.preventDefault(),Q.stopPropagation();const ae=gn(J,{preferClipAncestor:(I==null?void 0:I.preferClipAncestor)??!0});if(!ae){$n.current=null,Ot(null,{revealPanel:!1});return}if(ae.isCompositionHost&&et&&ae.compositionSrc){const Se=WE(ae),ve=$n.current,xe=Date.now();if(ve&&ve.key===Se&&xe-ve.at<350){$n.current=null,Ot(null,{revealPanel:!1}),f(ae.compositionSrc);return}$n.current={key:Se,at:xe}}else $n.current=null;Ot(ae)},[Ot,gn,b,et]),Qt=h.useCallback(Q=>{const I=Wt.current;if(!I||b)return;const K=T6(I,Q.clientX,Q.clientY);if(!K)return;const J=gn(K,{preferClipAncestor:!1});!(J!=null&&J.isCompositionHost)||!et||!J.compositionSrc||(Q.preventDefault(),Q.stopPropagation(),$n.current=null,Ot(null,{revealPanel:!1}),f(J.compositionSrc))},[Ot,gn,b,et]),rs=h.useCallback(()=>{const Q=ii.current;!(Q!=null&&Q.isCompositionHost)||!Q.compositionSrc||(Ot(null,{revealPanel:!1}),f(Q.compositionSrc))},[Ot]);h.useEffect(()=>{if(!W||b)return;const Q=()=>{const J=ii.current;if(!J)return;let ae=null;try{ae=W.contentDocument}catch{return}if(!ae)return;const Se=Fi(ae,J,u);if(!Se){Ot(null,{revealPanel:!1});return}const ve=gn(Se);ve&&Ot(ve,{revealPanel:!1})},I=()=>{try{const J=W.contentWindow;if(!J||J.__hfErrorCapture)return;J.__hfErrorCapture=!0;const ae=J.console.error.bind(J.console);J.console.error=function(...Se){ae(...Se);const ve=Se.map(xe=>xe instanceof Error?xe.message:String(xe)).join(" ");ve.includes("favicon")||(Wn.current=[...Wn.current,{severity:"error",message:ve}],hr([...Wn.current]))},J.addEventListener("error",Se=>{const ve=Se.message||String(Se);Wn.current=[...Wn.current,{severity:"error",message:ve}],hr([...Wn.current])})}catch{}};I(),Q();const K=()=>{Wn.current=[],hr(null),I(),Q()};return W.addEventListener("load",K),()=>{W.removeEventListener("load",K)}},[u,Ot,gn,b,W]),h.useEffect(()=>{b&&Ot(null,{revealPanel:!1})},[Ot,b]),h.useEffect(()=>()=>{pr.current&&clearTimeout(pr.current)},[]);const Xt=h.useCallback(async()=>{const Q=St.current;if(!Q)return;const K=await(await fetch(`/api/projects/${Q}`)).json();K.files&&O(K.files)},[]),Yn=h.useCallback(async(Q,I)=>{var ve,xe;const K=St.current,J=Array.from(Q);if(!K||J.length===0)return[];const ae=new FormData;for(const be of J)ae.append("file",be);const Se=I?`?dir=${encodeURIComponent(I)}`:"";try{const be=await fetch(`/api/projects/${K}/upload${Se}`,{method:"POST",body:ae});if(be.ok){const Be=await be.json();if((ve=Be.skipped)!=null&&ve.length&&wt(`Skipped (too large): ${Be.skipped.join(", ")}`),(xe=Be.invalid)!=null&&xe.length){const nt=Be.invalid.map(qe=>qe.name).join(", ");wt(`Unsupported media skipped: ${nt}`)}return await Xt(),Gt(nt=>nt+1),Array.isArray(Be.files)?Be.files:[]}else be.status===413?wt("Upload rejected: payload too large"):wt(`Upload failed (${be.status})`)}catch{wt("Upload failed: network error")}return[]},[Xt,wt]),li=h.useCallback(async(Q,I,K)=>{const J=St.current;if(!J)throw new Error("No active project");const ae=gg(Q);if(!ae){wt("Only image, video, and audio assets can be dropped onto the timeline.");return}const Se=u||"index.html";try{const ve=await fetch(`/api/projects/${J}/files/${encodeURIComponent(Se)}`);if(!ve.ok)throw new Error(`Failed to read ${Se}`);const be=(await ve.json()).content;if(typeof be!="string")throw new Error(`Missing file contents for ${Se}`);const Be=Number(Ks(I.start)),nt=Number.isFinite(K)&&K!=null&&K>0?K:await E6(J,Q,ae),qe=Number(Ks(nt)),On=jw(Q,YE(be)),yt=Rw(Se,Q),Ue=Se||"index.html",xn=tt.filter(Bt=>(Bt.sourceFile||u||"index.html")===Ue),qn=Ad([...xn.map(Bt=>Bt.track),I.track]);let ss=be;for(const Bt of xn){const Zi=Bt.domId?{id:Bt.domId,selector:Bt.selector,selectorIndex:Bt.selectorIndex}:Bt.selector?{selector:Bt.selector,selectorIndex:Bt.selectorIndex}:null;if(!Zi)continue;const Xs=qn.get(Bt.track);Xs!=null&&(ss=Ii(ss,Zi,{type:"inline-style",property:"z-index",value:String(Xs)}))}if(ss=Xw(ss,Nw({id:On,assetPath:yt,kind:ae,start:Be,duration:qe,track:I.track,zIndex:qn.get(I.track)??1,geometry:Lw(be)})),!(await fetch(`/api/projects/${J}/files/${encodeURIComponent(Se)}`,{method:"PUT",headers:{"Content-Type":"text/plain"},body:ss})).ok)throw new Error(`Failed to save ${Se}`);Kt.current===Se&&s({path:Se,content:ss}),Gt(Bt=>Bt+1)}catch(ve){const xe=ve instanceof Error?ve.message:"Failed to drop asset onto timeline";wt(xe)}},[u,wt,tt]),Vs=h.useCallback(async(Q,I)=>{const K=St.current;if(!K)return;const J=await Yn(Q);if(J.length===0)return;const ae=[];for(const ve of J){const xe=gg(ve),be=xe?await E6(K,ve,xe):0;ae.push(Number(Ks(be)))}const Se=Vw(I??{start:0,track:0},ae,tt.filter(ve=>(ve.sourceFile||u||"index.html")===(u||"index.html")).map(ve=>({start:ve.start,duration:ve.duration,track:ve.track})));for(const[ve,xe]of J.entries())await li(xe,Se[ve]??Se[0],ae[ve])},[u,li,tt,Yn]),oi=h.useCallback(async Q=>{const I=St.current;if(!I)return;let K="";Q.endsWith(".html")&&(K=`<!DOCTYPE html>
97
- <html>
98
- <head>
99
- <meta charset="UTF-8">
100
- </head>
101
- <body>
102
-
103
- </body>
104
- </html>
105
- `);const J=await fetch(`/api/projects/${I}/files/${encodeURIComponent(Q)}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:K});if(J.ok)await Xt(),Pn(Q);else{const ae=await J.json().catch(()=>({error:"unknown"}));console.error(`Create file failed: ${ae.error}`)}},[Xt,Pn]),xt=h.useCallback(async Q=>{const I=St.current;if(!I)return;const K=await fetch(`/api/projects/${I}/files/${encodeURIComponent(Q+"/.gitkeep")}`,{method:"POST",headers:{"Content-Type":"text/plain"},body:""});if(K.ok)await Xt();else{const J=await K.json().catch(()=>({error:"unknown"}));console.error(`Create folder failed: ${J.error}`)}},[Xt]),Ti=h.useCallback(async Q=>{const I=St.current;if(!I)return;const K=await fetch(`/api/projects/${I}/files/${encodeURIComponent(Q)}`,{method:"DELETE"});if(K.ok)Kt.current===Q&&s(null),await Xt();else{const J=await K.json().catch(()=>({error:"unknown"}));console.error(`Delete failed: ${J.error}`)}},[Xt]),Ei=h.useCallback(async(Q,I)=>{const K=St.current;if(!K)return;const J=await fetch(`/api/projects/${K}/files/${encodeURIComponent(Q)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({newPath:I})});if(J.ok)Kt.current===Q&&Pn(I),await Xt(),Gt(ae=>ae+1);else{const ae=await J.json().catch(()=>({error:"unknown"}));console.error(`Rename failed: ${ae.error}`)}},[Xt,Pn]),ai=h.useCallback(async Q=>{const I=St.current;if(!I)return;const K=await fetch(`/api/projects/${I}/duplicate-file`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:Q})});if(K.ok){const J=await K.json();await Xt(),J.path&&Pn(J.path)}else{const J=await K.json().catch(()=>({error:"unknown"}));console.error(`Duplicate failed: ${J.error}`)}},[Xt,Pn]),Ls=Ei,ci=h.useCallback(async(Q,I)=>Yn(Array.from(Q),I),[Yn]),Ns=h.useCallback(async Q=>{const I=await Yn(Array.from(Q).filter(ae=>tu.test(ae.name)),"assets/fonts"),K=St.current,J=I.filter(ae=>tu.test(ae)).map(ae=>({family:Gl(ae),path:ae,url:`/api/projects/${K}/preview/${ae}`}));return He.current=[...J,...He.current.filter(ae=>!J.some(Se=>Se.family.toLowerCase()===ae.family.toLowerCase()))],J},[Yn]),B0=h.useCallback(async()=>{const Q=St.current;if(Q){kn(!0);try{const J=((await(await fetch(`/api/projects/${Q}/lint`)).json()).findings??[]).map(ae=>({severity:ae.severity==="error"?"error":"warning",message:ae.message??"",file:ae.file,fixHint:ae.fixHint}));dr(J)}catch(I){const K=I instanceof Error?I.message:String(I);dr([{severity:"error",message:`Failed to run lint: ${K}`}])}finally{kn(!1)}}},[]),pl=h.useCallback((Q,I)=>{I.preventDefault(),I.target.setPointerCapture(I.pointerId),st.current={side:Q,startX:I.clientX,startW:Q==="left"?z:C}},[z,C]),ct=h.useCallback(Q=>{const I=st.current;if(!I)return;const K=Q.clientX-I.startX,J=Math.floor(window.innerWidth*.5),ae=Math.max(160,Math.min(I.side==="left"?J:600,I.startW+(I.side==="left"?K:-K)));I.side==="left"?M(ae):Z(ae)},[]),Po=h.useCallback(()=>{st.current=null},[]),Ja=h.useMemo(()=>p.filter(Q=>Q==="index.html"||Q.startsWith("compositions/")),[p]),is=h.useMemo(()=>p.filter(Q=>!Q.endsWith(".html")&&!Q.endsWith(".md")&&!Q.endsWith(".json")),[p]),ec=h.useMemo(()=>is.filter(Q=>tu.test(Q)).map(Q=>({family:Gl(Q),path:Q,url:`/api/projects/${n}/preview/${Q}`})),[is,n]);return t||!n?g.jsx("div",{className:"h-full w-full bg-neutral-950 flex items-center justify-center",children:g.jsx("div",{className:"w-4 h-4 rounded-full bg-studio-accent animate-pulse"})}):g.jsxs("div",{className:"flex flex-col h-full w-full bg-neutral-950 relative",onDragOver:Q=>{Q.dataTransfer.types.includes("Files")&&Q.preventDefault()},onDragEnter:Q=>{Q.dataTransfer.types.includes("Files")&&(Q.preventDefault(),rt.current++,R(!0))},onDragLeave:()=>{rt.current--,rt.current===0&&R(!1)},onDrop:Q=>{rt.current=0,R(!1),!Q.defaultPrevented&&(Q.preventDefault(),Q.dataTransfer.files.length&&ci(Q.dataTransfer.files))},children:[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.jsx("div",{className:"flex items-center gap-2",children:g.jsx("span",{className:"text-[11px] font-medium text-neutral-400",children:n})}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("button",{onClick:()=>j(Q=>!Q),className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${H?"bg-transparent border-transparent text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800":"text-studio-accent bg-studio-accent/10 border-studio-accent/30"}`,title:H?"Show sidebar":"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",children:[g.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),g.jsx("path",{d:"M9 3v18"})]})}),g.jsxs("button",{type:"button",onClick:Hn,className:`h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border transition-colors ${Ae?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"text-neutral-300 border-neutral-700 hover:border-neutral-500 hover:bg-neutral-800"}`,title:R6(Ae),"aria-label":Ae?"Hide timeline editor":"Show timeline editor",children:[g.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[g.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),g.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),g.jsx("line",{x1:"3",y1:"5",x2:"21",y2:"5"})]}),g.jsx("span",{children:"Timeline"})]}),g.jsxs("button",{onClick:()=>{if(N||se!=="design"){le("design"),ne(!1);return}si(),ne(!0)},className:`h-7 flex items-center gap-1.5 px-2.5 rounded-md text-[11px] font-medium border transition-colors ${N?"text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800 border-transparent":"text-studio-accent bg-studio-accent/10 border-studio-accent/30"}`,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"]})]})]}),g.jsxs("div",{className:"flex flex-1 min-h-0",children:[!H&&g.jsx(zM,{width:z,projectId:n,compositions:Ja,assets:is,activeComposition:(i==null?void 0:i.path)??null,onSelectComposition:Q=>{f(Q==="index.html"||Q.startsWith("compositions/")?Q:null),s({path:Q,content:null}),fetch(`/api/projects/${n}/files/${Q}`).then(I=>I.json()).then(I=>s({path:Q,content:I.content})).catch(()=>{})},fileTree:p,editingFile:i,onSelectFile:Pn,onCreateFile:oi,onCreateFolder:xt,onDeleteFile:Ti,onRenameFile:Ei,onDuplicateFile:ai,onMoveFile:Ls,onImportFiles:ci,codeChildren:i?mg(i.path)?g.jsx(eT,{projectId:n??"",filePath:i.path}):g.jsx(xM,{content:i.content??"",filePath:i.path,onChange:Ji}):void 0,onLint:B0,linting:Ci}),!H&&g.jsx("div",{className:"group w-2 flex-shrink-0 cursor-col-resize flex items-center justify-center",style:{touchAction:"none"},onPointerDown:Q=>pl("left",Q),onPointerMove:ct,onPointerUp:Po,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-1 relative min-w-0",children:g.jsx(Xb,{projectId:n,refreshKey:ln,activeCompositionPath:u,timelineToolbar:vt,renderClipContent:ri,onDeleteElement:ko,onAssetDrop:li,onFileDrop:Vs,onMoveElement:es,onResizeElement:ts,onBlockedEditAttempt:$o,onCompIdToSrcChange:v,onCompositionChange:Q=>{f(Q)},onIframeRef:ft,previewOverlay:b?g.jsx(rT,{iframeRef:Wt}):g.jsx(EE,{iframeRef:Wt,selection:!N&&se==="design"?T:null,onCanvasMouseDown:Qn,onCanvasDoubleClick:Qt,onSelectedDoubleClick:rs,onBlockedMove:_r,onMoveCommit:Xn,onResizeCommit:Rs}),timelineFooter:b?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(uT,{pixelsPerSecond:100})]}):void 0,timelineVisible:Ae,onToggleTimeline:Hn})}),!N&&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:Q=>pl("right",Q),onPointerMove:ct,onPointerUp:Po,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:C},children:b?g.jsx(cT,{iframeRef:Wt}):g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"flex items-center gap-1 border-b border-neutral-800 px-3 py-2",children:[g.jsx("button",{type:"button",onClick:()=>le("design"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${se==="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:()=>le("renders"),className:`h-8 rounded-xl px-3 text-[11px] font-medium transition-colors ${se==="renders"?"bg-neutral-800 text-white":"text-neutral-500 hover:bg-neutral-800/70 hover:text-neutral-200"}`,children:S.jobs.length>0?`Renders (${S.jobs.length})`:"Renders"})]}),g.jsx("div",{className:"min-h-0 flex-1",children:se==="design"?g.jsx(AE,{projectId:n,assets:is,element:T,copiedAgentPrompt:G,onClearSelection:si,onSetStyle:_,onSetText:me,onSetTextFieldStyle:pe,onAddTextField:je,onRemoveTextField:we,onDetachFromLayout:fl,onAskAgent:ht,onCopyAgentInstruction:Nt,onImportAssets:ci,fontAssets:ec,onImportFonts:Ns}):g.jsx(YM,{jobs:S.jobs,projectId:n,onDelete:S.deleteRender,onClearCompleted:S.clearCompleted,onStartRender:(Q,I)=>S.startRender(30,I,Q),isRendering:S.isRendering})})]})})]})]}),Nr!==null&&n&&g.jsx(H8,{findings:Nr,projectId:n,onClose:()=>dr(null)}),Xr!==null&&Xr.length>0&&n&&g.jsx(H8,{findings:Xr,projectId:n,onClose:()=>hr(null)}),B&&T&&g.jsx(BE,{selectionLabel:T.label,onSubmit:Nt,onClose:()=>D(!1)}),V&&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"})]})}),te&&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 ${te.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:te.message})]})}Bv.createRoot(document.getElementById("root")).render(g.jsx(h.StrictMode,{children:g.jsx(qE,{})}));