pillardash-ui-react 0.1.64 → 0.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -47,5 +47,5 @@ var C={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24"
47
47
  *
48
48
  * This source code is licensed under the MIT license found in the
49
49
  * LICENSE file in the root directory of this source tree.
50
- */"production"===process.env.NODE_ENV?Al.exports=function(){if(Ol)return Dl;Ol=1;var e=r,t=wl,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Dl.useSyncExternalStoreWithSelector=function(e,t,r,c,d){var h=i(null);if(null===h.current){var u={hasValue:!1,value:null};h.current=u}else u=h.current;h=a((function(){function e(e){if(!s){if(s=!0,o=e,e=c(e),void 0!==d&&u.hasValue){var t=u.value;if(d(t,e))return i=t}return i=e}if(t=i,n(o,e))return t;var r=c(e);return void 0!==d&&d(t,r)?t:(o=e,i=r)}var o,i,s=!1,a=void 0===r?null:r;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,r,c,d]);var p=o(e,h[0],h[1]);return s((function(){u.hasValue=!0,u.value=p}),[p]),l(p),p},Dl}():Al.exports=(Rl||(Rl=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=r,t=wl,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;Il.useSyncExternalStoreWithSelector=function(e,t,r,c,d){var h,u=i(null);null===u.current?(h={hasValue:!1,value:null},u.current=h):h=u.current;var p=a((function(){var e,o,i=!1,s=function(t){if(!i){i=!0,e=t;var r=c(t);if(void 0!==d&&h.hasValue){var s=h.value;if(d(s,r))return o=s,s}return o=r,r}var a=o;if(n(e,t))return a;var l=c(t);return void 0!==d&&d(a,l)?a:(e=t,o=l,l)},a=void 0===r?null:r;return[function(){return s(t())},null===a?void 0:function(){return s(a())}]}),[t,r,c,d]),f=p[0],m=p[1],g=o(e,f,m);return s((function(){h.hasValue=!0,h.value=g}),[g]),l(g),g},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Il);var zl=Al.exports;const Pl="undefined"!=typeof window?d:l;class Bl{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)}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){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach((e=>e()))},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}}const Ll="production"!==process.env.NODE_ENV,$l="undefined"==typeof window,Vl=$l||Boolean("undefined"!=typeof window&&window.next);class Fl{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)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((e=>e()))}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return $l||Vl?(Ll&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&$l&&Ll)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBeforeCreate)||void 0===n?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBlur)||void 0===n?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onCreate)||void 0===n?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDestroy)||void 0===n?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null===(n=(t=this.options.current).onFocus)||void 0===n?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onSelectionUpdate)||void 0===n?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null===(n=(t=this.options.current).onTransaction)||void 0===n?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onUpdate)||void 0===n?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null===(n=(t=this.options.current).onContentError)||void 0===n?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDrop)||void 0===n?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null===(n=(t=this.options.current).onPaste)||void 0===n?void 0:n.call(t,...e)}};return new _a(e)}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?void 0:r[n])})):e[n]===t[n])))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?Fl.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps)return void(this.previousDeps=e);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(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout((()=>{this.isComponentMounted&&this.instanceId===e?t&&t.setOptions(this.options.current):t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))}),1)}}function jl(e={},t=[]){const n=a(e);n.current=e;const[r]=s((()=>new Fl(n))),o=wl.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return c(o),l(r.onRender(t)),function(e){var t;const[n]=s((()=>new Bl(e.editor))),r=zl.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!==(t=e.equalityFn)&&void 0!==t?t:El);Pl((()=>n.watch(e.editor)),[e.editor,n]),c(r)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}h({editor:null}).Consumer;const _l=h({onDragStart:void 0});r.forwardRef(((e,t)=>{const{onDragStart:n}=u(_l),o=e.as||"div";return r.createElement(o,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}));const Hl=/^\s*>\s$/,ql=Ja.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Wa({find:Hl,type:this.type})]}}),Wl=/(^|[^`])`([^`]+)`(?!`)/,Jl=/(^|[^`])`([^`]+)`(?!`)/g,Kl=Us.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ha({find:Wl,type:this.type})]},addPasteRules(){return[Ka({find:Jl,type:this.type})]}}),Ul=/^```([a-z]+)?[\s\n]$/,Gl=/^~~~([a-z]+)?[\s\n]$/,Xl=Ja.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Is(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!i||!s)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();if(void 0===s)return!1;return r.nodeAt(s)?e.commands.command((({tr:e})=>(e.setSelection(rn.near(r.resolve(s))),!0))):e.commands.exitCode()}}},addInputRules(){return[qa({find:Ul,type:this.type,getAttributes:e=>({language:e[1]})}),qa({find:Gl,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Cn({key:new Mn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=null==o?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(ln.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function Yl(e={}){return new Cn({view:t=>new Zl(t,e)})}class Zl{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?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}}))}destroy(){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=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r=this.editorView.dom,o=r.getBoundingClientRect(),i=o.width/r.offsetWidth,s=o.height/r.offsetHeight;if(n){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let o=t.getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;e={left:o.left,right:o.right,top:i-a,bottom:i+a}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*i;e={left:t.left-n,right:t.left+n,top:t.top,bottom:t.bottom}}let a,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.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",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!c||c==document.body&&"static"==getComputedStyle(c).position)a=-pageXOffset,l=-pageYOffset;else{let e=c.getBoundingClientRect(),t=e.width/c.offsetWidth,n=e.height/c.offsetHeight;a=e.left-c.scrollLeft*t,l=e.top-c.scrollTop*n}this.element.style.left=(e.left-a)/i+"px",this.element.style.top=(e.top-l)/s+"px",this.element.style.width=(e.right-e.left)/i+"px",this.element.style.height=(e.bottom-e.top)/s+"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,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=jt(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)}}const Ql=ea.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Yl(this.options)]}});class ec extends rn{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return ec.valid(n)?new ec(n):rn.near(n)}content(){return pe.empty}eq(e){return e instanceof ec&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ec(e.resolve(t.pos))}getBookmark(){return new tc(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}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)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}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){e:for(;;){if(!n&&ec.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(ec.valid(s))return s}for(;;){let i=t>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!dn.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=i,r+=t;let s=e.doc.resolve(r);if(ec.valid(s))return s}return null}}}ec.prototype.visible=!1,ec.findFrom=ec.findGapCursorFrom,rn.jsonID("gapcursor",ec);class tc{constructor(e){this.pos=e}map(e){return new tc(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ec.valid(t)?new ec(t):rn.near(t)}}const nc=es({ArrowLeft:rc("horiz",-1),ArrowRight:rc("horiz",1),ArrowUp:rc("vert",-1),ArrowDown:rc("vert",1)});function rc(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let i=e.selection,s=t>0?i.$to:i.$from,a=i.empty;if(i instanceof ln){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=ec.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new ec(l))),!0)}}function oc(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!ec.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&dn.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new ec(r))),!0)}function ic(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof ec))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 o=ae.empty;for(let e=r.length-1;e>=0;e--)o=ae.from(r[e].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new pe(o,0,0));return i.setSelection(ln.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function sc(e){if(!(e.selection instanceof ec))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",pi.create(e.doc,[di.widget(e.selection.head,t,{key:"gapcursor"})])}const ac=ea.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Cn({props:{decorations:sc,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&ec.valid(n)?new ec(n):null,handleClick:oc,handleKeyDown:nc,handleDOMEvents:{beforeinput:ic}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Bs(Es(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),lc=Ja.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Is(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,a=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&i){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),cc=Ja.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Is(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>qa({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var dc=200,hc=function(){};hc.prototype.append=function(e){return e.length?(e=hc.from(e),!this.length&&e||e.length<dc&&this.leafAppend(e)||this.length<dc&&e.leafPrepend(this)||this.appendInner(e)):this},hc.prototype.prepend=function(e){return e.length?hc.from(e).append(this):this},hc.prototype.appendInner=function(e){return new pc(this,e)},hc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?hc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},hc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},hc.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)},hc.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},hc.from=function(e){return e instanceof hc?e:e&&e.length?new uc(e):hc.empty};var uc=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 o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=dc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=dc)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}(hc);hc.empty=new uc([]);var pc=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 o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},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}(hc);class fc{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new mc(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new mc(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new fc(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new mc(e.mapping.maps[n],c,t);(l=a&&a.merge(d))&&(d=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(d),t&&(i++,t=void 0),r||(a=d)}let l=i-n.depth;return l>yc&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new fc(s.append(o),i)}remapping(e,t){let n=new vt;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new fc(this.items.append(e.map((e=>new mc(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new mc(l,i,c))}else n.push(new mc(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new mc(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),d=new fc(c,s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}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=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new mc(s.invert(),e,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new fc(hc.from(r.reverse()),o)}}fc.empty=new fc(hc.empty,0);class mc{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 mc(t.getMap().invert(),t,this.selection)}}}class gc{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const yc=20;function vc(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach(((e,n,r,o)=>t.push(r,o)));return t}function bc(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}let xc=!1,wc=null;function kc(e){let t=e.plugins;if(wc!=t){xc=!1,wc=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){xc=!0;break}}return xc}const Cc=new Mn("history"),Sc=new Mn("closeHistory");function Nc(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Cn({key:Cc,state:{init:()=>new gc(fc.empty,fc.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(Cc);if(i)return i.historyState;n.getMeta(Sc)&&(e=new gc(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(Cc))return s.getMeta(Cc).redo?new gc(e.done.addTransform(n,void 0,r,kc(t)),e.undone,vc(n.mapping.maps),e.prevTime,e.prevComposition):new gc(e.done,e.undone.addTransform(n,void 0,r,kc(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new gc(e.done.rebased(n,o),e.undone.rebased(n,o),bc(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new gc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),bc(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),i=0==e.prevTime||!s&&e.prevComposition!=o&&(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 o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=s?bc(e.prevRanges,n.mapping):vc(n.mapping.maps);return new gc(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,kc(t)),fc.empty,a,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?Oc:"historyRedo"==n?Tc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function Mc(e,t){return(n,r)=>{let o=Cc.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let i=function(e,t,n){let r=kc(t),o=Cc.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,r),l=new gc(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Cc,{redo:n,historyState:l})}(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}const Oc=Mc(!1,!0),Tc=Mc(!0,!0),Ec=ea.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>Oc(e,t),redo:()=>({state:e,dispatch:t})=>Tc(e,t)}),addProseMirrorPlugins(){return[Nc(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()}}}),Ac=Ja.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Is(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:o}=n,i=e();return 0===r.parentOffset?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):n instanceof dn?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(ln.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(dn.create(e.doc,t.pos)):e.setSelection(ln.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(ln.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(e={find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type},new Hs({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Bs(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const l=e.type.create(o);if(r[1]){let e=s+r[0].lastIndexOf(r[1]);e>a?e=a:a=e+r[1].length;const t=r[0][r[0].length-1];i.insertText(t,s+r[0].length-1),i.replaceWith(e,a,l)}else if(r[0]){const t=e.type.isInline?s:s-1;i.insert(t,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()}}))];var e}}),Dc=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Rc=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Ic=Us.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ha({find:Dc,type:this.type})]},addPasteRules(){return[Ka({find:Rc,type:this.type})]}}),zc=ea.create({name:"starterKit",addExtensions(){const e=[];return!1!==this.options.bold&&e.push(Za.configure(this.options.bold)),!1!==this.options.blockquote&&e.push(ql.configure(this.options.blockquote)),!1!==this.options.bulletList&&e.push(tl.configure(this.options.bulletList)),!1!==this.options.code&&e.push(Kl.configure(this.options.code)),!1!==this.options.codeBlock&&e.push(Xl.configure(this.options.codeBlock)),!1!==this.options.document&&e.push(nl.configure(this.options.document)),!1!==this.options.dropcursor&&e.push(Ql.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&e.push(ac.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&e.push(lc.configure(this.options.hardBreak)),!1!==this.options.heading&&e.push(cc.configure(this.options.heading)),!1!==this.options.history&&e.push(Ec.configure(this.options.history)),!1!==this.options.horizontalRule&&e.push(Ac.configure(this.options.horizontalRule)),!1!==this.options.italic&&e.push(al.configure(this.options.italic)),!1!==this.options.listItem&&e.push(ll.configure(this.options.listItem)),!1!==this.options.orderedList&&e.push(hl.configure(this.options.orderedList)),!1!==this.options.paragraph&&e.push(ul.configure(this.options.paragraph)),!1!==this.options.strike&&e.push(Ic.configure(this.options.strike)),!1!==this.options.text&&e.push(pl.configure(this.options.text)),e}});function Pc(t){var n=t.size,r=void 0===n?18:n;return e("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M6.75 3.75H15.75M2.25 3.75H3.75M6.75 9H15.75M2.25 9H3.75M6.75 14.25H15.75M2.25 14.25H3.75",stroke:"#27272A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Bc(t){var n=t.size,r=void 0===n?18:n;return e("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.25 4.5H15.75M8.25 9H15.75M8.25 13.5H15.75M2.25 11.25H3.375C3.58425 11.25 3.6885 11.25 3.7755 11.2672C3.95012 11.302 4.11053 11.3877 4.23642 11.5136C4.36231 11.6395 4.44804 11.7999 4.48275 11.9745C4.5 12.0615 4.5 12.165 4.5 12.375C4.5 12.585 4.5 12.6885 4.48275 12.7755C4.44804 12.9501 4.36231 13.1105 4.23642 13.2364C4.11053 13.3623 3.95012 13.448 3.7755 13.4827C3.6885 13.5 3.585 13.5 3.375 13.5C3.165 13.5 3.0615 13.5 2.9745 13.5173C2.79988 13.552 2.63947 13.6377 2.51358 13.7636C2.38769 13.8895 2.30196 14.0499 2.26725 14.2245C2.25 14.3115 2.25 14.415 2.25 14.625V15.3C2.25 15.5122 2.25 15.618 2.316 15.684C2.382 15.75 2.4885 15.75 2.7 15.75H4.5M2.25 2.25H3.15C3.20967 2.25 3.2669 2.27371 3.3091 2.3159C3.35129 2.3581 3.375 2.41533 3.375 2.475V6.75M3.375 6.75H2.25M3.375 6.75H4.5",stroke:"#27272A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var Lc=function(n){var r=n.initialContent,o=void 0===r?"":r,i=n.onUpdate,s=jl({extensions:[zc,nl,ul,pl,Za,al,fl,tl,hl,ll],content:o,onUpdate:function(e){var t=e.editor;i(t.getHTML())}});return t("div",{className:"rounded-lg border",children:[t("div",{className:"flex gap-4 border-b bg-gray-50 p-2",children:[e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleBold().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("bold"))?"rounded bg-gray-200":""),type:"button",children:e(M,{size:18})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleItalic().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("italic"))?"rounded bg-gray-200":""),type:"button",children:e(V,{size:18})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleUnderline().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("underline"))?"rounded bg-gray-200":""),type:"button",children:e(j,{size:18})}),e("span",{className:"mx-2 h-6 border-r"}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleBulletList().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("bulletList"))?"rounded bg-gray-200":""),type:"button",children:e(Pc,{})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleOrderedList().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("orderedList"))?"rounded bg-gray-200":""),type:"button",children:e(Bc,{})})]}),e(Ml,{editor:s,className:"min-h-32 p-4"})]})};function $c(n){var r=n.options,o=n.placeholder,i=void 0===o?"Select an option":o,a=n.onChange,l=n.value,c=n.size,d=void 0===c?"md":c,h=n.className,u=void 0===h?"":h,p=n.name,f=n.id,m=n.disabled,g=void 0!==m&&m,y=n.label,v=n.required,b=s(!1),x=b[0],w=b[1],k=s(l&&r.find((function(e){return e.value===l}))||null),C=k[0],S=k[1];return t("div",{className:"relative inline-block",children:[y&&t("label",{htmlFor:f,className:"mb-1 block text-sm font-medium text-gray-700",children:[y,v&&e("span",{className:"ml-1 text-red-500",children:"*"})]}),t("button",{type:"button",className:"flex w-full items-center justify-between rounded-md border border-gray-200 bg-white shadow-sm ".concat({sm:"px-3 py-2 text-sm",md:"px-4 py-2.5 text-base"}[d]," text-gray-700 hover:bg-gray-50 focus:outline-none ").concat(g?"cursor-not-allowed opacity-50":""," ").concat(u),onClick:function(){return!g&&w(!x)},disabled:g,id:f,children:[e("span",{className:"truncate",children:C?(null==C?void 0:C.label)||C.value:i}),e(T,{className:"ml-2 h-4 w-4 ".concat(x?"rotate-180 transform":"")})]}),x&&e("div",{className:"absolute z-10 mt-1 max-h-60 w-full min-w-[200px] p-1 font-medium text-sm overflow-auto rounded-lg bg-white shadow-xl",children:r.map((function(n){return t("div",{className:"cursor-pointer px-3 py-2 hover:bg-gray-100 rounded-lg flex justify-between item-center ".concat((null==C?void 0:C.value)===n.value?"bg-gray-50 text-black":"text-gray-900"),onClick:function(){return function(e){S(e),a(e.value),w(!1)}(n)},children:[e("div",{children:n.label||n.value}),(null==C?void 0:C.value)===n.value&&e("div",{children:e(O,{size:15,className:"text-primary"})})]},n.value)}))}),p&&e("input",{type:"hidden",name:p,value:(null==C?void 0:C.value)||""})]})}var Vc=function(n){var r=n.message,o=n.description,i=n.type,a=void 0===i?"info":i,c=n.duration,d=void 0===c?5e3:c,h=n.onClose,u=s(!0),p=u[0],f=u[1],m=s(100),g=m[0],y=m[1],v={success:{icon:e(D,{className:"h-5 w-5"}),bgColor:"bg-green-50",borderColor:"border-green-300",textColor:"text-green-800",iconColor:"text-green-500",progressColor:"bg-green-500"},error:{icon:e(A,{className:"h-5 w-5"}),bgColor:"bg-rose-50",borderColor:"border-rose-300",textColor:"text-rose-800",iconColor:"text-rose-500",progressColor:"bg-rose-500"},info:{icon:e($,{className:"h-5 w-5"}),bgColor:"bg-blue-50",borderColor:"border-blue-300",textColor:"text-blue-800",iconColor:"text-blue-500",progressColor:"bg-blue-500"},warning:{icon:e(F,{className:"h-5 w-5"}),bgColor:"bg-amber-50 ",borderColor:"border-amber-300 ",textColor:"text-amber-800",iconColor:"text-amber-500",progressColor:"bg-amber-500"}};l((function(){var e=setTimeout((function(){f(!1),setTimeout((function(){null==h||h()}),300)}),d),t=setInterval((function(){y((function(e){var t=e-100/(d/100);return t<=0?0:t}))}),100);return function(){clearTimeout(e),clearInterval(t)}}),[d,h]);var b=v[a],x=b.icon,w=b.bgColor,k=b.borderColor,C=b.textColor,S=b.iconColor,N=b.progressColor;return e("div",{className:"fixed right-4 top-4 z-50 transform transition-all duration-300 ".concat(p?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:t("div",{className:"flex w-72 rounded-lg border shadow-lg md:w-96 ".concat(k," ").concat(w," p-4"),children:[e("div",{className:"flex-shrink-0 ".concat(S),children:x}),t("div",{className:"ml-3 w-full",children:[t("div",{className:"flex items-start justify-between",children:[e("p",{className:"text-md font-semibold ".concat(C),children:r}),e("button",{onClick:function(){f(!1),setTimeout((function(){null==h||h()}),300)},className:"text-gray-600 hover:text-gray-600 focus:outline-none",children:e(_,{className:"h-4 w-4"})})]}),o&&e("p",{className:"mt-1 text-sm ".concat(C," opacity-80"),children:o}),e("div",{className:"mt-2 h-1 w-full rounded-full bg-gray-200",children:e("div",{className:"".concat(N," h-1 rounded-full transition-all duration-100 ease-linear"),style:{width:"".concat(g,"%")}})})]})]})})},Fc=null,jc=h(void 0),_c=function(n){var r=n.children,o=s([]),i=o[0],a=o[1],l=p((function(e){a((function(t){return t.filter((function(t){return t.id!==e}))}))}),[]),c=p((function(e){var t=Math.random().toString(36).substring(2,9),n=K(K({},e),{id:t,onClose:function(){return l(t)}});a((function(e){return G(G([],e,!0),[n],!1)}))}),[l]),d=p((function(e){return function(t,n){c({message:t,description:n,type:e})}}),[c]),h={showAlert:c,success:d("success"),error:d("error"),info:d("info"),warning:d("warning")};return Fc=h,t(jc.Provider,{value:h,children:[r,e("div",{className:"fixed right-4 top-4 z-50 space-y-2 w-full max-w-xs",children:i.map((function(t,n){return e("div",{style:{transform:"translateY(".concat(10*n,"px)"),zIndex:50-n},children:e(Vc,K({},t))},t.id)}))})]})},Hc=function(){var e=u(jc);if(void 0===e)throw new Error("useAlert must be used within a AlertProvider");return e},qc={success:function(e,t){Fc?Fc.success(e,t):console.warn("AlertProvider not mounted yet")},error:function(e,t){Fc?Fc.error(e,t):console.warn("AlertProvider not mounted yet")},info:function(e,t){Fc?Fc.info(e,t):console.warn("AlertProvider not mounted yet")},warning:function(e,t){Fc?Fc.warning(e,t):console.warn("AlertProvider not mounted yet")},show:function(e){Fc?Fc.showAlert(e):console.warn("AlertProvider not mounted yet")}},Wc=function(n){var r=n.isOpen,o=n.onConfirm,i=n.onCancel,s=n.title,c=n.message,d=n.confirmText,h=void 0===d?"Confirm":d,u=n.cancelText,p=void 0===u?"Cancel":u,f=n.type,m=void 0===f?"default":f,g=n.showIcon,y=void 0===g||g,v=n.showCloseButton,x=void 0===v||v,w=n.closeOnOverlayClick,k=void 0===w||w,C=n.closeOnEscape,S=void 0===C||C,N=n.isLoading,M=void 0!==N&&N,O=n.className,T=void 0===O?"":O,E=n.overlayClassName,A=void 0===E?"":E,I=n.maxWidth,z=void 0===I?"sm":I,P=a(null),B=a(null),L=a(null);l((function(){return r?(L.current=document.activeElement,setTimeout((function(){var e,t,n;"danger"===m?null===(t=null===(e=P.current)||void 0===e?void 0:e.querySelector("[data-cancel-button]"))||void 0===t||t.focus():null===(n=B.current)||void 0===n||n.focus()}),100),document.body.style.overflow="hidden"):(document.body.style.overflow="unset",L.current&&L.current.focus()),function(){document.body.style.overflow="unset"}}),[r,m]),l((function(){var e=function(e){"Escape"===e.key&&S&&!M&&i()};return r&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,S,i,M]);var V=function(){M||i()},j={default:{icon:$,iconColor:"text-blue-600",iconBg:"bg-blue-100",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"},danger:{icon:R,iconColor:"text-red-600",iconBg:"bg-red-100",confirmButton:"bg-red-600 hover:bg-red-700 focus:ring-red-500"},warning:{icon:F,iconColor:"text-yellow-600",iconBg:"bg-yellow-100",confirmButton:"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500"},success:{icon:D,iconColor:"text-green-600",iconBg:"bg-green-100",confirmButton:"bg-green-600 hover:bg-green-700 focus:ring-green-500"},info:{icon:$,iconColor:"text-blue-600",iconBg:"bg-blue-100",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}}[m],H=j.icon;return r?t("div",{className:"fixed inset-0 z-50 ".concat(A),role:"dialog","aria-modal":"true","aria-labelledby":s?"confirmation-title":void 0,"aria-describedby":"confirmation-message",children:[e("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:function(e){e.target===e.currentTarget&&k&&!M&&i()}}),e("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:t("div",{ref:P,className:"relative w-full ".concat({sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"}[z]," animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-4 transform rounded-2xl bg-white shadow-2xl transition-all duration-300 ease-out ").concat(T," "),onClick:function(e){return e.stopPropagation()},children:[x&&e("button",{onClick:V,disabled:M,className:"absolute right-4 top-4 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Close",children:e(_,{size:20})}),t("div",{className:"p-6",children:[t("div",{className:"flex flex-col items-center justify-center space-y-4",children:[y&&e("div",{className:"h-12 w-12 flex-shrink-0 rounded-full ".concat(j.iconBg," flex items-center justify-center"),children:e(H,{size:24,className:j.iconColor})}),t("div",{className:"min-w-0 flex-1 justify-center",children:[s&&e("h3",{id:"confirmation-title",className:"mb-1 text-center text-lg font-semibold text-gray-900",children:s}),e("p",{id:"confirmation-message",className:"leading-relaxed text-gray-600",children:c})]})]}),t("div",{className:"flex ".concat("justify-center"," mt-6 space-x-3"),children:[e(b,{variant:"neutral",outline:!0,size:"small","data-cancel-button":"",onClick:V,disabled:M,children:p}),e("button",{ref:B,onClick:function(){M||o()},disabled:M,className:"flex min-w-[80px] items-center justify-center rounded-xl px-4 py-2 text-sm font-medium text-white transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ".concat(j.confirmButton," "),children:M?e("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"}):h})]})]})]})})]}):null},Jc=function(n){var r=n.isOpen,o=n.onClose,i=n.title,s=n.children,c=n.size,d=void 0===c?"md":c,h=n.position,u=void 0===h?"right":h,p=n.showCloseButton,f=void 0===p||p,m=n.closeOnOverlayClick,g=void 0===m||m,y=n.closeOnEscape,v=void 0===y||y,b=n.className,x=void 0===b?"":b,w=n.overlayClassName,k=void 0===w?"":w,C=n.contentClassName,S=void 0===C?"":C,N=n.headerClassName,M=void 0===N?"":N,O=n.footer,T=n.footerClassName,E=void 0===T?"":T,A=n.maxHeight,D=void 0!==A&&A,R=a(null),I=a(null);l((function(){var e;return r?(I.current=document.activeElement,null===(e=R.current)||void 0===e||e.focus(),document.body.style.overflow="hidden"):(document.body.style.overflow="unset",I.current&&I.current.focus()),function(){document.body.style.overflow="unset"}}),[r]),l((function(){var e=function(e){"Escape"===e.key&&v&&o()};return r&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,v,o]);var z=function(e){e.target===e.currentTarget&&g&&"full"!==d&&o()};return r?t("div",{className:"fixed inset-0 z-50 ".concat(k),role:"dialog","aria-modal":"true","aria-labelledby":i?"modal-title":void 0,children:["full"!==d&&e("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-700",onClick:z}),e("div",{className:"fixed inset-0 flex ".concat("full"===d?"p-0":"p-4"," ").concat(function(){if("full"===d)return"items-start justify-start";return{left:"items-start justify-start",right:"items-start justify-end",center:"items-center justify-center"}[u]}()),onClick:z,children:t("div",{ref:R,tabIndex:-1,className:"\n relative w-full ".concat({xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"w-full h-full"}[d]," bg-white shadow-2xl transform transition-all duration-700 ease-out flex flex-col\n ").concat("full"===d?"h-full max-h-screen overflow-hidden":"left"===u||"right"===u?"h-full ".concat(D?"max-h-screen":""," rounded-2xl"):"rounded-2xl ".concat(D?"max-h-[90vh] overflow-hidden":""),"\n ").concat("full"===d?"animate-in fade-in-0":"center"===u?"animate-in fade-in-0 zoom-in-95":"left"===u?"animate-in slide-in-from-left-full":"animate-in slide-in-from-right-full","\n ").concat(x,"\n "),onClick:function(e){return e.stopPropagation()},children:[(i||f)&&t("div",{className:"flex items-center justify-between px-6 py-3 border-b border-gray-200 flex-shrink-0 ".concat(M),children:[i&&e("h2",{id:"modal-title",className:"text-xl font-semibold text-gray-900 truncate pr-4",children:i}),f&&e("button",{onClick:o,className:"flex items-center justify-center w-8 h-8 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"Close modal",children:e(_,{size:20})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto ".concat(D||"full"===d?"overflow-y-auto":""," ").concat(S),children:e("div",D&&("left"===u||"right"===u)||"full"===d?{className:"p-6 min-h-0 flex-1",children:s}:{className:"p-6",children:s})}),O&&e("div",{className:"px-6 py-4 border-t border-gray-200 bg-gray-50 flex-shrink-0 ".concat("full"===d?"":"rounded-2xl"," ").concat(E),children:O})]})})]}):null},Kc=function(){var n=r.useState(!1),o=n[0],i=n[1],s=r.useState("left"),a=s[0],l=s[1],c=r.useState("md"),d=c[0],h=c[1],u=t("div",{className:"flex justify-end space-x-3",children:[e("button",{onClick:function(){return i(!1)},className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200",children:"Cancel"}),e("button",{onClick:function(){return i(!1)},className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200",children:"Save Changes"})]});return t("div",{className:"p-8 space-y-4",children:[t("div",{className:"flex flex-wrap gap-4 mb-6",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Position"}),t("select",{value:a,onChange:function(e){return l(e.target.value)},className:"border border-gray-300 rounded-md px-3 py-2 text-sm",disabled:"full"===d,children:[e("option",{value:"left",children:"Left"}),e("option",{value:"right",children:"Right"}),e("option",{value:"center",children:"Center"})]})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Size"}),t("select",{value:d,onChange:function(e){return h(e.target.value)},className:"border border-gray-300 rounded-md px-3 py-2 text-sm",children:[e("option",{value:"xs",children:"Extra Small"}),e("option",{value:"sm",children:"Small"}),e("option",{value:"md",children:"Medium"}),e("option",{value:"lg",children:"Large"}),e("option",{value:"xl",children:"Extra Large"}),e("option",{value:"2xl",children:"2X Large"}),e("option",{value:"full",children:"Full Screen"})]})]})]}),e("button",{onClick:function(){return i(!0)},className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200 font-medium",children:"Open Modal"}),e(Jc,{isOpen:o,onClose:function(){return i(!1)},title:"Example Modal",size:d,position:a,footer:u,maxHeight:"center"!==a,children:t("div",{className:"space-y-4",children:[e("p",{className:"text-gray-600",children:"This is an example of the multipurpose modal component. It supports different sizes, positions, and configurations."}),t("div",{className:"bg-gray-50 p-4 rounded-lg",children:[e("h4",{className:"font-medium text-gray-900 mb-2",children:"Features:"}),t("ul",{className:"text-sm text-gray-600 space-y-1 list-disc list-inside",children:[e("li",{children:"Multiple sizes (xs, sm, md, lg, xl, 2xl, full screen)"}),e("li",{children:"Three positions (left, right, center)"}),e("li",{children:"Customizable styling with className props"}),e("li",{children:"Keyboard navigation and accessibility"}),e("li",{children:"Click outside to close (disabled for full screen)"}),e("li",{children:"Smooth animations"}),e("li",{children:"Optional footer with actions"}),e("li",{children:"Full screen mode without margins or border radius"})]})]}),("left"===a||"right"===a||"full"===d)&&e("div",{className:"space-y-2",children:Array.from({length:20},(function(e,n){return t("p",{className:"text-gray-600",children:["This is paragraph ",n+1," to demonstrate scrolling in side panels","full"===d?" and full screen mode":"","."]},n)}))})]})})]})};function Uc(n){var r=n.currentPage,o=n.totalPages,i=n.totalItems,s=n.itemsPerPage,a=n.onPageChange,l=n.onViewChange,c=n.loading,d=void 0!==c&&c,h=function(e){e>0&&e<=o&&!d&&a&&a(e)},u=(r-1)*s,p=Math.min(u+s,i);return t("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white py-3",children:[t("div",{className:"flex flex-1 justify-between sm:hidden",children:[e("button",{onClick:function(){return h(r-1)},disabled:1===r||d,className:"relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 ".concat(1===r||d?"cursor-not-allowed opacity-50":""),children:"Previous"}),e("button",{onClick:function(){return h(r+1)},disabled:r===o||d,className:"relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 ".concat(r===o||d?"cursor-not-allowed opacity-50":""),children:"Next"})]}),t("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[t("div",{className:"flex items-center justify-center gap-2",children:[t("div",{className:"relative",children:[e("select",{value:s,onChange:function(e){return l&&l(e.target.value)},disabled:d,className:"appearance-none rounded-md border border-gray-300 bg-white py-2 pl-3 pr-8 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[10,20,30,50].map((function(t){return e("option",{value:t,children:t},t)}))}),e("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:e("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20",children:e("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),t("p",{className:"text-sm text-gray-700",children:[t("span",{children:[i," Entries"]}),t("span",{className:"ml-1",children:["(Showing ",u+1,"-",p," of ",i,")"]})]})]}),e("div",{children:t("nav",{className:"relative z-0 inline-flex gap-2 -space-x-px rounded-md shadow-sm","aria-label":"Pagination",children:[t("button",{onClick:function(){return h(r-1)},disabled:1===r||d,className:"relative inline-flex items-center rounded-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 ".concat(1===r||d?"cursor-not-allowed opacity-50":""),children:[e("span",{className:"sr-only",children:"Previous"}),e("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})]}),function(){var e=[];if(o<=5)for(var t=1;t<=o;t++)e.push(t);else{var n=Math.max(1,r-2),i=Math.min(o,n+5-1);i-n<4&&(n=Math.max(1,i-5+1));for(t=n;t<=i;t++)e.push(t)}return e}().map((function(t){return e("button",{onClick:function(){return h(t)},disabled:d,"aria-current":r===t?"page":void 0,className:"relative inline-flex items-center rounded-md border px-4 py-2 text-sm font-semibold ".concat(r===t?"z-10 border-primary-100 bg-primary-50 text-primary":"border-gray-300 bg-white text-gray-500 hover:bg-gray-50"," ").concat(d?"cursor-not-allowed opacity-50":""),children:t},t)})),t(b,{onClick:function(){return h(r+1)},disabled:r===o||d,type:"button",variant:"primary",size:"small",outline:!0,children:["Next Page",e("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})]})]})})]})]})}function Gc(t){var r=t.columns,o=t.rows;return e(n,{children:Array.from({length:o}).map((function(t,n){return e("tr",{children:Array.from({length:r}).map((function(t,r){return e("td",{className:"whitespace-nowrap px-6 py-4",children:e("div",{className:"h-4 animate-pulse rounded bg-gray-200"})},"skeleton-cell-".concat(n,"-").concat(r))}))},"skeleton-row-".concat(n))}))})}function Xc(r){var o=r.data,i=r.columns,s=r.itemsPerPage,a=void 0===s?20:s,l=r.onViewChange,c=r.totalItems,d=r.currentPage,h=void 0===d?1:d,u=r.onPageChange,p=r.loading,f=void 0!==p&&p,m=r.showPagination,g=void 0===m||m,y=r.onRowClick,v=r.useCardLayout,b=void 0!==v&&v,x=c||o.length,w=Math.ceil(x/a),k=o,C=function(e){y&&y(e)},S=function(){return t("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:[f&&Array.from({length:a}).map((function(n,r){return e("div",{className:"bg-white rounded-lg border border-gray-200 p-4 animate-pulse",children:e("div",{className:"space-y-3",children:i.slice(0,3).map((function(n,r){return t("div",{className:"flex justify-between items-center",children:[e("div",{className:"h-4 bg-gray-200 rounded w-1/3"}),e("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]},r)}))})},r)})),k.length>0?k.map((function(n,r){return e("div",{onClick:function(){return C(n)},className:"bg-white rounded-lg border border-gray-200 p-4 transition-all duration-200 hover:shadow-md hover:border-gray-300 ".concat(y?"cursor-pointer":""," ").concat(f?"opacity-50":""),children:e("div",{className:"space-y-3",children:i.map((function(r,o){return t("div",{className:"flex justify-between items-start",children:[t("span",{className:"text-sm font-medium text-gray-500 flex-shrink-0 mr-3",children:[r.title,":"]}),e("span",{className:"text-sm text-gray-800 text-right",children:"function"==typeof r.value?r.value(n):n[r.value]})]},o)}))})},r)})):!f&&e("div",{className:"col-span-full",children:e(J,{title:"No Record found"})})]})};return t(n,{children:[b?S():t(n,{children:[e("div",{className:"hidden md:block",children:e("div",{className:"relative overflow-x-auto",children:t("table",{className:"w-full",children:[e("thead",{children:e("tr",{children:i.map((function(t,n){return e("th",{className:"bg-gray-100 px-6 py-3 text-left text-sm font-semibold tracking-wider text-gray-500 ".concat(t.width||""," ").concat(0===n?"rounded-bl-xl rounded-tl-xl":""," ").concat(n===i.length-1?"rounded-br-xl rounded-tr-xl":""," "),children:t.title},n)}))})}),t("tbody",{className:"divide-y divide-gray-200 bg-white \n ".concat(f?"opacity-50":""," ").concat(y?"cursor-pointer":"","\n "),children:[f&&e(Gc,{columns:i.length,rows:a}),k.length>0?k.map((function(t,n){return e("tr",{onClick:function(){return C(t)},className:"hover:bg-gray-50",children:i.map((function(n,r){return e("td",{className:"whitespace-nowrap px-6 py-4 text-sm font-medium text-gray-800",children:"function"==typeof n.value?n.value(t):t[n.value]},r)}))},n)})):!f&&e("tr",{children:e("td",{colSpan:i.length,children:e(J,{title:"No Record found"})})})]})]})})}),e("div",{className:"block md:hidden",children:S()})]}),g&&e(Uc,{currentPage:h,totalPages:w,totalItems:x,itemsPerPage:a,onPageChange:u,onViewChange:l,loading:f})]})}function Yc(n){var r=n.actions,o=n.trigger,i=n.className,c=void 0===i?"":i,d=n.dropdownClassName,h=void 0===d?"":d,u=s(!1),p=u[0],f=u[1],m=a(null),g=function(){f(!p)},y=function(){f(!1)};l((function(){var e=function(e){m.current&&!m.current.contains(e.target)&&y()};return p&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[p]),l((function(){var e=function(e){"Escape"===e.key&&y()};return p&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[p]);return t("div",{className:"relative inline-block ".concat(c),ref:m,children:[e("div",{className:"flex",children:o?e("div",{onClick:g,className:"cursor-pointer",children:o}):e("button",{className:"rounded-md border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-700 transition-colors duration-200 focus:ring-offset-2",onClick:g,"aria-expanded":p,"aria-haspopup":"true",children:e(z,{className:"h-4 w-4"})})}),p&&e("div",{className:"absolute right-0 z-50 mt-1 w-48 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ".concat(h),children:t("div",{className:"py-1",role:"menu","aria-orientation":"vertical",children:[r.map((function(n,r){return t("button",{className:"flex w-full items-center px-4 py-2 text-left text-sm transition-colors duration-150 ".concat(n.disabled?"cursor-not-allowed bg-gray-50 text-gray-400":"danger"===n.variant?"text-red-700 hover:bg-red-50 hover:text-red-900":"text-gray-700 hover:bg-gray-100 hover:text-gray-900"," "),onClick:function(){return function(e){e.disabled||(e.onClick(),y())}(n)},disabled:n.disabled,role:"menuitem",children:[n.icon&&e("span",{className:"mr-3 flex-shrink-0",children:n.icon}),n.label]},r)})),0===r.length&&e("div",{className:"px-4 py-2 text-sm text-gray-500",children:"No actions available"})]})})]})}var Zc={xs:{width:"4rem",height:"1rem"},sm:{width:"6rem",height:"1.25rem"},md:{width:"8rem",height:"1.5rem"},lg:{width:"12rem",height:"2rem"},xl:{width:"16rem",height:"2.5rem"}},Qc={text:{baseClasses:"rounded",defaultSize:{width:"100%",height:"1rem"}},rectangular:{baseClasses:"",defaultSize:{width:"100%",height:"8rem"}},circular:{baseClasses:"rounded-full aspect-square",defaultSize:{width:"3rem",height:"3rem"}},rounded:{baseClasses:"rounded-lg",defaultSize:{width:"100%",height:"6rem"}},card:{baseClasses:"rounded-lg",defaultSize:{width:"100%",height:"12rem"}},avatar:{baseClasses:"rounded-full aspect-square",defaultSize:{width:"2.5rem",height:"2.5rem"}},button:{baseClasses:"rounded-md",defaultSize:{width:"5rem",height:"2.25rem"}},image:{baseClasses:"rounded",defaultSize:{width:"100%",height:"10rem"}},line:{baseClasses:"rounded-full",defaultSize:{width:"100%",height:"0.25rem"}}},ed=function(t){var n=t.variant,o=void 0===n?"text":n,i=t.animation,s=void 0===i?"pulse":i,a=t.size,l=t.width,c=t.height,d=t.count,h=void 0===d?1:d,u=t.className,p=void 0===u?"":u,f=t.shimmer,m=void 0!==f&&f,g=t.borderRadius,y=t.intensity,v=void 0===y?"medium":y,b=t.delay,x=void 0===b?0:b,w=r.useState(0===x),k=w[0],C=w[1];r.useEffect((function(){!function(){if("undefined"!=typeof document&&!document.getElementById("skeleton-loader-styles")){var e=document.createElement("style");e.id="skeleton-loader-styles",e.textContent="\n @keyframes wave {\n 0% { transform: translateX(-100%); }\n 50% { transform: translateX(100%); }\n 100% { transform: translateX(100%); }\n }\n\n @keyframes shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n\n .skeleton-wave {\n animation: wave 1.6s linear infinite;\n position: relative;\n overflow: hidden;\n }\n\n .skeleton-shimmer {\n animation: shimmer 2s ease-in-out infinite;\n background-size: 200% 100%;\n }\n\n .skeleton-wave::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: wave 1.6s linear infinite;\n }\n",document.head.appendChild(e)}}()}),[]);var S=Qc[o],N=r.useMemo((function(){return{width:void 0!==l?"number"==typeof l?"".concat(l,"px"):l:a?Zc[a].width:S.defaultSize.width,height:void 0!==c?"number"==typeof c?"".concat(c,"px"):c:a?Zc[a].height:S.defaultSize.height}}),[l,c,a,S]);if(r.useEffect((function(){if(x>0){var e=setTimeout((function(){return C(!0)}),x);return function(){return clearTimeout(e)}}}),[x]),!k)return null;var M=function(){var e=["block","bg-gray-200",S.baseClasses];switch("pulse"===s?e.push("animate-pulse"):"wave"===s&&e.push("animate-wave"),v){case"light":e.push("bg-gray-100");break;case"medium":e.push("bg-gray-200");break;case"dark":e.push("bg-gray-300")}return m&&e.push("bg-gradient-to-r","from-gray-200","via-gray-100","to-gray-200","bg-200%","animate-shimmer"),e.join(" ")},O=function(t){return e("div",{className:"".concat(M()," ").concat(p),style:(n={width:N.width,height:N.height},g&&(n.borderRadius=g),n),"aria-hidden":"true"},t);var n};return h>1?e("div",{className:"space-y-2",children:Array.from({length:h},(function(e,t){return O(t)}))}):O(0)},td=function(t){return e(ed,K({},t,{variant:"text"}))},nd=function(t){return e(ed,K({},t,{variant:"avatar"}))},rd=function(t){return e(ed,K({},t,{variant:"button"}))},od=function(t){return e(ed,K({},t,{variant:"card"}))},id=function(t){return e(ed,K({},t,{variant:"image"}))},sd=function(n){var r=n.showBio,o=void 0===r||r;return t("div",{className:"flex items-start space-x-4",children:[e(nd,{size:"lg"}),t("div",{className:"flex-1 space-y-2",children:[e(td,{width:"60%",height:"1.25rem"}),e(td,{width:"40%",height:"1rem",intensity:"light"}),o&&t("div",{className:"space-y-1 pt-2",children:[e(td,{width:"100%"}),e(td,{width:"80%"}),e(td,{width:"90%"})]})]})]})},ad=function(n){var r=n.itemCount,o=void 0===r?3:r,i=n.showAvatar,s=void 0===i||i,a=n.showMeta,l=void 0===a||a;return e("div",{className:"space-y-4",children:Array.from({length:o},(function(n,r){return t("div",{className:"flex items-start space-x-3",children:[s&&e(nd,{}),t("div",{className:"flex-1 space-y-2",children:[e(td,{width:"75%",height:"1.125rem"}),e(td,{width:"100%",height:"0.875rem",intensity:"light"}),l&&t("div",{className:"flex space-x-4",children:[e(td,{width:"3rem",height:"0.75rem",intensity:"light"}),e(td,{width:"4rem",height:"0.75rem",intensity:"light"})]})]})]},r)}))})},ld=function(n){var r=n.rows,o=void 0===r?5:r,i=n.columns,s=void 0===i?4:i,a=n.showHeader;return t("div",{className:"space-y-3",children:[(void 0===a||a)&&e("div",{className:"flex space-x-4",children:Array.from({length:s},(function(t,n){return e(td,{width:"100%",height:"1rem",intensity:"dark"},n)}))}),e("div",{className:"space-y-2",children:Array.from({length:o},(function(t,n){return e("div",{className:"flex space-x-4",children:Array.from({length:s},(function(t,n){return e(td,{width:"100%",height:"0.875rem"},n)}))},n)}))})]})},cd=function(){return t("div",{className:"bg-white p-5",children:[e(ed,{variant:"text",width:"200px"}),e(ed,{variant:"text",count:3}),e(nd,{size:"lg"}),e(rd,{animation:"wave"}),e(sd,{showBio:!0}),e(ad,{itemCount:5,showAvatar:!0}),e(ld,{rows:5,columns:4}),e(ed,{variant:"card",shimmer:!0,intensity:"dark",borderRadius:"12px",className:"custom-skeleton"})]})},dd="1.0.0",hd={sizes:{xs:{width:"4rem",height:"1rem"},sm:{width:"6rem",height:"1.25rem"},md:{width:"8rem",height:"1.5rem"},lg:{width:"12rem",height:"2rem"},xl:{width:"16rem",height:"2.5rem"}},variants:["text","rectangular","circular","rounded","card","avatar","button","image","line"],animations:["pulse","wave","none"],intensities:["light","medium","dark"]},ud={userProfile:{variant:"avatar",size:"lg",animation:"pulse"},cardTitle:{variant:"text",width:"75%",height:"1.5rem"},cardDescription:{variant:"text",count:2,width:"100%",height:"1rem",intensity:"light"},button:{variant:"button",animation:"wave"},image:{variant:"image",shimmer:!0}},pd=function(n){var r=n.size,o=void 0===r?"md":r,i=n.variant,s=void 0===i?"pulse":i,a=n.color,l=void 0===a?"primary":a,c=n.fullScreen,d=void 0!==c&&c,h=n.text,u=n.className,p=void 0===u?"":u,f=n.image,m=n.imageEffect,g=void 0===m?"pulse":m,y=l.startsWith("#"),v=function(e){return y?"":{text:"text-".concat(l),bg:"bg-".concat(l),border:"border-".concat(l),borderTop:"border-t-".concat(l),borderRight:"border-r-".concat(l)}[e]||""},b={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},x={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-20 h-20"},w=function(){switch(g){case"bounce":return"animate-bounce";case"spin":return"animate-spin";case"float":return"animate-pulse hover:animate-bounce";case"heartbeat":return"animate-ping";default:return"animate-pulse"}},k=function(){return t("div",{className:"relative flex items-center justify-center",children:[e("img",{src:f,alt:"Loading",className:"".concat(x[o]," object-contain ").concat(w()),style:{filter:"drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1))",animationDuration:"heartbeat"===g?"1.5s":"bounce"===g?"1s":"2s"}}),"float"===g&&e("div",{className:"absolute inset-0 ".concat(x[o]," rounded-full bg-gradient-to-r from-purple-400 to-blue-400 opacity-20 animate-ping"),style:{animationDuration:"2s"}})]})},C=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," border-4 border-gray-200 rounded-full animate-spin ").concat(y?"":v("borderTop")),style:y?{borderTopColor:l}:{}}),e("div",{className:"absolute inset-0 ".concat(b[o]," border-4 border-transparent rounded-full animate-spin ").concat(y?"":v("borderRight")),style:y?{borderRightColor:l,animationDirection:"reverse",animationDuration:"0.75s"}:{animationDirection:"reverse",animationDuration:"0.75s"}})]})},S=function(){return e("div",{className:"flex space-x-1",children:[0,1,2].map((function(t){return e("div",{className:"".concat("sm"===o?"w-2 h-2":"md"===o?"w-3 h-3":"lg"===o?"w-4 h-4":"w-5 h-5"," rounded-full animate-bounce ").concat(y?"":v("bg")),style:y?{backgroundColor:l,animationDelay:"".concat(.2*t,"s"),animationDuration:"1.4s"}:{animationDelay:"".concat(.2*t,"s"),animationDuration:"1.4s"}},t)}))})},N=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," rounded-full animate-pulse ").concat(y?"":v("bg")),style:y?{backgroundColor:l}:{}}),e("div",{className:"absolute inset-0 ".concat(b[o]," rounded-full animate-ping opacity-30 ").concat(y?"":v("bg")),style:y?{backgroundColor:l}:{}})]})},M=function(){return e("div",{className:"flex space-x-1 items-end",children:[0,1,2,3].map((function(t){return e("div",{className:"".concat("sm"===o?"w-1":"md"===o?"w-1.5":"lg"===o?"w-2":"w-2.5"," rounded-sm animate-pulse ").concat(y?"":v("bg")),style:y?{backgroundColor:l,height:"".concat(20+10*t,"px"),animationDelay:"".concat(.15*t,"s"),animationDuration:"1.2s"}:{height:"".concat(20+10*t,"px"),animationDelay:"".concat(.15*t,"s"),animationDuration:"1.2s"}},t)}))})},O=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," border-4 rounded-full animate-ping ").concat(y?"":v("border")),style:y?{borderColor:l}:{}}),e("div",{className:"absolute inset-2 border-4 rounded-full animate-ping ".concat(y?"":v("border")),style:y?{borderColor:l,animationDelay:"0.5s"}:{animationDelay:"0.5s"}})]})},T=t("div",{className:"flex flex-col items-center justify-center space-y-3 ".concat(p),children:[function(){if("image"===s&&f)return e(k,{});switch(s){case"dots":return e(S,{});case"pulse":return e(N,{});case"bars":return e(M,{});case"ripple":return e(O,{});default:return e(C,{})}}(),h&&e("p",{className:"".concat({sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"}[o]," font-medium animate-pulse ").concat(y?"":v("text")),style:y?{color:l}:{},children:h})]});return d?e("div",{className:"fixed inset-0 bg-white/80 backdrop-blur-sm flex items-center justify-center z-50",children:T}):T},fd=function(){var n=r.useState("blue-500"),o=n[0],i=n[1],s=r.useState("spinner"),a=s[0],l=s[1],c=r.useState("md"),d=c[0],h=c[1],u=r.useState(!1),p=u[0],f=u[1],m=["spinner","dots","pulse","bars","ripple"];return t("div",{className:"p-8 max-w-4xl mx-auto",children:[e("h1",{className:"text-3xl font-bold text-gray-800 mb-8 text-center",children:"Modern Loading Component"}),t("div",{className:"bg-white rounded-xl shadow-lg p-6 mb-8",children:[e("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Customization"}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Color"}),e("div",{className:"flex flex-wrap gap-2",children:[{name:"Blue",value:"blue-500",hex:"#3B82F6"},{name:"Purple",value:"purple-500",hex:"#8B5CF6"},{name:"Green",value:"green-500",hex:"#10B981"},{name:"Red",value:"red-500",hex:"#EF4444"},{name:"Orange",value:"orange-500",hex:"#F59E0B"},{name:"Pink",value:"pink-500",hex:"#EC4899"},{name:"Indigo",value:"indigo-500",hex:"#6366F1"},{name:"Teal",value:"teal-500",hex:"#14B8A6"}].map((function(t){return e("button",{onClick:function(){return i(t.value)},className:"w-8 h-8 rounded-full border-2 transition-all ".concat(o===t.value?"border-gray-400 scale-110":"border-gray-200"),style:{backgroundColor:t.hex},title:"".concat(t.name," (").concat(t.value,")")},t.value)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Variant"}),e("select",{value:a,onChange:function(e){return l(e.target.value)},className:"w-full p-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:m.map((function(t){return e("option",{value:t,children:t&&(null==t?void 0:t.charAt(0).toUpperCase())+(null==t?void 0:t.slice(1))},t)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Size"}),e("select",{value:d,onChange:function(e){return h(e.target.value)},className:"w-full p-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:["sm","md","lg","xl"].map((function(t){return e("option",{value:t,children:null==t?void 0:t.toUpperCase()},t)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Full Screen"}),e("button",{onClick:function(){return f(!0)},className:"w-full p-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Demo Full Screen"})]})]}),t("div",{className:"bg-gray-50 rounded-lg p-8 flex flex-col items-center justify-center min-h-32",children:[e(pd,{variant:a,size:d,color:o,text:"Loading..."}),e("div",{className:"mt-4 p-3 bg-white rounded-md shadow-sm",children:t("code",{className:"text-sm text-gray-600",children:['color="',o,'"']})})]})]}),t("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[e("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"All Variants"}),e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6",children:m.map((function(n){return t("div",{className:"text-center",children:[e("div",{className:"bg-gray-50 rounded-lg p-4 flex items-center justify-center h-24 mb-2",children:e(pd,{variant:n,color:o})}),e("p",{className:"text-sm text-gray-600 capitalize",children:n})]},n)}))}),t("div",{className:"mt-6 p-4 bg-blue-50 rounded-lg",children:[e("h3",{className:"font-semibold text-blue-800 mb-2",children:"Usage Examples:"}),t("div",{className:"space-y-2 text-sm",children:[t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Tailwind CSS class"}),e("br",{}),e("code",{children:'<Loading color="primary-500" />'})]}),t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Hex color"}),e("br",{}),e("code",{children:'<Loading color="#your-brand-color" />'})]}),t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Custom Tailwind color"}),e("br",{}),e("code",{children:'<Loading color="emerald-400" variant="dots" />'})]})]})]})]}),p&&e(pd,{variant:a,size:d,color:o,text:"Loading in full screen...",fullScreen:!0}),p&&e("button",{onClick:function(){return f(!1)},className:"fixed top-4 right-4 z-50 bg-red-500 text-white px-4 py-2 rounded-md hover:bg-red-600 transition-colors",children:"Close Full Screen"})]})},md=function(n){var r=n.items,o=void 0===r?[]:r,i=n.onBackClick,s=n.showBackButton,a=void 0===s||s,l=n.separator,c=void 0===l?" / ":l,d=n.className;return t("div",{className:"flex gap-2 ".concat(void 0===d?"":d),children:[a&&e("div",{onClick:i,className:"cursor-pointer",children:e(E,{className:"text-gray-500 transition-colors hover:text-gray-700"})}),e("p",{className:"text-gray-400",children:o.map((function(n,r){return t("span",{children:[n.isActive?e("span",{className:"text-primary",children:n.label}):e("span",{className:n.onClick?"cursor-pointer transition-colors hover:text-gray-600":"",onClick:n.onClick,children:n.label}),r<o.length-1&&c]},r)}))})]})},gd=function(r){var o=r.children,i=r.content,c=r.position,d=void 0===c?"top":c,h=r.variant,u=void 0===h?"light":h,p=r.size,f=void 0===p?"md":p,m=r.delay,g=void 0===m?200:m,y=r.disabled,v=void 0!==y&&y,b=r.className,x=void 0===b?"":b,w=s(!1),k=w[0],C=w[1],S=s(d),N=S[0],M=S[1],O=a(null),T=a(null),E=a(null);l((function(){if(k&&T.current&&E.current){var e=T.current,t=E.current.getBoundingClientRect(),n=e.getBoundingClientRect(),r=d;"top"===d&&t.top-n.height<10?r="bottom":"bottom"===d&&t.bottom+n.height>window.innerHeight-10?r="top":"left"===d&&t.left-n.width<10?r="right":"right"===d&&t.right+n.width>window.innerWidth-10&&(r="left"),M(r)}}),[k,d]);var A=function(){v||(O.current&&clearTimeout(O.current),O.current=setTimeout((function(){C(!0)}),g))},D=function(){O.current&&clearTimeout(O.current),C(!1)};l((function(){return function(){O.current&&clearTimeout(O.current)}}),[]);var R={dark:{tooltip:"bg-gray-900 text-white border-gray-700",arrow:{top:"border-t-gray-900",bottom:"border-b-gray-900",left:"border-l-gray-900",right:"border-r-gray-900"}},light:{tooltip:"bg-white text-gray-900 border-gray-200 shadow-lg",arrow:{top:"border-t-white",bottom:"border-b-white",left:"border-l-white",right:"border-r-white"}},accent:{tooltip:"bg-blue-600 text-white border-blue-500",arrow:{top:"border-t-blue-600",bottom:"border-b-blue-600",left:"border-l-blue-600",right:"border-r-blue-600"}}};return v||!i?e(n,{children:o}):t("div",{className:"relative inline-block",children:[e("div",{ref:E,onMouseEnter:A,onMouseLeave:D,onFocus:A,onBlur:D,className:"cursor-help",children:o}),k&&t("div",{ref:T,className:"absolute z-50 ".concat({top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"}[N]," ").concat(R[u].tooltip," ").concat({sm:"px-2 py-1 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-3 text-base"}[f]," animate-in fade-in-0 zoom-in-95 max-w-xs whitespace-nowrap break-words rounded-lg border font-medium backdrop-blur-sm duration-200 ").concat(x," "),role:"tooltip","aria-hidden":"false",children:[i,e("div",{className:"absolute h-0 w-0 border-4 ".concat({top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"}[N]," ").concat(R[u].arrow[N]," ")})]})]})},yd=function(t){var n=t.children,r=t.variant,o=void 0===r?"default":r,i=t.size,s=void 0===i?"md":i,a=t.className,l=void 0===a?"":a,c=t.onClick,d=["inline-flex items-center font-medium rounded-full transition-colors duration-200",{default:"bg-gray-100 text-gray-800 hover:bg-gray-200",secondary:"bg-blue-100 text-blue-800 hover:bg-blue-200",success:"bg-green-100 text-green-800 hover:bg-green-200",warning:"bg-yellow-100 text-yellow-800 hover:bg-yellow-200",error:"bg-red-100 text-red-800 hover:bg-red-200",info:"bg-cyan-100 text-cyan-800 hover:bg-cyan-200"}[o],{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"}[s],c?"cursor-pointer":"",l].filter(Boolean).join(" ");return e("span",{className:d,onClick:c,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c())}:void 0,children:n})};export{jc as AlertContext,_c as AlertProvider,yd as Badge,md as Breadcrumb,b as Button,W as Card,X as CheckBox,Z as CheckBoxDemo,Wc as ConfirmationAlert,J as EmptyStateCard,q as ExportButton,Q as FileUpload,ee as Input,te as InputWithPrefix,pd as Loading,fd as LoadingDemo,Jc as Modal,Kc as ModalExample,Uc as Pagination,Y as RadioGroup,dd as SKELETON_LOADER_VERSION,ud as SKELETON_PATTERNS,hd as SKELETON_PRESETS,ne as Search,re as Select,$c as SelectButton,nd as SkeletonAvatar,rd as SkeletonButton,od as SkeletonCard,id as SkeletonImage,ad as SkeletonList,ed as SkeletonLoader,cd as SkeletonLoaderExample,sd as SkeletonProfile,ld as SkeletonTable,td as SkeletonText,Xc as Table,Yc as TableDropdown,Gc as TableSkeleton,Lc as TextEditor,gd as Tooltip,qc as alert,Hc as useAlert};
50
+ */"production"===process.env.NODE_ENV?Al.exports=function(){if(Ol)return Dl;Ol=1;var e=r,t=wl,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;return Dl.useSyncExternalStoreWithSelector=function(e,t,r,c,d){var h=i(null);if(null===h.current){var u={hasValue:!1,value:null};h.current=u}else u=h.current;h=a((function(){function e(e){if(!s){if(s=!0,o=e,e=c(e),void 0!==d&&u.hasValue){var t=u.value;if(d(t,e))return i=t}return i=e}if(t=i,n(o,e))return t;var r=c(e);return void 0!==d&&d(t,r)?t:(o=e,i=r)}var o,i,s=!1,a=void 0===r?null:r;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,r,c,d]);var p=o(e,h[0],h[1]);return s((function(){u.hasValue=!0,u.value=p}),[p]),l(p),p},Dl}():Al.exports=(Rl||(Rl=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=r,t=wl,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useSyncExternalStore,i=e.useRef,s=e.useEffect,a=e.useMemo,l=e.useDebugValue;Il.useSyncExternalStoreWithSelector=function(e,t,r,c,d){var h,u=i(null);null===u.current?(h={hasValue:!1,value:null},u.current=h):h=u.current;var p=a((function(){var e,o,i=!1,s=function(t){if(!i){i=!0,e=t;var r=c(t);if(void 0!==d&&h.hasValue){var s=h.value;if(d(s,r))return o=s,s}return o=r,r}var a=o;if(n(e,t))return a;var l=c(t);return void 0!==d&&d(a,l)?a:(e=t,o=l,l)},a=void 0===r?null:r;return[function(){return s(t())},null===a?void 0:function(){return s(a())}]}),[t,r,c,d]),f=p[0],m=p[1],g=o(e,f,m);return s((function(){h.hasValue=!0,h.value=g}),[g]),l(g),g},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Il);var zl=Al.exports;const Pl="undefined"!=typeof window?d:l;class Bl{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)}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){const e=()=>{this.transactionNumber+=1,this.subscribers.forEach((e=>e()))},t=this.editor;return t.on("transaction",e),()=>{t.off("transaction",e)}}}}const Ll="production"!==process.env.NODE_ENV,$l="undefined"==typeof window,Vl=$l||Boolean("undefined"!=typeof window&&window.next);class Fl{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)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach((e=>e()))}getInitialEditor(){if(void 0===this.options.current.immediatelyRender)return $l||Vl?(Ll&&console.warn("Tiptap Error: SSR has been detected, please set `immediatelyRender` explicitly to `false` to avoid hydration mismatches."),null):this.createEditor();if(this.options.current.immediatelyRender&&$l&&Ll)throw new Error("Tiptap Error: SSR has been detected, and `immediatelyRender` has been set to `true` this is an unsupported configuration that may result in errors, explicitly set `immediatelyRender` to `false` to avoid hydration mismatches.");return this.options.current.immediatelyRender?this.createEditor():null}createEditor(){const e={...this.options.current,onBeforeCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBeforeCreate)||void 0===n?void 0:n.call(t,...e)},onBlur:(...e)=>{var t,n;return null===(n=(t=this.options.current).onBlur)||void 0===n?void 0:n.call(t,...e)},onCreate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onCreate)||void 0===n?void 0:n.call(t,...e)},onDestroy:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDestroy)||void 0===n?void 0:n.call(t,...e)},onFocus:(...e)=>{var t,n;return null===(n=(t=this.options.current).onFocus)||void 0===n?void 0:n.call(t,...e)},onSelectionUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onSelectionUpdate)||void 0===n?void 0:n.call(t,...e)},onTransaction:(...e)=>{var t,n;return null===(n=(t=this.options.current).onTransaction)||void 0===n?void 0:n.call(t,...e)},onUpdate:(...e)=>{var t,n;return null===(n=(t=this.options.current).onUpdate)||void 0===n?void 0:n.call(t,...e)},onContentError:(...e)=>{var t,n;return null===(n=(t=this.options.current).onContentError)||void 0===n?void 0:n.call(t,...e)},onDrop:(...e)=>{var t,n;return null===(n=(t=this.options.current).onDrop)||void 0===n?void 0:n.call(t,...e)},onPaste:(...e)=>{var t,n;return null===(n=(t=this.options.current).onPaste)||void 0===n?void 0:n.call(t,...e)}};return new _a(e)}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?void 0:r[n])})):e[n]===t[n])))}onRender(e){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&0===e.length?Fl.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(e),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(null===this.previousDeps)return void(this.previousDeps=e);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(){const e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout((()=>{this.isComponentMounted&&this.instanceId===e?t&&t.setOptions(this.options.current):t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))}),1)}}function jl(e={},t=[]){const n=a(e);n.current=e;const[r]=s((()=>new Fl(n))),o=wl.useSyncExternalStore(r.subscribe,r.getEditor,r.getServerSnapshot);return c(o),l(r.onRender(t)),function(e){var t;const[n]=s((()=>new Bl(e.editor))),r=zl.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getServerSnapshot,e.selector,null!==(t=e.equalityFn)&&void 0!==t?t:El);Pl((()=>n.watch(e.editor)),[e.editor,n]),c(r)}({editor:o,selector:({transactionNumber:t})=>!1===e.shouldRerenderOnTransaction?null:e.immediatelyRender&&0===t?0:t+1}),o}h({editor:null}).Consumer;const _l=h({onDragStart:void 0});r.forwardRef(((e,t)=>{const{onDragStart:n}=u(_l),o=e.as||"div";return r.createElement(o,{...e,ref:t,"data-node-view-wrapper":"",onDragStart:n,style:{whiteSpace:"normal",...e.style}})}));const Hl=/^\s*>\s$/,ql=Ja.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Wa({find:Hl,type:this.type})]}}),Wl=/(^|[^`])`([^`]+)`(?!`)/,Jl=/(^|[^`])`([^`]+)`(?!`)/g,Kl=Us.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[Ha({find:Wl,type:this.type})]},addPasteRules(){return[Ka({find:Jl,type:this.type})]}}),Ul=/^```([a-z]+)?[\s\n]$/,Gl=/^~~~([a-z]+)?[\s\n]$/,Xl=Ja.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,"")))[0];return r||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",Is(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith("\n\n");return!(!i||!s)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const s=o.after();if(void 0===s)return!1;return r.nodeAt(s)?e.commands.command((({tr:e})=>(e.setSelection(rn.near(r.resolve(s))),!0))):e.commands.exitCode()}}},addInputRules(){return[qa({find:Ul,type:this.type,getAttributes:e=>({language:e[1]})}),qa({find:Gl,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Cn({key:new Mn("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=null==o?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:a}=e.state,l=a.text(n.replace(/\r\n?/g,"\n"));return s.replaceSelectionWith(this.type.create({language:i},l)),s.selection.$from.parent.type!==this.type&&s.setSelection(ln.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),e.dispatch(s),!0}}})]}});function Yl(e={}){return new Cn({view:t=>new Zl(t,e)})}class Zl{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?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}}))}destroy(){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=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent,r=this.editorView.dom,o=r.getBoundingClientRect(),i=o.width/r.offsetWidth,s=o.height/r.offsetHeight;if(n){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let o=t.getBoundingClientRect(),i=n?o.bottom:o.top;n&&r&&(i=(i+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let a=this.width/2*s;e={left:o.left,right:o.right,top:i-a,bottom:i+a}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos),n=this.width/2*i;e={left:t.left-n,right:t.left+n,top:t.top,bottom:t.bottom}}let a,l,c=this.editorView.dom.offsetParent;if(this.element||(this.element=c.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",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!c||c==document.body&&"static"==getComputedStyle(c).position)a=-pageXOffset,l=-pageYOffset;else{let e=c.getBoundingClientRect(),t=e.width/c.offsetWidth,n=e.height/c.offsetHeight;a=e.left-c.scrollLeft*t,l=e.top-c.scrollTop*n}this.element.style.left=(e.left-a)/i+"px",this.element.style.top=(e.top-l)/s+"px",this.element.style.width=(e.right-e.left)/i+"px",this.element.style.height=(e.bottom-e.top)/s+"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,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=jt(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)}}const Ql=ea.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[Yl(this.options)]}});class ec extends rn{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return ec.valid(n)?new ec(n):rn.near(n)}content(){return pe.empty}eq(e){return e instanceof ec&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new ec(e.resolve(t.pos))}getBookmark(){return new tc(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}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)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}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){e:for(;;){if(!n&&ec.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let i=e.node(n);if(t>0?e.indexAfter(n)<i.childCount:e.index(n)>0){o=i.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let s=e.doc.resolve(r);if(ec.valid(s))return s}for(;;){let i=t>0?o.firstChild:o.lastChild;if(!i){if(o.isAtom&&!o.isText&&!dn.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=i,r+=t;let s=e.doc.resolve(r);if(ec.valid(s))return s}return null}}}ec.prototype.visible=!1,ec.findFrom=ec.findGapCursorFrom,rn.jsonID("gapcursor",ec);class tc{constructor(e){this.pos=e}map(e){return new tc(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ec.valid(t)?new ec(t):rn.near(t)}}const nc=es({ArrowLeft:rc("horiz",-1),ArrowRight:rc("horiz",1),ArrowUp:rc("vert",-1),ArrowDown:rc("vert",1)});function rc(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let i=e.selection,s=t>0?i.$to:i.$from,a=i.empty;if(i instanceof ln){if(!o.endOfTextblock(n)||0==s.depth)return!1;a=!1,s=e.doc.resolve(t>0?s.after():s.before())}let l=ec.findGapCursorFrom(s,t,a);return!!l&&(r&&r(e.tr.setSelection(new ec(l))),!0)}}function oc(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!ec.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&dn.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new ec(r))),!0)}function ic(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof ec))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 o=ae.empty;for(let e=r.length-1;e>=0;e--)o=ae.from(r[e].createAndFill(null,o));let i=e.state.tr.replace(n.pos,n.pos,new pe(o,0,0));return i.setSelection(ln.near(i.doc.resolve(n.pos+1))),e.dispatch(i),!1}function sc(e){if(!(e.selection instanceof ec))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",pi.create(e.doc,[di.widget(e.selection.head,t,{key:"gapcursor"})])}const ac=ea.create({name:"gapCursor",addProseMirrorPlugins:()=>[new Cn({props:{decorations:sc,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&ec.valid(n)?new ec(n):null,handleClick:oc,handleKeyDown:nc,handleDOMEvents:{beforeinput:ic}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=Bs(Es(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),lc=Ja.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",Is(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:i}=this.options,{splittableMarks:s}=r.extensionManager,a=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&a&&i){const t=a.filter((e=>s.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),cc=Ja.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Is(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>qa({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var dc=200,hc=function(){};hc.prototype.append=function(e){return e.length?(e=hc.from(e),!this.length&&e||e.length<dc&&this.leafAppend(e)||this.length<dc&&e.leafPrepend(this)||this.appendInner(e)):this},hc.prototype.prepend=function(e){return e.length?hc.from(e).append(this):this},hc.prototype.appendInner=function(e){return new pc(this,e)},hc.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?hc.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},hc.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},hc.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)},hc.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},hc.from=function(e){return e instanceof hc?e:e&&e.length?new uc(e):hc.empty};var uc=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 o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=dc)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=dc)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}(hc);hc.empty=new uc([]);var pc=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 o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},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}(hc);class fc{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new mc(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new mc(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new fc(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),d=new mc(e.mapping.maps[n],c,t);(l=a&&a.merge(d))&&(d=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(d),t&&(i++,t=void 0),r||(a=d)}let l=i-n.depth;return l>yc&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new fc(s.append(o),i)}remapping(e,t){let n=new vt;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new fc(this.items.append(e.map((e=>new mc(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new mc(l,i,c))}else n.push(new mc(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new mc(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),d=new fc(c,s);return d.emptyItemCount()>500&&(d=d.compress(this.items.length-n.length)),d}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=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new mc(s.invert(),e,a),d=r.length-1;(l=r.length&&r[d].merge(c))?r[d]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new fc(hc.from(r.reverse()),o)}}fc.empty=new fc(hc.empty,0);class mc{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 mc(t.getMap().invert(),t,this.selection)}}}class gc{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const yc=20;function vc(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach(((e,n,r,o)=>t.push(r,o)));return t}function bc(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}let xc=!1,wc=null;function kc(e){let t=e.plugins;if(wc!=t){xc=!1,wc=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){xc=!0;break}}return xc}const Cc=new Mn("history"),Sc=new Mn("closeHistory");function Nc(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Cn({key:Cc,state:{init:()=>new gc(fc.empty,fc.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(Cc);if(i)return i.historyState;n.getMeta(Sc)&&(e=new gc(e.done,e.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(Cc))return s.getMeta(Cc).redo?new gc(e.done.addTransform(n,void 0,r,kc(t)),e.undone,vc(n.mapping.maps),e.prevTime,e.prevComposition):new gc(e.done,e.undone.addTransform(n,void 0,r,kc(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new gc(e.done.rebased(n,o),e.undone.rebased(n,o),bc(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new gc(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),bc(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),i=0==e.prevTime||!s&&e.prevComposition!=o&&(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 o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),a=s?bc(e.prevRanges,n.mapping):vc(n.mapping.maps);return new gc(e.done.addTransform(n,i?t.selection.getBookmark():void 0,r,kc(t)),fc.empty,a,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?Oc:"historyRedo"==n?Tc:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function Mc(e,t){return(n,r)=>{let o=Cc.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let i=function(e,t,n){let r=kc(t),o=Cc.get(t).spec.config,i=(n?e.undone:e.done).popEvent(t,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),a=(n?e.done:e.undone).addTransform(i.transform,t.selection.getBookmark(),o,r),l=new gc(n?a:i.remaining,n?i.remaining:a,null,0,-1);return i.transform.setSelection(s).setMeta(Cc,{redo:n,historyState:l})}(o,n,e);i&&r(t?i.scrollIntoView():i)}return!0}}const Oc=Mc(!1,!0),Tc=Mc(!0,!0),Ec=ea.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>Oc(e,t),redo:()=>({state:e,dispatch:t})=>Tc(e,t)}),addProseMirrorPlugins(){return[Nc(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()}}}),Ac=Ja.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",Is(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:o}=n,i=e();return 0===r.parentOffset?i.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):n instanceof dn?i.insertContentAt(o.pos,{type:this.name}):i.insertContent({type:this.name}),i.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(ln.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(dn.create(e.doc,t.pos)):e.setSelection(ln.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(ln.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[(e={find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type},new Hs({find:e.find,handler:({state:t,range:n,match:r})=>{const o=Bs(e.getAttributes,void 0,r)||{},{tr:i}=t,s=n.from;let a=n.to;const l=e.type.create(o);if(r[1]){let e=s+r[0].lastIndexOf(r[1]);e>a?e=a:a=e+r[1].length;const t=r[0][r[0].length-1];i.insertText(t,s+r[0].length-1),i.replaceWith(e,a,l)}else if(r[0]){const t=e.type.isInline?s:s-1;i.insert(t,e.type.create(o)).delete(i.mapping.map(s),i.mapping.map(a))}i.scrollIntoView()}}))];var e}}),Dc=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,Rc=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,Ic=Us.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",Is(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[Ha({find:Dc,type:this.type})]},addPasteRules(){return[Ka({find:Rc,type:this.type})]}}),zc=ea.create({name:"starterKit",addExtensions(){const e=[];return!1!==this.options.bold&&e.push(Za.configure(this.options.bold)),!1!==this.options.blockquote&&e.push(ql.configure(this.options.blockquote)),!1!==this.options.bulletList&&e.push(tl.configure(this.options.bulletList)),!1!==this.options.code&&e.push(Kl.configure(this.options.code)),!1!==this.options.codeBlock&&e.push(Xl.configure(this.options.codeBlock)),!1!==this.options.document&&e.push(nl.configure(this.options.document)),!1!==this.options.dropcursor&&e.push(Ql.configure(this.options.dropcursor)),!1!==this.options.gapcursor&&e.push(ac.configure(this.options.gapcursor)),!1!==this.options.hardBreak&&e.push(lc.configure(this.options.hardBreak)),!1!==this.options.heading&&e.push(cc.configure(this.options.heading)),!1!==this.options.history&&e.push(Ec.configure(this.options.history)),!1!==this.options.horizontalRule&&e.push(Ac.configure(this.options.horizontalRule)),!1!==this.options.italic&&e.push(al.configure(this.options.italic)),!1!==this.options.listItem&&e.push(ll.configure(this.options.listItem)),!1!==this.options.orderedList&&e.push(hl.configure(this.options.orderedList)),!1!==this.options.paragraph&&e.push(ul.configure(this.options.paragraph)),!1!==this.options.strike&&e.push(Ic.configure(this.options.strike)),!1!==this.options.text&&e.push(pl.configure(this.options.text)),e}});function Pc(t){var n=t.size,r=void 0===n?18:n;return e("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M6.75 3.75H15.75M2.25 3.75H3.75M6.75 9H15.75M2.25 9H3.75M6.75 14.25H15.75M2.25 14.25H3.75",stroke:"#27272A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Bc(t){var n=t.size,r=void 0===n?18:n;return e("svg",{width:r,height:r,viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e("path",{d:"M8.25 4.5H15.75M8.25 9H15.75M8.25 13.5H15.75M2.25 11.25H3.375C3.58425 11.25 3.6885 11.25 3.7755 11.2672C3.95012 11.302 4.11053 11.3877 4.23642 11.5136C4.36231 11.6395 4.44804 11.7999 4.48275 11.9745C4.5 12.0615 4.5 12.165 4.5 12.375C4.5 12.585 4.5 12.6885 4.48275 12.7755C4.44804 12.9501 4.36231 13.1105 4.23642 13.2364C4.11053 13.3623 3.95012 13.448 3.7755 13.4827C3.6885 13.5 3.585 13.5 3.375 13.5C3.165 13.5 3.0615 13.5 2.9745 13.5173C2.79988 13.552 2.63947 13.6377 2.51358 13.7636C2.38769 13.8895 2.30196 14.0499 2.26725 14.2245C2.25 14.3115 2.25 14.415 2.25 14.625V15.3C2.25 15.5122 2.25 15.618 2.316 15.684C2.382 15.75 2.4885 15.75 2.7 15.75H4.5M2.25 2.25H3.15C3.20967 2.25 3.2669 2.27371 3.3091 2.3159C3.35129 2.3581 3.375 2.41533 3.375 2.475V6.75M3.375 6.75H2.25M3.375 6.75H4.5",stroke:"#27272A",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var Lc=function(n){var r=n.initialContent,o=void 0===r?"":r,i=n.onUpdate,s=jl({extensions:[zc,nl,ul,pl,Za,al,fl,tl,hl,ll],content:o,onUpdate:function(e){var t=e.editor;i(t.getHTML())}});return t("div",{className:"rounded-lg border",children:[t("div",{className:"flex gap-4 border-b bg-gray-50 p-2",children:[e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleBold().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("bold"))?"rounded bg-gray-200":""),type:"button",children:e(M,{size:18})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleItalic().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("italic"))?"rounded bg-gray-200":""),type:"button",children:e(V,{size:18})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleUnderline().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("underline"))?"rounded bg-gray-200":""),type:"button",children:e(j,{size:18})}),e("span",{className:"mx-2 h-6 border-r"}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleBulletList().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("bulletList"))?"rounded bg-gray-200":""),type:"button",children:e(Pc,{})}),e("button",{onClick:function(){return null==s?void 0:s.chain().focus().toggleOrderedList().run()},className:"mx-1 p-1 ".concat((null==s?void 0:s.isActive("orderedList"))?"rounded bg-gray-200":""),type:"button",children:e(Bc,{})})]}),e(Ml,{editor:s,className:"min-h-32 p-4"})]})};function $c(n){var r=n.options,o=n.placeholder,i=void 0===o?"Select an option":o,a=n.onChange,l=n.value,c=n.size,d=void 0===c?"md":c,h=n.className,u=void 0===h?"":h,p=n.name,f=n.id,m=n.disabled,g=void 0!==m&&m,y=n.label,v=n.required,b=s(!1),x=b[0],w=b[1],k=s(l&&r.find((function(e){return e.value===l}))||null),C=k[0],S=k[1];return t("div",{className:"relative inline-block",children:[y&&t("label",{htmlFor:f,className:"mb-1 block text-sm font-medium text-gray-700",children:[y,v&&e("span",{className:"ml-1 text-red-500",children:"*"})]}),t("button",{type:"button",className:"flex w-full items-center justify-between rounded-md border border-gray-200 bg-white shadow-sm ".concat({sm:"px-3 py-2 text-sm",md:"px-4 py-2.5 text-base"}[d]," text-gray-700 hover:bg-gray-50 focus:outline-none ").concat(g?"cursor-not-allowed opacity-50":""," ").concat(u),onClick:function(){return!g&&w(!x)},disabled:g,id:f,children:[e("span",{className:"truncate",children:C?(null==C?void 0:C.label)||C.value:i}),e(T,{className:"ml-2 h-4 w-4 ".concat(x?"rotate-180 transform":"")})]}),x&&e("div",{className:"absolute z-10 mt-1 max-h-60 w-full min-w-[200px] p-1 font-medium text-sm overflow-auto rounded-lg bg-white shadow-xl",children:r.map((function(n){return t("div",{className:"cursor-pointer px-3 py-2 hover:bg-gray-100 rounded-lg flex justify-between item-center ".concat((null==C?void 0:C.value)===n.value?"bg-gray-50 text-black":"text-gray-900"),onClick:function(){return function(e){S(e),a(e.value),w(!1)}(n)},children:[e("div",{children:n.label||n.value}),(null==C?void 0:C.value)===n.value&&e("div",{children:e(O,{size:15,className:"text-primary"})})]},n.value)}))}),p&&e("input",{type:"hidden",name:p,value:(null==C?void 0:C.value)||""})]})}var Vc=function(n){var r=n.message,o=n.description,i=n.type,a=void 0===i?"info":i,c=n.duration,d=void 0===c?5e3:c,h=n.onClose,u=s(!0),p=u[0],f=u[1],m=s(100),g=m[0],y=m[1],v={success:{icon:e(D,{className:"h-5 w-5"}),bgColor:"bg-green-50",borderColor:"border-green-300",textColor:"text-green-800",iconColor:"text-green-500",progressColor:"bg-green-500"},error:{icon:e(A,{className:"h-5 w-5"}),bgColor:"bg-rose-50",borderColor:"border-rose-300",textColor:"text-rose-800",iconColor:"text-rose-500",progressColor:"bg-rose-500"},info:{icon:e($,{className:"h-5 w-5"}),bgColor:"bg-blue-50",borderColor:"border-blue-300",textColor:"text-blue-800",iconColor:"text-blue-500",progressColor:"bg-blue-500"},warning:{icon:e(F,{className:"h-5 w-5"}),bgColor:"bg-amber-50 ",borderColor:"border-amber-300 ",textColor:"text-amber-800",iconColor:"text-amber-500",progressColor:"bg-amber-500"}};l((function(){var e=setTimeout((function(){f(!1),setTimeout((function(){null==h||h()}),300)}),d),t=setInterval((function(){y((function(e){var t=e-100/(d/100);return t<=0?0:t}))}),100);return function(){clearTimeout(e),clearInterval(t)}}),[d,h]);var b=v[a],x=b.icon,w=b.bgColor,k=b.borderColor,C=b.textColor,S=b.iconColor,N=b.progressColor;return e("div",{className:"fixed right-4 top-4 z-50 transform transition-all duration-300 ".concat(p?"translate-x-0 opacity-100":"translate-x-full opacity-0"),children:t("div",{className:"flex w-72 rounded-lg border shadow-lg md:w-96 ".concat(k," ").concat(w," p-4"),children:[e("div",{className:"flex-shrink-0 ".concat(S),children:x}),t("div",{className:"ml-3 w-full",children:[t("div",{className:"flex items-start justify-between",children:[e("div",{className:"text-md font-semibold ".concat(C),children:r}),e("button",{onClick:function(){f(!1),setTimeout((function(){null==h||h()}),300)},className:"text-gray-600 hover:text-gray-600 focus:outline-none",children:e(_,{className:"h-4 w-4"})})]}),o&&e("p",{className:"mt-1 text-sm ".concat(C," opacity-80"),children:o}),e("div",{className:"mt-2 h-1 w-full rounded-full bg-gray-200",children:e("div",{className:"".concat(N," h-1 rounded-full transition-all duration-100 ease-linear"),style:{width:"".concat(g,"%")}})})]})]})})},Fc=null,jc=h(void 0),_c=function(n){var r=n.children,o=s([]),i=o[0],a=o[1],l=p((function(e){a((function(t){return t.filter((function(t){return t.id!==e}))}))}),[]),c=p((function(e){var t=Math.random().toString(36).substring(2,9),n=K(K({},e),{id:t,onClose:function(){return l(t)}});a((function(e){return G(G([],e,!0),[n],!1)}))}),[l]),d=p((function(e){return function(t,n){c({message:t,description:n,type:e})}}),[c]),h={showAlert:c,success:d("success"),error:d("error"),info:d("info"),warning:d("warning")};return Fc=h,t(jc.Provider,{value:h,children:[r,e("div",{className:"fixed right-4 top-4 z-50 space-y-2 w-full max-w-xs",children:i.map((function(t,n){return e("div",{style:{transform:"translateY(".concat(10*n,"px)"),zIndex:50-n},children:e(Vc,K({},t))},t.id)}))})]})},Hc=function(){var e=u(jc);if(void 0===e)throw new Error("useAlert must be used within a AlertProvider");return e},qc={success:function(e,t){Fc?Fc.success(e,t):console.warn("AlertProvider not mounted yet")},error:function(e,t){Fc?Fc.error(e,t):console.warn("AlertProvider not mounted yet")},info:function(e,t){Fc?Fc.info(e,t):console.warn("AlertProvider not mounted yet")},warning:function(e,t){Fc?Fc.warning(e,t):console.warn("AlertProvider not mounted yet")},show:function(e){Fc?Fc.showAlert(e):console.warn("AlertProvider not mounted yet")}},Wc=function(n){var r=n.isOpen,o=n.onConfirm,i=n.onCancel,s=n.title,c=n.message,d=n.confirmText,h=void 0===d?"Confirm":d,u=n.cancelText,p=void 0===u?"Cancel":u,f=n.type,m=void 0===f?"default":f,g=n.showIcon,y=void 0===g||g,v=n.showCloseButton,x=void 0===v||v,w=n.closeOnOverlayClick,k=void 0===w||w,C=n.closeOnEscape,S=void 0===C||C,N=n.isLoading,M=void 0!==N&&N,O=n.className,T=void 0===O?"":O,E=n.overlayClassName,A=void 0===E?"":E,I=n.maxWidth,z=void 0===I?"sm":I,P=a(null),B=a(null),L=a(null);l((function(){return r?(L.current=document.activeElement,setTimeout((function(){var e,t,n;"danger"===m?null===(t=null===(e=P.current)||void 0===e?void 0:e.querySelector("[data-cancel-button]"))||void 0===t||t.focus():null===(n=B.current)||void 0===n||n.focus()}),100),document.body.style.overflow="hidden"):(document.body.style.overflow="unset",L.current&&L.current.focus()),function(){document.body.style.overflow="unset"}}),[r,m]),l((function(){var e=function(e){"Escape"===e.key&&S&&!M&&i()};return r&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,S,i,M]);var V=function(){M||i()},j={default:{icon:$,iconColor:"text-blue-600",iconBg:"bg-blue-100",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"},danger:{icon:R,iconColor:"text-red-600",iconBg:"bg-red-100",confirmButton:"bg-red-600 hover:bg-red-700 focus:ring-red-500"},warning:{icon:F,iconColor:"text-yellow-600",iconBg:"bg-yellow-100",confirmButton:"bg-yellow-600 hover:bg-yellow-700 focus:ring-yellow-500"},success:{icon:D,iconColor:"text-green-600",iconBg:"bg-green-100",confirmButton:"bg-green-600 hover:bg-green-700 focus:ring-green-500"},info:{icon:$,iconColor:"text-blue-600",iconBg:"bg-blue-100",confirmButton:"bg-blue-600 hover:bg-blue-700 focus:ring-blue-500"}}[m],H=j.icon;return r?t("div",{className:"fixed inset-0 z-50 ".concat(A),role:"dialog","aria-modal":"true","aria-labelledby":s?"confirmation-title":void 0,"aria-describedby":"confirmation-message",children:[e("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-300",onClick:function(e){e.target===e.currentTarget&&k&&!M&&i()}}),e("div",{className:"fixed inset-0 flex items-center justify-center p-4",children:t("div",{ref:P,className:"relative w-full ".concat({sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"}[z]," animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-4 transform rounded-2xl bg-white shadow-2xl transition-all duration-300 ease-out ").concat(T," "),onClick:function(e){return e.stopPropagation()},children:[x&&e("button",{onClick:V,disabled:M,className:"absolute right-4 top-4 flex h-8 w-8 items-center justify-center rounded-full text-gray-400 transition-colors duration-200 hover:bg-gray-100 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","aria-label":"Close",children:e(_,{size:20})}),t("div",{className:"p-6",children:[t("div",{className:"flex flex-col items-center justify-center space-y-4",children:[y&&e("div",{className:"h-12 w-12 flex-shrink-0 rounded-full ".concat(j.iconBg," flex items-center justify-center"),children:e(H,{size:24,className:j.iconColor})}),t("div",{className:"min-w-0 flex-1 justify-center",children:[s&&e("h3",{id:"confirmation-title",className:"mb-1 text-center text-lg font-semibold text-gray-900",children:s}),e("p",{id:"confirmation-message",className:"leading-relaxed text-gray-600",children:c})]})]}),t("div",{className:"flex ".concat("justify-center"," mt-6 space-x-3"),children:[e(b,{variant:"neutral",outline:!0,size:"small","data-cancel-button":"",onClick:V,disabled:M,children:p}),e("button",{ref:B,onClick:function(){M||o()},disabled:M,className:"flex min-w-[80px] items-center justify-center rounded-xl px-4 py-2 text-sm font-medium text-white transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ".concat(j.confirmButton," "),children:M?e("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-white border-t-transparent"}):h})]})]})]})})]}):null},Jc=function(n){var r=n.isOpen,o=n.onClose,i=n.title,s=n.children,c=n.size,d=void 0===c?"md":c,h=n.position,u=void 0===h?"right":h,p=n.showCloseButton,f=void 0===p||p,m=n.closeOnOverlayClick,g=void 0===m||m,y=n.closeOnEscape,v=void 0===y||y,b=n.className,x=void 0===b?"":b,w=n.overlayClassName,k=void 0===w?"":w,C=n.contentClassName,S=void 0===C?"":C,N=n.headerClassName,M=void 0===N?"":N,O=n.footer,T=n.footerClassName,E=void 0===T?"":T,A=n.maxHeight,D=void 0!==A&&A,R=a(null),I=a(null);l((function(){var e;return r?(I.current=document.activeElement,null===(e=R.current)||void 0===e||e.focus(),document.body.style.overflow="hidden"):(document.body.style.overflow="unset",I.current&&I.current.focus()),function(){document.body.style.overflow="unset"}}),[r]),l((function(){var e=function(e){"Escape"===e.key&&v&&o()};return r&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[r,v,o]);var z=function(e){e.target===e.currentTarget&&g&&"full"!==d&&o()};return r?t("div",{className:"fixed inset-0 z-50 ".concat(k),role:"dialog","aria-modal":"true","aria-labelledby":i?"modal-title":void 0,children:["full"!==d&&e("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-sm transition-opacity duration-700",onClick:z}),e("div",{className:"fixed inset-0 flex ".concat("p-0"," ").concat(function(){if("full"===d)return"items-start justify-start";return{left:"items-start justify-start",right:"items-start justify-end",center:"items-center justify-center"}[u]}()),onClick:z,children:t("div",{ref:R,tabIndex:-1,className:"\n relative w-full ".concat({xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl",full:"w-full h-full"}[d]," bg-white shadow-2xl transform transition-all duration-700 ease-out flex flex-col\n ").concat("full"===d?"h-full max-h-screen overflow-hidden":"left"===u||"right"===u?"h-full ".concat(D?"max-h-screen":""):"".concat(D?"max-h-[90vh] overflow-hidden":""),"\n ").concat("full"===d?"animate-in fade-in-0":"center"===u?"animate-in fade-in-0 zoom-in-95":"left"===u?"animate-in slide-in-from-left-full":"animate-in slide-in-from-right-full","\n ").concat(x,"\n "),onClick:function(e){return e.stopPropagation()},children:[(i||f)&&t("div",{className:"flex items-center justify-between px-6 py-3 border-b border-gray-200 flex-shrink-0 ".concat(M),children:[i&&e("h2",{id:"modal-title",className:"text-xl font-semibold text-gray-900 truncate pr-4",children:i}),f&&e("button",{onClick:o,className:"flex items-center justify-center w-8 h-8 rounded-full text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2","aria-label":"Close modal",children:e(_,{size:20})})]}),e("div",{className:"flex-1 min-h-0 overflow-y-auto ".concat(D||"full"===d?"overflow-y-auto":""," ").concat(S),children:e("div",D&&("left"===u||"right"===u)||"full"===d?{className:"p-6 min-h-0 flex-1",children:s}:{className:"p-6",children:s})}),O&&e("div",{className:"px-6 py-4 border-t border-gray-200 flex-shrink-0 ".concat(""," ").concat(E),children:O})]})})]}):null},Kc=function(){var n=r.useState(!1),o=n[0],i=n[1],s=r.useState("left"),a=s[0],l=s[1],c=r.useState("md"),d=c[0],h=c[1],u=t("div",{className:"flex justify-end space-x-3",children:[e("button",{onClick:function(){return i(!1)},className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200",children:"Cancel"}),e("button",{onClick:function(){return i(!1)},className:"px-4 py-2 text-sm font-medium text-white bg-blue-600 rounded-lg hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition-colors duration-200",children:"Save Changes"})]});return t("div",{className:"p-8 space-y-4",children:[t("div",{className:"flex flex-wrap gap-4 mb-6",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Position"}),t("select",{value:a,onChange:function(e){return l(e.target.value)},className:"border border-gray-300 rounded-md px-3 py-2 text-sm",disabled:"full"===d,children:[e("option",{value:"left",children:"Left"}),e("option",{value:"right",children:"Right"}),e("option",{value:"center",children:"Center"})]})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Size"}),t("select",{value:d,onChange:function(e){return h(e.target.value)},className:"border border-gray-300 rounded-md px-3 py-2 text-sm",children:[e("option",{value:"xs",children:"Extra Small"}),e("option",{value:"sm",children:"Small"}),e("option",{value:"md",children:"Medium"}),e("option",{value:"lg",children:"Large"}),e("option",{value:"xl",children:"Extra Large"}),e("option",{value:"2xl",children:"2X Large"}),e("option",{value:"full",children:"Full Screen"})]})]})]}),e("button",{onClick:function(){return i(!0)},className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-200 font-medium",children:"Open Modal"}),e(Jc,{isOpen:o,onClose:function(){return i(!1)},title:"Example Modal",size:d,position:a,footer:u,maxHeight:"center"!==a,children:t("div",{className:"space-y-4",children:[e("p",{className:"text-gray-600",children:"This is an example of the multipurpose modal component. It supports different sizes, positions, and configurations."}),t("div",{className:"bg-gray-50 p-4 rounded-lg",children:[e("h4",{className:"font-medium text-gray-900 mb-2",children:"Features:"}),t("ul",{className:"text-sm text-gray-600 space-y-1 list-disc list-inside",children:[e("li",{children:"Multiple sizes (xs, sm, md, lg, xl, 2xl, full screen)"}),e("li",{children:"Three positions (left, right, center)"}),e("li",{children:"Customizable styling with className props"}),e("li",{children:"Keyboard navigation and accessibility"}),e("li",{children:"Click outside to close (disabled for full screen)"}),e("li",{children:"Smooth animations"}),e("li",{children:"Optional footer with actions"}),e("li",{children:"Full screen mode without margins or border radius"})]})]}),("left"===a||"right"===a||"full"===d)&&e("div",{className:"space-y-2",children:Array.from({length:20},(function(e,n){return t("p",{className:"text-gray-600",children:["This is paragraph ",n+1," to demonstrate scrolling in side panels","full"===d?" and full screen mode":"","."]},n)}))})]})})]})};function Uc(n){var r=n.currentPage,o=n.totalPages,i=n.totalItems,s=n.itemsPerPage,a=n.onPageChange,l=n.onViewChange,c=n.loading,d=void 0!==c&&c,h=function(e){e>0&&e<=o&&!d&&a&&a(e)},u=(r-1)*s,p=Math.min(u+s,i);return t("div",{className:"flex items-center justify-between border-t border-gray-200 bg-white py-3",children:[t("div",{className:"flex flex-1 justify-between sm:hidden",children:[e("button",{onClick:function(){return h(r-1)},disabled:1===r||d,className:"relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 ".concat(1===r||d?"cursor-not-allowed opacity-50":""),children:"Previous"}),e("button",{onClick:function(){return h(r+1)},disabled:r===o||d,className:"relative ml-3 inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50 ".concat(r===o||d?"cursor-not-allowed opacity-50":""),children:"Next"})]}),t("div",{className:"hidden sm:flex sm:flex-1 sm:items-center sm:justify-between",children:[t("div",{className:"flex items-center justify-center gap-2",children:[t("div",{className:"relative",children:[e("select",{value:s,onChange:function(e){return l&&l(e.target.value)},disabled:d,className:"appearance-none rounded-md border border-gray-300 bg-white py-2 pl-3 pr-8 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",children:[10,20,30,50].map((function(t){return e("option",{value:t,children:t},t)}))}),e("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700",children:e("svg",{className:"h-4 w-4",fill:"currentColor",viewBox:"0 0 20 20",children:e("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]}),t("p",{className:"text-sm text-gray-700",children:[t("span",{children:[i," Entries"]}),t("span",{className:"ml-1",children:["(Showing ",u+1,"-",p," of ",i,")"]})]})]}),e("div",{children:t("nav",{className:"relative z-0 inline-flex gap-2 -space-x-px rounded-md shadow-sm","aria-label":"Pagination",children:[t("button",{onClick:function(){return h(r-1)},disabled:1===r||d,className:"relative inline-flex items-center rounded-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 ".concat(1===r||d?"cursor-not-allowed opacity-50":""),children:[e("span",{className:"sr-only",children:"Previous"}),e("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e("path",{fillRule:"evenodd",d:"M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z",clipRule:"evenodd"})})]}),function(){var e=[];if(o<=5)for(var t=1;t<=o;t++)e.push(t);else{var n=Math.max(1,r-2),i=Math.min(o,n+5-1);i-n<4&&(n=Math.max(1,i-5+1));for(t=n;t<=i;t++)e.push(t)}return e}().map((function(t){return e("button",{onClick:function(){return h(t)},disabled:d,"aria-current":r===t?"page":void 0,className:"relative inline-flex items-center rounded-md border px-4 py-2 text-sm font-semibold ".concat(r===t?"z-10 border-primary-100 bg-primary-50 text-primary":"border-gray-300 bg-white text-gray-500 hover:bg-gray-50"," ").concat(d?"cursor-not-allowed opacity-50":""),children:t},t)})),t(b,{onClick:function(){return h(r+1)},disabled:r===o||d,type:"button",variant:"primary",size:"small",outline:!0,children:["Next Page",e("svg",{className:"h-5 w-5",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e("path",{fillRule:"evenodd",d:"M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z",clipRule:"evenodd"})})]})]})})]})]})}function Gc(t){var r=t.columns,o=t.rows;return e(n,{children:Array.from({length:o}).map((function(t,n){return e("tr",{children:Array.from({length:r}).map((function(t,r){return e("td",{className:"whitespace-nowrap px-6 py-4",children:e("div",{className:"h-4 animate-pulse rounded bg-gray-200"})},"skeleton-cell-".concat(n,"-").concat(r))}))},"skeleton-row-".concat(n))}))})}function Xc(r){var o=r.data,i=r.columns,s=r.itemsPerPage,a=void 0===s?20:s,l=r.onViewChange,c=r.totalItems,d=r.currentPage,h=void 0===d?1:d,u=r.onPageChange,p=r.loading,f=void 0!==p&&p,m=r.showPagination,g=void 0===m||m,y=r.onRowClick,v=r.useCardLayout,b=void 0!==v&&v,x=c||o.length,w=Math.ceil(x/a),k=o,C=function(e){y&&y(e)},S=function(){return t("div",{className:"grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",children:[f&&Array.from({length:a}).map((function(n,r){return e("div",{className:"bg-white rounded-lg border border-gray-200 p-4 animate-pulse",children:e("div",{className:"space-y-3",children:i.slice(0,3).map((function(n,r){return t("div",{className:"flex justify-between items-center",children:[e("div",{className:"h-4 bg-gray-200 rounded w-1/3"}),e("div",{className:"h-4 bg-gray-200 rounded w-1/2"})]},r)}))})},r)})),k.length>0?k.map((function(n,r){return e("div",{onClick:function(){return C(n)},className:"bg-white rounded-lg border border-gray-200 p-4 transition-all duration-200 hover:shadow-md hover:border-gray-300 ".concat(y?"cursor-pointer":""," ").concat(f?"opacity-50":""),children:e("div",{className:"space-y-3",children:i.map((function(r,o){return t("div",{className:"flex justify-between items-start",children:[t("span",{className:"text-sm font-medium text-gray-500 flex-shrink-0 mr-3",children:[r.title,":"]}),e("span",{className:"text-sm text-gray-800 text-right",children:"function"==typeof r.value?r.value(n):n[r.value]})]},o)}))})},r)})):!f&&e("div",{className:"col-span-full",children:e(J,{title:"No Record found"})})]})};return t(n,{children:[b?S():t(n,{children:[e("div",{className:"hidden md:block",children:e("div",{className:"relative overflow-x-auto",children:t("table",{className:"w-full",children:[e("thead",{children:e("tr",{children:i.map((function(t,n){return e("th",{className:"bg-gray-100 px-6 py-3 text-left text-sm font-semibold tracking-wider text-gray-500 ".concat(t.width||""," ").concat(0===n?"rounded-bl-xl rounded-tl-xl":""," ").concat(n===i.length-1?"rounded-br-xl rounded-tr-xl":""," "),children:t.title},n)}))})}),t("tbody",{className:"divide-y divide-gray-200 bg-white \n ".concat(f?"opacity-50":""," ").concat(y?"cursor-pointer":"","\n "),children:[f&&e(Gc,{columns:i.length,rows:a}),k.length>0?k.map((function(t,n){return e("tr",{onClick:function(){return C(t)},className:"hover:bg-gray-50",children:i.map((function(n,r){return e("td",{className:"whitespace-nowrap px-6 py-4 text-sm font-medium text-gray-800",children:"function"==typeof n.value?n.value(t):t[n.value]},r)}))},n)})):!f&&e("tr",{children:e("td",{colSpan:i.length,children:e(J,{title:"No Record found"})})})]})]})})}),e("div",{className:"block md:hidden",children:S()})]}),g&&e(Uc,{currentPage:h,totalPages:w,totalItems:x,itemsPerPage:a,onPageChange:u,onViewChange:l,loading:f})]})}function Yc(n){var r=n.actions,o=n.trigger,i=n.className,c=void 0===i?"":i,d=n.dropdownClassName,h=void 0===d?"":d,u=s(!1),p=u[0],f=u[1],m=a(null),g=function(){f(!p)},y=function(){f(!1)};l((function(){var e=function(e){m.current&&!m.current.contains(e.target)&&y()};return p&&document.addEventListener("mousedown",e),function(){document.removeEventListener("mousedown",e)}}),[p]),l((function(){var e=function(e){"Escape"===e.key&&y()};return p&&document.addEventListener("keydown",e),function(){document.removeEventListener("keydown",e)}}),[p]);return t("div",{className:"relative inline-block ".concat(c),ref:m,children:[e("div",{className:"flex",children:o?e("div",{onClick:g,className:"cursor-pointer",children:o}):e("button",{className:"rounded-md border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-700 transition-colors duration-200 focus:ring-offset-2",onClick:g,"aria-expanded":p,"aria-haspopup":"true",children:e(z,{className:"h-4 w-4"})})}),p&&e("div",{className:"absolute right-0 z-50 mt-1 w-48 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none ".concat(h),children:t("div",{className:"py-1",role:"menu","aria-orientation":"vertical",children:[r.map((function(n,r){return t("button",{className:"flex w-full items-center px-4 py-2 text-left text-sm transition-colors duration-150 ".concat(n.disabled?"cursor-not-allowed bg-gray-50 text-gray-400":"danger"===n.variant?"text-red-700 hover:bg-red-50 hover:text-red-900":"text-gray-700 hover:bg-gray-100 hover:text-gray-900"," "),onClick:function(){return function(e){e.disabled||(e.onClick(),y())}(n)},disabled:n.disabled,role:"menuitem",children:[n.icon&&e("span",{className:"mr-3 flex-shrink-0",children:n.icon}),n.label]},r)})),0===r.length&&e("div",{className:"px-4 py-2 text-sm text-gray-500",children:"No actions available"})]})})]})}var Zc={xs:{width:"4rem",height:"1rem"},sm:{width:"6rem",height:"1.25rem"},md:{width:"8rem",height:"1.5rem"},lg:{width:"12rem",height:"2rem"},xl:{width:"16rem",height:"2.5rem"}},Qc={text:{baseClasses:"rounded",defaultSize:{width:"100%",height:"1rem"}},rectangular:{baseClasses:"",defaultSize:{width:"100%",height:"8rem"}},circular:{baseClasses:"rounded-full aspect-square",defaultSize:{width:"3rem",height:"3rem"}},rounded:{baseClasses:"rounded-lg",defaultSize:{width:"100%",height:"6rem"}},card:{baseClasses:"rounded-lg",defaultSize:{width:"100%",height:"12rem"}},avatar:{baseClasses:"rounded-full aspect-square",defaultSize:{width:"2.5rem",height:"2.5rem"}},button:{baseClasses:"rounded-md",defaultSize:{width:"5rem",height:"2.25rem"}},image:{baseClasses:"rounded",defaultSize:{width:"100%",height:"10rem"}},line:{baseClasses:"rounded-full",defaultSize:{width:"100%",height:"0.25rem"}}},ed=function(t){var n=t.variant,o=void 0===n?"text":n,i=t.animation,s=void 0===i?"pulse":i,a=t.size,l=t.width,c=t.height,d=t.count,h=void 0===d?1:d,u=t.className,p=void 0===u?"":u,f=t.shimmer,m=void 0!==f&&f,g=t.borderRadius,y=t.intensity,v=void 0===y?"medium":y,b=t.delay,x=void 0===b?0:b,w=r.useState(0===x),k=w[0],C=w[1];r.useEffect((function(){!function(){if("undefined"!=typeof document&&!document.getElementById("skeleton-loader-styles")){var e=document.createElement("style");e.id="skeleton-loader-styles",e.textContent="\n @keyframes wave {\n 0% { transform: translateX(-100%); }\n 50% { transform: translateX(100%); }\n 100% { transform: translateX(100%); }\n }\n\n @keyframes shimmer {\n 0% { background-position: -200% 0; }\n 100% { background-position: 200% 0; }\n }\n\n .skeleton-wave {\n animation: wave 1.6s linear infinite;\n position: relative;\n overflow: hidden;\n }\n\n .skeleton-shimmer {\n animation: shimmer 2s ease-in-out infinite;\n background-size: 200% 100%;\n }\n\n .skeleton-wave::after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: linear-gradient(\n 90deg,\n transparent,\n rgba(255, 255, 255, 0.6),\n transparent\n );\n animation: wave 1.6s linear infinite;\n }\n",document.head.appendChild(e)}}()}),[]);var S=Qc[o],N=r.useMemo((function(){return{width:void 0!==l?"number"==typeof l?"".concat(l,"px"):l:a?Zc[a].width:S.defaultSize.width,height:void 0!==c?"number"==typeof c?"".concat(c,"px"):c:a?Zc[a].height:S.defaultSize.height}}),[l,c,a,S]);if(r.useEffect((function(){if(x>0){var e=setTimeout((function(){return C(!0)}),x);return function(){return clearTimeout(e)}}}),[x]),!k)return null;var M=function(){var e=["block","bg-gray-200",S.baseClasses];switch("pulse"===s?e.push("animate-pulse"):"wave"===s&&e.push("animate-wave"),v){case"light":e.push("bg-gray-100");break;case"medium":e.push("bg-gray-200");break;case"dark":e.push("bg-gray-300")}return m&&e.push("bg-gradient-to-r","from-gray-200","via-gray-100","to-gray-200","bg-200%","animate-shimmer"),e.join(" ")},O=function(t){return e("div",{className:"".concat(M()," ").concat(p),style:(n={width:N.width,height:N.height},g&&(n.borderRadius=g),n),"aria-hidden":"true"},t);var n};return h>1?e("div",{className:"space-y-2",children:Array.from({length:h},(function(e,t){return O(t)}))}):O(0)},td=function(t){return e(ed,K({},t,{variant:"text"}))},nd=function(t){return e(ed,K({},t,{variant:"avatar"}))},rd=function(t){return e(ed,K({},t,{variant:"button"}))},od=function(t){return e(ed,K({},t,{variant:"card"}))},id=function(t){return e(ed,K({},t,{variant:"image"}))},sd=function(n){var r=n.showBio,o=void 0===r||r;return t("div",{className:"flex items-start space-x-4",children:[e(nd,{size:"lg"}),t("div",{className:"flex-1 space-y-2",children:[e(td,{width:"60%",height:"1.25rem"}),e(td,{width:"40%",height:"1rem",intensity:"light"}),o&&t("div",{className:"space-y-1 pt-2",children:[e(td,{width:"100%"}),e(td,{width:"80%"}),e(td,{width:"90%"})]})]})]})},ad=function(n){var r=n.itemCount,o=void 0===r?3:r,i=n.showAvatar,s=void 0===i||i,a=n.showMeta,l=void 0===a||a;return e("div",{className:"space-y-4",children:Array.from({length:o},(function(n,r){return t("div",{className:"flex items-start space-x-3",children:[s&&e(nd,{}),t("div",{className:"flex-1 space-y-2",children:[e(td,{width:"75%",height:"1.125rem"}),e(td,{width:"100%",height:"0.875rem",intensity:"light"}),l&&t("div",{className:"flex space-x-4",children:[e(td,{width:"3rem",height:"0.75rem",intensity:"light"}),e(td,{width:"4rem",height:"0.75rem",intensity:"light"})]})]})]},r)}))})},ld=function(n){var r=n.rows,o=void 0===r?5:r,i=n.columns,s=void 0===i?4:i,a=n.showHeader;return t("div",{className:"space-y-3",children:[(void 0===a||a)&&e("div",{className:"flex space-x-4",children:Array.from({length:s},(function(t,n){return e(td,{width:"100%",height:"1rem",intensity:"dark"},n)}))}),e("div",{className:"space-y-2",children:Array.from({length:o},(function(t,n){return e("div",{className:"flex space-x-4",children:Array.from({length:s},(function(t,n){return e(td,{width:"100%",height:"0.875rem"},n)}))},n)}))})]})},cd=function(){return t("div",{className:"bg-white p-5",children:[e(ed,{variant:"text",width:"200px"}),e(ed,{variant:"text",count:3}),e(nd,{size:"lg"}),e(rd,{animation:"wave"}),e(sd,{showBio:!0}),e(ad,{itemCount:5,showAvatar:!0}),e(ld,{rows:5,columns:4}),e(ed,{variant:"card",shimmer:!0,intensity:"dark",borderRadius:"12px",className:"custom-skeleton"})]})},dd="1.0.0",hd={sizes:{xs:{width:"4rem",height:"1rem"},sm:{width:"6rem",height:"1.25rem"},md:{width:"8rem",height:"1.5rem"},lg:{width:"12rem",height:"2rem"},xl:{width:"16rem",height:"2.5rem"}},variants:["text","rectangular","circular","rounded","card","avatar","button","image","line"],animations:["pulse","wave","none"],intensities:["light","medium","dark"]},ud={userProfile:{variant:"avatar",size:"lg",animation:"pulse"},cardTitle:{variant:"text",width:"75%",height:"1.5rem"},cardDescription:{variant:"text",count:2,width:"100%",height:"1rem",intensity:"light"},button:{variant:"button",animation:"wave"},image:{variant:"image",shimmer:!0}},pd=function(n){var r=n.size,o=void 0===r?"md":r,i=n.variant,s=void 0===i?"pulse":i,a=n.color,l=void 0===a?"primary":a,c=n.fullScreen,d=void 0!==c&&c,h=n.text,u=n.className,p=void 0===u?"":u,f=n.image,m=n.imageEffect,g=void 0===m?"pulse":m,y=l.startsWith("#"),v=function(e){return y?"":{text:"text-".concat(l),bg:"bg-".concat(l),border:"border-".concat(l),borderTop:"border-t-".concat(l),borderRight:"border-r-".concat(l)}[e]||""},b={sm:"w-4 h-4",md:"w-8 h-8",lg:"w-12 h-12",xl:"w-16 h-16"},x={sm:"w-8 h-8",md:"w-12 h-12",lg:"w-16 h-16",xl:"w-20 h-20"},w=function(){switch(g){case"bounce":return"animate-bounce";case"spin":return"animate-spin";case"float":return"animate-pulse hover:animate-bounce";case"heartbeat":return"animate-ping";default:return"animate-pulse"}},k=function(){return t("div",{className:"relative flex items-center justify-center",children:[e("img",{src:f,alt:"Loading",className:"".concat(x[o]," object-contain ").concat(w()),style:{filter:"drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1))",animationDuration:"heartbeat"===g?"1.5s":"bounce"===g?"1s":"2s"}}),"float"===g&&e("div",{className:"absolute inset-0 ".concat(x[o]," rounded-full bg-gradient-to-r from-purple-400 to-blue-400 opacity-20 animate-ping"),style:{animationDuration:"2s"}})]})},C=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," border-4 border-gray-200 rounded-full animate-spin ").concat(y?"":v("borderTop")),style:y?{borderTopColor:l}:{}}),e("div",{className:"absolute inset-0 ".concat(b[o]," border-4 border-transparent rounded-full animate-spin ").concat(y?"":v("borderRight")),style:y?{borderRightColor:l,animationDirection:"reverse",animationDuration:"0.75s"}:{animationDirection:"reverse",animationDuration:"0.75s"}})]})},S=function(){return e("div",{className:"flex space-x-1",children:[0,1,2].map((function(t){return e("div",{className:"".concat("sm"===o?"w-2 h-2":"md"===o?"w-3 h-3":"lg"===o?"w-4 h-4":"w-5 h-5"," rounded-full animate-bounce ").concat(y?"":v("bg")),style:y?{backgroundColor:l,animationDelay:"".concat(.2*t,"s"),animationDuration:"1.4s"}:{animationDelay:"".concat(.2*t,"s"),animationDuration:"1.4s"}},t)}))})},N=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," rounded-full animate-pulse ").concat(y?"":v("bg")),style:y?{backgroundColor:l}:{}}),e("div",{className:"absolute inset-0 ".concat(b[o]," rounded-full animate-ping opacity-30 ").concat(y?"":v("bg")),style:y?{backgroundColor:l}:{}})]})},M=function(){return e("div",{className:"flex space-x-1 items-end",children:[0,1,2,3].map((function(t){return e("div",{className:"".concat("sm"===o?"w-1":"md"===o?"w-1.5":"lg"===o?"w-2":"w-2.5"," rounded-sm animate-pulse ").concat(y?"":v("bg")),style:y?{backgroundColor:l,height:"".concat(20+10*t,"px"),animationDelay:"".concat(.15*t,"s"),animationDuration:"1.2s"}:{height:"".concat(20+10*t,"px"),animationDelay:"".concat(.15*t,"s"),animationDuration:"1.2s"}},t)}))})},O=function(){return t("div",{className:"relative",children:[e("div",{className:"".concat(b[o]," border-4 rounded-full animate-ping ").concat(y?"":v("border")),style:y?{borderColor:l}:{}}),e("div",{className:"absolute inset-2 border-4 rounded-full animate-ping ".concat(y?"":v("border")),style:y?{borderColor:l,animationDelay:"0.5s"}:{animationDelay:"0.5s"}})]})},T=t("div",{className:"flex flex-col items-center justify-center space-y-3 ".concat(p),children:[function(){if("image"===s&&f)return e(k,{});switch(s){case"dots":return e(S,{});case"pulse":return e(N,{});case"bars":return e(M,{});case"ripple":return e(O,{});default:return e(C,{})}}(),h&&e("p",{className:"".concat({sm:"text-xs",md:"text-sm",lg:"text-base",xl:"text-lg"}[o]," font-medium animate-pulse ").concat(y?"":v("text")),style:y?{color:l}:{},children:h})]});return d?e("div",{className:"fixed inset-0 bg-white/80 backdrop-blur-sm flex items-center justify-center z-50",children:T}):T},fd=function(){var n=r.useState("blue-500"),o=n[0],i=n[1],s=r.useState("spinner"),a=s[0],l=s[1],c=r.useState("md"),d=c[0],h=c[1],u=r.useState(!1),p=u[0],f=u[1],m=["spinner","dots","pulse","bars","ripple"];return t("div",{className:"p-8 max-w-4xl mx-auto",children:[e("h1",{className:"text-3xl font-bold text-gray-800 mb-8 text-center",children:"Modern Loading Component"}),t("div",{className:"bg-white rounded-xl shadow-lg p-6 mb-8",children:[e("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"Customization"}),t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4 mb-6",children:[t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Color"}),e("div",{className:"flex flex-wrap gap-2",children:[{name:"Blue",value:"blue-500",hex:"#3B82F6"},{name:"Purple",value:"purple-500",hex:"#8B5CF6"},{name:"Green",value:"green-500",hex:"#10B981"},{name:"Red",value:"red-500",hex:"#EF4444"},{name:"Orange",value:"orange-500",hex:"#F59E0B"},{name:"Pink",value:"pink-500",hex:"#EC4899"},{name:"Indigo",value:"indigo-500",hex:"#6366F1"},{name:"Teal",value:"teal-500",hex:"#14B8A6"}].map((function(t){return e("button",{onClick:function(){return i(t.value)},className:"w-8 h-8 rounded-full border-2 transition-all ".concat(o===t.value?"border-gray-400 scale-110":"border-gray-200"),style:{backgroundColor:t.hex},title:"".concat(t.name," (").concat(t.value,")")},t.value)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Variant"}),e("select",{value:a,onChange:function(e){return l(e.target.value)},className:"w-full p-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:m.map((function(t){return e("option",{value:t,children:t&&(null==t?void 0:t.charAt(0).toUpperCase())+(null==t?void 0:t.slice(1))},t)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Size"}),e("select",{value:d,onChange:function(e){return h(e.target.value)},className:"w-full p-2 border border-gray-300 rounded-md focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:["sm","md","lg","xl"].map((function(t){return e("option",{value:t,children:null==t?void 0:t.toUpperCase()},t)}))})]}),t("div",{children:[e("label",{className:"block text-sm font-medium text-gray-600 mb-2",children:"Full Screen"}),e("button",{onClick:function(){return f(!0)},className:"w-full p-2 bg-gray-600 text-white rounded-md hover:bg-gray-700 transition-colors",children:"Demo Full Screen"})]})]}),t("div",{className:"bg-gray-50 rounded-lg p-8 flex flex-col items-center justify-center min-h-32",children:[e(pd,{variant:a,size:d,color:o,text:"Loading..."}),e("div",{className:"mt-4 p-3 bg-white rounded-md shadow-sm",children:t("code",{className:"text-sm text-gray-600",children:['color="',o,'"']})})]})]}),t("div",{className:"bg-white rounded-xl shadow-lg p-6",children:[e("h2",{className:"text-xl font-semibold text-gray-700 mb-4",children:"All Variants"}),e("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-5 gap-6",children:m.map((function(n){return t("div",{className:"text-center",children:[e("div",{className:"bg-gray-50 rounded-lg p-4 flex items-center justify-center h-24 mb-2",children:e(pd,{variant:n,color:o})}),e("p",{className:"text-sm text-gray-600 capitalize",children:n})]},n)}))}),t("div",{className:"mt-6 p-4 bg-blue-50 rounded-lg",children:[e("h3",{className:"font-semibold text-blue-800 mb-2",children:"Usage Examples:"}),t("div",{className:"space-y-2 text-sm",children:[t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Tailwind CSS class"}),e("br",{}),e("code",{children:'<Loading color="primary-500" />'})]}),t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Hex color"}),e("br",{}),e("code",{children:'<Loading color="#your-brand-color" />'})]}),t("div",{className:"bg-white p-2 rounded border",children:[e("code",{className:"text-blue-600",children:"// Custom Tailwind color"}),e("br",{}),e("code",{children:'<Loading color="emerald-400" variant="dots" />'})]})]})]})]}),p&&e(pd,{variant:a,size:d,color:o,text:"Loading in full screen...",fullScreen:!0}),p&&e("button",{onClick:function(){return f(!1)},className:"fixed top-4 right-4 z-50 bg-red-500 text-white px-4 py-2 rounded-md hover:bg-red-600 transition-colors",children:"Close Full Screen"})]})},md=function(n){var r=n.items,o=void 0===r?[]:r,i=n.onBackClick,s=n.showBackButton,a=void 0===s||s,l=n.separator,c=void 0===l?" / ":l,d=n.className;return t("div",{className:"flex gap-2 ".concat(void 0===d?"":d),children:[a&&e("div",{onClick:i,className:"cursor-pointer",children:e(E,{className:"text-gray-500 transition-colors hover:text-gray-700"})}),e("p",{className:"text-gray-400",children:o.map((function(n,r){return t("span",{children:[n.isActive?e("span",{className:"text-primary",children:n.label}):e("span",{className:n.onClick?"cursor-pointer transition-colors hover:text-gray-600":"",onClick:n.onClick,children:n.label}),r<o.length-1&&c]},r)}))})]})},gd=function(r){var o=r.children,i=r.content,c=r.position,d=void 0===c?"top":c,h=r.variant,u=void 0===h?"light":h,p=r.size,f=void 0===p?"md":p,m=r.delay,g=void 0===m?200:m,y=r.disabled,v=void 0!==y&&y,b=r.className,x=void 0===b?"":b,w=s(!1),k=w[0],C=w[1],S=s(d),N=S[0],M=S[1],O=a(null),T=a(null),E=a(null);l((function(){if(k&&T.current&&E.current){var e=T.current,t=E.current.getBoundingClientRect(),n=e.getBoundingClientRect(),r=d;"top"===d&&t.top-n.height<10?r="bottom":"bottom"===d&&t.bottom+n.height>window.innerHeight-10?r="top":"left"===d&&t.left-n.width<10?r="right":"right"===d&&t.right+n.width>window.innerWidth-10&&(r="left"),M(r)}}),[k,d]);var A=function(){v||(O.current&&clearTimeout(O.current),O.current=setTimeout((function(){C(!0)}),g))},D=function(){O.current&&clearTimeout(O.current),C(!1)};l((function(){return function(){O.current&&clearTimeout(O.current)}}),[]);var R={dark:{tooltip:"bg-gray-900 text-white border-gray-700",arrow:{top:"border-t-gray-900",bottom:"border-b-gray-900",left:"border-l-gray-900",right:"border-r-gray-900"}},light:{tooltip:"bg-white text-gray-900 border-gray-200 shadow-lg",arrow:{top:"border-t-white",bottom:"border-b-white",left:"border-l-white",right:"border-r-white"}},accent:{tooltip:"bg-blue-600 text-white border-blue-500",arrow:{top:"border-t-blue-600",bottom:"border-b-blue-600",left:"border-l-blue-600",right:"border-r-blue-600"}}};return v||!i?e(n,{children:o}):t("div",{className:"relative inline-block",children:[e("div",{ref:E,onMouseEnter:A,onMouseLeave:D,onFocus:A,onBlur:D,className:"cursor-help",children:o}),k&&t("div",{ref:T,className:"absolute z-50 ".concat({top:"bottom-full left-1/2 -translate-x-1/2 mb-2",bottom:"top-full left-1/2 -translate-x-1/2 mt-2",left:"right-full top-1/2 -translate-y-1/2 mr-2",right:"left-full top-1/2 -translate-y-1/2 ml-2"}[N]," ").concat(R[u].tooltip," ").concat({sm:"px-2 py-1 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-3 text-base"}[f]," animate-in fade-in-0 zoom-in-95 max-w-xs whitespace-nowrap break-words rounded-lg border font-medium backdrop-blur-sm duration-200 ").concat(x," "),role:"tooltip","aria-hidden":"false",children:[i,e("div",{className:"absolute h-0 w-0 border-4 ".concat({top:"top-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-b-transparent",bottom:"bottom-full left-1/2 -translate-x-1/2 border-l-transparent border-r-transparent border-t-transparent",left:"left-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-r-transparent",right:"right-full top-1/2 -translate-y-1/2 border-t-transparent border-b-transparent border-l-transparent"}[N]," ").concat(R[u].arrow[N]," ")})]})]})},yd=function(t){var n=t.children,r=t.variant,o=void 0===r?"default":r,i=t.size,s=void 0===i?"md":i,a=t.className,l=void 0===a?"":a,c=t.onClick,d=["inline-flex items-center font-medium rounded-full transition-colors duration-200",{default:"bg-gray-100 text-gray-800 hover:bg-gray-200",secondary:"bg-blue-100 text-blue-800 hover:bg-blue-200",success:"bg-green-100 text-green-800 hover:bg-green-200",warning:"bg-yellow-100 text-yellow-800 hover:bg-yellow-200",error:"bg-red-100 text-red-800 hover:bg-red-200",info:"bg-cyan-100 text-cyan-800 hover:bg-cyan-200"}[o],{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"}[s],c?"cursor-pointer":"",l].filter(Boolean).join(" ");return e("span",{className:d,onClick:c,role:c?"button":void 0,tabIndex:c?0:void 0,onKeyDown:c?function(e){"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),c())}:void 0,children:n})};export{jc as AlertContext,_c as AlertProvider,yd as Badge,md as Breadcrumb,b as Button,W as Card,X as CheckBox,Z as CheckBoxDemo,Wc as ConfirmationAlert,J as EmptyStateCard,q as ExportButton,Q as FileUpload,ee as Input,te as InputWithPrefix,pd as Loading,fd as LoadingDemo,Jc as Modal,Kc as ModalExample,Uc as Pagination,Y as RadioGroup,dd as SKELETON_LOADER_VERSION,ud as SKELETON_PATTERNS,hd as SKELETON_PRESETS,ne as Search,re as Select,$c as SelectButton,nd as SkeletonAvatar,rd as SkeletonButton,od as SkeletonCard,id as SkeletonImage,ad as SkeletonList,ed as SkeletonLoader,cd as SkeletonLoaderExample,sd as SkeletonProfile,ld as SkeletonTable,td as SkeletonText,Xc as Table,Yc as TableDropdown,Gc as TableSkeleton,Lc as TextEditor,gd as Tooltip,qc as alert,Hc as useAlert};
51
51
  //# sourceMappingURL=index.mjs.map