@tempots/beatui 1.1.4 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/dist/{ar-CZ07-PLK.js → ar-C-kUt6f9.js} +1 -1
  2. package/dist/{ar-CFd5Xkva.cjs → ar-Dc56zcjW.cjs} +1 -1
  3. package/dist/auth/index.cjs.js +1 -1
  4. package/dist/auth/index.es.js +1 -1
  5. package/dist/{auth-divider-CvQ0TQwi.js → auth-divider-DGNQZKEb.js} +7 -7
  6. package/dist/{auth-divider-BHAbd_PS.cjs → auth-divider-DfWGT38w.cjs} +1 -1
  7. package/dist/beatui.css +20 -7
  8. package/dist/beatui.tailwind.css +20 -7
  9. package/dist/better-auth/index.cjs.js +1 -1
  10. package/dist/better-auth/index.es.js +5 -5
  11. package/dist/{colors-DwufPN8S.js → colors-C2sgnzFH.js} +7 -7
  12. package/dist/{colors-B-p6IzX9.cjs → colors-DPCHjRMj.cjs} +1 -1
  13. package/dist/{de-Dpx6i3Pv.js → de-CP0kbElb.js} +1 -1
  14. package/dist/{de-BJG9UqDS.cjs → de-DboQlEC4.cjs} +1 -1
  15. package/dist/{deep-merge-DEEd-Tte.cjs → deep-merge-Bjv1NvKj.cjs} +1 -1
  16. package/dist/{deep-merge-D1cBNWZX.js → deep-merge-DwXDd3iF.js} +234 -233
  17. package/dist/{duration-input-CdgMuk2b.cjs → duration-input-CjNZyVkf.cjs} +1 -1
  18. package/dist/{duration-input-Dpqj2Am9.js → duration-input-CnMMvPgT.js} +4 -4
  19. package/dist/{editor-toolbar-group-7eMZbEvH.js → editor-toolbar-group-DWUWUO-B.js} +2 -2
  20. package/dist/{editor-toolbar-group-BJWRgYtv.cjs → editor-toolbar-group-QVdBUbB8.cjs} +1 -1
  21. package/dist/{es-apq3F_om.js → es-BtIkcnsw.js} +1 -1
  22. package/dist/{es-BBqPUxJF.cjs → es-CAmE_0Ph.cjs} +1 -1
  23. package/dist/{fa-BYpfIkLu.js → fa-11-rZmQ-.js} +1 -1
  24. package/dist/{fa-d0o3KlIu.cjs → fa-D9LrFZdW.cjs} +1 -1
  25. package/dist/{fr-Ba5_hcn7.js → fr-C-L2F8w2.js} +1 -1
  26. package/dist/{fr-DzXA-sjH.cjs → fr-DKogQyss.cjs} +1 -1
  27. package/dist/{he-Dff_I80g.js → he-Bu1xGoQ9.js} +1 -1
  28. package/dist/{he-Cnx-qg1P.cjs → he-CVx91Jdr.cjs} +1 -1
  29. package/dist/{hi-BeJ8Q4O6.cjs → hi-BgrHV72l.cjs} +1 -1
  30. package/dist/{hi-7G-frHVR.js → hi-CewH-MAH.js} +1 -1
  31. package/dist/{index-C3o9GSH6.js → index-BGKz2Nol.js} +1 -1
  32. package/dist/{index-B5MAsOC-.cjs → index-DFF7Uahh.cjs} +1 -1
  33. package/dist/index.cjs.js +2 -2
  34. package/dist/index.es.js +26 -26
  35. package/dist/{input-container-BZwpJgx6.cjs → input-container-BkPcNDaZ.cjs} +1 -1
  36. package/dist/{input-container-Q9wL2BUl.js → input-container-CO3DNqpp.js} +2 -2
  37. package/dist/{it-dSE5UgTZ.js → it-5hiKQO_p.js} +1 -1
  38. package/dist/{it-DE3pe-gS.cjs → it-B1rA1F9l.cjs} +1 -1
  39. package/dist/{ja-DRzjr2YR.js → ja-CGfEmZrm.js} +1 -1
  40. package/dist/{ja-yzk8mwox.cjs → ja-DZnjjqoi.cjs} +1 -1
  41. package/dist/json-schema/index.cjs.js +1 -1
  42. package/dist/json-schema/index.es.js +10 -10
  43. package/dist/json-schema-display/index.cjs.js +1 -1
  44. package/dist/json-schema-display/index.es.js +1 -1
  45. package/dist/json-structure/index.cjs.js +1 -1
  46. package/dist/json-structure/index.es.js +5 -5
  47. package/dist/{ko-rKqndOMO.cjs → ko-CDnYKYWU.cjs} +1 -1
  48. package/dist/{ko-7gpweMh7.js → ko-DZthvREd.js} +1 -1
  49. package/dist/lexical/index.cjs.js +1 -1
  50. package/dist/lexical/index.es.js +4 -4
  51. package/dist/{modal-ClnvWxzi.cjs → modal-DCxNGrzk.cjs} +1 -1
  52. package/dist/{modal-DXWQ-HUs.js → modal-YKqlh4Dk.js} +3 -3
  53. package/dist/{nl-DKHslb-6.cjs → nl-Bj8QnDEY.cjs} +1 -1
  54. package/dist/{nl-DAe4B7fb.js → nl-CcKyHlQ7.js} +1 -1
  55. package/dist/{notice-Dx4D1UOf.js → notice-Du3tWJTW.js} +4 -4
  56. package/dist/{notice-dOOD80F7.cjs → notice-Q0A1gIho.cjs} +1 -1
  57. package/dist/{oneof-branch-detection-bQKKfV32.cjs → oneof-branch-detection-BEkAezNi.cjs} +1 -1
  58. package/dist/{oneof-branch-detection-B57ZDbzM.js → oneof-branch-detection-DSzC0PkO.js} +1 -1
  59. package/dist/{pl-9yeqi1Kn.cjs → pl-BmuuxxVd.cjs} +1 -1
  60. package/dist/{pl-4xrzOC4A.js → pl-Mwtjp4MV.js} +1 -1
  61. package/dist/prosemirror/index.cjs.js +1 -1
  62. package/dist/prosemirror/index.es.js +4 -4
  63. package/dist/{pt-DYQOe1Td.js → pt-BaTsY-8f.js} +1 -1
  64. package/dist/{pt-CCfVWHz4.cjs → pt-RiC0yeVA.cjs} +1 -1
  65. package/dist/{ru-FofxuqAJ.js → ru-CvbGmz5s.js} +1 -1
  66. package/dist/{ru-Cct0jttM.cjs → ru-pRqtOQHF.cjs} +1 -1
  67. package/dist/tailwind/preset.cjs.js +1 -1
  68. package/dist/tailwind/preset.es.js +2 -2
  69. package/dist/tailwind/vite-plugin.cjs.js +1 -1
  70. package/dist/tailwind/vite-plugin.es.js +1 -1
  71. package/dist/{text-input-DEAddaOi.js → text-input-BAn02BzO.js} +1 -1
  72. package/dist/{text-input-CynkbBpH.cjs → text-input-D_IxFd0M.cjs} +1 -1
  73. package/dist/{toolbar-e9POle8o.js → toolbar-BKan3NHw.js} +1 -1
  74. package/dist/{toolbar-Dz7R1kV3.cjs → toolbar-CnecqhaU.cjs} +1 -1
  75. package/dist/{tr-DhKxAXK0.cjs → tr-B9JhBJeL.cjs} +1 -1
  76. package/dist/{tr-BfKjkfhE.js → tr-YFqQdZjM.js} +1 -1
  77. package/dist/{translations-D8Jwi_d0.cjs → translations-C_-cObaF.cjs} +1 -1
  78. package/dist/{translations-BplmL3nb.js → translations-CxDUnbXn.js} +1 -1
  79. package/dist/{translations-B96REXIk.js → translations-DT5QQ4WO.js} +19 -19
  80. package/dist/{translations-BDGa_4jx.cjs → translations-qefRsdGi.cjs} +1 -1
  81. package/dist/types/components/form/input/date-input.d.ts +4 -4
  82. package/dist/types/components/form/input/date-time-input.d.ts +4 -4
  83. package/dist/types/components/form/input/input-container.d.ts +1 -1
  84. package/dist/types/components/form/input/nullable-date-input.d.ts +2 -2
  85. package/dist/types/components/form/input/nullable-date-time-input.d.ts +2 -2
  86. package/dist/{ur-DmfFC6MV.cjs → ur-BZakU0iv.cjs} +1 -1
  87. package/dist/{ur-COVuSAxC.js → ur-CdnwwnG_.js} +1 -1
  88. package/dist/{use-form-Ca0kF4af.cjs → use-form-BvBkVEKi.cjs} +1 -1
  89. package/dist/{use-form-CEY-gUUT.js → use-form-D_TJyZhP.js} +2 -2
  90. package/dist/{vi-DI3te8d5.js → vi-Bwvz1d_n.js} +1 -1
  91. package/dist/{vi-DvY-zvIr.cjs → vi-D1nly0nb.cjs} +1 -1
  92. package/dist/{widget-customization-CHxaaaEV.cjs → widget-customization-CD_NyRQ8.cjs} +1 -1
  93. package/dist/{widget-customization-BZ8aKWRK.js → widget-customization-D2a6SVP3.js} +5 -5
  94. package/dist/{zh-DJhzbpi2.cjs → zh-DBk7sSD9.cjs} +1 -1
  95. package/dist/{zh-DKIbNXv8.js → zh-hy7Uw6c5.js} +1 -1
  96. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("@lexical/rich-text"),F=require("@lexical/list"),G=require("@lexical/table"),ee=require("@lexical/link"),ie=require("@lexical/code"),Re=require("@lexical/hashtag"),ne=require("@lexical/mark"),dt=require("@lexical/overflow"),n=require("lexical"),ft=require("@lexical/plain-text"),Fe=require("@lexical/history");require("@lexical/clipboard");const Ae=require("@lexical/markdown"),Be=require("@lexical/html"),B=require("@lexical/selection"),gt=require("@lexical/text"),ge=require("@lexical/utils"),mt=require("@lexical/offset"),pt=require("@lexical/dragon");require("@lexical/file");const ht=require("@lexical/yjs");require("@lexical/headless");const e=require("@tempots/dom"),Le=require("../link-portal-_tiDFZqh.cjs"),Ie=require("../theme-DogY9oT1.cjs"),J=require("../menu-B60Q9j3-.cjs"),q=require("../translations-BDGa_4jx.cjs"),ve=require("../editor-toolbar-group-BJWRgYtv.cjs"),bt=require("@tempots/std"),je=require("../toolbar-Dz7R1kV3.cjs"),Ct=require("../input-container-BZwpJgx6.cjs");function ae(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const fe=ae(G),re=ae(ie),yt=ae(n),Et=ae(mt),ke=ae(pt),Ot={separator:!0};class oe extends n.DecoratorNode{static getType(){return"horizontal-rule"}static clone(o){return new oe(o.__key)}static importJSON(o){return se()}static importDOM(){return{hr:()=>({conversion:Tt,priority:0})}}exportJSON(){return{...super.exportJSON(),type:"horizontal-rule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}updateDOM(){return!1}getTextContent(){return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const j=require("@lexical/rich-text"),F=require("@lexical/list"),G=require("@lexical/table"),ee=require("@lexical/link"),ie=require("@lexical/code"),Re=require("@lexical/hashtag"),ne=require("@lexical/mark"),dt=require("@lexical/overflow"),n=require("lexical"),ft=require("@lexical/plain-text"),Fe=require("@lexical/history");require("@lexical/clipboard");const Ae=require("@lexical/markdown"),Be=require("@lexical/html"),B=require("@lexical/selection"),gt=require("@lexical/text"),ge=require("@lexical/utils"),mt=require("@lexical/offset"),pt=require("@lexical/dragon");require("@lexical/file");const ht=require("@lexical/yjs");require("@lexical/headless");const e=require("@tempots/dom"),Le=require("../link-portal-_tiDFZqh.cjs"),Ie=require("../theme-DogY9oT1.cjs"),J=require("../menu-B60Q9j3-.cjs"),q=require("../translations-qefRsdGi.cjs"),ve=require("../editor-toolbar-group-QVdBUbB8.cjs"),bt=require("@tempots/std"),je=require("../toolbar-CnecqhaU.cjs"),Ct=require("../input-container-BkPcNDaZ.cjs");function ae(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const s=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,s.get?s:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const fe=ae(G),re=ae(ie),yt=ae(n),Et=ae(mt),ke=ae(pt),Ot={separator:!0};class oe extends n.DecoratorNode{static getType(){return"horizontal-rule"}static clone(o){return new oe(o.__key)}static importJSON(o){return se()}static importDOM(){return{hr:()=>({conversion:Tt,priority:0})}}exportJSON(){return{...super.exportJSON(),type:"horizontal-rule",version:1}}exportDOM(){return{element:document.createElement("hr")}}createDOM(){return document.createElement("hr")}updateDOM(){return!1}getTextContent(){return`
2
2
  `}isInline(){return!1}decorate(){return null}}function Tt(){return{node:se()}}function se(){return n.$applyNodeReplacement(new oe)}function Ue(t){return t instanceof oe}function me(t){const o=[j.HeadingNode,j.QuoteNode,F.ListNode,F.ListItemNode,ee.LinkNode,ie.CodeNode,ie.CodeHighlightNode,oe];return t.table&&o.push(G.TableNode,G.TableCellNode,G.TableRowNode),t.autoLink&&o.push(ee.AutoLinkNode),t.hashtag&&o.push(Re.HashtagNode),t.mark&&o.push(ne.MarkNode),t.overflow&&o.push(dt.OverflowNode),[...new Set(o)]}function pe(t){switch(t){case"bare":return{richText:!0,history:!0,clipboard:!0};case"docked":return{richText:!0,history:!0,clipboard:!0,list:!0,link:!0,autoLink:!0,code:!0,table:!0};case"contextual":return{richText:!0,history:!0,clipboard:!0,list:!0,link:!0,autoLink:!0,code:!0,table:!0}}}async function ze(){return yt}async function he(t){return j.registerRichText(t)}async function be(t){return ft.registerPlainText(t)}async function Ce(t,o){const a=Fe.createEmptyHistoryState(),s=o?.delay??300;return Fe.registerHistory(t,a,s)}async function ye(t){return()=>{}}async function Ee(t){return typeof F.registerList=="function"?typeof F.registerCheckList=="function"?ge.mergeRegister(F.registerList(t),F.registerCheckList(t)):F.registerList(t):ge.mergeRegister(t.registerCommand(F.INSERT_ORDERED_LIST_COMMAND,()=>(F.insertList(t,"number"),!0),n.COMMAND_PRIORITY_LOW),t.registerCommand(F.INSERT_UNORDERED_LIST_COMMAND,()=>(F.insertList(t,"bullet"),!0),n.COMMAND_PRIORITY_LOW),t.registerCommand(F.INSERT_CHECK_LIST_COMMAND,()=>(F.insertList(t,"check"),!0),n.COMMAND_PRIORITY_LOW),t.registerCommand(F.REMOVE_LIST_COMMAND,()=>(F.removeList(t),!0),n.COMMAND_PRIORITY_LOW))}async function Oe(t){return t.registerCommand(ee.TOGGLE_LINK_COMMAND,o=>(o===null||typeof o=="string"?ee.toggleLink(o):ee.toggleLink(o.url,o),!0),n.COMMAND_PRIORITY_LOW)}async function Nt(t,o,a){const s=o?.trigger||"/";let i=!1,u=null,h=0;const O=()=>t.getEditorState().read(()=>{const y=n.$getSelection();if(!n.$isRangeSelection(y)||!y.isCollapsed())return!1;const E=y.anchor,M=E.getNode();if(!n.$isTextNode(M))return!1;const _=M.getTextContent(),I=E.offset;if(I===0||_[I-1]!==s)return!1;if(I===1)return!0;const C=_[I-2];return!!/\s/.test(C)}),A=()=>u?t.getEditorState().read(()=>{if(!u)return"";const y=u.getTextContent(),E=y.indexOf(s,h);if(E===-1)return"";const M=n.$getSelection();if(!n.$isRangeSelection(M))return"";const _=M.anchor;if(_.getNode().getKey()!==u.getKey())return"";const N=_.offset;return N<=E?"":y.slice(E+1,N)}):"",R=()=>{t.getEditorState().read(()=>{const y=n.$getSelection();if(n.$isRangeSelection(y)){const E=y.anchor,M=E.getNode();if(n.$isTextNode(M)){u=M,h=E.offset-1,i=!0;const _={isActive:!0,filterText:"",anchorNode:u,anchorOffset:h};a?.onTrigger?.(_,k),a?.onUpdate?.(_,k)}}})},b=()=>{i&&(i=!1,u=null,h=0,a?.onClose?.())},k=()=>{u&&t.update(()=>{if(!u)return;const y=u.getTextContent(),E=y.indexOf(s,h);if(E===-1)return;const M=n.$getSelection();if(!n.$isRangeSelection(M))return;const _=M.anchor;if(_.getNode().getKey()!==u.getKey())return;const N=_.offset,C=y.slice(0,E),v=y.slice(N);u.setTextContent(C+v);const c=n.$getSelection();n.$isRangeSelection(c)&&(c.anchor.set(u.getKey(),E,"text"),c.focus.set(u.getKey(),E,"text"))})},S=()=>{if(!i)return;const E={isActive:!0,filterText:A(),anchorNode:u,anchorOffset:h};a?.onUpdate?.(E,k)},m=t.registerMutationListener(n.TextNode,y=>{if(!i&&O()){R();return}i&&(u&&!y.has(u.getKey())?S():b())}),T=ge.mergeRegister(t.registerUpdateListener(({editorState:y})=>{y.read(()=>{if(!i)return;const E=n.$getSelection();if(!n.$isRangeSelection(E)){b();return}const M=E.anchor,_=M.getNode();if(!u||_.getKey()!==u.getKey()){b();return}const N=u.getTextContent().indexOf(s,h);if(N===-1||M.offset<=N){b();return}})}),t.registerCommand(n.KEY_ARROW_DOWN_COMMAND,y=>i?(y.preventDefault(),!0):!1,n.COMMAND_PRIORITY_LOW),t.registerCommand(n.KEY_ARROW_UP_COMMAND,y=>i?(y.preventDefault(),!0):!1,n.COMMAND_PRIORITY_LOW),t.registerCommand(n.KEY_ENTER_COMMAND,y=>i?(y?.preventDefault(),!0):!1,n.COMMAND_PRIORITY_LOW),t.registerCommand(n.KEY_ESCAPE_COMMAND,y=>i?(y?.preventDefault(),b(),!0):!1,n.COMMAND_PRIORITY_LOW));return()=>{b(),m(),T()}}function St(t,o,a){a(),o.handler(t),t.focus()}const Mt=n.createCommand("TOGGLE_SLASH_COMMAND_PALETTE"),ce=n.createCommand("INSERT_HORIZONTAL_RULE_COMMAND"),xt=n.createCommand("INSERT_IMAGE_COMMAND");function Te(t){return t.registerCommand(ce,()=>{const o=n.$getSelection();if(!n.$isRangeSelection(o))return!1;if(o.focus.getNode()!==null){const s=se();o.insertNodes([s]);const i=n.$createParagraphNode();s.insertAfter(i),i.selectStart()}return!0},n.COMMAND_PRIORITY_LOW)}const Ge={dependencies:[oe],export:t=>Ue(t)?"---":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(t,o,a,s)=>{const i=se();if(s)t.replace(i);else{t.replace(i);const u=n.$createParagraphNode();i.insertAfter(u),u.selectStart()}},type:"element"},De=[...Ae.TRANSFORMERS,Ge];async function K(t){let o="";return t.getEditorState().read(()=>{o=Ae.$convertToMarkdownString(De)}),o}async function V(t,o){t.update(()=>{Ae.$convertFromMarkdownString(o,De)})}async function kt(){return De}async function Y(t){let o="";return t.getEditorState().read(()=>{o=Be.$generateHtmlFromNodes(t)}),o}async function X(t,o){t.update(()=>{const s=new DOMParser().parseFromString(o,"text/html"),i=Be.$generateNodesFromDOM(t,s);n.$getRoot().clear(),n.$insertNodes(i)})}async function _t(t,o,a){let s,i,u;switch(o){case"markdown":s=await K(t),i="text/markdown",u="md";break;case"html":s=await Y(t),i="text/html",u="html";break;case"json":s=JSON.stringify(t.getEditorState().toJSON(),null,2),i="application/json",u="json";break}const h=new Blob([s],{type:i}),O=URL.createObjectURL(h),A=document.createElement("a");A.href=O,A.download=a??`document.${u}`,A.click(),URL.revokeObjectURL(O)}async function vt(t,o,a){const s=await new Promise((u,h)=>{const O=new FileReader;O.onload=()=>u(O.result),O.onerror=()=>h(O.error),O.readAsText(o)});switch(a??Rt(o.name)){case"markdown":{await V(t,s);break}case"html":{await X(t,s);break}case"json":{const u=t.parseEditorState(s);t.setEditorState(u);break}}}function Rt(t){return t.endsWith(".md")||t.endsWith(".markdown")?"markdown":t.endsWith(".html")||t.endsWith(".htm")?"html":"json"}async function Ne(t,o){return"registerTablePlugin"in fe&&typeof fe.registerTablePlugin=="function"?fe.registerTablePlugin(t):()=>{}}async function At(t,o=3,a=3){t.dispatchCommand(fe.INSERT_TABLE_COMMAND,{rows:String(o),columns:String(a),includeHeaders:!0})}async function Lt(t,o){return"registerCodeHighlighting"in re&&typeof re.registerCodeHighlighting=="function"?re.registerCodeHighlighting(t):()=>{}}async function It(t,o){return"registerCodeHighlighting"in re&&typeof re.registerCodeHighlighting=="function"?re.registerCodeHighlighting(t):()=>{}}const Dt=/#[\w\u0590-\u05ff]+/;function wt(t){return new Re.HashtagNode(t)}async function $t(t,o){const a=[],s=gt.registerLexicalTextEntity(t,i=>{const u=Dt.exec(i);return u?{start:u.index,end:u.index+u[0].length}:null},Re.HashtagNode,wt);if(Array.isArray(s)?a.push(...s):typeof s=="function"&&a.push(s),o?.onHashtagClick){const i=t.registerCommand(n.CLICK_COMMAND,u=>{const h=u.target;if(h.classList.contains("bc-lexical-hashtag")){const O=h.textContent;if(O)return o.onHashtagClick(O.replace("#","")),!0}return!1},n.COMMAND_PRIORITY_LOW);a.push(i)}return()=>{a.forEach(i=>i())}}const Pt=/((https?:\/\/(www\.)?|www\.)[^\s<>]+)/g,Ht=/([a-zA-Z0-9._+-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/g,Ft=[{pattern:Pt,urlTransformer:t=>t.startsWith("http")?t:`https://${t}`},{pattern:Ht,urlTransformer:t=>`mailto:${t}`}];async function Bt(t,o){const a=o?.matchers??Ft;return t.registerMutationListener(n.TextNode,s=>{t.update(()=>{for(const[i,u]of s){if(u!=="created"&&u!=="updated")continue;const h=n.$getNodeByKey(i);if(!h||!n.$isTextNode(h))continue;const O=h.getTextContent();for(const A of a){const R=new RegExp(A.pattern.source,A.pattern.flags);let b;for(;(b=R.exec(O))!==null;)A.urlTransformer(b[0])}}})})}async function jt(t,o){const a=[];return o?.onMarkClick&&a.push(t.registerCommand(n.CLICK_COMMAND,s=>{const i=s.target;if(i.classList.contains("bc-lexical-mark")){const u=i.dataset.markId;if(u)return o.onMarkClick(u,{id:u,type:i.dataset.markType||"annotation",data:{}}),!0}return!1},n.COMMAND_PRIORITY_LOW)),()=>a.forEach(s=>s())}async function Ut(t,o,a){t.update(()=>{const s=n.$getSelection();n.$isRangeSelection(s)&&ne.$wrapSelectionInMarkNode(s,s.isBackward(),o)})}async function zt(t,o){t.update(()=>{const s=n.$getRoot().getAllTextNodes().filter(i=>{const u=i.getParent();return ne.$isMarkNode(u)?ne.$getMarkIDs(i,0)?.includes(o)??!1:!1});for(const i of s){const u=i.getParent();ne.$isMarkNode(u)&&ne.$unwrapMarkNode(u)}})}async function Gt(t,o){const{maxLength:a,onOverflow:s}=o;return t.registerUpdateListener(({editorState:i})=>{i.read(()=>{const O=n.$getRoot().getTextContent().length,A=O>a;s&&s(A,O)})})}async function Se(t){return"registerDragonSupport"in ke&&typeof ke.registerDragonSupport=="function"?ke.registerDragonSupport(t):()=>{}}async function Me(t,o){const a=o.docMap??new Map,s=o.id??"lexical",i=o.doc.getText(s),u=ht.createBinding(t,o.provider,i,o.doc,a),h=t.registerUpdateListener(()=>{});return()=>{h(),u&&typeof u.destroy=="function"&&u.destroy()}}function qt(t){let o={hasSelection:!1,selectedText:"",anchorOffset:0,focusOffset:0};return t.getEditorState().read(()=>{const a=n.$getSelection();n.$isRangeSelection(a)&&(o={hasSelection:!a.isCollapsed(),selectedText:a.getTextContent(),anchorOffset:a.anchor.offset,focusOffset:a.focus.offset})}),o}function we(t){let o="";return t.getEditorState().read(()=>{o=n.$getRoot().getTextContent()}),o}function Wt(t){return we(t).length}function Kt(t){const o=we(t).trim();return o?o.split(/\s+/).length:0}function Yt(t,o){t.update(()=>{const a=n.$getSelection();n.$isRangeSelection(a)&&a.insertText(o)}),t.focus()}async function Jt(){return Et}function le(t,o,a){const s=new Map;if(t)for(const i of t.split(";")){const u=i.trim();if(!u)continue;const h=u.indexOf(":");if(h===-1)continue;const O=u.slice(0,h).trim(),A=u.slice(h+1).trim();s.set(O,A)}return a?s.set(o,a):s.delete(o),s.size===0?"":Array.from(s.entries()).map(([i,u])=>`${i}: ${u}`).join("; ")}function te(t,o){if(!t)return"";const a=new RegExp(`(?:^|;)\\s*${o.replace(/-/g,"\\-")}:\\s*([^;]+)`),s=t.match(a);return s?s[1].trim():""}function Vt(t,o){const a=t.getElementByKey(o);a&&t.getEditorState().read(()=>{const s=n.$getNodeByKey(o);if(!n.$isElementNode(s)||n.$isRootNode(s))return;const i=s.getStyle(),u=te(i,"background-color");a.style.backgroundColor=u||"";const h=te(i,"line-height");a.style.lineHeight=h||""})}function $e(t){const o=t.registerUpdateListener(({dirtyElements:a})=>{if(a.size!==0)for(const[s]of a)Vt(t,s)});return t.getEditorState().read(()=>{const a=n.$getRoot();for(const s of a.getChildren())if(n.$isElementNode(s)){const i=s.getStyle();if(i){const u=t.getElementByKey(s.getKey());if(u){const h=te(i,"background-color");h&&(u.style.backgroundColor=h);const O=te(i,"line-height");O&&(u.style.lineHeight=O)}}}}),o}function _e(t,o){const a=o.exportDOM(t);if(a.element&&ge.isHTMLElement(a.element)&&n.$isElementNode(o)){const s=o.getStyle(),i=te(s,"background-color");i&&(a.element.style.backgroundColor=i);const u=te(s,"line-height");u&&(a.element.style.lineHeight=u)}return a}function xe(){const t=new Map;return t.set(n.ParagraphNode,_e),t.set(j.HeadingNode,_e),t.set(j.QuoteNode,_e),t}function Xt(){const t=o=>()=>({conversion:a=>{const s=o(a);if(s&&n.$isElementNode(s)){a.style?.textAlign&&s.setFormat(a.style.textAlign);let i="";a.style?.backgroundColor&&(i=le(i,"background-color",a.style.backgroundColor)),a.style?.lineHeight&&(i=le(i,"line-height",a.style.lineHeight)),i&&s.setStyle(i)}return{node:s}},priority:1});return{p:t(()=>n.$createParagraphNode()),h1:t(()=>j.$createHeadingNode("h1")),h2:t(()=>j.$createHeadingNode("h2")),h3:t(()=>j.$createHeadingNode("h3")),h4:t(()=>j.$createHeadingNode("h4")),h5:t(()=>j.$createHeadingNode("h5")),h6:t(()=>j.$createHeadingNode("h6"))}}const qe=["color","font-size","font-family","background-color","line-height"],Zt=new Set(["font-weight","font-style","text-decoration","text-decoration-line","vertical-align"]),Qt={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"},eo=["span","b","em","i","strong","u","s","sub","sup","code","mark"];function to(t,o,a){if(!n.$isTextNode(o))return;const s=t.fontWeight,i=t.textDecoration.split(" ");(s==="700"||s==="bold")&&!o.hasFormat("bold")&&o.toggleFormat("bold"),t.fontStyle==="italic"&&!o.hasFormat("italic")&&o.toggleFormat("italic"),i.includes("line-through")&&!o.hasFormat("strikethrough")&&o.toggleFormat("strikethrough"),i.includes("underline")&&!o.hasFormat("underline")&&o.toggleFormat("underline"),t.verticalAlign==="sub"&&!o.hasFormat("subscript")&&o.toggleFormat("subscript"),t.verticalAlign==="super"&&!o.hasFormat("superscript")&&o.toggleFormat("superscript"),a&&!o.hasFormat(a)&&o.toggleFormat(a)}function We(t=qe){const o={};for(const a of eo)o[a]=s=>{const i=s.style,u=Qt[a],h=a==="b"?i.fontWeight!=="normal"?"bold":void 0:u;return{conversion:()=>({node:null,forChild:O=>{if(!n.$isTextNode(O))return O;to(i,O,h);let A=O.getStyle();for(const R of t){if(Zt.has(R))continue;const b=i.getPropertyValue(R);b&&(A=le(A,R,b))}return A&&O.setStyle(A),O}}),priority:1}};return o}function ue(t){return{...Xt(),...We(t)}}async function de(t={}){const{nodes:o=[],plugins:a=[],onError:s}=t,u=(await ze()).createEditor({namespace:"BeatUIHeadless",nodes:o,onError:h=>{s?s(h,u):console.error("[BeatUI Headless]",h)},editable:!1,html:{export:xe(),import:ue()}});if(a.length>0)for(const h of a)h.register(u);return u}async function oo(t){const o=await de();return await V(o,t),o.getEditorState().toJSON()}async function no(t){const o=await de(),a=o.parseEditorState(JSON.stringify(t));return o.setEditorState(a),await K(o)}async function ro(t){const o=await de();return await X(o,t),o.getEditorState().toJSON()}async function io(t){const o=await de(),a=o.parseEditorState(JSON.stringify(t));return o.setEditorState(a),await Y(o)}const Ke=t=>{const{value:o,format:a,plugins:s,readOnly:i,placeholder:u,class:h,namespace:O="BeatUILexical",heightMode:A="auto",autoFocus:R=!1,onError:b,onInput:k,onChange:S,onBlur:m,onReady:T}=t;return e.Use(Ie.Theme,({appearance:y})=>e.html.div(e.Task(()=>Promise.resolve().then(()=>require("../styles-url-CkPTI32j.cjs")),({default:E})=>Le.LinkPortal({id:"beatui-lexical-css",href:E})),e.attr.class("bc-lexical-editor-container"),A==="fixed"?e.attr.class("bc-lexical-editor-container--fixed"):null,e.attr.class(h),e.html.div(e.attr.class("bc-lexical-editor"),e.attr.class(`bc-lexical-editor--${A}`),e.attr.contenteditable(i!=null?e.Value.map(i,E=>!E):!0),i!=null?e.attr.class(e.Value.map(i,E=>E?"bc-lexical-editor--readonly":"")):null,e.WithElement(E=>{let M=null;const _=[];return(async()=>{try{const N=s??pe("bare"),C=me(N),v=e.Value.get(a??"markdown"),c=n.createEditor({namespace:O,nodes:C,theme:{heading:{h1:"bc-lexical-h1",h2:"bc-lexical-h2",h3:"bc-lexical-h3",h4:"bc-lexical-h4",h5:"bc-lexical-h5",h6:"bc-lexical-h6"},text:{bold:"bc-lexical-bold",italic:"bc-lexical-italic",underline:"bc-lexical-underline",strikethrough:"bc-lexical-strikethrough",code:"bc-lexical-code"},list:{ul:"bc-lexical-ul",ol:"bc-lexical-ol",listitem:"bc-lexical-li",listitemChecked:"bc-lexical-li-checked",listitemUnchecked:"bc-lexical-li-unchecked"},link:"bc-lexical-link",quote:"bc-lexical-blockquote",code:"bc-lexical-code-block",codeHighlight:{},hashtag:"bc-lexical-hashtag",table:"bc-lexical-table",tableCell:"bc-lexical-table-cell",tableCellHeader:"bc-lexical-table-cell-header",tableRow:"bc-lexical-table-row",mark:"bc-lexical-mark",paragraph:"bc-lexical-paragraph"},onError:f=>{b?b(f,c):console.error("[BeatUI Lexical]",f)},editable:i?!e.Value.get(i):!0,html:{export:xe(),import:ue()}});M=c,c.setRootElement(E);const D=[];if(N.richText?D.push(he(c)):N.plainText&&D.push(be(c)),N.history){const f=typeof N.history=="object"?N.history:void 0;D.push(Ce(c,f))}if(N.clipboard&&D.push(ye(c)),N.list&&D.push(Ee(c)),N.link&&D.push(Oe(c)),N.yjs&&D.push(Me(c,N.yjs)),N.dragon&&D.push(Se(c)),N.table&&D.push(Ne(c)),(await Promise.all(D)).forEach(f=>{f&&_.push(f)}),_.push(Te(c)),_.push($e(c)),o!=null){const f=e.Value.get(o);if(f!=null&&(f!==""||v==="json"&&typeof f=="object")){if(v==="markdown"&&typeof f=="string")await V(c,f);else if(v==="html"&&typeof f=="string")await X(c,f);else if(v==="json"&&typeof f=="object")try{const l=JSON.stringify(f),L=c.parseEditorState(l);c.setEditorState(L)}catch(l){console.error("[BeatUI] Failed to parse JSON editor state:",l),b&&b(l instanceof Error?l:new Error(String(l)),c)}}}if(_.push(c.registerUpdateListener(({editorState:f,dirtyElements:d,dirtyLeaves:l})=>{d.size===0&&l.size===0||k&&f.read(async()=>{if(v==="markdown"){const L=await K(c);k(L,c)}else if(v==="html"){const L=await Y(c);k(L,c)}else v==="json"&&k(f.toJSON(),c)})})),o!=null&&_.push(e.Value.on(o,async f=>{if(f!=null){if(v==="markdown"&&typeof f=="string"){const d=await K(c);f!==d&&await V(c,f)}else if(v==="html"&&typeof f=="string"){const d=await Y(c);f!==d&&await X(c,f)}else if(v==="json"&&typeof f=="object"){const d=JSON.stringify(c.getEditorState().toJSON()),l=JSON.stringify(f);if(d!==l){const L=c.parseEditorState(l);c.setEditorState(L)}}}})),i!=null&&_.push(e.Value.on(i,f=>{c.setEditable(!f)})),_.push(c.registerCommand(n.BLUR_COMMAND,()=>(m&&m(c),S&&c.getEditorState().read(async()=>{if(v==="markdown"){const f=await K(c);S(f,c)}else if(v==="html"){const f=await Y(c);S(f,c)}else v==="json"&&S(c.getEditorState().toJSON(),c)}),!1),n.COMMAND_PRIORITY_LOW)),_.push(y.on(f=>{const d=c.getRootElement();d&&(d.dataset.theme=f)})),R)c.focus();else{const f=c.getRootElement();f&&f===document.activeElement&&f.blur()}T&&T(c)}catch(N){console.error("[BeatUI] Failed to initialize Lexical editor:",N);const C=E;C.textContent="Failed to load Lexical editor."}})(),e.OnDispose(()=>{try{_.forEach(N=>N())}catch{}try{M?.setRootElement(null)}catch{}})}))))};function Ye(t,o,a){const s=(m,T)=>o.map(()=>{const y=t.value;return y?y.getEditorState().read(()=>{const E=n.$getSelection();return n.$isRangeSelection(E)?m(E):T}):T}),i=m=>{const T=m.anchor.getNode();return T.getKey()==="root"?T:T.getTopLevelElementOrThrow()};return{withSelection:s,getAnchorElement:i,textFormatActive:m=>s(T=>T.hasFormat(m),!1),blockTypeActive:m=>s(T=>i(T).getType()===m,!1),listTypeActive:m=>s(T=>{const y=i(T).getParent();return F.$isListNode(y)&&y.getListType()===m},!1),headingActive:m=>o.map(()=>{const T=t.value;return T?T.getEditorState().read(()=>{const y=n.$getSelection();if(n.$isRangeSelection(y)){const E=i(y);if(E.getType()==="heading")return T.getElementByKey(E.getKey())?.tagName===`H${m}`}return!1}):!1}),linkActive:()=>s(m=>{const T=m.anchor.getNode();return T.getParent()?.getType()==="link"||T.getType()==="link"},!1),dispatch:(m,T)=>()=>{const y=t.value;y&&(y.dispatchCommand(m,T),y.focus())},toggleBlock:(m,T)=>()=>{const y=t.value;y&&(y.update(()=>{const E=n.$getSelection();if(n.$isRangeSelection(E)){const M=i(E);B.$setBlocksType(E,()=>M.getType()===m?n.$createParagraphNode():T())}}),y.focus())},toggleLink:()=>{const m=t.value;m&&(m.getEditorState().read(()=>{const T=n.$getSelection();if(n.$isRangeSelection(T)){const y=T.anchor.getNode();if(y.getParent()?.getType()==="link"||y.getType()==="link")m.dispatchCommand(ee.TOGGLE_LINK_COMMAND,null);else{const _=prompt(a?.enterUrlMessage?.()??"Enter URL:");_&&m.dispatchCommand(ee.TOGGLE_LINK_COMMAND,_)}}}),m.focus())}}}function Je(t,o){return a=>s=>ve.EditorToolbarButton({...s,display:a,disabled:t,size:o})}const lo={font:["font-family","font-size","line-height"],color:["font-color","highlight-color","background-color"],"text-formatting":["bold","italic","underline","strikethrough","code"],"clear-formatting":["clear-formatting"],headings:["paragraph","heading-1","heading-2","heading-3","heading-4","heading-5","heading-6"],lists:["bullet-list","ordered-list","check-list"],indent:["indent","outdent"],blocks:["blockquote","code-block","horizontal-rule"],tables:["insert-table"],links:["link"],history:["undo","redo"],clipboard:["cut","copy","paste"]},ao=["font","color","text-formatting","clear-formatting","headings","lists","indent","blocks","tables","links","history","clipboard"];function so(){return ao.map(t=>({group:t}))}function co(t){if(t.layout)return t.layout;const{visibleGroups:o,hiddenGroups:a,customGroups:s}=t;let i=so();if((o||a)&&(i=i.filter(u=>{if("separator"in u||"customGroup"in u)return!0;const h=u.group;return!(a?.includes(h)||o&&!o.includes(h))})),s&&s.length>0)for(const u of s)i.push({customGroup:u.id});return i}const uo=[{value:"Arial",label:"Arial"},{value:"Courier New",label:"Courier New"},{value:"Georgia",label:"Georgia"},{value:"Times New Roman",label:"Times New Roman"},{value:"Trebuchet MS",label:"Trebuchet MS"},{value:"Verdana",label:"Verdana"}],fo=[{value:"10px",label:"10"},{value:"12px",label:"12"},{value:"14px",label:"14"},{value:"16px",label:"16"},{value:"18px",label:"18"},{value:"20px",label:"20"},{value:"24px",label:"24"},{value:"30px",label:"30"},{value:"36px",label:"36"}],go=[{value:"1",label:"1"},{value:"1.15",label:"1.15"},{value:"1.5",label:"1.5"},{value:"2",label:"2"},{value:"2.5",label:"2.5"},{value:"3",label:"3"}];function Ve({editor:t,stateUpdate:o,toolbar:a={},readOnly:s=e.signal(!1),size:i="sm"}){const{maxHeadingLevel:u=3}=a,h=co(a);return e.Use(q.BeatUII18n,O=>e.Ensure(t,A=>{const R=A,b=O.$.lexical,{getAnchorElement:k,textFormatActive:S,blockTypeActive:m,listTypeActive:T,headingActive:y,linkActive:E,dispatch:M,toggleBlock:_,toggleLink:I}=Ye(R,o,{enterUrlMessage:()=>O.value.lexical.enterUrl}),C=Je(s,i)(e.signal(!0)),v=()=>{const r=R.value;r&&(r.update(()=>{const p=n.$getSelection();n.$isRangeSelection(p)&&B.$setBlocksType(p,()=>n.$createParagraphNode())}),r.focus())},c=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();if(n.$isRangeSelection(w)){const z=k(w),Z=`h${r}`,Q=p.getElementByKey(z.getKey());z.getType()==="heading"&&Q?.tagName===`H${r}`?B.$setBlocksType(w,()=>n.$createParagraphNode()):B.$setBlocksType(w,()=>j.$createHeadingNode(Z))}}),p.focus())},D=()=>{const r=R.value;if(!r)return;const p=r.getRootElement();p&&(p.focus(),document.execCommand("copy"))},x=()=>{const r=R.value;if(!r)return;const p=r.getRootElement();p&&(p.focus(),document.execCommand("cut"))},f=()=>{const r=R.value;r&&navigator.clipboard.readText().then(p=>{r.update(()=>{const w=n.$getSelection();n.$isRangeSelection(w)&&w.insertText(p)}),r.focus()}).catch(()=>{})},d=()=>{const r=R.value;r&&(r.update(()=>{const p=n.$getSelection();if(n.$isRangeSelection(p))for(const w of p.getNodes())n.$isTextNode(w)&&(w.setFormat(0),w.setStyle(""))}),r.focus())},l=()=>{const r=R.value;r&&(r.dispatchCommand(G.INSERT_TABLE_COMMAND,{rows:"3",columns:"3",includeHeaders:!0}),r.focus())},L={value:"",label:O.value.lexical.defaultOption},W=[L,...a.fontFamilies??uo],g=[L,...a.fontSizes??fo],P=[L,...a.lineHeights??go],H=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();return n.$isRangeSelection(p)?B.$getSelectionStyleValueForProperty(p,"font-family",""):""}):""}),U=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();return n.$isRangeSelection(p)?B.$getSelectionStyleValueForProperty(p,"font-size",""):""}):""}),tt=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();n.$isRangeSelection(w)&&B.$patchStyleText(w,{"font-family":r||null})}),p.focus())},ot=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();n.$isRangeSelection(w)&&B.$patchStyleText(w,{"font-size":r||null})}),p.focus())},nt=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();return n.$isRangeSelection(p)&&B.$getSelectionStyleValueForProperty(p,"color","")||"#000000"}):"#000000"}),rt=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();return n.$isRangeSelection(p)&&B.$getSelectionStyleValueForProperty(p,"background-color","")||"#ffffff"}):"#ffffff"}),it=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();if(n.$isRangeSelection(p)){const z=k(p).getStyle();return te(z,"background-color")||"#ffffff"}return"#ffffff"}):"#ffffff"}),lt=o.map(()=>{const r=R.value;return r?r.getEditorState().read(()=>{const p=n.$getSelection();if(n.$isRangeSelection(p)){const z=k(p).getStyle();return te(z,"line-height")||""}return""}):""}),at=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();n.$isRangeSelection(w)&&B.$patchStyleText(w,{color:r})}),p.focus())},st=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();n.$isRangeSelection(w)&&B.$patchStyleText(w,{"background-color":r})}),p.focus())},ct=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();if(n.$isRangeSelection(w)){const z=k(w),Z=z.getStyle(),Q=le(Z,"background-color",r);z.setStyle(Q)}}),p.focus())},ut=r=>{const p=R.value;p&&(p.update(()=>{const w=n.$getSelection();if(n.$isRangeSelection(w)){const z=k(w),Z=z.getStyle(),Q=le(Z,"line-height",r);z.setStyle(Q)}}),p.focus())},$=new Map;$.set("bold",()=>C({active:S("bold"),onClick:M(n.FORMAT_TEXT_COMMAND,"bold"),label:b.map(r=>r.bold),icon:"mdi:format-bold"})),$.set("italic",()=>C({active:S("italic"),onClick:M(n.FORMAT_TEXT_COMMAND,"italic"),label:b.map(r=>r.italic),icon:"mdi:format-italic"})),$.set("underline",()=>C({active:S("underline"),onClick:M(n.FORMAT_TEXT_COMMAND,"underline"),label:b.map(r=>r.underline),icon:"mdi:format-underline"})),$.set("strikethrough",()=>C({active:S("strikethrough"),onClick:M(n.FORMAT_TEXT_COMMAND,"strikethrough"),label:b.map(r=>r.strikethrough),icon:"mdi:format-strikethrough"})),$.set("code",()=>C({active:S("code"),onClick:M(n.FORMAT_TEXT_COMMAND,"code"),label:b.map(r=>r.code),icon:"mdi:code-tags"})),$.set("clear-formatting",()=>C({active:e.signal(!1),onClick:d,label:b.map(r=>r.clearFormatting),icon:"mdi:format-clear"})),$.set("paragraph",()=>C({active:m("paragraph"),onClick:v,label:b.map(r=>r.normal),icon:"mdi:format-paragraph"}));for(let r=1;r<=u;r++)$.set(`heading-${r}`,()=>C({active:y(r),onClick:()=>c(r),label:b.map(p=>p.heading(r)),icon:`mdi:format-header-${r}`}));$.set("bullet-list",()=>C({active:T("bullet"),onClick:M(F.INSERT_UNORDERED_LIST_COMMAND,void 0),label:b.map(r=>r.bulletList),icon:"mdi:format-list-bulleted"})),$.set("ordered-list",()=>C({active:T("number"),onClick:M(F.INSERT_ORDERED_LIST_COMMAND,void 0),label:b.map(r=>r.orderedList),icon:"mdi:format-list-numbered"})),$.set("check-list",()=>C({active:T("check"),onClick:M(F.INSERT_CHECK_LIST_COMMAND,void 0),label:b.map(r=>r.checkList),icon:"mdi:format-list-checks"})),$.set("indent",()=>C({active:e.signal(!1),onClick:M(n.INDENT_CONTENT_COMMAND,void 0),label:b.map(r=>r.indent),icon:"mdi:format-indent-increase"})),$.set("outdent",()=>C({active:e.signal(!1),onClick:M(n.OUTDENT_CONTENT_COMMAND,void 0),label:b.map(r=>r.outdent),icon:"mdi:format-indent-decrease"})),$.set("blockquote",()=>C({active:m("quote"),onClick:_("quote",j.$createQuoteNode),label:b.map(r=>r.blockquote),icon:"mdi:format-quote-close"})),$.set("code-block",()=>C({active:m("code"),onClick:_("code",ie.$createCodeNode),label:b.map(r=>r.codeBlock),icon:"mdi:code-braces"})),$.set("horizontal-rule",()=>C({active:e.signal(!1),onClick:M(ce,void 0),label:b.map(r=>r.horizontalRule),icon:"mdi:minus"})),$.set("insert-table",()=>C({active:e.signal(!1),onClick:l,label:b.map(r=>r.insertTable),icon:"mdi:table-plus"})),$.set("link",()=>C({active:E(),onClick:I,label:b.map(r=>r.link),icon:"mdi:link"})),$.set("undo",()=>C({active:e.signal(!1),onClick:M(n.UNDO_COMMAND,void 0),label:b.map(r=>r.undo),icon:"mdi:undo"})),$.set("redo",()=>C({active:e.signal(!1),onClick:M(n.REDO_COMMAND,void 0),label:b.map(r=>r.redo),icon:"mdi:redo"})),$.set("cut",()=>C({active:e.signal(!1),onClick:x,label:b.map(r=>r.cut),icon:"mdi:content-cut"})),$.set("copy",()=>C({active:e.signal(!1),onClick:D,label:b.map(r=>r.copy),icon:"mdi:content-copy"})),$.set("paste",()=>C({active:e.signal(!1),onClick:f,label:b.map(r=>r.paste),icon:"mdi:content-paste"})),$.set("font-family",()=>e.html.select(e.attr.class("bc-lexical-toolbar-select"),e.attr.title(b.map(r=>r.fontFamily)),e.attr.disabled(s),e.on.change(r=>tt(r.target.value)),...W.map(r=>e.html.option(e.attr.value(r.value),e.attr.selected(H.map(p=>p===r.value)),r.label)))),$.set("font-size",()=>e.html.select(e.attr.class("bc-lexical-toolbar-select"),e.attr.title(b.map(r=>r.fontSize)),e.attr.disabled(s),e.on.change(r=>ot(r.target.value)),...g.map(r=>e.html.option(e.attr.value(r.value),e.attr.selected(U.map(p=>p===r.value)),r.label)))),$.set("line-height",()=>e.html.select(e.attr.class("bc-lexical-toolbar-select"),e.attr.title(b.map(r=>r.lineHeight)),e.attr.disabled(s),e.on.change(r=>ut(r.target.value)),...P.map(r=>e.html.option(e.attr.value(r.value),e.attr.selected(lt.map(p=>p===r.value)),r.label)))),$.set("font-color",()=>e.html.label(e.attr.class("bc-lexical-toolbar-color"),e.attr.title(b.map(r=>r.fontColor)),e.html.input(e.attr.type("color"),e.attr.value(nt),e.attr.disabled(s),e.on.input(r=>at(r.target.value))),e.html.span(e.attr.class("bc-lexical-toolbar-color-icon"),"A"))),$.set("highlight-color",()=>e.html.label(e.attr.class("bc-lexical-toolbar-color"),e.attr.title(b.map(r=>r.highlightColor)),e.html.input(e.attr.type("color"),e.attr.value(rt),e.attr.disabled(s),e.on.input(r=>st(r.target.value))),e.html.span(e.attr.class("bc-lexical-toolbar-color-icon bc-lexical-toolbar-color-icon--highlight"),"A"))),$.set("background-color",()=>e.html.label(e.attr.class("bc-lexical-toolbar-color"),e.attr.title(b.map(r=>r.backgroundColor)),e.html.input(e.attr.type("color"),e.attr.value(it),e.attr.disabled(s),e.on.input(r=>ct(r.target.value))),e.html.span(e.attr.class("bc-lexical-toolbar-color-icon bc-lexical-toolbar-color-icon--bg"),"■")));const Pe={editor:R,stateUpdate:o,readOnly:s,size:i,button:r=>C({active:r.active??e.signal(!1),onClick:r.onClick,label:r.label,icon:r.icon})},He=r=>{if(r.type==="button"){const p=r;$.set(r.id,()=>C({active:p.active?.(Pe)??e.signal(!1),onClick:()=>p.onClick(R.value),label:p.label,icon:p.icon}))}else if(r.type==="select"){const p=r,w=p.resetOnSelect!==!1;$.set(r.id,()=>e.html.select(e.attr.class("bc-lexical-toolbar-select"),e.attr.title(p.label),e.attr.disabled(s),e.on.change(z=>{const Z=z.target,Q=Z.value;Q!==""&&(p.onSelect(Q,R.value),w&&(Z.value=""))}),e.html.option(e.attr.value(""),e.attr.disabled(w),e.attr.selected(!0),p.label),...p.options.map(z=>e.html.option(e.attr.value(z.value),z.label))))}else if(r.type==="custom"){const p=r;$.set(r.id,()=>p.render(Pe))}};if(a.customItems)for(const r of a.customItems)He(r);if(a.customGroups)for(const r of a.customGroups)for(const p of r.items)He(p);return je.Toolbar({},e.attr.class("bc-lexical-toolbar"),...mo(h,$,u,a.customGroups))}))}function mo(t,o,a,s){const i=new Map;if(s)for(const h of s)i.set(h.id,h);const u=[];for(const h of t){if("separator"in h){u.push(je.ToolbarDivider());continue}if("customGroup"in h){const b=i.get(h.customGroup);if(!b)continue;const k=[];for(const m of b.items){const T=o.get(m.id);T&&k.push(T())}if(k.length===0)continue;const S=k.map(()=>e.signal(!0));u.push(ve.EditorToolbarGroup({display:S},...k));continue}let O=h.items??lo[h.group]??[];h.group==="headings"&&!h.items&&(O=O.filter(b=>b.startsWith("heading-")?parseInt(b.split("-")[1],10)<=a:!0));const A=[];for(const b of O){const k=o.get(b);k&&A.push(k())}if(A.length===0)continue;const R=A.map(()=>e.signal(!0));u.push(ve.EditorToolbarGroup({display:R},...A))}return u}function Xe({editor:t,stateUpdate:o,readOnly:a=e.signal(!1)}){const s=e.prop(!1),i=e.prop(0),u=e.prop(0);let h=null;const O=e.prop(!1),A=I=>{let N=null;return I.getEditorState().read(()=>{const C=n.$getSelection();if(!n.$isRangeSelection(C))return;let v=C.anchor.getNode();for(;v;){if(G.$isTableCellNode(v)){N=v;break}if(v=v.getParent(),!v||v.getKey()==="root")break}}),N},R=(I,N)=>{const C=I.getBoundingClientRect(),v=N.closest(".bc-lexical-editor-container"),c=v?v.getBoundingClientRect():N.getBoundingClientRect();return i.value=C.top-c.top+2,u.value=c.right-C.right+2,!0},b=()=>{const I=t.value;if(!I){s.value=!1;return}const N=A(I);if(!N){O.value||(s.value=!1);return}const C=I.getElementByKey(N.getKey()),v=I.getRootElement();C&&v?(R(C,v),s.value=!0):s.value=!1};o.onChange(b);const k=I=>()=>{const N=t.value;N&&(N.update(I),h?.set(!1),N.focus())},S=k(()=>G.$insertTableRowAtSelection(!1)),m=k(()=>G.$insertTableRowAtSelection(!0)),T=k(()=>G.$insertTableColumnAtSelection(!1)),y=k(()=>G.$insertTableColumnAtSelection(!0)),E=k(()=>G.$deleteTableRowAtSelection()),M=k(()=>G.$deleteTableColumnAtSelection()),_=k(()=>{const I=n.$getSelection();if(!n.$isRangeSelection(I))return;const N=I.anchor.getNode(),C=G.$getTableCellNodeFromLexicalNode(N);if(!C)return;G.$getTableNodeFromLexicalNodeOrThrow(C).remove()});return e.Use(q.BeatUII18n,I=>e.Ensure(t,N=>{const C=N,v=I.$.lexical,c=d=>{const l=C.value;if(!l||a.value)return;const L=l.getRootElement();if(!L)return;const g=d.target.closest("td, th");g&&L.contains(g)&&(d.preventDefault(),R(g,L)&&(s.value=!0),bt.delayedAnimationFrame(()=>{h?.set(!0)}))},D=C.value?.getRootElement(),f=D?.closest(".bc-lexical-editor-container")??D??document;return f.addEventListener("contextmenu",c),[e.OnDispose(()=>{f.removeEventListener("contextmenu",c)}),e.When(s,()=>e.html.div(e.attr.class("bc-table-cell-marker"),e.style.position("absolute"),e.style.top(i.map(d=>`${d}px`)),e.style.right(u.map(d=>`${d}px`)),e.style.zIndex("10"),e.WithElement(d=>{d.addEventListener("mousedown",l=>{l.preventDefault()})}),e.html.button(e.attr.class("bc-table-cell-marker__button"),e.attr.type("button"),e.attr.title(v.map(d=>d.tableActions)),e.attr.disabled(a),q.Icon({icon:"lucide:chevron-down",size:"xs"}),e.WithElement(d=>{const l=new MutationObserver(()=>{const L=d.getAttribute("aria-expanded")==="true";O.value=L});return l.observe(d,{attributes:!0,attributeFilter:["aria-expanded"]}),e.OnDispose(()=>l.disconnect())}),J.Menu({items:()=>[J.MenuItem({key:"insert-row-above",content:v.map(d=>d.insertRowAbove),before:q.Icon({icon:"lucide:arrow-up",size:"sm"}),onClick:S,disabled:a}),J.MenuItem({key:"insert-row-below",content:v.map(d=>d.insertRowBelow),before:q.Icon({icon:"lucide:arrow-down",size:"sm"}),onClick:m,disabled:a}),J.MenuItem({key:"insert-column-left",content:v.map(d=>d.insertColumnLeft),before:q.Icon({icon:"lucide:arrow-left",size:"sm"}),onClick:T,disabled:a}),J.MenuItem({key:"insert-column-right",content:v.map(d=>d.insertColumnRight),before:q.Icon({icon:"lucide:arrow-right",size:"sm"}),onClick:y,disabled:a}),J.MenuSeparator(),J.MenuItem({key:"delete-row",content:v.map(d=>d.deleteRow),before:q.Icon({icon:"lucide:trash-2",size:"sm"}),onClick:E,disabled:a}),J.MenuItem({key:"delete-column",content:v.map(d=>d.deleteColumn),before:q.Icon({icon:"lucide:trash-2",size:"sm"}),onClick:M,disabled:a}),J.MenuItem({key:"delete-table",content:v.map(d=>d.deleteTable),before:q.Icon({icon:"lucide:trash-2",size:"sm"}),onClick:_,disabled:a})],placement:"bottom-end",showOn:d=>(h=d,e.on.click(()=>{d.set(!d.value)})),showDelay:0,hideDelay:0,mainAxisOffset:4,onClose:()=>{const d=C.value;d&&d.focus()},ariaLabel:v.map(d=>d.tableActions)}))))]}))}const po=t=>{const{value:o,format:a,plugins:s,readOnly:i,placeholder:u,class:h,namespace:O="BeatUILexical",heightMode:A="fixed",toolbar:R,autoFocus:b=!1,onError:k,onInput:S,onChange:m,onBlur:T,onReady:y}=t,E=e.prop(null),M=e.prop(0),_=N=>typeof N=="object"&&N!==null&&"map"in N&&typeof N.map=="function",I=i!=null?_(i)?i:e.prop(e.Value.get(i)):e.prop(!1);return e.Use(Ie.Theme,({appearance:N})=>e.html.div(e.Task(()=>Promise.resolve().then(()=>require("../styles-url-CkPTI32j.cjs")),({default:C})=>Le.LinkPortal({id:"beatui-lexical-css",href:C})),e.attr.class("bc-lexical-editor-container"),A==="fixed"?e.attr.class("bc-lexical-editor-container--fixed"):null,e.attr.class(h),e.When(I.map(C=>!C),()=>Ve({editor:E,stateUpdate:M,toolbar:R,readOnly:I,size:"sm"})),Xe({editor:E,stateUpdate:M,readOnly:I}),e.html.div(e.attr.class("bc-lexical-editor"),e.attr.class(`bc-lexical-editor--${A}`),e.attr.contenteditable(i!=null?e.Value.map(i,C=>!C):!0),i!=null?e.attr.class(e.Value.map(i,C=>C?"bc-lexical-editor--readonly":"")):null,e.WithElement(C=>{let v=null;const c=[];return(async()=>{try{const x=s??pe("docked"),f=me(x),d=e.Value.get(a??"markdown"),l=n.createEditor({namespace:O,nodes:f,theme:{heading:{h1:"bc-lexical-h1",h2:"bc-lexical-h2",h3:"bc-lexical-h3",h4:"bc-lexical-h4",h5:"bc-lexical-h5",h6:"bc-lexical-h6"},text:{bold:"bc-lexical-bold",italic:"bc-lexical-italic",underline:"bc-lexical-underline",strikethrough:"bc-lexical-strikethrough",code:"bc-lexical-code"},list:{ul:"bc-lexical-ul",ol:"bc-lexical-ol",listitem:"bc-lexical-li",listitemChecked:"bc-lexical-li-checked",listitemUnchecked:"bc-lexical-li-unchecked"},link:"bc-lexical-link",quote:"bc-lexical-blockquote",code:"bc-lexical-code-block",codeHighlight:{},hashtag:"bc-lexical-hashtag",table:"bc-lexical-table",tableCell:"bc-lexical-table-cell",tableCellHeader:"bc-lexical-table-cell-header",tableRow:"bc-lexical-table-row",mark:"bc-lexical-mark",paragraph:"bc-lexical-paragraph"},onError:g=>{k?k(g,l):console.error("[BeatUI Lexical]",g)},editable:i?!e.Value.get(i):!0,html:{export:xe(),import:ue()}});v=l,E.set(l),l.setRootElement(C);const L=[];if(x.richText?L.push(he(l)):x.plainText&&L.push(be(l)),x.history){const g=typeof x.history=="object"?x.history:void 0;L.push(Ce(l,g))}if(x.clipboard&&L.push(ye(l)),x.list&&L.push(Ee(l)),x.link&&L.push(Oe(l)),x.yjs&&L.push(Me(l,x.yjs)),x.dragon&&L.push(Se(l)),x.table&&L.push(Ne(l)),(await Promise.all(L)).forEach(g=>{g&&c.push(g)}),c.push(Te(l)),c.push($e(l)),c.push(l.registerCommand(n.SELECTION_CHANGE_COMMAND,()=>(M.set(M.value+1),!1),n.COMMAND_PRIORITY_LOW)),c.push(l.registerUpdateListener(({editorState:g,dirtyElements:P,dirtyLeaves:H})=>{(P.size>0||H.size>0)&&M.set(M.value+1),S&&(P.size>0||H.size>0)&&g.read(async()=>{if(d==="markdown"){const U=await K(l);S(U,l)}else if(d==="html"){const U=await Y(l);S(U,l)}else d==="json"&&S(g.toJSON(),l)})})),o!=null){const g=e.Value.get(o);if(g!=null&&(g!==""||d==="json"&&typeof g=="object")){if(d==="markdown"&&typeof g=="string")await V(l,g);else if(d==="html"&&typeof g=="string")await X(l,g);else if(d==="json"&&typeof g=="object")try{const H=JSON.stringify(g),U=l.parseEditorState(H);l.setEditorState(U)}catch(H){console.error("[BeatUI] Failed to parse JSON editor state:",H),k&&k(H instanceof Error?H:new Error(String(H)),l)}}}if(o!=null&&c.push(e.Value.on(o,async g=>{if(g!=null){if(d==="markdown"&&typeof g=="string"){const P=await K(l);g!==P&&await V(l,g)}else if(d==="html"&&typeof g=="string"){const P=await Y(l);g!==P&&await X(l,g)}else if(d==="json"&&typeof g=="object"){const P=JSON.stringify(l.getEditorState().toJSON()),H=JSON.stringify(g);if(P!==H){const U=l.parseEditorState(H);l.setEditorState(U)}}}})),i!=null&&c.push(e.Value.on(i,g=>{l.setEditable(!g)})),c.push(l.registerCommand(n.BLUR_COMMAND,()=>(T&&T(l),m&&l.getEditorState().read(async()=>{if(d==="markdown"){const g=await K(l);m(g,l)}else if(d==="html"){const g=await Y(l);m(g,l)}else d==="json"&&m(l.getEditorState().toJSON(),l)}),!1),n.COMMAND_PRIORITY_LOW)),c.push(N.on(g=>{const P=l.getRootElement();P&&(P.dataset.theme=g)})),b)l.focus();else{const g=l.getRootElement();g&&g===document.activeElement&&g.blur()}y&&y(l)}catch(x){console.error("[BeatUI] Failed to initialize Lexical editor:",x);const f=C;f.textContent="Failed to load Lexical editor."}})(),e.OnDispose(()=>{try{c.forEach(x=>x())}catch{}try{v?.setRootElement(null)}catch{}E.set(null)})}))))};function Ze({editor:t,stateUpdate:o,groups:a=["text-formatting"],readOnly:s=e.signal(!1),size:i="sm"}){const u=e.prop(!1),h=e.prop(0),O=e.prop(0);return e.Use(q.BeatUII18n,A=>e.Ensure(t,R=>{const b=R,k=A.$.lexical,S=c=>a.includes(c),{textFormatActive:m,linkActive:T,dispatch:y,toggleLink:E}=Ye(b,o,{enterUrlMessage:()=>A.value.lexical.enterUrl}),_=Je(s,i)(e.signal(!0)),I=()=>{const c=b.value;if(!c){u.value=!1;return}const D=c.getRootElement();if(!D){u.value=!1;return}const x=window.getSelection();if(!x||x.rangeCount===0||x.isCollapsed){u.value=!1;return}const f=x.anchorNode;if(f&&!D.contains(f)){u.value=!1;return}const l=x.getRangeAt(0).getBoundingClientRect();if(l.width===0&&l.height===0){u.value=!1;return}const L=40,W=8;let g=l.top-L-W;const P=l.left+l.width/2;g<0&&(g=l.bottom+W),h.value=g,O.value=P,u.value=!0},N=o.onChange(I),C=()=>{I()};document.addEventListener("selectionchange",C);const v=e.html.div(e.attr.class("bc-floating-toolbar"),e.style.position("fixed"),e.style.top(h.map(c=>`${c}px`)),e.style.left(O.map(c=>`${c}px`)),e.style.transform("translateX(-50%)"),e.WithElement(c=>{const D=f=>{if(f.key==="Escape"&&u.value){u.value=!1;const d=b.value;d&&d.focus()}},x=f=>{if(u.value&&!c.contains(f.target)){const d=b.value;if(d){const l=d.getRootElement();if(l&&l.contains(f.target))return}u.value=!1}};return document.addEventListener("keydown",D),document.addEventListener("mousedown",x),e.OnDispose(()=>{N(),document.removeEventListener("keydown",D),document.removeEventListener("mousedown",x),document.removeEventListener("selectionchange",C)})}),...S("text-formatting")?[_({active:m("bold"),onClick:y(n.FORMAT_TEXT_COMMAND,"bold"),label:k.map(c=>c.bold),icon:"mdi:format-bold"}),_({active:m("italic"),onClick:y(n.FORMAT_TEXT_COMMAND,"italic"),label:k.map(c=>c.italic),icon:"mdi:format-italic"}),_({active:m("underline"),onClick:y(n.FORMAT_TEXT_COMMAND,"underline"),label:k.map(c=>c.underline),icon:"mdi:format-underline"}),_({active:m("strikethrough"),onClick:y(n.FORMAT_TEXT_COMMAND,"strikethrough"),label:k.map(c=>c.strikethrough),icon:"mdi:format-strikethrough"}),_({active:m("code"),onClick:y(n.FORMAT_TEXT_COMMAND,"code"),label:k.map(c=>c.code),icon:"mdi:code-tags"})]:[],...S("links")?[_({active:T(),onClick:E,label:k.map(c=>c.link),icon:"mdi:link"})]:[],...S("clipboard")?[_({active:e.signal(!1),onClick:()=>{const c=b.value;if(!c)return;const D=c.getRootElement();D&&(D.focus(),document.execCommand("cut"))},label:k.map(c=>c.cut),icon:"mdi:content-cut"}),_({active:e.signal(!1),onClick:()=>{const c=b.value;if(!c)return;const D=c.getRootElement();D&&(D.focus(),document.execCommand("copy"))},label:k.map(c=>c.copy),icon:"mdi:content-copy"}),_({active:e.signal(!1),onClick:()=>{const c=b.value;c&&navigator.clipboard.readText().then(D=>{c.update(()=>{const x=n.$getSelection();n.$isRangeSelection(x)&&x.insertText(D)}),c.focus()}).catch(()=>{})},label:k.map(c=>c.paste),icon:"mdi:content-paste"})]:[]);return e.When(u,()=>v)}))}const ho=[{id:"heading1",label:"Heading 1",description:"Large section heading",icon:"mdi:format-header-1",keywords:["h1","heading","title"],category:"Basic blocks",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h1"))})}},{id:"heading2",label:"Heading 2",description:"Medium section heading",icon:"mdi:format-header-2",keywords:["h2","heading"],category:"Basic blocks",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h2"))})}},{id:"heading3",label:"Heading 3",description:"Small section heading",icon:"mdi:format-header-3",keywords:["h3","heading"],category:"Basic blocks",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h3"))})}},{id:"bullet-list",label:"Bullet List",description:"Create a bulleted list",icon:"mdi:format-list-bulleted",keywords:["ul","unordered","bullets"],category:"Lists",handler:t=>{t.dispatchCommand(F.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{id:"ordered-list",label:"Ordered List",description:"Create a numbered list",icon:"mdi:format-list-numbered",keywords:["ol","numbered","1","2","3"],category:"Lists",handler:t=>{t.dispatchCommand(F.INSERT_ORDERED_LIST_COMMAND,void 0)}},{id:"quote",label:"Quote",description:"Insert a blockquote",icon:"mdi:format-quote-close",keywords:["blockquote","citation"],category:"Basic blocks",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createQuoteNode())})}},{id:"code-block",label:"Code Block",description:"Insert a code block",icon:"mdi:code-braces",keywords:["code","pre","programming"],category:"Basic blocks",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>ie.$createCodeNode())})}},{id:"divider",label:"Divider",description:"Insert a horizontal rule",icon:"mdi:minus",keywords:["hr","horizontal","line","separator"],category:"Basic blocks",handler:t=>{t.dispatchCommand(ce,void 0)}},{id:"table",label:"Table",description:"Insert a table",icon:"mdi:table",keywords:["table","grid","cells","rows","columns"],category:"Advanced",handler:t=>{t.dispatchCommand(G.INSERT_TABLE_COMMAND,{rows:"3",columns:"3",includeHeaders:!0})}}];function bo({commands:t,isVisible:o,filterText:a,position:s,onSelect:i,onClose:u}){const h=e.prop(0),O=a.map(S=>{const m=S.toLowerCase().trim();return m?t.filter(T=>[T.label.toLowerCase(),T.description?.toLowerCase()||"",...T.keywords?.map(E=>E.toLowerCase())||[]].join(" ").includes(m)):t});O.onChange(()=>{h.value=0});const A=S=>{const m=O.value;if(S>=0&&S<m.length){const T=m[S];i(T)}},R=S=>{if(!o.value)return;const T=O.value.length-1;switch(S.key){case"ArrowDown":S.preventDefault(),h.value=Math.min(h.value+1,T);break;case"ArrowUp":S.preventDefault(),h.value=Math.max(h.value-1,0);break;case"Enter":S.preventDefault(),A(h.value);break;case"Escape":S.preventDefault(),u();break}},b=(S,m)=>{const T=h.map(E=>E===m),y=`slash-cmd-${S.id}`;return e.html.div(e.attr.class("bc-slash-command-palette__item"),e.attr.id(y),e.attr.role("option"),e.aria.selected(T),e.WithElement(E=>{const M=()=>{h.value=m},_=()=>{A(m)};return E.addEventListener("mouseenter",M),E.addEventListener("click",_),e.OnDispose(()=>{E.removeEventListener("mouseenter",M),E.removeEventListener("click",_)})}),typeof S.icon=="string"?e.html.div(e.attr.class("bc-slash-command-palette__icon"),q.Icon({icon:S.icon,size:"sm"})):S.icon,e.html.div(e.attr.class("bc-slash-command-palette__content"),e.html.div(e.attr.class("bc-slash-command-palette__label"),S.label),S.description?e.html.div(e.attr.class("bc-slash-command-palette__description"),S.description):void 0),S.category?e.html.div(e.attr.class("bc-slash-command-palette__category"),S.category):void 0)},k=e.Use(q.BeatUII18n,S=>e.html.div(e.attr.class("bc-slash-command-palette"),e.attr.role("listbox"),e.aria.label(S.$.lexical.map(m=>m.slashCommands)),e.style.position("absolute"),e.style.top(s.map(m=>`${m.top}px`)),e.style.left(s.map(m=>`${m.left}px`)),e.WithElement(()=>(document.addEventListener("keydown",R),e.OnDispose(()=>{document.removeEventListener("keydown",R)}))),e.When(O.map(m=>m.length===0),()=>e.html.div(e.attr.class("bc-slash-command-palette__empty"),S.$.lexical.map(m=>m.noCommandsFound))),e.ForEach(O,(m,T)=>{const y=m.value;return b(y,T.index)})));return e.When(o,()=>k)}const Qe=[{id:"paragraph",label:"Paragraph",icon:"mdi:format-paragraph",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>n.$createParagraphNode())})}},{id:"heading1",label:"Heading 1",icon:"mdi:format-header-1",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h1"))})}},{id:"heading2",label:"Heading 2",icon:"mdi:format-header-2",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h2"))})}},{id:"heading3",label:"Heading 3",icon:"mdi:format-header-3",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createHeadingNode("h3"))})}},{id:"bullet-list",label:"Bullet List",icon:"mdi:format-list-bulleted",handler:t=>{t.dispatchCommand(F.INSERT_UNORDERED_LIST_COMMAND,void 0)}},{id:"ordered-list",label:"Ordered List",icon:"mdi:format-list-numbered",handler:t=>{t.dispatchCommand(F.INSERT_ORDERED_LIST_COMMAND,void 0)}},{id:"quote",label:"Quote",icon:"mdi:format-quote-close",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>j.$createQuoteNode())})}},{id:"code-block",label:"Code Block",icon:"mdi:code-braces",handler:t=>{t.update(()=>{const o=n.$getSelection();n.$isRangeSelection(o)&&B.$setBlocksType(o,()=>ie.$createCodeNode())})}},{id:"divider",label:"Divider",icon:"mdi:minus",handler:t=>{t.dispatchCommand(ce,void 0)}},{id:"table",label:"Table",icon:"mdi:table",handler:t=>{t.dispatchCommand(G.INSERT_TABLE_COMMAND,{rows:"3",columns:"3",includeHeaders:!0})}}];function et({editor:t,stateUpdate:o,readOnly:a=e.signal(!1),commands:s=Qe}){const i=e.prop(!1),u=e.prop(!1),h=e.prop(0),O=e.prop(0);return e.Use(q.BeatUII18n,A=>e.Ensure(t,R=>{const b=R;let k=null,S=!1,m=null;const T=24,y=4,E=200,M=f=>{if(f===k&&i.value)return;k=f;const d=f.getBoundingClientRect();h.value=d.top,O.value=d.left-T-y,i.value=!0},_=()=>{m!=null&&(clearTimeout(m),m=null)},I=()=>{u.value||(_(),m=setTimeout(()=>{m=null,u.value||(i.value=!1,k=null)},E))},N=()=>{const f=b.value;if(!f)return;const d=f.getRootElement();d&&(c(d),f.getEditorState().read(()=>{const l=n.$getSelection();if(n.$isRangeSelection(l))try{const W=l.anchor.getNode().getTopLevelElementOrThrow(),g=f.getElementByKey(W.getKey());g&&M(g)}catch{}}))},C=f=>{if(u.value)return;const d=b.value;if(!d)return;const l=d.getRootElement();if(l)for(const L of Array.from(l.children)){const W=L.getBoundingClientRect();if(f.clientY>=W.top&&f.clientY<=W.bottom){_(),M(L);return}}},v=()=>{I()},c=f=>{S||(S=!0,f.addEventListener("mousemove",C),f.addEventListener("mouseleave",v))},D=o.onChange(N);return[e.OnDispose(()=>{D(),_();const f=b.value;if(f){const d=f.getRootElement();d&&S&&(d.removeEventListener("mousemove",C),d.removeEventListener("mouseleave",v))}}),e.When(i,()=>e.html.div(e.attr.class("bc-block-handle"),e.style.position("fixed"),e.style.top(h.map(f=>`${f}px`)),e.style.left(O.map(f=>`${f}px`)),e.on.mouseenter(_),e.on.mouseleave(()=>I()),e.WithElement(f=>{f.addEventListener("mousedown",d=>{d.preventDefault()})}),e.html.button(e.attr.class("bc-block-handle__button"),e.attr.type("button"),e.attr.title(A.$.lexical.map(f=>f.changeBlockType)),e.attr.disabled(a),q.Icon({icon:"mdi:drag-horizontal-variant",size:"sm"}),e.WithElement(f=>{const d=new MutationObserver(()=>{const l=f.getAttribute("aria-expanded")==="true";u.value=l});return d.observe(f,{attributes:!0,attributeFilter:["aria-expanded"]}),e.OnDispose(()=>d.disconnect())}),J.Menu({items:()=>s.map(f=>J.MenuItem({key:f.id,content:f.label,before:q.Icon({icon:f.icon,size:"sm"}),onClick:()=>{const d=b.value;d&&(f.handler(d),d.focus())}})),placement:"bottom-start",showOn:"click",showDelay:0,hideDelay:0,mainAxisOffset:4,onClose:()=>{const f=b.value;f&&f.focus()},ariaLabel:A.value.lexical.blockTypes}))))]}))}const Co=t=>{const{value:o,format:a,plugins:s,readOnly:i,placeholder:u,class:h,namespace:O="BeatUILexical",heightMode:A="auto",floatingToolbarGroups:R,autoFocus:b=!1,onError:k,onInput:S,onChange:m,onBlur:T,onReady:y}=t,E=e.prop(null),M=e.prop(0),_=N=>typeof N=="object"&&N!==null&&"map"in N&&typeof N.map=="function",I=i!=null?_(i)?i:e.prop(e.Value.get(i)):e.prop(!1);return e.Use(Ie.Theme,({appearance:N})=>e.html.div(e.Task(()=>Promise.resolve().then(()=>require("../styles-url-CkPTI32j.cjs")),({default:C})=>Le.LinkPortal({id:"beatui-lexical-css",href:C})),e.attr.class("bc-lexical-editor-container"),A==="fixed"?e.attr.class("bc-lexical-editor-container--fixed"):null,e.attr.class(h),Ze({editor:E,stateUpdate:M,groups:R??["text-formatting","links"],readOnly:I}),et({editor:E,stateUpdate:M,readOnly:I}),Xe({editor:E,stateUpdate:M,readOnly:I}),e.html.div(e.attr.class("bc-lexical-editor"),e.attr.class(`bc-lexical-editor--${A}`),e.attr.contenteditable(i!=null?e.Value.map(i,C=>!C):!0),i!=null?e.attr.class(e.Value.map(i,C=>C?"bc-lexical-editor--readonly":"")):null,e.WithElement(C=>{let v=null;const c=[];return(async()=>{try{const x=s??pe("contextual"),f=me(x),d=e.Value.get(a??"markdown"),l=n.createEditor({namespace:O,nodes:f,theme:{heading:{h1:"bc-lexical-h1",h2:"bc-lexical-h2",h3:"bc-lexical-h3",h4:"bc-lexical-h4",h5:"bc-lexical-h5",h6:"bc-lexical-h6"},text:{bold:"bc-lexical-bold",italic:"bc-lexical-italic",underline:"bc-lexical-underline",strikethrough:"bc-lexical-strikethrough",code:"bc-lexical-code"},list:{ul:"bc-lexical-ul",ol:"bc-lexical-ol",listitem:"bc-lexical-li",listitemChecked:"bc-lexical-li-checked",listitemUnchecked:"bc-lexical-li-unchecked"},link:"bc-lexical-link",quote:"bc-lexical-blockquote",code:"bc-lexical-code-block",codeHighlight:{},hashtag:"bc-lexical-hashtag",table:"bc-lexical-table",tableCell:"bc-lexical-table-cell",tableCellHeader:"bc-lexical-table-cell-header",tableRow:"bc-lexical-table-row",mark:"bc-lexical-mark",paragraph:"bc-lexical-paragraph"},onError:g=>{k?k(g,l):console.error("[BeatUI Lexical]",g)},editable:i?!e.Value.get(i):!0,html:{export:xe(),import:ue()}});v=l,E.set(l),l.setRootElement(C);const L=[];if(x.richText?L.push(he(l)):x.plainText&&L.push(be(l)),x.history){const g=typeof x.history=="object"?x.history:void 0;L.push(Ce(l,g))}if(x.clipboard&&L.push(ye(l)),x.list&&L.push(Ee(l)),x.link&&L.push(Oe(l)),x.yjs&&L.push(Me(l,x.yjs)),x.dragon&&L.push(Se(l)),x.table&&L.push(Ne(l)),(await Promise.all(L)).forEach(g=>{g&&c.push(g)}),c.push(Te(l)),c.push($e(l)),c.push(l.registerCommand(n.SELECTION_CHANGE_COMMAND,()=>(M.set(M.value+1),!1),n.COMMAND_PRIORITY_LOW)),c.push(l.registerUpdateListener(({editorState:g,dirtyElements:P,dirtyLeaves:H})=>{(P.size>0||H.size>0)&&M.set(M.value+1),S&&(P.size>0||H.size>0)&&g.read(async()=>{if(d==="markdown"){const U=await K(l);S(U,l)}else if(d==="html"){const U=await Y(l);S(U,l)}else d==="json"&&S(g.toJSON(),l)})})),o!=null){const g=e.Value.get(o);if(g!=null&&(g!==""||d==="json"&&typeof g=="object")){if(d==="markdown"&&typeof g=="string")await V(l,g);else if(d==="html"&&typeof g=="string")await X(l,g);else if(d==="json"&&typeof g=="object")try{const H=JSON.stringify(g),U=l.parseEditorState(H);l.setEditorState(U)}catch(H){console.error("[BeatUI] Failed to parse JSON editor state:",H),k&&k(H instanceof Error?H:new Error(String(H)),l)}}}if(o!=null&&c.push(e.Value.on(o,async g=>{if(g!=null){if(d==="markdown"&&typeof g=="string"){const P=await K(l);g!==P&&await V(l,g)}else if(d==="html"&&typeof g=="string"){const P=await Y(l);g!==P&&await X(l,g)}else if(d==="json"&&typeof g=="object"){const P=JSON.stringify(l.getEditorState().toJSON()),H=JSON.stringify(g);if(P!==H){const U=l.parseEditorState(H);l.setEditorState(U)}}}})),i!=null&&c.push(e.Value.on(i,g=>{l.setEditable(!g)})),c.push(l.registerCommand(n.BLUR_COMMAND,()=>(T&&T(l),m&&l.getEditorState().read(async()=>{if(d==="markdown"){const g=await K(l);m(g,l)}else if(d==="html"){const g=await Y(l);m(g,l)}else d==="json"&&m(l.getEditorState().toJSON(),l)}),!1),n.COMMAND_PRIORITY_LOW)),c.push(N.on(g=>{const P=l.getRootElement();P&&(P.dataset.theme=g)})),b)l.focus();else{const g=l.getRootElement();g&&g===document.activeElement&&g.blur()}y&&y(l)}catch(x){console.error("[BeatUI] Failed to initialize Lexical editor:",x);const f=C;f.textContent="Failed to load Lexical editor."}})(),e.OnDispose(()=>{try{c.forEach(x=>x())}catch{}try{v?.setRootElement(null)}catch{}E.set(null)})}))))},yo=t=>{const{value:o,before:a,after:s,onChange:i,onInput:u,onBlur:h,disabled:O,hasError:A,name:R,placeholder:b,id:k,required:S,tabIndex:m,size:T,class:y,namespace:E,format:M,plugins:_,readOnly:I,onError:N,onReady:C,marks:v,autoFocus:c}=t,D=O!=null&&I!=null?e.computedOf(O,I)((x,f)=>(x??!1)||(f??!1)):O??I;return Ct.InputContainer({disabled:O,hasError:A,size:T,baseContainer:!0,growInput:!0,focusableSelector:"[contenteditable]",before:a,after:s,input:e.html.div(e.attr.class("bc-lexical-editor-input"),e.attr.name(R),e.attr.id(k),S!=null?e.aria.required(S):null,m!=null?e.attr.tabindex(m):null,A!=null?e.attr.class(e.Value.map(A,x=>x?"bc-lexical-editor-input--error":"")):null,Ke({value:o,format:M??"markdown",plugins:_,readOnly:D,placeholder:b,namespace:E,class:y,autoFocus:c,onError:N,onReady:C,onInput:u?(x,f)=>{u(x)}:void 0,onChange:i?(x,f)=>{i(x)}:void 0,onBlur:h?x=>{h()}:void 0}))})};Object.defineProperty(exports,"INSERT_CHECK_LIST_COMMAND",{enumerable:!0,get:()=>F.INSERT_CHECK_LIST_COMMAND});Object.defineProperty(exports,"INSERT_ORDERED_LIST_COMMAND",{enumerable:!0,get:()=>F.INSERT_ORDERED_LIST_COMMAND});Object.defineProperty(exports,"INSERT_UNORDERED_LIST_COMMAND",{enumerable:!0,get:()=>F.INSERT_UNORDERED_LIST_COMMAND});Object.defineProperty(exports,"REMOVE_LIST_COMMAND",{enumerable:!0,get:()=>F.REMOVE_LIST_COMMAND});Object.defineProperty(exports,"BLUR_COMMAND",{enumerable:!0,get:()=>n.BLUR_COMMAND});Object.defineProperty(exports,"CLEAR_EDITOR_COMMAND",{enumerable:!0,get:()=>n.CLEAR_EDITOR_COMMAND});Object.defineProperty(exports,"CLICK_COMMAND",{enumerable:!0,get:()=>n.CLICK_COMMAND});Object.defineProperty(exports,"COMMAND_PRIORITY_CRITICAL",{enumerable:!0,get:()=>n.COMMAND_PRIORITY_CRITICAL});Object.defineProperty(exports,"COMMAND_PRIORITY_EDITOR",{enumerable:!0,get:()=>n.COMMAND_PRIORITY_EDITOR});Object.defineProperty(exports,"COMMAND_PRIORITY_HIGH",{enumerable:!0,get:()=>n.COMMAND_PRIORITY_HIGH});Object.defineProperty(exports,"COMMAND_PRIORITY_LOW",{enumerable:!0,get:()=>n.COMMAND_PRIORITY_LOW});Object.defineProperty(exports,"COMMAND_PRIORITY_NORMAL",{enumerable:!0,get:()=>n.COMMAND_PRIORITY_NORMAL});Object.defineProperty(exports,"COPY_COMMAND",{enumerable:!0,get:()=>n.COPY_COMMAND});Object.defineProperty(exports,"CUT_COMMAND",{enumerable:!0,get:()=>n.CUT_COMMAND});Object.defineProperty(exports,"DecoratorNode",{enumerable:!0,get:()=>n.DecoratorNode});Object.defineProperty(exports,"ElementNode",{enumerable:!0,get:()=>n.ElementNode});Object.defineProperty(exports,"FOCUS_COMMAND",{enumerable:!0,get:()=>n.FOCUS_COMMAND});Object.defineProperty(exports,"FORMAT_ELEMENT_COMMAND",{enumerable:!0,get:()=>n.FORMAT_ELEMENT_COMMAND});Object.defineProperty(exports,"FORMAT_TEXT_COMMAND",{enumerable:!0,get:()=>n.FORMAT_TEXT_COMMAND});Object.defineProperty(exports,"INDENT_CONTENT_COMMAND",{enumerable:!0,get:()=>n.INDENT_CONTENT_COMMAND});Object.defineProperty(exports,"INSERT_PARAGRAPH_COMMAND",{enumerable:!0,get:()=>n.INSERT_PARAGRAPH_COMMAND});Object.defineProperty(exports,"KEY_ENTER_COMMAND",{enumerable:!0,get:()=>n.KEY_ENTER_COMMAND});Object.defineProperty(exports,"KEY_ESCAPE_COMMAND",{enumerable:!0,get:()=>n.KEY_ESCAPE_COMMAND});Object.defineProperty(exports,"KEY_TAB_COMMAND",{enumerable:!0,get:()=>n.KEY_TAB_COMMAND});Object.defineProperty(exports,"OUTDENT_CONTENT_COMMAND",{enumerable:!0,get:()=>n.OUTDENT_CONTENT_COMMAND});Object.defineProperty(exports,"PASTE_COMMAND",{enumerable:!0,get:()=>n.PASTE_COMMAND});Object.defineProperty(exports,"REDO_COMMAND",{enumerable:!0,get:()=>n.REDO_COMMAND});Object.defineProperty(exports,"SELECTION_CHANGE_COMMAND",{enumerable:!0,get:()=>n.SELECTION_CHANGE_COMMAND});Object.defineProperty(exports,"TextNode",{enumerable:!0,get:()=>n.TextNode});Object.defineProperty(exports,"UNDO_COMMAND",{enumerable:!0,get:()=>n.UNDO_COMMAND});Object.defineProperty(exports,"createCommand",{enumerable:!0,get:()=>n.createCommand});exports.$createHorizontalRuleNode=se;exports.$isHorizontalRuleNode=Ue;exports.BareEditor=Ke;exports.BlockHandle=et;exports.ContextualEditor=Co;exports.DEFAULT_BLOCK_COMMANDS=Qe;exports.DEFAULT_INLINE_STYLE_PROPERTIES=qe;exports.DEFAULT_SLASH_COMMANDS=ho;exports.DockedEditor=po;exports.FloatingToolbar=Ze;exports.HR_TRANSFORMER=Ge;exports.HorizontalRuleNode=oe;exports.INSERT_HORIZONTAL_RULE_COMMAND=ce;exports.INSERT_IMAGE_COMMAND=xt;exports.LexicalEditorInput=yo;exports.LexicalToolbar=Ve;exports.SlashCommandPalette=bo;exports.TOGGLE_SLASH_COMMAND_PALETTE=Mt;exports.TOOLBAR_SEPARATOR=Ot;exports.applyMark=Ut;exports.buildInlineStyleImportMap=We;exports.buildStyleImportMap=ue;exports.createDefaultPluginConfig=pe;exports.createHeadlessEditor=de;exports.executeSlashCommand=St;exports.exportEditorToFile=_t;exports.exportToHtml=Y;exports.exportToMarkdown=K;exports.getCharacterCount=Wt;exports.getMarkdownTransformers=kt;exports.getNodesForPlugins=me;exports.getSelectionInfo=qt;exports.getTextContent=we;exports.getWordCount=Kt;exports.htmlToLexicalJson=ro;exports.importFileToEditor=vt;exports.importFromHtml=X;exports.importFromMarkdown=V;exports.insertTable=At;exports.insertTextAtCursor=Yt;exports.lexicalJsonToHtml=io;exports.lexicalJsonToMarkdown=no;exports.loadLexicalCore=ze;exports.loadOffsetUtils=Jt;exports.markdownToLexicalJson=oo;exports.registerAutoLinkPlugin=Bt;exports.registerClipboardPlugin=ye;exports.registerCodePlugin=Lt;exports.registerCodeShikiPlugin=It;exports.registerDragonPlugin=Se;exports.registerHashtagPlugin=$t;exports.registerHistoryPlugin=Ce;exports.registerHorizontalRulePlugin=Te;exports.registerLinkPlugin=Oe;exports.registerListPlugin=Ee;exports.registerMarkPlugin=jt;exports.registerOverflowPlugin=Gt;exports.registerPlainTextPlugin=be;exports.registerRichTextPlugin=he;exports.registerSlashCommandsPlugin=Nt;exports.registerTablePlugin=Ne;exports.registerYjsPlugin=Me;exports.removeMark=zt;
@@ -29,11 +29,11 @@ import { Use as ue, html as D, Task as Ke, attr as f, Value as U, WithElement as
29
29
  import { L as qe } from "../link-portal-Cr2l9f3k.js";
30
30
  import { T as Ye } from "../theme-kQZEeusG.js";
31
31
  import { M as Et, a as le, b as Fo } from "../menu-BkqFGcXg.js";
32
- import { B as ye, I as Z } from "../translations-B96REXIk.js";
33
- import { E as Ho, a as gt } from "../editor-toolbar-group-7eMZbEvH.js";
32
+ import { B as ye, I as Z } from "../translations-DT5QQ4WO.js";
33
+ import { E as Ho, a as gt } from "../editor-toolbar-group-DWUWUO-B.js";
34
34
  import { delayedAnimationFrame as Po } from "@tempots/std";
35
- import { b as Bo, c as $o } from "../toolbar-e9POle8o.js";
36
- import { I as Uo } from "../input-container-Q9wL2BUl.js";
35
+ import { b as Bo, c as $o } from "../toolbar-BKan3NHw.js";
36
+ import { I as Uo } from "../input-container-CO3DNqpp.js";
37
37
  const Vn = { separator: !0 };
38
38
  class ge extends co {
39
39
  static getType() {
@@ -1 +1 @@
1
- "use strict";const n=require("@tempots/dom"),M=require("./use-animated-toggle-cKcuItmz.cjs"),S=require("@tempots/std"),D=require("./session-id-B5lJMzbB.cjs"),q=require("./translations-BDGa_4jx.cjs"),j=require("./use-form-Ca0kF4af.cjs"),B=require("./input-container-BZwpJgx6.cjs"),W=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","details[open]"].join(", ");function _(u){return Array.from(u.querySelectorAll(W)).filter(e=>{const s=e;return s.offsetWidth>0&&s.offsetHeight>0&&!s.hasAttribute("inert")&&window.getComputedStyle(s).visibility!=="hidden"})}function V(u={}){const{active:e=!0,escapeDeactivates:s=!0,onEscape:t,initialFocus:a,returnFocus:i,clickOutsideDeactivates:c=!1,onClickOutside:d}=u;return n.WithElement(g=>{let h=e,f=null,l=[],b=null,p=null,m=null;typeof document<"u"&&(f=document.activeElement);const y=()=>{l=_(g)},C=r=>{if(h){if(s&&r.key==="Escape"){r.preventDefault(),t?.();return}if(r.key==="Tab"){if(y(),l.length===0){r.preventDefault();return}const o=l.indexOf(document.activeElement);r.shiftKey?o<=0&&(r.preventDefault(),l[l.length-1]?.focus()):o>=l.length-1&&(r.preventDefault(),l[0]?.focus())}}},v=r=>{if(!h||!c)return;const o=r.target;g.contains(o)||d?.()},x=()=>{if(!h)return;y();let r=null;typeof a=="function"?r=a():a?r=a:l.length>0&&(r=l[0]),r&&(p=setTimeout(()=>{p=null,r?.focus()},50)),document.addEventListener("keydown",C,!0),c&&document.addEventListener("click",v,!0)},w=()=>{h=!1,document.removeEventListener("keydown",C,!0),document.removeEventListener("click",v,!0);let r=null;typeof i=="function"?r=i():i?r=i:f&&(r=f),r&&document.body.contains(r)&&(m=setTimeout(()=>{m=null,r?.focus()},0))};return b=setTimeout(()=>{b=null,x()},0),n.OnDispose(()=>{b!=null&&clearTimeout(b),p!=null&&clearTimeout(p),m!=null&&clearTimeout(m),w()})})}function P(u={}){return{activate:()=>V({...u,active:!0}),deactivate:()=>V({...u,active:!1})}}function I(u){return{"~standard":{version:1,vendor:"beatui-custom",validate:s=>{const t=u.validate(s);return t.success?{value:t.data}:{issues:t.errors.map(a=>({message:a.message,path:a.path}))}},types:void 0},safeParse:s=>{const t=u.validate(s);return t.success?{success:!0,data:t.data}:{success:!1,error:{errors:t.errors.map(a=>({message:a.message,path:a.path?.map(i=>typeof i=="object"&&"key"in i?i.key.toString():i.toString())||[]}))}}}}}class k{optional(){return new U(this)}default(e){return new z(this,e)}schema(){return I(this)}}class E extends k{minLength;maxLength;pattern;customValidations=[];validate(e){if(typeof e!="string")return{success:!1,errors:[{message:"Expected string"}]};const s=[];this.minLength!==void 0&&e.length<this.minLength&&s.push({message:`Must be at least ${this.minLength} characters`}),this.maxLength!==void 0&&e.length>this.maxLength&&s.push({message:`Must be at most ${this.maxLength} characters`}),this.pattern&&!this.pattern.test(e)&&s.push({message:"Invalid format"});for(const t of this.customValidations){const a=t(e);a&&s.push({message:a})}return s.length>0?{success:!1,errors:s}:{success:!0,data:e}}min(e,s){const t=new E;return t.minLength=e,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length<e?s:null),t}max(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=e,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length>e?s:null),t}regex(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=e,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>e.test(a)?null:s),t}email(e="Please enter a valid email address"){const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations,a=>s.test(a)?null:e],t}refine(e){const s=new E;return s.minLength=this.minLength,s.maxLength=this.maxLength,s.pattern=this.pattern,s.customValidations=[...this.customValidations,e],s}}class T extends k{mustBeTrue=!1;trueMessage;validate(e){return typeof e!="boolean"?{success:!1,errors:[{message:"Expected boolean"}]}:this.mustBeTrue&&e!==!0?{success:!1,errors:[{message:this.trueMessage||"Must be true"}]}:{success:!0,data:e}}refine(e,s){const t=new T;t.mustBeTrue=this.mustBeTrue,t.trueMessage=this.trueMessage;const a=t.validate.bind(t);return t.validate=i=>{const c=a(i);return c.success?e(c.data)?c:{success:!1,errors:[{message:s}]}:c},t}literal(e,s){const t=new T;return t.mustBeTrue=!0,t.trueMessage=s,t}}class U extends k{constructor(e){super(),this.inner=e}validate(e){if(e===void 0)return{success:!0,data:void 0};const s=this.inner.validate(e);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.errors}}}class z extends k{constructor(e,s){super(),this.inner=e,this.defaultValue=s}validate(e){return e===void 0?{success:!0,data:this.defaultValue}:this.inner.validate(e)}}class F extends k{constructor(e){super(),this.shape=e}validate(e){if(typeof e!="object"||e===null||Array.isArray(e))return{success:!1,errors:[{message:"Expected object"}]};const s=e,t={},a=[];for(const[i,c]of Object.entries(this.shape)){const d=c.validate(s[i]);if(d.success)t[i]=d.data;else for(const g of d.errors)a.push({message:g.message,path:[i,...g.path||[]]})}return a.length>0?{success:!1,errors:a}:{success:!0,data:t}}refine(e,s){const t=new F(this.shape),a=t.validate.bind(t);return t.validate=i=>{const c=a(i);if(!c.success)return c;const d=e(c.data);return d?{success:!1,errors:[{message:d,path:s?.path}]}:{success:!0,data:c.data}},t}}const R=()=>new E,H=()=>new T,K=u=>new F(u);function O(u){return n.WithBrowserCtx(e=>{const s=[],t=()=>s.forEach(i=>i());return u(({effect:i="opaque",mode:c="capturing",onClickOutside:d,onEscape:g,content:h,container:f="body"})=>{f==="body"&&(e=e.makePortal("body"));const l=M.useAnimatedElementToggle();l.listenOnClosed(t);let b=()=>{},p=()=>{};const m=r=>{r.key==="Escape"&&(g?.(),l.close())},y=()=>{d?.(),l.close()},C=r=>{b(),p(),r==="capturing"?(document.addEventListener("keydown",m),b=()=>document.removeEventListener("keydown",m),e.element.addEventListener("mousedown",y),p=()=>e.element.removeEventListener("mousedown",y)):(b=()=>{},p=()=>{})},v=n.Value.on(c,C);s.push(v),s.push(()=>{l.dispose(),b(),p()});const x=()=>{const r=new Set;for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))o.hasAttribute("inert")?r.add(o):o.setAttribute("inert","");return s.push(()=>{for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))r.has(o)||o.removeAttribute("inert");r.clear()}),document.activeElement?.blur?.(),n.html.div(n.WithElement(o=>l.setElement(o)),n.dataAttr("status",l.status.map(String)),n.dataAttr("overlay","true"),n.attr.class(n.computedOf(i??"opaque",c)((o,L)=>`bc-overlay bc-overlay--container-${f} bc-overlay--effect-${o} bc-overlay--mode-${L}`)),h)},w=n.render(x(),e.element,{disposeWithParent:!0,clear:!1,providers:e.providers});s.push(w),S.delayedAnimationFrame(()=>l.open())},t)})}function $(u,e){const{size:s="md",dismissable:t=!0,showCloseButton:a=!0,onClose:i,overlayEffect:c="opaque",container:d="body",position:g="center"}=u;return O((h,f)=>{let l=()=>{};return e(m=>{l=f;const y=n.prop("capturing");n.Value.on(t,o=>{y.set(o?"capturing":"non-capturing")});const C=n.computedOf(m.header!=null,a)((o,L)=>o||L),v=D.sessionId("modal"),x=`${v}-header`,w=`${v}-body`,r=n.html.div(n.attr.class(n.computedOf(s,g)((o,L)=>`bc-modal bc-modal--size-${o} bc-modal--container-${d} bc-modal--position-${L}`)),n.attr.role("dialog"),n.aria.modal(!0),...m.header?[n.aria.labelledby(x)]:[],n.aria.describedby(w),n.attr.tabindex(-1),n.attr.id(v),n.dataAttr("focus-trap","true"),n.on.mousedown(o=>o.stopPropagation()),V({escapeDeactivates:!1,initialFocus:()=>{const o=document.getElementById(v);if(!o)return null;const L=o.querySelector('[aria-label="Close modal"]');if(L)return L;const A=o.querySelector('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');return A||o}}),n.html.div(n.attr.class("bc-modal__content"),n.When(C,()=>n.html.div(n.attr.class("bc-modal__header"),n.html.div(n.attr.class("bc-modal__title"),...m.header?[n.attr.id(x)]:[],m.header),n.When(a,()=>n.Use(q.BeatUII18n,o=>j.CloseButton({size:"sm",label:o.$.closeModal,onClick:()=>{l(),f()}}))))),n.html.div(n.attr.class("bc-modal__body"),n.attr.id(w),m.body),m.footer&&n.html.div(n.attr.class("bc-modal__footer"),m.footer)));h({mode:y,effect:c??"opaque",container:d,content:r,onClickOutside:()=>{i?.(),f()},onEscape:()=>{i?.(),f()}})},()=>{l(),f()})})}function G(u,e){const{confirmText:s,cancelText:t,onConfirm:a,onCancel:i,...c}=u;return n.Use(q.BeatUII18n,d=>$({showCloseButton:!1,...c},(g,h)=>{const f=()=>{a?.(),h()},l=()=>{i?.(),h()};return e(p=>{g({body:p,footer:n.Fragment(n.attr.class("bc-modal__actions"),B.Button({variant:"outline",onClick:l},n.coalesce(t,d.$.cancel)),B.Button({color:"primary",variant:"filled",onClick:f},n.coalesce(s,d.$.confirm)))})},h)}))}exports.BooleanValidator=T;exports.ConfirmModal=G;exports.FocusTrap=V;exports.Modal=$;exports.ObjectValidator=F;exports.Overlay=O;exports.StringValidator=E;exports.boolean=H;exports.createStandardSchema=I;exports.object=K;exports.string=R;exports.useFocusTrap=P;
1
+ "use strict";const n=require("@tempots/dom"),M=require("./use-animated-toggle-cKcuItmz.cjs"),S=require("@tempots/std"),D=require("./session-id-B5lJMzbB.cjs"),q=require("./translations-qefRsdGi.cjs"),j=require("./use-form-BvBkVEKi.cjs"),B=require("./input-container-BkPcNDaZ.cjs"),W=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]',"audio[controls]","video[controls]","details > summary:first-of-type","details[open]"].join(", ");function _(u){return Array.from(u.querySelectorAll(W)).filter(e=>{const s=e;return s.offsetWidth>0&&s.offsetHeight>0&&!s.hasAttribute("inert")&&window.getComputedStyle(s).visibility!=="hidden"})}function V(u={}){const{active:e=!0,escapeDeactivates:s=!0,onEscape:t,initialFocus:a,returnFocus:i,clickOutsideDeactivates:c=!1,onClickOutside:d}=u;return n.WithElement(g=>{let h=e,f=null,l=[],b=null,p=null,m=null;typeof document<"u"&&(f=document.activeElement);const y=()=>{l=_(g)},C=r=>{if(h){if(s&&r.key==="Escape"){r.preventDefault(),t?.();return}if(r.key==="Tab"){if(y(),l.length===0){r.preventDefault();return}const o=l.indexOf(document.activeElement);r.shiftKey?o<=0&&(r.preventDefault(),l[l.length-1]?.focus()):o>=l.length-1&&(r.preventDefault(),l[0]?.focus())}}},v=r=>{if(!h||!c)return;const o=r.target;g.contains(o)||d?.()},x=()=>{if(!h)return;y();let r=null;typeof a=="function"?r=a():a?r=a:l.length>0&&(r=l[0]),r&&(p=setTimeout(()=>{p=null,r?.focus()},50)),document.addEventListener("keydown",C,!0),c&&document.addEventListener("click",v,!0)},w=()=>{h=!1,document.removeEventListener("keydown",C,!0),document.removeEventListener("click",v,!0);let r=null;typeof i=="function"?r=i():i?r=i:f&&(r=f),r&&document.body.contains(r)&&(m=setTimeout(()=>{m=null,r?.focus()},0))};return b=setTimeout(()=>{b=null,x()},0),n.OnDispose(()=>{b!=null&&clearTimeout(b),p!=null&&clearTimeout(p),m!=null&&clearTimeout(m),w()})})}function P(u={}){return{activate:()=>V({...u,active:!0}),deactivate:()=>V({...u,active:!1})}}function I(u){return{"~standard":{version:1,vendor:"beatui-custom",validate:s=>{const t=u.validate(s);return t.success?{value:t.data}:{issues:t.errors.map(a=>({message:a.message,path:a.path}))}},types:void 0},safeParse:s=>{const t=u.validate(s);return t.success?{success:!0,data:t.data}:{success:!1,error:{errors:t.errors.map(a=>({message:a.message,path:a.path?.map(i=>typeof i=="object"&&"key"in i?i.key.toString():i.toString())||[]}))}}}}}class k{optional(){return new U(this)}default(e){return new z(this,e)}schema(){return I(this)}}class E extends k{minLength;maxLength;pattern;customValidations=[];validate(e){if(typeof e!="string")return{success:!1,errors:[{message:"Expected string"}]};const s=[];this.minLength!==void 0&&e.length<this.minLength&&s.push({message:`Must be at least ${this.minLength} characters`}),this.maxLength!==void 0&&e.length>this.maxLength&&s.push({message:`Must be at most ${this.maxLength} characters`}),this.pattern&&!this.pattern.test(e)&&s.push({message:"Invalid format"});for(const t of this.customValidations){const a=t(e);a&&s.push({message:a})}return s.length>0?{success:!1,errors:s}:{success:!0,data:e}}min(e,s){const t=new E;return t.minLength=e,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length<e?s:null),t}max(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=e,t.pattern=this.pattern,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>a.length>e?s:null),t}regex(e,s){const t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=e,t.customValidations=[...this.customValidations],s&&t.customValidations.push(a=>e.test(a)?null:s),t}email(e="Please enter a valid email address"){const s=/^[^\s@]+@[^\s@]+\.[^\s@]+$/,t=new E;return t.minLength=this.minLength,t.maxLength=this.maxLength,t.pattern=this.pattern,t.customValidations=[...this.customValidations,a=>s.test(a)?null:e],t}refine(e){const s=new E;return s.minLength=this.minLength,s.maxLength=this.maxLength,s.pattern=this.pattern,s.customValidations=[...this.customValidations,e],s}}class T extends k{mustBeTrue=!1;trueMessage;validate(e){return typeof e!="boolean"?{success:!1,errors:[{message:"Expected boolean"}]}:this.mustBeTrue&&e!==!0?{success:!1,errors:[{message:this.trueMessage||"Must be true"}]}:{success:!0,data:e}}refine(e,s){const t=new T;t.mustBeTrue=this.mustBeTrue,t.trueMessage=this.trueMessage;const a=t.validate.bind(t);return t.validate=i=>{const c=a(i);return c.success?e(c.data)?c:{success:!1,errors:[{message:s}]}:c},t}literal(e,s){const t=new T;return t.mustBeTrue=!0,t.trueMessage=s,t}}class U extends k{constructor(e){super(),this.inner=e}validate(e){if(e===void 0)return{success:!0,data:void 0};const s=this.inner.validate(e);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.errors}}}class z extends k{constructor(e,s){super(),this.inner=e,this.defaultValue=s}validate(e){return e===void 0?{success:!0,data:this.defaultValue}:this.inner.validate(e)}}class F extends k{constructor(e){super(),this.shape=e}validate(e){if(typeof e!="object"||e===null||Array.isArray(e))return{success:!1,errors:[{message:"Expected object"}]};const s=e,t={},a=[];for(const[i,c]of Object.entries(this.shape)){const d=c.validate(s[i]);if(d.success)t[i]=d.data;else for(const g of d.errors)a.push({message:g.message,path:[i,...g.path||[]]})}return a.length>0?{success:!1,errors:a}:{success:!0,data:t}}refine(e,s){const t=new F(this.shape),a=t.validate.bind(t);return t.validate=i=>{const c=a(i);if(!c.success)return c;const d=e(c.data);return d?{success:!1,errors:[{message:d,path:s?.path}]}:{success:!0,data:c.data}},t}}const R=()=>new E,H=()=>new T,K=u=>new F(u);function O(u){return n.WithBrowserCtx(e=>{const s=[],t=()=>s.forEach(i=>i());return u(({effect:i="opaque",mode:c="capturing",onClickOutside:d,onEscape:g,content:h,container:f="body"})=>{f==="body"&&(e=e.makePortal("body"));const l=M.useAnimatedElementToggle();l.listenOnClosed(t);let b=()=>{},p=()=>{};const m=r=>{r.key==="Escape"&&(g?.(),l.close())},y=()=>{d?.(),l.close()},C=r=>{b(),p(),r==="capturing"?(document.addEventListener("keydown",m),b=()=>document.removeEventListener("keydown",m),e.element.addEventListener("mousedown",y),p=()=>e.element.removeEventListener("mousedown",y)):(b=()=>{},p=()=>{})},v=n.Value.on(c,C);s.push(v),s.push(()=>{l.dispose(),b(),p()});const x=()=>{const r=new Set;for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))o.hasAttribute("inert")?r.add(o):o.setAttribute("inert","");return s.push(()=>{for(const o of e.element.querySelectorAll(":scope > :not([data-overlay])"))r.has(o)||o.removeAttribute("inert");r.clear()}),document.activeElement?.blur?.(),n.html.div(n.WithElement(o=>l.setElement(o)),n.dataAttr("status",l.status.map(String)),n.dataAttr("overlay","true"),n.attr.class(n.computedOf(i??"opaque",c)((o,L)=>`bc-overlay bc-overlay--container-${f} bc-overlay--effect-${o} bc-overlay--mode-${L}`)),h)},w=n.render(x(),e.element,{disposeWithParent:!0,clear:!1,providers:e.providers});s.push(w),S.delayedAnimationFrame(()=>l.open())},t)})}function $(u,e){const{size:s="md",dismissable:t=!0,showCloseButton:a=!0,onClose:i,overlayEffect:c="opaque",container:d="body",position:g="center"}=u;return O((h,f)=>{let l=()=>{};return e(m=>{l=f;const y=n.prop("capturing");n.Value.on(t,o=>{y.set(o?"capturing":"non-capturing")});const C=n.computedOf(m.header!=null,a)((o,L)=>o||L),v=D.sessionId("modal"),x=`${v}-header`,w=`${v}-body`,r=n.html.div(n.attr.class(n.computedOf(s,g)((o,L)=>`bc-modal bc-modal--size-${o} bc-modal--container-${d} bc-modal--position-${L}`)),n.attr.role("dialog"),n.aria.modal(!0),...m.header?[n.aria.labelledby(x)]:[],n.aria.describedby(w),n.attr.tabindex(-1),n.attr.id(v),n.dataAttr("focus-trap","true"),n.on.mousedown(o=>o.stopPropagation()),V({escapeDeactivates:!1,initialFocus:()=>{const o=document.getElementById(v);if(!o)return null;const L=o.querySelector('[aria-label="Close modal"]');if(L)return L;const A=o.querySelector('button, input, select, textarea, [tabindex]:not([tabindex="-1"])');return A||o}}),n.html.div(n.attr.class("bc-modal__content"),n.When(C,()=>n.html.div(n.attr.class("bc-modal__header"),n.html.div(n.attr.class("bc-modal__title"),...m.header?[n.attr.id(x)]:[],m.header),n.When(a,()=>n.Use(q.BeatUII18n,o=>j.CloseButton({size:"sm",label:o.$.closeModal,onClick:()=>{l(),f()}}))))),n.html.div(n.attr.class("bc-modal__body"),n.attr.id(w),m.body),m.footer&&n.html.div(n.attr.class("bc-modal__footer"),m.footer)));h({mode:y,effect:c??"opaque",container:d,content:r,onClickOutside:()=>{i?.(),f()},onEscape:()=>{i?.(),f()}})},()=>{l(),f()})})}function G(u,e){const{confirmText:s,cancelText:t,onConfirm:a,onCancel:i,...c}=u;return n.Use(q.BeatUII18n,d=>$({showCloseButton:!1,...c},(g,h)=>{const f=()=>{a?.(),h()},l=()=>{i?.(),h()};return e(p=>{g({body:p,footer:n.Fragment(n.attr.class("bc-modal__actions"),B.Button({variant:"outline",onClick:l},n.coalesce(t,d.$.cancel)),B.Button({color:"primary",variant:"filled",onClick:f},n.coalesce(s,d.$.confirm)))})},h)}))}exports.BooleanValidator=T;exports.ConfirmModal=G;exports.FocusTrap=V;exports.Modal=$;exports.ObjectValidator=F;exports.Overlay=O;exports.StringValidator=E;exports.boolean=H;exports.createStandardSchema=I;exports.object=K;exports.string=R;exports.useFocusTrap=P;
@@ -2,9 +2,9 @@ import { WithElement as q, OnDispose as W, WithBrowserCtx as z, Value as j, rend
2
2
  import { u as G } from "./use-animated-toggle-C3asw_Sg.js";
3
3
  import { delayedAnimationFrame as J } from "@tempots/std";
4
4
  import { s as N } from "./session-id-3KiilioY.js";
5
- import { B as P } from "./translations-B96REXIk.js";
6
- import { C as Q } from "./use-form-CEY-gUUT.js";
7
- import { B as D } from "./input-container-Q9wL2BUl.js";
5
+ import { B as P } from "./translations-DT5QQ4WO.js";
6
+ import { C as Q } from "./use-form-D_TJyZhP.js";
7
+ import { B as D } from "./input-container-CO3DNqpp.js";
8
8
  const X = [
9
9
  "a[href]",
10
10
  "button:not([disabled])",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-BDGa_4jx.cjs"),i={loadingExtended:"Laden, even geduld",loadingShort:"Laden...",locale:"Landinstelling",iconDescription:"Pictogram",loadingIcon:"Laadpictogram",failedToLoadIcon:"Pictogram laden mislukt",editLabel:"Bewerken",selectOne:"Selecteer een",selectNone:"Geen",selectMany:"Selecteer meerdere",noResults:"Geen resultaten",passwordPlaceholderText:"Geheim wachtwoord",togglePasswordVisibility:"Wachtwoord zichtbaarheid wisselen",toggleMenu:"Menu wisselen",toggleAside:"Zijpaneel wisselen",mainNavigation:"Hoofdnavigatie",sidebar:"Zijbalk",closeDrawer:"Lade sluiten",closeModal:"Modaal sluiten",confirm:"Bevestigen",cancel:"Annuleren",addLabel:"Toevoegen",removeItem:"Item verwijderen",currentLocale:"Nederlands",ar:"Arabisch",de:"Duits",en:"Engels",es:"Spaans",fr:"Frans",hi:"Hindi",it:"Italiaans",ja:"Japans",ko:"Koreaans",nl:"Nederlands",pl:"Pools",pt:"Portugees",ru:"Russisch",tr:"Turks",vi:"Vietnamees",zh:"Chinees",he:"Hebreeuws",fa:"Perzisch",ur:"Urdu",emailPlaceholderText:"Voer je e-mail in",incrementValue:"Waarde verhogen",decrementValue:"Waarde verlagen",dropZoneInstructions:e=>e?"Klik om te kiezen of sleep bestanden hierheen, of druk op Enter of Spatie om bestandskiezer te openen":"Sleep bestanden hierheen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Bestand verwijderen",clearAllFiles:"Alle bestanden wissen",clearValue:"Waarde wissen",unknownType:"Onbekend type",filesInputInstructions:(e,n,t)=>{let l=e==null||e>1?"Klik om te kiezen of sleep bestanden hierheen":"Klik om te kiezen of sleep een bestand hierheen";if(e||n){const o=[];if(e!=null&&e>1&&o.push(`tot ${e} bestanden`),n&&t){const a=r.formatFileSize(n,{units:t});o.push(`max ${a} elk`)}o.length>0&&(l+=` (${o.join(", ")})`)}return l},paginationLabel:"Paginering",paginationRange:(e,n,t,l)=>l>t?`Rijen ${e} tot ${n} van ${t} van ${l}`:`Rijen ${e} tot ${n} van ${t}`,firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",breadcrumbs:"Kruimelpad",commandPalette:"Opdrachtenpalet",typeACommand:"Typ een opdracht...",noResultsFound:"Geen resultaten gevonden",noMatchingCommands:"Geen overeenkomende opdrachten",appearanceSystem:"Systeem",appearanceLight:"Licht",appearanceDark:"Donker",ok:"OK",changeTypeConfirmation:"Het wijzigen van het type wist de huidige waarde. Doorgaan?",notifications:"Meldingen",markAllAsRead:"Alles als gelezen markeren",noNotifications:"Geen meldingen",schemaConflictsDetected:"Schemaconflicten gedetecteerd",schemaViolationsDetected:"Schemaschendingen gedetecteerd",properties:"Eigenschappen",uploading:"Uploaden...",dropFilesOrBrowse:"Sleep bestanden hierheen of klik om te bladeren",acceptedTypes:e=>`Toegestane typen: ${e}`,enterUrlPrompt:"Voer URL in:",exceeded:"(overschreden)",pdfPreview:"PDF-voorbeeld",lexical:{fontFamily:"Lettertype",fontSize:"Lettergrootte",lineHeight:"Regelhoogte",fontColor:"Letterkleur",highlightColor:"Markeringskleur",backgroundColor:"Achtergrondkleur",bold:"Vet",italic:"Cursief",underline:"Onderstrepen",strikethrough:"Doorhalen",code:"Code",clearFormatting:"Opmaak wissen",normal:"Normaal",heading:e=>`Kop ${e}`,bulletList:"Opsommingstekens",orderedList:"Genummerde lijst",checkList:"Controlelijst",indent:"Inspringen",outdent:"Uitspringen",blockquote:"Citaat",codeBlock:"Codeblok",horizontalRule:"Horizontale lijn",insertTable:"Tabel invoegen",link:"Link",undo:"Ongedaan maken",redo:"Opnieuw",cut:"Knippen",copy:"Kopiëren",paste:"Plakken",defaultOption:"Standaard",slashCommands:"Schuine-streepopdrachten",noCommandsFound:"Geen opdrachten gevonden",changeBlockType:"Bloktype wijzigen",blockTypes:"Bloktypen",enterUrl:"Voer URL in:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Oplopend sorteren",sortDescending:"Aflopend sorteren",clearSort:"Sortering wissen",filterPlaceholder:"Filteren...",clearFilter:"Filter wissen",selectAll:"Alles selecteren",deselectAll:"Alles deselecteren",selectedCount:e=>`${e} geselecteerd`,resetAll:"Alles resetten",noResults:"Geen resultaten gevonden",loading:"Laden...",filterPanelAddCondition:"Voorwaarde toevoegen",filterPanelApply:"Toepassen",filterPanelClear:"Filters wissen",filterPanelAnd:"EN",filterPanelOr:"OF",filterPanelContains:"Bevat",filterPanelNotContains:"Bevat niet",filterPanelEquals:"Is gelijk aan",filterPanelNotEquals:"Is niet gelijk aan",filterPanelStartsWith:"Begint met",filterPanelEndsWith:"Eindigt met",filterPanelIsNull:"Is leeg",filterPanelIsNotNull:"Is niet leeg",filterPanelGt:"Groter dan",filterPanelGte:"Groter of gelijk",filterPanelLt:"Kleiner dan",filterPanelLte:"Kleiner of gelijk",filterPanelBetween:"Tussen",filterPanelValuePlaceholder:"Waarde...",sortMultiHint:"Houd Shift ingedrukt om meerdere kolommen te sorteren",columnVisibility:"Kolommen",showAllColumns:"Alles weergeven",menuSortAsc:"Oplopend sorteren",menuSortDesc:"Aflopend sorteren",menuClearSort:"Sortering wissen",menuHideColumn:"Kolom verbergen",menuChooseColumns:"Kolommen kiezen",menuResetColumns:"Kolommen herstellen",menuFilter:"Filteren",rowCount:(e,n)=>`Rijen: ${e} Totaal rijen: ${n}`,filterTagsPlaceholder:"Waarden selecteren...",groupCount:e=>`${e} items`,collapseGroup:"Groep inklappen",expandGroup:"Groep uitklappen",describeFilter:{textContains:(e,n)=>`${e} bevat "${n}"`,textNotContains:(e,n)=>`${e} bevat niet "${n}"`,textEquals:(e,n)=>`${e} is gelijk aan "${n}"`,textNotEquals:(e,n)=>`${e} is niet gelijk aan "${n}"`,textStartsWith:(e,n)=>`${e} begint met "${n}"`,textEndsWith:(e,n)=>`${e} eindigt met "${n}"`,compareEq:(e,n)=>`${e} = ${n}`,compareNeq:(e,n)=>`${e} ≠ ${n}`,compareGt:(e,n)=>`${e} > ${n}`,compareGte:(e,n)=>`${e} ≥ ${n}`,compareLt:(e,n)=>`${e} < ${n}`,compareLte:(e,n)=>`${e} ≤ ${n}`,rangeBetween:(e,n,t)=>`${e} tussen ${n} en ${t}`,rangeGte:(e,n)=>`${e} ≥ ${n}`,rangeLte:(e,n)=>`${e} ≤ ${n}`,setIn:(e,n)=>`${e} in [${n}]`,setNotIn:(e,n)=>`${e} niet in [${n}]`,booleanIs:(e,n)=>`${e} is ${n}`,isNull:e=>`${e} is leeg`,isNotNull:e=>`${e} is niet leeg`,compositeAnd:e=>e.join(" EN "),compositeOr:e=>e.join(" OF ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF laden...",loadFailed:"PDF laden mislukt",invalidPdf:"Ongeldig PDF-bestand",pageOutOfRange:(e,n)=>`Pagina ${e} valt buiten bereik (1-${n})`,renderFailed:"PDF-pagina weergeven mislukt"}};exports.default=i;exports.nl=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-qefRsdGi.cjs"),i={loadingExtended:"Laden, even geduld",loadingShort:"Laden...",locale:"Landinstelling",iconDescription:"Pictogram",loadingIcon:"Laadpictogram",failedToLoadIcon:"Pictogram laden mislukt",editLabel:"Bewerken",selectOne:"Selecteer een",selectNone:"Geen",selectMany:"Selecteer meerdere",noResults:"Geen resultaten",passwordPlaceholderText:"Geheim wachtwoord",togglePasswordVisibility:"Wachtwoord zichtbaarheid wisselen",toggleMenu:"Menu wisselen",toggleAside:"Zijpaneel wisselen",mainNavigation:"Hoofdnavigatie",sidebar:"Zijbalk",closeDrawer:"Lade sluiten",closeModal:"Modaal sluiten",confirm:"Bevestigen",cancel:"Annuleren",addLabel:"Toevoegen",removeItem:"Item verwijderen",currentLocale:"Nederlands",ar:"Arabisch",de:"Duits",en:"Engels",es:"Spaans",fr:"Frans",hi:"Hindi",it:"Italiaans",ja:"Japans",ko:"Koreaans",nl:"Nederlands",pl:"Pools",pt:"Portugees",ru:"Russisch",tr:"Turks",vi:"Vietnamees",zh:"Chinees",he:"Hebreeuws",fa:"Perzisch",ur:"Urdu",emailPlaceholderText:"Voer je e-mail in",incrementValue:"Waarde verhogen",decrementValue:"Waarde verlagen",dropZoneInstructions:e=>e?"Klik om te kiezen of sleep bestanden hierheen, of druk op Enter of Spatie om bestandskiezer te openen":"Sleep bestanden hierheen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Bestand verwijderen",clearAllFiles:"Alle bestanden wissen",clearValue:"Waarde wissen",unknownType:"Onbekend type",filesInputInstructions:(e,n,t)=>{let l=e==null||e>1?"Klik om te kiezen of sleep bestanden hierheen":"Klik om te kiezen of sleep een bestand hierheen";if(e||n){const o=[];if(e!=null&&e>1&&o.push(`tot ${e} bestanden`),n&&t){const a=r.formatFileSize(n,{units:t});o.push(`max ${a} elk`)}o.length>0&&(l+=` (${o.join(", ")})`)}return l},paginationLabel:"Paginering",paginationRange:(e,n,t,l)=>l>t?`Rijen ${e} tot ${n} van ${t} van ${l}`:`Rijen ${e} tot ${n} van ${t}`,firstPage:"Eerste pagina",previousPage:"Vorige pagina",nextPage:"Volgende pagina",lastPage:"Laatste pagina",breadcrumbs:"Kruimelpad",commandPalette:"Opdrachtenpalet",typeACommand:"Typ een opdracht...",noResultsFound:"Geen resultaten gevonden",noMatchingCommands:"Geen overeenkomende opdrachten",appearanceSystem:"Systeem",appearanceLight:"Licht",appearanceDark:"Donker",ok:"OK",changeTypeConfirmation:"Het wijzigen van het type wist de huidige waarde. Doorgaan?",notifications:"Meldingen",markAllAsRead:"Alles als gelezen markeren",noNotifications:"Geen meldingen",schemaConflictsDetected:"Schemaconflicten gedetecteerd",schemaViolationsDetected:"Schemaschendingen gedetecteerd",properties:"Eigenschappen",uploading:"Uploaden...",dropFilesOrBrowse:"Sleep bestanden hierheen of klik om te bladeren",acceptedTypes:e=>`Toegestane typen: ${e}`,enterUrlPrompt:"Voer URL in:",exceeded:"(overschreden)",pdfPreview:"PDF-voorbeeld",lexical:{fontFamily:"Lettertype",fontSize:"Lettergrootte",lineHeight:"Regelhoogte",fontColor:"Letterkleur",highlightColor:"Markeringskleur",backgroundColor:"Achtergrondkleur",bold:"Vet",italic:"Cursief",underline:"Onderstrepen",strikethrough:"Doorhalen",code:"Code",clearFormatting:"Opmaak wissen",normal:"Normaal",heading:e=>`Kop ${e}`,bulletList:"Opsommingstekens",orderedList:"Genummerde lijst",checkList:"Controlelijst",indent:"Inspringen",outdent:"Uitspringen",blockquote:"Citaat",codeBlock:"Codeblok",horizontalRule:"Horizontale lijn",insertTable:"Tabel invoegen",link:"Link",undo:"Ongedaan maken",redo:"Opnieuw",cut:"Knippen",copy:"Kopiëren",paste:"Plakken",defaultOption:"Standaard",slashCommands:"Schuine-streepopdrachten",noCommandsFound:"Geen opdrachten gevonden",changeBlockType:"Bloktype wijzigen",blockTypes:"Bloktypen",enterUrl:"Voer URL in:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Oplopend sorteren",sortDescending:"Aflopend sorteren",clearSort:"Sortering wissen",filterPlaceholder:"Filteren...",clearFilter:"Filter wissen",selectAll:"Alles selecteren",deselectAll:"Alles deselecteren",selectedCount:e=>`${e} geselecteerd`,resetAll:"Alles resetten",noResults:"Geen resultaten gevonden",loading:"Laden...",filterPanelAddCondition:"Voorwaarde toevoegen",filterPanelApply:"Toepassen",filterPanelClear:"Filters wissen",filterPanelAnd:"EN",filterPanelOr:"OF",filterPanelContains:"Bevat",filterPanelNotContains:"Bevat niet",filterPanelEquals:"Is gelijk aan",filterPanelNotEquals:"Is niet gelijk aan",filterPanelStartsWith:"Begint met",filterPanelEndsWith:"Eindigt met",filterPanelIsNull:"Is leeg",filterPanelIsNotNull:"Is niet leeg",filterPanelGt:"Groter dan",filterPanelGte:"Groter of gelijk",filterPanelLt:"Kleiner dan",filterPanelLte:"Kleiner of gelijk",filterPanelBetween:"Tussen",filterPanelValuePlaceholder:"Waarde...",sortMultiHint:"Houd Shift ingedrukt om meerdere kolommen te sorteren",columnVisibility:"Kolommen",showAllColumns:"Alles weergeven",menuSortAsc:"Oplopend sorteren",menuSortDesc:"Aflopend sorteren",menuClearSort:"Sortering wissen",menuHideColumn:"Kolom verbergen",menuChooseColumns:"Kolommen kiezen",menuResetColumns:"Kolommen herstellen",menuFilter:"Filteren",rowCount:(e,n)=>`Rijen: ${e} Totaal rijen: ${n}`,filterTagsPlaceholder:"Waarden selecteren...",groupCount:e=>`${e} items`,collapseGroup:"Groep inklappen",expandGroup:"Groep uitklappen",describeFilter:{textContains:(e,n)=>`${e} bevat "${n}"`,textNotContains:(e,n)=>`${e} bevat niet "${n}"`,textEquals:(e,n)=>`${e} is gelijk aan "${n}"`,textNotEquals:(e,n)=>`${e} is niet gelijk aan "${n}"`,textStartsWith:(e,n)=>`${e} begint met "${n}"`,textEndsWith:(e,n)=>`${e} eindigt met "${n}"`,compareEq:(e,n)=>`${e} = ${n}`,compareNeq:(e,n)=>`${e} ≠ ${n}`,compareGt:(e,n)=>`${e} > ${n}`,compareGte:(e,n)=>`${e} ≥ ${n}`,compareLt:(e,n)=>`${e} < ${n}`,compareLte:(e,n)=>`${e} ≤ ${n}`,rangeBetween:(e,n,t)=>`${e} tussen ${n} en ${t}`,rangeGte:(e,n)=>`${e} ≥ ${n}`,rangeLte:(e,n)=>`${e} ≤ ${n}`,setIn:(e,n)=>`${e} in [${n}]`,setNotIn:(e,n)=>`${e} niet in [${n}]`,booleanIs:(e,n)=>`${e} is ${n}`,isNull:e=>`${e} is leeg`,isNotNull:e=>`${e} is niet leeg`,compositeAnd:e=>e.join(" EN "),compositeOr:e=>e.join(" OF ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"PDF laden...",loadFailed:"PDF laden mislukt",invalidPdf:"Ongeldig PDF-bestand",pageOutOfRange:(e,n)=>`Pagina ${e} valt buiten bereik (1-${n})`,renderFailed:"PDF-pagina weergeven mislukt"}};exports.default=i;exports.nl=i;
@@ -1,4 +1,4 @@
1
- import { f as i } from "./translations-B96REXIk.js";
1
+ import { f as i } from "./translations-DT5QQ4WO.js";
2
2
  const s = {
3
3
  loadingExtended: "Laden, even geduld",
4
4
  loadingShort: "Laden...",
@@ -1,8 +1,8 @@
1
- import { C as x } from "./text-input-DEAddaOi.js";
1
+ import { C as x } from "./text-input-BAn02BzO.js";
2
2
  import { Use as E, input as j, attr as t, coalesce as A, Empty as g, on as p, emitValue as w, prop as O, computedOf as y, html as u, aria as D, When as B, Fragment as F, Value as h, Unless as M, Ensure as R } from "@tempots/dom";
3
- import { a as S, I as k } from "./input-container-Q9wL2BUl.js";
4
- import { B as V, I as z } from "./translations-B96REXIk.js";
5
- import { C as W } from "./use-form-CEY-gUUT.js";
3
+ import { a as S, I as k } from "./input-container-CO3DNqpp.js";
4
+ import { B as V, I as z } from "./translations-DT5QQ4WO.js";
5
+ import { C as W } from "./use-form-D_TJyZhP.js";
6
6
  const Y = (o) => {
7
7
  const l = {
8
8
  name: "email",
@@ -1 +1 @@
1
- "use strict";const C=require("./text-input-CynkbBpH.cjs"),t=require("@tempots/dom"),v=require("./input-container-BZwpJgx6.cjs"),b=require("./translations-BDGa_4jx.cjs"),O=require("./use-form-Ca0kF4af.cjs"),B=o=>{const l={name:"email",autocomplete:"email",...o},{value:r,before:s,onBlur:a,onChange:u,onInput:c,placeholder:f}=l,p=s??v.InputIcon({icon:"line-md:email",size:o.size,color:"neutral"});return t.Use(b.BeatUII18n,m=>v.InputContainer({...o,before:p,input:t.input.email(C.CommonInputAttributes(l),t.attr.placeholder(t.coalesce(f,m.$.emailPlaceholderText)),t.attr.value(r),t.attr.class("bc-input"),a!=null?t.on.blur(t.emitValue(a)):t.Empty,u!=null?t.on.change(t.emitValue(u)):t.Empty,c!=null?t.on.input(t.emitValue(c)):t.Empty)}))},U=o=>{const{value:l,onBlur:r,onChange:s,onInput:a,before:u,after:c,hasError:f,disabled:p,autocomplete:m,placeholder:I,size:d,...w}=o,y={name:"password",disabled:p,...w},e=t.prop(!0),n=t.computedOf(e,m)((i,h)=>i?h??"current-password":"off");return t.Use(b.BeatUII18n,i=>{const h=t.computedOf(i.$.passwordPlaceholderText,e,I)((V,E,_)=>E?"•••••••••••••••":_??V),g=t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__password-toggle"),t.aria.label(i.$.togglePasswordVisibility),t.on.click(()=>e.update(V=>!V)),t.When(e,()=>b.Icon({icon:"line-md:watch"}),()=>b.Icon({icon:"line-md:watch-off"})));return v.InputContainer({before:u,disabled:p,hasError:f,size:d,input:t.html.input(C.CommonInputAttributes({...y,autocomplete:n,placeholder:h}),t.When(e,()=>t.attr.type("password"),()=>t.attr.type("text")),t.attr.class("bc-input"),t.attr.value(l),r!=null?t.on.blur(t.emitValue(r)):t.Empty,s!=null?t.on.change(t.emitValue(s)):t.Empty,a!=null?t.on.input(t.emitValue(a)):t.Empty),after:c!=null?t.Fragment(g,c):g})})};function P(o){switch(o){case"success":return"material-symbols:check-circle-outline";case"warning":return"material-symbols:warning-outline";case"danger":return"material-symbols:error-outline";default:return"material-symbols:info-outline"}}function T(o){switch(o){case"success":return"success";case"warning":return"warning";case"danger":return"danger";default:return"info"}}function $(o,l,r,s){const a=["bc-notice",`bc-notice--${o}`,`bc-notice--tone-${l}`];return r&&a.push("bc-notice--dismissible"),s&&s.length>0&&a.push(s),a.join(" ")}function q({variant:o="info",tone:l="subtle",role:r,title:s,icon:a,closable:u=!1,onClose:c,class:f},...p){const m=t.prop(!0);return t.When(m,()=>{const I=t.Value.map(u,e=>!!e||c!=null),d=t.Value.map(o,e=>e??"info"),w=t.Value.map(l,e=>e??"subtle"),y=t.computedOf(r,d)((e,n)=>e??(n==="danger"?"alert":"status"));return t.Use(b.BeatUII18n,e=>t.html.div(t.attr.class(t.computedOf(d,w,I,f)((n,i,h,g)=>$(n,i,h,g))),t.attr.role(t.Value.map(y,n=>n)),t.Unless(t.Value.map(a,n=>n===!1),()=>t.html.div(t.attr.class("bc-notice__icon"),b.Icon({icon:t.computedOf(a,d)((n,i)=>n===void 0?P(i):String(n)),size:"md",color:t.Value.map(d,T)}))),t.html.div(t.attr.class("bc-notice__body"),t.Ensure(s,n=>t.html.div(t.attr.class("bc-notice__title"),n)),t.html.div(t.attr.class("bc-notice__content"),...p)),t.When(I,()=>O.CloseButton({size:"xs",label:e.$.closeModal,onClick:()=>{m.set(!1),c?.()}}))))})}exports.EmailInput=B;exports.Notice=q;exports.PasswordInput=U;
1
+ "use strict";const C=require("./text-input-D_IxFd0M.cjs"),t=require("@tempots/dom"),v=require("./input-container-BkPcNDaZ.cjs"),b=require("./translations-qefRsdGi.cjs"),O=require("./use-form-BvBkVEKi.cjs"),B=o=>{const l={name:"email",autocomplete:"email",...o},{value:r,before:s,onBlur:a,onChange:u,onInput:c,placeholder:f}=l,p=s??v.InputIcon({icon:"line-md:email",size:o.size,color:"neutral"});return t.Use(b.BeatUII18n,m=>v.InputContainer({...o,before:p,input:t.input.email(C.CommonInputAttributes(l),t.attr.placeholder(t.coalesce(f,m.$.emailPlaceholderText)),t.attr.value(r),t.attr.class("bc-input"),a!=null?t.on.blur(t.emitValue(a)):t.Empty,u!=null?t.on.change(t.emitValue(u)):t.Empty,c!=null?t.on.input(t.emitValue(c)):t.Empty)}))},U=o=>{const{value:l,onBlur:r,onChange:s,onInput:a,before:u,after:c,hasError:f,disabled:p,autocomplete:m,placeholder:I,size:d,...w}=o,y={name:"password",disabled:p,...w},e=t.prop(!0),n=t.computedOf(e,m)((i,h)=>i?h??"current-password":"off");return t.Use(b.BeatUII18n,i=>{const h=t.computedOf(i.$.passwordPlaceholderText,e,I)((V,E,_)=>E?"•••••••••••••••":_??V),g=t.html.button(t.attr.type("button"),t.attr.class("bc-input-container__password-toggle"),t.aria.label(i.$.togglePasswordVisibility),t.on.click(()=>e.update(V=>!V)),t.When(e,()=>b.Icon({icon:"line-md:watch"}),()=>b.Icon({icon:"line-md:watch-off"})));return v.InputContainer({before:u,disabled:p,hasError:f,size:d,input:t.html.input(C.CommonInputAttributes({...y,autocomplete:n,placeholder:h}),t.When(e,()=>t.attr.type("password"),()=>t.attr.type("text")),t.attr.class("bc-input"),t.attr.value(l),r!=null?t.on.blur(t.emitValue(r)):t.Empty,s!=null?t.on.change(t.emitValue(s)):t.Empty,a!=null?t.on.input(t.emitValue(a)):t.Empty),after:c!=null?t.Fragment(g,c):g})})};function P(o){switch(o){case"success":return"material-symbols:check-circle-outline";case"warning":return"material-symbols:warning-outline";case"danger":return"material-symbols:error-outline";default:return"material-symbols:info-outline"}}function T(o){switch(o){case"success":return"success";case"warning":return"warning";case"danger":return"danger";default:return"info"}}function $(o,l,r,s){const a=["bc-notice",`bc-notice--${o}`,`bc-notice--tone-${l}`];return r&&a.push("bc-notice--dismissible"),s&&s.length>0&&a.push(s),a.join(" ")}function q({variant:o="info",tone:l="subtle",role:r,title:s,icon:a,closable:u=!1,onClose:c,class:f},...p){const m=t.prop(!0);return t.When(m,()=>{const I=t.Value.map(u,e=>!!e||c!=null),d=t.Value.map(o,e=>e??"info"),w=t.Value.map(l,e=>e??"subtle"),y=t.computedOf(r,d)((e,n)=>e??(n==="danger"?"alert":"status"));return t.Use(b.BeatUII18n,e=>t.html.div(t.attr.class(t.computedOf(d,w,I,f)((n,i,h,g)=>$(n,i,h,g))),t.attr.role(t.Value.map(y,n=>n)),t.Unless(t.Value.map(a,n=>n===!1),()=>t.html.div(t.attr.class("bc-notice__icon"),b.Icon({icon:t.computedOf(a,d)((n,i)=>n===void 0?P(i):String(n)),size:"md",color:t.Value.map(d,T)}))),t.html.div(t.attr.class("bc-notice__body"),t.Ensure(s,n=>t.html.div(t.attr.class("bc-notice__title"),n)),t.html.div(t.attr.class("bc-notice__content"),...p)),t.When(I,()=>O.CloseButton({size:"xs",label:e.$.closeModal,onClick:()=>{m.set(!1),c?.()}}))))})}exports.EmailInput=B;exports.Notice=q;exports.PasswordInput=U;
@@ -1 +1 @@
1
- "use strict";const S=require("@tempots/std"),a=require("@tempots/dom"),V=require("./utils-DmEuG3Np.cjs"),p=require("./stack-dwLevGa2.cjs"),g=require("./translations-BDGa_4jx.cjs"),F=require("ajv"),H=require("ajv/dist/2019"),J=require("ajv/dist/2020"),K=require("ajv-formats");function k(t){return t.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~"))}function M(t){const e=k(t.instancePath||"");if(t.keyword==="required"){const n=t.params.missingProperty;if(n!=null)return[...e,n]}if(t.keyword==="additionalProperties"){const n=t.params.additionalProperty;if(n!=null)return[...e,n]}if(t.keyword==="unevaluatedProperties"){const n=t.params.unevaluatedProperty;if(n!=null)return[...e,n]}return e.length>0?e:void 0}function E(t){return t.message??`${t.keyword} validation failed`}function q(t){return t.reduce((e,n)=>{const r=M(n);if(r==null)return e;let i=e;for(const o of r){const s=o;i.dependencies==null&&(i.dependencies={}),i.dependencies[s]==null&&(i.dependencies[s]={}),i=i.dependencies[s]}return i.message=E(n),e},{})}function U(t){const e=q(t);return S.Validation.invalid(e)}function G(t){const e={keyword:"x:ui",schemaType:["string","object"],errors:!1,validate:()=>!0};t.addKeyword(e)}let v=new WeakMap;function X(){v=new WeakMap}function Q(t){v.delete(t)}function Y(){return{ajvInstances:0}}function x(t,e){let n=v.get(t);n==null&&(n=new WeakMap,v.set(t,n));const r=n.get(e);if(r)return r;const i=t.compile(e);return n.set(e,i),i}async function _(t,e,n){const i={"2020-12":J,"2019-09":H,"draft-07":F}[t],o=new i({meta:n,strictSchema:!1,allErrors:!0,removeAdditional:e});switch(t){case"2020-12":o.opts.defaultMeta="https://json-schema.org/draft/2020-12/schema";break;case"2019-09":o.opts.defaultMeta="https://json-schema.org/draft/2019-09/schema";break;case"draft-07":o.opts.defaultMeta="http://json-schema.org/draft-07/schema#";break}return K(o),G(o),o}function Z(t){return t==null||t.includes("draft/2020-12")?"2020-12":t.includes("draft/2019-09")?"2019-09":"draft-07"}function N(t){const e=t.indexOf("#");return e>=0?t.slice(0,e):t}function j(t,e=!0){if(Array.isArray(t))return t.map(n=>j(n,!1));if(t!=null&&typeof t=="object"){const n=t,r={};for(const[i,o]of Object.entries(n))!e&&(i==="$id"||i==="$schema"||i==="$dynamicAnchor")||(r[i]=j(o,!1));return r}return t}function C(t){const e=new Set,n=r=>{if(r!=null){if(Array.isArray(r)){for(const i of r)n(i);return}if(typeof r=="object"){const i=r,o=i.$ref;typeof o=="string"&&o.length>0&&o[0]!=="#"&&e.add(N(o));for(const s of Object.values(i))n(s)}}};return n(t),[...e]}function T(t,e){for(const n of e){const r=n.$id;if(typeof r=="string"&&r.length>0&&!t.getSchema(r))try{t.addSchema(n)}catch{}}}async function ee(t,e,n,r){if(n==null)return null;const i=new Set;if(r&&r.length>0)for(const l of r){const c=l.$id;typeof c=="string"&&c.length>0&&i.add(c)}const o=[],s=5;for(let l=0;l<s;l++){const c=C(e),u=o.flatMap(h=>C(h)),f=new Set([...c,...u]),d=[];for(const h of f)if(!i.has(h)){if(t.getSchema(h)){i.add(h);continue}d.push(h)}if(d.length===0)return null;try{const h=await n(d);if(!Array.isArray(h)||h.length===0)return null;T(t,h);for(const m of h){const y=m.$id;typeof y=="string"&&y.length>0&&(i.add(y),o.push(m))}}catch(h){return`refResolver failed: ${h instanceof Error?h.message:String(h)}`}}return"refResolver reached iteration limit while resolving external $refs"}async function te(t,e){try{const n=Z(t.$schema),r=e?.sanitizeAdditional===!1?!1:e?.sanitizeAdditional??!1,i=f=>typeof f=="string"&&f.endsWith("#")?f.slice(0,-1):f??"",o=t.$id,s=i(o);if(s!==""&&new Set(["https://json-schema.org/draft/2020-12/schema","https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft-07/schema"]).has(s)){const f=await _(n,r,!1),d=j(t);try{f.addMetaSchema(d)}catch{}const h=f.getSchema(o??s)??f.compile(d);return{ok:!0,value:{ajv:f,validate:h}}}const c=await _(n,r,!0);if(e?.externalSchemas&&e.externalSchemas.length>0&&T(c,e.externalSchemas),e?.refResolver){const f=await ee(c,t,e.refResolver,e.externalSchemas);if(f!=null)return{ok:!1,error:f}}const u=c.compile(t);return{ok:!0,value:{ajv:c,validate:u}}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function ne(t,e){if(typeof t=="boolean"||typeof e=="boolean")return e;const n={...t};for(const[r,i]of Object.entries(e))r==="required"&&Array.isArray(t.required)&&Array.isArray(i)?n.required=[...new Set([...t.required,...i])]:r==="properties"&&t.properties&&typeof i=="object"&&i!=null?n.properties={...t.properties,...i}:n[r]=i;return n}function re(t,e){if(typeof t=="boolean"||typeof e=="boolean")return t===e;const n=t.type,r=e.type;return!(n!=null&&r!=null&&n!==r||n==="string"&&r==="string"&&(t.minLength!=null&&e.maxLength!=null&&t.minLength>e.maxLength||t.maxLength!=null&&e.minLength!=null&&t.maxLength<e.minLength)||(n==="number"||n==="integer")&&(r==="number"||r==="integer")&&(t.minimum!=null&&e.maximum!=null&&t.minimum>e.maximum||t.maximum!=null&&e.minimum!=null&&t.maximum<e.minimum))}function ie(t,e,n,r){if(typeof e=="boolean"||typeof n=="boolean")return{path:r,message:`Property "${t}" has conflicting boolean schema definitions in allOf branches`,conflictingValues:[e,n]};const i=e.type,o=n.type;if(i!=null&&o!=null&&i!==o){const s=Array.isArray(i)?i:[i],l=Array.isArray(o)?o:[o];return{path:r,message:`Property "${t}" has conflicting types: ${s.join("|")} vs ${l.join("|")}`,conflictingValues:[e,n]}}if(i===o&&i==="string"){const s=[];if(e.minLength!=null&&n.maxLength!=null&&e.minLength>n.maxLength&&s.push(`minLength ${e.minLength} > maxLength ${n.maxLength}`),e.maxLength!=null&&n.minLength!=null&&e.maxLength<n.minLength&&s.push(`maxLength ${e.maxLength} < minLength ${n.minLength}`),s.length>0)return{path:r,message:`Property "${t}" has conflicting string constraints: ${s.join(", ")}`,conflictingValues:[e,n]}}if(i===o&&(i==="number"||i==="integer")){const s=[];if(e.minimum!=null&&n.maximum!=null&&e.minimum>n.maximum&&s.push(`minimum ${e.minimum} > maximum ${n.maximum}`),e.maximum!=null&&n.minimum!=null&&e.maximum<n.minimum&&s.push(`maximum ${e.maximum} < minimum ${n.minimum}`),s.length>0)return{path:r,message:`Property "${t}" has conflicting numeric constraints: ${s.join(", ")}`,conflictingValues:[e,n]}}return re(e,n)?null:{path:r,message:`Property "${t}" has conflicting definitions in allOf branches`,conflictingValues:[e,n]}}function se(t){const e=Array.isArray(t)?t:[t],n=new Set(e.map(r=>r));return n.has("number")&&n.add("integer"),n}function oe(t,e,n,r){for(const[i,o]of Object.entries(e)){if(t[i]!=null&&t[i]!==o){const s=t[i],l=ie(i,s,o,[...n,"properties",i]);l!=null&&r.push(l)}t[i]!=null?t[i]=ne(t[i],o):t[i]=o}}function ae(t,e,n,r){e!=null&&t.additionalProperties!=null&&t.additionalProperties!==e&&r.push({path:[...n,"additionalProperties"],message:`Conflicting additionalProperties values in allOf: ${t.additionalProperties} vs ${e}`,conflictingValues:[t.additionalProperties,e]})}function le(t,e,n,r,i){e!=null&&t.maxProperties!=null&&e>t.maxProperties&&i.push({path:[...r,"minProperties"],message:`minProperties ${e} conflicts with existing maxProperties ${t.maxProperties}`,conflictingValues:[e,t.maxProperties]}),n!=null&&t.minProperties!=null&&n<t.minProperties&&i.push({path:[...r,"maxProperties"],message:`maxProperties ${n} conflicts with existing minProperties ${t.minProperties}`,conflictingValues:[n,t.minProperties]})}function ce(t,e,n){if(t.length===0)return;let r=null;for(const o of t)if(r==null)r=new Set(o);else{const s=new Set;for(const l of r)o.has(l)&&s.add(l);r=s}const i=Array.from(r??[]);if(i.length===0){const o=t.map(s=>Array.from(s));n.push({path:[...e,"type"],message:"Incompatible types in allOf (no common types)",conflictingValues:o});return}else return i.length===1?i[0]:i}function fe(t,e=[]){const n=[],r={},i=[],o=[],s={};for(const c of t){c.type!=null&&i.push(se(c.type)),Array.isArray(c.required)&&o.push(...c.required),c.properties!=null&&oe(s,c.properties,e,n);const{type:u,required:f,properties:d,allOf:h,additionalProperties:m,patternProperties:y,minProperties:b,maxProperties:A,...W}=c;ae(r,m,e,n),le(r,b,A,e,n),Object.assign(r,W),m!=null&&(r.additionalProperties=m),y!=null&&(r.patternProperties=y),b!=null&&(r.minProperties=b),A!=null&&(r.maxProperties=A)}const l=ce(i,e,n);return l!=null&&(r.type=l),o.length>0&&(r.required=[...new Set(o)]),Object.keys(s).length>0&&(r.properties=s),{mergedSchema:r,conflicts:n}}class ${schema;definition;horizontal;path;ajv;isPropertyRequired;suppressLabel;schemaConflicts;notViolations;widgetRegistry;setStatus;formValue;validationMode;submitting;constructor(e){const{schema:n,definition:r,horizontal:i,path:o,ajv:s,isPropertyRequired:l,suppressLabel:c,schemaConflicts:u,notViolations:f,widgetRegistry:d,setStatus:h,formValue:m,validationMode:y,submitting:b}=e;this.schema=n,this.definition=r,this.horizontal=i,this.path=o,this.ajv=s,this.isPropertyRequired=l??!1,this.suppressLabel=c??!1,this.schemaConflicts=u??[],this.notViolations=f??[],this.widgetRegistry=d,this.setStatus=h,this.formValue=m,this.validationMode=y,this.submitting=b}with=e=>new $({schema:e.schema??this.schema,definition:e.definition??this.definition,horizontal:e.horizontal??this.horizontal,path:e.path??this.path,ajv:e.ajv??this.ajv,isPropertyRequired:e.isPropertyRequired??this.isPropertyRequired,suppressLabel:e.suppressLabel??this.suppressLabel,schemaConflicts:e.schemaConflicts??this.schemaConflicts,notViolations:e.notViolations??this.notViolations,widgetRegistry:e.widgetRegistry??this.widgetRegistry,setStatus:e.setStatus??this.setStatus,formValue:e.formValue??this.formValue,validationMode:e.validationMode??this.validationMode,submitting:e.submitting??this.submitting});append=e=>this.with({path:[...this.path,e]});get isRoot(){return this.path.length===0}get name(){const e=this.path[this.path.length-1];if(typeof e=="string")return e}get widgetName(){return this.path.map(String).join(".")}get widgetLabel(){const e=this.name;return(typeof this.definition=="object"&&this.definition!==null?this.definition.title:void 0)??(e!=null?S.upperCaseFirst(S.humanize(e)):void 0)}hasRequiredProperty=e=>typeof this.definition=="boolean"?!1:this.definition.required!=null&&this.definition.required.includes(e);get nullable(){return this.definition.nullable??!1}get isNullable(){return this.nullable||this.hasType("null")||this.hasEnumValue(null)||this.hasConstValue(null)||(this.anyOf?.some(e=>e.isNullable)??!1)||(this.oneOf?.some(e=>e.isNullable)??!1)}get isOptional(){return!this.isPropertyRequired}get shouldShowPresenceToggle(){return!(!this.isOptional||this.isRoot||(this.isNullable||this.isOptional)&&this.isPrimitive)}get isPrimitive(){if(typeof this.definition=="boolean")return!1;const e=this.definition;if(e.const!==void 0||e.enum!==void 0)return!0;if(e.type){const n=Array.isArray(e.type)?e.type:[e.type],r=["string","number","integer","boolean"];return n.every(i=>r.includes(i))}return!1}get isReadOnly(){return typeof this.definition=="boolean"?!1:!!this.definition.readOnly}get isWriteOnly(){return typeof this.definition=="boolean"?!1:!!this.definition.writeOnly}get isDeprecated(){return typeof this.definition=="boolean"?!1:!!this.definition.deprecated}get shouldIgnoreReadOnly(){if(typeof this.definition=="boolean")return!1;const e=this.definition["x:ui"];return e&&typeof e=="object"?!!e.ignoreReadOnly:!1}get shouldShowWriteOnly(){if(typeof this.definition=="boolean")return!1;const e=this.definition["x:ui"];return e&&typeof e=="object"?!!e.showWriteOnly:!1}get anyOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.anyOf)?this.definition.anyOf.map(e=>this.with({definition:e})):void 0}get oneOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.oneOf)?this.definition.oneOf.map(e=>this.with({definition:e})):void 0}get allOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.allOf)?this.definition.allOf.map(e=>this.with({definition:e})):void 0}hasType=e=>this.definition===!0?!0:this.definition===!1?!1:Array.isArray(this.definition.type)?this.definition.type.includes(e):this.definition.type===e;hasEnumValue=e=>typeof this.definition=="boolean"?!1:Array.isArray(this.definition.enum)?this.definition.enum.includes(e):!1;hasConstValue=e=>typeof this.definition=="boolean"?!1:this.definition.const===e;get description(){if(typeof this.definition!="boolean")return this.definition.description}get examples(){if(typeof this.definition!="boolean")return this.definition.examples}get default(){if(typeof this.definition!="boolean")return this.definition.default}}let O=new WeakMap,R=new WeakMap;function I(t,e){const n=typeof e=="object"&&e!=null?e:null;if(n!=null){const s=O.get(n)?.get(t);if(s!=null)return s}let r=t;const i=new Set;for(;B(r);){const o=r.$ref;if(!o.startsWith("#")){console.warn(`resolveRef: external $ref not supported here: ${o}`);break}if(i.has(o)){console.warn(`resolveRef: cycle detected while resolving in-document $ref chain: ${[...i,o].join(" -> ")}`);break}i.add(o);const s=D(e,o);if(!w(s)){console.warn(`resolveRef: could not resolve JSON Pointer ${o}`);break}const{$ref:l,...c}=r;r={...s,...c}}if(n!=null){let o=O.get(n);o==null&&(o=new WeakMap,O.set(n,o)),o.set(t,r)}return r}function B(t){return w(t)&&typeof t.$ref=="string"}function w(t){return typeof t=="object"&&t!=null&&!Array.isArray(t)}function D(t,e){if(!e.startsWith("#"))return;if(e==="#")return t;if(typeof t!="object"||t==null)return;const n=t;let r=R.get(n);r==null&&(r=new Map,R.set(n,r));const i=r.get(e);if(i!==void 0)return i;const o=k(e);let s=t;for(const l of o){if(!w(s)&&!Array.isArray(s)){r.set(e,void 0);return}s=s[l]}return r.set(e,s),s}function ue(t,e,n){let r=t;const i=new Set,o=(s,l)=>{const{$ref:c,...u}=l;return{...s,...u}};for(;B(r);){const s=r.$ref;if(i.has(s)){console.warn(`resolveAnyRef: cycle detected while resolving $ref chain: ${[...i,s].join(" -> ")}`);break}if(i.add(s),s.startsWith("#")){const d=D(e,s);if(!w(d)){console.warn(`resolveAnyRef: could not resolve JSON Pointer ${s}`);break}r=o(d,r);continue}if(!n){console.warn(`resolveAnyRef: external $ref without AJV not resolved: ${s}`);break}const l=s.indexOf("#"),c=l>=0?s.slice(0,l):s;let u=n.getSchema(s)||n.getSchema(c);if(!u)try{u=n.compile({$ref:s})}catch{}const f=u?.schema;if(!f||typeof f!="object"){console.warn(`resolveAnyRef: AJV could not provide schema for ${s}`);break}r=o(f,r)}return r}function de(t){if(typeof t.definition=="boolean")return;const e=V.getXUIConfig(t.definition);if(typeof e!="object")return;const n={};return typeof e.format=="string"&&["fieldset","tabs","accordion","group","grid"].includes(e.format)&&(n.format=e.format),Array.isArray(e.order)&&(n.order=e.order.filter(r=>typeof r=="string")),e.groups&&typeof e.groups=="object"&&(n.groups=e.groups),(typeof e.cols=="number"||e.cols&&typeof e.cols=="object")&&(n.cols=e.cols),Object.keys(n).length>0?n:void 0}function he({title:t,children:e}){return a.html.fieldset(a.attr.class("bc-fieldset"),t?a.html.legend(a.attr.class("bc-fieldset__legend"),t):null,a.html.div(a.attr.class("bc-fieldset__content"),p.Stack(a.attr.class("bc-stack--gap-1"),...e)))}function pe({title:t,children:e}){return V.Card({variant:"outlined",size:"md"},p.Stack(a.attr.class("bc-stack--gap-1"),t?p.Label(t):null,...e))}function me({cols:t=1,children:e}){const n=typeof t=="number"?`bc-schema-grid bc-schema-grid--cols-${t}`:a.computedOf(t)(r=>{if(typeof r=="number")return`bc-schema-grid bc-schema-grid--cols-${r}`;if(r&&typeof r=="object"){const i=["bc-schema-grid"];return r.sm&&i.push(`bc-schema-grid--cols-sm-${r.sm}`),r.md&&i.push(`bc-schema-grid--cols-md-${r.md}`),r.lg&&i.push(`bc-schema-grid--cols-lg-${r.lg}`),r.xl&&i.push(`bc-schema-grid--cols-xl-${r.xl}`),r["2xl"]&&i.push(`bc-schema-grid--cols-2xl-${r["2xl"]}`),i.join(" ")}return"bc-schema-grid bc-schema-grid--cols-1"});return a.html.div(a.attr.class(n),a.attr.class("bc-schema-grid--gap-4"),...e)}function ye({groups:t,children:e}){if(!t||Object.keys(t).length===0)return be({title:g.defaultMessages.properties,children:e});const n=a.prop(Object.keys(t)[0]),r=Object.entries(t);return a.html.div(a.attr.class("bc-tabs"),a.html.div(a.attr.class("bc-tabs__header"),a.attr.role("tablist"),...r.map(([i],o)=>a.html.button(a.attr.type("button"),a.attr.class("bc-tabs__tab"),a.attr.class(a.computedOf(n)(s=>s===i?"bc-tabs__tab--active":"")),a.attr.role("tab"),a.attr.tabindex(n.map(s=>s===i?0:-1)),a.on.click(()=>n.set(i)),a.on.keydown(s=>{switch(s.key){case"ArrowLeft":s.preventDefault();const l=o>0?o-1:r.length-1;n.set(r[l][0]);break;case"ArrowRight":s.preventDefault();const c=o<r.length-1?o+1:0;n.set(r[c][0]);break;case"Home":s.preventDefault(),n.set(r[0][0]);break;case"End":s.preventDefault(),n.set(r[r.length-1][0]);break}}),i))),a.html.div(a.attr.class("bc-tabs__content"),...r.map(([i,o])=>a.html.div(a.attr.class("bc-tabs__panel"),a.attr.class(a.computedOf(n)(s=>s===i?"bc-tabs__panel--active":"bc-tabs__panel--hidden")),a.attr.role("tabpanel"),p.Stack(a.attr.class("bc-stack--gap-1"),...e.filter((s,l)=>o.length===0||l<o.length))))))}function be({title:t,children:e}){return a.html.div(a.attr.class("bc-tabs"),a.html.div(a.attr.class("bc-tabs__header"),a.html.div(a.attr.class("bc-tabs__tab bc-tabs__tab--active"),t)),a.html.div(a.attr.class("bc-tabs__content"),a.html.div(a.attr.class("bc-tabs__panel bc-tabs__panel--active"),p.Stack(a.attr.class("bc-stack--gap-1"),...e))))}function ge({groups:t,children:e}){if(!t||Object.keys(t).length===0)return ve({title:g.defaultMessages.properties,children:e});const n=Object.entries(t),r=a.prop(new Set([n[0]?.[0]].filter(Boolean)));return a.html.div(a.attr.class("bc-accordion"),...n.map(([i,o])=>{const s=a.computedOf(r)(l=>l.has(i));return a.html.div(a.attr.class("bc-accordion__item"),a.html.button(a.attr.type("button"),a.attr.class("bc-accordion__header"),a.aria.expanded(s),a.on.click(()=>{const l=r.value,c=new Set(l);c.has(i)?c.delete(i):c.add(i),r.set(c)}),a.on.keydown(l=>{if(l.key==="Enter"||l.key===" "){l.preventDefault();const c=r.value,u=new Set(c);u.has(i)?u.delete(i):u.add(i),r.set(u)}}),a.html.span(i),g.Icon({icon:a.computedOf(s)(l=>l?"chevron-up":"chevron-down"),size:"sm"})),a.html.div(a.attr.class("bc-accordion__content"),a.attr.class(a.computedOf(s)(l=>l?"bc-accordion__content--open":"bc-accordion__content--closed")),p.Stack(a.attr.class("bc-stack--gap-1"),...e.filter((l,c)=>o.length===0||c<o.length))))}))}function ve({title:t,children:e}){const n=a.prop(!0);return a.html.div(a.attr.class("bc-accordion"),a.html.div(a.attr.class("bc-accordion__item"),a.html.button(a.attr.type("button"),a.attr.class("bc-accordion__header"),a.on.click(()=>n.set(!n.value)),a.html.span(t),g.Icon({icon:a.computedOf(n)(r=>r?"chevron-up":"chevron-down"),size:"sm"})),a.html.div(a.attr.class("bc-accordion__content"),a.attr.class(a.computedOf(n)(r=>r?"bc-accordion__content--open":"bc-accordion__content--closed")),p.Stack(a.attr.class("bc-stack--gap-1"),...e))))}function P(t,e,n){const r=new Map;n.forEach((s,l)=>{t[l]&&r.set(s,t[l])});let i=t;if(e.order&&e.order.length>0){const s=new Map,l=[];e.order.forEach(c=>{const u=r.get(c);u&&s.set(c,u)}),n.forEach((c,u)=>{!e.order.includes(c)&&t[u]&&l.push(t[u])}),i=[...Array.from(s.values()),...l]}let o;if(e.groups&&Object.keys(e.groups).length>0){o={};const s=new Set;Object.entries(e.groups).forEach(([c,u])=>{o[c]=[],u.forEach(f=>{const d=r.get(f);d&&(o[c].push(d),s.add(d))})});const l=i.filter(c=>!s.has(c));l.length>0&&(o.Other=l)}return{orderedChildren:i,groupedChildren:o}}function we(t,e,n,r=[]){if(!t||!t.format){if(t?.order){const{orderedChildren:l}=P(n,t,r);return p.Stack(a.attr.class("bc-stack--gap-1"),...l)}return p.Stack(a.attr.class("bc-stack--gap-1"),...n)}const i=e.widgetLabel||e.name,{orderedChildren:o,groupedChildren:s}=P(n,t,r);switch(t.format){case"fieldset":return he({title:i,children:o});case"group":return pe({title:i,children:o});case"grid":return me({cols:t.cols,children:o});case"tabs":return ye({groups:s||t.groups,children:s?Object.values(s).flat():o});case"accordion":return ge({groups:s||t.groups,children:s?Object.values(s).flat():o});default:return p.Stack(a.attr.class("bc-stack--gap-1"),...o)}}function z(t,e,n){const i=t.definition.oneOf;if(!Array.isArray(i)||i.length===0)return{matchingBranch:-1,validBranches:[],isAmbiguous:!1,hasNoMatch:!0};const o=i.map(f=>{if(typeof f=="object"&&f!=null&&"$ref"in f){const d=f.$ref;if(typeof d=="string"&&d.startsWith("#"))return I(f,t.schema)}return f}),s=[];for(let f=0;f<o.length;f++){const d=o[f];if(typeof d=="boolean"){d===!0&&s.push(f);continue}if(n)try{x(n,d)(e)&&s.push(f)}catch(h){console.warn(`Failed to compile oneOf branch ${f}:`,h),L(d,e)&&s.push(f)}else L(d,e)&&s.push(f)}const l=s.length>1,c=s.length===0;return{matchingBranch:s.length===1?s[0]:-1,validBranches:s,isAmbiguous:l,hasNoMatch:c}}function L(t,e){if("const"in t)return t.const===e;if(Array.isArray(t.enum))return t.enum.includes(e);if(t.type!=null){const n=Array.isArray(t.type)?t.type:[t.type],r=Ae(e);if(r==="unknown"||!n.includes(r))return!1}if(t.properties&&typeof e=="object"&&e!=null){const n=e;for(const[r,i]of Object.entries(t.properties))if(typeof i=="object"&&i!=null&&"const"in i&&n[r]!==i.const)return!1}return!0}function Ae(t){return t===null?"null":Array.isArray(t)?"array":typeof t=="object"?"object":typeof t=="string"?"string":typeof t=="number"?Number.isInteger(t)?"integer":"number":typeof t=="boolean"?"boolean":"unknown"}function Oe(t,e,n=`Option ${e+1}`){if(typeof t=="boolean")return t?"Any Value":"No Value";if(t.title)return t.title;if(t.properties){for(const[r,i]of Object.entries(t.properties))if(typeof i=="object"&&i!=null&&"const"in i){const o=i.const;if(typeof o=="string")return`${r}: ${o}`}}return"const"in t&&typeof t.const=="string"?t.const:t.type?(Array.isArray(t.type)?t.type:[t.type]).join(" | "):n}function Se(t,e,n){const r=z(t,e,n);return r.matchingBranch!==-1?r.matchingBranch:-1}exports.SchemaContext=$;exports.ajvErrorsToControllerValidation=U;exports.ajvErrorsToDependencies=q;exports.applyContainerLayout=we;exports.autoSelectOneOfBranch=Se;exports.buildMessage=E;exports.buildPath=M;exports.clearCaches=X;exports.clearCachesForAjv=Q;exports.compileWithCache=x;exports.detectOneOfBranch=z;exports.getAjvForSchema=te;exports.getCacheStats=Y;exports.getContainerLayout=de;exports.getOneOfBranchLabel=Oe;exports.jsonPointerToSegments=k;exports.mergeAllOf=fe;exports.resolveAnyRef=ue;exports.resolveRef=I;
1
+ "use strict";const S=require("@tempots/std"),a=require("@tempots/dom"),V=require("./utils-DmEuG3Np.cjs"),p=require("./stack-dwLevGa2.cjs"),g=require("./translations-qefRsdGi.cjs"),F=require("ajv"),H=require("ajv/dist/2019"),J=require("ajv/dist/2020"),K=require("ajv-formats");function k(t){return t.split("/").slice(1).map(e=>e.replace(/~1/g,"/").replace(/~0/g,"~"))}function M(t){const e=k(t.instancePath||"");if(t.keyword==="required"){const n=t.params.missingProperty;if(n!=null)return[...e,n]}if(t.keyword==="additionalProperties"){const n=t.params.additionalProperty;if(n!=null)return[...e,n]}if(t.keyword==="unevaluatedProperties"){const n=t.params.unevaluatedProperty;if(n!=null)return[...e,n]}return e.length>0?e:void 0}function E(t){return t.message??`${t.keyword} validation failed`}function q(t){return t.reduce((e,n)=>{const r=M(n);if(r==null)return e;let i=e;for(const o of r){const s=o;i.dependencies==null&&(i.dependencies={}),i.dependencies[s]==null&&(i.dependencies[s]={}),i=i.dependencies[s]}return i.message=E(n),e},{})}function U(t){const e=q(t);return S.Validation.invalid(e)}function G(t){const e={keyword:"x:ui",schemaType:["string","object"],errors:!1,validate:()=>!0};t.addKeyword(e)}let v=new WeakMap;function X(){v=new WeakMap}function Q(t){v.delete(t)}function Y(){return{ajvInstances:0}}function x(t,e){let n=v.get(t);n==null&&(n=new WeakMap,v.set(t,n));const r=n.get(e);if(r)return r;const i=t.compile(e);return n.set(e,i),i}async function _(t,e,n){const i={"2020-12":J,"2019-09":H,"draft-07":F}[t],o=new i({meta:n,strictSchema:!1,allErrors:!0,removeAdditional:e});switch(t){case"2020-12":o.opts.defaultMeta="https://json-schema.org/draft/2020-12/schema";break;case"2019-09":o.opts.defaultMeta="https://json-schema.org/draft/2019-09/schema";break;case"draft-07":o.opts.defaultMeta="http://json-schema.org/draft-07/schema#";break}return K(o),G(o),o}function Z(t){return t==null||t.includes("draft/2020-12")?"2020-12":t.includes("draft/2019-09")?"2019-09":"draft-07"}function N(t){const e=t.indexOf("#");return e>=0?t.slice(0,e):t}function j(t,e=!0){if(Array.isArray(t))return t.map(n=>j(n,!1));if(t!=null&&typeof t=="object"){const n=t,r={};for(const[i,o]of Object.entries(n))!e&&(i==="$id"||i==="$schema"||i==="$dynamicAnchor")||(r[i]=j(o,!1));return r}return t}function C(t){const e=new Set,n=r=>{if(r!=null){if(Array.isArray(r)){for(const i of r)n(i);return}if(typeof r=="object"){const i=r,o=i.$ref;typeof o=="string"&&o.length>0&&o[0]!=="#"&&e.add(N(o));for(const s of Object.values(i))n(s)}}};return n(t),[...e]}function T(t,e){for(const n of e){const r=n.$id;if(typeof r=="string"&&r.length>0&&!t.getSchema(r))try{t.addSchema(n)}catch{}}}async function ee(t,e,n,r){if(n==null)return null;const i=new Set;if(r&&r.length>0)for(const l of r){const c=l.$id;typeof c=="string"&&c.length>0&&i.add(c)}const o=[],s=5;for(let l=0;l<s;l++){const c=C(e),u=o.flatMap(h=>C(h)),f=new Set([...c,...u]),d=[];for(const h of f)if(!i.has(h)){if(t.getSchema(h)){i.add(h);continue}d.push(h)}if(d.length===0)return null;try{const h=await n(d);if(!Array.isArray(h)||h.length===0)return null;T(t,h);for(const m of h){const y=m.$id;typeof y=="string"&&y.length>0&&(i.add(y),o.push(m))}}catch(h){return`refResolver failed: ${h instanceof Error?h.message:String(h)}`}}return"refResolver reached iteration limit while resolving external $refs"}async function te(t,e){try{const n=Z(t.$schema),r=e?.sanitizeAdditional===!1?!1:e?.sanitizeAdditional??!1,i=f=>typeof f=="string"&&f.endsWith("#")?f.slice(0,-1):f??"",o=t.$id,s=i(o);if(s!==""&&new Set(["https://json-schema.org/draft/2020-12/schema","https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft-07/schema"]).has(s)){const f=await _(n,r,!1),d=j(t);try{f.addMetaSchema(d)}catch{}const h=f.getSchema(o??s)??f.compile(d);return{ok:!0,value:{ajv:f,validate:h}}}const c=await _(n,r,!0);if(e?.externalSchemas&&e.externalSchemas.length>0&&T(c,e.externalSchemas),e?.refResolver){const f=await ee(c,t,e.refResolver,e.externalSchemas);if(f!=null)return{ok:!1,error:f}}const u=c.compile(t);return{ok:!0,value:{ajv:c,validate:u}}}catch(n){return{ok:!1,error:n instanceof Error?n.message:String(n)}}}function ne(t,e){if(typeof t=="boolean"||typeof e=="boolean")return e;const n={...t};for(const[r,i]of Object.entries(e))r==="required"&&Array.isArray(t.required)&&Array.isArray(i)?n.required=[...new Set([...t.required,...i])]:r==="properties"&&t.properties&&typeof i=="object"&&i!=null?n.properties={...t.properties,...i}:n[r]=i;return n}function re(t,e){if(typeof t=="boolean"||typeof e=="boolean")return t===e;const n=t.type,r=e.type;return!(n!=null&&r!=null&&n!==r||n==="string"&&r==="string"&&(t.minLength!=null&&e.maxLength!=null&&t.minLength>e.maxLength||t.maxLength!=null&&e.minLength!=null&&t.maxLength<e.minLength)||(n==="number"||n==="integer")&&(r==="number"||r==="integer")&&(t.minimum!=null&&e.maximum!=null&&t.minimum>e.maximum||t.maximum!=null&&e.minimum!=null&&t.maximum<e.minimum))}function ie(t,e,n,r){if(typeof e=="boolean"||typeof n=="boolean")return{path:r,message:`Property "${t}" has conflicting boolean schema definitions in allOf branches`,conflictingValues:[e,n]};const i=e.type,o=n.type;if(i!=null&&o!=null&&i!==o){const s=Array.isArray(i)?i:[i],l=Array.isArray(o)?o:[o];return{path:r,message:`Property "${t}" has conflicting types: ${s.join("|")} vs ${l.join("|")}`,conflictingValues:[e,n]}}if(i===o&&i==="string"){const s=[];if(e.minLength!=null&&n.maxLength!=null&&e.minLength>n.maxLength&&s.push(`minLength ${e.minLength} > maxLength ${n.maxLength}`),e.maxLength!=null&&n.minLength!=null&&e.maxLength<n.minLength&&s.push(`maxLength ${e.maxLength} < minLength ${n.minLength}`),s.length>0)return{path:r,message:`Property "${t}" has conflicting string constraints: ${s.join(", ")}`,conflictingValues:[e,n]}}if(i===o&&(i==="number"||i==="integer")){const s=[];if(e.minimum!=null&&n.maximum!=null&&e.minimum>n.maximum&&s.push(`minimum ${e.minimum} > maximum ${n.maximum}`),e.maximum!=null&&n.minimum!=null&&e.maximum<n.minimum&&s.push(`maximum ${e.maximum} < minimum ${n.minimum}`),s.length>0)return{path:r,message:`Property "${t}" has conflicting numeric constraints: ${s.join(", ")}`,conflictingValues:[e,n]}}return re(e,n)?null:{path:r,message:`Property "${t}" has conflicting definitions in allOf branches`,conflictingValues:[e,n]}}function se(t){const e=Array.isArray(t)?t:[t],n=new Set(e.map(r=>r));return n.has("number")&&n.add("integer"),n}function oe(t,e,n,r){for(const[i,o]of Object.entries(e)){if(t[i]!=null&&t[i]!==o){const s=t[i],l=ie(i,s,o,[...n,"properties",i]);l!=null&&r.push(l)}t[i]!=null?t[i]=ne(t[i],o):t[i]=o}}function ae(t,e,n,r){e!=null&&t.additionalProperties!=null&&t.additionalProperties!==e&&r.push({path:[...n,"additionalProperties"],message:`Conflicting additionalProperties values in allOf: ${t.additionalProperties} vs ${e}`,conflictingValues:[t.additionalProperties,e]})}function le(t,e,n,r,i){e!=null&&t.maxProperties!=null&&e>t.maxProperties&&i.push({path:[...r,"minProperties"],message:`minProperties ${e} conflicts with existing maxProperties ${t.maxProperties}`,conflictingValues:[e,t.maxProperties]}),n!=null&&t.minProperties!=null&&n<t.minProperties&&i.push({path:[...r,"maxProperties"],message:`maxProperties ${n} conflicts with existing minProperties ${t.minProperties}`,conflictingValues:[n,t.minProperties]})}function ce(t,e,n){if(t.length===0)return;let r=null;for(const o of t)if(r==null)r=new Set(o);else{const s=new Set;for(const l of r)o.has(l)&&s.add(l);r=s}const i=Array.from(r??[]);if(i.length===0){const o=t.map(s=>Array.from(s));n.push({path:[...e,"type"],message:"Incompatible types in allOf (no common types)",conflictingValues:o});return}else return i.length===1?i[0]:i}function fe(t,e=[]){const n=[],r={},i=[],o=[],s={};for(const c of t){c.type!=null&&i.push(se(c.type)),Array.isArray(c.required)&&o.push(...c.required),c.properties!=null&&oe(s,c.properties,e,n);const{type:u,required:f,properties:d,allOf:h,additionalProperties:m,patternProperties:y,minProperties:b,maxProperties:A,...W}=c;ae(r,m,e,n),le(r,b,A,e,n),Object.assign(r,W),m!=null&&(r.additionalProperties=m),y!=null&&(r.patternProperties=y),b!=null&&(r.minProperties=b),A!=null&&(r.maxProperties=A)}const l=ce(i,e,n);return l!=null&&(r.type=l),o.length>0&&(r.required=[...new Set(o)]),Object.keys(s).length>0&&(r.properties=s),{mergedSchema:r,conflicts:n}}class ${schema;definition;horizontal;path;ajv;isPropertyRequired;suppressLabel;schemaConflicts;notViolations;widgetRegistry;setStatus;formValue;validationMode;submitting;constructor(e){const{schema:n,definition:r,horizontal:i,path:o,ajv:s,isPropertyRequired:l,suppressLabel:c,schemaConflicts:u,notViolations:f,widgetRegistry:d,setStatus:h,formValue:m,validationMode:y,submitting:b}=e;this.schema=n,this.definition=r,this.horizontal=i,this.path=o,this.ajv=s,this.isPropertyRequired=l??!1,this.suppressLabel=c??!1,this.schemaConflicts=u??[],this.notViolations=f??[],this.widgetRegistry=d,this.setStatus=h,this.formValue=m,this.validationMode=y,this.submitting=b}with=e=>new $({schema:e.schema??this.schema,definition:e.definition??this.definition,horizontal:e.horizontal??this.horizontal,path:e.path??this.path,ajv:e.ajv??this.ajv,isPropertyRequired:e.isPropertyRequired??this.isPropertyRequired,suppressLabel:e.suppressLabel??this.suppressLabel,schemaConflicts:e.schemaConflicts??this.schemaConflicts,notViolations:e.notViolations??this.notViolations,widgetRegistry:e.widgetRegistry??this.widgetRegistry,setStatus:e.setStatus??this.setStatus,formValue:e.formValue??this.formValue,validationMode:e.validationMode??this.validationMode,submitting:e.submitting??this.submitting});append=e=>this.with({path:[...this.path,e]});get isRoot(){return this.path.length===0}get name(){const e=this.path[this.path.length-1];if(typeof e=="string")return e}get widgetName(){return this.path.map(String).join(".")}get widgetLabel(){const e=this.name;return(typeof this.definition=="object"&&this.definition!==null?this.definition.title:void 0)??(e!=null?S.upperCaseFirst(S.humanize(e)):void 0)}hasRequiredProperty=e=>typeof this.definition=="boolean"?!1:this.definition.required!=null&&this.definition.required.includes(e);get nullable(){return this.definition.nullable??!1}get isNullable(){return this.nullable||this.hasType("null")||this.hasEnumValue(null)||this.hasConstValue(null)||(this.anyOf?.some(e=>e.isNullable)??!1)||(this.oneOf?.some(e=>e.isNullable)??!1)}get isOptional(){return!this.isPropertyRequired}get shouldShowPresenceToggle(){return!(!this.isOptional||this.isRoot||(this.isNullable||this.isOptional)&&this.isPrimitive)}get isPrimitive(){if(typeof this.definition=="boolean")return!1;const e=this.definition;if(e.const!==void 0||e.enum!==void 0)return!0;if(e.type){const n=Array.isArray(e.type)?e.type:[e.type],r=["string","number","integer","boolean"];return n.every(i=>r.includes(i))}return!1}get isReadOnly(){return typeof this.definition=="boolean"?!1:!!this.definition.readOnly}get isWriteOnly(){return typeof this.definition=="boolean"?!1:!!this.definition.writeOnly}get isDeprecated(){return typeof this.definition=="boolean"?!1:!!this.definition.deprecated}get shouldIgnoreReadOnly(){if(typeof this.definition=="boolean")return!1;const e=this.definition["x:ui"];return e&&typeof e=="object"?!!e.ignoreReadOnly:!1}get shouldShowWriteOnly(){if(typeof this.definition=="boolean")return!1;const e=this.definition["x:ui"];return e&&typeof e=="object"?!!e.showWriteOnly:!1}get anyOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.anyOf)?this.definition.anyOf.map(e=>this.with({definition:e})):void 0}get oneOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.oneOf)?this.definition.oneOf.map(e=>this.with({definition:e})):void 0}get allOf(){if(typeof this.definition!="boolean")return Array.isArray(this.definition.allOf)?this.definition.allOf.map(e=>this.with({definition:e})):void 0}hasType=e=>this.definition===!0?!0:this.definition===!1?!1:Array.isArray(this.definition.type)?this.definition.type.includes(e):this.definition.type===e;hasEnumValue=e=>typeof this.definition=="boolean"?!1:Array.isArray(this.definition.enum)?this.definition.enum.includes(e):!1;hasConstValue=e=>typeof this.definition=="boolean"?!1:this.definition.const===e;get description(){if(typeof this.definition!="boolean")return this.definition.description}get examples(){if(typeof this.definition!="boolean")return this.definition.examples}get default(){if(typeof this.definition!="boolean")return this.definition.default}}let O=new WeakMap,R=new WeakMap;function I(t,e){const n=typeof e=="object"&&e!=null?e:null;if(n!=null){const s=O.get(n)?.get(t);if(s!=null)return s}let r=t;const i=new Set;for(;B(r);){const o=r.$ref;if(!o.startsWith("#")){console.warn(`resolveRef: external $ref not supported here: ${o}`);break}if(i.has(o)){console.warn(`resolveRef: cycle detected while resolving in-document $ref chain: ${[...i,o].join(" -> ")}`);break}i.add(o);const s=D(e,o);if(!w(s)){console.warn(`resolveRef: could not resolve JSON Pointer ${o}`);break}const{$ref:l,...c}=r;r={...s,...c}}if(n!=null){let o=O.get(n);o==null&&(o=new WeakMap,O.set(n,o)),o.set(t,r)}return r}function B(t){return w(t)&&typeof t.$ref=="string"}function w(t){return typeof t=="object"&&t!=null&&!Array.isArray(t)}function D(t,e){if(!e.startsWith("#"))return;if(e==="#")return t;if(typeof t!="object"||t==null)return;const n=t;let r=R.get(n);r==null&&(r=new Map,R.set(n,r));const i=r.get(e);if(i!==void 0)return i;const o=k(e);let s=t;for(const l of o){if(!w(s)&&!Array.isArray(s)){r.set(e,void 0);return}s=s[l]}return r.set(e,s),s}function ue(t,e,n){let r=t;const i=new Set,o=(s,l)=>{const{$ref:c,...u}=l;return{...s,...u}};for(;B(r);){const s=r.$ref;if(i.has(s)){console.warn(`resolveAnyRef: cycle detected while resolving $ref chain: ${[...i,s].join(" -> ")}`);break}if(i.add(s),s.startsWith("#")){const d=D(e,s);if(!w(d)){console.warn(`resolveAnyRef: could not resolve JSON Pointer ${s}`);break}r=o(d,r);continue}if(!n){console.warn(`resolveAnyRef: external $ref without AJV not resolved: ${s}`);break}const l=s.indexOf("#"),c=l>=0?s.slice(0,l):s;let u=n.getSchema(s)||n.getSchema(c);if(!u)try{u=n.compile({$ref:s})}catch{}const f=u?.schema;if(!f||typeof f!="object"){console.warn(`resolveAnyRef: AJV could not provide schema for ${s}`);break}r=o(f,r)}return r}function de(t){if(typeof t.definition=="boolean")return;const e=V.getXUIConfig(t.definition);if(typeof e!="object")return;const n={};return typeof e.format=="string"&&["fieldset","tabs","accordion","group","grid"].includes(e.format)&&(n.format=e.format),Array.isArray(e.order)&&(n.order=e.order.filter(r=>typeof r=="string")),e.groups&&typeof e.groups=="object"&&(n.groups=e.groups),(typeof e.cols=="number"||e.cols&&typeof e.cols=="object")&&(n.cols=e.cols),Object.keys(n).length>0?n:void 0}function he({title:t,children:e}){return a.html.fieldset(a.attr.class("bc-fieldset"),t?a.html.legend(a.attr.class("bc-fieldset__legend"),t):null,a.html.div(a.attr.class("bc-fieldset__content"),p.Stack(a.attr.class("bc-stack--gap-1"),...e)))}function pe({title:t,children:e}){return V.Card({variant:"outlined",size:"md"},p.Stack(a.attr.class("bc-stack--gap-1"),t?p.Label(t):null,...e))}function me({cols:t=1,children:e}){const n=typeof t=="number"?`bc-schema-grid bc-schema-grid--cols-${t}`:a.computedOf(t)(r=>{if(typeof r=="number")return`bc-schema-grid bc-schema-grid--cols-${r}`;if(r&&typeof r=="object"){const i=["bc-schema-grid"];return r.sm&&i.push(`bc-schema-grid--cols-sm-${r.sm}`),r.md&&i.push(`bc-schema-grid--cols-md-${r.md}`),r.lg&&i.push(`bc-schema-grid--cols-lg-${r.lg}`),r.xl&&i.push(`bc-schema-grid--cols-xl-${r.xl}`),r["2xl"]&&i.push(`bc-schema-grid--cols-2xl-${r["2xl"]}`),i.join(" ")}return"bc-schema-grid bc-schema-grid--cols-1"});return a.html.div(a.attr.class(n),a.attr.class("bc-schema-grid--gap-4"),...e)}function ye({groups:t,children:e}){if(!t||Object.keys(t).length===0)return be({title:g.defaultMessages.properties,children:e});const n=a.prop(Object.keys(t)[0]),r=Object.entries(t);return a.html.div(a.attr.class("bc-tabs"),a.html.div(a.attr.class("bc-tabs__header"),a.attr.role("tablist"),...r.map(([i],o)=>a.html.button(a.attr.type("button"),a.attr.class("bc-tabs__tab"),a.attr.class(a.computedOf(n)(s=>s===i?"bc-tabs__tab--active":"")),a.attr.role("tab"),a.attr.tabindex(n.map(s=>s===i?0:-1)),a.on.click(()=>n.set(i)),a.on.keydown(s=>{switch(s.key){case"ArrowLeft":s.preventDefault();const l=o>0?o-1:r.length-1;n.set(r[l][0]);break;case"ArrowRight":s.preventDefault();const c=o<r.length-1?o+1:0;n.set(r[c][0]);break;case"Home":s.preventDefault(),n.set(r[0][0]);break;case"End":s.preventDefault(),n.set(r[r.length-1][0]);break}}),i))),a.html.div(a.attr.class("bc-tabs__content"),...r.map(([i,o])=>a.html.div(a.attr.class("bc-tabs__panel"),a.attr.class(a.computedOf(n)(s=>s===i?"bc-tabs__panel--active":"bc-tabs__panel--hidden")),a.attr.role("tabpanel"),p.Stack(a.attr.class("bc-stack--gap-1"),...e.filter((s,l)=>o.length===0||l<o.length))))))}function be({title:t,children:e}){return a.html.div(a.attr.class("bc-tabs"),a.html.div(a.attr.class("bc-tabs__header"),a.html.div(a.attr.class("bc-tabs__tab bc-tabs__tab--active"),t)),a.html.div(a.attr.class("bc-tabs__content"),a.html.div(a.attr.class("bc-tabs__panel bc-tabs__panel--active"),p.Stack(a.attr.class("bc-stack--gap-1"),...e))))}function ge({groups:t,children:e}){if(!t||Object.keys(t).length===0)return ve({title:g.defaultMessages.properties,children:e});const n=Object.entries(t),r=a.prop(new Set([n[0]?.[0]].filter(Boolean)));return a.html.div(a.attr.class("bc-accordion"),...n.map(([i,o])=>{const s=a.computedOf(r)(l=>l.has(i));return a.html.div(a.attr.class("bc-accordion__item"),a.html.button(a.attr.type("button"),a.attr.class("bc-accordion__header"),a.aria.expanded(s),a.on.click(()=>{const l=r.value,c=new Set(l);c.has(i)?c.delete(i):c.add(i),r.set(c)}),a.on.keydown(l=>{if(l.key==="Enter"||l.key===" "){l.preventDefault();const c=r.value,u=new Set(c);u.has(i)?u.delete(i):u.add(i),r.set(u)}}),a.html.span(i),g.Icon({icon:a.computedOf(s)(l=>l?"chevron-up":"chevron-down"),size:"sm"})),a.html.div(a.attr.class("bc-accordion__content"),a.attr.class(a.computedOf(s)(l=>l?"bc-accordion__content--open":"bc-accordion__content--closed")),p.Stack(a.attr.class("bc-stack--gap-1"),...e.filter((l,c)=>o.length===0||c<o.length))))}))}function ve({title:t,children:e}){const n=a.prop(!0);return a.html.div(a.attr.class("bc-accordion"),a.html.div(a.attr.class("bc-accordion__item"),a.html.button(a.attr.type("button"),a.attr.class("bc-accordion__header"),a.on.click(()=>n.set(!n.value)),a.html.span(t),g.Icon({icon:a.computedOf(n)(r=>r?"chevron-up":"chevron-down"),size:"sm"})),a.html.div(a.attr.class("bc-accordion__content"),a.attr.class(a.computedOf(n)(r=>r?"bc-accordion__content--open":"bc-accordion__content--closed")),p.Stack(a.attr.class("bc-stack--gap-1"),...e))))}function P(t,e,n){const r=new Map;n.forEach((s,l)=>{t[l]&&r.set(s,t[l])});let i=t;if(e.order&&e.order.length>0){const s=new Map,l=[];e.order.forEach(c=>{const u=r.get(c);u&&s.set(c,u)}),n.forEach((c,u)=>{!e.order.includes(c)&&t[u]&&l.push(t[u])}),i=[...Array.from(s.values()),...l]}let o;if(e.groups&&Object.keys(e.groups).length>0){o={};const s=new Set;Object.entries(e.groups).forEach(([c,u])=>{o[c]=[],u.forEach(f=>{const d=r.get(f);d&&(o[c].push(d),s.add(d))})});const l=i.filter(c=>!s.has(c));l.length>0&&(o.Other=l)}return{orderedChildren:i,groupedChildren:o}}function we(t,e,n,r=[]){if(!t||!t.format){if(t?.order){const{orderedChildren:l}=P(n,t,r);return p.Stack(a.attr.class("bc-stack--gap-1"),...l)}return p.Stack(a.attr.class("bc-stack--gap-1"),...n)}const i=e.widgetLabel||e.name,{orderedChildren:o,groupedChildren:s}=P(n,t,r);switch(t.format){case"fieldset":return he({title:i,children:o});case"group":return pe({title:i,children:o});case"grid":return me({cols:t.cols,children:o});case"tabs":return ye({groups:s||t.groups,children:s?Object.values(s).flat():o});case"accordion":return ge({groups:s||t.groups,children:s?Object.values(s).flat():o});default:return p.Stack(a.attr.class("bc-stack--gap-1"),...o)}}function z(t,e,n){const i=t.definition.oneOf;if(!Array.isArray(i)||i.length===0)return{matchingBranch:-1,validBranches:[],isAmbiguous:!1,hasNoMatch:!0};const o=i.map(f=>{if(typeof f=="object"&&f!=null&&"$ref"in f){const d=f.$ref;if(typeof d=="string"&&d.startsWith("#"))return I(f,t.schema)}return f}),s=[];for(let f=0;f<o.length;f++){const d=o[f];if(typeof d=="boolean"){d===!0&&s.push(f);continue}if(n)try{x(n,d)(e)&&s.push(f)}catch(h){console.warn(`Failed to compile oneOf branch ${f}:`,h),L(d,e)&&s.push(f)}else L(d,e)&&s.push(f)}const l=s.length>1,c=s.length===0;return{matchingBranch:s.length===1?s[0]:-1,validBranches:s,isAmbiguous:l,hasNoMatch:c}}function L(t,e){if("const"in t)return t.const===e;if(Array.isArray(t.enum))return t.enum.includes(e);if(t.type!=null){const n=Array.isArray(t.type)?t.type:[t.type],r=Ae(e);if(r==="unknown"||!n.includes(r))return!1}if(t.properties&&typeof e=="object"&&e!=null){const n=e;for(const[r,i]of Object.entries(t.properties))if(typeof i=="object"&&i!=null&&"const"in i&&n[r]!==i.const)return!1}return!0}function Ae(t){return t===null?"null":Array.isArray(t)?"array":typeof t=="object"?"object":typeof t=="string"?"string":typeof t=="number"?Number.isInteger(t)?"integer":"number":typeof t=="boolean"?"boolean":"unknown"}function Oe(t,e,n=`Option ${e+1}`){if(typeof t=="boolean")return t?"Any Value":"No Value";if(t.title)return t.title;if(t.properties){for(const[r,i]of Object.entries(t.properties))if(typeof i=="object"&&i!=null&&"const"in i){const o=i.const;if(typeof o=="string")return`${r}: ${o}`}}return"const"in t&&typeof t.const=="string"?t.const:t.type?(Array.isArray(t.type)?t.type:[t.type]).join(" | "):n}function Se(t,e,n){const r=z(t,e,n);return r.matchingBranch!==-1?r.matchingBranch:-1}exports.SchemaContext=$;exports.ajvErrorsToControllerValidation=U;exports.ajvErrorsToDependencies=q;exports.applyContainerLayout=we;exports.autoSelectOneOfBranch=Se;exports.buildMessage=E;exports.buildPath=M;exports.clearCaches=X;exports.clearCachesForAjv=Q;exports.compileWithCache=x;exports.detectOneOfBranch=z;exports.getAjvForSchema=te;exports.getCacheStats=Y;exports.getContainerLayout=de;exports.getOneOfBranchLabel=Oe;exports.jsonPointerToSegments=k;exports.mergeAllOf=fe;exports.resolveAnyRef=ue;exports.resolveRef=I;
@@ -2,7 +2,7 @@ import { Validation as z, upperCaseFirst as B, humanize as W } from "@tempots/st
2
2
  import { attr as c, prop as _, html as h, computedOf as g, aria as F, on as w } from "@tempots/dom";
3
3
  import { g as H, C as J } from "./utils-vUtP6iPG.js";
4
4
  import { S as y, L as K } from "./stack-BLMteGTn.js";
5
- import { d as V, I as x } from "./translations-B96REXIk.js";
5
+ import { d as V, I as x } from "./translations-DT5QQ4WO.js";
6
6
  import U from "ajv";
7
7
  import G from "ajv/dist/2019";
8
8
  import X from "ajv/dist/2020";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-BDGa_4jx.cjs"),t={loadingExtended:"Ładowanie, proszę czekać",loadingShort:"Ładowanie...",locale:"Język",iconDescription:"Ikona",loadingIcon:"Ikona ładowania",failedToLoadIcon:"Nie udało się załadować ikony",editLabel:"Edytuj",selectOne:"Wybierz jeden",selectNone:"Brak",selectMany:"Wybierz wiele",noResults:"Brak wyników",passwordPlaceholderText:"Tajne hasło",togglePasswordVisibility:"Przełącz widoczność hasła",toggleMenu:"Przełącz menu",toggleAside:"Przełącz panel boczny",mainNavigation:"Główna nawigacja",sidebar:"Pasek boczny",closeDrawer:"Zamknij szufladę",closeModal:"Zamknij modal",confirm:"Potwierdź",cancel:"Anuluj",addLabel:"Dodaj",removeItem:"Usuń element",currentLocale:"Polski",ar:"Arabski",de:"Niemiecki",en:"Angielski",es:"Hiszpański",fr:"Francuski",hi:"Hindi",it:"Włoski",ja:"Japoński",ko:"Koreański",nl:"Holenderski",pl:"Polski",pt:"Portugalski",ru:"Rosyjski",tr:"Turecki",vi:"Wietnamski",zh:"Chiński",he:"Hebrajski",fa:"Perski",ur:"Urdu",emailPlaceholderText:"Wprowadź adres e-mail",incrementValue:"Zwiększ wartość",decrementValue:"Zmniejsz wartość",dropZoneInstructions:e=>e?"Kliknij aby wybrać lub przeciągnij pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików":"Przeciągnij pliki tutaj",fileSizeUnits:["Bajty","KB","MB","GB","TB"],removeFile:"Usuń plik",clearAllFiles:"Usuń wszystkie pliki",clearValue:"Wyczyść wartość",unknownType:"Nieznany typ",filesInputInstructions:(e,i,o)=>{let a=e==null||e>1?"Kliknij aby wybrać lub przeciągnij pliki tutaj":"Kliknij aby wybrać lub przeciągnij plik tutaj";if(e||i){const n=[];if(e!=null&&e>1&&n.push(`do ${e} plików`),i&&o){const l=r.formatFileSize(i,{units:o});n.push(`maks ${l} każdy`)}n.length>0&&(a+=` (${n.join(", ")})`)}return a},paginationLabel:"Paginacja",paginationRange:(e,i,o,a)=>a>o?`Wiersze ${e} do ${i} z ${o} z ${a}`:`Wiersze ${e} do ${i} z ${o}`,firstPage:"Pierwsza strona",previousPage:"Poprzednia strona",nextPage:"Następna strona",lastPage:"Ostatnia strona",breadcrumbs:"Nawigacja okruszkowa",commandPalette:"Paleta poleceń",typeACommand:"Wpisz polecenie...",noResultsFound:"Nie znaleziono wyników",noMatchingCommands:"Brak pasujących poleceń",appearanceSystem:"Systemowy",appearanceLight:"Jasny",appearanceDark:"Ciemny",ok:"OK",changeTypeConfirmation:"Zmiana typu wyczyści bieżącą wartość. Kontynuować?",notifications:"Powiadomienia",markAllAsRead:"Oznacz wszystkie jako przeczytane",noNotifications:"Brak powiadomień",schemaConflictsDetected:"Wykryto konflikty schematu",schemaViolationsDetected:"Wykryto naruszenia schematu",properties:"Właściwości",uploading:"Przesyłanie...",dropFilesOrBrowse:"Upuść pliki tutaj lub kliknij, aby przeglądać",acceptedTypes:e=>`Akceptowane typy: ${e}`,enterUrlPrompt:"Wprowadź URL:",exceeded:"(przekroczono)",pdfPreview:"Podgląd PDF",lexical:{fontFamily:"Krój czcionki",fontSize:"Rozmiar czcionki",lineHeight:"Wysokość linii",fontColor:"Kolor czcionki",highlightColor:"Kolor wyróżnienia",backgroundColor:"Kolor tła",bold:"Pogrubienie",italic:"Kursywa",underline:"Podkreślenie",strikethrough:"Przekreślenie",code:"Kod",clearFormatting:"Wyczyść formatowanie",normal:"Normalny",heading:e=>`Nagłówek ${e}`,bulletList:"Lista punktowana",orderedList:"Lista numerowana",checkList:"Lista kontrolna",indent:"Zwiększ wcięcie",outdent:"Zmniejsz wcięcie",blockquote:"Cytat blokowy",codeBlock:"Blok kodu",horizontalRule:"Linia pozioma",insertTable:"Wstaw tabelę",link:"Link",undo:"Cofnij",redo:"Ponów",cut:"Wytnij",copy:"Kopiuj",paste:"Wklej",defaultOption:"Domyślny",slashCommands:"Polecenia ukośnikowe",noCommandsFound:"Nie znaleziono poleceń",changeBlockType:"Zmień typ bloku",blockTypes:"Typy bloków",enterUrl:"Wprowadź URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sortuj rosnąco",sortDescending:"Sortuj malejąco",clearSort:"Wyczyść sortowanie",filterPlaceholder:"Filtruj...",clearFilter:"Wyczyść filtr",selectAll:"Zaznacz wszystko",deselectAll:"Odznacz wszystko",selectedCount:e=>`${e} zaznaczonych`,resetAll:"Resetuj wszystko",noResults:"Nie znaleziono wyników",loading:"Ładowanie...",filterPanelAddCondition:"Dodaj warunek",filterPanelApply:"Zastosuj",filterPanelClear:"Wyczyść filtry",filterPanelAnd:"I",filterPanelOr:"LUB",filterPanelContains:"Zawiera",filterPanelNotContains:"Nie zawiera",filterPanelEquals:"Równe",filterPanelNotEquals:"Nierówne",filterPanelStartsWith:"Zaczyna się od",filterPanelEndsWith:"Kończy się na",filterPanelIsNull:"Jest pusty",filterPanelIsNotNull:"Nie jest pusty",filterPanelGt:"Większy niż",filterPanelGte:"Większy lub równy",filterPanelLt:"Mniejszy niż",filterPanelLte:"Mniejszy lub równy",filterPanelBetween:"Między",filterPanelValuePlaceholder:"Wartość...",sortMultiHint:"Przytrzymaj Shift, aby sortować według wielu kolumn",columnVisibility:"Kolumny",showAllColumns:"Pokaż wszystkie",menuSortAsc:"Sortuj rosnąco",menuSortDesc:"Sortuj malejąco",menuClearSort:"Wyczyść sortowanie",menuHideColumn:"Ukryj kolumnę",menuChooseColumns:"Wybierz kolumny",menuResetColumns:"Resetuj kolumny",menuFilter:"Filtruj",rowCount:(e,i)=>`Wiersze: ${e} Łącznie wierszy: ${i}`,filterTagsPlaceholder:"Wybierz wartości...",groupCount:e=>`${e} elementów`,collapseGroup:"Zwiń grupę",expandGroup:"Rozwiń grupę",describeFilter:{textContains:(e,i)=>`${e} zawiera "${i}"`,textNotContains:(e,i)=>`${e} nie zawiera "${i}"`,textEquals:(e,i)=>`${e} równe "${i}"`,textNotEquals:(e,i)=>`${e} nierówne "${i}"`,textStartsWith:(e,i)=>`${e} zaczyna się od "${i}"`,textEndsWith:(e,i)=>`${e} kończy się na "${i}"`,compareEq:(e,i)=>`${e} = ${i}`,compareNeq:(e,i)=>`${e} ≠ ${i}`,compareGt:(e,i)=>`${e} > ${i}`,compareGte:(e,i)=>`${e} ≥ ${i}`,compareLt:(e,i)=>`${e} < ${i}`,compareLte:(e,i)=>`${e} ≤ ${i}`,rangeBetween:(e,i,o)=>`${e} między ${i} a ${o}`,rangeGte:(e,i)=>`${e} ≥ ${i}`,rangeLte:(e,i)=>`${e} ≤ ${i}`,setIn:(e,i)=>`${e} w [${i}]`,setNotIn:(e,i)=>`${e} nie w [${i}]`,booleanIs:(e,i)=>`${e} jest ${i}`,isNull:e=>`${e} jest puste`,isNotNull:e=>`${e} nie jest puste`,compositeAnd:e=>e.join(" I "),compositeOr:e=>e.join(" LUB ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Ładowanie PDF...",loadFailed:"Nie udało się załadować PDF",invalidPdf:"Nieprawidłowy plik PDF",pageOutOfRange:(e,i)=>`Strona ${e} jest poza zakresem (1-${i})`,renderFailed:"Nie udało się wyrenderować strony PDF"}};exports.default=t;exports.pl=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./translations-qefRsdGi.cjs"),t={loadingExtended:"Ładowanie, proszę czekać",loadingShort:"Ładowanie...",locale:"Język",iconDescription:"Ikona",loadingIcon:"Ikona ładowania",failedToLoadIcon:"Nie udało się załadować ikony",editLabel:"Edytuj",selectOne:"Wybierz jeden",selectNone:"Brak",selectMany:"Wybierz wiele",noResults:"Brak wyników",passwordPlaceholderText:"Tajne hasło",togglePasswordVisibility:"Przełącz widoczność hasła",toggleMenu:"Przełącz menu",toggleAside:"Przełącz panel boczny",mainNavigation:"Główna nawigacja",sidebar:"Pasek boczny",closeDrawer:"Zamknij szufladę",closeModal:"Zamknij modal",confirm:"Potwierdź",cancel:"Anuluj",addLabel:"Dodaj",removeItem:"Usuń element",currentLocale:"Polski",ar:"Arabski",de:"Niemiecki",en:"Angielski",es:"Hiszpański",fr:"Francuski",hi:"Hindi",it:"Włoski",ja:"Japoński",ko:"Koreański",nl:"Holenderski",pl:"Polski",pt:"Portugalski",ru:"Rosyjski",tr:"Turecki",vi:"Wietnamski",zh:"Chiński",he:"Hebrajski",fa:"Perski",ur:"Urdu",emailPlaceholderText:"Wprowadź adres e-mail",incrementValue:"Zwiększ wartość",decrementValue:"Zmniejsz wartość",dropZoneInstructions:e=>e?"Kliknij aby wybrać lub przeciągnij pliki tutaj, lub naciśnij Enter lub Spację, aby otworzyć selektor plików":"Przeciągnij pliki tutaj",fileSizeUnits:["Bajty","KB","MB","GB","TB"],removeFile:"Usuń plik",clearAllFiles:"Usuń wszystkie pliki",clearValue:"Wyczyść wartość",unknownType:"Nieznany typ",filesInputInstructions:(e,i,o)=>{let a=e==null||e>1?"Kliknij aby wybrać lub przeciągnij pliki tutaj":"Kliknij aby wybrać lub przeciągnij plik tutaj";if(e||i){const n=[];if(e!=null&&e>1&&n.push(`do ${e} plików`),i&&o){const l=r.formatFileSize(i,{units:o});n.push(`maks ${l} każdy`)}n.length>0&&(a+=` (${n.join(", ")})`)}return a},paginationLabel:"Paginacja",paginationRange:(e,i,o,a)=>a>o?`Wiersze ${e} do ${i} z ${o} z ${a}`:`Wiersze ${e} do ${i} z ${o}`,firstPage:"Pierwsza strona",previousPage:"Poprzednia strona",nextPage:"Następna strona",lastPage:"Ostatnia strona",breadcrumbs:"Nawigacja okruszkowa",commandPalette:"Paleta poleceń",typeACommand:"Wpisz polecenie...",noResultsFound:"Nie znaleziono wyników",noMatchingCommands:"Brak pasujących poleceń",appearanceSystem:"Systemowy",appearanceLight:"Jasny",appearanceDark:"Ciemny",ok:"OK",changeTypeConfirmation:"Zmiana typu wyczyści bieżącą wartość. Kontynuować?",notifications:"Powiadomienia",markAllAsRead:"Oznacz wszystkie jako przeczytane",noNotifications:"Brak powiadomień",schemaConflictsDetected:"Wykryto konflikty schematu",schemaViolationsDetected:"Wykryto naruszenia schematu",properties:"Właściwości",uploading:"Przesyłanie...",dropFilesOrBrowse:"Upuść pliki tutaj lub kliknij, aby przeglądać",acceptedTypes:e=>`Akceptowane typy: ${e}`,enterUrlPrompt:"Wprowadź URL:",exceeded:"(przekroczono)",pdfPreview:"Podgląd PDF",lexical:{fontFamily:"Krój czcionki",fontSize:"Rozmiar czcionki",lineHeight:"Wysokość linii",fontColor:"Kolor czcionki",highlightColor:"Kolor wyróżnienia",backgroundColor:"Kolor tła",bold:"Pogrubienie",italic:"Kursywa",underline:"Podkreślenie",strikethrough:"Przekreślenie",code:"Kod",clearFormatting:"Wyczyść formatowanie",normal:"Normalny",heading:e=>`Nagłówek ${e}`,bulletList:"Lista punktowana",orderedList:"Lista numerowana",checkList:"Lista kontrolna",indent:"Zwiększ wcięcie",outdent:"Zmniejsz wcięcie",blockquote:"Cytat blokowy",codeBlock:"Blok kodu",horizontalRule:"Linia pozioma",insertTable:"Wstaw tabelę",link:"Link",undo:"Cofnij",redo:"Ponów",cut:"Wytnij",copy:"Kopiuj",paste:"Wklej",defaultOption:"Domyślny",slashCommands:"Polecenia ukośnikowe",noCommandsFound:"Nie znaleziono poleceń",changeBlockType:"Zmień typ bloku",blockTypes:"Typy bloków",enterUrl:"Wprowadź URL:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},dataTable:{sortAscending:"Sortuj rosnąco",sortDescending:"Sortuj malejąco",clearSort:"Wyczyść sortowanie",filterPlaceholder:"Filtruj...",clearFilter:"Wyczyść filtr",selectAll:"Zaznacz wszystko",deselectAll:"Odznacz wszystko",selectedCount:e=>`${e} zaznaczonych`,resetAll:"Resetuj wszystko",noResults:"Nie znaleziono wyników",loading:"Ładowanie...",filterPanelAddCondition:"Dodaj warunek",filterPanelApply:"Zastosuj",filterPanelClear:"Wyczyść filtry",filterPanelAnd:"I",filterPanelOr:"LUB",filterPanelContains:"Zawiera",filterPanelNotContains:"Nie zawiera",filterPanelEquals:"Równe",filterPanelNotEquals:"Nierówne",filterPanelStartsWith:"Zaczyna się od",filterPanelEndsWith:"Kończy się na",filterPanelIsNull:"Jest pusty",filterPanelIsNotNull:"Nie jest pusty",filterPanelGt:"Większy niż",filterPanelGte:"Większy lub równy",filterPanelLt:"Mniejszy niż",filterPanelLte:"Mniejszy lub równy",filterPanelBetween:"Między",filterPanelValuePlaceholder:"Wartość...",sortMultiHint:"Przytrzymaj Shift, aby sortować według wielu kolumn",columnVisibility:"Kolumny",showAllColumns:"Pokaż wszystkie",menuSortAsc:"Sortuj rosnąco",menuSortDesc:"Sortuj malejąco",menuClearSort:"Wyczyść sortowanie",menuHideColumn:"Ukryj kolumnę",menuChooseColumns:"Wybierz kolumny",menuResetColumns:"Resetuj kolumny",menuFilter:"Filtruj",rowCount:(e,i)=>`Wiersze: ${e} Łącznie wierszy: ${i}`,filterTagsPlaceholder:"Wybierz wartości...",groupCount:e=>`${e} elementów`,collapseGroup:"Zwiń grupę",expandGroup:"Rozwiń grupę",describeFilter:{textContains:(e,i)=>`${e} zawiera "${i}"`,textNotContains:(e,i)=>`${e} nie zawiera "${i}"`,textEquals:(e,i)=>`${e} równe "${i}"`,textNotEquals:(e,i)=>`${e} nierówne "${i}"`,textStartsWith:(e,i)=>`${e} zaczyna się od "${i}"`,textEndsWith:(e,i)=>`${e} kończy się na "${i}"`,compareEq:(e,i)=>`${e} = ${i}`,compareNeq:(e,i)=>`${e} ≠ ${i}`,compareGt:(e,i)=>`${e} > ${i}`,compareGte:(e,i)=>`${e} ≥ ${i}`,compareLt:(e,i)=>`${e} < ${i}`,compareLte:(e,i)=>`${e} ≤ ${i}`,rangeBetween:(e,i,o)=>`${e} między ${i} a ${o}`,rangeGte:(e,i)=>`${e} ≥ ${i}`,rangeLte:(e,i)=>`${e} ≤ ${i}`,setIn:(e,i)=>`${e} w [${i}]`,setNotIn:(e,i)=>`${e} nie w [${i}]`,booleanIs:(e,i)=>`${e} jest ${i}`,isNull:e=>`${e} jest puste`,isNotNull:e=>`${e} nie jest puste`,compositeAnd:e=>e.join(" I "),compositeOr:e=>e.join(" LUB ")}},prosemirror:{bold:"Bold",italic:"Italic",code:"Code",link:"Link",removeLink:"Remove Link",heading:e=>`Heading ${e}`,bulletList:"Bullet List",orderedList:"Ordered List",blockquote:"Blockquote",codeBlock:"Code Block",horizontalRule:"Horizontal Rule",linkUrlPlaceholder:"https://example.com"},pdfPageViewer:{loading:"Ładowanie PDF...",loadFailed:"Nie udało się załadować PDF",invalidPdf:"Nieprawidłowy plik PDF",pageOutOfRange:(e,i)=>`Strona ${e} jest poza zakresem (1-${i})`,renderFailed:"Nie udało się wyrenderować strony PDF"}};exports.default=t;exports.pl=t;
@@ -1,4 +1,4 @@
1
- import { f as l } from "./translations-B96REXIk.js";
1
+ import { f as l } from "./translations-DT5QQ4WO.js";
2
2
  const s = {
3
3
  loadingExtended: "Ładowanie, proszę czekać",
4
4
  loadingShort: "Ładowanie...",