@oliasoft-open-source/react-ui-library 4.11.1 → 4.12.0-beta-2

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 (139) hide show
  1. package/dist/assets/{index-BpSdrNXy.css → index-BU9wzZv9.css} +336 -336
  2. package/dist/assets/{index-DoFa61ar.js → index-BVCFmQTa.js} +144 -164
  3. package/dist/index.d.ts +2 -6
  4. package/dist/index.html +1 -1
  5. package/dist/index.js +135 -132
  6. package/dist/index.js.map +1 -1
  7. package/dist/storybook/assets/{Color-KGDBMAHA-B3T0ILh4.js → Color-KGDBMAHA-BODMLRvZ.js} +1 -1
  8. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-CJgueRY3.js → DocsRenderer-PKQXORMH-DEi7ICVq.js} +1 -1
  9. package/dist/storybook/assets/{accordion.stories-Ctfewlsk.js → accordion.stories-C_Vx7GEC.js} +1 -1
  10. package/dist/storybook/assets/{actions-D-uVCDzk.js → actions-Bax0KeqM.js} +2 -2
  11. package/dist/storybook/assets/{actions.stories-gKfuiKQy.js → actions.stories-BnPZKqOJ.js} +1 -1
  12. package/dist/storybook/assets/{afe.stories-DM18uTAa.js → afe.stories-OEYJqexC.js} +1 -1
  13. package/dist/storybook/assets/{badge.stories-Dkq_XgEW.js → badge.stories-DA_eeQyi.js} +1 -1
  14. package/dist/storybook/assets/{blowout.stories-DHdofVc-.js → blowout.stories-DH-sYHgB.js} +1 -1
  15. package/dist/storybook/assets/button-Cbv7WK6k.js +1 -0
  16. package/dist/storybook/assets/button-DtgxLQCF.css +1 -0
  17. package/dist/storybook/assets/{button-group-1DEZPmxq.js → button-group-D2fGP_bX.js} +1 -1
  18. package/dist/storybook/assets/{button-group.stories-C4V1k0z_.js → button-group.stories-BETADGti.js} +1 -1
  19. package/dist/storybook/assets/{button.stories-DA9DGYD2.js → button.stories-C03VvX8K.js} +1 -1
  20. package/dist/storybook/assets/{buttons-and-links-BgjMT4gF.js → buttons-and-links-BHNS6Ebw.js} +1 -1
  21. package/dist/storybook/assets/{casing-loads.stories-Cc2cl9m1.js → casing-loads.stories-BAdZ87Oc.js} +1 -1
  22. package/dist/storybook/assets/{cell.stories-D8aQP2lw.js → cell.stories-Bu5u9qEl.js} +1 -1
  23. package/dist/storybook/assets/{chunk-HLWAVYOI-DW5riARI.js → chunk-HLWAVYOI-BbzmrmoZ.js} +1 -1
  24. package/dist/storybook/assets/{color-Cidw5dH_.js → color-oeF0-Pph.js} +1 -1
  25. package/dist/storybook/assets/{dialog-BelCA1mt.js → dialog-DkpQscuI.js} +1 -1
  26. package/dist/storybook/assets/drawer-BVc1xI9q.css +1 -0
  27. package/dist/storybook/assets/drawer-DaQ1xGjV.js +3 -0
  28. package/dist/storybook/assets/{drawer.stories-DcjyDHEs.js → drawer.stories-C08XBVTq.js} +1 -1
  29. package/dist/storybook/assets/{empty.stories-DcwF0pkK.js → empty.stories-L7LSMcLe.js} +1 -1
  30. package/dist/storybook/assets/{field.stories-DUGMwi1O.js → field.stories-CYpQ669-.js} +1 -1
  31. package/dist/storybook/assets/{file-button.stories-CU2pZcEO.js → file-button.stories-CRaTdLfv.js} +1 -1
  32. package/dist/storybook/assets/{file-input-B0-ERX66.js → file-input-yalPf7-m.js} +1 -1
  33. package/dist/storybook/assets/{file-input.stories-Cpd1NHbq.js → file-input.stories-DMTQqAF8.js} +1 -1
  34. package/dist/storybook/assets/{flex.stories-BhvJpHpN.js → flex.stories-CLwPyEMp.js} +1 -1
  35. package/dist/storybook/assets/{footer.stories-DcDOHTpf.js → footer.stories-LUxEpSgD.js} +1 -1
  36. package/dist/storybook/assets/{form.stories-BLcmnfy8.js → form.stories-B7V77yuI.js} +1 -1
  37. package/dist/storybook/assets/{formation.stories-D9xC_fJP.js → formation.stories-D7MX0dSY.js} +1 -1
  38. package/dist/storybook/assets/{iframe-BOQa8dKi.js → iframe-nuCPRPrd.js} +2 -2
  39. package/dist/storybook/assets/{index-IzFttIXx.js → index-BFtO1KgR.js} +88 -88
  40. package/dist/storybook/assets/{index-CqF2VcgG.js → index-CN6H1a0D.js} +1 -1
  41. package/dist/storybook/assets/{initialize-context-BvejO8yS.js → initialize-context-rEvM6bdZ.js} +1 -1
  42. package/dist/storybook/assets/input-Db9WkmPP.js +1 -0
  43. package/dist/storybook/assets/input-Dz1ZZYN5.css +1 -0
  44. package/dist/storybook/assets/{input-group.stories-EhmORqH9.js → input-group.stories-BdQ1prY4.js} +1 -1
  45. package/dist/storybook/assets/{input-validation-Barn85e8.js → input-validation-Ccu8WMpy.js} +1 -1
  46. package/dist/storybook/assets/{input.stories-FKl0qVhm.js → input.stories-SJy3TKkD.js} +1 -1
  47. package/dist/storybook/assets/{inputs-DhSTn98J.js → inputs-C4fsY4Ua.js} +1 -1
  48. package/dist/storybook/assets/{layout-forms-B7tboerR.js → layout-forms-DOgsanng.js} +1 -1
  49. package/dist/storybook/assets/{layout-general-IRBlgjFP.js → layout-general-DtDx77FI.js} +1 -1
  50. package/dist/storybook/assets/{list-bKpz6I9Q.js → list-By3wp5Wa.js} +1 -1
  51. package/dist/storybook/assets/{list.stories-Cgmt29Wv.js → list.stories-BcDHHHYJ.js} +1 -1
  52. package/dist/storybook/assets/{list.stories-data-D_Aj3AN4.js → list.stories-data-Doo2Rqun.js} +1 -1
  53. package/dist/storybook/assets/{loader.stories-pS8zRM4u.js → loader.stories-Q0U2BqZX.js} +1 -1
  54. package/dist/storybook/assets/{menu.stories-DLJSzJa-.js → menu.stories-1I5AGGQx.js} +1 -1
  55. package/dist/storybook/assets/menu.test-case.stories-W-jG-Jk8.js +3 -0
  56. package/dist/storybook/assets/message-BRyKdRaX.js +1 -0
  57. package/dist/storybook/assets/message-C2ZCkHX6.css +1 -0
  58. package/dist/storybook/assets/{message.stories-r_UlbshI.js → message.stories-bCqCYIuN.js} +1 -1
  59. package/dist/storybook/assets/meta-content-ByVTG0hd.css +1 -0
  60. package/dist/storybook/assets/meta-content-DNgQbAW0.js +9 -0
  61. package/dist/storybook/assets/{modal.stories-DOgeTuHT.js → modal.stories-DUXRRhK-.js} +1 -1
  62. package/dist/storybook/assets/modal.test-case.stories-Ci1WRYdo.js +21 -0
  63. package/dist/storybook/assets/{number-input-Dq8zEk7X.js → number-input-CNnU6gOF.js} +1 -1
  64. package/dist/storybook/assets/{number-input.stories-DUvn4L-Z.js → number-input.stories-Bo26PJmJ.js} +1 -1
  65. package/dist/storybook/assets/number-input.test-case.stories-CHGSaGbj.js +92 -0
  66. package/dist/storybook/assets/{option-dropdown.stories-CIvqMhQ3.js → option-dropdown.stories-CznUbXVi.js} +1 -1
  67. package/dist/storybook/assets/{padding-and-spacing-CZZN7tnu.js → padding-and-spacing-Mfm_1hn5.js} +1 -1
  68. package/dist/storybook/assets/{page.stories-DnCh8h8y.js → page.stories-DthnK8qb.js} +1 -1
  69. package/dist/storybook/assets/{pagination-DWc8zp3k.js → pagination-CoyQUC4R.js} +1 -1
  70. package/dist/storybook/assets/{pagination.stories-B5cOvzik.js → pagination.stories-qfpnU8DC.js} +1 -1
  71. package/dist/storybook/assets/{pop-confirm.stories-DCpooB2O.js → pop-confirm.stories-CHa0qUBe.js} +1 -1
  72. package/dist/storybook/assets/{popover-rq33c1W2.js → popover-C_2P8LFJ.js} +1 -1
  73. package/dist/storybook/assets/{popover.stories-p9_-pH_Q.js → popover.stories-TwNkFkWa.js} +1 -1
  74. package/dist/storybook/assets/{preview-Bb6CWa9a.js → preview-BIv_KaBF.js} +2 -2
  75. package/dist/storybook/assets/{preview-u3mhrMoU.js → preview-DVjsIOwK.js} +1 -1
  76. package/dist/storybook/assets/{projects.stories-Co_WnKSx.js → projects.stories-BPm6ucAe.js} +1 -1
  77. package/dist/storybook/assets/{reservoirs.stories-UW_8sofe.js → reservoirs.stories-DE9FrS0f.js} +1 -1
  78. package/dist/storybook/assets/{rich-text-input-dDjxXFl-.css → rich-text-input-BJfL0Me_.css} +1 -1
  79. package/dist/storybook/assets/{rich-text-input.stories-CK_OTGiV.js → rich-text-input.stories-BNwcnp92.js} +4 -4
  80. package/dist/storybook/assets/{row.stories-D1iDHHxo.js → row.stories-D3Bnp8i4.js} +1 -1
  81. package/dist/storybook/assets/select-BQzJMnK1.js +61 -0
  82. package/dist/storybook/assets/select-BmYXTl_0.css +1 -0
  83. package/dist/storybook/assets/{select.stories-Bpffz9TF.js → select.stories-BRGk9iYK.js} +1 -1
  84. package/dist/storybook/assets/select.test-case.stories-BYMK9M8u.js +82 -0
  85. package/dist/storybook/assets/side-bar-fBbBqyAT.css +1 -0
  86. package/dist/storybook/assets/side-bar-wpFQ5NEE.js +24 -0
  87. package/dist/storybook/assets/{side-bar.stories-M6FsuCrQ.js → side-bar.stories-LjClxJcG.js} +1 -1
  88. package/dist/storybook/assets/{site.stories-ZGohyW6Z.js → site.stories-BnWmALGd.js} +1 -1
  89. package/dist/storybook/assets/{slider-C7vnj_3M.js → slider-CcpE4BLD.js} +1 -1
  90. package/dist/storybook/assets/{slider.stories-BzBb3PkP.js → slider.stories-BqlRLY_C.js} +1 -1
  91. package/dist/storybook/assets/{smart-upload-modal.stories-xqiXR6jV.js → smart-upload-modal.stories-BlTSF64K.js} +1 -1
  92. package/dist/storybook/assets/{spacer.stories-BBTt2LdE.js → spacer.stories-BT2S6B0R.js} +1 -1
  93. package/dist/storybook/assets/table-BtBtDwPu.css +1 -0
  94. package/dist/storybook/assets/table-DPbEkZqw.js +86 -0
  95. package/dist/storybook/assets/{table.stories-oLm8-Sg3.js → table.stories-BBzqpsyH.js} +1 -1
  96. package/dist/storybook/assets/{table.stories-data-C3vJedB1.js → table.stories-data-C7mC5R8Q.js} +1 -1
  97. package/dist/storybook/assets/{textarea-D6ltcKhz.js → textarea-DflOOrxV.js} +2 -2
  98. package/dist/storybook/assets/textarea-TqxidmV4.css +1 -0
  99. package/dist/storybook/assets/{textarea.stories-CJ-Oqytp.js → textarea.stories-CzsqRVpC.js} +1 -1
  100. package/dist/storybook/assets/{title.stories-iTXgnNqS.js → title.stories-B4PYbA22.js} +1 -1
  101. package/dist/storybook/assets/{toaster-BoBcvmf9.js → toaster-O8ftrUAJ.js} +1 -1
  102. package/dist/storybook/assets/{toaster.stories-G6nKp3uV.js → toaster.stories-CdpwLBSo.js} +1 -1
  103. package/dist/storybook/assets/toaster.test-case.stories-Cy3_Gvs_.js +6 -0
  104. package/dist/storybook/assets/{tooltip.test-case.stories-C0wxGvKJ.js → tooltip.test-case.stories-De9h8ThH.js} +1 -1
  105. package/dist/storybook/assets/{top-bar-DkXSzzqt.js → top-bar-Bjf6PQE1.js} +1 -1
  106. package/dist/storybook/assets/{top-bar.stories-HDmWT243.js → top-bar.stories-1hZmlzDT.js} +1 -1
  107. package/dist/storybook/assets/{top-bar.testcase.stories-DfmrkEpT.js → top-bar.testcase.stories-BsFYqaw6.js} +1 -1
  108. package/dist/storybook/assets/{tree.stories-feLUcTtm.js → tree.stories-NGZfmH_B.js} +1 -1
  109. package/dist/storybook/assets/{unit-input-DZs3wEdY.js → unit-input-Byipu-z0.js} +1 -1
  110. package/dist/storybook/assets/{unit-input.stories-BRl4TnIK.js → unit-input.stories-CChVbxmI.js} +1 -1
  111. package/dist/storybook/assets/{unit-input.test-case.stories-xWsKGi4p.js → unit-input.test-case.stories-BeFM9DuK.js} +3 -3
  112. package/dist/storybook/assets/{unit-table.stories-C4AcKcPO.js → unit-table.stories-9x5S71wv.js} +1 -1
  113. package/dist/storybook/assets/{unit-table.test-case.stories-Do8WFzxy.js → unit-table.test-case.stories-DZJ-hZ72.js} +1 -1
  114. package/dist/storybook/iframe.html +1 -1
  115. package/dist/storybook/project.json +1 -1
  116. package/package.json +1 -1
  117. package/dist/404.html +0 -1
  118. package/dist/storybook/assets/button-DHevvVBE.js +0 -1
  119. package/dist/storybook/assets/button-fAxt_G4d.css +0 -1
  120. package/dist/storybook/assets/drawer-DOWJp9T4.js +0 -3
  121. package/dist/storybook/assets/drawer-DhrjYsQu.css +0 -1
  122. package/dist/storybook/assets/input-DD7t4kHm.css +0 -1
  123. package/dist/storybook/assets/input-DTXbDJaL.js +0 -1
  124. package/dist/storybook/assets/menu.test-case.stories-DyrNbGBs.js +0 -3
  125. package/dist/storybook/assets/message-Cl3kn7ZD.css +0 -1
  126. package/dist/storybook/assets/message-Y48EomV-.js +0 -1
  127. package/dist/storybook/assets/meta-content-DWZbURV2.js +0 -9
  128. package/dist/storybook/assets/meta-content-DnZPPeTF.css +0 -1
  129. package/dist/storybook/assets/modal.test-case.stories-DQ1Izuq6.js +0 -21
  130. package/dist/storybook/assets/number-input.test-case.stories-C6CDA2a8.js +0 -92
  131. package/dist/storybook/assets/select-03uRbc4I.js +0 -61
  132. package/dist/storybook/assets/select-H-9tdhwc.css +0 -1
  133. package/dist/storybook/assets/select.test-case.stories-DwDNDHax.js +0 -82
  134. package/dist/storybook/assets/side-bar-CSx5wI-k.js +0 -24
  135. package/dist/storybook/assets/side-bar-auov230-.css +0 -1
  136. package/dist/storybook/assets/table-B8ojy8Nj.css +0 -1
  137. package/dist/storybook/assets/table-Cw1-vdpR.js +0 -86
  138. package/dist/storybook/assets/textarea-H-YTEwr8.css +0 -1
  139. package/dist/storybook/assets/toaster.test-case.stories-CCHTh_U1.js +0 -6
