@valbuild/ui 0.26.0 → 0.27.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 (138) hide show
  1. package/package.json +7 -3
  2. package/server/.tmp/assets/index-082e6676.css +1 -0
  3. package/server/.tmp/assets/index-3108ab2a.js +197 -0
  4. package/{index.html → server/.tmp/index.html} +3 -1
  5. package/.babelrc.json +0 -10
  6. package/.storybook/main.js +0 -25
  7. package/.storybook/preview-head.html +0 -6
  8. package/.storybook/preview.js +0 -33
  9. package/.storybook/theme.css +0 -34
  10. package/CHANGELOG.md +0 -0
  11. package/components.json +0 -16
  12. package/fix-server-hack.js +0 -54
  13. package/fullscreen.vite.config.ts +0 -9
  14. package/jest.config.js +0 -4
  15. package/postcss.config.js +0 -6
  16. package/rollup.config.js +0 -23
  17. package/server.vite.config.ts +0 -31
  18. package/src/App.tsx +0 -73
  19. package/src/assets/icons/Bold.tsx +0 -23
  20. package/src/assets/icons/Chevron.tsx +0 -28
  21. package/src/assets/icons/FontColor.tsx +0 -30
  22. package/src/assets/icons/ImageIcon.tsx +0 -29
  23. package/src/assets/icons/Italic.tsx +0 -24
  24. package/src/assets/icons/Logo.tsx +0 -103
  25. package/src/assets/icons/Section.tsx +0 -41
  26. package/src/assets/icons/Strikethrough.tsx +0 -22
  27. package/src/assets/icons/TextIcon.tsx +0 -20
  28. package/src/assets/icons/Underline.tsx +0 -22
  29. package/src/assets/icons/Undo.tsx +0 -20
  30. package/src/components/Button.tsx +0 -68
  31. package/src/components/Checkbox.tsx +0 -51
  32. package/src/components/DraggableList.stories.tsx +0 -20
  33. package/src/components/DraggableList.tsx +0 -95
  34. package/src/components/Dropdown.tsx +0 -101
  35. package/src/components/EditButton.tsx +0 -10
  36. package/src/components/ErrorText.tsx +0 -3
  37. package/src/components/ExpandLogo.tsx +0 -72
  38. package/src/components/Grid.stories.tsx +0 -43
  39. package/src/components/Grid.tsx +0 -139
  40. package/src/components/RichTextEditor/ContentEditable.tsx +0 -117
  41. package/src/components/RichTextEditor/Nodes/ImageNode.tsx +0 -100
  42. package/src/components/RichTextEditor/Plugins/AutoFocus.tsx +0 -12
  43. package/src/components/RichTextEditor/Plugins/ImagePlugin.tsx +0 -45
  44. package/src/components/RichTextEditor/Plugins/LinkEditorPlugin.tsx +0 -58
  45. package/src/components/RichTextEditor/Plugins/Toolbar.tsx +0 -412
  46. package/src/components/RichTextEditor/RichTextEditor.tsx +0 -105
  47. package/src/components/UploadModal.tsx +0 -109
  48. package/src/components/User.tsx +0 -17
  49. package/src/components/ValFormField.tsx +0 -574
  50. package/src/components/ValFullscreen.tsx +0 -1278
  51. package/src/components/ValMenu.tsx +0 -92
  52. package/src/components/ValOverlay.tsx +0 -488
  53. package/src/components/ValOverlayContext.tsx +0 -80
  54. package/src/components/ValWindow.stories.tsx +0 -146
  55. package/src/components/ValWindow.tsx +0 -220
  56. package/src/components/dashboard/DashboardButton.tsx +0 -25
  57. package/src/components/dashboard/DashboardDropdown.tsx +0 -59
  58. package/src/components/dashboard/Dropdown.stories.tsx +0 -11
  59. package/src/components/dashboard/Dropdown.tsx +0 -70
  60. package/src/components/dashboard/FormGroup.stories.tsx +0 -37
  61. package/src/components/dashboard/FormGroup.tsx +0 -42
  62. package/src/components/dashboard/Grid2.stories.tsx +0 -56
  63. package/src/components/dashboard/Grid2.tsx +0 -72
  64. package/src/components/dashboard/Tree.stories.tsx +0 -91
  65. package/src/components/dashboard/Tree.tsx +0 -72
  66. package/src/components/dashboard/ValDashboardEditor.tsx +0 -269
  67. package/src/components/dashboard/ValDashboardGrid.tsx +0 -142
  68. package/src/components/dashboard/ValTreeNavigator.tsx +0 -253
  69. package/src/components/forms/Form.tsx +0 -126
  70. package/src/components/forms/FormContainer.tsx +0 -24
  71. package/src/components/forms/ImageForm.tsx +0 -195
  72. package/src/components/forms/TextArea.tsx +0 -24
  73. package/src/components/ui/accordion.tsx +0 -58
  74. package/src/components/ui/alert-dialog.tsx +0 -139
  75. package/src/components/ui/avatar.tsx +0 -48
  76. package/src/components/ui/button.tsx +0 -56
  77. package/src/components/ui/calendar.tsx +0 -62
  78. package/src/components/ui/card.tsx +0 -86
  79. package/src/components/ui/checkbox.tsx +0 -28
  80. package/src/components/ui/command.tsx +0 -153
  81. package/src/components/ui/dialog.tsx +0 -120
  82. package/src/components/ui/dropdown-menu.tsx +0 -198
  83. package/src/components/ui/form.tsx +0 -177
  84. package/src/components/ui/input.tsx +0 -24
  85. package/src/components/ui/label.tsx +0 -24
  86. package/src/components/ui/popover.tsx +0 -29
  87. package/src/components/ui/progress.tsx +0 -26
  88. package/src/components/ui/radio-group.tsx +0 -42
  89. package/src/components/ui/scroll-area.tsx +0 -51
  90. package/src/components/ui/select.tsx +0 -119
  91. package/src/components/ui/switch.tsx +0 -27
  92. package/src/components/ui/tabs.tsx +0 -53
  93. package/src/components/ui/toggle.tsx +0 -43
  94. package/src/components/ui/tooltip.tsx +0 -28
  95. package/src/components/usePatch.ts +0 -86
  96. package/src/components/useTheme.ts +0 -45
  97. package/src/dto/SerializedSchema.ts +0 -69
  98. package/src/dto/Session.ts +0 -12
  99. package/src/dto/SessionMode.ts +0 -5
  100. package/src/dto/Tree.ts +0 -18
  101. package/src/exports.ts +0 -6
  102. package/src/index.css +0 -115
  103. package/src/index.tsx +0 -14
  104. package/src/lib/IValStore.ts +0 -6
  105. package/src/lib/utils.ts +0 -6
  106. package/src/main.jsx +0 -10
  107. package/src/richtext/conversion/conversion.test.ts +0 -146
  108. package/src/richtext/conversion/lexicalToRichTextSource.test.ts +0 -89
  109. package/src/richtext/conversion/lexicalToRichTextSource.ts +0 -285
  110. package/src/richtext/conversion/parseRichTextSource.test.ts +0 -469
  111. package/src/richtext/conversion/parseRichTextSource.ts +0 -233
  112. package/src/richtext/conversion/richTextSourceToLexical.test.ts +0 -381
  113. package/src/richtext/conversion/richTextSourceToLexical.ts +0 -293
  114. package/src/richtext/shadowRootPolyFill.js +0 -115
  115. package/src/server.ts +0 -70
  116. package/src/stories/Button.stories.tsx +0 -20
  117. package/src/stories/Checkbox.stories.tsx +0 -14
  118. package/src/stories/Dropdown.stories.tsx +0 -23
  119. package/src/stories/Introduction.mdx +0 -221
  120. package/src/stories/RichTextEditor.stories.tsx +0 -24
  121. package/src/stories/assets/code-brackets.svg +0 -1
  122. package/src/stories/assets/colors.svg +0 -1
  123. package/src/stories/assets/comments.svg +0 -1
  124. package/src/stories/assets/direction.svg +0 -1
  125. package/src/stories/assets/flow.svg +0 -1
  126. package/src/stories/assets/plugin.svg +0 -1
  127. package/src/stories/assets/repo.svg +0 -1
  128. package/src/stories/assets/stackalt.svg +0 -1
  129. package/src/utils/Remote.ts +0 -15
  130. package/src/utils/imageMimeType.ts +0 -23
  131. package/src/utils/readImage.ts +0 -54
  132. package/src/utils/resolvePath.ts +0 -32
  133. package/src/vite-env.d.ts +0 -1
  134. package/src/vite-index.tsx +0 -7
  135. package/src/vite-server.ts +0 -42
  136. package/tailwind.config.js +0 -83
  137. package/tsconfig.json +0 -19
  138. package/vite.config.ts +0 -43
@@ -0,0 +1,197 @@
1
+ var CC=Object.defineProperty;var $C=(e,t,n)=>t in e?CC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var je=(e,t,n)=>($C(e,typeof t!="symbol"?t+"":t,n),n),kC=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Id=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)};var Ha=(e,t,n)=>(kC(e,t,"access private method"),n);function TC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();function $a(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U0={exports:{}},Se={};/**
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 ka=Symbol.for("react.element"),NC=Symbol.for("react.portal"),bC=Symbol.for("react.fragment"),RC=Symbol.for("react.strict_mode"),PC=Symbol.for("react.profiler"),OC=Symbol.for("react.provider"),AC=Symbol.for("react.context"),MC=Symbol.for("react.forward_ref"),DC=Symbol.for("react.suspense"),LC=Symbol.for("react.memo"),IC=Symbol.for("react.lazy"),jm=Symbol.iterator;function jC(e){return e===null||typeof e!="object"?null:(e=jm&&e[jm]||e["@@iterator"],typeof e=="function"?e:null)}var V0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H0=Object.assign,K0={};function Pl(e,t,n){this.props=e,this.context=t,this.refs=K0,this.updater=n||V0}Pl.prototype.isReactComponent={};Pl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Pl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function G0(){}G0.prototype=Pl.prototype;function bp(e,t,n){this.props=e,this.context=t,this.refs=K0,this.updater=n||V0}var Rp=bp.prototype=new G0;Rp.constructor=bp;H0(Rp,Pl.prototype);Rp.isPureReactComponent=!0;var zm=Array.isArray,Y0=Object.prototype.hasOwnProperty,Pp={current:null},X0={key:!0,ref:!0,__self:!0,__source:!0};function Q0(e,t,n){var r,o={},i=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)Y0.call(t,r)&&!X0.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1<s){for(var a=Array(s),u=0;u<s;u++)a[u]=arguments[u+2];o.children=a}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)o[r]===void 0&&(o[r]=s[r]);return{$$typeof:ka,type:e,key:i,ref:l,props:o,_owner:Pp.current}}function zC(e,t){return{$$typeof:ka,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Op(e){return typeof e=="object"&&e!==null&&e.$$typeof===ka}function FC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fm=/\/+/g;function jd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?FC(""+e.key):t.toString(36)}function Su(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ka:case NC:l=!0}}if(l)return l=e,o=o(l),e=r===""?"."+jd(l,0):r,zm(o)?(n="",e!=null&&(n=e.replace(Fm,"$&/")+"/"),Su(o,t,n,"",function(u){return u})):o!=null&&(Op(o)&&(o=zC(o,n+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(Fm,"$&/")+"/")+e)),t.push(o)),1;if(l=0,r=r===""?".":r+":",zm(e))for(var s=0;s<e.length;s++){i=e[s];var a=r+jd(i,s);l+=Su(i,t,n,a,o)}else if(a=jC(e),typeof a=="function")for(e=a.call(e),s=0;!(i=e.next()).done;)i=i.value,a=r+jd(i,s++),l+=Su(i,t,n,a,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function Ka(e,t,n){if(e==null)return e;var r=[],o=0;return Su(e,r,"","",function(i){return t.call(n,i,o++)}),r}function BC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var rn={current:null},Eu={transition:null},WC={ReactCurrentDispatcher:rn,ReactCurrentBatchConfig:Eu,ReactCurrentOwner:Pp};Se.Children={map:Ka,forEach:function(e,t,n){Ka(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ka(e,function(){t++}),t},toArray:function(e){return Ka(e,function(t){return t})||[]},only:function(e){if(!Op(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Se.Component=Pl;Se.Fragment=bC;Se.Profiler=PC;Se.PureComponent=bp;Se.StrictMode=RC;Se.Suspense=DC;Se.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=WC;Se.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=H0({},e.props),o=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=Pp.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(a in t)Y0.call(t,a)&&!X0.hasOwnProperty(a)&&(r[a]=t[a]===void 0&&s!==void 0?s[a]:t[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){s=Array(a);for(var u=0;u<a;u++)s[u]=arguments[u+2];r.children=s}return{$$typeof:ka,type:e.type,key:o,ref:i,props:r,_owner:l}};Se.createContext=function(e){return e={$$typeof:AC,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:OC,_context:e},e.Consumer=e};Se.createElement=Q0;Se.createFactory=function(e){var t=Q0.bind(null,e);return t.type=e,t};Se.createRef=function(){return{current:null}};Se.forwardRef=function(e){return{$$typeof:MC,render:e}};Se.isValidElement=Op;Se.lazy=function(e){return{$$typeof:IC,_payload:{_status:-1,_result:e},_init:BC}};Se.memo=function(e,t){return{$$typeof:LC,type:e,compare:t===void 0?null:t}};Se.startTransition=function(e){var t=Eu.transition;Eu.transition={};try{e()}finally{Eu.transition=t}};Se.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};Se.useCallback=function(e,t){return rn.current.useCallback(e,t)};Se.useContext=function(e){return rn.current.useContext(e)};Se.useDebugValue=function(){};Se.useDeferredValue=function(e){return rn.current.useDeferredValue(e)};Se.useEffect=function(e,t){return rn.current.useEffect(e,t)};Se.useId=function(){return rn.current.useId()};Se.useImperativeHandle=function(e,t,n){return rn.current.useImperativeHandle(e,t,n)};Se.useInsertionEffect=function(e,t){return rn.current.useInsertionEffect(e,t)};Se.useLayoutEffect=function(e,t){return rn.current.useLayoutEffect(e,t)};Se.useMemo=function(e,t){return rn.current.useMemo(e,t)};Se.useReducer=function(e,t,n){return rn.current.useReducer(e,t,n)};Se.useRef=function(e){return rn.current.useRef(e)};Se.useState=function(e){return rn.current.useState(e)};Se.useSyncExternalStore=function(e,t,n){return rn.current.useSyncExternalStore(e,t,n)};Se.useTransition=function(){return rn.current.useTransition()};Se.version="18.2.0";U0.exports=Se;var p=U0.exports;const q=$a(p),J0=TC({__proto__:null,default:q},[p]);var Df={},Z0={exports:{}},Tn={},q0={exports:{}},e1={};/**
10
+ * @license React
11
+ * scheduler.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
+ */(function(e){function t(k,I){var L=k.length;k.push(I);e:for(;0<L;){var V=L-1>>>1,te=k[V];if(0<o(te,I))k[V]=I,k[L]=te,L=V;else break e}}function n(k){return k.length===0?null:k[0]}function r(k){if(k.length===0)return null;var I=k[0],L=k.pop();if(L!==I){k[0]=L;e:for(var V=0,te=k.length,ye=te>>>1;V<ye;){var fe=2*(V+1)-1,Oe=k[fe],be=fe+1,Z=k[be];if(0>o(Oe,L))be<te&&0>o(Z,Oe)?(k[V]=Z,k[be]=L,V=be):(k[V]=Oe,k[fe]=L,V=fe);else if(be<te&&0>o(Z,L))k[V]=Z,k[be]=L,V=be;else break e}}return I}function o(k,I){var L=k.sortIndex-I.sortIndex;return L!==0?L:k.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();e.unstable_now=function(){return l.now()-s}}var a=[],u=[],c=1,d=null,f=3,h=!1,g=!1,m=!1,S=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(k){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime<=k)r(u),I.sortIndex=I.expirationTime,t(a,I);else break;I=n(u)}}function _(k){if(m=!1,x(k),!g)if(n(a)!==null)g=!0,P(E);else{var I=n(u);I!==null&&O(_,I.startTime-k)}}function E(k,I){g=!1,m&&(m=!1,v(T),T=-1),h=!0;var L=f;try{for(x(I),d=n(a);d!==null&&(!(d.expirationTime>I)||k&&!j());){var V=d.callback;if(typeof V=="function"){d.callback=null,f=d.priorityLevel;var te=V(d.expirationTime<=I);I=e.unstable_now(),typeof te=="function"?d.callback=te:d===n(a)&&r(a),x(I)}else r(a);d=n(a)}if(d!==null)var ye=!0;else{var fe=n(u);fe!==null&&O(_,fe.startTime-I),ye=!1}return ye}finally{d=null,f=L,h=!1}}var $=!1,C=null,T=-1,M=5,R=-1;function j(){return!(e.unstable_now()-R<M)}function F(){if(C!==null){var k=e.unstable_now();R=k;var I=!0;try{I=C(!0,k)}finally{I?ae():($=!1,C=null)}}else $=!1}var ae;if(typeof y=="function")ae=function(){y(F)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,X=H.port2;H.port1.onmessage=F,ae=function(){X.postMessage(null)}}else ae=function(){S(F,0)};function P(k){C=k,$||($=!0,ae())}function O(k,I){T=S(function(){k(e.unstable_now())},I)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(k){k.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,P(E))},e.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<k?Math.floor(1e3/k):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(a)},e.unstable_next=function(k){switch(f){case 1:case 2:case 3:var I=3;break;default:I=f}var L=f;f=I;try{return k()}finally{f=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(k,I){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var L=f;f=k;try{return I()}finally{f=L}},e.unstable_scheduleCallback=function(k,I,L){var V=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?V+L:V):L=V,k){case 1:var te=-1;break;case 2:te=250;break;case 5:te=1073741823;break;case 4:te=1e4;break;default:te=5e3}return te=L+te,k={id:c++,callback:I,priorityLevel:k,startTime:L,expirationTime:te,sortIndex:-1},L>V?(k.sortIndex=L,t(u,k),n(a)===null&&k===n(u)&&(m?(v(T),T=-1):m=!0,O(_,L-V))):(k.sortIndex=te,t(a,k),g||h||(g=!0,P(E))),k},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(k){var I=f;return function(){var L=f;f=I;try{return k.apply(this,arguments)}finally{f=L}}}})(e1);q0.exports=e1;var UC=q0.exports;/**
18
+ * @license React
19
+ * react-dom.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 t1=p,Cn=UC;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var n1=new Set,Ks={};function yi(e,t){gl(e,t),gl(e+"Capture",t)}function gl(e,t){for(Ks[e]=t,e=0;e<t.length;e++)n1.add(t[e])}var Ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Lf=Object.prototype.hasOwnProperty,VC=/^[: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]*$/,Bm={},Wm={};function HC(e){return Lf.call(Wm,e)?!0:Lf.call(Bm,e)?!1:VC.test(e)?Wm[e]=!0:(Bm[e]=!0,!1)}function KC(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function GC(e,t,n,r){if(t===null||typeof t>"u"||KC(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function on(e,t,n,r,o,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var Lt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Lt[e]=new on(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Lt[t]=new on(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Lt[e]=new on(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Lt[e]=new on(e,2,!1,e,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(e){Lt[e]=new on(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Lt[e]=new on(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Lt[e]=new on(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Lt[e]=new on(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Lt[e]=new on(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ap=/[\-:]([a-z])/g;function Mp(e){return e[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(e){var t=e.replace(Ap,Mp);Lt[t]=new on(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ap,Mp);Lt[t]=new on(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ap,Mp);Lt[t]=new on(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Lt[e]=new on(e,1,!1,e.toLowerCase(),null,!1,!1)});Lt.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Lt[e]=new on(e,1,!1,e.toLowerCase(),null,!0,!0)});function Dp(e,t,n,r){var o=Lt.hasOwnProperty(t)?Lt[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(GC(t,n,o,r)&&(n=null),r||o===null?HC(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=n===null?o.type===3?!1:"":n:(t=o.attributeName,r=o.attributeNamespace,n===null?e.removeAttribute(t):(o=o.type,n=o===3||o===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Vr=t1.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ga=Symbol.for("react.element"),Wi=Symbol.for("react.portal"),Ui=Symbol.for("react.fragment"),Lp=Symbol.for("react.strict_mode"),If=Symbol.for("react.profiler"),r1=Symbol.for("react.provider"),o1=Symbol.for("react.context"),Ip=Symbol.for("react.forward_ref"),jf=Symbol.for("react.suspense"),zf=Symbol.for("react.suspense_list"),jp=Symbol.for("react.memo"),lo=Symbol.for("react.lazy"),i1=Symbol.for("react.offscreen"),Um=Symbol.iterator;function ql(e){return e===null||typeof e!="object"?null:(e=Um&&e[Um]||e["@@iterator"],typeof e=="function"?e:null)}var tt=Object.assign,zd;function ps(e){if(zd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);zd=t&&t[1]||""}return`
26
+ `+zd+e}var Fd=!1;function Bd(e,t){if(!e||Fd)return"";Fd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
27
+ `),i=r.stack.split(`
28
+ `),l=o.length-1,s=i.length-1;1<=l&&0<=s&&o[l]!==i[s];)s--;for(;1<=l&&0<=s;l--,s--)if(o[l]!==i[s]){if(l!==1||s!==1)do if(l--,s--,0>s||o[l]!==i[s]){var a=`
29
+ `+o[l].replace(" at new "," at ");return e.displayName&&a.includes("<anonymous>")&&(a=a.replace("<anonymous>",e.displayName)),a}while(1<=l&&0<=s);break}}}finally{Fd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ps(e):""}function YC(e){switch(e.tag){case 5:return ps(e.type);case 16:return ps("Lazy");case 13:return ps("Suspense");case 19:return ps("SuspenseList");case 0:case 2:case 15:return e=Bd(e.type,!1),e;case 11:return e=Bd(e.type.render,!1),e;case 1:return e=Bd(e.type,!0),e;default:return""}}function Ff(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ui:return"Fragment";case Wi:return"Portal";case If:return"Profiler";case Lp:return"StrictMode";case jf:return"Suspense";case zf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case o1:return(e.displayName||"Context")+".Consumer";case r1:return(e._context.displayName||"Context")+".Provider";case Ip:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jp:return t=e.displayName||null,t!==null?t:Ff(e.type)||"Memo";case lo:t=e._payload,e=e._init;try{return Ff(e(t))}catch{}}return null}function XC(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ff(t);case 8:return t===Lp?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function To(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function l1(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function QC(e){var t=l1(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(l){r=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ya(e){e._valueTracker||(e._valueTracker=QC(e))}function s1(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=l1(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Wu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Bf(e,t){var n=t.checked;return tt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Vm(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=To(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function a1(e,t){t=t.checked,t!=null&&Dp(e,"checked",t,!1)}function Wf(e,t){a1(e,t);var n=To(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Uf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uf(e,t.type,To(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hm(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Uf(e,t,n){(t!=="number"||Wu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var gs=Array.isArray;function ol(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+To(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Vf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(W(91));return tt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Km(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(W(92));if(gs(n)){if(1<n.length)throw Error(W(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:To(n)}}function u1(e,t){var n=To(t.value),r=To(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Gm(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function c1(e){switch(e){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 Hf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?c1(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Xa,d1=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,o)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Xa=Xa||document.createElement("div"),Xa.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Xa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ss={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},JC=["Webkit","ms","Moz","O"];Object.keys(Ss).forEach(function(e){JC.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ss[t]=Ss[e]})});function f1(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ss.hasOwnProperty(e)&&Ss[e]?(""+t).trim():t+"px"}function h1(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=f1(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var ZC=tt({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 Kf(e,t){if(t){if(ZC[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Gf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Yf=null;function zp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xf=null,il=null,ll=null;function Ym(e){if(e=ba(e)){if(typeof Xf!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Hc(t),Xf(e.stateNode,e.type,t))}}function p1(e){il?ll?ll.push(e):ll=[e]:il=e}function g1(){if(il){var e=il,t=ll;if(ll=il=null,Ym(e),t)for(e=0;e<t.length;e++)Ym(t[e])}}function m1(e,t){return e(t)}function v1(){}var Wd=!1;function y1(e,t,n){if(Wd)return e(t,n);Wd=!0;try{return m1(e,t,n)}finally{Wd=!1,(il!==null||ll!==null)&&(v1(),g1())}}function Ys(e,t){var n=e.stateNode;if(n===null)return null;var r=Hc(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(W(231,t,typeof n));return n}var Qf=!1;if(Ir)try{var es={};Object.defineProperty(es,"passive",{get:function(){Qf=!0}}),window.addEventListener("test",es,es),window.removeEventListener("test",es,es)}catch{Qf=!1}function qC(e,t,n,r,o,i,l,s,a){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Es=!1,Uu=null,Vu=!1,Jf=null,e$={onError:function(e){Es=!0,Uu=e}};function t$(e,t,n,r,o,i,l,s,a){Es=!1,Uu=null,qC.apply(e$,arguments)}function n$(e,t,n,r,o,i,l,s,a){if(t$.apply(this,arguments),Es){if(Es){var u=Uu;Es=!1,Uu=null}else throw Error(W(198));Vu||(Vu=!0,Jf=u)}}function xi(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function x1(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Xm(e){if(xi(e)!==e)throw Error(W(188))}function r$(e){var t=e.alternate;if(!t){if(t=xi(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(o===null)break;var i=o.alternate;if(i===null){if(r=o.return,r!==null){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Xm(o),e;if(i===r)return Xm(o),t;i=i.sibling}throw Error(W(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,s=o.child;s;){if(s===n){l=!0,n=o,r=i;break}if(s===r){l=!0,r=o,n=i;break}s=s.sibling}if(!l){for(s=i.child;s;){if(s===n){l=!0,n=i,r=o;break}if(s===r){l=!0,r=i,n=o;break}s=s.sibling}if(!l)throw Error(W(189))}}if(n.alternate!==r)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function _1(e){return e=r$(e),e!==null?w1(e):null}function w1(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=w1(e);if(t!==null)return t;e=e.sibling}return null}var S1=Cn.unstable_scheduleCallback,Qm=Cn.unstable_cancelCallback,o$=Cn.unstable_shouldYield,i$=Cn.unstable_requestPaint,ut=Cn.unstable_now,l$=Cn.unstable_getCurrentPriorityLevel,Fp=Cn.unstable_ImmediatePriority,E1=Cn.unstable_UserBlockingPriority,Hu=Cn.unstable_NormalPriority,s$=Cn.unstable_LowPriority,C1=Cn.unstable_IdlePriority,Bc=null,pr=null;function a$(e){if(pr&&typeof pr.onCommitFiberRoot=="function")try{pr.onCommitFiberRoot(Bc,e,void 0,(e.current.flags&128)===128)}catch{}}var Zn=Math.clz32?Math.clz32:d$,u$=Math.log,c$=Math.LN2;function d$(e){return e>>>=0,e===0?32:31-(u$(e)/c$|0)|0}var Qa=64,Ja=4194304;function ms(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ku(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,l=n&268435455;if(l!==0){var s=l&~o;s!==0?r=ms(s):(i&=l,i!==0&&(r=ms(i)))}else l=n&~o,l!==0?r=ms(l):i!==0&&(r=ms(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Zn(t),o=1<<n,r|=e[n],t&=~o;return r}function f$(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 h$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-Zn(i),s=1<<l,a=o[l];a===-1?(!(s&n)||s&r)&&(o[l]=f$(s,t)):a<=t&&(e.expiredLanes|=s),i&=~s}}function Zf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $1(){var e=Qa;return Qa<<=1,!(Qa&4194240)&&(Qa=64),e}function Ud(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ta(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zn(t),e[t]=n}function p$(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-Zn(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}function Bp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Zn(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var Pe=0;function k1(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var T1,Wp,N1,b1,R1,qf=!1,Za=[],vo=null,yo=null,xo=null,Xs=new Map,Qs=new Map,uo=[],g$="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 Jm(e,t){switch(e){case"focusin":case"focusout":vo=null;break;case"dragenter":case"dragleave":yo=null;break;case"mouseover":case"mouseout":xo=null;break;case"pointerover":case"pointerout":Xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qs.delete(t.pointerId)}}function ts(e,t,n,r,o,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},t!==null&&(t=ba(t),t!==null&&Wp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function m$(e,t,n,r,o){switch(t){case"focusin":return vo=ts(vo,e,t,n,r,o),!0;case"dragenter":return yo=ts(yo,e,t,n,r,o),!0;case"mouseover":return xo=ts(xo,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Xs.set(i,ts(Xs.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Qs.set(i,ts(Qs.get(i)||null,e,t,n,r,o)),!0}return!1}function P1(e){var t=Qo(e.target);if(t!==null){var n=xi(t);if(n!==null){if(t=n.tag,t===13){if(t=x1(n),t!==null){e.blockedOn=t,R1(e.priority,function(){N1(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Cu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=eh(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Yf=r,n.target.dispatchEvent(r),Yf=null}else return t=ba(n),t!==null&&Wp(t),e.blockedOn=n,!1;t.shift()}return!0}function Zm(e,t,n){Cu(e)&&n.delete(t)}function v$(){qf=!1,vo!==null&&Cu(vo)&&(vo=null),yo!==null&&Cu(yo)&&(yo=null),xo!==null&&Cu(xo)&&(xo=null),Xs.forEach(Zm),Qs.forEach(Zm)}function ns(e,t){e.blockedOn===t&&(e.blockedOn=null,qf||(qf=!0,Cn.unstable_scheduleCallback(Cn.unstable_NormalPriority,v$)))}function Js(e){function t(o){return ns(o,e)}if(0<Za.length){ns(Za[0],e);for(var n=1;n<Za.length;n++){var r=Za[n];r.blockedOn===e&&(r.blockedOn=null)}}for(vo!==null&&ns(vo,e),yo!==null&&ns(yo,e),xo!==null&&ns(xo,e),Xs.forEach(t),Qs.forEach(t),n=0;n<uo.length;n++)r=uo[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<uo.length&&(n=uo[0],n.blockedOn===null);)P1(n),n.blockedOn===null&&uo.shift()}var sl=Vr.ReactCurrentBatchConfig,Gu=!0;function y$(e,t,n,r){var o=Pe,i=sl.transition;sl.transition=null;try{Pe=1,Up(e,t,n,r)}finally{Pe=o,sl.transition=i}}function x$(e,t,n,r){var o=Pe,i=sl.transition;sl.transition=null;try{Pe=4,Up(e,t,n,r)}finally{Pe=o,sl.transition=i}}function Up(e,t,n,r){if(Gu){var o=eh(e,t,n,r);if(o===null)qd(e,t,r,Yu,n),Jm(e,r);else if(m$(o,e,t,n,r))r.stopPropagation();else if(Jm(e,r),t&4&&-1<g$.indexOf(e)){for(;o!==null;){var i=ba(o);if(i!==null&&T1(i),i=eh(e,t,n,r),i===null&&qd(e,t,r,Yu,n),i===o)break;o=i}o!==null&&r.stopPropagation()}else qd(e,t,r,null,n)}}var Yu=null;function eh(e,t,n,r){if(Yu=null,e=zp(r),e=Qo(e),e!==null)if(t=xi(e),t===null)e=null;else if(n=t.tag,n===13){if(e=x1(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yu=e,null}function O1(e){switch(e){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(l$()){case Fp:return 1;case E1:return 4;case Hu:case s$:return 16;case C1:return 536870912;default:return 16}default:return 16}}var ho=null,Vp=null,$u=null;function A1(){if($u)return $u;var e,t=Vp,n=t.length,r,o="value"in ho?ho.value:ho.textContent,i=o.length;for(e=0;e<n&&t[e]===o[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===o[i-r];r++);return $u=o.slice(e,1<r?1-r:void 0)}function ku(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function qa(){return!0}function qm(){return!1}function Nn(e){function t(n,r,o,i,l){this._reactName=n,this._targetInst=o,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(i):i[s]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?qa:qm,this.isPropagationStopped=qm,this}return tt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=qa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=qa)},persist:function(){},isPersistent:qa}),t}var Ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hp=Nn(Ol),Na=tt({},Ol,{view:0,detail:0}),_$=Nn(Na),Vd,Hd,rs,Wc=tt({},Na,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Kp,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==rs&&(rs&&e.type==="mousemove"?(Vd=e.screenX-rs.screenX,Hd=e.screenY-rs.screenY):Hd=Vd=0,rs=e),Vd)},movementY:function(e){return"movementY"in e?e.movementY:Hd}}),ev=Nn(Wc),w$=tt({},Wc,{dataTransfer:0}),S$=Nn(w$),E$=tt({},Na,{relatedTarget:0}),Kd=Nn(E$),C$=tt({},Ol,{animationName:0,elapsedTime:0,pseudoElement:0}),$$=Nn(C$),k$=tt({},Ol,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),T$=Nn(k$),N$=tt({},Ol,{data:0}),tv=Nn(N$),b$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R$={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"},P$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function O$(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=P$[e])?!!t[e]:!1}function Kp(){return O$}var A$=tt({},Na,{key:function(e){if(e.key){var t=b$[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ku(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R$[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Kp,charCode:function(e){return e.type==="keypress"?ku(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ku(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),M$=Nn(A$),D$=tt({},Wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nv=Nn(D$),L$=tt({},Na,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Kp}),I$=Nn(L$),j$=tt({},Ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),z$=Nn(j$),F$=tt({},Wc,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),B$=Nn(F$),W$=[9,13,27,32],Gp=Ir&&"CompositionEvent"in window,Cs=null;Ir&&"documentMode"in document&&(Cs=document.documentMode);var U$=Ir&&"TextEvent"in window&&!Cs,M1=Ir&&(!Gp||Cs&&8<Cs&&11>=Cs),rv=String.fromCharCode(32),ov=!1;function D1(e,t){switch(e){case"keyup":return W$.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function L1(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Vi=!1;function V$(e,t){switch(e){case"compositionend":return L1(t);case"keypress":return t.which!==32?null:(ov=!0,rv);case"textInput":return e=t.data,e===rv&&ov?null:e;default:return null}}function H$(e,t){if(Vi)return e==="compositionend"||!Gp&&D1(e,t)?(e=A1(),$u=Vp=ho=null,Vi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return M1&&t.locale!=="ko"?null:t.data;default:return null}}var K$={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 iv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!K$[e.type]:t==="textarea"}function I1(e,t,n,r){p1(r),t=Xu(t,"onChange"),0<t.length&&(n=new Hp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var $s=null,Zs=null;function G$(e){Y1(e,0)}function Uc(e){var t=Gi(e);if(s1(t))return e}function Y$(e,t){if(e==="change")return t}var j1=!1;if(Ir){var Gd;if(Ir){var Yd="oninput"in document;if(!Yd){var lv=document.createElement("div");lv.setAttribute("oninput","return;"),Yd=typeof lv.oninput=="function"}Gd=Yd}else Gd=!1;j1=Gd&&(!document.documentMode||9<document.documentMode)}function sv(){$s&&($s.detachEvent("onpropertychange",z1),Zs=$s=null)}function z1(e){if(e.propertyName==="value"&&Uc(Zs)){var t=[];I1(t,Zs,e,zp(e)),y1(G$,t)}}function X$(e,t,n){e==="focusin"?(sv(),$s=t,Zs=n,$s.attachEvent("onpropertychange",z1)):e==="focusout"&&sv()}function Q$(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Uc(Zs)}function J$(e,t){if(e==="click")return Uc(t)}function Z$(e,t){if(e==="input"||e==="change")return Uc(t)}function q$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var er=typeof Object.is=="function"?Object.is:q$;function qs(e,t){if(er(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!Lf.call(t,o)||!er(e[o],t[o]))return!1}return!0}function av(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function uv(e,t){var n=av(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=av(n)}}function F1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?F1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function B1(){for(var e=window,t=Wu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Wu(e.document)}return t}function Yp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function ek(e){var t=B1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&F1(n.ownerDocument.documentElement,n)){if(r!==null&&Yp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=uv(n,i);var l=uv(n,r);o&&l&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var tk=Ir&&"documentMode"in document&&11>=document.documentMode,Hi=null,th=null,ks=null,nh=!1;function cv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nh||Hi==null||Hi!==Wu(r)||(r=Hi,"selectionStart"in r&&Yp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ks&&qs(ks,r)||(ks=r,r=Xu(th,"onSelect"),0<r.length&&(t=new Hp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Hi)))}function eu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ki={animationend:eu("Animation","AnimationEnd"),animationiteration:eu("Animation","AnimationIteration"),animationstart:eu("Animation","AnimationStart"),transitionend:eu("Transition","TransitionEnd")},Xd={},W1={};Ir&&(W1=document.createElement("div").style,"AnimationEvent"in window||(delete Ki.animationend.animation,delete Ki.animationiteration.animation,delete Ki.animationstart.animation),"TransitionEvent"in window||delete Ki.transitionend.transition);function Vc(e){if(Xd[e])return Xd[e];if(!Ki[e])return e;var t=Ki[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in W1)return Xd[e]=t[n];return e}var U1=Vc("animationend"),V1=Vc("animationiteration"),H1=Vc("animationstart"),K1=Vc("transitionend"),G1=new Map,dv="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 Io(e,t){G1.set(e,t),yi(t,[e])}for(var Qd=0;Qd<dv.length;Qd++){var Jd=dv[Qd],nk=Jd.toLowerCase(),rk=Jd[0].toUpperCase()+Jd.slice(1);Io(nk,"on"+rk)}Io(U1,"onAnimationEnd");Io(V1,"onAnimationIteration");Io(H1,"onAnimationStart");Io("dblclick","onDoubleClick");Io("focusin","onFocus");Io("focusout","onBlur");Io(K1,"onTransitionEnd");gl("onMouseEnter",["mouseout","mouseover"]);gl("onMouseLeave",["mouseout","mouseover"]);gl("onPointerEnter",["pointerout","pointerover"]);gl("onPointerLeave",["pointerout","pointerover"]);yi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));yi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));yi("onBeforeInput",["compositionend","keypress","textInput","paste"]);yi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));yi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));yi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var vs="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(" "),ok=new Set("cancel close invalid load scroll toggle".split(" ").concat(vs));function fv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,n$(r,t,void 0,e),e.currentTarget=null}function Y1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var s=r[l],a=s.instance,u=s.currentTarget;if(s=s.listener,a!==i&&o.isPropagationStopped())break e;fv(o,s,u),i=a}else for(l=0;l<r.length;l++){if(s=r[l],a=s.instance,u=s.currentTarget,s=s.listener,a!==i&&o.isPropagationStopped())break e;fv(o,s,u),i=a}}}if(Vu)throw e=Jf,Vu=!1,Jf=null,e}function Ue(e,t){var n=t[sh];n===void 0&&(n=t[sh]=new Set);var r=e+"__bubble";n.has(r)||(X1(t,e,2,!1),n.add(r))}function Zd(e,t,n){var r=0;t&&(r|=4),X1(n,e,r,t)}var tu="_reactListening"+Math.random().toString(36).slice(2);function ea(e){if(!e[tu]){e[tu]=!0,n1.forEach(function(n){n!=="selectionchange"&&(ok.has(n)||Zd(n,!1,e),Zd(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tu]||(t[tu]=!0,Zd("selectionchange",!1,t))}}function X1(e,t,n,r){switch(O1(t)){case 1:var o=y$;break;case 4:o=x$;break;default:o=Up}n=o.bind(null,t,n,e),o=void 0,!Qf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),r?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function qd(e,t,n,r,o){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var s=r.stateNode.containerInfo;if(s===o||s.nodeType===8&&s.parentNode===o)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&&(a=l.stateNode.containerInfo,a===o||a.nodeType===8&&a.parentNode===o))return;l=l.return}for(;s!==null;){if(l=Qo(s),l===null)return;if(a=l.tag,a===5||a===6){r=i=l;continue e}s=s.parentNode}}r=r.return}y1(function(){var u=i,c=zp(n),d=[];e:{var f=G1.get(e);if(f!==void 0){var h=Hp,g=e;switch(e){case"keypress":if(ku(n)===0)break e;case"keydown":case"keyup":h=M$;break;case"focusin":g="focus",h=Kd;break;case"focusout":g="blur",h=Kd;break;case"beforeblur":case"afterblur":h=Kd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=ev;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=S$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=I$;break;case U1:case V1:case H1:h=$$;break;case K1:h=z$;break;case"scroll":h=_$;break;case"wheel":h=B$;break;case"copy":case"cut":case"paste":h=T$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=nv}var m=(t&4)!==0,S=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var y=u,x;y!==null;){x=y;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,v!==null&&(_=Ys(y,v),_!=null&&m.push(ta(y,_,x)))),S)break;y=y.return}0<m.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==Yf&&(g=n.relatedTarget||n.fromElement)&&(Qo(g)||g[jr]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?Qo(g):null,g!==null&&(S=xi(g),g!==S||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=ev,_="onMouseLeave",v="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(m=nv,_="onPointerLeave",v="onPointerEnter",y="pointer"),S=h==null?f:Gi(h),x=g==null?f:Gi(g),f=new m(_,y+"leave",h,n,c),f.target=S,f.relatedTarget=x,_=null,Qo(c)===u&&(m=new m(v,y+"enter",g,n,c),m.target=x,m.relatedTarget=S,_=m),S=_,h&&g)t:{for(m=h,v=g,y=0,x=m;x;x=Pi(x))y++;for(x=0,_=v;_;_=Pi(_))x++;for(;0<y-x;)m=Pi(m),y--;for(;0<x-y;)v=Pi(v),x--;for(;y--;){if(m===v||v!==null&&m===v.alternate)break t;m=Pi(m),v=Pi(v)}m=null}else m=null;h!==null&&hv(d,f,h,m,!1),g!==null&&S!==null&&hv(d,S,g,m,!0)}}e:{if(f=u?Gi(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var E=Y$;else if(iv(f))if(j1)E=Z$;else{E=Q$;var $=X$}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=J$);if(E&&(E=E(e,u))){I1(d,E,n,c);break e}$&&$(e,f,u),e==="focusout"&&($=f._wrapperState)&&$.controlled&&f.type==="number"&&Uf(f,"number",f.value)}switch($=u?Gi(u):window,e){case"focusin":(iv($)||$.contentEditable==="true")&&(Hi=$,th=u,ks=null);break;case"focusout":ks=th=Hi=null;break;case"mousedown":nh=!0;break;case"contextmenu":case"mouseup":case"dragend":nh=!1,cv(d,n,c);break;case"selectionchange":if(tk)break;case"keydown":case"keyup":cv(d,n,c)}var C;if(Gp)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Vi?D1(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(M1&&n.locale!=="ko"&&(Vi||T!=="onCompositionStart"?T==="onCompositionEnd"&&Vi&&(C=A1()):(ho=c,Vp="value"in ho?ho.value:ho.textContent,Vi=!0)),$=Xu(u,T),0<$.length&&(T=new tv(T,e,null,n,c),d.push({event:T,listeners:$}),C?T.data=C:(C=L1(n),C!==null&&(T.data=C)))),(C=U$?V$(e,n):H$(e,n))&&(u=Xu(u,"onBeforeInput"),0<u.length&&(c=new tv("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=C))}Y1(d,t)})}function ta(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xu(e,t){for(var n=t+"Capture",r=[];e!==null;){var o=e,i=o.stateNode;o.tag===5&&i!==null&&(o=i,i=Ys(e,n),i!=null&&r.unshift(ta(e,i,o)),i=Ys(e,t),i!=null&&r.push(ta(e,i,o))),e=e.return}return r}function Pi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function hv(e,t,n,r,o){for(var i=t._reactName,l=[];n!==null&&n!==r;){var s=n,a=s.alternate,u=s.stateNode;if(a!==null&&a===r)break;s.tag===5&&u!==null&&(s=u,o?(a=Ys(n,i),a!=null&&l.unshift(ta(n,a,s))):o||(a=Ys(n,i),a!=null&&l.push(ta(n,a,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var ik=/\r\n?/g,lk=/\u0000|\uFFFD/g;function pv(e){return(typeof e=="string"?e:""+e).replace(ik,`
30
+ `).replace(lk,"")}function nu(e,t,n){if(t=pv(t),pv(e)!==t&&n)throw Error(W(425))}function Qu(){}var rh=null,oh=null;function ih(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var lh=typeof setTimeout=="function"?setTimeout:void 0,sk=typeof clearTimeout=="function"?clearTimeout:void 0,gv=typeof Promise=="function"?Promise:void 0,ak=typeof queueMicrotask=="function"?queueMicrotask:typeof gv<"u"?function(e){return gv.resolve(null).then(e).catch(uk)}:lh;function uk(e){setTimeout(function(){throw e})}function ef(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Js(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Js(t)}function _o(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function mv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Al=Math.random().toString(36).slice(2),ur="__reactFiber$"+Al,na="__reactProps$"+Al,jr="__reactContainer$"+Al,sh="__reactEvents$"+Al,ck="__reactListeners$"+Al,dk="__reactHandles$"+Al;function Qo(e){var t=e[ur];if(t)return t;for(var n=e.parentNode;n;){if(t=n[jr]||n[ur]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=mv(e);e!==null;){if(n=e[ur])return n;e=mv(e)}return t}e=n,n=e.parentNode}return null}function ba(e){return e=e[ur]||e[jr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Gi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(W(33))}function Hc(e){return e[na]||null}var ah=[],Yi=-1;function jo(e){return{current:e}}function Ge(e){0>Yi||(e.current=ah[Yi],ah[Yi]=null,Yi--)}function Fe(e,t){Yi++,ah[Yi]=e.current,e.current=t}var No={},Kt=jo(No),cn=jo(!1),si=No;function ml(e,t){var n=e.type.contextTypes;if(!n)return No;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function dn(e){return e=e.childContextTypes,e!=null}function Ju(){Ge(cn),Ge(Kt)}function vv(e,t,n){if(Kt.current!==No)throw Error(W(168));Fe(Kt,t),Fe(cn,n)}function Q1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(W(108,XC(e)||"Unknown",o));return tt({},n,r)}function Zu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||No,si=Kt.current,Fe(Kt,e),Fe(cn,cn.current),!0}function yv(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=Q1(e,t,si),r.__reactInternalMemoizedMergedChildContext=e,Ge(cn),Ge(Kt),Fe(Kt,e)):Ge(cn),Fe(cn,n)}var Pr=null,Kc=!1,tf=!1;function J1(e){Pr===null?Pr=[e]:Pr.push(e)}function fk(e){Kc=!0,J1(e)}function zo(){if(!tf&&Pr!==null){tf=!0;var e=0,t=Pe;try{var n=Pr;for(Pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Pr=null,Kc=!1}catch(o){throw Pr!==null&&(Pr=Pr.slice(e+1)),S1(Fp,zo),o}finally{Pe=t,tf=!1}}return null}var Xi=[],Qi=0,qu=null,ec=0,Pn=[],On=0,ai=null,Mr=1,Dr="";function Ko(e,t){Xi[Qi++]=ec,Xi[Qi++]=qu,qu=e,ec=t}function Z1(e,t,n){Pn[On++]=Mr,Pn[On++]=Dr,Pn[On++]=ai,ai=e;var r=Mr;e=Dr;var o=32-Zn(r)-1;r&=~(1<<o),n+=1;var i=32-Zn(t)+o;if(30<i){var l=o-o%5;i=(r&(1<<l)-1).toString(32),r>>=l,o-=l,Mr=1<<32-Zn(t)+o|n<<o|r,Dr=i+e}else Mr=1<<i|n<<o|r,Dr=e}function Xp(e){e.return!==null&&(Ko(e,1),Z1(e,1,0))}function Qp(e){for(;e===qu;)qu=Xi[--Qi],Xi[Qi]=null,ec=Xi[--Qi],Xi[Qi]=null;for(;e===ai;)ai=Pn[--On],Pn[On]=null,Dr=Pn[--On],Pn[On]=null,Mr=Pn[--On],Pn[On]=null}var xn=null,yn=null,Ye=!1,Xn=null;function q1(e,t){var n=Dn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function xv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,xn=e,yn=_o(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,xn=e,yn=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=ai!==null?{id:Mr,overflow:Dr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Dn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,xn=e,yn=null,!0):!1;default:return!1}}function uh(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ch(e){if(Ye){var t=yn;if(t){var n=t;if(!xv(e,t)){if(uh(e))throw Error(W(418));t=_o(n.nextSibling);var r=xn;t&&xv(e,t)?q1(r,n):(e.flags=e.flags&-4097|2,Ye=!1,xn=e)}}else{if(uh(e))throw Error(W(418));e.flags=e.flags&-4097|2,Ye=!1,xn=e}}}function _v(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;xn=e}function ru(e){if(e!==xn)return!1;if(!Ye)return _v(e),Ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ih(e.type,e.memoizedProps)),t&&(t=yn)){if(uh(e))throw ex(),Error(W(418));for(;t;)q1(e,t),t=_o(t.nextSibling)}if(_v(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){yn=_o(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}yn=null}}else yn=xn?_o(e.stateNode.nextSibling):null;return!0}function ex(){for(var e=yn;e;)e=_o(e.nextSibling)}function vl(){yn=xn=null,Ye=!1}function Jp(e){Xn===null?Xn=[e]:Xn.push(e)}var hk=Vr.ReactCurrentBatchConfig;function Kn(e,t){if(e&&e.defaultProps){t=tt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var tc=jo(null),nc=null,Ji=null,Zp=null;function qp(){Zp=Ji=nc=null}function eg(e){var t=tc.current;Ge(tc),e._currentValue=t}function dh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function al(e,t){nc=e,Zp=Ji=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(un=!0),e.firstContext=null)}function jn(e){var t=e._currentValue;if(Zp!==e)if(e={context:e,memoizedValue:t,next:null},Ji===null){if(nc===null)throw Error(W(308));Ji=e,nc.dependencies={lanes:0,firstContext:e}}else Ji=Ji.next=e;return t}var Jo=null;function tg(e){Jo===null?Jo=[e]:Jo.push(e)}function tx(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,tg(t)):(n.next=o.next,o.next=n),t.interleaved=n,zr(e,r)}function zr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var so=!1;function ng(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function nx(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Lr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ce&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,zr(e,n)}return o=r.interleaved,o===null?(t.next=t,tg(r)):(t.next=o.next,o.next=t),r.interleaved=t,zr(e,n)}function Tu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bp(e,n)}}function wv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function rc(e,t,n,r){var o=e.updateQueue;so=!1;var i=o.firstBaseUpdate,l=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var a=s,u=a.next;a.next=null,l===null?i=u:l.next=u,l=a;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=a))}if(i!==null){var d=o.baseState;l=0,c=u=a=null,s=i;do{var f=s.lane,h=s.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(f=t,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=tt({},d,f);break e;case 2:so=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=h,a=d):c=c.next=h,l|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(1);if(c===null&&(a=d),o.baseState=a,o.firstBaseUpdate=u,o.lastBaseUpdate=c,t=o.shared.interleaved,t!==null){o=t;do l|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);ci|=l,e.lanes=l,e.memoizedState=d}}function Sv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(o!==null){if(r.callback=null,r=n,typeof o!="function")throw Error(W(191,o));o.call(r)}}}var rx=new t1.Component().refs;function fh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:tt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Gc={isMounted:function(e){return(e=e._reactInternals)?xi(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=tn(),o=Eo(e),i=Lr(r,o);i.payload=t,n!=null&&(i.callback=n),t=wo(e,i,o),t!==null&&(qn(t,e,o,r),Tu(t,e,o))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=tn(),o=Eo(e),i=Lr(r,o);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wo(e,i,o),t!==null&&(qn(t,e,o,r),Tu(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=tn(),r=Eo(e),o=Lr(n,r);o.tag=2,t!=null&&(o.callback=t),t=wo(e,o,r),t!==null&&(qn(t,e,r,n),Tu(t,e,r))}};function Ev(e,t,n,r,o,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!qs(n,r)||!qs(o,i):!0}function ox(e,t,n){var r=!1,o=No,i=t.contextType;return typeof i=="object"&&i!==null?i=jn(i):(o=dn(t)?si:Kt.current,r=t.contextTypes,i=(r=r!=null)?ml(e,o):No),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function Cv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Gc.enqueueReplaceState(t,t.state,null)}function hh(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=rx,ng(e);var i=t.contextType;typeof i=="object"&&i!==null?o.context=jn(i):(i=dn(t)?si:Kt.current,o.context=ml(e,i)),o.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(fh(e,t,i,n),o.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(t=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),t!==o.state&&Gc.enqueueReplaceState(o,o.state,null),rc(e,n,o,r),o.state=e.memoizedState),typeof o.componentDidMount=="function"&&(e.flags|=4194308)}function os(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(W(309));var r=n.stateNode}if(!r)throw Error(W(147,e));var o=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var s=o.refs;s===rx&&(s=o.refs={}),l===null?delete s[i]:s[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(W(284));if(!n._owner)throw Error(W(290,e))}return e}function ou(e,t){throw e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $v(e){var t=e._init;return t(e._payload)}function ix(e){function t(v,y){if(e){var x=v.deletions;x===null?(v.deletions=[y],v.flags|=16):x.push(y)}}function n(v,y){if(!e)return null;for(;y!==null;)t(v,y),y=y.sibling;return null}function r(v,y){for(v=new Map;y!==null;)y.key!==null?v.set(y.key,y):v.set(y.index,y),y=y.sibling;return v}function o(v,y){return v=Co(v,y),v.index=0,v.sibling=null,v}function i(v,y,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<y?(v.flags|=2,y):x):(v.flags|=2,y)):(v.flags|=1048576,y)}function l(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,y,x,_){return y===null||y.tag!==6?(y=uf(x,v.mode,_),y.return=v,y):(y=o(y,x),y.return=v,y)}function a(v,y,x,_){var E=x.type;return E===Ui?c(v,y,x.props.children,_,x.key):y!==null&&(y.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===lo&&$v(E)===y.type)?(_=o(y,x.props),_.ref=os(v,y,x),_.return=v,_):(_=Au(x.type,x.key,x.props,null,v.mode,_),_.ref=os(v,y,x),_.return=v,_)}function u(v,y,x,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==x.containerInfo||y.stateNode.implementation!==x.implementation?(y=cf(x,v.mode,_),y.return=v,y):(y=o(y,x.children||[]),y.return=v,y)}function c(v,y,x,_,E){return y===null||y.tag!==7?(y=ni(x,v.mode,_,E),y.return=v,y):(y=o(y,x),y.return=v,y)}function d(v,y,x){if(typeof y=="string"&&y!==""||typeof y=="number")return y=uf(""+y,v.mode,x),y.return=v,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ga:return x=Au(y.type,y.key,y.props,null,v.mode,x),x.ref=os(v,null,y),x.return=v,x;case Wi:return y=cf(y,v.mode,x),y.return=v,y;case lo:var _=y._init;return d(v,_(y._payload),x)}if(gs(y)||ql(y))return y=ni(y,v.mode,x,null),y.return=v,y;ou(v,y)}return null}function f(v,y,x,_){var E=y!==null?y.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return E!==null?null:s(v,y,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ga:return x.key===E?a(v,y,x,_):null;case Wi:return x.key===E?u(v,y,x,_):null;case lo:return E=x._init,f(v,y,E(x._payload),_)}if(gs(x)||ql(x))return E!==null?null:c(v,y,x,_,null);ou(v,x)}return null}function h(v,y,x,_,E){if(typeof _=="string"&&_!==""||typeof _=="number")return v=v.get(x)||null,s(y,v,""+_,E);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ga:return v=v.get(_.key===null?x:_.key)||null,a(y,v,_,E);case Wi:return v=v.get(_.key===null?x:_.key)||null,u(y,v,_,E);case lo:var $=_._init;return h(v,y,x,$(_._payload),E)}if(gs(_)||ql(_))return v=v.get(x)||null,c(y,v,_,E,null);ou(y,_)}return null}function g(v,y,x,_){for(var E=null,$=null,C=y,T=y=0,M=null;C!==null&&T<x.length;T++){C.index>T?(M=C,C=null):M=C.sibling;var R=f(v,C,x[T],_);if(R===null){C===null&&(C=M);break}e&&C&&R.alternate===null&&t(v,C),y=i(R,y,T),$===null?E=R:$.sibling=R,$=R,C=M}if(T===x.length)return n(v,C),Ye&&Ko(v,T),E;if(C===null){for(;T<x.length;T++)C=d(v,x[T],_),C!==null&&(y=i(C,y,T),$===null?E=C:$.sibling=C,$=C);return Ye&&Ko(v,T),E}for(C=r(v,C);T<x.length;T++)M=h(C,v,T,x[T],_),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?T:M.key),y=i(M,y,T),$===null?E=M:$.sibling=M,$=M);return e&&C.forEach(function(j){return t(v,j)}),Ye&&Ko(v,T),E}function m(v,y,x,_){var E=ql(x);if(typeof E!="function")throw Error(W(150));if(x=E.call(x),x==null)throw Error(W(151));for(var $=E=null,C=y,T=y=0,M=null,R=x.next();C!==null&&!R.done;T++,R=x.next()){C.index>T?(M=C,C=null):M=C.sibling;var j=f(v,C,R.value,_);if(j===null){C===null&&(C=M);break}e&&C&&j.alternate===null&&t(v,C),y=i(j,y,T),$===null?E=j:$.sibling=j,$=j,C=M}if(R.done)return n(v,C),Ye&&Ko(v,T),E;if(C===null){for(;!R.done;T++,R=x.next())R=d(v,R.value,_),R!==null&&(y=i(R,y,T),$===null?E=R:$.sibling=R,$=R);return Ye&&Ko(v,T),E}for(C=r(v,C);!R.done;T++,R=x.next())R=h(C,v,T,R.value,_),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?T:R.key),y=i(R,y,T),$===null?E=R:$.sibling=R,$=R);return e&&C.forEach(function(F){return t(v,F)}),Ye&&Ko(v,T),E}function S(v,y,x,_){if(typeof x=="object"&&x!==null&&x.type===Ui&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ga:e:{for(var E=x.key,$=y;$!==null;){if($.key===E){if(E=x.type,E===Ui){if($.tag===7){n(v,$.sibling),y=o($,x.props.children),y.return=v,v=y;break e}}else if($.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===lo&&$v(E)===$.type){n(v,$.sibling),y=o($,x.props),y.ref=os(v,$,x),y.return=v,v=y;break e}n(v,$);break}else t(v,$);$=$.sibling}x.type===Ui?(y=ni(x.props.children,v.mode,_,x.key),y.return=v,v=y):(_=Au(x.type,x.key,x.props,null,v.mode,_),_.ref=os(v,y,x),_.return=v,v=_)}return l(v);case Wi:e:{for($=x.key;y!==null;){if(y.key===$)if(y.tag===4&&y.stateNode.containerInfo===x.containerInfo&&y.stateNode.implementation===x.implementation){n(v,y.sibling),y=o(y,x.children||[]),y.return=v,v=y;break e}else{n(v,y);break}else t(v,y);y=y.sibling}y=cf(x,v.mode,_),y.return=v,v=y}return l(v);case lo:return $=x._init,S(v,y,$(x._payload),_)}if(gs(x))return g(v,y,x,_);if(ql(x))return m(v,y,x,_);ou(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,y!==null&&y.tag===6?(n(v,y.sibling),y=o(y,x),y.return=v,v=y):(n(v,y),y=uf(x,v.mode,_),y.return=v,v=y),l(v)):n(v,y)}return S}var yl=ix(!0),lx=ix(!1),Ra={},gr=jo(Ra),ra=jo(Ra),oa=jo(Ra);function Zo(e){if(e===Ra)throw Error(W(174));return e}function rg(e,t){switch(Fe(oa,t),Fe(ra,e),Fe(gr,Ra),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hf(t,e)}Ge(gr),Fe(gr,t)}function xl(){Ge(gr),Ge(ra),Ge(oa)}function sx(e){Zo(oa.current);var t=Zo(gr.current),n=Hf(t,e.type);t!==n&&(Fe(ra,e),Fe(gr,n))}function og(e){ra.current===e&&(Ge(gr),Ge(ra))}var Je=jo(0);function oc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nf=[];function ig(){for(var e=0;e<nf.length;e++)nf[e]._workInProgressVersionPrimary=null;nf.length=0}var Nu=Vr.ReactCurrentDispatcher,rf=Vr.ReactCurrentBatchConfig,ui=0,qe=null,mt=null,Ct=null,ic=!1,Ts=!1,ia=0,pk=0;function Ft(){throw Error(W(321))}function lg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!er(e[n],t[n]))return!1;return!0}function sg(e,t,n,r,o,i){if(ui=i,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Nu.current=e===null||e.memoizedState===null?yk:xk,e=n(r,o),Ts){i=0;do{if(Ts=!1,ia=0,25<=i)throw Error(W(301));i+=1,Ct=mt=null,t.updateQueue=null,Nu.current=_k,e=n(r,o)}while(Ts)}if(Nu.current=lc,t=mt!==null&&mt.next!==null,ui=0,Ct=mt=qe=null,ic=!1,t)throw Error(W(300));return e}function ag(){var e=ia!==0;return ia=0,e}function sr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?qe.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function zn(){if(mt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=mt.next;var t=Ct===null?qe.memoizedState:Ct.next;if(t!==null)Ct=t,mt=e;else{if(e===null)throw Error(W(310));mt=e,e={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Ct===null?qe.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}function la(e,t){return typeof t=="function"?t(e):t}function of(e){var t=zn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=mt,o=r.baseQueue,i=n.pending;if(i!==null){if(o!==null){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(o!==null){i=o.next,r=r.baseState;var s=l=null,a=null,u=i;do{var c=u.lane;if((ui&c)===c)a!==null&&(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(s=a=d,l=r):a=a.next=d,qe.lanes|=c,ci|=c}u=u.next}while(u!==null&&u!==i);a===null?l=r:a.next=s,er(r,t.memoizedState)||(un=!0),t.memoizedState=r,t.baseState=l,t.baseQueue=a,n.lastRenderedState=r}if(e=n.interleaved,e!==null){o=e;do i=o.lane,qe.lanes|=i,ci|=i,o=o.next;while(o!==e)}else o===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function lf(e){var t=zn(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(o!==null){n.pending=null;var l=o=o.next;do i=e(i,l.action),l=l.next;while(l!==o);er(i,t.memoizedState)||(un=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ax(){}function ux(e,t){var n=qe,r=zn(),o=t(),i=!er(r.memoizedState,o);if(i&&(r.memoizedState=o,un=!0),r=r.queue,ug(fx.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Ct!==null&&Ct.memoizedState.tag&1){if(n.flags|=2048,sa(9,dx.bind(null,n,r,o,t),void 0,null),bt===null)throw Error(W(349));ui&30||cx(n,t,o)}return o}function cx(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function dx(e,t,n,r){t.value=n,t.getSnapshot=r,hx(t)&&px(e)}function fx(e,t,n){return n(function(){hx(t)&&px(e)})}function hx(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!er(e,n)}catch{return!0}}function px(e){var t=zr(e,1);t!==null&&qn(t,e,1,-1)}function kv(e){var t=sr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:la,lastRenderedState:e},t.queue=e,e=e.dispatch=vk.bind(null,qe,e),[t.memoizedState,e]}function sa(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=qe.updateQueue,t===null?(t={lastEffect:null,stores:null},qe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function gx(){return zn().memoizedState}function bu(e,t,n,r){var o=sr();qe.flags|=e,o.memoizedState=sa(1|t,n,void 0,r===void 0?null:r)}function Yc(e,t,n,r){var o=zn();r=r===void 0?null:r;var i=void 0;if(mt!==null){var l=mt.memoizedState;if(i=l.destroy,r!==null&&lg(r,l.deps)){o.memoizedState=sa(t,n,i,r);return}}qe.flags|=e,o.memoizedState=sa(1|t,n,i,r)}function Tv(e,t){return bu(8390656,8,e,t)}function ug(e,t){return Yc(2048,8,e,t)}function mx(e,t){return Yc(4,2,e,t)}function vx(e,t){return Yc(4,4,e,t)}function yx(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function xx(e,t,n){return n=n!=null?n.concat([e]):null,Yc(4,4,yx.bind(null,t,e),n)}function cg(){}function _x(e,t){var n=zn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wx(e,t){var n=zn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&lg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Sx(e,t,n){return ui&21?(er(n,t)||(n=$1(),qe.lanes|=n,ci|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,un=!0),e.memoizedState=n)}function gk(e,t){var n=Pe;Pe=n!==0&&4>n?n:4,e(!0);var r=rf.transition;rf.transition={};try{e(!1),t()}finally{Pe=n,rf.transition=r}}function Ex(){return zn().memoizedState}function mk(e,t,n){var r=Eo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Cx(e))$x(t,n);else if(n=tx(e,t,n,r),n!==null){var o=tn();qn(n,e,r,o),kx(n,t,r)}}function vk(e,t,n){var r=Eo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Cx(e))$x(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,s=i(l,n);if(o.hasEagerState=!0,o.eagerState=s,er(s,l)){var a=t.interleaved;a===null?(o.next=o,tg(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=tx(e,t,o,r),n!==null&&(o=tn(),qn(n,e,r,o),kx(n,t,r))}}function Cx(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function $x(e,t){Ts=ic=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function kx(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Bp(e,n)}}var lc={readContext:jn,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useInsertionEffect:Ft,useLayoutEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useMutableSource:Ft,useSyncExternalStore:Ft,useId:Ft,unstable_isNewReconciler:!1},yk={readContext:jn,useCallback:function(e,t){return sr().memoizedState=[e,t===void 0?null:t],e},useContext:jn,useEffect:Tv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,bu(4194308,4,yx.bind(null,t,e),n)},useLayoutEffect:function(e,t){return bu(4194308,4,e,t)},useInsertionEffect:function(e,t){return bu(4,2,e,t)},useMemo:function(e,t){var n=sr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=sr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=mk.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=sr();return e={current:e},t.memoizedState=e},useState:kv,useDebugValue:cg,useDeferredValue:function(e){return sr().memoizedState=e},useTransition:function(){var e=kv(!1),t=e[0];return e=gk.bind(null,e[1]),sr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,o=sr();if(Ye){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),bt===null)throw Error(W(349));ui&30||cx(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,Tv(fx.bind(null,r,i,e),[e]),r.flags|=2048,sa(9,dx.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=sr(),t=bt.identifierPrefix;if(Ye){var n=Dr,r=Mr;n=(r&~(1<<32-Zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ia++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=pk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},xk={readContext:jn,useCallback:_x,useContext:jn,useEffect:ug,useImperativeHandle:xx,useInsertionEffect:mx,useLayoutEffect:vx,useMemo:wx,useReducer:of,useRef:gx,useState:function(){return of(la)},useDebugValue:cg,useDeferredValue:function(e){var t=zn();return Sx(t,mt.memoizedState,e)},useTransition:function(){var e=of(la)[0],t=zn().memoizedState;return[e,t]},useMutableSource:ax,useSyncExternalStore:ux,useId:Ex,unstable_isNewReconciler:!1},_k={readContext:jn,useCallback:_x,useContext:jn,useEffect:ug,useImperativeHandle:xx,useInsertionEffect:mx,useLayoutEffect:vx,useMemo:wx,useReducer:lf,useRef:gx,useState:function(){return lf(la)},useDebugValue:cg,useDeferredValue:function(e){var t=zn();return mt===null?t.memoizedState=e:Sx(t,mt.memoizedState,e)},useTransition:function(){var e=lf(la)[0],t=zn().memoizedState;return[e,t]},useMutableSource:ax,useSyncExternalStore:ux,useId:Ex,unstable_isNewReconciler:!1};function _l(e,t){try{var n="",r=t;do n+=YC(r),r=r.return;while(r);var o=n}catch(i){o=`
31
+ Error generating stack: `+i.message+`
32
+ `+i.stack}return{value:e,source:t,stack:o,digest:null}}function sf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ph(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var wk=typeof WeakMap=="function"?WeakMap:Map;function Tx(e,t,n){n=Lr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ac||(ac=!0,Ch=r),ph(e,t)},n}function Nx(e,t,n){n=Lr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ph(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){ph(e,t),typeof r!="function"&&(So===null?So=new Set([this]):So.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),n}function Nv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new wk;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=Dk.bind(null,e,t,n),t.then(e,e))}function bv(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Rv(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Lr(-1,1),t.tag=2,wo(n,t,1))),n.lanes|=1),e)}var Sk=Vr.ReactCurrentOwner,un=!1;function Gt(e,t,n,r){t.child=e===null?lx(t,null,n,r):yl(t,e.child,n,r)}function Pv(e,t,n,r,o){n=n.render;var i=t.ref;return al(t,o),r=sg(e,t,n,r,i,o),n=ag(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Fr(e,t,o)):(Ye&&n&&Xp(t),t.flags|=1,Gt(e,t,r,o),t.child)}function Ov(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!yg(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,bx(e,t,i,r,o)):(e=Au(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:qs,n(l,r)&&e.ref===t.ref)return Fr(e,t,o)}return t.flags|=1,e=Co(i,r),e.ref=t.ref,e.return=t,t.child=e}function bx(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(qs(i,r)&&e.ref===t.ref)if(un=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(un=!0);else return t.lanes=e.lanes,Fr(e,t,o)}return gh(e,t,n,r,o)}function Rx(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Fe(qi,gn),gn|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Fe(qi,gn),gn|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Fe(qi,gn),gn|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Fe(qi,gn),gn|=r;return Gt(e,t,o,n),t.child}function Px(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gh(e,t,n,r,o){var i=dn(n)?si:Kt.current;return i=ml(t,i),al(t,o),n=sg(e,t,n,r,i,o),r=ag(),e!==null&&!un?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Fr(e,t,o)):(Ye&&r&&Xp(t),t.flags|=1,Gt(e,t,n,o),t.child)}function Av(e,t,n,r,o){if(dn(n)){var i=!0;Zu(t)}else i=!1;if(al(t,o),t.stateNode===null)Ru(e,t),ox(t,n,r),hh(t,n,r,o),r=!0;else if(e===null){var l=t.stateNode,s=t.memoizedProps;l.props=s;var a=l.context,u=n.contextType;typeof u=="object"&&u!==null?u=jn(u):(u=dn(n)?si:Kt.current,u=ml(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";d||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==r||a!==u)&&Cv(t,l,r,u),so=!1;var f=t.memoizedState;l.state=f,rc(t,r,l,o),a=t.memoizedState,s!==r||f!==a||cn.current||so?(typeof c=="function"&&(fh(t,n,c,r),a=t.memoizedState),(s=so||Ev(t,n,s,r,f,a,u))?(d||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=a),l.props=r,l.state=a,l.context=u,r=s):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{l=t.stateNode,nx(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Kn(t.type,s),l.props=u,d=t.pendingProps,f=l.context,a=n.contextType,typeof a=="object"&&a!==null?a=jn(a):(a=dn(n)?si:Kt.current,a=ml(t,a));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(s!==d||f!==a)&&Cv(t,l,r,a),so=!1,f=t.memoizedState,l.state=f,rc(t,r,l,o);var g=t.memoizedState;s!==d||f!==g||cn.current||so?(typeof h=="function"&&(fh(t,n,h,r),g=t.memoizedState),(u=so||Ev(t,n,u,r,f,g,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(r,g,a),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(r,g,a)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),l.props=r,l.state=g,l.context=a,r=u):(typeof l.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return mh(e,t,n,r,i,o)}function mh(e,t,n,r,o,i){Px(e,t);var l=(t.flags&128)!==0;if(!r&&!l)return o&&yv(t,n,!1),Fr(e,t,i);r=t.stateNode,Sk.current=t;var s=l&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&l?(t.child=yl(t,e.child,null,i),t.child=yl(t,null,s,i)):Gt(e,t,s,i),t.memoizedState=r.state,o&&yv(t,n,!0),t.child}function Ox(e){var t=e.stateNode;t.pendingContext?vv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vv(e,t.context,!1),rg(e,t.containerInfo)}function Mv(e,t,n,r,o){return vl(),Jp(o),t.flags|=256,Gt(e,t,n,r),t.child}var vh={dehydrated:null,treeContext:null,retryLane:0};function yh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ax(e,t,n){var r=t.pendingProps,o=Je.current,i=!1,l=(t.flags&128)!==0,s;if((s=l)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),Fe(Je,o&1),e===null)return ch(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=r.children,e=r.fallback,i?(r=t.mode,i=t.child,l={mode:"hidden",children:l},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=Jc(l,r,0,null),e=ni(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=yh(n),t.memoizedState=vh,e):dg(t,l));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return Ek(e,t,l,r,s,o,n);if(i){i=r.fallback,l=t.mode,o=e.child,s=o.sibling;var a={mode:"hidden",children:r.children};return!(l&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Co(o,a),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=Co(s,i):(i=ni(i,l,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,l=e.child.memoizedState,l=l===null?yh(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~n,t.memoizedState=vh,r}return i=e.child,e=i.sibling,r=Co(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function dg(e,t){return t=Jc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function iu(e,t,n,r){return r!==null&&Jp(r),yl(t,e.child,null,n),e=dg(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ek(e,t,n,r,o,i,l){if(n)return t.flags&256?(t.flags&=-257,r=sf(Error(W(422))),iu(e,t,l,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=Jc({mode:"visible",children:r.children},o,0,null),i=ni(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&yl(t,e.child,null,l),t.child.memoizedState=yh(l),t.memoizedState=vh,i);if(!(t.mode&1))return iu(e,t,l,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(W(419)),r=sf(i,r,void 0),iu(e,t,l,r)}if(s=(l&e.childLanes)!==0,un||s){if(r=bt,r!==null){switch(l&-l){case 4:o=2;break;case 16:o=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:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|l)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,zr(e,o),qn(r,e,o,-1))}return vg(),r=sf(Error(W(421))),iu(e,t,l,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=Lk.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,yn=_o(o.nextSibling),xn=t,Ye=!0,Xn=null,e!==null&&(Pn[On++]=Mr,Pn[On++]=Dr,Pn[On++]=ai,Mr=e.id,Dr=e.overflow,ai=t),t=dg(t,r.children),t.flags|=4096,t)}function Dv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),dh(e.return,t,n)}function af(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Mx(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Gt(e,t,r.children,n),r=Je.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Dv(e,n,t);else if(e.tag===19)Dv(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Fe(Je,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&oc(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),af(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&oc(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}af(t,!0,n,null,i);break;case"together":af(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ru(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ci|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=Co(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Co(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ck(e,t,n){switch(t.tag){case 3:Ox(t),vl();break;case 5:sx(t);break;case 1:dn(t.type)&&Zu(t);break;case 4:rg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Fe(tc,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Fe(Je,Je.current&1),t.flags|=128,null):n&t.child.childLanes?Ax(e,t,n):(Fe(Je,Je.current&1),e=Fr(e,t,n),e!==null?e.sibling:null);Fe(Je,Je.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Mx(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),Fe(Je,Je.current),r)break;return null;case 22:case 23:return t.lanes=0,Rx(e,t,n)}return Fr(e,t,n)}var Dx,xh,Lx,Ix;Dx=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};xh=function(){};Lx=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Zo(gr.current);var i=null;switch(n){case"input":o=Bf(e,o),r=Bf(e,r),i=[];break;case"select":o=tt({},o,{value:void 0}),r=tt({},r,{value:void 0}),i=[];break;case"textarea":o=Vf(e,o),r=Vf(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Qu)}Kf(n,r);var l;n=null;for(u in o)if(!r.hasOwnProperty(u)&&o.hasOwnProperty(u)&&o[u]!=null)if(u==="style"){var s=o[u];for(l in s)s.hasOwnProperty(l)&&(n||(n={}),n[l]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ks.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var a=r[u];if(s=o!=null?o[u]:void 0,r.hasOwnProperty(u)&&a!==s&&(a!=null||s!=null))if(u==="style")if(s){for(l in s)!s.hasOwnProperty(l)||a&&a.hasOwnProperty(l)||(n||(n={}),n[l]="");for(l in a)a.hasOwnProperty(l)&&s[l]!==a[l]&&(n||(n={}),n[l]=a[l])}else n||(i||(i=[]),i.push(u,n)),n=a;else u==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,s=s?s.__html:void 0,a!=null&&s!==a&&(i=i||[]).push(u,a)):u==="children"?typeof a!="string"&&typeof a!="number"||(i=i||[]).push(u,""+a):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ks.hasOwnProperty(u)?(a!=null&&u==="onScroll"&&Ue("scroll",e),i||s===a||(i=[])):(i=i||[]).push(u,a))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};Ix=function(e,t,n,r){n!==r&&(t.flags|=4)};function is(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Bt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $k(e,t,n){var r=t.pendingProps;switch(Qp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Bt(t),null;case 1:return dn(t.type)&&Ju(),Bt(t),null;case 3:return r=t.stateNode,xl(),Ge(cn),Ge(Kt),ig(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ru(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xn!==null&&(Th(Xn),Xn=null))),xh(e,t),Bt(t),null;case 5:og(t);var o=Zo(oa.current);if(n=t.type,e!==null&&t.stateNode!=null)Lx(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(W(166));return Bt(t),null}if(e=Zo(gr.current),ru(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[ur]=t,r[na]=i,e=(t.mode&1)!==0,n){case"dialog":Ue("cancel",r),Ue("close",r);break;case"iframe":case"object":case"embed":Ue("load",r);break;case"video":case"audio":for(o=0;o<vs.length;o++)Ue(vs[o],r);break;case"source":Ue("error",r);break;case"img":case"image":case"link":Ue("error",r),Ue("load",r);break;case"details":Ue("toggle",r);break;case"input":Vm(r,i),Ue("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ue("invalid",r);break;case"textarea":Km(r,i),Ue("invalid",r)}Kf(n,i),o=null;for(var l in i)if(i.hasOwnProperty(l)){var s=i[l];l==="children"?typeof s=="string"?r.textContent!==s&&(i.suppressHydrationWarning!==!0&&nu(r.textContent,s,e),o=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(i.suppressHydrationWarning!==!0&&nu(r.textContent,s,e),o=["children",""+s]):Ks.hasOwnProperty(l)&&s!=null&&l==="onScroll"&&Ue("scroll",r)}switch(n){case"input":Ya(r),Hm(r,i,!0);break;case"textarea":Ya(r),Gm(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Qu)}r=o,t.updateQueue=r,r!==null&&(t.flags|=4)}else{l=o.nodeType===9?o:o.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=c1(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),n==="select"&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ur]=t,e[na]=r,Dx(e,t,!1,!1),t.stateNode=e;e:{switch(l=Gf(n,r),n){case"dialog":Ue("cancel",e),Ue("close",e),o=r;break;case"iframe":case"object":case"embed":Ue("load",e),o=r;break;case"video":case"audio":for(o=0;o<vs.length;o++)Ue(vs[o],e);o=r;break;case"source":Ue("error",e),o=r;break;case"img":case"image":case"link":Ue("error",e),Ue("load",e),o=r;break;case"details":Ue("toggle",e),o=r;break;case"input":Vm(e,r),o=Bf(e,r),Ue("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=tt({},r,{value:void 0}),Ue("invalid",e);break;case"textarea":Km(e,r),o=Vf(e,r),Ue("invalid",e);break;default:o=r}Kf(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var a=s[i];i==="style"?h1(e,a):i==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,a!=null&&d1(e,a)):i==="children"?typeof a=="string"?(n!=="textarea"||a!=="")&&Gs(e,a):typeof a=="number"&&Gs(e,""+a):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ks.hasOwnProperty(i)?a!=null&&i==="onScroll"&&Ue("scroll",e):a!=null&&Dp(e,i,a,l))}switch(n){case"input":Ya(e),Hm(e,r,!1);break;case"textarea":Ya(e),Gm(e);break;case"option":r.value!=null&&e.setAttribute("value",""+To(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ol(e,!!r.multiple,i,!1):r.defaultValue!=null&&ol(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=Qu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Bt(t),null;case 6:if(e&&t.stateNode!=null)Ix(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(W(166));if(n=Zo(oa.current),Zo(gr.current),ru(t)){if(r=t.stateNode,n=t.memoizedProps,r[ur]=t,(i=r.nodeValue!==n)&&(e=xn,e!==null))switch(e.tag){case 3:nu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ur]=t,t.stateNode=r}return Bt(t),null;case 13:if(Ge(Je),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ye&&yn!==null&&t.mode&1&&!(t.flags&128))ex(),vl(),t.flags|=98560,i=!1;else if(i=ru(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(W(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(W(317));i[ur]=t}else vl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Bt(t),i=!1}else Xn!==null&&(Th(Xn),Xn=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Je.current&1?xt===0&&(xt=3):vg())),t.updateQueue!==null&&(t.flags|=4),Bt(t),null);case 4:return xl(),xh(e,t),e===null&&ea(t.stateNode.containerInfo),Bt(t),null;case 10:return eg(t.type._context),Bt(t),null;case 17:return dn(t.type)&&Ju(),Bt(t),null;case 19:if(Ge(Je),i=t.memoizedState,i===null)return Bt(t),null;if(r=(t.flags&128)!==0,l=i.rendering,l===null)if(r)is(i,!1);else{if(xt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=oc(e),l!==null){for(t.flags|=128,is(i,!1),r=l.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,l=i.alternate,l===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Fe(Je,Je.current&1|2),t.child}e=e.sibling}i.tail!==null&&ut()>wl&&(t.flags|=128,r=!0,is(i,!1),t.lanes=4194304)}else{if(!r)if(e=oc(l),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),is(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Ye)return Bt(t),null}else 2*ut()-i.renderingStartTime>wl&&n!==1073741824&&(t.flags|=128,r=!0,is(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(n=i.last,n!==null?n.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ut(),t.sibling=null,n=Je.current,Fe(Je,r?n&1|2:n&1),t):(Bt(t),null);case 22:case 23:return mg(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?gn&1073741824&&(Bt(t),t.subtreeFlags&6&&(t.flags|=8192)):Bt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function kk(e,t){switch(Qp(t),t.tag){case 1:return dn(t.type)&&Ju(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xl(),Ge(cn),Ge(Kt),ig(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return og(t),null;case 13:if(Ge(Je),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ge(Je),null;case 4:return xl(),null;case 10:return eg(t.type._context),null;case 22:case 23:return mg(),null;case 24:return null;default:return null}}var lu=!1,Ut=!1,Tk=typeof WeakSet=="function"?WeakSet:Set,J=null;function Zi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){nt(e,t,r)}else n.current=null}function _h(e,t,n){try{n()}catch(r){nt(e,t,r)}}var Lv=!1;function Nk(e,t){if(rh=Gu,e=B1(),Yp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,s=-1,a=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(s=l+o),d!==i||r!==0&&d.nodeType!==3||(a=l+r),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=l),f===i&&++c===r&&(a=l),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(oh={focusedElem:e,selectionRange:n},Gu=!1,J=t;J!==null;)if(t=J,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,J=e;else for(;J!==null;){t=J;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,S=g.memoizedState,v=t.stateNode,y=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Kn(t.type,m),S);v.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(_){nt(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,J=e;break}J=t.return}return g=Lv,Lv=!1,g}function Ns(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&_h(t,n,i)}o=o.next}while(o!==r)}}function Xc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function jx(e){var t=e.alternate;t!==null&&(e.alternate=null,jx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ur],delete t[na],delete t[sh],delete t[ck],delete t[dk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function zx(e){return e.tag===5||e.tag===3||e.tag===4}function Iv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zx(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Qu));else if(r!==4&&(e=e.child,e!==null))for(Sh(e,t,n),e=e.sibling;e!==null;)Sh(e,t,n),e=e.sibling}function Eh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Eh(e,t,n),e=e.sibling;e!==null;)Eh(e,t,n),e=e.sibling}var At=null,Gn=!1;function eo(e,t,n){for(n=n.child;n!==null;)Fx(e,t,n),n=n.sibling}function Fx(e,t,n){if(pr&&typeof pr.onCommitFiberUnmount=="function")try{pr.onCommitFiberUnmount(Bc,n)}catch{}switch(n.tag){case 5:Ut||Zi(n,t);case 6:var r=At,o=Gn;At=null,eo(e,t,n),At=r,Gn=o,At!==null&&(Gn?(e=At,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):At.removeChild(n.stateNode));break;case 18:At!==null&&(Gn?(e=At,n=n.stateNode,e.nodeType===8?ef(e.parentNode,n):e.nodeType===1&&ef(e,n),Js(e)):ef(At,n.stateNode));break;case 4:r=At,o=Gn,At=n.stateNode.containerInfo,Gn=!0,eo(e,t,n),At=r,Gn=o;break;case 0:case 11:case 14:case 15:if(!Ut&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&_h(n,t,l),o=o.next}while(o!==r)}eo(e,t,n);break;case 1:if(!Ut&&(Zi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){nt(n,t,s)}eo(e,t,n);break;case 21:eo(e,t,n);break;case 22:n.mode&1?(Ut=(r=Ut)||n.memoizedState!==null,eo(e,t,n),Ut=r):eo(e,t,n);break;default:eo(e,t,n)}}function jv(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Tk),t.forEach(function(r){var o=Ik.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Un(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var o=n[r];try{var i=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 5:At=s.stateNode,Gn=!1;break e;case 3:At=s.stateNode.containerInfo,Gn=!0;break e;case 4:At=s.stateNode.containerInfo,Gn=!0;break e}s=s.return}if(At===null)throw Error(W(160));Fx(i,l,o),At=null,Gn=!1;var a=o.alternate;a!==null&&(a.return=null),o.return=null}catch(u){nt(o,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Bx(t,e),t=t.sibling}function Bx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Un(t,e),lr(e),r&4){try{Ns(3,e,e.return),Xc(3,e)}catch(m){nt(e,e.return,m)}try{Ns(5,e,e.return)}catch(m){nt(e,e.return,m)}}break;case 1:Un(t,e),lr(e),r&512&&n!==null&&Zi(n,n.return);break;case 5:if(Un(t,e),lr(e),r&512&&n!==null&&Zi(n,n.return),e.flags&32){var o=e.stateNode;try{Gs(o,"")}catch(m){nt(e,e.return,m)}}if(r&4&&(o=e.stateNode,o!=null)){var i=e.memoizedProps,l=n!==null?n.memoizedProps:i,s=e.type,a=e.updateQueue;if(e.updateQueue=null,a!==null)try{s==="input"&&i.type==="radio"&&i.name!=null&&a1(o,i),Gf(s,l);var u=Gf(s,i);for(l=0;l<a.length;l+=2){var c=a[l],d=a[l+1];c==="style"?h1(o,d):c==="dangerouslySetInnerHTML"?d1(o,d):c==="children"?Gs(o,d):Dp(o,c,d,u)}switch(s){case"input":Wf(o,i);break;case"textarea":u1(o,i);break;case"select":var f=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!i.multiple;var h=i.value;h!=null?ol(o,!!i.multiple,h,!1):f!==!!i.multiple&&(i.defaultValue!=null?ol(o,!!i.multiple,i.defaultValue,!0):ol(o,!!i.multiple,i.multiple?[]:"",!1))}o[na]=i}catch(m){nt(e,e.return,m)}}break;case 6:if(Un(t,e),lr(e),r&4){if(e.stateNode===null)throw Error(W(162));o=e.stateNode,i=e.memoizedProps;try{o.nodeValue=i}catch(m){nt(e,e.return,m)}}break;case 3:if(Un(t,e),lr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Js(t.containerInfo)}catch(m){nt(e,e.return,m)}break;case 4:Un(t,e),lr(e);break;case 13:Un(t,e),lr(e),o=e.child,o.flags&8192&&(i=o.memoizedState!==null,o.stateNode.isHidden=i,!i||o.alternate!==null&&o.alternate.memoizedState!==null||(pg=ut())),r&4&&jv(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ut=(u=Ut)||c,Un(t,e),Ut=u):Un(t,e),lr(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(J=e,c=e.child;c!==null;){for(d=J=c;J!==null;){switch(f=J,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ns(4,f,f.return);break;case 1:Zi(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){nt(r,n,m)}}break;case 5:Zi(f,f.return);break;case 22:if(f.memoizedState!==null){Fv(d);continue}}h!==null?(h.return=f,J=h):Fv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{o=d.stateNode,u?(i=o.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(s=d.stateNode,a=d.memoizedProps.style,l=a!=null&&a.hasOwnProperty("display")?a.display:null,s.style.display=f1("display",l))}catch(m){nt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){nt(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Un(t,e),lr(e),r&4&&jv(e);break;case 21:break;default:Un(t,e),lr(e)}}function lr(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(zx(n)){var r=n;break e}n=n.return}throw Error(W(160))}switch(r.tag){case 5:var o=r.stateNode;r.flags&32&&(Gs(o,""),r.flags&=-33);var i=Iv(e);Eh(e,i,o);break;case 3:case 4:var l=r.stateNode.containerInfo,s=Iv(e);Sh(e,s,l);break;default:throw Error(W(161))}}catch(a){nt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function bk(e,t,n){J=e,Wx(e)}function Wx(e,t,n){for(var r=(e.mode&1)!==0;J!==null;){var o=J,i=o.child;if(o.tag===22&&r){var l=o.memoizedState!==null||lu;if(!l){var s=o.alternate,a=s!==null&&s.memoizedState!==null||Ut;s=lu;var u=Ut;if(lu=l,(Ut=a)&&!u)for(J=o;J!==null;)l=J,a=l.child,l.tag===22&&l.memoizedState!==null?Bv(o):a!==null?(a.return=l,J=a):Bv(o);for(;i!==null;)J=i,Wx(i),i=i.sibling;J=o,lu=s,Ut=u}zv(e)}else o.subtreeFlags&8772&&i!==null?(i.return=o,J=i):zv(e)}}function zv(e){for(;J!==null;){var t=J;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ut||Xc(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ut)if(n===null)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Kn(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Sv(t,i,r);break;case 3:var l=t.updateQueue;if(l!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Sv(t,l,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var a=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":a.autoFocus&&n.focus();break;case"img":a.src&&(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&Js(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(W(163))}Ut||t.flags&512&&wh(t)}catch(f){nt(t,t.return,f)}}if(t===e){J=null;break}if(n=t.sibling,n!==null){n.return=t.return,J=n;break}J=t.return}}function Fv(e){for(;J!==null;){var t=J;if(t===e){J=null;break}var n=t.sibling;if(n!==null){n.return=t.return,J=n;break}J=t.return}}function Bv(e){for(;J!==null;){var t=J;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Xc(4,t)}catch(a){nt(t,n,a)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var o=t.return;try{r.componentDidMount()}catch(a){nt(t,o,a)}}var i=t.return;try{wh(t)}catch(a){nt(t,i,a)}break;case 5:var l=t.return;try{wh(t)}catch(a){nt(t,l,a)}}}catch(a){nt(t,t.return,a)}if(t===e){J=null;break}var s=t.sibling;if(s!==null){s.return=t.return,J=s;break}J=t.return}}var Rk=Math.ceil,sc=Vr.ReactCurrentDispatcher,fg=Vr.ReactCurrentOwner,In=Vr.ReactCurrentBatchConfig,Ce=0,bt=null,ct=null,Dt=0,gn=0,qi=jo(0),xt=0,aa=null,ci=0,Qc=0,hg=0,bs=null,an=null,pg=0,wl=1/0,Nr=null,ac=!1,Ch=null,So=null,su=!1,po=null,uc=0,Rs=0,$h=null,Pu=-1,Ou=0;function tn(){return Ce&6?ut():Pu!==-1?Pu:Pu=ut()}function Eo(e){return e.mode&1?Ce&2&&Dt!==0?Dt&-Dt:hk.transition!==null?(Ou===0&&(Ou=$1()),Ou):(e=Pe,e!==0||(e=window.event,e=e===void 0?16:O1(e.type)),e):1}function qn(e,t,n,r){if(50<Rs)throw Rs=0,$h=null,Error(W(185));Ta(e,n,r),(!(Ce&2)||e!==bt)&&(e===bt&&(!(Ce&2)&&(Qc|=n),xt===4&&co(e,Dt)),fn(e,r),n===1&&Ce===0&&!(t.mode&1)&&(wl=ut()+500,Kc&&zo()))}function fn(e,t){var n=e.callbackNode;h$(e,t);var r=Ku(e,e===bt?Dt:0);if(r===0)n!==null&&Qm(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Qm(n),t===1)e.tag===0?fk(Wv.bind(null,e)):J1(Wv.bind(null,e)),ak(function(){!(Ce&6)&&zo()}),n=null;else{switch(k1(r)){case 1:n=Fp;break;case 4:n=E1;break;case 16:n=Hu;break;case 536870912:n=C1;break;default:n=Hu}n=Qx(n,Ux.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Ux(e,t){if(Pu=-1,Ou=0,Ce&6)throw Error(W(327));var n=e.callbackNode;if(ul()&&e.callbackNode!==n)return null;var r=Ku(e,e===bt?Dt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cc(e,r);else{t=r;var o=Ce;Ce|=2;var i=Hx();(bt!==e||Dt!==t)&&(Nr=null,wl=ut()+500,ti(e,t));do try{Ak();break}catch(s){Vx(e,s)}while(1);qp(),sc.current=i,Ce=o,ct!==null?t=0:(bt=null,Dt=0,t=xt)}if(t!==0){if(t===2&&(o=Zf(e),o!==0&&(r=o,t=kh(e,o))),t===1)throw n=aa,ti(e,0),co(e,r),fn(e,ut()),n;if(t===6)co(e,r);else{if(o=e.current.alternate,!(r&30)&&!Pk(o)&&(t=cc(e,r),t===2&&(i=Zf(e),i!==0&&(r=i,t=kh(e,i))),t===1))throw n=aa,ti(e,0),co(e,r),fn(e,ut()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(W(345));case 2:Go(e,an,Nr);break;case 3:if(co(e,r),(r&130023424)===r&&(t=pg+500-ut(),10<t)){if(Ku(e,0)!==0)break;if(o=e.suspendedLanes,(o&r)!==r){tn(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=lh(Go.bind(null,e,an,Nr),t);break}Go(e,an,Nr);break;case 4:if(co(e,r),(r&4194240)===r)break;for(t=e.eventTimes,o=-1;0<r;){var l=31-Zn(r);i=1<<l,l=t[l],l>o&&(o=l),r&=~i}if(r=o,r=ut()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Rk(r/1960))-r,10<r){e.timeoutHandle=lh(Go.bind(null,e,an,Nr),r);break}Go(e,an,Nr);break;case 5:Go(e,an,Nr);break;default:throw Error(W(329))}}}return fn(e,ut()),e.callbackNode===n?Ux.bind(null,e):null}function kh(e,t){var n=bs;return e.current.memoizedState.isDehydrated&&(ti(e,t).flags|=256),e=cc(e,t),e!==2&&(t=an,an=n,t!==null&&Th(t)),e}function Th(e){an===null?an=e:an.push.apply(an,e)}function Pk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!er(i(),o))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function co(e,t){for(t&=~hg,t&=~Qc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Zn(t),r=1<<n;e[n]=-1,t&=~r}}function Wv(e){if(Ce&6)throw Error(W(327));ul();var t=Ku(e,0);if(!(t&1))return fn(e,ut()),null;var n=cc(e,t);if(e.tag!==0&&n===2){var r=Zf(e);r!==0&&(t=r,n=kh(e,r))}if(n===1)throw n=aa,ti(e,0),co(e,t),fn(e,ut()),n;if(n===6)throw Error(W(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Go(e,an,Nr),fn(e,ut()),null}function gg(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(wl=ut()+500,Kc&&zo())}}function di(e){po!==null&&po.tag===0&&!(Ce&6)&&ul();var t=Ce;Ce|=1;var n=In.transition,r=Pe;try{if(In.transition=null,Pe=1,e)return e()}finally{Pe=r,In.transition=n,Ce=t,!(Ce&6)&&zo()}}function mg(){gn=qi.current,Ge(qi)}function ti(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,sk(n)),ct!==null)for(n=ct.return;n!==null;){var r=n;switch(Qp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Ju();break;case 3:xl(),Ge(cn),Ge(Kt),ig();break;case 5:og(r);break;case 4:xl();break;case 13:Ge(Je);break;case 19:Ge(Je);break;case 10:eg(r.type._context);break;case 22:case 23:mg()}n=n.return}if(bt=e,ct=e=Co(e.current,null),Dt=gn=t,xt=0,aa=null,hg=Qc=ci=0,an=bs=null,Jo!==null){for(t=0;t<Jo.length;t++)if(n=Jo[t],r=n.interleaved,r!==null){n.interleaved=null;var o=r.next,i=n.pending;if(i!==null){var l=i.next;i.next=o,r.next=l}n.pending=r}Jo=null}return e}function Vx(e,t){do{var n=ct;try{if(qp(),Nu.current=lc,ic){for(var r=qe.memoizedState;r!==null;){var o=r.queue;o!==null&&(o.pending=null),r=r.next}ic=!1}if(ui=0,Ct=mt=qe=null,Ts=!1,ia=0,fg.current=null,n===null||n.return===null){xt=1,aa=t,ct=null;break}e:{var i=e,l=n.return,s=n,a=t;if(t=Dt,s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){var u=a,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=bv(l);if(h!==null){h.flags&=-257,Rv(h,l,s,i,t),h.mode&1&&Nv(i,u,t),t=h,a=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(a),t.updateQueue=m}else g.add(a);break e}else{if(!(t&1)){Nv(i,u,t),vg();break e}a=Error(W(426))}}else if(Ye&&s.mode&1){var S=bv(l);if(S!==null){!(S.flags&65536)&&(S.flags|=256),Rv(S,l,s,i,t),Jp(_l(a,s));break e}}i=a=_l(a,s),xt!==4&&(xt=2),bs===null?bs=[i]:bs.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var v=Tx(i,a,t);wv(i,v);break e;case 1:s=a;var y=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof y.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(So===null||!So.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=Nx(i,s,t);wv(i,_);break e}}i=i.return}while(i!==null)}Gx(n)}catch(E){t=E,ct===n&&n!==null&&(ct=n=n.return);continue}break}while(1)}function Hx(){var e=sc.current;return sc.current=lc,e===null?lc:e}function vg(){(xt===0||xt===3||xt===2)&&(xt=4),bt===null||!(ci&268435455)&&!(Qc&268435455)||co(bt,Dt)}function cc(e,t){var n=Ce;Ce|=2;var r=Hx();(bt!==e||Dt!==t)&&(Nr=null,ti(e,t));do try{Ok();break}catch(o){Vx(e,o)}while(1);if(qp(),Ce=n,sc.current=r,ct!==null)throw Error(W(261));return bt=null,Dt=0,xt}function Ok(){for(;ct!==null;)Kx(ct)}function Ak(){for(;ct!==null&&!o$();)Kx(ct)}function Kx(e){var t=Xx(e.alternate,e,gn);e.memoizedProps=e.pendingProps,t===null?Gx(e):ct=t,fg.current=null}function Gx(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=kk(n,t),n!==null){n.flags&=32767,ct=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{xt=6,ct=null;return}}else if(n=$k(n,t,gn),n!==null){ct=n;return}if(t=t.sibling,t!==null){ct=t;return}ct=t=e}while(t!==null);xt===0&&(xt=5)}function Go(e,t,n){var r=Pe,o=In.transition;try{In.transition=null,Pe=1,Mk(e,t,n,r)}finally{In.transition=o,Pe=r}return null}function Mk(e,t,n,r){do ul();while(po!==null);if(Ce&6)throw Error(W(327));n=e.finishedWork;var o=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(W(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(p$(e,i),e===bt&&(ct=bt=null,Dt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||su||(su=!0,Qx(Hu,function(){return ul(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=In.transition,In.transition=null;var l=Pe;Pe=1;var s=Ce;Ce|=4,fg.current=null,Nk(e,n),Bx(n,e),ek(oh),Gu=!!rh,oh=rh=null,e.current=n,bk(n),i$(),Ce=s,Pe=l,In.transition=i}else e.current=n;if(su&&(su=!1,po=e,uc=o),i=e.pendingLanes,i===0&&(So=null),a$(n.stateNode),fn(e,ut()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)o=t[n],r(o.value,{componentStack:o.stack,digest:o.digest});if(ac)throw ac=!1,e=Ch,Ch=null,e;return uc&1&&e.tag!==0&&ul(),i=e.pendingLanes,i&1?e===$h?Rs++:(Rs=0,$h=e):Rs=0,zo(),null}function ul(){if(po!==null){var e=k1(uc),t=In.transition,n=Pe;try{if(In.transition=null,Pe=16>e?16:e,po===null)var r=!1;else{if(e=po,po=null,uc=0,Ce&6)throw Error(W(331));var o=Ce;for(Ce|=4,J=e.current;J!==null;){var i=J,l=i.child;if(J.flags&16){var s=i.deletions;if(s!==null){for(var a=0;a<s.length;a++){var u=s[a];for(J=u;J!==null;){var c=J;switch(c.tag){case 0:case 11:case 15:Ns(8,c,i)}var d=c.child;if(d!==null)d.return=c,J=d;else for(;J!==null;){c=J;var f=c.sibling,h=c.return;if(jx(c),c===u){J=null;break}if(f!==null){f.return=h,J=f;break}J=h}}}var g=i.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var S=m.sibling;m.sibling=null,m=S}while(m!==null)}}J=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,J=l;else e:for(;J!==null;){if(i=J,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ns(9,i,i.return)}var v=i.sibling;if(v!==null){v.return=i.return,J=v;break e}J=i.return}}var y=e.current;for(J=y;J!==null;){l=J;var x=l.child;if(l.subtreeFlags&2064&&x!==null)x.return=l,J=x;else e:for(l=y;J!==null;){if(s=J,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Xc(9,s)}}catch(E){nt(s,s.return,E)}if(s===l){J=null;break e}var _=s.sibling;if(_!==null){_.return=s.return,J=_;break e}J=s.return}}if(Ce=o,zo(),pr&&typeof pr.onPostCommitFiberRoot=="function")try{pr.onPostCommitFiberRoot(Bc,e)}catch{}r=!0}return r}finally{Pe=n,In.transition=t}}return!1}function Uv(e,t,n){t=_l(n,t),t=Tx(e,t,1),e=wo(e,t,1),t=tn(),e!==null&&(Ta(e,1,t),fn(e,t))}function nt(e,t,n){if(e.tag===3)Uv(e,e,n);else for(;t!==null;){if(t.tag===3){Uv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(So===null||!So.has(r))){e=_l(n,e),e=Nx(t,e,1),t=wo(t,e,1),e=tn(),t!==null&&(Ta(t,1,e),fn(t,e));break}}t=t.return}}function Dk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=tn(),e.pingedLanes|=e.suspendedLanes&n,bt===e&&(Dt&n)===n&&(xt===4||xt===3&&(Dt&130023424)===Dt&&500>ut()-pg?ti(e,0):hg|=n),fn(e,t)}function Yx(e,t){t===0&&(e.mode&1?(t=Ja,Ja<<=1,!(Ja&130023424)&&(Ja=4194304)):t=1);var n=tn();e=zr(e,t),e!==null&&(Ta(e,t,n),fn(e,n))}function Lk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yx(e,n)}function Ik(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(W(314))}r!==null&&r.delete(t),Yx(e,n)}var Xx;Xx=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||cn.current)un=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return un=!1,Ck(e,t,n);un=!!(e.flags&131072)}else un=!1,Ye&&t.flags&1048576&&Z1(t,ec,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ru(e,t),e=t.pendingProps;var o=ml(t,Kt.current);al(t,n),o=sg(null,t,r,e,o,n);var i=ag();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,dn(r)?(i=!0,Zu(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ng(t),o.updater=Gc,t.stateNode=o,o._reactInternals=t,hh(t,r,e,n),t=mh(null,t,r,!0,i,n)):(t.tag=0,Ye&&i&&Xp(t),Gt(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ru(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=zk(r),e=Kn(r,e),o){case 0:t=gh(null,t,r,e,n);break e;case 1:t=Av(null,t,r,e,n);break e;case 11:t=Pv(null,t,r,e,n);break e;case 14:t=Ov(null,t,r,Kn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),gh(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Av(e,t,r,o,n);case 3:e:{if(Ox(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,o=i.element,nx(e,t),rc(t,r,null,n);var l=t.memoizedState;if(r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=_l(Error(W(423)),t),t=Mv(e,t,r,n,o);break e}else if(r!==o){o=_l(Error(W(424)),t),t=Mv(e,t,r,n,o);break e}else for(yn=_o(t.stateNode.containerInfo.firstChild),xn=t,Ye=!0,Xn=null,n=lx(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vl(),r===o){t=Fr(e,t,n);break e}Gt(e,t,r,n)}t=t.child}return t;case 5:return sx(t),e===null&&ch(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,l=o.children,ih(r,o)?l=null:i!==null&&ih(r,i)&&(t.flags|=32),Px(e,t),Gt(e,t,l,n),t.child;case 6:return e===null&&ch(t),null;case 13:return Ax(e,t,n);case 4:return rg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yl(t,null,r,n):Gt(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Pv(e,t,r,o,n);case 7:return Gt(e,t,t.pendingProps,n),t.child;case 8:return Gt(e,t,t.pendingProps.children,n),t.child;case 12:return Gt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,l=o.value,Fe(tc,r._currentValue),r._currentValue=l,i!==null)if(er(i.value,l)){if(i.children===o.children&&!cn.current){t=Fr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){l=i.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(i.tag===1){a=Lr(-1,n&-n),a.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),dh(i.return,n,t),s.lanes|=n;break}a=a.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(W(341));l.lanes|=n,s=l.alternate,s!==null&&(s.lanes|=n),dh(l,n,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}Gt(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,al(t,n),o=jn(o),r=r(o),t.flags|=1,Gt(e,t,r,n),t.child;case 14:return r=t.type,o=Kn(r,t.pendingProps),o=Kn(r.type,o),Ov(e,t,r,o,n);case 15:return bx(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Kn(r,o),Ru(e,t),t.tag=1,dn(r)?(e=!0,Zu(t)):e=!1,al(t,n),ox(t,r,o),hh(t,r,o,n),mh(null,t,r,!0,e,n);case 19:return Mx(e,t,n);case 22:return Rx(e,t,n)}throw Error(W(156,t.tag))};function Qx(e,t){return S1(e,t)}function jk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(e,t,n,r){return new jk(e,t,n,r)}function yg(e){return e=e.prototype,!(!e||!e.isReactComponent)}function zk(e){if(typeof e=="function")return yg(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ip)return 11;if(e===jp)return 14}return 2}function Co(e,t){var n=e.alternate;return n===null?(n=Dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Au(e,t,n,r,o,i){var l=2;if(r=e,typeof e=="function")yg(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case Ui:return ni(n.children,o,i,t);case Lp:l=8,o|=8;break;case If:return e=Dn(12,n,t,o|2),e.elementType=If,e.lanes=i,e;case jf:return e=Dn(13,n,t,o),e.elementType=jf,e.lanes=i,e;case zf:return e=Dn(19,n,t,o),e.elementType=zf,e.lanes=i,e;case i1:return Jc(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case r1:l=10;break e;case o1:l=9;break e;case Ip:l=11;break e;case jp:l=14;break e;case lo:l=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=Dn(l,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ni(e,t,n,r){return e=Dn(7,e,r,t),e.lanes=n,e}function Jc(e,t,n,r){return e=Dn(22,e,r,t),e.elementType=i1,e.lanes=n,e.stateNode={isHidden:!1},e}function uf(e,t,n){return e=Dn(6,e,null,t),e.lanes=n,e}function cf(e,t,n){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Fk(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ud(0),this.expirationTimes=Ud(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ud(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function xg(e,t,n,r,o,i,l,s,a){return e=new Fk(e,t,n,s,a),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Dn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ng(i),e}function Bk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Wi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Jx(e){if(!e)return No;e=e._reactInternals;e:{if(xi(e)!==e||e.tag!==1)throw Error(W(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(dn(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(W(171))}if(e.tag===1){var n=e.type;if(dn(n))return Q1(e,n,t)}return t}function Zx(e,t,n,r,o,i,l,s,a){return e=xg(n,r,!0,e,o,i,l,s,a),e.context=Jx(null),n=e.current,r=tn(),o=Eo(n),i=Lr(r,o),i.callback=t??null,wo(n,i,o),e.current.lanes=o,Ta(e,o,r),fn(e,r),e}function Zc(e,t,n,r){var o=t.current,i=tn(),l=Eo(o);return n=Jx(n),t.context===null?t.context=n:t.pendingContext=n,t=Lr(i,l),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wo(o,t,l),e!==null&&(qn(e,o,l,i),Tu(e,o,l)),l}function dc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Vv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function _g(e,t){Vv(e,t),(e=e.alternate)&&Vv(e,t)}function Wk(){return null}var qx=typeof reportError=="function"?reportError:function(e){console.error(e)};function wg(e){this._internalRoot=e}qc.prototype.render=wg.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));Zc(e,t,null,null)};qc.prototype.unmount=wg.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;di(function(){Zc(null,e,null,null)}),t[jr]=null}};function qc(e){this._internalRoot=e}qc.prototype.unstable_scheduleHydration=function(e){if(e){var t=b1();e={blockedOn:null,target:e,priority:t};for(var n=0;n<uo.length&&t!==0&&t<uo[n].priority;n++);uo.splice(n,0,e),n===0&&P1(e)}};function Sg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ed(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Hv(){}function Uk(e,t,n,r,o){if(o){if(typeof r=="function"){var i=r;r=function(){var u=dc(l);i.call(u)}}var l=Zx(t,r,e,0,null,!1,!1,"",Hv);return e._reactRootContainer=l,e[jr]=l.current,ea(e.nodeType===8?e.parentNode:e),di(),l}for(;o=e.lastChild;)e.removeChild(o);if(typeof r=="function"){var s=r;r=function(){var u=dc(a);s.call(u)}}var a=xg(e,0,!1,null,null,!1,!1,"",Hv);return e._reactRootContainer=a,e[jr]=a.current,ea(e.nodeType===8?e.parentNode:e),di(function(){Zc(t,a,n,r)}),a}function td(e,t,n,r,o){var i=n._reactRootContainer;if(i){var l=i;if(typeof o=="function"){var s=o;o=function(){var a=dc(l);s.call(a)}}Zc(t,l,e,o)}else l=Uk(n,t,e,o,r);return dc(l)}T1=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ms(t.pendingLanes);n!==0&&(Bp(t,n|1),fn(t,ut()),!(Ce&6)&&(wl=ut()+500,zo()))}break;case 13:di(function(){var r=zr(e,1);if(r!==null){var o=tn();qn(r,e,1,o)}}),_g(e,1)}};Wp=function(e){if(e.tag===13){var t=zr(e,134217728);if(t!==null){var n=tn();qn(t,e,134217728,n)}_g(e,134217728)}};N1=function(e){if(e.tag===13){var t=Eo(e),n=zr(e,t);if(n!==null){var r=tn();qn(n,e,t,r)}_g(e,t)}};b1=function(){return Pe};R1=function(e,t){var n=Pe;try{return Pe=e,t()}finally{Pe=n}};Xf=function(e,t,n){switch(t){case"input":if(Wf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=Hc(r);if(!o)throw Error(W(90));s1(r),Wf(r,o)}}}break;case"textarea":u1(e,n);break;case"select":t=n.value,t!=null&&ol(e,!!n.multiple,t,!1)}};m1=gg;v1=di;var Vk={usingClientEntryPoint:!1,Events:[ba,Gi,Hc,p1,g1,gg]},ls={findFiberByHostInstance:Qo,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Hk={bundleType:ls.bundleType,version:ls.version,rendererPackageName:ls.rendererPackageName,rendererConfig:ls.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Vr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_1(e),e===null?null:e.stateNode},findFiberByHostInstance:ls.findFiberByHostInstance||Wk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var au=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!au.isDisabled&&au.supportsFiber)try{Bc=au.inject(Hk),pr=au}catch{}}Tn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vk;Tn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Sg(t))throw Error(W(200));return Bk(e,t,null,n)};Tn.createRoot=function(e,t){if(!Sg(e))throw Error(W(299));var n=!1,r="",o=qx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=xg(e,1,!1,null,null,n,!1,r,o),e[jr]=t.current,ea(e.nodeType===8?e.parentNode:e),new wg(t)};Tn.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=_1(t),e=e===null?null:e.stateNode,e};Tn.flushSync=function(e){return di(e)};Tn.hydrate=function(e,t,n){if(!ed(t))throw Error(W(200));return td(null,e,t,!0,n)};Tn.hydrateRoot=function(e,t,n){if(!Sg(e))throw Error(W(405));var r=n!=null&&n.hydratedSources||null,o=!1,i="",l=qx;if(n!=null&&(n.unstable_strictMode===!0&&(o=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(l=n.onRecoverableError)),t=Zx(t,null,e,1,n??null,o,!1,i,l),e[jr]=t.current,ea(e),r)for(e=0;e<r.length;e++)n=r[e],o=n._getVersion,o=o(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new qc(t)};Tn.render=function(e,t,n){if(!ed(t))throw Error(W(200));return td(null,e,t,!1,n)};Tn.unmountComponentAtNode=function(e){if(!ed(e))throw Error(W(40));return e._reactRootContainer?(di(function(){td(null,null,e,!1,function(){e._reactRootContainer=null,e[jr]=null})}),!0):!1};Tn.unstable_batchedUpdates=gg;Tn.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ed(n))throw Error(W(200));if(e==null||e._reactInternals===void 0)throw Error(W(38));return td(e,t,n,!1,r)};Tn.version="18.2.0-next-9e3b772b8-20220608";function e_(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e_)}catch(e){console.error(e)}}e_(),Z0.exports=Tn;var Hr=Z0.exports;const Kk=$a(Hr);var Kv=Hr;Df.createRoot=Kv.createRoot,Df.hydrateRoot=Kv.hydrateRoot;var t_={exports:{}},nd={};/**
33
+ * @license React
34
+ * react-jsx-runtime.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */var Gk=p,Yk=Symbol.for("react.element"),Xk=Symbol.for("react.fragment"),Qk=Object.prototype.hasOwnProperty,Jk=Gk.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Zk={key:!0,ref:!0,__self:!0,__source:!0};function n_(e,t,n){var r,o={},i=null,l=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)Qk.call(t,r)&&!Zk.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:Yk,type:e,key:i,ref:l,props:o,_owner:Jk.current}}nd.Fragment=Xk;nd.jsx=n_;nd.jsxs=n_;t_.exports=nd;var w=t_.exports;function Nh(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Eg(e,t){if(e){if(typeof e=="string")return Nh(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Nh(e,t)}}function Cg(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Eg(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(a){throw a},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
41
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,l=!1,s;return{s:function(){n=n.call(e)},n:function(){var a=n.next();return i=a.done,a},e:function(a){l=!0,s=a},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(l)throw s}}}}function r_(e){return e.length>0}var Pa=Object.freeze({kind:"ok",value:void 0});function Oa(e){return e===void 0?Pa:{kind:"ok",value:e}}function _i(e){return{kind:"err",error:e}}function Ml(e){return e===Pa||e.kind==="ok"}function $g(e){return e!==Pa&&e.kind==="err"}function o_(e){var t=[],n=[],r=Cg(e),o;try{for(r.s();!(o=r.n()).done;){var i=o.value;Ml(i)?t.push(i.value):n.push(i.error)}}catch(l){r.e(l)}finally{r.f()}return r_(n)?_i(n):Oa(t)}function qk(e){return o_(e)}function eT(e){var t=[],n=Cg(e),r;try{for(n.s();!(r=n.n()).done;){var o=r.value;$g(o)&&t.push(o.error)}}catch(i){n.e(i)}finally{n.f()}return r_(t)?_i(t):Pa}function tT(e,t){return function(n){for(var r=Oa(t),o=0;o<n.length&&Ml(r);++o)r=e(r.value,n[o],o);return r}}function nT(e){return function(t){return Ml(t)?Oa(e(t.value)):t}}function rT(e){return function(t){return Ml(t)?e(t.value):t}}function oT(e){return function(t){return $g(t)?_i(e(t.error)):t}}function iT(e,t){return function(n){return e(n)?Oa(n):_i(t(n))}}var lT=function(t,n){return function(r){return Ml(r)?t(r.value)?r:_i(n(r.value)):r}},Ps=Object.freeze({__proto__:null,voidOk:Pa,ok:Oa,err:_i,isOk:Ml,isErr:$g,allT:o_,all:qk,allV:eT,flatMapReduce:tT,map:nT,flatMap:rT,mapErr:oT,fromPredicate:iT,filterOrElse:lT});function sT(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function i_(e){var t=sT(e,"string");return typeof t=="symbol"?t:String(t)}function vt(e,t,n){return t=i_(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Sl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(n),!0).forEach(function(r){vt(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gv(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aT(e){if(Array.isArray(e))return Nh(e)}function uT(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function cT(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
42
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dT(e){return aT(e)||uT(e)||Eg(e)||cT()}function pe(e){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pe(e)}function fT(e){if(Array.isArray(e))return e}function hT(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,i,l,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;a=!1}else for(;!(a=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);a=!0);}catch(c){u=!0,o=c}finally{try{if(!a&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(u)throw o}}return s}}function pT(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
43
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ri(e,t){return fT(e)||hT(e,t)||Eg(e,t)||pT()}function _r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yv(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i_(r.key),r)}}function wr(e,t,n){return t&&Yv(e.prototype,t),n&&Yv(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function bh(e,t){return bh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},bh(e,t)}function wi(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bh(e,t)}function fc(e){return fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},fc(e)}function gT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function l_(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mT(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return l_(e)}function Si(e){var t=gT();return function(){var r=fc(e),o;if(t){var i=fc(this).constructor;o=Reflect.construct(r,arguments,i)}else o=r.apply(this,arguments);return mT(this,o)}}var Ei=function(){function e(){_r(this,e)}return wr(e,[{key:"appendValidationError",value:function(n,r,o,i){return n?(n[r]?n[r].push({message:o,value:i}):n[r]=[{message:o,value:i}],n):vt({},r,[{message:o,value:i}])}}]),e}(),Mu=Symbol("GetSchema"),Zt=Symbol("Path"),yt=Symbol("GetSource");function vT(e){return e[Mu]}var kg=wr(function e(t){_r(this,e),this.span=t}),yT=function(e){wi(n,e);var t=Si(n);function n(r,o){var i;return _r(this,n),i=t.call(this,o),vt(l_(i),"type","Sym"),i.value=r,i}return wr(n,[{key:"transpile",value:function(){return this.value}}]),n}(kg);new yT("()");var nn="_type",_n="_ref",xT=function(e){wi(n,e);var t=Si(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _r(this,n),o=t.call(this),o.options=r,o.opt=i,o}return wr(n,[{key:"validate",value:function(o,i){return this.opt&&i==null?!1:i==null?vt({},o,[{message:"Non-optional image was null or undefined.",value:i}]):typeof i[_n]!="string"?vt({},o,[{message:"Image did not have a file reference string. Got: ".concat(pe(i[_n])),value:i}]):i[nn]!=="file"?vt({},o,[{message:"Image did not have the valid file extension type. Got: ".concat(i[nn]),value:i}]):i.metadata?vt({},o,[{message:"Found metadata, but it could not be validated. Image metadata must be an object with the required props: width (positive number), height (positive number) and sha256 (string of length 64 of the base16 hash).",value:i,fixes:["image:replace-metadata"]}]):vt({},o,[{message:"Could not validate Image metadata.",value:i,fixes:["image:add-metadata"]}])}},{key:"assert",value:function(o){return this.opt&&o==null?!0:(o==null?void 0:o[_n])==="image"&&(o==null?void 0:o[nn])==="file"}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"image",options:this.options,opt:this.opt}}}]),n}(Ei),s_=function(t){var n;if(!t[_n].startsWith("/public")){var r;return{url:t[_n]+"?sha256=".concat((r=t.metadata)===null||r===void 0?void 0:r.sha256),metadata:t.metadata}}return{url:t[_n].slice(7)+"?sha256=".concat((n=t.metadata)===null||n===void 0?void 0:n.sha256),metadata:t.metadata}};function a_(e){return pe(e)==="object"&&e!==null&&e!==void 0&&("val"in e||"valPath"in e)}function _T(e){return pe(e)==="object"&&e!==null&&e!==void 0&&Zt in e&&"val"in e}function wT(e){return e[Zt]}function ST(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Xv(e,t,n){return t?St(e(St(t,n))):St(t,n)}function $o(e){return pe(e)==="object"&&e!==null&&(yt in e||Zt in e)}function St(e,t,n){var r;if(pe(e)==="object"){if($o(e))return e;if(a_(e))return St(e.val,e.valPath)}if(e&&e[_n]&&e[nn]==="file"){var o=e[_n];if(typeof o!="string")throw Error("Invalid file ref: "+o);return St(s_(e),t,n)}switch(pe(e)){case"function":case"symbol":throw Error("Invalid selector type: ".concat(pe(e),": ").concat(e));case"object":if(e!==null)return new Proxy(e,{has:function(l,s){return s===yt||s===Zt||s==="andThen"||s===Mu?!0:s in l},get:function(l,s){if(s===yt)return e;if(s===Zt)return t;if(s===Mu)return n;if(s==="andThen")return function(u){return Xv(u,e,t)};if(Array.isArray(l)){if(s==="filter")return function(u){var c=l.map(function(d,f){return St(d,Qn(t,f),n==null?void 0:n.item)}).filter(function(d){return u&&u instanceof Ei?u.assert(Qv(d)):Qv(u(d))});return St(c,t,n)};if(s==="map")return function(u){var c=l.map(function(d,f){var h=u(St(d,Qn(t,f),n==null?void 0:n.item),St(f));return $o(h)?h:St(h)});return St(c,t,n)}}if(Array.isArray(l)&&s==="length")return St(l.length);var a=Reflect.get(l,s);return ST(e,s)?Number.isNaN(Number(s))?St(a,Qn(t,s),n==null?void 0:n.items[s]):St(a,Qn(t,Number(s)),n==null?void 0:n.item):a}});default:return r={eq:function(l){var s=l;if($o(l)&&(s=l[yt],s instanceof kg))throw Error("TODO: Cannot evaluate equality with an Expr");return St(e===s,void 0)},andThen:function(l){return Xv(l,e===void 0?null:e,t)}},vt(r,yt,e===void 0?null:e),vt(r,Zt,t),vt(r,Mu,n),r}}function Qn(e,t){if(pe(t)==="symbol")throw Error("Cannot create val path of array item with symbol prop: ".concat(t.toString()));return e&&"".concat(e,".").concat(JSON.stringify(t))}function Qv(e){if(pe(e)==="object"&&(yt in e||Zt in e)){var t=e[yt];return t}return e}var ET=function(e){wi(n,e);var t=Si(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _r(this,n),o=t.call(this),o.items=r,o.opt=i,o}return wr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:pe(i)!=="object"?vt({},o,[{message:"Expected 'object', got '".concat(pe(i),"'")}]):Array.isArray(i)?vt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(this.items).forEach(function(a){var u=ri(a,2),c=u[0],d=u[1],f=Qn(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(c),i);else{var h=d.validate(f,i[c]);h&&s?s=Sl(Sl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(this.items);i<l.length;i++){var s=ri(l[i],2),a=s[0],u=s[1];if(!u.assert(o[a]))return!1}return pe(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.items,!0)}},{key:"serialize",value:function(){return{type:"object",items:Object.fromEntries(Object.entries(this.items).map(function(o){var i=ri(o,2),l=i[0],s=i[1];return[l,s.serialize()]})),opt:this.opt}}}]),n}(Ei),CT=function(e){wi(n,e);var t=Si(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _r(this,n),o=t.call(this),o.item=r,o.opt=i,o}return wr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:pe(i)!=="object"||!Array.isArray(i)?vt({},o,[{message:"Expected 'array', got '".concat(pe(i),"'")}]):(i.forEach(function(a,u){var c=Qn(o,u);if(!c)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at index ").concat(u),i);else{var d=l.item.validate(c,a);d&&s?s=Sl(Sl({},d),s):d&&(s=d)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;var i=Cg(o),l;try{for(i.s();!(l=i.n()).done;){var s=l.value;if(!this.item.assert(s))return!1}}catch(a){i.e(a)}finally{i.f()}return pe(o)==="object"&&Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"array",item:this.item.serialize(),opt:this.opt}}}]),n}(Ei),$T=function(e){wi(n,e);var t=Si(n);function n(r,o){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return _r(this,n),i=t.call(this),i.key=r,i.items=o,i.opt=l,i}return wr(n,[{key:"validate",value:function(o,i){throw new Error("Method not implemented.")}},{key:"assert",value:function(o){throw new Error("Method not implemented.")}},{key:"optional",value:function(){throw new Error("Method not implemented.")}},{key:"serialize",value:function(){return{type:"union",key:this.key,items:this.items.map(function(o){return o.serialize()}),opt:this.opt}}}]),n}(Ei),kT=function(e){wi(n,e);var t=Si(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _r(this,n),o=t.call(this),o.options=r,o.opt=i,o}return wr(n,[{key:"validate",value:function(o,i){return!1}},{key:"assert",value:function(o){return!0}},{key:"optional",value:function(){return new n(this.options,!0)}},{key:"serialize",value:function(){return{type:"richtext",opt:this.opt}}}]),n}(Ei),TT=function(e){wi(n,e);var t=Si(n);function n(r){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return _r(this,n),o=t.call(this),o.item=r,o.opt=i,o}return wr(n,[{key:"validate",value:function(o,i){var l=this,s=!1;return this.opt&&i==null?!1:pe(i)!=="object"?vt({},o,[{message:"Expected 'object', got '".concat(pe(i),"'")}]):Array.isArray(i)?vt({},o,[{message:"Expected 'object', got 'array'"}]):(Object.entries(i).forEach(function(a){var u=ri(a,2),c=u[0],d=u[1],f=Qn(o,c);if(!f)s=l.appendValidationError(s,o,"Internal error: could not create path at ".concat(!o&&typeof o=="string"?"<empty string>":o," at key ").concat(d),i);else{var h=l.item.validate(f,d);h&&s?s=Sl(Sl({},h),s):h&&(s=h)}}),s)}},{key:"assert",value:function(o){if(this.opt&&o==null)return!0;if(!o)return!1;for(var i=0,l=Object.entries(o);i<l.length;i++){var s=ri(l[i],2),a=s[1];if(!this.item.assert(a))return!1}return pe(o)==="object"&&!Array.isArray(o)}},{key:"optional",value:function(){return new n(this.item,!0)}},{key:"serialize",value:function(){return{type:"record",item:this.item.serialize(),opt:this.opt}}}]),n}(Ei);function NT(e){var t=e[yt];if(t instanceof kg)throw Error("Cannot get raw source of an Expr");var n=t;return n}function bT(e){return e.indexOf(".")===-1?[e,""]:[e.slice(0,e.indexOf(".")),e.slice(e.indexOf(".")+1)]}function RT(e){return e instanceof ET||pe(e)==="object"&&"type"in e&&e.type==="object"}function PT(e){return e instanceof TT||pe(e)==="object"&&"type"in e&&e.type==="record"}function OT(e){return e instanceof CT||pe(e)==="object"&&"type"in e&&e.type==="array"}function AT(e){return e instanceof $T||pe(e)==="object"&&"type"in e&&e.type==="union"}function MT(e){return e instanceof kT||pe(e)==="object"&&"type"in e&&e.type==="richtext"}function DT(e){return e instanceof xT||pe(e)==="object"&&"type"in e&&e.type==="image"}function LT(e,t,n){for(var r=IT(e),o=dT(r),i=n,l=t,s=function(){var c=r.shift();if(c===void 0)throw Error("Unexpected undefined part");if(OT(i)){if(Number.isNaN(Number(c)))throw Error("Invalid path: array schema ".concat(JSON.stringify(i)," must have a number as path, but got ").concat(c,". Path: ").concat(e));if(pe(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of array, but got ".concat(pe(l)));if(!l[c]){var d;throw Error("Invalid path: array source (length: ".concat((d=l)===null||d===void 0?void 0:d.length,") did not have index ").concat(c," from path: ").concat(e))}l=l[c],i=i.item}else if(PT(i)){if(typeof c!="string")throw Error("Invalid path: record schema ".concat(i," must have path: ").concat(c," as string"));if(pe(l)!=="object"&&!Array.isArray(l))throw Error("Schema type error: expected source to be type of record, but got ".concat(pe(l)));if(!l[c])throw Error("Invalid path: record source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.item}else if(RT(i)){if(pe(l)!=="object")throw Error("Schema type error: expected source to be type of object, but got ".concat(pe(l)));if(!l[c])throw Error("Invalid path: object source did not have key ".concat(c," from path: ").concat(e));l=l[c],i=i.items[c]}else{if(DT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(m){return JSON.stringify(m)}).join("."),schema:i,source:l}};if(AT(i)){var f=i.key,h=l[f];if(!h)throw Error("Invalid path: union source ".concat(i," did not have required key ").concat(f," in path: ").concat(e));var g=i.items.find(function(m){var S,v;return(m==null||(S=m.items)===null||S===void 0||(v=S[f])===null||v===void 0?void 0:v.value)===h});if(!g)throw Error("Invalid path: union schema ".concat(i," did not have a child object with ").concat(f," of value ").concat(h," in path: ").concat(e));i=g.items[c],l=l[c]}else{if(MT(i))return{v:{path:o.slice(0,o.length-r.length-1).map(function(m){return JSON.stringify(m)}).join("."),schema:i,source:l}};throw Error("Invalid path: ".concat(c," resolved to an unexpected schema ").concat(JSON.stringify(i)))}}};r.length>0;){var a=s();if(pe(a)==="object")return a.v}if(r.length>0)throw Error("Invalid path: ".concat(r.join(".")," is not a valid path"));return{path:o.map(function(u){return Number.isNaN(Number(u))?JSON.stringify(u):u}).join("."),schema:i,source:l}}function IT(e){for(var t=[],n=0;n<e.length;){var r="";if(e[n]==='"'){for(n++;n<e.length&&e[n]!=='"';)e[n]==="\\"&&e[n+1]==='"'?(r+='"',n++):r+=e[n],n++;if(e[n]!=='"'){var o;throw new Error("Invalid input (".concat(JSON.stringify(e),"): Missing closing double quote: ").concat((o=e[n])!==null&&o!==void 0?o:"at end of string"," (char: ").concat(n,"; length: ").concat(e.length,")"))}}else for(;n<e.length&&e[n]!==".";)r+=e[n],n++;r!==""&&t.push(r),n++}return t}function jT(e){return u_(BT(e))}function zT(e){return $o(e)?pe(e[yt])==="object"&&pe(e[yt])!==null&&Array.isArray(e[yt]):Array.isArray(e)}function FT(e){return $o(e)?pe(e[yt])==="object"&&pe(e[yt])!==null&&!Array.isArray(e[yt]):pe(e)==="object"}function BT(e){var t=St(e);function n(r){var o=zT(r),i=FT(r);if(o){var l=yt in r?r[yt]:r,s=Zt in r?r[Zt]:void 0;return{val:l.map(function(c,d){return n($o(c)?c:St(c,Qn(s,d)))}),valPath:s}}else if(i){var a=yt in r?r[yt]:r,u=Zt in r?r[Zt]:void 0;return{val:a!==null&&Object.fromEntries(Object.entries(a).map(function(c){var d=ri(c,2),f=d[0],h=d[1];return[f,n($o(h)?h:St(h,Qn(u,f)))]})),valPath:u}}else return $o(r)?{val:n(r[yt]),valPath:r[Zt]}:r}return n(t)}function Rh(e){var t=a_(e)?e.val:e;switch(pe(t)){case"function":case"symbol":throw Error("Invalid val type: ".concat(pe(t)));case"object":return t===null?null:Array.isArray(t)?t.map(Rh):Object.fromEntries(Object.entries(t).map(function(n){var r=ri(n,2),o=r[0],i=r[1];return[o,i&&Rh(i)]}));default:return t}}function u_(e){var t,n=e.val;switch(pe(n)){case"function":case"symbol":throw Error("Invalid val type: ".concat(pe(n)));case"object":if(n!==null)return new Proxy(n,{has:function(o,i){return i==="val"||i===Zt?!0:Jv(o,i)},get:function(o,i){if(i===Zt)return e.valPath;if(i==="val")return Rh(e);if(Array.isArray(o)&&i==="length")return o.length;if(Jv(n,i)){var l,s;return u_({val:Reflect.get(o,i).val,valPath:(l=(s=Reflect.get(o,i))===null||s===void 0?void 0:s.valPath)!==null&&l!==void 0?l:Qn(e.valPath,Array.isArray(o)?Number(i):i)})}return Reflect.get(o,i)}});default:return t={},vt(t,Zt,e.valPath),vt(t,"val",e.val),t}}function Jv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ua(){ua=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(P,O,k){P[O]=k.value},i=typeof Symbol=="function"?Symbol:{},l=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag";function u(P,O,k){return Object.defineProperty(P,O,{value:k,enumerable:!0,configurable:!0,writable:!0}),P[O]}try{u({},"")}catch{u=function(O,k,I){return O[k]=I}}function c(P,O,k,I){var L=O&&O.prototype instanceof v?O:v,V=Object.create(L.prototype),te=new H(I||[]);return o(V,"_invoke",{value:R(P,k,te)}),V}function d(P,O,k){try{return{type:"normal",arg:P.call(O,k)}}catch(I){return{type:"throw",arg:I}}}t.wrap=c;var f="suspendedStart",h="suspendedYield",g="executing",m="completed",S={};function v(){}function y(){}function x(){}var _={};u(_,l,function(){return this});var E=Object.getPrototypeOf,$=E&&E(E(X([])));$&&$!==n&&r.call($,l)&&(_=$);var C=x.prototype=v.prototype=Object.create(_);function T(P){["next","throw","return"].forEach(function(O){u(P,O,function(k){return this._invoke(O,k)})})}function M(P,O){function k(L,V,te,ye){var fe=d(P[L],P,V);if(fe.type!=="throw"){var Oe=fe.arg,be=Oe.value;return be&&typeof be=="object"&&r.call(be,"__await")?O.resolve(be.__await).then(function(Z){k("next",Z,te,ye)},function(Z){k("throw",Z,te,ye)}):O.resolve(be).then(function(Z){Oe.value=Z,te(Oe)},function(Z){return k("throw",Z,te,ye)})}ye(fe.arg)}var I;o(this,"_invoke",{value:function(L,V){function te(){return new O(function(ye,fe){k(L,V,ye,fe)})}return I=I?I.then(te,te):te()}})}function R(P,O,k){var I=f;return function(L,V){if(I===g)throw new Error("Generator is already running");if(I===m){if(L==="throw")throw V;return{value:e,done:!0}}for(k.method=L,k.arg=V;;){var te=k.delegate;if(te){var ye=j(te,k);if(ye){if(ye===S)continue;return ye}}if(k.method==="next")k.sent=k._sent=k.arg;else if(k.method==="throw"){if(I===f)throw I=m,k.arg;k.dispatchException(k.arg)}else k.method==="return"&&k.abrupt("return",k.arg);I=g;var fe=d(P,O,k);if(fe.type==="normal"){if(I=k.done?m:h,fe.arg===S)continue;return{value:fe.arg,done:k.done}}fe.type==="throw"&&(I=m,k.method="throw",k.arg=fe.arg)}}}function j(P,O){var k=O.method,I=P.iterator[k];if(I===e)return O.delegate=null,k==="throw"&&P.iterator.return&&(O.method="return",O.arg=e,j(P,O),O.method==="throw")||k!=="return"&&(O.method="throw",O.arg=new TypeError("The iterator does not provide a '"+k+"' method")),S;var L=d(I,P.iterator,O.arg);if(L.type==="throw")return O.method="throw",O.arg=L.arg,O.delegate=null,S;var V=L.arg;return V?V.done?(O[P.resultName]=V.value,O.next=P.nextLoc,O.method!=="return"&&(O.method="next",O.arg=e),O.delegate=null,S):V:(O.method="throw",O.arg=new TypeError("iterator result is not an object"),O.delegate=null,S)}function F(P){var O={tryLoc:P[0]};1 in P&&(O.catchLoc=P[1]),2 in P&&(O.finallyLoc=P[2],O.afterLoc=P[3]),this.tryEntries.push(O)}function ae(P){var O=P.completion||{};O.type="normal",delete O.arg,P.completion=O}function H(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(F,this),this.reset(!0)}function X(P){if(P||P===""){var O=P[l];if(O)return O.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var k=-1,I=function L(){for(;++k<P.length;)if(r.call(P,k))return L.value=P[k],L.done=!1,L;return L.value=e,L.done=!0,L};return I.next=I}}throw new TypeError(typeof P+" is not iterable")}return y.prototype=x,o(C,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:y,configurable:!0}),y.displayName=u(x,a,"GeneratorFunction"),t.isGeneratorFunction=function(P){var O=typeof P=="function"&&P.constructor;return!!O&&(O===y||(O.displayName||O.name)==="GeneratorFunction")},t.mark=function(P){return Object.setPrototypeOf?Object.setPrototypeOf(P,x):(P.__proto__=x,u(P,a,"GeneratorFunction")),P.prototype=Object.create(C),P},t.awrap=function(P){return{__await:P}},T(M.prototype),u(M.prototype,s,function(){return this}),t.AsyncIterator=M,t.async=function(P,O,k,I,L){L===void 0&&(L=Promise);var V=new M(c(P,O,k,I),L);return t.isGeneratorFunction(O)?V:V.next().then(function(te){return te.done?te.value:V.next()})},T(C),u(C,a,"Generator"),u(C,l,function(){return this}),u(C,"toString",function(){return"[object Generator]"}),t.keys=function(P){var O=Object(P),k=[];for(var I in O)k.push(I);return k.reverse(),function L(){for(;k.length;){var V=k.pop();if(V in O)return L.value=V,L.done=!1,L}return L.done=!0,L}},t.values=X,H.prototype={constructor:H,reset:function(P){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(ae),!P)for(var O in this)O.charAt(0)==="t"&&r.call(this,O)&&!isNaN(+O.slice(1))&&(this[O]=e)},stop:function(){this.done=!0;var P=this.tryEntries[0].completion;if(P.type==="throw")throw P.arg;return this.rval},dispatchException:function(P){if(this.done)throw P;var O=this;function k(fe,Oe){return V.type="throw",V.arg=P,O.next=fe,Oe&&(O.method="next",O.arg=e),!!Oe}for(var I=this.tryEntries.length-1;I>=0;--I){var L=this.tryEntries[I],V=L.completion;if(L.tryLoc==="root")return k("end");if(L.tryLoc<=this.prev){var te=r.call(L,"catchLoc"),ye=r.call(L,"finallyLoc");if(te&&ye){if(this.prev<L.catchLoc)return k(L.catchLoc,!0);if(this.prev<L.finallyLoc)return k(L.finallyLoc)}else if(te){if(this.prev<L.catchLoc)return k(L.catchLoc,!0)}else{if(!ye)throw new Error("try statement without catch or finally");if(this.prev<L.finallyLoc)return k(L.finallyLoc)}}}},abrupt:function(P,O){for(var k=this.tryEntries.length-1;k>=0;--k){var I=this.tryEntries[k];if(I.tryLoc<=this.prev&&r.call(I,"finallyLoc")&&this.prev<I.finallyLoc){var L=I;break}}L&&(P==="break"||P==="continue")&&L.tryLoc<=O&&O<=L.finallyLoc&&(L=null);var V=L?L.completion:{};return V.type=P,V.arg=O,L?(this.method="next",this.next=L.finallyLoc,S):this.complete(V)},complete:function(P,O){if(P.type==="throw")throw P.arg;return P.type==="break"||P.type==="continue"?this.next=P.arg:P.type==="return"?(this.rval=this.arg=P.arg,this.method="return",this.next="end"):P.type==="normal"&&O&&(this.next=O),S},finish:function(P){for(var O=this.tryEntries.length-1;O>=0;--O){var k=this.tryEntries[O];if(k.finallyLoc===P)return this.complete(k.completion,k.afterLoc),ae(k),S}},catch:function(P){for(var O=this.tryEntries.length-1;O>=0;--O){var k=this.tryEntries[O];if(k.tryLoc===P){var I=k.completion;if(I.type==="throw"){var L=I.arg;ae(k)}return L}}throw new Error("illegal catch attempt")},delegateYield:function(P,O,k){return this.delegate={iterator:X(P),resultName:O,nextLoc:k},this.method==="next"&&(this.arg=e),S}},t}function Zv(e,t,n,r,o,i,l){try{var s=e[i](l),a=s.value}catch(u){n(u);return}s.done?t(a):Promise.resolve(a).then(r,o)}function c_(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function l(a){Zv(i,r,o,l,s,"next",a)}function s(a){Zv(i,r,o,l,s,"throw",a)}l(void 0)})}}var WT=function(){var e=c_(ua().mark(function t(n){var r,o,i;return ua().wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,crypto.subtle.digest("SHA-256",n);case 2:return r=s.sent,o=Array.from(new Uint8Array(r)),i=o.map(function(a){return a.toString(16).padStart(2,"0")}).join(""),s.abrupt("return",i);case 6:case"end":return s.stop()}},t)}));return function(n){return e.apply(this,arguments)}}(),UT=function(){function e(t){_r(this,e),this.host=t}return wr(e,[{key:"getDisableUrl",value:function(){return"".concat(this.host,"/disable")}},{key:"getEditUrl",value:function(){return"".concat(this.host,"/static/edit")}},{key:"postPatches",value:function(n,r,o){return fetch("".concat(this.host,"/patches/~"),{headers:o||{"Content-Type":"application/json"},method:"POST",body:JSON.stringify(vt({},n,r))}).then(function(i){return df(i)})}},{key:"getSession",value:function(){return fetch("".concat(this.host,"/session")).then(function(n){return df(n)})}},{key:"getModules",value:function(n){var r=n.patch,o=r===void 0?!1:r,i=n.includeSchema,l=i===void 0?!1:i,s=n.includeSource,a=s===void 0?!1:s,u=n.treePath,c=u===void 0?"/":u,d=n.headers,f=new URLSearchParams;return f.set("patch",o.toString()),f.set("schema",l.toString()),f.set("source",a.toString()),fetch("".concat(this.host,"/tree/~").concat(c,"?").concat(f.toString()),{headers:d}).then(function(h){return df(h)})}}]),e}();function df(e){return Ph.apply(this,arguments)}function Ph(){return Ph=c_(ua().mark(function e(t){return ua().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,!t.ok){r.next=9;break}return r.t0=Ps,r.next=5,t.json();case 5:return r.t1=r.sent,r.abrupt("return",r.t0.ok.call(r.t0,r.t1));case 9:return r.t2=Ps,r.t3=t.status,r.next=13,t.text();case 13:return r.t4=r.sent,r.t5={statusCode:r.t3,message:r.t4},r.abrupt("return",r.t2.err.call(r.t2,r.t5));case 16:r.next=21;break;case 18:return r.prev=18,r.t6=r.catch(0),r.abrupt("return",_i({message:r.t6 instanceof Error?r.t6.message:"Unknown error"}));case 21:case"end":return r.stop()}},e,null,[[0,18]])})),Ph.apply(this,arguments)}var wn={convertFileSource:s_,getSchema:vT,getValPath:wT,getVal:jT,getSource:NT,resolvePath:LT,splitModuleIdAndModulePath:bT,isVal:_T,createValPathOfItem:Qn,getSHA256Hash:WT,createPatchJSONPath:function(t){return"/".concat(t.split(".").map(function(n){return JSON.parse(n)}).join("/"))},VAL_DRAFT_MODE_COOKIE:"val_draft_mode",VAL_ENABLE_COOKIE_NAME:"val_enable",VAL_STATE_COOKIE:"val_state",VAL_SESSION_COOKIE:"val_session"},d_={exports:{}};/*!
44
+ Copyright (c) 2018 Jed Watson.
45
+ Licensed under the MIT License (MIT), see
46
+ http://jedwatson.github.io/classnames
47
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var l=typeof i;if(l==="string"||l==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(l==="object"){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes("[native code]")){r.push(i.toString());continue}for(var a in i)t.call(i,a)&&i[a]&&r.push(a)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(d_);var VT=d_.exports;const rd=$a(VT);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ee.apply(this,arguments)}function HT(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function f_(...e){return t=>e.forEach(n=>HT(n,t))}function Xe(...e){return p.useCallback(f_(...e),e)}const El=p.forwardRef((e,t)=>{const{children:n,...r}=e,o=p.Children.toArray(n),i=o.find(GT);if(i){const l=i.props.children,s=o.map(a=>a===i?p.Children.count(l)>1?p.Children.only(null):p.isValidElement(l)?l.props.children:null:a);return p.createElement(Oh,ee({},r,{ref:t}),p.isValidElement(l)?p.cloneElement(l,void 0,s):null)}return p.createElement(Oh,ee({},r,{ref:t}),n)});El.displayName="Slot";const Oh=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.isValidElement(n)?p.cloneElement(n,{...YT(r,n.props),ref:t?f_(t,n.ref):n.ref}):p.Children.count(n)>1?p.Children.only(null):null});Oh.displayName="SlotClone";const KT=({children:e})=>p.createElement(p.Fragment,null,e);function GT(e){return p.isValidElement(e)&&e.type===KT}function YT(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const XT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=XT.reduce((e,t)=>{const n=p.forwardRef((r,o)=>{const{asChild:i,...l}=r,s=i?El:t;return p.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),p.createElement(s,ee({},l,{ref:o}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function QT(e,t){e&&Hr.flushSync(()=>e.dispatchEvent(t))}const $n=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{};function JT(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const Dl=e=>{const{present:t,children:n}=e,r=ZT(t),o=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),i=Xe(r.ref,o.ref);return typeof n=="function"||r.isPresent?p.cloneElement(o,{ref:i}):null};Dl.displayName="Presence";function ZT(e){const[t,n]=p.useState(),r=p.useRef({}),o=p.useRef(e),i=p.useRef("none"),l=e?"mounted":"unmounted",[s,a]=JT(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=uu(r.current);i.current=s==="mounted"?u:"none"},[s]),$n(()=>{const u=r.current,c=o.current;if(c!==e){const f=i.current,h=uu(u);e?a("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?a("UNMOUNT"):a(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,a]),$n(()=>{if(t){const u=d=>{const h=uu(r.current).includes(d.animationName);d.target===t&&h&&Hr.flushSync(()=>a("ANIMATION_END"))},c=d=>{d.target===t&&(i.current=uu(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else a("ANIMATION_END")},[t,a]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:p.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function uu(e){return(e==null?void 0:e.animationName)||"none"}function Ci(e,t=[]){let n=[];function r(i,l){const s=p.createContext(l),a=n.length;n=[...n,l];function u(d){const{scope:f,children:h,...g}=d,m=(f==null?void 0:f[e][a])||s,S=p.useMemo(()=>g,Object.values(g));return p.createElement(m.Provider,{value:S},h)}function c(d,f){const h=(f==null?void 0:f[e][a])||s,g=p.useContext(h);if(g)return g;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,c]}const o=()=>{const i=n.map(l=>p.createContext(l));return function(s){const a=(s==null?void 0:s[e])||i;return p.useMemo(()=>({[`__scope${e}`]:{...s,[e]:a}}),[s,a])}};return o.scopeName=e,[r,qT(o,...t)]}function qT(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const l=r.reduce((s,{useScope:a,scopeName:u})=>{const d=a(i)[`__scope${u}`];return{...s,...d}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Vt(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const eN=p.createContext(void 0);function Tg(e){const t=p.useContext(eN);return e||t||"ltr"}function Ah(e,[t,n]){return Math.min(n,Math.max(t,e))}function He(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function tN(e,t){return p.useReducer((n,r)=>{const o=t[n][r];return o??n},e)}const h_="ScrollArea",[p_,p4]=Ci(h_),[nN,Bn]=p_(h_),rN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:i=600,...l}=e,[s,a]=p.useState(null),[u,c]=p.useState(null),[d,f]=p.useState(null),[h,g]=p.useState(null),[m,S]=p.useState(null),[v,y]=p.useState(0),[x,_]=p.useState(0),[E,$]=p.useState(!1),[C,T]=p.useState(!1),M=Xe(t,j=>a(j)),R=Tg(o);return p.createElement(nN,{scope:n,type:r,dir:R,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:E,onScrollbarXEnabledChange:$,scrollbarY:m,onScrollbarYChange:S,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:y,onCornerHeightChange:_},p.createElement(De.div,ee({dir:R},l,{ref:M,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})))}),oN="ScrollAreaViewport",iN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...o}=e,i=Bn(oN,n),l=p.useRef(null),s=Xe(t,l,i.onViewportChange);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(De.div,ee({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),p.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Kr="ScrollAreaScrollbar",g_=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bn(Kr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:l}=o,s=e.orientation==="horizontal";return p.useEffect(()=>(s?i(!0):l(!0),()=>{s?i(!1):l(!1)}),[s,i,l]),o.type==="hover"?p.createElement(lN,ee({},r,{ref:t,forceMount:n})):o.type==="scroll"?p.createElement(sN,ee({},r,{ref:t,forceMount:n})):o.type==="auto"?p.createElement(m_,ee({},r,{ref:t,forceMount:n})):o.type==="always"?p.createElement(Ng,ee({},r,{ref:t})):null}),lN=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bn(Kr,e.__scopeScrollArea),[i,l]=p.useState(!1);return p.useEffect(()=>{const s=o.scrollArea;let a=0;if(s){const u=()=>{window.clearTimeout(a),l(!0)},c=()=>{a=window.setTimeout(()=>l(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(a),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[o.scrollArea,o.scrollHideDelay]),p.createElement(Dl,{present:n||i},p.createElement(m_,ee({"data-state":i?"visible":"hidden"},r,{ref:t})))}),sN=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bn(Kr,e.__scopeScrollArea),i=e.orientation==="horizontal",l=id(()=>a("SCROLL_END"),100),[s,a]=tN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return p.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>a("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,a]),p.useEffect(()=>{const u=o.viewport,c=i?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(a("SCROLL"),l()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[o.viewport,i,a,l]),p.createElement(Dl,{present:n||s!=="hidden"},p.createElement(Ng,ee({"data-state":s==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:He(e.onPointerEnter,()=>a("POINTER_ENTER")),onPointerLeave:He(e.onPointerLeave,()=>a("POINTER_LEAVE"))})))}),m_=p.forwardRef((e,t)=>{const n=Bn(Kr,e.__scopeScrollArea),{forceMount:r,...o}=e,[i,l]=p.useState(!1),s=e.orientation==="horizontal",a=id(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;l(s?u:c)}},10);return Cl(n.viewport,a),Cl(n.content,a),p.createElement(Dl,{present:r||i},p.createElement(Ng,ee({"data-state":i?"visible":"hidden"},o,{ref:t})))}),Ng=p.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Bn(Kr,e.__scopeScrollArea),i=p.useRef(null),l=p.useRef(0),[s,a]=p.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=__(s.viewport,s.content),c={...r,sizes:s,onSizesChange:a,hasThumb:u>0&&u<1,onThumbChange:f=>i.current=f,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:f=>l.current=f};function d(f,h){return gN(f,l.current,s,h)}return n==="horizontal"?p.createElement(aN,ee({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollLeft,h=qv(f,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}})):n==="vertical"?p.createElement(uN,ee({},c,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const f=o.viewport.scrollTop,h=qv(f,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}})):null}),aN=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Bn(Kr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Xe(t,a,i.onScrollbarXChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(y_,ee({"data-orientation":"horizontal"},o,{ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":od(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),S_(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:a.current.clientWidth,paddingStart:hc(l.paddingLeft),paddingEnd:hc(l.paddingRight)}})}}))}),uN=p.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,i=Bn(Kr,e.__scopeScrollArea),[l,s]=p.useState(),a=p.useRef(null),u=Xe(t,a,i.onScrollbarYChange);return p.useEffect(()=>{a.current&&s(getComputedStyle(a.current))},[a]),p.createElement(y_,ee({"data-orientation":"vertical"},o,{ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":od(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(i.viewport){const f=i.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),S_(f,d)&&c.preventDefault()}},onResize:()=>{a.current&&i.viewport&&l&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:a.current.clientHeight,paddingStart:hc(l.paddingTop),paddingEnd:hc(l.paddingBottom)}})}}))}),[cN,v_]=p_(Kr),y_=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:i,onThumbPointerUp:l,onThumbPointerDown:s,onThumbPositionChange:a,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=Bn(Kr,n),[g,m]=p.useState(null),S=Xe(t,M=>m(M)),v=p.useRef(null),y=p.useRef(""),x=h.viewport,_=r.content-r.viewport,E=Vt(c),$=Vt(a),C=id(d,10);function T(M){if(v.current){const R=M.clientX-v.current.left,j=M.clientY-v.current.top;u({x:R,y:j})}}return p.useEffect(()=>{const M=R=>{const j=R.target;(g==null?void 0:g.contains(j))&&E(R,_)};return document.addEventListener("wheel",M,{passive:!1}),()=>document.removeEventListener("wheel",M,{passive:!1})},[x,g,_,E]),p.useEffect($,[r,$]),Cl(g,C),Cl(h.content,C),p.createElement(cN,{scope:n,scrollbar:g,hasThumb:o,onThumbChange:Vt(i),onThumbPointerUp:Vt(l),onThumbPositionChange:$,onThumbPointerDown:Vt(s)},p.createElement(De.div,ee({},f,{ref:S,style:{position:"absolute",...f.style},onPointerDown:He(e.onPointerDown,M=>{M.button===0&&(M.target.setPointerCapture(M.pointerId),v.current=g.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),T(M))}),onPointerMove:He(e.onPointerMove,T),onPointerUp:He(e.onPointerUp,M=>{const R=M.target;R.hasPointerCapture(M.pointerId)&&R.releasePointerCapture(M.pointerId),document.body.style.webkitUserSelect=y.current,h.viewport&&(h.viewport.style.scrollBehavior=""),v.current=null})})))}),Mh="ScrollAreaThumb",dN=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=v_(Mh,e.__scopeScrollArea);return p.createElement(Dl,{present:n||o.hasThumb},p.createElement(fN,ee({ref:t},r)))}),fN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,i=Bn(Mh,n),l=v_(Mh,n),{onThumbPositionChange:s}=l,a=Xe(t,d=>l.onThumbChange(d)),u=p.useRef(),c=id(()=>{u.current&&(u.current(),u.current=void 0)},100);return p.useEffect(()=>{const d=i.viewport;if(d){const f=()=>{if(c(),!u.current){const h=mN(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[i.viewport,c,s]),p.createElement(De.div,ee({"data-state":l.hasThumb?"visible":"hidden"},o,{ref:a,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:He(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,m=d.clientY-h.top;l.onThumbPointerDown({x:g,y:m})}),onPointerUp:He(e.onPointerUp,l.onThumbPointerUp)}))}),x_="ScrollAreaCorner",hN=p.forwardRef((e,t)=>{const n=Bn(x_,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.createElement(pN,ee({},e,{ref:t})):null}),pN=p.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Bn(x_,n),[i,l]=p.useState(0),[s,a]=p.useState(0),u=!!(i&&s);return Cl(o.scrollbarX,()=>{var c;const d=((c=o.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;o.onCornerHeightChange(d),a(d)}),Cl(o.scrollbarY,()=>{var c;const d=((c=o.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;o.onCornerWidthChange(d),l(d)}),u?p.createElement(De.div,ee({},r,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function hc(e){return e?parseInt(e,10):0}function __(e,t){const n=e/t;return isNaN(n)?0:n}function od(e){const t=__(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function gN(e,t,n,r="ltr"){const o=od(n),i=o/2,l=t||i,s=o-l,a=n.scrollbar.paddingStart+l,u=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return w_([a,u],d)(e)}function qv(e,t,n="ltr"){const r=od(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,l=t.content-t.viewport,s=i-r,a=n==="ltr"?[0,l]:[l*-1,0],u=Ah(e,a);return w_([0,l],[0,s])(u)}function w_(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function S_(e,t){return e>0&&e<t}const mN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},l=n.left!==i.left,s=n.top!==i.top;(l||s)&&t(),n=i,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function id(e,t){const n=Vt(e),r=p.useRef(0);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),p.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Cl(e,t){const n=Vt(t);$n(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}const E_=rN,vN=iN,yN=hN;function C_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=C_(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function xN(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=C_(e))&&(r&&(r+=" "),r+=t);return r}const bg="-";function _N(e){const t=SN(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function o(l){const s=l.split(bg);return s[0]===""&&s.length!==1&&s.shift(),$_(s,t)||wN(l)}function i(l,s){const a=n[l]||[];return s&&r[l]?[...a,...r[l]]:a}return{getClassGroupId:o,getConflictingClassGroupIds:i}}function $_(e,t){var l;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?$_(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(bg);return(l=t.validators.find(({validator:s})=>s(i)))==null?void 0:l.classGroupId}const ey=/^\[(.+)\]$/;function wN(e){if(ey.test(e)){const t=ey.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function SN(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return CN(Object.entries(e.classGroups),n).forEach(([i,l])=>{Dh(l,r,i,t)}),r}function Dh(e,t,n,r){e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ty(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(EN(o)){Dh(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,l])=>{Dh(l,ty(t,i),n,r)})})}function ty(e,t){let n=e;return t.split(bg).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function EN(e){return e.isThemeGetter}function CN(e,t){return t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,s])=>[t+l,s])):i);return[n,o]}):e}function $N(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function o(i,l){n.set(i,l),t++,t>e&&(t=0,r=n,n=new Map)}return{get(i){let l=n.get(i);if(l!==void 0)return l;if((l=r.get(i))!==void 0)return o(i,l),l},set(i,l){n.has(i)?n.set(i,l):o(i,l)}}}const k_="!";function kN(e){const t=e.separator,n=t.length===1,r=t[0],o=t.length;return function(l){const s=[];let a=0,u=0,c;for(let m=0;m<l.length;m++){let S=l[m];if(a===0){if(S===r&&(n||l.slice(m,m+o)===t)){s.push(l.slice(u,m)),u=m+o;continue}if(S==="/"){c=m;continue}}S==="["?a++:S==="]"&&a--}const d=s.length===0?l:l.substring(u),f=d.startsWith(k_),h=f?d.substring(1):d,g=c&&c>u?c-u:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}}}function TN(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function NN(e){return{cache:$N(e.cacheSize),splitModifiers:kN(e),..._N(e)}}const bN=/\s+/;function RN(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=new Set;return e.trim().split(bN).map(l=>{const{modifiers:s,hasImportantModifier:a,baseClassName:u,maybePostfixModifierPosition:c}=n(l);let d=r(c?u.substring(0,c):u),f=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:l};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:l};f=!1}const h=TN(s).join(":");return{isTailwindClass:!0,modifierId:a?h+k_:h,classGroupId:d,originalClassName:l,hasPostfixModifier:f}}).reverse().filter(l=>{if(!l.isTailwindClass)return!0;const{modifierId:s,classGroupId:a,hasPostfixModifier:u}=l,c=s+a;return i.has(c)?!1:(i.add(c),o(a,u).forEach(d=>i.add(s+d)),!0)}).reverse().map(l=>l.originalClassName).join(" ")}function PN(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=T_(t))&&(r&&(r+=" "),r+=n);return r}function T_(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=T_(e[r]))&&(n&&(n+=" "),n+=t);return n}function ON(e,...t){let n,r,o,i=l;function l(a){const u=t.reduce((c,d)=>d(c),e());return n=NN(u),r=n.cache.get,o=n.cache.set,i=s,s(a)}function s(a){const u=r(a);if(u)return u;const c=RN(a,n);return o(a,c),c}return function(){return i(PN.apply(null,arguments))}}function We(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const N_=/^\[(?:([a-z-]+):)?(.+)\]$/i,AN=/^\d+\/\d+$/,MN=new Set(["px","full","screen"]),DN=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,LN=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,IN=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jN=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Vn(e){return qo(e)||MN.has(e)||AN.test(e)}function to(e){return Ll(e,"length",KN)}function qo(e){return!!e&&!Number.isNaN(Number(e))}function cu(e){return Ll(e,"number",qo)}function ss(e){return!!e&&Number.isInteger(Number(e))}function zN(e){return e.endsWith("%")&&qo(e.slice(0,-1))}function ve(e){return N_.test(e)}function no(e){return DN.test(e)}const FN=new Set(["length","size","percentage"]);function BN(e){return Ll(e,FN,b_)}function WN(e){return Ll(e,"position",b_)}const UN=new Set(["image","url"]);function VN(e){return Ll(e,UN,YN)}function HN(e){return Ll(e,"",GN)}function as(){return!0}function Ll(e,t,n){const r=N_.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function KN(e){return LN.test(e)}function b_(){return!1}function GN(e){return IN.test(e)}function YN(e){return jN.test(e)}function XN(){const e=We("colors"),t=We("spacing"),n=We("blur"),r=We("brightness"),o=We("borderColor"),i=We("borderRadius"),l=We("borderSpacing"),s=We("borderWidth"),a=We("contrast"),u=We("grayscale"),c=We("hueRotate"),d=We("invert"),f=We("gap"),h=We("gradientColorStops"),g=We("gradientColorStopPositions"),m=We("inset"),S=We("margin"),v=We("opacity"),y=We("padding"),x=We("saturate"),_=We("scale"),E=We("sepia"),$=We("skew"),C=We("space"),T=We("translate"),M=()=>["auto","contain","none"],R=()=>["auto","hidden","clip","visible","scroll"],j=()=>["auto",ve,t],F=()=>[ve,t],ae=()=>["",Vn,to],H=()=>["auto",qo,ve],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],P=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],k=()=>["start","end","center","between","around","evenly","stretch"],I=()=>["","0",ve],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[qo,cu],te=()=>[qo,ve];return{cacheSize:500,separator:":",theme:{colors:[as],spacing:[Vn,to],blur:["none","",no,ve],brightness:V(),borderColor:[e],borderRadius:["none","","full",no,ve],borderSpacing:F(),borderWidth:ae(),contrast:V(),grayscale:I(),hueRotate:te(),invert:I(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[zN,to],inset:j(),margin:j(),opacity:V(),padding:F(),saturate:V(),scale:V(),sepia:I(),skew:te(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[no]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),ve]}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ss,ve]}],basis:[{basis:j()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:I()}],shrink:[{shrink:I()}],order:[{order:["first","last","none",ss,ve]}],"grid-cols":[{"grid-cols":[as]}],"col-start-end":[{col:["auto",{span:["full",ss,ve]},ve]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[as]}],"row-start-end":[{row:["auto",{span:[ss,ve]},ve]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",ve,t]}],"min-w":[{"min-w":["min","max","fit",ve,Vn]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[no]},no,ve]}],h:[{h:[ve,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Vn,ve]}],"max-h":[{"max-h":[ve,t,"min","max","fit"]}],"font-size":[{text:["base",no,to]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",cu]}],"font-family":[{font:[as]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ve]}],"line-clamp":[{"line-clamp":["none",qo,cu]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vn,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...P(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vn,to]}],"underline-offset":[{"underline-offset":["auto",Vn,ve]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),WN]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",BN]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},VN]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...P(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:P()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...P()]}],"outline-offset":[{"outline-offset":[Vn,ve]}],"outline-w":[{outline:[Vn,to]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ae()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[Vn,to]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",no,HN]}],"shadow-color":[{shadow:[as]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":O()}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[a]}],"drop-shadow":[{"drop-shadow":["","none",no,ve]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[a]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[_]}],"scale-x":[{"scale-x":[_]}],"scale-y":[{"scale-y":[_]}],rotate:[{rotate:[ss,ve]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Vn,to,cu]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const QN=ON(XN);function ot(...e){return QN(xN(e))}const Os=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(E_,{ref:r,className:ot("relative overflow-hidden",e),...n,children:[w.jsx(vN,{className:"h-full w-full rounded-[inherit]",children:t}),w.jsx(R_,{}),w.jsx(yN,{})]}));Os.displayName=E_.displayName;const R_=p.forwardRef(({className:e,orientation:t="vertical",...n},r)=>w.jsx(g_,{ref:r,orientation:t,className:ot("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:w.jsx(dN,{className:ot("relative rounded-full bg-border",t==="vertical"&&"flex-1")})}));R_.displayName=g_.displayName;function As({children:e}){const t=p.useRef(null),n=p.useRef(null),r=p.useRef(!1),o=p.useRef(0),i=p.useRef(null),l=p.useRef(0),s=()=>{r.current=!1,i.current=null,o.current=0,l.current=0},a=S=>{S.preventDefault();const v=i.current==="left"?t:n;if(v.current&&r.current){const y=i.current==="left"?S.screenX-o.current:o.current-S.screenX;v.current.style.width=`${Math.max(l.current+y,150)}px`}},u=S=>v=>{if(v.target){const x=S==="left"?t:S==="right"?n:null;r.current=!0,x&&x.current&&(o.current=v.screenX,i.current=S,x.current&&(l.current=x.current.offsetWidth))}},[c,d,f,h,g,m]=p.Children.toArray(e);return p.useEffect(()=>(document.addEventListener("mouseup",s),document.addEventListener("mousemove",a),()=>{document.removeEventListener("mouseup",s),document.removeEventListener("mousemove",a)}),[]),w.jsxs("div",{className:"flex h-screen",children:[w.jsxs("div",{ref:t,className:"relative border-r border-border",style:{width:300},children:[w.jsxs(As.Column,{children:[c,w.jsx(Os,{style:{height:"calc(100vh - 50px)"},children:d})]}),w.jsx("div",{className:"absolute inset-y-0 right-0 cursor-col-resize w-[1px] hover:w-[3px] h-full hover:bg-border",onMouseDown:u("left")})]}),w.jsx("div",{className:rd("",{"w-full":!g&&!m}),children:w.jsxs(As.Column,{children:[f,w.jsx(Os,{style:{height:"calc(100vh - 50px)"},children:h})]})}),g||m&&w.jsxs("div",{ref:n,className:"relative h-screen border-l border-border",style:{width:300},children:[w.jsxs(As.Column,{children:[g,w.jsx(Os,{style:{height:"calc(100vh - 50px)"},children:m})]}),w.jsx("div",{onMouseDown:u("right"),className:"absolute inset-y-0 left-0 cursor-col-resize w-[1px] bg-border hover:w-[3px] hover:bg-border"})]})]})}As.Column=({children:e})=>{const[t,n]=p.Children.toArray(e);return w.jsxs("div",{className:"flex flex-col",children:[w.jsx("div",{className:"flex items-center border-b border-border",children:t}),n]})};const JN=({className:e})=>w.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 9 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsxs("g",{clipPath:"url(#clip0_1225_1638)",children:[w.jsx("rect",{y:"0.5",width:"9",height:"9"}),w.jsx("path",{d:"M0 7L8.5 5",stroke:"currentColor"}),w.jsx("circle",{cx:"3",cy:"3.5",r:"1",fill:"currentColor"})]}),w.jsx("rect",{x:"0.5",y:"1",width:"8",height:"8",stroke:"currentColor"}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1225_1638",children:w.jsx("rect",{y:"0.5",width:"9",height:"9",fill:"white"})})})]}),P_=JN,ZN=({className:e})=>w.jsxs("svg",{width:"9",height:"10",viewBox:"0 0 9 10",className:e,fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[w.jsxs("g",{clipPath:"url(#clip0_1222_1618)",children:[w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 1.5H0V0.5H9V1.5Z",fill:"currentColor"}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9 9.5H0V8.5H9V9.5Z",fill:"currentColor"})]}),w.jsx("defs",{children:w.jsx("clipPath",{id:"clip0_1222_1618",children:w.jsx("rect",{width:"9",height:"9",fill:"white",transform:"translate(0 0.5)"})})})]}),qN=ZN,eb=({className:e})=>w.jsx("svg",{width:"9",height:"10",viewBox:"0 0 9 10",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",className:e,children:w.jsx("g",{clipPath:"url(#clip0_1229_1625)",children:w.jsx("path",{d:"M0.0145513 0.5H8.98545L9 3.18569H8.57074C8.43007 2.2276 8.02749 1.57948 7.36298 1.24133C6.98949 1.05491 6.43169 0.953035 5.68957 0.935694V7.94581C5.68957 8.43569 5.78416 8.76084 5.97332 8.92124C6.16734 9.08165 6.5675 9.16185 7.17381 9.16185V9.5H1.86257V9.16185C2.44462 9.16185 2.83023 9.08165 3.0194 8.92124C3.21342 8.7565 3.31043 8.43136 3.31043 7.94581V0.935694C2.58286 0.953035 2.02506 1.05491 1.63703 1.24133C0.92401 1.58815 0.521423 2.23627 0.429264 3.18569H0L0.0145513 0.5Z"})})}),tb=eb;function O_({children:e,rootPath:t}){return w.jsx("div",{className:"flex flex-col w-full py-2 text-xs",children:p.Children.map(e,n=>p.cloneElement(n,{paths:[t]}))})}O_.Node=({children:e,paths:t=[],path:n,level:r=1,type:o,setActivePath:i})=>{const l=r*30,s=o==="string"?w.jsx(tb,{}):o==="image"?w.jsx(P_,{className:"h-[9px] w-[9px]"}):w.jsx(qN,{});return w.jsxs("div",{className:"w-full",children:[w.jsx("button",{className:"flex justify-between w-full group py-2 text-xs font-[400] shrink-0",onClick:()=>{i&&i(n)},style:{paddingLeft:l},children:w.jsxs("div",{className:"flex items-center justify-center gap-2",children:[s,w.jsx("p",{children:n})]})}),e&&w.jsx(w.Fragment,{children:p.Children.map(e,a=>p.cloneElement(a,{level:r+1,paths:[...t,n]}))})]})};var ln={},D={};let ld={},A_={},ca={},Ms={},Lh={},cl={},Rg={},Ih={},da={},fa={},go={},Pg={},Og={},M_={},D_={},L_={},I_={},j_={},z_={},F_={},pc={},B_={},W_={},U_={},V_={},H_={},K_={},G_={},Y_={},X_={},Ag={},Mg={},jh={},Q_={},J_={},Z_={};function U(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let Gr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nb=Gr&&"documentMode"in document?document.documentMode:null,Wt=Gr&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),bo=Gr&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),gc=Gr&&"InputEvent"in window&&!nb?"getTargetRanges"in new window.InputEvent("input"):!1,Dg=Gr&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),sd=Gr&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,rb=Gr&&/^(?=.*Chrome).*/i.test(navigator.userAgent),Lg=Gr&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!rb,ad=Dg||sd||Lg?" ":"​",ob=bo?" ":ad,ib=/^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]/,lb=/^[^\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,oi={bold:1,code:16,highlight:128,italic:2,strikethrough:4,subscript:32,superscript:64,underline:8},sb={directionless:1,unmergeable:2},ny={center:2,end:6,justify:4,left:1,right:3,start:5},ab={2:"center",6:"end",4:"justify",1:"left",3:"right",5:"start"},ub={normal:0,segmented:2,token:1},cb={0:"normal",2:"segmented",1:"token"},zh=!1,Ig=0;function db(e){Ig=e.timeStamp}function ff(e,t,n){return t.__lexicalLineBreak===e||e[`__lexicalKey_${n._key}`]!==void 0}function fb(e){return e.getEditorState().read(()=>{let t=Ke();return t!==null?t.clone():null})}function q_(e,t,n){zh=!0;let r=100<performance.now()-Ig;try{kn(e,()=>{let o=Ke()||fb(e);var i=new Map,l=e.getRootElement(),s=e._editorState,a=e._blockCursorElement;let u=!1,c="";for(var d=0;d<t.length;d++){var f=t[d],h=f.type,g=f.target,m=Ma(g,s);if(!(m===null&&g!==l||Ve(m))){if(h==="characterData"){if(f=r&&Q(m))e:{f=o,h=g;var S=m;if(de(f)){var v=f.anchor.getNode();if(v.is(S)&&f.format!==v.getFormat()){f=!1;break e}}f=h.nodeType===3&&S.isAttached()}f&&(S=Er(e._window),h=f=null,S!==null&&S.anchorNode===g&&(f=S.anchorOffset,h=S.focusOffset),g=g.nodeValue,g!==null&&Ug(m,g,f,h,!1))}else if(h==="childList"){for(u=!0,h=f.addedNodes,S=0;S<h.length;S++){v=h[S];var y=lw(v),x=v.parentNode;x==null||v===a||y!==null||v.nodeName==="BR"&&ff(v,x,e)||(bo&&(y=v.innerText||v.nodeValue)&&(c+=y),x.removeChild(v))}if(f=f.removedNodes,h=f.length,0<h){for(S=0,v=0;v<h;v++)x=f[v],(x.nodeName==="BR"&&ff(x,g,e)||a===x)&&(g.appendChild(x),S++);h!==S&&(g===l&&(m=s._nodeMap.get("root")),i.set(g,m))}}}}if(0<i.size)for(let[_,E]of i)if(B(E))for(i=E.getChildrenKeys(),l=_.firstChild,s=0;s<i.length;s++)a=e.getElementByKey(i[s]),a!==null&&(l==null?(_.appendChild(a),l=a):l!==a&&_.replaceChild(a,l),l=l.nextSibling);else Q(E)&&E.markDirty();if(i=n.takeRecords(),0<i.length){for(l=0;l<i.length;l++)for(a=i[l],s=a.addedNodes,a=a.target,d=0;d<s.length;d++)m=s[d],g=m.parentNode,g==null||m.nodeName!=="BR"||ff(m,a,e)||g.removeChild(m);n.takeRecords()}o!==null&&(u&&(o.dirty=!0,vr(o)),bo&&cw(e)&&o.insertRawText(c))})}finally{zh=!1}}function ew(e){let t=e._observer;if(t!==null){let n=t.takeRecords();q_(e,n,t)}}function tw(e){Ig===0&&cd(e).addEventListener("textInput",db,!0),e._observer=new MutationObserver((t,n)=>{q_(e,t,n)})}function ry(e,t){let n=e.__mode,r=e.__format;e=e.__style;let o=t.__mode,i=t.__format;return t=t.__style,(n===null||n===o)&&(r===null||r===i)&&(e===null||e===t)}function oy(e,t){let n=e.mergeWithSibling(t),r=et()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function nw(e){if(e.__text===""&&e.isSimpleText()&&!e.isUnmergeable())e.remove();else{for(var t;(t=e.getPreviousSibling())!==null&&Q(t)&&t.isSimpleText()&&!t.isUnmergeable();)if(t.__text==="")t.remove();else{ry(t,e)&&(e=oy(t,e));break}for(var n;(n=e.getNextSibling())!==null&&Q(n)&&n.isSimpleText()&&!n.isUnmergeable();)if(n.__text==="")n.remove();else{ry(e,n)&&oy(e,n);break}}}function jg(e){return iy(e.anchor),iy(e.focus),e}function iy(e){for(;e.type==="element";){var t=e.getNode(),n=e.offset;if(n===t.getChildrenSize()?(t=t.getChildAtIndex(n-1),n=!0):(t=t.getChildAtIndex(n),n=!1),Q(t)){e.set(t.__key,n?t.getTextContentSize():0,"text");break}else if(!B(t))break;e.set(t.__key,n?t.getChildrenSize():0,"element")}}let hb=1,pb=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function zg(e){let t=document.activeElement;if(t===null)return!1;let n=t.nodeName;return Ve(Ma(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&t.__lexicalEditor==null)}function Aa(e,t,n){let r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!zg(t)&&Fg(t)===e}catch{return!1}}function Fg(e){for(;e!=null;){let t=e.__lexicalEditor;if(t!=null)return t;e=ud(e)}return null}function Fh(e){return e.isToken()||e.isSegmented()}function mc(e){for(;e!=null;){if(e.nodeType===3)return e;e=e.firstChild}return null}function rw(e,t,n){return t=oi[t],e&t&&(n===null||!(n&t))?e^t:n===null||n&t?e|t:e}function ow(e){return Q(e)||ma(e)||Ve(e)}function iw(e,t){if(t!=null)e.__key=t;else{Jt(),99<va&&U(14),t=et();var n=Cr(),r=""+hb++;n._nodeMap.set(r,e),B(e)?t._dirtyElements.set(r,!0):t._dirtyLeaves.add(r),t._cloneNotNeeded.add(r),t._dirtyType=1,e.__key=r}}function ii(e){var t=e.getParent();if(t!==null){let o=e.getWritable();t=t.getWritable();var n=e.getPreviousSibling();if(e=e.getNextSibling(),n===null)if(e!==null){var r=e.getWritable();t.__first=e.__key,r.__prev=null}else t.__first=null;else{if(r=n.getWritable(),e!==null){let i=e.getWritable();i.__prev=r.__key,r.__next=i.__key}else r.__next=null;o.__prev=null}e===null?n!==null?(e=n.getWritable(),t.__last=n.__key,e.__next=null):t.__last=null:(e=e.getWritable(),n!==null?(n=n.getWritable(),n.__next=e.__key,e.__prev=n.__key):e.__prev=null,o.__next=null),t.__size--,o.__parent=null}}function vc(e){99<va&&U(14);var t=e.getLatest(),n=t.__parent,r=Cr();let o=et(),i=r._nodeMap;if(r=o._dirtyElements,n!==null)e:for(;n!==null;){if(r.has(n))break e;let l=i.get(n);if(l===void 0)break;r.set(n,!1),n=l.__parent}t=t.__key,o._dirtyType=1,B(e)?r.set(t,!0):o._dirtyLeaves.add(t)}function Mt(e){Jt();var t=et();let n=t._compositionKey;e!==n&&(t._compositionKey=e,n!==null&&(t=$t(n),t!==null&&t.getWritable()),e!==null&&(e=$t(e),e!==null&&e.getWritable()))}function mo(){return Bl()?null:et()._compositionKey}function $t(e,t){return e=(t||Cr())._nodeMap.get(e),e===void 0?null:e}function lw(e,t){let n=et();return e=e[`__lexicalKey_${n._key}`],e!==void 0?$t(e,t):null}function Ma(e,t){for(;e!=null;){let n=lw(e,t);if(n!==null)return n;e=ud(e)}return null}function sw(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t}function ly(e){return e.read(()=>Sr().getTextContent())}function gb(e,t){kn(e,()=>{var n=Cr();if(!n.isEmpty())if(t==="root")Sr().markDirty();else{n=n._nodeMap;for(let[,r]of n)r.markDirty()}},e._pendingEditorState===null?{tag:"history-merge"}:void 0)}function Sr(){return Cr()._nodeMap.get("root")}function vr(e){Jt();let t=Cr();e!==null&&(e.dirty=!0,e._cachedNodes=null),t._selection=e}function el(e){var t=et(),n;e:{for(n=e;n!=null;){let r=n[`__lexicalKey_${t._key}`];if(r!==void 0){n=r;break e}n=ud(n)}n=null}return n===null?(t=t.getRootElement(),e===t?$t("root"):null):$t(n)}function aw(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Bg(e){let t=[];for(;e!==null;)t.push(e),e=e._parentEditor;return t}function uw(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5)}function Wg(e,t,n){if(t=Er(t._window),t!==null){var r=t.anchorNode,{anchorOffset:o,focusOffset:i}=t;if(r!==null&&(t=r.nodeType===3?r.nodeValue:null,r=Ma(r),t!==null&&Q(r))){if(t===ad&&n){let l=n.length;t=n,i=o=l}t!==null&&Ug(r,t,o,i,e)}}}function Ug(e,t,n,r,o){let i=e;if(i.isAttached()&&(o||!i.isDirty())){let u=i.isComposing(),c=t;if((u||o)&&t[t.length-1]===ad&&(c=t.slice(0,-1)),t=i.getTextContent(),o||c!==t)if(c==="")if(Mt(null),Dg||sd||Lg)i.remove();else{let d=et();setTimeout(()=>{d.update(()=>{i.isAttached()&&i.remove()})},20)}else{o=i.getParent(),t=Fl();var l=i.getTextContentSize(),s=mo(),a=i.getKey();i.isToken()||s!==null&&a===s&&!u||de(t)&&(o!==null&&!o.canInsertTextBefore()&&t.anchor.offset===0||t.anchor.key===e.__key&&t.anchor.offset===0&&!i.canInsertTextBefore()||t.focus.key===e.__key&&t.focus.offset===l&&!i.canInsertTextAfter())?i.markDirty():(e=Ke(),de(e)&&n!==null&&r!==null&&(e.setTextNodeRange(i,n,i,r),i.isSegmented()&&(n=i.getTextContent(),n=Et(n),i.replace(n),i=n)),i.setTextContent(c))}}}function mb(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;e=e.anchor.offset;let n=t.getParentOrThrow(),r=t.isToken();return e===0?((e=!t.canInsertTextBefore()||!n.canInsertTextBefore()||r)||(t=t.getPreviousSibling(),e=(Q(t)||B(t)&&t.isInline())&&!t.canInsertTextAfter()),e):e===t.getTextContentSize()?!t.canInsertTextAfter()||!n.canInsertTextAfter()||r:!1}function Ds(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});let n=e.__lexicalClassNameCache,r=n[t];return r!==void 0?r:(e=e[t],typeof e=="string"?(e=e.split(" "),n[t]=e):e)}function Vg(e,t,n,r,o){n.size!==0&&(n=r.__type,r=r.__key,t=t.get(n),t===void 0&&U(33,n),n=t.klass,t=e.get(n),t===void 0&&(t=new Map,e.set(n,t)),e=t.get(r),n=e==="destroyed"&&o==="created",(e===void 0||n)&&t.set(r,n?"updated":o))}function sy(e,t,n){let r=e.getParent(),o=n;return r!==null&&(t&&n===0?(o=e.getIndexWithinParent(),e=r):t||n!==e.getChildrenSize()||(o=e.getIndexWithinParent()+1,e=r)),e.getChildAtIndex(t?o-1:o)}function Bh(e,t){var n=e.offset;return e.type==="element"?(e=e.getNode(),sy(e,t,n)):(e=e.getNode(),t&&n===0||!t&&n===e.getTextContentSize()?(n=t?e.getPreviousSibling():e.getNextSibling(),n===null?sy(e.getParentOrThrow(),t,e.getIndexWithinParent()+(t?0:1)):n):null)}function cw(e){return e=(e=cd(e).event)&&e.inputType,e==="insertFromPaste"||e==="insertFromPasteAsQuotation"}function yc(e){return!qt(e)&&!e.isLastChild()&&!e.isInline()}function xc(e,t){return e=e._keyToDOMMap.get(t),e===void 0&&U(75,t),e}function ud(e){return e=e.assignedSlot||e.parentElement,e!==null&&e.nodeType===11?e.host:e}function _c(e,t){for(e=e.getParent();e!==null;){if(e.is(t))return!0;e=e.getParent()}return!1}function cd(e){return e=e._window,e===null&&U(78),e}function dw(e){for(e=e.getParentOrThrow();e!==null&&!Jn(e);)e=e.getParentOrThrow();return e}function Jn(e){return qt(e)||B(e)&&e.isShadowRoot()}function fw(e){return e=e.constructor.clone(e),iw(e,null),e}function Da(e){var t=et();let n=e.constructor.getType();return t=t._nodes.get(n),t===void 0&&U(97),t=t.replace,t!==null?(t=t(e),t instanceof e.constructor||U(98),t):e}function hf(e,t){e=e.getParent(),!qt(e)||B(t)||Ve(t)||U(99)}function pf(e){return(Ve(e)||B(e)&&!e.canBeEmpty())&&!e.isInline()}function Wh(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null,t=e.parentElement,t!==null&&t.removeChild(e)}function Er(e){return Gr?(e||window).getSelection():null}function hw(e,t){let n=e.getChildAtIndex(t);n==null&&(n=e),Jn(e)&&U(102);let r=l=>{const s=l.getParentOrThrow(),a=Jn(s),u=l!==n||a?fw(l):l;if(a)return l.insertAfter(u),[l,u,u];const[c,d,f]=r(s);return l=l.getNextSiblings(),f.append(u,...l),[c,d,u]},[o,i]=r(n);return[o,i]}function wc(e,t){for(;e!==Sr()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}function vb(e){let t=[],n=[e];for(;0<n.length;){let r=n.pop();r===void 0&&U(112),B(r)&&n.unshift(...r.getChildren()),r!==e&&t.push(r)}return t}function dd(e){return e.nodeType===1}function pw(e,t,n,r,o,i){for(e=e.getFirstChild();e!==null;){let l=e.__key;e.__parent===t&&(B(e)&&pw(e,l,n,r,o,i),n.has(l)||i.delete(l),o.push(l)),e=e.getNextSibling()}}function yb(e,t,n,r){e=e._nodeMap,t=t._nodeMap;let o=[];for(let[i]of r){let l=t.get(i);l===void 0||l.isAttached()||(B(l)&&pw(l,i,e,t,o,r),e.has(i)||r.delete(i),o.push(i))}for(let i of o)t.delete(i);for(let i of n)r=t.get(i),r===void 0||r.isAttached()||(e.has(i)||n.delete(i),t.delete(i))}let gt="",Qt="",Or="",Ro,Ht,ha,gw=!1,Hg=!1,fd,Du=null,Uh,Vh,fi,Po,Hh,pa;function Lu(e,t){let n=fi.get(e);if(t!==null){let r=Yh(e);r.parentNode===t&&t.removeChild(r)}Po.has(e)||Ht._keyToDOMMap.delete(e),B(n)&&(e=Sc(n,fi),Kh(e,0,e.length-1,null)),n!==void 0&&Vg(pa,ha,fd,n,"destroyed")}function Kh(e,t,n,r){for(;t<=n;++t){let o=e[t];o!==void 0&&Lu(o,r)}}function Ho(e,t){e.setProperty("text-align",t)}function mw(e,t){var n=Ro.theme.indent;if(typeof n=="string"){let r=e.classList.contains(n);0<t&&!r?e.classList.add(n):1>t&&r&&e.classList.remove(n)}n=getComputedStyle(e).getPropertyValue("--lexical-indent-base-value")||"40px",e.style.setProperty("padding-inline-start",t===0?"":`calc(${t} * ${n})`)}function vw(e,t){e=e.style,t===0?Ho(e,""):t===1?Ho(e,"left"):t===2?Ho(e,"center"):t===3?Ho(e,"right"):t===4?Ho(e,"justify"):t===5?Ho(e,"start"):t===6&&Ho(e,"end")}function Iu(e,t,n){let r=Po.get(e);r===void 0&&U(60);let o=r.createDOM(Ro,Ht);var i=Ht._keyToDOMMap;if(o["__lexicalKey_"+Ht._key]=e,i.set(e,o),Q(r)?o.setAttribute("data-lexical-text","true"):Ve(r)&&o.setAttribute("data-lexical-decorator","true"),B(r)){if(e=r.__indent,i=r.__size,e!==0&&mw(o,e),i!==0){--i,e=Sc(r,Po);var l=Qt;Qt="",Gh(e,r,0,i,o,null),xw(r,o),Qt=l}e=r.__format,e!==0&&vw(o,e),r.isInline()||yw(null,r,o),yc(r)&&(gt+=`
48
+
49
+ `,Or+=`
50
+
51
+ `)}else i=r.getTextContent(),Ve(r)?(l=r.decorate(Ht,Ro),l!==null&&_w(e,l),o.contentEditable="false"):Q(r)&&(r.isDirectionless()||(Qt+=i)),gt+=i,Or+=i;return t!==null&&(n!=null?t.insertBefore(o,n):(n=t.__lexicalLineBreak,n!=null?t.insertBefore(o,n):t.appendChild(o))),Vg(pa,ha,fd,r,"created"),o}function Gh(e,t,n,r,o,i){let l=gt;for(gt="";n<=r;++n)Iu(e[n],o,i);yc(t)&&(gt+=`
52
+
53
+ `),o.__lexicalTextContent=gt,gt=l+gt}function ay(e,t){return e=t.get(e),ma(e)||Ve(e)&&e.isInline()}function yw(e,t,n){e=e!==null&&(e.__size===0||ay(e.__last,fi)),t=t.__size===0||ay(t.__last,Po),e?t||(t=n.__lexicalLineBreak,t!=null&&n.removeChild(t),n.__lexicalLineBreak=null):t&&(t=document.createElement("br"),n.__lexicalLineBreak=t,n.appendChild(t))}function xw(e,t){var n=t.__lexicalDir;if(t.__lexicalDirTextContent!==Qt||n!==Du){let i=Qt==="";if(i)var r=Du;else r=Qt,r=ib.test(r)?"rtl":lb.test(r)?"ltr":null;if(r!==n){let l=t.classList,s=Ro.theme;var o=n!==null?s[n]:void 0;let a=r!==null?s[r]:void 0;o!==void 0&&(typeof o=="string"&&(o=o.split(" "),o=s[n]=o),l.remove(...o)),r===null||i&&r==="ltr"?t.removeAttribute("dir"):(a!==void 0&&(typeof a=="string"&&(n=a.split(" "),a=s[r]=n),a!==void 0&&l.add(...a)),t.dir=r),Hg||(e.getWritable().__dir=r)}Du=r,t.__lexicalDirTextContent=Qt,t.__lexicalDir=r}}function Sc(e,t){let n=[];for(e=e.__first;e!==null;){let r=t.get(e);r===void 0&&U(101),n.push(e),e=r.__next}return n}function ys(e,t){var n=fi.get(e),r=Po.get(e);n!==void 0&&r!==void 0||U(61);var o=gw||Vh.has(e)||Uh.has(e);let i=xc(Ht,e);if(n===r&&!o)return B(n)?(r=i.__lexicalTextContent,r!==void 0&&(gt+=r,Or+=r),r=i.__lexicalDirTextContent,r!==void 0&&(Qt+=r)):(r=n.getTextContent(),Q(n)&&!n.isDirectionless()&&(Qt+=r),Or+=r,gt+=r),i;if(n!==r&&o&&Vg(pa,ha,fd,r,"updated"),r.updateDOM(n,i,Ro))return r=Iu(e,null,null),t===null&&U(62),t.replaceChild(r,i),Lu(e,null),r;if(B(n)&&B(r)){if(e=r.__indent,e!==n.__indent&&mw(i,e),e=r.__format,e!==n.__format&&vw(i,e),o){e=r,o=Qt,Qt="",t=gt;var l=n.__size,s=e.__size;if(gt="",l===1&&s===1){var a=n.__first,u=e.__first;if(a===u)ys(a,i);else{var c=Yh(a);u=Iu(u,null,null),i.replaceChild(u,c),Lu(a,null)}}else{u=Sc(n,fi);var d=Sc(e,Po);if(l===0)s!==0&&Gh(d,e,0,s-1,i,null);else if(s===0)l!==0&&(a=i.__lexicalLineBreak==null,Kh(u,0,l-1,a?null:i),a&&(i.textContent=""));else{var f=u;u=d,d=l-1,l=s-1;let g=i.firstChild,m=0;for(s=0;m<=d&&s<=l;){var h=f[m];let S=u[s];if(h===S)g=gf(ys(S,i)),m++,s++;else{a===void 0&&(a=new Set(f)),c===void 0&&(c=new Set(u));let v=c.has(h),y=a.has(S);v?(y?(h=xc(Ht,S),h===g?g=gf(ys(S,i)):(g!=null?i.insertBefore(h,g):i.appendChild(h),ys(S,i)),m++):Iu(S,i,g),s++):(g=gf(Yh(h)),Lu(h,i),m++)}}a=m>d,c=s>l,a&&!c?(a=u[l+1],a=a===void 0?null:Ht.getElementByKey(a),Gh(u,e,s,l,i,a)):c&&!a&&Kh(f,m,d,i)}}yc(e)&&(gt+=`
54
+
55
+ `),i.__lexicalTextContent=gt,gt=t+gt,xw(e,i),Qt=o,qt(r)||r.isInline()||yw(n,r,i)}yc(r)&&(gt+=`
56
+
57
+ `,Or+=`
58
+
59
+ `)}else n=r.getTextContent(),Ve(r)?(o=r.decorate(Ht,Ro),o!==null&&_w(e,o)):Q(r)&&!r.isDirectionless()&&(Qt+=n),gt+=n,Or+=n;return!Hg&&qt(r)&&r.__cachedText!==Or&&(r=r.getWritable(),r.__cachedText=Or),i}function _w(e,t){let n=Ht._pendingDecorators,r=Ht._decorators;if(n===null){if(r[e]===t)return;n=sw(Ht)}n[e]=t}function gf(e){return e=e.nextSibling,e!==null&&e===Ht._blockCursorElement&&(e=e.nextSibling),e}function Yh(e){let t=Hh.get(e);return t===void 0&&U(75,e),t}let Tr=Object.freeze({}),Xh=[["keydown",kb],["pointerdown",_b],["compositionstart",Cb],["compositionend",$b],["input",Eb],["click",xb],["cut",Tr],["copy",Tr],["dragstart",Tr],["dragover",Tr],["dragend",Tr],["paste",Tr],["focus",Tr],["blur",Tr],["drop",Tr]];gc&&Xh.push(["beforeinput",(e,t)=>Sb(e,t)]);let ga=0,ww=0,Sw=0,Bi=null,Ls=0,Qh=!1,Jh=!1,Is=!1,xs=!1,Ew=[0,"",0,"root",0];function Cw(e,t,n,r,o){let i=e.anchor,l=e.focus,s=i.getNode();var a=et();let u=Er(a._window),c=u!==null?u.anchorNode:null,d=i.key;a=a.getElementByKey(d);let f=n.length;return d!==l.key||!Q(s)||(!o&&(!gc||Sw<r+50)||s.isDirty()&&2>f||aw(n))&&i.offset!==l.offset&&!s.isComposing()||Fh(s)||s.isDirty()&&1<f||(o||!gc)&&a!==null&&!s.isComposing()&&c!==mc(a)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||s.getFormat()!==e.format||s.getStyle()!==e.style||mb(e,s)}function uy(e,t){return e!==null&&e.nodeValue!==null&&e.nodeType===3&&t!==0&&t!==e.nodeValue.length}function cy(e,t,n){let{anchorNode:r,anchorOffset:o,focusNode:i,focusOffset:l}=e;Qh&&(Qh=!1,uy(r,o)&&uy(i,l))||kn(t,()=>{if(!n)vr(null);else if(Aa(t,r,i)){var s=Ke();if(de(s)){var a=s.anchor,u=a.getNode();if(s.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(s.dirty=!0);var c=cd(t).event;c=c?c.timeStamp:performance.now();let[d,f,h,g,m]=Ew;c<m+200&&a.offset===h&&a.key===g?(s.format=d,s.style=f):a.type==="text"?(s.format=u.getFormat(),s.style=u.getStyle()):a.type==="element"&&(s.format=0,s.style="")}else{a=255,u=!1,c=s.getNodes();let d=c.length;for(let f=0;f<d;f++){let h=c[f];if(Q(h)&&(u=!0,a&=h.getFormat(),a===0))break}s.format=u?a:0}}Y(t,ld,void 0)}})}function xb(e,t){kn(t,()=>{let n=Ke();var r=Er(t._window);let o=Fl();if(r)if(de(n)){let l=n.anchor;var i=l.getNode();l.type==="element"&&l.offset===0&&n.isCollapsed()&&!qt(i)&&Sr().getChildrenSize()===1&&i.getTopLevelElementOrThrow().isEmpty()&&o!==null&&n.is(o)?(r.removeAllRanges(),n.dirty=!0):e.detail!==3||n.isCollapsed()||(r=n.focus.getNode(),i!==r&&(B(i)?i.select(0):i.getParentOrThrow().select(0)))}else e.pointerType==="touch"&&(i=r.anchorNode,i!==null&&(i=i.nodeType,i===1||i===3))&&(r=Gg(o,r,t),vr(r));Y(t,A_,e)})}function _b(e,t){let n=e.target;e=e.pointerType,n instanceof Node&&e!=="touch"&&kn(t,()=>{Ve(Ma(n))||(Jh=!0)})}function $w(e){return e.getTargetRanges?(e=e.getTargetRanges(),e.length===0?null:e[0]):null}function wb(e,t){return e!==t||B(e)||B(t)||!e.isToken()||!t.isToken()}function Sb(e,t){let n=e.inputType,r=$w(e);n==="deleteCompositionText"||bo&&cw(t)||n!=="insertCompositionText"&&kn(t,()=>{let o=Ke();if(n==="deleteContentBackward"){if(o===null){var i=Fl();if(!de(i))return;vr(i.clone())}if(de(o)){ww===229&&e.timeStamp<ga+30&&t.isComposing()&&o.anchor.key===o.focus.key?(Mt(null),ga=0,setTimeout(()=>{kn(t,()=>{Mt(null)})},30),de(o)&&(i=o.anchor.getNode(),i.markDirty(),o.format=i.getFormat(),o.style=i.getStyle())):(e.preventDefault(),Y(t,ca,!0));return}}if(de(o)){i=e.data,Bi!==null&&Wg(!1,t,Bi),o.dirty&&Bi===null||!o.isCollapsed()||qt(o.anchor.getNode())||r===null||o.applyDOMRange(r),Bi=null;var l=o.focus,s=o.anchor.getNode();if(l=l.getNode(),n==="insertText"||n==="insertTranspose")i===`
60
+ `?(e.preventDefault(),Y(t,Ms,!1)):i===`
61
+
62
+ `?(e.preventDefault(),Y(t,Lh,void 0)):i==null&&e.dataTransfer?(i=e.dataTransfer.getData("text/plain"),e.preventDefault(),o.insertRawText(i)):i!=null&&Cw(o,r,i,e.timeStamp,!0)?(e.preventDefault(),Y(t,cl,i)):Bi=i,Sw=e.timeStamp;else switch(e.preventDefault(),n){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":Y(t,cl,e);break;case"insertFromComposition":Mt(null),Y(t,cl,e);break;case"insertLineBreak":Mt(null),Y(t,Ms,!1);break;case"insertParagraph":Mt(null),Is&&!sd?(Is=!1,Y(t,Ms,!1)):Y(t,Lh,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":Y(t,Rg,e);break;case"deleteByComposition":wb(s,l)&&Y(t,Ih,e);break;case"deleteByDrag":case"deleteByCut":Y(t,Ih,e);break;case"deleteContent":Y(t,ca,!1);break;case"deleteWordBackward":Y(t,da,!0);break;case"deleteWordForward":Y(t,da,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":Y(t,fa,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":Y(t,fa,!1);break;case"formatStrikeThrough":Y(t,go,"strikethrough");break;case"formatBold":Y(t,go,"bold");break;case"formatItalic":Y(t,go,"italic");break;case"formatUnderline":Y(t,go,"underline");break;case"historyUndo":Y(t,Pg,void 0);break;case"historyRedo":Y(t,Og,void 0)}}})}function Eb(e,t){e.stopPropagation(),kn(t,()=>{var n=Ke(),r=e.data,o=$w(e);if(r!=null&&de(n)&&Cw(n,o,r,e.timeStamp,!1)){xs&&(Zh(t,r),xs=!1);var i=n.anchor,l=i.getNode();if(o=Er(t._window),o===null)return;let s=i.offset;(i=gc&&!n.isCollapsed()&&Q(l)&&o.anchorNode!==null)&&(l=l.getTextContent().slice(0,s)+r+l.getTextContent().slice(s+n.focus.offset),o=o.anchorNode,i=l===(o.nodeType===3?o.nodeValue:null)),i||Y(t,cl,r),r=r.length,bo&&1<r&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=r),Dg||sd||Lg||!t.isComposing()||(ga=0,Mt(null))}else Wg(!1,t,r!==null?r:void 0),xs&&(Zh(t,r||void 0),xs=!1);Jt(),n=et(),ew(n)}),Bi=null}function Cb(e,t){kn(t,()=>{let n=Ke();if(de(n)&&!t.isComposing()){let r=n.anchor,o=n.anchor.getNode();Mt(r.key),(e.timeStamp<ga+30||r.type==="element"||!n.isCollapsed()||o.getFormat()!==n.format||o.getStyle()!==n.style)&&Y(t,cl,ob)}})}function Zh(e,t){var n=e._compositionKey;if(Mt(null),n!==null&&t!=null){if(t===""){t=$t(n),e=mc(e.getElementByKey(n)),e!==null&&e.nodeValue!==null&&Q(t)&&Ug(t,e.nodeValue,null,null,!0);return}if(t[t.length-1]===`
63
+ `&&(n=Ke(),de(n))){t=n.focus,n.anchor.set(t.key,t.offset,t.type),Y(e,pc,null);return}}Wg(!0,e,t)}function $b(e,t){bo?xs=!0:kn(t,()=>{Zh(t,e.data)})}function kb(e,t){if(ga=e.timeStamp,ww=e.keyCode,!t.isComposing()){var{keyCode:n,shiftKey:r,ctrlKey:o,metaKey:i,altKey:l}=e;if(!Y(t,M_,e)){if(n!==39||o||i||l)if(n!==39||l||r||!o&&!i)if(n!==37||o||i||l)if(n!==37||l||r||!o&&!i)if(n!==38||o||i)if(n!==40||o||i)if(n===13&&r)Is=!0,Y(t,pc,e);else if(n===32)Y(t,B_,e);else if(Wt&&o&&n===79)e.preventDefault(),Is=!0,Y(t,Ms,!0);else if(n!==13||r){var s=Wt?l||i?!1:n===8||n===72&&o:o||l||i?!1:n===8;s?n===8?Y(t,W_,e):(e.preventDefault(),Y(t,ca,!0)):n===27?Y(t,U_,e):(s=Wt?r||l||i?!1:n===46||n===68&&o:o||l||i?!1:n===46,s?n===46?Y(t,V_,e):(e.preventDefault(),Y(t,ca,!1)):n===8&&(Wt?l:o)?(e.preventDefault(),Y(t,da,!0)):n===46&&(Wt?l:o)?(e.preventDefault(),Y(t,da,!1)):Wt&&i&&n===8?(e.preventDefault(),Y(t,fa,!0)):Wt&&i&&n===46?(e.preventDefault(),Y(t,fa,!1)):n===66&&!l&&(Wt?i:o)?(e.preventDefault(),Y(t,go,"bold")):n===85&&!l&&(Wt?i:o)?(e.preventDefault(),Y(t,go,"underline")):n===73&&!l&&(Wt?i:o)?(e.preventDefault(),Y(t,go,"italic")):n!==9||l||o||i?n===90&&!r&&(Wt?i:o)?(e.preventDefault(),Y(t,Pg,void 0)):(s=Wt?n===90&&i&&r:n===89&&o||n===90&&o&&r,s?(e.preventDefault(),Y(t,Og,void 0)):zl(t._editorState._selection)?(s=r?!1:n===67?Wt?i:o:!1,s?(e.preventDefault(),Y(t,Ag,e)):(s=r?!1:n===88?Wt?i:o:!1,s?(e.preventDefault(),Y(t,Mg,e)):n===65&&(Wt?i:o)&&(e.preventDefault(),Y(t,jh,e)))):!bo&&n===65&&(Wt?i:o)&&(e.preventDefault(),Y(t,jh,e))):Y(t,H_,e))}else Is=!1,Y(t,pc,e);else Y(t,F_,e);else Y(t,z_,e);else Y(t,j_,e);else Y(t,I_,e);else Y(t,L_,e);else Y(t,D_,e);(o||r||l||i)&&Y(t,Z_,e)}}}function kw(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}let dl=new Map;function Tw(e){e=e.target;let t=Er(e==null?null:e.nodeType===9?e.defaultView:e.ownerDocument.defaultView);if(t!==null){var n=Fg(t.anchorNode);if(n!==null){Jh&&(Jh=!1,kn(n,()=>{var l=Fl(),s=t.anchorNode;s!==null&&(s=s.nodeType,s===1||s===3)&&(l=Gg(l,t,n),vr(l))})),e=Bg(n),e=e[e.length-1];var r=e._key,o=dl.get(r),i=o||e;i!==n&&cy(t,i,!1),cy(t,n,!0),n!==e?dl.set(r,n):o&&dl.delete(r)}}}function Tb(e,t){Ls===0&&e.ownerDocument.addEventListener("selectionchange",Tw),Ls++,e.__lexicalEditor=t;let n=kw(e);for(let r=0;r<Xh.length;r++){let[o,i]=Xh[r],l=typeof i=="function"?s=>{s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()&&i(s,t))}:s=>{if(s._lexicalHandled!==!0&&(s._lexicalHandled=!0,t.isEditable()))switch(o){case"cut":return Y(t,Mg,s);case"copy":return Y(t,Ag,s);case"paste":return Y(t,Rg,s);case"dragstart":return Y(t,G_,s);case"dragover":return Y(t,Y_,s);case"dragend":return Y(t,X_,s);case"focus":return Y(t,Q_,s);case"blur":return Y(t,J_,s);case"drop":return Y(t,K_,s)}};e.addEventListener(o,l),n.push(()=>{e.removeEventListener(o,l)})}}function qh(e,t,n){Jt();var r=e.__key;let o=e.getParent();if(o!==null){var i=Ke();if(de(i)&&B(e)){var{anchor:l,focus:s}=i,a=l.getNode(),u=s.getNode();_c(a,e)&&l.set(e.__key,0,"element"),_c(u,e)&&s.set(e.__key,0,"element")}if(a=i,u=!1,de(a)&&t){i=a.anchor;let c=a.focus;i.key===r&&(Cc(i,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0),c.key===r&&(Cc(c,e,o,e.getPreviousSibling(),e.getNextSibling()),u=!0)}else zl(a)&&t&&e.isSelected()&&e.selectPrevious();de(a)&&t&&!u?(r=e.getIndexWithinParent(),ii(e),Ec(a,o,r,-1)):ii(e),n||Jn(o)||o.canBeEmpty()||!o.isEmpty()||qh(o,t),t&&qt(o)&&o.isEmpty()&&o.selectEnd()}}class La{static getType(){U(64,this.name)}static clone(){U(65,this.name)}constructor(t){this.__type=this.constructor.getType(),this.__next=this.__prev=this.__parent=null,iw(this,t)}getType(){return this.__type}isAttached(){for(var t=this.__key;t!==null;){if(t==="root")return!0;if(t=$t(t),t===null)break;t=t.__parent}return!1}isSelected(t){if(t=t||Ke(),t==null)return!1;let n=t.getNodes().some(r=>r.__key===this.__key);return Q(this)?n:de(t)&&t.anchor.type==="element"&&t.focus.type==="element"&&t.anchor.key===t.focus.key&&t.anchor.offset===t.focus.offset?!1:n}getKey(){return this.__key}getIndexWithinParent(){var t=this.getParent();if(t===null)return-1;t=t.getFirstChild();let n=0;for(;t!==null;){if(this.is(t))return n;n++,t=t.getNextSibling()}return-1}getParent(){let t=this.getLatest().__parent;return t===null?null:$t(t)}getParentOrThrow(){let t=this.getParent();return t===null&&U(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){let n=t.getParent();if(Jn(n))return t;t=n}return null}getTopLevelElementOrThrow(){let t=this.getTopLevelElement();return t===null&&U(67,this.__key),t}getParents(){let t=[],n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){let t=[],n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){let t=this.getLatest().__prev;return t===null?null:$t(t)}getPreviousSiblings(){let t=[];var n=this.getParent();if(n===null)return t;for(n=n.getFirstChild();n!==null&&!n.is(this);)t.push(n),n=n.getNextSibling();return t}getNextSibling(){let t=this.getLatest().__next;return t===null?null:$t(t)}getNextSiblings(){let t=[],n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){let n=this.getParents();var r=t.getParents();B(this)&&n.unshift(this),B(t)&&r.unshift(t),t=n.length;var o=r.length;if(t===0||o===0||n[t-1]!==r[o-1])return null;for(r=new Set(r),o=0;o<t;o++){let i=n[o];if(r.has(i))return i}return null}is(t){return t==null?!1:this.__key===t.__key}isBefore(t){if(this===t)return!1;if(t.isParentOf(this))return!0;if(this.isParentOf(t))return!1;var n=this.getCommonAncestor(t);let r=this;for(;;){var o=r.getParentOrThrow();if(o===n){o=r.getIndexWithinParent();break}r=o}for(r=t;;){if(t=r.getParentOrThrow(),t===n){n=r.getIndexWithinParent();break}r=t}return o<n}isParentOf(t){let n=this.__key;if(n===t.__key)return!1;for(;t!==null;){if(t.__key===n)return!0;t=t.getParent()}return!1}getNodesBetween(t){let n=this.isBefore(t),r=[],o=new Set;for(var i=this;;){var l=i.__key;if(o.has(l)||(o.add(l),r.push(i)),i===t)break;if(l=B(i)?n?i.getFirstChild():i.getLastChild():null,l!==null)i=l;else if(l=n?i.getNextSibling():i.getPreviousSibling(),l!==null)i=l;else{if(i=i.getParentOrThrow(),o.has(i.__key)||r.push(i),i===t)break;l=i;do l===null&&U(68),i=n?l.getNextSibling():l.getPreviousSibling(),l=l.getParent(),l!==null&&(i!==null||o.has(l.__key)||r.push(l));while(i===null)}}return n||r.reverse(),r}isDirty(){let t=et()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){let t=$t(this.__key);return t===null&&U(113),t}getWritable(){Jt();var t=Cr(),n=et();t=t._nodeMap;let r=this.__key,o=this.getLatest(),i=o.__parent;n=n._cloneNotNeeded;var l=Ke();return l!==null&&(l._cachedNodes=null),n.has(r)?(vc(o),o):(l=o.constructor.clone(o),l.__parent=i,l.__next=o.__next,l.__prev=o.__prev,B(o)&&B(l)?(l.__first=o.__first,l.__last=o.__last,l.__size=o.__size,l.__indent=o.__indent,l.__format=o.__format,l.__dir=o.__dir):Q(o)&&Q(l)&&(l.__format=o.__format,l.__style=o.__style,l.__mode=o.__mode,l.__detail=o.__detail),n.add(r),l.__key=r,vc(l),t.set(r,l),l)}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(){U(70)}updateDOM(){U(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){U(72)}static importJSON(){U(18,this.name)}static transform(){return null}remove(t){qh(this,!0,t)}replace(t,n){Jt();var r=Ke();r!==null&&(r=r.clone()),hf(this,t);let o=this.getLatest(),i=this.__key,l=t.__key,s=t.getWritable();t=this.getParentOrThrow().getWritable();let a=t.__size;ii(s);let u=o.getPreviousSibling(),c=o.getNextSibling(),d=o.__prev,f=o.__next,h=o.__parent;return qh(o,!1,!0),u===null?t.__first=l:u.getWritable().__next=l,s.__prev=d,c===null?t.__last=l:c.getWritable().__prev=l,s.__next=f,s.__parent=h,t.__size=a,n&&this.getChildren().forEach(g=>{s.append(g)}),de(r)&&(vr(r),n=r.anchor,r=r.focus,n.key===i&&hy(n,s),r.key===i&&hy(r,s)),mo()===i&&Mt(l),s}insertAfter(t,n=!0){Jt(),hf(this,t);var r=this.getWritable();let o=t.getWritable();var i=o.getParent();let l=Ke();var s=!1,a=!1;if(i!==null){var u=t.getIndexWithinParent();ii(o),de(l)&&(a=i.__key,s=l.anchor,i=l.focus,s=s.type==="element"&&s.key===a&&s.offset===u+1,a=i.type==="element"&&i.key===a&&i.offset===u+1)}i=this.getNextSibling(),u=this.getParentOrThrow().getWritable();let c=o.__key,d=r.__next;return i===null?u.__last=c:i.getWritable().__prev=c,u.__size++,r.__next=c,o.__next=d,o.__prev=r.__key,o.__parent=r.__parent,n&&de(l)&&(n=this.getIndexWithinParent(),Ec(l,u,n+1),r=u.__key,s&&l.anchor.set(r,n+2,"element"),a&&l.focus.set(r,n+2,"element")),t}insertBefore(t,n=!0){Jt(),hf(this,t);var r=this.getWritable();let o=t.getWritable(),i=o.__key;ii(o);let l=this.getPreviousSibling(),s=this.getParentOrThrow().getWritable(),a=r.__prev,u=this.getIndexWithinParent();return l===null?s.__first=i:l.getWritable().__next=i,s.__size++,r.__prev=i,o.__prev=a,o.__next=r.__key,o.__parent=r.__parent,r=Ke(),n&&de(r)&&(n=this.getParentOrThrow(),Ec(r,n,u)),t}isParentRequired(){return!1}createParentElementNode(){return hi()}selectPrevious(t,n){Jt();let r=this.getPreviousSibling(),o=this.getParentOrThrow();return r===null?o.select(0,0):B(r)?r.select():Q(r)?r.select(t,n):(t=r.getIndexWithinParent()+1,o.select(t,t))}selectNext(t,n){Jt();let r=this.getNextSibling(),o=this.getParentOrThrow();return r===null?o.select():B(r)?r.select(0,0):Q(r)?r.select(t,n):(t=r.getIndexWithinParent(),o.select(t,t))}markDirty(){this.getWritable()}}class Il extends La{static getType(){return"linebreak"}static clone(t){return new Il(t.__key)}constructor(t){super(t)}getTextContent(){return`
64
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}static importDOM(){return{br:t=>{let n=t.parentElement,r,o;return n!==null&&((r=n.firstChild)===t||r.nextSibling===t&&r.nodeType===3&&(r.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)&&((o=n.lastChild)===t||o.previousSibling===t&&o.nodeType===3&&(o.textContent||"").match(/^( |\t|\r?\n)+$/)!==null)?null:{conversion:Nb,priority:0}}}}static importJSON(){return $l()}exportJSON(){return{type:"linebreak",version:1}}}function Nb(){return{node:$l()}}function $l(){return Da(new Il)}function ma(e){return e instanceof Il}function mf(e,t){return t&16?"code":t&128?"mark":t&32?"sub":t&64?"sup":null}function vf(e,t){return t&1?"strong":t&2?"em":"span"}function yf(e,t,n,r,o){e=r.classList,r=Ds(o,"base"),r!==void 0&&e.add(...r),r=Ds(o,"underlineStrikethrough");let i=!1,l=t&8&&t&4;var s=n&8&&n&4;r!==void 0&&(s?(i=!0,l||e.add(...r)):l&&e.remove(...r));for(let a in oi)s=oi[a],r=Ds(o,a),r!==void 0&&(n&s?!i||a!=="underline"&&a!=="strikethrough"?(!(t&s)||l&&a==="underline"||a==="strikethrough")&&e.add(...r):t&s&&e.remove(...r):t&s&&e.remove(...r))}function xf(e,t,n){let r=t.firstChild;if(n=n.isComposing(),e+=n?ad:"",r==null)t.textContent=e;else if(t=r.nodeValue,t!==e)if(n||bo){n=t.length;let o=e.length,i=0,l=0;for(;i<n&&i<o&&t[i]===e[i];)i++;for(;l+i<n&&l+i<o&&t[n-l-1]===e[o-l-1];)l++;e=[i,n-i-l,e.slice(i,o-l)];let[s,a,u]=e;a!==0&&r.deleteData(s,a),r.insertData(s,u)}else r.nodeValue=e}function du(e,t){return t=document.createElement(t),t.appendChild(e),t}class $i extends La{static getType(){return"text"}static clone(t){return new $i(t.__text,t.__key)}constructor(t,n){super(n),this.__text=t,this.__format=0,this.__style="",this.__detail=this.__mode=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){let t=this.getLatest();return cb[t.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===mo()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return(this.getLatest().__detail&1)!==0}isUnmergeable(){return(this.getLatest().__detail&2)!==0}hasFormat(t){return t=oi[t],(this.getFormat()&t)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(t,n){let r=this.getLatest().__format;return rw(r,t,n)}createDOM(t){var n=this.__format,r=mf(this,n);let o=vf(this,n),i=document.createElement(r===null?o:r),l=i;return this.hasFormat("code")&&i.setAttribute("spellcheck","false"),r!==null&&(l=document.createElement(o),i.appendChild(l)),r=l,xf(this.__text,r,this),t=t.theme.text,t!==void 0&&yf(o,0,n,r,t),n=this.__style,n!==""&&(i.style.cssText=n),i}updateDOM(t,n,r){let o=this.__text;var i=t.__format,l=this.__format,s=mf(this,i);let a=mf(this,l);var u=vf(this,i);let c=vf(this,l);return(s===null?u:s)!==(a===null?c:a)?!0:s===a&&u!==c?(i=n.firstChild,i==null&&U(48),t=s=document.createElement(c),xf(o,t,this),r=r.theme.text,r!==void 0&&yf(c,0,l,t,r),n.replaceChild(s,i),!1):(u=n,a!==null&&s!==null&&(u=n.firstChild,u==null&&U(49)),xf(o,u,this),r=r.theme.text,r!==void 0&&i!==l&&yf(c,i,l,u,r),l=this.__style,t.__style!==l&&(n.style.cssText=l),!1)}static importDOM(){return{"#text":()=>({conversion:Pb,priority:0}),b:()=>({conversion:Rb,priority:0}),code:()=>({conversion:ro,priority:0}),em:()=>({conversion:ro,priority:0}),i:()=>({conversion:ro,priority:0}),s:()=>({conversion:ro,priority:0}),span:()=>({conversion:bb,priority:0}),strong:()=>({conversion:ro,priority:0}),sub:()=>({conversion:ro,priority:0}),sup:()=>({conversion:ro,priority:0}),u:()=>({conversion:ro,priority:0})}}static importJSON(t){let n=Et(t.text);return n.setFormat(t.format),n.setDetail(t.detail),n.setMode(t.mode),n.setStyle(t.style),n}exportDOM(t){return{element:t}=super.exportDOM(t),t!==null&&dd(t)||U(132),t.style.whiteSpace="pre-wrap",this.hasFormat("bold")&&(t=du(t,"b")),this.hasFormat("italic")&&(t=du(t,"i")),this.hasFormat("strikethrough")&&(t=du(t,"s")),this.hasFormat("underline")&&(t=du(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),type:"text",version:1}}selectionTransform(){}setFormat(t){let n=this.getWritable();return n.__format=typeof t=="string"?oi[t]:t,n}setDetail(t){let n=this.getWritable();return n.__detail=typeof t=="string"?sb[t]:t,n}setStyle(t){let n=this.getWritable();return n.__style=t,n}toggleFormat(t){return t=oi[t],this.setFormat(this.getFormat()^t)}toggleDirectionless(){let t=this.getWritable();return t.__detail^=1,t}toggleUnmergeable(){let t=this.getWritable();return t.__detail^=2,t}setMode(t){if(t=ub[t],this.__mode===t)return this;let n=this.getWritable();return n.__mode=t,n}setTextContent(t){if(this.__text===t)return this;let n=this.getWritable();return n.__text=t,n}select(t,n){Jt();let r=Ke();var o=this.getTextContent();let i=this.__key;if(typeof o=="string"?(o=o.length,t===void 0&&(t=o),n===void 0&&(n=o)):n=t=0,de(r))o=mo(),o!==r.anchor.key&&o!==r.focus.key||Mt(i),r.setTextNodeRange(this,t,this,n);else return Rw(i,t,i,n,"text","text");return r}spliceText(t,n,r,o){let i=this.getWritable(),l=i.__text,s=r.length,a=t;0>a&&(a=s+a,0>a&&(a=0));let u=Ke();return o&&de(u)&&(t+=s,u.setTextNodeRange(i,t,i,t)),n=l.slice(0,a)+r+l.slice(a+n),i.__text=n,i}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...t){Jt();var n=this.getLatest(),r=n.getTextContent(),o=n.__key,i=mo(),l=new Set(t);t=[];for(var s=r.length,a="",u=0;u<s;u++)a!==""&&l.has(u)&&(t.push(a),a=""),a+=r[u];if(a!==""&&t.push(a),l=t.length,l===0)return[];if(t[0]===r)return[n];var c=t[0];r=n.getParentOrThrow(),u=n.getFormat();let d=n.getStyle(),f=n.__detail;s=!1,n.isSegmented()?(a=Et(c),a.__format=u,a.__style=d,a.__detail=f,s=!0):(a=n.getWritable(),a.__text=c),n=Ke(),a=[a],c=c.length;for(let m=1;m<l;m++){var h=t[m],g=h.length;h=Et(h).getWritable(),h.__format=u,h.__style=d,h.__detail=f;let S=h.__key;if(g=c+g,de(n)){let v=n.anchor,y=n.focus;v.key===o&&v.type==="text"&&v.offset>c&&v.offset<=g&&(v.key=S,v.offset-=c,n.dirty=!0),y.key===o&&y.type==="text"&&y.offset>c&&y.offset<=g&&(y.key=S,y.offset-=c,n.dirty=!0)}i===o&&Mt(S),c=g,a.push(h)}return o=this.getPreviousSibling(),i=this.getNextSibling(),o!==null&&vc(o),i!==null&&vc(i),o=r.getWritable(),i=this.getIndexWithinParent(),s?(o.splice(i,0,a),this.remove()):o.splice(i,1,a),de(n)&&Ec(n,r,i,l-1),a}mergeWithSibling(t){var n=t===this.getPreviousSibling();n||t===this.getNextSibling()||U(50);var r=this.__key;let o=t.__key,i=this.__text,l=i.length;mo()===o&&Mt(r);let s=Ke();if(de(s)){let a=s.anchor,u=s.focus;a!==null&&a.key===o&&(_y(a,n,r,t,l),s.dirty=!0),u!==null&&u.key===o&&(_y(u,n,r,t,l),s.dirty=!0)}return r=t.__text,this.setTextContent(n?r+i:i+r),n=this.getWritable(),t.remove(),n}isTextEntity(){return!1}}function bb(e){let t=e.style.fontWeight==="700",n=e.style.textDecoration==="line-through",r=e.style.fontStyle==="italic",o=e.style.textDecoration==="underline",i=e.style.verticalAlign;return{forChild:l=>(Q(l)&&(t&&l.toggleFormat("bold"),n&&l.toggleFormat("strikethrough"),r&&l.toggleFormat("italic"),o&&l.toggleFormat("underline"),i==="sub"&&l.toggleFormat("subscript"),i==="super"&&l.toggleFormat("superscript")),l),node:null}}function Rb(e){let t=e.style.fontWeight==="normal";return{forChild:n=>(Q(n)&&!t&&n.toggleFormat("bold"),n),node:null}}let dy=new WeakMap;function Pb(e){e.parentElement===null&&U(129);for(var t=e.textContent||"",n,r=e.parentNode,o=[e];r!==null&&(n=dy.get(r))===void 0&&!(r.nodeName==="PRE"||r.nodeType===1&&r.style.whiteSpace.startsWith("pre"));)o.push(r),r=r.parentNode;for(n=n===void 0?r:n,r=0;r<o.length;r++)dy.set(o[r],n);if(n!==null){for(t=t.split(/(\r?\n|\t)/),e=[],o=t.length,n=0;n<o;n++)r=t[n],r===`
65
+ `||r===`\r
66
+ `?e.push($l()):r===" "?e.push(hd()):r!==""&&e.push(Et(r));return{node:e}}if(t=t.replace(/\r/g,"").replace(/[ \t\n]+/g," "),t==="")return{node:null};if(t[0]===" "){for(o=e,n=!0;o!==null&&(o=fy(o,!1))!==null;)if(r=o.textContent||"",0<r.length){/[ \t\n]$/.test(r)&&(t=t.slice(1)),n=!1;break}n&&(t=t.slice(1))}if(t[t.length-1]===" "){for(o=!0;e!==null&&(e=fy(e,!0))!==null;)if(0<(e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length){o=!1;break}o&&(t=t.slice(0,t.length-1))}return t===""?{node:null}:{node:Et(t)}}let Ob=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/,"i");function fy(e,t){for(;;){for(var n=void 0;(n=t?e.nextSibling:e.previousSibling)===null;)if(e=e.parentElement,e===null)return null;if(e=n,e.nodeType===1&&(n=e.style.display,n===""&&e.nodeName.match(Ob)===null||n!==""&&!n.startsWith("inline")))return null;for(;(n=t?e.firstChild:e.lastChild)!==null;)e=n;if(e.nodeType===3)return e;if(e.nodeName==="BR")return null}}let Ab={code:"code",em:"italic",i:"italic",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function ro(e){let t=Ab[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:n=>(Q(n)&&!n.hasFormat(t)&&n.toggleFormat(t),n),node:null}}function Et(e=""){return Da(new $i(e))}function Q(e){return e instanceof $i}class jl extends $i{static getType(){return"tab"}static clone(t){let n=new jl(t.__key);return n.__text=t.__text,n.__format=t.__format,n.__style=t.__style,n}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}static importJSON(t){let n=hd();return n.setFormat(t.format),n.setStyle(t.style),n}exportJSON(){return{...super.exportJSON(),type:"tab",version:1}}setTextContent(){U(126)}setDetail(){U(127)}setMode(){U(128)}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function hd(){return Da(new jl)}class yr{constructor(t,n,r){this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){let n=this.getNode(),r=t.getNode(),o=this.offset;if(t=t.offset,B(n)){var i=n.getDescendantByIndex(o);n=i??n}return B(r)&&(i=r.getDescendantByIndex(t),r=i??r),n===r?o<t:n.isBefore(r)}getNode(){let t=$t(this.key);return t===null&&U(20),t}set(t,n,r){let o=this._selection,i=this.key;this.key=t,this.offset=n,this.type=r,Bl()||(mo()===i&&Mt(t),o!==null&&(o._cachedNodes=null,o.dirty=!0))}}function _f(e,t){let n=t.__key,r=e.offset,o="element";if(Q(t))o="text",t=t.getTextContentSize(),r>t&&(r=t);else if(!B(t)){var i=t.getNextSibling();Q(i)?(n=i.__key,r=0,o="text"):(i=t.getParent())&&(n=i.__key,r=t.getIndexWithinParent()+1)}e.set(n,r,o)}function hy(e,t){if(B(t)){let n=t.getLastDescendant();B(n)||Q(n)?_f(e,n):_f(e,t)}else _f(e,t)}function py(e,t,n,r){let o=e.getNode(),i=o.getChildAtIndex(e.offset),l=Et(),s=qt(o)?hi().append(l):l;l.setFormat(n),l.setStyle(r),i===null?o.append(s):(i.insertBefore(s),t.type==="element"&&t.key===e.key&&t.offset!==e.offset&&t.set(t.key,t.offset+1,"element")),e.is(t)&&t.set(l.__key,0,"text"),e.set(l.__key,0,"text")}function ao(e,t,n,r){e.key=t,e.offset=n,e.type=r}class pd{constructor(t){this.dirty=!1,this._nodes=t,this._cachedNodes=null}is(t){if(!zl(t))return!1;let n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(o=>r.has(o))}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new pd(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.getNodes(),o=r.length;var i=r[o-1];if(Q(i))i=i.select();else{let l=i.getIndexWithinParent()+1;i=i.getParentOrThrow().select(l,l)}for(i.insertNodes(t,n),t=0;t<o;t++)r[t].remove();return!0}getNodes(){var t=this._cachedNodes;if(t!==null)return t;var n=this._nodes;t=[];for(let r of n)n=$t(r),n!==null&&t.push(n);return Bl()||(this._cachedNodes=t),t}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function de(e){return e instanceof ki}function ep(e){let[t,,n]=Ow(e);e=n.getChildren();let r=e.length;var o=e[0].getChildren().length;let i=Array(r);for(var l=0;l<r;l++)i[l]=Array(o);for(o=0;o<r;o++){l=e[o].getChildren();let s=0;for(let a=0;a<l.length;a++){for(;i[o][s];)s++;let u=l[a],c=u.__rowSpan||1,d=u.__colSpan||1;for(let f=0;f<c;f++)for(let h=0;h<d;h++)i[o+f][s+h]=u;if(t===u)return{colSpan:d,columnIndex:s,rowIndex:o,rowSpan:c};s+=d}}return null}class gd{constructor(t,n,r){this.gridKey=t,this.anchor=n,this.focus=r,this.dirty=!1,this._cachedNodes=null,n._selection=this,r._selection=this}is(t){return Kg(t)?this.gridKey===t.gridKey&&this.anchor.is(t.anchor)&&this.focus.is(t.focus):!1}set(t,n,r){this.dirty=!0,this.gridKey=t,this.anchor.key=n,this.focus.key=r,this._cachedNodes=null}clone(){return new gd(this.gridKey,this.anchor,this.focus)}isCollapsed(){return!1}isBackward(){return this.focus.isBefore(this.anchor)}getCharacterOffsets(){return ju(this)}extract(){return this.getNodes()}insertRawText(){}insertText(){}insertNodes(t,n){let r=this.focus.getNode();return jg(r.select(0,r.getChildrenSize())).insertNodes(t,n)}getShape(){var t=$t(this.anchor.key);if(An(t)||U(103),t=ep(t),t===null)throw Error("getCellRect: expected to find AnchorNode");var n=$t(this.focus.key);An(n)||U(104);let r=ep(n);if(r===null)throw Error("getCellRect: expected to find focusCellNode");n=Math.min(t.columnIndex,r.columnIndex);let o=Math.max(t.columnIndex,r.columnIndex),i=Math.min(t.rowIndex,r.rowIndex);return t=Math.max(t.rowIndex,r.rowIndex),{fromX:Math.min(n,o),fromY:Math.min(i,t),toX:Math.max(n,o),toY:Math.max(i,t)}}getNodes(){function t(S){let{cell:v,startColumn:y,startRow:x}=S;a=Math.min(a,y),u=Math.min(u,x),c=Math.max(c,y+v.__colSpan-1),d=Math.max(d,x+v.__rowSpan-1)}var n=this._cachedNodes;if(n!==null)return n;var r=this.anchor.getNode();n=this.focus.getNode(),r=wc(r,An);var o=wc(n,An);An(r)||U(103),An(o)||U(104),n=r.getParent(),ya(n)||U(105),n=n.getParent(),Jg(n)||U(106);let[i,l,s]=Pw(n,r,o),a=Math.min(l.startColumn,s.startColumn),u=Math.min(l.startRow,s.startRow),c=Math.max(l.startColumn+l.cell.__colSpan-1,s.startColumn+s.cell.__colSpan-1),d=Math.max(l.startRow+l.cell.__rowSpan-1,s.startRow+s.cell.__rowSpan-1);r=a,o=u;for(var f=a,h=u;a<r||u<o||c>f||d>h;){if(a<r){var g=h-o;--r;for(var m=0;m<=g;m++)t(i[o+m][r])}if(u<o)for(g=f-r,--o,m=0;m<=g;m++)t(i[o][r+m]);if(c>f)for(g=h-o,f+=1,m=0;m<=g;m++)t(i[o+m][f]);if(d>h)for(g=f-r,h+=1,m=0;m<=g;m++)t(i[h][r+m])}for(n=[n],r=null,o=u;o<=d;o++)for(f=a;f<=c;f++)({cell:h}=i[o][f]),g=h.getParent(),ya(g)||U(107),g!==r&&n.push(g),n.push(h,...vb(h)),r=g;return Bl()||(this._cachedNodes=n),n}getTextContent(){let t=this.getNodes(),n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}}function Kg(e){return e instanceof gd}class ki{constructor(t,n,r,o){this.anchor=t,this.focus=n,this.dirty=!1,this.format=r,this.style=o,this._cachedNodes=null,t._selection=this,n._selection=this}is(t){return de(t)?this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style:!1}isBackward(){return this.focus.isBefore(this.anchor)}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){var t=this._cachedNodes;if(t!==null)return t;t=this.anchor;var n=this.focus,r=t.isBefore(n),o=r?t:n;r=r?n:t,t=o.getNode(),n=r.getNode();let i=o.offset;return o=r.offset,B(t)&&(r=t.getDescendantByIndex(i),t=r??t),B(n)&&(r=n.getDescendantByIndex(o),r!==null&&r!==t&&n.getChildAtIndex(o)===r&&(r=r.getPreviousSibling()),n=r??n),t=t.is(n)?B(t)&&0<t.getChildrenSize()?[]:[t]:t.getNodesBetween(n),Bl()||(this._cachedNodes=t),t}setTextNodeRange(t,n,r,o){ao(this.anchor,t.__key,n,"text"),ao(this.focus,r.__key,o,"text"),this._cachedNodes=null,this.dirty=!0}getTextContent(){let t=this.getNodes();if(t.length===0)return"";let n=t[0],r=t[t.length-1],o=this.anchor,i=this.focus,l=o.isBefore(i),[s,a]=ju(this),u="",c=!0;for(let d=0;d<t.length;d++){let f=t[d];if(B(f)&&!f.isInline())c||(u+=`
67
+ `),c=!f.isEmpty();else if(c=!1,Q(f)){let h=f.getTextContent();f===n?f===r?(o.type!=="element"||i.type!=="element"||i.offset===o.offset)&&(h=s<a?h.slice(s,a):h.slice(a,s)):h=l?h.slice(s):h.slice(a):f===r&&(h=l?h.slice(0,a):h.slice(0,s)),u+=h}else!Ve(f)&&!ma(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){let n=et(),r=n.getEditorState()._selection;if(t=bw(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r),t!==null){var[o,i]=t;ao(this.anchor,o.key,o.offset,o.type),ao(this.focus,i.key,i.offset,i.type),this._cachedNodes=null}}clone(){let t=this.anchor,n=this.focus;return new ki(new yr(t.key,t.offset,t.type),new yr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=rw(this.format,t,null),this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){return(this.format&oi[t])!==0}insertRawText(t){t=t.split(/(\r?\n|\t)/);let n=[],r=t.length;for(let o=0;o<r;o++){let i=t[o];i===`
68
+ `||i===`\r
69
+ `?n.push($l()):i===" "?n.push(hd()):n.push(Et(i))}this.insertNodes(n)}insertText(t){var n=this.anchor,r=this.focus,o=this.isCollapsed()||n.isBefore(r),i=this.format,l=this.style;o&&n.type==="element"?py(n,r,i,l):o||r.type!=="element"||py(r,n,i,l);var s=this.getNodes(),a=s.length,u=o?r:n;r=(o?n:r).offset;var c=u.offset;n=s[0],Q(n)||U(26),o=n.getTextContent().length;var d=n.getParentOrThrow(),f=s[a-1];if(this.isCollapsed()&&r===o&&(n.isSegmented()||n.isToken()||!n.canInsertTextAfter()||!d.canInsertTextAfter()&&n.getNextSibling()===null)){var h=n.getNextSibling();if(Q(h)&&h.canInsertTextBefore()&&!Fh(h)||(h=Et(),h.setFormat(i),d.canInsertTextAfter()?n.insertAfter(h):d.insertAfter(h)),h.select(0,0),n=h,t!==""){this.insertText(t);return}}else if(this.isCollapsed()&&r===0&&(n.isSegmented()||n.isToken()||!n.canInsertTextBefore()||!d.canInsertTextBefore()&&n.getPreviousSibling()===null)){if(h=n.getPreviousSibling(),(!Q(h)||Fh(h))&&(h=Et(),h.setFormat(i),d.canInsertTextBefore()?n.insertBefore(h):d.insertBefore(h)),h.select(),n=h,t!==""){this.insertText(t);return}}else if(n.isSegmented()&&r!==o)d=Et(n.getTextContent()),d.setFormat(i),n.replace(d),n=d;else if(!(this.isCollapsed()||t===""||(h=f.getParent(),d.canInsertTextBefore()&&d.canInsertTextAfter()&&(!B(h)||h.canInsertTextBefore()&&h.canInsertTextAfter())))){this.insertText(""),Nw(this.anchor,this.focus,null),this.insertText(t);return}if(a===1)if(n.isToken())t=Et(t),t.select(),n.replace(t);else{if(s=n.getFormat(),a=n.getStyle(),r===c&&(s!==i||a!==l))if(n.getTextContent()==="")n.setFormat(i),n.setStyle(l);else{s=Et(t),s.setFormat(i),s.setStyle(l),s.select(),r===0?n.insertBefore(s,!1):([a]=n.splitText(r),a.insertAfter(s,!1)),s.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length);return}n=n.spliceText(r,c-r,t,!0),n.getTextContent()===""?n.remove():this.anchor.type==="text"&&(n.isComposing()?this.anchor.offset-=t.length:(this.format=s,this.style=a))}else{if(i=new Set([...n.getParentKeys(),...f.getParentKeys()]),h=B(n)?n:n.getParentOrThrow(),l=B(f)?f:f.getParentOrThrow(),d=f,!h.is(l)&&l.isInline())do d=l,l=l.getParentOrThrow();while(l.isInline());if(u.type==="text"&&(c!==0||f.getTextContent()==="")||u.type==="element"&&f.getIndexWithinParent()<c)if(Q(f)&&!f.isToken()&&c!==f.getTextContentSize()){if(f.isSegmented()){var g=Et(f.getTextContent());f.replace(g),f=g}qt(u.getNode())||(f=f.spliceText(0,c,"")),i.add(f.__key)}else u=f.getParentOrThrow(),u.canBeEmpty()||u.getChildrenSize()!==1?f.remove():u.remove();else i.add(f.__key);for(u=l.getChildren(),c=new Set(s),f=h.is(l),h=h.isInline()&&n.getNextSibling()===null?h:n,g=u.length-1;0<=g;g--){let m=u[g];if(m.is(n)||B(m)&&m.isParentOf(n))break;m.isAttached()&&(!c.has(m)||m.is(d)?f||h.insertAfter(m,!1):m.remove())}if(!f)for(u=l,c=null;u!==null;)l=u.getChildren(),f=l.length,(f===0||l[f-1].is(c))&&(i.delete(u.__key),c=u),u=u.getParent();for(n.isToken()?r===o?n.select():(t=Et(t),t.select(),n.replace(t)):(n=n.spliceText(r,o-r,t,!0),n.getTextContent()===""?n.remove():n.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length)),t=1;t<a;t++)n=s[t],i.has(n.__key)||n.remove()}}removeText(){this.insertText("")}formatText(t){if(this.isCollapsed())this.toggleFormat(t),Mt(null);else{var n=this.getNodes(),r=[];for(var o of n)Q(o)&&r.push(o);var i=r.length;if(i===0)this.toggleFormat(t),Mt(null);else{o=this.anchor;var l=this.focus,s=this.isBackward();n=s?l:o,o=s?o:l;var a=0,u=r[0];if(l=n.type==="element"?0:n.offset,n.type==="text"&&l===u.getTextContentSize()&&(a=1,u=r[1],l=0),u!=null){s=u.getFormatFlags(t,null);var c=i-1,d=r[c];if(i=o.type==="text"?o.offset:d.getTextContentSize(),u.is(d))l!==i&&(l===0&&i===u.getTextContentSize()?u.setFormat(s):(t=u.splitText(l,i),t=l===0?t[0]:t[1],t.setFormat(s),n.type==="text"&&n.set(t.__key,0,"text"),o.type==="text"&&o.set(t.__key,i-l,"text")),this.format=s);else{l!==0&&([,u]=u.splitText(l),l=0),u.setFormat(s);var f=d.getFormatFlags(t,s);for(0<i&&(i!==d.getTextContentSize()&&([d]=d.splitText(i)),d.setFormat(f)),a+=1;a<c;a++){let h=r[a];if(!h.isToken()){let g=h.getFormatFlags(t,f);h.setFormat(g)}}n.type==="text"&&n.set(u.__key,l,"text"),o.type==="text"&&o.set(d.__key,i,"text"),this.format=s|f}}}}}insertNodes(t,n){if(!this.isCollapsed()){var r=this.isBackward()?this.anchor:this.focus,o=r.getNode().getNextSibling();if(o=o?o.getKey():null,r=(r=r.getNode().getPreviousSibling())?r.getKey():null,this.removeText(),this.isCollapsed()&&this.focus.type==="element"){if(this.focus.key===o&&this.focus.offset===0){var i=Et();this.focus.getNode().insertBefore(i)}else this.focus.key===r&&this.focus.offset===this.focus.getNode().getChildrenSize()&&(i=Et(),this.focus.getNode().insertAfter(i));i&&(this.focus.set(i.__key,0,"text"),this.anchor.set(i.__key,0,"text"))}}i=this.anchor,r=i.offset;var l=i.getNode();o=l,i.type==="element"&&(i=i.getNode(),o=i.getChildAtIndex(r-1),o=o===null?i:o),i=[];var s=l.getNextSiblings(),a=Jn(l)?null:l.getTopLevelElementOrThrow();if(Q(l))if(o=l.getTextContent().length,r===0&&o!==0)o=l.getPreviousSibling(),o=o!==null?o:l.getParentOrThrow(),i.push(l);else if(r===o)o=l;else{if(l.isToken())return!1;[o,l]=l.splitText(r),i.push(l)}l=o,i.push(...s),s=t[0];var u=!1,c=null;for(let g=0;g<t.length;g++){var d=t[g];if(Jn(o)||Ve(o)||!B(d)||d.isInline())u&&!B(d)&&!Ve(d)&&Jn(o.getParent())&&U(28);else{if(d.is(s)){if(B(o)&&o.isEmpty()&&o.canReplaceWith(d)){o.replace(d),o=d,u=!0;continue}if(u=d.getFirstDescendant(),ow(u)){for(var f=u.getParentOrThrow();f.isInline();)f=f.getParentOrThrow();if(c=f.getChildren(),u=c.length,B(o)){var h=o.getFirstChild();for(let m=0;m<u;m++){let S=c[m];h===null?o.append(S):h.insertAfter(S),h=S}}else{for(h=u-1;0<=h;h--)o.insertAfter(c[h]);o=o.getParentOrThrow()}if(c=c[u-1],f.remove(),u=!0,f.is(d))continue}}Q(o)&&(a===null&&U(27),o=a)}u=!1,B(o)&&!o.isInline()?(c=d,Ve(d)&&!d.isInline()?o=t.length===1&&o.canBeEmpty()&&o.isEmpty()?o.insertBefore(d,!1):o.insertAfter(d,!1):B(d)?(d.canBeEmpty()||!d.isEmpty())&&(qt(o)?(f=o.getChildAtIndex(r),f!==null?f.insertBefore(d):o.append(d),o=d):d.isInline()?(o.append(d),o=d):o=o.insertAfter(d,!1)):(f=o.getFirstChild(),f!==null?f.insertBefore(d):o.append(d),o=d)):!B(d)||B(d)&&d.isInline()||Ve(o)&&!o.isInline()?(c=d,de(this)&&Ve(d)&&(B(o)||Q(o))&&!d.isInline()?(Q(o)?(f=o.getParentOrThrow(),[o]=o.splitText(r),o=o.getIndexWithinParent()+1):(f=o,o=r),[,o]=hw(f,o),o=o.insertBefore(d)):o=o.insertAfter(d,!1)):(d=o.getParentOrThrow(),ma(o)&&o.remove(),o=d,g--)}if(n&&(Q(l)?l.select():(t=o.getPreviousSibling(),Q(t)?t.select():(t=o.getIndexWithinParent(),o.getParentOrThrow().select(t,t)))),B(o)){if(t=Q(c)?c:B(c)&&c.isInline()?c.getLastDescendant():o.getLastDescendant(),n||(t===null?o.select():Q(t)?t.getTextContent()===""?t.selectPrevious():t.select():t.selectNext()),i.length!==0)for(n=o,t=i.length-1;0<=t;t--)r=i[t],a=r.getParentOrThrow(),!B(o)||tp(r)||Ve(r)&&(!r.isInline()||r.isIsolated())?B(o)||tp(r)?B(r)&&!r.canInsertAfter(o)?(l=a.constructor.clone(a),B(l)||U(29),l.append(r),o.insertAfter(l)):o.insertAfter(r):(o.insertBefore(r),o=r):(n===o?o.append(r):o.insertBefore(r),o=r),a.isEmpty()&&!a.canBeEmpty()&&a.remove()}else n||(Q(o)?o.select():(n=o.getParentOrThrow(),t=o.getIndexWithinParent()+1,n.select(t,t)));return!0}insertParagraph(){this.isCollapsed()||this.removeText();var t=this.anchor,n=t.offset,r=[];if(t.type==="text"){var o=t.getNode(),i=o.getNextSiblings().reverse(),l=o.getParentOrThrow(),s=l.isInline(),a=s?l.getTextContentSize():o.getTextContentSize();n===0?i.push(o):(s&&(r=l.getNextSiblings()),n===a||s&&n===o.getTextContentSize()||([,o]=o.splitText(n),i.push(o)))}else{if(l=t.getNode(),Jn(l)){i=hi(),r=l.getChildAtIndex(n),i.select(),r!==null?r.insertBefore(i,!1):l.append(i);return}i=l.getChildren().slice(n).reverse()}if(o=i.length,n===0&&0<o&&l.isInline()){if(r=l.getParentOrThrow(),i=r.insertNewAfter(this,!1),B(i))for(r=r.getChildren(),l=0;l<r.length;l++)i.append(r[l])}else if(s=l.insertNewAfter(this,!1),s===null)this.insertLineBreak();else if(B(s))if(a=l.getFirstChild(),n===0&&(l.is(t.getNode())||a&&a.is(t.getNode()))&&0<o)l.insertBefore(s);else{if(l=null,n=r.length,t=s.getParentOrThrow(),0<n)for(a=0;a<n;a++)t.append(r[a]);if(o!==0)for(r=0;r<o;r++)n=i[r],l===null?s.append(n):l.insertBefore(n),l=n;s.canBeEmpty()||s.getChildrenSize()!==0?s.selectStart():(s.selectPrevious(),s.remove())}}insertLineBreak(t){let n=$l();var r=this.anchor;r.type==="element"&&(r=r.getNode(),qt(r)&&this.insertParagraph()),t?this.insertNodes([n],!0):this.insertNodes([n])&&n.selectNext(0,0)}getCharacterOffsets(){return ju(this)}extract(){var t=this.getNodes(),n=t.length,r=n-1,o=this.anchor;let i=this.focus;var l=t[0];let s=t[r],[a,u]=ju(this);return n===0?[]:n===1?Q(l)&&!this.isCollapsed()?(t=a>u?u:a,r=l.splitText(t,a>u?a:u),t=t===0?r[0]:r[1],t!=null?[t]:[]):[l]:(n=o.isBefore(i),Q(l)&&(o=n?a:u,o===l.getTextContentSize()?t.shift():o!==0&&([,l]=l.splitText(o),t[0]=l)),Q(s)&&(l=s.getTextContent().length,n=n?u:a,n===0?t.pop():n!==l&&([s]=s.splitText(n),t[r]=s)),t)}modify(t,n,r){var o=this.focus,i=this.anchor,l=t==="move",s=Bh(o,n);if(Ve(s)&&!s.isIsolated())l&&s.isKeyboardSelectable()?(n=np(),n.add(s.__key),vr(n)):(t=n?s.getPreviousSibling():s.getNextSibling(),Q(t)?(s=t.__key,n=n?t.getTextContent().length:0,o.set(s,n,"text"),l&&i.set(s,n,"text")):(r=s.getParentOrThrow(),B(t)?(r=t.__key,s=n?t.getChildrenSize():0):(s=s.getIndexWithinParent(),r=r.__key,n||s++),o.set(r,s,"element"),l&&i.set(r,s,"element")));else if(i=et(),o=Er(i._window)){var a=i._blockCursorElement,u=i._rootElement;if(u===null||a===null||!B(s)||s.isInline()||s.canBeEmpty()||Wh(a,i,u),o.modify(t,n?"backward":"forward",r),0<o.rangeCount&&(s=o.getRangeAt(0),i=this.anchor.getNode(),i=qt(i)?i:dw(i),this.applyDOMRange(s),this.dirty=!0,!l)){for(l=this.getNodes(),t=[],r=!1,a=0;a<l.length;a++)u=l[a],_c(u,i)?t.push(u):r=!0;r&&0<t.length&&(n?(n=t[0],B(n)?n.selectStart():n.getParentOrThrow().selectStart()):(n=t[t.length-1],B(n)?n.selectEnd():n.getParentOrThrow().selectEnd())),(o.anchorNode!==s.startContainer||o.anchorOffset!==s.startOffset)&&(n=this.focus,l=this.anchor,o=l.key,s=l.offset,i=l.type,ao(l,n.key,n.offset,n.type),ao(n,o,s,i),this._cachedNodes=null)}}}deleteCharacter(t){let n=this.isCollapsed();if(this.isCollapsed()){var r=this.anchor,o=this.focus,i=r.getNode();if(!t&&(r.type==="element"&&B(i)&&r.offset===i.getChildrenSize()||r.type==="text"&&r.offset===i.getTextContentSize())){var l=i.getParent();if(l=i.getNextSibling()||(l===null?null:l.getNextSibling()),B(l)&&l.isShadowRoot())return}if(l=Bh(o,t),Ve(l)&&!l.isIsolated()){l.isKeyboardSelectable()&&B(i)&&i.getChildrenSize()===0?(i.remove(),t=np(),t.add(l.__key),vr(t)):(l.remove(),et().dispatchCommand(ld,void 0));return}if(!t&&B(l)&&B(i)&&i.isEmpty()){i.remove(),l.selectStart();return}if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&(r.type==="element"?r.getNode():r.getNode().getParentOrThrow()).collapseAtStart(this))return}else{if(l=o.type==="text"?o.getNode():null,i=r.type==="text"?r.getNode():null,l!==null&&l.isSegmented()){if(r=o.offset,o=l.getTextContentSize(),l.is(i)||t&&r!==o||!t&&r!==0){my(l,t,r);return}}else if(i!==null&&i.isSegmented()&&(r=r.offset,o=i.getTextContentSize(),i.is(l)||t&&r!==0||!t&&r!==o)){my(i,t,r);return}if(i=this.anchor,l=this.focus,r=i.getNode(),o=l.getNode(),r===o&&i.type==="text"&&l.type==="text"){var s=i.offset,a=l.offset;let u=s<a;o=u?s:a,a=u?a:s,s=a-1,o!==s&&(r=r.getTextContent().slice(o,a),aw(r)||(t?l.offset=s:i.offset=s))}}}this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0&&(t=this.anchor.getNode(),t.isEmpty()&&qt(t.getParent())&&t.getIndexWithinParent()===0&&t.collapseAtStart(this))}deleteLine(t){this.isCollapsed()&&(this.anchor.type==="text"&&this.modify("extend",t,"lineboundary"),(t?this.focus:this.anchor).offset===0&&this.modify("extend",t,"character")),this.removeText()}deleteWord(t){this.isCollapsed()&&this.modify("extend",t,"word"),this.removeText()}}function zl(e){return e instanceof pd}function gy(e){let t=e.offset;return e.type==="text"?t:(e=e.getNode(),t===e.getChildrenSize()?e.getTextContent().length:0)}function ju(e){let t=e.anchor;return e=e.focus,t.type==="element"&&e.type==="element"&&t.key===e.key&&t.offset===e.offset?[0,0]:[gy(t),gy(e)]}function my(e,t,n){let r=e.getTextContent().split(/(?=\s)/g),o=r.length,i=0,l=0;for(let s=0;s<o;s++){let a=r[s],u=s===o-1;if(l=i,i+=a.length,t&&i===n||i>n||u){r.splice(s,1),u&&(l=void 0);break}}t=r.join("").trim(),t===""?e.remove():(e.setTextContent(t),e.select(l,l))}function vy(e,t,n,r){var o=t;if(e.nodeType===1){let s=!1;var i=e.childNodes,l=i.length;o===l&&(s=!0,o=l-1);let a=i[o];if(l=!1,a===r._blockCursorElement?(a=i[o+1],l=!0):r._blockCursorElement!==null&&o--,r=el(a),Q(r))o=s?r.getTextContentSize():0;else{if(i=el(e),i===null)return null;if(B(i)?(e=i.getChildAtIndex(o),(t=B(e))&&(t=e.getParent(),t=n===null||t===null||!t.canBeEmpty()||t!==n.getNode()),t&&(n=s?e.getLastDescendant():e.getFirstDescendant(),n===null?(i=e,o=0):(e=n,i=B(e)?e:e.getParentOrThrow())),Q(e)?(r=e,i=null,o=s?e.getTextContentSize():0):e!==i&&s&&!l&&o++):(o=i.getIndexWithinParent(),o=t===0&&Ve(i)&&el(e)===i?o:o+1,i=i.getParentOrThrow()),B(i))return new yr(i.__key,o,"element")}}else r=el(e);return Q(r)?new yr(r.__key,o,"text"):null}function yy(e,t,n){var r=e.offset,o=e.getNode();r===0?(r=o.getPreviousSibling(),o=o.getParent(),t?(n||!t)&&r===null&&B(o)&&o.isInline()&&(t=o.getPreviousSibling(),Q(t)&&(e.key=t.__key,e.offset=t.getTextContent().length)):B(r)&&!n&&r.isInline()?(e.key=r.__key,e.offset=r.getChildrenSize(),e.type="element"):Q(r)&&(e.key=r.__key,e.offset=r.getTextContent().length)):r===o.getTextContent().length&&(r=o.getNextSibling(),o=o.getParent(),t&&B(r)&&r.isInline()?(e.key=r.__key,e.offset=0,e.type="element"):(n||t)&&r===null&&B(o)&&o.isInline()&&!o.canInsertTextAfter()&&(t=o.getNextSibling(),Q(t)&&(e.key=t.__key,e.offset=0)))}function Nw(e,t,n){if(e.type==="text"&&t.type==="text"){var r=e.isBefore(t);let o=e.is(t);yy(e,r,o),yy(t,!r,o),o&&(t.key=e.key,t.offset=e.offset,t.type=e.type),r=et(),r.isComposing()&&r._compositionKey!==e.key&&de(n)&&(r=n.anchor,n=n.focus,ao(e,r.key,r.offset,r.type),ao(t,n.key,n.offset,n.type))}}function bw(e,t,n,r,o,i){return e===null||n===null||!Aa(o,e,n)||(t=vy(e,t,de(i)?i.anchor:null,o),t===null)||(r=vy(n,r,de(i)?i.focus:null,o),r===null||t.type==="element"&&r.type==="element"&&(e=el(e),n=el(n),Ve(e)&&Ve(n)))?null:(Nw(t,r,i),[t,r])}function tp(e){return B(e)&&!e.isInline()}function Rw(e,t,n,r,o,i){let l=Cr();return e=new ki(new yr(e,t,o),new yr(n,r,i),0,""),e.dirty=!0,l._selection=e}function np(){return new pd(new Set)}function Mb(e){let t=e.getEditorState()._selection,n=Er(e._window);return zl(t)||Kg(t)?t.clone():Gg(t,n,e)}function Gg(e,t,n){var r=n._window;if(r===null)return null;var o=r.event,i=o?o.type:void 0;r=i==="selectionchange",o=!zh&&(r||i==="beforeinput"||i==="compositionstart"||i==="compositionend"||i==="click"&&o&&o.detail===3||i==="drop"||i===void 0);let l;if(!de(e)||o){if(t===null)return null;if(o=t.anchorNode,i=t.focusNode,l=t.anchorOffset,t=t.focusOffset,r&&de(e)&&!Aa(n,o,i))return e.clone()}else return e.clone();if(n=bw(o,l,i,t,n,e),n===null)return null;let[s,a]=n;return new ki(s,a,de(e)?e.format:0,de(e)?e.style:"")}function Ke(){return Cr()._selection}function Fl(){return et()._editorState._selection}function Ec(e,t,n,r=1){var o=e.anchor,i=e.focus,l=o.getNode(),s=i.getNode();if(t.is(l)||t.is(s)){if(l=t.__key,e.isCollapsed())t=o.offset,(n<=t&&0<r||n<t&&0>r)&&(n=Math.max(0,t+r),o.set(l,n,"element"),i.set(l,n,"element"),xy(e));else{let u=e.isBackward();s=u?i:o;var a=s.getNode();o=u?o:i,i=o.getNode(),t.is(a)&&(a=s.offset,(n<=a&&0<r||n<a&&0>r)&&s.set(l,Math.max(0,a+r),"element")),t.is(i)&&(t=o.offset,(n<=t&&0<r||n<t&&0>r)&&o.set(l,Math.max(0,t+r),"element"))}xy(e)}}function xy(e){var t=e.anchor,n=t.offset;let r=e.focus;var o=r.offset,i=t.getNode(),l=r.getNode();if(e.isCollapsed())B(i)&&(l=i.getChildrenSize(),l=(o=n>=l)?i.getChildAtIndex(l-1):i.getChildAtIndex(n),Q(l)&&(n=0,o&&(n=l.getTextContentSize()),t.set(l.__key,n,"text"),r.set(l.__key,n,"text")));else{if(B(i)){let s=i.getChildrenSize();n=(e=n>=s)?i.getChildAtIndex(s-1):i.getChildAtIndex(n),Q(n)&&(i=0,e&&(i=n.getTextContentSize()),t.set(n.__key,i,"text"))}B(l)&&(n=l.getChildrenSize(),o=(t=o>=n)?l.getChildAtIndex(n-1):l.getChildAtIndex(o),Q(o)&&(l=0,t&&(l=o.getTextContentSize()),r.set(o.__key,l,"text")))}}function Db(e,t){if(t=t.getEditorState()._selection,e=e._selection,de(e)){var n=e.anchor;let r=e.focus,o;n.type==="text"&&(o=n.getNode(),o.selectionTransform(t,e)),r.type==="text"&&(n=r.getNode(),o!==n&&n.selectionTransform(t,e))}}function Cc(e,t,n,r,o){let i=null,l=0,s=null;r!==null?(i=r.__key,Q(r)?(l=r.getTextContentSize(),s="text"):B(r)&&(l=r.getChildrenSize(),s="element")):o!==null&&(i=o.__key,Q(o)?s="text":B(o)&&(s="element")),i!==null&&s!==null?e.set(i,l,s):(l=t.getIndexWithinParent(),l===-1&&(l=n.getChildrenSize()),e.set(n.__key,l,"element"))}function _y(e,t,n,r,o){e.type==="text"?(e.key=n,t||(e.offset+=o)):e.offset>r.getIndexWithinParent()&&--e.offset}function Pw(e,t,n){let r=[],o=null,i=null;e=e.getChildren();for(let c=0;c<e.length;c++){var l=e[c];ya(l)||U(108);var s=l.getChildren();l=0;for(let d of s){for(An(d)||U(109);r[c]!==void 0&&r[c][l]!==void 0;)l++;s=c;var a=l,u=d;let f={cell:u,startColumn:a,startRow:s},h=u.__rowSpan,g=u.__colSpan;for(let m=0;m<h;m++){r[s+m]===void 0&&(r[s+m]=[]);for(let S=0;S<g;S++)r[s+m][a+S]=f}t.is(u)&&(o=f),n.is(u)&&(i=f),l+=d.__colSpan}}return o===null&&U(110),i===null&&U(111),[r,o,i]}function Ow(e){e instanceof Qg||(e instanceof La?(e=wc(e,An),An(e)||U(114)):(e=wc(e.getNode(),An),An(e)||U(114)));let t=e.getParent();ya(t)||U(115);let n=t.getParent();return Jg(n)||U(116),[e,t,n]}let kt=null,Tt=null,hn=!1,wf=!1,va=0,wy={characterData:!0,childList:!0,subtree:!0};function Bl(){return hn||kt!==null&&kt._readOnly}function Jt(){hn&&U(13)}function Cr(){return kt===null&&U(15),kt}function et(){return Tt===null&&U(16),Tt}function Sy(e,t,n){var r=t.__type;let o=e._nodes.get(r);for(o===void 0&&U(30,r),e=n.get(r),e===void 0&&(e=Array.from(o.transforms),n.set(r,e)),n=e.length,r=0;r<n&&(e[r](t),t.isAttached());r++);}function Lb(e,t){t=t._dirtyLeaves,e=e._nodeMap;for(let n of t)t=e.get(n),Q(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&nw(t)}function Ib(e,t){let n=t._dirtyLeaves,r=t._dirtyElements;e=e._nodeMap;let o=mo(),i=new Map;var l=n;let s=l.size;for(var a=r,u=a.size;0<s||0<u;){if(0<s){t._dirtyLeaves=new Set;for(let c of l)l=e.get(c),Q(l)&&l.isAttached()&&l.isSimpleText()&&!l.isUnmergeable()&&nw(l),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Sy(t,l,i),n.add(c);if(l=t._dirtyLeaves,s=l.size,0<s){va++;continue}}t._dirtyLeaves=new Set,t._dirtyElements=new Map;for(let c of a)a=c[0],u=c[1],(a==="root"||u)&&(l=e.get(a),l!==void 0&&l!==void 0&&l.__key!==o&&l.isAttached()&&Sy(t,l,i),r.set(a,u));l=t._dirtyLeaves,s=l.size,a=t._dirtyElements,u=a.size,va++}t._dirtyLeaves=n,t._dirtyElements=r}function Yg(e,t){var n=e.type,r=t.get(n);if(r===void 0&&U(17,n),n=r.klass,e.type!==n.getType()&&U(18,n.name),n=n.importJSON(e),e=e.children,B(n)&&Array.isArray(e))for(r=0;r<e.length;r++){let o=Yg(e[r],t);n.append(o)}return n}function Ey(e,t){let n=kt,r=hn,o=Tt;kt=e,hn=!0,Tt=null;try{return t()}finally{kt=n,hn=r,Tt=o}}function li(e,t){let n=e._pendingEditorState,r=e._rootElement,o=e._headless||r===null;if(n!==null){var i=e._editorState,l=i._selection,s=n._selection,a=e._dirtyType!==0,u=kt,c=hn,d=Tt,f=e._updating,h=e._observer,g=null;if(e._pendingEditorState=null,e._editorState=n,!o&&a&&h!==null){Tt=e,kt=n,hn=!1,e._updating=!0;try{let Te=e._dirtyType,ft=e._dirtyElements,ht=e._dirtyLeaves;h.disconnect();var m=Te,S=ft,v=ht;Qt=Or=gt="",gw=m===2,Du=null,Ht=e,Ro=e._config,ha=e._nodes,fd=Ht._listeners.mutation,Uh=S,Vh=v,fi=i._nodeMap,Po=n._nodeMap,Hg=n._readOnly,Hh=new Map(e._keyToDOMMap);let _t=new Map;pa=_t,ys("root",null),pa=Hh=Ro=Po=fi=Vh=Uh=ha=Ht=void 0,g=_t}catch(Te){if(Te instanceof Error&&e._onError(Te),wf)throw Te;Lw(e,null,r,n),tw(e),e._dirtyType=2,wf=!0,li(e,i),wf=!1;return}finally{h.observe(r,wy),e._updating=f,kt=u,hn=c,Tt=d}}n._readOnly||(n._readOnly=!0);var y=e._dirtyLeaves,x=e._dirtyElements,_=e._normalizedNodes,E=e._updateTags,$=e._deferred;a&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set);var C=e._decorators,T=e._pendingDecorators||C,M=n._nodeMap,R;for(R in T)M.has(R)||(T===C&&(T=sw(e)),delete T[R]);var j=o?null:Er(e._window);if(e._editable&&j!==null&&(a||s===null||s.dirty)){Tt=e,kt=n;try{if(h!==null&&h.disconnect(),a||s===null||s.dirty){let Te=e._blockCursorElement;Te!==null&&Wh(Te,e,r);e:{let ft=j.anchorNode,ht=j.focusNode,_t=j.anchorOffset,pn=j.focusOffset,It=document.activeElement;if(!(E.has("collaboration")&&It!==r||It!==null&&zg(It)))if(de(s)){var F=s.anchor,ae=s.focus,H=F.key,X=ae.key,P=xc(e,H),O=xc(e,X),k=F.offset,I=ae.offset,L=s.format,V=s.style,te=s.isCollapsed(),ye=P,fe=O,Oe=!1;if(F.type==="text"){ye=mc(P);let wt=F.getNode();Oe=wt.getFormat()!==L||wt.getStyle()!==V}else de(l)&&l.anchor.type==="text"&&(Oe=!0);if(ae.type==="text"&&(fe=mc(O)),ye!==null&&fe!==null){if(te&&(l===null||Oe||de(l)&&(l.format!==L||l.style!==V))){var be=performance.now();Ew=[L,V,k,H,be]}if(_t===k&&pn===I&&ft===ye&&ht===fe&&(j.type!=="Range"||!te)&&(It!==null&&r.contains(It)||r.focus({preventScroll:!0}),F.type!=="element"))break e;try{j.setBaseAndExtent(ye,k,fe,I)}catch{}if(!E.has("skip-scroll-into-view")&&s.isCollapsed()&&r!==null&&r===document.activeElement){let wt=s instanceof ki&&s.anchor.type==="element"?ye.childNodes[k]||null:0<j.rangeCount?j.getRangeAt(0):null;if(wt!==null){let Ot;if(wt instanceof Text){let zt=document.createRange();zt.selectNode(wt),Ot=zt.getBoundingClientRect()}else Ot=wt.getBoundingClientRect();let or=r.ownerDocument,jt=or.defaultView;if(jt!==null)for(var{top:Z,bottom:ke}=Ot,ce,_e,me=r;me!==null;){let zt=me===or.body;if(zt)ce=0,_e=cd(e).innerHeight;else{let Wo=me.getBoundingClientRect();ce=Wo.top,_e=Wo.bottom}let ir=0;if(Z<ce?ir=-(ce-Z):ke>_e&&(ir=ke-_e),ir!==0)if(zt)jt.scrollBy(0,ir);else{let Wo=me.scrollTop;me.scrollTop+=ir;let Wa=me.scrollTop-Wo;Z-=Wa,ke-=Wa}if(zt)break;me=ud(me)}}}Qh=!0}}else l!==null&&Aa(e,ft,ht)&&j.removeAllRanges()}}e:{let Te=e._blockCursorElement;if(de(s)&&s.isCollapsed()&&s.anchor.type==="element"&&r.contains(document.activeElement)){let ft=s.anchor,ht=ft.getNode(),_t=ft.offset,pn=ht.getChildrenSize(),It=!1,wt=null;if(_t===pn){let Ot=ht.getChildAtIndex(_t-1);pf(Ot)&&(It=!0)}else{let Ot=ht.getChildAtIndex(_t);if(pf(Ot)){let or=Ot.getPreviousSibling();(or===null||pf(or))&&(It=!0,wt=e.getElementByKey(Ot.__key))}}if(It){let Ot=e.getElementByKey(ht.__key);if(Te===null){let or=e._config.theme,jt=document.createElement("div");jt.contentEditable="false",jt.setAttribute("data-lexical-cursor","true");let zt=or.blockCursor;if(zt!==void 0){if(typeof zt=="string"){let ir=zt.split(" ");zt=or.blockCursor=ir}zt!==void 0&&jt.classList.add(...zt)}e._blockCursorElement=Te=jt}r.style.caretColor="transparent",wt===null?Ot.appendChild(Te):Ot.insertBefore(Te,wt);break e}}Te!==null&&Wh(Te,e,r)}h!==null&&h.observe(r,wy)}finally{Tt=d,kt=u}}if(g!==null){var $e=g;let Te=Array.from(e._listeners.mutation),ft=Te.length;for(let ht=0;ht<ft;ht++){let[_t,pn]=Te[ht],It=$e.get(pn);It!==void 0&&_t(It,{dirtyLeaves:y,prevEditorState:i,updateTags:E})}}de(s)||s===null||l!==null&&l.is(s)||e.dispatchCommand(ld,void 0);var Be=e._pendingDecorators;Be!==null&&(e._decorators=Be,e._pendingDecorators=null,js("decorator",e,!0,Be));var Pt=ly(t||i),sn=ly(n);if(Pt!==sn&&js("textcontent",e,!0,sn),js("update",e,!0,{dirtyElements:x,dirtyLeaves:y,editorState:n,normalizedNodes:_,prevEditorState:t||i,tags:E}),e._deferred=[],$.length!==0){let Te=e._updating;e._updating=!0;try{for(let ft=0;ft<$.length;ft++)$[ft]()}finally{e._updating=Te}}var bn=e._updates;if(bn.length!==0){let Te=bn.shift();if(Te){let[ft,ht]=Te;Aw(e,ft,ht)}}}}function js(e,t,n,...r){let o=t._updating;t._updating=n;try{let i=Array.from(t._listeners[e]);for(e=0;e<i.length;e++)i[e].apply(null,r)}finally{t._updating=o}}function Y(e,t,n){if(e._updating===!1||Tt!==e){let i=!1;return e.update(()=>{i=Y(e,t,n)}),i}let r=Bg(e);for(let i=4;0<=i;i--)for(let l=0;l<r.length;l++){var o=r[l]._commands.get(t);if(o!==void 0&&(o=o[i],o!==void 0)){o=Array.from(o);let s=o.length;for(let a=0;a<s;a++)if(o[a](n,e)===!0)return!0}}return!1}function Cy(e,t){let n=e._updates;for(t=t||!1;n.length!==0;){var r=n.shift();if(r){let[o,i]=r,l;i!==void 0&&(r=i.onUpdate,l=i.tag,i.skipTransforms&&(t=!0),r&&e._deferred.push(r),l&&e._updateTags.add(l)),o()}}return t}function Aw(e,t,n){let r=e._updateTags;var o,i=o=!1;if(n!==void 0){var l=n.onUpdate;o=n.tag,o!=null&&r.add(o),o=n.skipTransforms||!1,i=n.discrete||!1}l&&e._deferred.push(l),n=e._editorState,l=e._pendingEditorState;let s=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=new md(new Map((l||n)._nodeMap)),s=!0),l._flushSync=i,i=kt;let a=hn,u=Tt,c=e._updating;kt=l,hn=!1,e._updating=!0,Tt=e;try{s&&(e._headless?n._selection!=null&&(l._selection=n._selection.clone()):l._selection=Mb(e));let d=e._compositionKey;t(),o=Cy(e,o),Db(l,e),e._dirtyType!==0&&(o?Lb(l,e):Ib(l,e),Cy(e),yb(n,l,e._dirtyLeaves,e._dirtyElements)),d!==e._compositionKey&&(l._flushSync=!0);let f=l._selection;if(de(f)){let h=l._nodeMap,g=f.focus.key;h.get(f.anchor.key)!==void 0&&h.get(g)!==void 0||U(19)}else zl(f)&&f._nodes.size===0&&(l._selection=null)}catch(d){d instanceof Error&&e._onError(d),e._pendingEditorState=n,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),li(e);return}finally{kt=i,hn=a,Tt=u,e._updating=c,va=0}e._dirtyType!==0||jb(l,e)?l._flushSync?(l._flushSync=!1,li(e)):s&&pb(()=>{li(e)}):(l._flushSync=!1,s&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function kn(e,t,n){e._updating?e._updates.push([t,n]):Aw(e,t,n)}class Mw extends La{constructor(t){super(t)}decorate(){U(47)}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Ve(e){return e instanceof Mw}class Ti extends La{constructor(t){super(t),this.__last=this.__first=null,this.__indent=this.__format=this.__size=0,this.__dir=null}getFormat(){return this.getLatest().__format}getFormatType(){let t=this.getFormat();return ab[t]||""}getIndent(){return this.getLatest().__indent}getChildren(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getChildrenKeys(){let t=[],n=this.getFirstChild();for(;n!==null;)t.push(n.__key),n=n.getNextSibling();return t}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){let t=et()._dirtyElements;return t!==null&&t.has(this.__key)}isLastChild(){let t=this.getLatest(),n=this.getParentOrThrow().getLastChild();return n!==null&&n.is(t)}getAllTextNodes(){let t=[],n=this.getFirstChild();for(;n!==null;){if(Q(n)&&t.push(n),B(n)){let r=n.getAllTextNodes();t.push(...r)}n=n.getNextSibling()}return t}getFirstDescendant(){let t=this.getFirstChild();for(;t!==null;){if(B(t)){let n=t.getFirstChild();if(n!==null){t=n;continue}}break}return t}getLastDescendant(){let t=this.getLastChild();for(;t!==null;){if(B(t)){let n=t.getLastChild();if(n!==null){t=n;continue}}break}return t}getDescendantByIndex(t){let n=this.getChildren(),r=n.length;return t>=r?(t=n[r-1],B(t)&&t.getLastDescendant()||t||null):(t=n[t],B(t)&&t.getFirstDescendant()||t||null)}getFirstChild(){let t=this.getLatest().__first;return t===null?null:$t(t)}getFirstChildOrThrow(){let t=this.getFirstChild();return t===null&&U(45,this.__key),t}getLastChild(){let t=this.getLatest().__last;return t===null?null:$t(t)}getLastChildOrThrow(){let t=this.getLastChild();return t===null&&U(96,this.__key),t}getChildAtIndex(t){var n=this.getChildrenSize();let r;if(t<n/2){for(r=this.getFirstChild(),n=0;r!==null&&n<=t;){if(n===t)return r;r=r.getNextSibling(),n++}return null}for(r=this.getLastChild(),--n;r!==null&&n>=t;){if(n===t)return r;r=r.getPreviousSibling(),n--}return null}getTextContent(){let t="",n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContent(),B(i)&&o!==r-1&&!i.isInline()&&(t+=`
70
+
71
+ `)}return t}getTextContentSize(){let t=0,n=this.getChildren(),r=n.length;for(let o=0;o<r;o++){let i=n[o];t+=i.getTextContentSize(),B(i)&&o!==r-1&&!i.isInline()&&(t+=2)}return t}getDirection(){return this.getLatest().__dir}hasFormat(t){return t!==""?(t=ny[t],(this.getFormat()&t)!==0):!1}select(t,n){Jt();let r=Ke(),o=t,i=n;var l=this.getChildrenSize();if(!this.canBeEmpty()){if(t===0&&n===0){if(t=this.getFirstChild(),Q(t)||B(t))return t.select(0,0)}else if(!(t!==void 0&&t!==l||n!==void 0&&n!==l)&&(t=this.getLastChild(),Q(t)||B(t)))return t.select()}if(o===void 0&&(o=l),i===void 0&&(i=l),l=this.__key,de(r))r.anchor.set(l,o,"element"),r.focus.set(l,i,"element"),r.dirty=!0;else return Rw(l,o,l,i,"element","element");return r}selectStart(){let t=this.getFirstDescendant();return B(t)||Q(t)?t.select(0,0):t!==null?t.selectPrevious():this.select(0,0)}selectEnd(){let t=this.getLastDescendant();return B(t)||Q(t)?t.select():t!==null?t.selectNext():this.select()}clear(){let t=this.getWritable();return this.getChildren().forEach(n=>n.remove()),t}append(...t){return this.splice(this.getChildrenSize(),0,t)}setDirection(t){let n=this.getWritable();return n.__dir=t,n}setFormat(t){return this.getWritable().__format=t!==""?ny[t]:0,this}setIndent(t){return this.getWritable().__indent=t,this}splice(t,n,r){let o=r.length,i=this.getChildrenSize(),l=this.getWritable(),s=l.__key;var a=[],u=[];let c=this.getChildAtIndex(t+n),d=null,f=i-n+o;if(t!==0)if(t===i)d=this.getLastChild();else{var h=this.getChildAtIndex(t);h!==null&&(d=h.getPreviousSibling())}if(0<n){var g=d===null?this.getFirstChild():d.getNextSibling();for(h=0;h<n;h++){g===null&&U(100);var m=g.getNextSibling(),S=g.__key;g=g.getWritable(),ii(g),u.push(S),g=m}}for(h=d,m=0;m<o;m++){S=r[m],h!==null&&S.is(h)&&(d=h=h.getPreviousSibling()),g=S.getWritable(),g.__parent===s&&f--,ii(g);let v=S.__key;h===null?(l.__first=v,g.__prev=null):(h=h.getWritable(),h.__next=v,g.__prev=h.__key),S.__key===s&&U(76),g.__parent=s,a.push(v),h=S}if(t+n===i?h!==null&&(h.getWritable().__next=null,l.__last=h.__key):c!==null&&(t=c.getWritable(),h!==null?(n=h.getWritable(),t.__prev=h.__key,n.__next=c.__key):t.__prev=null),l.__size=f,u.length&&(t=Ke(),de(t))){u=new Set(u),a=new Set(a);let{anchor:v,focus:y}=t;$y(v,u,a)&&Cc(v,v.getNode(),this,d,c),$y(y,u,a)&&Cc(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||Jn(this)||this.remove()}return l}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"element",version:1}}insertNewAfter(){return null}canIndent(){return!0}collapseAtStart(){return!1}excludeFromCopy(){return!1}canExtractContents(){return!0}canReplaceWith(){return!0}canInsertAfter(){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(){return!1}extractWithChild(){return!1}}function B(e){return e instanceof Ti}function $y(e,t,n){for(e=e.getNode();e;){let r=e.__key;if(t.has(r)&&!n.has(r))return!0;e=e.getParent()}return!1}class Wl extends Ti{static getType(){return"root"}static clone(){return new Wl}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){U(51)}getTextContent(){let t=this.__cachedText;return!Bl()&&et()._dirtyType!==0||t===null?super.getTextContent():t}remove(){U(52)}replace(){U(53)}insertBefore(){U(54)}insertAfter(){U(55)}updateDOM(){return!1}append(...t){for(let n=0;n<t.length;n++){let r=t[n];B(r)||Ve(r)||U(56)}return super.append(...t)}static importJSON(t){let n=Sr();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),type:"root",version:1}}collapseAtStart(){return!0}}function qt(e){return e instanceof Wl}function jb(e,t){if(t=t.getEditorState()._selection,e=e._selection,e!==null){if(e.dirty||!e.is(t))return!0}else if(t!==null)return!0;return!1}function Xg(){return new md(new Map([["root",new Wl]]))}function Dw(e){let t=e.exportJSON();var n=e.constructor;t.type!==n.getType()&&U(130,n.name);let r=t.children;if(B(e))for(Array.isArray(r)||U(59,n.name),e=e.getChildren(),n=0;n<e.length;n++){let o=Dw(e[n]);r.push(o)}return t}class md{constructor(t,n){this._nodeMap=t,this._selection=n||null,this._readOnly=this._flushSync=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t){return Ey(this,t)}clone(t){return t=new md(this._nodeMap,t===void 0?this._selection:t),t._readOnly=!0,t}toJSON(){return Ey(this,()=>({root:Dw(Sr())}))}}class Ul extends Ti{static getType(){return"paragraph"}static clone(t){return new Ul(t.__key)}createDOM(t){let n=document.createElement("p");return t=Ds(t.theme,"paragraph"),t!==void 0&&n.classList.add(...t),n}updateDOM(){return!1}static importDOM(){return{p:()=>({conversion:zb,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&dd(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n),n=this.getIndent(),0<n&&(t.style.textIndent=`${20*n}px`)}return{element:t}}static importJSON(t){let n=hi();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"paragraph",version:1}}insertNewAfter(t,n){t=hi();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.getChildren();if(t.length===0||Q(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function zb(e){let t=hi();return e.style&&(t.setFormat(e.style.textAlign),e=parseInt(e.style.textIndent,10)/20,0<e&&t.setIndent(e)),{node:t}}function hi(){return Da(new Ul)}function Lw(e,t,n,r){let o=e._keyToDOMMap;o.clear(),e._editorState=Xg(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null,r=e._observer,r!==null&&(r.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",o.set("root",n))}function Fb(e){let t=new Map,n=new Set;return e.forEach(r=>{if(r=r.klass.importDOM!=null?r.klass.importDOM.bind(r.klass):null,r!=null&&!n.has(r)){n.add(r);var o=r();o!==null&&Object.keys(o).forEach(i=>{let l=t.get(i);l===void 0&&(l=[],t.set(i,l)),l.push(o[i])})}}),t}class Bb{constructor(t,n,r,o,i,l,s){this._parentEditor=n,this._rootElement=null,this._editorState=t,this._compositionKey=this._pendingEditorState=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=o,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=uw(),this._onError=i,this._htmlConversions=l,this._editable=s,this._headless=n!==null&&n._headless,this._blockCursorElement=this._window=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){let n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){let n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){let n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){let n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){let n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&U(35);let o=this._commands;o.has(t)||o.set(t,[new Set,new Set,new Set,new Set,new Set]);let i=o.get(t);i===void 0&&U(36,String(t));let l=i[r];return l.add(n),()=>{l.delete(n),i.every(s=>s.size===0)&&o.delete(t)}}registerMutationListener(t,n){this._nodes.get(t.getType())===void 0&&U(37,t.name);let r=this._listeners.mutation;return r.set(n,t),()=>{r.delete(n)}}registerNodeTransformToKlass(t,n){var r=t.getType();return r=this._nodes.get(r),r===void 0&&U(37,t.name),r.transforms.add(n),r}registerNodeTransform(t,n){var r=this.registerNodeTransformToKlass(t,n);let o=[r];return r=r.replaceWithKlass,r!=null&&(r=this.registerNodeTransformToKlass(r,n),o.push(r)),gb(this,t.getType()),()=>{o.forEach(i=>i.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return Y(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){let n=this._rootElement;if(t!==n){let l=Ds(this._config.theme,"root");var r=this._pendingEditorState||this._editorState;if(this._rootElement=t,Lw(this,n,t,r),n!==null){if(!this._config.disableEvents){Ls!==0&&(Ls--,Ls===0&&n.ownerDocument.removeEventListener("selectionchange",Tw));var o=n.__lexicalEditor;if(o!=null){if(o._parentEditor!==null){var i=Bg(o);i=i[i.length-1]._key,dl.get(i)===o&&dl.delete(i)}else dl.delete(o._key);n.__lexicalEditor=null}for(o=kw(n),i=0;i<o.length;i++)o[i]();n.__lexicalEventHandles=[]}l!=null&&n.classList.remove(...l)}t!==null?(r=(r=t.ownerDocument)&&r.defaultView||null,o=t.style,o.userSelect="text",o.whiteSpace="pre-wrap",o.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=r,this._dirtyType=2,tw(this),this._updateTags.add("history-merge"),li(this),this._config.disableEvents||Tb(t,this),l!=null&&t.classList.add(...l)):(this._editorState=r,this._window=this._pendingEditorState=null),js("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&U(38),ew(this);let r=this._pendingEditorState,o=this._updateTags;n=n!==void 0?n.tag:null,r===null||r.isEmpty()||(n!=null&&o.add(n),li(this)),this._pendingEditorState=t,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,n!=null&&o.add(n),li(this)}parseEditorState(t,n){t=typeof t=="string"?JSON.parse(t):t;let r=Xg(),o=kt,i=hn,l=Tt,s=this._dirtyElements,a=this._dirtyLeaves,u=this._cloneNotNeeded,c=this._dirtyType;this._dirtyElements=new Map,this._dirtyLeaves=new Set,this._cloneNotNeeded=new Set,this._dirtyType=0,kt=r,hn=!1,Tt=this;try{Yg(t.root,this._nodes),n&&n(),r._readOnly=!0}catch(d){d instanceof Error&&this._onError(d)}finally{this._dirtyElements=s,this._dirtyLeaves=a,this._cloneNotNeeded=u,this._dirtyType=c,kt=o,hn=i,Tt=l}return r}update(t,n){kn(this,t,n)}focus(t,n={}){let r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),kn(this,()=>{let o=Ke(),i=Sr();o!==null?o.dirty=!0:i.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?i.selectStart():i.selectEnd())},{onUpdate:()=>{r.removeAttribute("autocapitalize"),t&&t()},tag:"focus"}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){var t=this._rootElement;t!==null&&t.blur(),t=Er(this._window),t!==null&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,js("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}class Qg extends Ti{constructor(t,n){super(n),this.__colSpan=t,this.__rowSpan=1}exportJSON(){return{...super.exportJSON(),colSpan:this.__colSpan,rowSpan:this.__rowSpan}}getColSpan(){return this.__colSpan}setColSpan(t){return this.getWritable().__colSpan=t,this}getRowSpan(){return this.__rowSpan}setRowSpan(t){return this.getWritable().__rowSpan=t,this}}function An(e){return e instanceof Qg}class Iw extends Ti{}function Jg(e){return e instanceof Iw}class jw extends Ti{}function ya(e){return e instanceof jw}D.$addUpdateTag=function(e){Jt(),et()._updateTags.add(e)};D.$applyNodeReplacement=Da;D.$copyNode=fw;D.$createLineBreakNode=$l;D.$createNodeSelection=np;D.$createParagraphNode=hi;D.$createRangeSelection=function(){let e=new yr("root",0,"element"),t=new yr("root",0,"element");return new ki(e,t,0,"")};D.$createTabNode=hd;D.$createTextNode=Et;D.$getAdjacentNode=Bh;D.$getNearestNodeFromDOMNode=Ma;D.$getNearestRootOrShadowRoot=dw;D.$getNodeByKey=$t;D.$getPreviousSelection=Fl;D.$getRoot=Sr;D.$getSelection=Ke;D.$getTextContent=function(){let e=Ke();return e===null?"":e.getTextContent()};D.$hasAncestor=_c;D.$hasUpdateTag=function(e){return et()._updateTags.has(e)};D.$insertNodes=function(e,t){let n=Ke()||Fl();return n===null&&(n=Sr().selectEnd()),n.insertNodes(e,t)};D.$isBlockElementNode=tp;D.$isDecoratorNode=Ve;D.$isElementNode=B;D.$isInlineElementOrDecoratorNode=function(e){return B(e)&&e.isInline()||Ve(e)&&e.isInline()};D.$isLeafNode=ow;D.$isLineBreakNode=ma;D.$isNodeSelection=zl;D.$isParagraphNode=function(e){return e instanceof Ul};D.$isRangeSelection=de;D.$isRootNode=qt;D.$isRootOrShadowRoot=Jn;D.$isTabNode=function(e){return e instanceof jl};D.$isTextNode=Q;D.$nodesOfType=function(e){var t=Cr();let n=t._readOnly,r=e.getType();t=t._nodeMap;let o=[];for(let[,i]of t)i instanceof e&&i.__type===r&&(n||i.isAttached())&&o.push(i);return o};D.$normalizeSelection__EXPERIMENTAL=jg;D.$parseSerializedNode=function(e){return Yg(e,et()._nodes)};D.$selectAll=function(){var e=Sr();e=e.select(0,e.getChildrenSize()),vr(jg(e))};D.$setCompositionKey=Mt;D.$setSelection=vr;D.$splitNode=hw;D.BLUR_COMMAND=J_;D.CAN_REDO_COMMAND={};D.CAN_UNDO_COMMAND={};D.CLEAR_EDITOR_COMMAND={};D.CLEAR_HISTORY_COMMAND={};D.CLICK_COMMAND=A_;D.COMMAND_PRIORITY_CRITICAL=4;D.COMMAND_PRIORITY_EDITOR=0;D.COMMAND_PRIORITY_HIGH=3;D.COMMAND_PRIORITY_LOW=1;D.COMMAND_PRIORITY_NORMAL=2;D.CONTROLLED_TEXT_INSERTION_COMMAND=cl;D.COPY_COMMAND=Ag;D.CUT_COMMAND=Mg;D.DELETE_CHARACTER_COMMAND=ca;D.DELETE_LINE_COMMAND=fa;D.DELETE_WORD_COMMAND=da;D.DEPRECATED_$computeGridMap=Pw;D.DEPRECATED_$createGridSelection=function(){let e=new yr("root",0,"element"),t=new yr("root",0,"element");return new gd("root",e,t)};D.DEPRECATED_$getGridCellNodeRect=ep;D.DEPRECATED_$getNodeTriplet=Ow;D.DEPRECATED_$isGridCellNode=An;D.DEPRECATED_$isGridNode=Jg;D.DEPRECATED_$isGridRowNode=ya;D.DEPRECATED_$isGridSelection=Kg;D.DEPRECATED_GridCellNode=Qg;D.DEPRECATED_GridNode=Iw;D.DEPRECATED_GridRowNode=jw;D.DRAGEND_COMMAND=X_;D.DRAGOVER_COMMAND=Y_;D.DRAGSTART_COMMAND=G_;D.DROP_COMMAND=K_;D.DecoratorNode=Mw;D.ElementNode=Ti;D.FOCUS_COMMAND=Q_;D.FORMAT_ELEMENT_COMMAND={};D.FORMAT_TEXT_COMMAND=go;D.INDENT_CONTENT_COMMAND={};D.INSERT_LINE_BREAK_COMMAND=Ms;D.INSERT_PARAGRAPH_COMMAND=Lh;D.INSERT_TAB_COMMAND={};D.KEY_ARROW_DOWN_COMMAND=F_;D.KEY_ARROW_LEFT_COMMAND=I_;D.KEY_ARROW_RIGHT_COMMAND=D_;D.KEY_ARROW_UP_COMMAND=z_;D.KEY_BACKSPACE_COMMAND=W_;D.KEY_DELETE_COMMAND=V_;D.KEY_DOWN_COMMAND=M_;D.KEY_ENTER_COMMAND=pc;D.KEY_ESCAPE_COMMAND=U_;D.KEY_MODIFIER_COMMAND=Z_;D.KEY_SPACE_COMMAND=B_;D.KEY_TAB_COMMAND=H_;D.LineBreakNode=Il;D.MOVE_TO_END=L_;D.MOVE_TO_START=j_;D.OUTDENT_CONTENT_COMMAND={};D.PASTE_COMMAND=Rg;D.ParagraphNode=Ul;D.REDO_COMMAND=Og;D.REMOVE_TEXT_COMMAND=Ih;D.RootNode=Wl;D.SELECTION_CHANGE_COMMAND=ld;D.SELECT_ALL_COMMAND=jh;D.TabNode=jl;D.TextNode=$i;D.UNDO_COMMAND=Pg;D.createCommand=function(){return{}};D.createEditor=function(e){var t=e||{},n=Tt,r=t.theme||{};let o=e===void 0?n:t.parentEditor||null,i=t.disableEvents||!1,l=Xg(),s=t.namespace||(o!==null?o._config.namespace:uw()),a=t.editorState,u=[Wl,$i,Il,jl,Ul,...t.nodes||[]],c=t.onError;if(t=t.editable!==void 0?t.editable:!0,e===void 0&&n!==null)e=n._nodes;else for(e=new Map,n=0;n<u.length;n++){let f=u[n],h=null;var d=null;typeof f!="function"&&(d=f,f=d.replace,h=d.with,d=d.withKlass?d.withKlass:null);let g=f.getType(),m=f.transform(),S=new Set;m!==null&&S.add(m),e.set(g,{klass:f,replace:h,replaceWithKlass:d,transforms:S})}return r=new Bb(l,o,e,{disableEvents:i,namespace:s,theme:r},c||console.error,Fb(e),t),a!==void 0&&(r._pendingEditorState=a,r._dirtyType=2),r};D.getNearestEditorFromDOMNode=Fg;D.isHTMLAnchorElement=function(e){return dd(e)&&e.tagName==="A"};D.isHTMLElement=dd;D.isSelectionCapturedInDecoratorInput=zg;D.isSelectionWithinEditor=Aa;const Wb=D;var ge=Wb,dt={},Rt={},ne=ge;let $c=new Map;function ky(e){for(;e!=null;){if(e.nodeType===Node.TEXT_NODE)return e;e=e.firstChild}return null}function Ty(e){let t=e.parentNode;if(t==null)throw Error("Should never happen");return[t,Array.from(t.childNodes).indexOf(e)]}function zw(e){let t={};e=e.split(";");for(let n of e)if(n!==""){let[r,o]=n.split(/:([^]+)/);t[r.trim()]=o.trim()}return t}function kc(e){let t=$c.get(e);return t===void 0&&(t=zw(e),$c.set(e,t)),t}function Ub(e){let t="";for(let n in e)n&&(t+=`${n}: ${e[n]};`);return t}function Oi(e,t){var n=kc("getStyle"in e?e.getStyle():e.style);t=Object.entries(t).reduce((r,[o,i])=>(i===null?delete r[o]:r[o]=i,r),{...n}),n=Ub(t),e.setStyle(n),$c.set(n,t)}function Fw(e,t){var n=e.getNodes(),r=n.length;if(ne.DEPRECATED_$isGridSelection(e)){for(var o=ne.$createRangeSelection(),i=o.anchor,l=o.focus,s=0;s<r;s++){var a=n[s];ne.DEPRECATED_$isGridCellNode(a)&&(i.set(a.getKey(),0,"element"),l.set(a.getKey(),a.getChildrenSize(),"element"),Fw(ne.$normalizeSelection__EXPERIMENTAL(o),t))}ne.$setSelection(e)}else if(--r,o=n[0],i=n[r],e.isCollapsed())Oi(e,t);else{var u=e.anchor,c=e.focus;s=o.getTextContent().length,a=c.offset;var d=u.offset,f=u.isBefore(c);l=f?d:a,e=f?a:d;var h=f?u.type:c.type,g=f?c.type:u.type;if(u=f?c.key:u.key,ne.$isTextNode(o)&&l===s&&(c=o.getNextSibling(),ne.$isTextNode(c)&&(l=d=0,o=c)),n.length===1)ne.$isTextNode(o)&&(l=h==="element"?0:d>a?a:d,e=g==="element"?s:d>a?d:a,l!==e&&(l===0&&e===s?(Oi(o,t),o.select(l,e)):(n=o.splitText(l,e),n=l===0?n[0]:n[1],Oi(n,t),n.select(0,e-l))));else for(ne.$isTextNode(o)&&l<o.getTextContentSize()&&(l!==0&&(o=o.splitText(l)[1]),Oi(o,t)),ne.$isTextNode(i)&&(l=i.getTextContent().length,i.__key!==u&&e!==0&&(e=l),e!==l&&([i]=i.splitText(e)),e!==0&&Oi(i,t)),e=1;e<r;e++)l=n[e],s=l.getKey(),ne.$isTextNode(l)&&s!==o.getKey()&&s!==i.getKey()&&!l.isToken()&&Oi(l,t)}}function Vb(e){for(;e!==null&&!ne.$isRootOrShadowRoot(e);){let t=e.getLatest(),n=e.getParent();t.getChildrenSize()===0&&e.remove(!0),e=n}}function Sf(e,t,n,r,o=null){if(t.length!==0){var i=t[0],l=new Map,s=[];i=ne.$isElementNode(i)?i:i.getParentOrThrow(),i.isInline()&&(i=i.getParentOrThrow());for(var a=!1;i!==null;){var u=i.getPreviousSibling();if(u!==null){i=u,a=!0;break}if(i=i.getParentOrThrow(),ne.$isRootOrShadowRoot(i))break}u=new Set;for(var c=0;c<n;c++){var d=t[c];ne.$isElementNode(d)&&d.getChildrenSize()===0&&u.add(d.getKey())}var f=new Set;for(c=0;c<n;c++){d=t[c];var h=d.getParent();if(h!==null&&h.isInline()&&(h=h.getParent()),h!==null&&ne.$isLeafNode(d)&&!f.has(d.getKey())){if(d=h.getKey(),l.get(d)===void 0){let g=r();g.setFormat(h.getFormatType()),g.setIndent(h.getIndent()),s.push(g),l.set(d,g),h.getChildren().forEach(m=>{g.append(m),f.add(m.getKey()),ne.$isElementNode(m)&&m.getChildrenKeys().forEach(S=>f.add(S))}),Vb(h)}}else u.has(d.getKey())&&(h=r(),h.setFormat(d.getFormatType()),h.setIndent(d.getIndent()),s.push(h),d.remove(!0))}if(o!==null)for(t=0;t<s.length;t++)o.append(s[t]);if(t=null,ne.$isRootOrShadowRoot(i))if(a)if(o!==null)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)i.insertAfter(s[o]);else if(a=i.getFirstChild(),ne.$isElementNode(a)&&(i=a),a===null)if(o)i.append(o);else for(o=0;o<s.length;o++)a=s[o],i.append(a),t=a;else if(o!==null)a.insertBefore(o);else for(i=0;i<s.length;i++)o=s[i],a.insertBefore(o),t=o;else if(o)i.insertAfter(o);else for(o=s.length-1;0<=o;o--)a=s[o],i.insertAfter(a),t=a;s=ne.$getPreviousSelection(),ne.$isRangeSelection(s)&&s.anchor.getNode().isAttached()&&s.focus.getNode().isAttached()?ne.$setSelection(s.clone()):t!==null?t.selectEnd():e.dirty=!0}}function Bw(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Ww(e){return e=e.anchor.getNode(),(ne.$isRootNode(e)?e:e.getParentOrThrow()).getDirection()==="rtl"}Rt.$addNodeStyle=function(e){e=e.getStyle();let t=zw(e);$c.set(e,t)};Rt.$cloneWithProperties=function(e){let t=e.constructor.clone(e);return t.__parent=e.__parent,t.__next=e.__next,t.__prev=e.__prev,ne.$isElementNode(e)&&ne.$isElementNode(t)?(t.__first=e.__first,t.__last=e.__last,t.__size=e.__size,t.__format=e.__format,t.__indent=e.__indent,t.__dir=e.__dir,t):(ne.$isTextNode(e)&&ne.$isTextNode(t)&&(t.__format=e.__format,t.__style=e.__style,t.__mode=e.__mode,t.__detail=e.__detail),t)};Rt.$getSelectionStyleValueForProperty=function(e,t,n=""){let r=null,o=e.getNodes();var i=e.anchor,l=e.focus,s=e.isBackward();let a=s?l.offset:i.offset;if(i=s?l.getNode():i.getNode(),e.style!==""&&(e=kc(e.style),e!==null&&t in e))return e[t];for(e=0;e<o.length;e++){var u=o[e];if((e===0||a!==0||!u.is(i))&&ne.$isTextNode(u)){if(l=t,s=n,u=u.getStyle(),u=kc(u),l=u!==null&&u[l]||s,r===null)r=l;else if(r!==l){r="";break}}}return r===null?n:r};Rt.$isAtNodeEnd=function(e){return e.type==="text"?e.offset===e.getNode().getTextContentSize():e.offset===e.getNode().getChildrenSize()};Rt.$isParentElementRTL=Ww;Rt.$moveCaretSelection=Bw;Rt.$moveCharacter=function(e,t,n){let r=Ww(e);Bw(e,t,n?!r:r,"character")};Rt.$patchStyleText=Fw;Rt.$selectAll=function(e){let t=e.anchor;e=e.focus;var n=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();let r=n.getFirstDescendant();n=n.getLastDescendant();let o="element",i="element",l=0;ne.$isTextNode(r)?o="text":ne.$isElementNode(r)||r===null||(r=r.getParentOrThrow()),ne.$isTextNode(n)?(i="text",l=n.getTextContentSize()):ne.$isElementNode(n)||n===null||(n=n.getParentOrThrow()),r&&n&&(t.set(r.getKey(),0,o),e.set(n.getKey(),l,i))};Rt.$setBlocksType=function(e,t){if(e.anchor.key==="root"){t=t();var n=ne.$getRoot();(e=n.getFirstChild())?e.replace(t,!0):n.append(t)}else for(n=e.getNodes(),e=e.anchor.getNode().getParentOrThrow(),n.indexOf(e)===-1&&n.push(e),e.isInline()&&(e=e.getParentOrThrow(),n.indexOf(e)===-1&&n.push(e)),e=0;e<n.length;e++){let i=n[e];var r=i;if(!ne.$isElementNode(r)||ne.$isRootOrShadowRoot(r))r=!1;else{var o=r.getFirstChild();o=o===null||ne.$isLineBreakNode(o)||ne.$isTextNode(o)||o.isInline(),r=!r.isInline()&&r.canBeEmpty()!==!1&&o}r&&(r=t(),r.setFormat(i.getFormatType()),r.setIndent(i.getIndent()),i.replace(r,!0))}};Rt.$shouldOverrideDefaultCharacterSelection=function(e,t){return e=ne.$getAdjacentNode(e.focus,t),ne.$isDecoratorNode(e)&&!e.isIsolated()||ne.$isElementNode(e)&&!e.isInline()&&!e.canBeEmpty()};Rt.$sliceSelectedTextNodeContent=function(e,t){if(t.isSelected()&&!t.isSegmented()&&!t.isToken()&&(ne.$isRangeSelection(e)||ne.DEPRECATED_$isGridSelection(e))){var n=e.anchor.getNode(),r=e.focus.getNode(),o=t.is(n),i=t.is(r);if(o||i){o=e.isBackward();let[l,s]=e.getCharacterOffsets();e=n.is(r),i=t.is(o?r:n),r=t.is(o?n:r),n=0;let a;e?(n=l>s?s:l,a=l>s?l:s):i?(n=o?s:l,a=void 0):r&&(o=o?l:s,n=0,a=o),t.__text=t.__text.slice(n,a)}}return t};Rt.$wrapNodes=function(e,t,n=null){var r=e.getNodes();let o=r.length;var i=e.anchor;if(o===0||o===1&&i.type==="element"&&i.getNode().getChildrenSize()===0){e=i.type==="text"?i.getNode().getParentOrThrow():i.getNode(),r=e.getChildren();let s=t();s.setFormat(e.getFormatType()),s.setIndent(e.getIndent()),r.forEach(a=>s.append(a)),n&&(s=n.append(s)),e.replace(s)}else{i=null;var l=[];for(let s=0;s<o;s++){let a=r[s];ne.$isRootOrShadowRoot(a)?(Sf(e,l,l.length,t,n),l=[],i=a):i===null||i!==null&&ne.$hasAncestor(a,i)?l.push(a):(Sf(e,l,l.length,t,n),l=[a])}Sf(e,l,l.length,t,n)}};Rt.createDOMRange=function(e,t,n,r,o){let i=t.getKey(),l=r.getKey(),s=document.createRange(),a=e.getElementByKey(i);if(e=e.getElementByKey(l),ne.$isTextNode(t)&&(a=ky(a)),ne.$isTextNode(r)&&(e=ky(e)),t===void 0||r===void 0||a===null||e===null)return null;a.nodeName==="BR"&&([a,n]=Ty(a)),e.nodeName==="BR"&&([e,o]=Ty(e)),t=a.firstChild,a===e&&t!=null&&t.nodeName==="BR"&&n===0&&o===0&&(o=1);try{s.setStart(a,n),s.setEnd(e,o)}catch{return null}return!s.collapsed||n===o&&i===l||(s.setStart(e,o),s.setEnd(a,n)),s};Rt.createRectsFromDOMRange=function(e,t){var n=e.getRootElement();if(n===null)return[];e=n.getBoundingClientRect(),n=getComputedStyle(n),n=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),t=Array.from(t.getClientRects());let r=t.length;t.sort((i,l)=>{let s=i.top-l.top;return 3>=Math.abs(s)?i.left-l.left:s});let o;for(let i=0;i<r;i++){let l=t[i],s=l.width+n===e.width;o&&o.top<=l.top&&o.top+o.height>l.top&&o.left+o.width>l.left||s?(t.splice(i--,1),r--):o=l}return t};Rt.getStyleObjectFromCSS=kc;Rt.trimTextContentFromAnchor=function(e,t,n){let r=t.getNode();if(ne.$isElementNode(r)){var o=r.getDescendantByIndex(t.offset);o!==null&&(r=o)}for(;0<n&&r!==null;){var i=r.getPreviousSibling(),l=0;if(i===null){o=r.getParentOrThrow();for(var s=o.getPreviousSibling();s===null;){if(o=o.getParent(),o===null){i=null;break}s=o.getPreviousSibling()}o!==null&&(l=o.isInline()?0:2,i=ne.$isElementNode(s)?s.getLastDescendant():s)}if(s=r.getTextContent(),s===""&&ne.$isElementNode(r)&&!r.isInline()&&(s=`
72
+
73
+ `),o=s.length,!ne.$isTextNode(r)||n>=o)s=r.getParent(),r.remove(),s==null||s.getChildrenSize()!==0||ne.$isRootNode(s)||s.remove(),n-=o+l,r=i;else{let a=r.getKey();l=e.getEditorState().read(()=>{const c=ne.$getNodeByKey(a);return ne.$isTextNode(c)&&c.isSimpleText()?c.getTextContent():null}),i=o-n;let u=s.slice(0,i);l!==null&&l!==s?(n=ne.$getPreviousSelection(),o=r,r.isSimpleText()?r.setTextContent(l):(o=ne.$createTextNode(l),r.replace(o)),ne.$isRangeSelection(n)&&n.isCollapsed()&&(n=n.anchor.offset,o.select(n,n))):r.isSimpleText()?(l=t.key===a,s=t.offset,s<n&&(s=o),n=l?s-n:0,o=l?s:i,l&&n===0?([n]=r.splitText(n,o),n.remove()):([,n]=r.splitText(n,o),n.remove())):(n=ne.$createTextNode(u),r.replace(n)),n=0}}};const Hb=Rt;var Oo=Hb,Kb=Oo,at=ge;function Gb(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Uw(e,t){for(let n of t)if(e.type.startsWith(n))return!0;return!1}function Vw(e,t){for(;e!==at.$getRoot()&&e!=null;){if(t(e))return e;e=e.getParent()}return null}dt.$splitNode=at.$splitNode;dt.isHTMLAnchorElement=at.isHTMLAnchorElement;dt.isHTMLElement=at.isHTMLElement;dt.$dfs=function(e,t){let n=[];e=(e||at.$getRoot()).getLatest(),t=t||(at.$isElementNode(e)?e.getLastDescendant():e);for(var r=e,o=0;(r=r.getParent())!==null;)o++;for(r=o;e!==null&&!e.is(t);)if(n.push({depth:r,node:e}),at.$isElementNode(e)&&0<e.getChildrenSize())e=e.getFirstChild(),r++;else for(o=null;o===null&&e!==null;)o=e.getNextSibling(),o===null?(e=e.getParent(),r--):e=o;return e!==null&&e.is(t)&&n.push({depth:r,node:e}),n};dt.$filter=function(e,t){let n=[];for(let r=0;r<e.length;r++){let o=t(e[r]);o!==null&&n.push(o)}return n};dt.$findMatchingParent=Vw;dt.$getNearestBlockElementAncestorOrThrow=function(e){let t=Vw(e,n=>at.$isElementNode(n)&&!n.isInline());return at.$isElementNode(t)||Gb(4,e.__key),t};dt.$getNearestNodeOfType=function(e,t){for(;e!=null;){if(e instanceof t)return e;e=e.getParent()}return null};dt.$insertFirst=function(e,t){let n=e.getFirstChild();n!==null?n.insertBefore(t):e.append(t)};dt.$insertNodeToNearestRoot=function(e){var t=at.$getSelection()||at.$getPreviousSelection();if(at.$isRangeSelection(t)){var{focus:n}=t;if(t=n.getNode(),n=n.offset,at.$isRootOrShadowRoot(t))n=t.getChildAtIndex(n),n==null?t.append(e):n.insertBefore(e),e.selectNext();else{let r,o;at.$isTextNode(t)?(r=t.getParentOrThrow(),o=t.getIndexWithinParent(),0<n&&(o+=1,t.splitText(n))):(r=t,o=n),[,t]=at.$splitNode(r,o),t.insertBefore(e),t.selectStart()}}else at.$isNodeSelection(t)||at.DEPRECATED_$isGridSelection(t)?(t=t.getNodes(),t[t.length-1].getTopLevelElementOrThrow().insertAfter(e)):at.$getRoot().append(e),t=at.$createParagraphNode(),e.insertAfter(t),t.select();return e.getLatest()};dt.$restoreEditorState=function(e,t){let n=new Map,r=e._pendingEditorState;for(let[o,i]of t._nodeMap){let l=Kb.$cloneWithProperties(i);at.$isTextNode(l)&&(l.__text=i.__text),n.set(o,l)}r&&(r._nodeMap=n),e._dirtyType=2,e=t._selection,at.$setSelection(e===null?null:e.clone())};dt.$wrapNodeInElement=function(e,t){return t=t(),e.replace(t),t.append(e),t};dt.addClassNamesToElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&(n=n.split(" ").filter(r=>r!==""),e.classList.add(...n))})};dt.isMimeType=Uw;dt.mediaFileReader=function(e,t){let n=e[Symbol.iterator]();return new Promise((r,o)=>{let i=[],l=()=>{const{done:s,value:a}=n.next();if(s)return r(i);const u=new FileReader;u.addEventListener("error",o),u.addEventListener("load",()=>{const c=u.result;typeof c=="string"&&i.push({file:a,result:c}),l()}),Uw(a,t)?u.readAsDataURL(a):l()};l()})};dt.mergeRegister=function(...e){return()=>{e.forEach(t=>t())}};dt.objectKlassEquals=function(e,t){return e!==null?Object.getPrototypeOf(e).constructor.name===t.name:!1};dt.registerNestedElementResolver=function(e,t,n,r){return e.registerNodeTransform(t,o=>{e:{for(var i=o.getChildren(),l=0;l<i.length;l++)if(i[l]instanceof t){i=null;break e}for(i=o;i!==null;)if(l=i,i=i.getParent(),i instanceof t){i={child:l,parent:i};break e}i=null}if(i!==null){const{child:s,parent:a}=i;if(s.is(o)){if(r(a,o),o=s.getNextSiblings(),i=o.length,a.insertAfter(s),i!==0){l=n(a),s.insertAfter(l);for(let u=0;u<i;u++)l.append(o[u])}a.canBeEmpty()||a.getChildrenSize()!==0||a.remove()}}})};dt.removeClassNamesFromElement=function(e,...t){t.forEach(n=>{typeof n=="string"&&e.classList.remove(...n.split(" "))})};const Yb=dt;var Nt=Yb,Ne=ge,Ao=Nt;function kl(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Hw(e){let t=1;for(e=e.getParent();e!=null;){if(Ze(e)){if(e=e.getParent(),xe(e)){t++,e=e.getParent();continue}kl(40)}break}return t}function rp(e){e=e.getParent(),xe(e)||kl(40);let t=e;for(;t!==null;)t=t.getParent(),xe(t)&&(e=t);return e}function Kw(e){let t=[];e=e.getChildren().filter(Ze);for(let n=0;n<e.length;n++){let r=e[n],o=r.getFirstChild();xe(o)?t=t.concat(Kw(o)):t.push(r)}return t}function ar(e){return Ze(e)&&xe(e.getFirstChild())}function Xb(e){for(;e.getNextSibling()==null&&e.getPreviousSibling()==null;){let t=e.getParent();if(t==null||!Ze(e)&&!xe(e))break;e=t}e.remove()}function Ny(e){return Sn().append(e)}function Gw(e,t){return Ze(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function pi(e,t){e.splice(e.getChildrenSize(),0,t)}function by(e,t){if(xe(e))return e;let n=e.getPreviousSibling(),r=e.getNextSibling(),o=Sn();return o.setFormat(e.getFormatType()),o.setIndent(e.getIndent()),pi(o,e.getChildren()),xe(n)&&t===n.getListType()?(n.append(o),e.remove(),xe(r)&&t===r.getListType()&&(pi(n,r.getChildren()),r.remove()),n):xe(r)&&t===r.getListType()?(r.getFirstChildOrThrow().insertBefore(o),e.remove(),r):(t=en(t),t.append(o),e.replace(t),Yt(t),t)}function Yw(e,t){var n=e.getLastChild();let r=t.getFirstChild();n&&r&&ar(n)&&ar(r)&&(Yw(n.getFirstChild(),r.getFirstChild()),r.remove()),n=t.getChildren(),0<n.length&&(e.append(...n),Yt(e)),t.remove()}function Yt(e,t){if(e=t||e.getChildren(),e!==void 0)for(t=0;t<e.length;t++){let i=e[t];if(Ze(i)){let l=i.getValue();var n=i,r=n.getParent(),o=1;for(r!=null&&(xe(r)?o=r.getStart():kl(44)),n=n.getPreviousSiblings(),r=0;r<n.length;r++){let s=n[r];Ze(s)&&!xe(s.getFirstChild())&&o++}l!==o&&i.setValue(o)}}}function Qb(e){if(!ar(e)){var t=e.getParent(),n=t?t.getParent():void 0,r=n?n.getParent():void 0;if(xe(r)&&Ze(n)&&xe(t)){var o=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(o))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{var l=t.getListType();o=Sn();let s=en(l);o.append(s),e.getPreviousSiblings().forEach(a=>s.append(a)),i=Sn(),l=en(l),i.append(l),pi(l,e.getNextSiblings()),n.insertBefore(o),n.insertAfter(i),n.replace(e)}Yt(t),Yt(r)}}}let vd=class Xw extends Ne.ElementNode{static getType(){return"listitem"}static clone(t){return new Xw(t.__value,t.__checked,t.__key)}constructor(t,n,r){super(r),this.__value=t===void 0?1:t,this.__checked=n}createDOM(t){let n=document.createElement("li"),r=this.getParent();return xe(r)&&r.getListType()==="check"&&Py(n,this,null),n.value=this.__value,Ry(n,t.theme,this),n}updateDOM(t,n,r){let o=this.getParent();return xe(o)&&o.getListType()==="check"&&Py(n,this,t),n.value=this.__value,Ry(n,r.theme,this),!1}static transform(){return t=>{let n=t.getParent();xe(n)&&(Yt(n),n.getListType()!=="check"&&t.getChecked()!=null&&t.setChecked(void 0))}}static importDOM(){return{li:()=>({conversion:Jb,priority:0})}}static importJSON(t){let n=Sn();return n.setChecked(t.checked),n.setValue(t.value),n.setFormat(t.format),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),type:"listitem",value:this.getValue(),version:1}}append(...t){for(let n=0;n<t.length;n++){let r=t[n];if(Ne.$isElementNode(r)&&this.canMergeWith(r)){let o=r.getChildren();this.append(...o),r.remove()}else super.append(r)}return this}replace(t,n){if(Ze(t))return super.replace(t);this.setIndent(0);let r=this.getParentOrThrow();if(!xe(r))return t;if(r.__first===this.getKey())r.insertBefore(t);else if(r.__last===this.getKey())r.insertAfter(t);else{let o=en(r.getListType()),i=this.getNextSibling();for(;i;){let l=i;i=i.getNextSibling(),o.append(l)}r.insertAfter(t),t.insertAfter(o)}return n&&this.getChildren().forEach(o=>{t.append(o)}),this.remove(),r.getChildrenSize()===0&&r.remove(),t}insertAfter(t,n=!0){var r=this.getParentOrThrow();xe(r)||kl(39);var o=this.getNextSiblings();if(Ze(t))return n=super.insertAfter(t,n),t=t.getParentOrThrow(),xe(t)&&Yt(t),n;if(xe(t)){for(r=t,t=t.getChildren(),o=t.length-1;0<=o;o--)r=t[o],this.insertAfter(r,n);return r}if(r.insertAfter(t,n),o.length!==0){let i=en(r.getListType());o.forEach(l=>i.append(l)),t.insertAfter(i,n)}return t}remove(t){let n=this.getPreviousSibling(),r=this.getNextSibling();super.remove(t),n&&r&&ar(n)&&ar(r)?(Yw(n.getFirstChild(),r.getFirstChild()),r.remove()):r&&(t=r.getParent(),xe(t)&&Yt(t))}insertNewAfter(t,n=!0){return t=Sn(this.__checked==null?void 0:!1),this.insertAfter(t,n),t}collapseAtStart(t){let n=Ne.$createParagraphNode();this.getChildren().forEach(l=>n.append(l));var r=this.getParentOrThrow(),o=r.getParentOrThrow();let i=Ze(o);return r.getChildrenSize()===1?i?(r.remove(),o.select()):(r.insertBefore(n),r.remove(),r=t.anchor,t=t.focus,o=n.getKey(),r.type==="element"&&r.getNode().is(this)&&r.set(o,r.offset,"element"),t.type==="element"&&t.getNode().is(this)&&t.set(o,t.offset,"element")):(r.insertBefore(n),this.remove()),!0}getValue(){return this.getLatest().__value}setValue(t){this.getWritable().__value=t}getChecked(){return this.getLatest().__checked}setChecked(t){this.getWritable().__checked=t}toggleChecked(){this.setChecked(!this.__checked)}getIndent(){var t=this.getParent();if(t===null)return this.getLatest().__indent;t=t.getParentOrThrow();let n=0;for(;Ze(t);)t=t.getParentOrThrow().getParentOrThrow(),n++;return n}setIndent(t){typeof t=="number"&&-1<t||kl(117);let n=this.getIndent();for(;n!==t;)if(n<t){e:{var r=new Set;if(ar(this)||r.has(this.getKey()))break e;let s=this.getParent();var o=this.getNextSibling(),i=this.getPreviousSibling();if(ar(o)&&ar(i)){if(i=i.getFirstChild(),xe(i)){i.append(this);var l=o.getFirstChild();xe(l)&&(l=l.getChildren(),pi(i,l),o.remove(),r.add(o.getKey())),Yt(i)}}else ar(o)?(o=o.getFirstChild(),xe(o)&&(r=o.getFirstChild(),r!==null&&r.insertBefore(this),Yt(o))):ar(i)?(o=i.getFirstChild(),xe(o)&&(o.append(this),Yt(o))):xe(s)&&(r=Sn(),l=en(s.getListType()),r.append(l),l.append(this),i?i.insertAfter(r):o?o.insertBefore(r):s.append(r),Yt(l));xe(s)&&Yt(s)}n++}else Qb(this),n--;return this}insertBefore(t){if(Ze(t)){let n=this.getParentOrThrow();if(xe(n)){let r=this.getNextSiblings();Yt(n,r)}}return super.insertBefore(t)}canInsertAfter(t){return Ze(t)}canReplaceWith(t){return Ze(t)}canMergeWith(t){return Ne.$isParagraphNode(t)||Ze(t)}extractWithChild(t,n){if(!Ne.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&this.getTextContent().length===n.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return en("bullet")}};function Ry(e,t,n){let r=[],o=[];var i=(t=t.list)?t.listitem:void 0;if(t&&t.nested)var l=t.nested.listitem;if(i!==void 0&&(i=i.split(" "),r.push(...i)),t){i=n.getParent(),i=xe(i)&&i.getListType()==="check";let s=n.getChecked();i&&!s||o.push(t.listitemUnchecked),i&&s||o.push(t.listitemChecked),i&&r.push(s?t.listitemChecked:t.listitemUnchecked)}l!==void 0&&(l=l.split(" "),n.getChildren().some(s=>xe(s))?r.push(...l):o.push(...l)),0<o.length&&Ao.removeClassNamesFromElement(e,...o),0<r.length&&Ao.addClassNamesToElement(e,...r)}function Py(e,t,n){xe(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),n&&t.__checked===n.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}function Jb(e){return e=Ao.isHTMLElement(e)&&e.getAttribute("aria-checked")==="true",{node:Sn(e)}}function Sn(e){return Ne.$applyNodeReplacement(new vd(void 0,e))}function Ze(e){return e instanceof vd}let Zg=class Qw extends Ne.ElementNode{static getType(){return"list"}static clone(t){return new Qw(t.__listType||My[t.__tag],t.__start,t.__key)}constructor(t,n,r){super(r),this.__listType=t=My[t]||t,this.__tag=t==="number"?"ol":"ul",this.__start=n}getTag(){return this.__tag}setListType(t){let n=this.getWritable();n.__listType=t,n.__tag=t==="number"?"ol":"ul"}getListType(){return this.__listType}getStart(){return this.__start}createDOM(t){let n=document.createElement(this.__tag);return this.__start!==1&&n.setAttribute("start",String(this.__start)),n.__lexicalListType=this.__listType,Oy(n,t.theme,this),n}updateDOM(t,n,r){return t.__tag!==this.__tag?!0:(Oy(n,r.theme,this),!1)}static importDOM(){return{ol:()=>({conversion:Ay,priority:0}),ul:()=>({conversion:Ay,priority:0})}}static importJSON(t){let n=en(t.listType,t.start);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportDOM(t){return{element:t}=super.exportDOM(t),t&&Ao.isHTMLElement(t)&&(this.__start!==1&&t.setAttribute("start",String(this.__start)),this.__listType==="check"&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag(),type:"list",version:1}}canBeEmpty(){return!1}canIndent(){return!1}append(...t){for(let r=0;r<t.length;r++){var n=t[r];if(Ze(n))super.append(n);else{let o=Sn();xe(n)||Ne.$isElementNode(n)&&(n=Ne.$createTextNode(n.getTextContent())),o.append(n),super.append(o)}}return Yt(this),this}extractWithChild(t){return Ze(t)}};function Oy(e,t,n){let r=[],o=[];var i=t.list;if(i!==void 0){let s=i[`${n.__tag}Depth`]||[];t=Hw(n)-1;let a=t%s.length;var l=s[a];let u=i[n.__tag],c;if(i=i.nested,i!==void 0&&i.list&&(c=i.list),u!==void 0&&r.push(u),l!==void 0)for(l=l.split(" "),r.push(...l),l=0;l<s.length;l++)l!==a&&o.push(n.__tag+l);c!==void 0&&(n=c.split(" "),1<t?r.push(...n):o.push(...n))}0<o.length&&Ao.removeClassNamesFromElement(e,...o),0<r.length&&Ao.addClassNamesToElement(e,...r)}function Zb(e){let t=[];for(let r=0;r<e.length;r++){var n=e[r];Ze(n)?(t.push(n),n=n.getChildren(),1<n.length&&n.forEach(o=>{xe(o)&&t.push(Ny(o))})):t.push(Ny(n))}return t}function Ay(e){let t=e.nodeName.toLowerCase(),n=null;return t==="ol"?n=en("number",e.start):t==="ul"&&(n=Ao.isHTMLElement(e)&&e.getAttribute("__lexicallisttype")==="check"?en("check"):en("bullet")),{after:Zb,node:n}}let My={ol:"number",ul:"bullet"};function en(e,t=1){return Ne.$applyNodeReplacement(new Zg(e,t))}function xe(e){return e instanceof Zg}let qb=Ne.createCommand("INSERT_UNORDERED_LIST_COMMAND"),e2=Ne.createCommand("INSERT_ORDERED_LIST_COMMAND"),t2=Ne.createCommand("INSERT_CHECK_LIST_COMMAND"),n2=Ne.createCommand("REMOVE_LIST_COMMAND");ln.$createListItemNode=Sn;ln.$createListNode=en;ln.$getListDepth=Hw;ln.$handleListInsertParagraph=function(){var e=Ne.$getSelection();if(!Ne.$isRangeSelection(e)||!e.isCollapsed()||(e=e.anchor.getNode(),!Ze(e)||e.getChildrenSize()!==0))return!1;var t=rp(e),n=e.getParent();xe(n)||kl(40);let r=n.getParent(),o;if(Ne.$isRootOrShadowRoot(r))o=Ne.$createParagraphNode(),t.insertAfter(o);else if(Ze(r))o=Sn(),r.insertAfter(o);else return!1;if(o.select(),t=e.getNextSiblings(),0<t.length){let i=en(n.getListType());Ne.$isParagraphNode(o)?o.insertAfter(i):(n=Sn(),n.append(i),o.insertAfter(n)),t.forEach(l=>{l.remove(),i.append(l)})}return Xb(e),!0};ln.$isListItemNode=Ze;ln.$isListNode=xe;ln.INSERT_CHECK_LIST_COMMAND=t2;ln.INSERT_ORDERED_LIST_COMMAND=e2;ln.INSERT_UNORDERED_LIST_COMMAND=qb;ln.ListItemNode=vd;ln.ListNode=Zg;ln.REMOVE_LIST_COMMAND=n2;ln.insertList=function(e,t){e.update(()=>{var n=Ne.$getSelection();if(Ne.$isRangeSelection(n)||Ne.DEPRECATED_$isGridSelection(n)){var r=n.getNodes();n=n.anchor.getNode();var o=n.getParent();if(Gw(n,r))r=en(t),Ne.$isRootOrShadowRoot(o)?(n.replace(r),o=Sn(),Ne.$isElementNode(n)&&(o.setFormat(n.getFormatType()),o.setIndent(n.getIndent())),r.append(o)):Ze(n)&&(n=n.getParentOrThrow(),pi(r,n.getChildren()),n.replace(r));else for(n=new Set,o=0;o<r.length;o++){var i=r[o];if(Ne.$isElementNode(i)&&i.isEmpty()&&!n.has(i.getKey()))by(i,t);else if(Ne.$isLeafNode(i))for(i=i.getParent();i!=null;){let s=i.getKey();if(xe(i)){if(!n.has(s)){var l=en(t);pi(l,i.getChildren()),i.replace(l),Yt(l),n.add(s)}break}else{if(l=i.getParent(),Ne.$isRootOrShadowRoot(l)&&!n.has(s)){n.add(s),by(i,t);break}i=l}}}}})};ln.removeList=function(e){e.update(()=>{let t=Ne.$getSelection();if(Ne.$isRangeSelection(t)){var n=new Set,r=t.getNodes(),o=t.anchor.getNode();if(Gw(o,r))n.add(rp(o));else for(o=0;o<r.length;o++){var i=r[o];Ne.$isLeafNode(i)&&(i=Ao.$getNearestNodeOfType(i,vd),i!=null&&n.add(rp(i)))}for(let l of n){n=l,r=Kw(l);for(let s of r)r=Ne.$createParagraphNode(),pi(r,s.getChildren()),n.insertAfter(r),n=r,s.__key===t.anchor.key&&t.anchor.set(r.getKey(),0,"element"),s.__key===t.focus.key&&t.focus.set(r.getKey(),0,"element"),s.remove();l.remove()}}})};const r2=ln;var fo=r2,Jw={},yd={},Zw=p;function o2(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let qw=Zw.createContext(null);yd.LexicalComposerContext=qw;yd.createLexicalComposerContext=function(e,t){let n=null;return e!=null&&(n=e[1]),{getTheme:function(){return t??(n!=null?n.getTheme():null)}}};yd.useLexicalComposerContext=function(){let e=Zw.useContext(qw);return e==null&&o2(8),e};const i2=yd;var nr=i2,Dy=nr,_s=ge,Tc=p;let eS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";var l2=eS?Tc.useLayoutEffect:Tc.useEffect;let fu={tag:"history-merge"};function s2(e,t){if(t!==null){if(t===void 0)e.update(()=>{var n=_s.$getRoot();if(n.isEmpty()){let r=_s.$createParagraphNode();n.append(r),n=eS?document.activeElement:null,(_s.$getSelection()!==null||n!==null&&n===e.getRootElement())&&r.select()}},fu);else if(t!==null)switch(typeof t){case"string":let n=e.parseEditorState(t);e.setEditorState(n,fu);break;case"object":e.setEditorState(t,fu);break;case"function":e.update(()=>{_s.$getRoot().isEmpty()&&t(e)},fu)}}}Jw.LexicalComposer=function({initialConfig:e,children:t}){let n=Tc.useMemo(()=>{const{theme:r,namespace:o,editor__DEPRECATED:i,nodes:l,onError:s,editorState:a}=e,u=Dy.createLexicalComposerContext(null,r);let c=i||null;if(c===null){const d=_s.createEditor({editable:e.editable,namespace:o,nodes:l,onError:f=>s(f,d),theme:r});s2(d,a),c=d}return[c,u]},[]);return l2(()=>{let r=e.editable,[o]=n;o.setEditable(r!==void 0?r:!0)},[]),Tc.createElement(Dy.LexicalComposerContext.Provider,{value:n},t)};const a2=Jw;var u2=a2,zs=p;function op(e,t){return op=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},op(e,t)}function c2(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,op(e,t)}function d2(e,t){return e===void 0&&(e=[]),t===void 0&&(t=[]),e.length!==t.length||e.some(function(n,r){return!Object.is(n,t[r])})}var Ly={error:null},f2=function(e){function t(){for(var r,o=arguments.length,i=Array(o),l=0;l<o;l++)i[l]=arguments[l];return r=e.call.apply(e,[this].concat(i))||this,r.state=Ly,r.resetErrorBoundary=function(){for(var s,a=arguments.length,u=Array(a),c=0;c<a;c++)u[c]=arguments[c];r.props.onReset==null||(s=r.props).onReset.apply(s,u),r.reset()},r}c2(t,e),t.getDerivedStateFromError=function(r){return{error:r}};var n=t.prototype;return n.reset=function(){this.setState(Ly)},n.componentDidCatch=function(r,o){var i,l;(i=(l=this.props).onError)==null||i.call(l,r,o)},n.componentDidUpdate=function(r,o){var i=this.props.resetKeys;if(this.state.error!==null&&o.error!==null&&d2(r.resetKeys,i)){var l,s;(l=(s=this.props).onResetKeysChange)==null||l.call(s,r.resetKeys,i),this.reset()}},n.render=function(){var r=this.state.error,o=this.props,i=o.fallbackRender,l=o.FallbackComponent;if(o=o.fallback,r!==null){if(r={error:r,resetErrorBoundary:this.resetErrorBoundary},zs.isValidElement(o))return o;if(typeof i=="function")return i(r);if(l)return zs.createElement(l,r);throw Error("react-error-boundary requires either a fallback, fallbackRender, or FallbackComponent prop")}return this.props.children},t}(zs.Component),h2=function({children:e,onError:t}){return zs.createElement(f2,{fallback:zs.createElement("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"}},"An error was thrown."),onError:t},e)};const p2=h2;var g2=p2;const m2=$a(g2);var qg={},em={},v2=Nt,ze=ge;function y2(e,t,n,r,o){if(e===null||n.size===0&&r.size===0&&!o)return 0;var i=t._selection,l=e._selection;if(o)return 1;if(!(ze.$isRangeSelection(i)&&ze.$isRangeSelection(l)&&l.isCollapsed()&&i.isCollapsed()))return 0;o=t._nodeMap;let s=[];for(let a of n)n=o.get(a),n!==void 0&&s.push(n);for(let[a,u]of r)u&&(r=o.get(a),r===void 0||ze.$isRootNode(r)||s.push(r));return s.length===0?0:1<s.length?(r=t._nodeMap,t=r.get(i.anchor.key),l=r.get(l.anchor.key),t&&l&&!e._nodeMap.has(t.__key)&&ze.$isTextNode(t)&&t.__text.length===1&&i.anchor.offset===1?2:0):(t=s[0],e=e._nodeMap.get(t.__key),!ze.$isTextNode(e)||!ze.$isTextNode(t)||e.__mode!==t.__mode||(e=e.__text,t=t.__text,e===t)||(i=i.anchor,l=l.anchor,i.key!==l.key||i.type!=="text")?0:(i=i.offset,l=l.offset,e=t.length-e.length,e===1&&l===i-1?2:e===-1&&l===i+1?3:e===-1&&l===i?4:0))}function x2(e,t){let n=Date.now(),r=0;return(o,i,l,s,a,u)=>{let c=Date.now();if(u.has("historic"))return r=0,n=c,2;let d=y2(o,i,s,a,e.isComposing()),f=(()=>{var h=l===null||l.editor===e,g=u.has("history-push");if(!g&&h&&u.has("history-merge"))return 0;if(o===null)return 1;var m=i._selection;if(!(0<s.size||0<a.size))return m!==null?0:2;if(g===!1&&d!==0&&d===r&&c<n+t&&h)return 0;if(s.size===1){{g=Array.from(s)[0],h=o._nodeMap.get(g),g=i._nodeMap.get(g),m=o._selection;let S=i._selection,v=!1;ze.$isRangeSelection(m)&&ze.$isRangeSelection(S)&&(v=m.anchor.type==="element"&&m.focus.type==="element"&&S.anchor.type==="text"&&S.focus.type==="text"),h=!v&&ze.$isTextNode(h)&&ze.$isTextNode(g)?h.__type===g.__type&&h.__text===g.__text&&h.__mode===g.__mode&&h.__detail===g.__detail&&h.__style===g.__style&&h.__format===g.__format&&h.__parent===g.__parent:!1}if(h)return 0}return 1})();return n=c,r=d,f}}em.createEmptyHistoryState=function(){return{current:null,redoStack:[],undoStack:[]}};em.registerHistory=function(e,t,n){let r=x2(e,n);n=({editorState:l,prevEditorState:s,dirtyLeaves:a,dirtyElements:u,tags:c})=>{const d=t.current,f=t.redoStack,h=t.undoStack,g=d===null?null:d.editorState;if(d===null||l!==g){if(s=r(s,l,d,a,u,c),s===1)f.length!==0&&(t.redoStack=[],e.dispatchCommand(ze.CAN_REDO_COMMAND,!1)),d!==null&&(h.push({...d}),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!0));else if(s===2)return;t.current={editor:e,editorState:l}}};let o=v2.mergeRegister(e.registerCommand(ze.UNDO_COMMAND,()=>{let l=t.redoStack,s=t.undoStack;if(s.length!==0){let a=t.current,u=s.pop();a!==null&&(l.push(a),e.dispatchCommand(ze.CAN_REDO_COMMAND,!0)),s.length===0&&e.dispatchCommand(ze.CAN_UNDO_COMMAND,!1),t.current=u||null,u&&u.editor.setEditorState(u.editorState,{tag:"historic"})}return!0},ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.REDO_COMMAND,()=>{let l=t.redoStack;var s=t.undoStack;if(l.length!==0){let a=t.current;a!==null&&(s.push(a),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!0)),s=l.pop(),l.length===0&&e.dispatchCommand(ze.CAN_REDO_COMMAND,!1),t.current=s||null,s&&s.editor.setEditorState(s.editorState,{tag:"historic"})}return!0},ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.CLEAR_EDITOR_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,!1),ze.COMMAND_PRIORITY_EDITOR),e.registerCommand(ze.CLEAR_HISTORY_COMMAND,()=>(t.undoStack=[],t.redoStack=[],t.current=null,e.dispatchCommand(ze.CAN_REDO_COMMAND,!1),e.dispatchCommand(ze.CAN_UNDO_COMMAND,!1),!0),ze.COMMAND_PRIORITY_EDITOR),e.registerUpdateListener(n)),i=e.registerUpdateListener(n);return()=>{o(),i()}};const _2=em;var w2=_2,S2=nr,ip=w2,Iy=p;function E2(e,t,n=1e3){let r=Iy.useMemo(()=>t||ip.createEmptyHistoryState(),[t]);Iy.useEffect(()=>ip.registerHistory(e,r,n),[n,e,r])}qg.createEmptyHistoryState=ip.createEmptyHistoryState;qg.HistoryPlugin=function({externalHistoryState:e}){let[t]=S2.useLexicalComposerContext();return E2(t,e),null};const C2=qg;var $2=C2,tS={},k2=nr,Fs=p,T2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Fs.useLayoutEffect:Fs.useEffect;function N2(e){let[t]=k2.useLexicalComposerContext(),n=Fs.useMemo(()=>e(t),[t,e]),r=Fs.useRef(n.initialValueFn()),[o,i]=Fs.useState(r.current);return T2(()=>{let{initialValueFn:l,subscribe:s}=n,a=l();return r.current!==a&&(r.current=a,i(a)),s(u=>{r.current=u,i(u)})},[n,e]),o}function b2(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}var R2=function(){return N2(b2)};const P2=R2;var O2=P2,Fo={},Xt=ge;function tm(e,t=!0){return e?!1:(e=nS(),t&&(e=e.trim()),e==="")}function nS(){return Xt.$getRoot().getTextContent()}function rS(e){if(!tm(e,!1))return!1;e=Xt.$getRoot().getChildren();let t=e.length;if(1<t)return!1;for(let r=0;r<t;r++){var n=e[r];if(Xt.$isDecoratorNode(n))return!1;if(Xt.$isElementNode(n)){if(!Xt.$isParagraphNode(n)||n.__indent!==0)return!1;n=n.getChildren();let o=n.length;for(let i=0;i<o;i++)if(!Xt.$isTextNode(n[r]))return!1}}return!0}Fo.$canShowPlaceholder=rS;Fo.$canShowPlaceholderCurry=function(e){return()=>rS(e)};Fo.$findTextIntersectionFromCharacters=function(e,t){var n=e.getFirstChild();e=0;e:for(;n!==null;){if(Xt.$isElementNode(n)){var r=n.getFirstChild();if(r!==null){n=r;continue}}else if(Xt.$isTextNode(n)){if(r=n.getTextContentSize(),e+r>t)return{node:n,offset:t-e};e+=r}if(r=n.getNextSibling(),r!==null)n=r;else{for(n=n.getParent();n!==null;){if(r=n.getNextSibling(),r!==null){n=r;continue e}n=n.getParent()}break}}return null};Fo.$isRootTextContentEmpty=tm;Fo.$isRootTextContentEmptyCurry=function(e,t){return()=>tm(e,t)};Fo.$rootTextContent=nS;Fo.registerLexicalTextEntity=function(e,t,n,r){let o=l=>{const s=Xt.$createTextNode(l.getTextContent());s.setFormat(l.getFormat()),l.replace(s)},i=e.registerNodeTransform(Xt.TextNode,l=>{if(l.isSimpleText()){var s=l.getPreviousSibling(),a=l.getTextContent(),u=l;if(Xt.$isTextNode(s)){var c=s.getTextContent(),d=t(c+a);if(s instanceof n){if(d===null||s.getLatest().__mode!==0){o(s);return}if(d=d.end-c.length,0<d){u=a.slice(0,d),u=c+u,s.select(),s.setTextContent(u),d===a.length?l.remove():(s=a.slice(d),l.setTextContent(s));return}}else if(d===null||d.start<c.length)return}for(;;){if(l=t(a),a=d=l===null?"":a.slice(l.end),d===""){if(c=u.getNextSibling(),Xt.$isTextNode(c)){if(d=u.getTextContent()+c.getTextContent(),d=t(d),d===null){c instanceof n?o(c):c.markDirty();break}else if(d.start!==0)break}}else if(c=t(d),c!==null&&c.start===0)break;if(l===null)break;if(l.start===0&&Xt.$isTextNode(s)&&s.isTextEntity())continue;let f;if(l.start===0?[f,u]=u.splitText(l.end):[,f,u]=u.splitText(l.start,l.end),l=r(f),l.setFormat(f.getFormat()),f.replace(l),u==null)break}}});return e=e.registerNodeTransform(n,l=>{var s=l.getTextContent();const a=t(s);a===null||a.start!==0?o(l):s.length>a.end?l.splitText(a.end):(s=l.getPreviousSibling(),Xt.$isTextNode(s)&&s.isTextEntity()&&(o(s),o(l)),s=l.getNextSibling(),Xt.$isTextNode(s)&&s.isTextEntity()&&(o(s),l instanceof n&&o(l)))}),[i,e]};const A2=Fo;var M2=A2,oS={},hu=ge;oS.registerDragonSupport=function(e){let t=window.location.origin,n=r=>{if(r.origin===t){var o=e.getRootElement();if(document.activeElement===o&&(o=r.data,typeof o=="string")){try{var i=JSON.parse(o)}catch{return}if(i&&i.protocol==="nuanria_messaging"&&i.type==="request"&&(i=i.payload)&&i.functionId==="makeChanges"&&(i=i.args)){const[l,s,a,u,c]=i;e.update(()=>{const d=hu.$getSelection();if(hu.$isRangeSelection(d)){var f=d.anchor;let h=f.getNode(),g=0,m=0;hu.$isTextNode(h)&&0<=l&&0<=s&&(g=l,m=l+s,d.setTextNodeRange(h,g,h,m)),(g!==m||a!=="")&&(d.insertRawText(a),h=f.getNode()),hu.$isTextNode(h)&&(g=u,m=u+c,f=h.getTextContentSize(),g=g>f?f:g,m=m>f?f:m,d.setTextNodeRange(h,g,h,m)),r.stopImmediatePropagation()}})}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}};const D2=oS;var L2=D2,$r={},Yr={},nm={},jy=Oo,I2=Nt,tl=ge;function iS(e,t,n,r=null){let o=r!=null?t.isSelected(r):!0,i=tl.$isElementNode(t)&&t.excludeFromCopy("html");var l=t;r!==null&&(l=jy.$cloneWithProperties(t),l=tl.$isTextNode(l)&&r!=null?jy.$sliceSelectedTextNodeContent(r,l):l);let s=tl.$isElementNode(l)?l.getChildren():[],{element:a,after:u}=l.exportDOM(e);if(!a)return!1;let c=document.createDocumentFragment();for(let d=0;d<s.length;d++){let f=s[d],h=iS(e,f,c,r);!o&&tl.$isElementNode(t)&&h&&t.extractWithChild(f,r,"html")&&(o=!0)}return o&&!i?(I2.isHTMLElement(a)&&a.append(c),n.append(a),u&&(e=u.call(l,a))&&a.replaceWith(e)):n.append(c),o}let lS=new Set(["STYLE","SCRIPT"]);function sS(e,t,n=new Map,r){let o=[];if(lS.has(e.nodeName))return o;let i=null;var l,{nodeName:s}=e,a=t._htmlConversions.get(s.toLowerCase());if(s=null,a!==void 0)for(l of a)a=l(e),a!==null&&(s===null||s.priority<a.priority)&&(s=a);if(s=(l=s!==null?s.conversion:null)?l(e):null,l=null,s!==null){if(l=s.after,a=s.node,i=Array.isArray(a)?a[a.length-1]:a,i!==null){for(var[,u]of n)if(i=u(i,r),!i)break;i&&o.push(...Array.isArray(a)?a:[i])}s.forChild!=null&&n.set(e.nodeName,s.forChild)}for(e=e.childNodes,r=[],u=0;u<e.length;u++)r.push(...sS(e[u],t,new Map(n),i));return l!=null&&(r=l(r)),i==null?o=o.concat(r):tl.$isElementNode(i)&&i.append(...r),o}nm.$generateHtmlFromNodes=function(e,t){if(typeof document>"u"||typeof window>"u")throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let n=document.createElement("div"),r=tl.$getRoot().getChildren();for(let o=0;o<r.length;o++)iS(e,r[o],n,t);return n.innerHTML};nm.$generateNodesFromDOM=function(e,t){t=t.body?t.body.childNodes:[];let n=[];for(let o=0;o<t.length;o++){var r=t[o];lS.has(r.nodeName)||(r=sS(r,e),r!==null&&(n=n.concat(r)))}return n};const j2=nm;var z2=j2,aS=z2,lp=Oo,fl=Nt,ue=ge;function Ar(e){let t=new URLSearchParams;t.append("code",e);for(let n=1;n<arguments.length;n++)t.append("v",arguments[n]);throw Error(`Minified Lexical error #${e}; visit https://lexical.dev/docs/error?${t} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let uS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function cS(e){let t=ue.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return ue.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?"":aS.$generateHtmlFromNodes(e,t)}function dS(e){let t=ue.$getSelection();if(t==null)throw Error("Expected valid LexicalSelection");return ue.$isRangeSelection(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(hS(e,t))}function sp(e,t,n){(ue.DEPRECATED_$isGridSelection(n)||fl.$findMatchingParent(n.anchor.getNode(),r=>ue.DEPRECATED_$isGridCellNode(r))!==null&&fl.$findMatchingParent(n.focus.getNode(),r=>ue.DEPRECATED_$isGridCellNode(r))!==null)&&t.length===1&&ue.DEPRECATED_$isGridNode(t[0])?B2(t,n,!1,e):F2(t,n)}function F2(e,t){let n=[],r=null;for(let o=0;o<e.length;o++){let i=e[o],l=ue.$isLineBreakNode(i);if(l||ue.$isDecoratorNode(i)&&i.isInline()||ue.$isElementNode(i)&&i.isInline()||ue.$isTextNode(i)||i.isParentRequired()){if(r===null&&(r=i.createParentElementNode(),n.push(r),l))continue;r!==null&&r.append(i)}else n.push(i),r=null}ue.$isRangeSelection(t)?t.insertNodes(n):ue.DEPRECATED_$isGridSelection(t)&&(e=t.anchor.getNode(),ue.DEPRECATED_$isGridCellNode(e)||Ar(41),e.append(...n))}function B2(e,t,n,r){e.length===1&&ue.DEPRECATED_$isGridNode(e[0])||Ar(42);var o=e[0];e=o.getChildren(),n=o.getFirstChildOrThrow().getChildrenSize();var i=o.getChildrenSize(),l=fl.$findMatchingParent(t.anchor.getNode(),h=>ue.DEPRECATED_$isGridCellNode(h));t=(o=l&&fl.$findMatchingParent(l,h=>ue.DEPRECATED_$isGridRowNode(h)))&&fl.$findMatchingParent(o,h=>ue.DEPRECATED_$isGridNode(h)),ue.DEPRECATED_$isGridCellNode(l)&&ue.DEPRECATED_$isGridRowNode(o)&&ue.DEPRECATED_$isGridNode(t)||Ar(43);var s=o.getIndexWithinParent(),a=Math.min(t.getChildrenSize()-1,s+i-1);i=l.getIndexWithinParent(),l=Math.min(o.getChildrenSize()-1,i+n-1),n=Math.min(i,l),o=Math.min(s,a),i=Math.max(i,l),s=Math.max(s,a),a=t.getChildren(),l=0;let u,c;for(let h=o;h<=s;h++){var d=a[h];ue.DEPRECATED_$isGridRowNode(d)||Ar(24);var f=e[l];ue.DEPRECATED_$isGridRowNode(f)||Ar(24),d=d.getChildren(),f=f.getChildren();let g=0;for(let m=n;m<=i;m++){let S=d[m];ue.DEPRECATED_$isGridCellNode(S)||Ar(25);let v=f[g];ue.DEPRECATED_$isGridCellNode(v)||Ar(25),h===o&&m===n?u=S.getKey():h===s&&m===i&&(c=S.getKey());let y=S.getChildren();v.getChildren().forEach(x=>{ue.$isTextNode(x)&&ue.$createParagraphNode().append(x),S.append(x)}),y.forEach(x=>x.remove()),g++}l++}u&&c&&(e=ue.DEPRECATED_$createGridSelection(),e.set(t.getKey(),u,c),ue.$setSelection(e),r.dispatchCommand(ue.SELECTION_CHANGE_COMMAND,void 0))}function fS(e,t,n,r=[]){let o=t!=null?n.isSelected(t):!0,i=ue.$isElementNode(n)&&n.excludeFromCopy("html");var l=n;if(t!==null){var s=lp.$cloneWithProperties(n);l=s=ue.$isTextNode(s)&&t!=null?lp.$sliceSelectedTextNodeContent(t,s):s}let a=ue.$isElementNode(l)?l.getChildren():[];var u=l;s=u.exportJSON();var c=u.constructor;s.type!==c.getType()&&Ar(58,c.name);let d=s.children;for(ue.$isElementNode(u)&&(Array.isArray(d)||Ar(59,c.name)),ue.$isTextNode(l)&&(l=l.__text,0<l.length?s.text=l:o=!1),l=0;l<a.length;l++)u=a[l],c=fS(e,t,u,s.children),!o&&ue.$isElementNode(n)&&c&&n.extractWithChild(u,t,"clone")&&(o=!0);if(o&&!i)r.push(s);else if(Array.isArray(s.children))for(e=0;e<s.children.length;e++)r.push(s.children[e]);return o}function hS(e,t){let n=[],r=ue.$getRoot().getChildren();for(let o=0;o<r.length;o++)fS(e,t,r[o],n);return{namespace:e._config.namespace,nodes:n}}function pS(e){let t=[];for(let n=0;n<e.length;n++){let r=ue.$parseSerializedNode(e[n]);ue.$isTextNode(r)&&lp.$addNodeStyle(r),t.push(r)}return t}let Ai=null;function zy(e,t){var n=uS?(e._window||window).getSelection():null;if(!n)return!1;var r=n.anchorNode;if(n=n.focusNode,r!==null&&n!==null&&!ue.isSelectionWithinEditor(e,r,n)||(t.preventDefault(),t=t.clipboardData,r=ue.$getSelection(),t===null||r===null))return!1;n=cS(e),e=dS(e);let o="";return r!==null&&(o=r.getTextContent()),n!==null&&t.setData("text/html",n),e!==null&&t.setData("application/x-lexical-editor",e),t.setData("text/plain",o),!0}Yr.$generateJSONFromSelectedNodes=hS;Yr.$generateNodesFromSerializedNodes=pS;Yr.$getHtmlContent=cS;Yr.$getLexicalContent=dS;Yr.$insertDataTransferForPlainText=function(e,t){e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null&&t.insertRawText(e)};Yr.$insertDataTransferForRichText=function(e,t,n){var r=e.getData("application/x-lexical-editor");if(r)try{let l=JSON.parse(r);if(l.namespace===n._config.namespace&&Array.isArray(l.nodes)){let s=pS(l.nodes);return sp(n,s,t)}}catch{}if(r=e.getData("text/html"))try{var o=new DOMParser().parseFromString(r,"text/html"),i=aS.$generateNodesFromDOM(n,o);return sp(n,i,t)}catch{}if(e=e.getData("text/plain")||e.getData("text/uri-list"),e!=null)if(ue.$isRangeSelection(t))for(e=e.split(/(\r?\n|\t)/),n=e.length,o=0;o<n;o++)i=e[o],i===`
74
+ `||i===`\r
75
+ `?t.insertParagraph():i===" "?t.insertNodes([ue.$createTabNode()]):t.insertText(i);else t.insertRawText(e)};Yr.$insertGeneratedNodes=sp;Yr.copyToClipboard=async function(e,t){if(Ai!==null)return!1;if(t!==null)return new Promise(l=>{e.update(()=>{l(zy(e,t))})});var n=e.getRootElement();let r=e._window==null?window.document:e._window.document,o=uS?(e._window||window).getSelection():null;if(n===null||o===null)return!1;let i=r.createElement("span");return i.style.cssText="position: fixed; top: -1000px;",i.append(r.createTextNode("#")),n.append(i),n=new Range,n.setStart(i,0),n.setEnd(i,1),o.removeAllRanges(),o.addRange(n),new Promise(l=>{let s=e.registerCommand(ue.COPY_COMMAND,a=>(fl.objectKlassEquals(a,ClipboardEvent)&&(s(),Ai!==null&&(window.clearTimeout(Ai),Ai=null),l(zy(e,a))),!0),ue.COMMAND_PRIORITY_CRITICAL);Ai=window.setTimeout(()=>{s(),Ai=null,l(!1)},50),r.execCommand("copy"),i.remove()})};const W2=Yr;var U2=W2,Nc=U2,pu=Oo,dr=Nt,b=ge;function Fy(e,t){return typeof document.caretRangeFromPoint<"u"?(e=document.caretRangeFromPoint(e,t),e===null?null:{node:e.startContainer,offset:e.startOffset}):document.caretPositionFromPoint!=="undefined"?(e=document.caretPositionFromPoint(e,t),e===null?null:{node:e.offsetNode,offset:e.offset}):null}let Vl=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",V2=Vl&&"documentMode"in document?document.documentMode:null,H2=Vl&&"InputEvent"in window&&!V2?"getTargetRanges"in new window.InputEvent("input"):!1,K2=Vl&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),G2=Vl&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Y2=Vl&&/^(?=.*Chrome).*/i.test(navigator.userAgent),X2=Vl&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&!Y2,ap=b.createCommand("DRAG_DROP_PASTE_FILE"),rm=class gS extends b.ElementNode{static getType(){return"quote"}static clone(t){return new gS(t.__key)}constructor(t){super(t)}createDOM(t){let n=document.createElement("blockquote");return dr.addClassNamesToElement(n,t.theme.quote),n}updateDOM(){return!1}static importDOM(){return{blockquote:()=>({conversion:Q2,priority:0})}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&dr.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=om();return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),type:"quote"}}insertNewAfter(t,n){t=b.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=b.$createParagraphNode();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}};function om(){return b.$applyNodeReplacement(new rm)}let im=class mS extends b.ElementNode{static getType(){return"heading"}static clone(t){return new mS(t.__tag,t.__key)}constructor(t,n){super(n),this.__tag=t}getTag(){return this.__tag}createDOM(t){let n=this.__tag,r=document.createElement(n);return t=t.theme.heading,t!==void 0&&dr.addClassNamesToElement(r,t[n]),r}updateDOM(){return!1}static importDOM(){return{h1:()=>({conversion:Mi,priority:0}),h2:()=>({conversion:Mi,priority:0}),h3:()=>({conversion:Mi,priority:0}),h4:()=>({conversion:Mi,priority:0}),h5:()=>({conversion:Mi,priority:0}),h6:()=>({conversion:Mi,priority:0}),p:t=>(t=t.firstChild,t!==null&&By(t)?{conversion:()=>({node:null}),priority:3}:null),span:t=>By(t)?{conversion:()=>({node:nl("h1")}),priority:3}:null}}exportDOM(t){if({element:t}=super.exportDOM(t),t&&dr.isHTMLElement(t)){this.isEmpty()&&t.append(document.createElement("br"));var n=this.getFormatType();t.style.textAlign=n,(n=this.getDirection())&&(t.dir=n)}return{element:t}}static importJSON(t){let n=nl(t.tag);return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}exportJSON(){return{...super.exportJSON(),tag:this.getTag(),type:"heading",version:1}}insertNewAfter(t,n=!0){t=t?t.anchor.offset:0,t=0<t&&t<this.getTextContentSize()?nl(this.getTag()):b.$createParagraphNode();let r=this.getDirection();return t.setDirection(r),this.insertAfter(t,n),t}collapseAtStart(){let t=this.isEmpty()?b.$createParagraphNode():nl(this.getTag());return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}extractWithChild(){return!0}};function By(e){return e.nodeName.toLowerCase()==="span"?e.style.fontSize==="26pt":!1}function Mi(e){let t=e.nodeName.toLowerCase(),n=null;return(t==="h1"||t==="h2"||t==="h3"||t==="h4"||t==="h5"||t==="h6")&&(n=nl(t),e.style!==null&&n.setFormat(e.style.textAlign)),{node:n}}function Q2(e){let t=om();return e.style!==null&&t.setFormat(e.style.textAlign),{node:t}}function nl(e){return b.$applyNodeReplacement(new im(e))}function J2(e,t){e.preventDefault(),t.update(()=>{let n=b.$getSelection(),r=e instanceof InputEvent||e instanceof KeyboardEvent?null:e.clipboardData;r!=null&&(b.$isRangeSelection(n)||b.DEPRECATED_$isGridSelection(n))&&Nc.$insertDataTransferForRichText(r,n,t)},{tag:"paste"})}async function Z2(e,t){await Nc.copyToClipboard(t,dr.objectKlassEquals(e,ClipboardEvent)?e:null),t.update(()=>{let n=b.$getSelection();b.$isRangeSelection(n)?n.removeText():b.$isNodeSelection(n)&&n.getNodes().forEach(r=>r.remove())})}function ws(e){let t=null;if(e instanceof DragEvent?t=e.dataTransfer:e instanceof ClipboardEvent&&(t=e.clipboardData),t===null)return[!1,[],!1];var n=t.types;return e=n.includes("Files"),n=n.includes("text/html")||n.includes("text/plain"),[e,Array.from(t.files),n]}function Wy(e){var t=b.$getSelection();if(!b.$isRangeSelection(t))return!1;let n=new Set;t=t.getNodes();for(let i=0;i<t.length;i++){var r=t[i],o=r.getKey();n.has(o)||(r=dr.$getNearestBlockElementAncestorOrThrow(r),o=r.getKey(),r.canIndent()&&!n.has(o)&&(n.add(o),e(r)))}return 0<n.size}function gu(e){return e=b.$getNearestNodeFromDOMNode(e),b.$isDecoratorNode(e)}$r.$createHeadingNode=nl;$r.$createQuoteNode=om;$r.$isHeadingNode=function(e){return e instanceof im};$r.$isQuoteNode=function(e){return e instanceof rm};$r.DRAG_DROP_PASTE=ap;$r.HeadingNode=im;$r.QuoteNode=rm;$r.eventFiles=ws;$r.registerRichText=function(e){return dr.mergeRegister(e.registerCommand(b.CLICK_COMMAND,()=>{const t=b.$getSelection();return b.$isNodeSelection(t)?(t.clear(),!0):!1},0),e.registerCommand(b.DELETE_CHARACTER_COMMAND,t=>{const n=b.$getSelection();return b.$isRangeSelection(n)?(n.deleteCharacter(t),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.DELETE_WORD_COMMAND,t=>{const n=b.$getSelection();return b.$isRangeSelection(n)?(n.deleteWord(t),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.DELETE_LINE_COMMAND,t=>{const n=b.$getSelection();return b.$isRangeSelection(n)?(n.deleteLine(t),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.CONTROLLED_TEXT_INSERTION_COMMAND,t=>{const n=b.$getSelection();if(typeof t=="string")b.$isRangeSelection(n)?n.insertText(t):b.DEPRECATED_$isGridSelection(n);else{if(!b.$isRangeSelection(n)&&!b.DEPRECATED_$isGridSelection(n))return!1;const r=t.dataTransfer;r!=null?Nc.$insertDataTransferForRichText(r,n,e):b.$isRangeSelection(n)&&(t=t.data)&&n.insertText(t)}return!0},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.REMOVE_TEXT_COMMAND,()=>{const t=b.$getSelection();return b.$isRangeSelection(t)?(t.removeText(),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.FORMAT_TEXT_COMMAND,t=>{const n=b.$getSelection();return b.$isRangeSelection(n)?(n.formatText(t),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.FORMAT_ELEMENT_COMMAND,t=>{var n=b.$getSelection();if(!b.$isRangeSelection(n)&&!b.$isNodeSelection(n))return!1;n=n.getNodes();for(const r of n)n=dr.$findMatchingParent(r,o=>b.$isElementNode(o)&&!o.isInline()),n!==null&&n.setFormat(t);return!0},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.INSERT_LINE_BREAK_COMMAND,t=>{const n=b.$getSelection();return b.$isRangeSelection(n)?(n.insertLineBreak(t),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.INSERT_PARAGRAPH_COMMAND,()=>{const t=b.$getSelection();return b.$isRangeSelection(t)?(t.insertParagraph(),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.INSERT_TAB_COMMAND,()=>(b.$insertNodes([b.$createTabNode()]),!0),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.INDENT_CONTENT_COMMAND,()=>Wy(t=>{const n=t.getIndent();t.setIndent(n+1)}),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.OUTDENT_CONTENT_COMMAND,()=>Wy(t=>{const n=t.getIndent();0<n&&t.setIndent(n-1)}),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ARROW_UP_COMMAND,t=>{var n=b.$getSelection();if(b.$isNodeSelection(n)&&!gu(t.target)){if(t=n.getNodes(),0<t.length)return t[0].selectPrevious(),!0}else if(b.$isRangeSelection(n)&&(n=b.$getAdjacentNode(n.focus,!0),!t.shiftKey&&b.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline()))return n.selectPrevious(),t.preventDefault(),!0;return!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ARROW_DOWN_COMMAND,t=>{var n=b.$getSelection();if(b.$isNodeSelection(n)){if(t=n.getNodes(),0<t.length)return t[0].selectNext(0,0),!0}else if(b.$isRangeSelection(n)){let r=n.focus;if(r.key==="root"&&r.offset===b.$getRoot().getChildrenSize())return t.preventDefault(),!0;if(n=b.$getAdjacentNode(n.focus,!1),!t.shiftKey&&b.$isDecoratorNode(n)&&!n.isIsolated()&&!n.isInline())return n.selectNext(),t.preventDefault(),!0}return!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ARROW_LEFT_COMMAND,t=>{const n=b.$getSelection();if(b.$isNodeSelection(n)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectPrevious(),!0}return b.$isRangeSelection(n)&&pu.$shouldOverrideDefaultCharacterSelection(n,!0)?(r=t.shiftKey,t.preventDefault(),pu.$moveCharacter(n,r,!0),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ARROW_RIGHT_COMMAND,t=>{const n=b.$getSelection();if(b.$isNodeSelection(n)&&!gu(t.target)){var r=n.getNodes();if(0<r.length)return t.preventDefault(),r[0].selectNext(0,0),!0}return b.$isRangeSelection(n)?(r=t.shiftKey,pu.$shouldOverrideDefaultCharacterSelection(n,!1)?(t.preventDefault(),pu.$moveCharacter(n,r,!1),!0):!1):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_BACKSPACE_COMMAND,t=>{if(gu(t.target))return!1;const n=b.$getSelection();if(!b.$isRangeSelection(n))return!1;t.preventDefault(),{anchor:t}=n;const r=t.getNode();return n.isCollapsed()&&t.offset===0&&!b.$isRootNode(r)&&0<dr.$getNearestBlockElementAncestorOrThrow(r).getIndent()?e.dispatchCommand(b.OUTDENT_CONTENT_COMMAND,void 0):e.dispatchCommand(b.DELETE_CHARACTER_COMMAND,!0)},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_DELETE_COMMAND,t=>{if(gu(t.target))return!1;const n=b.$getSelection();return b.$isRangeSelection(n)?(t.preventDefault(),e.dispatchCommand(b.DELETE_CHARACTER_COMMAND,!1)):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ENTER_COMMAND,t=>{const n=b.$getSelection();if(!b.$isRangeSelection(n))return!1;if(t!==null){if((G2||K2||X2)&&H2)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(b.INSERT_LINE_BREAK_COMMAND,!1)}return e.dispatchCommand(b.INSERT_PARAGRAPH_COMMAND,void 0)},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.KEY_ESCAPE_COMMAND,()=>{const t=b.$getSelection();return b.$isRangeSelection(t)?(e.blur(),!0):!1},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.DROP_COMMAND,t=>{const[,n]=ws(t);if(0<n.length){var r=Fy(t.clientX,t.clientY);if(r!==null){const{offset:i,node:l}=r;var o=b.$getNearestNodeFromDOMNode(l);if(o!==null){if(r=b.$createRangeSelection(),b.$isTextNode(o))r.anchor.set(o.getKey(),i,"text"),r.focus.set(o.getKey(),i,"text");else{const s=o.getParentOrThrow().getKey();o=o.getIndexWithinParent()+1,r.anchor.set(s,o,"element"),r.focus.set(s,o,"element")}r=b.$normalizeSelection__EXPERIMENTAL(r),b.$setSelection(r)}e.dispatchCommand(ap,n)}return t.preventDefault(),!0}return t=b.$getSelection(),!!b.$isRangeSelection(t)},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.DRAGSTART_COMMAND,t=>{[t]=ws(t);const n=b.$getSelection();return!(t&&!b.$isRangeSelection(n))},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.DRAGOVER_COMMAND,t=>{var[n]=ws(t);const r=b.$getSelection();return n&&!b.$isRangeSelection(r)?!1:(n=Fy(t.clientX,t.clientY),n!==null&&(n=b.$getNearestNodeFromDOMNode(n.node),b.$isDecoratorNode(n)&&t.preventDefault()),!0)},b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.SELECT_ALL_COMMAND,()=>(b.$selectAll(),!0),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.COPY_COMMAND,t=>(Nc.copyToClipboard(e,dr.objectKlassEquals(t,ClipboardEvent)?t:null),!0),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.CUT_COMMAND,t=>(Z2(t,e),!0),b.COMMAND_PRIORITY_EDITOR),e.registerCommand(b.PASTE_COMMAND,t=>{const[,n,r]=ws(t);if(0<n.length&&!r)return e.dispatchCommand(ap,n),!0;if(b.isSelectionCapturedInDecoratorInput(t.target))return!1;const o=b.$getSelection();return b.$isRangeSelection(o)||b.DEPRECATED_$isGridSelection(o)?(J2(t,e),!0):!1},b.COMMAND_PRIORITY_EDITOR))};const q2=$r;var Bs=q2,vS=nr,eR=O2,Mn=p,tR=M2,yS=Nt,Uy=Hr,nR=L2,rR=Bs,lm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Mn.useLayoutEffect:Mn.useEffect;function Vy(e){return e.getEditorState().read(tR.$canShowPlaceholderCurry(e.isComposing()))}function oR(e){let[t,n]=Mn.useState(()=>Vy(e));return lm(()=>{function r(){let o=Vy(e);n(o)}return r(),yS.mergeRegister(e.registerUpdateListener(()=>{r()}),e.registerEditableListener(()=>{r()}))},[e]),t}function iR(e,t){let[n,r]=Mn.useState(()=>e.getDecorators());return lm(()=>e.registerDecoratorListener(o=>{Uy.flushSync(()=>{r(o)})}),[e]),Mn.useEffect(()=>{r(e.getDecorators())},[e]),Mn.useMemo(()=>{let o=[],i=Object.keys(n);for(let l=0;l<i.length;l++){let s=i[l],a=Mn.createElement(t,{onError:c=>e._onError(c)},Mn.createElement(Mn.Suspense,{fallback:null},n[s])),u=e.getElementByKey(s);u!==null&&o.push(Uy.createPortal(a,u,s))}return o},[t,n,e])}function lR(e){lm(()=>yS.mergeRegister(rR.registerRichText(e),nR.registerDragonSupport(e)),[e])}function sR({content:e}){var[t]=vS.useLexicalComposerContext();t=oR(t);let n=eR();return t?typeof e=="function"?e(n):e:null}tS.RichTextPlugin=function({contentEditable:e,placeholder:t,ErrorBoundary:n}){let[r]=vS.useLexicalComposerContext();return n=iR(r,n),lR(r),Mn.createElement(Mn.Fragment,null,e,Mn.createElement(sR,{content:t}),n)};const aR=tS;var uR=aR,xS={},br=fo,cR=nr,_S=p,dR=Nt,us=ge;function fR(e){_S.useEffect(()=>dR.mergeRegister(e.registerCommand(br.INSERT_ORDERED_LIST_COMMAND,()=>(br.insertList(e,"number"),!0),us.COMMAND_PRIORITY_LOW),e.registerCommand(br.INSERT_UNORDERED_LIST_COMMAND,()=>(br.insertList(e,"bullet"),!0),us.COMMAND_PRIORITY_LOW),e.registerCommand(br.REMOVE_LIST_COMMAND,()=>(br.removeList(e),!0),us.COMMAND_PRIORITY_LOW),e.registerCommand(us.INSERT_PARAGRAPH_COMMAND,()=>!!br.$handleListInsertParagraph(),us.COMMAND_PRIORITY_LOW)),[e])}xS.ListPlugin=function(){let[e]=cR.useLexicalComposerContext();return _S.useEffect(()=>{if(!e.hasNodes([br.ListNode,br.ListItemNode]))throw Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[e]),fR(e),null};const hR=xS;var pR=hR,wS={},Xr={},SS=Nt,mr=ge;let gR=new Set(["http:","https:","mailto:","sms:","tel:"]);class Hl extends mr.ElementNode{static getType(){return"link"}static clone(t){return new Hl(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}constructor(t,n={},r){super(r);let{target:o=null,rel:i=null,title:l=null}=n;this.__url=t,this.__target=o,this.__rel=i,this.__title=l}createDOM(t){let n=document.createElement("a");return n.href=this.sanitizeUrl(this.__url),this.__target!==null&&(n.target=this.__target),this.__rel!==null&&(n.rel=this.__rel),this.__title!==null&&(n.title=this.__title),SS.addClassNamesToElement(n,t.theme.link),n}updateDOM(t,n){let r=this.__url,o=this.__target,i=this.__rel,l=this.__title;return r!==t.__url&&(n.href=r),o!==t.__target&&(o?n.target=o:n.removeAttribute("target")),i!==t.__rel&&(i?n.rel=i:n.removeAttribute("rel")),l!==t.__title&&(l?n.title=l:n.removeAttribute("title")),!1}static importDOM(){return{a:()=>({conversion:mR,priority:1})}}static importJSON(t){let n=xa(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}sanitizeUrl(t){try{let n=new URL(t);if(!gR.has(n.protocol))return"about:blank"}catch{}return t}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),type:"link",url:this.getURL(),version:1}}getURL(){return this.getLatest().__url}setURL(t){this.getWritable().__url=t}getTarget(){return this.getLatest().__target}setTarget(t){this.getWritable().__target=t}getRel(){return this.getLatest().__rel}setRel(t){this.getWritable().__rel=t}getTitle(){return this.getLatest().__title}setTitle(t){this.getWritable().__title=t}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),mr.$isElementNode(t)?(n=xa(this.__url,{rel:this.__rel,target:this.__target,title:this.__title}),t.append(n),n):null}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(t,n){if(!mr.$isRangeSelection(n))return!1;t=n.anchor.getNode();let r=n.focus.getNode();return this.isParentOf(t)&&this.isParentOf(r)&&0<n.getTextContent().length}}function mR(e){let t=null;if(SS.isHTMLAnchorElement(e)){let n=e.textContent;n!==null&&n!==""&&(t=xa(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function xa(e,t){return mr.$applyNodeReplacement(new Hl(e,t))}function Yo(e){return e instanceof Hl}class Ia extends Hl{static getType(){return"autolink"}static clone(t){return new Ia(t.__url,{rel:t.__rel,target:t.__target,title:t.__title},t.__key)}static importJSON(t){let n=up(t.url,{rel:t.rel,target:t.target,title:t.title});return n.setFormat(t.format),n.setIndent(t.indent),n.setDirection(t.direction),n}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),type:"autolink",version:1}}insertNewAfter(t,n=!0){return t=this.getParentOrThrow().insertNewAfter(t,n),mr.$isElementNode(t)?(n=up(this.__url,{rel:this._rel,target:this.__target,title:this.__title}),t.append(n),n):null}}function up(e,t){return mr.$applyNodeReplacement(new Ia(e,t))}let vR=mr.createCommand("TOGGLE_LINK_COMMAND");function yR(e,t){for(;e!==null&&(e=e.getParent())!==null&&!t(e););return e}Xr.$createAutoLinkNode=up;Xr.$createLinkNode=xa;Xr.$isAutoLinkNode=function(e){return e instanceof Ia};Xr.$isLinkNode=Yo;Xr.AutoLinkNode=Ia;Xr.LinkNode=Hl;Xr.TOGGLE_LINK_COMMAND=vR;Xr.toggleLink=function(e,t={}){let{target:n,title:r}=t,o=t.rel===void 0?"noreferrer":t.rel;if(t=mr.$getSelection(),mr.$isRangeSelection(t))if(t=t.extract(),e===null)t.forEach(l=>{if(l=l.getParent(),Yo(l)){let s=l.getChildren();for(let a=0;a<s.length;a++)l.insertBefore(s[a]);l.remove()}});else{if(t.length===1){var i=t[0];if(i=Yo(i)?i:yR(i,Yo),i!==null){i.setURL(e),n!==void 0&&i.setTarget(n),o!==null&&i.setRel(o),r!==void 0&&i.setTitle(r);return}}let l=null,s=null;t.forEach(a=>{var u=a.getParent();if(u!==s&&u!==null&&(!mr.$isElementNode(a)||a.isInline()))if(Yo(u))s=u,u.setURL(e),n!==void 0&&u.setTarget(n),o!==null&&s.setRel(o),r!==void 0&&s.setTitle(r);else if(u.is(l)||(l=u,s=xa(e,{rel:o,target:n}),Yo(u)?a.getPreviousSibling()===null?u.insertBefore(s):u.insertAfter(s):a.insertBefore(s)),Yo(a)){if(!a.is(s)){if(s!==null){u=a.getChildren();for(let c=0;c<u.length;c++)s.append(u[c])}a.remove()}}else s!==null&&s.append(a)})}};const xR=Xr;var Tl=xR,Di=Tl,_R=nr,wR=Nt,Li=ge,SR=p;wS.LinkPlugin=function({validateUrl:e}){let[t]=_R.useLexicalComposerContext();return SR.useEffect(()=>{if(!t.hasNodes([Di.LinkNode]))throw Error("LinkPlugin: LinkNode not registered on editor");return wR.mergeRegister(t.registerCommand(Di.TOGGLE_LINK_COMMAND,n=>{if(n===null)return Di.toggleLink(n),!0;if(typeof n=="string")return e===void 0||e(n)?(Di.toggleLink(n),!0):!1;let{url:r,target:o,rel:i,title:l}=n;return Di.toggleLink(r,{rel:i,target:o,title:l}),!0},Li.COMMAND_PRIORITY_LOW),e!==void 0?t.registerCommand(Li.PASTE_COMMAND,n=>{let r=Li.$getSelection();if(!Li.$isRangeSelection(r)||r.isCollapsed()||!(n instanceof ClipboardEvent)||n.clipboardData==null)return!1;let o=n.clipboardData.getData("text");return e(o)?r.getNodes().some(i=>Li.$isElementNode(i))?!1:(t.dispatchCommand(Di.TOGGLE_LINK_COMMAND,o),n.preventDefault(),!0):!1},Li.COMMAND_PRIORITY_LOW):()=>{})},[t,e]),null};const ER=wS;var CR=ER;function $R({ariaActiveDescendant:e,ariaAutoComplete:t,ariaControls:n,ariaDescribedBy:r,ariaExpanded:o,ariaLabel:i,ariaLabelledBy:l,ariaMultiline:s,ariaOwns:a,ariaRequired:u,autoCapitalize:c,className:d,id:f,role:h="textbox",spellCheck:g=!0,style:m,tabIndex:S,"data-testid":v,...y}){const[x]=nr.useLexicalComposerContext(),[_,E]=p.useState(!1),$=p.useCallback(C=>{var M;x.setRootElement(C);const T=(M=document.getElementById("val-ui"))==null?void 0:M.shadowRoot;if(T&&"getSelection"in T){x._window=T;return}},[x]);return p.useLayoutEffect(()=>(E(x.isEditable()),x.registerEditableListener(C=>{E(C)})),[x]),w.jsx("div",{...y,"aria-activedescendant":_?e:void 0,"aria-autocomplete":_?t:"none","aria-controls":_?n:void 0,"aria-describedby":r,"aria-expanded":_&&h==="combobox"?!!o:void 0,"aria-label":i,"aria-labelledby":l,"aria-multiline":s,"aria-owns":_?a:void 0,"aria-readonly":_?void 0:!0,"aria-required":u,autoCapitalize:c,className:d,contentEditable:_,"data-testid":v,id:f,ref:$,role:h,spellCheck:g,style:m,tabIndex:S})}function kR({className:e}){return w.jsx($R,{className:e})}class ja extends ge.DecoratorNode{constructor(t,n){super(n),this.__src=t.src,this.__altText=t.altText,this.__width=t.width,this.__height=t.height}static getType(){return"image"}static clone(t){return new ja({src:t.__src,altText:t.__altText,width:t.__width,height:t.__height})}exportJSON(){return{altText:this.__altText,height:this.__width,src:this.__src,type:"image",version:1,width:this.__width}}static importJSON(t){return ES(t)}createDOM(){return document.createElement("div")}updateDOM(){return!1}decorate(){return w.jsx(TR,{src:this.__src,altText:this.__altText,empty:this.__empty,height:this.__height,nodeKey:this.getKey()})}}function TR(e){return w.jsx("img",{src:e.src})}function ES(e){return new ja(e)}function NR(){const[e]=nr.useLexicalComposerContext();return p.useEffect(()=>{e.focus()},[e]),null}const CS=ge.createCommand("INSERT_IMAGE_COMMAND");function bR(){const[e]=nr.useLexicalComposerContext();return p.useEffect(()=>{if(!e.hasNodes([ja]))throw new Error("ImagesPlugin: ImageNode not registered on editor");return Nt.mergeRegister(e.registerCommand(CS,t=>{const n=ES(t);return ge.$insertNodes([n]),ge.$isRootOrShadowRoot(n.getParentOrThrow())&&Nt.$wrapNodeInElement(n,ge.$createParagraphNode).selectEnd(),!0},ge.COMMAND_PRIORITY_EDITOR))},[e]),null}const RR=({className:e})=>w.jsxs("svg",{height:12,width:12,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[w.jsx("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),w.jsx("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]}),PR=RR,OR=({className:e})=>w.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,width:12,height:12,children:[w.jsx("line",{x1:"19",y1:"4",x2:"10",y2:"4"}),w.jsx("line",{x1:"14",y1:"20",x2:"5",y2:"20"}),w.jsx("line",{x1:"15",y1:"4",x2:"9",y2:"20"})]}),AR=OR,MR=({className:e})=>w.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"1",className:e,width:12,height:12,children:w.jsx("path",{fillRule:"evenodd",d:"M13,15 L13,21 C13,21.5522847 12.5522847,22 12,22 C11.4477153,22 11,21.5522847 11,21 L11,15 L13,15 Z M3,13 C2.44771525,13 2,12.5522847 2,12 C2,11.4477153 2.44771525,11 3,11 L21,11 C21.5522847,11 22,11.4477153 22,12 C22,12.5522847 21.5522847,13 21,13 L3,13 Z M19,2 C19.5522847,2 20,2.44771525 20,3 C20,3.55228475 19.5522847,4 19,4 L13,4 L13,9 L11,9 L11,4 L5,4 C4.44771525,4 4,3.55228475 4,3 C4,2.44771525 4.44771525,2 5,2 L19,2 Z"})}),DR=MR,LR=({variant:e="primary",onClick:t,children:n,icon:r,disabled:o=!1})=>w.jsx("button",{disabled:o,className:rd("font-sans font-[12px] tracking-[0.04em] py-1 px-2 rounded whitespace-nowrap group relative text-primary",{"font-bold":e==="primary","bg-background hover:bg-background text-fill disabled:bg-fill disabled:text-background":e==="primary","bg-transparent border border-primary text-primary hover:border-highlight hover:text-highlight disabled:bg-fill disabled:text-background":e!=="primary"}),onClick:t,children:w.jsxs("span",{className:"flex flex-row items-center justify-center gap-2",children:[r&&r,n]})}),Xo=LR,IR=({className:e})=>w.jsxs("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.70733 1.00015L8.7784 6.07121L8.07129 6.77832L3.00022 1.70725L3.70733 1.00015Z",fill:"currentColor"}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.00015 10.4709L8.07121 5.39983L8.77832 6.10693L3.70725 11.178L3.00015 10.4709Z",fill:"currentColor"})]}),jR=IR,$S=q.createContext({get api(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get session(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get theme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setTheme(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get editMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setEditMode(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get highlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setHighlight(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get setWindowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")},get windowSize(){throw Error("ValOverlayContext not found. Ensure components are wrapped by ValOverlayProvider!")}});function sm(){return q.useContext($S)}const zR=({options:e,onChange:t,label:n,icon:r})=>{const[o,i]=p.useState(!1),l=p.useRef(null),[s,a]=p.useState(0),{windowSize:u}=sm(),c=()=>{i(!o)},d=(f,h)=>{a(h),t(f),i(!1)};return p.useEffect(()=>{const f=h=>{o&&l.current&&!l.current.contains(h.target)&&i(!1)};return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}},[]),w.jsx("div",{className:"text-[12px]",ref:l,children:w.jsx(Xo,{onClick:f=>{f.preventDefault(),c()},icon:w.jsx(jR,{className:`rotate-[-90deg] transition-transform duration-150 ease-in-out ${o?"":"rotate-[90deg]"}`}),children:w.jsxs("div",{className:"relative",children:[w.jsxs("span",{className:"flex flex-row items-center justify-center gap-1",children:[n,r&&r]}),o&&w.jsx("div",{className:"absolute -top-[4px] overflow-scroll shadow-lg -left-2 text-primary bg-border w-fit z-overlay",style:{maxHeight:u==null?void 0:u.innerHeight},children:w.jsx("div",{className:"flex flex-col ",children:e==null?void 0:e.map((f,h)=>w.jsx("button",{onClick:g=>{g.preventDefault(),d(f,h)},className:`text-left px-2 py-1 hover:bg-background hover:text-highlight ${h===s&&"font-bold bg-background hover:bg-background truncate"}`,children:f},f))})})]})})})},FR=zR,BR=/^data:(image\/(png|jpeg|jpg|gif|webp|bmp|tiff|ico|svg\+xml));base64,/;function kS(e){const t=BR.exec(e);if(t&&t[1])return t[1]}function TS(e){return e==="image/svg+xml"?"svg":e==="image/vnd.microsoft.icon"?"ico":e.startsWith("image/")?e.slice(6):e}const WR=new TextEncoder;function NS(e){return new Promise((t,n)=>{var i;const r=(i=e.currentTarget.files)==null?void 0:i[0],o=new FileReader;o.addEventListener("load",()=>{const l=o.result;if(typeof l=="string"){const s=new Image;s.addEventListener("load",async()=>{const a=await wn.getSHA256Hash(WR.encode(l));if(s.naturalWidth&&s.naturalHeight){const u=kS(l);t({src:l,width:s.naturalWidth,height:s.naturalHeight,sha256:a,mimeType:u,fileExt:u&&TS(u)})}else t({src:l,sha256:a})}),s.src=l}else n(l?{message:"Unexpected image result type",result:l}:{message:"Empty result"})}),r&&o.readAsDataURL(r)})}function bS(e){const t=e.anchor,n=e.focus,r=e.anchor.getNode(),o=e.focus.getNode();return r===o?r:e.isBackward()?Oo.$isAtNodeEnd(n)?r:o:Oo.$isAtNodeEnd(t)?r:o}function UR(){const[e]=nr.useLexicalComposerContext();return p.useEffect(()=>Nt.mergeRegister(e.registerCommand(ge.CLICK_COMMAND,t=>{const n=ge.$getSelection();if(ge.$isRangeSelection(n)){const r=bS(n),o=Nt.$findMatchingParent(r,Tl.$isLinkNode);if(Tl.$isLinkNode(o)&&(t.metaKey||t.ctrlKey))return window.open(o.getURL(),"_blank"),!0}return!1},ge.COMMAND_PRIORITY_LOW)),[]),null}var RS={exports:{}},VR="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",HR=VR,KR=HR;function PS(){}function OS(){}OS.resetWarningCache=PS;var GR=function(){function e(r,o,i,l,s,a){if(a!==KR){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:OS,resetWarningCache:PS};return n.PropTypes=n,n};RS.exports=GR();var YR=RS.exports;const Ln=$a(YR);function cp(){return cp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cp.apply(this,arguments)}function XR(e,t){if(e==null)return{};var n=QR(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var am=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=XR(e,["color","size"]);return q.createElement("svg",cp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),q.createElement("polyline",{points:"20 6 9 17 4 12"}))});am.propTypes={color:Ln.string,size:Ln.oneOfType([Ln.string,Ln.number])};am.displayName="Check";const JR=am;function dp(){return dp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dp.apply(this,arguments)}function ZR(e,t){if(e==null)return{};var n=qR(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qR(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var um=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=ZR(e,["color","size"]);return q.createElement("svg",dp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),q.createElement("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"}),q.createElement("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"}))});um.propTypes={color:Ln.string,size:Ln.oneOfType([Ln.string,Ln.number])};um.displayName="Link";const eP=um;function fp(){return fp=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fp.apply(this,arguments)}function tP(e,t){if(e==null)return{};var n=nP(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nP(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var cm=p.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,o=e.size,i=o===void 0?24:o,l=tP(e,["color","size"]);return q.createElement("svg",fp({ref:t,xmlns:"http://www.w3.org/2000/svg",width:i,height:i,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),q.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),q.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))});cm.propTypes={color:Ln.string,size:Ln.oneOfType([Ln.string,Ln.number])};cm.displayName="X";const rP=cm,oP=({fontSizes:e,fontsFamilies:t,onEditor:n,colors:r})=>{const[o]=nr.useLexicalComposerContext();p.useEffect(()=>{n&&n(o)},[o]);const[i,l]=p.useState(o),[s,a]=p.useState(null),[u,c]=p.useState(!1),[d,f]=p.useState(!1),[h,g]=p.useState(!1),[m,S]=p.useState(!1);p.useState("15px"),p.useState("#000"),p.useState("Sans");const[v,y]=p.useState("paragraph");p.useState(!1),p.useState(!1),p.useState("url"),p.useState(null);const[x,_]=p.useState(null),E=R=>{o.dispatchCommand(Tl.TOGGLE_LINK_COMMAND,R)},$={paragraph:"Normal",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",number:"Numbered List",bullet:"Bulleted List"},C={};for(const R in $)C[$[R]]=R;const T=p.useCallback(()=>{const R=ge.$getSelection();if(ge.$isRangeSelection(R)){const j=R.anchor.getNode();let F=j.getKey()==="root"?j:Nt.$findMatchingParent(j,O=>{const k=O.getParent();return k!==null&&ge.$isRootOrShadowRoot(k)});F===null&&(F=j.getTopLevelElementOrThrow());const ae=bS(R),H=Nt.$findMatchingParent(ae,Tl.$isLinkNode);if(H!==null){const O=H.getURL();_(O)}else _(null);const X=F.getKey(),P=i.getElementByKey(X);if(c(R.hasFormat("bold")),f(R.hasFormat("italic")),g(R.hasFormat("strikethrough")),S(R.hasFormat("underline")),P!==null)if(a(X),fo.$isListNode(F)){const O=Nt.$getNearestNodeOfType(j,fo.ListNode),k=O?O.getListType():F.getListType();y(k)}else{const O=Bs.$isHeadingNode(F)?F.getTag():F.getType();O in $&&y(O)}}},[i]);p.useEffect(()=>Nt.mergeRegister(o.registerUpdateListener(({editorState:R})=>{R.read(()=>{T()})})),[T,i,o]),p.useEffect(()=>o.registerCommand(ge.SELECTION_CHANGE_COMMAND,(R,j)=>(T(),l(j),!1),ge.COMMAND_PRIORITY_CRITICAL),[o,T]);const M=R=>{["h1","h2","h3","h4","h5","h6"].includes(R)?v!==R&&o.update(()=>{const j=ge.$getSelection();ge.$isRangeSelection(j)&&Oo.$setBlocksType(j,()=>Bs.$createHeadingNode(R))}):R==="paragraph"&&v!=="paragraph"?o.update(()=>{const j=ge.$getSelection();(ge.$isRangeSelection(j)||ge.DEPRECATED_$isGridSelection(j))&&Oo.$setBlocksType(j,()=>ge.$createParagraphNode())}):R==="number"&&v!=="number"?o.dispatchCommand(fo.INSERT_ORDERED_LIST_COMMAND,void 0):R==="bullet"&&v!=="bullet"?o.dispatchCommand(fo.INSERT_UNORDERED_LIST_COMMAND,void 0):o.dispatchCommand(fo.REMOVE_LIST_COMMAND,void 0)};return p.useCallback(()=>{o.update(()=>{const R=ge.$getSelection();if(ge.$isRangeSelection(R)){const j=R.anchor,F=R.focus,ae=R.getNodes();if(j.key===F.key&&j.offset===F.offset)return;ae.forEach((H,X)=>{ge.$isTextNode(H)?(X===0&&j.offset!==0&&(H=H.splitText(j.offset)[1]||H),X===ae.length-1&&(H=H.splitText(F.offset)[0]||H),H.__style!==""&&H.setStyle(""),H.__format!==0&&(H.setFormat(0),Nt.$getNearestBlockElementAncestorOrThrow(H).setFormat(""))):Bs.$isHeadingNode(H)&&H.replace(ge.$createParagraphNode(),!0)})}})},[i]),w.jsxs("div",{className:"sticky top-0 border-b bg-background border-highlight flex flex-col",children:[w.jsxs("div",{className:"flex flex-row gap-1",children:[w.jsx(FR,{options:Object.values($),label:$[v]??v+" (not supported)",onChange:R=>{M(C[R])}}),w.jsx(Xo,{variant:"primary",onClick:R=>{R.preventDefault(),o.dispatchCommand(ge.FORMAT_TEXT_COMMAND,"bold")},active:u,icon:w.jsx(PR,{className:`${u&&"stroke-[3px]"}`})}),w.jsx(Xo,{active:h,onClick:R=>{R.preventDefault(),o.dispatchCommand(ge.FORMAT_TEXT_COMMAND,"strikethrough")},icon:w.jsx(DR,{className:`${h&&"stroke-[2px]"}`})}),w.jsx(Xo,{active:d,onClick:R=>{R.preventDefault(),o.dispatchCommand(ge.FORMAT_TEXT_COMMAND,"italic")},icon:w.jsx(AR,{className:`${d&&"stroke-[3px]"}`})}),w.jsx(Xo,{active:x!==null,onClick:R=>{R.preventDefault(),_(""),E("")},icon:w.jsx(eP,{width:12,height:12,className:`${x!==null&&"stroke-[3px]"}`})}),w.jsxs("label",{className:"flex items-center justify-center",children:[w.jsx(P_,{}),w.jsx("input",{type:"file",hidden:!0,onChange:R=>{R.preventDefault(),NS(R).then(j=>{o.dispatchCommand(CS,{...j})}).catch(j=>{console.error("Error reading image",j)})}})]})]}),x!==null&&w.jsxs("div",{className:"flex flex-row p-2",children:[w.jsx("input",{type:"text",placeholder:"Enter URL",className:"w-1/3 text-primary bg-background px-2",value:x,onChange:R=>{R.preventDefault(),_(R.target.value)}}),w.jsx(Xo,{variant:"primary",onClick:R=>{R.preventDefault(),E(x||null)},icon:w.jsx(JR,{size:14})}),w.jsx(Xo,{variant:"primary",onClick:R=>{R.preventDefault(),E(null)},icon:w.jsx(rP,{size:14})})]})]})},iP=oP,tr={version:1,format:"",indent:0,direction:null};function Kl(e,t=!1){if(typeof e=="string")return{...tr,type:"text",format:"",text:e};if("tag"in e)switch(e.tag){case"h1":return Ii(e);case"h2":return Ii(e);case"h3":return Ii(e);case"h4":return Ii(e);case"h5":return Ii(e);case"h6":return Ii(e);case"li":return dP(e);case"p":return uP(e);case"ul":return Hy(e);case"ol":return Hy(e);case"span":return AS(e);case"a":return sP(e);case"img":return lP(e);case"br":return t?{...tr,type:"linebreak"}:cP();default:throw Error("Unexpected node tag: "+JSON.stringify(e,null,2))}else throw Error("Unexpected node: "+JSON.stringify(e,null,2))}function lP(e){const t=e.src;return{...tr,type:"image",src:t,width:e.width,height:e.height}}function sP(e){return{...tr,type:"link",url:e.href,children:e.children.map(t=>Kl(t))}}function aP(e){return{...tr,format:"",type:"root",children:e.children.map(t=>Kl(t))}}function Ii(e){return{...tr,type:"heading",tag:e.tag,children:e.children.map(t=>Kl(t))}}function uP(e){return{...tr,type:"paragraph",children:e.children.map(t=>Kl(t,!0))}}function cP(){return{...tr,type:"paragraph",children:[]}}function dP(e){return{...tr,type:"listitem",children:e.children.map(t=>Kl(t,!0))}}function Hy(e){return{...tr,type:"list",listType:e.tag==="ol"?"number":"bullet",children:e.children.map(t=>Kl(t)),...e.dir?{direction:e.dir}:{direction:null}}}const fP={bold:1,italic:2,"line-through":4};function hP(e){return e.reduce((t,n)=>t|fP[n],0)}function AS(e){const t=e.children[0];return typeof t=="string"?{...tr,type:"text",text:t,format:hP(e.classes)}:AS({...t,classes:e.classes.concat(t.classes)})}function pP(e){console.error(e)}const gP=28,mP=({richtext:e,onEditor:t})=>{const{windowSize:n}=sm(),o={namespace:"val",editorState:i=>{i.setEditorState(i.parseEditorState({root:aP(BS(e))}))},nodes:[Bs.HeadingNode,ja,fo.ListNode,fo.ListItemNode,Tl.LinkNode],theme:{text:{bold:"font-semibold",underline:"underline",italic:"italic",strikethrough:"line-through",underlineStrikethrough:"underline line-through"},list:{listitem:"ml-[20px]",ol:"list-decimal",ul:"list-disc"},heading:{h1:"text-4xl font-bold",h2:"text-3xl font-bold",h3:"text-2xl font-bold",h4:"text-xl font-bold",h5:"text-lg font-bold",h6:"text-md font-bold"},link:"text-highlight underline"},onError:pP};return w.jsxs(u2.LexicalComposer,{initialConfig:o,children:[w.jsx(NR,{}),w.jsx(iP,{onEditor:t}),w.jsx(uR.RichTextPlugin,{contentEditable:w.jsx("div",{className:"font-sans border-b text-primary border-highlight",style:{minHeight:n!=null&&n.innerHeight?(n==null?void 0:n.innerHeight)-gP:void 0},children:w.jsx(kR,{className:"p-4 outline-none bg-fill"})}),placeholder:w.jsx("div",{className:"",children:"Enter some text..."}),ErrorBoundary:m2}),w.jsx(CR.LinkPlugin,{}),w.jsx(UR,{}),w.jsx(pR.ListPlugin,{}),w.jsx(bR,{}),w.jsx($2.HistoryPlugin,{})]})};var vP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const yP=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rr=(e,t)=>{const n=p.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:l,children:s,...a},u)=>p.createElement("svg",{ref:u,...vP,width:o,height:o,stroke:r,strokeWidth:l?Number(i)*24/Number(o):i,className:`lucide lucide-${yP(e)}`,...a},[...t.map(([c,d])=>p.createElement(c,d)),...(Array.isArray(s)?s:[s])||[]]));return n.displayName=`${e}`,n},xP=rr("Check",[["polyline",{points:"20 6 9 17 4 12",key:"10jjfj"}]]),MS=rr("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),_P=rr("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),wP=rr("Maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),SP=rr("Minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),EP=rr("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]),CP=rr("Pause",[["rect",{width:"4",height:"16",x:"6",y:"4",key:"iffhe4"}],["rect",{width:"4",height:"16",x:"14",y:"4",key:"sjin7j"}]]),$P=rr("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]),kP=rr("Power",[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]]),TP=rr("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),NP=rr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),DS="p-1 border rounded-full shadow border-accent",Ky="valbuild:urlBeforeNavigation";function bP({api:e}){const{theme:t,setTheme:n,editMode:r,setEditMode:o}=sm();return w.jsxs("div",{className:"flex flex-row items-center justify-center w-full h-full px-1 py-2 border-2 rounded-full gap-x-3 text-primary bg-background border-fill",children:[w.jsx(Ef,{active:r==="hover",onClick:()=>{o(i=>i==="hover"?"off":"hover")},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="hover"?w.jsx(CP,{size:18}):w.jsx($P,{size:18})})}),w.jsx(Ef,{onClick:()=>{n(t==="dark"?"light":"dark")},children:w.jsxs("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:[t==="dark"&&w.jsx(TP,{size:15}),t==="light"&&w.jsx(EP,{size:15})]})}),w.jsx(Ef,{active:r==="full",onClick:()=>{if(r!=="full")localStorage.setItem(Ky,window.location.href),window.location.href=e.getEditUrl();else if(r==="full"){const i=localStorage.getItem(Ky);window.location.href=i||"/"}},children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:r==="full"?w.jsx(SP,{size:15}):w.jsx(wP,{size:15})})}),w.jsx("a",{className:DS,href:e.getDisableUrl(),children:w.jsx("div",{className:"h-[24px] w-[24px] flex justify-center items-center",children:w.jsx(kP,{size:18})})})]})}function Ef({active:e,onClick:t,children:n}){return w.jsx("button",{className:rd(DS,{"bg-accent drop-shadow-[0px_0px_12px_rgba(56,205,152,0.60)]":e}),onClick:t,children:n})}function LS(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=LS(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function RP(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=LS(e))&&(r&&(r+=" "),r+=t);return r}const Gy=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Yy=RP,PP=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Yy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,l=Object.keys(o).map(u=>{const c=n==null?void 0:n[u],d=i==null?void 0:i[u];if(c===null)return null;const f=Gy(c)||Gy(d);return o[u][f]}),s=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),a=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[m,S]=g;return Array.isArray(S)?S.includes({...i,...s}[m]):{...i,...s}[m]===S})?[...u,d,f]:u},[]);return Yy(e,l,a,n==null?void 0:n.class,n==null?void 0:n.className)},OP=PP("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Gl=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const l=r?El:"button";return w.jsx(l,{className:ot(OP({variant:t,size:n,className:e})),ref:i,...o})});Gl.displayName="Button";function AP(e="dark"){const[t,n]=p.useState(e);return p.useEffect(()=>{localStorage.getItem("val-theme")==="light"?n("light"):localStorage.getItem("val-theme")==="dark"||window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?n("dark"):window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches&&n("light");const r=o=>{localStorage.getItem("val-theme")||n(o.matches?"dark":"light")};return window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r),()=>{window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",r)}},[]),[t,r=>{localStorage.setItem("val-theme",r),n(r)}]}function dm(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}let Ni=dm();function IS(e){Ni=e}const jS=/[&<>"']/,MP=new RegExp(jS.source,"g"),zS=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,DP=new RegExp(zS.source,"g"),LP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xy=e=>LP[e];function mn(e,t){if(t){if(jS.test(e))return e.replace(MP,Xy)}else if(zS.test(e))return e.replace(DP,Xy);return e}const IP=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function jP(e){return e.replace(IP,(t,n)=>(n=n.toLowerCase(),n==="colon"?":":n.charAt(0)==="#"?n.charAt(1)==="x"?String.fromCharCode(parseInt(n.substring(2),16)):String.fromCharCode(+n.substring(1)):""))}const zP=/(^|[^\[])\^/g;function Re(e,t){e=typeof e=="string"?e:e.source,t=t||"";const n={replace:(r,o)=>(o=typeof o=="object"&&"source"in o?o.source:o,o=o.replace(zP,"$1"),e=e.replace(r,o),n),getRegex:()=>new RegExp(e,t)};return n}function Qy(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}const bc={exec:()=>null};function Jy(e,t){const n=e.replace(/\|/g,(i,l,s)=>{let a=!1,u=l;for(;--u>=0&&s[u]==="\\";)a=!a;return a?"|":" |"}),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;o<r.length;o++)r[o]=r[o].trim().replace(/\\\|/g,"|");return r}function Cf(e,t,n){const r=e.length;if(r===0)return"";let o=0;for(;o<r;){const i=e.charAt(r-o-1);if(i===t&&!n)o++;else if(i!==t&&n)o++;else break}return e.slice(0,r-o)}function FP(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return-1}function Zy(e,t,n,r){const o=t.href,i=t.title?mn(t.title):null,l=e[1].replace(/\\([\[\]])/g,"$1");if(e[0].charAt(0)!=="!"){r.state.inLink=!0;const s={type:"link",raw:n,href:o,title:i,text:l,tokens:r.inlineTokens(l)};return r.state.inLink=!1,s}return{type:"image",raw:n,href:o,title:i,text:mn(l)}}function BP(e,t){const n=e.match(/^(\s+)(?:```)/);if(n===null)return t;const r=n[1];return t.split(`
76
+ `).map(o=>{const i=o.match(/^\s+/);if(i===null)return o;const[l]=i;return l.length>=r.length?o.slice(r.length):o}).join(`
77
+ `)}class Rc{constructor(t){je(this,"options");je(this,"rules");je(this,"lexer");this.options=t||Ni}space(t){const n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){const n=this.rules.block.code.exec(t);if(n){const r=n[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:Cf(r,`
78
+ `)}}}fences(t){const n=this.rules.block.fences.exec(t);if(n){const r=n[0],o=BP(r,n[3]||"");return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline._escapes,"$1"):n[2],text:o}}}heading(t){const n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(/#$/.test(r)){const o=Cf(r,"#");(this.options.pedantic||!o||/ $/.test(o))&&(r=o.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){const n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:n[0]}}blockquote(t){const n=this.rules.block.blockquote.exec(t);if(n){const r=n[0].replace(/^ *>[ \t]?/gm,""),o=this.lexer.state.top;this.lexer.state.top=!0;const i=this.lexer.blockTokens(r);return this.lexer.state.top=o,{type:"blockquote",raw:n[0],tokens:i,text:r}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim();const o=r.length>1,i={type:"list",raw:"",ordered:o,start:o?+r.slice(0,-1):"",loose:!1,items:[]};r=o?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=o?r:"[*+-]");const l=new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`);let s="",a="",u=!1;for(;t;){let c=!1;if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;s=n[0],t=t.substring(s.length);let d=n[2].split(`
79
+ `,1)[0].replace(/^\t+/,v=>" ".repeat(3*v.length)),f=t.split(`
80
+ `,1)[0],h=0;this.options.pedantic?(h=2,a=d.trimStart()):(h=n[2].search(/[^ ]/),h=h>4?1:h,a=d.slice(h),h+=n[1].length);let g=!1;if(!d&&/^ *$/.test(f)&&(s+=f+`
81
+ `,t=t.substring(f.length+1),c=!0),!c){const v=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),y=new RegExp(`^ {0,${Math.min(3,h-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),x=new RegExp(`^ {0,${Math.min(3,h-1)}}(?:\`\`\`|~~~)`),_=new RegExp(`^ {0,${Math.min(3,h-1)}}#`);for(;t;){const E=t.split(`
82
+ `,1)[0];if(f=E,this.options.pedantic&&(f=f.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),x.test(f)||_.test(f)||v.test(f)||y.test(t))break;if(f.search(/[^ ]/)>=h||!f.trim())a+=`
83
+ `+f.slice(h);else{if(g||d.search(/[^ ]/)>=4||x.test(d)||_.test(d)||y.test(d))break;a+=`
84
+ `+f}!g&&!f.trim()&&(g=!0),s+=E+`
85
+ `,t=t.substring(E.length+1),d=f.slice(h)}}i.loose||(u?i.loose=!0:/\n *\n *$/.test(s)&&(u=!0));let m=null,S;this.options.gfm&&(m=/^\[[ xX]\] /.exec(a),m&&(S=m[0]!=="[ ] ",a=a.replace(/^\[[ xX]\] +/,""))),i.items.push({type:"list_item",raw:s,task:!!m,checked:S,loose:!1,text:a,tokens:[]}),i.raw+=s}i.items[i.items.length-1].raw=s.trimEnd(),i.items[i.items.length-1].text=a.trimEnd(),i.raw=i.raw.trimEnd();for(let c=0;c<i.items.length;c++)if(this.lexer.state.top=!1,i.items[c].tokens=this.lexer.blockTokens(i.items[c].text,[]),!i.loose){const d=i.items[c].tokens.filter(h=>h.type==="space"),f=d.length>0&&d.some(h=>/\n.*\n/.test(h.raw));i.loose=f}if(i.loose)for(let c=0;c<i.items.length;c++)i.items[c].loose=!0;return i}}html(t){const n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){const n=this.rules.block.def.exec(t);if(n){const r=n[1].toLowerCase().replace(/\s+/g," "),o=n[2]?n[2].replace(/^<(.*)>$/,"$1").replace(this.rules.inline._escapes,"$1"):"",i=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline._escapes,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:o,title:i}}}table(t){const n=this.rules.block.table.exec(t);if(n){if(!/[:|]/.test(n[2]))return;const r={type:"table",raw:n[0],header:Jy(n[1]).map(o=>({text:o,tokens:[]})),align:n[2].replace(/^\||\| *$/g,"").split("|"),rows:n[3]&&n[3].trim()?n[3].replace(/\n[ \t]*$/,"").split(`
86
+ `):[]};if(r.header.length===r.align.length){let o=r.align.length,i,l,s,a;for(i=0;i<o;i++){const u=r.align[i];u&&(/^ *-+: *$/.test(u)?r.align[i]="right":/^ *:-+: *$/.test(u)?r.align[i]="center":/^ *:-+ *$/.test(u)?r.align[i]="left":r.align[i]=null)}for(o=r.rows.length,i=0;i<o;i++)r.rows[i]=Jy(r.rows[i],r.header.length).map(u=>({text:u,tokens:[]}));for(o=r.header.length,l=0;l<o;l++)r.header[l].tokens=this.lexer.inline(r.header[l].text);for(o=r.rows.length,l=0;l<o;l++)for(a=r.rows[l],s=0;s<a.length;s++)a[s].tokens=this.lexer.inline(a[s].text);return r}}}lheading(t){const n=this.rules.block.lheading.exec(t);if(n)return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:n[1],tokens:this.lexer.inline(n[1])}}paragraph(t){const n=this.rules.block.paragraph.exec(t);if(n){const r=n[1].charAt(n[1].length-1)===`
87
+ `?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){const n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){const n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:mn(n[1])}}tag(t){const n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&/^<a /i.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){const n=this.rules.inline.link.exec(t);if(n){const r=n[2].trim();if(!this.options.pedantic&&/^</.test(r)){if(!/>$/.test(r))return;const l=Cf(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{const l=FP(n[2],"()");if(l>-1){const a=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,a).trim(),n[3]=""}}let o=n[2],i="";if(this.options.pedantic){const l=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(o);l&&(o=l[1],i=l[3])}else i=n[3]?n[3].slice(1,-1):"";return o=o.trim(),/^</.test(o)&&(this.options.pedantic&&!/>$/.test(r)?o=o.slice(1):o=o.slice(1,-1)),Zy(n,{href:o&&o.replace(this.rules.inline._escapes,"$1"),title:i&&i.replace(this.rules.inline._escapes,"$1")},n[0],this.lexer)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let o=(r[2]||r[1]).replace(/\s+/g," ");if(o=n[o.toLowerCase()],!o){const i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Zy(r,o,r[0],this.lexer)}}emStrong(t,n,r=""){let o=this.rules.inline.emStrong.lDelim.exec(t);if(!o||o[3]&&r.match(/[\p{L}\p{N}]/u))return;if(!(o[1]||o[2]||"")||!r||this.rules.inline.punctuation.exec(r)){const l=[...o[0]].length-1;let s,a,u=l,c=0;const d=o[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(d.lastIndex=0,n=n.slice(-1*t.length+o[0].length-1);(o=d.exec(n))!=null;){if(s=o[1]||o[2]||o[3]||o[4]||o[5]||o[6],!s)continue;if(a=[...s].length,o[3]||o[4]){u+=a;continue}else if((o[5]||o[6])&&l%3&&!((l+a)%3)){c+=a;continue}if(u-=a,u>0)continue;a=Math.min(a,a+u+c);const f=[...t].slice(0,l+o.index+a+1).join("");if(Math.min(l,a)%2){const g=f.slice(1,-1);return{type:"em",raw:f,text:g,tokens:this.lexer.inlineTokens(g)}}const h=f.slice(2,-2);return{type:"strong",raw:f,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){const n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(/\n/g," ");const o=/[^ ]/.test(r),i=/^ /.test(r)&&/ $/.test(r);return o&&i&&(r=r.substring(1,r.length-1)),r=mn(r,!0),{type:"codespan",raw:n[0],text:r}}}br(t){const n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t){const n=this.rules.inline.del.exec(t);if(n)return{type:"del",raw:n[0],text:n[2],tokens:this.lexer.inlineTokens(n[2])}}autolink(t){const n=this.rules.inline.autolink.exec(t);if(n){let r,o;return n[2]==="@"?(r=mn(n[1]),o="mailto:"+r):(r=mn(n[1]),o=r),{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,o;if(n[2]==="@")r=mn(n[0]),o="mailto:"+r;else{let i;do i=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0];while(i!==n[0]);r=mn(n[0]),n[1]==="www."?o="http://"+n[0]:o=n[0]}return{type:"link",raw:n[0],text:r,href:o,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){const n=this.rules.inline.text.exec(t);if(n){let r;return this.lexer.state.inRawBlock?r=n[0]:r=mn(n[0]),{type:"text",raw:n[0],text:r}}}}const re={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:bc,lheading:/^(?!bull )((?:.|\n(?!\s*?\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};re._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/;re._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/;re.def=Re(re.def).replace("label",re._label).replace("title",re._title).getRegex();re.bullet=/(?:[*+-]|\d{1,9}[.)])/;re.listItemStart=Re(/^( *)(bull) */).replace("bull",re.bullet).getRegex();re.list=Re(re.list).replace(/bull/g,re.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+re.def.source+")").getRegex();re._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul";re._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/;re.html=Re(re.html,"i").replace("comment",re._comment).replace("tag",re._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();re.lheading=Re(re.lheading).replace(/bull/g,re.bullet).getRegex();re.paragraph=Re(re._paragraph).replace("hr",re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",re._tag).getRegex();re.blockquote=Re(re.blockquote).replace("paragraph",re.paragraph).getRegex();re.normal={...re};re.gfm={...re.normal,table:"^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"};re.gfm.table=Re(re.gfm.table).replace("hr",re.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",re._tag).getRegex();re.gfm.paragraph=Re(re._paragraph).replace("hr",re.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",re.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",re._tag).getRegex();re.pedantic={...re.normal,html:Re(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",re._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Re(re.normal._paragraph).replace("hr",re.hr).replace("heading",` *#{1,6} *[^
88
+ ]`).replace("lheading",re.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()};const K={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:bc,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,rDelimAst:/^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:bc,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^((?![*_])[\spunctuation])/};K._punctuation="\\p{P}$+<=>`^|~";K.punctuation=Re(K.punctuation,"u").replace(/punctuation/g,K._punctuation).getRegex();K.blockSkip=/\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;K.anyPunctuation=/\\[punct]/g;K._escapes=/\\([punct])/g;K._comment=Re(re._comment).replace("(?:-->|$)","-->").getRegex();K.emStrong.lDelim=Re(K.emStrong.lDelim,"u").replace(/punct/g,K._punctuation).getRegex();K.emStrong.rDelimAst=Re(K.emStrong.rDelimAst,"gu").replace(/punct/g,K._punctuation).getRegex();K.emStrong.rDelimUnd=Re(K.emStrong.rDelimUnd,"gu").replace(/punct/g,K._punctuation).getRegex();K.anyPunctuation=Re(K.anyPunctuation,"gu").replace(/punct/g,K._punctuation).getRegex();K._escapes=Re(K._escapes,"gu").replace(/punct/g,K._punctuation).getRegex();K._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;K._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;K.autolink=Re(K.autolink).replace("scheme",K._scheme).replace("email",K._email).getRegex();K._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/;K.tag=Re(K.tag).replace("comment",K._comment).replace("attribute",K._attribute).getRegex();K._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/;K._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/;K._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/;K.link=Re(K.link).replace("label",K._label).replace("href",K._href).replace("title",K._title).getRegex();K.reflink=Re(K.reflink).replace("label",K._label).replace("ref",re._label).getRegex();K.nolink=Re(K.nolink).replace("ref",re._label).getRegex();K.reflinkSearch=Re(K.reflinkSearch,"g").replace("reflink",K.reflink).replace("nolink",K.nolink).getRegex();K.normal={...K};K.pedantic={...K.normal,strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Re(/^!?\[(label)\]\((.*?)\)/).replace("label",K._label).getRegex(),reflink:Re(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K._label).getRegex()};K.gfm={...K.normal,escape:Re(K.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/};K.gfm.url=Re(K.gfm.url,"i").replace("email",K.gfm._extended_email).getRegex();K.breaks={...K.gfm,br:Re(K.br).replace("{2,}","*").getRegex(),text:Re(K.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()};class fr{constructor(t){je(this,"tokens");je(this,"options");je(this,"state");je(this,"tokenizer");je(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ni,this.options.tokenizer=this.options.tokenizer||new Rc,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={block:re.normal,inline:K.normal};this.options.pedantic?(n.block=re.pedantic,n.inline=K.pedantic):this.options.gfm&&(n.block=re.gfm,this.options.breaks?n.inline=K.breaks:n.inline=K.gfm),this.tokenizer.rules=n}static get rules(){return{block:re,inline:K}}static lex(t,n){return new fr(n).lex(t)}static lexInline(t,n){return new fr(n).inlineTokens(t)}lex(t){t=t.replace(/\r\n|\r/g,`
89
+ `),this.blockTokens(t,this.tokens);let n;for(;n=this.inlineQueue.shift();)this.inlineTokens(n.src,n.tokens);return this.tokens}blockTokens(t,n=[]){this.options.pedantic?t=t.replace(/\t/g," ").replace(/^ +$/gm,""):t=t.replace(/^( *)(\t+)/gm,(s,a,u)=>a+" ".repeat(u.length));let r,o,i,l;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(s=>(r=s.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.space(t)){t=t.substring(r.raw.length),r.raw.length===1&&n.length>0?n[n.length-1].raw+=`
90
+ `:n.push(r);continue}if(r=this.tokenizer.code(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
91
+ `+r.raw,o.text+=`
92
+ `+r.text,this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(r=this.tokenizer.fences(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.heading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.hr(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.blockquote(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.list(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.html(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.def(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&(o.type==="paragraph"||o.type==="text")?(o.raw+=`
93
+ `+r.raw,o.text+=`
94
+ `+r.raw,this.inlineQueue[this.inlineQueue.length-1].src=o.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title});continue}if(r=this.tokenizer.table(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.lheading(t)){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startBlock){let s=1/0;const a=t.slice(1);let u;this.options.extensions.startBlock.forEach(c=>{u=c.call({lexer:this},a),typeof u=="number"&&u>=0&&(s=Math.min(s,u))}),s<1/0&&s>=0&&(i=t.substring(0,s+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){o=n[n.length-1],l&&o.type==="paragraph"?(o.raw+=`
95
+ `+r.raw,o.text+=`
96
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r),l=i.length!==t.length,t=t.substring(r.raw.length);continue}if(r=this.tokenizer.text(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&o.type==="text"?(o.raw+=`
97
+ `+r.raw,o.text+=`
98
+ `+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=o.text):n.push(r);continue}if(t){const s="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(s);break}else throw new Error(s)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r,o,i,l=t,s,a,u;if(this.tokens.links){const c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(l))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.blockSkip.exec(l))!=null;)l=l.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(l))!=null;)l=l.slice(0,s.index)+"++"+l.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(a||(u=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(c=>(r=c.call({lexer:this},t,n))?(t=t.substring(r.raw.length),n.push(r),!0):!1))){if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length),o=n[n.length-1],o&&r.type==="text"&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(r=this.tokenizer.emStrong(t,l,u)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),n.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),n.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),n.push(r);continue}if(i=t,this.options.extensions&&this.options.extensions.startInline){let c=1/0;const d=t.slice(1);let f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(i=t.substring(0,c+1))}if(r=this.tokenizer.inlineText(i)){t=t.substring(r.raw.length),r.raw.slice(-1)!=="_"&&(u=r.raw.slice(-1)),a=!0,o=n[n.length-1],o&&o.type==="text"?(o.raw+=r.raw,o.text+=r.text):n.push(r);continue}if(t){const c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return n}}class Pc{constructor(t){je(this,"options");this.options=t||Ni}code(t,n,r){var i;const o=(i=(n||"").match(/^\S*/))==null?void 0:i[0];return t=t.replace(/\n$/,"")+`
99
+ `,o?'<pre><code class="language-'+mn(o)+'">'+(r?t:mn(t,!0))+`</code></pre>
100
+ `:"<pre><code>"+(r?t:mn(t,!0))+`</code></pre>
101
+ `}blockquote(t){return`<blockquote>
102
+ ${t}</blockquote>
103
+ `}html(t,n){return t}heading(t,n,r){return`<h${n}>${t}</h${n}>
104
+ `}hr(){return`<hr>
105
+ `}list(t,n,r){const o=n?"ol":"ul",i=n&&r!==1?' start="'+r+'"':"";return"<"+o+i+`>
106
+ `+t+"</"+o+`>
107
+ `}listitem(t,n,r){return`<li>${t}</li>
108
+ `}checkbox(t){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph(t){return`<p>${t}</p>
109
+ `}table(t,n){return n&&(n=`<tbody>${n}</tbody>`),`<table>
110
+ <thead>
111
+ `+t+`</thead>
112
+ `+n+`</table>
113
+ `}tablerow(t){return`<tr>
114
+ ${t}</tr>
115
+ `}tablecell(t,n){const r=n.header?"th":"td";return(n.align?`<${r} align="${n.align}">`:`<${r}>`)+t+`</${r}>
116
+ `}strong(t){return`<strong>${t}</strong>`}em(t){return`<em>${t}</em>`}codespan(t){return`<code>${t}</code>`}br(){return"<br>"}del(t){return`<del>${t}</del>`}link(t,n,r){const o=Qy(t);if(o===null)return r;t=o;let i='<a href="'+t+'"';return n&&(i+=' title="'+n+'"'),i+=">"+r+"</a>",i}image(t,n,r){const o=Qy(t);if(o===null)return r;t=o;let i=`<img src="${t}" alt="${r}"`;return n&&(i+=` title="${n}"`),i+=">",i}text(t){return t}}class fm{strong(t){return t}em(t){return t}codespan(t){return t}del(t){return t}html(t){return t}text(t){return t}link(t,n,r){return""+r}image(t,n,r){return""+r}br(){return""}}class hr{constructor(t){je(this,"options");je(this,"renderer");je(this,"textRenderer");this.options=t||Ni,this.options.renderer=this.options.renderer||new Pc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new fm}static parse(t,n){return new hr(n).parse(t)}static parseInline(t,n){return new hr(n).parseInline(t)}parse(t,n=!0){let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=i,s=this.options.extensions.renderers[l.type].call({parser:this},l);if(s!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(l.type)){r+=s||"";continue}}switch(i.type){case"space":continue;case"hr":{r+=this.renderer.hr();continue}case"heading":{const l=i;r+=this.renderer.heading(this.parseInline(l.tokens),l.depth,jP(this.parseInline(l.tokens,this.textRenderer)));continue}case"code":{const l=i;r+=this.renderer.code(l.text,l.lang,!!l.escaped);continue}case"table":{const l=i;let s="",a="";for(let c=0;c<l.header.length;c++)a+=this.renderer.tablecell(this.parseInline(l.header[c].tokens),{header:!0,align:l.align[c]});s+=this.renderer.tablerow(a);let u="";for(let c=0;c<l.rows.length;c++){const d=l.rows[c];a="";for(let f=0;f<d.length;f++)a+=this.renderer.tablecell(this.parseInline(d[f].tokens),{header:!1,align:l.align[f]});u+=this.renderer.tablerow(a)}r+=this.renderer.table(s,u);continue}case"blockquote":{const l=i,s=this.parse(l.tokens);r+=this.renderer.blockquote(s);continue}case"list":{const l=i,s=l.ordered,a=l.start,u=l.loose;let c="";for(let d=0;d<l.items.length;d++){const f=l.items[d],h=f.checked,g=f.task;let m="";if(f.task){const S=this.renderer.checkbox(!!h);u?f.tokens.length>0&&f.tokens[0].type==="paragraph"?(f.tokens[0].text=S+" "+f.tokens[0].text,f.tokens[0].tokens&&f.tokens[0].tokens.length>0&&f.tokens[0].tokens[0].type==="text"&&(f.tokens[0].tokens[0].text=S+" "+f.tokens[0].tokens[0].text)):f.tokens.unshift({type:"text",text:S+" "}):m+=S+" "}m+=this.parse(f.tokens,u),c+=this.renderer.listitem(m,g,!!h)}r+=this.renderer.list(c,s,a);continue}case"html":{const l=i;r+=this.renderer.html(l.text,l.block);continue}case"paragraph":{const l=i;r+=this.renderer.paragraph(this.parseInline(l.tokens));continue}case"text":{let l=i,s=l.tokens?this.parseInline(l.tokens):l.text;for(;o+1<t.length&&t[o+1].type==="text";)l=t[++o],s+=`
117
+ `+(l.tokens?this.parseInline(l.tokens):l.text);r+=n?this.renderer.paragraph(s):s;continue}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}parseInline(t,n){n=n||this.renderer;let r="";for(let o=0;o<t.length;o++){const i=t[o];if(this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[i.type]){const l=this.options.extensions.renderers[i.type].call({parser:this},i);if(l!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=l||"";continue}}switch(i.type){case"escape":{const l=i;r+=n.text(l.text);break}case"html":{const l=i;r+=n.html(l.text);break}case"link":{const l=i;r+=n.link(l.href,l.title,this.parseInline(l.tokens,n));break}case"image":{const l=i;r+=n.image(l.href,l.title,l.text);break}case"strong":{const l=i;r+=n.strong(this.parseInline(l.tokens,n));break}case"em":{const l=i;r+=n.em(this.parseInline(l.tokens,n));break}case"codespan":{const l=i;r+=n.codespan(l.text);break}case"br":{r+=n.br();break}case"del":{const l=i;r+=n.del(this.parseInline(l.tokens,n));break}case"text":{const l=i;r+=n.text(l.text);break}default:{const l='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return r}}class Ws{constructor(t){je(this,"options");this.options=t||Ni}preprocess(t){return t}postprocess(t){return t}}je(Ws,"passThroughHooks",new Set(["preprocess","postprocess"]));var Ca,hp,Fc,FS;class WP{constructor(...t){Id(this,Ca);Id(this,Fc);je(this,"defaults",dm());je(this,"options",this.setOptions);je(this,"parse",Ha(this,Ca,hp).call(this,fr.lex,hr.parse));je(this,"parseInline",Ha(this,Ca,hp).call(this,fr.lexInline,hr.parseInline));je(this,"Parser",hr);je(this,"parser",hr.parse);je(this,"Renderer",Pc);je(this,"TextRenderer",fm);je(this,"Lexer",fr);je(this,"lexer",fr.lex);je(this,"Tokenizer",Rc);je(this,"Hooks",Ws);this.use(...t)}walkTokens(t,n){var o,i;let r=[];for(const l of t)switch(r=r.concat(n.call(this,l)),l.type){case"table":{const s=l;for(const a of s.header)r=r.concat(this.walkTokens(a.tokens,n));for(const a of s.rows)for(const u of a)r=r.concat(this.walkTokens(u.tokens,n));break}case"list":{const s=l;r=r.concat(this.walkTokens(s.items,n));break}default:{const s=l;(i=(o=this.defaults.extensions)==null?void 0:o.childTokens)!=null&&i[s.type]?this.defaults.extensions.childTokens[s.type].forEach(a=>{r=r.concat(this.walkTokens(s[a],n))}):s.tokens&&(r=r.concat(this.walkTokens(s.tokens,n)))}}return r}use(...t){const n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{const o={...r};if(o.async=this.defaults.async||o.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){const l=n.renderers[i.name];l?n.renderers[i.name]=function(...s){let a=i.renderer.apply(this,s);return a===!1&&(a=l.apply(this,s)),a}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const l=n[i.level];l?l.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),o.extensions=n),r.renderer){const i=this.defaults.renderer||new Pc(this.defaults);for(const l in r.renderer){const s=r.renderer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d||""}}o.renderer=i}if(r.tokenizer){const i=this.defaults.tokenizer||new Rc(this.defaults);for(const l in r.tokenizer){const s=r.tokenizer[l],a=l,u=i[a];i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.tokenizer=i}if(r.hooks){const i=this.defaults.hooks||new Ws;for(const l in r.hooks){const s=r.hooks[l],a=l,u=i[a];Ws.passThroughHooks.has(l)?i[a]=c=>{if(this.defaults.async)return Promise.resolve(s.call(i,c)).then(f=>u.call(i,f));const d=s.call(i,c);return u.call(i,d)}:i[a]=(...c)=>{let d=s.apply(i,c);return d===!1&&(d=u.apply(i,c)),d}}o.hooks=i}if(r.walkTokens){const i=this.defaults.walkTokens,l=r.walkTokens;o.walkTokens=function(s){let a=[];return a.push(l.call(this,s)),i&&(a=a.concat(i.call(this,s))),a}}this.defaults={...this.defaults,...o}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}}Ca=new WeakSet,hp=function(t,n){return(r,o)=>{const i={...o},l={...this.defaults,...i};this.defaults.async===!0&&i.async===!1&&(l.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),l.async=!0);const s=Ha(this,Fc,FS).call(this,!!l.silent,!!l.async);if(typeof r>"u"||r===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(l.hooks&&(l.hooks.options=l),l.async)return Promise.resolve(l.hooks?l.hooks.preprocess(r):r).then(a=>t(a,l)).then(a=>l.walkTokens?Promise.all(this.walkTokens(a,l.walkTokens)).then(()=>a):a).then(a=>n(a,l)).then(a=>l.hooks?l.hooks.postprocess(a):a).catch(s);try{l.hooks&&(r=l.hooks.preprocess(r));const a=t(r,l);l.walkTokens&&this.walkTokens(a,l.walkTokens);let u=n(a,l);return l.hooks&&(u=l.hooks.postprocess(u)),u}catch(a){return s(a)}}},Fc=new WeakSet,FS=function(t,n){return r=>{if(r.message+=`
118
+ Please report this to https://github.com/markedjs/marked.`,t){const o="<p>An error occurred:</p><pre>"+mn(r.message+"",!0)+"</pre>";return n?Promise.resolve(o):o}if(n)return Promise.reject(r);throw r}};const gi=new WP;function Me(e,t){return gi.parse(e,t)}Me.options=Me.setOptions=function(e){return gi.setOptions(e),Me.defaults=gi.defaults,IS(Me.defaults),Me};Me.getDefaults=dm;Me.defaults=Ni;Me.use=function(...e){return gi.use(...e),Me.defaults=gi.defaults,IS(Me.defaults),Me};Me.walkTokens=function(e,t){return gi.walkTokens(e,t)};Me.parseInline=gi.parseInline;Me.Parser=hr;Me.parser=hr.parse;Me.Renderer=Pc;Me.TextRenderer=fm;Me.Lexer=fr;Me.lexer=fr.lex;Me.Tokenizer=Rc;Me.Hooks=Ws;Me.parse=Me;Me.options;Me.setOptions;Me.use;Me.walkTokens;Me.parseInline;hr.parse;const UP=fr.lex,Oc='<val value="',pp='">',gp="</val>";function Hn(e,t,n,r=!1){var i,l;const o=[];for(;n<e.length;){const s=e[n];if(s.type==="heading")o.push({tag:`h${s.depth}`,children:Hn(s.tokens?s.tokens:[],t,0).children});else if(s.type==="paragraph")o.push({tag:"p",children:Hn(s.tokens?s.tokens:[],t,0).children});else if(s.type==="strong")o.push({tag:"span",classes:["bold"],children:Hn(s.tokens?s.tokens:[],t,0).children});else if(s.type==="em")o.push({tag:"span",classes:["italic"],children:Hn(s.tokens?s.tokens:[],t,0).children});else if(s.type==="del")o.push({tag:"span",classes:["line-through"],children:Hn(s.tokens?s.tokens:[],t,0).children});else if(s.type==="text")if("tokens"in s&&Array.isArray(s.tokens))o.push(...Hn(s.tokens,t,n,r).children);else if(r&&typeof s.raw=="string"){const a=s.raw.split(`
119
+ `),u=a.flatMap((c,d)=>d===a.length-1?[c]:[c,{tag:"br",children:[]}]);o.push(...u)}else o.push(s.raw);else if(s.type==="list")o.push({tag:s.ordered?"ol":"ul",children:Hn(s.items,t,0).children});else if(s.type==="list_item")o.push({tag:"li",children:Hn(s.tokens?s.tokens:[],t,0,!0).children});else if(s.type!=="space")if(s.type==="html"){if(s.text===gp)return{children:o,cursor:n};const a=s.text.indexOf(pp);if(s.text.startsWith(Oc)&&a>-1){const c=Number(s.text.slice(Oc.length,a));if(Number.isNaN(c))throw Error(`Illegal val intermediate node: ${JSON.stringify(s)}`);const{children:d,cursor:f}=Hn(e.map(g=>g.type==="link"||g.type==="list"?{type:"text",raw:g.raw,text:g.raw}:g),t,n+1),h=t[c];h._type==="link"?o.push({tag:"a",href:h.href,children:d}):h._type==="file"&&o.push({tag:"img",src:wn.convertFileSource(h).url,width:(i=h.metadata)==null?void 0:i.width,height:(l=h.metadata)==null?void 0:l.height,children:[]}),n=f}const u=/<br\s*\/?>/gi;s.text.trim().match(u)&&o.push({tag:"br",children:[]})}else s.type==="link"?s.raw===s.href?o.push(s.raw):o.push({tag:"a",href:s.href,children:Hn(s.tokens?s.tokens:[],t,0).children}):s.type==="br"?o.push({tag:"br",children:[]}):console.error(`Could not parse markdown: unsupported token type: ${s.type}. Found: ${s.raw}`);n++}return{children:o,cursor:n}}function BS({templateStrings:e,exprs:t}){const n=e.flatMap((l,s)=>{const a=t[s];return a?a[nn]==="link"?l.concat(`${Oc}${s}${pp}${a.children[0]}${gp}`):l.concat(`${Oc}${s}${pp}${gp}`):l}).join(""),r=UP(n,{gfm:!0}),{children:o,cursor:i}=Hn(r,t,0);if(i!==r.length)throw Error("Unexpectedly terminated markdown parsing. Possible reason: unclosed html tag?");return{[nn]:"richtext",children:o}}const VP=/^h([\d+])$/;function HP(e){const t=e.children.map(KP);return GP(t)}function KP(e){var t;if(e.type==="heading"){let n="";const r=Number((t=e.tag.match(VP))==null?void 0:t[1]);if(Number.isNaN(r))throw new Error("Invalid header depth");for(let i=0;i<Number(r);i++)n+="#";return{type:"block",children:[`${n} `].concat(...e.children.map(mp))}}else{if(e.type==="paragraph")return e.children.length===0?{type:"block",children:["<br />"]}:{type:"block",children:e.children.map(n=>mp(n))};if(e.type==="list")return{type:"block",children:e.children.flatMap((n,r)=>US(VS(e),n,0,r===0))};{const n=e;throw new Error(`Unhandled node type: ${"type"in n?"exhaustiveCheck.type":"unknown"}`)}}}async function GP(e){const t=[`
120
+ `],n=[],r={};for(let o=0;o<e.length;o++){const i=e[o];for(const l of i.children)if(typeof l=="string")t[t.length-1]+=l;else{if(l.type==="image")n.push(await JP(l,r));else if(l.type==="link")n.push(qP(l));else{const s=l;throw new Error(`Unexpected node type: ${JSON.stringify(s,null,2)}`)}t.push("")}o===e.length-1?t[t.length-1]+=`
121
+ `:t[t.length-1]+=`
122
+
123
+ `}return{[nn]:"richtext",templateStrings:t,exprs:n,files:r}}function WS(e){const t=typeof e.format=="number"?XP(e.format):[];let n=e.text.trimStart();const r=e.text.length-n.length;n=n.trimEnd();const o=e.text.length-n.length-r;return t.includes("bold")&&t.includes("italic")?n=`***${n}***`:t.includes("bold")?n=`**${n}**`:t.includes("italic")&&(n=`_${n}_`),t.includes("line-through")&&(n=`~~${n}~~`),`${" ".repeat(r)}${n}${" ".repeat(o)}`}function mp(e){return e.type==="text"?WS(e):e.type==="linebreak"?`
124
+ `:e}function US(e,t,n,r=!1){var l,s;const i=[`${r?"":`
125
+ `}${" ".repeat(n)}${e}`];return((s=(l=t.children)==null?void 0:l[0])==null?void 0:s.type)!=="list"&&i.push(" "),i.concat(t.children.flatMap(a=>a.type==="list"?a.children.flatMap(u=>US(VS(a),u,n+4)):[mp(a)]))}function VS(e){if(e.listType==="bullet")return"-";if(e.listType==="number")return"1.";throw new Error(`Unhandled list type: ${e.listType}`)}const YP={bold:1,italic:2,"line-through":4};function XP(e){return Object.entries(YP).flatMap(([t,n])=>(n&e)===n?[t]:[])}const QP=new TextEncoder;async function JP(e,t){if(e.src.startsWith("data:")){const n=await wn.getSHA256Hash(QP.encode(e.src)),r=kS(e.src);if(r===void 0)throw new Error(`Could not detect Mime Type for image: ${e.src}`);const o=TS(r),i=`/public/${n}.${o}`;return t[i]=e.src,{[nn]:"file",[_n]:i,metadata:{width:e.width||0,height:e.width||0,sha256:n||""}}}else{const n=ZP("sha256",e.src);return{[nn]:"file",[_n]:`/public${e.src.split("?")[0]}`,metadata:{width:e.width||0,height:e.width||0,sha256:n||""}}}}function ZP(e,t){const n=t.split("?");if(n.length<2)return;const r=n[1],o=new URLSearchParams(r);if(o.has(e))return o.get(e)}function qP(e){return{[nn]:"link",href:e.url,children:e.children.map(WS)}}const hm=p.forwardRef(({className:e,type:t,...n},r)=>w.jsx("input",{type:t,className:ot("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));hm.displayName="Input";function HS(e){const t=e+"CollectionProvider",[n,r]=Ci(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=h=>{const{scope:g,children:m}=h,S=q.useRef(null),v=q.useRef(new Map).current;return q.createElement(o,{scope:g,itemMap:v,collectionRef:S},m)},s=e+"CollectionSlot",a=q.forwardRef((h,g)=>{const{scope:m,children:S}=h,v=i(s,m),y=Xe(g,v.collectionRef);return q.createElement(El,{ref:y},S)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=q.forwardRef((h,g)=>{const{scope:m,children:S,...v}=h,y=q.useRef(null),x=Xe(g,y),_=i(u,m);return q.useEffect(()=>(_.itemMap.set(y,{ref:y,...v}),()=>void _.itemMap.delete(y))),q.createElement(El,{[c]:"",ref:x},S)});function f(h){const g=i(e+"CollectionConsumer",h);return q.useCallback(()=>{const S=g.collectionRef.current;if(!S)return[];const v=Array.from(S.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((_,E)=>v.indexOf(_.ref.current)-v.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:l,Slot:a,ItemSlot:d},f,r]}function eO(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e);p.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const vp="dismissableLayer.update",tO="dismissableLayer.pointerDownOutside",nO="dismissableLayer.focusOutside";let qy;const rO=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oO=p.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:s,onDismiss:a,...u}=e,c=p.useContext(rO),[d,f]=p.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,g]=p.useState({}),m=Xe(t,T=>f(T)),S=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=S.indexOf(v),x=d?S.indexOf(d):-1,_=c.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,$=iO(T=>{const M=T.target,R=[...c.branches].some(j=>j.contains(M));!E||R||(i==null||i(T),s==null||s(T),T.defaultPrevented||a==null||a())},h),C=lO(T=>{const M=T.target;[...c.branches].some(j=>j.contains(M))||(l==null||l(T),s==null||s(T),T.defaultPrevented||a==null||a())},h);return eO(T=>{x===c.layers.size-1&&(o==null||o(T),!T.defaultPrevented&&a&&(T.preventDefault(),a()))},h),p.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(qy=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),e0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=qy)}},[d,h,r,c]),p.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),e0())},[d,c]),p.useEffect(()=>{const T=()=>g({});return document.addEventListener(vp,T),()=>document.removeEventListener(vp,T)},[]),p.createElement(De.div,ee({},u,{ref:m,style:{pointerEvents:_?E?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,C.onFocusCapture),onBlurCapture:He(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,$.onPointerDownCapture)}))});function iO(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=p.useRef(!1),o=p.useRef(()=>{});return p.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let c=function(){KS(tO,n,u,{discrete:!0})};var a=c;const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function lO(e,t=globalThis==null?void 0:globalThis.document){const n=Vt(e),r=p.useRef(!1);return p.useEffect(()=>{const o=i=>{i.target&&!r.current&&KS(nO,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function e0(){const e=new CustomEvent(vp);document.dispatchEvent(e)}function KS(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?QT(o,i):o.dispatchEvent(i)}let $f=0;function sO(){p.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:t0()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:t0()),$f++,()=>{$f===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),$f--}},[])}function t0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const kf="focusScope.autoFocusOnMount",Tf="focusScope.autoFocusOnUnmount",n0={bubbles:!1,cancelable:!0},aO=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=e,[s,a]=p.useState(null),u=Vt(o),c=Vt(i),d=p.useRef(null),f=Xe(t,m=>a(m)),h=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let y=function($){if(h.paused||!s)return;const C=$.target;s.contains(C)?d.current=C:oo(d.current,{select:!0})},x=function($){if(h.paused||!s)return;const C=$.relatedTarget;C!==null&&(s.contains(C)||oo(d.current,{select:!0}))},_=function($){if(document.activeElement===document.body)for(const T of $)T.removedNodes.length>0&&oo(s)};var m=y,S=x,v=_;document.addEventListener("focusin",y),document.addEventListener("focusout",x);const E=new MutationObserver(_);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",x),E.disconnect()}}},[r,s,h.paused]),p.useEffect(()=>{if(s){o0.add(h);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(kf,n0);s.addEventListener(kf,u),s.dispatchEvent(v),v.defaultPrevented||(uO(pO(GS(s)),{select:!0}),document.activeElement===m&&oo(s))}return()=>{s.removeEventListener(kf,u),setTimeout(()=>{const v=new CustomEvent(Tf,n0);s.addEventListener(Tf,c),s.dispatchEvent(v),v.defaultPrevented||oo(m??document.body,{select:!0}),s.removeEventListener(Tf,c),o0.remove(h)},0)}}},[s,u,c,h]);const g=p.useCallback(m=>{if(!n&&!r||h.paused)return;const S=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(S&&v){const y=m.currentTarget,[x,_]=cO(y);x&&_?!m.shiftKey&&v===_?(m.preventDefault(),n&&oo(x,{select:!0})):m.shiftKey&&v===x&&(m.preventDefault(),n&&oo(_,{select:!0})):v===y&&m.preventDefault()}},[n,r,h.paused]);return p.createElement(De.div,ee({tabIndex:-1},l,{ref:f,onKeyDown:g}))});function uO(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(oo(r,{select:t}),document.activeElement!==n)return}function cO(e){const t=GS(e),n=r0(t,e),r=r0(t.reverse(),e);return[n,r]}function GS(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function r0(e,t){for(const n of e)if(!dO(n,{upTo:t}))return n}function dO(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function fO(e){return e instanceof HTMLInputElement&&"select"in e}function oo(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fO(e)&&t&&e.select()}}const o0=hO();function hO(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=i0(e,t),e.unshift(t)},remove(t){var n;e=i0(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function i0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function pO(e){return e.filter(t=>t.tagName!=="A")}const gO=J0["useId".toString()]||(()=>{});let mO=0;function xd(e){const[t,n]=p.useState(gO());return $n(()=>{e||n(r=>r??String(mO++))},[e]),e||(t?`radix-${t}`:"")}const vO=["top","right","bottom","left"],Mo=Math.min,vn=Math.max,Ac=Math.round,mu=Math.floor,Do=e=>({x:e,y:e}),yO={left:"right",right:"left",bottom:"top",top:"bottom"},xO={start:"end",end:"start"};function yp(e,t,n){return vn(e,Mo(t,n))}function Br(e,t){return typeof e=="function"?e(t):e}function Wr(e){return e.split("-")[0]}function Yl(e){return e.split("-")[1]}function pm(e){return e==="x"?"y":"x"}function gm(e){return e==="y"?"height":"width"}function Xl(e){return["top","bottom"].includes(Wr(e))?"y":"x"}function mm(e){return pm(Xl(e))}function _O(e,t,n){n===void 0&&(n=!1);const r=Yl(e),o=mm(e),i=gm(o);let l=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=Mc(l)),[l,Mc(l)]}function wO(e){const t=Mc(e);return[xp(e),t,xp(t)]}function xp(e){return e.replace(/start|end/g,t=>xO[t])}function SO(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}function EO(e,t,n,r){const o=Yl(e);let i=SO(Wr(e),n==="start",r);return o&&(i=i.map(l=>l+"-"+o),t&&(i=i.concat(i.map(xp)))),i}function Mc(e){return e.replace(/left|right|bottom|top/g,t=>yO[t])}function CO(e){return{top:0,right:0,bottom:0,left:0,...e}}function YS(e){return typeof e!="number"?CO(e):{top:e,right:e,bottom:e,left:e}}function Dc(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function l0(e,t,n){let{reference:r,floating:o}=e;const i=Xl(t),l=mm(t),s=gm(l),a=Wr(t),u=i==="y",c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let h;switch(a){case"top":h={x:c,y:r.y-o.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Yl(t)){case"start":h[l]-=f*(n&&u?-1:1);break;case"end":h[l]+=f*(n&&u?-1:1);break}return h}const $O=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=i.filter(Boolean),a=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=l0(u,r,a),f=r,h={},g=0;for(let m=0;m<s.length;m++){const{name:S,fn:v}=s[m],{x:y,y:x,data:_,reset:E}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:u,platform:l,elements:{reference:e,floating:t}});if(c=y??c,d=x??d,h={...h,[S]:{...h[S],..._}},E&&g<=50){g++,typeof E=="object"&&(E.placement&&(f=E.placement),E.rects&&(u=E.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:c,y:d}=l0(u,f,a)),m=-1;continue}}return{x:c,y:d,placement:f,strategy:o,middlewareData:h}};async function _a(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:l,elements:s,strategy:a}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=Br(t,e),g=YS(h),S=s[f?d==="floating"?"reference":"floating":d],v=Dc(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(S)))==null||n?S:S.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:a})),y=d==="floating"?{...l.floating,x:r,y:o}:l.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),_=await(i.isElement==null?void 0:i.isElement(x))?await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Dc(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:x,strategy:a}):y);return{top:(v.top-E.top+g.top)/_.y,bottom:(E.bottom-v.bottom+g.bottom)/_.y,left:(v.left-E.left+g.left)/_.x,right:(E.right-v.right+g.right)/_.x}}const s0=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:l,elements:s,middlewareData:a}=t,{element:u,padding:c=0}=Br(e,t)||{};if(u==null)return{};const d=YS(c),f={x:n,y:r},h=mm(o),g=gm(h),m=await l.getDimensions(u),S=h==="y",v=S?"top":"left",y=S?"bottom":"right",x=S?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[h]-f[h]-i.floating[g],E=f[h]-i.reference[h],$=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let C=$?$[x]:0;(!C||!await(l.isElement==null?void 0:l.isElement($)))&&(C=s.floating[x]||i.floating[g]);const T=_/2-E/2,M=C/2-m[g]/2-1,R=Mo(d[v],M),j=Mo(d[y],M),F=R,ae=C-m[g]-j,H=C/2-m[g]/2+T,X=yp(F,H,ae),P=!a.arrow&&Yl(o)!=null&&H!=X&&i.reference[g]/2-(H<F?R:j)-m[g]/2<0,O=P?H<F?H-F:H-ae:0;return{[h]:f[h]+O,data:{[h]:X,centerOffset:H-X-O,...P&&{alignmentOffset:O}},reset:P}}}),kO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:l,initialPlacement:s,platform:a,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...S}=Br(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const v=Wr(o),y=Wr(s)===s,x=await(a.isRTL==null?void 0:a.isRTL(u.floating)),_=f||(y||!m?[Mc(s)]:wO(s));!f&&g!=="none"&&_.push(...EO(s,m,g,x));const E=[s,..._],$=await _a(t,S),C=[];let T=((r=i.flip)==null?void 0:r.overflows)||[];if(c&&C.push($[v]),d){const F=_O(o,l,x);C.push($[F[0]],$[F[1]])}if(T=[...T,{placement:o,overflows:C}],!C.every(F=>F<=0)){var M,R;const F=(((M=i.flip)==null?void 0:M.index)||0)+1,ae=E[F];if(ae)return{data:{index:F,overflows:T},reset:{placement:ae}};let H=(R=T.filter(X=>X.overflows[0]<=0).sort((X,P)=>X.overflows[1]-P.overflows[1])[0])==null?void 0:R.placement;if(!H)switch(h){case"bestFit":{var j;const X=(j=T.map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,k)=>O+k,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:j[0];X&&(H=X);break}case"initialPlacement":H=s;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function a0(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function u0(e){return vO.some(t=>e[t]>=0)}const TO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Br(e,t);switch(r){case"referenceHidden":{const i=await _a(t,{...o,elementContext:"reference"}),l=a0(i,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:u0(l)}}}case"escaped":{const i=await _a(t,{...o,altBoundary:!0}),l=a0(i,n.floating);return{data:{escapedOffsets:l,escaped:u0(l)}}}default:return{}}}}};async function NO(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),l=Wr(n),s=Yl(n),a=Xl(n)==="y",u=["left","top"].includes(l)?-1:1,c=i&&a?-1:1,d=Br(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof g=="number"&&(h=s==="end"?g*-1:g),a?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const bO=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await NO(t,e);return{x:n+o.x,y:r+o.y,data:o}}}},RO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:s={fn:S=>{let{x:v,y}=S;return{x:v,y}}},...a}=Br(e,t),u={x:n,y:r},c=await _a(t,a),d=Xl(Wr(o)),f=pm(d);let h=u[f],g=u[d];if(i){const S=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=h+c[S],x=h-c[v];h=yp(y,h,x)}if(l){const S=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=g+c[S],x=g-c[v];g=yp(y,g,x)}const m=s.fn({...t,[f]:h,[d]:g});return{...m,data:{x:m.x-n,y:m.y-r}}}}},PO=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:l}=t,{offset:s=0,mainAxis:a=!0,crossAxis:u=!0}=Br(e,t),c={x:n,y:r},d=Xl(o),f=pm(d);let h=c[f],g=c[d];const m=Br(s,t),S=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(a){const x=f==="y"?"height":"width",_=i.reference[f]-i.floating[x]+S.mainAxis,E=i.reference[f]+i.reference[x]-S.mainAxis;h<_?h=_:h>E&&(h=E)}if(u){var v,y;const x=f==="y"?"width":"height",_=["top","left"].includes(Wr(o)),E=i.reference[d]-i.floating[x]+(_&&((v=l.offset)==null?void 0:v[d])||0)+(_?0:S.crossAxis),$=i.reference[d]+i.reference[x]+(_?0:((y=l.offset)==null?void 0:y[d])||0)-(_?S.crossAxis:0);g<E?g=E:g>$&&(g=$)}return{[f]:h,[d]:g}}}},OO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=()=>{},...s}=Br(e,t),a=await _a(t,s),u=Wr(n),c=Yl(n),d=Xl(n)==="y",{width:f,height:h}=r.floating;let g,m;u==="top"||u==="bottom"?(g=u,m=c===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=u,g=c==="end"?"top":"bottom");const S=h-a[g],v=f-a[m],y=!t.middlewareData.shift;let x=S,_=v;if(d){const $=f-a.left-a.right;_=c||y?Mo(v,$):$}else{const $=h-a.top-a.bottom;x=c||y?Mo(S,$):$}if(y&&!c){const $=vn(a.left,0),C=vn(a.right,0),T=vn(a.top,0),M=vn(a.bottom,0);d?_=f-2*($!==0||C!==0?$+C:vn(a.left,a.right)):x=h-2*(T!==0||M!==0?T+M:vn(a.top,a.bottom))}await l({...t,availableWidth:_,availableHeight:x});const E=await o.getDimensions(i.floating);return f!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function Lo(e){return XS(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qr(e){var t;return(t=(XS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function XS(e){return e instanceof Node||e instanceof En(e).Node}function Ur(e){return e instanceof Element||e instanceof En(e).Element}function xr(e){return e instanceof HTMLElement||e instanceof En(e).HTMLElement}function c0(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof En(e).ShadowRoot}function za(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function AO(e){return["table","td","th"].includes(Lo(e))}function vm(e){const t=ym(),n=Fn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function MO(e){let t=Nl(e);for(;xr(t)&&!_d(t);){if(vm(t))return t;t=Nl(t)}return null}function ym(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function _d(e){return["html","body","#document"].includes(Lo(e))}function Fn(e){return En(e).getComputedStyle(e)}function wd(e){return Ur(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Nl(e){if(Lo(e)==="html")return e;const t=e.assignedSlot||e.parentNode||c0(e)&&e.host||Qr(e);return c0(t)?t.host:t}function QS(e){const t=Nl(e);return _d(t)?e.ownerDocument?e.ownerDocument.body:e.body:xr(t)&&za(t)?t:QS(t)}function wa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=QS(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),l=En(o);return i?t.concat(l,l.visualViewport||[],za(o)?o:[],l.frameElement&&n?wa(l.frameElement):[]):t.concat(o,wa(o,[],n))}function JS(e){const t=Fn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=xr(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,s=Ac(n)!==i||Ac(r)!==l;return s&&(n=i,r=l),{width:n,height:r,$:s}}function xm(e){return Ur(e)?e:e.contextElement}function hl(e){const t=xm(e);if(!xr(t))return Do(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=JS(t);let l=(i?Ac(n.width):n.width)/r,s=(i?Ac(n.height):n.height)/o;return(!l||!Number.isFinite(l))&&(l=1),(!s||!Number.isFinite(s))&&(s=1),{x:l,y:s}}const DO=Do(0);function ZS(e){const t=En(e);return!ym()||!t.visualViewport?DO:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function LO(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==En(e)?!1:t}function mi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=xm(e);let l=Do(1);t&&(r?Ur(r)&&(l=hl(r)):l=hl(e));const s=LO(i,n,r)?ZS(i):Do(0);let a=(o.left+s.x)/l.x,u=(o.top+s.y)/l.y,c=o.width/l.x,d=o.height/l.y;if(i){const f=En(i),h=r&&Ur(r)?En(r):r;let g=f.frameElement;for(;g&&r&&h!==f;){const m=hl(g),S=g.getBoundingClientRect(),v=Fn(g),y=S.left+(g.clientLeft+parseFloat(v.paddingLeft))*m.x,x=S.top+(g.clientTop+parseFloat(v.paddingTop))*m.y;a*=m.x,u*=m.y,c*=m.x,d*=m.y,a+=y,u+=x,g=En(g).frameElement}}return Dc({width:c,height:d,x:a,y:u})}function IO(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=xr(n),i=Qr(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},s=Do(1);const a=Do(0);if((o||!o&&r!=="fixed")&&((Lo(n)!=="body"||za(i))&&(l=wd(n)),xr(n))){const u=mi(n);s=hl(n),a.x=u.x+n.clientLeft,a.y=u.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-l.scrollLeft*s.x+a.x,y:t.y*s.y-l.scrollTop*s.y+a.y}}function jO(e){return Array.from(e.getClientRects())}function qS(e){return mi(Qr(e)).left+wd(e).scrollLeft}function zO(e){const t=Qr(e),n=wd(e),r=e.ownerDocument.body,o=vn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=vn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+qS(e);const s=-n.scrollTop;return Fn(r).direction==="rtl"&&(l+=vn(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:s}}function FO(e,t){const n=En(e),r=Qr(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,s=0,a=0;if(o){i=o.width,l=o.height;const u=ym();(!u||u&&t==="fixed")&&(s=o.offsetLeft,a=o.offsetTop)}return{width:i,height:l,x:s,y:a}}function BO(e,t){const n=mi(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=xr(e)?hl(e):Do(1),l=e.clientWidth*i.x,s=e.clientHeight*i.y,a=o*i.x,u=r*i.y;return{width:l,height:s,x:a,y:u}}function d0(e,t,n){let r;if(t==="viewport")r=FO(e,n);else if(t==="document")r=zO(Qr(e));else if(Ur(t))r=BO(t,n);else{const o=ZS(e);r={...t,x:t.x-o.x,y:t.y-o.y}}return Dc(r)}function eE(e,t){const n=Nl(e);return n===t||!Ur(n)||_d(n)?!1:Fn(n).position==="fixed"||eE(n,t)}function WO(e,t){const n=t.get(e);if(n)return n;let r=wa(e,[],!1).filter(s=>Ur(s)&&Lo(s)!=="body"),o=null;const i=Fn(e).position==="fixed";let l=i?Nl(e):e;for(;Ur(l)&&!_d(l);){const s=Fn(l),a=vm(l);!a&&s.position==="fixed"&&(o=null),(i?!a&&!o:!a&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||za(l)&&!a&&eE(e,l))?r=r.filter(c=>c!==l):o=s,l=Nl(l)}return t.set(e,r),r}function UO(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const l=[...n==="clippingAncestors"?WO(t,this._c):[].concat(n),r],s=l[0],a=l.reduce((u,c)=>{const d=d0(t,c,o);return u.top=vn(d.top,u.top),u.right=Mo(d.right,u.right),u.bottom=Mo(d.bottom,u.bottom),u.left=vn(d.left,u.left),u},d0(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function VO(e){return JS(e)}function HO(e,t,n){const r=xr(t),o=Qr(t),i=n==="fixed",l=mi(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const a=Do(0);if(r||!r&&!i)if((Lo(t)!=="body"||za(o))&&(s=wd(t)),r){const u=mi(t,!0,i,t);a.x=u.x+t.clientLeft,a.y=u.y+t.clientTop}else o&&(a.x=qS(o));return{x:l.left+s.scrollLeft-a.x,y:l.top+s.scrollTop-a.y,width:l.width,height:l.height}}function f0(e,t){return!xr(e)||Fn(e).position==="fixed"?null:t?t(e):e.offsetParent}function tE(e,t){const n=En(e);if(!xr(e))return n;let r=f0(e,t);for(;r&&AO(r)&&Fn(r).position==="static";)r=f0(r,t);return r&&(Lo(r)==="html"||Lo(r)==="body"&&Fn(r).position==="static"&&!vm(r))?n:r||MO(e)||n}const KO=async function(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||tE,i=this.getDimensions;return{reference:HO(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}};function GO(e){return Fn(e).direction==="rtl"}const YO={convertOffsetParentRelativeRectToViewportRelativeRect:IO,getDocumentElement:Qr,getClippingRect:UO,getOffsetParent:tE,getElementRects:KO,getClientRects:jO,getDimensions:VO,getScale:hl,isElement:Ur,isRTL:GO};function XO(e,t){let n=null,r;const o=Qr(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function l(s,a){s===void 0&&(s=!1),a===void 0&&(a=1),i();const{left:u,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const h=mu(c),g=mu(o.clientWidth-(u+d)),m=mu(o.clientHeight-(c+f)),S=mu(u),y={rootMargin:-h+"px "+-g+"px "+-m+"px "+-S+"px",threshold:vn(0,Mo(1,a))||1};let x=!0;function _(E){const $=E[0].intersectionRatio;if($!==a){if(!x)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},100)}x=!1}try{n=new IntersectionObserver(_,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(_,y)}n.observe(e)}return l(!0),i}function QO(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:a=!1}=r,u=xm(e),c=o||i?[...u?wa(u):[],...wa(t)]:[];c.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),i&&v.addEventListener("resize",n)});const d=u&&s?XO(u,n):null;let f=-1,h=null;l&&(h=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{h&&h.observe(t)})),n()}),u&&!a&&h.observe(u),h.observe(t));let g,m=a?mi(e):null;a&&S();function S(){const v=mi(e);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&n(),m=v,g=requestAnimationFrame(S)}return n(),()=>{c.forEach(v=>{o&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),d&&d(),h&&h.disconnect(),h=null,a&&cancelAnimationFrame(g)}}const JO=(e,t,n)=>{const r=new Map,o={platform:YO,...n},i={...o.platform,_c:r};return $O(e,t,{...o,platform:i})},ZO=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?s0({element:r.current,padding:o}).fn(n):{}:r?s0({element:r,padding:o}).fn(n):{}}}};var zu=typeof document<"u"?p.useLayoutEffect:p.useEffect;function Lc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Lc(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Lc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function nE(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function h0(e,t){const n=nE(e);return Math.round(t*n)/n}function p0(e){const t=p.useRef(e);return zu(()=>{t.current=e}),t}function qO(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:l}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,d]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,h]=p.useState(r);Lc(f,r)||h(r);const[g,m]=p.useState(null),[S,v]=p.useState(null),y=p.useCallback(P=>{P!=$.current&&($.current=P,m(P))},[m]),x=p.useCallback(P=>{P!==C.current&&(C.current=P,v(P))},[v]),_=i||g,E=l||S,$=p.useRef(null),C=p.useRef(null),T=p.useRef(c),M=p0(a),R=p0(o),j=p.useCallback(()=>{if(!$.current||!C.current)return;const P={placement:t,strategy:n,middleware:f};R.current&&(P.platform=R.current),JO($.current,C.current,P).then(O=>{const k={...O,isPositioned:!0};F.current&&!Lc(T.current,k)&&(T.current=k,Hr.flushSync(()=>{d(k)}))})},[f,t,n,R]);zu(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[u]);const F=p.useRef(!1);zu(()=>(F.current=!0,()=>{F.current=!1}),[]),zu(()=>{if(_&&($.current=_),E&&(C.current=E),_&&E){if(M.current)return M.current(_,E,j);j()}},[_,E,j,M]);const ae=p.useMemo(()=>({reference:$,floating:C,setReference:y,setFloating:x}),[y,x]),H=p.useMemo(()=>({reference:_,floating:E}),[_,E]),X=p.useMemo(()=>{const P={position:n,left:0,top:0};if(!H.floating)return P;const O=h0(H.floating,c.x),k=h0(H.floating,c.y);return s?{...P,transform:"translate("+O+"px, "+k+"px)",...nE(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:k}},[n,s,H.floating,c.x,c.y]);return p.useMemo(()=>({...c,update:j,refs:ae,elements:H,floatingStyles:X}),[c,j,ae,H,X])}function rE(e){const[t,n]=p.useState(void 0);return $n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let l,s;if("borderBoxSize"in i){const a=i.borderBoxSize,u=Array.isArray(a)?a[0]:a;l=u.inlineSize,s=u.blockSize}else l=e.offsetWidth,s=e.offsetHeight;n({width:l,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const oE="Popper",[iE,lE]=Ci(oE),[e5,sE]=iE(oE),t5=e=>{const{__scopePopper:t,children:n}=e,[r,o]=p.useState(null);return p.createElement(e5,{scope:t,anchor:r,onAnchorChange:o},n)},n5="PopperAnchor",r5=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=sE(n5,n),l=p.useRef(null),s=Xe(t,l);return p.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||l.current)}),r?null:p.createElement(De.div,ee({},o,{ref:s}))}),aE="PopperContent",[o5,g4]=iE(aE),i5=p.forwardRef((e,t)=>{var n,r,o,i,l,s,a,u;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:h="center",alignOffset:g=0,arrowPadding:m=0,avoidCollisions:S=!0,collisionBoundary:v=[],collisionPadding:y=0,sticky:x="partial",hideWhenDetached:_=!1,updatePositionStrategy:E="optimized",onPlaced:$,...C}=e,T=sE(aE,c),[M,R]=p.useState(null),j=Xe(t,sn=>R(sn)),[F,ae]=p.useState(null),H=rE(F),X=(n=H==null?void 0:H.width)!==null&&n!==void 0?n:0,P=(r=H==null?void 0:H.height)!==null&&r!==void 0?r:0,O=d+(h!=="center"?"-"+h:""),k=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},I=Array.isArray(v)?v:[v],L=I.length>0,V={padding:k,boundary:I.filter(l5),altBoundary:L},{refs:te,floatingStyles:ye,placement:fe,isPositioned:Oe,middlewareData:be}=qO({strategy:"fixed",placement:O,whileElementsMounted:(...sn)=>QO(...sn,{animationFrame:E==="always"}),elements:{reference:T.anchor},middleware:[bO({mainAxis:f+P,alignmentAxis:g}),S&&RO({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?PO():void 0,...V}),S&&kO({...V}),OO({...V,apply:({elements:sn,rects:bn,availableWidth:Te,availableHeight:ft})=>{const{width:ht,height:_t}=bn.reference,pn=sn.floating.style;pn.setProperty("--radix-popper-available-width",`${Te}px`),pn.setProperty("--radix-popper-available-height",`${ft}px`),pn.setProperty("--radix-popper-anchor-width",`${ht}px`),pn.setProperty("--radix-popper-anchor-height",`${_t}px`)}}),F&&ZO({element:F,padding:m}),s5({arrowWidth:X,arrowHeight:P}),_&&TO({strategy:"referenceHidden",...V})]}),[Z,ke]=uE(fe),ce=Vt($);$n(()=>{Oe&&(ce==null||ce())},[Oe,ce]);const _e=(o=be.arrow)===null||o===void 0?void 0:o.x,me=(i=be.arrow)===null||i===void 0?void 0:i.y,$e=((l=be.arrow)===null||l===void 0?void 0:l.centerOffset)!==0,[Be,Pt]=p.useState();return $n(()=>{M&&Pt(window.getComputedStyle(M).zIndex)},[M]),p.createElement("div",{ref:te.setFloating,"data-radix-popper-content-wrapper":"",style:{...ye,transform:Oe?ye.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Be,"--radix-popper-transform-origin":[(s=be.transformOrigin)===null||s===void 0?void 0:s.x,(a=be.transformOrigin)===null||a===void 0?void 0:a.y].join(" ")},dir:e.dir},p.createElement(o5,{scope:c,placedSide:Z,onArrowChange:ae,arrowX:_e,arrowY:me,shouldHideArrow:$e},p.createElement(De.div,ee({"data-side":Z,"data-align":ke},C,{ref:j,style:{...C.style,animation:Oe?void 0:"none",opacity:(u=be.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))});function l5(e){return e!==null}const s5=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;const{placement:s,rects:a,middlewareData:u}=t,d=((n=u.arrow)===null||n===void 0?void 0:n.centerOffset)!==0,f=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,m]=uE(s),S={start:"0%",center:"50%",end:"100%"}[m],v=((r=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&r!==void 0?r:0)+f/2,y=((i=(l=u.arrow)===null||l===void 0?void 0:l.y)!==null&&i!==void 0?i:0)+h/2;let x="",_="";return g==="bottom"?(x=d?S:`${v}px`,_=`${-h}px`):g==="top"?(x=d?S:`${v}px`,_=`${a.floating.height+h}px`):g==="right"?(x=`${-h}px`,_=d?S:`${y}px`):g==="left"&&(x=`${a.floating.width+h}px`,_=d?S:`${y}px`),{data:{x,y:_}}}});function uE(e){const[t,n="center"]=e.split("-");return[t,n]}const a5=t5,u5=r5,c5=i5,d5=p.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...o}=e;return r?Kk.createPortal(p.createElement(De.div,ee({},o,{ref:t})),r):null});function bl({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=f5({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:r,s=Vt(n),a=p.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[l,a]}function f5({defaultProp:e,onChange:t}){const n=p.useState(e),[r]=n,o=p.useRef(r),i=Vt(t);return p.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function cE(e){const t=p.useRef({value:e,previous:e});return p.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const h5=p.forwardRef((e,t)=>p.createElement(De.span,ee({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));var p5=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ji=new WeakMap,vu=new WeakMap,yu={},Nf=0,dE=function(e){return e&&(e.host||dE(e.parentNode))},g5=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=dE(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},m5=function(e,t,n,r){var o=g5(t,Array.isArray(e)?e:[e]);yu[n]||(yu[n]=new WeakMap);var i=yu[n],l=[],s=new Set,a=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var c=function(d){!d||a.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else{var h=f.getAttribute(r),g=h!==null&&h!=="false",m=(ji.get(f)||0)+1,S=(i.get(f)||0)+1;ji.set(f,m),i.set(f,S),l.push(f),m===1&&g&&vu.set(f,!0),S===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}})};return c(t),s.clear(),Nf++,function(){l.forEach(function(d){var f=ji.get(d)-1,h=i.get(d)-1;ji.set(d,f),i.set(d,h),f||(vu.has(d)||d.removeAttribute(r),vu.delete(d)),h||d.removeAttribute(n)}),Nf--,Nf||(ji=new WeakMap,ji=new WeakMap,vu=new WeakMap,yu={})}},v5=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||p5(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),m5(r,o,n,"aria-hidden")):function(){return null}},cr=function(){return cr=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},cr.apply(this,arguments)};function fE(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function y5(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var Fu="right-scroll-bar-position",Bu="width-before-scroll-bar",x5="with-scroll-bars-hidden",_5="--removed-body-scroll-bar-size";function w5(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function S5(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}function E5(e,t){return S5(t||null,function(n){return e.forEach(function(r){return w5(r,n)})})}function C5(e){return e}function $5(e,t){t===void 0&&(t=C5);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(s){return s!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var s=n;n=[],s.forEach(i),l=n}var a=function(){var c=l;l=[],c.forEach(i)},u=function(){return Promise.resolve().then(a)};u(),n={push:function(c){l.push(c),u()},filter:function(c){return l=l.filter(c),n}}}};return o}function k5(e){e===void 0&&(e={});var t=$5(null);return t.options=cr({async:!0,ssr:!1},e),t}var hE=function(e){var t=e.sideCar,n=fE(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,cr({},n))};hE.isSideCarExport=!0;function T5(e,t){return e.useMedium(t),hE}var pE=k5(),bf=function(){},Sd=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:bf,onWheelCapture:bf,onTouchMoveCapture:bf}),o=r[0],i=r[1],l=e.forwardProps,s=e.children,a=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,S=e.as,v=S===void 0?"div":S,y=fE(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,_=E5([n,t]),E=cr(cr({},y),o);return p.createElement(p.Fragment,null,c&&p.createElement(x,{sideCar:pE,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!m,lockRef:n}),l?p.cloneElement(p.Children.only(s),cr(cr({},E),{ref:_})):p.createElement(v,cr({},E,{className:a,ref:_}),s))});Sd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Sd.classNames={fullWidth:Bu,zeroRight:Fu};var g0,N5=function(){if(g0)return g0;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function b5(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=N5();return t&&e.setAttribute("nonce",t),e}function R5(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function P5(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var O5=function(){var e=0,t=null;return{add:function(n){e==0&&(t=b5())&&(R5(t,n),P5(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A5=function(){var e=O5();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},gE=function(){var e=A5(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},M5={left:0,top:0,right:0,gap:0},Rf=function(e){return parseInt(e||"",10)||0},D5=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Rf(n),Rf(r),Rf(o)]},L5=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return M5;var t=D5(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},I5=gE(),j5=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,s=e.gap;return n===void 0&&(n="margin"),`
126
+ .`.concat(x5,` {
127
+ overflow: hidden `).concat(r,`;
128
+ padding-right: `).concat(s,"px ").concat(r,`;
129
+ }
130
+ body {
131
+ overflow: hidden `).concat(r,`;
132
+ overscroll-behavior: contain;
133
+ `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
134
+ padding-left: `.concat(o,`px;
135
+ padding-top: `).concat(i,`px;
136
+ padding-right: `).concat(l,`px;
137
+ margin-left:0;
138
+ margin-top:0;
139
+ margin-right: `).concat(s,"px ").concat(r,`;
140
+ `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
141
+ }
142
+
143
+ .`).concat(Fu,` {
144
+ right: `).concat(s,"px ").concat(r,`;
145
+ }
146
+
147
+ .`).concat(Bu,` {
148
+ margin-right: `).concat(s,"px ").concat(r,`;
149
+ }
150
+
151
+ .`).concat(Fu," .").concat(Fu,` {
152
+ right: 0 `).concat(r,`;
153
+ }
154
+
155
+ .`).concat(Bu," .").concat(Bu,` {
156
+ margin-right: 0 `).concat(r,`;
157
+ }
158
+
159
+ body {
160
+ `).concat(_5,": ").concat(s,`px;
161
+ }
162
+ `)},z5=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=p.useMemo(function(){return L5(o)},[o]);return p.createElement(I5,{styles:j5(i,!t,o,n?"":"!important")})},_p=!1;if(typeof window<"u")try{var xu=Object.defineProperty({},"passive",{get:function(){return _p=!0,!0}});window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch{_p=!1}var zi=_p?{passive:!1}:!1,F5=function(e){return e.tagName==="TEXTAREA"},mE=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!F5(e)&&n[t]==="visible")},B5=function(e){return mE(e,"overflowY")},W5=function(e){return mE(e,"overflowX")},m0=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=vE(e,n);if(r){var o=yE(e,n),i=o[1],l=o[2];if(i>l)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},U5=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},V5=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},vE=function(e,t){return e==="v"?B5(t):W5(t)},yE=function(e,t){return e==="v"?U5(t):V5(t)},H5=function(e,t){return e==="h"&&t==="rtl"?-1:1},K5=function(e,t,n,r,o){var i=H5(e,window.getComputedStyle(t).direction),l=i*r,s=n.target,a=t.contains(s),u=!1,c=l>0,d=0,f=0;do{var h=yE(e,s),g=h[0],m=h[1],S=h[2],v=m-S-i*g;(g||v)&&vE(e,s)&&(d+=v,f+=g),s=s.parentNode}while(!a&&s!==document.body||a&&(t.contains(s)||t===s));return(c&&(o&&d===0||!o&&l>d)||!c&&(o&&f===0||!o&&-l>f))&&(u=!0),u},_u=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v0=function(e){return[e.deltaX,e.deltaY]},y0=function(e){return e&&"current"in e?e.current:e},G5=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Y5=function(e){return`
163
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
164
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
165
+ `)},X5=0,Fi=[];function Q5(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),o=p.useState(X5++)[0],i=p.useState(function(){return gE()})[0],l=p.useRef(e);p.useEffect(function(){l.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var m=y5([e.lockRef.current],(e.shards||[]).map(y0),!0).filter(Boolean);return m.forEach(function(S){return S.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),m.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=p.useCallback(function(m,S){if("touches"in m&&m.touches.length===2)return!l.current.allowPinchZoom;var v=_u(m),y=n.current,x="deltaX"in m?m.deltaX:y[0]-v[0],_="deltaY"in m?m.deltaY:y[1]-v[1],E,$=m.target,C=Math.abs(x)>Math.abs(_)?"h":"v";if("touches"in m&&C==="h"&&$.type==="range")return!1;var T=m0(C,$);if(!T)return!0;if(T?E=C:(E=C==="v"?"h":"v",T=m0(C,$)),!T)return!1;if(!r.current&&"changedTouches"in m&&(x||_)&&(r.current=E),!E)return!0;var M=r.current||E;return K5(M,S,m,M==="h"?x:_,!0)},[]),a=p.useCallback(function(m){var S=m;if(!(!Fi.length||Fi[Fi.length-1]!==i)){var v="deltaY"in S?v0(S):_u(S),y=t.current.filter(function(E){return E.name===S.type&&E.target===S.target&&G5(E.delta,v)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var x=(l.current.shards||[]).map(y0).filter(Boolean).filter(function(E){return E.contains(S.target)}),_=x.length>0?s(S,x[0]):!l.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),u=p.useCallback(function(m,S,v,y){var x={name:m,delta:S,target:v,should:y};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(_){return _!==x})},1)},[]),c=p.useCallback(function(m){n.current=_u(m),r.current=void 0},[]),d=p.useCallback(function(m){u(m.type,v0(m),m.target,s(m,e.lockRef.current))},[]),f=p.useCallback(function(m){u(m.type,_u(m),m.target,s(m,e.lockRef.current))},[]);p.useEffect(function(){return Fi.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",a,zi),document.addEventListener("touchmove",a,zi),document.addEventListener("touchstart",c,zi),function(){Fi=Fi.filter(function(m){return m!==i}),document.removeEventListener("wheel",a,zi),document.removeEventListener("touchmove",a,zi),document.removeEventListener("touchstart",c,zi)}},[]);var h=e.removeScrollBar,g=e.inert;return p.createElement(p.Fragment,null,g?p.createElement(i,{styles:Y5(o)}):null,h?p.createElement(z5,{gapMode:"margin"}):null)}const J5=T5(pE,Q5);var xE=p.forwardRef(function(e,t){return p.createElement(Sd,cr({},e,{ref:t,sideCar:J5}))});xE.classNames=Sd.classNames;const Z5=xE,q5=[" ","Enter","ArrowUp","ArrowDown"],eA=[" ","Enter"],Ed="Select",[Cd,_m,tA]=HS(Ed),[Ql,m4]=Ci(Ed,[tA,lE]),wm=lE(),[nA,bi]=Ql(Ed),[rA,oA]=Ql(Ed),iA=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:l,defaultValue:s,onValueChange:a,dir:u,name:c,autoComplete:d,disabled:f,required:h}=e,g=wm(t),[m,S]=p.useState(null),[v,y]=p.useState(null),[x,_]=p.useState(!1),E=Tg(u),[$=!1,C]=bl({prop:r,defaultProp:o,onChange:i}),[T,M]=bl({prop:l,defaultProp:s,onChange:a}),R=p.useRef(null),j=m?!!m.closest("form"):!0,[F,ae]=p.useState(new Set),H=Array.from(F).map(X=>X.props.value).join(";");return p.createElement(a5,g,p.createElement(nA,{required:h,scope:t,trigger:m,onTriggerChange:S,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:_,contentId:xd(),value:T,onValueChange:M,open:$,onOpenChange:C,dir:E,triggerPointerDownPosRef:R,disabled:f},p.createElement(Cd.Provider,{scope:t},p.createElement(rA,{scope:e.__scopeSelect,onNativeOptionAdd:p.useCallback(X=>{ae(P=>new Set(P).add(X))},[]),onNativeOptionRemove:p.useCallback(X=>{ae(P=>{const O=new Set(P);return O.delete(X),O})},[])},n)),j?p.createElement(EE,{key:H,"aria-hidden":!0,required:h,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:X=>M(X.target.value),disabled:f},T===void 0?p.createElement("option",{value:""}):null,Array.from(F)):null))},lA="SelectTrigger",sA=p.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=wm(n),l=bi(lA,n),s=l.disabled||r,a=Xe(t,l.onTriggerChange),u=_m(n),[c,d,f]=CE(g=>{const m=u().filter(y=>!y.disabled),S=m.find(y=>y.value===l.value),v=$E(m,g,S);v!==void 0&&l.onValueChange(v.value)}),h=()=>{s||(l.onOpenChange(!0),f())};return p.createElement(u5,ee({asChild:!0},i),p.createElement(De.button,ee({type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":SE(l.value)?"":void 0},o,{ref:a,onClick:He(o.onClick,g=>{g.currentTarget.focus()}),onPointerDown:He(o.onPointerDown,g=>{const m=g.target;m.hasPointerCapture(g.pointerId)&&m.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&(h(),l.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)},g.preventDefault())}),onKeyDown:He(o.onKeyDown,g=>{const m=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&d(g.key),!(m&&g.key===" ")&&q5.includes(g.key)&&(h(),g.preventDefault())})})))}),aA="SelectValue",uA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:l="",...s}=e,a=bi(aA,n),{onValueNodeHasChildrenChange:u}=a,c=i!==void 0,d=Xe(t,a.onValueNodeChange);return $n(()=>{u(c)},[u,c]),p.createElement(De.span,ee({},s,{ref:d,style:{pointerEvents:"none"}}),SE(a.value)?p.createElement(p.Fragment,null,l):i)}),cA=p.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.createElement(De.span,ee({"aria-hidden":!0},o,{ref:t}),r||"▼")}),dA=e=>p.createElement(d5,ee({asChild:!0},e)),Rl="SelectContent",fA=p.forwardRef((e,t)=>{const n=bi(Rl,e.__scopeSelect),[r,o]=p.useState();if($n(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Hr.createPortal(p.createElement(_E,{scope:e.__scopeSelect},p.createElement(Cd.Slot,{scope:e.__scopeSelect},p.createElement("div",null,e.children))),i):null}return p.createElement(hA,ee({},e,{ref:t}))}),Rr=10,[_E,$d]=Ql(Rl),hA=p.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:S,...v}=e,y=bi(Rl,n),[x,_]=p.useState(null),[E,$]=p.useState(null),C=Xe(t,Z=>_(Z)),[T,M]=p.useState(null),[R,j]=p.useState(null),F=_m(n),[ae,H]=p.useState(!1),X=p.useRef(!1);p.useEffect(()=>{if(x)return v5(x)},[x]),sO();const P=p.useCallback(Z=>{const[ke,...ce]=F().map($e=>$e.ref.current),[_e]=ce.slice(-1),me=document.activeElement;for(const $e of Z)if($e===me||($e==null||$e.scrollIntoView({block:"nearest"}),$e===ke&&E&&(E.scrollTop=0),$e===_e&&E&&(E.scrollTop=E.scrollHeight),$e==null||$e.focus(),document.activeElement!==me))return},[F,E]),O=p.useCallback(()=>P([T,x]),[P,T,x]);p.useEffect(()=>{ae&&O()},[ae,O]);const{onOpenChange:k,triggerPointerDownPosRef:I}=y;p.useEffect(()=>{if(x){let Z={x:0,y:0};const ke=_e=>{var me,$e,Be,Pt;Z={x:Math.abs(Math.round(_e.pageX)-((me=($e=I.current)===null||$e===void 0?void 0:$e.x)!==null&&me!==void 0?me:0)),y:Math.abs(Math.round(_e.pageY)-((Be=(Pt=I.current)===null||Pt===void 0?void 0:Pt.y)!==null&&Be!==void 0?Be:0))}},ce=_e=>{Z.x<=10&&Z.y<=10?_e.preventDefault():x.contains(_e.target)||k(!1),document.removeEventListener("pointermove",ke),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",ce,{capture:!0})}}},[x,k,I]),p.useEffect(()=>{const Z=()=>k(!1);return window.addEventListener("blur",Z),window.addEventListener("resize",Z),()=>{window.removeEventListener("blur",Z),window.removeEventListener("resize",Z)}},[k]);const[L,V]=CE(Z=>{const ke=F().filter(me=>!me.disabled),ce=ke.find(me=>me.ref.current===document.activeElement),_e=$E(ke,Z,ce);_e&&setTimeout(()=>_e.ref.current.focus())}),te=p.useCallback((Z,ke,ce)=>{const _e=!X.current&&!ce;(y.value!==void 0&&y.value===ke||_e)&&(M(Z),_e&&(X.current=!0))},[y.value]),ye=p.useCallback(()=>x==null?void 0:x.focus(),[x]),fe=p.useCallback((Z,ke,ce)=>{const _e=!X.current&&!ce;(y.value!==void 0&&y.value===ke||_e)&&j(Z)},[y.value]),Oe=r==="popper"?x0:pA,be=Oe===x0?{side:s,sideOffset:a,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:h,sticky:g,hideWhenDetached:m,avoidCollisions:S}:{};return p.createElement(_E,{scope:n,content:x,viewport:E,onViewportChange:$,itemRefCallback:te,selectedItem:T,onItemLeave:ye,itemTextRefCallback:fe,focusSelectedItem:O,selectedItemText:R,position:r,isPositioned:ae,searchRef:L},p.createElement(Z5,{as:El,allowPinchZoom:!0},p.createElement(aO,{asChild:!0,trapped:y.open,onMountAutoFocus:Z=>{Z.preventDefault()},onUnmountAutoFocus:He(o,Z=>{var ke;(ke=y.trigger)===null||ke===void 0||ke.focus({preventScroll:!0}),Z.preventDefault()})},p.createElement(oO,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:Z=>Z.preventDefault(),onDismiss:()=>y.onOpenChange(!1)},p.createElement(Oe,ee({role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:Z=>Z.preventDefault()},v,be,{onPlaced:()=>H(!0),ref:C,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:He(v.onKeyDown,Z=>{const ke=Z.ctrlKey||Z.altKey||Z.metaKey;if(Z.key==="Tab"&&Z.preventDefault(),!ke&&Z.key.length===1&&V(Z.key),["ArrowUp","ArrowDown","Home","End"].includes(Z.key)){let _e=F().filter(me=>!me.disabled).map(me=>me.ref.current);if(["ArrowUp","End"].includes(Z.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(Z.key)){const me=Z.target,$e=_e.indexOf(me);_e=_e.slice($e+1)}setTimeout(()=>P(_e)),Z.preventDefault()}})}))))))}),pA=p.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=bi(Rl,n),l=$d(Rl,n),[s,a]=p.useState(null),[u,c]=p.useState(null),d=Xe(t,C=>c(C)),f=_m(n),h=p.useRef(!1),g=p.useRef(!0),{viewport:m,selectedItem:S,selectedItemText:v,focusSelectedItem:y}=l,x=p.useCallback(()=>{if(i.trigger&&i.valueNode&&s&&u&&m&&S&&v){const C=i.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),M=i.valueNode.getBoundingClientRect(),R=v.getBoundingClientRect();if(i.dir!=="rtl"){const me=R.left-T.left,$e=M.left-me,Be=C.left-$e,Pt=C.width+Be,sn=Math.max(Pt,T.width),bn=window.innerWidth-Rr,Te=Ah($e,[Rr,bn-sn]);s.style.minWidth=Pt+"px",s.style.left=Te+"px"}else{const me=T.right-R.right,$e=window.innerWidth-M.right-me,Be=window.innerWidth-C.right-$e,Pt=C.width+Be,sn=Math.max(Pt,T.width),bn=window.innerWidth-Rr,Te=Ah($e,[Rr,bn-sn]);s.style.minWidth=Pt+"px",s.style.right=Te+"px"}const j=f(),F=window.innerHeight-Rr*2,ae=m.scrollHeight,H=window.getComputedStyle(u),X=parseInt(H.borderTopWidth,10),P=parseInt(H.paddingTop,10),O=parseInt(H.borderBottomWidth,10),k=parseInt(H.paddingBottom,10),I=X+P+ae+k+O,L=Math.min(S.offsetHeight*5,I),V=window.getComputedStyle(m),te=parseInt(V.paddingTop,10),ye=parseInt(V.paddingBottom,10),fe=C.top+C.height/2-Rr,Oe=F-fe,be=S.offsetHeight/2,Z=S.offsetTop+be,ke=X+P+Z,ce=I-ke;if(ke<=fe){const me=S===j[j.length-1].ref.current;s.style.bottom="0px";const $e=u.clientHeight-m.offsetTop-m.offsetHeight,Be=Math.max(Oe,be+(me?ye:0)+$e+O),Pt=ke+Be;s.style.height=Pt+"px"}else{const me=S===j[0].ref.current;s.style.top="0px";const Be=Math.max(fe,X+m.offsetTop+(me?te:0)+be)+ce;s.style.height=Be+"px",m.scrollTop=ke-fe+m.offsetTop}s.style.margin=`${Rr}px 0`,s.style.minHeight=L+"px",s.style.maxHeight=F+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[f,i.trigger,i.valueNode,s,u,m,S,v,i.dir,r]);$n(()=>x(),[x]);const[_,E]=p.useState();$n(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const $=p.useCallback(C=>{C&&g.current===!0&&(x(),y==null||y(),g.current=!1)},[x,y]);return p.createElement(gA,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:$},p.createElement("div",{ref:a,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_}},p.createElement(De.div,ee({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),x0=p.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Rr,...i}=e,l=wm(n);return p.createElement(c5,ee({},l,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[gA,mA]=Ql(Rl,{}),_0="SelectViewport",vA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$d(_0,n),i=mA(_0,n),l=Xe(t,o.onViewportChange),s=p.useRef(0);return p.createElement(p.Fragment,null,p.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),p.createElement(Cd.Slot,{scope:n},p.createElement(De.div,ee({"data-radix-select-viewport":"",role:"presentation"},r,{ref:l,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:He(r.onScroll,a=>{const u=a.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:d}=i;if(d!=null&&d.current&&c){const f=Math.abs(s.current-u.scrollTop);if(f>0){const h=window.innerHeight-Rr*2,g=parseFloat(c.style.minHeight),m=parseFloat(c.style.height),S=Math.max(g,m);if(S<h){const v=S+f,y=Math.min(h,v),x=v-y;c.style.height=y+"px",c.style.bottom==="0px"&&(u.scrollTop=x>0?x:0,c.style.justifyContent="flex-end")}}}s.current=u.scrollTop})}))))}),yA="SelectGroup",[v4,xA]=Ql(yA),_A="SelectLabel",wA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xA(_A,n);return p.createElement(De.div,ee({id:o.id},r,{ref:t}))}),wp="SelectItem",[SA,wE]=Ql(wp),EA=p.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...l}=e,s=bi(wp,n),a=$d(wp,n),u=s.value===r,[c,d]=p.useState(i??""),[f,h]=p.useState(!1),g=Xe(t,v=>{var y;return(y=a.itemRefCallback)===null||y===void 0?void 0:y.call(a,v,r,o)}),m=xd(),S=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.createElement(SA,{scope:n,value:r,disabled:o,textId:m,isSelected:u,onItemTextChange:p.useCallback(v=>{d(y=>{var x;return y||((x=v==null?void 0:v.textContent)!==null&&x!==void 0?x:"").trim()})},[])},p.createElement(Cd.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},p.createElement(De.div,ee({role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},l,{ref:g,onFocus:He(l.onFocus,()=>h(!0)),onBlur:He(l.onBlur,()=>h(!1)),onPointerUp:He(l.onPointerUp,S),onPointerMove:He(l.onPointerMove,v=>{if(o){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}else v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(l.onPointerLeave,v=>{if(v.currentTarget===document.activeElement){var y;(y=a.onItemLeave)===null||y===void 0||y.call(a)}}),onKeyDown:He(l.onKeyDown,v=>{var y;((y=a.searchRef)===null||y===void 0?void 0:y.current)!==""&&v.key===" "||(eA.includes(v.key)&&S(),v.key===" "&&v.preventDefault())})}))))}),wu="SelectItemText",CA=p.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,l=bi(wu,n),s=$d(wu,n),a=wE(wu,n),u=oA(wu,n),[c,d]=p.useState(null),f=Xe(t,v=>d(v),a.onItemTextChange,v=>{var y;return(y=s.itemTextRefCallback)===null||y===void 0?void 0:y.call(s,v,a.value,a.disabled)}),h=c==null?void 0:c.textContent,g=p.useMemo(()=>p.createElement("option",{key:a.value,value:a.value,disabled:a.disabled},h),[a.disabled,a.value,h]),{onNativeOptionAdd:m,onNativeOptionRemove:S}=u;return $n(()=>(m(g),()=>S(g)),[m,S,g]),p.createElement(p.Fragment,null,p.createElement(De.span,ee({id:a.textId},i,{ref:f})),a.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Hr.createPortal(i.children,l.valueNode):null)}),$A="SelectItemIndicator",kA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return wE($A,n).isSelected?p.createElement(De.span,ee({"aria-hidden":!0},r,{ref:t})):null}),TA=p.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.createElement(De.div,ee({"aria-hidden":!0},r,{ref:t}))});function SE(e){return e===""||e===void 0}const EE=p.forwardRef((e,t)=>{const{value:n,...r}=e,o=p.useRef(null),i=Xe(t,o),l=cE(n);return p.useEffect(()=>{const s=o.current,a=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(l!==n&&c){const d=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(d)}},[l,n]),p.createElement(h5,{asChild:!0},p.createElement("select",ee({},r,{ref:i,defaultValue:n})))});EE.displayName="BubbleSelect";function CE(e){const t=Vt(e),n=p.useRef(""),r=p.useRef(0),o=p.useCallback(l=>{const s=n.current+l;t(s),function a(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>a(""),1e3))}(s)},[t]),i=p.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return p.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function $E(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let l=NA(e,Math.max(i,0));o.length===1&&(l=l.filter(u=>u!==n));const a=l.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==n?a:void 0}function NA(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const bA=iA,kE=sA,RA=uA,PA=cA,OA=dA,TE=fA,AA=vA,NE=wA,bE=EA,MA=CA,DA=kA,RE=TA,LA=bA,IA=RA,PE=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(kE,{ref:r,className:ot("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...n,children:[t,w.jsx(PA,{asChild:!0,children:w.jsx(MS,{className:"w-4 h-4 opacity-50"})})]}));PE.displayName=kE.displayName;const OE=p.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>w.jsx(OA,{children:w.jsx(TE,{ref:o,className:ot("relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:w.jsx(AA,{className:ot("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));OE.displayName=TE.displayName;const jA=p.forwardRef(({className:e,...t},n)=>w.jsx(NE,{ref:n,className:ot("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jA.displayName=NE.displayName;const AE=p.forwardRef(({className:e,children:t,...n},r)=>w.jsxs(bE,{ref:r,className:ot("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[w.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:w.jsx(DA,{children:w.jsx(xP,{className:"w-4 h-4"})})}),w.jsx(MA,{children:t})]}));AE.displayName=bE.displayName;const zA=p.forwardRef(({className:e,...t},n)=>w.jsx(RE,{ref:n,className:ot("-mx-1 my-1 h-px bg-muted",e),...t}));zA.displayName=RE.displayName;function ME({path:e,disabled:t,source:n,schema:r,registerPatchCallback:o,onSubmit:i}){return(typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="string"?w.jsx(VA,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||n===null)&&(r==null?void 0:r.type)==="number"?w.jsx(UA,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i}):(typeof n=="number"||typeof n=="string"||n===null)&&(r==null?void 0:r.type)==="keyOf"?w.jsx(WA,{defaultValue:n,disabled:t,registerPatchCallback:o,onSubmit:i,selector:r.selector}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="richtext"?w.jsx(BA,{registerPatchCallback:o,onSubmit:i,defaultValue:n}):(typeof n=="object"||n===null)&&(r==null?void 0:r.type)==="image"?w.jsx(FA,{path:e,registerPatchCallback:o,onSubmit:i,defaultValue:n}):w.jsxs("div",{children:["Unsupported schema: ",r.type]})}async function w0(e,t,n,r){const o=e.split("/");return!t||!n?[]:[{value:{...r,metadata:n},op:"replace",path:e},{value:t,op:"replace",path:`${o.slice(0,-1).join("/")}/$${o[o.length-1]}`}]}function FA({path:e,defaultValue:t,onSubmit:n,registerPatchCallback:r}){const[o,i]=p.useState(null),[l,s]=p.useState(!1),[a,u]=p.useState(),[c,d]=p.useState();return p.useEffect(()=>{d(t&&wn.convertFileSource(t).url)},[t]),p.useEffect(()=>{r&&r(async f=>w0(f,o,a,t))},[o,t]),w.jsxs("div",{className:"max-w-4xl p-4",children:[w.jsxs("label",{htmlFor:`img_input:${e}`,className:"",children:[o||c?w.jsx("img",{src:o||c}):w.jsx("div",{children:"Empty"}),w.jsx("input",{id:`img_input:${e}`,type:"file",hidden:!0,onChange:f=>{NS(f).then(h=>{i(h.src),h.width&&h.height?u({sha256:h.sha256,width:h.width,height:h.height}):u(void 0)}).catch(h=>{console.error(h.message),i(null),u(void 0)})}})]}),n&&w.jsx("div",{children:o&&w.jsx(Gl,{disabled:l,onClick:()=>{s(!0),n(f=>w0(f,o,a,t)).finally(()=>{s(!1),i(null),u(void 0)})},children:l?"Saving...":"Submit"})})]},e)}async function S0(e,t){const{templateStrings:n,exprs:r,files:o}=t?await HP(t.getEditorState().toJSON().root):{[nn]:"richtext",templateStrings:[""],exprs:[],files:{}};return[{op:"replace",path:e,value:{templateStrings:n,exprs:r,[nn]:"richtext"}},...Object.entries(o).map(([i,l])=>({op:"file",path:e,filePath:i,value:l}))]}function BA({defaultValue:e,onSubmit:t,registerPatchCallback:n}){const[r,o]=p.useState(null),[i,l]=p.useState(!1),[s,a]=p.useState(!1);return p.useEffect(()=>{r&&(l(!1),r.registerTextContentListener(()=>{l(!0)}),r.registerDecoratorListener(()=>{l(!0)}))},[r]),p.useEffect(()=>{r&&n&&n(u=>S0(u,r))},[r]),w.jsxs("div",{className:"p-4 border rounded border-card",children:[w.jsx(mP,{onEditor:u=>{o(u)},richtext:e||{children:[],[nn]:"root"}}),t&&w.jsx("div",{children:i&&w.jsx(Gl,{disabled:s||!r,onClick:()=>{r&&(a(!0),t(u=>S0(u,r)).finally(()=>{a(!1),l(!1)}))},children:s?"Saving...":"Submit"})})]})}function WA({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r,selector:o}){const i=d3(o),s=(h=>Array.isArray(h.moduleSource)?{type:"number",values:Object.keys(h.moduleSource).map(g=>parseInt(g))}:{type:"string",values:Object.keys(h.moduleSource??["ERROR fetching source"])})(i),[a,u]=p.useState(t??s.values[0]),[c,d]=p.useState(!1);p.useEffect(()=>{d(e)},[e]);const f=h=>{if(s.type==="number"){if(h==="")throw new Error("Value cannot be empty");if(Number.isNaN(Number(h)))throw new Error("Value was not a number: "+JSON.stringify(h));return Number(h)}return h};return p.useEffect(()=>{n&&n(async h=>[{op:"replace",path:h,value:a}])},[a]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsxs(LA,{defaultValue:a.toString(),disabled:c,onValueChange:h=>{u(f(h))},children:[w.jsx(PE,{children:w.jsx(IA,{placeholder:"Select a value"})}),w.jsx(OE,{children:s.values.map(h=>w.jsx(AE,{value:h.toString(),children:h.toString()},h))})]}),r&&w.jsx("div",{children:t!==a&&w.jsx(Gl,{disabled:c,onClick:()=>{d(!0),r(async h=>[{op:"replace",path:h,value:a}]).finally(()=>{d(!1)})},children:c?"Saving...":"Submit"})})]})}function UA({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||0),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(hm,{ref:a,disabled:l,defaultValue:o??0,onChange:u=>i(Number(u.target.value)),type:"number"}),r&&w.jsx("div",{children:t!==o&&w.jsx(Gl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:Number((c=a.current)==null?void 0:c.value)||0}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}function VA({disabled:e,defaultValue:t,registerPatchCallback:n,onSubmit:r}){const[o,i]=p.useState(t||""),[l,s]=p.useState(!1);p.useEffect(()=>{s(e)},[e]);const a=p.useRef(null);return p.useEffect(()=>{n&&n(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]})},[]),w.jsxs("div",{className:"flex flex-col justify-between h-full gap-y-4",children:[w.jsx(hm,{ref:a,disabled:l,defaultValue:o??"",onChange:u=>i(u.target.value)}),r&&w.jsx("div",{children:t!==o&&w.jsx(Gl,{disabled:l,onClick:()=>{s(!0),r(async u=>{var c;return[{op:"replace",path:u,value:((c=a.current)==null?void 0:c.value)||""}]}).finally(()=>{s(!1)})},children:l?"Saving...":"Submit"})})]})}const HA=({className:e})=>w.jsxs("svg",{width:"58",height:"34",viewBox:"0 0 58 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:e,children:[w.jsx("g",{filter:"url(#filter0_d_21_1677)",children:w.jsx("path",{d:"M5 5.36426C5 5.16309 5.16309 5 5.36426 5H17.6581C17.8593 5 18.0223 5.16309 18.0223 5.36426V28.4949C18.0223 28.696 17.8593 28.8591 17.6581 28.8591H5.36426C5.16309 28.8591 5 28.696 5 28.4949V5.36426Z",fill:"#38CD98"})}),w.jsx("g",{filter:"url(#filter1_i_21_1677)",children:w.jsx("circle",{cx:"11.4656",cy:"23.7595",r:"2.18557",fill:"currentColor"})}),w.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M52.8588 23.839H48.7257H48.537H48.1128C47.6715 23.839 47.4508 23.5942 47.4508 23.1044V13.7293C47.4508 13.5784 47.3285 13.4561 47.1777 13.4561H45.8118C45.6609 13.4561 45.5386 13.5784 45.5386 13.7293V15.1836C45.5386 15.2844 45.4569 15.3661 45.3561 15.3661C45.2876 15.3661 45.225 15.3275 45.1924 15.2672C44.805 14.5503 44.283 14.02 43.6264 13.6765C42.9563 13.301 42.2045 13.1132 41.3709 13.1132C40.6028 13.1132 39.8755 13.252 39.189 13.5295C38.5026 13.8071 37.8979 14.2152 37.3748 14.7539C36.8682 15.2764 36.4678 15.9212 36.1736 16.6885C35.8794 17.4558 35.7323 18.3374 35.7323 19.3332V19.725C35.7323 20.7372 35.8794 21.627 36.1736 22.3942C36.4678 23.1615 36.8682 23.8146 37.3748 24.3533C37.8979 24.8757 38.5026 25.2757 39.189 25.5532C39.8755 25.8144 40.6191 25.945 41.42 25.945C42.1881 25.945 42.9154 25.7491 43.6019 25.3573C44.2751 24.982 44.8058 24.4119 45.1941 23.6471C45.2255 23.5852 45.2886 23.5452 45.358 23.5452H45.3917C45.4728 23.5452 45.5386 23.611 45.5386 23.6921C45.5386 23.7904 45.544 23.8856 45.5547 23.9777V25.1392C45.5547 25.3904 45.7584 25.5941 46.0096 25.5941H47.2261C47.2914 25.5995 47.3581 25.6022 47.4263 25.6022H48.537H48.7257H57.7268C57.8777 25.6022 58 25.4799 58 25.329V24.1122C58 23.9614 57.8777 23.839 57.7268 23.839H55.3174C55.1665 23.839 55.0442 23.7167 55.0442 23.5659V8.73368C55.0442 8.58279 54.9219 8.46048 54.771 8.46048H50.5054C50.3545 8.46048 50.2322 8.58279 50.2322 8.73368V9.95043C50.2322 10.1013 50.3545 10.2236 50.5054 10.2236H52.8588C53.0097 10.2236 53.132 10.3459 53.132 10.4968V23.5659C53.132 23.7167 53.0097 23.839 52.8588 23.839ZM41.6161 24.1329C42.1881 24.1329 42.7111 24.0268 43.1851 23.8146C43.6754 23.6023 44.0922 23.3003 44.4354 22.9085C44.7786 22.5167 45.0483 22.0514 45.2444 21.5127C45.4406 20.9576 45.5386 20.3454 45.5386 19.6761V19.3822C45.5386 18.7292 45.4406 18.1333 45.2444 17.5946C45.0483 17.0395 44.7705 16.5661 44.4109 16.1743C44.0677 15.7824 43.6509 15.4804 43.1606 15.2682C42.6866 15.0396 42.1718 14.9254 41.6161 14.9254C41.044 14.9254 40.521 15.0315 40.0471 15.2437C39.5731 15.4559 39.1563 15.758 38.7968 16.1498C38.4535 16.5252 38.1839 16.9905 37.9877 17.5456C37.7916 18.0843 37.6936 18.6802 37.6936 19.3332V19.725C37.6936 21.1127 38.0531 22.1983 38.7722 22.982C39.5077 23.7493 40.4557 24.1329 41.6161 24.1329ZM31.1115 25.4191C31.0732 25.5287 30.9698 25.6022 30.8536 25.6022H27.4661C27.35 25.6022 27.2465 25.5287 27.2082 25.4191L23.1578 13.8193C23.0958 13.6417 23.2276 13.4561 23.4157 13.4561H25.089C25.2068 13.4561 25.3114 13.5316 25.3484 13.6435L28.9666 24.581C28.9942 24.6643 29.0721 24.7206 29.1599 24.7206C29.2477 24.7206 29.3256 24.6643 29.3532 24.581L32.9714 13.6435C33.0084 13.5316 33.1129 13.4561 33.2308 13.4561H34.9041C35.0922 13.4561 35.224 13.6417 35.162 13.8193L31.1115 25.4191Z",fill:"currentColor"}),w.jsxs("defs",{children:[w.jsxs("filter",{id:"filter0_d_21_1677",x:"0.124722",y:"0.124722",width:"22.7729",height:"33.6097",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"2.43764"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"out"}),w.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),w.jsx("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_21_1677"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_21_1677",result:"shape"})]}),w.jsxs("filter",{id:"filter1_i_21_1677",x:"9.28003",y:"21.5739",width:"4.37112",height:"4.37112",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[w.jsx("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),w.jsx("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),w.jsx("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),w.jsx("feOffset",{}),w.jsx("feGaussianBlur",{stdDeviation:"0.546392"}),w.jsx("feComposite",{in2:"hardAlpha",operator:"arithmetic",k2:"-1",k3:"1"}),w.jsx("feColorMatrix",{type:"matrix",values:"0 0 0 0 0.219608 0 0 0 0 0.803922 0 0 0 0 0.501961 0 0 0 0.3 0"}),w.jsx("feBlend",{mode:"normal",in2:"shape",result:"effect1_innerShadow_21_1677"})]})]})]}),DE=HA,LE="Switch",[KA,y4]=Ci(LE),[GA,YA]=KA(LE),XA=p.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:l,disabled:s,value:a="on",onCheckedChange:u,...c}=e,[d,f]=p.useState(null),h=Xe(t,y=>f(y)),g=p.useRef(!1),m=d?!!d.closest("form"):!0,[S=!1,v]=bl({prop:o,defaultProp:i,onChange:u});return p.createElement(GA,{scope:n,checked:S,disabled:s},p.createElement(De.button,ee({type:"button",role:"switch","aria-checked":S,"aria-required":l,"data-state":IE(S),"data-disabled":s?"":void 0,disabled:s,value:a},c,{ref:h,onClick:He(e.onClick,y=>{v(x=>!x),m&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})})),m&&p.createElement(ZA,{control:d,bubbles:!g.current,name:r,value:a,checked:S,required:l,disabled:s,style:{transform:"translateX(-100%)"}}))}),QA="SwitchThumb",JA=p.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=YA(QA,n);return p.createElement(De.span,ee({"data-state":IE(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))}),ZA=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=p.useRef(null),l=cE(n),s=rE(t);return p.useEffect(()=>{const a=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(l!==n&&d){const f=new Event("click",{bubbles:r});d.call(a,n),a.dispatchEvent(f)}},[l,n,r]),p.createElement("input",ee({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function IE(e){return e?"checked":"unchecked"}const jE=XA,qA=JA,Sp=p.forwardRef(({className:e,...t},n)=>w.jsx(jE,{className:ot("peer inline-flex h-[22px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=unchecked]:bg-primary",e),...t,ref:n,children:w.jsx(qA,{className:ot("pointer-events-none block h-[18px] w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Sp.displayName=jE.displayName;const Sm=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ot("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Sm.displayName="Card";const eM=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ot("flex flex-col space-y-1.5 p-6",e),...t}));eM.displayName="CardHeader";const tM=p.forwardRef(({className:e,...t},n)=>w.jsx("h3",{ref:n,className:ot("text-2xl font-semibold leading-none tracking-tight",e),...t}));tM.displayName="CardTitle";const nM=p.forwardRef(({className:e,...t},n)=>w.jsx("p",{ref:n,className:ot("text-sm text-muted-foreground",e),...t}));nM.displayName="CardDescription";const rM=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ot("p-6 pt-0",e),...t}));rM.displayName="CardContent";const oM=p.forwardRef(({className:e,...t},n)=>w.jsx("div",{ref:n,className:ot("flex items-center p-6 pt-0",e),...t}));oM.displayName="CardFooter";/**
166
+ * @remix-run/router v1.11.0
167
+ *
168
+ * Copyright (c) Remix Software Inc.
169
+ *
170
+ * This source code is licensed under the MIT license found in the
171
+ * LICENSE.md file in the root directory of this source tree.
172
+ *
173
+ * @license MIT
174
+ */function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rt.apply(this,arguments)}var lt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(lt||(lt={}));const E0="popstate";function iM(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:l,hash:s}=r.location;return Sa("",{pathname:i,search:l,hash:s},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Fa(o)}return sM(t,n,null,e)}function we(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function vi(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function lM(){return Math.random().toString(36).substr(2,8)}function C0(e,t){return{usr:e.state,key:e.key,idx:t}}function Sa(e,t,n,r){return n===void 0&&(n=null),rt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jr(t):t,{state:n,key:t&&t.key||r||lM()})}function Fa(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Jr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function sM(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,l=o.history,s=lt.Pop,a=null,u=c();u==null&&(u=0,l.replaceState(rt({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function d(){s=lt.Pop;let S=c(),v=S==null?null:S-u;u=S,a&&a({action:s,location:m.location,delta:v})}function f(S,v){s=lt.Push;let y=Sa(m.location,S,v);n&&n(y,S),u=c()+1;let x=C0(y,u),_=m.createHref(y);try{l.pushState(x,"",_)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;o.location.assign(_)}i&&a&&a({action:s,location:m.location,delta:1})}function h(S,v){s=lt.Replace;let y=Sa(m.location,S,v);n&&n(y,S),u=c();let x=C0(y,u),_=m.createHref(y);l.replaceState(x,"",_),i&&a&&a({action:s,location:m.location,delta:0})}function g(S){let v=o.location.origin!=="null"?o.location.origin:o.location.href,y=typeof S=="string"?S:Fa(S);return we(v,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,v)}let m={get action(){return s},get location(){return e(o,l)},listen(S){if(a)throw new Error("A history only accepts one active listener");return o.addEventListener(E0,d),a=S,()=>{o.removeEventListener(E0,d),a=null}},createHref(S){return t(o,S)},createURL:g,encodeLocation(S){let v=g(S);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:f,replace:h,go(S){return l.go(S)}};return m}var st;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(st||(st={}));const aM=new Set(["lazy","caseSensitive","path","id","index","children"]);function uM(e){return e.index===!0}function Ep(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,i)=>{let l=[...n,i],s=typeof o.id=="string"?o.id:l.join("-");if(we(o.index!==!0||!o.children,"Cannot specify children on an index route"),we(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),uM(o)){let a=rt({},o,t(o),{id:s});return r[s]=a,a}else{let a=rt({},o,t(o),{id:s,children:void 0});return r[s]=a,o.children&&(a.children=Ep(o.children,t,l,r)),a}})}function rl(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Jr(t):t,o=Ba(r.pathname||"/",n);if(o==null)return null;let i=zE(e);dM(i);let l=null;for(let s=0;l==null&&s<i.length;++s)l=_M(i[s],EM(o));return l}function cM(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function zE(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,l,s)=>{let a={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};a.relativePath.startsWith("/")&&(we(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let u=ko([r,a.relativePath]),c=n.concat(a);i.children&&i.children.length>0&&(we(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),zE(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:yM(u,i.index),routesMeta:c})};return e.forEach((i,l)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,l);else for(let a of FE(i.path))o(i,l,a)}),t}function FE(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let l=FE(r.join("/")),s=[];return s.push(...l.map(a=>a===""?i:[i,a].join("/"))),o&&s.push(...l),s.map(a=>e.startsWith("/")&&a===""?"/":a)}function dM(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:xM(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const fM=/^:\w+$/,hM=3,pM=2,gM=1,mM=10,vM=-2,$0=e=>e==="*";function yM(e,t){let n=e.split("/"),r=n.length;return n.some($0)&&(r+=vM),t&&(r+=pM),n.filter(o=>!$0(o)).reduce((o,i)=>o+(fM.test(i)?hM:i===""?gM:mM),r)}function xM(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function _M(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let l=0;l<n.length;++l){let s=n[l],a=l===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",c=wM({path:s.relativePath,caseSensitive:s.caseSensitive,end:a},u);if(!c)return null;Object.assign(r,c.params);let d=s.route;i.push({params:r,pathname:ko([o,c.pathname]),pathnameBase:TM(ko([o,c.pathnameBase])),route:d}),c.pathnameBase!=="/"&&(o=ko([o,c.pathnameBase]))}return i}function wM(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=SM(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let i=o[0],l=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:r.reduce((u,c,d)=>{let{paramName:f,isOptional:h}=c;if(f==="*"){let m=s[d]||"";l=i.slice(0,i.length-m.length).replace(/(.)\/+$/,"$1")}const g=s[d];return h&&!g?u[f]=void 0:u[f]=CM(g||"",f),u},{}),pathname:i,pathnameBase:l,pattern:e}}function SM(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),vi(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(l,s,a)=>(r.push({paramName:s,isOptional:a!=null}),a?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function EM(e){try{return decodeURI(e)}catch(t){return vi(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function CM(e,t){try{return decodeURIComponent(e)}catch(n){return vi(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function Ba(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $M(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Jr(e):e;return{pathname:n?n.startsWith("/")?n:kM(n,t):t,search:NM(r),hash:bM(o)}}function kM(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Pf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Em(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function BE(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Jr(e):(o=rt({},e),we(!o.pathname||!o.pathname.includes("?"),Pf("?","pathname","search",o)),we(!o.pathname||!o.pathname.includes("#"),Pf("#","pathname","hash",o)),we(!o.search||!o.search.includes("#"),Pf("#","search","hash",o)));let i=e===""||o.pathname==="",l=i?"/":o.pathname,s;if(r||l==null)s=n;else{let d=t.length-1;if(l.startsWith("..")){let f=l.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let a=$M(o,s),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(u||c)&&(a.pathname+="/"),a}const ko=e=>e.join("/").replace(/\/\/+/g,"/"),TM=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),NM=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,bM=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Cm{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function WE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const UE=["post","put","patch","delete"],RM=new Set(UE),PM=["get",...UE],OM=new Set(PM),AM=new Set([301,302,303,307,308]),MM=new Set([307,308]),Of={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},DM={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},cs={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},VE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,LM=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),HE="remix-router-transitions";function IM(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;we(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let N=e.detectErrorBoundary;o=A=>({hasErrorBoundary:N(A)})}else o=LM;let i={},l=Ep(e.routes,o,void 0,i),s,a=e.basename||"/",u=rt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,d=new Set,f=null,h=null,g=null,m=e.hydrationData!=null,S=rl(l,e.history.location,a),v=null;if(S==null){let N=Rn(404,{pathname:e.history.location.pathname}),{matches:A,route:z}=A0(l);S=A,v={[z.id]:N}}let y=!S.some(N=>N.route.lazy)&&(!S.some(N=>N.route.loader)||e.hydrationData!=null),x,_={historyAction:e.history.action,location:e.history.location,matches:S,initialized:y,navigation:Of,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||v,fetchers:new Map,blockers:new Map},E=lt.Pop,$=!1,C,T=!1,M=new Map,R=null,j=!1,F=!1,ae=[],H=[],X=new Map,P=0,O=-1,k=new Map,I=new Set,L=new Map,V=new Map,te=new Set,ye=new Map,fe=new Map,Oe=!1;function be(){if(c=e.history.listen(N=>{let{action:A,location:z,delta:G}=N;if(Oe){Oe=!1;return}vi(fe.size===0||G!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ie=Mm({currentLocation:_.location,nextLocation:z,historyAction:A});if(ie&&G!=null){Oe=!0,e.history.go(G*-1),Ua(ie,{state:"blocked",location:z,proceed(){Ua(ie,{state:"proceeding",proceed:void 0,reset:void 0,location:z}),e.history.go(G)},reset(){let le=new Map(_.blockers);le.set(ie,cs),ce({blockers:le})}});return}return Be(A,z)}),n){YM(t,M);let N=()=>XM(t,M);t.addEventListener("pagehide",N),R=()=>t.removeEventListener("pagehide",N)}return _.initialized||Be(lt.Pop,_.location),x}function Z(){c&&c(),R&&R(),d.clear(),C&&C.abort(),_.fetchers.forEach((N,A)=>Ot(A)),_.blockers.forEach((N,A)=>Am(A))}function ke(N){return d.add(N),()=>d.delete(N)}function ce(N,A){_=rt({},_,N);let z=[],G=[];u.v7_fetcherPersist&&_.fetchers.forEach((ie,le)=>{ie.state==="idle"&&(te.has(le)?G.push(le):z.push(le))}),d.forEach(ie=>ie(_,{deletedFetchers:G,unstable_viewTransitionOpts:A})),u.v7_fetcherPersist&&(z.forEach(ie=>_.fetchers.delete(ie)),G.forEach(ie=>Ot(ie)))}function _e(N,A){var z,G;let ie=_.actionData!=null&&_.navigation.formMethod!=null&&Yn(_.navigation.formMethod)&&_.navigation.state==="loading"&&((z=N.state)==null?void 0:z._isRedirect)!==!0,le;A.actionData?Object.keys(A.actionData).length>0?le=A.actionData:le=null:ie?le=_.actionData:le=null;let he=A.loaderData?O0(_.loaderData,A.loaderData,A.matches||[],A.errors):_.loaderData,se=_.blockers;se.size>0&&(se=new Map(se),se.forEach((Qe,Ee)=>se.set(Ee,cs)));let oe=$===!0||_.navigation.formMethod!=null&&Yn(_.navigation.formMethod)&&((G=N.state)==null?void 0:G._isRedirect)!==!0;s&&(l=s,s=void 0),j||E===lt.Pop||(E===lt.Push?e.history.push(N,N.state):E===lt.Replace&&e.history.replace(N,N.state));let Le;if(E===lt.Pop){let Qe=M.get(_.location.pathname);Qe&&Qe.has(N.pathname)?Le={currentLocation:_.location,nextLocation:N}:M.has(N.pathname)&&(Le={currentLocation:N,nextLocation:_.location})}else if(T){let Qe=M.get(_.location.pathname);Qe?Qe.add(N.pathname):(Qe=new Set([N.pathname]),M.set(_.location.pathname,Qe)),Le={currentLocation:_.location,nextLocation:N}}ce(rt({},A,{actionData:le,loaderData:he,historyAction:E,location:N,initialized:!0,navigation:Of,revalidation:"idle",restoreScrollPosition:Lm(N,A.matches||_.matches),preventScrollReset:oe,blockers:se}),Le),E=lt.Pop,$=!1,T=!1,j=!1,F=!1,ae=[],H=[]}async function me(N,A){if(typeof N=="number"){e.history.go(N);return}let z=Cp(_.location,_.matches,a,u.v7_prependBasename,N,A==null?void 0:A.fromRouteId,A==null?void 0:A.relative),{path:G,submission:ie,error:le}=k0(u.v7_normalizeFormMethod,!1,z,A),he=_.location,se=Sa(_.location,G,A&&A.state);se=rt({},se,e.history.encodeLocation(se));let oe=A&&A.replace!=null?A.replace:void 0,Le=lt.Push;oe===!0?Le=lt.Replace:oe===!1||ie!=null&&Yn(ie.formMethod)&&ie.formAction===_.location.pathname+_.location.search&&(Le=lt.Replace);let Qe=A&&"preventScrollReset"in A?A.preventScrollReset===!0:void 0,Ee=Mm({currentLocation:he,nextLocation:se,historyAction:Le});if(Ee){Ua(Ee,{state:"blocked",location:se,proceed(){Ua(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:se}),me(N,A)},reset(){let Ie=new Map(_.blockers);Ie.set(Ee,cs),ce({blockers:Ie})}});return}return await Be(Le,se,{submission:ie,pendingError:le,preventScrollReset:Qe,replace:A&&A.replace,enableViewTransition:A&&A.unstable_viewTransition})}function $e(){if(It(),ce({revalidation:"loading"}),_.navigation.state!=="submitting"){if(_.navigation.state==="idle"){Be(_.historyAction,_.location,{startUninterruptedRevalidation:!0});return}Be(E||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation})}}async function Be(N,A,z){C&&C.abort(),C=null,E=N,j=(z&&z.startUninterruptedRevalidation)===!0,wC(_.location,_.matches),$=(z&&z.preventScrollReset)===!0,T=(z&&z.enableViewTransition)===!0;let G=s||l,ie=z&&z.overrideNavigation,le=rl(G,A,a);if(!le){let Ie=Rn(404,{pathname:A.pathname}),{matches:pt,route:Uo}=A0(G);Od(),_e(A,{matches:pt,loaderData:{},errors:{[Uo.id]:Ie}});return}if(_.initialized&&!F&&WM(_.location,A)&&!(z&&z.submission&&Yn(z.submission.formMethod))){_e(A,{matches:le});return}C=new AbortController;let he=fs(e.history,A,C.signal,z&&z.submission),se,oe;if(z&&z.pendingError)oe={[Us(le).route.id]:z.pendingError};else if(z&&z.submission&&Yn(z.submission.formMethod)){let Ie=await Pt(he,A,z.submission,le,{replace:z.replace});if(Ie.shortCircuited)return;se=Ie.pendingActionData,oe=Ie.pendingActionError,ie=Af(A,z.submission),he=new Request(he.url,{signal:he.signal})}let{shortCircuited:Le,loaderData:Qe,errors:Ee}=await sn(he,A,le,ie,z&&z.submission,z&&z.fetcherSubmission,z&&z.replace,se,oe);Le||(C=null,_e(A,rt({matches:le},se?{actionData:se}:{},{loaderData:Qe,errors:Ee})))}async function Pt(N,A,z,G,ie){ie===void 0&&(ie={}),It();let le=KM(A,z);ce({navigation:le});let he,se=kp(G,A);if(!se.route.action&&!se.route.lazy)he={type:st.error,error:Rn(405,{method:N.method,pathname:A.pathname,routeId:se.route.id})};else if(he=await ds("action",N,se,G,i,o,a),N.signal.aborted)return{shortCircuited:!0};if(pl(he)){let oe;return ie&&ie.replace!=null?oe=ie.replace:oe=he.location===_.location.pathname+_.location.search,await _t(_,he,{submission:z,replace:oe}),{shortCircuited:!0}}if(Vs(he)){let oe=Us(G,se.route.id);return(ie&&ie.replace)!==!0&&(E=lt.Push),{pendingActionData:{},pendingActionError:{[oe.route.id]:he.error}}}if(ei(he))throw Rn(400,{type:"defer-action"});return{pendingActionData:{[se.route.id]:he.data}}}async function sn(N,A,z,G,ie,le,he,se,oe){let Le=G||Af(A,ie),Qe=ie||le||L0(Le),Ee=s||l,[Ie,pt]=T0(e.history,_,z,Qe,A,F,ae,H,L,I,Ee,a,se,oe);if(Od(Ae=>!(z&&z.some(Wn=>Wn.route.id===Ae))||Ie&&Ie.some(Wn=>Wn.route.id===Ae)),O=++P,Ie.length===0&&pt.length===0){let Ae=ir();return _e(A,rt({matches:z,loaderData:{},errors:oe||null},se?{actionData:se}:{},Ae?{fetchers:new Map(_.fetchers)}:{})),{shortCircuited:!0}}if(!j){pt.forEach(Wn=>{let qr=_.fetchers.get(Wn.key),it=hs(void 0,qr?qr.data:void 0);_.fetchers.set(Wn.key,it)});let Ae=se||_.actionData;ce(rt({navigation:Le},Ae?Object.keys(Ae).length===0?{actionData:null}:{actionData:Ae}:{},pt.length>0?{fetchers:new Map(_.fetchers)}:{}))}pt.forEach(Ae=>{X.has(Ae.key)&&jt(Ae.key),Ae.controller&&X.set(Ae.key,Ae.controller)});let Uo=()=>pt.forEach(Ae=>jt(Ae.key));C&&C.signal.addEventListener("abort",Uo);let{results:Vo,loaderResults:Jl,fetcherResults:Ad}=await pn(_.matches,z,Ie,pt,N);if(N.signal.aborted)return{shortCircuited:!0};C&&C.signal.removeEventListener("abort",Uo),pt.forEach(Ae=>X.delete(Ae.key));let kr=M0(Vo);if(kr){if(kr.idx>=Ie.length){let Ae=pt[kr.idx-Ie.length].key;I.add(Ae)}return await _t(_,kr.result,{replace:he}),{shortCircuited:!0}}let{loaderData:Zr,errors:Va}=P0(_,z,Ie,Jl,oe,pt,Ad,ye);ye.forEach((Ae,Wn)=>{Ae.subscribe(qr=>{(qr||Ae.done)&&ye.delete(Wn)})});let Md=ir(),Dd=Wo(O),Ld=Md||Dd||pt.length>0;return rt({loaderData:Zr,errors:Va},Ld?{fetchers:new Map(_.fetchers)}:{})}function bn(N){return u.v7_fetcherPersist&&(V.set(N,(V.get(N)||0)+1),te.has(N)&&te.delete(N)),_.fetchers.get(N)||DM}function Te(N,A,z,G){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");X.has(N)&&jt(N);let ie=s||l,le=Cp(_.location,_.matches,a,u.v7_prependBasename,z,A,G==null?void 0:G.relative),he=rl(ie,le,a);if(!he){wt(N,A,Rn(404,{pathname:le}));return}let{path:se,submission:oe,error:Le}=k0(u.v7_normalizeFormMethod,!0,le,G);if(Le){wt(N,A,Le);return}let Qe=kp(he,se);if($=(G&&G.preventScrollReset)===!0,oe&&Yn(oe.formMethod)){ft(N,A,se,Qe,he,oe);return}L.set(N,{routeId:A,path:se}),ht(N,A,se,Qe,he,oe)}async function ft(N,A,z,G,ie,le){if(It(),L.delete(N),!G.route.action&&!G.route.lazy){let it=Rn(405,{method:le.formMethod,pathname:z,routeId:A});wt(N,A,it);return}let he=_.fetchers.get(N),se=GM(le,he);_.fetchers.set(N,se),ce({fetchers:new Map(_.fetchers)});let oe=new AbortController,Le=fs(e.history,z,oe.signal,le);X.set(N,oe);let Qe=P,Ee=await ds("action",Le,G,ie,i,o,a);if(Le.signal.aborted){X.get(N)===oe&&X.delete(N);return}if(te.has(N)){_.fetchers.set(N,io(void 0)),ce({fetchers:new Map(_.fetchers)});return}if(pl(Ee))if(X.delete(N),O>Qe){let it=io(void 0);_.fetchers.set(N,it),ce({fetchers:new Map(_.fetchers)});return}else{I.add(N);let it=hs(le);return _.fetchers.set(N,it),ce({fetchers:new Map(_.fetchers)}),_t(_,Ee,{fetcherSubmission:le})}if(Vs(Ee)){wt(N,A,Ee.error);return}if(ei(Ee))throw Rn(400,{type:"defer-action"});let Ie=_.navigation.location||_.location,pt=fs(e.history,Ie,oe.signal),Uo=s||l,Vo=_.navigation.state!=="idle"?rl(Uo,_.navigation.location,a):_.matches;we(Vo,"Didn't find any matches after fetcher action");let Jl=++P;k.set(N,Jl);let Ad=hs(le,Ee.data);_.fetchers.set(N,Ad);let[kr,Zr]=T0(e.history,_,Vo,le,Ie,F,ae,H,L,I,Uo,a,{[G.route.id]:Ee.data},void 0);Zr.filter(it=>it.key!==N).forEach(it=>{let Zl=it.key,Im=_.fetchers.get(Zl),EC=hs(void 0,Im?Im.data:void 0);_.fetchers.set(Zl,EC),X.has(Zl)&&jt(Zl),it.controller&&X.set(Zl,it.controller)}),ce({fetchers:new Map(_.fetchers)});let Va=()=>Zr.forEach(it=>jt(it.key));oe.signal.addEventListener("abort",Va);let{results:Md,loaderResults:Dd,fetcherResults:Ld}=await pn(_.matches,Vo,kr,Zr,pt);if(oe.signal.aborted)return;oe.signal.removeEventListener("abort",Va),k.delete(N),X.delete(N),Zr.forEach(it=>X.delete(it.key));let Ae=M0(Md);if(Ae){if(Ae.idx>=kr.length){let it=Zr[Ae.idx-kr.length].key;I.add(it)}return _t(_,Ae.result)}let{loaderData:Wn,errors:qr}=P0(_,_.matches,kr,Dd,void 0,Zr,Ld,ye);if(_.fetchers.has(N)){let it=io(Ee.data);_.fetchers.set(N,it)}Wo(Jl),_.navigation.state==="loading"&&Jl>O?(we(E,"Expected pending action"),C&&C.abort(),_e(_.navigation.location,{matches:Vo,loaderData:Wn,errors:qr,fetchers:new Map(_.fetchers)})):(ce({errors:qr,loaderData:O0(_.loaderData,Wn,Vo,qr),fetchers:new Map(_.fetchers)}),F=!1)}async function ht(N,A,z,G,ie,le){let he=_.fetchers.get(N),se=hs(le,he?he.data:void 0);_.fetchers.set(N,se),ce({fetchers:new Map(_.fetchers)});let oe=new AbortController,Le=fs(e.history,z,oe.signal);X.set(N,oe);let Qe=P,Ee=await ds("loader",Le,G,ie,i,o,a);if(ei(Ee)&&(Ee=await YE(Ee,Le.signal,!0)||Ee),X.get(N)===oe&&X.delete(N),Le.signal.aborted)return;if(te.has(N)){_.fetchers.set(N,io(void 0)),ce({fetchers:new Map(_.fetchers)});return}if(pl(Ee))if(O>Qe){let pt=io(void 0);_.fetchers.set(N,pt),ce({fetchers:new Map(_.fetchers)});return}else{I.add(N),await _t(_,Ee);return}if(Vs(Ee)){wt(N,A,Ee.error);return}we(!ei(Ee),"Unhandled fetcher deferred data");let Ie=io(Ee.data);_.fetchers.set(N,Ie),ce({fetchers:new Map(_.fetchers)})}async function _t(N,A,z){let{submission:G,fetcherSubmission:ie,replace:le}=z===void 0?{}:z;A.revalidate&&(F=!0);let he=Sa(N.location,A.location,{_isRedirect:!0});if(we(he,"Expected a location on the redirect navigation"),n){let Ie=!1;if(A.reloadDocument)Ie=!0;else if(VE.test(A.location)){const pt=e.history.createURL(A.location);Ie=pt.origin!==t.location.origin||Ba(pt.pathname,a)==null}if(Ie){le?t.location.replace(A.location):t.location.assign(A.location);return}}C=null;let se=le===!0?lt.Replace:lt.Push,{formMethod:oe,formAction:Le,formEncType:Qe}=N.navigation;!G&&!ie&&oe&&Le&&Qe&&(G=L0(N.navigation));let Ee=G||ie;if(MM.has(A.status)&&Ee&&Yn(Ee.formMethod))await Be(se,he,{submission:rt({},Ee,{formAction:A.location}),preventScrollReset:$});else{let Ie=Af(he,G);await Be(se,he,{overrideNavigation:Ie,fetcherSubmission:ie,preventScrollReset:$})}}async function pn(N,A,z,G,ie){let le=await Promise.all([...z.map(oe=>ds("loader",ie,oe,A,i,o,a)),...G.map(oe=>oe.matches&&oe.match&&oe.controller?ds("loader",fs(e.history,oe.path,oe.controller.signal),oe.match,oe.matches,i,o,a):{type:st.error,error:Rn(404,{pathname:oe.path})})]),he=le.slice(0,z.length),se=le.slice(z.length);return await Promise.all([D0(N,z,he,he.map(()=>ie.signal),!1,_.loaderData),D0(N,G.map(oe=>oe.match),se,G.map(oe=>oe.controller?oe.controller.signal:null),!0)]),{results:le,loaderResults:he,fetcherResults:se}}function It(){F=!0,ae.push(...Od()),L.forEach((N,A)=>{X.has(A)&&(H.push(A),jt(A))})}function wt(N,A,z){let G=Us(_.matches,A);Ot(N),ce({errors:{[G.route.id]:z},fetchers:new Map(_.fetchers)})}function Ot(N){let A=_.fetchers.get(N);X.has(N)&&!(A&&A.state==="loading"&&k.has(N))&&jt(N),L.delete(N),k.delete(N),I.delete(N),te.delete(N),_.fetchers.delete(N)}function or(N){if(u.v7_fetcherPersist){let A=(V.get(N)||0)-1;A<=0?(V.delete(N),te.add(N)):V.set(N,A)}else Ot(N);ce({fetchers:new Map(_.fetchers)})}function jt(N){let A=X.get(N);we(A,"Expected fetch controller: "+N),A.abort(),X.delete(N)}function zt(N){for(let A of N){let z=bn(A),G=io(z.data);_.fetchers.set(A,G)}}function ir(){let N=[],A=!1;for(let z of I){let G=_.fetchers.get(z);we(G,"Expected fetcher: "+z),G.state==="loading"&&(I.delete(z),N.push(z),A=!0)}return zt(N),A}function Wo(N){let A=[];for(let[z,G]of k)if(G<N){let ie=_.fetchers.get(z);we(ie,"Expected fetcher: "+z),ie.state==="loading"&&(jt(z),k.delete(z),A.push(z))}return zt(A),A.length>0}function Wa(N,A){let z=_.blockers.get(N)||cs;return fe.get(N)!==A&&fe.set(N,A),z}function Am(N){_.blockers.delete(N),fe.delete(N)}function Ua(N,A){let z=_.blockers.get(N)||cs;we(z.state==="unblocked"&&A.state==="blocked"||z.state==="blocked"&&A.state==="blocked"||z.state==="blocked"&&A.state==="proceeding"||z.state==="blocked"&&A.state==="unblocked"||z.state==="proceeding"&&A.state==="unblocked","Invalid blocker state transition: "+z.state+" -> "+A.state);let G=new Map(_.blockers);G.set(N,A),ce({blockers:G})}function Mm(N){let{currentLocation:A,nextLocation:z,historyAction:G}=N;if(fe.size===0)return;fe.size>1&&vi(!1,"A router only supports one blocker at a time");let ie=Array.from(fe.entries()),[le,he]=ie[ie.length-1],se=_.blockers.get(le);if(!(se&&se.state==="proceeding")&&he({currentLocation:A,nextLocation:z,historyAction:G}))return le}function Od(N){let A=[];return ye.forEach((z,G)=>{(!N||N(G))&&(z.cancel(),A.push(G),ye.delete(G))}),A}function _C(N,A,z){if(f=N,g=A,h=z||null,!m&&_.navigation===Of){m=!0;let G=Lm(_.location,_.matches);G!=null&&ce({restoreScrollPosition:G})}return()=>{f=null,g=null,h=null}}function Dm(N,A){return h&&h(N,A.map(G=>cM(G,_.loaderData)))||N.key}function wC(N,A){if(f&&g){let z=Dm(N,A);f[z]=g()}}function Lm(N,A){if(f){let z=Dm(N,A),G=f[z];if(typeof G=="number")return G}return null}function SC(N){i={},s=Ep(N,o,void 0,i)}return x={get basename(){return a},get state(){return _},get routes(){return l},get window(){return t},initialize:be,subscribe:ke,enableScrollRestoration:_C,navigate:me,fetch:Te,revalidate:$e,createHref:N=>e.history.createHref(N),encodeLocation:N=>e.history.encodeLocation(N),getFetcher:bn,deleteFetcher:or,dispose:Z,getBlocker:Wa,deleteBlocker:Am,_internalFetchControllers:X,_internalActiveDeferreds:ye,_internalSetRoutes:SC},x}function jM(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Cp(e,t,n,r,o,i,l){let s,a;if(i!=null&&l!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){a=c;break}}else s=t,a=t[t.length-1];let u=BE(o||".",Em(s).map(c=>c.pathnameBase),Ba(e.pathname,n)||e.pathname,l==="path");return o==null&&(u.search=e.search,u.hash=e.hash),(o==null||o===""||o===".")&&a&&a.route.index&&!$m(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:ko([n,u.pathname])),Fa(u)}function k0(e,t,n,r){if(!r||!jM(r))return{path:n};if(r.formMethod&&!HM(r.formMethod))return{path:n,error:Rn(405,{method:r.formMethod})};let o=()=>({path:n,error:Rn(400,{type:"invalid-body"})}),i=r.formMethod||"get",l=e?i.toUpperCase():i.toLowerCase(),s=GE(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Yn(l))return o();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((h,g)=>{let[m,S]=g;return""+h+m+"="+S+`
175
+ `},""):String(r.body);return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Yn(l))return o();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return o()}}}we(typeof FormData=="function","FormData is not available in this environment");let a,u;if(r.formData)a=$p(r.formData),u=r.formData;else if(r.body instanceof FormData)a=$p(r.body),u=r.body;else if(r.body instanceof URLSearchParams)a=r.body,u=R0(a);else if(r.body==null)a=new URLSearchParams,u=new FormData;else try{a=new URLSearchParams(r.body),u=R0(a)}catch{return o()}let c={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(Yn(c.formMethod))return{path:n,submission:c};let d=Jr(n);return t&&d.search&&$m(d.search)&&a.append("index",""),d.search="?"+a,{path:Fa(d),submission:c}}function zM(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function T0(e,t,n,r,o,i,l,s,a,u,c,d,f,h){let g=h?Object.values(h)[0]:f?Object.values(f)[0]:void 0,m=e.createURL(t.location),S=e.createURL(o),v=h?Object.keys(h)[0]:void 0,x=zM(n,v).filter((E,$)=>{if(E.route.lazy)return!0;if(E.route.loader==null)return!1;if(FM(t.loaderData,t.matches[$],E)||l.some(M=>M===E.route.id))return!0;let C=t.matches[$],T=E;return N0(E,rt({currentUrl:m,currentParams:C.params,nextUrl:S,nextParams:T.params},r,{actionResult:g,defaultShouldRevalidate:i||m.pathname+m.search===S.pathname+S.search||m.search!==S.search||KE(C,T)}))}),_=[];return a.forEach((E,$)=>{if(!n.some(j=>j.route.id===E.routeId))return;let C=rl(c,E.path,d);if(!C){_.push({key:$,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let T=t.fetchers.get($),M=kp(C,E.path),R=!1;u.has($)?R=!1:s.includes($)?R=!0:T&&T.state!=="idle"&&T.data===void 0?R=i:R=N0(M,rt({currentUrl:m,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:g,defaultShouldRevalidate:i})),R&&_.push({key:$,routeId:E.routeId,path:E.path,matches:C,match:M,controller:new AbortController})}),[x,_]}function FM(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function KE(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function N0(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function b0(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];we(o,"No route found in manifest");let i={};for(let l in r){let a=o[l]!==void 0&&l!=="hasErrorBoundary";vi(!a,'Route "'+o.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+l+'" will be ignored.')),!a&&!aM.has(l)&&(i[l]=r[l])}Object.assign(o,i),Object.assign(o,rt({},t(o),{lazy:void 0}))}async function ds(e,t,n,r,o,i,l,s){s===void 0&&(s={});let a,u,c,d=g=>{let m,S=new Promise((v,y)=>m=y);return c=()=>m(),t.signal.addEventListener("abort",c),Promise.race([g({request:t,params:n.params,context:s.requestContext}),S])};try{let g=n.route[e];if(n.route.lazy)if(g){let m,S=await Promise.all([d(g).catch(v=>{m=v}),b0(n.route,i,o)]);if(m)throw m;u=S[0]}else if(await b0(n.route,i,o),g=n.route[e],g)u=await d(g);else if(e==="action"){let m=new URL(t.url),S=m.pathname+m.search;throw Rn(405,{method:t.method,pathname:S,routeId:n.route.id})}else return{type:st.data,data:void 0};else if(g)u=await d(g);else{let m=new URL(t.url),S=m.pathname+m.search;throw Rn(404,{pathname:S})}we(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(g){a=st.error,u=g}finally{c&&t.signal.removeEventListener("abort",c)}if(VM(u)){let g=u.status;if(AM.has(g)){let v=u.headers.get("Location");if(we(v,"Redirects returned/thrown from loaders/actions must have a Location header"),!VE.test(v))v=Cp(new URL(t.url),r.slice(0,r.indexOf(n)+1),l,!0,v);else if(!s.isStaticRequest){let y=new URL(t.url),x=v.startsWith("//")?new URL(y.protocol+v):new URL(v),_=Ba(x.pathname,l)!=null;x.origin===y.origin&&_&&(v=x.pathname+x.search+x.hash)}if(s.isStaticRequest)throw u.headers.set("Location",v),u;return{type:st.redirect,status:g,location:v,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:a===st.error?st.error:st.data,response:u};let m,S=u.headers.get("Content-Type");return S&&/\bapplication\/json\b/.test(S)?m=await u.json():m=await u.text(),a===st.error?{type:a,error:new Cm(g,u.statusText,m),headers:u.headers}:{type:st.data,data:m,statusCode:u.status,headers:u.headers}}if(a===st.error)return{type:a,error:u};if(UM(u)){var f,h;return{type:st.deferred,deferredData:u,statusCode:(f=u.init)==null?void 0:f.status,headers:((h=u.init)==null?void 0:h.headers)&&new Headers(u.init.headers)}}return{type:st.data,data:u}}function fs(e,t,n,r){let o=e.createURL(GE(t)).toString(),i={signal:n};if(r&&Yn(r.formMethod)){let{formMethod:l,formEncType:s}=r;i.method=l.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=$p(r.formData):i.body=r.formData}return new Request(o,i)}function $p(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function R0(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function BM(e,t,n,r,o){let i={},l=null,s,a=!1,u={};return n.forEach((c,d)=>{let f=t[d].route.id;if(we(!pl(c),"Cannot handle redirect results in processLoaderData"),Vs(c)){let h=Us(e,f),g=c.error;r&&(g=Object.values(r)[0],r=void 0),l=l||{},l[h.route.id]==null&&(l[h.route.id]=g),i[f]=void 0,a||(a=!0,s=WE(c.error)?c.error.status:500),c.headers&&(u[f]=c.headers)}else ei(c)?(o.set(f,c.deferredData),i[f]=c.deferredData.data):i[f]=c.data,c.statusCode!=null&&c.statusCode!==200&&!a&&(s=c.statusCode),c.headers&&(u[f]=c.headers)}),r&&(l=r,i[Object.keys(r)[0]]=void 0),{loaderData:i,errors:l,statusCode:s||200,loaderHeaders:u}}function P0(e,t,n,r,o,i,l,s){let{loaderData:a,errors:u}=BM(t,n,r,o,s);for(let c=0;c<i.length;c++){let{key:d,match:f,controller:h}=i[c];we(l!==void 0&&l[c]!==void 0,"Did not find corresponding fetcher result");let g=l[c];if(!(h&&h.signal.aborted))if(Vs(g)){let m=Us(e.matches,f==null?void 0:f.route.id);u&&u[m.route.id]||(u=rt({},u,{[m.route.id]:g.error})),e.fetchers.delete(d)}else if(pl(g))we(!1,"Unhandled fetcher revalidation redirect");else if(ei(g))we(!1,"Unhandled fetcher deferred data");else{let m=io(g.data);e.fetchers.set(d,m)}}return{loaderData:a,errors:u}}function O0(e,t,n,r){let o=rt({},t);for(let i of n){let l=i.route.id;if(t.hasOwnProperty(l)?t[l]!==void 0&&(o[l]=t[l]):e[l]!==void 0&&i.route.loader&&(o[l]=e[l]),r&&r.hasOwnProperty(l))break}return o}function Us(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function A0(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Rn(e,t){let{pathname:n,routeId:r,method:o,type:i}=t===void 0?{}:t,l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",o&&n&&r?s="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s='Route "'+r+'" does not match URL "'+n+'"'):e===404?(l="Not Found",s='No route matches URL "'+n+'"'):e===405&&(l="Method Not Allowed",o&&n&&r?s="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Cm(e||500,l,new Error(s),!0)}function M0(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(pl(n))return{result:n,idx:t}}}function GE(e){let t=typeof e=="string"?Jr(e):e;return Fa(rt({},t,{hash:""}))}function WM(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ei(e){return e.type===st.deferred}function Vs(e){return e.type===st.error}function pl(e){return(e&&e.type)===st.redirect}function UM(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function VM(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function HM(e){return OM.has(e.toLowerCase())}function Yn(e){return RM.has(e.toLowerCase())}async function D0(e,t,n,r,o,i){for(let l=0;l<n.length;l++){let s=n[l],a=t[l];if(!a)continue;let u=e.find(d=>d.route.id===a.route.id),c=u!=null&&!KE(u,a)&&(i&&i[a.route.id])!==void 0;if(ei(s)&&(o||c)){let d=r[l];we(d,"Expected an AbortSignal for revalidating fetcher deferred result"),await YE(s,d,o).then(f=>{f&&(n[l]=f||n[l])})}}}async function YE(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:st.data,data:e.deferredData.unwrappedData}}catch(o){return{type:st.error,error:o}}return{type:st.data,data:e.deferredData.data}}}function $m(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function kp(e,t){let n=typeof t=="string"?Jr(t).search:t.search;if(e[e.length-1].route.index&&$m(n||""))return e[e.length-1];let r=Em(e);return r[r.length-1]}function L0(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:i,json:l}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:l,text:void 0}}}function Af(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function KM(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function hs(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function GM(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function io(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function YM(e,t){try{let n=e.sessionStorage.getItem(HE);if(n){let r=JSON.parse(n);for(let[o,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(o,new Set(i||[]))}}catch{}}function XM(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(HE,JSON.stringify(n))}catch(r){vi(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
176
+ * React Router v6.18.0
177
+ *
178
+ * Copyright (c) Remix Software Inc.
179
+ *
180
+ * This source code is licensed under the MIT license found in the
181
+ * LICENSE.md file in the root directory of this source tree.
182
+ *
183
+ * @license MIT
184
+ */function Ic(){return Ic=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ic.apply(this,arguments)}const kd=p.createContext(null),XE=p.createContext(null),Td=p.createContext(null),Nd=p.createContext(null),Ri=p.createContext({outlet:null,matches:[],isDataRoute:!1}),QE=p.createContext(null);function bd(){return p.useContext(Nd)!=null}function JE(){return bd()||we(!1),p.useContext(Nd).location}function ZE(e){p.useContext(Td).static||p.useLayoutEffect(e)}function km(){let{isDataRoute:e}=p.useContext(Ri);return e?a3():QM()}function QM(){bd()||we(!1);let e=p.useContext(kd),{basename:t,navigator:n}=p.useContext(Td),{matches:r}=p.useContext(Ri),{pathname:o}=JE(),i=JSON.stringify(Em(r).map(a=>a.pathnameBase)),l=p.useRef(!1);return ZE(()=>{l.current=!0}),p.useCallback(function(a,u){if(u===void 0&&(u={}),!l.current)return;if(typeof a=="number"){n.go(a);return}let c=BE(a,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:ko([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}function JM(){let{matches:e}=p.useContext(Ri),t=e[e.length-1];return t?t.params:{}}function ZM(e,t,n){bd()||we(!1);let{navigator:r}=p.useContext(Td),{matches:o}=p.useContext(Ri),i=o[o.length-1],l=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let a=JE(),u;if(t){var c;let m=typeof t=="string"?Jr(t):t;s==="/"||(c=m.pathname)!=null&&c.startsWith(s)||we(!1),u=m}else u=a;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",h=rl(e,{pathname:f}),g=r3(h&&h.map(m=>Object.assign({},m,{params:Object.assign({},l,m.params),pathname:ko([s,r.encodeLocation?r.encodeLocation(m.pathname).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?s:ko([s,r.encodeLocation?r.encodeLocation(m.pathnameBase).pathname:m.pathnameBase])})),o,n);return t&&g?p.createElement(Nd.Provider,{value:{location:Ic({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:lt.Pop}},g):g}function qM(){let e=s3(),t=WE(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:o},n):null,i)}const e3=p.createElement(qM,null);class t3 extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?p.createElement(Ri.Provider,{value:this.props.routeContext},p.createElement(QE.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function n3(e){let{routeContext:t,match:n,children:r}=e,o=p.useContext(kd);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Ri.Provider,{value:t},r)}function r3(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,l=(r=n)==null?void 0:r.errors;if(l!=null){let s=i.findIndex(a=>a.route.id&&(l==null?void 0:l[a.route.id]));s>=0||we(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,a,u)=>{let c=a.route.id?l==null?void 0:l[a.route.id]:null,d=null;n&&(d=a.route.errorElement||e3);let f=t.concat(i.slice(0,u+1)),h=()=>{let g;return c?g=d:a.route.Component?g=p.createElement(a.route.Component,null):a.route.element?g=a.route.element:g=s,p.createElement(n3,{match:a,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:g})};return n&&(a.route.ErrorBoundary||a.route.errorElement||u===0)?p.createElement(t3,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:h(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):h()},null)}var qE=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(qE||{}),jc=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(jc||{});function o3(e){let t=p.useContext(kd);return t||we(!1),t}function i3(e){let t=p.useContext(XE);return t||we(!1),t}function l3(e){let t=p.useContext(Ri);return t||we(!1),t}function eC(e){let t=l3(),n=t.matches[t.matches.length-1];return n.route.id||we(!1),n.route.id}function s3(){var e;let t=p.useContext(QE),n=i3(jc.UseRouteError),r=eC(jc.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function a3(){let{router:e}=o3(qE.UseNavigateStable),t=eC(jc.UseNavigateStable),n=p.useRef(!1);return ZE(()=>{n.current=!0}),p.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Ic({fromRouteId:t},i)))},[e,t])}function u3(e){let{basename:t="/",children:n=null,location:r,navigationType:o=lt.Pop,navigator:i,static:l=!1}=e;bd()&&we(!1);let s=t.replace(/^\/*/,"/"),a=p.useMemo(()=>({basename:s,navigator:i,static:l}),[s,i,l]);typeof r=="string"&&(r=Jr(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:h="default"}=r,g=p.useMemo(()=>{let m=Ba(u,s);return m==null?null:{location:{pathname:m,search:c,hash:d,state:f,key:h},navigationType:o}},[s,u,c,d,f,h,o]);return g==null?null:p.createElement(Td.Provider,{value:a},p.createElement(Nd.Provider,{children:n,value:g}))}new Promise(()=>{});function c3(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}const tC=q.createContext(null),d3=e=>{var s,a;const t=q.useContext(tC),[n,r]=wn.splitModuleIdAndModulePath(e),o=(s=t==null?void 0:t[n])==null?void 0:s.source,i=(a=t==null?void 0:t[n])==null?void 0:a.schema;if(!o||!i)throw Error("Could not find module: "+n);const l=wn.resolvePath(r,o,i);return{moduleId:n,moduleSource:l.source,moduleSchema:l.schema}},f3=({valApi:e})=>{var _,E;const{"*":t}=JM(),[n,r]=p.useState(null),[o,i]=p.useState(null),[l,s]=p.useState(),[a]=l?wn.splitModuleIdAndModulePath(l):[void 0,void 0],u=a&&((_=n==null?void 0:n[a])==null?void 0:_.source),c=a&&((E=n==null?void 0:n[a])==null?void 0:E.schema),d=Object.entries(n||{}).flatMap(([,$])=>$.errors?$.errors.fatal?$.errors.fatal:[]:[]),f=Object.entries(n||{}).flatMap(([,$])=>$.errors&&$.errors.validation?[$.errors.validation]:[]);if(d&&d.length>0){const $=d.length===1?d[0].message:`Multiple errors detected:
185
+ ${d.map((T,M)=>`${M+1}. ${T.message}`).join(`
186
+ `)}
187
+
188
+ Showing stack trace of: 0. ${d[0].message}`,C=new Error($);throw C.stack=d[0].stack,C}f&&f.length>0&&console.warn("Val encountered validation errors:",f),p.useEffect(()=>{s(t?`/${t}`:l)},[t]);const[h,g]=p.useState(null);p.useEffect(()=>{try{new WebSocket(`${window.location.origin.replace("http://","ws://")}/_next/webpack-hmr`).addEventListener("message",C=>{let T;try{T=JSON.parse(C.data)}catch{console.error("Failed to parse HMR")}typeof(T==null?void 0:T.hash)=="string"&&(T==null?void 0:T.action)==="built"&&g(T.hash)})}catch($){console.warn("Failed to initialize HMR",$)}},[]),p.useEffect(()=>{console.log("(Re)-fetching modules"),e.getModules({patch:!0,includeSchema:!0,includeSource:!0}).then($=>{Ps.isOk($)?r($.value.modules):(i("Could not load modules: "+$.error.message),console.error($.error))})},[h]);const m=km(),[S,v]=AP();p.useEffect(()=>{const $=C=>{console.log("popstate",C)};return window.addEventListener("popstate",$),()=>{window.removeEventListener("popstate",$)}},[]);const y=q.useRef(null),x=p.useCallback($=>async C=>{const[T,M]=wn.splitModuleIdAndModulePath($),R=await C(wn.createPatchJSONPath(M));return e.postPatches(T,R).then(j=>{if(Ps.isErr(j))throw j.error;if(console.log("submitted",R),!h)return e.getModules({patch:!0,includeSchema:!0,includeSource:!0}).then(F=>{Ps.isOk(F)?r(F.value.modules):(i("Could not load modules: "+F.error.message),console.error(F.error))})}).catch(j=>{console.error(j)})},[]);return w.jsx($S.Provider,{value:{theme:S,setTheme:v,api:e,editMode:"full",session:{status:"not-asked"},highlight:!1,setHighlight:()=>{},setEditMode:()=>{},setWindowSize:()=>{}},children:w.jsxs("div",{id:"val-fullscreen-container",className:"relative font-serif antialiased","data-mode":S,children:[w.jsx("div",{className:"fixed -translate-x-1/2 z-overlay left-1/2 bottom-4",children:w.jsx(bP,{api:e})}),w.jsx("div",{id:"val-fullscreen-hover",ref:y}),w.jsx(nC.Provider,{value:{hoverElem:y==null?void 0:y.current},children:w.jsx("div",{className:"text-primary bg-background",children:w.jsxs(As,{children:[w.jsx("div",{className:"px-4 h-[50px] flex items-center justify-center",children:w.jsx(DE,{})}),w.jsx(Os,{className:"px-4",children:n?w.jsx(w3,{paths:Object.keys(n),setSelectedModuleId:$=>{m($)}}):!o&&w.jsx("div",{className:"py-4",children:"Loading..."})}),w.jsxs("div",{className:"flex items-center justify-start w-full h-[50px] gap-2 font-serif text-xs",children:[w.jsx("button",{onClick:()=>{history.back()},children:w.jsx(_P,{})}),w.jsx("p",{children:l||"/"})]}),w.jsxs("div",{className:"p-4",children:[o&&w.jsxs("div",{className:"text-lg text-destructive-foreground",children:["ERROR: ",o]}),n&&l&&a&&u!==void 0&&c!==void 0&&w.jsx(tC.Provider,{value:n,children:w.jsx(p3,{path:l,source:u,schema:c,setSelectedPath:s,initOnSubmit:x})})]})]})})})]})})},nC=q.createContext({hoverElem:null}),h3=()=>q.useContext(nC);function p3({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o}){const[,i]=wn.splitModuleIdAndModulePath(e),l=wn.resolvePath(i,t,n);if(!l)throw Error("Could not resolve module: "+e);return w.jsx(rC,{path:e,source:l.source,schema:l.schema,setSelectedPath:r,initOnSubmit:o,top:!0})}function rC({path:e,source:t,schema:n,setSelectedPath:r,field:o,initOnSubmit:i,top:l}){return t===null||n.opt?w.jsx(y3,{path:e,source:t,schema:n,field:o,initOnSubmit:i,setSelectedPath:r}):n.type==="object"?typeof t!="object"||Hs(t)?w.jsxs("div",{children:["ERROR: expected object, but found ",typeof t]}):w.jsx(oC,{source:t,path:e,schema:n,initOnSubmit:i,setSelectedPath:r,top:l}):n.type==="array"?typeof t!="object"||!Hs(t)?w.jsxs("div",{children:["ERROR: expected array, but found ",typeof t]}):w.jsx(iC,{source:t,path:e,schema:n,setSelectedPath:r}):n.type==="record"?typeof t!="object"?w.jsxs("div",{children:["ERROR: expected object for ",n.type,", but found ",typeof t]}):Hs(t)?w.jsxs("div",{children:["ERROR: did not expect array for ",n.type]}):w.jsx(g3,{source:t,path:e,schema:n,setSelectedPath:r}):w.jsxs("div",{className:"py-2 gap-y-4",children:[w.jsx("div",{className:"text-left",children:o||e}),w.jsx(ME,{path:e,disabled:!1,source:t,schema:n,onSubmit:i(e)})]})}function oC({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,top:i}){return w.jsx("div",{className:rd("flex flex-col gap-y-8",{"border-l-2 border-border pl-6":!i}),children:Object.entries(n.items).map(([l,s])=>{const a=Ea(e,l);return w.jsx(rC,{path:a,source:t[l],schema:s,setSelectedPath:r,field:l,initOnSubmit:o},a)})},e)}function g3({path:e,source:t,schema:n,setSelectedPath:r}){const o=km();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:Object.entries(t).map(([i,l])=>{const s=Ea(e,i);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(m3,{recordKey:i,path:s,source:l,schema:n.item})},s)})},e)}const Tp=170;function m3({recordKey:e,path:t,source:n,schema:r}){const o=q.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=Tp&&l(!0)},[]),w.jsxs(Sm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:Tp},children:[w.jsx("div",{className:"pb-4 font-serif text-left text-accent",children:e}),w.jsx("div",{className:"text-xs",children:w.jsx(Tm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]},t)}function iC({path:e,source:t,schema:n,setSelectedPath:r}){const o=km();return w.jsx("div",{className:"flex flex-col gap-4 p-2",children:t.map((i,l)=>{const s=Ea(e,l);return w.jsx("button",{onClick:()=>{r(s),o(s)},children:w.jsx(v3,{index:l,path:s,source:i,schema:n.item},s)},s)})},e)}const I0=Tp;function v3({index:e,path:t,source:n,schema:r}){const o=q.useRef(null),[i,l]=p.useState(!1);return p.useEffect(()=>{o.current&&o.current.getBoundingClientRect().height>=I0&&l(!0)},[]),w.jsxs(Sm,{ref:o,className:"relative px-4 pt-2 pb-4 overflow-hidden border gap-y-2",style:{maxHeight:I0},children:[w.jsx("div",{className:"pb-4 font-serif text-left uppercase text-accent",children:e+1<10?`0${e+1}`:e+1}),w.jsx("div",{className:"text-xs",children:w.jsx(Tm,{path:t,source:n,schema:r})}),i&&w.jsx("div",{className:"absolute bottom-0 left-0 w-full h-[20px] bg-gradient-to-b from-transparent to-background"})]})}function Ea(e,t){const n=wn.createValPathOfItem(e,t);if(!n)throw Error(`Could not create val path: ${e} of ${t==null?void 0:t.toString()}`);return n}function Tm({path:e,source:t,schema:n}){const[r,o]=p.useState(null),{hoverElem:i}=h3();if(n.type==="object")return w.jsx("div",{className:"grid grid-cols-[min-content_1fr] gap-2 text-left",children:Object.entries(n.items).map(([l])=>w.jsxs(p.Fragment,{children:[w.jsxs("span",{className:"text-muted",children:[l,":"]}),w.jsx("span",{children:w.jsx(Tm,{source:(t==null?void 0:t[l])??null,schema:n.items[l],path:Ea(e,l)})})]},Ea(e,l)))},e);if(n.type==="array")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):Array.isArray(t)?w.jsxs("span",{children:[w.jsx("span",{className:"text-accent",children:t.length}),w.jsx("span",{children:t.length===1?" item":" items"})]},e):w.jsx("span",{className:"px-2 bg-destructive text-destructive-foreground",children:"Unknown length"},e);if(n.type==="richtext")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):typeof t!="object"?w.jsxs("div",{className:"p-4 text-destructive-foreground bg-destructive",children:["ERROR: ",typeof t," not an object"]},e):!(nn in t)||t[nn]!=="richtext"?w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not richtext"},e):w.jsx(S3,{children:BS(t)},e);if(n.type==="string")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{children:t});if(n.type==="image"){if(t===null)return w.jsx("span",{className:"text-accent",children:"Empty"},e);if(typeof t!="object")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: not an object"},e);if(!(_n in t)||typeof t[_n]!="string")return w.jsx("div",{className:"p-4 text-destructive-foreground bg-destructive",children:"ERROR: object is not an image"},e);const l=wn.convertFileSource(t).url;return w.jsxs("span",{onMouseOver:s=>{o({x:s.clientX,y:s.clientY})},onMouseLeave:()=>{o(null)},className:"relative flex items-center justify-start gap-1",children:[w.jsx("a",{href:l,className:"overflow-hidden underline truncate ",children:t[_n]}),r&&i&&Hr.createPortal(w.jsx("img",{className:"absolute z-[5] max-w-[10vw]",style:{left:r.x+10,top:r.y+10},src:l}),i)]},e)}else{if(n.type==="boolean")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t?"true":"false"},e);if(n.type==="number")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()});if(n.type==="keyOf")return t===null?w.jsx("span",{className:"text-accent",children:"Empty"},e):w.jsx("span",{className:"text-accent",children:t.toString()},e)}return w.jsxs("div",{children:["TODO: ",n.type]},e)}function y3({path:e,source:t,schema:n,setSelectedPath:r,initOnSubmit:o,field:i}){const[l,s]=p.useState(t!==null);return w.jsxs("div",{className:"flex flex-col gap-y-6",children:[i?w.jsxs("div",{className:"flex items-center justify-start gap-x-4",children:[w.jsx(Sp,{checked:l,onClick:()=>{s(a=>!a)}}),w.jsx("span",{children:i})]}):w.jsx(Sp,{checked:l,onClick:()=>{s(a=>!a)}}),l&&w.jsx(x3,{source:t,schema:n,path:e,setSelectedPath:r,initOnSubmit:o})]},e)}function x3({source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o}){if(n.type==="array"){if(typeof e=="object"&&(e===null||Hs(e)))return w.jsx(iC,{source:e===null?[]:e,path:t,schema:n,setSelectedPath:r})}else if(n.type==="object"){if(typeof e=="object"&&(e===null||!Hs(e)))return w.jsx(oC,{source:e,path:t,schema:n,setSelectedPath:r,initOnSubmit:o})}else if(n.type==="richtext"||n.type==="string"||n.type==="image"||n.type==="number"||n.type==="keyOf")return w.jsx(ME,{path:t,disabled:!1,source:e,schema:n,onSubmit:o(t)},t);return w.jsxs("div",{className:"p-4 bg-destructive text-destructive-foreground",children:["ERROR: unexpected source type ",typeof e," for schema type"," ",n.type]})}function Hs(e){return Array.isArray(e)}function _3(e){const t={};return e.forEach(n=>{const r=n.split("/").filter(i=>i!=="");let o=t;r.forEach(i=>{o[i]||(o[i]={}),o=o[i]})}),t}function w3({paths:e,setSelectedModuleId:t}){const n=_3(e);return w.jsx(O_,{children:Object.entries(n).map(([r,o])=>w.jsx("div",{className:"px-4 py-2",children:w.jsx(lC,{name:r,tree:o,moduleId:`/${r}`,setSelectedModuleId:t})},`/${r}`))})}function lC({name:e,tree:t,moduleId:n,setSelectedModuleId:r}){return w.jsxs("div",{children:[w.jsx("button",{onClick:()=>{r(n)},children:e}),Object.entries(t).map(([o,i])=>w.jsx("div",{className:"px-4 py-1",children:w.jsx(lC,{name:o,tree:i,moduleId:`${n}/${o}`,setSelectedModuleId:r})},`${n}/${o}`))]})}const j0={tags:{h1:"font-bold",h2:"font-bold",h3:"font-bold",h4:"font-bold",h5:"font-bold",h6:"font-bold",p:""},classes:{bold:"font-bold",italic:"italic",lineThrough:"line-through"}};function S3({children:e}){const t=e;function n(i,l){const s=j0.tags[i];return s&&l?[l,s].join(" "):s||l}function r(i,l){const s=j0.classes[i];return s&&l?[l,s].join(" "):s||l}function o(i,l){var u,c;if(typeof i=="string")return i;if(i.tag==="p")return w.jsx("p",{className:n("p"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="img")return w.jsx("img",{className:n("img"),src:i.src},l);if(i.tag==="ul")return w.jsx("ul",{className:n("ul"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="ol")return w.jsx("ol",{className:n("ol"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="li")return w.jsx("li",{className:n("li"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="span")return w.jsx("span",{className:i.classes.map(d=>{switch(d){case"bold":return r("bold");case"line-through":return r("lineThrough");case"italic":return r("italic")}}).join(" "),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h1")return w.jsx("h1",{className:n("h1"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h2")return w.jsx("h2",{className:n("h2"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h3")return w.jsx("h3",{className:n("h3"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h4")return w.jsx("h4",{className:n("h4"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h5")return w.jsx("h5",{className:n("h5"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="h6")return w.jsx("h6",{className:n("h6"),children:i.children.map((d,f)=>o(d,f))},l);if(i.tag==="br")return w.jsx("br",{},l);if(i.tag==="a")return w.jsx("a",{href:i.href,children:i.children.map((d,f)=>o(d,f))},l);console.error("Unknown tag",i.tag);const a=i.tag;return a!=null&&a.tag?q.createElement(a.tag,{key:l,className:(u=a.class)==null?void 0:u.join(" "),children:(c=a.children)==null?void 0:c.map(o)}):null}return w.jsx("span",{"data-val-path":t.valPath,children:t.children.map((i,l)=>o(i,l))})}const E3=p.createContext(null),Mf={didCatch:!1,error:null};class C3 extends p.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Mf}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,o=arguments.length,i=new Array(o),l=0;l<o;l++)i[l]=arguments[l];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:i,reason:"imperative-api"}),this.setState(Mf)}}componentDidCatch(t,n){var r,o;(r=(o=this.props).onError)===null||r===void 0||r.call(o,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:o}=this.props;if(r&&n.error!==null&&$3(t.resetKeys,o)){var i,l;(i=(l=this.props).onReset)===null||i===void 0||i.call(l,{next:o,prev:t.resetKeys,reason:"keys"}),this.setState(Mf)}}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:o}=this.props,{didCatch:i,error:l}=this.state;let s=t;if(i){const a={error:l,resetErrorBoundary:this.resetErrorBoundary};if(p.isValidElement(o))s=o;else if(typeof n=="function")s=n(a);else if(r)s=p.createElement(r,a);else throw l}return p.createElement(E3.Provider,{value:{didCatch:i,error:l,resetErrorBoundary:this.resetErrorBoundary}},s)}}function $3(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}const sC="Collapsible",[k3,aC]=Ci(sC),[T3,Nm]=k3(sC),N3=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:l,...s}=e,[a=!1,u]=bl({prop:r,defaultProp:o,onChange:l});return p.createElement(T3,{scope:n,disabled:i,contentId:xd(),open:a,onOpenToggle:p.useCallback(()=>u(c=>!c),[u])},p.createElement(De.div,ee({"data-state":bm(a),"data-disabled":i?"":void 0},s,{ref:t})))}),b3="CollapsibleTrigger",R3=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Nm(b3,n);return p.createElement(De.button,ee({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":bm(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},r,{ref:t,onClick:He(e.onClick,o.onOpenToggle)}))}),uC="CollapsibleContent",P3=p.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Nm(uC,e.__scopeCollapsible);return p.createElement(Dl,{present:n||o.open},({present:i})=>p.createElement(O3,ee({},r,{ref:t,present:i})))}),O3=p.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,l=Nm(uC,n),[s,a]=p.useState(r),u=p.useRef(null),c=Xe(t,u),d=p.useRef(0),f=d.current,h=p.useRef(0),g=h.current,m=l.open||s,S=p.useRef(m),v=p.useRef();return p.useEffect(()=>{const y=requestAnimationFrame(()=>S.current=!1);return()=>cancelAnimationFrame(y)},[]),$n(()=>{const y=u.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const x=y.getBoundingClientRect();d.current=x.height,h.current=x.width,S.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),a(r)}},[l.open,r]),p.createElement(De.div,ee({"data-state":bm(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!m},i,{ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),m&&o)});function bm(e){return e?"open":"closed"}const A3=N3,M3=R3,D3=P3,Bo="Accordion",L3=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Rm,I3,j3]=HS(Bo),[Rd,x4]=Ci(Bo,[j3,aC]),Pm=aC(),cC=q.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,i=r;return q.createElement(Rm.Provider,{scope:e.__scopeAccordion},n==="multiple"?q.createElement(W3,ee({},i,{ref:t})):q.createElement(B3,ee({},o,{ref:t})))});cC.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):e.type==="multiple"&&typeof t=="string"?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):e.type==="single"&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[dC,z3]=Rd(Bo),[fC,F3]=Rd(Bo,{collapsible:!1}),B3=q.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:i=!1,...l}=e,[s,a]=bl({prop:n,defaultProp:r,onChange:o});return q.createElement(dC,{scope:e.__scopeAccordion,value:s?[s]:[],onItemOpen:a,onItemClose:q.useCallback(()=>i&&a(""),[i,a])},q.createElement(fC,{scope:e.__scopeAccordion,collapsible:i},q.createElement(hC,ee({},l,{ref:t}))))}),W3=q.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...i}=e,[l=[],s]=bl({prop:n,defaultProp:r,onChange:o}),a=q.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=q.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return q.createElement(dC,{scope:e.__scopeAccordion,value:l,onItemOpen:a,onItemClose:u},q.createElement(fC,{scope:e.__scopeAccordion,collapsible:!0},q.createElement(hC,ee({},i,{ref:t}))))}),[U3,Pd]=Rd(Bo),hC=q.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:i="vertical",...l}=e,s=q.useRef(null),a=Xe(s,t),u=I3(n),d=Tg(o)==="ltr",f=He(e.onKeyDown,h=>{var g;if(!L3.includes(h.key))return;const m=h.target,S=u().filter(M=>{var R;return!((R=M.ref.current)!==null&&R!==void 0&&R.disabled)}),v=S.findIndex(M=>M.ref.current===m),y=S.length;if(v===-1)return;h.preventDefault();let x=v;const _=0,E=y-1,$=()=>{x=v+1,x>E&&(x=_)},C=()=>{x=v-1,x<_&&(x=E)};switch(h.key){case"Home":x=_;break;case"End":x=E;break;case"ArrowRight":i==="horizontal"&&(d?$():C());break;case"ArrowDown":i==="vertical"&&$();break;case"ArrowLeft":i==="horizontal"&&(d?C():$());break;case"ArrowUp":i==="vertical"&&C();break}const T=x%y;(g=S[T].ref.current)===null||g===void 0||g.focus()});return q.createElement(U3,{scope:n,disabled:r,direction:o,orientation:i},q.createElement(Rm.Slot,{scope:n},q.createElement(De.div,ee({},l,{"data-orientation":i,ref:a,onKeyDown:r?void 0:f}))))}),Np="AccordionItem",[V3,Om]=Rd(Np),H3=q.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,i=Pd(Np,n),l=z3(Np,n),s=Pm(n),a=xd(),u=r&&l.value.includes(r)||!1,c=i.disabled||e.disabled;return q.createElement(V3,{scope:n,open:u,disabled:c,triggerId:a},q.createElement(A3,ee({"data-orientation":i.orientation,"data-state":pC(u)},s,o,{ref:t,disabled:c,open:u,onOpenChange:d=>{d?l.onItemOpen(r):l.onItemClose(r)}})))}),K3="AccordionHeader",G3=q.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pd(Bo,n),i=Om(K3,n);return q.createElement(De.h3,ee({"data-orientation":o.orientation,"data-state":pC(i.open),"data-disabled":i.disabled?"":void 0},r,{ref:t}))}),z0="AccordionTrigger",Y3=q.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pd(Bo,n),i=Om(z0,n),l=F3(z0,n),s=Pm(n);return q.createElement(Rm.ItemSlot,{scope:n},q.createElement(M3,ee({"aria-disabled":i.open&&!l.collapsible||void 0,"data-orientation":o.orientation,id:i.triggerId},s,r,{ref:t})))}),X3="AccordionContent",Q3=q.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Pd(Bo,n),i=Om(X3,n),l=Pm(n);return q.createElement(D3,ee({role:"region","aria-labelledby":i.triggerId,"data-orientation":o.orientation},l,r,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))});function pC(e){return e?"open":"closed"}const J3=cC,Z3=H3,q3=G3,gC=Y3,mC=Q3,e4=J3,vC=p.forwardRef(({className:e,...t},n)=>w.jsx(Z3,{ref:n,className:ot("border-b",e),...t}));vC.displayName="AccordionItem";const yC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(q3,{className:"flex",children:w.jsxs(gC,{ref:r,className:ot("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,w.jsx(MS,{className:"w-4 h-4 transition-transform duration-200 shrink-0"})]})}));yC.displayName=gC.displayName;const xC=p.forwardRef(({className:e,children:t,...n},r)=>w.jsx(mC,{ref:r,className:ot("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...n,children:w.jsx("div",{className:"pt-0 pb-4",children:t})}));xC.displayName=mC.displayName;/**
189
+ * React Router DOM v6.18.0
190
+ *
191
+ * Copyright (c) Remix Software Inc.
192
+ *
193
+ * This source code is licensed under the MIT license found in the
194
+ * LICENSE.md file in the root directory of this source tree.
195
+ *
196
+ * @license MIT
197
+ */function zc(){return zc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zc.apply(this,arguments)}function t4(e,t){return IM({basename:t==null?void 0:t.basename,future:zc({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:iM({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||n4(),routes:e,mapRouteProperties:c3,window:t==null?void 0:t.window}).initialize()}function n4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=zc({},t,{errors:r4(t.errors)})),t}function r4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,o]of t)if(o&&o.__type==="RouteErrorResponse")n[r]=new Cm(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let i=window[o.__subType];if(typeof i=="function")try{let l=new i(o.message);l.stack="",n[r]=l}catch{}}if(n[r]==null){let i=new Error(o.message);i.stack="",n[r]=i}}else n[r]=o;return n}const o4=p.createContext({isTransitioning:!1}),i4=p.createContext(new Map),l4="startTransition",F0=J0[l4];function s4(e){F0?F0(e):e()}class a4{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function u4(e){let{fallbackElement:t,router:n,future:r}=e,[o,i]=p.useState(n.state),[l,s]=p.useState(),[a,u]=p.useState({isTransitioning:!1}),[c,d]=p.useState(),[f,h]=p.useState(),[g,m]=p.useState(),S=p.useRef(new Map),{v7_startTransition:v}=r||{},y=p.useCallback(C=>{v?s4(C):C()},[v]),x=p.useCallback((C,T)=>{let{deletedFetchers:M,unstable_viewTransitionOpts:R}=T;M.forEach(j=>S.current.delete(j)),C.fetchers.forEach((j,F)=>{j.data!==void 0&&S.current.set(F,j.data)}),!R||n.window==null||typeof n.window.document.startViewTransition!="function"?y(()=>i(C)):f&&c?(c.resolve(),f.skipTransition(),m({state:C,currentLocation:R.currentLocation,nextLocation:R.nextLocation})):(s(C),u({isTransitioning:!0,currentLocation:R.currentLocation,nextLocation:R.nextLocation}))},[n.window,f,c,S,y]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{a.isTransitioning&&d(new a4)},[a.isTransitioning]),p.useEffect(()=>{if(c&&l&&n.window){let C=l,T=c.promise,M=n.window.document.startViewTransition(async()=>{y(()=>i(C)),await T});M.finished.finally(()=>{d(void 0),h(void 0),s(void 0),u({isTransitioning:!1})}),h(M)}},[y,l,c,n.window]),p.useEffect(()=>{c&&l&&o.location.key===l.location.key&&c.resolve()},[c,f,o.location,l]),p.useEffect(()=>{!a.isTransitioning&&g&&(s(g.state),u({isTransitioning:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),m(void 0))},[a.isTransitioning,g]);let _=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:C=>n.navigate(C),push:(C,T,M)=>n.navigate(C,{state:T,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(C,T,M)=>n.navigate(C,{replace:!0,state:T,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),E=n.basename||"/",$=p.useMemo(()=>({router:n,navigator:_,static:!1,basename:E}),[n,_,E]);return p.createElement(p.Fragment,null,p.createElement(kd.Provider,{value:$},p.createElement(XE.Provider,{value:o},p.createElement(i4.Provider,{value:S.current},p.createElement(o4.Provider,{value:a},p.createElement(u3,{basename:E,location:o.location,navigationType:o.historyAction,navigator:_},o.initialized?p.createElement(c4,{routes:n.routes,state:o}):t))))),null)}function c4(e){let{routes:t,state:n}=e;return ZM(t,void 0,n)}var B0;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(B0||(B0={}));var W0;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(W0||(W0={}));function d4({error:e,resetErrorBoundary:t}){return console.error(e),w.jsx("div",{className:"absolute top-0 left-0 flex items-center justify-center w-screen h-screen bg-card-foreground",children:w.jsx("div",{className:"w-full h-full p-10",children:w.jsxs("div",{className:"w-full h-full p-10 bg-card text-primary",children:[w.jsxs("div",{className:"flex items-center justify-between",children:[w.jsxs("div",{className:"flex items-center gap-[0.5em] text-lg font-bold text-center py-2",children:[w.jsx(DE,{})," encountered an error"]}),w.jsx("button",{onClick:t,children:w.jsx(NP,{})})]}),w.jsx("div",{className:"text-4xl font-normal ",children:"Message:"}),w.jsx("pre",{children:e.message}),e.stack&&w.jsx(e4,{type:"single",className:"font-serif",collapsible:!0,defaultValue:"error",children:w.jsxs(vC,{value:"error",children:[w.jsx(yC,{children:"Stack trace:"}),w.jsx(xC,{className:"p-4 bg-popover text-popover-foreground",children:e.stack&&w.jsx("pre",{children:e.stack})})]})})]})})})}function f4(){const e=t4([{path:"/*",element:w.jsx(C3,{fallbackRender:d4,children:w.jsx(f3,{valApi:new UT("/api/val")})})}],{basename:"/api/val/static/edit"});return w.jsx(u4,{router:e})}Df.createRoot(document.getElementById("root")).render(q.createElement(q.StrictMode,null,q.createElement(f4,null)));