@oliasoft-open-source/react-ui-library 4.11.0-beta-3 → 4.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/404.html +1 -0
  2. package/dist/index.js +78 -58
  3. package/dist/index.js.map +1 -1
  4. package/dist/storybook/assets/{Color-KGDBMAHA-DeGjmgTY.js → Color-KGDBMAHA-C4DMqLTk.js} +1 -1
  5. package/dist/storybook/assets/{DocsRenderer-PKQXORMH-DJIj_qEG.js → DocsRenderer-PKQXORMH-4sK5I5fh.js} +1 -1
  6. package/dist/storybook/assets/{accordion.stories-BTxV-ybU.js → accordion.stories-BSRBp5Mg.js} +2 -2
  7. package/dist/storybook/assets/{afe.stories-DFQsvqIV.js → afe.stories-DM18uTAa.js} +2 -2
  8. package/dist/storybook/assets/{buttons-and-links-BHGzZGPV.js → buttons-and-links-BAJT7RF7.js} +1 -1
  9. package/dist/storybook/assets/{casing-loads.stories-CJpnsmsZ.js → casing-loads.stories-CE6GJ021.js} +2 -2
  10. package/dist/storybook/assets/{cell.stories-Bpl0Squh.js → cell.stories-BkZwSf40.js} +2 -2
  11. package/dist/storybook/assets/check-box.stories-BJ0ShmeC.js +97 -0
  12. package/dist/storybook/assets/check-box.test-case.stories-CzuYZkUh.js +30 -0
  13. package/dist/storybook/assets/{chunk-HLWAVYOI-D2p4xoma.js → chunk-HLWAVYOI-wyESLsMA.js} +1 -1
  14. package/dist/storybook/assets/{color-D9KYOiNh.js → color-CXm-Xks7.js} +1 -1
  15. package/dist/storybook/assets/enum-Bnn40S8Q.js +1 -0
  16. package/dist/storybook/assets/footer.stories-C1SojIiD.js +3 -0
  17. package/dist/storybook/assets/form.stories-BLcmnfy8.js +49 -0
  18. package/dist/storybook/assets/{formation.stories-BT8VrcqV.js → formation.stories-DZ9-Ct5F.js} +2 -2
  19. package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
  20. package/dist/storybook/assets/iframe-DGCZgYKU.js +2 -0
  21. package/dist/storybook/assets/{index-C0Iaso0O.js → index-D-ApmKaY.js} +88 -88
  22. package/dist/storybook/assets/{index-CNkaN_wz.js → index-DHATsyTR.js} +1 -1
  23. package/dist/storybook/assets/{input-group.stories-CElwRt3p.js → input-group.stories-EhmORqH9.js} +3 -3
  24. package/dist/storybook/assets/{input-validation-Ccgprl1C.js → input-validation-BdnKKR1J.js} +2 -2
  25. package/dist/storybook/assets/{inputs-DtQ245kS.js → inputs-Cpi6xZLB.js} +2 -2
  26. package/dist/storybook/assets/{layout-forms-Bm7FYA3V.js → layout-forms-DxC0zO_Y.js} +5 -5
  27. package/dist/storybook/assets/{layout-general-V7ekuEG7.js → layout-general-Be4RMwPl.js} +1 -1
  28. package/dist/storybook/assets/menu.stories-DLJSzJa-.js +82 -0
  29. package/dist/storybook/assets/menu.test-case.stories-DyrNbGBs.js +3 -0
  30. package/dist/storybook/assets/modal.stories-DOgeTuHT.js +200 -0
  31. package/dist/storybook/assets/modal.test-case.stories-DQ1Izuq6.js +21 -0
  32. package/dist/storybook/assets/{number-input-Bpg4Yqmo.js → number-input-CJJvhIIv.js} +1 -1
  33. package/dist/storybook/assets/number-input.stories-CKVq60XH.js +89 -0
  34. package/dist/storybook/assets/number-input.test-case.stories-Dh1F7N8M.js +92 -0
  35. package/dist/storybook/assets/{padding-and-spacing-IKi7rvQ-.js → padding-and-spacing-BZdh5XRo.js} +1 -1
  36. package/dist/storybook/assets/{pagination-CLt-kUlx.js → pagination-DWc8zp3k.js} +1 -1
  37. package/dist/storybook/assets/{pagination.stories-CTRM0Xou.js → pagination.stories-B5cOvzik.js} +2 -2
  38. package/dist/storybook/assets/popover.stories-p9_-pH_Q.js +10 -0
  39. package/dist/storybook/assets/{preview-ZgLLfBPl.js → preview-B3bzTGOp.js} +2 -2
  40. package/dist/storybook/assets/{preview-CtQzjqBP.js → preview-NGnahGuq.js} +1 -1
  41. package/dist/storybook/assets/{projects.stories-BQswWVCx.js → projects.stories-Co_WnKSx.js} +2 -2
  42. package/dist/storybook/assets/{radio-button-DmDuw4DA.js → radio-button-C4ljBRED.js} +1 -1
  43. package/dist/storybook/assets/radio-button.stories-D1rWr6ms.js +61 -0
  44. package/dist/storybook/assets/radio-button.test-case.stories-DglmHlWs.js +11 -0
  45. package/dist/storybook/assets/{reservoirs.stories-B12tIrmZ.js → reservoirs.stories-UW_8sofe.js} +2 -2
  46. package/dist/storybook/assets/{rich-text-input.stories-DkaOBgbE.js → rich-text-input.stories-CK_OTGiV.js} +3 -3
  47. package/dist/storybook/assets/{row.stories-msEoNdGI.js → row.stories-D11wLSt6.js} +2 -2
  48. package/dist/storybook/assets/select-03uRbc4I.js +61 -0
  49. package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
  50. package/dist/storybook/assets/select.stories-Bpffz9TF.js +498 -0
  51. package/dist/storybook/assets/select.stories-data-DxgWKlU6.js +1 -0
  52. package/dist/storybook/assets/select.test-case.stories-DwDNDHax.js +82 -0
  53. package/dist/storybook/assets/{site.stories-umpPYjkq.js → site.stories-ZGohyW6Z.js} +2 -2
  54. package/dist/storybook/assets/{table-5Y5KPNSk.js → table-DyOsClUv.js} +1 -1
  55. package/dist/storybook/assets/{table.stories-Clltxls0.js → table.stories-C1GgZCCR.js} +2 -2
  56. package/dist/storybook/assets/{tabs-C3NG6m9W.js → tabs-BoToLVEP.js} +1 -1
  57. package/dist/storybook/assets/tabs.stories-B52iEaHf.js +30 -0
  58. package/dist/storybook/assets/{title.stories-CsrYTGde.js → title.stories-jatDyjoM.js} +3 -3
  59. package/dist/storybook/assets/toaster.stories-G6nKp3uV.js +84 -0
  60. package/dist/storybook/assets/toaster.test-case.stories-CCHTh_U1.js +6 -0
  61. package/dist/storybook/assets/toggle.stories-BAislK3I.js +106 -0
  62. package/dist/storybook/assets/toggle.test-case.stories-CeUwdhGD.js +36 -0
  63. package/dist/storybook/assets/{tooltip.test-case.stories-CHibN8rC.js → tooltip.test-case.stories-C0wxGvKJ.js} +1 -1
  64. package/dist/storybook/assets/unit-input-CooRJQnF.js +10 -0
  65. package/dist/storybook/assets/unit-input.stories-zmSrl6iW.js +198 -0
  66. package/dist/storybook/assets/unit-input.test-case.stories-C1xRJ1EZ.js +220 -0
  67. package/dist/storybook/assets/unit-table.stories-Bl2gHPKG.js +152 -0
  68. package/dist/storybook/assets/unit-table.test-case.stories-DpSewGv4.js +1 -0
  69. package/dist/storybook/assets/use-previous-D775JrO6.js +1 -0
  70. package/dist/storybook/iframe.html +1 -1
  71. package/dist/storybook/index.json +1 -1
  72. package/dist/storybook/project.json +1 -1
  73. package/package.json +1 -1
  74. package/dist/storybook/assets/check-box.stories-DfbWw6mD.js +0 -126
  75. package/dist/storybook/assets/footer.stories-DgjDE_JR.js +0 -3
  76. package/dist/storybook/assets/form.stories-BrUnmw7R.js +0 -49
  77. package/dist/storybook/assets/iframe-B8VgeFPT.js +0 -2
  78. package/dist/storybook/assets/initialize-context-DOqEe1Xq.js +0 -1
  79. package/dist/storybook/assets/menu.stories-xWX80Eh2.js +0 -84
  80. package/dist/storybook/assets/modal.stories-LhoWfDE6.js +0 -220
  81. package/dist/storybook/assets/number-input.stories-DhCjZ37u.js +0 -180
  82. package/dist/storybook/assets/popover.stories-CGm0M5fv.js +0 -10
  83. package/dist/storybook/assets/radio-button.stories-5gvV0LD0.js +0 -71
  84. package/dist/storybook/assets/select-DnRuRG_N.js +0 -61
  85. package/dist/storybook/assets/select.input-D0UkAPd9.js +0 -1
  86. package/dist/storybook/assets/select.stories-B9w9ONzj.js +0 -579
  87. package/dist/storybook/assets/tabs.stories-dsXjRHJy.js +0 -30
  88. package/dist/storybook/assets/toaster.stories-HO4VBTy-.js +0 -89
  89. package/dist/storybook/assets/toggle.stories-qTHFTXxI.js +0 -141
  90. package/dist/storybook/assets/unit-input.stories-QnEpR0rY.js +0 -426
  91. package/dist/storybook/assets/unit-table.stories-BZCc0yfc.js +0 -152