@@ -1,4 +1,4 @@
1
- var Of=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Mf=(t,e,n)=>e in t?Of(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Mf(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as Ne,r as z}from"./index-DhsZuJvc.js";import{D as _f}from"./disabled-context-rmpd7YJS.js";import{C as Nf}from"./common-types-Sih75Sav.js";import{B as Ou}from"./button-DHevvVBE.js";import{r as Af}from"./index-CUZDtIZe.js";import{S as Rf}from"./select-03uRbc4I.js";import"./index-Bk2sglWO.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./lodash-c4VUpsOs.js";import"./types-Dx2TtIG9.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-D-uVCDzk.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";var Co={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,s=Error.captureStackTrace;s===void 0&&(s=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(c,"stack",{configurable:!0,value:h,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),s(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var o=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},o!==void 0&&(o(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(Co,Co.exports);var Mu=Co.exports,il="ProseMirror-selectednode",da="",Kt="\0",ol="__state_override__",If={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},j=If,It=Symbol.for("__remirror__"),xe=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(xe||{}),Y=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(Y||{}),Pe=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(Pe||{}),E=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(E||{}),b=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(b||{}),Df=function(e){return Pf(e)&&!Lf(e)};function Pf(t){return!!t&&typeof t=="object"}function Lf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||$f(t)}var Bf=typeof Symbol=="function"&&Symbol.for,zf=Bf?Symbol.for("react.element"):60103;function $f(t){return t.$$typeof===zf}function Ff(t){return Array.isArray(t)?[]:{}}function ss(t,e){return e.clone!==!1&&e.isMergeableObject(t)?sr(Ff(t),t,e):t}function Vf(t,e,n){return t.concat(e).map(function(r){return ss(r,n)})}function Hf(t,e){if(!e.customMerge)return sr;var n=e.customMerge(t);return typeof n=="function"?n:sr}function Uf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function al(t){return Object.keys(t).concat(Uf(t))}function _u(t,e){try{return e in t}catch{return!1}}function jf(t,e){return _u(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Wf(t,e,n){var r={};return n.isMergeableObject(t)&&al(t).forEach(function(s){r[s]=ss(t[s],n)}),al(e).forEach(function(s){jf(t,s)||(_u(t,s)&&n.isMergeableObject(e[s])?r[s]=Hf(s,n)(t[s],e[s],n):r[s]=ss(e[s],n))}),r}function sr(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||Vf,n.isMergeableObject=n.isMergeableObject||Df,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):Wf(t,e,n):ss(e,n)}sr.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return sr(r,s,n)},{})};var Kf=sr,qf=Kf;const Jf=Ai(qf);/*!
1
+ var Of=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Mf=(t,e,n)=>e in t?Of(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Mf(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as Ne,r as z}from"./index-DhsZuJvc.js";import{D as _f}from"./disabled-context-rmpd7YJS.js";import{C as Nf}from"./common-types-Sih75Sav.js";import{B as Ou}from"./button-Cbv7WK6k.js";import{r as Af}from"./index-CUZDtIZe.js";import{S as Rf}from"./select-BQzJMnK1.js";import"./index-Bk2sglWO.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./lodash-c4VUpsOs.js";import"./types-Dx2TtIG9.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-Bax0KeqM.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";var Co={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,s=Error.captureStackTrace;s===void 0&&(s=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(c,"stack",{configurable:!0,value:h,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),s(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var o=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},o!==void 0&&(o(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(Co,Co.exports);var Mu=Co.exports,il="ProseMirror-selectednode",da="",Kt="\0",ol="__state_override__",If={LastNodeCompatible:"lastNodeCompatible",FormattingMark:"formattingMark",FormattingNode:"formattingNode",NodeCursor:"nodeCursor",FontStyle:"fontStyle",Link:"link",Color:"color",Alignment:"alignment",Indentation:"indentation",Behavior:"behavior",Code:"code",InlineNode:"inline",ListContainerNode:"listContainer",ListItemNode:"listItemNode",Block:"block",BlockNode:"block",TextBlock:"textBlock",ExcludeInputRules:"excludeFromInputRules",PreventExits:"preventsExits",Media:"media"},j=If,It=Symbol.for("__remirror__"),xe=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(xe||{}),Y=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(Y||{}),Pe=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(Pe||{}),E=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(E||{}),b=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(b||{}),Df=function(e){return Pf(e)&&!Lf(e)};function Pf(t){return!!t&&typeof t=="object"}function Lf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||$f(t)}var Bf=typeof Symbol=="function"&&Symbol.for,zf=Bf?Symbol.for("react.element"):60103;function $f(t){return t.$$typeof===zf}function Ff(t){return Array.isArray(t)?[]:{}}function ss(t,e){return e.clone!==!1&&e.isMergeableObject(t)?sr(Ff(t),t,e):t}function Vf(t,e,n){return t.concat(e).map(function(r){return ss(r,n)})}function Hf(t,e){if(!e.customMerge)return sr;var n=e.customMerge(t);return typeof n=="function"?n:sr}function Uf(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function al(t){return Object.keys(t).concat(Uf(t))}function _u(t,e){try{return e in t}catch{return!1}}function jf(t,e){return _u(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Wf(t,e,n){var r={};return n.isMergeableObject(t)&&al(t).forEach(function(s){r[s]=ss(t[s],n)}),al(e).forEach(function(s){jf(t,s)||(_u(t,s)&&n.isMergeableObject(e[s])?r[s]=Hf(s,n)(t[s],e[s],n):r[s]=ss(e[s],n))}),r}function sr(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||Vf,n.isMergeableObject=n.isMergeableObject||Df,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):Wf(t,e,n):ss(e,n)}sr.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return sr(r,s,n)},{})};var Kf=sr,qf=Kf;const Jf=Ai(qf);/*!
2
2
  * isobject <https://github.com/jonschlinkert/isobject>
3
3
  *
4
4
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -178,12 +178,12 @@ ${t}</ul>
178
178
  `:`<li>${t}</li>
179
179
  `}}});function hw(t,e){const n=N(t,{gfm:!0,smartLists:!0,xhtml:!0});return e?e(n):n}var yr=class extends te{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Dt.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let s=this.options.markdownToHtml(t,this.options.htmlSanitizer);s=!(e!=null&&e.alwaysWrapInBlock)&&s.startsWith("<p><")&&s.endsWith(`</p>
180
180
  `)?s.slice(3,-5):`<div>${s}</div>`;const i=this.store.stringHandlers.html({content:s,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Gi([_()],yr.prototype,"insertMarkdown",1);Gi([se()],yr.prototype,"getMarkdown",1);Gi([_()],yr.prototype,"toggleBoldMarkdown",1);yr=Gi([G({defaultOptions:{htmlToMarkdown:cw,markdownToHtml:hw,htmlSanitizer:void 0,activeNodes:[j.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],yr);var fw=Object.defineProperty,pw=Object.getOwnPropertyDescriptor,Xi=(t,e,n,r)=>{for(var s=r>1?void 0:r?pw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&fw(e,n,s),s},mw={icon:"paragraph",label:({t})=>t(hi.INSERT_LABEL),description:({t})=>t(hi.INSERT_DESCRIPTION)},gw={icon:"paragraph",label:({t})=>t(hi.CONVERT_LABEL),description:({t})=>t(hi.CONVERT_DESCRIPTION)},Pn=class extends Pt{get name(){return"paragraph"}createTags(){return[j.LastNodeCompatible,j.TextBlock,j.Block,j.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Xi([_(gw)],Pn.prototype,"convertParagraph",1);Xi([_(mw)],Pn.prototype,"insertParagraph",1);Xi([Ye({shortcut:E.Paragraph,command:"convertParagraph"})],Pn.prototype,"shortcut",1);Pn=Xi([G({defaultPriority:Y.Medium})],Pn);var yw=Object.defineProperty,xw=Object.getOwnPropertyDescriptor,bw=(t,e,n,r)=>{for(var s=r>1?void 0:r?xw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&yw(e,n,s),s},un=class extends te{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Ia(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>kw({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>Sw({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=Pe.EditorView&&this.store.updateAttributes()}};un=bw([G({defaultOptions:{emptyNodeClass:F1.IS_EMPTY,placeholder:""}})],un);function kw(t){const{pluginState:e,extension:n,tr:r,state:s}=t;return r.docChanged?{...n.options,empty:Ia(s.doc)}:e}function Sw(t){const{extension:e,state:n}=t,{empty:r}=e.pluginKey.getState(n),{emptyNodeClass:s,placeholder:i}=e.options;if(!r)return null;const o=[];return n.doc.descendants((a,l)=>{const c=Q.node(l,l+a.nodeSize,{class:s,"data-placeholder":i});o.push(c)}),W.create(n.doc,o)}var ww=Object.defineProperty,vw=Object.getOwnPropertyDescriptor,Ew=(t,e,n,r)=>{for(var s=r>1?void 0:r?vw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&ww(e,n,s),s},aa=class extends Pt{get name(){return"text"}createTags(){return[j.InlineNode]}createNodeSpec(){return{}}};aa=Ew([G({disableExtraAttributes:!0,defaultPriority:Y.Medium})],aa);var Cw={...pr.defaultOptions,...Pn.defaultOptions,...kt.defaultOptions,excludeExtensions:[]};function Tw(t={}){t={...Cw,...t};const{content:e,depth:n,getDispatch:r,getState:s,newGroupDelay:i,excludeExtensions:o}=t,a={};for(const c of o??[])a[c]=!0;const l=[];if(!a.history){const c=new kt({depth:n,getDispatch:r,getState:s,newGroupDelay:i});l.push(c)}return a.doc||l.push(new pr({content:e})),a.text||l.push(new aa),a.paragraph||l.push(new Pn),a.positioner||l.push(new ms),a.gapCursor||l.push(new sa),a.events||l.push(new wi),l}var Ow=Object.defineProperty,Mw=Object.getOwnPropertyDescriptor,_w=(t,e,n,r)=>{for(var s=r>1?void 0:r?Mw(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&Ow(e,n,s),s},ff=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},O=(t,e,n)=>(ff(t,e,"read from private field"),n?n.call(t):e.get(t)),je=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},He=(t,e,n,r)=>(ff(t,e,"write to private field"),e.set(t,n),n),jr,Nw=class{constructor(){this.portals=new Map,je(this,jr,ji()),this.on=t=>O(this,jr).on("update",t),this.once=t=>{const e=O(this,jr).on("update",n=>{e(),t(n)});return e}}update(){O(this,jr).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??si()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:si()})}remove(t){this.portals.delete(t),this.update()}};jr=new WeakMap;var Aw=t=>{const{portals:e}=t;return Ne.createElement(Ne.Fragment,null,e.map(([n,{Component:r,key:s}])=>Af.createPortal(Ne.createElement(r,null),n,s)))};function Rw(t){const[e,n]=z.useState(()=>Array.from(t.portals.entries()));return z.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),z.useMemo(()=>e,[e])}var ne,Wr,yn,Kr,Qs,qr,Jn,Jr,ei,Et,_e,la,pf=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:s,options:i}){je(this,ne,void 0),je(this,Wr,[]),je(this,yn,void 0),je(this,Kr,void 0),je(this,Qs,void 0),je(this,qr,void 0),je(this,Jn,void 0),je(this,Jr,!1),je(this,ei,void 0),je(this,Et,void 0),je(this,_e,void 0),je(this,la,l=>{l&&(R(O(this,Et),{code:b.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${O(this,ne).type.name}' which doesn't support content.`}),l.append(O(this,Et)))}),this.Component=()=>{const l=O(this,Qs);return R(l,{code:b.REACT_NODE_VIEW,message:`The custom react node view provided for ${O(this,ne).type.name} doesn't have a valid ReactComponent`}),Ne.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:O(this,yn),getPosition:O(this,qr),node:O(this,ne),forwardRef:O(this,la),decorations:O(this,Wr)})},this.updateAttributes=l=>{if(!O(this,yn).editable)return;const c=O(this,qr).call(this);if(c==null)return;const u=O(this,yn).state.tr.setNodeMarkup(c,void 0,{...O(this,ne).attrs,...l});O(this,yn).dispatch(u)},R(ee(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),He(this,ne,e),He(this,yn,r),He(this,Kr,n),He(this,Qs,s),He(this,qr,t),He(this,Jn,i),He(this,_e,this.createDom());const{contentDOM:o,wrapper:a}=this.createContentDom()??{};He(this,ei,o??void 0),He(this,Et,a),O(this,Et)&&O(this,_e).append(O(this,Et)),this.setDomAttributes(O(this,ne),O(this,_e)),this.Component.displayName=Du(`${O(this,ne).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(s,i,o)=>new pf({options:r,node:s,view:i,getPosition:o,portalContainer:e,ReactComponent:n})}get selected(){return O(this,Jr)}get contentDOM(){return O(this,ei)}get dom(){return O(this,_e)}renderComponent(){O(this,Kr).render({Component:this.Component,container:O(this,_e)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=O(this,Jn),n=O(this,ne).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${cl(O(this,ne).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(O(this,ne).isLeaf)return;const n=(e=(t=O(this,ne).type.spec).toDOM)==null?void 0:e.call(t,O(this,ne));if(!n)return;const{contentDOM:r,dom:s}=Dt.renderSpec(document,n);let i;if($e(s))return i=s,s===r&&(i=document.createElement("span"),i.classList.add(`${cl(O(this,ne).type.name)}-node-view-content-wrapper`),i.append(r)),$e(r),{wrapper:i,contentDOM:r}}update(t,e){return Na({types:O(this,ne).type,node:t})?(O(this,ne)===t&&O(this,Wr)===e||(O(this,ne).sameMarkup(t)||this.setDomAttributes(t,O(this,_e)),He(this,ne,t),He(this,Wr,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=O(this,ne).type.spec;let r=t.attrs;if(n){const s=n(t);if(P(s)||Iw(s))return;Ln(s[1])&&(r=s[1])}for(const[s,i]of fe(r))e.setAttribute(s,i)}selectNode(){He(this,Jr,!0),O(this,_e)&&O(this,_e).classList.add(il),this.renderComponent()}deselectNode(){He(this,Jr,!1),O(this,_e)&&O(this,_e).classList.remove(il),this.renderComponent()}destroy(){O(this,Kr).remove(O(this,_e))}ignoreMutation(t){return t.type==="selection"?!O(this,ne).type.spec.selectable:O(this,Et)?!O(this,Et).contains(t.target):!0}stopEvent(t){var e;if(!O(this,_e))return!1;if(ee(O(this,Jn).stopEvent))return O(this,Jn).stopEvent({event:t});const n=t.target;if(!(O(this,_e).contains(n)&&!((e=this.contentDOM)!=null&&e.contains(n))))return!1;const s=t.type==="drop";if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!s)return!0;const o=!!O(this,ne).type.spec.draggable,a=I.isSelectable(O(this,ne)),l=t.type==="copy",c=t.type==="paste",u=t.type==="cut",d=t.type==="mousedown",h=t.type.startsWith("drag");return!o&&a&&h&&t.preventDefault(),!(h||s||l||c||u||d&&a)}},Xc=pf;ne=new WeakMap;Wr=new WeakMap;yn=new WeakMap;Kr=new WeakMap;Qs=new WeakMap;qr=new WeakMap;Jn=new WeakMap;Jr=new WeakMap;ei=new WeakMap;Et=new WeakMap;_e=new WeakMap;la=new WeakMap;function Iw(t){return Wo(t)||Ln(t)&&Wo(t.dom)}var ks=class extends te{constructor(){super(...arguments),this.portalContainer=new Nw}get name(){return"reactComponent"}onCreate(){this.store.setStoreKey("portalContainer",this.portalContainer)}createNodeViews(){const t=M(),e=this.store.managerSettings.nodeViewComponents??{};for(const r of this.store.extensions)!r.ReactComponent||!_s(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=Xc.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=fe({...this.options.nodeViewComponents,...e});for(const[r,s]of n)t[r]=Xc.create({options:this.options,ReactComponent:s,portalContainer:this.portalContainer});return t}};ks=_w([G({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ks);var Dw=Object.defineProperty,Yc=Object.getOwnPropertySymbols,Pw=Object.prototype.hasOwnProperty,Lw=Object.prototype.propertyIsEnumerable,Zc=(t,e,n)=>e in t?Dw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Qc=(t,e)=>{for(var n in e||(e={}))Pw.call(e,n)&&Zc(t,n,e[n]);if(Yc)for(var n of Yc(e))Lw.call(e,n)&&Zc(t,n,e[n]);return t};function Bw(t){const e=z.createContext(null),n=zw(e);return[s=>{const i=t(s);return Ne.createElement(e.Provider,{value:i},s.children)},n,e]}function zw(t){return(e,n)=>{const r=z.useContext(t),s=$w(r);if(!r)throw new Error("`useContextHook` must be placed inside the `Provider` returned by the `createContextState` method");if(!e)return r;if(typeof e!="function")throw new TypeError("invalid arguments passed to `useContextHook`. This hook must be called with zero arguments, a getter function or a path string.");const i=e(r);if(!s||!n)return i;const o=e(s);return n(o,i)?o:i}}function $w(t){const e=z.useRef();return Fw(()=>{e.current=t}),e.current}var Fw=typeof document<"u"?z.useLayoutEffect:z.useEffect;function Vw(t,e){return Bw(n=>{const r=z.useRef(null),s=z.useRef(),i=void 0,[o,a]=z.useState(()=>t({get:eu(r),set:tu(s),previousContext:void 0,props:n,state:i})),l=[...Object.values(n),i];return z.useEffect(()=>{l.length!==0&&a(c=>t({get:eu(r),set:tu(s),previousContext:c,props:n,state:i}))},l),r.current=o,s.current=a,o})}function eu(t){return e=>{if(!t.current)throw new Error("`get` called outside of function scope. `get` can only be called within a function.");if(!e)return t.current;if(typeof e!="function")throw new TypeError("Invalid arguments passed to `useContextHook`. The hook must be called with zero arguments, a getter function or a path string.");return e(t.current)}}function tu(t){return e=>{if(!t.current)throw new Error("`set` called outside of function scope. `set` can only be called within a function.");t.current(n=>Qc(Qc({},n),typeof e=="function"?e(n):e))}}var mf={},gf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.errorMessages=t.ErrorType=void 0;var e;(function(n){n.MalformedUnicode="MALFORMED_UNICODE",n.MalformedHexadecimal="MALFORMED_HEXADECIMAL",n.CodePointLimit="CODE_POINT_LIMIT",n.OctalDeprecation="OCTAL_DEPRECATION",n.EndOfString="END_OF_STRING"})(e=t.ErrorType||(t.ErrorType={})),t.errorMessages=new Map([[e.MalformedUnicode,"malformed Unicode character escape sequence"],[e.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[e.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[e.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[e.EndOfString,"malformed escape sequence at end of string"]])})(gf);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=gf;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,m){const g=n(f);if(Number.isNaN(g)||m!==void 0&&m!==f.length)throw new SyntaxError(e.errorMessages.get(p));return g}function s(f){const p=r(f,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const m=r(f,e.ErrorType.MalformedUnicode,4);if(p!==void 0){const g=r(p,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,g)}return String.fromCharCode(m)}function o(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function a(f){if(!o(f))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const p=f.slice(1,-1),m=r(p,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(g){throw g instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):g}}function l(f,p=!1){if(p)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const m=parseInt(f,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",`
181
- `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(mf);const _n=t=>typeof t=="string",Hw=t=>typeof t=="function",nu=new Map,yf="en";function tl(t){return[...Array.isArray(t)?t:[t],yf]}function xf(t,e,n){const r=tl(t);return _i(()=>Ni("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(_n(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return _i(()=>Ni("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function ru(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?_i(()=>Ni("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):_i(()=>Ni("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function _i(t,e){const n=t();let r=nu.get(n);return r||(r=e(),nu.set(n,r)),r}function Ni(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const bf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,kf="%__lingui_octothorpe__%",Uw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(kf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=ru(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=ru(r,!0,o,a);return i(o-l,c)},select:jw,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>xf(r,o,s(a))}},jw=(t,e)=>e[t]??e.other;function Ww(t,e,n){return(r={},s)=>{const i=Uw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+kf;if(_n(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return _n(a)&&bf.test(a)?mf.unraw(a.trim()):_n(a)?a.trim():a?String(a):""}}var Kw=Object.defineProperty,qw=(t,e,n)=>e in t?Kw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jw=(t,e,n)=>(qw(t,e+"",n),n);class Gw{constructor(){Jw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Xw=Object.defineProperty,Yw=(t,e,n)=>e in t?Xw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Yw(t,typeof e!="symbol"?e+"":e,n),n);class Zw extends Gw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??yf,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),_n(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Hw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return _n(l)&&bf.test(l)?JSON.parse(`"${l}"`):_n(l)?l:Ww(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return xf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Qw(t={}){return new Zw(t)}const Yi=Qw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const ev=K,tv=S,nv=Lt;function rv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const sv=S;function iv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function ov(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function av(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const lv=S,cv=Fe;function uv(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-1),i=r.slice(-2),o=r.slice(-3);return e?s==1||s==2||s==5||s==7||s==8||i==20||i==50||i==70||i==80?"one":s==3||s==4||o==100||o==200||o==300||o==400||o==500||o==600||o==700||o==800||o==900?"few":r==0||s==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function dv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(s==2||s==3)&&i!=12&&i!=13?"few":"other":s==1&&i!=11?"one":s>=2&&s<=4&&(i<12||i>14)?"few":r&&s==0||s>=5&&s<=9||i>=11&&i<=14?"many":"other"}const hv=S,fv=S,pv=S,mv=Lt,gv=K;function yv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const xv=K;function bv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return e?"other":s==1&&i!=11&&i!=71&&i!=91?"one":s==2&&i!=12&&i!=72&&i!=92?"two":(s==3||s==4||s==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&o==0?"many":"other"}const kv=S;function Sv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function wv(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const vv=S;function Ev(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Cv=S,Tv=S,Ov=S;function Mv(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function _v(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Nv(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return e?"other":t==1||!s&&(r==0||r==1)?"one":"other"}const Av=Fe;function Rv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}const Iv=S,Dv=K,Pv=S,Lv=S;function Bv(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?i==1&&o!=11?"one":i==2&&o!=12?"two":i==3&&o!=13?"few":"other":t==1&&r?"one":"other"}const zv=S,$v=S,Fv=Fe,Vv=S;function Hv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function Uv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const jv=Fe;function Wv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Kv=S;function qv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Jv=S,Gv=Fe;function Xv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Yv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const Zv=Fe,Qv=S;function eE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const tE=Lt;function nE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(o==0||o==20||o==40||o==60||o==80)?"few":s?"other":"many"}const rE=S,sE=S;function iE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}function oE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function aE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function lE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}function cE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function uE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const dE=Fe,hE=K,fE=K,pE=K,mE=Fe;function gE(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t,i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11||!s?"one":"other"}function yE(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const xE=fn;function bE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}const kE=K,SE=K,wE=S,vE=Fe,EE=S,CE=K,TE=K;function OE(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-2);return e?r==1?"one":r==0||s>=2&&s<=20||s==40||s==60||s==80?"many":"other":t==1?"one":"other"}function ME(t,e){return e?"other":t>=0&&t<2?"one":"other"}const _E=S,NE=S,AE=K,RE=K;function IE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||r&&s==0&&t!=0?"many":"other":t==1?"one":"other"}const DE=S,PE=S,LE=K;function BE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const zE=K,$E=S,FE=S;function VE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const HE=S;function UE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2),i=r&&n[0].slice(-3),o=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||s>=1&&s<=4||s>=21&&s<=24||s>=41&&s<=44||s>=61&&s<=64||s>=81&&s<=84?"one":t==5||s==5?"many":"other":t==0?"zero":t==1?"one":s==2||s==22||s==42||s==62||s==82||r&&i==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||t!=0&&a==1e5?"two":s==3||s==23||s==43||s==63||s==83?"few":t!=1&&(s==1||s==21||s==41||s==61||s==81)?"many":"other"}const jE=S;function WE(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const KE=S,qE=S,JE=K,GE=Lt;function XE(t,e){return e&&t==1?"one":"other"}function YE(t,e){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?"other":i==1&&(o<11||o>19)?"one":i>=2&&i<=9&&(o<11||o>19)?"few":r!=0?"many":"other"}function ZE(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const QE=S,eC=Lt,tC=S;function nC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?o==1&&a!=11?"one":o==2&&a!=12?"two":(o==7||o==8)&&a!=17&&a!=18?"many":"other":i&&o==1&&a!=11||l==1&&c!=11?"one":"other"}const rC=S,sC=S;function iC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function oC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function aC(t,e){return e&&t==1?"one":"other"}function lC(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||s>=2&&s<=10?"few":s>=11&&s<=19?"many":"other"}const cC=K,uC=S,dC=fn,hC=S,fC=S;function pC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const mC=Fe,gC=S,yC=S,xC=S,bC=K,kC=S,SC=Lt,wC=S,vC=S,EC=S;function CC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const TC=S,OC=K,MC=Lt,_C=S;function NC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":t==1&&s?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&r!=1&&(i==0||i==1)||s&&i>=5&&i<=9||s&&o>=12&&o<=14?"many":"other"}function AC(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const RC=S;function IC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const DC=Fe,PC=S;function LC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const BC=S,zC=K;function $C(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&i==0||s&&i>=5&&i<=9||s&&o>=11&&o<=14?"many":"other"}const FC=S,VC=K,HC=S;function UC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function jC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const WC=S,KC=S,qC=fn,JC=S,GC=K,XC=K;function YC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function ZC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function QC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"";return e?"other":t==0||t==1||r==0&&s==1?"one":"other"}function eT(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function tT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(i==3||i==4)||!s?"few":"other"}const nT=fn,rT=fn,sT=fn,iT=fn,oT=fn,aT=S,lT=S;function cT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":s==4&&i!=14?"many":"other":t==1?"one":"other"}function uT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const dT=S,hT=S,fT=S,pT=K;function mT(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?(i==1||i==2)&&o!=11&&o!=12?"one":"other":t==1&&r?"one":"other"}const gT=Fe,yT=S,xT=S,bT=S,kT=S,ST=K,wT=Lt,vT=S;function ET(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||t==10?"few":"other":t==1?"one":"other"}function CT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const TT=S,OT=K,MT=S,_T=S;function NT(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const AT=S;function RT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return e?o==3&&a!=13?"few":"other":s&&l==1&&c!=11?"one":s&&l>=2&&l<=4&&(c<12||c>14)?"few":s&&l==0||s&&l>=5&&l<=9||s&&c>=11&&c<=14?"many":"other"}const IT=Fe,DT=S,PT=S;function LT(t,e){return e&&t==1?"one":"other"}const BT=S,zT=S,$T=Lt,FT=S,VT=K,HT=S,UT=S,jT=Fe,WT=K,KT=K,qT=K;function JT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const GT=Object.freeze(Object.defineProperty({__proto__:null,_in:ev,af:tv,ak:nv,am:rv,an:sv,ar:iv,ars:ov,as:av,asa:lv,ast:cv,az:uv,be:dv,bem:hv,bez:fv,bg:pv,bho:mv,bm:gv,bn:yv,bo:xv,br:bv,brx:kv,bs:Sv,ca:wv,ce:vv,ceb:Ev,cgg:Cv,chr:Tv,ckb:Ov,cs:Mv,cy:_v,da:Nv,de:Av,dsb:Rv,dv:Iv,dz:Dv,ee:Pv,el:Lv,en:Bv,eo:zv,es:$v,et:Fv,eu:Vv,fa:Hv,ff:Uv,fi:jv,fil:Wv,fo:Kv,fr:qv,fur:Jv,fy:Gv,ga:Xv,gd:Yv,gl:Zv,gsw:Qv,gu:eE,guw:tE,gv:nE,ha:rE,haw:sE,he:iE,hi:oE,hr:aE,hsb:lE,hu:cE,hy:uE,ia:dE,id:hE,ig:fE,ii:pE,io:mE,is:gE,it:yE,iu:xE,iw:bE,ja:kE,jbo:SE,jgo:wE,ji:vE,jmc:EE,jv:CE,jw:TE,ka:OE,kab:ME,kaj:_E,kcg:NE,kde:AE,kea:RE,kk:IE,kkj:DE,kl:PE,km:LE,kn:BE,ko:zE,ks:$E,ksb:FE,ksh:VE,ku:HE,kw:UE,ky:jE,lag:WE,lb:KE,lg:qE,lkt:JE,ln:GE,lo:XE,lt:YE,lv:ZE,mas:QE,mg:eC,mgo:tC,mk:nC,ml:rC,mn:sC,mo:iC,mr:oC,ms:aC,mt:lC,my:cC,nah:uC,naq:dC,nb:hC,nd:fC,ne:pC,nl:mC,nn:gC,nnh:yC,no:xC,nqo:bC,nr:kC,nso:SC,ny:wC,nyn:vC,om:EC,or:CC,os:TC,osa:OC,pa:MC,pap:_C,pl:NC,prg:AC,ps:RC,pt:IC,pt_PT:DC,rm:PC,ro:LC,rof:BC,root:zC,ru:$C,rwk:FC,sah:VC,saq:HC,sc:UC,scn:jC,sd:WC,sdh:KC,se:qC,seh:JC,ses:GC,sg:XC,sh:YC,shi:ZC,si:QC,sk:eT,sl:tT,sma:nT,smi:rT,smj:sT,smn:iT,sms:oT,sn:aT,so:lT,sq:cT,sr:uT,ss:dT,ssy:hT,st:fT,su:pT,sv:mT,sw:gT,syr:yT,ta:xT,te:bT,teo:kT,th:ST,ti:wT,tig:vT,tk:ET,tl:CT,tn:TT,to:OT,tr:MT,ts:_T,tzm:NT,ug:AT,uk:RT,ur:IT,uz:DT,ve:PT,vi:LT,vo:BT,vun:zT,wa:$T,wae:FT,wo:VT,xh:HT,xog:UT,yi:jT,yo:WT,yue:KT,zh:qT,zu:JT},Symbol.toStringTag,{value:"Module"}));var XT=Object.defineProperty,YT=Object.getOwnPropertyDescriptor,ZT=Object.getOwnPropertyNames,QT=Object.prototype.hasOwnProperty,eO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ZT(e))!QT.call(t,s)&&s!==n&&XT(t,s,{get:()=>e[s],enumerable:!(r=YT(e,s))||r.enumerable});return t},tO=(t,e,n)=>(eO(t,e,"default"),n),nO=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),Sf={};tO(Sf,GT);Yi.loadLocaleData("en",{plurals:Sf.en});Yi.load("en",nO);Yi.activate("en");var rO=Object.defineProperty,sO=Object.getOwnPropertyDescriptor,iO=(t,e,n,r)=>{for(var s=r>1?void 0:r?sO(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&rO(e,n,s),s},oO={...un.defaultOptions,...ks.defaultOptions},aO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=iO([G({defaultOptions:oO,staticKeys:aO})],Ss);var wf={};Object.defineProperty(wf,"__esModule",{value:!0});function lO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return iu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return iu(r,s)},t[0]);return n||null}var Cr=wf.default=lO,su=new WeakMap;function iu(t,e){if(t&&e){var n=su.get(t)||new WeakMap;su.set(t,n);var r=n.get(e)||function(s){ou(t,s),ou(e,s)};return n.set(e,r),r}return t||e}function ou(t,e){typeof t=="function"?t(e):t.current=e}var vf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(vf(t,e,"read from private field"),e.get(t)),cO=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},uO=(t,e,n,r)=>(vf(t,e,"write to private field"),e.set(t,n),n);function dO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var Ef=z.createContext(null);function nl(t){const e=z.useContext(Ef),n=z.useRef(dO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function hO(t=!0){return nl({autoUpdate:t}).active}function fO(){return nl().commands}var[pO,dM]=Vw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function au(t,e={}){const{core:n,react:r,...s}=e;return yb(t)?t:gb.create(()=>[...Fu(t),new Ss(r),...Tw(n)],s)}function mO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>au(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>au(n.current,r.current))}),[s]),s}var gO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,yO=class extends db{constructor(t){if(super(t),cO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:gO(s,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,R(this.rootPropsConfig.count<=1,{code:b.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),uO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new Ry(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Cf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function xO(t){const e=z.useRef();return Cf(()=>{e.current=t}),e.current}function bO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=kO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),SO(a),a.frameworkOutput}function kO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new yO(e.current),[]);return n.update(t),n}function SO(t){const{state:e}=t.props,n=z.useRef(!!e),r=xO(e);Cf(()=>{const s=e?n.current===!0:n.current===!1;R(s,{code:b.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function wO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=mO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>Ne.createElement("div",{className:N1.EDITOR_WRAPPER,...nl().getRootProps()}),vO=t=>(t.hook(),null);function EO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=bO(a),c=Rw(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return Ne.createElement(pO,{i18n:r,locale:s,supportedLocales:i},Ne.createElement(Ef.Provider,{value:l},Ne.createElement(Aw,{portals:c}),o.map((h,f)=>Ne.createElement(vO,{hook:h,key:f})),u&&Ne.createElement(ua,null),e,d&&Ne.createElement(ua,null)))}const CO="_richTextToolbar_1gbkk_1",TO="_richTextToolbarContainer_1gbkk_5",lu={richTextToolbar:CO,richTextToolbarContainer:TO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const Tf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=fO(),l=hO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:lu.richTextToolbarContainer,children:[ae.jsx("div",{className:lu.richTextToolbar,children:c.map((u,d)=>ae.jsx(Ou,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Nf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};Tf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const OO="_inputInTable_19adc_1",MO="_error_19adc_7",_O="_warning_19adc_7",NO="_inputHover_19adc_13",AO="_inputFocus_19adc_18",RO="_inputError_19adc_25",IO="_inputWarning_19adc_26",DO="_inputDisabled_19adc_61",PO="_hideScrollbars_19adc_67",LO="_richTextInput_19adc_77",BO={inputInTable:OO,error:MO,warning:_O,inputHover:NO,inputFocus:AO,inputError:RO,inputWarning:IO,inputDisabled:DO,hideScrollbars:PO,richTextInput:LO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(_f),a=r||o,{manager:l,state:c,setState:u,getContext:d}=wO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:BO.richTextInput,children:ae.jsxs(EO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(Tf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const hM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=Ne.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
181
+ `],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(mf);const _n=t=>typeof t=="string",Hw=t=>typeof t=="function",nu=new Map,yf="en";function tl(t){return[...Array.isArray(t)?t:[t],yf]}function xf(t,e,n){const r=tl(t);return _i(()=>Ni("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(_n(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return _i(()=>Ni("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function ru(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?_i(()=>Ni("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):_i(()=>Ni("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function _i(t,e){const n=t();let r=nu.get(n);return r||(r=e(),nu.set(n,r)),r}function Ni(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const bf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,kf="%__lingui_octothorpe__%",Uw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(kf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=ru(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=ru(r,!0,o,a);return i(o-l,c)},select:jw,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>xf(r,o,s(a))}},jw=(t,e)=>e[t]??e.other;function Ww(t,e,n){return(r={},s)=>{const i=Uw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+kf;if(_n(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return _n(a)&&bf.test(a)?mf.unraw(a.trim()):_n(a)?a.trim():a?String(a):""}}var Kw=Object.defineProperty,qw=(t,e,n)=>e in t?Kw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jw=(t,e,n)=>(qw(t,e+"",n),n);class Gw{constructor(){Jw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Xw=Object.defineProperty,Yw=(t,e,n)=>e in t?Xw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Yw(t,typeof e!="symbol"?e+"":e,n),n);class Zw extends Gw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??yf,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),_n(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Hw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return _n(l)&&bf.test(l)?JSON.parse(`"${l}"`):_n(l)?l:Ww(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return xf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Qw(t={}){return new Zw(t)}const Yi=Qw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const ev=K,tv=S,nv=Lt;function rv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const sv=S;function iv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function ov(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"}function av(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const lv=S,cv=Fe;function uv(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-1),i=r.slice(-2),o=r.slice(-3);return e?s==1||s==2||s==5||s==7||s==8||i==20||i==50||i==70||i==80?"one":s==3||s==4||o==100||o==200||o==300||o==400||o==500||o==600||o==700||o==800||o==900?"few":r==0||s==6||i==40||i==60||i==90?"many":"other":t==1?"one":"other"}function dv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?(s==2||s==3)&&i!=12&&i!=13?"few":"other":s==1&&i!=11?"one":s>=2&&s<=4&&(i<12||i>14)?"few":r&&s==0||s>=5&&s<=9||i>=11&&i<=14?"many":"other"}const hv=S,fv=S,pv=S,mv=Lt,gv=K;function yv(t,e){return e?t==1||t==5||t==7||t==8||t==9||t==10?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const xv=K;function bv(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2),o=r&&n[0].slice(-6);return e?"other":s==1&&i!=11&&i!=71&&i!=91?"one":s==2&&i!=12&&i!=72&&i!=92?"two":(s==3||s==4||s==9)&&(i<10||i>19)&&(i<70||i>79)&&(i<90||i>99)?"few":t!=0&&r&&o==0?"many":"other"}const kv=S;function Sv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function wv(t,e){var n=String(t).split("."),r=!n[1];return e?t==1||t==3?"one":t==2?"two":t==4?"few":"other":t==1&&r?"one":"other"}const vv=S;function Ev(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Cv=S,Tv=S,Ov=S;function Mv(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function _v(t,e){return e?t==0||t==7||t==8||t==9?"zero":t==1?"one":t==2?"two":t==3||t==4?"few":t==5||t==6?"many":"other":t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"}function Nv(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return e?"other":t==1||!s&&(r==0||r==1)?"one":"other"}const Av=Fe;function Rv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}const Iv=S,Dv=K,Pv=S,Lv=S;function Bv(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?i==1&&o!=11?"one":i==2&&o!=12?"two":i==3&&o!=13?"few":"other":t==1&&r?"one":"other"}const zv=S,$v=S,Fv=Fe,Vv=S;function Hv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function Uv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const jv=Fe;function Wv(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const Kv=S;function qv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Jv=S,Gv=Fe;function Xv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1?"one":"other":t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"}function Yv(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==11?"one":t==2||t==12?"two":t==3||t==13?"few":"other":t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"}const Zv=Fe,Qv=S;function eE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}const tE=Lt;function nE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(o==0||o==20||o==40||o==60||o==80)?"few":s?"other":"many"}const rE=S,sE=S;function iE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}function oE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t>=0&&t<=1?"one":"other"}function aE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function lE(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-2),a=s.slice(-2);return e?"other":i&&o==1||a==1?"one":i&&o==2||a==2?"two":i&&(o==3||o==4)||a==3||a==4?"few":"other"}function cE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function uE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const dE=Fe,hE=K,fE=K,pE=K,mE=Fe;function gE(t,e){var n=String(t).split("."),r=n[0],s=Number(n[0])==t,i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11||!s?"one":"other"}function yE(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const xE=fn;function bE(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1);return e?"other":t==1&&s?"one":r==2&&s?"two":s&&(t<0||t>10)&&i&&o==0?"many":"other"}const kE=K,SE=K,wE=S,vE=Fe,EE=S,CE=K,TE=K;function OE(t,e){var n=String(t).split("."),r=n[0],s=r.slice(-2);return e?r==1?"one":r==0||s>=2&&s<=20||s==40||s==60||s==80?"many":"other":t==1?"one":"other"}function ME(t,e){return e?"other":t>=0&&t<2?"one":"other"}const _E=S,NE=S,AE=K,RE=K;function IE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||r&&s==0&&t!=0?"many":"other":t==1?"one":"other"}const DE=S,PE=S,LE=K;function BE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const zE=K,$E=S,FE=S;function VE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const HE=S;function UE(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2),i=r&&n[0].slice(-3),o=r&&n[0].slice(-5),a=r&&n[0].slice(-6);return e?r&&t>=1&&t<=4||s>=1&&s<=4||s>=21&&s<=24||s>=41&&s<=44||s>=61&&s<=64||s>=81&&s<=84?"one":t==5||s==5?"many":"other":t==0?"zero":t==1?"one":s==2||s==22||s==42||s==62||s==82||r&&i==0&&(o>=1e3&&o<=2e4||o==4e4||o==6e4||o==8e4)||t!=0&&a==1e5?"two":s==3||s==23||s==43||s==63||s==83?"few":t!=1&&(s==1||s==21||s==41||s==61||s==81)?"many":"other"}const jE=S;function WE(t,e){var n=String(t).split("."),r=n[0];return e?"other":t==0?"zero":(r==0||r==1)&&t!=0?"one":"other"}const KE=S,qE=S,JE=K,GE=Lt;function XE(t,e){return e&&t==1?"one":"other"}function YE(t,e){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?"other":i==1&&(o<11||o>19)?"one":i>=2&&i<=9&&(o<11||o>19)?"few":r!=0?"many":"other"}function ZE(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const QE=S,eC=Lt,tC=S;function nC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?o==1&&a!=11?"one":o==2&&a!=12?"two":(o==7||o==8)&&a!=17&&a!=18?"many":"other":i&&o==1&&a!=11||l==1&&c!=11?"one":"other"}const rC=S,sC=S;function iC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}function oC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function aC(t,e){return e&&t==1?"one":"other"}function lC(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return e?"other":t==1?"one":t==0||s>=2&&s<=10?"few":s>=11&&s<=19?"many":"other"}const cC=K,uC=S,dC=fn,hC=S,fC=S;function pC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?r&&t>=1&&t<=4?"one":"other":t==1?"one":"other"}const mC=Fe,gC=S,yC=S,xC=S,bC=K,kC=S,SC=Lt,wC=S,vC=S,EC=S;function CC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?t==1||t==5||r&&t>=7&&t<=9?"one":t==2||t==3?"two":t==4?"few":t==6?"many":"other":t==1?"one":"other"}const TC=S,OC=K,MC=Lt,_C=S;function NC(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":t==1&&s?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&r!=1&&(i==0||i==1)||s&&i>=5&&i<=9||s&&o>=12&&o<=14?"many":"other"}function AC(t,e){var n=String(t).split("."),r=n[1]||"",s=r.length,i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-2),c=r.slice(-1);return e?"other":i&&o==0||a>=11&&a<=19||s==2&&l>=11&&l<=19?"zero":o==1&&a!=11||s==2&&c==1&&l!=11||s!=2&&c==1?"one":"other"}const RC=S;function IC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const DC=Fe,PC=S;function LC(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-2);return e?t==1?"one":"other":t==1&&r?"one":!r||t==0||i>=2&&i<=19?"few":"other"}const BC=S,zC=K;function $C(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-1),o=r.slice(-2);return e?"other":s&&i==1&&o!=11?"one":s&&i>=2&&i<=4&&(o<12||o>14)?"few":s&&i==0||s&&i>=5&&i<=9||s&&o>=11&&o<=14?"many":"other"}const FC=S,VC=K,HC=S;function UC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}function jC(t,e){var n=String(t).split("."),r=!n[1];return e?t==11||t==8||t==80||t==800?"many":"other":t==1&&r?"one":"other"}const WC=S,KC=S,qC=fn,JC=S,GC=K,XC=K;function YC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}function ZC(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t>=0&&t<=1?"one":r&&t>=2&&t<=10?"few":"other"}function QC(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"";return e?"other":t==0||t==1||r==0&&s==1?"one":"other"}function eT(t,e){var n=String(t).split("."),r=n[0],s=!n[1];return e?"other":t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"}function tT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=r.slice(-2);return e?"other":s&&i==1?"one":s&&i==2?"two":s&&(i==3||i==4)||!s?"few":"other"}const nT=fn,rT=fn,sT=fn,iT=fn,oT=fn,aT=S,lT=S;function cT(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),i=r&&n[0].slice(-2);return e?t==1?"one":s==4&&i!=14?"many":"other":t==1?"one":"other"}function uT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=r.slice(-2),l=s.slice(-1),c=s.slice(-2);return e?"other":i&&o==1&&a!=11||l==1&&c!=11?"one":i&&o>=2&&o<=4&&(a<12||a>14)||l>=2&&l<=4&&(c<12||c>14)?"few":"other"}const dT=S,hT=S,fT=S,pT=K;function mT(t,e){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,i=s&&n[0].slice(-1),o=s&&n[0].slice(-2);return e?(i==1||i==2)&&o!=11&&o!=12?"one":"other":t==1&&r?"one":"other"}const gT=Fe,yT=S,xT=S,bT=S,kT=S,ST=K,wT=Lt,vT=S;function ET(t,e){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1);return e?s==6||s==9||t==10?"few":"other":t==1?"one":"other"}function CT(t,e){var n=String(t).split("."),r=n[0],s=n[1]||"",i=!n[1],o=r.slice(-1),a=s.slice(-1);return e?t==1?"one":"other":i&&(r==1||r==2||r==3)||i&&o!=4&&o!=6&&o!=9||!i&&a!=4&&a!=6&&a!=9?"one":"other"}const TT=S,OT=K,MT=S,_T=S;function NT(t,e){var n=String(t).split("."),r=Number(n[0])==t;return e?"other":t==0||t==1||r&&t>=11&&t<=99?"one":"other"}const AT=S;function RT(t,e){var n=String(t).split("."),r=n[0],s=!n[1],i=Number(n[0])==t,o=i&&n[0].slice(-1),a=i&&n[0].slice(-2),l=r.slice(-1),c=r.slice(-2);return e?o==3&&a!=13?"few":"other":s&&l==1&&c!=11?"one":s&&l>=2&&l<=4&&(c<12||c>14)?"few":s&&l==0||s&&l>=5&&l<=9||s&&c>=11&&c<=14?"many":"other"}const IT=Fe,DT=S,PT=S;function LT(t,e){return e&&t==1?"one":"other"}const BT=S,zT=S,$T=Lt,FT=S,VT=K,HT=S,UT=S,jT=Fe,WT=K,KT=K,qT=K;function JT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const GT=Object.freeze(Object.defineProperty({__proto__:null,_in:ev,af:tv,ak:nv,am:rv,an:sv,ar:iv,ars:ov,as:av,asa:lv,ast:cv,az:uv,be:dv,bem:hv,bez:fv,bg:pv,bho:mv,bm:gv,bn:yv,bo:xv,br:bv,brx:kv,bs:Sv,ca:wv,ce:vv,ceb:Ev,cgg:Cv,chr:Tv,ckb:Ov,cs:Mv,cy:_v,da:Nv,de:Av,dsb:Rv,dv:Iv,dz:Dv,ee:Pv,el:Lv,en:Bv,eo:zv,es:$v,et:Fv,eu:Vv,fa:Hv,ff:Uv,fi:jv,fil:Wv,fo:Kv,fr:qv,fur:Jv,fy:Gv,ga:Xv,gd:Yv,gl:Zv,gsw:Qv,gu:eE,guw:tE,gv:nE,ha:rE,haw:sE,he:iE,hi:oE,hr:aE,hsb:lE,hu:cE,hy:uE,ia:dE,id:hE,ig:fE,ii:pE,io:mE,is:gE,it:yE,iu:xE,iw:bE,ja:kE,jbo:SE,jgo:wE,ji:vE,jmc:EE,jv:CE,jw:TE,ka:OE,kab:ME,kaj:_E,kcg:NE,kde:AE,kea:RE,kk:IE,kkj:DE,kl:PE,km:LE,kn:BE,ko:zE,ks:$E,ksb:FE,ksh:VE,ku:HE,kw:UE,ky:jE,lag:WE,lb:KE,lg:qE,lkt:JE,ln:GE,lo:XE,lt:YE,lv:ZE,mas:QE,mg:eC,mgo:tC,mk:nC,ml:rC,mn:sC,mo:iC,mr:oC,ms:aC,mt:lC,my:cC,nah:uC,naq:dC,nb:hC,nd:fC,ne:pC,nl:mC,nn:gC,nnh:yC,no:xC,nqo:bC,nr:kC,nso:SC,ny:wC,nyn:vC,om:EC,or:CC,os:TC,osa:OC,pa:MC,pap:_C,pl:NC,prg:AC,ps:RC,pt:IC,pt_PT:DC,rm:PC,ro:LC,rof:BC,root:zC,ru:$C,rwk:FC,sah:VC,saq:HC,sc:UC,scn:jC,sd:WC,sdh:KC,se:qC,seh:JC,ses:GC,sg:XC,sh:YC,shi:ZC,si:QC,sk:eT,sl:tT,sma:nT,smi:rT,smj:sT,smn:iT,sms:oT,sn:aT,so:lT,sq:cT,sr:uT,ss:dT,ssy:hT,st:fT,su:pT,sv:mT,sw:gT,syr:yT,ta:xT,te:bT,teo:kT,th:ST,ti:wT,tig:vT,tk:ET,tl:CT,tn:TT,to:OT,tr:MT,ts:_T,tzm:NT,ug:AT,uk:RT,ur:IT,uz:DT,ve:PT,vi:LT,vo:BT,vun:zT,wa:$T,wae:FT,wo:VT,xh:HT,xog:UT,yi:jT,yo:WT,yue:KT,zh:qT,zu:JT},Symbol.toStringTag,{value:"Module"}));var XT=Object.defineProperty,YT=Object.getOwnPropertyDescriptor,ZT=Object.getOwnPropertyNames,QT=Object.prototype.hasOwnProperty,eO=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ZT(e))!QT.call(t,s)&&s!==n&&XT(t,s,{get:()=>e[s],enumerable:!(r=YT(e,s))||r.enumerable});return t},tO=(t,e,n)=>(eO(t,e,"default"),n),nO=JSON.parse('{"extension.command.toggle-upper-case.label":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"extension.table.column_count":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"extension.table.row_count":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.toggle-columns.description":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"extension.command.toggle-columns.label":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"extension.command.set-text-direction.label":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"extension.command.set-text-direction.description":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"extension.command.toggle-heading.label":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"extension.command.toggle-callout.description":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"extension.command.toggle-callout.label":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"extension.command.toggle-code-block.description":"Add a code block","extension.command.add-annotation.label":"Add annotation","extension.command.toggle-blockquote.description":"Add blockquote formatting to the selected text","extension.command.toggle-bold.description":"Add bold formatting to the selected text","extension.command.toggle-code.description":"Add inline code formatting to the selected text","keyboard.shortcut.alt":"Alt","keyboard.shortcut.arrowDown":"Arrow Down","keyboard.shortcut.arrowLeft":"Arrow Left","keyboard.shortcut.arrowRight":"Arrow Right","keyboard.shortcut.arrowUp":"Arrow Up","keyboard.shortcut.backspace":"Backspace","ui.text-color.black":"Black","extension.command.toggle-blockquote.label":"Blockquote","ui.text-color.blue":"Blue","ui.text-color.blue.hue":["Blue ",["hue"]],"extension.command.toggle-bold.label":"Bold","extension.command.toggle-bullet-list.description":"Bulleted list","keyboard.shortcut.capsLock":"Caps Lock","extension.command.center-align.label":"Center align","extension.command.toggle-code.label":"Code","extension.command.toggle-code-block.label":"Codeblock","keyboard.shortcut.command":"Command","QcPNd6":"Image description","ogrUzJ":"Add a short description here.","yqdyzr":"Image","6/02F4":"Image source","X8H91v":"Image","zhQ7Zt":"Italic","ZL7E7l":"Underline","keyboard.shortcut.control":"Control","extension.command.convert-paragraph.description":"Convert current block into a paragraph block.","extension.command.convert-paragraph.label":"Convert Paragraph","extension.command.copy.label":"Copy","extension.command.copy.description":"Copy the selected text","extension.command.create-table.description":"Create a table with set number of rows and columns.","extension.command.create-table.label":"Create table","extension.command.cut.label":"Cut","extension.command.cut.description":"Cut the selected text","ui.text-color.cyan":"Cyan","ui.text-color.cyan.hue":["Cyan ",["hue"]],"extension.command.decrease-font-size.label":"Decrease","extension.command.decrease-indent.label":"Decrease indentation","extension.command.decrease-font-size.description":"Decrease the font size.","keyboard.shortcut.delete":"Delete","extension.command.insert-horizontal-rule.label":"Divider","keyboard.shortcut.end":"End","keyboard.shortcut.escape":"Enter","keyboard.shortcut.enter":"Enter","6PjrOF":"Add annotation","OTq5WC":"Center align","oeZ3ox":"Convert current block into a paragraph block.","m1khs+":"Convert Paragraph","w/1U+3":"Copy the selected text","kdodi0":"Copy","k0KR/u":"Create a table with set number of rows and columns.","zrwMyD":"Create table","D/nWxh":"Cut the selected text","jHPv5m":"Cut","5cNgRx":"Decrease the font size.","vyRNWx":"Decrease","Jgiol4":"Decrease indentation","1gJSHH":"Increase the font size","OQXJXz":"Increase","72TLhr":"Increase indentation","HFlfzJ":"Insert Emoji","RPq9fY":"Separate content with a diving horizontal line","OKQF+e":"Divider","zjYb9C":"Insert a new paragraph","4M4sXC":"Insert Paragraph","1Q+eVc":"Justify","ejWWtP":"Left align","wVqrpS":"Paste content into the editor","07v9aw":"Paste","zUYfou":"Redo the most recent action","9Nq9zr":"Redo","0uxaZe":"Remove annotation","iJWZAz":"Right align","g5WpPn":"Select all content within the editor","2+pZDT":"Select all","yChCR1":"Set text case","GMzAC/":"Set the font size for the selected text.","vzEyrv":"Font size","7VCkJ8":"Set the text color for the selected text.","qjWFaR":"Text color","LVWgFu":[["dir","select",{"ltr":"Set the text direction from left to right","rtl":"Set the text direction from right to left","other":"Reset text direction"}]],"WXwRy1":[["dir","select",{"ltr":"Left-To-Right","rtl":"Right-To-Left","other":"Reset Direction"}]],"G/o315":"Set the text highlight color for the selected text.","xtHg6d":"Text highlight","1p1W/p":"Add blockquote formatting to the selected text","6+rh6I":"Blockquote","0yB3LV":"Add bold formatting to the selected text","sFMo4Z":"Bold","SMKG/s":"Bulleted list","/BYCMi":[["type","select",{"info":"Create an information callout block","warning":"Create a warning callout block","error":"Create an error callout block","success":"Create a success callout block","other":"Create a callout block"}]],"V+3IBe":[["type","select",{"info":"Information Callout","warning":"Warning Callout","error":"Error Callout","success":"Success Callout","other":"Callout"}]],"hbIo4L":"Add a code block","7GkMcx":"Codeblock","2r4JYl":"Add inline code formatting to the selected text","Up8Tpe":"Code","ATHSPS":[["count","select",{"2":"Split the block into two columns","3":"Split the current block into three columns","4":"Split the current block into four columns","other":"Split the current block into multiple columns"}]],"7DC1VE":[["count","select",{"2":"Two Column Block","3":"Three Column Block","4":"Four Column Block","other":"Multi Column Block"}]],"hnrBeo":[["level","select",{"1":"Heading 1","2":"Heading 2","3":"Heading 3","4":"Heading 4","5":"Heading 5","6":"Heading 6","other":"Heading"}]],"NkZAcw":"Italicize the selected text","2fTW9e":"Italic","c759Ra":"Ordered list","uQwrZu":"Strikethrough the selected text","pT3qly":"Strikethrough","BHk+zu":"Subscript","18BVwM":"Superscript","tOIVCV":"Tasked list","4Janx3":"Underline the selected text","dCHt+D":"Underline","YYAprs":[["case","select",{"upper":"Uppercase","lower":"Lowercase","capitalize":"Sentence case","smallCaps":"Small caps","other":"Text case"}]],"tczyZL":"Show hidden whitespace characters in your editor.","0qAX23":"Toggle Whitespace","ezMADU":"Undo the most recent action","N3P7EC":"Undo","2nj/+s":"Update annotation","dWD7u4":[["count","plural",{"one":["#"," column"],"other":["#"," columns"]}]],"qXqgVT":[["count","plural",{"one":["#"," row"],"other":["#"," rows"]}]],"extension.command.set-font-size.label":"Font size","ui.text-color.grape":"Grape","ui.text-color.grape.hue":["Grape ",["hue"]],"ui.text-color.gray":"Gray","ui.text-color.gray.hue":["Gray ",["hue"]],"ui.text-color.green":"Green","ui.text-color.green.hue":["Green ",["hue"]],"keyboard.shortcut.home":"Home","extension.command.increase-font-size.label":"Increase","extension.command.increase-indent.label":"Increase indentation","extension.command.increase-font-size.description":"Increase the font size","ui.text-color.indigo":"Indigo","ui.text-color.indigo.hue":["Indigo ",["hue"]],"extension.command.insert-paragraph.description":"Insert a new paragraph","extension.command.insert-emoji.label":"Insert Emoji","extension.command.insert-paragraph.label":"Insert Paragraph","extension.command.toggle-italic.label":"Italic","extension.command.toggle-italic.description":"Italicize the selected text","extension.command.justify-align.label":"Justify","R7NlCw":"Alt","RbDiK5":"Arrow Down","Dgyd+E":"Arrow Left","8pdCk4":"Arrow Right","Gp/343":"Arrow Up","PFPV0A":"Backspace","0IRYvp":"Caps Lock","X7HX0D":"Command","zq0AdD":"Control","8SfToN":"Delete","Ys/uah":"End","3K5hww":"Enter","veQt1j":"Enter","ySv7i+":"Home","e6RUI1":"Page Down","EEJk31":"Page Up","7sbhAU":"Shift","Q4eplT":"Space","SUhVVC":"Tab","extension.command.left-align.label":"Left align","ui.text-color.lime":"Lime","ui.text-color.lime.hue":["Lime ",["hue"]],"react-components.mention-atom-component.zero-items":"No items available","ui.text-color.orange":"Orange","ui.text-color.orange.hue":["Orange ",["hue"]],"extension.command.toggle-ordered-list.label":"Ordered list","keyboard.shortcut.pageDown":"Page Down","keyboard.shortcut.pageUp":"Page Up","extension.command.paste.label":"Paste","extension.command.paste.description":"Paste content into the editor","ui.text-color.pink":"Pink","ui.text-color.pink.hue":["Pink ",["hue"]],"zvMfIA":"No items available","pEjhti":"Static Menu","ui.text-color.red":"Red","ui.text-color.red.hue":["Red ",["hue"]],"extension.command.redo.label":"Redo","extension.command.redo.description":"Redo the most recent action","extension.command.remove-annotation.label":"Remove annotation","extension.command.right-align.label":"Right align","extension.command.select-all.label":"Select all","extension.command.select-all.description":"Select all content within the editor","extension.command.insert-horizontal-rule.description":"Separate content with a diving horizontal line","extension.command.set-casing.label":"Set text case","extension.command.set-font-size.description":"Set the font size for the selected text.","extension.command.set-text-color.description":"Set the text color for the selected text.","extension.command.set-text-highlight.description":"Set the text highlight color for the selected text.","keyboard.shortcut.shift":"Shift","extension.command.toggle-whitespace.description":"Show hidden whitespace characters in your editor.","keyboard.shortcut.space":"Space","extension.command.toggle-strike.label":"Strikethrough","extension.command.toggle-strike.description":"Strikethrough the selected text","extension.command.toggle-subscript.label":"Subscript","extension.command.toggle-superscript.label":"Superscript","keyboard.shortcut.tab":"Tab","extension.command.toggle-task-list.description":"Tasked list","ui.text-color.teal":"Teal","ui.text-color.teal.hue":["Teal ",["hue"]],"extension.command.set-text-color.label":"Text color","extension.command.set-text-highlight.label":"Text highlight","extension.command.toggle-whitespace.label":"Toggle Whitespace","ui.text-color.transparent":"Transparent","slrB1c":"Black","6QML30":"Blue","xw+keN":["Blue ",["hue"]],"38RHqP":"Cyan","D89yPf":["Cyan ",["hue"]],"VjBLnd":"Grape","Rp40yv":["Grape ",["hue"]],"5Dm9D1":"Gray","HGjXjC":["Gray ",["hue"]],"b9fz+n":"Green","18jo3M":["Green ",["hue"]],"CFzqCV":"Indigo","aVlDku":["Indigo ",["hue"]],"04PfLc":"Lime","KRTK6Y":["Lime ",["hue"]],"pSnXFd":"Orange","ve/MJZ":["Orange ",["hue"]],"OvCgDa":"Pink","l7NqyT":["Pink ",["hue"]],"IT9k0j":"Red","AdyJ7/":["Red ",["hue"]],"3D2UWc":"Teal","Dcq0Y1":["Teal ",["hue"]],"bsi2ik":"Transparent","Tj3PRR":"Violet","xxMH5N":["Violet ",["hue"]],"Rum0ah":"White","4gaw/Q":"Yellow","hhauc3":["Yellow ",["hue"]],"extension.command.toggle-underline.label":"Underline","extension.command.toggle-underline.description":"Underline the selected text","extension.command.undo.label":"Undo","extension.command.undo.description":"Undo the most recent action","extension.command.update-annotation.label":"Update annotation","ui.text-color.violet":"Violet","ui.text-color.violet.hue":["Violet ",["hue"]],"ui.text-color.white":"White","ui.text-color.yellow":"Yellow","ui.text-color.yellow.hue":["Yellow ",["hue"]]}'),Sf={};tO(Sf,GT);Yi.loadLocaleData("en",{plurals:Sf.en});Yi.load("en",nO);Yi.activate("en");var rO=Object.defineProperty,sO=Object.getOwnPropertyDescriptor,iO=(t,e,n,r)=>{for(var s=r>1?void 0:r?sO(e,n):e,i=t.length-1,o;i>=0;i--)(o=t[i])&&(s=(r?o(e,n,s):o(s))||s);return r&&s&&rO(e,n,s),s},oO={...un.defaultOptions,...ks.defaultOptions},aO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=iO([G({defaultOptions:oO,staticKeys:aO})],Ss);var wf={};Object.defineProperty(wf,"__esModule",{value:!0});function lO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return iu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return iu(r,s)},t[0]);return n||null}var Cr=wf.default=lO,su=new WeakMap;function iu(t,e){if(t&&e){var n=su.get(t)||new WeakMap;su.set(t,n);var r=n.get(e)||function(s){ou(t,s),ou(e,s)};return n.set(e,r),r}return t||e}function ou(t,e){typeof t=="function"?t(e):t.current=e}var vf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(vf(t,e,"read from private field"),e.get(t)),cO=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},uO=(t,e,n,r)=>(vf(t,e,"write to private field"),e.set(t,n),n);function dO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var Ef=z.createContext(null);function nl(t){const e=z.useContext(Ef),n=z.useRef(dO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function hO(t=!0){return nl({autoUpdate:t}).active}function fO(){return nl().commands}var[pO,cM]=Vw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function au(t,e={}){const{core:n,react:r,...s}=e;return yb(t)?t:gb.create(()=>[...Fu(t),new Ss(r),...Tw(n)],s)}function mO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>au(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>au(n.current,r.current))}),[s]),s}var gO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,yO=class extends db{constructor(t){if(super(t),cO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:gO(s,this.onRef),key:this.uid,...i,children:n}},this.onRef=e=>{e&&(this.rootPropsConfig.count+=1,R(this.rootPropsConfig.count<=1,{code:b.REACT_GET_ROOT_PROPS,message:`Called ${this.rootPropsConfig.count} times`}),uO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new Ry(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Cf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function xO(t){const e=z.useRef();return Cf(()=>{e.current=t}),e.current}function bO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=kO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),SO(a),a.frameworkOutput}function kO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new yO(e.current),[]);return n.update(t),n}function SO(t){const{state:e}=t.props,n=z.useRef(!!e),r=xO(e);Cf(()=>{const s=e?n.current===!0:n.current===!1;R(s,{code:b.REACT_CONTROLLED,message:n.current?"You have attempted to switch from a controlled to an uncontrolled editor. Once you set up an editor as a controlled editor it must always provide a `state` prop.":"You have provided a `state` prop to an uncontrolled editor. In order to set up your editor as controlled you must provide the `state` prop from the very first render."}),!(!e||e===r)&&t.updateControlledState(e,r??void 0)},[e,r,t])}function wO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=mO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>Ne.createElement("div",{className:N1.EDITOR_WRAPPER,...nl().getRootProps()}),vO=t=>(t.hook(),null);function EO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=bO(a),c=Rw(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return Ne.createElement(pO,{i18n:r,locale:s,supportedLocales:i},Ne.createElement(Ef.Provider,{value:l},Ne.createElement(Aw,{portals:c}),o.map((h,f)=>Ne.createElement(vO,{hook:h,key:f})),u&&Ne.createElement(ua,null),e,d&&Ne.createElement(ua,null)))}const CO="_richTextToolbar_1gbkk_1",TO="_richTextToolbarContainer_1gbkk_5",lu={richTextToolbar:CO,richTextToolbarContainer:TO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const Tf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=fO(),l=hO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:lu.richTextToolbarContainer,children:[ae.jsx("div",{className:lu.richTextToolbar,children:c.map((u,d)=>ae.jsx(Ou,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Nf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};Tf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const OO="_inputInTable_1fb4l_1",MO="_inputHover_1fb4l_13",_O="_inputFocus_1fb4l_18",NO="_inputError_1fb4l_25",AO="_inputWarning_1fb4l_26",RO="_inputDisabled_1fb4l_61",IO="_hideScrollbars_1fb4l_67",DO="_richTextInput_1fb4l_77",PO={inputInTable:OO,inputHover:MO,inputFocus:_O,inputError:NO,inputWarning:AO,inputDisabled:RO,hideScrollbars:IO,richTextInput:DO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(_f),a=r||o,{manager:l,state:c,setState:u,getContext:d}=wO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:PO.richTextInput,children:ae.jsxs(EO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(Tf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const uM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=Ne.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
182
182
  1. Item (*italic*)
183
183
  2. Item (**bold**)
184
184
  3. Item (\`code\`)
185
185
  * Item
186
- * Item`};const Xr=As.bind({});Xr.args={placeholder:"Enter message..."};const Yr=As.bind({});Yr.args={disabled:!0};const Zr=()=>{const[t,e]=Ne.useState("starting value"),n=Ne.useRef(null),r=s=>{e(""),s.current.clearContent()};return ae.jsxs(ae.Fragment,{children:[ae.jsx(Ou,{label:"Clear input!",colored:"red",onClick:()=>r(n)}),ae.jsx(Zi,{value:t,onChange:e,ref:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:t})]})},zO=ae.jsx(Rf,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Wombats",value:"bark"}],width:"auto",value:"termites",small:!0}),Qr=As.bind({});Qr.args={toolbarComponent:zO};Zr.__docgenInfo={description:"",methods:[],displayName:"HandlingStateExternallyWithRef"};var cu,uu,du;Bs.parameters={...Bs.parameters,docs:{...(cu=Bs.parameters)==null?void 0:cu.docs,source:{originalSource:`args => {
186
+ * Item`};const Xr=As.bind({});Xr.args={placeholder:"Enter message..."};const Yr=As.bind({});Yr.args={disabled:!0};const Zr=()=>{const[t,e]=Ne.useState("starting value"),n=Ne.useRef(null),r=s=>{e(""),s.current.clearContent()};return ae.jsxs(ae.Fragment,{children:[ae.jsx(Ou,{label:"Clear input!",colored:"red",onClick:()=>r(n)}),ae.jsx(Zi,{value:t,onChange:e,ref:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:t})]})},LO=ae.jsx(Rf,{options:[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Wombats",value:"bark"}],width:"auto",value:"termites",small:!0}),Qr=As.bind({});Qr.args={toolbarComponent:LO};Zr.__docgenInfo={description:"",methods:[],displayName:"HandlingStateExternallyWithRef"};var cu,uu,du;Bs.parameters={...Bs.parameters,docs:{...(cu=Bs.parameters)==null?void 0:cu.docs,source:{originalSource:`args => {
187
187
  const [value, setValue] = React.useState(args.value);
188
188
  return <>
189
189
  <RichTextInput
@@ -253,4 +253,4 @@ ${t}</ul>
253
253
  </pre>
254
254
  <pre>{value}</pre>
255
255
  </>;
256
- }`,...(Tu=(Cu=Qr.parameters)==null?void 0:Cu.docs)==null?void 0:Tu.source}}};const fM=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Bs as Default,Yr as Disabled,Gr as Filled,Zr as HandlingStateExternallyWithRef,Xr as Placeholder,Qr as WithToolbarComponent,fM as __namedExportsOrder,hM as default};
256
+ }`,...(Tu=(Cu=Qr.parameters)==null?void 0:Cu.docs)==null?void 0:Tu.source}}};const dM=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Bs as Default,Yr as Disabled,Gr as Filled,Zr as HandlingStateExternallyWithRef,Xr as Placeholder,Qr as WithToolbarComponent,dM as __namedExportsOrder,uM as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-Cw1-vdpR.js";import{T as z}from"./text-B3-TSWok.js";import{t as R,s as G,u as J,v as K,w as Q}from"./table.stories-data-C3vJedB1.js";import"./index-Bk2sglWO.js";import"./index.es-DazXb-ul.js";import"./inheritsLoose-DP0QEDDI.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./index-CUZDtIZe.js";import"./memoize-one.esm-CcMeOnPo.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./lodash-c4VUpsOs.js";import"./actions-D-uVCDzk.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./pagination-DWc8zp3k.js";import"./select-03uRbc4I.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DTXbDJaL.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-Dq8zEk7X.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./check-box-DPLaOkRR.js";import"./slider-C7vnj_3M.js";import"./index-BI4_Bp97.js";import"./popover-rq33c1W2.js";import"./flex-EllkLxgO.js";const Be={title:"Basic/Table/Row",component:g,args:{table:{...R}}},v=n=>o.jsx(g,{...n}),i=v.bind({});i.args={table:G};const p=v.bind({});p.args={table:J};const c=v.bind({});c.args={table:K};const d=v.bind({});d.args={table:Q};const t=v.bind({});t.args={table:{...R,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const u=()=>{const[n,e]=D.useState(null),a=r=>e(n===r?null:r);return o.jsx(g,{table:{...R,striped:!1,rows:R.rows.map((r,x)=>({...r,onRowClick:()=>a(x),expandedContent:{content:n===x?o.jsx("div",{children:"Example expanded content"}):null}}))}})},m=()=>{const n={draggable:!0,headers:[{cells:[{value:"Name"},{value:"Weight (kg)"},{value:"Energy (kcal / 100g)"},{value:"Origin"}]}],rows:[{noDrag:!0,cells:[{value:"Undraggable"},{value:100},{value:361},{value:"Vietnam"}]},{cells:[{value:"Buckwheat"},{value:50},{value:358},{value:"Poland"}]},{cells:[{value:"Couscous"},{value:10},{value:368},{value:"France"}]}]},e=(s,b,l)=>{const y=[...s];return s[l].noDrag?s:(y.splice(l,0,y.splice(b,1)[0]),y)},[a,r]=D.useState(n.rows),x=s=>{const{to:b,from:l}=s;e(a,l,b),r(e(a,l,b))};return o.jsx(g,{table:{...n,rows:a},onListReorder:x})},w=()=>{const[n,e]=D.useState("Hover any row!"),a=[1,2,3,4,5].map(r=>({cells:[{value:`Row ${r}`},{value:`${r**2}`}],onRowMouseEnter:()=>e(`Hovering row ${r}`),onRowMouseLeave:()=>e("Not hovering any row...")}));return o.jsxs(o.Fragment,{children:[o.jsx(z,{children:n}),o.jsx(g,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};u.__docgenInfo={description:"",methods:[],displayName:"Expandable"};m.__docgenInfo={description:"",methods:[],displayName:"DragAndDrop"};w.__docgenInfo={description:"",methods:[],displayName:"OnRowEnter"};var E,h,T;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
1
+ import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-DPbEkZqw.js";import{T as z}from"./text-B3-TSWok.js";import{t as R,s as G,u as J,v as K,w as Q}from"./table.stories-data-C7mC5R8Q.js";import"./index-Bk2sglWO.js";import"./index.es-DazXb-ul.js";import"./inheritsLoose-DP0QEDDI.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./index-CUZDtIZe.js";import"./memoize-one.esm-CcMeOnPo.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./lodash-c4VUpsOs.js";import"./actions-Bax0KeqM.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./button-Cbv7WK6k.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-BmbYqTX_.js";import"./types-Dx2TtIG9.js";import"./badge-CLQ59MDF.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./pagination-CoyQUC4R.js";import"./select-BQzJMnK1.js";import"./enum-Bnn40S8Q.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-Db9WkmPP.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-CNnU6gOF.js";import"./index-C0x1JmaP.js";import"./index-DRSy5Ssd.js";import"./check-box-DPLaOkRR.js";import"./slider-CcpE4BLD.js";import"./index-BI4_Bp97.js";import"./popover-C_2P8LFJ.js";import"./flex-EllkLxgO.js";const Be={title:"Basic/Table/Row",component:g,args:{table:{...R}}},v=n=>o.jsx(g,{...n}),i=v.bind({});i.args={table:G};const p=v.bind({});p.args={table:J};const c=v.bind({});c.args={table:K};const d=v.bind({});d.args={table:Q};const t=v.bind({});t.args={table:{...R,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const u=()=>{const[n,e]=D.useState(null),a=r=>e(n===r?null:r);return o.jsx(g,{table:{...R,striped:!1,rows:R.rows.map((r,x)=>({...r,onRowClick:()=>a(x),expandedContent:{content:n===x?o.jsx("div",{children:"Example expanded content"}):null}}))}})},m=()=>{const n={draggable:!0,headers:[{cells:[{value:"Name"},{value:"Weight (kg)"},{value:"Energy (kcal / 100g)"},{value:"Origin"}]}],rows:[{noDrag:!0,cells:[{value:"Undraggable"},{value:100},{value:361},{value:"Vietnam"}]},{cells:[{value:"Buckwheat"},{value:50},{value:358},{value:"Poland"}]},{cells:[{value:"Couscous"},{value:10},{value:368},{value:"France"}]}]},e=(s,b,l)=>{const y=[...s];return s[l].noDrag?s:(y.splice(l,0,y.splice(b,1)[0]),y)},[a,r]=D.useState(n.rows),x=s=>{const{to:b,from:l}=s;e(a,l,b),r(e(a,l,b))};return o.jsx(g,{table:{...n,rows:a},onListReorder:x})},w=()=>{const[n,e]=D.useState("Hover any row!"),a=[1,2,3,4,5].map(r=>({cells:[{value:`Row ${r}`},{value:`${r**2}`}],onRowMouseEnter:()=>e(`Hovering row ${r}`),onRowMouseLeave:()=>e("Not hovering any row...")}));return o.jsxs(o.Fragment,{children:[o.jsx(z,{children:n}),o.jsx(g,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};u.__docgenInfo={description:"",methods:[],displayName:"Expandable"};m.__docgenInfo={description:"",methods:[],displayName:"DragAndDrop"};w.__docgenInfo={description:"",methods:[],displayName:"OnRowEnter"};var E,h,T;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
2
2
  return <Table
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args} />;
@@ -0,0 +1,61 @@
1
+ import{j as o}from"./jsx-runtime-eps93zm2.js";import{l as ae}from"./lodash-c4VUpsOs.js";import{r as M}from"./index-DhsZuJvc.js";import{c as G}from"./index-Bk2sglWO.js";import{G as ie,I as Ee}from"./common-types-Sih75Sav.js";import{D as me}from"./disabled-context-rmpd7YJS.js";import{i as ne}from"./types-Dx2TtIG9.js";import{T as pe,u as Pe,m as We}from"./tooltip-1V7clEnw.js";import{A as P,E as B,K as ze}from"./enum-Bnn40S8Q.js";import{a as Ge,_ as $e}from"./inheritsLoose-DP0QEDDI.js";import{_ as ge}from"./assertThisInitialized-B9jnkVVz.js";import{m as le}from"./memoize-one.esm-CcMeOnPo.js";import{M as se}from"./types-BmbYqTX_.js";import{T as ue}from"./text-B3-TSWok.js";import{A as Ue}from"./actions-Bax0KeqM.js";import{I as ce}from"./icon-BSFY3vDO.js";import{s as Ve}from"./select.input-CJed_LLR.js";const Ye="_inputInTable_sl2b5_1",Ke="_inputHover_sl2b5_13",Be="_inputFocus_sl2b5_18",Ze="_inputError_sl2b5_25",Xe="_inputWarning_sl2b5_26",Je="_inputDisabled_sl2b5_61",Qe="_hideScrollbars_sl2b5_67",en="_select_sl2b5_77",nn="_isInTable_sl2b5_121",tn="_unSelected_sl2b5_133",rn="_small_sl2b5_174",an="_right_sl2b5_182",sn="_groupOrderFirst_sl2b5_193",ln="_groupOrderMiddle_sl2b5_194",on="_groupOrderLast_sl2b5_198",U={inputInTable:Ye,inputHover:Ke,inputFocus:Be,inputError:Ze,inputWarning:Xe,inputDisabled:Je,hideScrollbars:Qe,select:en,isInTable:nn,unSelected:tn,small:rn,right:an,groupOrderFirst:sn,groupOrderMiddle:ln,groupOrderLast:on},we=({disabled:e=!1,error:n=null,warning:r=null,tooltip:a=null,options:l,onChange:g=ae.noop,onFocus:T=ae.noop,onBlur:u=ae.noop,right:c=!1,small:d=!1,tabIndex:S=0,selectedOption:m,width:b=null,groupOrder:E=null,testId:v,isInTable:t=!1,clearable:i,placeholder:s,hasNonExistentValue:p,maxTooltipWidth:y,borderRadius:I})=>{const f=M.useContext(me),h=m===null||(m==null?void 0:m.value)===null?"unselected":m==null?void 0:m.value,w=h==="unselected",N=(h==="unselected"||i?[o.jsx("option",{value:"unselected",disabled:!i,hidden:!i,children:s||"Select..."},"unselected")]:[]).concat(p?[o.jsx("option",{value:m==null?void 0:m.value,disabled:e||f,children:m==null?void 0:m.label},"selectedNonExistentValue")]:[]).concat(l.map((L,R)=>o.jsx("option",{value:L.value,"data-testid":L.testId,children:L.label},R))),q=(()=>{if(E)switch(E){case ie.FIRST:return U.groupOrderFirst;case ie.LAST:return U.groupOrderLast;default:return U.groupOrderMiddle}return""})();return o.jsx(pe,{error:!!n,warning:!!r,text:a||n||r,enabled:a&&ne(a)||n&&ne(n)||r&&ne(r)||!1,maxWidth:y,placement:"bottom-center",children:o.jsx("select",{className:G(U.select,w?U.unSelected:"",c?U.right:"",d?U.small:"",t?U.isInTable:"",q),style:{width:b||"",borderRadius:I||""},onChange:L=>{const{value:R}=L.target;let x;R==="unselected"?x={value:null}:x=l.find(F=>String(F.value)===String(R))||{value:null},g(L,x)},onFocus:T,onBlur:u,tabIndex:S,value:h,disabled:e||f,"data-error":n||null,"data-warning":r||null,"data-testid":v,children:N})})};we.__docgenInfo={description:"",methods:[],displayName:"NativeSelect",props:{borderRadius:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},options:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
2
+ evt: ChangeEvent<HTMLSelectElement>,
3
+ value: ISelectSelectedOption | { value: null },
4
+ ) => void`,signature:{arguments:[{type:{name:"ChangeEvent",elements:[{name:"HTMLSelectElement"}],raw:"ChangeEvent<HTMLSelectElement>"},name:"evt"},{type:{name:"union",raw:"ISelectSelectedOption | { value: null }",elements:[{name:"ISelectSelectedOption"},{name:"signature",type:"object",raw:"{ value: null }",signature:{properties:[{key:"value",value:{name:"null",required:!0}}]}}]},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"noop",computed:!0}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"noop",computed:!0}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"noop",computed:!0}},right:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},selectedOption:{required:!1,tsType:{name:"ISelectSelectedOption"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},groupOrder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},testId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},clearable:{required:!1,tsType:{name:"boolean"},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},hasNonExistentValue:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};const Oe=()=>{const e=M.useRef(null);return[e,()=>{e.current&&e.current.focus()}]};var un=typeof performance=="object"&&typeof performance.now=="function",ve=un?function(){return performance.now()}:function(){return Date.now()};function ye(e){cancelAnimationFrame(e.id)}function cn(e,n){var r=ve();function a(){ve()-r>=n?e.call(null):l.id=requestAnimationFrame(a)}var l={id:requestAnimationFrame(a)};return l}var oe=-1;function he(e){if(e===void 0&&(e=!1),oe===-1||e){var n=document.createElement("div"),r=n.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(n),oe=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return oe}var ee=null;function Te(e){if(e===void 0&&(e=!1),ee===null||e){var n=document.createElement("div"),r=n.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var a=document.createElement("div"),l=a.style;return l.width="100px",l.height="100px",n.appendChild(a),document.body.appendChild(n),n.scrollLeft>0?ee="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?ee="negative":ee="positive-ascending"),document.body.removeChild(n),ee}return ee}var dn=150,mn=function(n,r){return n};function pn(e){var n,r=e.getItemOffset,a=e.getEstimatedTotalSize,l=e.getItemSize,g=e.getOffsetForIndexAndAlignment,T=e.getStartIndexForOffset,u=e.getStopIndexForStartIndex,c=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,S=e.validateProps;return n=function(m){Ge(b,m);function b(v){var t;return t=m.call(this,v)||this,t._instanceProps=c(t.props,ge(t)),t._outerRef=void 0,t._resetIsScrollingTimeoutId=null,t.state={instance:ge(t),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof t.props.initialScrollOffset=="number"?t.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},t._callOnItemsRendered=void 0,t._callOnItemsRendered=le(function(i,s,p,y){return t.props.onItemsRendered({overscanStartIndex:i,overscanStopIndex:s,visibleStartIndex:p,visibleStopIndex:y})}),t._callOnScroll=void 0,t._callOnScroll=le(function(i,s,p){return t.props.onScroll({scrollDirection:i,scrollOffset:s,scrollUpdateWasRequested:p})}),t._getItemStyle=void 0,t._getItemStyle=function(i){var s=t.props,p=s.direction,y=s.itemSize,I=s.layout,f=t._getItemStyleCache(d&&y,d&&I,d&&p),h;if(f.hasOwnProperty(i))h=f[i];else{var w=r(t.props,i,t._instanceProps),N=l(t.props,i,t._instanceProps),q=p==="horizontal"||I==="horizontal",L=p==="rtl",R=q?w:0;f[i]=h={position:"absolute",left:L?void 0:R,right:L?R:void 0,top:q?0:w,height:q?"100%":N,width:q?N:"100%"}}return h},t._getItemStyleCache=void 0,t._getItemStyleCache=le(function(i,s,p){return{}}),t._onScrollHorizontal=function(i){var s=i.currentTarget,p=s.clientWidth,y=s.scrollLeft,I=s.scrollWidth;t.setState(function(f){if(f.scrollOffset===y)return null;var h=t.props.direction,w=y;if(h==="rtl")switch(Te()){case"negative":w=-y;break;case"positive-descending":w=I-p-y;break}return w=Math.max(0,Math.min(w,I-p)),{isScrolling:!0,scrollDirection:f.scrollOffset<w?"forward":"backward",scrollOffset:w,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._onScrollVertical=function(i){var s=i.currentTarget,p=s.clientHeight,y=s.scrollHeight,I=s.scrollTop;t.setState(function(f){if(f.scrollOffset===I)return null;var h=Math.max(0,Math.min(I,y-p));return{isScrolling:!0,scrollDirection:f.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._outerRefSetter=function(i){var s=t.props.outerRef;t._outerRef=i,typeof s=="function"?s(i):s!=null&&typeof s=="object"&&s.hasOwnProperty("current")&&(s.current=i)},t._resetIsScrollingDebounced=function(){t._resetIsScrollingTimeoutId!==null&&ye(t._resetIsScrollingTimeoutId),t._resetIsScrollingTimeoutId=cn(t._resetIsScrolling,dn)},t._resetIsScrolling=function(){t._resetIsScrollingTimeoutId=null,t.setState({isScrolling:!1},function(){t._getItemStyleCache(-1,null)})},t}b.getDerivedStateFromProps=function(t,i){return fn(t,i),S(t),null};var E=b.prototype;return E.scrollTo=function(t){t=Math.max(0,t),this.setState(function(i){return i.scrollOffset===t?null:{scrollDirection:i.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},E.scrollToItem=function(t,i){i===void 0&&(i="auto");var s=this.props,p=s.itemCount,y=s.layout,I=this.state.scrollOffset;t=Math.max(0,Math.min(t,p-1));var f=0;if(this._outerRef){var h=this._outerRef;y==="vertical"?f=h.scrollWidth>h.clientWidth?he():0:f=h.scrollHeight>h.clientHeight?he():0}this.scrollTo(g(this.props,t,i,I,this._instanceProps,f))},E.componentDidMount=function(){var t=this.props,i=t.direction,s=t.initialScrollOffset,p=t.layout;if(typeof s=="number"&&this._outerRef!=null){var y=this._outerRef;i==="horizontal"||p==="horizontal"?y.scrollLeft=s:y.scrollTop=s}this._callPropsCallbacks()},E.componentDidUpdate=function(){var t=this.props,i=t.direction,s=t.layout,p=this.state,y=p.scrollOffset,I=p.scrollUpdateWasRequested;if(I&&this._outerRef!=null){var f=this._outerRef;if(i==="horizontal"||s==="horizontal")if(i==="rtl")switch(Te()){case"negative":f.scrollLeft=-y;break;case"positive-ascending":f.scrollLeft=y;break;default:var h=f.clientWidth,w=f.scrollWidth;f.scrollLeft=w-h-y;break}else f.scrollLeft=y;else f.scrollTop=y}this._callPropsCallbacks()},E.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ye(this._resetIsScrollingTimeoutId)},E.render=function(){var t=this.props,i=t.children,s=t.className,p=t.direction,y=t.height,I=t.innerRef,f=t.innerElementType,h=t.innerTagName,w=t.itemCount,N=t.itemData,q=t.itemKey,L=q===void 0?mn:q,R=t.layout,x=t.outerElementType,A=t.outerTagName,F=t.style,z=t.useIsScrolling,V=t.width,$=this.state.isScrolling,j=p==="horizontal"||R==="horizontal",D=j?this._onScrollHorizontal:this._onScrollVertical,Z=this._getRangeToRender(),te=Z[0],re=Z[1],X=[];if(w>0)for(var k=te;k<=re;k++)X.push(M.createElement(i,{data:N,key:L(k,N),index:k,isScrolling:z?$:void 0,style:this._getItemStyle(k)}));var J=a(this.props,this._instanceProps);return M.createElement(x||A||"div",{className:s,onScroll:D,ref:this._outerRefSetter,style:$e({position:"relative",height:y,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:p},F)},M.createElement(f||h||"div",{children:X,ref:I,style:{height:j?"100%":J,pointerEvents:$?"none":void 0,width:j?J:"100%"}}))},E._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var t=this.props.itemCount;if(t>0){var i=this._getRangeToRender(),s=i[0],p=i[1],y=i[2],I=i[3];this._callOnItemsRendered(s,p,y,I)}}if(typeof this.props.onScroll=="function"){var f=this.state,h=f.scrollDirection,w=f.scrollOffset,N=f.scrollUpdateWasRequested;this._callOnScroll(h,w,N)}},E._getRangeToRender=function(){var t=this.props,i=t.itemCount,s=t.overscanCount,p=this.state,y=p.isScrolling,I=p.scrollDirection,f=p.scrollOffset;if(i===0)return[0,0,0,0];var h=T(this.props,f,this._instanceProps),w=u(this.props,h,f,this._instanceProps),N=!y||I==="backward"?Math.max(1,s):1,q=!y||I==="forward"?Math.max(1,s):1;return[Math.max(0,h-N),Math.max(0,Math.min(i-1,w+q)),h,w]},b}(M.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var fn=function(n,r){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,r.instance},gn=pn({getItemOffset:function(n,r){var a=n.itemSize;return r*a},getItemSize:function(n,r){var a=n.itemSize;return a},getEstimatedTotalSize:function(n){var r=n.itemCount,a=n.itemSize;return a*r},getOffsetForIndexAndAlignment:function(n,r,a,l,g,T){var u=n.direction,c=n.height,d=n.itemCount,S=n.itemSize,m=n.layout,b=n.width,E=u==="horizontal"||m==="horizontal",v=E?b:c,t=Math.max(0,d*S-v),i=Math.min(t,r*S),s=Math.max(0,r*S-v+S+T);switch(a==="smart"&&(l>=s-v&&l<=i+v?a="auto":a="center"),a){case"start":return i;case"end":return s;case"center":{var p=Math.round(s+(i-s)/2);return p<Math.ceil(v/2)?0:p>t+Math.floor(v/2)?t:p}case"auto":default:return l>=s&&l<=i?l:l<s?s:i}},getStartIndexForOffset:function(n,r){var a=n.itemCount,l=n.itemSize;return Math.max(0,Math.min(a-1,Math.floor(r/l)))},getStopIndexForStartIndex:function(n,r,a){var l=n.direction,g=n.height,T=n.itemCount,u=n.itemSize,c=n.layout,d=n.width,S=l==="horizontal"||c==="horizontal",m=r*u,b=S?d:g,E=Math.ceil((b+a-m)/u);return Math.max(0,Math.min(T-1,r+E-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});const vn="_layerContainer_1lbvo_1",yn="_layer_1lbvo_1",hn="_small_1lbvo_23",Tn="_heading_1lbvo_26",Sn="_option_1lbvo_27",bn="_message_1lbvo_28",_n="_focused_1lbvo_64",In="_selected_1lbvo_68",En="_disabled_1lbvo_71",wn="_check_1lbvo_75",On="_optionContent_1lbvo_92",Ln="_label_1lbvo_97",Rn="_icon_1lbvo_104",qn="_details_1lbvo_109",H={layerContainer:vn,layer:yn,small:hn,heading:Tn,option:Sn,message:bn,focused:_n,selected:In,disabled:En,check:wn,optionContent:On,label:Ln,icon:Rn,details:qn},Le=({label:e})=>o.jsx("div",{onClick:n=>n.stopPropagation(),className:H.heading,children:e});Le.__docgenInfo={description:"",methods:[],displayName:"Heading",props:{label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};const Re=({details:e,label:n,icon:r,disabled:a=!1,selected:l=!1,focused:g=!1,onSelectOption:T,actions:u,closeLayer:c,testId:d})=>o.jsxs("div",{className:G(H.option,a?H.disabled:"",l?H.selected:"",g?H.focused:""),onClick:!a&&T?T:void 0,"data-testid":d,children:[o.jsx("div",{className:H.optionContent,children:o.jsxs("span",{className:H.label,title:n,children:[n,r&&o.jsx("span",{className:H.icon,children:r})]})}),e&&o.jsx("div",{className:G(H.details),children:o.jsx(ue,{faint:!0,children:e})}),!!(u!=null&&u.length)&&o.jsx("div",{className:G(H.actions),children:o.jsx(Ue,{actions:u,closeLayer:c})}),o.jsx("span",{className:H.check,children:l?o.jsx(ce,{icon:Ee.CHECK}):null})]});Re.__docgenInfo={description:"",methods:[],displayName:"Option",props:{details:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},icon:{required:!1,tsType:{name:"ReactNode"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},selected:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},focused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onSelectOption:{required:!1,tsType:{name:"signature",type:"function",raw:`(
5
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
6
+ section?: ISelectSectionProps,
7
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"signature",type:"object",raw:`{
8
+ section: ISelectSection;
9
+ selected?: boolean;
10
+ focused?: boolean;
11
+ onSelectOption?: (
12
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
13
+ section?: ISelectSectionProps,
14
+ ) => void;
15
+ closeLayer?: TEmpty;
16
+ }`,signature:{properties:[{key:"section",value:{name:"ISelectSection",required:!0}},{key:"selected",value:{name:"boolean",required:!1}},{key:"focused",value:{name:"boolean",required:!1}},{key:"onSelectOption",value:{name:"signature",type:"function",raw:`(
17
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
18
+ section?: ISelectSectionProps,
19
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSectionProps"},name:"section"}],return:{name:"void"}},required:!1}},{key:"closeLayer",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}}]}},name:"section"}],return:{name:"void"}}},description:""},actions:{required:!1,tsType:{name:"Array",elements:[{name:"any"}],raw:"any[]"},description:""},closeLayer:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const qe=({section:e,selected:n,focused:r,onSelectOption:a,closeLayer:l})=>{const g=M.useContext(me);switch(e.type){case se.HEADING:return o.jsx(Le,{label:e.label});case se.OPTION:default:return o.jsx(Re,{closeLayer:l,actions:e.actions,label:e.label,details:e.details,icon:e.icon,disabled:e.disabled||g,selected:n,focused:r,onSelectOption:a,testId:e.testId})}};qe.__docgenInfo={description:"",methods:[],displayName:"Section",props:{section:{required:!0,tsType:{name:"ISelectSection"},description:""},selected:{required:!1,tsType:{name:"boolean"},description:""},focused:{required:!1,tsType:{name:"boolean"},description:""},onSelectOption:{required:!1,tsType:{name:"signature",type:"function",raw:`(
20
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
21
+ section?: ISelectSectionProps,
22
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"signature",type:"object",raw:`{
23
+ section: ISelectSection;
24
+ selected?: boolean;
25
+ focused?: boolean;
26
+ onSelectOption?: (
27
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
28
+ section?: ISelectSectionProps,
29
+ ) => void;
30
+ closeLayer?: TEmpty;
31
+ }`,signature:{properties:[{key:"section",value:{name:"ISelectSection",required:!0}},{key:"selected",value:{name:"boolean",required:!1}},{key:"focused",value:{name:"boolean",required:!1}},{key:"onSelectOption",value:{name:"signature",type:"function",raw:`(
32
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
33
+ section?: ISelectSectionProps,
34
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSectionProps"},name:"section"}],return:{name:"void"}},required:!1}},{key:"closeLayer",value:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}},required:!1}}]}},name:"section"}],return:{name:"void"}}},description:""},closeLayer:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""}}};const de=(e,n)=>{const a=document.createElement("canvas").getContext("2d");return a?(a.font=n,a.measureText(e).width):0},xe="13px",Ce="12px",xn="Roobert",Cn="sans-serif",Mn=12,Nn=8,An=30,Fn=24,Hn=5,jn=3,Dn=1,kn=2,Se=10,Me=(e=!1,n=!1)=>`${e?Ce:xe} ${n?xn:Cn}`,Pn=(e=!1,n=!1)=>(e?Nn:Mn)+(e?Fn:An)+(n?17:0),be=(e,n,r,a)=>{const l=Me(n,r),g=a?de(a,l):0,T=Math.ceil(e.reduce((c,d)=>{var v;const S=(((v=d==null?void 0:d.actions)==null?void 0:v.length)??0)*24,m=d.icon?parseInt(n?Ce:xe)+7:0,b=`${d.label} ${d.details||""}`,E=de(b,l)+S+m;return c=E>c?E:c,c},g)),u=Pn(n,!0);return T+u},Wn=(e,n,r)=>{const a=Me(!0,r),l=de(e.label,a),g=(n?jn:Hn)*2+Dn*2+kn;return Math.ceil(l+g)},Ne=({listRef:e,isMulti:n,sections:r,selectedOptions:a,onSelectOption:l,focusedOptionIndex:g,width:T,small:u,firstSelectedOptionIndex:c,closeLayer:d,testId:S})=>{M.useEffect(()=>{c&&c!==null&&e.current!==null&&e.current.scrollToItem(c,"start")},[c,e]);const m=u?24:30;return o.jsx("div",{"data-testid":S,className:G(H.layer,u&&H.small),children:r.length?o.jsx(gn,{ref:e,height:r.length<Se?m*r.length:m*Se,itemCount:r.length,itemSize:m,width:T,children:({index:b,style:E})=>{var v;return o.jsx("div",{style:E,children:o.jsx(qe,{closeLayer:d,section:r[b],selected:n&&r[b].type!==se.HEADING&&Array.isArray(a)?a.some(t=>{var i;return t&&(t==null?void 0:t.value)===((i=r==null?void 0:r[b])==null?void 0:i.value)}):!Array.isArray(a)&&((v=r==null?void 0:r[b])==null?void 0:v.value)===(a==null?void 0:a.value),focused:g===b,onSelectOption:t=>l(t,r[b])})})}}):o.jsx("ul",{children:o.jsx("li",{children:o.jsx("div",{className:H.message,style:{width:T},children:"No matches"})})})})};Ne.__docgenInfo={description:"",methods:[],displayName:"Layer",props:{listRef:{required:!0,tsType:{name:"RefObject",elements:[{name:"any"}],raw:"RefObject<any>"},description:""},isMulti:{required:!1,tsType:{name:"boolean"},description:""},sections:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSection"}],raw:"ISelectSection[]"},description:""},selectedOptions:{required:!0,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},onSelectOption:{required:!0,tsType:{name:"signature",type:"function",raw:`(
35
+ event?: React.MouseEvent<HTMLDivElement, MouseEvent>,
36
+ section?: ISelectSection,
37
+ ) => void`,signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"event"},{type:{name:"ISelectSection"},name:"section"}],return:{name:"void"}}},description:""},focusedOptionIndex:{required:!1,tsType:{name:"number"},description:""},width:{required:!0,tsType:{name:"number"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},firstSelectedOptionIndex:{required:!1,tsType:{name:"number"},description:""},closeLayer:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const zn="_inputInTable_7uwhv_1",Gn="_inputHover_7uwhv_13",$n="_inputFocus_7uwhv_18",Un="_inputError_7uwhv_25",Vn="_inputWarning_7uwhv_26",Yn="_inputDisabled_7uwhv_61",Kn="_hideScrollbars_7uwhv_67",Bn="_trigger_7uwhv_77",Zn="_isInTable_7uwhv_93",Xn="_input_7uwhv_1",Jn="_isOpen_7uwhv_114",Qn="_disabled_7uwhv_156",et="_icons_7uwhv_162",nt="_clearAll_7uwhv_169",tt="_iconOpen_7uwhv_170",rt="_small_7uwhv_181",at="_triggerInputContainer_7uwhv_189",it="_right_7uwhv_198",st="_multiOptions_7uwhv_211",lt="_multiOption_7uwhv_211",ot="_label_7uwhv_239",ut="_closeMultiOption_7uwhv_242",ct="_focus_7uwhv_253",dt="_selectedSingleValue_7uwhv_257",mt="_placeHolder_7uwhv_258",pt="_groupOrderFirst_7uwhv_297",ft="_groupOrderMiddle_7uwhv_298",gt="_groupOrderLast_7uwhv_302",vt="_detailedLabel_7uwhv_307",C={inputInTable:zn,inputHover:Gn,inputFocus:$n,inputError:Un,inputWarning:Vn,inputDisabled:Yn,hideScrollbars:Kn,trigger:Bn,isInTable:Zn,input:Xn,isOpen:Jn,disabled:Qn,icons:et,clearAll:nt,iconOpen:tt,small:rt,triggerInputContainer:at,right:it,multiOptions:st,multiOption:lt,label:ot,closeMultiOption:ut,focus:ct,selectedSingleValue:dt,placeHolder:mt,groupOrderFirst:pt,groupOrderMiddle:ft,groupOrderLast:gt,detailedLabel:vt},Ae=({selectedOptions:e,small:n,width:r,testId:a})=>{const[g,T]=M.useState([]),[u,c]=M.useState([]);return M.useEffect(()=>{let d=[],S=[],m=0;e.forEach((b,E)=>{m+=Wn(b,n,!0),E===e.length-1&&m<r||m<r-24?d.push(b):S.push(b)}),T(d),c(S)},[e,!0,r]),o.jsxs("div",{className:C.multiOptions,"data-testid":a&&`${a}-value`,children:[g.filter(d=>d&&d.label).map((d,S)=>o.jsx("span",{className:C.multiOption,onClick:m=>{m.stopPropagation()},children:d.label},S)),u.length>0&&o.jsx(pe,{text:u.map((d,S)=>o.jsx("div",{children:d.label},S)),display:"inline-flex",children:o.jsx("span",{className:C.multiOption,children:g.length?`+${u.length}`:`${u.length} items`})})]})};Ae.__docgenInfo={description:"",methods:[],displayName:"MultiSelectedOptions",props:{selectedOptions:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},width:{required:!0,tsType:{name:"number"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const Fe=({selectedOptions:e,searchable:n=!1,searchValue:r,onChange:a=ae.noop,inputRef:l,error:g,placeholder:T="Select...",small:u,testId:c})=>{const d=M.useRef(null),S=Array.isArray(e),m=S?e.length>0:!!e,b=r?r.length+1:1,E=()=>{var i,s;const v=((i=d.current)==null?void 0:i.offsetWidth)||0,t=((s=l.current)==null?void 0:s.offsetWidth)||0;return v-t};return o.jsxs("div",{className:C.triggerInputContainer,ref:d,children:[m?S?o.jsx(Ae,{selectedOptions:e,small:u,width:E(),testId:c}):o.jsx("span",{className:C.selectedSingleValue,"data-testid":c&&`${c}-value`,children:r!=null&&r.length?"":e==null?void 0:e.label}):o.jsx("span",{className:C.placeHolder,children:r!=null&&r.length?"":T}),n?o.jsx("input",{tabIndex:-1,ref:l,size:b,className:C.input,value:r,onChange:v=>a(v.target.value),"data-error":g||null,"data-testid":c&&`${c}-input`}):null]})};Fe.__docgenInfo={description:"",methods:[],displayName:"Input",props:{selectedOptions:{required:!1,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},searchValue:{required:!1,tsType:{name:"string"},description:""},inputRef:{required:!0,tsType:{name:"MutableRefObject",elements:[{name:"union",raw:"HTMLInputElement | null",elements:[{name:"HTMLInputElement"},{name:"null"}]}],raw:"MutableRefObject<HTMLInputElement | null>"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"noop",computed:!0}},error:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"'Select...'",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};const He=({selectedOptions:e,searchValue:n,searchable:r,clearable:a,onClickTrigger:l,element:g,error:T,warning:u,tooltip:c,small:d,isInTable:S,disabled:m,onChangeSearch:b,onClickDeselect:E,onClickClear:v,tabIndex:t,isOpen:i,triggerRef:s,clearAllIsFocused:p,focusedSelectedOptionIndex:y,onFocus:I,onBlur:f,groupOrder:h,maxTooltipWidth:w,placeholder:N,right:q,testId:L})=>{var j;const[R,x]=Oe(),A=Array.isArray(e)?e.length>0&&((j=e[0])==null?void 0:j.value):e==null?void 0:e.value,F=a&&A,z=(()=>{if(h)switch(h){case ie.FIRST:return C.groupOrderFirst;case ie.LAST:return C.groupOrderLast;default:return C.groupOrderMiddle}return""})(),V=!Array.isArray(e)&&(e!=null&&e.details)?{...e,label:o.jsxs("div",{className:G(C.detailedLabel),children:[o.jsx(ue,{children:e.label}),o.jsx(ue,{muted:!0,children:e.details})]})}:e,$=o.jsxs(o.Fragment,{children:[g,o.jsxs("div",{ref:s,tabIndex:t,className:G(C.trigger,i?C.isOpen:"",m?C.disabled:"",d?C.small:"",S?C.isInTable:"",q?C.right:"",z),onClick:D=>{D.stopPropagation(),typeof x=="function"&&x(),l(D)},onFocus:I,onBlur:f,"data-error":T||null,"data-warning":u||null,"data-testid":L,children:[o.jsx(Fe,{selectedOptions:V,placeholder:N,searchable:r,searchValue:n,inputRef:R,onChange:b,error:T,small:d,testId:L}),o.jsx("span",{className:C.icons,children:F?o.jsx("span",{className:G(C.clearAll,p?C.focus:""),onClick:D=>{D.stopPropagation(),v&&v(D)},"data-testid":L&&`${L}-clear`,children:o.jsx(ce,{icon:Ee.CLOSE})}):o.jsx("span",{className:G(C.iconOpen),children:o.jsx(ce,{icon:"chevron down"})})})]})]});return o.jsx(o.Fragment,{children:o.jsx(pe,{error:!!T,warning:!!u,text:c||T||u,enabled:c&&ne(c)||T&&ne(T)||u&&ne(u)||!1,maxWidth:w,placement:"bottom-center",children:$})})};He.__docgenInfo={description:"",methods:[],displayName:"Trigger",props:{selectedOptions:{required:!1,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},searchValue:{required:!1,tsType:{name:"string"},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},onClickTrigger:{required:!0,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},element:{required:!1,tsType:{name:"ReactNode"},description:""},error:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},warning:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"string | ReactNode",elements:[{name:"string"},{name:"ReactNode"}]},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},onChangeSearch:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""},onClickDeselect:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLDivElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLDivElement, MouseEvent>",elements:[{name:"HTMLDivElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},onClickClear:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.MouseEvent<HTMLSpanElement, MouseEvent>) => void",signature:{arguments:[{type:{name:"ReactMouseEvent",raw:"React.MouseEvent<HTMLSpanElement, MouseEvent>",elements:[{name:"HTMLSpanElement"},{name:"MouseEvent"}]},name:"evt"}],return:{name:"void"}}},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},isOpen:{required:!1,tsType:{name:"boolean"},description:""},triggerRef:{required:!1,tsType:{name:"RefObject",elements:[{name:"HTMLDivElement"}],raw:"RefObject<HTMLDivElement>"},description:""},clearAllIsFocused:{required:!1,tsType:{name:"boolean"},description:""},focusedSelectedOptionIndex:{required:!1,tsType:{name:"number"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.FocusEvent<HTMLDivElement>) => void",signature:{arguments:[{type:{name:"ReactFocusEvent",raw:"React.FocusEvent<HTMLDivElement>",elements:[{name:"HTMLDivElement"}]},name:"evt"}],return:{name:"void"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: React.FocusEvent<HTMLDivElement>) => void",signature:{arguments:[{type:{name:"ReactFocusEvent",raw:"React.FocusEvent<HTMLDivElement>",elements:[{name:"HTMLDivElement"}]},name:"evt"}],return:{name:"void"}}},description:""},groupOrder:{required:!1,tsType:{name:"union",raw:"TGroupOrder | string",elements:[{name:"union",raw:"'first' | 'middle' | 'last'",elements:[{name:"literal",value:"'first'"},{name:"literal",value:"'middle'"},{name:"literal",value:"'last'"}]},{name:"string"}]},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};var W=(e=>(e.SET_VISIBLE_OPTIONS="SET_VISIBLE_OPTIONS",e.RESET_LAYER_FOCUS="RESET_LAYER_FOCUS",e.CLEAR_SEARCH="CLEAR_SEARCH",e.ON_CHANGE_SEARCH="ON_CHANGE_SEARCH",e.FOCUS_TRIGGER_INPUTS="FOCUS_TRIGGER_INPUTS",e.BLUR_TRIGGER_INPUTS="BLUR_TRIGGER_INPUTS",e.FOCUS_LAYER_OPTIONS="FOCUS_LAYER_OPTIONS",e.OPEN_LAYER="OPEN_LAYER",e.CLOSE_LAYER="CLOSE_LAYER",e))(W||{});const je={options:["none","clearAll"],currentIndex:0,currentOption:!1,clearAll:!1},yt=e=>e!==null?e+1:0,De=(e,n)=>{const r=["none",...e.map((l,g)=>l.type!==se.HEADING?g:null).filter(l=>l!==null)],a=yt(n);return{options:r,currentIndex:a,current:r[a]}},ht=(e,n)=>{const r=e==="up"?-1:1,a=n.currentIndex+r,l=(a<0?n.options.length-1:a)%n.options.length,g=n.options[l];return{...n,currentIndex:l,current:g}},Tt=(e,n,r)=>{const a=e==="left"?-1:1,l=n&&n.length?["none",...Array.from({length:n.length},(d,S)=>S),"clearAll"]:["none","clearAll"],g=r.currentIndex+a,T=(g<0?l.length-1:g)%l.length,u=l[T];return{options:l,currentIndex:T,currentOption:u,clearAll:u==="clearAll"}},_e=()=>je,Ie=e=>({...e,currentIndex:0,current:"none"}),St=(e,n)=>{switch(n.type){case W.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:n.options||[]};case W.RESET_LAYER_FOCUS:return{...e,layerFocus:De(n.options||[],n.firstSelectedOptionIndex||0)};case W.CLEAR_SEARCH:return{...e,visibleOptions:n.options||[],searchValue:""};case W.ON_CHANGE_SEARCH:{let a=[...(n.options||[]).filter(l=>(String(l.label)+(l.details?String(l.details):"")).toLowerCase().includes(String(n.value||"").toLowerCase()))];return n.createAble&&n.value&&n.value!==""&&a.push({label:`Create "${n.value}"`,value:n.value,createAble:!0}),{...e,searchValue:n.value,visibleOptions:a,layerFocus:Ie(e.layerFocus)}}case W.FOCUS_TRIGGER_INPUTS:return{...e,triggerFocus:Tt(n.direction||"right",n.selectedOptions||[],e.triggerFocus),layerFocus:Ie(e.layerFocus)};case W.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:_e()};case W.FOCUS_LAYER_OPTIONS:return n.nextLayerFocus?{...e,layerFocus:n.nextLayerFocus,triggerFocus:_e()}:e;case W.OPEN_LAYER:return{...e,isLayerOpen:!0};case W.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},bt={auto:!0,possiblePlacements:["bottom-start","top-start"],placement:"bottom-start",preferX:"right",preferY:"bottom"},_t=({state:e,dispatch:n,options:r,setTriggerFocus:a,disabled:l,disabledContext:g,onCreate:T,onChange:u,selectedOptions:c,width:d,small:S,isFontLoaded:m,placeholder:b,firstSelectedOptionIndex:E,createAble:v,listRef:t,autoLayerWidth:i})=>{const s=()=>{e.isLayerOpen&&n({type:P.CLOSE_LAYER}),a()},p=()=>n({type:P.OPEN_LAYER}),y=M.useRef(!0);M.useEffect(()=>{y.current?y.current=!1:n({type:P.SET_VISIBLE_OPTIONS,options:r})},[r]);const I=(_,O,Q)=>{if(!(l||g)){if(Q&&Q(),O){if(O.createAble&&T)T(O.value);else if(!O.disabled)if(Array.isArray(c))if(c.some(K=>K.label===O.label)){const K=c.filter(fe=>fe.label!==O.label);u&&u(_,K)}else{const K=[...c,O];u&&u(_,K)}else u&&u(_,O)}n({type:P.CLEAR_SEARCH,options:r}),a()}},f=M.useCallback(()=>d?d!=="auto"?d:be(r,S,m,b):"100%",[r,m]),h=M.useCallback(_=>i?Math.max(be(r,S,m,b),_==null?void 0:_.width):_==null?void 0:_.width,[r,m]),{renderLayer:w,layerProps:N,triggerProps:q,triggerBounds:L}=Pe({isOpen:(e==null?void 0:e.isLayerOpen)??!1,overflowContainer:!0,...bt,ResizeObserver,onOutsideClick:s,onParentClose:s}),R=()=>{if(!(l||g)){if(e.isLayerOpen){s();return}n({type:P.RESET_LAYER_FOCUS,options:r,firstSelectedOptionIndex:E}),p()}},x=M.useRef(!0);M.useEffect(()=>{x.current?x.current=!1:e.isLayerOpen||n({type:P.CLEAR_SEARCH,options:r})},[e.isLayerOpen]);const A=(_,O)=>{const Q=c instanceof Array?c.filter(Y=>Y.value!==O.value):null;u&&u(_,Q)},F=_=>{const O=c instanceof Array?[]:{value:null};u&&u(_,O)},z=_=>n({type:P.ON_CHANGE_SEARCH,options:r,value:_,createAble:v}),V=()=>{p(),n({type:P.BLUR_TRIGGER_INPUTS})},$=_=>{t.current&&Number.isInteger(_)&&t.current.scrollToItem(_)},j=_=>{const O=ht(_,e.layerFocus);n({type:P.FOCUS_LAYER_OPTIONS,nextLayerFocus:O}),$(O.current)},D=_=>{n({type:P.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:_,selectedOptions:c})},Z=_=>F(_),te=c&&c[e.triggerFocus.currentOption],re=_=>{A(_,c[e.triggerFocus.currentOption])},X=_=>{var O;I(_,(O=e==null?void 0:e.visibleOptions)==null?void 0:O[e.layerFocus.current],s)},k=e.triggerFocus.clearAll;return{getTriggerWidth:f,onKeyEvent:(_,O)=>{switch(_){case B.UP:{j(_);break}case B.DOWN:{e.isLayerOpen?j(_):V();break}case B.LEFT:case B.RIGHT:{D(_);break}case B.ENTER:{k?Z(O):te?re(O):X(O);break}case B.ESC:{s();break}}},clearAllIsFocused:k,triggerProps:q,onClickTrigger:R,onChangeSearch:z,onClickDeselectOption:A,onClickClearAll:F,renderLayer:w,layerProps:N,closeLayer:s,onSelectOption:I,getLayerWidth:h,triggerBounds:L}},ke=e=>{const{multi:n=!1,disabled:r=!1,error:a=null,warning:l=null,tooltip:g=null,options:T,selectedOptions:u,onCreate:c=null,placeholder:d="",small:S=!1,tabIndex:m=0,onFocus:b=()=>{},onBlur:E=()=>{},searchable:v=!0,clearable:t=!1,maxTooltipWidth:i,closeOnOptionActionClick:s,isInTable:p=!1,groupOrder:y,firstSelectedOptionIndex:I=0,right:f=!1,testId:h=void 0}=e,w=M.useContext(me),N=c!==null,q=M.useRef(null),[L,R]=Oe(),x=!0,[A,F]=M.useReducer(St,{options:T,firstSelectedOptionIndex:I},({options:Y})=>({searchValue:"",visibleOptions:Y,layerFocus:De(Y,I??0),triggerFocus:je,isLayerOpen:!1})),{getTriggerWidth:z,onKeyEvent:V,clearAllIsFocused:$,triggerProps:j,onClickTrigger:D,onChangeSearch:Z,onClickDeselectOption:te,onClickClearAll:re,renderLayer:X,layerProps:k,closeLayer:J,onSelectOption:_,getLayerWidth:O,triggerBounds:Q}=_t({...e,state:A,dispatch:F,setTriggerFocus:R,disabledContext:w,isFontLoaded:x,createAble:N,listRef:q});return o.jsx("div",{style:{width:z()},children:o.jsxs(ze,{handleKeys:Object.values(B),onKeyEvent:V,children:[o.jsx(He,{selectedOptions:u,searchValue:A.searchValue,isOpen:A.isLayerOpen,focusedSelectedOptionIndex:A.triggerFocus.currentOption,clearAllIsFocused:$,searchable:v,triggerRef:We(L,j.ref),error:a,warning:l,tooltip:g,small:S,isInTable:p,disabled:r||w,clearable:t,tabIndex:m,onClickTrigger:D,onChangeSearch:Z,onClickDeselect:te,onClickClear:re,onFocus:b,onBlur:E,groupOrder:y,maxTooltipWidth:i,placeholder:d,right:f,testId:h}),A.isLayerOpen&&X(o.jsx("div",{...k,className:H.layerContainer,children:o.jsx(Ne,{listRef:q,isMulti:n,sections:A.visibleOptions,selectedOptions:u,onSelectOption:(Y,K)=>{_(Y,K,n?void 0:J)},closeLayer:()=>{s&&J()},width:O(Q),small:S,focusedOptionIndex:A.layerFocus.current,firstSelectedOptionIndex:I??0,testId:h&&`${h}-layer`})}))]})})};ke.__docgenInfo={description:"",methods:[],displayName:"CustomSelect",props:{multi:{required:!1,tsType:{name:"boolean"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},options:{required:!0,tsType:{name:"Array",elements:[{name:"union",raw:"ISelectSelectedOption | Heading",elements:[{name:"ISelectSelectedOption"},{name:"Heading"}]}],raw:"TCustomSelectSelectOption[]"},description:""},selectedOptions:{required:!0,tsType:{name:"union",raw:"ISelectSelectedOption | ISelectSelectedOption[]",elements:[{name:"ISelectSelectedOption"},{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"}]},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
38
+ event: TChangeEvent<T>,
39
+ ...additionalProps: { [key: string]: any }[]
40
+ ) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
41
+ target:
42
+ | T
43
+ | { name: string; value: any; label?: string; files?: FileList | null };
44
+ }`,elements:[{name:"ChangeEvent",elements:[{name:"T"}],raw:"ChangeEvent<T>"},{name:"signature",type:"object",raw:`{
45
+ target:
46
+ | T
47
+ | { name: string; value: any; label?: string; files?: FileList | null };
48
+ }`,signature:{properties:[{key:"target",value:{name:"union",raw:`| T
49
+ | { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:""},onCreate:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: string) => void",signature:{arguments:[{type:{name:"string"},name:"value"}],return:{name:"void"}}},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:""},autoLayerWidth:{required:!1,tsType:{name:"boolean"},description:""},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},groupOrder:{required:!1,tsType:{name:"union",raw:"TGroupOrder | string",elements:[{name:"union",raw:"'first' | 'middle' | 'last'",elements:[{name:"literal",value:"'first'"},{name:"literal",value:"'middle'"},{name:"literal",value:"'last'"}]},{name:"string"}]},description:""},firstSelectedOptionIndex:{required:!0,tsType:{name:"union",raw:"number | null",elements:[{name:"number"},{name:"null"}]},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},closeOnOptionActionClick:{required:!1,tsType:{name:"boolean"},description:""},testId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""}}};const It=e=>{const{name:n="",options:r=[],value:a,native:l=!1,onChange:g=ae.noop,deprecatedEventHandler:T=!1,autoScroll:u=!0,warning:c,error:d,checkNonExistentValues:S=!0,closeOnOptionActionClick:m=!0,testId:b,disabled:E}=e,v=!l&&u===!0,{multi:t,simpleInputs:i,options:s,selectedOptions:p,firstSelectedOptionIndex:y,hasNonExistentValue:I}=Ve(r,a,v,S),f=!t,h=l&&f;l&&!f&&console.warn("Native select does not support provided props (see stories)");const w="Value no longer available for re-selection",N=I&&!E?c?o.jsxs("div",{children:[o.jsx("div",{children:w}),o.jsx("div",{children:c})]}):w:c,q=I&&d&&!E?o.jsxs("div",{children:[o.jsx("div",{children:w}),o.jsx("div",{children:d})]}):d,L=(R,x)=>{if(T){const A=t?x.map(F=>i?F.value:F):i?x.value:x;A&&g(A)}else{const A=!(R instanceof Event),F=t?x:x.value;if(A)R.target.name=n,R.target.value=F,t||(R.target.label=x.label),g(R);else{const z={...R,target:{...R.target,name:n,value:F,label:t?void 0:x.label}};g(z)}}};return h?o.jsx(we,{...e,options:s,selectedOption:p,onChange:L,hasNonExistentValue:I,warning:N,error:q,testId:b}):o.jsx(ke,{...e,options:s,selectedOptions:p,onChange:L,multi:t,firstSelectedOptionIndex:y,warning:N,error:q,testId:b,closeOnOptionActionClick:m})};It.__docgenInfo={description:"",methods:[],displayName:"Select",props:{name:{required:!1,tsType:{name:"string"},description:""},multi:{required:!1,tsType:{name:"boolean"},description:""},options:{required:!1,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},value:{required:!1,tsType:{name:"any"},description:""},native:{required:!1,tsType:{name:"boolean"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
50
+ event: TChangeEvent<T>,
51
+ ...additionalProps: { [key: string]: any }[]
52
+ ) => void`,signature:{arguments:[{type:{name:"intersection",raw:`ChangeEvent<T> & {
53
+ target:
54
+ | T
55
+ | { name: string; value: any; label?: string; files?: FileList | null };
56
+ }`,elements:[{name:"ChangeEvent",elements:[{name:"T"}],raw:"ChangeEvent<T>"},{name:"signature",type:"object",raw:`{
57
+ target:
58
+ | T
59
+ | { name: string; value: any; label?: string; files?: FileList | null };
60
+ }`,signature:{properties:[{key:"target",value:{name:"union",raw:`| T
61
+ | { name: string; value: any; label?: string; files?: FileList | null }`,elements:[{name:"T"},{name:"signature",type:"object",raw:"{ name: string; value: any; label?: string; files?: FileList | null }",signature:{properties:[{key:"name",value:{name:"string",required:!0}},{key:"value",value:{name:"any",required:!0}},{key:"label",value:{name:"string",required:!1}},{key:"files",value:{name:"union",raw:"FileList | null",elements:[{name:"FileList"},{name:"null"}],required:!1}}]}}],required:!0}}]}}]},name:"event"},{type:{name:"Array",elements:[{name:"signature",type:"object",raw:"{ [key: string]: any }",signature:{properties:[{key:{name:"string"},value:{name:"any",required:!0}}]}}],raw:"{ [key: string]: any }[]"},name:"additionalProps",rest:!0}],return:{name:"void"}}},description:""},deprecatedEventHandler:{required:!1,tsType:{name:"boolean"},description:""},autoScroll:{required:!1,tsType:{name:"boolean"},description:""},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | ReactNode",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactNode"}]},description:""},checkNonExistentValues:{required:!1,tsType:{name:"boolean"},description:""},closeOnOptionActionClick:{required:!1,tsType:{name:"boolean"},description:""},small:{required:!1,tsType:{name:"boolean"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:""},borderRadius:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},onCreate:{required:!1,tsType:{name:"signature",type:"function",raw:"(evt: any) => any",signature:{arguments:[{type:{name:"any"},name:"evt"}],return:{name:"any"}}},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:""},clearable:{required:!1,tsType:{name:"boolean"},description:""},searchable:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},autoLayerWidth:{required:!1,tsType:{name:"boolean"},description:""},right:{required:!1,tsType:{name:"boolean"},description:""},tabIndex:{required:!1,tsType:{name:"number"},description:""},testId:{required:!1,tsType:{name:"string"},description:""}}};export{It as S};