PageSourceSearch

https://chat.nevel.ai/_next/static/chunks/8768-382fb0c3ed465b5d.js

js nevel.ai collected 2026-10-05 12:19:00 UTC 241,886 bytes, 6 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a2a0b56a-f75d-5078-98e1-b019096c5bac")}catch(e){}}();
3(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8768],{3482:(e,t,n)=>{"use strict";n.d(t,{$Z$:()=>f,NVQ:()=>A,VRb:()=>S,erU:()=>y,gu3:()=>N,hGv:()=>x});var r=n(66919),i=n(69094),s=n(58671),o=n(28367),l=n(68094),a=n(24402),h=n(84057);let u=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})}},c=e=>{let{contentComponent:t}=e,n=(0,s.useSyncExternalStore)(t.subscribe,t.getSnapshot,t.getServerSnapshot);return(0,o.jsx)(o.Fragment,{children:Object.values(n)})};var d=class extends r.Component{componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){var e;let t=this.props.editor;if(t&&!t.isDestroyed&&(null==(e=t.view.dom)?void 0:e.parentNode)){if(t.contentComponent)return;let e=this.editorContentRef.current;e.append(...t.view.dom.parentNode.childNodes),t.setOptions({element:e}),t.contentComponent=function(){let e=new Set,t={},n=!1,r=()=>{!n&&e.size&&(n=!0,queueMicrotask(()=>{n=!1,e.forEach(e=>e())}))};return{subscribe:t=>(e.add(t),()=>{e.delete(t)}),getSnapshot:()=>t,getServerSnapshot:()=>t,setRenderer(e,n){t={...t,[e]:i.createPortal(n.reactElement,n.element,e)},r()},removeRenderer(e){let n={...t};delete n[e],t=n,r()}}}(),t.createNodeViews(),t.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||e.view.setProps({nodeViews:{}}),e.contentComponent=null;try{var t;if(!(null==(t=e.view.dom)?void 0:t.parentNode))return;let n=document.createElement("div");n.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:n})}catch(e){}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:u(t,this.editorContentRef),...n}),(null==e?void 0:e.contentComponent)&&(0,o.jsx)(c,{contentComponent:e.contentComponent})]})}constructor(e){super(e),this.editorContentRef=r.createRef()}};let p=(0,r.forwardRef)((e,t)=>{let n=r.useMemo(()=>Math.floor(0xffffffff*Math.random()).toString(),[e.editor]);return r.createElement(d,{key:n,innerRef:t,...e})}),f=r.memo(p),m="undefined"!=typeof window?r.useLayoutEffect:r.useEffect;var g=class{getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e,t=t=>{((null==t?void 0:t.transaction)===void 0||t.transaction!==e)&&(e=null==t?void 0:t.transaction,this.transactionNumber+=1,this.subscribers.forEach(e=>e()))},n=this.editor;return n.on("transaction",t),n.on("update",t),()=>{n.off("transaction",t),n.off("update",t)}}}constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}};function y(e){var t;let[n]=(0,r.useState)(()=>new g(e.editor)),i=(0,h.useSyncExternalStoreWithSelector)(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!=(t=e.equalityFn)?t:a.bD);return m(()=>n.watch(e.editor),[e.editor,n]),(0,r.useDebugValue)(i),i}let v="undefined"==typeof window,w=v||!!("undefined"!=typeof window&&window.next);var b=class e{setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=null==e||e;return v?t=!1:w&&void 0===e&&(t=!1),t?this.createEditor():null}createEditor(){var e=this;let t={...this.options.current,onBeforeCreate:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onBeforeCreate)?void 0:t.call(n,...i)},onBlur:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onBlur)?void 0:t.call(n,...i)},onCreate:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onCreate)?void 0:t.call(n,...i)},onDestroy:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onDestroy)?void 0:t.call(n,...i)},onFocus:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onFocus)?void 0:t.call(n,...i)},onSelectionUpdate:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onSelectionUpdate)?void 0:t.call(n,...i)},onTransaction:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onTransaction)?void 0:t.call(n,...i)},onUpdate:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onUpdate)?void 0:t.call(n,...i)},onContentError:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onContentError)?void 0:t.call(n,...i)},onDrop:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onDrop)?void 0:t.call(n,...i)},onPaste:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onPaste)?void 0:t.call(n,...i)},onDelete:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onDelete)?void 0:t.call(n,...i)},onMount:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onMount)?void 0:t.call(n,...i)},onUnmount:function(){for(var t,n,r=arguments.length,i=Array(r),s=0;s<r;s++)i[s]=arguments[s];return null==(t=(n=e.options.current).onUnmount)?void 0:t.call(n,...i)}};return new l.KE(t)}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>!!["onCreate","onBeforeCreate","onDestroy","onUpdate","onTransaction","onFocus","onBlur","onSelectionUpdate","onContentError","onDrop","onPaste"].includes(n)||("extensions"===n&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>{var r;return e===(null==(r=t.extensions)?void 0:r[n])}):e[n]===t[n]))}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===t.length?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){
3if(null===this.previousDeps){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{if(this.isComponentMounted&&this.instanceId===e){t&&t.setOptions(this.options.current);return}t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId="",this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}};function x(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=(0,r.useRef)(e);n.current=e;let[i]=(0,r.useState)(()=>new b(n)),o=(0,s.useSyncExternalStore)(i.subscribe,i.getEditor,i.getServerSnapshot);return(0,r.useDebugValue)(o),(0,r.useEffect)(i.onRender(t)),y({editor:o,selector:t=>{let{transactionNumber:n}=t;return!1===e.shouldRerenderOnTransaction||void 0===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===n?0:n+1}}),o}let k=(0,r.createContext)({editor:null});k.Consumer;let M=(0,r.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),S=r.forwardRef((e,t)=>{let{onDragStart:n}=(0,r.useContext)(M),i=e.as||"div";return(0,o.jsx)(i,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})});function C(e){return!!("function"==typeof e&&e.prototype&&e.prototype.isReactComponent)}function E(e){return!!("object"==typeof e&&e.$$typeof&&("Symbol(react.forward_ref)"===e.$$typeof.toString()||"react.forward_ref"===e.$$typeof.description))}var A=class{render(){var e;if(this.destroyed)return;let t=this.component,n=this.props,i=this.editor,s=function(){try{if(r.version)return parseInt(r.version.split(".")[0],10)>=19}catch(e){}return!1}(),l=function(e){if(C(e)||E(e))return!0;if("object"==typeof e&&e.$$typeof&&("Symbol(react.memo)"===e.$$typeof.toString()||"react.memo"===e.$$typeof.description)){let t=e.type;if(t)return C(t)||E(t)}return!1}(t),a={...n};a.ref&&!(s||l)&&delete a.ref,!a.ref&&(s||l)&&(a.ref=e=>{this.ref=e}),this.reactElement=(0,o.jsx)(t,{...a}),null==i||null==(e=i.contentComponent)||e.setRenderer(this.id,this)}updateProps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.destroyed)return;let t=!1,n=Object.keys(e);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==this.props[i]){t=!0;break}}t&&(this.props={...this.props,...e},this.render())}destroy(){var e;this.destroyed=!0;let t=this.editor;null==t||null==(e=t.contentComponent)||e.removeRenderer(this.id);try{this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}catch(e){}}updateAttributes(e){Object.keys(e).forEach(t=>{this.element.setAttribute(t,e[t])})}constructor(e,{editor:t,props:n={},as:r="div",className:s=""}){this.ref=null,this.destroyed=!1,this.id=Math.floor(0xffffffff*Math.random()).toString(),this.component=e,this.editor=t,this.props=n,this.element=document.createElement(r),this.element.classList.add("react-renderer"),s&&this.element.classList.add(...s.split(" ")),this.editor.isEditorContentInitialized?(0,i.flushSync)(()=>{this.render()}):queueMicrotask(()=>{this.destroyed||this.render()})}};function O(e){var t;if(!(0,l.eE)(e))return[];let{$from:n,$to:r}=e,i=[],s=Math.min(n.depth,r.depth);for(let e=1;e<=s&&(t=e,n.node(t)===r.node(t)&&n.before(t)===r.before(t));e+=1)i.push(n.before(e));return i}l.Db;var R=class{register(e){0===this.viewCount&&this.editor.on("transaction",this.handleTransaction),this.views.set(e.dom,e),this.viewCount+=1,this.scheduleSync()}unregister(e){this.views.delete(e.dom),this.viewCount-=1,this.insideViews.delete(e),0===this.viewCount&&this.editor.off("transaction",this.handleTransaction)}sync(){if(0===this.viewCount||this.editor.isDestroyed)return;let e=this.findInsideViews();this.updateViews(this.insideViews,e,!1),this.updateViews(e,this.insideViews,!0),this.insideViews=e}updateViews(e,t,n){for(let r of e)t.has(r)||r.setSelectionInside(n)}findInsideViews(){let e=new Set;for(let t of O(this.editor.state.selection)){let n=this.editor.view.nodeDOM(t),r=n?this.views.get(n):void 0;r&&e.add(r)}return e}constructor(e){this.views=new WeakMap,this.viewCount=0,this.insideViews=new Set,this.syncQueued=!1,this.scheduleSync=()=>{this.syncQueued||(this.syncQueued=!0,queueMicrotask(()=>{this.syncQueued=!1,this.sync()}))},this.handleTransaction=()=>this.scheduleSync(),this.editor=e}};let z=new WeakMap;function T(e){let t=z.get(e);return t||(t=new R(e),z.set(e,t)),t}var I=class extends l.Yv{get extensionWithSyncedStorage(){if(!this.cachedExtensionWithSyncedStorage){let e=this.editor,t=this.extension;this.cachedExtensionWithSyncedStorage=new Proxy(t,{get(n,r,i){if("storage"===r){var s;return null!=(s=e.storage[t.name])?s:{}}return Reflect.get(n,r,i)}})}return this.cachedExtensionWithSyncedStorage}mount(){var e=this;let t={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,selectionInside:!1,extension:this.extensionWithSyncedStorage,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.updateAttributes(t)},deleteNode:()=>this.deleteNode(),ref:(0,r.createRef)()};if(!this.component.displayName){let e;this.component.displayName=(e=this.extension.name).charAt(0).toUpperCase()+e.substring(1)}let n={onDragStart:this.onDragStart.bind(this),nodeViewContentRef:e=>{if(e&&this.contentDOMElement&&e.firstChild!==this.contentDOMElement){e.hasAttribute("data-node-view-wrapper")&&e.removeAttribute("data-node-view-wrapper");let t=function(e){var t;let n=e.getRootNode(),r="function"==typeof n.getSelection?n.getSelection():null==(t=e.ownerDocument)||null==(t=t.defaultView)?void 0:t.getSelection();if(!r||0===r.rangeCount)return null;let{anchorNode:i,anchorOffset:s,focusNode:o,focusOffset:l}=r;return i&&o&&e.contains(i)&&e.contains(o)?()=>{try{r.setBaseAndExtent(i,s,o,l)}catch(e){}}:null}(this.contentDOMElement);e.appendChild(this.contentDOMElement),null==t||t()}}},i=this.component,s=(0,r.memo)(e=>(0,o.jsx)(M.Provider,{value:n,children:(0,r.createElement)(i,e)}));s.displayName="ReactNodeView";let l=this.node.isInline?"span":"div";this.options.as&&(l=this.options.as);let{className:a=""}=this.options;this.renderer=new A(s,{editor:this.editor,props:t,as:l,className:"node-".concat(this.node.type.n
3ame," ").concat(a).trim()}),T(this.editor).register(this),this.updateElementAttributes(),this.currentPos=this.getPos()}get dom(){var e;if(this.renderer.element.firstElementChild&&!(null==(e=this.renderer.element.firstElementChild)?void 0:e.hasAttribute("data-node-view-wrapper")))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.contentDOMElement}update(e,t,n){let r=e=>{this.renderer.updateProps(e),"function"==typeof this.options.attrs&&this.updateElementAttributes()};if(e.type!==this.node.type)return!1;if("function"==typeof this.options.update){let i=this.node,s=this.decorations,o=this.innerDecorations;return this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=this.getPos(),this.options.update({oldNode:i,oldDecorations:s,newNode:e,newDecorations:t,oldInnerDecorations:o,innerDecorations:n,updateProps:()=>r({node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage})})}if(e===this.node)return this.node=e,this.decorations=t,this.innerDecorations=n,!0;let i=this.getPos();this.node=e,this.decorations=t,this.innerDecorations=n,this.currentPos=i;let s={node:e,decorations:t,innerDecorations:n,extension:this.extensionWithSyncedStorage};return this.options.trackNodeViewPosition&&(s.getPos=()=>this.getPos()),r(s),!0}selectNode(){this.nodeSelected=!0,this.updateSelectedState(!0)}deselectNode(){this.nodeSelected=!1,this.updateSelectedState(!0===this.options.selectedOnTextSelection&&this.isTextSelectionInside())}setSelectionInside(e){let t=this.nodeSelected||!0===this.options.selectedOnTextSelection&&e;this.renderer.updateProps({selectionInside:e,selected:t}),this.renderer.element.classList.toggle("ProseMirror-selectednode",t)}updateSelectedState(e){this.renderer.updateProps({selected:e}),this.renderer.element.classList.toggle("ProseMirror-selectednode",e)}isTextSelectionInside(){let e=this.getPos();return"number"==typeof e&&O(this.editor.state.selection).includes(e)}destroy(){this.renderer.destroy(),T(this.editor).unregister(this),this.options.trackNodeViewPosition&&this.editor.off("update",this.handlePositionUpdate),this.contentDOMElement=null}updateElementAttributes(){if(this.options.attrs){let e={};if("function"==typeof this.options.attrs){let t=this.editor.extensionManager.attributes,n=(0,l.zU)(this.node,t);e=this.options.attrs({node:this.node,HTMLAttributes:n})}else e=this.options.attrs;this.renderer.updateAttributes(e)}}constructor(e,t,n){if(super(e,t,n),this.nodeSelected=!1,this.handlePositionUpdate=()=>{let e=this.getPos();"number"==typeof e&&e!==this.currentPos&&(this.currentPos=e,this.renderer.updateProps({getPos:()=>this.getPos()}),"function"==typeof this.options.attrs&&this.updateElementAttributes())},this.cachedExtensionWithSyncedStorage=null,!this.node.isLeaf){this.options.contentDOMElementTag?this.contentDOMElement=document.createElement(this.options.contentDOMElementTag):this.contentDOMElement=document.createElement(this.node.isInline?"span":"div"),this.contentDOMElement.dataset.nodeViewContentReact="",this.contentDOMElement.dataset.nodeViewWrapper="",this.contentDOMElement.style.whiteSpace="inherit";let e=this.dom.querySelector("[data-node-view-content]");e?e.appendChild(this.contentDOMElement):this.dom.appendChild(this.contentDOMElement)}this.options.trackNodeViewPosition&&this.editor.on("update",this.handlePositionUpdate)}};function N(e,t){return n=>n.editor.contentComponent?new I(e,n,t):{dom:document.createElement("span"),contentDOM:null,update:()=>!1,destroy:()=>{},selectNode:()=>{},deselectNode:()=>{},stopEvent:()=>!1,ignoreMutation:()=>!0}}Symbol("tiptapReactWidgetCache");let D=(0,r.createContext)({get editor(){throw Error("useTiptap must be used within a <Tiptap> provider")}});function P(e){let{children:t,...n}=e,i="editor"in n?n.editor:n.instance;if(!i)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let s=(0,r.useMemo)(()=>({editor:i}),[i]),l=(0,r.useMemo)(()=>({editor:i}),[i]);return(0,o.jsx)(k.Provider,{value:l,children:(0,o.jsx)(D.Provider,{value:s,children:t})})}function $(e){let{...t}=e,{editor:n}=(0,r.useContext)(D);return(0,o.jsx)(f,{editor:n,...t})}D.displayName="TiptapContext",P.displayName="Tiptap",$.displayName="Tiptap.Content",Object.assign(P,{Content:$})},4146:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("message-circle-more",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M8 12h.01",key:"czm47f"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}]])},5221:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7
3a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]])},9837:(e,t,n)=>{"use strict";let r,i;n.d(t,{TW:()=>eb,YZ:()=>ey,Zk:()=>m});var s,o=n(66919);let l=(0,o.createContext)(null);l.displayName="PanelGroupContext";let a={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},h=o.useLayoutEffect,u=(s||(s=n.t(o,2)))["useId".toString()],c="function"==typeof u?u:()=>null,d=0;function p(e=null){let t=c(),n=(0,o.useRef)(e||t||null);return null===n.current&&(n.current=""+d++),null!=e?e:n.current}function f({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:s,id:u,maxSize:c,minSize:d,onCollapse:f,onExpand:m,onResize:g,order:y,style:v,tagName:w="div",...b}){let x=(0,o.useContext)(l);if(null===x)throw Error("Panel components must be rendered within a PanelGroup container");let{collapsePanel:k,expandPanel:M,getPanelSize:S,getPanelStyle:C,groupId:E,isPanelCollapsed:A,reevaluatePanelConstraints:O,registerPanel:R,resizePanel:z,unregisterPanel:T}=x,I=p(u),N=(0,o.useRef)({callbacks:{onCollapse:f,onExpand:m,onResize:g},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:c,minSize:d},id:I,idIsFromProps:void 0!==u,order:y});(0,o.useRef)({didLogMissingDefaultSizeWarning:!1}),h(()=>{let{callbacks:e,constraints:t}=N.current,s={...t};N.current.id=I,N.current.idIsFromProps=void 0!==u,N.current.order=y,e.onCollapse=f,e.onExpand=m,e.onResize=g,t.collapsedSize=n,t.collapsible=r,t.defaultSize=i,t.maxSize=c,t.minSize=d,(s.collapsedSize!==t.collapsedSize||s.collapsible!==t.collapsible||s.maxSize!==t.maxSize||s.minSize!==t.minSize)&&O(N.current,s)}),h(()=>{let e=N.current;return R(e),()=>{T(e)}},[y,I,R,T]),(0,o.useImperativeHandle)(s,()=>({collapse:()=>{k(N.current)},expand:e=>{M(N.current,e)},getId:()=>I,getSize:()=>S(N.current),isCollapsed:()=>A(N.current),isExpanded:()=>!A(N.current),resize:e=>{z(N.current,e)}}),[k,M,S,A,I,z]);let D=C(N.current,i);return(0,o.createElement)(w,{...b,children:e,className:t,id:I,style:{...D,...v},[a.groupId]:E,[a.panel]:"",[a.panelCollapsible]:r||void 0,[a.panelId]:I,[a.panelSize]:parseFloat(""+D.flexGrow).toFixed(1)})}let m=(0,o.forwardRef)((e,t)=>(0,o.createElement)(f,{...e,forwardedRef:t}));f.displayName="Panel",m.displayName="forwardRef(Panel)";let g=null,y=-1,v=null;function w(e,t,n){var i,s,o;let l=function(e,t,n){let r=(t&R)!=0,i=(t&z)!=0,s=(t&T)!=0,o=(t&I)!=0;if(t){if(r)if(s)return"se-resize";else if(o)return"ne-resize";else return"e-resize";else if(i)if(s)return"sw-resize";else if(o)return"nw-resize";else return"w-resize";else if(s)return"s-resize";else if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}(e,t,0);g!==l&&(g=l,null===v&&(v=document.createElement("style"),r&&v.setAttribute("nonce",r),document.head.appendChild(v)),y>=0&&(null==(o=v.sheet)||o.removeRule(y)),y=null!=(i=null==(s=v.sheet)?void 0:s.insertRule(`*{cursor: ${l} !important;}`))?i:-1)}function b(e){return"keydown"===e.type}function x(e){return e.type.startsWith("pointer")}function k(e){return e.type.startsWith("mouse")}function M(e){if(x(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(k(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}let S=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function C(e){let t=e.length;for(;t--;){let n=e[t];if(_(n,"Missing node"),function(e){let t=getComputedStyle(e);return!!("fixed"===t.position||"auto"!==t.zIndex&&("static"!==t.position||function(e){var t;let n=getComputedStyle(null!=(t=O(e))?t:e).display;return"flex"===n||"inline-flex"===n}(e))||1>+t.opacity||"transform"in t&&"none"!==t.transform||"webkitTransform"in t&&"none"!==t.webkitTransform||"mixBlendMode"in t&&"normal"!==t.mixBlendMode||"filter"in t&&"none"!==t.filter||"webkitFilter"in t&&"none"!==t.webkitFilter||"isolation"in t&&"isolate"===t.isolation||S.test(t.willChange))||"touch"===t.webkitOverflowScrolling}(n))return n}return null}function E(e){return e&&Number(getComputedStyle(e).zIndex)||0}function A(e){let t=[];for(;e;)t.push(e),e=O(e);return t}function O(e){let{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}let R=1,z=2,T=4,I=8,N="coarse"===function(){if("function"==typeof matchMedia)return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}(),D=[],P=!1,$=new Map,F=new Map,j=new Set;function L(e){let{target:t}=e,{x:n,y:r}=M(e);P=!0,V({target:t,x:n,y:r}),H(),D.length>0&&(W("down",e),K(),e.preventDefault(),J(t)||e.stopImmediatePropagation())}function q(e){let{x:t,y:n}=M(e);if(P&&"pointerleave"!==e.type&&0===e.buttons&&(P=!1,W("up",e)),!P){let{target:r}=e;V({target:r,x:t,y:n})}W("move",e),K(),D.length>0&&e.preventDefault()}function B(e){let{target:t}=e,{x:n,y:r}=M(e);F.clear(),P=!1,D.length>0&&(e.preventDefault(),J(t)||e.stopImmediatePropagation()),W("up",e),V({target:t,x:n,y:r}),K(),H()}function J(e){let t=e;for(;t;){if(t.hasAttribute(a.resizeHandle))return!0;t=t.parentElement}return!1}function V({target:e,x:t,y:n}){D.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),j.forEac
3h(e=>{let{element:i,hitAreaMargins:s}=e,o=i.getBoundingClientRect(),{bottom:l,left:a,right:h,top:u}=o,c=N?s.coarse:s.fine;if(t>=a-c&&t<=h+c&&n>=u-c&&n<=l+c){if(null!==r&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&function(e,t){let n;if(e===t)throw Error("Cannot compare node with itself");let r={a:A(e),b:A(t)};for(;r.a.at(-1)===r.b.at(-1);)e=r.a.pop(),t=r.b.pop(),n=e;_(n,"Stacking order can only be calculated for elements with a common ancestor");let i={a:E(C(r.a)),b:E(C(r.b))};if(i.a===i.b){let e=n.childNodes,t={a:r.a.at(-1),b:r.b.at(-1)},i=e.length;for(;i--;){let n=e[i];if(n===t.a)return 1;if(n===t.b)return -1}}return Math.sign(i.a-i.b)}(r,i)>0){let e=r,t=!1;for(;e;){var d;if(e.contains(i))break;if(d=e.getBoundingClientRect(),d.x<o.x+o.width&&d.x+d.width>o.x&&d.y<o.y+o.height&&d.y+d.height>o.y){t=!0;break}e=e.parentElement}if(t)return}D.push(e)}})}function K(){let e=!1,t=!1;D.forEach(n=>{let{direction:r}=n;"horizontal"===r?e=!0:t=!0});let n=0;F.forEach(e=>{n|=e}),e&&t?w("intersection",n,P):e?w("horizontal",n,P):t?w("vertical",n,P):null!==v&&(document.head.removeChild(v),g=null,v=null,y=-1)}function H(){var e;null==(e=i)||e.abort();let t={capture:!0,signal:(i=new AbortController).signal};j.size&&(P?(D.length>0&&$.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener("contextmenu",B,t),r.addEventListener("pointerleave",q,t),r.addEventListener("pointermove",q,t))}),$.forEach((e,n)=>{let{body:r}=n;r.addEventListener("pointerup",B,t),r.addEventListener("pointercancel",B,t)})):$.forEach((e,n)=>{let{body:r}=n;e>0&&(r.addEventListener("pointerdown",L,t),r.addEventListener("pointermove",q,t))}))}function W(e,t){j.forEach(n=>{let{setResizeHandlerState:r}=n;r(e,D.includes(n),t)})}function _(e,t){if(!e)throw console.error(t),Error(t)}function U(e,t,n=10){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Q(e,t,n=10){return 0===U(e,t,n)}function G(e,t,n){return 0===U(e,t,n)}function Y({panelConstraints:e,panelIndex:t,size:n}){let r=e[t];_(null!=r,`Panel constraints not found for index ${t}`);let{collapsedSize:i=0,collapsible:s,maxSize:o=100,minSize:l=0}=r;return 0>U(n,l)&&(n=s&&0>U(n,(i+l)/2)?i:l),n=parseFloat((n=Math.min(o,n)).toFixed(10))}function Z({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:s}){if(G(e,0))return t;let o=[...t],[l,a]=r;_(null!=l,"Invalid first pivot index"),_(null!=a,"Invalid second pivot index");let h=0;if("keyboard"===s){{let r=e<0?a:l,i=n[r];_(i,`Panel constraints not found for index ${r}`);let{collapsedSize:s=0,collapsible:o,minSize:h=0}=i;if(o){let n=t[r];if(_(null!=n,`Previous layout not found for panel index ${r}`),G(n,s)){let t=h-n;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}{let r=e<0?l:a,i=n[r];_(i,`No panel constraints found for index ${r}`);let{collapsedSize:s=0,collapsible:o,minSize:h=0}=i;if(o){let n=t[r];if(_(null!=n,`Previous layout not found for panel index ${r}`),G(n,h)){let t=n-s;U(t,Math.abs(e))>0&&(e=e<0?0-t:t)}}}}{let r=e<0?1:-1,i=e<0?a:l,s=0;for(;;){let e=t[i];if(_(null!=e,`Previous layout not found for panel index ${i}`),s+=Y({panelConstraints:n,panelIndex:i,size:100})-e,(i+=r)<0||i>=n.length)break}let o=Math.min(Math.abs(e),Math.abs(s));e=e<0?0-o:o}{let r=e<0?l:a;for(;r>=0&&r<n.length;){let i=Math.abs(e)-Math.abs(h),s=t[r];_(null!=s,`Previous layout not found for panel index ${r}`);let l=Y({panelConstraints:n,panelIndex:r,size:s-i});if(!G(s,l)&&(h+=s-l,o[r]=l,h.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?r--:r++}}if(function(e,t,n){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!G(e[n],t[n],void 0))return!1;return!0}(i,o))return i;{let r=e<0?a:l,i=t[r];_(null!=i,`Previous layout not found for panel index ${r}`);let s=i+h,u=Y({panelConstraints:n,panelIndex:r,size:s});if(o[r]=u,!G(u,s)){let t=s-u,r=e<0?a:l;for(;r>=0&&r<n.length;){let i=o[r];_(null!=i,`Previous layout not found for panel index ${r}`);let s=Y({panelConstraints:n,panelIndex:r,size:i+t});if(G(i,s)||(t-=s-i,o[r]=s),G(t,0))break;e>0?r--:r++}}}return G(o.reduce((e,t)=>t+e,0),100)?o:i}function X(e,t=document){return Array.from(t.querySelectorAll(`[${a.resizeHandleId}][data-panel-group-id="${e}"]`))}function ee(e,t,n=document){let r=X(e,n).findIndex(e=>e.getAttribute(a.resizeHandleId)===t);return null!=r?r:null}function et(e,t,n){let r=ee(e,t,n);return null!=r?[r,r+1]:[-1,-1]}function en(e,t=document){if((t instanceof HTMLElement||"object"==typeof t&&null!==t&&"tagName"in t&&"getAttribute"in t)&&t.dataset.panelGroupId==e)return t;
3let n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function er(e,t=document){let n=t.querySelector(`[${a.resizeHandleId}="${e}"]`);return n||null}function ei(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function es(e,t){let{x:n,y:r}=M(t);return"horizontal"===e?n:r}function eo(e,t,n){t.forEach((t,r)=>{let i=e[r];_(i,`Panel data not found for index ${r}`);let{callbacks:s,constraints:o,id:l}=i,{collapsedSize:a=0,collapsible:h}=o,u=n[l];if(null==u||t!==u){n[l]=t;let{onCollapse:e,onExpand:r,onResize:i}=s;i&&i(t,u),h&&(e||r)&&(r&&(null==u||Q(u,a))&&!Q(t,a)&&r(),e&&(null==u||!Q(u,a))&&Q(t,a)&&e())}})}function el(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function ea(e){try{if("undefined"!=typeof localStorage)e.getItem=e=>localStorage.getItem(e),e.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function eh(e){return`react-resizable-panels:${e}`}function eu(e){return e.map(e=>{let{constraints:t,id:n,idIsFromProps:r,order:i}
3=e;return r?n:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ec(e,t){try{let n=eh(e),r=t.getItem(n);if(r){let e=JSON.parse(r);if("object"==typeof e&&null!=e)return e}}catch(e){}return null}function ed(e,t,n,r,i){var s;let o=eh(e),l=eu(t),a=null!=(s=ec(e,i))?s:{};a[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(o,JSON.stringify(a))}catch(e){console.error(e)}}function ep({layout:e,panelConstraints:t}){let n=[...e],r=n.reduce((e,t)=>e+t,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(e=>`${e}%`).join(", ")}`);if(!G(r,100)&&n.length>0)for(let e=0;e<t.length;e++){let t=n[e];_(null!=t,`No layout data found for index ${e}`);let i=100/r*t;n[e]=i}let i=0;for(let e=0;e<t.length;e++){let r=n[e];_(null!=r,`No layout data found for index ${e}`);let s=Y({panelConstraints:t,panelIndex:e,size:r});r!=s&&(i+=r-s,n[e]=s)}if(!G(i,0))for(let e=0;e<t.length;e++){let r=n[e];_(null!=r,`No layout data found for index ${e}`);let s=Y({panelConstraints:t,panelIndex:e,size:r+i});if(r!==s&&(i-=s-r,n[e]=s,G(i,0)))break}return n}let ef={getItem:e=>(ea(ef),ef.getItem(e)),setItem:(e,t)=>{ea(ef),ef.setItem(e,t)}},em={};function eg({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:i,id:s=null,onLayout:u=null,keyboardResizeBy:c=null,storage:d=ef,style:f,tagName:m="div",...g}){let y=p(s),v=(0,o.useRef)(null),[w,M]=(0,o.useState)(null),[S,C]=(0,o.useState)([]),E=function(){let[e,t]=(0,o.useState)(0);return(0,o.useCallback)(()=>t(e=>e+1),[])}(),A=(0,o.useRef)({}),O=(0,o.useRef)(new Map),N=(0,o.useRef)(0),D=(0,o.useRef)({autoSaveId:e,direction:r,dragState:w,id:y,keyboardResizeBy:c,onLayout:u,storage:d}),P=(0,o.useRef)({layout:S,panelDataArray:[],panelDataArrayChanged:!1});(0,o.useRef)({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),(0,o.useImperativeHandle)(i,()=>({getId:()=>D.current.id,getLayout:()=>{let{layout:e}=P.current;return e},setLayout:e=>{let{onLayout:t}=D.current,{layout:n,panelDataArray:r}=P.current,i=ep({layout:e,panelConstraints:r.map(e=>e.constraints)});ei(n,i)||(C(i),P.current.layout=i,t&&t(i),eo(r,i,A.current))}}),[]),h(()=>{D.current.autoSaveId=e,D.current.direction=r,D.current.dragState=w,D.current.id=y,D.current.onLayout=u,D.current.storage=d}),function({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:l}){(0,o.useRef)({didWarnAboutMissingResizeHandle:!1}),h(()=>{if(!s)return;let e=X(n,s);for(let t=0;t<i.length-1;t++){let{valueMax:n,valueMin:s,valueNow:o}=function({layout:e,panelsArray:t,pivotIndices:n}){let r=0,i=100,s=0,o=0,l=n[0];return _(null!=l,"No pivot index found"),t.forEach((e,t)=>{let{constraints:n}=e,{maxSize:a=100,minSize:h=0}=n;t===l?(r=h,i=a):(s+=h,o+=a)}),{valueMax:Math.min(i,100-s),valueMin:Math.max(r,100-o),valueNow:e[l]}}({layout:r,panelsArray:i,pivotIndices:[t,t+1]}),l=e[t];if(null==l);else{let e=i[t];_(e,`No panel data found for index "${t}"`),l.setAttribute("aria-controls",e.id),l.setAttribute("aria-valuemax",""+Math.round(n)),l.setAttribute("aria-valuemin",""+Math.round(s)),l.setAttribute("aria-valuenow",null!=o?""+Math.round(o):"")}}return()=>{e.forEach((e,t)=>{e.removeAttribute("aria-controls"),e.removeAttribute("aria-valuemax"),e.removeAttribute("aria-valuemin"),e.removeAttribute("aria-valuenow")})}},[n,r,i,s]),(0,o.useEffect)(()=>{if(!s)return;let e=t.current;_(e,"Eager values not found");let{panelDataArray:i}=e;_(null!=en(n,s),`No group found for id "${n}"`);let o=X(n,s);_(o,`No resize handles found for group id "${n}"`);let h=o.map(e=>{let t=e.getAttribute(a.resizeHandleId);_(t,"Resize handle element has no handle id attribute");let[o,h]=function(e,t,n,r=document){var i,s,o,l;let a=er(t,r),h=X(e,r),u=a?h.indexOf(a):-1;return[null!=(i=null==(s=n[u])?void 0:s.id)?i:null,null!=(o=null==(l=n[u+1])?void 0:l.id)?o:null]}(n,t,i,s);if(null==o||null==h)return()=>{};let u=e=>{if(!e.defaultPrevented&&"Enter"===e.key){e.preventDefault();let a=i.findIndex(e=>e.id===o);if(a>=0){let e=i[a];_(e,`No panel data found for index ${a}`);let o=r[a],{collapsedSize:h=0,collapsible:u,minSize:c=0}=e.constraints;if(null!=o&&u){let e=Z({delta:G(o,h)?c-h:h-o,initialLayout:r,panelConstraints:i.map(e=>e.constraints),pivotIndices:et(n,t,s),prevLayout:r,trigger:"keyboard"});r!==e&&l(e)}}}};return e.addEventListener("keydown",u),()=>{e.removeEventListener("keydown",u)}});return()=>
3{h.forEach(e=>e())}},[s,e,t,n,r,i,l])}({committedValuesRef:D,eagerValuesRef:P,groupId:y,layout:S,panelDataArray:P.current.panelDataArray,setLayout:C,panelGroupElement:v.current}),(0,o.useEffect)(()=>{let{panelDataArray:t}=P.current;if(e){if(0===S.length||S.length!==t.length)return;let n=em[e];null==n&&(n=function(e,t=10){let n=null;return(...r)=>{null!==n&&clearTimeout(n),n=setTimeout(()=>{e(...r)},t)}}(ed,100),em[e]=n),n(e,[...t],new Map(O.current),S,d)}},[e,S,d]),(0,o.useEffect)(()=>{});let $=(0,o.useCallback)(e=>{let{onLayout:t}=D.current,{layout:n,panelDataArray:r}=P.current;if(e.constraints.collapsible){let i=r.map(e=>e.constraints),{collapsedSize:s=0,panelSize:o,pivotIndices:l}=ew(r,e,n);if(_(null!=o,`Panel size not found for panel "${e.id}"`),!Q(o,s)){O.current.set(e.id,o);let a=Z({delta:ev(r,e)===r.length-1?o-s:s-o,initialLayout:n,panelConstraints:i,pivotIndices:l,prevLayout:n,trigger:"imperative-api"});el(n,a)||(C(a),P.current.layout=a,t&&t(a),eo(r,a,A.current))}}},[]),j=(0,o.useCallback)((e,t)=>{let{onLayout:n}=D.current,{layout:r,panelDataArray:i}=P.current;if(e.constraints.collapsible){let s=i.map(e=>e.constraints),{collapsedSize:o=0,panelSize:l=0,minSize:a=0,pivotIndices:h}=ew(i,e,r),u=null!=t?t:a;if(Q(l,o)){let t=O.current.get(e.id),o=null!=t&&t>=u?t:u,a=Z({delta:ev(i,e)===i.length-1?l-o:o-l,initialLayout:r,panelConstraints:s,pivotIndices:h,prevLayout:r,trigger:"imperative-api"});el(r,a)||(C(a),P.current.layout=a,n&&n(a),eo(i,a,A.current))}}},[]),L=(0,o.useCallback)(e=>{let{layout:t,panelDataArray:n}=P.current,{panelSize:r}=ew(n,e,t);return _(null!=r,`Panel size not found for panel "${e.id}"`),r},[]),q=(0,o.useCallback)((e,t)=>{let{panelDataArray:n}=P.current,r=ev(n,e);return function({defaultSize:e,dragState:t,layout:n,panelData:r,panelIndex:i,precision:s=3}){let o=n[i];return{flexBasis:0,flexGrow:null==o?void 0!=e?e.toFixed(s):"1":1===r.length?"1":o.toFixed(s),flexShrink:1,overflow:"hidden",pointerEvents:null!==t?"none":void 0}}({defaultSize:t,dragState:w,layout:S,panelData:n,panelIndex:r})},[w,S]),B=(0,o.useCallback)(e=>{let{layout:t,panelDataArray:n}=P.current,{collapsedSize:r=0,collapsible:i,panelSize:s}=ew(n,e,t);return _(null!=s,`Panel size not found for panel "${e.id}"`),!0===i&&Q(s,r)},[]),J=(0,o.useCallback)(e=>{let{layout:t,panelDataArray:n}=P.current,{collapsedSize:r=0,collapsible:i,panelSize:s}=ew(n,e,t);return _(null!=s,`Panel size not found for panel "${e.id}"`),!i||U(s,r)>0},[]),V=(0,o.useCallback)(e=>{let{panelDataArray:t}=P.current;t.push(e),t.sort((e,t)=>{let n=e.order,r=t.order;return null==n&&null==r?0:null==n?-1:null==r?1:n-r}),P.current.panelDataArrayChanged=!0,E()},[E]);h(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;let{autoSaveId:i,onLayout:s,storage:o}=D.current,{layout:l,panelDataArray:a}=P.current,h=null;if(i){var e,t,n,r;let s=(e=i,t=a,null!=(r=(null!=(n=ec(e,o))?n:{})[eu(t)])?r:null);s&&(O.current=new Map(Object.entries(s.expandToSizes)),h=s.layout)}null==h&&(h=function({panelDataArray:e}){let t=Array(e.length),n=e.map(e=>e.constraints),r=0,i=100;for(let s=0;s<e.length;s++){let e=n[s];_(e,`Panel constraints not found for index ${s}`);let{defaultSize:o}=e;null!=o&&(r++,t[s]=o,i-=o)}for(let s=0;s<e.length;s++){let o=n[s];_(o,`Panel constraints not found for index ${s}`);let{defaultSize:l}=o;if(null!=l)continue;let a=i/(e.length-r);r++,t[s]=a,i-=a}return t}({panelDataArray:a}));let u=ep({layout:h,panelConstraints:a.map(e=>e.constraints)});ei(l,u)||(C(u),P.current.layout=u,s&&s(u),eo(a,u,A.current))}}),h(()=>{let e=P.current;return()=>{e.layout=[]}},[]);let K=(0,o.useCallback)(e=>{let t=!1,n=v.current;return n&&"rtl"===window.getComputedStyle(n,null).getPropertyValue("direction")&&(t=!0),function(n){var r,i;n.preventDefault();let s=v.current;if(!s)return()=>null;let{direction:o,dragState:l,id:h,keyboardResizeBy:u,onLayout:c}=D.current,{layout:d,panelDataArray:p}=P.current,{initialLayout:f}=null!=l?l:{},m=et(h,e,s),g=function(e,t,n,r,i,s){if(b(e)){let t="horizontal"===n,r=0;r=e.shiftKey?100:null!=i?i:10;let s=0;switch(e.key){case"ArrowDown":s=t?0:r;break;case"ArrowLeft":s=t?-r:0;break;case"ArrowRight":s=t?r:0;break;case"ArrowUp":s=t?0:-r;break;case"End":s=100;break;case"Home":s=-100}return s}return null==r?0:function(e,t,n,r,i){let s="horizontal"===n,o=er(t,i);_(o,`No resize handle element found for id "${t}"`);let l=o.getAttribute(a.groupId);_(l,"Resize handle element has no group id attribute");let{initialCursorPosition:h}=r,u=es(n,e),c=en(l,i);_(c,`No group element found for id "${l}"`);let d=c.getBoundingClientRect();return(u-h)/(s?d.width:d.height)*100}
3(e,t,n,r,s)}(n,e,o,l,u,s),y="horizontal"===o;y&&t&&(g=-g);let w=Z({delta:g,initialLayout:null!=f?f:d,panelConstraints:p.map(e=>e.constraints),pivotIndices:m,prevLayout:d,trigger:b(n)?"keyboard":"mouse-or-touch"}),M=!el(d,w);(x(n)||k(n))&&N.current!=g&&((N.current=g,M||0===g)?F.set(e,0):y?(r=g<0?R:z,F.set(e,r)):(i=g<0?T:I,F.set(e,i))),M&&(C(w),P.current.layout=w,c&&c(w),eo(p,w,A.current))}},[]),H=(0,o.useCallback)((e,t)=>{let{onLayout:n}=D.current,{layout:r,panelDataArray:i}=P.current,s=i.map(e=>e.constraints),{panelSize:o,pivotIndices:l}=ew(i,e,r);_(null!=o,`Panel size not found for panel "${e.id}"`);let a=Z({delta:ev(i,e)===i.length-1?o-t:t-o,initialLayout:r,panelConstraints:s,pivotIndices:l,prevLayout:r,trigger:"imperative-api"});el(r,a)||(C(a),P.current.layout=a,n&&n(a),eo(i,a,A.current))},[]),W=(0,o.useCallback)((e,t)=>{let{layout:n,panelDataArray:r}=P.current,{collapsedSize:i=0,collapsible:s}=t,{collapsedSize:o=0,collapsible:l,maxSize:a=100,minSize:h=0}=e.constraints,{panelSize:u}=ew(r,e,n);null!=u&&(s&&l&&Q(u,i)?Q(i,o)||H(e,o):u<h?H(e,h):u>a&&H(e,a))},[H]),Y=(0,o.useCallback)((e,t)=>{let{direction:n}=D.current,{layout:r}=P.current;if(!v.current)return;let i=er(e,v.current);_(i,`Drag handle element not found for id "${e}"`);let s=es(n,t);M({dragHandleId:e,dragHandleRect:i.getBoundingClientRect(),initialCursorPosition:s,initialLayout:r})},[]),ee=(0,o.useCallback)(()=>{M(null)},[]),ea=(0,o.useCallback)(e=>{let{panelDataArray:t}=P.current,n=ev(t,e);n>=0&&(t.splice(n,1),delete A.current[e.id],P.current.panelDataArrayChanged=!0,E())},[E]),eh=(0,o.useMemo)(()=>({collapsePanel:$,direction:r,dragState:w,expandPanel:j,getPanelSize:L,getPanelStyle:q,groupId:y,isPanelCollapsed:B,isPanelExpanded:J,reevaluatePanelConstraints:W,registerPanel:V,registerResizeHandle:K,resizePanel:H,startDragging:Y,stopDragging:ee,unregisterPanel:ea,panelGroupElement:v.current}),[$,w,r,j,L,q,y,B,J,W,V,K,H,Y,ee,ea]);return(0,o.createElement)(l.Provider,{value:eh},(0,o.createElement)(m,{...g,children:t,className:n,id:s,ref:v,style:{display:"flex",flexDirection:"horizontal"===r?"row":"column",height:"100%",overflow:"hidden",width:"100%",...f},[a.group]:"",[a.groupDirection]:r,[a.groupId]:y}))}let ey=(0,o.forwardRef)((e,t)=>(0,o.createElement)(eg,{...e,forwardedRef:t}));function ev(e,t){return e.findIndex(e=>e===t||e.id===t.id)}function ew(e,t,n){let r=ev(e,t),i=r===e.length-1,s=n[r];return{...t.constraints,panelSize:s,pivotIndices:i?[r-1,r]:[r,r+1]}}function eb({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:s,onClick:u,onDragging:c,onFocus:d,onPointerDown:f,onPointerUp:m,style:g={},tabIndex:y=0,tagName:v="div",...w}){var b,x;let k=(0,o.useRef)(null),M=(0,o.useRef)({onClick:u,onDragging:c,onPointerDown:f,onPointerUp:m});(0,o.useEffect)(()=>{M.current.onClick=u,M.current.onDragging=c,M.current.onPointerDown=f,M.current.onPointerUp=m});let S=(0,o.useContext)(l);if(null===S)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");let{direction:C,groupId:E,registerResizeHandle:A,startDragging:O,stopDragging:R,panelGroupElement:z}=S,T=p(i),[I,N]=(0,o.useState)("inactive"),[P,L]=(0,o.useState)(!1),[q,B]=(0,o.useState)(null),J=(0,o.useRef)({state:I});h(()=>{J.current.state=I}),(0,o.useEffect)(()=>{if(n)B(null);else{let e=A(T);B(()=>e)}},[n,T,A]);let V=null!=(b=null==r?void 0:r.coarse)?b:15,W=null!=(x=null==r?void 0:r.fine)?x:5;return(0,o.useEffect)(()=>{if(n||null==q)return;let e=k.current;_(e,"Element ref not attached");let t=!1;return function(e,t,n,r,i){var s;let{ownerDocument:o}=t,l={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:i},a=null!=(s=$.get(o))?s:0;return $.set(o,a+1),j.add(l),H(),function(){var t;F.delete(e),j.delete(l);let n=null!=(t=$.get(o))?t:1;if($.set(o,n-1),H(),1===n&&$.delete(o),D.includes(l)){let e=D.indexOf(l);e>=0&&D.splice(e,1),K(),i("up",!0,null)}}}(T,e,C,{coarse:V,fine:W},(e,n,r)=>{if(!n)return void N("inactive");switch(e){case"down":{N("drag"),t=!1,_(r,'Expected event to be defined for "down" action'),O(T,r);let{onDragging:e,onPointerDown:n}=M.current;null==e||e(!0),null==n||n();break}case"move":{let{state:e}=J.current;t=!0,"drag"!==e&&N("hover"),_(r,'Expected event to be defined for "move" action'),q(r);break}case"up":{N("hover"),R();let{onClick:e,onDragging:n,onPointerUp:r}=M.current;null==n||n(!1),null==r||r(),t||null==e||e()}}})},[V,C,n,W,A,T,q,O,R]),!function({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){(0,o.useEffect)(()=>
3{if(e||null==n||null==r)return;let i=er(t,r);if(null==i)return;let s=e=>{if(!e.defaultPrevented)switch(e.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":e.preventDefault(),n(e);break;case"F6":{e.preventDefault();let n=i.getAttribute(a.groupId);_(n,`No group element found for id "${n}"`);let s=X(n,r),o=ee(n,t,r);_(null!==o,`No resize element found for id "${t}"`);let l=e.shiftKey?o>0?o-1:s.length-1:o+1<s.length?o+1:0;s[l].focus()}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,e,t,n])}({disabled:n,handleId:T,resizeHandler:q,panelGroupElement:z}),(0,o.createElement)(v,{...w,children:e,className:t,id:i,onBlur:()=>{L(!1),null==s||s()},onFocus:()=>{L(!0),null==d||d()},ref:k,role:"separator",style:{touchAction:"none",userSelect:"none",...g},tabIndex:y,[a.groupDirection]:C,[a.groupId]:E,[a.resizeHandle]:"",[a.resizeHandleActive]:"drag"===I?"pointer":P?"keyboard":void 0,[a.resizeHandleEnabled]:!n,[a.resizeHandleId]:T,[a.resizeHandleState]:I})}eg.displayName="PanelGroup",ey.displayName="forwardRef(PanelGroup)",eb.displayName="PanelResizeHandle"},10043:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("image-upscale",[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M17 21h2a2 2 0 0 0 2-2",key:"130fy9"}],["path",{d:"M21 12v3",key:"1wzk3p"}],["path",{d:"m21 3-5 5",key:"1g5oa7"}],["path",{d:"M3 7V5a2 2 0 0 1 2-2",key:"kk3yz1"}],["path",{d:"m5 21 4.144-4.144a1.21 1.21 0 0 1 1.712 0L13 19",key:"fyekpt"}],["path",{d:"M9 3h3",key:"d52fa"}],["rect",{x:"3",y:"11",width:"10",height:"10",rx:"1",key:"1wpmix"}]])},11998:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]])},13841:(e,t,n)=>{"use strict";n.d(t,{E:()=>f});var r=n(33673),i=n(26860),s=n(71876),o=n(95109),l=class extends o.Q{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let s=t.queryKey,o=t.queryHash??(0,r.F$)(s,t),l=this.get(o);return l||(l=new i.X({client:e,queryKey:s,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(s)}),this.add(l)),l}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){s.jG.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.MK)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,r.MK)(e,t)):t}notify(e){s.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.jG.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){s.jG.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},a=n(9719),h=class extends o.Q{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#n=new Map,this.#r=0}#t;#n;#r;build(e,t,n){let r=new a.s({mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#t.add(e);let t=u(e);if("string"==typeof t){let n=this.#n.get(t);n?n.push(e):this.#n.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=u(e);if("string"==typeof t){let n=this.#n.get(t);if(n)if(n.length>1){let t=n.indexOf(e);-1!==t&&n.splice(t,1)}else n[0]===e&&this.#n.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=u(e);if("string"!=typeof t)return!0;{let n=this.#n.get(t),r=n?.find(e=>"pending"===e.state.status);return!r||r===e}}runNext(e){let t=u(e);if("string"!=typeof t)return Promise.resolve();{let n=this.#n.get(t)?.find(t=>
3t!==e&&t.state.isPaused);return n?.continue()??Promise.resolve()}}clear(){s.jG.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#n.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,r.nJ)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,r.nJ)(e,t))}notify(e){s.jG.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return s.jG.batch(()=>Promise.all(e.map(e=>e.continue().catch(r.lQ))))}};function u(e){return e.options.scope?.id}var c=n(38955),d=n(75114),p=n(51406),f=class{#i;#s;#o;#l;#a;#h;#u;#c;constructor(e={}){this.#i=e.queryCache||new l,this.#s=e.mutationCache||new h,this.#o=e.defaultOptions||{},this.#l=new Map,this.#a=new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#u=c.m.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onFocus())}),this.#c=d.t.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#u?.(),this.#u=void 0,this.#c?.(),this.#c=void 0)}isFetching(e){return this.#i.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#i.build(this,t),i=n.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime((0,r.d2)(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#i.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let i=this.defaultQueryOptions({queryKey:e}),s=this.#i.get(i.queryHash),o=s?.state.data,l=(0,r.Zw)(t,o);if(void 0!==l)return this.#i.build(this,i).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return s.jG.batch(()=>this.#i.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state}removeQueries(e){let t=this.#i;s.jG.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#i;return s.jG.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t};return Promise.all(s.jG.batch(()=>this.#i.findAll(e).map(e=>e.cancel(n)))).then(r.lQ).catch(r.lQ)}invalidateQueries(e,t={}){return s.jG.batch(()=>(this.#i.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(s.jG.batch(()=>this.#i.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(r.lQ)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(r.lQ)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let n=this.#i.build(this,t);return n.isStaleByTime((0,r.d2)(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(r.lQ).catch(r.lQ)}fetchInfiniteQuery(e){return e.behavior=(0,p.PL)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(r.lQ).catch(r.lQ)}ensureInfiniteQueryData(e){return e.behavior=(0,p.PL)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return d.t.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#i}getMutationCache(){return this.#s}getDefaultOptions(){return this.#o}setDefaultOptions(e){this.#o=e}setQueryDefaults(e,t){this.#l.set((0,r.EN)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#l.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set((0,r.EN)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#a.values()],n={};return t.forEach(t=>{(0,r.Cp)(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#o.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,r.F$)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===r.hT&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#o.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#i.clear(),this.#s.clear()}}},16994:(e,t,n)=>{"use strict";n.d(t,{$f:()=>z,G2:()=>w,I$:()=>S,Im:()=>I,Qv:()=>a,Sd:()=>y,Z1:()=>C,_G:()=>u,_e:()=>p,bh:()=>b,eB:()=>h,eT:()=>g,ec:()=>T,hy:()=>A,iz:()=>E,pC:()=>k,yY:()=>x,y_:()=>N});var r=n(97841),i=n(42618),s=n(63306);let o=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function l(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("backward",e):!(n.parentOffset>0))?n:null}let a=(e,t,n)=>{let o=l(e,n);if(!o)return!1;let a=f(o);if(!a){let n=o.blockRange(),i=n&&(0,r.jP)(n);return null!=i&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let h=a.nodeBefore;if(O(e,a,t,-1))return!0;
3if(0==o.parent.content.size&&(d(h,"end")||s.nh.isSelectable(h)))for(let n=o.depth;;n--){let l=(0,r.$L)(e.doc,o.before(n),o.after(n),i.Ji.empty);if(l&&l.slice.size<l.to-l.from){if(t){let n=e.tr.step(l);n.setSelection(d(h,"end")?s.LN.findFrom(n.doc.resolve(n.mapping.map(a.pos,-1)),-1):s.nh.create(n.doc,a.pos-h.nodeSize)),t(n.scrollIntoView())}return!0}if(1==n||o.node(n-1).childCount>1)break}return!!h.isAtom&&a.depth==o.depth-1&&(t&&t(e.tr.delete(a.pos-h.nodeSize,a.pos).scrollIntoView()),!0)},h=(e,t,n)=>{let r=l(e,n);if(!r)return!1;let i=f(r);return!!i&&c(e,i,t)},u=(e,t,n)=>{let r=m(e,n);if(!r)return!1;let i=v(r);return!!i&&c(e,i,t)};function c(e,t,n){let o=t.nodeBefore,l=t.pos-1;for(;!o.isTextblock;l--){if(o.type.spec.isolating)return!1;let e=o.lastChild;if(!e)return!1;o=e}let a=t.nodeAfter,h=t.pos+1;for(;!a.isTextblock;h++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let u=(0,r.$L)(e.doc,l,h,i.Ji.empty);if(!u||u.from!=l||u instanceof r.Ln&&u.slice.size>=h-l)return!1;if(n){let t=e.tr.step(u);t.setSelection(s.U3.create(t.doc,l)),n(t.scrollIntoView())}return!0}function d(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)break}return!1}let p=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=f(r)}let l=o&&o.nodeBefore;return!!l&&!!s.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos-l.nodeSize)).scrollIntoView()),!0)};function f(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function m(e,t){let{$cursor:n}=e.selection;return n&&(t?t.endOfTextblock("forward",e):!(n.parentOffset<n.parent.content.size))?n:null}let g=(e,t,n)=>{let o=m(e,n);if(!o)return!1;let l=v(o);if(!l)return!1;let a=l.nodeAfter;if(O(e,l,t,1))return!0;if(0==o.parent.content.size&&(d(a,"start")||s.nh.isSelectable(a))){let n=(0,r.$L)(e.doc,o.before(),o.after(),i.Ji.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(d(a,"start")?s.LN.findFrom(r.doc.resolve(r.mapping.map(l.pos)),1):s.nh.create(r.doc,r.mapping.map(l.pos))),t(r.scrollIntoView())}return!0}}return!!a.isAtom&&l.depth==o.depth-1&&(t&&t(e.tr.delete(l.pos,l.pos+a.nodeSize).scrollIntoView()),!0)},y=(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=v(r)}let l=o&&o.nodeAfter;return!!l&&!!s.nh.isSelectable(l)&&(t&&t(e.tr.setSelection(s.nh.create(e.doc,o.pos)).scrollIntoView()),!0)};function v(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}let w=(e,t)=>{let n=e.selection,i=n instanceof s.nh,o;if(i){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.from))return!1;o=n.from}else if(null==(o=(0,r.N0)(e.doc,n.from,-1)))return!1;if(t){let n=e.tr.join(o);i&&n.setSelection(s.nh.create(n.doc,o-e.doc.resolve(o).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},b=(e,t)=>{let n=e.selection,i;if(n instanceof s.nh){if(n.node.isTextblock||!(0,r.n9)(e.doc,n.to))return!1;i=n.to}else if(null==(i=(0,r.N0)(e.doc,n.to,1)))return!1;return t&&t(e.tr.join(i).scrollIntoView()),!0},x=(e,t)=>{let{$from:n,$to:i}=e.selection,s=n.blockRange(i),o=s&&(0,r.jP)(s);return null!=o&&(t&&t(e.tr.lift(s,o).scrollIntoView()),!0)},k=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!!n.parent.type.spec.code&&!!n.sameParent(r)&&(t&&t(e.tr.insertText("\n").scrollIntoView()),!0)};function M(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}let S=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),l=M(i.contentMatchAt(o));if(!l||!i.canReplaceWith(o,o,l))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,l.createAndFill());i.setSelection(s.LN.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},C=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof s.i5||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=M(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,l=e.tr.insert(n,o.createAndFill());l.setSelection(s.U3.create(l.doc,n+1)),t(l.scrollIntoView())}return!0},E=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if((0,r.zy)(e.doc,i))return t&&t(e.tr.split(i).scrollIntoView()),!0}let i=n.blockRange(),s=i&&(0,r.jP)(i);return null!=s&&(t&&t(e.tr.lift(i,s).scrollIntoView()),!0)},A=(e,t)=>
3{let{$from:n,to:r}=e.selection,i,o=n.sharedDepth(r);return 0!=o&&(i=n.before(o),t&&t(e.tr.setSelection(s.nh.create(e.doc,i))),!0)};function O(e,t,n,o){let l,a,h,u=t.nodeBefore,c=t.nodeAfter,p,f,m=u.type.spec.isolating||c.type.spec.isolating;if(!m&&(l=t.nodeBefore,a=t.nodeAfter,h=t.index(),l&&a&&l.type.compatibleContent(a.type)&&(!l.content.size&&t.parent.canReplace(h-1,h)?(n&&n(e.tr.delete(t.pos-l.nodeSize,t.pos).scrollIntoView()),!0):!!t.parent.canReplace(h,h+1)&&!!(a.isTextblock||(0,r.n9)(e.doc,t.pos))&&(n&&n(e.tr.join(t.pos).scrollIntoView()),!0))))return!0;let g=!m&&t.parent.canReplace(t.index(),t.index()+1);if(g&&(p=(f=u.contentMatchAt(u.childCount)).findWrapping(c.type))&&f.matchType(p[0]||c.type).validEnd){if(n){let s=t.pos+c.nodeSize,o=i.FK.empty;for(let e=p.length-1;e>=0;e--)o=i.FK.from(p[e].create(null,o));o=i.FK.from(u.copy(o));let l=e.tr.step(new r.Wg(t.pos-1,s,t.pos,s,new i.Ji(o,1,0),p.length,!0)),a=l.doc.resolve(s+2*p.length);a.nodeAfter&&a.nodeAfter.type==u.type&&(0,r.n9)(l.doc,a.pos)&&l.join(a.pos),n(l.scrollIntoView())}return!0}let y=c.type.spec.isolating||o>0&&m?null:s.LN.findFrom(t,1),v=y&&y.$from.blockRange(y.$to),w=v&&(0,r.jP)(v);if(null!=w&&w>=t.depth)return n&&n(e.tr.lift(v,w).scrollIntoView()),!0;if(g&&d(c,"start",!0)&&d(u,"end")){let s=u,o=[];for(;o.push(s),!s.isTextblock;)s=s.lastChild;let l=c,a=1;for(;!l.isTextblock;l=l.firstChild)a++;if(s.canReplace(s.childCount,s.childCount,l.content)){if(n){let s=i.FK.empty;for(let e=o.length-1;e>=0;e--)s=i.FK.from(o[e].copy(s));n(e.tr.step(new r.Wg(t.pos-o.length,t.pos+c.nodeSize,t.pos+a,t.pos+c.nodeSize-a,new i.Ji(s,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function R(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(s.U3.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}let z=R(-1),T=R(1);function I(e,t=null){return function(n,i){let{$from:s,$to:o}=n.selection,l=s.blockRange(o),a=l&&(0,r.oM)(l,e,t);return!!a&&(i&&i(n.tr.wrap(l,a).scrollIntoView()),!0)}}function N(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(s,o,(r,s)=>{if(i)return!1;if(!(!r.isTextblock||r.hasMarkup(e,t)))if(r.type==e)i=!0;else{let t=n.doc.resolve(s),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:s},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(s,o,e,t)}r(i.scrollIntoView())}return!0}}function D(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let P=D(o,a,p),$=D(o,g,y),F={Enter:D(k,C,E,(e,t)=>{let{$from:n,$to:i}=e.selection;if(e.selection instanceof s.nh&&e.selection.node.isBlock)return!!n.parentOffset&&!!(0,r.zy)(e.doc,n.pos)&&(t&&t(e.tr.split(n.pos).scrollIntoView()),!0);if(!n.depth)return!1;let o=[],l,a,h=!1,u=!1;for(let e=n.depth;;e--){if(n.node(e).isBlock){let t;h=n.end(e)==n.pos+(n.depth-e),u=n.start(e)==n.pos-(n.depth-e),a=M(n.node(e-1).contentMatchAt(n.indexAfter(e-1)));o.unshift(t||(h&&a?{type:a}:null)),l=e;break}if(1==e)return!1;o.unshift(null)}let c=e.tr;(e.selection instanceof s.U3||e.selection instanceof s.i5)&&c.deleteSelection();let d=c.mapping.map(n.pos),p=(0,r.zy)(c.doc,d,o.length,o);if(p||(o[0]=a?{type:a}:null,p=(0,r.zy)(c.doc,d,o.length,o)),!p)return!1;if(c.split(d,o.length,o),!h&&u&&n.node(l).type!=a){let e=c.mapping.map(n.before(l)),t=c.doc.resolve(e);a&&n.node(l-1).canReplaceWith(t.index(),t.index()+1,a)&&c.setNodeMarkup(c.mapping.map(n.before(l)),a)}return t&&t(c.scrollIntoView()),!0}),"Mod-Enter":S,Backspace:P,"Mod-Backspace":P,"Shift-Backspace":P,Delete:$,"Mod-Delete":$,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new s.i5(e.doc))),!0)},j={"Ctrl-h":F.Backspace,"Alt-Backspace":F["Mod-Backspace"],"Ctrl-d":F.Delete,"Ctrl-Alt-Backspace":F["Mod-Delete"],"Alt-Delete":F["Mod-Delete"],"Alt-d":F["Mod-Delete"],"Ctrl-a":z,"Ctrl-e":T};for(let e in F)j[e]=F[e];"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform()},21801:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("share",[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]])},23397:(e,t,n)=>{"use strict";n.d(t,{K:()=>f,w:()=>p});for(var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},i={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},s="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),o="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),l=0;l<10;l++)r[48+l]=r[96+l]=String(l);for(var l=1;l<=24;l++)r[l+111]="F"+l;for(var l=65;l<=90;l++)r[l]=String.fromCharCode(l+32),i[l]=String.fromCharCode(l);for(var a in r)i.hasOwnProperty(a)||(i[a]=r[a]);var h=n(63306);let u="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),c="undefined"!=typeof navigator&&/Win/.test(navigator.platform);
3function d(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function p(e){return new h.k_({props:{handleKeyDown:f(e)}})}function f(e){let t=function(e){let t=Object.create(null);for(let n in e)t[function(e){let t,n,r,i,s=e.split(/-(?!$)/),o=s[s.length-1];"Space"==o&&(o=" ");for(let e=0;e<s.length-1;e++){let o=s[e];if(/^(cmd|meta|m)$/i.test(o))i=!0;else if(/^a(lt)?$/i.test(o))t=!0;else if(/^(c|ctrl|control)$/i.test(o))n=!0;else if(/^s(hift)?$/i.test(o))r=!0;else if(/^mod$/i.test(o))u?i=!0:n=!0;else throw Error("Unrecognized modifier name: "+o)}return t&&(o="Alt-"+o),n&&(o="Ctrl-"+o),i&&(o="Meta-"+o),r&&(o="Shift-"+o),o}(n)]=e[n];return t}(e);return function(e,n){var l;let a=("Esc"==(l=!(s&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||o&&n.shiftKey&&n.key&&1==n.key.length||"Unidentified"==n.key)&&n.key||(n.shiftKey?i:r)[n.keyCode]||n.key||"Unidentified")&&(l="Escape"),"Del"==l&&(l="Delete"),"Left"==l&&(l="ArrowLeft"),"Up"==l&&(l="ArrowUp"),"Right"==l&&(l="ArrowRight"),"Down"==l&&(l="ArrowDown"),l),h,u=t[d(a,n)];if(u&&u(e.state,e.dispatch,e))return!0;if(1==a.length&&" "!=a){if(n.shiftKey){let r=t[d(a,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(c&&n.ctrlKey&&n.altKey)&&(h=r[n.keyCode])&&h!=a){let r=t[d(h,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}},24402:(e,t,n)=>{"use strict";n.d(t,{bD:()=>z});let{getOwnPropertyNames:r,getOwnPropertySymbols:i}=Object,{hasOwnProperty:s}=Object.prototype;function o(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function l(e){return function(t,n,r){if(!t||!n||"object"!=typeof t||"object"!=typeof n)return e(t,n,r);let{cache:i}=r,s=i.get(t),o=i.get(n);if(s&&o)return s===n&&o===t;i.set(t,n),i.set(n,t);let l=e(t,n,r);return i.delete(t),i.delete(n),l}}function a(e){return r(e).concat(i(e))}let h=Object.hasOwn||((e,t)=>s.call(e,t));function u(e,t){return e===t||!e&&!t&&e!=e&&t!=t}let{getOwnPropertyDescriptor:c,keys:d}=Object;function p(e,t){return e.byteLength===t.byteLength&&C(new Uint8Array(e),new Uint8Array(t))}function f(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-- >0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function m(e,t){return e.byteLength===t.byteLength&&C(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function g(e,t){return u(e.getTime(),t.getTime())}function y(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function v(e,t){return e===t}function w(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),l=e.entries(),a=0;for(;(r=l.next())&&!r.done;){let s=t.entries(),l=!1,h=0;for(;(i=s.next())&&!i.done;){if(o[h]){h++;continue}let s=r.value,u=i.value;if(n.equals(s[0],u[0],a,h,e,t,n)&&n.equals(s[1],u[1],s[0],u[0],e,t,n)){l=o[h]=!0;break}h++}if(!l)return!1;a++}return!0}function b(e,t,n){let r=d(e),i=r.length;if(d(t).length!==i)return!1;for(;i-- >0;)if(!A(e,t,n,r[i]))return!1;return!0}function x(e,t,n){let r,i,s,o=a(e),l=o.length;if(a(t).length!==l)return!1;for(;l-- >0;)if(!A(e,t,n,r=o[l])||(i=c(e,r),s=c(t,r),(i||s)&&(!i||!s||i.configurable!==s.configurable||i.enumerable!==s.enumerable||i.writable!==s.writable)))return!1;return!0}function k(e,t){return u(e.valueOf(),t.valueOf())}function M(e,t){return e.source===t.source&&e.flags===t.flags}function S(e,t,n){let r,i,s=e.size;if(s!==t.size)return!1;if(!s)return!0;let o=Array(s),l=e.values();for(;(r=l.next())&&!r.done;){let s=t.values(),l=!1,a=0;for(;(i=s.next())&&!i.done;){if(!o[a]&&n.equals(r.value,i.value,r.value,i.value,e,t,n)){l=o[a]=!0;break}a++}if(!l)return!1}return!0}function C(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function E(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function A(e,t,n,r){return("_owner"===r||"__o"===r||"__v"===r)&&(!!e.$$typeof||!!t.$$typeof)||h(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}let O={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array
3]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},R=Object.prototype.toString,z=T();function T(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,s=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:s,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:a,arePrimitiveWrappersEqual:h,areRegExpsEqual:u,areSetsEqual:c,areTypedArraysEqual:d,areUrlsEqual:p,unknownTagComparators:f}){return function(m,g,y){if(m===g)return!0;if(null==m||null==g)return!1;let v=typeof m;if(v!==typeof g)return!1;if("object"!==v)return"number"===v?l(m,g,y):"function"===v&&s(m,g,y);let w=m.constructor;if(w!==g.constructor)return!1;if(w===Object)return a(m,g,y);if(Array.isArray(m))return t(m,g,y);if(w===Date)return r(m,g,y);if(w===RegExp)return u(m,g,y);if(w===Map)return o(m,g,y);if(w===Set)return c(m,g,y);let b=R.call(m);if("[object Date]"===b)return r(m,g,y);if("[object RegExp]"===b)return u(m,g,y);if("[object Map]"===b)return o(m,g,y);if("[object Set]"===b)return c(m,g,y);if("[object Object]"===b)return"function"!=typeof m.then&&"function"!=typeof g.then&&a(m,g,y);if("[object URL]"===b)return p(m,g,y);if("[object Error]"===b)return i(m,g,y);if("[object Arguments]"===b)return a(m,g,y);if(O[b])return d(m,g,y);if("[object ArrayBuffer]"===b)return e(m,g,y);if("[object DataView]"===b)return n(m,g,y);if("[object Boolean]"===b||"[object Number]"===b||"[object String]"===b)return h(m,g,y);if(f){let e=f[b];if(!e){let t=null!=m?m[Symbol.toStringTag]:void 0;t&&(e=f[t])}if(e)return e(m,g,y)}return!1}}(function({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:p,areArraysEqual:n?x:f,areDataViewsEqual:m,areDatesEqual:g,areErrorsEqual:y,areFunctionsEqual:v,areMapsEqual:n?o(w,x):w,areNumbersEqual:u,areObjectsEqual:n?x:b,arePrimitiveWrappersEqual:k,areRegExpsEqual:M,areSetsEqual:n?o(S,x):S,areTypedArraysEqual:n?o(C,x):C,areUrlsEqual:E,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=l(r.areArraysEqual),t=l(r.areMapsEqual),n=l(r.areObjectsEqual),i=l(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:n,areSetsEqual:i})}return r}(e)),a=n?n(s):function(e,t,n,r,i,o,l){return s(e,t,l)};return function({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(s,o){let{cache:l=e?new WeakMap:void 0,meta:a}=n();return t(s,o,{cache:l,equals:r,meta:a,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let s={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,s)}}({circular:t,comparator:s,createState:r,equals:a,strict:i})}T({strict:!0}),T({circular:!0}),T({circular:!0,strict:!0}),T({createInternalComparator:()=>u}),T({strict:!0,createInternalComparator:()=>u}),T({circular:!0,createInternalComparator:()=>u}),T({circular:!0,createInternalComparator:()=>u,strict:!0})},26975:(e,t,n)=>{"use strict";n.d(t,{useQueries:()=>m});var r=n(66919),i=n(71876),s=n(11314),o=n(95109),l=n(33673);function a(e,t){let n=new Set(t);return e.filter(e=>!n.has(e))}var h=class extends o.Q{#d;#p;#e;#f;#m;#g;#y;#v;#w=[];constructor(e,t,n){super(),this.#d=e,this.#f=n,this.#e=[],this.#m=[],this.#p=[],this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.#m.forEach(e=>{e.subscribe(t=>{this.#b(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#m.forEach(e=>{e.destroy()})}setQueries(e,t){this.#e=e,this.#f=t,i.jG.batch(()=>{let e=this.#m,t=this.#x(this.#e);this.#w=t,t.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions));let n=t.map(e=>e.observer),r=n.map(e=>e.getCurrentResult()),i=n.some((t,n)=>t!==e[n]);(e.length!==n.length||i)&&(this.#m=n,this.#p=r,this.hasListeners()&&(a(e,n).forEach(e=>{e.destroy()}),a(n,e).forEach(e=>{e.subscribe(t=>{this.#b(e,t)})}),this.#k()))})}getCurrentResult(){return this.#p}getQueries(){return this.#m.map(e=>e.getCurrentQuery())}getObservers(){return this.#m}getOptimisticResult(e,t){let n=this.#x(e),r=n.map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions));return[r,e=>this.#M(e??r,t),()=>this.#S(r,n)]}#S(e,t){return t.map((n,r)=>{let i=e[r];return n.defaultedQueryOptions.notifyOnChangeProps?i:n.observer.trackResult(i,e=>{t.forEach(t=>{t.observer.trackProp(e)})})})}
3#M(e,t){return t?(this.#g&&this.#p===this.#v&&t===this.#y||(this.#y=t,this.#v=this.#p,this.#g=(0,l.BH)(this.#g,t(e))),this.#g):e}#x(e){let t=new Map(this.#m.map(e=>[e.options.queryHash,e])),n=[];return e.forEach(e=>{let r=this.#d.defaultQueryOptions(e),i=t.get(r.queryHash);i?n.push({defaultedQueryOptions:r,observer:i}):n.push({defaultedQueryOptions:r,observer:new s.$(this.#d,r)})}),n}#b(e,t){let n=this.#m.indexOf(e);-1!==n&&(this.#p=function(e,t,n){let r=e.slice(0);return r[t]=n,r}(this.#p,n,t),this.#k())}#k(){if(this.hasListeners()){let e=this.#g,t=this.#S(this.#p,this.#w);e!==this.#M(t,this.#f?.combine)&&i.jG.batch(()=>{this.listeners.forEach(e=>{e(this.#p)})})}}},u=n(77564),c=n(43218),d=n(40877),p=n(1147),f=n(25378);function m(e,t){let{queries:n,...o}=e,a=(0,u.useQueryClient)(t),m=(0,c.useIsRestoring)(),g=(0,d.useQueryErrorResetBoundary)(),y=r.useMemo(()=>n.map(e=>{let t=a.defaultQueryOptions(e);return t._optimisticResults=m?"isRestoring":"optimistic",t}),[n,a,m]);y.forEach(e=>{(0,f.jv)(e),(0,p.LJ)(e,g)}),(0,p.wZ)(g);let[v]=r.useState(()=>new h(a,y,o)),[w,b,x]=v.getOptimisticResult(y,o.combine),k=!m&&!1!==o.subscribed;r.useSyncExternalStore(r.useCallback(e=>k?v.subscribe(i.jG.batchCalls(e)):l.lQ,[v,k]),()=>v.getCurrentResult(),()=>v.getCurrentResult()),r.useEffect(()=>{v.setQueries(y,o)},[y,o,v]);let M=w.some((e,t)=>(0,f.EU)(y[t],e))?w.flatMap((e,t)=>{let n=y[t];if(n){let t=new s.$(a,n);if((0,f.EU)(n,e))return(0,f.iL)(n,t,g);(0,f.nE)(e,m)&&(0,f.iL)(n,t,g)}return[]}):[];if(M.length>0)throw Promise.all(M);let S=w.find((e,t)=>{let n=y[t];return n&&(0,p.$1)({result:e,errorResetBoundary:g,throwOnError:n.throwOnError,query:a.getQueryCache().get(n.queryHash),suspense:n.suspense})});if(null==S?void 0:S.error)throw S.error;return b(x())}},29039:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("grip-vertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]])},30885:(e,t,n)=>{"use strict";n.d(t,{Qg:()=>o,bL:()=>a});var r=n(66919),i=n(73720),s=n(28367),o=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),l=r.forwardRef((e,t)=>(0,s.jsx)(i.sG.span,{...e,ref:t,style:{...o,...e.style}}));l.displayName="VisuallyHidden";var a=l},31013:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},31580:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=n(68094).bP.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,"\n\n"):""})},32894:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(68094),i=n(42618),s=n(63306),o=n(73737),l=n(19147);function a(e){var t;let{char:n,allowSpaces:i,allowToIncludeChar:s,allowedPrefixes:o,startOfLine:l,$position:a}=e,h=i&&!s,u=(0,r.GG)(n),c=RegExp(`\\s${u}$`),d=l?"^":"",p=s?"":u,f=h?RegExp(`${d}${u}.*?(?=\\s${p}|$)`,"gm"):RegExp(`${d}(?:^)?${u}[^\\s${p}]*`,"gm"),m=(null==(t=a.nodeBefore)?void 0:t.isText)&&a.nodeBefore.text;if(!m)return null;let g=a.pos-m.length,y=Array.from(m.matchAll(f)).pop();if(!y||void 0===y.input||void 0===y.index)return null;let v=y.input.slice(Math.max(0,y.index-1),y.index),w=RegExp(`^[${null==o?void 0:o.join("")}\0]?$`).test(v);if(null!==o&&!w)return null;let b=g+y.index,x=b+y[0].length;return(h&&c.test(m.slice(x-1,x+1))&&(y[0]+=" ",x+=1),b<a.pos&&x>=a.pos)?{range:{from:b,to:x},query:y[0].slice(n.length),text:y[0]}:null}let h=new s.hs("suggestion");function u({pluginKey:e=h,editor:t,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:u=[" "],startOfLine:c=!1,decorationTag:d="span",decorationClass:p="suggestion",decorationContent:f="",decorationEmptyClass:m="is-empty",command:g=()=>null,items:y=()=>[],minQueryLength:v=0,debounce:w=0,initialItems:b,placement:x="bottom-start",offset:k={},container:M,flip:S=!0,floatingUi:C,dismissOnOutsideClick:E=!0,render:A=()=>({}),allow:O=()=>!0,findSuggestionMatch:R=a,shouldShow:z,shouldResetDismissed:T}){let I=null==A?void 0:A(),N=r&&!i,D=(n,r)=>(function(e,t,n,r){if(!n)return()=>
3{let t=e.state.selection.$anchor.pos,{top:n,right:r,bottom:i,left:s}=e.view.coordsAtPos(t);try{return new DOMRect(s,n,r-s,i-n)}catch{return null}};return()=>{let n=r.getState(e.state),i=null==n?void 0:n.decorationId,s=t.dom.querySelector(`[data-decoration-id="${i}"]`);return(null==s?void 0:s.getBoundingClientRect())||null}})(t,n,r,e),P=t=>(function({view:e,pluginKeyRef:t}){let n=e.state.tr.setMeta(t,{exit:!0});e.dispatch(n)})({view:t,pluginKeyRef:e});return new s.k_({key:e,view:()=>(function({editor:e,pluginKey:t,items:n,renderer:r,minQueryLength:i,debounce:s,initialItems:o,placement:a,offset:h,container:u,flip:c,floatingUi:d,dismissOnOutsideClick:p,command:f,clientRectFor:m,dispatchExit:g}){let y,v=function({editor:e,items:t}){let n=null,r=null,i=null,s=()=>{null==n||n.abort(),null!==r&&(clearTimeout(r),r=null),null==i||i(),i=null,n=null},o=async(o,l)=>{s();let a=n=new AbortController;if(l>0&&await new Promise(e=>{i=e,r=setTimeout(()=>{r=null;let e=i;i=null,null==e||e()},l)}),n!==a||a.signal.aborted)return{status:"aborted"};try{let r=await t({editor:e,query:o,signal:a.signal});if(n!==a||a.signal.aborted)return{status:"aborted"};return{status:"resolved",items:r}}catch{if(n!==a||a.signal.aborted)return{status:"aborted"};return{status:"error"}}};return{abort:s,fetch:o}}({editor:e,items:n}),w=function({placement:e,offset:t,flip:n,floatingUi:r}){var i,s,o,a;let h=[(0,l.cY)({mainAxis:null!=(i=t.mainAxis)?i:4,crossAxis:null!=(s=t.crossAxis)?s:0})];return n&&h.push((0,l.UU)()),(null==r||null==(o=r.middleware)?void 0:o.length)&&h.push(...r.middleware),{placement:e,strategy:null!=(a=null==r?void 0:r.strategy)?a:"absolute",middleware:h}}({placement:a,offset:h,flip:c,floatingUi:d});function b(e,t){var n,i,s;switch(e){case"started":null==r||null==(n=r.onStart)||n.call(r,t);break;case"updated":null==r||null==(i=r.onUpdate)||i.call(r,t);break;case"stopped":null==r||null==(s=r.onExit)||s.call(r,t)}}return{update:async(n,d)=>{var x,k,M,S;let C=t.getState(d),E=t.getState(n.state);if(!C||!E)return;let A=null,O=C.query!==E.query,R=C.text!==E.text,z=C.range.from!==E.range.from||C.range.to!==E.range.to;if(!C.active&&E.active)A="started";else if(C.active&&!E.active)A="stopped";else{if(!E.active||!O&&!R&&!z)return;A="updated"}let T="stopped"===A?C:E,I=n.dom.querySelector(`[data-decoration-id="${T.decorationId}"]`),N=m(n,I),D=0===i||!!T.query&&T.query.length>=i,P=("started"===A||"updated"===A)&&D;if(y={editor:e,range:T.range,query:T.query||"",text:T.text||"",items:null!=o?o:[],command:t=>f({editor:e,range:T.range,props:t}),decorationNode:I,clientRect:N,loading:P,placement:a,offset:{mainAxis:null!=(x=h.mainAxis)?x:4,crossAxis:null!=(k=h.crossAxis)?k:0},container:u,flip:c,floatingUi:w,mount:function({getReferenceRect:e,contextElement:t,config:n,container:r,dismissOnOutsideClick:i,dismiss:s}){return(o,a={})=>{let h,u={getBoundingClientRect:()=>{var t;return null!=(t=e())?t:new DOMRect},contextElement:t},c=!1,d=!o.isConnected;d&&(function(e){if(e instanceof HTMLElement)return e;if("string"==typeof e)try{let t=document.querySelector(e);if(t)return t}catch{}return document.body})(r).appendChild(o),a.onPosition||(o.style.visibility="hidden",o.style.width="max-content");let p=(0,l.ll)(u,o,()=>{(0,l.rD)(u,o,{placement:n.placement,strategy:n.strategy,middleware:n.middleware}).then(({x:e,y:t,placement:n,strategy:r})=>{if(a.onPosition)return void a.onPosition({x:e,y:t,placement:n,strategy:r});Object.assign(o.style,{position:r,left:`${e}px`,top:`${t}px`}),c||(c=!0,o.style.visibility="")})},a.autoUpdate);return i&&(h=e=>{let n=e.target;!(n instanceof Node)||o.contains(n)||t.contains(n)||s()},document.addEventListener("pointerdown",h,!0)),()=>{p(),h&&document.removeEventListener("pointerdown",h,!0),d&&o.remove()}}}({getReferenceRect:N,contextElement:n.dom,config:w,container:u,dismissOnOutsideClick:p,dismiss:()=>g(e.view)})},"started"===A&&(null==r||null==(M=r.onBeforeStart)||M.call(r,y)),"updated"===A&&(null==r||null==(S=r.onBeforeUpdate)||S.call(r,y)),"started"===A&&b(A,y),"started"===A||"updated"===A)if(P){b(A="updated",y={...y,items:null!=o?o:[],loading:!0});let e=await v.fetch(T.query||"",s);if("aborted"===e.status)return;let r=t.getState(n.state);if(!(null==r?void 0:r.active))return void v.abort();y="resolved"===e.status?{...y,items:e.items,loading:!1}:{...y,loading:!1}}else v.abort(),y={...y,items:null!=o?o:[],loading:!1};if("stopped"===A){v.abort(),b(A,y),y=void 0;return}"updated"===A&&b(A,y)},destroy:()=>{var e;v.abort(),y&&(null==r||null==(e=r.onExit)||e.call(r,y))}}})({editor:t,pluginKey:e,items:y,renderer:I,minQueryLength:v,debounce:w,initialItems:b,placement:x,offset:k,container:M,flip:S,floatingUi:C,dismissOnOutsideClick:E,command:g,clientRectFor:D,dispatchExit:P}),state:function({editor:e,char:t,effectiveAllowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:s,findSuggestionMatch:o,allow:l,shouldShow:a,shouldKeepDismissed:h,pluginKey:u}){return{init:()=>({active:!1,range:{from:0,to:0},query:null,text:null,composing:!1,dismissedRange:null}),apply(c,d,p,f){let{isEditable:m}=e,{composing:g}=e.view,{selection:y}=c,{empty:v,from:w}=y,b={...d},x=c.getMeta(u);if(x&&x.exit)return b.active=!1,b.decorationId=null,b.range={from:0,to:0},b.query=null,b.text=null,b.dismissedRange=d.active?{...d.range}:d.dismissedRange,b;if(b.composing=g,c.docChanged&&null!==b.dismissedRange&&(b.dismissedRange={from:c.mapping.map(b.dismissedRange.from),to:c.mapping.map(b.dismissedRange.to)}),m&&(v||e.view.composing)){(w<d.range.from||w>d.range.to)&&!g&&!d.composing&&(b.active=!1);let u=o({char:t,allowSpaces:n,allowToIncludeChar:r,allowedPrefixes:i,startOfLine:s,$position:y.$from}),p=`id_${Math.floor(0xffffffff*Math.random())}`;u&&l({editor:e,state:f,range:u.range,isActive:d.active})&&(!a||a({editor:e,range:u.range,query:u.query,text:u.text,transaction:c}))?(null===b.dismissedRange||h({match:u,dismissedRange:b.dismissedRange,state:f,transaction:c})||(b.dismissedRange=null),null===b.dismissedRange?(b.active=!0,b.decorationId=d.decorationId||p,b.range=u.range,b.query=u.query,b.text=u.text):b.active=!1):(u||(b.dismissedRange=null),b.active=!1)}else b.active=!1;return b.active||(b.decorationId=null,b.range={from:0,to:0},b.query=null,b.text=null),b}}
3}({editor:t,char:n,effectiveAllowSpaces:N,allowToIncludeChar:i,allowedPrefixes:u,startOfLine:c,findSuggestionMatch:R,allow:O,shouldShow:z,shouldKeepDismissed:function(e){return function({match:e,dismissedRange:t,state:n,transaction:r,editor:i,shouldResetDismissed:s,effectiveAllowSpaces:o}){return(null==s?!void 0:!s({editor:i,state:n,range:t,match:e,transaction:r,allowSpaces:o}))&&(o?e.range.from===t.from:e.range.from===t.from&&!(r.docChanged&&r.steps.some(e=>{let t=e.slice;if(!(null==t?void 0:t.content))return!1;let n=t.content.textBetween(0,t.content.size,"\n");return/\s/.test(n)})))}({...e,editor:t,shouldResetDismissed:T,effectiveAllowSpaces:N})},pluginKey:e}),props:function({pluginKey:e,decorationTag:t,decorationClass:n,decorationContent:r,decorationEmptyClass:i,renderer:s,dispatchExit:l}){return{handleKeyDown(t,n){var r,i;let o=e.getState(t.state);return!!o.active&&("Escape"===n.key||"Esc"===n.key?(null==s||null==(i=s.onKeyDown)||i.call(s,{view:t,event:n,range:o.range}),l(t),!0):(null==s||null==(r=s.onKeyDown)?void 0:r.call(s,{view:t,event:n,range:o.range}))||!1)},decorations(s){let{active:l,range:a,decorationId:h,query:u}=e.getState(s);if(!l)return null;let c=!(null==u?void 0:u.length),d=[n];return c&&d.push(i),o.zF.create(s.doc,[o.NZ.inline(a.from,a.to,{nodeName:t,class:d.join(" "),"data-decoration-id":h||void 0,"data-decoration-content":r})])}}}({pluginKey:e,decorationTag:d,decorationClass:p,decorationContent:f,decorationEmptyClass:m,renderer:I,dispatchExit:P})})}function c(e){return(e.options.suggestions.length?e.options.suggestions:[e.options.suggestion]).map(t=>(function({editor:e,overrideSuggestionOptions:t,extensionName:n,char:r="@"}){return{editor:e,char:r,pluginKey:new s.hs,command:({editor:e,range:t,props:i})=>{var s,o;let l=e.view.state.selection.$to.nodeAfter;(null==l||null==(s=l.text)?void 0:s.startsWith(" "))&&(t.to+=1),e.chain().focus().insertContentAt(t,[{type:n,attrs:{...i,mentionSuggestionChar:r}},{type:"text",text:" "}]).run(),null==(o=e.view.dom.ownerDocument.defaultView)||null==(o=o.getSelection())||o.collapseToEnd()},allow:({state:e,range:t})=>{let r=e.doc.resolve(t.from),i=e.schema.nodes[n];return!!r.parent.type.contentMatch.matchType(i)},...t}})({editor:e.editor,overrideSuggestionOptions:t,extensionName:e.name,char:t.char}))}function d(e,t){let n=c(e),r=n.find(e=>e.char===t);return r||(n.length?n[0]:null)}var p=r.bP.create({name:"mention",priority:101,addOptions:()=>({HTMLAttributes:{},renderText({node:e,suggestion:t}){var n,r;return`${null!=(n=null==t?void 0:t.char)?n:"@"}${null!=(r=e.attrs.label)?r:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:e,node:t,suggestion:n}){var i,s;return["span",(0,r.KV)(this.HTMLAttributes,e.HTMLAttributes),`${null!=(i=null==n?void 0:n.char)?i:"@"}${null!=(s=t.attrs.label)?s:t.attrs.id}`]},suggestions:[],suggestion:{}}),group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes:()=>({id:{default:null,parseHTML:e=>e.getAttribute("data-id"),renderHTML:e=>e.id?{"data-id":e.id}:{}},label:{default:null,parseHTML:e=>e.getAttribute("data-label"),renderHTML:e=>e.label?{"data-label":e.label}:{}},mentionSuggestionChar:{default:"@",parseHTML:e=>e.getAttribute("data-mention-suggestion-char"),renderHTML:e=>({"data-mention-suggestion-char":e.mentionSuggestionChar})}}),parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:e,HTMLAttributes:t}){let n=d(this,e.attrs.mentionSuggestionChar);if(void 0!==this.options.renderLabel)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),this.options.renderLabel({options:this.options,node:e,suggestion:n})];let i={...this.options};i.HTMLAttributes=(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t);let s=this.options.renderHTML({options:i,node:e,suggestion:n});return"string"==typeof s?["span",(0,r.KV)({"data-type":this.name},this.options.HTMLAttributes,t),s]:s},...(0,r.ur)({nodeName:"mention",name:"@",selfClosing:!0,allowedAttributes:["id","label",{name:"mentionSuggestionChar",skipIfDefault:"@"}],parseAttributes:e=>{let t={},n=/(?:^|\s)(\w+)=(?:"([^"]*)"|'([^']*)')/g,r=n.exec(e);for(;null!==r;){let[,i,s,o]=r;t["char"===i?"mentionSuggestionChar":i]=null!=s?s:o,r=n.exec(e)}return t},serializeAttributes:e=>Object.entries(e).filter(([,e])=>null!=e).map(([e,t])=>`${"mentionSuggestionChar"===e?"char":e}="${t}"`).join(" ")}),renderText({node:e}){let t={options:this.options,node:e,suggestion:d(this,e.attrs.mentionSuggestionChar)};return void 0!==this.options.renderLabel?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel(t)):this.options.renderText(t)},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:e,state:t})=>{let n=!1,{selection:r}=t,{empty:s,anchor:o}=r;if(!s)return!1;let l=new i.bP,a=0;return t.doc.nodesBetween(o-1,o,(e,t)=>
3{if(e.type.name===this.name)return n=!0,l=e,a=t,!1}),n&&e.insertText(this.options.deleteTriggerWithBackspace?"":l.attrs.mentionSuggestionChar,a,a+l.nodeSize),n})}},addProseMirrorPlugins(){return c(this).map(u)}})},32933:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]])},35618:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]])},38729:(e,t,n)=>{"use strict";n.d(t,{t:()=>i});var r=Object.defineProperty,i=(e,t)=>{let n={};for(var i in e)r(n,i,{get:e[i],enumerable:!0});return t||r(n,Symbol.toStringTag,{value:"Module"}),n}},39322:(e,t,n)=>{"use strict";n.d(t,{Qv:()=>o,XS:()=>s});var r=n(57635);function i(e){return e}function s(e){return"success"===e.state.status}function o(e,t,n){if("object"!=typeof t||null===t)return;let s=e.getMutationCache(),o=e.getQueryCache(),l=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??i,a=t.mutations||[],h=t.queries||[];a.forEach(({state:t,...r})=>{s.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...r},t)}),h.forEach(({queryKey:t,state:i,queryHash:s,meta:a,promise:h,dehydratedAt:u})=>{let c=h?(0,r.b)(h):void 0,d=void 0===i.data?c?.data:i.data,p=void 0===d?d:l(d),f=o.get(s),m=f?.state.status==="pending",g=f?.state.fetchStatus==="fetching";if(f){let e=c&&void 0!==u&&u>f.state.dataUpdatedAt;if(i.dataUpdatedAt>f.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=i;f.setState({...t,data:p})}}else f=o.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:s,meta:a},{...i,data:p,fetchStatus:"idle",status:void 0!==p?"success":i.status});h&&!m&&!g&&(void 0===u||u>f.state.dataUpdatedAt)&&f.fetch(void 0,{initialPromise:Promise.resolve(h).then(l)})})}},41375:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},42618:(e,t,n)=>{"use strict";function r(e){this.content=e}function i(e){return e>=56320&&e<57344}function s(e){return e>=55296&&e<56320}n.d(t,{S4:()=>J,ZF:()=>Y,FK:()=>o,CU:()=>u,sX:()=>L,bP:()=>C,u$:()=>M,vI:()=>c,Sj:()=>q,Ji:()=>d}),r.prototype={constructor:r,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return -1},get:function(e){var t=this.find(e);return -1==t?void 0:this.content[t+1]},update:function(e,t,n){var i=n&&n!=e?this.remove(n):this,s=i.find(e),o=i.content.slice();return -1==s?o.push(n||e,t):(o[s+1]=t,n&&(o[s]=n)),new r(o)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new r(n)},addToStart:function(e,t){return new r([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new r(n)},addBefore:function(e,t,n){var i=this.remove(t),s=i.content.slice(),o=i.find(e);return s.splice(-1==o?s.length:o,0,t,n),new r(s)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=r.from(e)).size?new r(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=r.from(e)).size?new r(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=r.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};class o{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;if(a>e&&!1!==n(l,r+o,i||null,s)&&l.content.size){let i=o+1;l.nodesBetween(Math.max(0,e-i),Math.min(l.content.size,t-i),n,r+i)}o=a}}descendants(e){this.nodesBetween(0,this.size,e)}
3textBetween(e,t,n,r){let i="",s=!0;return this.nodesBetween(e,t,(o,l)=>{let a=o.isText?o.text.slice(Math.max(e,l)-l,t-l):o.isLeaf?r?"function"==typeof r?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):"":"";o.isBlock&&(o.isLeaf&&a||o.isTextblock)&&n&&(s?s=!1:i+=n),i+=a},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),i=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),i=1);i<e.content.length;i++)r.push(e.content[i]);return new o(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let i=0,s=0;s<t;i++){let o=this.content[i],l=s+o.nodeSize;l>e&&((s<e||l>t)&&(o=o.isText?o.cut(Math.max(0,e-s),Math.min(o.text.length,t-s)):o.cut(Math.max(0,e-s-1),Math.min(o.content.size,t-s-1))),n.push(o),r+=o.nodeSize),s=l}return new o(n,r)}cutByIndex(e,t){return e==t?o.empty:0==e&&t==this.content.length?this:new o(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),i=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new o(r,i)}addToStart(e){return new o([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new o(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return function e(t,n,r){for(let o=0;;o++){if(o==t.childCount||o==n.childCount)return t.childCount==n.childCount?null:r;let l=t.child(o),a=n.child(o);if(l==a){r+=l.nodeSize;continue}if(!l.sameMarkup(a))return r;if(l.isText&&l.text!=a.text){let e=l.text,t=a.text,n=0;for(;e[n]==t[n];n++)r++;return n&&n<e.length&&n<t.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&r--,r}if(l.content.size||a.content.size){let t=e(l.content,a.content,r+1);if(null!=t)return t}r+=l.nodeSize}}(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return function e(t,n,r,o){for(let l=t.childCount,a=n.childCount;;){if(0==l||0==a)return l==a?null:{a:r,b:o};let h=t.child(--l),u=n.child(--a),c=h.nodeSize;if(h==u){r-=c,o-=c;continue}if(!h.sameMarkup(u))return{a:r,b:o};if(h.isText&&h.text!=u.text){let e=h.text,t=u.text,n=e.length,l=t.length;for(;n>0&&l>0&&e[n-1]==t[l-1];)n--,l--,r--,o--;return n&&l&&n<e.length&&s(e.charCodeAt(n-1))&&i(e.charCodeAt(n))&&(r++,o++),{a:r,b:o}}if(h.content.size||u.content.size){let t=e(h.content,u.content,r-1,o-1);if(t)return t}r-=c,o-=c}}(this,e,t,n)}findIndex(e){if(0==e)return a(0,e);if(e==this.size)return a(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=n+this.child(t).nodeSize;if(r>=e){if(r==e)return a(t+1,r);return a(t,n)}n=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return o.empty;if(!Array.isArray(t))throw RangeError("Invalid input for Fragment.fromJSON");return o.fromArray(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return o.empty;let t,n=0;for(let r=0;r<e.length;r++){let i=e[r];n+=i.nodeSize,r&&i.isText&&e[r-1].sameMarkup(i)?(t||(t=e.slice(0,r)),t[t.length-1]=i.withText(t[t.length-1].text+i.text)):t&&t.push(i)}return new o(t||e,n)}static from(e){if(!e)return o.empty;if(e instanceof o)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new o([e],e.nodeSize);throw RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}o.empty=new o([],0);let l={index:0,offset:0};function a(e,t){return l.index=e,l.offset=t,l}function h(e,t){if(e===t)return!0;
vendor: 6,962 bytes, line 3
3if(!(e&&"object"==typeof e)||!(t&&"object"==typeof t))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!h(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!h(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class u{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||(t=e.slice(0,r));else{if(i.type.excludes(this.type))return e;!n&&i.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(i)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&h(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return u.none;if(e instanceof u)return[e];let t=e.slice();return t.sort((e,t)=>e.type.rank-t.type.rank),t}}u.none=[];class c extends Error{}class d{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=function e(t,n,r,i,s,o){let{index:l,offset:a}=t.findIndex(n),h=t.maybeChild(l);if(a==n||h.isText)return o&&i<=0&&s<=0&&!o.canReplace(l,l,r)?null:t.cut(0,n).append(r).append(t.cut(n));let u=e(h.content,n-a-1,r,0==l?i-1:0,l==t.childCount-1?s-1:0,h);return u&&t.replaceChild(l,h.copy(u))}(this.content,e+this.openStart,t,this.openStart+1,this.openEnd+1);return n&&new d(n,this.openStart,this.openEnd)}removeBetween(e,t){return new d(function e(t,n,r){let{index:i,offset:s}=t.findIndex(n),o=t.maybeChild(i),{index:l,offset:a}=t.findIndex(r);if(s==n||o.isText){if(a!=r&&!t.child(l).isText)throw RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(e(o.content,n-s-1,r-s-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return d.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw RangeError("Invalid input for Slice.fromJSON");return new d(o.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new d(e,n,r)}}function p(e,t){if(!t.type.compatibleContent(e.type))throw new c("Cannot join "+t.type.name+" onto "+e.type.name)}function f(e,t,n){let r=e.node(n);return p(r,t.node(n)),r}function m(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function g(e,t,n,r){let i=(t||e).node(n),s=0,o=t?t.index(n):i.childCount;e&&(s=e.index(n),e.depth>n?s++:e.textOffset&&(m(e.nodeAfter,r),s++));for(let e=s;e<o;e++)m(i.child(e),r);t&&t.depth==n&&t.textOffset&&m(t.nodeBefore,r)}function y(e,t){if(!e.type.validContent(t))throw new c("Invalid content for node "+e.type.name);return e.copy(t)}function v(e,t,n){let r=[];return g(null,e,n,r),e.depth>n&&m(y(f(e,t,n+1),v(e,t,n+1)),r),g(t,null,n,r),new o(r)}d.empty=new d(o.empty,0,0);class w{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var s=0;s<i.length;s++)!1!==i[s].type.spec.inclusive||r&&i[s].isInSet(r.marks)||(i=i[s--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)!1!==n[i].type.spec.inclusive||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new M(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw RangeError("Position "+t+" out of range");let n=[],r=0,i=t;for(let t=e;;){let{index:e,offset:s}=t.content.findIndex(i),o=i-s;if(n.push(t,e,r+s),!o||(t=t.child(e)).isText)break;
3i=o-1,r+=s+1}return new w(t,n,i)}static resolveCached(e,t){let n=k.get(e);if(n)for(let e=0;e<n.elts.length;e++){let r=n.elts[e];if(r.pos==t)return r}else k.set(e,n=new b);let r=n.elts[n.i]=w.resolve(e,t);return n.i=(n.i+1)%x,r}}class b{constructor(){this.elts=[],this.i=0}}let x=12,k=new WeakMap;class M{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}let S=Object.create(null);class C{constructor(e,t,n,r=u.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||o.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&h(this.attrs,t||e.defaultAttrs||S)&&u.sameSet(this.marks,n||u.none)}copy(e=null){return e==this.content?this:new C(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new C(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return d.empty;let r=this.resolve(e),i=this.resolve(t),s=n?0:r.sharedDepth(t),o=r.start(s);return new d(r.node(s).content.cut(r.pos-o,i.pos-o),r.depth-s,i.depth-s)}replace(e,t,n){var r=this.resolve(e),i=this.resolve(t);if(n.openStart>r.depth)throw new c("Inserted content deeper than insertion position");if(r.depth-n.openStart!=i.depth-n.openEnd)throw new c("Inconsistent open depths");return function e(t,n,r,i){let s=t.index(i),l=t.node(i);if(s==n.index(i)&&i<t.depth-r.openStart){let o=e(t,n,r,i+1);return l.copy(l.content.replaceChild(s,o))}if(!r.content.size)return y(l,v(t,n,i));if(r.openStart||r.openEnd||t.depth!=i||n.depth!=i){let{start:e,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(o.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t);return y(l,function e(t,n,r,i,s){let l=t.depth>s&&f(t,n,s+1),a=i.depth>s&&f(r,i,s+1),h=[];return g(null,t,s,h),l&&a&&n.index(s)==r.index(s)?(p(l,a),m(y(l,e(t,n,r,i,s+1)),h)):(l&&m(y(l,v(t,n,s+1)),h),g(n,r,s,h),a&&m(y(a,v(r,i,s+1)),h)),g(i,null,s,h),new o(h)}(t,e,s,n,i))}{let e=t.parent,i=e.content;return y(e,i.cut(0,t.parentOffset).append(r.content).append(i.cut(n.parentOffset)))}}(r,i,n,0)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(!(t=t.maybeChild(n)))return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return w.resolveCached(this,e)}resolveNoCache(e){return w.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}
3toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),A(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=o.empty,r=0,i=n.childCount){let s=this.contentMatchAt(e).matchFragment(n,r,i),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),s=i&&i.matchFragment(this.content,t);return!!s&&s.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=u.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!u.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){let n;if(!t)throw RangeError("Invalid input for Node.fromJSON");if(t.marks){if(!Array.isArray(t.marks))throw RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=o.fromJSON(e,t.content),i=e.nodeType(t.type).create(t.attrs,r,n);return i.type.checkAttrs(i.attrs),i}}C.prototype.text=void 0;class E extends C{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):A(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new E(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new E(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function A(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class O{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){var n;let r,i=new R(e,t);if(null==i.next)return O.empty;let s=function e(t){let n=[];do n.push(function(t){let n=[];do n.push(function(t){let n=function(t){if(t.eat("(")){let n=e(t);return t.eat(")")||t.err("Missing closing paren"),n}if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=(function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return 0==i.length&&e.err("No node type or group '"+t+"' found"),i})(t,t.next).map(e=>(null==t.inline?t.inline=e.isInline:t.inline!=e.isInline&&t.err("Mixing inline and block content"),{type:"name",value:e}));return t.pos++,1==e.length?e[0]:{type:"choice",exprs:e}}}(t);for(;;)if(t.eat("+"))n={type:"plus",expr:n};else if(t.eat("*"))n={type:"star",expr:n};else if(t.eat("?"))n={type:"opt",expr:n};else if(t.eat("{"))n=function(e,t){let n=z(e),r=n;return e.eat(",")&&(r="}"!=e.next?z(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}(t,n);else break;return n}(t));while(t.next&&")"!=t.next&&"|"!=t.next);return 1==n.length?n[0]:{type:"seq",exprs:n}}(t));while(t.eat("|"));return 1==n.length?n[0]:{type:"choice",exprs:n}}(i);i.next&&i.err("Unexpected trailing text");let o=(n=function(e){let t=[[]];return i(function e(t,s){if("choice"==t.type)return t.exprs.reduce((t,n)=>t.concat(e(n,s)),[]);if("seq"==t.type)for(let r=0;;r++){let o=e(t.exprs[r],s);if(r==t.exprs.length-1)return o;i(o,s=n())}else if("star"==t.type){let o=n();return r(s,o),i(e(t.expr,o),o),[r(o)]}else if("plus"==t.type){let o=n();return i(e(t.expr,s),o),i(e(t.expr,o),o),[r(o)]}else if("opt"==t.type)return[r(s)].concat(e(t.expr,s));else if("range"==t.type){let o=s;for(let r=0;r<t.min;r++){let r=n();i(e(t.expr,o),r),o=r}if(-1==t.max)i(e(t.expr,o),o);else for(let s=t.min;s<t.max;s++){let s=n();r(o,s),i(e(t.expr,o),s),o=s}return[r(o)]}else if("name"==t.type)return[r(s,void 0,t.value)];else throw Error("Unknown expr type")}(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}
vendor: 5,540 bytes, line 3
3function i(e,t){e.forEach(e=>e.to=t)}}(s),r=Object.create(null),function e(t){let i=[];t.forEach(e=>{n[e].forEach(({term:e,to:t})=>{let r;if(e){for(let t=0;t<i.length;t++)i[t][0]==e&&(r=i[t][1]);I(n,t).forEach(t=>{r||i.push([e,r=[]]),-1==r.indexOf(t)&&r.push(t)})}})});let s=r[t.join(",")]=new O(t.indexOf(n.length-1)>-1);for(let t=0;t<i.length;t++){let n=i[t][1].sort(T);s.next.push({type:i[t][0],next:r[n.join(",")]||e(n)})}return s}(I(n,0)));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,s=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];s.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),-1==r.indexOf(o)&&r.push(o)}i&&t.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,i),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function i(s,l){let a=s.matchFragment(e,n);if(a&&(!t||a.validEnd))return o.from(l.map(e=>e.createAndFill()));for(let e=0;e<s.next.length;e++){let{type:t,next:n}=s.next[e];if(!(t.isText||t.hasRequiredAttrs())&&-1==r.indexOf(n)){r.push(n);let e=i(n,l.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:s,next:o}=i.next[e];s.isLeaf||s.hasRequiredAttrs()||s.name in t||r.type&&!o.validEnd||(n.push({match:s.contentMatch,type:s,via:r}),t[s.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return!function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r}).join("\n")}}O.empty=new O(!0);class R{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+" (in content expression '"+this.string+"')")}}function z(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function T(e,t){return t-e}function I(e,t){let n=[];return function t(r){let i=e[r];if(1==i.length&&!i[0].term)return t(i[0].to);n.push(r);for(let e=0;e<i.length;e++){let{term:r,to:s}=i[e];r||-1!=n.indexOf(s)||t(s)}}(t),n.sort(T)}function N(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function D(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(void 0===i){let t=e[r];if(t.hasDefault)i=t.default;else throw RangeError("No value supplied for attribute "+r)}n[r]=i}return n}function P(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}function $(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new j(e,r,t[r]);return n}class F{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=$(e,n.attrs),this.defaultAttrs=N(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==O.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:D(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error("NodeType.create can't construct text nodes");return new C(this,this.computeAttrs(e),o.from(t),u.setFrom(n))}createChecked(e=null,t,n){return t=o.from(t),this.checkContent(t),new C(this,this.computeAttrs(e),t,u.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=o.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(o.empty,!0);return i?new C(this,e,t.append(i),u.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);
3if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){P(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){let t;if(null==this.markSet)return e;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:u.none:e}static compile(e,t){let n=Object.create(null);e.forEach((e,r)=>n[e]=new F(e,t,r));let r=t.spec.topNode||"doc";if(!n[r])throw RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw RangeError("The text node type should not have attributes");return n}}class j{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let i=null===n?"null":typeof n;if(0>r.indexOf(i))throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class L{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=$(e,r.attrs),this.excluded=null;let i=N(this.attrs);this.instance=i?new u(this,i):null}create(e=null){return!e&&this.instance?this.instance:new u(this,D(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach((e,i)=>n[e]=new L(e,r++,t,i)),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){P(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class q{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=r.from(e.nodes),t.marks=r.from(e.marks||{}),this.nodes=F.compile(this.spec.nodes,this),this.marks=L.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+" can not be both a node and a mark");let t=this.nodes[e],r=t.spec.content||"",i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=O.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError("Multiple linebreak nodes defined");if(!t.isInline||!t.isLeaf)throw RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=t}t.markSet="_"==i?null:i?B(this,i.split(" ")):""!=i&&t.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:B(this,n.split(" "))}this.nodeFromJSON=e=>C.fromJSON(this,e),this.markFromJSON=e=>u.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else if(e instanceof F){if(e.schema!=this)throw RangeError("Node type from different schema used ("+e.name+")")}else throw RangeError("Invalid node type: "+e);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new E(n,n.defaultAttrs,e,u.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError("Unknown node type: "+e);return t}}function B(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e.marks[i],o=s;if(s)n.push(s);else for(let t in e.marks){let r=e.marks[t];("_"==i||r.spec.group&&r.spec.group.split(" ").indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class J{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];
3t.forEach(e=>{if(null!=e.tag)this.tags.push(e);else if(null!=e.style){let t=/[^=]*/.exec(e.style)[0];0>n.indexOf(t)&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new U(this,t,!1);return n.addAll(e,u.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new U(this,t,!0);return n.addAll(e,u.none,t.from,t.to),d.maxOpen(n.finish())}matchTag(e,t,n){for(let s=n?this.tags.indexOf(n)+1:0;s<this.tags.length;s++){var r,i;let n=this.tags[s];if(r=e,i=n.tag,(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,i)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],s=r.style;if(0==s.indexOf(e)&&(!r.context||n.matchesContext(r.context))&&(!(s.length>e.length)||61==s.charCodeAt(e.length)&&s.slice(e.length+1)==t)){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Q(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Q(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new J(e,J.schemaRules(e)))}}let V={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},K={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},H={ol:!0,ul:!0};function W(e,t,n){return null!=t?!!t|2*("full"===t):e&&"pre"==e.whitespace?3:-5&n}class _{constructor(e,t,n,r,i,s){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=s,this.content=[],this.activeMarks=u.none,this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(o.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e=this.content[this.content.length-1],t;e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))&&(e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=e.withText(e.text.slice(0,e.text.length-t[0].length)))}let t=o.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(o.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!V.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class U{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,s=W(null,t.preserveWhitespace,0)|4*!!n;i=r?new _(r.type,r.attrs,u.none,!0,t.topMatch||r.type.contentMatch,s):n?new _(null,null,u.none,!0,null,s):new _(e.schema.topNodeType,null,u.none,!0,null,s),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){3==e.nodeType?this.addTextNode(e,t):1==e.nodeType&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=2&r.options?"full":this.localPreserveWS||(1&r.options)>0,{schema:s}=this.parser;if("full"===i||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(i)if("full"===i)n=n.replace(/\r\n?/g,"\n");else if(s.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(s.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(s.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(s.text(e[n]),t,!/\S/.test(e[n]));n=""}else n=n.replace(/\r?\n|\r/g," ");else if(n=n.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&"BR"==i.nodeName||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}n&&this.insertNode(s.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;("PRE"==e.tagName||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),o;H.hasOwnProperty(s)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&H.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));e:if(l?l.ignore:K.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let n,r=this.needsBlock;if(V.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let o=l&&l.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,l,n,!1===l.consuming?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"),t)}ignoreFallback(e,t){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),!1===n.consuming)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,s;
vendor: 4,107 bytes, line 3
3if(t.node)if((s=this.parser.schema.nodes[t.node]).isLeaf)this.insertNode(s.create(t.attrs),n,"BR"==e.nodeName)||this.leafFallback(e,n);else{let e=this.enter(s,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;"string"==typeof t.contentElement?r=e.querySelector(t.contentElement):"function"==typeof t.contentElement?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let s=n?e.childNodes[n]:e.firstChild,o=null==r?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,s=0;t>=0;t--){let o=this.nodes[t],l=o.findWrapping(e);if(l&&(!r||r.length>l.length+s)&&(r=l,i=o,!l.length))break;if(o.solid){if(n)break;s+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&(t.match=t.match.matchType(e.type));let n=u.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):G(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&(i=this.enterInner(e,t,n,!0,r)),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let o=W(e,i,s.options);4&s.options&&0==s.content.length&&(o|=4);let l=u.none;return n=n.filter(t=>(s.type?!s.type.allowsMarkType(t.type):!G(t.type,e))||(l=t.addToSet(l),!1)),this.nodes.push(new _(e,t,l,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=1);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,s=(e,o)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;o>=i;o--)if(s(e-1,o))return!0;return!1}{let e=o>0||0==o&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=l&&!e.isInGroup(l))return!1;o--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];
3if(t.isTextblock&&t.defaultAttrs)return t}}}function Q(e){let t={};for(let n in e)t[n]=e[n];return t}function G(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let s=[],o=e=>{s.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||0>s.indexOf(i)&&o(i))return!0}};if(o(i.contentMatch))return!0}}class Y{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=X(t).createDocumentFragment());let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,s=0;for(;n<i.length&&s<e.marks.length;){let t=e.marks[s];if(!this.marks[t.type.name]){s++;continue}if(!t.eq(i[n][0])||!1===t.type.spec.spanning)break;n++,s++}for(;n<i.length;)r=i.pop()[1];for(;s<e.marks.length;){let n=e.marks[s++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return X(t).createTextNode(e.text);let{dom:n,contentDOM:r}=et(X(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&et(X(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return"string"==typeof t?{dom:e.createTextNode(t)}:et(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Y(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Z(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Z(e.marks)}}function Z(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function X(e){return e.document||window.document}let ee=new WeakMap;function et(e,t,n,r){let i,s,o;if(1==t.nodeType)return{dom:t};if(t.dom&&1==t.dom.nodeType)return t;let l=t[0],a;if("string"!=typeof l)throw RangeError("Invalid array passed to renderSpec");if(r&&(void 0===(s=ee.get(r))&&ee.set(r,(o=null,!function e(t){if(t&&"object"==typeof t)if(Array.isArray(t))if("string"==typeof t[0])o||(o=[]),o.push(t);else for(let n=0;n<t.length;n++)e(t[n]);else for(let n in t)e(t[n])}(r),s=o)),a=s)&&a.indexOf(t)>-1)throw RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let h=l.indexOf(" ");h>0&&(n=l.slice(0,h),l=l.slice(h+1));let u=n?e.createElementNS(n,l):e.createElement(l),c=t[1],d=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){for(let e in d=2,c)if(null!=c[e]){let t=e.indexOf(" ");t>0?u.setAttributeNS(e.slice(0,t),e.slice(t+1),c[e]):"style"==e&&u.style?u.style.cssText=c[e]:u.setAttribute(e,c[e])}}for(let s=d;s<t.length;s++){let o=t[s];if(0===o){if(s<t.length-1||s>d)throw RangeError("Content hole must be the only child of its parent node");return{dom:u,contentDOM:u}}if("string"==typeof o)u.appendChild(e.createTextNode(o));else{let{dom:t,contentDOM:s}=et(e,o,n,r);if(u.appendChild(t),s){if(i)throw RangeError("Multiple content holes");i=s}}}return{dom:u,contentDOM:i}}},45377:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("scroll-text",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]])},46467:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]])},47203:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("file-plus",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]])},49059:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]])},49206:(e,t,n)=>{"use strict";n.d(t,{A:()=>W});var r=n(68094),i=n(63306),s=n(97841);class o{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!=(n=t.width)?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}
3destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t,n=this.editorView.state.doc.resolve(this.cursorPos),r=!n.parent.inlineContent,i,s=this.editorView.dom,o=s.getBoundingClientRect(),l=o.width/s.offsetWidth,a=o.height/s.offsetHeight;if(r){let e=n.nodeBefore,t=n.nodeAfter;if(e||t){let n=this.editorView.nodeDOM(this.cursorPos-(e?e.nodeSize:0));if(n){let r=n.getBoundingClientRect(),s=e?r.bottom:r.top;e&&t&&(s=(s+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let o=this.width/2*a;i={left:r.left,right:r.right,top:s-o,bottom:s+o}}}}if(!i){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*l;i={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let h=this.editorView.dom.offsetParent;if(!this.element&&(this.element=h.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",r),this.element.classList.toggle("prosemirror-dropcursor-inline",!r),h&&(h!=document.body||"static"!=getComputedStyle(h).position)){let n=h.getBoundingClientRect(),r=n.width/h.offsetWidth,i=n.height/h.offsetHeight;e=n.left-h.scrollLeft*r,t=n.top-h.scrollTop*i}else e=-pageXOffset,t=-pageYOffset;this.element.style.left=(i.left-e)/l+"px",this.element.style.top=(i.top-t)/a+"px",this.element.style.width=(i.right-i.left)/l+"px",this.element.style.height=(i.bottom-i.top)/a+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i="function"==typeof r?r(this.editorView,t,e):r;if(t&&!i){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=(0,s.Um)(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}var l=n(73737),a=n(23397),h=n(42618);class u extends i.LN{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return u.valid(n)?new u(n):i.LN.near(n)}content(){return h.Ji.empty}eq(e){return e instanceof u&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for GapCursor.fromJSON");return new u(e.resolve(t.pos))}getBookmark(){return new c(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0==n){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||d(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||d(e.type))return!0;if(e.inlineContent)return!1}}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){t:for(;;){if(!n&&u.valid(e))return e;let r=e.pos,s=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){s=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let o=e.doc.resolve(r);if(u.valid(o))return o}for(;;){let o=t>0?s.firstChild:s.lastChild;if(!o){if(s.isAtom&&!s.isText&&!i.nh.isSelectable(s)){e=e.doc.resolve(r+s.nodeSize*t),n=!1;continue t}break}s=o,r+=t;let l=e.doc.resolve(r);if(u.valid(l))return l}return null}}}u.prototype.visible=!1,u.findFrom=u.findGapCursorFrom,i.LN.jsonID("gapcursor",u);class c{constructor(e){this.pos=e}map(e){return new c(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return u.valid(t)?new u(t):i.LN.near(t)}}function d(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}let p=(0,a.K)({ArrowLeft:f("horiz",-1),ArrowRight:f("horiz",1),ArrowUp:f("vert",
3-1),ArrowDown:f("vert",1)});function f(e,t){let n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,s){let o=e.selection,l=t>0?o.$to:o.$from,a=o.empty;if(o instanceof i.U3){if(!s.endOfTextblock(n)||0==l.depth)return!1;a=!1,l=e.doc.resolve(t>0?l.after():l.before())}let h=u.findGapCursorFrom(l,t,a);return!!h&&(r&&r(e.tr.setSelection(new u(h))),!0)}}function m(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!u.valid(r))return!1;let s=e.posAtCoords({left:n.clientX,top:n.clientY});return!(s&&s.inside>-1&&i.nh.isSelectable(e.state.doc.nodeAt(s.inside)))&&(e.dispatch(e.state.tr.setSelection(new u(r))),!0)}function g(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof u))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let s=h.FK.empty;for(let e=r.length-1;e>=0;e--)s=h.FK.from(r[e].createAndFill(null,s));let o=e.state.tr.replace(n.pos,n.pos,new h.Ji(s,0,0));return o.setSelection(i.U3.near(o.doc.resolve(n.pos+1))),e.dispatch(o),!1}function y(e){if(!(e.selection instanceof u))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",l.zF.create(e.doc,[l.NZ.widget(e.selection.head,t,{key:"gapcursor"})])}var v=function(){};v.prototype.append=function(e){return e.length?(e=v.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},v.prototype.prepend=function(e){return e.length?v.from(e).append(this):this},v.prototype.appendInner=function(e){return new b(this,e)},v.prototype.slice=function(e,t){return(void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t)?v.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},v.prototype.get=function(e){if(!(e<0)&&!(e>=this.length))return this.getInner(e)},v.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},v.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},v.from=function(e){return e instanceof v?e:e&&e.length?new w(e):v.empty};var w=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(!1===e(this.values[i],r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(!1===e(this.values[i],r+i))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(v);v.empty=new w([]);var b=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&!1===this.left.forEachInner(e,t,Math.min(n,i),r)||n>i&&!1===this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&!1===this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)||n<i&&!1===this.left.forEachInvertedInner(e,Math.min(t,i),n,r))return!1},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(v);class x{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){let n,r,i,s;if(0==this.eventCount)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}t&&(r=(n=this.remapping(o,this.items.length)).maps.length);let l=e.tr,a=[],h=[];
3return this.items.forEach((e,t)=>{if(!e.step){n||(r=(n=this.remapping(o,t+1)).maps.length),r--,h.push(e);return}if(n){h.push(new k(e.map));let t=e.step.map(n.slice(r)),i;t&&l.maybeStep(t).doc&&(i=l.mapping.maps[l.mapping.maps.length-1],a.push(new k(i,void 0,void 0,a.length+h.length))),r--,i&&n.appendMap(i,r)}else l.maybeStep(e.step);if(e.selection)return i=n?e.selection.map(n.slice(r)):e.selection,s=new x(this.items.slice(0,o).append(h.reverse().concat(a)),this.eventCount-1),!1},this.items.length,0),{remaining:s,transform:l,selection:i}}addTransform(e,t,n,r){var i,s;let o,l=[],a=this.eventCount,h=this.items,u=!r&&h.length?h.get(h.length-1):null;for(let n=0;n<e.steps.length;n++){let i=e.steps[n].invert(e.docs[n]),s=new k(e.mapping.maps[n],i,t),o;(o=u&&u.merge(s))&&(s=o,n?l.pop():h=h.slice(0,h.length-1)),l.push(s),t&&(a++,t=void 0),r||(u=s)}let c=a-n.depth;return c>S&&(i=h,s=c,i.forEach((e,t)=>{if(e.selection&&0==s--)return o=t,!1}),h=i.slice(o),a-=c),new x(h.append(l),a)}remapping(e,t){let n=new s.X9;return this.items.forEach((t,r)=>{let i=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(e){return 0==this.eventCount?this:new x(this.items.append(e.map(e=>new k(e))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),i=e.mapping,s=e.steps.length,o=this.eventCount;this.items.forEach(e=>{e.selection&&o--},r);let l=t;this.items.forEach(t=>{let r=i.getMirror(--l);if(null==r)return;s=Math.min(s,r);let a=i.maps[r];if(t.step){let s=e.steps[r].invert(e.docs[r]),h=t.selection&&t.selection.map(i.slice(l+1,r));h&&o++,n.push(new k(a,s,h))}else n.push(new k(a))},r);let a=[];for(let e=t;e<s;e++)a.push(new k(i.maps[e]));let h=new x(this.items.slice(0,r).append(a).append(n),o);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-n.length)),h}emptyItemCount(){let e=0;return this.items.forEach(t=>{!t.step&&e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],i=0;return this.items.forEach((s,o)=>{if(o>=e)r.push(s),s.selection&&i++;else if(s.step){let e=s.step.map(t.slice(n)),o=e&&e.getMap();if(n--,o&&t.appendMap(o,n),e){let l=s.selection&&s.selection.map(t.slice(n));l&&i++;let a=new k(o.invert(),e,l),h,u=r.length-1;(h=r.length&&r[u].merge(a))?r[u]=h:r.push(a)}}else s.map&&n--},this.items.length,0),new x(v.from(r.reverse()),i)}}x.empty=new x(v.empty,0);class k{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new k(t.getMap().invert(),t,this.selection)}}}class M{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}}let S=20;function C(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function E(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),s=t.map(e[r+1],-1);i<=s&&n.push(i,s)}return n}let A=!1,O=null;function R(e){let t=e.plugins;if(O!=t){A=!1,O=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){A=!0;break}}return A}let z=new i.hs("history"),T=new i.hs("closeHistory");function I(e,t){return(n,r)=>{let i=z.getState(n);if(!i||0==(e?i.undone:i.done).eventCount)return!1;if(r){let s=function(e,t,n){let r=R(t),i=z.get(t).spec.config,s=(n?e.undone:e.done).popEvent(t,r);if(!s)return null;let o=s.selection.resolve(s.transform.doc),l=(n?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,r),a=new M(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(o).setMeta(z,{redo:n,historyState:a})}(i,n,e);s&&r(t?s.scrollIntoView():s)}return!0}}let N=I(!1,!0),D=I(!0,!0);I(!1,!1),I(!0,!1),r.YY.create({name:"characterCount",addOptions:()=>({limit:null,autoTrim:!0,mode:"textSize",textCounter:e=>e.length,wordCounter:e=>e.split(" ").filter(e=>""!==e).length}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){let e=t.textBetween(0,t.content.size,void 0," ");return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=(null==e?void 0:e.node)||this.editor.state.doc,n=t.textBetween(0,t.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new i.k_({key:new i.hs("characterCount"),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,s=this.options.autoTrim;if(null==i||0===i||!1===s){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let t=r.tr.deleteRange(0,o-i);return e=!0,t}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;
3if(r>n&&i>n&&i>r||!e.getMeta("paste"))return!1;let s=e.selection.$head.pos;return e.deleteRange(s-(i-n),s),!(this.storage.characters({node:e.doc})>n)}})]}}),r.YY.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[function(e={}){return new i.k_({view:t=>new o(t,e)})}(this.options)]}}),r.YY.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new i.k_({key:new i.hs("focus"),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,s=[];if(!n||!r)return l.zF.create(e,[]);let o=0;"deepest"===this.options.mode&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let a=0;return e.descendants((e,t)=>!e.isText&&!!(i>=t&&i<=t+e.nodeSize-1)&&((a+=1,"deepest"===this.options.mode&&o-a>0||"shallowest"===this.options.mode&&a>1)?"deepest"===this.options.mode:void s.push(l.NZ.node(t,t+e.nodeSize,{class:this.options.className})))),l.zF.create(e,s)}}})]}}),r.YY.create({name:"gapCursor",addProseMirrorPlugins:()=>[new i.k_({props:{decorations:y,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&u.valid(n)?new u(n):null,handleClick:m,handleKeyDown:p,handleDOMEvents:{beforeinput
3:g}}})],extendNodeSchema(e){var t;let n={name:e.name,options:e.options,storage:e.storage};return{allowGapCursor:null!=(t=(0,r.gk)((0,r.iI)(e,"allowGapCursor",n)))?t:null}}});let P="placeholder",$=new i.hs("tiptap__placeholder");function F(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:s,isEmptyDoc:o,hasAnchor:a,classes:{emptyNode:h,emptyEditor:u}}=e,c=[h];return o&&c.push(u),l.NZ.node(i,i+s.nodeSize,{class:c.join(" "),[r]:"function"==typeof n?n({editor:t,node:s,pos:i,hasAnchor:a}):n})}function j(e,t){return"function"==typeof e?e(t):e}function L({editor:e,options:t,dataAttribute:n,doc:i,selection:s,from:o,to:l}){let{anchor:a}=s,h=[],u=e.isEmpty;return i.nodesBetween(o,l,(i,s)=>{let o=a>=s&&a<=s+i.nodeSize,l=!i.isLeaf&&(0,r.Op)(i);return i.type.isTextblock&&(o||!t.showOnlyCurrent)&&l&&h.push(F({editor:e,isEmptyDoc:u,dataAttribute:n,hasAnchor:o,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:j(t.emptyNodeClass,{editor:e,node:i,pos:s,hasAnchor:o})},node:i,pos:s})),t.includeChildren}),h}function q({editor:e,options:t,dataAttribute:n,doc:i,selection:s}){if(!(e.isEditable||!t.showOnlyWhenEditable))return null;let{anchor:o}=s,a=[],h=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let s=i.resolve(o),l=s.depth>0?s.node(1):s.nodeAfter,u=s.depth>0?s.before(1):o;if(l&&l.type.isTextblock&&(0,r.Op)(l)){let r=o>=u&&o<=u+l.nodeSize;a.push(F({editor:e,isEmptyDoc:h,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:j(t.emptyNodeClass,{editor:e,node:l,pos:u,hasAnchor:r})},node:l,pos:u}))}}else a.push(...L({editor:e,options:t,dataAttribute:n,doc:i,selection:s,from:0,to:i.content.size}));return l.zF.create(i,a)}function B(e,t){let n=e.resolve(t);if(0===n.depth){var r;let e=null!=(r=n.nodeAfter)?r:n.nodeBefore;if(!e)return{from:t,to:t};let i=n.nodeAfter?t:t-e.nodeSize;return{from:i,to:i+e.nodeSize}}let i=n.before(1);return{from:i,to:i+n.node(1).nodeSize}}function J(e,t){return{from:Math.max(0,t.from-1),to:Math.min(e.content.size,t.to-1)}}let V=r.YY.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:P,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[function({editor:e,options:t}){let n=t.dataAttribute?`data-${t.dataAttribute.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}`:`data-${P}`,s=t.showOnlyCurrent&&!t.includeChildren;return new i.k_({key:$,...s?{}:{state:function({editor:e,options:t,dataAttribute:n}){return{init(r,i){let s=q({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection});return null!=s?s:l.zF.empty},apply:(i,s,o,l)=>i.docChanged||i.selectionSet?function({decorations:e,ranges:t,editor:n,options:r,dataAttribute:i,doc:s,selection:o}){let l=e;for(let e of t){let{from:t,to:a}=function(e,t,n){let r=Math.max(0,Math.min(e,n.content.size));return{from:r,to:Math.max(r,Math.min(t,n.content.size))}}(e.from,e.to,s),h=l.find(t,a).filter(e=>e.from>=t&&e.to<=a);h.length&&(l=l.remove(h));let u=L({editor:n,options:r,dataAttribute:i,doc:s,selection:o,from:t,to:a});u.length&&(l=l.add(s,u))}return l}({decorations:s.map(i.mapping,i.doc),ranges:function(e,t,n){let i=[];if(e.docChanged)for(let t of(0,r.FF)(e))i.push(...function(e,t){let n=function(e,t,n){let r=[];return e.forEach((e,i)=>{let s=i+e.nodeSize,o=s+1;i+1<n&&o>t&&r.push({from:i,to:s})}),r}(e,t.from,t.to);return n.push(J(e,B(e,t.from))),t.to>t.from?n.push(J(e,B(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(J(e,B(e,Math.min(t.from+1,e.content.size)))),n}(n.doc,t.newRange));return e.selectionSet&&(i.push(J(n.doc,B(n.doc,e.mapping.map(t.selection.anchor)))),i.push(J(n.doc,B(n.doc,n.selection.anchor)))),function(e){if(0===e.length)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let r=n[n.length-1],i=t[e];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}(i)}(i,o,l),editor:e,options:t,dataAttribute:n,doc:l.doc,selection:l.selection}):s}}({editor:e,options:t,dataAttribute:n})},props:{decorations:s?({doc:r,selection:i})=>q({editor:e,options:t,dataAttribute:n,doc:r,selection:i}):n=>{var r;return t.showOnlyWhenEditable&&!e.isEditable?l.zF.empty:null!=(r=$.getState(n))?r:l.zF.empty}}})}({editor:this.editor,options:this.options})]}});function K(e,t){return!e.selection.empty&&!(0,r.BQ)(e.selection)&&t.isEditable}function H({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||(null==t?void 0:t.type)===e}r.YY.create({name:"selection",addOptions:()=>({className:"selection"}),addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new i.k_({key:new i.hs("selection"),props:{decorations:n=>!K(n,e)||e.isFocused||e.view.dragging?null:l.zF.create(n.doc,[l.NZ.inline(n.selection.from,n.selection.to,{class:t.className})]),handleDOMEvents:{blur(t){var n;return!!K(t.state,e)&&(null==(n=window.getSelection())||n.removeAllRanges(),!1)},focus:t=>!!K(t.state,e)&&(requestAnimationFrame(()=>
3{!e.isDestroyed&&t.hasFocus()&&t.focus()}),!1)}}})]}}),r.YY.create({name:"trailingNode",addOptions:()=>({node:void 0,notAfter:[]}),addProseMirrorPlugins(){var e;let t=new i.hs(this.name),n=this.options.node||(null==(e=this.editor.schema.topNodeType.contentMatch.defaultType)?void 0:e.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(n).includes(e.name));return[new i.k_({key:t,appendTransaction:(e,r,i)=>{let{doc:s,tr:o,schema:l}=i,a=t.getState(i),h=s.content.size,u=l.nodes[n];if(!e.some(e=>e.getMeta("skipTrailingNode"))&&a)return o.insert(h,u.create())},state:{init:(e,t)=>!H({node:t.tr.doc.lastChild,types:r}),apply:(e,t)=>!e.docChanged||e.getMeta("__uniqueIDTransaction")?t:!H({node:e.doc.lastChild,types:r})}})]}}),r.YY.create({name:"undoRedo",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>N(e,t),redo:()=>({state:e,dispatch:t})=>D(e,t)}),addProseMirrorPlugins(){return[function(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new i.k_({key:z,state:{init:()=>new M(x.empty,x.empty,null,0,-1),apply:(t,n,r)=>(function(e,t,n,r){let i=n.getMeta(z),s;if(i)return i.historyState;n.getMeta(T)&&(e=new M(e.done,e.undone,null,0,-1));let o=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(o&&o.getMeta(z))if(o.getMeta(z).redo)return new M(e.done.addTransform(n,void 0,r,R(t)),e.undone,C(n.mapping.maps),e.prevTime,e.prevComposition);else return new M(e.done,e.undone.addTransform(n,void 0,r,R(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||o&&!1===o.getMeta("addToHistory"))if(s=n.getMeta("rebased"))return new M(e.done.rebased(n,s),e.undone.rebased(n,s),E(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);else return new M(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),E(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let i=n.getMeta("composition"),s=0==e.prevTime||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}(n,e.prevRanges)),l=o?E(e.prevRanges,n.mapping):C(n.mapping.maps);return new M(e.done.addTransform(n,s?t.selection.getBookmark():void 0,r,R(t)),x.empty,l,n.time,null==i?e.prevComposition:i)}})(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?N:"historyRedo"==n?D:null;return!!r&&!!e.editable&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}});var W=V},49449:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]])},53360:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},53987:(e,t,n)=>{"use strict";n.d(t,{Kq:()=>K,UC:()=>U,ZL:()=>_,bL:()=>H,i3:()=>Q,l9:()=>W});var r=n(66919),i=n(47407),s=n(4779),o=n(87935),l=n(34854),a=n(50042),h=n(26331),u=n(95240),c=n(37985),d=n(73720),p=n(72197),f=n(79378),m=n(30885),g=n(28367),[y,v]=(0,o.A)("Tooltip",[h.Bk]),w=(0,h.Bk)(),b="TooltipProvider",x="tooltip.open",[k,M]=y(b),S=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:i=300,disableHoverableContent:s=!1,children:o}=e,l=r.useRef(!0),a=r.useRef(!1),h=r.useRef(0);return r.useEffect(()=>{let e=h.current;return()=>window.clearTimeout(e)},[]),(0,g.jsx)(k,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:r.useCallback(()=>{window.clearTimeout(h.current),l.current=!1},[]),onClose:r.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>l.current=!0,i)},[i]),isPointerInTransitRef:a,onPointerInTransitChange:r.useCallback(e=>{a.current=e},[]),disableHoverableContent:s,children:o})};S.displayName=b;var C="Tooltip",[E,A]=y(C),O=e=>{let{__scopeTooltip:t,children:n,open:i,defaultOpen:s,onOpenChange:o,disableHoverableContent:l,delayDuration:u}=e,c=M(C,e.__scopeTooltip),d=w(t),[p,m]=r.useState(null),y=(0,a.B)(),v=r.useRef(0),b=null!=l?l:c.disableHoverableContent,k=null!=u?u:c.delayDuration,S=r.useRef(!1),[A,O]=(0,f.i)({prop:i,defaultProp:null!=s&&s,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(x))):c.onClose(),null==o||o(e)},caller:C}),R=r.useMemo(()=>A?S.current?"delayed-open":"instant-open":"closed",[A]),z=r.useCallback(()=>{window.clearTimeout(v.current),v.current=0,S.current=!1,O(!0)},[O]),T=r.useCallback(()=>{window.clearTimeout(v.current),v.current=0,O(!1)},[O]),I=r.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{S.current=!0,O(!0),v.current=0},k)},[k,O]);return r.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),(0,g.jsx)(h.bL,{...d,children:(0,g.jsx)(E,{scope:t,contentId:y,open:A,stateAttribute:R,trigger:p,onTriggerChange:m,onTriggerEnter:r.useCallback(()=>{c.isOpenDelayedRef.current?I():z()},[c.isOpenDelayedRef,I,z]),onTriggerLeave:r.useCallback(()=>{b?T():(window.clearTimeout(v.current),v.current=0)},[T,b]),onOpen:z,onClose:T,disableHoverableContent:b,children:n})})};O.displayName=C;var R="TooltipTrigger",z=r.forwardRef((e,t)=>
3{let{__scopeTooltip:n,...o}=e,l=A(R,n),a=M(R,n),u=w(n),c=r.useRef(null),p=(0,s.s)(t,c,l.onTriggerChange),f=r.useRef(!1),m=r.useRef(!1),y=r.useCallback(()=>f.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),(0,g.jsx)(h.Mz,{asChild:!0,...u,children:(0,g.jsx)(d.sG.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...o,ref:p,onPointerMove:(0,i.mK)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(m.current||a.isPointerInTransitRef.current||(l.onTriggerEnter(),m.current=!0))}),onPointerLeave:(0,i.mK)(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:(0,i.mK)(e.onPointerDown,()=>{l.open&&l.onClose(),f.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:(0,i.mK)(e.onFocus,()=>{f.current||l.onOpen()}),onBlur:(0,i.mK)(e.onBlur,l.onClose),onClick:(0,i.mK)(e.onClick,l.onClose)})})});z.displayName=R;var T="TooltipPortal",[I,N]=y(T,{forceMount:void 0}),D=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,s=A(T,t);return(0,g.jsx)(I,{scope:t,forceMount:n,children:(0,g.jsx)(c.C,{present:n||s.open,children:(0,g.jsx)(u.Z,{asChild:!0,container:i,children:r})})})};D.displayName=T;var P="TooltipContent",$=r.forwardRef((e,t)=>{let n=N(P,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=e,o=A(P,e.__scopeTooltip);return(0,g.jsx)(c.C,{present:r||o.open,children:o.disableHoverableContent?(0,g.jsx)(B,{side:i,...s,ref:t}):(0,g.jsx)(F,{side:i,...s,ref:t})})}),F=r.forwardRef((e,t)=>{let n=A(P,e.__scopeTooltip),i=M(P,e.__scopeTooltip),o=r.useRef(null),l=(0,s.s)(t,o),[a,h]=r.useState(null),{trigger:u,onClose:c}=n,d=o.current,{onPointerInTransitChange:p}=i,f=r.useCallback(()=>{h(null),p(!1)},[p]),m=r.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());h(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,i),...function(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}(t.getBoundingClientRect())])),p(!0)},[p]);return r.useEffect(()=>()=>f(),[f]),r.useEffect(()=>{if(u&&d){let e=e=>m(e,d),t=e=>m(e,u);return u.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}},[u,d,m,f]),r.useEffect(()=>{if(a){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==d?void 0:d.contains(t)),i=!function(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,s=t.length-1;e<t.length;s=e++){let o=t[e],l=t[s],a=o.x,h=o.y,u=l.x,c=l.y;h>r!=c>r&&n<(u-a)*(r-h)/(c-h)+a&&(i=!i)}return i}(n,a);r?f():i&&(f(),c())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[u,d,a,c,f]),(0,g.jsx)(B,{...e,ref:l})}),[j,L]=y(C,{isInside:!1}),q=(0,p.Dc)("TooltipContent"),B=r.forwardRef((e,t)=>{let{__scopeTooltip:n,children:i,"aria-label":s,onEscapeKeyDown:o,onPointerDownOutside:a,...u}=e,c=A(P,n),d=w(n),{onClose:p}=c;return r.useEffect(()=>(document.addEventListener(x,p),()=>document.removeEventListener(x,p)),[p]),r.useEffect(()=>{if(c.trigger){let e=e=>{let t=e.target;(null==t?void 0:t.contains(c.trigger))&&p()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[c.trigger,p]),(0,g.jsx)(l.qW,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,g.jsxs)(h.UC,{"data-state":c.stateAttribute,...d,...u,ref:t,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,g.jsx)(q,{children:i}),(0,g.jsx)(j,{scope:n,isInside:!0,children:(0,g.jsx)(m.bL,{id:c.contentId,role:"tooltip",children:s||i})})]})})});$.displayName=P;var J="TooltipArrow",V=r.forwardRef((e,t)=>
3{let{__scopeTooltip:n,...r}=e,i=w(n);return L(J,n).isInside?null:(0,g.jsx)(h.i3,{...i,...r,ref:t})});V.displayName=J;var K=S,H=O,W=z,_=D,U=$,Q=V},55069:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},57615:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("book-copy",[["path",{d:"M5 7a2 2 0 0 0-2 2v11",key:"1yhqjt"}],["path",{d:"M5.803 18H5a2 2 0 0 0 0 4h9.5a.5.5 0 0 0 .5-.5V21",key:"edzzo5"}],["path",{d:"M9 15V4a2 2 0 0 1 2-2h9.5a.5.5 0 0 1 .5.5v14a.5.5 0 0 1-.5.5H11a2 2 0 0 1 0-4h10",key:"1nwzrg"}]])},57749:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},58285:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},58897:(e,t,n)=>{"use strict";n.d(t,{z:()=>l});var r=n(66919),i=n(28367);let s="function"==typeof r.useId?r.useId:function(){let e=r.useRef(null);return null===e.current&&(e.current=`-${Date.now()}-${Math.random().toString(36).slice(2,9)}`),e.current};function o(e){let t=r.useRef(e),n=r.useRef(e);return t.current!==e&&(function(e,t){if(e===t)return!0;if(null==e||null==t)return e===t;try{return JSON.stringify(e)===JSON.stringify(t)}catch{return!1}}(n.current,e)||(n.current=e),t.current=e),n.current}let l=(0,r.forwardRef)(function(e,t){let[l,a]=(0,r.useState)(!1),{id:h,renderLoading:u,hideToolbar:c=!1,contained:d=!1,className:p,style:f,onReady:m,onEditorCreate:g,onEditorDestroy:y,onEditorUpdate:v,onTransaction:w,onContentError:b,onException:x,document:k,user:M,users:S,modules:C,...E}=e,A=e.documentMode??"editing",O=e.role??"editor",R=o(M),z=o(S),T=(0,r.useRef)(null),I=(0,r.useRef)(null),N=s(),D=h??`superdoc${N}`,P=`${D}-toolbar`,[$,F]=(0,r.useState)(!0),j=(0,r.useRef)({onReady:m,onEditorCreate:g,onEditorDestroy:y,onEditorUpdate:v,onTransaction:w,onContentError:b,onException:x});(0,r.useEffect)(()=>{j.current={onReady:m,onEditorCreate:g,onEditorDestroy:y,onEditorUpdate:v,onTransaction:w,onContentError:b,onException:x}},[m,g,y,v,w,b,x]);let L=(0,r.useRef)(null),q=(0,r.useRef)(!1),B=(0,r.useRef)(A);(0,r.useEffect)(()=>{B.current!==A&&(T.current?T.current.setDocumentMode(A):q.current&&(L.current=A)),B.current=A},[A]),(0,r.useImperativeHandle)(t,()=>({getInstance:()=>T.current}),[]),(0,r.useEffect)(()=>{F(!0),a(!1),q.current=!0;let e=!1,t=null;return(async()=>{try{let r=(await Promise.all([n.e(9426),n.e(897),n.e(8179),n.e(903),n.e(4267),n.e(3523),n.e(7609),n.e(2663)]).then(n.bind(n,88773))).SuperDoc;if(e)return;T.current=t=new r({...E,selector:`#${CSS.escape(D)}`,...!c&&I.current?{toolbar:`#${CSS.escape(P)}`}:{},documentMode:A,role:O,contained:d,...null==k?{}:{document:k},...R?{user:R}:{},...z?{users:z}:{},...C?{modules:C}:{},onReady:t=>{e||(F(!1),q.current=!1,L.current&&L.current!==A&&(t.superdoc.setDocumentMode(L.current),L.current=null),j.current.onReady?.(t))},onEditorCreate:t=>{e||j.current.onEditorCreate?.(t)},onEditorDestroy:()=>{e||j.current.onEditorDestroy?.()},onEditorUpdate:t=>{e||j.current.onEditorUpdate?.(t)},onTransaction:t=>{e||j.current.onTransaction?.(t)},onContentError:t=>{e||j.current.onContentError?.(t)},onException:t=>{e||j.current.onException?.(t)}})}catch(t){e||(q.current=!1,F(!1),a(!0),console.error("[SuperDocEditor] Failed to initialize SuperDoc:",t),j.current.onException?.({error:t}))}})(),()=>{q.current=!1,L.current=null,t&&(t.destroy(),T.current=null),e=!0}},[k,R,z,C,O,c,d,D,P]);let J=["superdoc-wrapper",p].filter(Boolean).join(" "),V=$?{display:"none"}:void 0;return(0,i.jsxs)("div",{className:J,style:{...f,...d&&{display:"flex",flexDirection:"column"}},children:[!c&&(0,i.jsx)("div",{ref:I,id:P,className:"superdoc-toolbar-container",style:V}),(0,i.jsx)("div",{id:D,className:"superdoc-editor-container",style:{...V,...d&&{flex:1,minHeight:0}}}),$&&!l&&u&&(0,i.jsx)("div",{className:"superdoc-loading-container",children:u()}),l&&(0,i.jsx)("div",{className:"superdoc-error-container",children:"Failed to load editor. Check console for details."})]})});l.displayName="SuperDocEditor"},62153:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]])}
3,62652:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("pencil-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]])},63306:(e,t,n)=>{"use strict";n.d(t,{$t:()=>M,LN:()=>o,U3:()=>u,hs:()=>A,i5:()=>f,k_:()=>S,nh:()=>d});var r=n(42618),i=n(97841);let s=Object.create(null);class o{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new l(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=r.Ji.empty){let n=t.content.lastChild,i=null;for(let e=0;e<t.openEnd;e++)i=n,n=n.lastChild;let s=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:h}=o[l],u=e.mapping.slice(s);e.replaceRange(u.map(a.pos),u.map(h.pos),l?r.Ji.empty:t),0==l&&y(e,s,(n?n.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:s,$to:o}=r[i],l=e.mapping.slice(n),a=l.map(s.pos),h=l.map(o.pos);i?e.deleteRange(a,h):(e.replaceRangeWith(a,h,t),y(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new u(e):g(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?g(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):g(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}
3static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new f(e.node(0))}static atStart(e){return g(e,e,0,0,1)||new f(e)}static atEnd(e){return g(e,e,e.content.size,e.childCount,-1)||new f(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError("Invalid input for Selection.fromJSON");let n=s[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in s)throw RangeError("Duplicate use of selection JSON ID "+e);return s[e]=t,t.prototype.jsonID=e,t}getBookmark(){return u.between(this.$anchor,this.$head).getBookmark()}}o.prototype.visible=!0;class l{constructor(e,t){this.$from=e,this.$to=t}}let a=!1;function h(e){a||e.parent.inlineContent||(a=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class u extends o{constructor(e,t=e){h(e),h(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return o.near(n);let r=e.resolve(t.map(this.anchor));return new u(r.parent.inlineContent?r:n,n)}replace(e,t=r.Ji.empty){if(super.replace(e,t),t==r.Ji.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof u&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new c(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw RangeError("Invalid input for TextSelection.fromJSON");return new u(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if((!n||r)&&(n=r>=0?1:-1),!t.parent.inlineContent){let e=o.findFrom(t,n,!0)||o.findFrom(t,-n,!0);if(!e)return o.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r?e=t:(e=(o.findFrom(e,-n,!0)||o.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0&&(e=t)),new u(e,t)}}o.jsonID("text",u);class c{constructor(e,t){this.anchor=e,this.head=t}map(e){return new c(e.map(this.anchor),e.map(this.head))}resolve(e){return u.between(e.resolve(this.anchor),e.resolve(this.head))}}class d extends o{constructor(e){let t=e.nodeAfter;super(e,e.node(0).resolve(e.pos+t.nodeSize)),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),i=e.resolve(r);return n?o.near(i):new d(i)}content(){return new r.Ji(r.FK.from(this.node),0,0)}eq(e){return e instanceof d&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new p(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw RangeError("Invalid input for NodeSelection.fromJSON");return new d(e.resolve(t.anchor))}static create(e,t){return new d(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}d.prototype.visible=!1,o.jsonID("node",d);class p{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new c(n,n):new p(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&d.isSelectable(n)?new d(t):o.near(t)}}class f extends o{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=r.Ji.empty){if(t==r.Ji.empty){e.delete(0,e.doc.content.size);let t=o.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new f(e)}map(e){return new f(e)}eq(e){return e instanceof f}getBookmark(){return m}}o.jsonID("all",f);let m={map(){return this},resolve:e=>new f(e)};function g(e,t,n,r,i,s=!1){if(t.inlineContent)return u.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(r.isAtom){if(!s&&d.isSelectable(r))return d.create(e,n-(i<0?r.nodeSize:0))}else{let t=g(e,r,n+i,i<0?r.childCount:0,i,s);if(t)return t}n+=r.nodeSize*i}return null}function y(e,t,n){let r,s=e.steps.length-1;if(s<t)return;let l=e.steps[s];(l instanceof i.Ln||l instanceof i.Wg)&&(e.mapping.maps[s].forEach((e,t,n,i)=>{null==r&&(r=i)}),e.setSelection(o.near(e.doc.resolve(r),n)))}class v extends i.dL{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(1|this.updated)&-3,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return r.CU.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.CU.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),this.selection.empty||this.selection.to!=t+e.length||this.setSelection(o.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function w(e,t){return t&&e?e.bind(t):e}class b{constructor(e,t,n){this.name=e,this.init=w(t.init,n),this.apply=w(t.apply,n)}}let x=[new b("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new b("selection",{init:(e,t)=>
3e.selection||o.atStart(t.doc),apply:e=>e.selection}),new b("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new b("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class k{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new b(e.key,e.spec.state,e))})}}class M{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let o=this.config.plugins[s];if(o.spec.appendTransaction){let l=r?r[s].n:0,a=r?r[s].state:this,h=l<t.length&&o.spec.appendTransaction.call(o,l?t.slice(l):t,a,n);if(h&&n.filterTransaction(h,s)){if(h.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<s?{state:n,n:t.length}:{state:this,n:0})}t.push(h),n=n.applyInner(h),i=!0}r&&(r[s]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw RangeError("Applying a mismatched transaction");let t=new M(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let i=n[r];t[i.name]=i.apply(e,this[i.name],this,t)}return t}get tr(){return new v(this)}static create(e){let t=new k(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new M(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new k(this.schema,e.plugins),n=t.fields,r=new M(t);for(let t=0;t<n.length;t++){let i=n[t].name;r[i]=this.hasOwnProperty(i)?this[i]:n[t].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw RangeError("Required config field 'schema' missing");let i=new k(e.schema,e.plugins),s=new M(i);return i.fields.forEach(i=>{if("doc"==i.name)s.doc=r.bP.fromJSON(e.schema,t.doc);else if("selection"==i.name)s.selection=o.fromJSON(s.doc,t.selection);else if("storedMarks"==i.name)t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let r in n){let o=n[r],l=o.spec.state;if(o.key==i.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,r)){s[i.name]=l.fromJSON.call(o,e,t[r],s);return}}s[i.name]=i.init(e,s)}}),s}}class S{constructor(e){this.spec=e,this.props={},e.props&&function e(t,n,r){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(n):"handleDOMEvents"==i&&(s=e(s,n,{})),r[i]=s}return r}(e.props,this,this.props),this.key=e.key?e.key.key:E("plugin")}getState(e){return e[this.key]}}let C=Object.create(null);function E(e){return e in C?e+"$"+ ++C[e]:(C[e]=0,e+"$")}class A{constructor(e="key"){this.key=E(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}},64942:()=>{},66054:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("file-symlink",[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]])},67287:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("file-search",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"11.5",cy:"14.5",r:"2.5",key:"1bq0ko"}],["path",{d:"M13.3 16.3 15 18",key:"2quom7"}]])}
3,67528:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(68094),i=r.bP.create({name:"hardBreak",markdownTokenName:"br",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",(0,r.KV)(this.options.HTMLAttributes,e)]},renderText:()=>"\n",renderMarkdown:()=>`  
4`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:s}=this.options,{splittableMarks:o}=r.extensionManager,l=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&l&&s){let t=l.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}})},68381:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]])},73669:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]])},74800:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});var r=n(68094).bP.create({name:"text",group:"inline",parseMarkdown:e=>({type:"text",text:e.text||""}),renderMarkdown:e=>e.text||""})},75779:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]])},78423:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},79168:(e,t,n)=>{"use strict";n.d(t,{$B:()=>l,Sd:()=>s,T2:()=>o});var r=n(97841),i=n(42618);function s(e,t=null){return function(n,s){let{$from:o,$to:l}=n.selection,a=o.blockRange(l);if(!a)return!1;let h=s?n.tr:null;return!!function(e,t,n,s=null){let o=!1,l=t,a=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&0==t.startIndex){if(0==t.$from.index(t.depth-1))return!1;let e=a.resolve(t.start-2);l=new i.u$(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new i.u$(t.$from,a.resolve(t.$to.end(t.depth)),t.depth)),o=!0}let h=(0,r.oM)(l,n,s,t);return!!h&&(e&&function(e,t,n,s,o){let l=i.FK.empty;for(let e=n.length-1;e>=0;e--)l=i.FK.from(n[e].type.create(n[e].attrs,l));e.step(new r.Wg(t.start-2*!!s,t.end,t.start,t.end,new i.Ji(l,0,0),n.length,!0));let a=0;for(let e=0;e<n.length;e++)n[e].type==o&&(a=e+1);let h=n.length-a,u=t.start+n.length-2*!!s,c=t.parent;for(let n=t.startIndex,i=t.endIndex,s=!0;n<i;n++,s=!1)!s&&(0,r.zy)(e.doc,u,h)&&(e.split(u,h),u+=2*h),u+=c.child(n).nodeSize}(e,t,h,o,n),!0)}(h,a,e,t)&&(s&&s(h.scrollIntoView()),!0)}}function o(e){return function(t,n){let{$from:s,$to:o}=t.selection,l=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);return!!l&&(!n||(s.node(l.depth-1).type==e?function(e,t,n,s){let o=e.tr,l=s.end,a=s.$to.end(s.depth);l<a&&(o.step(new r.Wg(l-1,a,l,a,new i.Ji(i.FK.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new i.u$(o.doc.resolve(s.$from.pos),o.doc.resolve(a),s.depth));let h=(0,r.jP)(s);if(null==h)return!1;o.lift(s,h);let u=o.doc.resolve(o.mapping.map(l,-1)-1);return(0,r.n9)(o.doc,u.pos)&&u.nodeBefore.type==u.nodeAfter.type&&o.join(u.pos),t(o.scrollIntoView()),!0}(t,n,e,l):function(e,t,n){let s=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,r=n.startIndex;t>r;t--)e-=o.child(t).nodeSize,s.delete(e-1,e+1);let l=s.doc.resolve(n.start),a=l.nodeAfter;if(s.mapping.map(n.end)!=n.start+l.nodeAfter.nodeSize)return!1;let h=0==n.startIndex,u=n.endIndex==o.childCount,c=l.node(-1),d=l.index(-1);if(!c.canReplace(d+ +!h,d+1,a.content.append(u?i.FK.empty:i.FK.from(o))))return!1;let p=l.pos,f=p+a.nodeSize;return s.step(new r.Wg(p-!!h,f+ +!!u,p+1,f-1,new i.Ji((h?i.FK.empty:i.FK.from(o.copy(i.FK.empty))).append(u?i.FK.empty:i.FK.from(o.copy(i.FK.empty))),+!h,+!u),+!h)),t(s.scrollIntoView()),!0}(t,n,l)))}}function l(e){return function(t,n){let{$from:s,$to:o}=t.selection,l=s.blockRange(o,t=>t.childCount>0&&t.firstChild.type==e);if(!l)return!1;let a=l.startIndex;if(0==a)return!1;let h=l.parent,u=h.child(a-1);if(u.type!=e)return!1;
4if(n){let s=u.lastChild&&u.lastChild.type==h.type,o=i.FK.from(s?e.create():null),a=new i.Ji(i.FK.from(e.create(null,i.FK.from(h.type.create(null,o)))),s?3:1,0),c=l.start,d=l.end;n(t.tr.step(new r.Wg(c-(s?3:1),d,c,d,a,1,!0)).scrollIntoView())}return!0}}},80571:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]])},85361:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("pin-off",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]])},86336:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(68094);let i="&nbsp;";var s=r.bP.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",(0,r.KV)(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(1===n.length&&"image"===n[0].type)return t.parseChildren([n[0]]);let r=t.parseInline(n);return 1===n.length&&"text"===n[0].type&&(n[0].raw===i||n[0].text===i||"\xa0"===n[0].raw||"\xa0"===n[0].text)&&1===r.length&&"text"===r[0].type&&(r[0].text===i||"\xa0"===r[0].text)?t.createNode("paragraph",void 0,[]):t.createNode("paragraph",void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return"";let r=Array.isArray(e.content)?e.content:[];if(0===r.length){var s,o;let e=Array.isArray(null==n||null==(s=n.previousNode)?void 0:s.content)?n.previousNode.content:[];return(null==n||null==(o=n.previousNode)?void 0:o.type)==="paragraph"&&0===e.length?i:""}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}})},90497:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("gallery-vertical-end",[["path",{d:"M7 2h10",key:"nczekb"}],["path",{d:"M5 6h14",key:"u2x4p"}],["rect",{width:"18",height:"12",x:"3",y:"10",rx:"2",key:"l0tzu3"}]])},91633:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]])},94805:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("notebook-pen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"pqwjuv"}]])},95278:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("rotate-cw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]])},95506:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("file-pen",[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]])},97691:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]])},97841:(e,t,n)=>{"use strict";n.d(t,{$L:()=>R,Ln:()=>m,N0:()=>A,Um:()=>O,Wg:()=>g,X9:()=>o,Ys:()=>d,dL:()=>q,jP:()=>w,n9:()=>C,oM:()=>b,zy:()=>S});var r=n(42618);class i{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class s{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&s.empty)return s.empty}recover(e){let t=0,n=65535&e;if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+(e-(65535&e))/65536}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,s=this.inverted?2:1,o=this.inverted?1:2;
4for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let h=this.ranges[l+s],u=this.ranges[l+o],c=a+h;if(e<=c){let s=h?e==a?-1:e==c?1:t:t,o=a+r+(s<0?0:u);if(n)return o;let d=e==(t<0?a:c)?null:l/3+(e-a)*65536,p=e==a?2:e==c?1:4;return(t<0?e!=a:e!=c)&&(p|=8),new i(o,p,d)}r+=u-h}return n?e+r:new i(e+r,0,null)}touches(e,t){let n=0,r=65535&t,i=this.inverted?2:1,s=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let l=this.ranges[t+i];if(e<=o+l&&t==3*r)return!0;n+=this.ranges[t+s]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let s=this.ranges[r],o=s-(this.inverted?i:0),l=s+(this.inverted?0:i),a=this.ranges[r+t],h=this.ranges[r+n];e(o,o+a,l,l+h),i+=h-a}}invert(){return new s(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?s.empty:new s(e<0?[0,-e,0]:[0,0,e])}}s.empty=new s([]);class o{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new o(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),null!=t&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new o;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(null!=i.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new i(e,r,null)}}let l=Object.create(null);class a{getMap(){return s.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError("Invalid input for Step.fromJSON");let n=l[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in l)throw RangeError("Duplicate use of step JSON ID "+e);return l[e]=t,t.prototype.jsonID=e,t}}class h{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new h(e,null)}static fail(e){return new h(null,e)}static fromReplace(e,t,n,i){try{return h.ok(e.replace(t,n,i))}catch(e){if(e instanceof r.vI)return h.fail(e.message);throw e}}}function u(e,t,n){let i=[];for(let r=0;r<e.childCount;r++){let s=e.child(r);s.content.size&&(s=s.copy(u(s.content,t,s))),s.isInline&&(s=t(s,n,r)),i.push(s)}return r.FK.fromArray(i)}class c extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),i=n.node(n.sharedDepth(this.to)),s=new r.Ji(u(t.content,(e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e,i),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,s)}invert(){return new d(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new c(t.pos,n.pos,this.mark)}merge(e){return e instanceof c&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new c(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for AddMarkStep.fromJSON");return new c(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("addMark",c);class d extends a{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}
vendor: 16,726 bytes, line 4
4apply(e){let t=e.slice(this.from,this.to),n=new r.Ji(u(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return h.fromReplace(e,this.from,this.to,n)}invert(){return new c(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new d(t.pos,n.pos,this.mark)}merge(e){return e instanceof d&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new d(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for RemoveMarkStep.fromJSON");return new d(t.from,t.to,e.markFromJSON(t.mark))}}a.jsonID("removeMark",d);class p extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new p(this.pos,t.marks[n]);return new p(this.pos,this.mark)}}return new f(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new p(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new p(t.pos,e.markFromJSON(t.mark))}}a.jsonID("addNodeMark",p);class f extends a{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new p(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new f(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new f(t.pos,e.markFromJSON(t.mark))}}a.jsonID("removeNodeMark",f);class m extends a{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&y(e,this.from,this.to)?h.fail("Structure replace would overwrite content"):h.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new s([this.from,this.to-this.from,this.slice.size])}invert(e){return new m(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.to,-1),n=this.from==this.to&&m.MAP_BIAS<0?t:e.mapResult(this.from,1);return n.deletedAcross&&t.deletedAcross?null:new m(n.pos,Math.max(n.pos,t.pos),this.slice,this.structure)}merge(e){if(!(e instanceof m)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart)if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;else{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new m(e.from,this.to,t,this.structure)}{let t=this.slice.size+e.slice.size==0?r.Ji.empty:new r.Ji(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new m(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw RangeError("Invalid input for ReplaceStep.fromJSON");return new m(t.from,t.to,r.Ji.fromJSON(e,t.slice),!!t.structure)}}m.MAP_BIAS=1,a.jsonID("replace",m);class g extends a{constructor(e,t,n,r,i,s,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=s,this.structure=o}apply(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return h.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return h.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?h.fromReplace(e,this.from,this.to,n):h.fail("Content does not fit in gap")}getMap(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new g(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||i>n.pos?null:new g(t.pos,n.pos,r,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new g(t.from,t.to,t.gapFrom,t.gapTo,r.Ji.fromJSON(e,t.slice),t.insert,!!t.structure)}}function y(e,t,n){let r=e.resolve(t),i=n-t,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let e=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function v(e,t,n,i=n.contentMatch,s=!0){let o=e.doc.nodeAt(t),l=[],a=t+1;for(let t=0;t<o.childCount;t++){let h=o.child(t),u=a+h.nodeSize,c=i.matchType(h.type);if(c){i=c;for(let t=0;t<h.marks.length;t++)n.allowsMarkType(h.marks[t].type)||e.step(new d(a,u,h.marks[t]));if(s&&h.isText&&"pre"!=n.whitespace){let e,t=/\r?\n|\r/g,i;for(;e=t.exec(h.text);)i||(i=new r.Ji(r.FK.from(n.schema.text(" ",n.allowedMarks(h.marks))),0,0)),l.push(new m(a+e.index,a+e.index+e[0].length,i))}}else l.push(new m(a,u,r.Ji.empty));a=u}if(!i.validEnd){let t=i.fillBefore(r.FK.empty,!0);e.replace(a,a,new r.Ji(t,0,0))}for(let t=l.length-1;t>=0;t--)e.step(l[t])}function w(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let s=e.$from.node(n),o=e.$from.index(n)+r,l=e.$to.indexAfter(n)-i;if(n<e.depth&&s.canReplace(o,l,t))return n;if(0==n||s.type.spec.isolating||!((0==o||s.canReplace(o,s.childCount))&&(l==s.childCount||s.canReplace(0,l))))break;o&&(r=1),l<s.childCount&&(i=1)}return null}function b(e,t,n=null,r=e){let i=function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.contentMatchAt(r).findWrapping(t);if(!s)return null;let o=s.length?s[0]:t;return n.canReplaceWith(r,i,o)?s:null}(e,t),s=i&&function(e,t){let{parent:n,startIndex:r,endIndex:i}=e,s=n.child(r),o=t.contentMatch.findWrapping(s.type);if(!o)return null;let l=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;l&&e<i;e++)l=l.matchType(n.child(e).type);return l&&l.validEnd?o:null}(r,t);return s?i.map(x).concat({type:t,attrs:n}).concat(s.map(x)):null}function x(e){return{type:e,attrs:null}}function k(e,t,n,r){t.forEach((i,s)=>{if(i.isText){let o,l=/\r?\n|\r/g;for(;o=l.exec(i.text);){let i=e.mapping.slice(r).map(n+1+s+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function M(e,t,n,r){t.forEach((i,s)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+s);e.replaceWith(i,i+1,t.type.schema.text("\n"))}})}function S(e,t,n=1,r){let i=e.resolve(t),s=i.depth-n,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>s;e--,t--){let n=i.node(e),s=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(s,n.childCount),l=r&&r[t+1];l&&(o=o.replaceChild(0,l.type.create(l.attrs)));let a=r&&r[t]||n;if(!n.canReplace(s+1,n.childCount)||!a.type.validContent(o))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function C(e,t){let n=e.resolve(t),r=n.index();return E(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function E(e,t){return!!(e&&t&&!e.isLeaf&&function(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let s=t.child(i),o=s.type==r?e.type.schema.nodes.text:s.type;if(!(n=n.matchType(o))||!e.type.allowsMarks(s.marks))return!1}return n.validEnd}(e,t))}function A(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,s,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(e+1),o++,s=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),s=r.node(e+1)),i&&!i.isTextblock&&E(i,s)&&r.node(e).canReplace(o,o+1))return t;if(0==e)break;t=n<0?r.before(e):r.after(e)}}function O(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,s=r.index(t)+ +(n>0),o=r.node(t),l=!1;if(1==e)l=o.canReplace(s,s,i);else{let e=o.contentMatchAt(s).findWrapping(i.firstChild.type);l=e&&o.canReplaceWith(s,s,e[0])}if(l)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function R(e,t,n=t,i=r.Ji.empty){if(t==n&&!i.size)return null;let s=e.resolve(t),o=e.resolve(n);return z(s,o,i)?new m(t,n,i):new T(s,o,i).fit()}function z(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}a.jsonID("replaceAround",g);class T{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=r.FK.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=r.FK.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,i=this.close(e<0?this.$to:n.doc.resolve(e));if(!i)return null;let s=this.placed,o=n.depth,l=i.depth;for(;o&&l&&1==s.childCount;)s=s.firstChild.content,o--,l--;let a=new r.Ji(s,o,l);return e>-1?new g(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new m(n.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e=null,i=(n?(e=D(this.unplaced.content,n-1).firstChild).content:this.unplaced.content).firstChild;for(let s=this.depth;s>=0;s--){let{type:o,match:l}=this.frontier[s],a,h=null;if(1==t&&(i?l.matchType(i.type)||(h=l.fillBefore(r.FK.from(i),!1)):e&&o.compatibleContent(e.type)))return{sliceDepth:n,frontierDepth:s,parent:e,inject:h};if(2==t&&i&&(a=l.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:s,parent:e,wrap:a};if(e&&l.matchType(e.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=D(e,t);return!!i.childCount&&!i.firstChild.isLeaf&&(this.unplaced=new r.Ji(e,t+1,Math.max(n,i.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,i=D(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new r.Ji(I(e,t-1,1),t-1,s?t-1:n)}else this.unplaced=new r.Ji(I(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let e=0;e<s.length;e++)this.openFrontierNode(s[e]);let o=this.unplaced,l=n?n.content:o.content,a=o.openStart-e,h=0,u=[],{match:c,type:d}=this.frontier[t];if(i){for(let e=0;e<i.childCount;e++)u.push(i.child(e));c=c.matchFragment(i)}let p=l.size+e-(o.content.size-o.openEnd);for(;h<l.childCount;){let e=l.child(h),t=c.matchType(e.type);if(!t)break;(++h>1||0==a||e.content.size)&&(c=t,u.push(function e(t,n,i){if(n<=0)return t;let s=t.content;return n>1&&(s=s.replaceChild(0,e(s.firstChild,n-1,1==s.childCount?i-1:0))),n>0&&(s=t.type.contentMatch.fillBefore(s).append(s),i<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(r.FK.empty,!0)))),t.copy(s)}(e.mark(d.allowedMarks(e.marks)),1==h?a:0,h==l.childCount?p:-1)))}let f=h==l.childCount;f||(p=-1),this.placed=N(this.placed,t,r.FK.from(u)),this.frontier[t].match=c,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=f?0==e?r.Ji.empty:new r.Ji(I(o.content,e-1,1),e-1,p<0?o.openEnd:e-1):new r.Ji(I(o.content,e,h),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return -1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!P(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return -1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){n:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=P(e,t,r,n,i);if(s){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=P(e,n,r,t,!0);if(!i||i.childCount)continue n}return{depth:t,fit:s,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=N(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=N(this.placed,this.depth,r.FK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(r.FK.empty,!0);e.childCount&&(this.placed=N(this.placed,this.frontier.length,e))}}function I(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(I(e.firstChild.content,t-1,n)))}function N(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(N(e.lastChild.content,t-1,n)))}function D(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function P(e,t,n,r,i){let s=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==s.childCount&&!n.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,s.content,o)?l:null}function $(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}class F extends a{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return h.fail("No node at attribute step's position");let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let i=t.type.create(n,null,t.marks);return h.fromReplace(e,this.pos,this.pos+1,new r.Ji(r.FK.from(i),0,+!t.isLeaf))}getMap(){return s.empty}invert(e){return new F(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new F(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw RangeError("Invalid input for AttrStep.fromJSON");return new F(t.pos,t.attr,t.value)}}a.jsonID("attr",F);
4class j extends a{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return h.ok(n)}getMap(){return s.empty}invert(e){return new j(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw RangeError("Invalid input for DocAttrStep.fromJSON");return new j(t.attr,t.value)}}a.jsonID("docAttr",j);let L=class extends Error{};(L=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n}).prototype=Object.create(Error.prototype),L.prototype.constructor=L,L.prototype.name="TransformError";class q{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new o}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new L(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,s)=>{e=Math.min(e,i),t=Math.max(t,s)})}return 1e9==e?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=r.Ji.empty){let i=R(this.doc,e,t,n);return i&&this.step(i),this}replaceWith(e,t,n){return this.replace(e,t,new r.Ji(r.FK.from(n),0,0))}delete(e,t){return this.replace(e,t,r.Ji.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return!function(e,t,n,i){if(!i.size)return e.deleteRange(t,n);let s=e.doc.resolve(t),o=e.doc.resolve(n);if(z(s,o,i))return e.step(new m(t,n,i));let l=$(s,o);0==l[l.length-1]&&l.pop();let a=-(s.depth+1);l.unshift(a);for(let e=s.depth,t=s.pos-1;e>0;e--,t--){let n=s.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;l.indexOf(e)>-1?a=e:s.before(e)==t&&l.splice(1,0,-e)}let h=l.indexOf(a),u=[],c=i.openStart;for(let e=i.content,t=0;;t++){let n=e.firstChild;if(u.push(n),t==i.openStart)break;e=n.content}for(let e=c-1;e>=0;e--){var d;let t=u[e],n=(d=t.type).spec.defining||d.spec.definingForContent;if(n&&!t.sameMarkup(s.node(Math.abs(a)-1)))c=e;else if(n||!t.type.isTextblock)break}for(let t=i.openStart;t>=0;t--){let a=(t+c+1)%(i.openStart+1),d=u[a];if(d)for(let t=0;t<l.length;t++){let u=l[(t+h)%l.length],c=!0;u<0&&(c=!1,u=-u);let p=s.node(u-1),f=s.index(u-1);if(p.canReplaceWith(f,f,d.type,d.marks))return e.replace(s.before(u),c?o.after(u):n,new r.Ji(function e(t,n,i,s,o){if(n<i){let r=t.firstChild;t=t.replaceChild(0,r.copy(e(r.content,n+1,i,s,r)))}if(n>s){let e=o.contentMatchAt(0),n=e.fillBefore(t).append(t);t=n.append(e.matchFragment(n).fillBefore(r.FK.empty,!0))}return t}(i.content,0,i.openStart,a),a,i.openEnd))}}let p=e.steps.length;for(let r=l.length-1;r>=0&&(e.replace(t,n,i),!(e.steps.length>p));r--){let e=l[r];e<0||(t=s.before(e),n=o.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){var i=e,s=t;if(!n.isInline&&i==s&&this.doc.resolve(i).parent.content.size){let e=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)break}return null}(this.doc,i,n.type);null!=e&&(i=s=e)}return this.replaceRange(i,s,new r.Ji(r.FK.from(n),0,0)),this}deleteRange(e,t){return!function(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&0==r.parentOffset&&0==i.parentOffset){let s=r.sharedDepth(n),o=!1;for(let e=r.depth;e>s;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>s;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let s=$(r,i);for(let t=0;t<s.length;t++){let n=s[t],o=t==s.length-1;if(o&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let s=1;s<=r.depth&&s<=i.depth;s++)if(t-r.start(s)==r.depth-s&&n>r.end(s)&&i.end(s)-n!=i.depth-s&&r.start(s-1)==i.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),i.index(s-1)))return e.delete(r.before(s),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return!function(e,t,n){let{$from:i,$to:s,depth:o}=t,l=i.before(o+1),a=s.after(o+1),h=l,u=a,c=r.FK.empty,d=0;for(let e=o,t=!1;e>n;e--)t||i.index(e)>
40?(t=!0,c=r.FK.from(i.node(e).copy(c)),d++):h--;let p=r.FK.empty,f=0;for(let e=o,t=!1;e>n;e--)t||s.after(e+1)<s.end(e)?(t=!0,p=r.FK.from(s.node(e).copy(p)),f++):u++;e.step(new g(h,u,l,a,new r.Ji(c.append(p),d,f),c.size-d,!0))}(this,e,t),this}join(e,t=1){return!function(e,t,n){let i=null,{linebreakReplacement:s}=e.doc.type.schema,o=e.doc.resolve(t-n),l=o.node().type;if(s&&l.inlineContent){let e="pre"==l.whitespace,t=!!l.contentMatch.matchType(s);e&&!t?i=!1:!e&&t&&(i=!0)}let a=e.steps.length;if(!1===i){let r=e.doc.resolve(t+n);M(e,r.node(),r.before(),a)}l.inlineContent&&v(e,t+n-1,l,o.node().contentMatchAt(o.index()),null==i);let h=e.mapping.slice(a),u=h.map(t-n);if(e.step(new m(u,h.map(t+n,-1),r.Ji.empty,!0)),!0===i){let t=e.doc.resolve(u);k(e,t.node(),t.before(),e.steps.length)}}(this,e,t),this}wrap(e,t){return!function(e,t,n){let i=r.FK.empty;for(let e=n.length-1;e>=0;e--){if(i.size){let t=n[e].type.contentMatch.matchFragment(i);if(!t||!t.validEnd)throw RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=r.FK.from(n[e].type.create(n[e].attrs,i))}let s=t.start,o=t.end;e.step(new g(s,o,s,o,new r.Ji(i,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,i=null){var s=this;if(!n.isTextblock)throw RangeError("Type given to setBlockType should be a textblock");let o=s.steps.length;return s.doc.nodesBetween(e,t,(e,t)=>{var l,a,h;let u,c,d="function"==typeof i?i(e):i;if(e.isTextblock&&!e.hasMarkup(n,d)&&(l=s.doc,a=s.mapping.slice(o).map(t),h=n,c=(u=l.resolve(a)).index(),u.parent.canReplaceWith(c,c+1,h))){let i=null;if(n.schema.linebreakReplacement){let e="pre"==n.whitespace,t=!!n.contentMatch.matchType(n.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&M(s,e,t,o),v(s,s.mapping.slice(o).map(t,1),n,void 0,null===i);let l=s.mapping.slice(o),a=l.map(t,1),h=l.map(t+e.nodeSize,1);return s.step(new g(a,h,a+1,h-1,new r.Ji(r.FK.from(n.create(d,null,e.marks)),0,0),1,!0)),!0===i&&k(s,e,t,o),!1}}),this}setNodeMarkup(e,t,n=null,i){return!function(e,t,n,i,s){let o=e.doc.nodeAt(t);if(!o)throw RangeError("No node at given position");n||(n=o.type);let l=n.create(i,null,s||o.marks);if(o.isLeaf)return e.replaceWith(t,t+o.nodeSize,l);if(!n.validContent(o.content))throw RangeError("Invalid content for node type "+n.name);e.step(new g(t,t+o.nodeSize,t+1,t+o.nodeSize-1,new r.Ji(r.FK.from(l),0,0),1,!0))}(this,e,t,n,i),this}setNodeAttribute(e,t,n){return this.step(new F(e,t,n)),this}setDocAttribute(e,t){return this.step(new j(e,t)),this}addNodeMark(e,t){return this.step(new p(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError("No node at position "+e);if(t instanceof r.CU)t.isInSet(n.marks)&&this.step(new f(e,t));else{let r=n.marks,i,s=[];for(;i=t.isInSet(r);)s.push(new f(e,i)),r=i.removeFromSet(r);for(let e=s.length-1;e>=0;e--)this.step(s[e])}return this}split(e,t=1,n){return!function(e,t,n=1,i){let s=e.doc.resolve(t),o=r.FK.empty,l=r.FK.empty;for(let e=s.depth,t=s.depth-n,a=n-1;e>t;e--,a--){o=r.FK.from(s.node(e).copy(o));let t=i&&i[a];l=r.FK.from(t?t.type.create(t.attrs,l):s.node(e).copy(l))}e.step(new m(t,t,new r.Ji(o.append(l),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){var r;let i,s,o,l;return r=this,o=[],l=[],r.doc.nodesBetween(e,t,(r,a,h)=>{if(!r.isInline)return;let u=r.marks;if(!n.isInSet(u)&&h.type.allowsMarkType(n.type)){let h=Math.max(a,e),p=Math.min(a+r.nodeSize,t),f=n.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(f)||(i&&i.to==h&&i.mark.eq(u[e])?i.to=p:o.push(i=new d(h,p,u[e])));s&&s.to==h?s.to=p:l.push(s=new c(h,p,n))}}),o.forEach(e=>r.step(e)),l.forEach(e=>r.step(e)),this}removeMark(e,t,n){var i;let s,o;return i=this,s=[],o=0,i.doc.nodesBetween(e,t,(i,l)=>{if(!i.isInline)return;o++;let a=null;if(n instanceof r.sX){let e=i.marks,t;for(;t=n.isInSet(e);)(a||(a=[])).push(t),e=t.removeFromSet(e)}else n?n.isInSet(i.marks)&&(a=[n]):a=i.marks;if(a&&a.length){let n=Math.min(l+i.nodeSize,t);for(let t=0;t<a.length;t++){let r=a[t],i;for(let e=0;e<s.length;e++){let t=s[e];t.step==o-1&&r.eq(s[e].style)&&(i=t)}i?(i.to=n,i.step=o):s.push({style:r,from:Math.max(l,e),to:n,step:o})}}}
4),s.forEach(e=>i.step(new d(e.from,e.to,e.style))),this}clearIncompatible(e,t,n){return v(this,e,t,n),this}}},98109:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]])},99351:(e,t,n)=>{"use strict";n.d(t,{KV:()=>C});var r=n(28367),i=n(66919);function s(e){return e-Math.floor(e)}function o(e,t){let n=Math.floor(e),r=Math.floor(t),i=e-n,s=t-r;i=i*i*(3-2*i),s=s*s*(3-2*s);let o=l(n,r),a=l(n+1,r),h=l(n,r+1);return o+(a-o)*i+(h-o)*s+(o-a-h+l(n+1,r+1))*i*s}function l(e,t){let n=43758.5453*Math.sin(12.9898*e+78.233*t);return n-Math.floor(n)}function a(e,t){let n=1-2*(e+.5)/t,r=Math.sqrt(1-n*n),i=Math.PI*(3-Math.sqrt(5))*e;return[r*Math.cos(i),n,r*Math.sin(i)]}function h(e,t,n,r,i){let s=Math.sin(t),o=Math.cos(t),l=Math.sin(e),a=Math.cos(e);return(e,t,h)=>{let u=-e*l+h*a;return[n+(e*a+h*l)*i,r-(t*o-u*s)*i,t*s+u*o]}}function u(e,t,n,r=.3){for(let i of(t.sort((e,t)=>e.z-t.z),t)){let t=i.a??1;if(t<.02)continue;let s=Math.min(1,Math.max(0,i.white)),o=Math.round((n?1-s:s)*255);e.fillStyle=`rgba(${o},${o},${o},${t})`,e.beginPath(),e.arc(i.x,i.y,Math.max(r,i.r),0,2*Math.PI),e.fill()}}function c(e,t){return(e/300)**t}function d(e){let t=e.length,n=[],r=0;for(let i=0;i<t;i++){let s=e[i],o=e[(i+1)%t],l=Math.hypot(o[0]-s[0],o[1]-s[1]);n.push(l),r+=l}return i=>{let s=i*r,o=0;for(;s>n[o]&&o<t-1;)s-=n[o],o++;let l=e[o],a=e[(o+1)%t],h=n[o]?Math.min(1,s/n[o]):0;return[l[0]+(a[0]-l[0])*h,l[1]+(a[1]-l[1])*h]}}let p=[e=>{let t=-Math.PI/2+2*e*Math.PI;return[.24*Math.cos(t),.24*Math.sin(t)]},d([[0,-.26],[.24,.16],[-.24,.16]]),d([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]])],f=(e,t,n,r,i)=>{let s=t/2*.78,o=i.spin??1,l=h(.1*n*o,.3,t/2,t/2,1),d=c(t,i.rsPow??.6),p=[],f=i.ghostN??150;for(let e=0;e<f;e++){let t=a(e,f),[n,r,i]=l(t[0]*s,t[1]*s,t[2]*s),o=(i/s+1)/2;p.push({x:n,y:r,z:i,r:.8*d,white:.78,a:.1+.22*o})}let m=.24*n*o,g=i.faceOn?-.3:.55+.3*Math.sin(.18*n)*o,y=Math.cos(m),v=Math.sin(m),w=-v*Math.sin(g),b=Math.cos(g),x=y*Math.sin(g),k=0*x-v*b,M=v*w-y*x,S=y*b-0*w,C=.23*(i.wobMul??1),E=i.faceOn?s/(1+.85*C):s,A=i.lanes??5,O=i.segs??88,R=Math.max(1,Math.round(A*(i.bandMul??1)));for(let e=0;e<R;e++){let t=(e-(R-1)/2)*.075,r=Math.abs(e-(R-1)/2)/Math.max(1,(R-1)/2);for(let o=0;o<O;o++){let a=o/O*2*Math.PI,h=(.16*Math.sin(3*a-1.7*n+.22*e)+.07*Math.sin(5*a+1.1*n))*(i.wobMul??1),u=i.faceOn?1+h:1,c=i.faceOn?t:t+h,f=y*Math.cos(a)+w*Math.sin(a)+k*c,m=0*Math.cos(a)+b*Math.sin(a)+M*c,g=v*Math.cos(a)+x*Math.sin(a)+S*c,C=Math.sqrt(f*f+m*m+g*g),A=E*u,[R,z,T]=l(f/C*A,m/C*A,g/C*A),I=(T/s+1)/2;p.push({x:R,y:z,z:T,r:((i.rBase??1.1)+(i.rDepth??1.7)*I)*(1-.25*r)*d,white:.52-.44*I+.18*r,a:.4+.6*I})}}u(e,p,r,i.rMin)},m={orbits:(e,t,n,r,i)=>{let s=t/2*.82,o=h(.12*n,.3,t/2,t/2,1),a=c(t,i.rsPow??.6),d=[],p=i.orbitN??12,f=i.ghostN??40,m=i.particles??3;for(let e=0;e<p;e++){let t=l(e,1.7),r=l(e,5.2),h=l(e,8.9),u=s*(.45+.52*t),c=2*t*Math.PI,p=Math.acos(2*r-1),g=Math.sin(p)*Math.cos(c),y=Math.cos(p),v=Math.sin(p)*Math.sin(c),w=-y,b=g,x=Math.max(1e-6,Math.sqrt(w*w+b*b));w/=x;let k=0*y-v*(b/=x),M=v*w-0*g,S=g*b-y*w,C=(.25+.55*h)*(h>.5?1:-1);for(let e=0;e<f;e++){let t=e/f*2*Math.PI,[n,r,s]=o((w*Math.cos(t)+k*Math.sin(t))*u,(b*Math.cos(t)+M*Math.sin(t))*u,(0*Math.cos(t)+S*Math.sin(t))*u),l=(s/u+1)/2;d.push({x:n,y:r,z:s,r:(i.ghostR??.9)*a,white:.72,a:(i.ghostA??.5)*(.4+.6*l)})}for(let e=0;e<m;e++){let t=n*C+e/m*2*Math.PI+6*r,[s,l,h]=o((w*Math.cos(t)+k*Math.sin(t))*u,(b*Math.cos(t)+M*Math.sin(t))*u,(0*Math.cos(t)+S*Math.sin(t))*u),c=(h/u+1)/2;d.push({x:s,y:l,z:h,r:((i.partR??1.2)+(i.partRDepth??1.6)*c)*a,white:.3-.22*c})}}u(e,d,r,i.rMin)},globe:(e,t,n,r,i)=>{let s=.4+.06*Math.sin(.35*n),o=h(.5*n,s,t/2,t/2,t/2*.82),l=n*(.5+1.2*(i.scanMul??1)),a=c(t,i.rsPow??.6),d=i.dimBase??1,p=[],f=i.latRings??17,m=i.lonDensity??44;for(let e=0;e<=f;e++){let t=-Math.PI/2+e/f*Math.PI,r=Math.cos(t),s=Math.sin(t),h=Math.max(1,Math.round(Math.abs(r)*m));for(let e=0;e<h;e++){let t=e/h*2*Math.PI,[u,c,f]=o(r*Math.cos(t),s,r*Math.sin(t)),m=(f+1)/2,g=function(e,t){return Math.atan2(Math.sin(e-t),Math.cos(e-t))}(t+.5*n,l),y=Math.exp(-(g*g)/.18)*Math.max(0,f);p.push({x:u,y:c,z:f,r:((i.rBase??.6)+(i.rDepth??1.7)*m+(i.rBoost??1
4)*y)*a,white:(i.inkFar??.62)-(i.inkSpan??.54)*m,a:d+(1-d)*Math.min(1,y)})}}u(e,p,r,i.rMin)},rubik:(e,t,n,r,i)=>{let s=h(.55*n,.35+.1*Math.sin(.9*n),t/2,t/2,t/2*.82),o=c(t,i.rsPow??.6),a=i.moveCount??14,d=function(e){let t=[];for(let n=0;n<e;n++){let e=Math.min(2,Math.floor(3*l(n,2.3))),r=-1+.5*Math.min(3,Math.floor(4*l(n,5.9))),i=.5>l(n,7.7)?1:-1;t.push({axis:e,lo:r,hi:r+.5,ang:i*Math.PI/2})}return t}(a),p=function(e,t,n,r){let i=e%(2*t*.42+1.2),s=Array(t).fill(0),o=-1;if(i<2*t*.42){let e=Math.floor(i/n),r=1-(1-Math.min(1,(i-e*n)/n/.7))**3;if(e<t){for(let t=0;t<e;t++)s[t]=1;s[e]=r,o=e}else{let n=2*t-1-e;for(let e=0;e<n;e++)s[e]=1;s[n]=1-r,o=n}}return{amount:s,active:o}}(n,a,.42,0),f=[],m=i.latRings??15,g=i.lonDensity??40;for(let e=0;e<=m;e++){let t=-Math.PI/2+e/m*Math.PI,n=Math.cos(t),r=Math.sin(t),l=Math.max(1,Math.round(Math.abs(n)*g));for(let e=0;e<l;e++){let t=e/l*2*Math.PI,[a,h,u,c]=function(e,t,n){let[r,i,s]=e,o=!1;for(let e=0;e<t.length;e++){if(n.amount[e]<=0)continue;let l=t[e],a=0===l.axis?r:1===l.axis?i:s;if(a<l.lo||a>=l.hi)continue;e===n.active&&(o=!0);let h=l.ang*n.amount[e],u=Math.cos(h),c=Math.sin(h);if(0===l.axis){let e=i*u-s*c;s=i*c+s*u,i=e}else if(1===l.axis){let e=r*u+s*c;s=-r*c+s*u,r=e}else{let e=r*u-i*c;i=r*c+i*u,r=e}}return[r,i,s,o]}([n*Math.cos(t),r,n*Math.sin(t)],d,p),[m,g,y]=s(a,h,u),v=(y+1)/2;f.push({x:m,y:g,z:y,r:((i.rBase??.6)+(i.rDepth??1.7)*v+(c?i.rActive??.3:0))*o,white:(i.inkFar??.62)-(i.inkSpan??.54)*v-.14*!!c})}}u(e,f,r,i.rMin)},wave:(e,t,n,r,i)=>{let s=t/2*.874,o=h(.18*n,.38,t/2,t/2,1),l=c(t,i.rsPow??.6),a=[],d=i.rings??15,p=i.lonDensity??40;for(let e=0;e<=d;e++){let t=-Math.PI/2+e/d*Math.PI,r=Math.cos(t),h=Math.sin(t),u=.62*Math.sin(2.1*n-.52*e)+.38*Math.sin(1.27*n+.83*e),c=s*(.88+.105*u),f=Math.max(1,Math.round(Math.abs(r)*p));for(let e=0;e<f;e++){let t=e/f*2*Math.PI,[n,d,p]=o(r*Math.cos(t)*c,h*c,r*Math.sin(t)*c),m=(p/s+1)/2,g=Math.max(0,u);a.push({x:n,y:d,z:p,r:((i.rBase??.6)+(i.rDepth??1.7)*m)*(1+.4*g)*l,white:.66-.56*m-.1*g})}}u(e,a,r,i.rMin)},web:(e,t,n,r,i)=>{let d=t/2*.8*(i.spread??1),p=h(.12*n,.32,t/2,t/2,d),f=c(t,i.rsPow??.6),m=i.nodeN??30,g=i.thr??.72,y=i.nodeR??1.4,v=i.nodeRDepth??1.8,w=[];for(let e=0;e<m;e++){let t=a(e,m),r=t[0]+.3*(o(.31*e+9,.24*n)-.5)*2,i=t[1]+.3*(o(.53*e+27,.21*n)-.5)*2,s=t[2]+.3*(o(.77*e+55,.27*n)-.5)*2,l=Math.sqrt(r*r+i*i+s*s);w.push([r/l,i/l,s/l])}let b=[],x=[];for(let e=0;e<m;e++)for(let t=e+1;t<m;t++){let n=w[e][0]-w[t][0],r=w[e][1]-w[t][1],s=w[e][2]-w[t][2],o=Math.sqrt(n*n+r*r+s*s);if(o>=g)continue;let[l,a,h]=p(w[e][0],w[e][1],w[e][2]),[u,c,d]=p(w[t][0],w[t][1],w[t][2]),m=((h+d)/2+1)/2;
4b.push({x1:l,y1:a,x2:u,y2:c,white:.42,a:(1-o/g)*(.3+.55*m),w:Math.max(.6,(i.lineW??.8)*f)})}for(let e=0;e<m;e++){let[t,r,i]=p(w[e][0],w[e][1],w[e][2]),s=(i+1)/2,o=1+.25*Math.sin(1.4*n+2.7*e);x.push({x:t,y:r,z:i,r:(y+v*s)*o*f,white:.55-.45*s})}let k=i.signals??5;for(let e=0;e<k;e++){var M,S,C;let t=Math.floor(.55*n+7.31*e),r=Math.floor(l(t,3.1*e+1.7)*m),i=Math.floor(l(t,5.7*e+4.2)*m);if(r===i)continue;let o=s(.55*n+7.31*e),a=(M=w[r][0],M+(w[i][0]-M)*o),h=(S=w[r][1],S+(w[i][1]-S)*o),u=(C=w[r][2],C+(w[i][2]-C)*o),c=Math.max(1e-6,Math.sqrt(a*a+h*h+u*u)),[d,g,b]=p(a/c,h/c,u/c),k=(b+1)/2;x.push({x:d,y:g,z:b,r:(1.5*y+v*k)*f,white:.05,a:.5+.5*k})}(function(e,t,n){for(let r of t){let t=r.a??1;if(t<.02)continue;let i=Math.min(1,Math.max(0,r.white)),s=Math.round((n?1-i:i)*255);e.strokeStyle=`rgba(${s},${s},${s},${t})`,e.lineWidth=r.w,e.beginPath(),e.moveTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.stroke()}})(e,b,r),u(e,x,r,i.rMin)},braid:(e,t,n,r,i)=>{let o=t/2*.76,l=h(.4*n,.3,t/2,t/2,1),d=c(t,i.rsPow??.6),p=[],f=i.ghostN??150;for(let e=0;e<f;e++){let t=a(e,f),[n,r,i]=l(t[0]*o,t[1]*o,t[2]*o),s=(i/o+1)/2;p.push({x:n,y:r,z:i,r:.8*d,white:.78,a:.1+.22*s})}let m=i.strandN??52,g=i.turns??3;for(let e=0;e<3;e++){let t=e/3*2*Math.PI;for(let e=0;e<m;e++){let r=(2*s(e/m+.045*n)-1)*.96,a=Math.sqrt(Math.max(0,1-r*r)),h=Math.min(1,(1-Math.abs(r))/.1),u=r*Math.PI*g+t,c=1+.075*Math.sin(r*Math.PI*g*2+2*t+.8*n),f=a*o*c,[y,v,w]=l(Math.cos(u)*f,r*o*c,Math.sin(u)*f),b=(w/o+1)/2;p.push({x:y,y:v,z:w,r:((i.rBase??1.2)+(i.rDepth??1.8)*b)*d,white:.55-.45*b,a:h*(.45+.55*b)})}}u(e,p,r,i.rMin)},ribbon:f,ring:f,morph:(e,t,n,r,i)=>{var s;let o=p.length,l=n%(2.3*o),a=Math.floor(l/2.3),h=l-2.3*a,c=h>1.4?(s=(h-1.4)/.9)*s*(3-2*s):0,d=i.spread??1,f=p[a],m=p[(a+1)%o],g=[];for(let e=0;e<160;e++){let t=e/160,n=f(t),r=m(t);g.push([(n[0]+(r[0]-n[0])*c)*d,(n[1]+(r[1]-n[1])*c)*d])}let y=[],v=0;for(let e=0;e<160;e++){let t=g[e],n=g[(e+1)%160],r=Math.hypot(n[0]-t[0],n[1]-t[1]);y.push(r),v+=r}let w=Math.max(6,Math.round(34*(i.iconD??1))),b=(i.rDot??.021)*1.35*d,x=1+.02*Math.sin(3.1*h),k=[],M=t/2,S=0,C=0;for(let e=0;e<w;e++){let n=e/w*v;for(;C+y[S]<n&&S<159;)C+=y[S],S++;let r=g[S],i=g[(S+1)%160],s=y[S]?Math.min(1,(n-C)/y[S]):0,o=(r[0]+(i[0]-r[0])*s)*x,l=(r[1]+(i[1]-r[1])*s)*x;k.push({x:M+o*t,y:M+l*t,z:0,r:Math.max(.35,b*t),white:.1})}u(e,k,r,i.rMin)}},g=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],y=["orbitN","ghostN","nodeN","strandN","signals"],v=["iconD"],w=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"],b={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},x={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},k={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},M=new Map,S={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function C({state:e="working",size:t=64,theme:n="auto",speed:s=1,paused:o=!1,style:l,"aria-label":a,...h}){let u=(0,i.useRef)(null),c=function(e,t){let[n,r]=(0,i.useState)(!0);return(0,i.useEffect)(()=>
4{if("dark"===e)return void r(!0);if("light"===e)return void r(!1);let n=()=>{r(function(e){let t=e;for(;t;){let e=t.getAttribute("data-theme");if("dark"===e)return!0;if("light"===e)return!1;if(t.classList.contains("dark"))return!0;if(t.classList.contains("light"))return!1;t=t.parentElement}return null}(t.current)??(typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches))};n();let i="u">typeof matchMedia?matchMedia("(prefers-color-scheme: dark)"):null,s=()=>n();null==i||i.addEventListener("change",s);let o=null;return"u">typeof MutationObserver&&t.current&&(o=new MutationObserver(n)).observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0}),()=>{null==i||i.removeEventListener("change",s),null==o||o.disconnect()}},[e,t]),n}(n,u),d=function(){let[e,t]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{if(typeof matchMedia>"u")return;let e=matchMedia("(prefers-reduced-motion: reduce)");t(e.matches);let n=e=>t(e.matches);return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),e}();return(0,i.useEffect)(()=>{let n=u.current;if(!n)return;let r=Math.min(2,"u">typeof devicePixelRatio&&devicePixelRatio||1);n.width=Math.round(t*r),n.height=Math.round(t*r);let i=n.getContext("2d");if(!i)return;let{mode:l,speed:a,opts:h}=function(e,t){let n=`${e}-${t}`,r=M.get(n);if(r)return r;let i=x[e],s=k[i][t],o={...b[i]};1!==s.count&&(o=function(e,t){let n={...e},r=new Set,i=Math.sqrt(t);for(let[e,t]of g){let s=n[e],o=n[t];null==s||null==o||r.has(e)||r.has(t)||(n[e]=Math.max(2,Math.round(s*i)),n[t]=Math.max(2,Math.round(o*i)),r.add(e),r.add(t))}for(let e of y){let i=n[e];null==i||0===i||r.has(e)||(n[e]=Math.max(1,Math.round(i*t)))}for(let e of v){let r=n[e];null!=r&&(n[e]=Math.max(.02,r*t))}return n}(o,s.count)),1!==s.size&&(o=function(e,t){let n={...e};for(let e of w){let r=n[e];null!=r&&(n[e]=r*t)}return n.rSizeMul=(n.rSizeMul??1)*t,n}(o,s.size)),s.extra&&(o={...o,...s.extra});let l={mode:i,speed:s.speed,opts:o};return M.set(n,l),l}(e,t),p=m[l],f=a*s,S=e=>{i.setTransform(r,0,0,r,0,0),i.clearRect(0,0,t,t),p(i,t,e,c,h)};if(d)return void S(.6);let C=0,E=!1,A=()=>{S(performance.now()/1e3*f),E&&(C=requestAnimationFrame(A))},O=()=>{E||o||(E=!0,C=requestAnimationFrame(A))},R=()=>{E=!1,cancelAnimationFrame(C)};S(performance.now()/1e3*f);let z=!0,T="u">typeof IntersectionObserver?new IntersectionObserver(([e])=>{(z=e.isIntersecting)&&"hidden"!==document.visibilityState?O():R()}):null;null==T||T.observe(n);let I=()=>{"hidden"===document.visibilityState?R():z&&O()};return document.addEventListener("visibilitychange",I),T||O(),()=>{R(),null==T||T.disconnect(),document.removeEventListener("visibilitychange",I)}},[e,t,c,s,o,d]),(0,r.jsx)("canvas",{ref:u,role:"img","aria-label":a??S[e],style:{width:t,height:t,display:"block",...l},...h})}},99377:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});let r=(0,n(44838).A)("clapperboard",[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]])}}]);
5//# sourceMappingURL=8768-382fb0c3ed465b5d.js.map
6//# debugId=a2a0b56a-f75d-5078-98e1-b019096c5bac

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.