@@ -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-DnRuRG_N.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"./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-D0UkAPd9.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-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);/*!
2
2
  * isobject <https://github.com/jonschlinkert/isobject>
3
3
  *
4
4
  * Copyright (c) 2014-2017, Jon Schlinkert.
@@ -178,7 +178,7 @@ ${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,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_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 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.
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.
182
182
  1. Item (*italic*)
183
183
  2. Item (**bold**)
184
184
  3. Item (\`code\`)
@@ -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 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};
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};
@@ -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-5Y5KPNSk.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-CLt-kUlx.js";import"./select-DnRuRG_N.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-D0UkAPd9.js";import"./input-DTXbDJaL.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-Bpg4Yqmo.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 Ie={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-DyOsClUv.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-CJJvhIIv.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 => {
2
2
  return <Table
3
3
  // eslint-disable-next-line react/jsx-props-no-spreading
4
4
  {...args} />;
@@ -127,4 +127,4 @@ import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJv
127
127
  rows
128
128
  }} />
129
129
  </>;
130
- }`,...(q=(U=w.parameters)==null?void 0:U.docs)==null?void 0:q.source}}};const Ve=["ActiveRow","ErrorRow","WarningRow","RowFocusEvent","NotStriped","Expandable","DragAndDrop","OnRowEnter"];export{i as ActiveRow,m as DragAndDrop,p as ErrorRow,u as Expandable,t as NotStriped,w as OnRowEnter,d as RowFocusEvent,c as WarningRow,Ve as __namedExportsOrder,Ie as default};
130
+ }`,...(q=(U=w.parameters)==null?void 0:U.docs)==null?void 0:q.source}}};const Pe=["ActiveRow","ErrorRow","WarningRow","RowFocusEvent","NotStriped","Expandable","DragAndDrop","OnRowEnter"];export{i as ActiveRow,m as DragAndDrop,p as ErrorRow,u as Expandable,t as NotStriped,w as OnRowEnter,d as RowFocusEvent,c as WarningRow,Pe as __namedExportsOrder,Be as default};
@@ -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 x}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 ze,m as We}from"./tooltip-1V7clEnw.js";import{A as P,E as B,K as Ge}from"./enum-Bnn40S8Q.js";import{a as $e,_ as Ue}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 Ve}from"./actions-D-uVCDzk.js";import{I as ce}from"./icon-BSFY3vDO.js";import{s as Ye}from"./select.input-CJed_LLR.js";const Ke="_inputInTable_1nzfr_1",Be="_error_1nzfr_7",Ze="_warning_1nzfr_7",Xe="_inputHover_1nzfr_13",Je="_inputFocus_1nzfr_18",Qe="_inputError_1nzfr_25",en="_inputWarning_1nzfr_26",nn="_inputDisabled_1nzfr_61",tn="_hideScrollbars_1nzfr_67",rn="_select_1nzfr_77",an="_isInTable_1nzfr_121",sn="_unSelected_1nzfr_133",ln="_small_1nzfr_174",on="_right_1nzfr_182",un="_groupOrderFirst_1nzfr_193",cn="_groupOrderMiddle_1nzfr_194",dn="_groupOrderLast_1nzfr_198",z={inputInTable:Ke,error:Be,warning:Ze,inputHover:Xe,inputFocus:Je,inputError:Qe,inputWarning:en,inputDisabled:nn,hideScrollbars:tn,select:rn,isInTable:an,unSelected:sn,small:ln,right:on,groupOrderFirst:un,groupOrderMiddle:cn,groupOrderLast:dn},Oe=({disabled:e=!1,error:n=null,warning:r=null,tooltip:a=null,options:s,onChange:g=ae.noop,onFocus:S=ae.noop,onBlur:u=ae.noop,right:c=!1,small:d=!1,tabIndex:T=0,selectedOption:m,width:_=null,groupOrder:E=null,testId:v,isInTable:t=!1,clearable:i,placeholder:l,hasNonExistentValue:p,maxTooltipWidth:y,borderRadius:I})=>{const f=x.useContext(me),h=m===null||(m==null?void 0:m.value)===null?"unselected":m==null?void 0:m.value,O=h==="unselected",N=(h==="unselected"||i?[o.jsx("option",{value:"unselected",disabled:!i,hidden:!i,children:l||"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(s.map((R,q)=>o.jsx("option",{value:R.value,"data-testid":R.testId,children:R.label},q))),C=(()=>{if(E)switch(E){case ie.FIRST:return z.groupOrderFirst;case ie.LAST:return z.groupOrderLast;default:return z.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(z.select,O?z.unSelected:"",n?z.error:r?z.warning:"",c?z.right:"",d?z.small:"",t?z.isInTable:"",C),style:{width:_||"",borderRadius:I||""},onChange:R=>{const{value:q}=R.target;let M;q==="unselected"?M={value:null}:M=s.find(F=>String(F.value)===String(q))||{value:null},g(R,M)},onFocus:S,onBlur:u,tabIndex:T,value:h,disabled:e||f,"data-testid":v,children:N})})};Oe.__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 we=()=>{const e=x.useRef(null);return[e,()=>{e.current&&e.current.focus()}]},Le=()=>{const[e,n]=x.useState(!1);return x.useEffect(()=>{(async()=>{document.fonts&&await document.fonts.ready.then(()=>n(!0))})()},[]),e};var mn=typeof performance=="object"&&typeof performance.now=="function",ve=mn?function(){return performance.now()}:function(){return Date.now()};function ye(e){cancelAnimationFrame(e.id)}function pn(e,n){var r=ve();function a(){ve()-r>=n?e.call(null):s.id=requestAnimationFrame(a)}var s={id:requestAnimationFrame(a)};return s}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 Se(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"),s=a.style;return s.width="100px",s.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 fn=150,gn=function(n,r){return n};function vn(e){var n,r=e.getItemOffset,a=e.getEstimatedTotalSize,s=e.getItemSize,g=e.getOffsetForIndexAndAlignment,S=e.getStartIndexForOffset,u=e.getStopIndexForStartIndex,c=e.initInstanceProps,d=e.shouldResetStyleCacheOnItemSizeChange,T=e.validateProps;return n=function(m){$e(_,m);function _(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,l,p,y){return t.props.onItemsRendered({overscanStartIndex:i,overscanStopIndex:l,visibleStartIndex:p,visibleStopIndex:y})}),t._callOnScroll=void 0,t._callOnScroll=le(function(i,l,p){return t.props.onScroll({scrollDirection:i,scrollOffset:l,scrollUpdateWasRequested:p})}),t._getItemStyle=void 0,t._getItemStyle=function(i){var l=t.props,p=l.direction,y=l.itemSize,I=l.layout,f=t._getItemStyleCache(d&&y,d&&I,d&&p),h;if(f.hasOwnProperty(i))h=f[i];else{var O=r(t.props,i,t._instanceProps),N=s(t.props,i,t._instanceProps),C=p==="horizontal"||I==="horizontal",R=p==="rtl",q=C?O:0;f[i]=h={position:"absolute",left:R?void 0:q,right:R?q:void 0,top:C?0:O,height:C?"100%":N,width:C?N:"100%"}}return h},t._getItemStyleCache=void 0,t._getItemStyleCache=le(function(i,l,p){return{}}),t._onScrollHorizontal=function(i){var l=i.currentTarget,p=l.clientWidth,y=l.scrollLeft,I=l.scrollWidth;t.setState(function(f){if(f.scrollOffset===y)return null;var h=t.props.direction,O=y;if(h==="rtl")switch(Se()){case"negative":O=-y;break;case"positive-descending":O=I-p-y;break}return O=Math.max(0,Math.min(O,I-p)),{isScrolling:!0,scrollDirection:f.scrollOffset<O?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._onScrollVertical=function(i){var l=i.currentTarget,p=l.clientHeight,y=l.scrollHeight,I=l.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 l=t.props.outerRef;t._outerRef=i,typeof l=="function"?l(i):l!=null&&typeof l=="object"&&l.hasOwnProperty("current")&&(l.current=i)},t._resetIsScrollingDebounced=function(){t._resetIsScrollingTimeoutId!==null&&ye(t._resetIsScrollingTimeoutId),t._resetIsScrollingTimeoutId=pn(t._resetIsScrolling,fn)},t._resetIsScrolling=function(){t._resetIsScrollingTimeoutId=null,t.setState({isScrolling:!1},function(){t._getItemStyleCache(-1,null)})},t}_.getDerivedStateFromProps=function(t,i){return yn(t,i),T(t),null};var E=_.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 l=this.props,p=l.itemCount,y=l.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,l=t.initialScrollOffset,p=t.layout;if(typeof l=="number"&&this._outerRef!=null){var y=this._outerRef;i==="horizontal"||p==="horizontal"?y.scrollLeft=l:y.scrollTop=l}this._callPropsCallbacks()},E.componentDidUpdate=function(){var t=this.props,i=t.direction,l=t.layout,p=this.state,y=p.scrollOffset,I=p.scrollUpdateWasRequested;if(I&&this._outerRef!=null){var f=this._outerRef;if(i==="horizontal"||l==="horizontal")if(i==="rtl")switch(Se()){case"negative":f.scrollLeft=-y;break;case"positive-ascending":f.scrollLeft=y;break;default:var h=f.clientWidth,O=f.scrollWidth;f.scrollLeft=O-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,l=t.className,p=t.direction,y=t.height,I=t.innerRef,f=t.innerElementType,h=t.innerTagName,O=t.itemCount,N=t.itemData,C=t.itemKey,R=C===void 0?gn:C,q=t.layout,M=t.outerElementType,A=t.outerTagName,F=t.style,$=t.useIsScrolling,V=t.width,U=this.state.isScrolling,j=p==="horizontal"||q==="horizontal",D=j?this._onScrollHorizontal:this._onScrollVertical,Z=this._getRangeToRender(),te=Z[0],re=Z[1],X=[];if(O>0)for(var k=te;k<=re;k++)X.push(x.createElement(i,{data:N,key:R(k,N),index:k,isScrolling:$?U:void 0,style:this._getItemStyle(k)}));var J=a(this.props,this._instanceProps);return x.createElement(M||A||"div",{className:l,onScroll:D,ref:this._outerRefSetter,style:Ue({position:"relative",height:y,width:V,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:p},F)},x.createElement(f||h||"div",{children:X,ref:I,style:{height:j?"100%":J,pointerEvents:U?"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(),l=i[0],p=i[1],y=i[2],I=i[3];this._callOnItemsRendered(l,p,y,I)}}if(typeof this.props.onScroll=="function"){var f=this.state,h=f.scrollDirection,O=f.scrollOffset,N=f.scrollUpdateWasRequested;this._callOnScroll(h,O,N)}},E._getRangeToRender=function(){var t=this.props,i=t.itemCount,l=t.overscanCount,p=this.state,y=p.isScrolling,I=p.scrollDirection,f=p.scrollOffset;if(i===0)return[0,0,0,0];var h=S(this.props,f,this._instanceProps),O=u(this.props,h,f,this._instanceProps),N=!y||I==="backward"?Math.max(1,l):1,C=!y||I==="forward"?Math.max(1,l):1;return[Math.max(0,h-N),Math.max(0,Math.min(i-1,O+C)),h,O]},_}(x.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var yn=function(n,r){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,r.instance},hn=vn({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,s,g,S){var u=n.direction,c=n.height,d=n.itemCount,T=n.itemSize,m=n.layout,_=n.width,E=u==="horizontal"||m==="horizontal",v=E?_:c,t=Math.max(0,d*T-v),i=Math.min(t,r*T),l=Math.max(0,r*T-v+T+S);switch(a==="smart"&&(s>=l-v&&s<=i+v?a="auto":a="center"),a){case"start":return i;case"end":return l;case"center":{var p=Math.round(l+(i-l)/2);return p<Math.ceil(v/2)?0:p>t+Math.floor(v/2)?t:p}case"auto":default:return s>=l&&s<=i?s:s<l?l:i}},getStartIndexForOffset:function(n,r){var a=n.itemCount,s=n.itemSize;return Math.max(0,Math.min(a-1,Math.floor(r/s)))},getStopIndexForStartIndex:function(n,r,a){var s=n.direction,g=n.height,S=n.itemCount,u=n.itemSize,c=n.layout,d=n.width,T=s==="horizontal"||c==="horizontal",m=r*u,_=T?d:g,E=Math.ceil((_+a-m)/u);return Math.max(0,Math.min(S-1,r+E-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});const Sn="_layerContainer_1lbvo_1",Tn="_layer_1lbvo_1",_n="_small_1lbvo_23",bn="_heading_1lbvo_26",In="_option_1lbvo_27",En="_message_1lbvo_28",On="_focused_1lbvo_64",wn="_selected_1lbvo_68",Ln="_disabled_1lbvo_71",Rn="_check_1lbvo_75",qn="_optionContent_1lbvo_92",xn="_label_1lbvo_97",Cn="_icon_1lbvo_104",Mn="_details_1lbvo_109",H={layerContainer:Sn,layer:Tn,small:_n,heading:bn,option:In,message:En,focused:On,selected:wn,disabled:Ln,check:Rn,optionContent:qn,label:xn,icon:Cn,details:Mn},Re=({label:e})=>o.jsx("div",{onClick:n=>n.stopPropagation(),className:H.heading,children:e});Re.__docgenInfo={description:"",methods:[],displayName:"Heading",props:{label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};const qe=({details:e,label:n,icon:r,disabled:a=!1,selected:s=!1,focused:g=!1,onSelectOption:S,actions:u,closeLayer:c,testId:d})=>o.jsxs("div",{className:G(H.option,a?H.disabled:"",s?H.selected:"",g?H.focused:""),onClick:!a&&S?S: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(Ve,{actions:u,closeLayer:c})}),o.jsx("span",{className:H.check,children:s?o.jsx(ce,{icon:Ee.CHECK}):null})]});qe.__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 xe=({section:e,selected:n,focused:r,onSelectOption:a,closeLayer:s})=>{const g=x.useContext(me);switch(e.type){case se.HEADING:return o.jsx(Re,{label:e.label});case se.OPTION:default:return o.jsx(qe,{closeLayer:s,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})}};xe.__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},Ce="13px",Me="12px",Nn="Roobert",An="sans-serif",Fn=12,Hn=8,jn=30,Dn=24,kn=5,Pn=3,zn=1,Wn=2,Te=10,Ne=(e=!1,n=!1)=>`${e?Me:Ce} ${n?Nn:An}`,Gn=(e=!1,n=!1)=>(e?Hn:Fn)+(e?Dn:jn)+(n?17:0),_e=(e,n,r,a)=>{const s=Ne(n,r),g=a?de(a,s):0,S=Math.ceil(e.reduce((c,d)=>{var v;const T=(((v=d==null?void 0:d.actions)==null?void 0:v.length)??0)*24,m=d.icon?parseInt(n?Me:Ce)+7:0,_=`${d.label} ${d.details||""}`,E=de(_,s)+T+m;return c=E>c?E:c,c},g)),u=Gn(n,!0);return S+u},$n=(e,n,r)=>{const a=Ne(!0,r),s=de(e.label,a),g=(n?Pn:kn)*2+zn*2+Wn;return Math.ceil(s+g)},Ae=({listRef:e,isMulti:n,sections:r,selectedOptions:a,onSelectOption:s,focusedOptionIndex:g,width:S,small:u,firstSelectedOptionIndex:c,closeLayer:d,testId:T})=>{x.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":T,className:G(H.layer,u&&H.small),children:r.length?o.jsx(hn,{ref:e,height:r.length<Te?m*r.length:m*Te,itemCount:r.length,itemSize:m,width:S,children:({index:_,style:E})=>{var v;return o.jsx("div",{style:E,children:o.jsx(xe,{closeLayer:d,section:r[_],selected:n&&r[_].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[_])==null?void 0:i.value)}):!Array.isArray(a)&&((v=r==null?void 0:r[_])==null?void 0:v.value)===(a==null?void 0:a.value),focused:g===_,onSelectOption:t=>s(t,r[_])})})}}):o.jsx("ul",{children:o.jsx("li",{children:o.jsx("div",{className:H.message,style:{width:S},children:"No matches"})})})})};Ae.__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 Un="_inputInTable_nec64_1",Vn="_error_nec64_7",Yn="_warning_nec64_7",Kn="_inputHover_nec64_13",Bn="_inputFocus_nec64_18",Zn="_inputError_nec64_25",Xn="_inputWarning_nec64_26",Jn="_inputDisabled_nec64_61",Qn="_hideScrollbars_nec64_67",et="_trigger_nec64_77",nt="_isInTable_nec64_93",tt="_input_nec64_1",rt="_isOpen_nec64_114",at="_disabled_nec64_156",it="_icons_nec64_162",st="_clearAll_nec64_169",lt="_iconOpen_nec64_170",ot="_small_nec64_181",ut="_triggerInputContainer_nec64_189",ct="_right_nec64_198",dt="_multiOptions_nec64_211",mt="_multiOption_nec64_211",pt="_label_nec64_239",ft="_closeMultiOption_nec64_242",gt="_focus_nec64_253",vt="_selectedSingleValue_nec64_257",yt="_placeHolder_nec64_258",ht="_groupOrderFirst_nec64_297",St="_groupOrderMiddle_nec64_298",Tt="_groupOrderLast_nec64_302",_t="_detailedLabel_nec64_307",L={inputInTable:Un,error:Vn,warning:Yn,inputHover:Kn,inputFocus:Bn,inputError:Zn,inputWarning:Xn,inputDisabled:Jn,hideScrollbars:Qn,trigger:et,isInTable:nt,input:tt,isOpen:rt,disabled:at,icons:it,clearAll:st,iconOpen:lt,small:ot,triggerInputContainer:ut,right:ct,multiOptions:dt,multiOption:mt,label:pt,closeMultiOption:ft,focus:gt,selectedSingleValue:vt,placeHolder:yt,groupOrderFirst:ht,groupOrderMiddle:St,groupOrderLast:Tt,detailedLabel:_t},Fe=({selectedOptions:e,small:n,width:r,testId:a})=>{const s=Le(),[g,S]=x.useState([]),[u,c]=x.useState([]);return x.useEffect(()=>{let d=[],T=[],m=0;e.forEach((_,E)=>{m+=$n(_,n,s),E===e.length-1&&m<r||m<r-24?d.push(_):T.push(_)}),S(d),c(T)},[e,s,r]),o.jsxs("div",{className:L.multiOptions,"data-testid":a&&`${a}-value`,children:[g.filter(d=>d&&d.label).map((d,T)=>o.jsx("span",{className:L.multiOption,onClick:m=>{m.stopPropagation()},children:d.label},T)),u.length>0&&o.jsx(pe,{text:u.map((d,T)=>o.jsx("div",{children:d.label},T)),display:"inline-flex",children:o.jsx("span",{className:L.multiOption,children:g.length?`+${u.length}`:`${u.length} items`})})]})};Fe.__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 He=({selectedOptions:e,searchable:n=!1,searchValue:r,onChange:a=ae.noop,inputRef:s,error:g,placeholder:S="Select...",small:u,testId:c})=>{const d=x.useRef(null),T=Array.isArray(e),m=T?e.length>0:!!e,_=r?r.length+1:1,E=()=>{var i,l;const v=((i=d.current)==null?void 0:i.offsetWidth)||0,t=((l=s.current)==null?void 0:l.offsetWidth)||0;return v-t};return o.jsxs("div",{className:L.triggerInputContainer,ref:d,children:[m?T?o.jsx(Fe,{selectedOptions:e,small:u,width:E(),testId:c}):o.jsx("span",{className:L.selectedSingleValue,"data-testid":c&&`${c}-value`,children:r!=null&&r.length?"":e==null?void 0:e.label}):o.jsx("span",{className:L.placeHolder,children:r!=null&&r.length?"":S}),n?o.jsx("input",{tabIndex:-1,ref:s,size:_,className:G(L.input,g?L.error:""),value:r,onChange:v=>a(v.target.value),"data-testid":c&&`${c}-input`}):null]})};He.__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 je=({selectedOptions:e,searchValue:n,searchable:r,clearable:a,onClickTrigger:s,element:g,error:S,warning:u,tooltip:c,small:d,isInTable:T,disabled:m,onChangeSearch:_,onClickDeselect:E,onClickClear:v,tabIndex:t,isOpen:i,triggerRef:l,clearAllIsFocused:p,focusedSelectedOptionIndex:y,onFocus:I,onBlur:f,groupOrder:h,maxTooltipWidth:O,placeholder:N,right:C,testId:R})=>{var j;const[q,M]=we(),A=Array.isArray(e)?e.length>0&&((j=e[0])==null?void 0:j.value):e==null?void 0:e.value,F=a&&A,$=(()=>{if(h)switch(h){case ie.FIRST:return L.groupOrderFirst;case ie.LAST:return L.groupOrderLast;default:return L.groupOrderMiddle}return""})(),V=!Array.isArray(e)&&(e!=null&&e.details)?{...e,label:o.jsxs("div",{className:G(L.detailedLabel),children:[o.jsx(ue,{children:e.label}),o.jsx(ue,{muted:!0,children:e.details})]})}:e,U=o.jsxs(o.Fragment,{children:[g,o.jsxs("div",{ref:l,tabIndex:t,className:G(L.trigger,i?L.isOpen:"",S?L.error:u?L.warning:"",m?L.disabled:"",d?L.small:"",T?L.isInTable:"",C?L.right:"",$),onClick:D=>{D.stopPropagation(),typeof M=="function"&&M(),s(D)},onFocus:I,onBlur:f,"data-testid":R,children:[o.jsx(He,{selectedOptions:V,placeholder:N,searchable:r,searchValue:n,inputRef:q,onChange:_,error:S,small:d,testId:R}),o.jsx("span",{className:L.icons,children:F?o.jsx("span",{className:G(L.clearAll,p?L.focus:""),onClick:D=>{D.stopPropagation(),v&&v(D)},"data-testid":R&&`${R}-clear`,children:o.jsx(ce,{icon:Ee.CLOSE})}):o.jsx("span",{className:G(L.iconOpen),children:o.jsx(ce,{icon:"chevron down"})})})]})]});return o.jsx(o.Fragment,{children:o.jsx(pe,{error:!!S,warning:!!u,text:c||S||u,enabled:c&&ne(c)||S&&ne(S)||u&&ne(u)||!1,maxWidth:O,placement:"bottom-center",children:U})})};je.__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 De={options:["none","clearAll"],currentIndex:0,currentOption:!1,clearAll:!1},bt=e=>e!==null?e+1:0,ke=(e,n)=>{const r=["none",...e.map((s,g)=>s.type!==se.HEADING?g:null).filter(s=>s!==null)],a=bt(n);return{options:r,currentIndex:a,current:r[a]}},It=(e,n)=>{const r=e==="up"?-1:1,a=n.currentIndex+r,s=(a<0?n.options.length-1:a)%n.options.length,g=n.options[s];return{...n,currentIndex:s,current:g}},Et=(e,n,r)=>{const a=e==="left"?-1:1,s=n&&n.length?["none",...Array.from({length:n.length},(d,T)=>T),"clearAll"]:["none","clearAll"],g=r.currentIndex+a,S=(g<0?s.length-1:g)%s.length,u=s[S];return{options:s,currentIndex:S,currentOption:u,clearAll:u==="clearAll"}},be=()=>De,Ie=e=>({...e,currentIndex:0,current:"none"}),Ot=(e,n)=>{switch(n.type){case W.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:n.options||[]};case W.RESET_LAYER_FOCUS:return{...e,layerFocus:ke(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(s=>(String(s.label)+(s.details?String(s.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:Et(n.direction||"right",n.selectedOptions||[],e.triggerFocus),layerFocus:Ie(e.layerFocus)};case W.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:be()};case W.FOCUS_LAYER_OPTIONS:return n.nextLayerFocus?{...e,layerFocus:n.nextLayerFocus,triggerFocus:be()}:e;case W.OPEN_LAYER:return{...e,isLayerOpen:!0};case W.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},wt={auto:!0,possiblePlacements:["bottom-start","top-start"],placement:"bottom-start",preferX:"right",preferY:"bottom"},Lt=({state:e,dispatch:n,options:r,setTriggerFocus:a,disabled:s,disabledContext:g,onCreate:S,onChange:u,selectedOptions:c,width:d,small:T,isFontLoaded:m,placeholder:_,firstSelectedOptionIndex:E,createAble:v,listRef:t,autoLayerWidth:i})=>{const l=()=>{e.isLayerOpen&&n({type:P.CLOSE_LAYER}),a()},p=()=>n({type:P.OPEN_LAYER}),y=x.useRef(!0);x.useEffect(()=>{y.current?y.current=!1:n({type:P.SET_VISIBLE_OPTIONS,options:r})},[r]);const I=(b,w,Q)=>{if(!(s||g)){if(Q&&Q(),w){if(w.createAble&&S)S(w.value);else if(!w.disabled)if(Array.isArray(c))if(c.some(K=>K.label===w.label)){const K=c.filter(fe=>fe.label!==w.label);u&&u(b,K)}else{const K=[...c,w];u&&u(b,K)}else u&&u(b,w)}n({type:P.CLEAR_SEARCH,options:r}),a()}},f=x.useCallback(()=>d?d!=="auto"?d:_e(r,T,m,_):"100%",[r,m]),h=x.useCallback(b=>i?Math.max(_e(r,T,m,_),b==null?void 0:b.width):b==null?void 0:b.width,[r,m]),{renderLayer:O,layerProps:N,triggerProps:C,triggerBounds:R}=ze({isOpen:(e==null?void 0:e.isLayerOpen)??!1,overflowContainer:!0,...wt,ResizeObserver,onOutsideClick:l,onParentClose:l}),q=()=>{if(!(s||g)){if(e.isLayerOpen){l();return}n({type:P.RESET_LAYER_FOCUS,options:r,firstSelectedOptionIndex:E}),p()}},M=x.useRef(!0);x.useEffect(()=>{M.current?M.current=!1:e.isLayerOpen||n({type:P.CLEAR_SEARCH,options:r})},[e.isLayerOpen]);const A=(b,w)=>{const Q=c instanceof Array?c.filter(Y=>Y.value!==w.value):null;u&&u(b,Q)},F=b=>{const w=c instanceof Array?[]:{value:null};u&&u(b,w)},$=b=>n({type:P.ON_CHANGE_SEARCH,options:r,value:b,createAble:v}),V=()=>{p(),n({type:P.BLUR_TRIGGER_INPUTS})},U=b=>{t.current&&Number.isInteger(b)&&t.current.scrollToItem(b)},j=b=>{const w=It(b,e.layerFocus);n({type:P.FOCUS_LAYER_OPTIONS,nextLayerFocus:w}),U(w.current)},D=b=>{n({type:P.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:b,selectedOptions:c})},Z=b=>F(b),te=c&&c[e.triggerFocus.currentOption],re=b=>{A(b,c[e.triggerFocus.currentOption])},X=b=>{var w;I(b,(w=e==null?void 0:e.visibleOptions)==null?void 0:w[e.layerFocus.current],l)},k=e.triggerFocus.clearAll;return{getTriggerWidth:f,onKeyEvent:(b,w)=>{switch(b){case B.UP:{j(b);break}case B.DOWN:{e.isLayerOpen?j(b):V();break}case B.LEFT:case B.RIGHT:{D(b);break}case B.ENTER:{k?Z(w):te?re(w):X(w);break}case B.ESC:{l();break}}},clearAllIsFocused:k,triggerProps:C,onClickTrigger:q,onChangeSearch:$,onClickDeselectOption:A,onClickClearAll:F,renderLayer:O,layerProps:N,closeLayer:l,onSelectOption:I,getLayerWidth:h,triggerBounds:R}},Pe=e=>{const{multi:n=!1,disabled:r=!1,error:a=null,warning:s=null,tooltip:g=null,options:S,selectedOptions:u,onCreate:c=null,placeholder:d="",small:T=!1,tabIndex:m=0,onFocus:_=()=>{},onBlur:E=()=>{},searchable:v=!0,clearable:t=!1,maxTooltipWidth:i,closeOnOptionActionClick:l,isInTable:p=!1,groupOrder:y,firstSelectedOptionIndex:I=0,right:f=!1,testId:h=void 0}=e,O=x.useContext(me),N=c!==null,C=x.useRef(null),[R,q]=we(),M=Le(),[A,F]=x.useReducer(Ot,{options:S,firstSelectedOptionIndex:I},({options:Y})=>({searchValue:"",visibleOptions:Y,layerFocus:ke(Y,I??0),triggerFocus:De,isLayerOpen:!1})),{getTriggerWidth:$,onKeyEvent:V,clearAllIsFocused:U,triggerProps:j,onClickTrigger:D,onChangeSearch:Z,onClickDeselectOption:te,onClickClearAll:re,renderLayer:X,layerProps:k,closeLayer:J,onSelectOption:b,getLayerWidth:w,triggerBounds:Q}=Lt({...e,state:A,dispatch:F,setTriggerFocus:q,disabledContext:O,isFontLoaded:M,createAble:N,listRef:C});return o.jsx("div",{style:{width:$()},children:o.jsxs(Ge,{handleKeys:Object.values(B),onKeyEvent:V,children:[o.jsx(je,{selectedOptions:u,searchValue:A.searchValue,isOpen:A.isLayerOpen,focusedSelectedOptionIndex:A.triggerFocus.currentOption,clearAllIsFocused:U,searchable:v,triggerRef:We(R,j.ref),error:a,warning:s,tooltip:g,small:T,isInTable:p,disabled:r||O,clearable:t,tabIndex:m,onClickTrigger:D,onChangeSearch:Z,onClickDeselect:te,onClickClear:re,onFocus:_,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(Ae,{listRef:C,isMulti:n,sections:A.visibleOptions,selectedOptions:u,onSelectOption:(Y,K)=>{b(Y,K,n?void 0:J)},closeLayer:()=>{l&&J()},width:w(Q),small:T,focusedOptionIndex:A.layerFocus.current,firstSelectedOptionIndex:I??0,testId:h&&`${h}-layer`})}))]})})};Pe.__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 Rt=e=>{const{name:n="",options:r=[],value:a,native:s=!1,onChange:g=ae.noop,deprecatedEventHandler:S=!1,autoScroll:u=!0,warning:c,error:d,checkNonExistentValues:T=!0,closeOnOptionActionClick:m=!0,testId:_,disabled:E}=e,v=!s&&u===!0,{multi:t,simpleInputs:i,options:l,selectedOptions:p,firstSelectedOptionIndex:y,hasNonExistentValue:I}=Ye(r,a,v,T),f=!t,h=s&&f;s&&!f&&console.warn("Native select does not support provided props (see stories)");const O="Value no longer available for re-selection",N=I&&!E?c?o.jsxs("div",{children:[o.jsx("div",{children:O}),o.jsx("div",{children:c})]}):O:c,C=I&&d&&!E?o.jsxs("div",{children:[o.jsx("div",{children:O}),o.jsx("div",{children:d})]}):d,R=(q,M)=>{if(S){const A=t?M.map(F=>i?F.value:F):i?M.value:M;A&&g(A)}else{const A=!(q instanceof Event),F=t?M:M.value;if(A)q.target.name=n,q.target.value=F,t||(q.target.label=M.label),g(q);else{const $={...q,target:{...q.target,name:n,value:F,label:t?void 0:M.label}};g($)}}};return h?o.jsx(Oe,{...e,options:l,selectedOption:p,onChange:R,hasNonExistentValue:I,warning:N,error:C,testId:_}):o.jsx(Pe,{...e,options:l,selectedOptions:p,onChange:R,multi:t,firstSelectedOptionIndex:y,warning:N,error:C,testId:_,closeOnOptionActionClick:m})};Rt.__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{Rt as S};