@oliasoft-open-source/react-ui-library 4.6.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -3
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/Color-6VNJS4EI-LkypNDYY.js +1 -0
- package/dist/storybook/assets/DocsRenderer-NNNQARDV-271EmMHR.js +1 -0
- package/dist/storybook/assets/WithTooltip-V3YHNWJZ-5odABDuO.js +1 -0
- package/dist/storybook/assets/{accordion-MRdNs3mQ.js → accordion-M-sY23Hd.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-3sqRwqly.js → accordion.stories-nYKTmoeA.js} +2 -2
- package/dist/storybook/assets/{actions-AZ9fI-GM.js → actions-mOcj9IlF.js} +1 -1
- package/dist/storybook/assets/{actions.stories-DcHBD8wo.js → actions.stories-ER0_rAT3.js} +1 -1
- package/dist/storybook/assets/afe.stories-gufd9PH8.js +88 -0
- package/dist/storybook/assets/{badge.stories-5O4TV4St.js → badge.stories-QAHZ0hGs.js} +1 -1
- package/dist/storybook/assets/blowout.stories-TT3YZhxD.js +40 -0
- package/dist/storybook/assets/{button-group-O6Di9sNA.js → button-group-mNQThLQb.js} +1 -1
- package/dist/storybook/assets/{button-group.stories-2yCzCoPD.js → button-group.stories-hEWUnlpm.js} +1 -1
- package/dist/storybook/assets/{button-rm22C2wf.js → button-shH4xakS.js} +1 -1
- package/dist/storybook/assets/{button.stories-32q2fViV.js → button.stories-5xHwBO1P.js} +6 -6
- package/dist/storybook/assets/{buttons-and-links-LEUVLdX3.js → buttons-and-links-Sb4bneec.js} +1 -1
- package/dist/storybook/assets/{card.stories-v_QIHoI3.js → card.stories-52XKdWMP.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-rcooFkDL.js → casing-loads.stories-58Yzw909.js} +2 -2
- package/dist/storybook/assets/{cell.stories-MEK7F8sN.js → cell.stories-dk65sciA.js} +9 -9
- package/dist/storybook/assets/{check-box-7DccPNCs.js → check-box-2gxosI3y.js} +1 -1
- package/dist/storybook/assets/{check-box.stories-QBPARD7M.js → check-box.stories-dct4BaKG.js} +1 -1
- package/dist/storybook/assets/{chunk-HLWAVYOI-XeHb_zS2.js → chunk-HLWAVYOI-C-Uqv-lv.js} +1 -1
- package/dist/storybook/assets/color-QEPOj0Ib.js +25 -0
- package/dist/storybook/assets/{column.stories-FWqVDX5B.js → column.stories-1Qq8awo0.js} +6 -6
- package/dist/storybook/assets/{dialog-VIWX250Q.js → dialog-roJ8Yns6.js} +1 -1
- package/dist/storybook/assets/{drawer-FAo1Q_ET.js → drawer-GdbVQdWk.js} +1 -1
- package/dist/storybook/assets/{drawer.stories-raVCT-8R.js → drawer.stories-XWMoCncm.js} +2 -2
- package/dist/storybook/assets/{empty.stories-eLsVeLsD.js → empty.stories-XVXKuuiT.js} +1 -1
- package/dist/storybook/assets/entry-preview-TGgN7-T4.js +1 -0
- package/dist/storybook/assets/{config-b-_d5fwn.js → entry-preview-docs-KfUfHYQ7.js} +37 -37
- package/dist/storybook/assets/{field-9udMeZdr.js → field-FZX0Z7IB.js} +1 -1
- package/dist/storybook/assets/{field.stories-H98nslNw.js → field.stories-Quu0snQm.js} +5 -5
- package/dist/storybook/assets/{file-input.stories-d--B8cOO.js → file-input.stories-qbEqmWyt.js} +1 -1
- package/dist/storybook/assets/{flex-KzhjL9yc.js → flex-RYZsoWEN.js} +1 -1
- package/dist/storybook/assets/{flex.stories-I4p46kT6.js → flex.stories-8HJIYv6E.js} +1 -1
- package/dist/storybook/assets/footer.stories-tB9ZiuYm.js +3 -0
- package/dist/storybook/assets/form.stories-7v6JzvJl.js +49 -0
- package/dist/storybook/assets/formation.stories-gIRSy7_9.js +74 -0
- package/dist/storybook/assets/{formatter-SWP5E3XI-DSCJOjJG.js → formatter-SWP5E3XI-a7sBt194.js} +1 -1
- package/dist/storybook/assets/{heading-sY0SLHoQ.js → heading-jZsIIJF0.js} +1 -1
- package/dist/storybook/assets/{heading.stories-zStr3-HL.js → heading.stories-lW_q2VjY.js} +1 -1
- package/dist/storybook/assets/{help-icon-yrJgkgdC.js → help-icon-SKky6KLV.js} +1 -1
- package/dist/storybook/assets/{help-icon.stories-gjzAU_pF.js → help-icon.stories-i7tX8eBl.js} +1 -1
- package/dist/storybook/assets/icon-8EQazuuW.js +8 -0
- package/dist/storybook/assets/{icon.stories-jaMoeuyt.js → icon.stories-j-b_Exev.js} +1 -1
- package/dist/storybook/assets/iframe-Z5bUT4O1.js +7 -0
- package/dist/storybook/assets/index-PPLHz8o0.js +6 -0
- package/dist/storybook/assets/index-R5dkQuFe.js +3 -0
- package/dist/storybook/assets/{index-abKsB-Kl.js → index-i2tVYo5N.js} +20 -20
- package/dist/storybook/assets/{index.es-LXZC0YVN.js → index.es-VXFRDikp.js} +4 -4
- package/dist/storybook/assets/inheritsLoose-8sb_A2v4.js +1 -0
- package/dist/storybook/assets/{input-iDZqV-2m.js → input-2BhbKV-j.js} +1 -1
- package/dist/storybook/assets/{input-group.stories-UDFOhdWz.js → input-group.stories-gJFYuvVb.js} +5 -5
- package/dist/storybook/assets/{input-validation-20MUxBI6.js → input-validation-FFXJoKSI.js} +1 -1
- package/dist/storybook/assets/{input.stories-iopguZKB.js → input.stories-74EIL_bF.js} +1 -1
- package/dist/storybook/assets/{inputs-TmWBRWaW.js → inputs-DtKO2too.js} +1 -1
- package/dist/storybook/assets/{isPlainObject-4RuU_w9g.js → isPlainObject-OQlD0fAV.js} +1 -1
- package/dist/storybook/assets/{label-J7MI85wD.js → label-uCFEME1p.js} +1 -1
- package/dist/storybook/assets/{label.stories-kmvMrgz2.js → label.stories-LhXr4NuA.js} +1 -1
- package/dist/storybook/assets/{layout-forms-kkgtzmiO.js → layout-forms-7ZIITxGs.js} +1 -1
- package/dist/storybook/assets/{layout-general-BO1UiJxQ.js → layout-general-zuo7KumY.js} +1 -1
- package/dist/storybook/assets/{list-vXYnYUi0.js → list-PShi-3TE.js} +1 -1
- package/dist/storybook/assets/{list.stories-KCjHPYZx.js → list.stories-TLnvjaYU.js} +2 -2
- package/dist/storybook/assets/{list.stories-data-p4t83IOz.js → list.stories-data-Qc3oehAh.js} +1 -1
- package/dist/storybook/assets/{loader.stories-NPfeCmtc.js → loader.stories-xsnhGOV_.js} +5 -5
- package/dist/storybook/assets/{menu.stories-data-c8X93fYM.js → menu.stories-data-hEz8P1yK.js} +1 -1
- package/dist/storybook/assets/{menu.stories-t0fFav_z.js → menu.stories-ppWN2JgO.js} +6 -6
- package/dist/storybook/assets/{message-p9VAXLNZ.js → message-CRKuTfOl.js} +1 -1
- package/dist/storybook/assets/{message.stories-uPLoUdpD.js → message.stories-N8ZGvhv2.js} +1 -1
- package/dist/storybook/assets/meta-content-lUynpOsR.js +1 -0
- package/dist/storybook/assets/{modal.stories-7Z_rzYSc.js → modal.stories-dirXv4n_.js} +2 -2
- package/dist/storybook/assets/number-input-CMhEMmUd.js +1 -0
- package/dist/storybook/assets/number-input.stories-AU1jlL6D.js +97 -0
- package/dist/storybook/assets/{option-dropdown.stories-XXhHv7Q-.js → option-dropdown.stories-n7CDZevX.js} +1 -1
- package/dist/storybook/assets/{padding-and-spacing-ResQ517B.js → padding-and-spacing-3Mlm9PiC.js} +1 -1
- package/dist/storybook/assets/{page.stories-WaAu4bZx.js → page.stories-OXhmRr73.js} +1 -1
- package/dist/storybook/assets/{pagination-WmRtOUjO.js → pagination-tnyyuMkB.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-leit5iOS.js → pagination.stories-c7jbEB_j.js} +2 -2
- package/dist/storybook/assets/{pop-confirm.stories-PknEXhpI.js → pop-confirm.stories-kZScSFuk.js} +1 -1
- package/dist/storybook/assets/{popover-ZT5lBU-W.js → popover-cad2llTa.js} +1 -1
- package/dist/storybook/assets/popover.stories-1JvlWYFM.js +1 -0
- package/dist/storybook/assets/{portal.stories-UGkzdgVk.js → portal.stories-1Jnj3LXz.js} +1 -1
- package/dist/storybook/assets/{preview-5oXwpv5M.js → preview-0LPoYPAJ.js} +13 -13
- package/dist/storybook/assets/preview-MDW-geT9.js +7 -0
- package/dist/storybook/assets/preview-OnO0tzRj.js +17 -0
- package/dist/storybook/assets/projects.stories-epAPUAg1.js +47 -0
- package/dist/storybook/assets/{radio-button-T38JdN-I.js → radio-button-5n_38sFk.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-MbtUJQ4_.js → radio-button.stories-Z_B_oHnZ.js} +1 -1
- package/dist/storybook/assets/react-router-dom-EZH1n7K1.js +8 -0
- package/dist/storybook/assets/{reservoirs.stories-qYaPMbjv.js → reservoirs.stories-vxBxhmZh.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-hYx4gSgs.js → rich-text-input.stories-EbjoMb2s.js} +3 -3
- package/dist/storybook/assets/{row.stories-1uI0HLm0.js → row.stories-p0ssjvtr.js} +2 -2
- package/dist/storybook/assets/select-DZdWUrCW.js +1 -0
- package/dist/storybook/assets/{select.stories-U32XvwIb.js → select.stories-QOxuHSmz.js} +2 -2
- package/dist/storybook/assets/{side-bar-_tR5JeGc.js → side-bar-ZpHvA_KQ.js} +1 -1
- package/dist/storybook/assets/side-bar.stories-GCjyz_UC.js +27 -0
- package/dist/storybook/assets/{site.stories-ltRQw7Km.js → site.stories-k6-tU36k.js} +2 -2
- package/dist/storybook/assets/slider-MN9iDCsS.js +7 -0
- package/dist/storybook/assets/{slider.stories-10JT-qwQ.js → slider.stories-hVrt3K9M.js} +4 -4
- package/dist/storybook/assets/{spacer.stories-hs33H_N9.js → spacer.stories-Tc3LfeOH.js} +1 -1
- package/dist/storybook/assets/syntaxhighlighter-B5GMVT5T-jueltlMw.js +1 -0
- package/dist/storybook/assets/table-033R9jUC.js +1 -0
- package/dist/storybook/assets/{table.stories-data-ehBuODKA.js → table.stories-data-NfE_v-gH.js} +1 -1
- package/dist/storybook/assets/{table.stories-63gTcmnB.js → table.stories-wdVWlpz1.js} +5 -5
- package/dist/storybook/assets/{tabs.stories-KtJc5Yci.js → tabs.stories-aps5NXFv.js} +2 -2
- package/dist/storybook/assets/text-link.stories-Mx9ojcOC.js +14 -0
- package/dist/storybook/assets/{textarea-mYEkEnUR.js → textarea-ygEac3d2.js} +1 -1
- package/dist/storybook/assets/{textarea.stories-ARS3RM31.js → textarea.stories-vr_I38NI.js} +1 -1
- package/dist/storybook/assets/{hoist-non-react-statics.cjs-pnyno-Dk.js → tiny-invariant-R4kOKlvx.js} +2 -2
- package/dist/storybook/assets/title.stories-9QWP9XVr.js +37 -0
- package/dist/storybook/assets/{toaster-bqqWcltU.js → toaster-yPcd4ELJ.js} +1 -1
- package/dist/storybook/assets/toaster.stories-D_1FY8OT.js +86 -0
- package/dist/storybook/assets/{toggle-b0PkHQDl.js → toggle-M_66MP8X.js} +1 -1
- package/dist/storybook/assets/{toggle.stories-zMCWB_3O.js → toggle.stories-VfPLoUW1.js} +1 -1
- package/dist/storybook/assets/{tooltip-ZHdi6rl-.js → tooltip-HEHiU__l.js} +1 -1
- package/dist/storybook/assets/{tooltip.stories-gTfOeEzv.js → tooltip.stories-tiOgoWHH.js} +1 -1
- package/dist/storybook/assets/{tooltip.test-case.stories-Vq8nFCVS.js → tooltip.test-case.stories-g9fe1-Ut.js} +1 -1
- package/dist/storybook/assets/{top-bar-e2jItFw6.js → top-bar-ywJJBf-H.js} +1 -1
- package/dist/storybook/assets/top-bar.stories-KkBPu_h3.js +21 -0
- package/dist/storybook/assets/{top-bar.testcase.stories-2MxbcV7T.js → top-bar.testcase.stories-RJkl6c8Z.js} +2 -2
- package/dist/storybook/assets/{tree.stories-U6RKMnnO.js → tree.stories-UiERA8eJ.js} +1 -1
- package/dist/storybook/assets/{unit-input.stories-S31ymsIe.js → unit-input.stories-NxlXJaPc.js} +15 -15
- package/dist/storybook/assets/unit-table.stories-JkNu_Up6.js +103 -0
- package/dist/storybook/iframe.html +3 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/storybook/sb-addons/actions-0/manager-bundle.js +1 -1
- package/dist/storybook/sb-preview/globals.js +1 -1
- package/dist/storybook/sb-preview/runtime.js +19 -19
- package/dist/storybook/stories.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/Color-6VNJS4EI-7SF_QHKQ.js +0 -1
- package/dist/storybook/assets/DocsRenderer-NNNQARDV-zFqyxzyz.js +0 -1
- package/dist/storybook/assets/WithTooltip-4HIR6TLV--mlcCTTj.js +0 -1
- package/dist/storybook/assets/afe.stories-ArA2txnu.js +0 -88
- package/dist/storybook/assets/blowout.stories-6yWu_xKW.js +0 -40
- package/dist/storybook/assets/color-fUhGriLa.js +0 -25
- package/dist/storybook/assets/extends-dGVwEr9R.js +0 -1
- package/dist/storybook/assets/footer.stories-Mrr_R3r9.js +0 -3
- package/dist/storybook/assets/form.stories-6S2hx2wh.js +0 -49
- package/dist/storybook/assets/formation.stories-pE9W1lT-.js +0 -74
- package/dist/storybook/assets/icon-_m67DAr0.js +0 -8
- package/dist/storybook/assets/iframe-5vkaUfcR.js +0 -7
- package/dist/storybook/assets/index-gM75B7fB.js +0 -8
- package/dist/storybook/assets/inheritsLoose-Y9jOMJLd.js +0 -1
- package/dist/storybook/assets/list-heading-5IIpXtaS.js +0 -1
- package/dist/storybook/assets/number-input-wURqWy_O.js +0 -1
- package/dist/storybook/assets/number-input.stories-V3bsui-x.js +0 -81
- package/dist/storybook/assets/popover.stories-Jsd7AOQD.js +0 -1
- package/dist/storybook/assets/preview-Fi7DQdoQ.js +0 -1
- package/dist/storybook/assets/preview-XaSsmro5.js +0 -7
- package/dist/storybook/assets/projects.stories-thRPHYqQ.js +0 -47
- package/dist/storybook/assets/react-router-dom-2JKSc1g5.js +0 -8
- package/dist/storybook/assets/select-kE9fK8N9.js +0 -1
- package/dist/storybook/assets/side-bar.stories-I7ZQcntL.js +0 -27
- package/dist/storybook/assets/slider-XJwLz14m.js +0 -7
- package/dist/storybook/assets/syntaxhighlighter-NMPM6SWI-CwboJMBs.js +0 -1
- package/dist/storybook/assets/table-geCXJ5Oo.js +0 -1
- package/dist/storybook/assets/text-link.stories-_A7eKI_2.js +0 -14
- package/dist/storybook/assets/title.stories-0uqbMXQe.js +0 -37
- package/dist/storybook/assets/toaster.stories-j_yWcF95.js +0 -86
- package/dist/storybook/assets/top-bar.stories-Dz8tdKm4.js +0 -21
- package/dist/storybook/assets/unit-table.stories-8hLAgPN9.js +0 -103
- /package/dist/storybook/assets/{list-heading-dR7AAq04.css → meta-content-dR7AAq04.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var mf=Object.defineProperty;var gf=(t,e,n)=>e in t?mf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var tl=(t,e,n)=>(gf(t,typeof e!="symbol"?e+"":e,n),n);import{j as ae}from"./jsx-runtime-FsUICBgo.js";import{g as bs,R as Me,r as $}from"./index-RfLt4OUa.js";import{D as yf}from"./disabled-context-urNQThQz.js";import{C as xf}from"./common-types-U65vzrrz.js";import{B as xu}from"./button-
|
|
1
|
+
var mf=Object.defineProperty;var gf=(t,e,n)=>e in t?mf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var tl=(t,e,n)=>(gf(t,typeof e!="symbol"?e+"":e,n),n);import{j as ae}from"./jsx-runtime-FsUICBgo.js";import{g as bs,R as Me,r as $}from"./index-RfLt4OUa.js";import{D as yf}from"./disabled-context-urNQThQz.js";import{C as xf}from"./common-types-U65vzrrz.js";import{B as xu}from"./button-shH4xakS.js";import{r as bf}from"./index-miLrID2P.js";import{S as kf}from"./select-DZdWUrCW.js";import"./index-VW3EWkuE.js";import"./spinner-R8Il4aRe.js";import"./icon-8EQazuuW.js";import"./objectWithoutPropertiesLoose-9Q1jwsKS.js";import"./inheritsLoose-8sb_A2v4.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-HEHiU__l.js";import"./types-5uVBABF4.js";import"./lodash-Bmg8FrMx.js";import"./assertThisInitialized-4q6YPdh3.js";import"./memoize-one.esm-hqe5SRxC.js";import"./types-VB5zD18b.js";import"./text-6KQ6ntOV.js";import"./actions-mOcj9IlF.js";import"./badge-23Ty_zBt.js";import"./select.input-zP5tW20f.js";var Eo={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})(Eo,Eo.exports);var bu=Eo.exports,nl="ProseMirror-selectednode",la="",Wt="\0",rl="__state_override__",Sf={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=Sf,At=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||{}),X=(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))(X||{}),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||{}),w=(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))(w||{}),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||{}),vf=function(e){return wf(e)&&!Ef(e)};function wf(t){return!!t&&typeof t=="object"}function Ef(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Of(t)}var Cf=typeof Symbol=="function"&&Symbol.for,Tf=Cf?Symbol.for("react.element"):60103;function Of(t){return t.$$typeof===Tf}function Mf(t){return Array.isArray(t)?[]:{}}function Qr(t,e){return e.clone!==!1&&e.isMergeableObject(t)?er(Mf(t),t,e):t}function _f(t,e,n){return t.concat(e).map(function(r){return Qr(r,n)})}function Nf(t,e){if(!e.customMerge)return er;var n=e.customMerge(t);return typeof n=="function"?n:er}function Af(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function sl(t){return Object.keys(t).concat(Af(t))}function ku(t,e){try{return e in t}catch{return!1}}function Rf(t,e){return ku(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function If(t,e,n){var r={};return n.isMergeableObject(t)&&sl(t).forEach(function(s){r[s]=Qr(t[s],n)}),sl(e).forEach(function(s){Rf(t,s)||(ku(t,s)&&n.isMergeableObject(e[s])?r[s]=Nf(s,n)(t[s],e[s],n):r[s]=Qr(e[s],n))}),r}function er(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||_f,n.isMergeableObject=n.isMergeableObject||vf,n.cloneUnlessOtherwiseSpecified=Qr;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):If(t,e,n):Qr(e,n)}er.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return er(r,s,n)},{})};var Df=er,Pf=Df;const Lf=bs(Pf);/*!
|
|
2
2
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
@@ -177,7 +177,7 @@ ${t}</ul>
|
|
|
177
177
|
`:`<li>${t}</li>
|
|
178
178
|
`}}});function JS(t,e){return N(t,{gfm:!0,smartLists:!0,xhtml:!0,sanitizer:e})}function GS(t){R(typeof document,{code:b.EXTENSION,message:"Attempting to sanitize html within a non-browser environment. Please provide your own `sanitizeHtml` method to the `MarkdownExtension`."});const e=new DOMParser().parseFromString(`<!DOCTYPE html><html><body>${t}</body>`,"text/html");return e.normalize(),nf(e.body),e.body.innerHTML}function nf(t){if(!Uy(t)){if(!Ie(t)||/^(script|iframe|object|embed|svg)$/i.test(t.tagName))return t==null?void 0:t.remove();for(const{name:e}of t.attributes)/^(class|id|name|href|src|alt|align|valign)$/i.test(e)||t.attributes.removeNamedItem(e);for(const e of t.childNodes)nf(e)}}var hr=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=qe.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>
|
|
179
179
|
`)?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}};qi([_()],hr.prototype,"insertMarkdown",1);qi([se()],hr.prototype,"getMarkdown",1);qi([_()],hr.prototype,"toggleBoldMarkdown",1);hr=qi([G({defaultOptions:{htmlToMarkdown:WS,markdownToHtml:JS,htmlSanitizer:GS,activeNodes:[j.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],hr);var XS=Object.defineProperty,YS=Object.getOwnPropertyDescriptor,Ji=(t,e,n,r)=>{for(var s=r>1?void 0:r?YS(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&&XS(e,n,s),s},ZS={icon:"paragraph",label:({t})=>t(ui.INSERT_LABEL),description:({t})=>t(ui.INSERT_DESCRIPTION)},QS={icon:"paragraph",label:({t})=>t(ui.CONVERT_LABEL),description:({t})=>t(ui.CONVERT_DESCRIPTION)},An=class extends Rt{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)}};Ji([_(QS)],An.prototype,"convertParagraph",1);Ji([_(ZS)],An.prototype,"insertParagraph",1);Ji([Ye({shortcut:w.Paragraph,command:"convertParagraph"})],An.prototype,"shortcut",1);An=Ji([G({defaultPriority:X.Medium})],An);var ev=Object.defineProperty,tv=Object.getOwnPropertyDescriptor,nv=(t,e,n,r)=>{for(var s=r>1?void 0:r?tv(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&&ev(e,n,s),s},cn=class extends te{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Ra(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>rv({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>sv({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=Pe.EditorView&&this.store.updateAttributes()}};cn=nv([G({defaultOptions:{emptyNodeClass:w1.IS_EMPTY,placeholder:""}})],cn);function rv(t){const{pluginState:e,extension:n,tr:r,state:s}=t;return r.docChanged?{...n.options,empty:Ra(s.doc)}:e}function sv(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 iv=Object.defineProperty,ov=Object.getOwnPropertyDescriptor,av=(t,e,n,r)=>{for(var s=r>1?void 0:r?ov(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&&iv(e,n,s),s},ra=class extends Rt{get name(){return"text"}createTags(){return[j.InlineNode]}createNodeSpec(){return{}}};ra=av([G({disableExtraAttributes:!0,defaultPriority:X.Medium})],ra);var lv={...cr.defaultOptions,...An.defaultOptions,...bt.defaultOptions,excludeExtensions:[]};function cv(t={}){t={...lv,...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 bt({depth:n,getDispatch:r,getState:s,newGroupDelay:i});l.push(c)}return a.doc||l.push(new cr({content:e})),a.text||l.push(new ra),a.paragraph||l.push(new An),a.positioner||l.push(new us),a.gapCursor||l.push(new ea),a.events||l.push(new Si),l}var uv=Object.defineProperty,dv=Object.getOwnPropertyDescriptor,hv=(t,e,n,r)=>{for(var s=r>1?void 0:r?dv(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&&uv(e,n,s),s},rf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},O=(t,e,n)=>(rf(t,e,"read from private field"),n?n.call(t):e.get(t)),Ue=(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)},Ve=(t,e,n,r)=>(rf(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Fr,fv=class{constructor(){this.portals=new Map,Ue(this,Fr,Hi()),this.on=t=>O(this,Fr).on("update",t),this.once=t=>{const e=O(this,Fr).on("update",n=>{e(),t(n)});return e}}update(){O(this,Fr).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)??ni()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:ni()})}remove(t){this.portals.delete(t),this.update()}};Fr=new WeakMap;var pv=t=>{const{portals:e}=t;return Me.createElement(Me.Fragment,null,e.map(([n,{Component:r,key:s}])=>bf.createPortal(Me.createElement(r,null),n,s)))};function mv(t){const[e,n]=$.useState(()=>Array.from(t.portals.entries()));return $.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),$.useMemo(()=>e,[e])}var ne,Vr,gn,Hr,Ys,Ur,Kn,jr,Zs,Et,Oe,sa,sf=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:s,options:i}){Ue(this,ne,void 0),Ue(this,Vr,[]),Ue(this,gn,void 0),Ue(this,Hr,void 0),Ue(this,Ys,void 0),Ue(this,Ur,void 0),Ue(this,Kn,void 0),Ue(this,jr,!1),Ue(this,Zs,void 0),Ue(this,Et,void 0),Ue(this,Oe,void 0),Ue(this,sa,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,Ys);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`}),Me.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:O(this,gn),getPosition:O(this,Ur),node:O(this,ne),forwardRef:O(this,sa),decorations:O(this,Vr)})},this.updateAttributes=l=>{if(!O(this,gn).editable)return;const c=O(this,Ur).call(this);if(c==null)return;const u=O(this,gn).state.tr.setNodeMarkup(c,void 0,{...O(this,ne).attrs,...l});O(this,gn).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."}),Ve(this,ne,e),Ve(this,gn,r),Ve(this,Hr,n),Ve(this,Ys,s),Ve(this,Ur,t),Ve(this,Kn,i),Ve(this,Oe,this.createDom());const{contentDOM:o,wrapper:a}=this.createContentDom()??{};Ve(this,Zs,o??void 0),Ve(this,Et,a),O(this,Et)&&O(this,Oe).append(O(this,Et)),this.setDomAttributes(O(this,ne),O(this,Oe)),this.Component.displayName=Cu(`${O(this,ne).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(s,i,o)=>new sf({options:r,node:s,view:i,getPosition:o,portalContainer:e,ReactComponent:n})}get selected(){return O(this,jr)}get contentDOM(){return O(this,Zs)}get dom(){return O(this,Oe)}renderComponent(){O(this,Hr).render({Component:this.Component,container:O(this,Oe)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=O(this,Kn),n=O(this,ne).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${ol(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}=qe.renderSpec(document,n);let i;if(Ie(s))return i=s,s===r&&(i=document.createElement("span"),i.classList.add(`${ol(O(this,ne).type.name)}-node-view-content-wrapper`),i.append(r)),Ie(r),{wrapper:i,contentDOM:r}}update(t,e){return _a({types:O(this,ne).type,node:t})?(O(this,ne)===t&&O(this,Vr)===e||(O(this,ne).sameMarkup(t)||this.setDomAttributes(t,O(this,Oe)),Ve(this,ne,t),Ve(this,Vr,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(D(s)||gv(s))return;Rn(s[1])&&(r=s[1])}for(const[s,i]of he(r))e.setAttribute(s,i)}selectNode(){Ve(this,jr,!0),O(this,Oe)&&O(this,Oe).classList.add(nl),this.renderComponent()}deselectNode(){Ve(this,jr,!1),O(this,Oe)&&O(this,Oe).classList.remove(nl),this.renderComponent()}destroy(){O(this,Hr).remove(O(this,Oe))}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,Oe))return!1;if(ee(O(this,Kn).stopEvent))return O(this,Kn).stopEvent({event:t});const n=t.target;if(!(O(this,Oe).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)}},Uc=sf;ne=new WeakMap;Vr=new WeakMap;gn=new WeakMap;Hr=new WeakMap;Ys=new WeakMap;Ur=new WeakMap;Kn=new WeakMap;jr=new WeakMap;Zs=new WeakMap;Et=new WeakMap;Oe=new WeakMap;sa=new WeakMap;function gv(t){return mi(t)||Rn(t)&&mi(t.dom)}var gs=class extends te{constructor(){super(...arguments),this.portalContainer=new fv}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||!Ts(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=Uc.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=he({...this.options.nodeViewComponents,...e});for(const[r,s]of n)t[r]=Uc.create({options:this.options,ReactComponent:s,portalContainer:this.portalContainer});return t}};gs=hv([G({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],gs);function yv(t){const e=$.createContext(null),n=xv(e);return[s=>{const i=t(s);return Me.createElement(e.Provider,{value:i},s.children)},n,e]}function xv(t){return(e,n)=>{const r=$.useContext(t),s=bv(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 bv(t){const e=$.useRef();return kv(()=>{e.current=t}),e.current}var kv=typeof document<"u"?$.useLayoutEffect:$.useEffect;function Sv(t,e){return yv(n=>{const r=$.useRef(null),s=$.useRef(),i=e==null?void 0:e(n),[o,a]=$.useState(()=>t({get:jc(r),set:Wc(s),previousContext:void 0,props:n,state:i})),l=[...Object.values(n),i];return $.useEffect(()=>{l.length!==0&&a(c=>t({get:jc(r),set:Wc(s),previousContext:c,props:n,state:i}))},l),r.current=o,s.current=a,o})}function jc(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 Wc(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=>({...n,...typeof e=="function"?e(n):e}))}}var of={},af={};(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"]])})(af);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=af;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",`
|
|
180
|
-
`],["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,E,L,q,J,F,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(E!==void 0)return a(E);if(L!==void 0)return i(L,q);if(J!==void 0)return i(J);if(F==="0")return"\0";if(F!==void 0)return l(F,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(of);const vv=bs(of),_t=t=>typeof t=="string",wv=t=>typeof t=="function",Kc=new Map;function Qa(t){return[...Array.isArray(t)?t:[t],"en"]}function lf(t,e,n){const r=Qa(t);return Mi(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(_t(e)?new Date(e):e)}function ia(t,e,n){const r=Qa(t);return Mi(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function qc(t,e,n,{offset:r=0,...s}){const i=Qa(t),o=e?Mi(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Mi(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Mi(t,e){const n=t();let r=Kc.get(n);return r||(r=e(),Kc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const cf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Ev=(t,e,n={})=>{e=e||t;const r=i=>_t(i)?n[i]||{style:i}:i,s=(i,o)=>{const a=Object.keys(n).length?r("number"):{},l=ia(e,i,a);return o.replace("#",l)};return{plural:(i,o)=>{const{offset:a=0}=o,l=qc(e,!1,i,o);return s(i-a,l)},selectordinal:(i,o)=>{const{offset:a=0}=o,l=qc(e,!0,i,o);return s(i-a,l)},select:(i,o)=>o[i]??o.other,number:(i,o)=>ia(e,i,r(o)),date:(i,o)=>lf(e,i,r(o)),undefined:i=>i}};function Cv(t,e,n){return(r,s={})=>{const i=Ev(e,n,s),o=l=>Array.isArray(l)?l.reduce((c,u)=>{if(_t(u))return c+u;const[d,h,f]=u;let p={};f!=null&&!_t(f)?Object.keys(f).forEach(g=>{p[g]=o(f[g])}):p=f;const m=i[h](r[d],p);return m==null?c:c+m},""):l,a=o(t);return _t(a)&&cf.test(a)?vv(a.trim()):_t(a)?a.trim():a}}var Tv=Object.defineProperty,Ov=(t,e,n)=>e in t?Tv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mv=(t,e,n)=>(Ov(t,typeof e!="symbol"?e+"":e,n),n);class _v{constructor(){Mv(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var Nv=Object.defineProperty,Av=(t,e,n)=>e in t?Nv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e,n)=>(Av(t,typeof e!="symbol"?e+"":e,n),n);class Rv extends _v{constructor(e){super(),$n(this,"_locale"),$n(this,"_locales"),$n(this,"_localeData"),$n(this,"_messages"),$n(this,"_missing"),$n(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,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){this._localeData[e]==null?this._localeData[e]=n:Object.assign(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){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),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={},{message:r,formats:s}={}){_t(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],o=this._missing;if(o&&i)return wv(o)?o(this._locale,e):o;i&&this.emit("missing",{id:e,locale:this._locale});let a=this.messages[e]||r||e;return _t(a)&&cf.test(a)?JSON.parse(`"${a}"`):_t(a)?a:Cv(a,this._locale,this._locales)(n,s)}date(e,n){return lf(this._locales||this._locale,e,n)}number(e,n){return ia(this._locales||this._locale,e,n)}}function Iv(t={}){return new Rv(t)}const Gi=Iv();function k(t,e){return e?"other":t==1?"one":"other"}function It(t,e){return e?"other":t==0||t==1?"one":"other"}function $e(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 hn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Dv=K,Pv=k,Lv=It;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const zv=k;function $v(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 Fv(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 Vv(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 Hv=k,Uv=$e;function jv(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 Wv(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 Kv=k,qv=k,Jv=k,Gv=It,Xv=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 Zv=K;function Qv(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 ew=k;function tw(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 nw(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 rw=k;function sw(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 iw=k,ow=k,aw=k;function lw(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 cw(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 uw(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 dw=$e;function hw(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 fw=k,pw=K,mw=k,gw=k;function yw(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 xw=k,bw=k,kw=$e,Sw=k;function vw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function ww(t,e){return e?"other":t>=0&&t<2?"one":"other"}const Ew=$e;function Cw(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 Tw=k;function Ow(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Mw=k,_w=$e;function Nw(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 Aw(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 Rw=$e,Iw=k;function Dw(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 Pw=It;function Lw(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 Bw=k,zw=k;function $w(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 Fw(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 Vw(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 Hw(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 Uw(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function jw(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Ww=$e,Kw=K,qw=K,Jw=K,Gw=$e;function Xw(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 Yw(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 Zw=hn;function Qw(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 eE=K,tE=K,nE=k,rE=$e,sE=k,iE=K,oE=K;function aE(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 lE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const cE=k,uE=k,dE=K,hE=K;function fE(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 pE=k,mE=k,gE=K;function yE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const xE=K,bE=k,kE=k;function SE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const vE=k;function wE(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 EE=k;function CE(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 TE=k,OE=k,ME=K,_E=It;function NE(t,e){return e&&t==1?"one":"other"}function AE(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 RE(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 IE=k,DE=It,PE=k;function LE(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 BE=k,zE=k;function $E(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 FE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function VE(t,e){return e&&t==1?"one":"other"}function HE(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 UE=K,jE=k,WE=hn,KE=k,qE=k;function JE(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 GE=$e,XE=k,YE=k,ZE=k,QE=K,eC=k,tC=It,nC=k,rC=k,sC=k;function iC(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 oC=k,aC=K,lC=It,cC=k;function uC(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 dC(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 hC=k;function fC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const pC=$e,mC=k;function gC(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 yC=k,xC=K;function bC(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 kC=k,SC=K,vC=k;function wC(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 EC(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 CC=k,TC=k,OC=hn,MC=k,_C=K,NC=K;function AC(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 RC(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 IC(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 DC(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 PC(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 LC=hn,BC=hn,zC=hn,$C=hn,FC=hn,VC=k,HC=k;function UC(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 jC(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 WC=k,KC=k,qC=k,JC=K;function GC(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 XC=$e,YC=k,ZC=k,QC=k,eT=k,tT=K,nT=It,rT=k;function sT(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 iT(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 oT=k,aT=K,lT=k,cT=k;function uT(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 dT=k;function hT(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 fT=$e,pT=k,mT=k;function gT(t,e){return e&&t==1?"one":"other"}const yT=k,xT=k,bT=It,kT=k,ST=K,vT=k,wT=k,ET=$e,CT=K,TT=K,OT=K;function MT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const _T=Object.freeze(Object.defineProperty({__proto__:null,_in:Dv,af:Pv,ak:Lv,am:Bv,an:zv,ar:$v,ars:Fv,as:Vv,asa:Hv,ast:Uv,az:jv,be:Wv,bem:Kv,bez:qv,bg:Jv,bho:Gv,bm:Xv,bn:Yv,bo:Zv,br:Qv,brx:ew,bs:tw,ca:nw,ce:rw,ceb:sw,cgg:iw,chr:ow,ckb:aw,cs:lw,cy:cw,da:uw,de:dw,dsb:hw,dv:fw,dz:pw,ee:mw,el:gw,en:yw,eo:xw,es:bw,et:kw,eu:Sw,fa:vw,ff:ww,fi:Ew,fil:Cw,fo:Tw,fr:Ow,fur:Mw,fy:_w,ga:Nw,gd:Aw,gl:Rw,gsw:Iw,gu:Dw,guw:Pw,gv:Lw,ha:Bw,haw:zw,he:$w,hi:Fw,hr:Vw,hsb:Hw,hu:Uw,hy:jw,ia:Ww,id:Kw,ig:qw,ii:Jw,io:Gw,is:Xw,it:Yw,iu:Zw,iw:Qw,ja:eE,jbo:tE,jgo:nE,ji:rE,jmc:sE,jv:iE,jw:oE,ka:aE,kab:lE,kaj:cE,kcg:uE,kde:dE,kea:hE,kk:fE,kkj:pE,kl:mE,km:gE,kn:yE,ko:xE,ks:bE,ksb:kE,ksh:SE,ku:vE,kw:wE,ky:EE,lag:CE,lb:TE,lg:OE,lkt:ME,ln:_E,lo:NE,lt:AE,lv:RE,mas:IE,mg:DE,mgo:PE,mk:LE,ml:BE,mn:zE,mo:$E,mr:FE,ms:VE,mt:HE,my:UE,nah:jE,naq:WE,nb:KE,nd:qE,ne:JE,nl:GE,nn:XE,nnh:YE,no:ZE,nqo:QE,nr:eC,nso:tC,ny:nC,nyn:rC,om:sC,or:iC,os:oC,osa:aC,pa:lC,pap:cC,pl:uC,prg:dC,ps:hC,pt:fC,pt_PT:pC,rm:mC,ro:gC,rof:yC,root:xC,ru:bC,rwk:kC,sah:SC,saq:vC,sc:wC,scn:EC,sd:CC,sdh:TC,se:OC,seh:MC,ses:_C,sg:NC,sh:AC,shi:RC,si:IC,sk:DC,sl:PC,sma:LC,smi:BC,smj:zC,smn:$C,sms:FC,sn:VC,so:HC,sq:UC,sr:jC,ss:WC,ssy:KC,st:qC,su:JC,sv:GC,sw:XC,syr:YC,ta:ZC,te:QC,teo:eT,th:tT,ti:nT,tig:rT,tk:sT,tl:iT,tn:oT,to:aT,tr:lT,ts:cT,tzm:uT,ug:dT,uk:hT,ur:fT,uz:pT,ve:mT,vi:gT,vo:yT,vun:xT,wa:bT,wae:kT,wo:ST,xh:vT,xog:wT,yi:ET,yo:CT,yue:TT,zh:OT,zu:MT},Symbol.toStringTag,{value:"Module"}));var NT=Object.defineProperty,AT=Object.getOwnPropertyDescriptor,RT=Object.getOwnPropertyNames,IT=Object.prototype.hasOwnProperty,Jc=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of RT(e))!IT.call(t,s)&&s!==n&&NT(t,s,{get:()=>e[s],enumerable:!(r=AT(e,s))||r.enumerable});return t},DT=(t,e,n)=>(Jc(t,e,"default"),n&&Jc(n,e,"default")),PT=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"]]}'),uf={};DT(uf,_T);Gi.loadLocaleData("en",{plurals:uf.en});Gi.load("en",PT);Gi.activate("en");var LT=Object.defineProperty,BT=Object.getOwnPropertyDescriptor,zT=(t,e,n,r)=>{for(var s=r>1?void 0:r?BT(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&<(e,n,s),s},$T={...cn.defaultOptions,...gs.defaultOptions},FT=[...cn.staticKeys,...gs.staticKeys],ys=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(cn).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new cn({emptyNodeClass:t,placeholder:e,priority:X.Low}),new gs({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};ys=zT([G({defaultOptions:$T,staticKeys:FT})],ys);var df={};Object.defineProperty(df,"__esModule",{value:!0});function VT(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return Xc(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return Xc(r,s)},t[0]);return n||null}var kr=df.default=VT,Gc=new WeakMap;function Xc(t,e){if(t&&e){var n=Gc.get(t)||new WeakMap;Gc.set(t,n);var r=n.get(e)||function(s){Yc(t,s),Yc(e,s)};return n.set(e,r),r}return t||e}function Yc(t,e){typeof t=="function"?t(e):t.current=e}var hf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},wo=(t,e,n)=>(hf(t,e,"read from private field"),n?n.call(t):e.get(t)),HT=(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)},UT=(t,e,n,r)=>(hf(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function jT(){const[,t]=$.useState(M());return $.useCallback(()=>{t(M())},[])}var ff=$.createContext(null);function el(t){const e=$.useContext(ff),n=$.useRef(jT());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return $.useEffect(()=>{let s=t;if(s){if(Rn(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function WT(t=!0){return el({autoUpdate:t}).active}function KT(){return el().commands}var[qT,HO]=Sv(({props:t})=>{const e=t.locale??"en",n=t.i18n??Gi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function Zc(t,e={}){const{core:n,react:r,...s}=e;return eb(t)?t:Qx.create(()=>[...Au(t),new ys(r),...cv(n)],s)}function JT(t,e={}){const n=$.useRef(t),r=$.useRef(e),[s,i]=$.useState(()=>Zc(t,e));return n.current=t,r.current=e,$.useEffect(()=>s.addHandler("destroy",()=>{i(()=>Zc(n.current,r.current))}),[s]),s}var GT=typeof kr=="object"&&kr.__esModule&&kr.default?kr.default:kr,qn,XT=class extends Jx{constructor(t){if(super(t),HT(this,qn,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]:GT(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`}),UT(this,qn,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(cn).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new py(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(rl,{}))),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(rl,{})),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(wo(this,qn),{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(wo(this,qn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&wo(this,qn)&&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}};qn=new WeakMap;var pf=typeof document<"u"?$.useLayoutEffect:$.useEffect;function YT(t){const e=$.useRef();return pf(()=>{e.current=t}),e.current}function ZT(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;$.useRef(!0).current&&!en(r)&&e.getExtension(ys).setOptions({placeholder:r}),$.useEffect(()=>{r!=null&&e.getExtension(ys).setOptions({placeholder:r})},[r,e]);const[o]=$.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=pe(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=QT({initialEditorState:o,getProps:()=>t});return $.useEffect(()=>()=>{a.destroy()},[a]),$.useEffect(()=>{a.onUpdate()},[s,a]),eO(a),a.frameworkOutput}function QT(t){const e=$.useRef(t);e.current=t;const n=$.useMemo(()=>new XT(e.current),[]);return n.update(t),n}function eO(t){const{state:e}=t.props,n=$.useRef(!!e),r=YT(e);pf(()=>{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 tO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=JT(s??(()=>[]),i),[a,l]=$.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=$.useCallback(({state:d})=>{l(d)},[]),u=$.useCallback(()=>o.output,[o]);return $.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var oa=()=>Me.createElement("div",{className:f1.EDITOR_WRAPPER,...el().getRootProps()}),nO=t=>(t.hook(),null);function rO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=ZT(a),c=mv(l.portalContainer),u=n==="start"||n===!0||!e&&en(n),d=n==="end";return Me.createElement(qT,{i18n:r,locale:s,supportedLocales:i},Me.createElement(ff.Provider,{value:l},Me.createElement(pv,{portals:c}),o.map((h,f)=>Me.createElement(nO,{hook:h,key:f})),u&&Me.createElement(oa,null),e,d&&Me.createElement(oa,null)))}const sO="_richTextToolbar_1gbkk_1",iO="_richTextToolbarContainer_1gbkk_5",Qc={richTextToolbar:sO,richTextToolbarContainer:iO};var Jn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Jn||{});const aa=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=KT(),l=WT(),c=[{icon:Jn.BOLD,onClick:r,active:l.bold()},{icon:Jn.ITALIC,onClick:o,active:l.italic()},{icon:Jn.CODE,onClick:i,active:l.code()},{icon:Jn.UL,onClick:s,active:l.bulletList()},{icon:Jn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:Qc.richTextToolbarContainer,children:[ae.jsx("div",{className:Qc.richTextToolbar,children:c.map((u,d)=>ae.jsx(xu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:xf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};try{aa.displayName="RichTextToolbar",aa.__docgenInfo={description:"",displayName:"RichTextToolbar",props:{disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},toolbarComponent:{defaultValue:{value:"null"},description:"",name:"toolbarComponent",required:!1,type:{name:"ReactNode"}}}}}catch{}const oO="_inputInTable_ta5ga_1",aO="_inputHover_ta5ga_13",lO="_inputFocus_ta5ga_18",cO="_inputError_ta5ga_25",uO="_inputWarning_ta5ga_26",dO="_inputDisabled_ta5ga_61",hO="_hideScrollbars_ta5ga_67",fO="_richTextInput_ta5ga_77",pO={inputInTable:oO,inputHover:aO,inputFocus:lO,inputError:cO,inputWarning:uO,inputDisabled:dO,hideScrollbars:hO,richTextInput:fO},xs=$.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=$.useContext(yf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=tO({extensions:()=>[new Nn,new ps,new ds,new fs,new hr,new ms,new cn({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});$.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:pO.richTextInput,children:ae.jsxs(rO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(aa,{disabled:a,toolbarComponent:s}),ae.jsx(oa,{})]})})});try{xs.displayName="RichTextInput",xs.__docgenInfo={description:"",displayName:"RichTextInput",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((markdown: string) => void)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string"}},toolbarComponent:{defaultValue:null,description:"",name:"toolbarComponent",required:!1,type:{name:"ReactNode"}}}}}catch{}const UO={title:"Forms/RichTextInput",component:xs,args:{}},Ms=t=>{const[e,n]=Me.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(xs,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Ds=Ms.bind({}),Wr=Ms.bind({});Wr.args={value:`Paragraph goes here lorem ipsum dolor.
|
|
180
|
+
`],["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,E,L,q,J,F,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(E!==void 0)return a(E);if(L!==void 0)return i(L,q);if(J!==void 0)return i(J);if(F==="0")return"\0";if(F!==void 0)return l(F,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(of);const vv=bs(of),_t=t=>typeof t=="string",wv=t=>typeof t=="function",Kc=new Map;function Qa(t){return[...Array.isArray(t)?t:[t],"en"]}function lf(t,e,n){const r=Qa(t);return Mi(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(_t(e)?new Date(e):e)}function ia(t,e,n){const r=Qa(t);return Mi(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function qc(t,e,n,{offset:r=0,...s}){const i=Qa(t),o=e?Mi(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Mi(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Mi(t,e){const n=t();let r=Kc.get(n);return r||(r=e(),Kc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const cf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,Ev=(t,e,n={})=>{e=e||t;const r=i=>_t(i)?n[i]||{style:i}:i,s=(i,o)=>{const a=Object.keys(n).length?r("number"):{},l=ia(e,i,a);return o.replace("#",l)};return{plural:(i,o)=>{const{offset:a=0}=o,l=qc(e,!1,i,o);return s(i-a,l)},selectordinal:(i,o)=>{const{offset:a=0}=o,l=qc(e,!0,i,o);return s(i-a,l)},select:(i,o)=>o[i]??o.other,number:(i,o)=>ia(e,i,r(o)),date:(i,o)=>lf(e,i,r(o)),undefined:i=>i}};function Cv(t,e,n){return(r,s={})=>{const i=Ev(e,n,s),o=l=>Array.isArray(l)?l.reduce((c,u)=>{if(_t(u))return c+u;const[d,h,f]=u;let p={};f!=null&&!_t(f)?Object.keys(f).forEach(g=>{p[g]=o(f[g])}):p=f;const m=i[h](r[d],p);return m==null?c:c+m},""):l,a=o(t);return _t(a)&&cf.test(a)?vv(a.trim()):_t(a)?a.trim():a}}var Tv=Object.defineProperty,Ov=(t,e,n)=>e in t?Tv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mv=(t,e,n)=>(Ov(t,typeof e!="symbol"?e+"":e,n),n);class _v{constructor(){Mv(this,"_events",{})}on(e,n){return this._hasEvent(e)||(this._events[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){if(!this._hasEvent(e))return;const r=this._events[e].indexOf(n);~r&&this._events[e].splice(r,1)}emit(e,...n){this._hasEvent(e)&&this._events[e].map(r=>r.apply(this,n))}_hasEvent(e){return Array.isArray(this._events[e])}}var Nv=Object.defineProperty,Av=(t,e,n)=>e in t?Nv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$n=(t,e,n)=>(Av(t,typeof e!="symbol"?e+"":e,n),n);class Rv extends _v{constructor(e){super(),$n(this,"_locale"),$n(this,"_locales"),$n(this,"_localeData"),$n(this,"_messages"),$n(this,"_missing"),$n(this,"t",this._.bind(this)),this._messages={},this._localeData={},e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(e.locale!=null||e.locales!=null)&&this.activate(e.locale,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){this._localeData[e]==null?this._localeData[e]=n:Object.assign(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){this._messages[e]==null?this._messages[e]=n:Object.assign(this._messages[e],n)}load(e,n){n!=null?this._load(e,n):Object.keys(e).forEach(r=>this._load(r,e[r])),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={},{message:r,formats:s}={}){_t(e)||(n=e.values||n,r=e.message,e=e.id);const i=!this.messages[e],o=this._missing;if(o&&i)return wv(o)?o(this._locale,e):o;i&&this.emit("missing",{id:e,locale:this._locale});let a=this.messages[e]||r||e;return _t(a)&&cf.test(a)?JSON.parse(`"${a}"`):_t(a)?a:Cv(a,this._locale,this._locales)(n,s)}date(e,n){return lf(this._locales||this._locale,e,n)}number(e,n){return ia(this._locales||this._locale,e,n)}}function Iv(t={}){return new Rv(t)}const Gi=Iv();function k(t,e){return e?"other":t==1?"one":"other"}function It(t,e){return e?"other":t==0||t==1?"one":"other"}function $e(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 hn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Dv=K,Pv=k,Lv=It;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const zv=k;function $v(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 Fv(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 Vv(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 Hv=k,Uv=$e;function jv(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 Wv(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 Kv=k,qv=k,Jv=k,Gv=It,Xv=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 Zv=K;function Qv(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 ew=k;function tw(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 nw(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 rw=k;function sw(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 iw=k,ow=k,aw=k;function lw(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 cw(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 uw(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 dw=$e;function hw(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 fw=k,pw=K,mw=k,gw=k;function yw(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 xw=k,bw=k,kw=$e,Sw=k;function vw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function ww(t,e){return e?"other":t>=0&&t<2?"one":"other"}const Ew=$e;function Cw(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 Tw=k;function Ow(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Mw=k,_w=$e;function Nw(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 Aw(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 Rw=$e,Iw=k;function Dw(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 Pw=It;function Lw(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 Bw=k,zw=k;function $w(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 Fw(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 Vw(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 Hw(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 Uw(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function jw(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Ww=$e,Kw=K,qw=K,Jw=K,Gw=$e;function Xw(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 Yw(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 Zw=hn;function Qw(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 eE=K,tE=K,nE=k,rE=$e,sE=k,iE=K,oE=K;function aE(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 lE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const cE=k,uE=k,dE=K,hE=K;function fE(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 pE=k,mE=k,gE=K;function yE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const xE=K,bE=k,kE=k;function SE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const vE=k;function wE(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 EE=k;function CE(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 TE=k,OE=k,ME=K,_E=It;function NE(t,e){return e&&t==1?"one":"other"}function AE(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 RE(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 IE=k,DE=It,PE=k;function LE(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 BE=k,zE=k;function $E(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 FE(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function VE(t,e){return e&&t==1?"one":"other"}function HE(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 UE=K,jE=k,WE=hn,KE=k,qE=k;function JE(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 GE=$e,XE=k,YE=k,ZE=k,QE=K,eC=k,tC=It,nC=k,rC=k,sC=k;function iC(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 oC=k,aC=K,lC=It,cC=k;function uC(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 dC(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 hC=k;function fC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const pC=$e,mC=k;function gC(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 yC=k,xC=K;function bC(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 kC=k,SC=K,vC=k;function wC(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 EC(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 CC=k,TC=k,OC=hn,MC=k,_C=K,NC=K;function AC(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 RC(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 IC(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 DC(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 PC(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 LC=hn,BC=hn,zC=hn,$C=hn,FC=hn,VC=k,HC=k;function UC(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 jC(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 WC=k,KC=k,qC=k,JC=K;function GC(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 XC=$e,YC=k,ZC=k,QC=k,eT=k,tT=K,nT=It,rT=k;function sT(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 iT(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 oT=k,aT=K,lT=k,cT=k;function uT(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 dT=k;function hT(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 fT=$e,pT=k,mT=k;function gT(t,e){return e&&t==1?"one":"other"}const yT=k,xT=k,bT=It,kT=k,ST=K,vT=k,wT=k,ET=$e,CT=K,TT=K,OT=K;function MT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const _T=Object.freeze(Object.defineProperty({__proto__:null,_in:Dv,af:Pv,ak:Lv,am:Bv,an:zv,ar:$v,ars:Fv,as:Vv,asa:Hv,ast:Uv,az:jv,be:Wv,bem:Kv,bez:qv,bg:Jv,bho:Gv,bm:Xv,bn:Yv,bo:Zv,br:Qv,brx:ew,bs:tw,ca:nw,ce:rw,ceb:sw,cgg:iw,chr:ow,ckb:aw,cs:lw,cy:cw,da:uw,de:dw,dsb:hw,dv:fw,dz:pw,ee:mw,el:gw,en:yw,eo:xw,es:bw,et:kw,eu:Sw,fa:vw,ff:ww,fi:Ew,fil:Cw,fo:Tw,fr:Ow,fur:Mw,fy:_w,ga:Nw,gd:Aw,gl:Rw,gsw:Iw,gu:Dw,guw:Pw,gv:Lw,ha:Bw,haw:zw,he:$w,hi:Fw,hr:Vw,hsb:Hw,hu:Uw,hy:jw,ia:Ww,id:Kw,ig:qw,ii:Jw,io:Gw,is:Xw,it:Yw,iu:Zw,iw:Qw,ja:eE,jbo:tE,jgo:nE,ji:rE,jmc:sE,jv:iE,jw:oE,ka:aE,kab:lE,kaj:cE,kcg:uE,kde:dE,kea:hE,kk:fE,kkj:pE,kl:mE,km:gE,kn:yE,ko:xE,ks:bE,ksb:kE,ksh:SE,ku:vE,kw:wE,ky:EE,lag:CE,lb:TE,lg:OE,lkt:ME,ln:_E,lo:NE,lt:AE,lv:RE,mas:IE,mg:DE,mgo:PE,mk:LE,ml:BE,mn:zE,mo:$E,mr:FE,ms:VE,mt:HE,my:UE,nah:jE,naq:WE,nb:KE,nd:qE,ne:JE,nl:GE,nn:XE,nnh:YE,no:ZE,nqo:QE,nr:eC,nso:tC,ny:nC,nyn:rC,om:sC,or:iC,os:oC,osa:aC,pa:lC,pap:cC,pl:uC,prg:dC,ps:hC,pt:fC,pt_PT:pC,rm:mC,ro:gC,rof:yC,root:xC,ru:bC,rwk:kC,sah:SC,saq:vC,sc:wC,scn:EC,sd:CC,sdh:TC,se:OC,seh:MC,ses:_C,sg:NC,sh:AC,shi:RC,si:IC,sk:DC,sl:PC,sma:LC,smi:BC,smj:zC,smn:$C,sms:FC,sn:VC,so:HC,sq:UC,sr:jC,ss:WC,ssy:KC,st:qC,su:JC,sv:GC,sw:XC,syr:YC,ta:ZC,te:QC,teo:eT,th:tT,ti:nT,tig:rT,tk:sT,tl:iT,tn:oT,to:aT,tr:lT,ts:cT,tzm:uT,ug:dT,uk:hT,ur:fT,uz:pT,ve:mT,vi:gT,vo:yT,vun:xT,wa:bT,wae:kT,wo:ST,xh:vT,xog:wT,yi:ET,yo:CT,yue:TT,zh:OT,zu:MT},Symbol.toStringTag,{value:"Module"}));var NT=Object.defineProperty,AT=Object.getOwnPropertyDescriptor,RT=Object.getOwnPropertyNames,IT=Object.prototype.hasOwnProperty,Jc=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of RT(e))!IT.call(t,s)&&s!==n&&NT(t,s,{get:()=>e[s],enumerable:!(r=AT(e,s))||r.enumerable});return t},DT=(t,e,n)=>(Jc(t,e,"default"),n&&Jc(n,e,"default")),PT=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"]]}'),uf={};DT(uf,_T);Gi.loadLocaleData("en",{plurals:uf.en});Gi.load("en",PT);Gi.activate("en");var LT=Object.defineProperty,BT=Object.getOwnPropertyDescriptor,zT=(t,e,n,r)=>{for(var s=r>1?void 0:r?BT(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&<(e,n,s),s},$T={...cn.defaultOptions,...gs.defaultOptions},FT=[...cn.staticKeys,...gs.staticKeys],ys=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(cn).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new cn({emptyNodeClass:t,placeholder:e,priority:X.Low}),new gs({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};ys=zT([G({defaultOptions:$T,staticKeys:FT})],ys);var df={};Object.defineProperty(df,"__esModule",{value:!0});function VT(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return Xc(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return Xc(r,s)},t[0]);return n||null}var kr=df.default=VT,Gc=new WeakMap;function Xc(t,e){if(t&&e){var n=Gc.get(t)||new WeakMap;Gc.set(t,n);var r=n.get(e)||function(s){Yc(t,s),Yc(e,s)};return n.set(e,r),r}return t||e}function Yc(t,e){typeof t=="function"?t(e):t.current=e}var hf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},wo=(t,e,n)=>(hf(t,e,"read from private field"),n?n.call(t):e.get(t)),HT=(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)},UT=(t,e,n,r)=>(hf(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);function jT(){const[,t]=$.useState(M());return $.useCallback(()=>{t(M())},[])}var ff=$.createContext(null);function el(t){const e=$.useContext(ff),n=$.useRef(jT());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return $.useEffect(()=>{let s=t;if(s){if(Rn(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function WT(t=!0){return el({autoUpdate:t}).active}function KT(){return el().commands}var[qT,VO]=Sv(({props:t})=>{const e=t.locale??"en",n=t.i18n??Gi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function Zc(t,e={}){const{core:n,react:r,...s}=e;return eb(t)?t:Qx.create(()=>[...Au(t),new ys(r),...cv(n)],s)}function JT(t,e={}){const n=$.useRef(t),r=$.useRef(e),[s,i]=$.useState(()=>Zc(t,e));return n.current=t,r.current=e,$.useEffect(()=>s.addHandler("destroy",()=>{i(()=>Zc(n.current,r.current))}),[s]),s}var GT=typeof kr=="object"&&kr.__esModule&&kr.default?kr.default:kr,qn,XT=class extends Jx{constructor(t){if(super(t),HT(this,qn,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]:GT(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`}),UT(this,qn,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(cn).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new py(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(rl,{}))),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(rl,{})),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(wo(this,qn),{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(wo(this,qn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&wo(this,qn)&&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}};qn=new WeakMap;var pf=typeof document<"u"?$.useLayoutEffect:$.useEffect;function YT(t){const e=$.useRef();return pf(()=>{e.current=t}),e.current}function ZT(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;$.useRef(!0).current&&!en(r)&&e.getExtension(ys).setOptions({placeholder:r}),$.useEffect(()=>{r!=null&&e.getExtension(ys).setOptions({placeholder:r})},[r,e]);const[o]=$.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=pe(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=QT({initialEditorState:o,getProps:()=>t});return $.useEffect(()=>()=>{a.destroy()},[a]),$.useEffect(()=>{a.onUpdate()},[s,a]),eO(a),a.frameworkOutput}function QT(t){const e=$.useRef(t);e.current=t;const n=$.useMemo(()=>new XT(e.current),[]);return n.update(t),n}function eO(t){const{state:e}=t.props,n=$.useRef(!!e),r=YT(e);pf(()=>{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 tO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=JT(s??(()=>[]),i),[a,l]=$.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=$.useCallback(({state:d})=>{l(d)},[]),u=$.useCallback(()=>o.output,[o]);return $.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var oa=()=>Me.createElement("div",{className:f1.EDITOR_WRAPPER,...el().getRootProps()}),nO=t=>(t.hook(),null);function rO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=ZT(a),c=mv(l.portalContainer),u=n==="start"||n===!0||!e&&en(n),d=n==="end";return Me.createElement(qT,{i18n:r,locale:s,supportedLocales:i},Me.createElement(ff.Provider,{value:l},Me.createElement(pv,{portals:c}),o.map((h,f)=>Me.createElement(nO,{hook:h,key:f})),u&&Me.createElement(oa,null),e,d&&Me.createElement(oa,null)))}const sO="_richTextToolbar_1gbkk_1",iO="_richTextToolbarContainer_1gbkk_5",Qc={richTextToolbar:sO,richTextToolbarContainer:iO};var Jn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Jn||{});const aa=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=KT(),l=WT(),c=[{icon:Jn.BOLD,onClick:r,active:l.bold()},{icon:Jn.ITALIC,onClick:o,active:l.italic()},{icon:Jn.CODE,onClick:i,active:l.code()},{icon:Jn.UL,onClick:s,active:l.bulletList()},{icon:Jn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:Qc.richTextToolbarContainer,children:[ae.jsx("div",{className:Qc.richTextToolbar,children:c.map((u,d)=>ae.jsx(xu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:xf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};try{aa.displayName="RichTextToolbar",aa.__docgenInfo={description:"",displayName:"RichTextToolbar",props:{disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},toolbarComponent:{defaultValue:{value:"null"},description:"",name:"toolbarComponent",required:!1,type:{name:"ReactNode"}}}}}catch{}const oO="_inputInTable_ta5ga_1",aO="_inputHover_ta5ga_13",lO="_inputFocus_ta5ga_18",cO="_inputError_ta5ga_25",uO="_inputWarning_ta5ga_26",dO="_inputDisabled_ta5ga_61",hO="_hideScrollbars_ta5ga_67",fO="_richTextInput_ta5ga_77",pO={inputInTable:oO,inputHover:aO,inputFocus:lO,inputError:cO,inputWarning:uO,inputDisabled:dO,hideScrollbars:hO,richTextInput:fO},xs=$.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=$.useContext(yf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=tO({extensions:()=>[new Nn,new ps,new ds,new fs,new hr,new ms,new cn({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});$.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:pO.richTextInput,children:ae.jsxs(rO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(aa,{disabled:a,toolbarComponent:s}),ae.jsx(oa,{})]})})});try{xs.displayName="RichTextInput",xs.__docgenInfo={description:"",displayName:"RichTextInput",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((markdown: string) => void)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string"}},toolbarComponent:{defaultValue:null,description:"",name:"toolbarComponent",required:!1,type:{name:"ReactNode"}}}}}catch{}const HO={title:"Forms/RichTextInput",component:xs,args:{}},Ms=t=>{const[e,n]=Me.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(xs,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Ds=Ms.bind({}),Wr=Ms.bind({});Wr.args={value:`Paragraph goes here lorem ipsum dolor.
|
|
181
181
|
1. Item (*italic*)
|
|
182
182
|
2. Item (**bold**)
|
|
183
183
|
3. Item (\`code\`)
|
|
@@ -252,4 +252,4 @@ ${t}</ul>
|
|
|
252
252
|
</pre>
|
|
253
253
|
<pre>{value}</pre>
|
|
254
254
|
</>;
|
|
255
|
-
}`,...(yu=(gu=Jr.parameters)==null?void 0:gu.docs)==null?void 0:yu.source}}};const
|
|
255
|
+
}`,...(yu=(gu=Jr.parameters)==null?void 0:gu.docs)==null?void 0:yu.source}}};const UO=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Ds as Default,qr as Disabled,Wr as Filled,Ps as HandlingStateExternallyWithRef,Kr as Placeholder,Jr as WithToolbarComponent,UO as __namedExportsOrder,HO as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./jsx-runtime-FsUICBgo.js";import{r as R}from"./index-RfLt4OUa.js";import{T as c}from"./table-
|
|
1
|
+
import{j as o}from"./jsx-runtime-FsUICBgo.js";import{r as R}from"./index-RfLt4OUa.js";import{T as c}from"./table-033R9jUC.js";import{T as V}from"./text-6KQ6ntOV.js";import{t as g,s as W,u as B}from"./table.stories-data-NfE_v-gH.js";import"./index-VW3EWkuE.js";import"./index.es-VXFRDikp.js";import"./inheritsLoose-8sb_A2v4.js";import"./redux-F5dueAP3.js";import"./objectSpread2-93s0nBry.js";import"./tiny-invariant-R4kOKlvx.js";import"./index-miLrID2P.js";import"./memoize-one.esm-hqe5SRxC.js";import"./objectWithoutPropertiesLoose-9Q1jwsKS.js";import"./lodash-Bmg8FrMx.js";import"./actions-mOcj9IlF.js";import"./common-types-U65vzrrz.js";import"./disabled-context-urNQThQz.js";import"./button-shH4xakS.js";import"./spinner-R8Il4aRe.js";import"./icon-8EQazuuW.js";import"./tslib.es6-OIsz3r9a.js";import"./index-4QtD-hFu.js";import"./tooltip-HEHiU__l.js";import"./types-VB5zD18b.js";import"./types-5uVBABF4.js";import"./badge-23Ty_zBt.js";import"./heading-jZsIIJF0.js";import"./help-icon-SKky6KLV.js";import"./pagination-tnyyuMkB.js";import"./select-DZdWUrCW.js";import"./assertThisInitialized-4q6YPdh3.js";import"./select.input-zP5tW20f.js";import"./input-2BhbKV-j.js";import"./input-group-R8LoqKRn.js";import"./input-group-addon-BHVsW9mL.js";import"./number-input-CMhEMmUd.js";import"./index-qZmQ7nA9.js";import"./index-cCpkwrS5.js";import"./check-box-2gxosI3y.js";import"./slider-MN9iDCsS.js";import"./index-ugi_ZH6T.js";import"./popover-cad2llTa.js";import"./flex-RYZsoWEN.js";const Me={title:"Basic/Table/Row",component:c,args:{table:{...g}}},b=n=>o.jsx(c,{...n}),i=b.bind({});i.args={table:W};const p=b.bind({});p.args={table:B};const t=b.bind({});t.args={table:{...g,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const m=()=>{const[n,e]=R.useState(null),a=r=>e(n===r?null:r);return o.jsx(c,{table:{...g,striped:!1,rows:g.rows.map((r,u)=>({...r,onRowClick:()=>a(u),expandedContent:{content:n===u?o.jsx("div",{children:"Example expanded content"}):null}}))}})},w=()=>{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,d,l)=>{const x=[...s];return s[l].noDrag?s:(x.splice(l,0,x.splice(d,1)[0]),x)},[a,r]=R.useState(n.rows),u=s=>{const{to:d,from:l}=s;e(a,l,d),r(e(a,l,d))};return o.jsx(c,{table:{...n,rows:a},onListReorder:u})},v=()=>{const[n,e]=R.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(V,{children:n}),o.jsx(c,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};var y,D,E;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`args => {
|
|
2
2
|
return <Table
|
|
3
3
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4
4
|
{...args} />;
|
|
@@ -119,4 +119,4 @@ import{j as o}from"./jsx-runtime-FsUICBgo.js";import{r as R}from"./index-RfLt4OU
|
|
|
119
119
|
rows
|
|
120
120
|
}} />
|
|
121
121
|
</>;
|
|
122
|
-
}`,...(O=($=v.parameters)==null?void 0:$.docs)==null?void 0:O.source}}};const
|
|
122
|
+
}`,...(O=($=v.parameters)==null?void 0:$.docs)==null?void 0:O.source}}};const Ne=["ActiveRow","RowFocusEvent","NotStriped","Expandable","DragAndDrop","OnRowEnter"];export{i as ActiveRow,w as DragAndDrop,m as Expandable,t as NotStriped,v as OnRowEnter,p as RowFocusEvent,Ne as __namedExportsOrder,Me as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as m}from"./jsx-runtime-FsUICBgo.js";import{r as j,g as Ue}from"./index-RfLt4OUa.js";import{c as U}from"./index-VW3EWkuE.js";import{G as re,I as Fe}from"./common-types-U65vzrrz.js";import{D as Se}from"./disabled-context-urNQThQz.js";import{i as te}from"./types-5uVBABF4.js";import{T as Ie,u as ze,m as Ge}from"./tooltip-HEHiU__l.js";import{p as $e}from"./index-4QtD-hFu.js";import"./lodash-Bmg8FrMx.js";import{a as Ke,_ as Ye}from"./inheritsLoose-8sb_A2v4.js";import{_ as Ee}from"./assertThisInitialized-4q6YPdh3.js";import{m as ie}from"./memoize-one.esm-hqe5SRxC.js";import{M as ae}from"./types-VB5zD18b.js";import{T as se}from"./text-6KQ6ntOV.js";import{A as Be}from"./actions-mOcj9IlF.js";import{I as ue}from"./icon-8EQazuuW.js";import{s as Xe}from"./select.input-zP5tW20f.js";const Je="_inputInTable_2ynxq_1",Ze="_inputHover_2ynxq_13",Qe="_inputFocus_2ynxq_18",et="_inputError_2ynxq_25",tt="_inputWarning_2ynxq_26",nt="_inputDisabled_2ynxq_61",lt="_hideScrollbars_2ynxq_67",rt="_select_2ynxq_77",at="_isInTable_2ynxq_121",it="_unSelected_2ynxq_133",ot="_error_2ynxq_140",st="_warning_2ynxq_157",ut="_small_2ynxq_174",ct="_right_2ynxq_182",dt="_groupOrderFirst_2ynxq_193",pt="_groupOrderMiddle_2ynxq_194",ft="_groupOrderLast_2ynxq_198",W={inputInTable:Je,inputHover:Ze,inputFocus:Qe,inputError:et,inputWarning:tt,inputDisabled:nt,hideScrollbars:lt,select:rt,isInTable:at,unSelected:it,error:ot,warning:st,small:ut,right:ct,groupOrderFirst:dt,groupOrderMiddle:pt,groupOrderLast:ft},ce=({disabled:e=!1,error:t=null,warning:r=null,tooltip:d=null,options:c,onChange:y=()=>{},onFocus:f=()=>{},onBlur:i=()=>{},right:o=!1,small:h=!1,tabIndex:v=0,selectedOption:b,width:E=null,groupOrder:I=null,testId:S,isInTable:n=!1,clearable:s,placeholder:a,hasNonExistentValue:l,maxTooltipWidth:u,borderRadius:p})=>{const g=j.useContext(Se),_=b===null||(b==null?void 0:b.value)===null?"unselected":b==null?void 0:b.value,O=_==="unselected",C=(_==="unselected"||s?[m.jsx("option",{value:"unselected",disabled:!s,hidden:!s,children:a||"Select..."},"unselected")]:[]).concat(l?[m.jsx("option",{value:b==null?void 0:b.value,disabled:e||g,children:b==null?void 0:b.label},"selectedNonExistentValue")]:[]).concat(c.map((V,T)=>m.jsx("option",{value:V.value,"data-testid":V.testId,children:V.label},T))),q=(()=>{if(I)switch(I){case re.FIRST:return W.groupOrderFirst;case re.LAST:return W.groupOrderLast;default:return W.groupOrderMiddle}return""})();return m.jsx(Ie,{error:!!t,warning:!!r,text:d||t||r,enabled:d&&te(d)||t&&te(t)||r&&te(r)||!1,maxWidth:u,placement:"bottom-center",children:m.jsx("select",{className:U(W.select,O?W.unSelected:"",t?W.error:r?W.warning:"",o?W.right:"",h?W.small:"",n?W.isInTable:"",q),style:{width:E||"",borderRadius:p||""},onChange:V=>{const{value:T}=V.target;let R;T==="unselected"?R={value:null}:R=c.find(F=>String(F.value)===String(T))||{value:null},y(V,R)},onFocus:f,onBlur:i,tabIndex:v,value:_,disabled:e||g,"data-testid":S,children:C})})};try{ce.displayName="NativeSelect",ce.__docgenInfo={description:"",displayName:"NativeSelect",props:{borderRadius:{defaultValue:null,description:"",name:"borderRadius",required:!1,type:{name:"TStringOrNumber"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},error:{defaultValue:{value:"null"},description:"",name:"error",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},warning:{defaultValue:{value:"null"},description:"",name:"warning",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},tooltip:{defaultValue:{value:"null"},description:"",name:"tooltip",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"ISelectSelectedOption[]"}},onChange:{defaultValue:{value:"() => {}"},description:"",name:"onChange",required:!1,type:{name:"((evt: ChangeEvent<HTMLSelectElement>, value: ISelectSelectedOption | { value: null; }) => void)"}},onFocus:{defaultValue:{value:"() => {}"},description:"",name:"onFocus",required:!1,type:{name:"TEmpty"}},onBlur:{defaultValue:{value:"() => {}"},description:"",name:"onBlur",required:!1,type:{name:"TEmpty"}},right:{defaultValue:{value:"false"},description:"",name:"right",required:!1,type:{name:"boolean"}},small:{defaultValue:{value:"false"},description:"",name:"small",required:!1,type:{name:"boolean"}},tabIndex:{defaultValue:{value:"0"},description:"",name:"tabIndex",required:!1,type:{name:"number"}},selectedOption:{defaultValue:null,description:"",name:"selectedOption",required:!1,type:{name:"ISelectSelectedOption"}},width:{defaultValue:{value:"null"},description:"",name:"width",required:!1,type:{name:"TStringOrNumber | null"}},groupOrder:{defaultValue:{value:"null"},description:"",name:"groupOrder",required:!1,type:{name:"string | null"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}},isInTable:{defaultValue:{value:"false"},description:"",name:"isInTable",required:!1,type:{name:"boolean"}},clearable:{defaultValue:null,description:"",name:"clearable",required:!1,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | null"}},hasNonExistentValue:{defaultValue:null,description:"",name:"hasNonExistentValue",required:!1,type:{name:"boolean"}},maxTooltipWidth:{defaultValue:null,description:"",name:"maxTooltipWidth",required:!1,type:{name:"TStringOrNumber"}}}}}catch{}var Ae={exports:{}};(function(e,t){(function(r,d){e.exports=d(j,$e)})(window,function(r,d){return function(c){var y={};function f(i){if(y[i])return y[i].exports;var o=y[i]={i,l:!1,exports:{}};return c[i].call(o.exports,o,o.exports,f),o.l=!0,o.exports}return f.m=c,f.c=y,f.d=function(i,o,h){f.o(i,o)||Object.defineProperty(i,o,{enumerable:!0,get:h})},f.r=function(i){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},f.t=function(i,o){if(1&o&&(i=f(i)),8&o||4&o&&typeof i=="object"&&i&&i.__esModule)return i;var h=Object.create(null);if(f.r(h),Object.defineProperty(h,"default",{enumerable:!0,value:i}),2&o&&typeof i!="string")for(var v in i)f.d(h,v,(function(b){return i[b]}).bind(null,v));return h},f.n=function(i){var o=i&&i.__esModule?function(){return i.default}:function(){return i};return f.d(o,"a",o),o},f.o=function(i,o){return Object.prototype.hasOwnProperty.call(i,o)},f.p="",f(f.s=0)}([function(c,y,f){Object.defineProperty(y,"__esModule",{value:!0});var i=f(1);Object.defineProperty(y,"default",{enumerable:!0,get:function(){return function(o){return o&&o.__esModule?o:{default:o}}(i).default}}),c.exports=y.default},function(c,y,f){Object.defineProperty(y,"__esModule",{value:!0});var i=Object.assign||function(n){for(var s=1;s<arguments.length;s++){var a=arguments[s];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(n[l]=a[l])}return n},o=function(){function n(s,a){for(var l=0;l<a.length;l++){var u=a[l];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(s,u.key,u)}}return function(s,a,l){return a&&n(s.prototype,a),l&&n(s,l),s}}(),h=E(f(2)),v=E(f(3)),b=f(4);function E(n){return n&&n.__esModule?n:{default:n}}var I=[],S=function(n){function s(a){(function(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")})(this,s);var l=function(u,p){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!p||typeof p!="object"&&typeof p!="function"?u:p}(this,(s.__proto__||Object.getPrototypeOf(s)).call(this,a));return l.handleKeyboardEvent=l.handleKeyboardEvent.bind(l),l.registerExclusiveHandler=l.registerExclusiveHandler.bind(l),l.deregisterExclusiveHandler=l.deregisterExclusiveHandler.bind(l),l}return function(a,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof l);a.prototype=Object.create(l&&l.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),l&&(Object.setPrototypeOf?Object.setPrototypeOf(a,l):a.__proto__=l)}(s,h.default.Component),o(s,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyboardEvent,!1),document.addEventListener("keyup",this.handleKeyboardEvent,!1),document.addEventListener("keypress",this.handleKeyboardEvent,!1);var a=this.props,l=a.isExclusive,u=a.isDisabled;l&&!u&&this.registerExclusiveHandler()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyboardEvent,!1),document.removeEventListener("keyup",this.handleKeyboardEvent,!1),document.removeEventListener("keypress",this.handleKeyboardEvent,!1),this.deregisterExclusiveHandler()}},{key:"componentDidUpdate",value:function(a){var l=a.isExclusive,u=a.isDisabled;(this.props.isExclusive!==l||this.props.isDisabled!==u)&&(this.props.isExclusive&&!this.props.isDisabled?this.registerExclusiveHandler():this.deregisterExclusiveHandler())}},{key:"registerExclusiveHandler",value:function(){this.deregisterExclusiveHandler(),I.unshift(this)}},{key:"deregisterExclusiveHandler",value:function(){var a=this;I.includes(this)&&(I=I.filter(function(l){return l!==a}))}},{key:"handleKeyboardEvent",value:function(a){var l=this.props,u=l.isDisabled,p=l.handleKeys,g=l.onKeyEvent,_=l.handleEventType,O=l.children,C=l.handleFocusableElements;if(u||_!==a.type||I.length>0&&I[0]!==this)return!1;var q=a.target===document.body||C,V=this.childrenContainer&&this.childrenContainer.contains(a.target);if(!(O?V:q))return!1;var T=(0,b.findMatchedKey)(a,p);return!!T&&(g(T,a),!0)}},{key:"render",value:function(){var a=this,l=this.props.children,u=Object.assign({},this.props),p=!0,g=!1,_=void 0;try{for(var O,C=Object.keys(s.propTypes)[Symbol.iterator]();!(p=(O=C.next()).done);p=!0)delete u[O.value]}catch(q){g=!0,_=q}finally{try{!p&&C.return&&C.return()}finally{if(g)throw _}}return l?h.default.createElement("span",i({ref:function(q){a.childrenContainer=q}},u),l):null}}]),s}();y.default=S,S.propTypes={handleKeys:v.default.array,handleEventType:v.default.oneOf(["keydown","keyup","keypress"]),handleFocusableElements:v.default.bool,onKeyEvent:v.default.func,isDisabled:v.default.bool,isExclusive:v.default.bool,children:v.default.any},S.defaultProps={handleKeys:[],handleFocusableElements:!1,handleEventType:"keydown",onKeyEvent:function(){return null}},c.exports=y.default},function(c,y){c.exports=r},function(c,y){c.exports=d},function(c,y,f){function i(l,u,p){return u in l?Object.defineProperty(l,u,{value:p,enumerable:!0,configurable:!0,writable:!0}):l[u]=p,l}Object.defineProperty(y,"__esModule",{value:!0}),y.matchKeyEvent=a,y.findMatchedKey=function(l,u){var p=u.map(function(g){var _=g.toLowerCase(),O=s[_];return O||[g]}).reduce(function(g,_){return g.concat(_)},[]).find(function(g){return a(l,g)});return!p&&u.includes("all")&&(p="other"),p};var o={backspace:[8],del:[46],delete:[46],ins:[45],insert:[45],tab:[9],enter:[13],return:[13],esc:[27],space:[32],pageup:[33],pagedown:[34],end:[35],home:[36],left:[37],up:[38],right:[39],down:[40],shift:[16],ctrl:[17],alt:[18],cap:[20],num:[144],clear:[12],meta:[91],";":[186,59],"=":[187,61],",":[188,44],"-":[189,45,173,109],minus:[189,45,173,109],".":[190,110],"/":[191,111],"`":[192],"[":[219],"\\":[220],"]":[221],"*":[106],"+":[107],plus:[107],"'":[222],quote:[222]},h=Object.keys(o).reduce(function(l,u){return Object.assign(l,i({},u.toUpperCase(),o[u]))},{}),v="0123456789".split("").reduce(function(l,u,p){return Object.assign(l,i({},u,[p+48,p+96]))},{}),b="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(l,u,p){return Object.assign(l,i({},u.toLowerCase(),[p+65]),i({},u,[p+65]))},{}),E="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(l,u,p){return Object.assign(l,i({},"f"+u,[p+112]))},{}),I={control:"ctrl",ctrl:"ctrl",shift:"shift",meta:"meta",cmd:"meta",command:"meta",option:"alt",alt:"alt"},S=y.AllKeys=Object.assign({},o,h,v,b,E),n=Object.assign({},v,b),s={all:Object.keys(S),alphanumeric:Object.keys(n),numeric:Object.keys(v),alphabetic:Object.keys(b),function:Object.keys(E)};function a(l,u){var p=l.which||l.keyCode,g=l.type,_=Object.keys(I).filter(function(F){return l[F+"Key"]}).sort(),O=u.toLowerCase().trim(),C=O==="+"?["+"]:O.split(/\s?\+\s?/),q=C.pop(),V=S[q],T=C;if(g==="keypress")return u==String.fromCharCode(p).toLowerCase();if(T.length===0&&_.length===0)return V.indexOf(p)>=0;if(T.length>0&&_.length>0){var R=T.map(function(F){return I[F]}).sort(),A=R.length===_.length&&R.every(function(F,z){return _[z]===F});return V.indexOf(p)>=0&&A}return T.length==0&&_.length===1&&q===_[0]}}])})})(Ae);var mt=Ae.exports;const yt=Ue(mt),we=()=>{const e=j.useRef(null);return[e,()=>{e.current&&e.current.focus()}]},Pe=()=>{const[e,t]=j.useState(!1);return j.useEffect(()=>{(async()=>{document.fonts&&await document.fonts.ready.then(()=>t(!0))})()},[]),e};var ht=typeof performance=="object"&&typeof performance.now=="function",xe=ht?function(){return performance.now()}:function(){return Date.now()};function Te(e){cancelAnimationFrame(e.id)}function gt(e,t){var r=xe();function d(){xe()-r>=t?e.call(null):c.id=requestAnimationFrame(d)}var c={id:requestAnimationFrame(d)};return c}var oe=-1;function qe(e){if(e===void 0&&(e=!1),oe===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),oe=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return oe}var ee=null;function Ce(e){if(e===void 0&&(e=!1),ee===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var d=document.createElement("div"),c=d.style;return c.width="100px",c.height="100px",t.appendChild(d),document.body.appendChild(t),t.scrollLeft>0?ee="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?ee="negative":ee="positive-ascending"),document.body.removeChild(t),ee}return ee}var _t=150,bt=function(t,r){return t};function vt(e){var t,r=e.getItemOffset,d=e.getEstimatedTotalSize,c=e.getItemSize,y=e.getOffsetForIndexAndAlignment,f=e.getStartIndexForOffset,i=e.getStopIndexForStartIndex,o=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,v=e.validateProps;return t=function(b){Ke(E,b);function E(S){var n;return n=b.call(this,S)||this,n._instanceProps=o(n.props,Ee(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:Ee(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof n.props.initialScrollOffset=="number"?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=ie(function(s,a,l,u){return n.props.onItemsRendered({overscanStartIndex:s,overscanStopIndex:a,visibleStartIndex:l,visibleStopIndex:u})}),n._callOnScroll=void 0,n._callOnScroll=ie(function(s,a,l){return n.props.onScroll({scrollDirection:s,scrollOffset:a,scrollUpdateWasRequested:l})}),n._getItemStyle=void 0,n._getItemStyle=function(s){var a=n.props,l=a.direction,u=a.itemSize,p=a.layout,g=n._getItemStyleCache(h&&u,h&&p,h&&l),_;if(g.hasOwnProperty(s))_=g[s];else{var O=r(n.props,s,n._instanceProps),C=c(n.props,s,n._instanceProps),q=l==="horizontal"||p==="horizontal",V=l==="rtl",T=q?O:0;g[s]=_={position:"absolute",left:V?void 0:T,right:V?T:void 0,top:q?0:O,height:q?"100%":C,width:q?C:"100%"}}return _},n._getItemStyleCache=void 0,n._getItemStyleCache=ie(function(s,a,l){return{}}),n._onScrollHorizontal=function(s){var a=s.currentTarget,l=a.clientWidth,u=a.scrollLeft,p=a.scrollWidth;n.setState(function(g){if(g.scrollOffset===u)return null;var _=n.props.direction,O=u;if(_==="rtl")switch(Ce()){case"negative":O=-u;break;case"positive-descending":O=p-l-u;break}return O=Math.max(0,Math.min(O,p-l)),{isScrolling:!0,scrollDirection:g.scrollOffset<u?"forward":"backward",scrollOffset:O,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._onScrollVertical=function(s){var a=s.currentTarget,l=a.clientHeight,u=a.scrollHeight,p=a.scrollTop;n.setState(function(g){if(g.scrollOffset===p)return null;var _=Math.max(0,Math.min(p,u-l));return{isScrolling:!0,scrollDirection:g.scrollOffset<_?"forward":"backward",scrollOffset:_,scrollUpdateWasRequested:!1}},n._resetIsScrollingDebounced)},n._outerRefSetter=function(s){var a=n.props.outerRef;n._outerRef=s,typeof a=="function"?a(s):a!=null&&typeof a=="object"&&a.hasOwnProperty("current")&&(a.current=s)},n._resetIsScrollingDebounced=function(){n._resetIsScrollingTimeoutId!==null&&Te(n._resetIsScrollingTimeoutId),n._resetIsScrollingTimeoutId=gt(n._resetIsScrolling,_t)},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},function(){n._getItemStyleCache(-1,null)})},n}E.getDerivedStateFromProps=function(n,s){return St(n,s),v(n),null};var I=E.prototype;return I.scrollTo=function(n){n=Math.max(0,n),this.setState(function(s){return s.scrollOffset===n?null:{scrollDirection:s.scrollOffset<n?"forward":"backward",scrollOffset:n,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},I.scrollToItem=function(n,s){s===void 0&&(s="auto");var a=this.props,l=a.itemCount,u=a.layout,p=this.state.scrollOffset;n=Math.max(0,Math.min(n,l-1));var g=0;if(this._outerRef){var _=this._outerRef;u==="vertical"?g=_.scrollWidth>_.clientWidth?qe():0:g=_.scrollHeight>_.clientHeight?qe():0}this.scrollTo(y(this.props,n,s,p,this._instanceProps,g))},I.componentDidMount=function(){var n=this.props,s=n.direction,a=n.initialScrollOffset,l=n.layout;if(typeof a=="number"&&this._outerRef!=null){var u=this._outerRef;s==="horizontal"||l==="horizontal"?u.scrollLeft=a:u.scrollTop=a}this._callPropsCallbacks()},I.componentDidUpdate=function(){var n=this.props,s=n.direction,a=n.layout,l=this.state,u=l.scrollOffset,p=l.scrollUpdateWasRequested;if(p&&this._outerRef!=null){var g=this._outerRef;if(s==="horizontal"||a==="horizontal")if(s==="rtl")switch(Ce()){case"negative":g.scrollLeft=-u;break;case"positive-ascending":g.scrollLeft=u;break;default:var _=g.clientWidth,O=g.scrollWidth;g.scrollLeft=O-_-u;break}else g.scrollLeft=u;else g.scrollTop=u}this._callPropsCallbacks()},I.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Te(this._resetIsScrollingTimeoutId)},I.render=function(){var n=this.props,s=n.children,a=n.className,l=n.direction,u=n.height,p=n.innerRef,g=n.innerElementType,_=n.innerTagName,O=n.itemCount,C=n.itemData,q=n.itemKey,V=q===void 0?bt:q,T=n.layout,R=n.outerElementType,A=n.outerTagName,F=n.style,z=n.useIsScrolling,K=n.width,G=this.state.isScrolling,P=l==="horizontal"||T==="horizontal",M=P?this._onScrollHorizontal:this._onScrollVertical,X=this._getRangeToRender(),ne=X[0],le=X[1],J=[];if(O>0)for(var H=ne;H<=le;H++)J.push(j.createElement(s,{data:C,key:V(H,C),index:H,isScrolling:z?G:void 0,style:this._getItemStyle(H)}));var Z=d(this.props,this._instanceProps);return j.createElement(R||A||"div",{className:a,onScroll:M,ref:this._outerRefSetter,style:Ye({position:"relative",height:u,width:K,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:l},F)},j.createElement(g||_||"div",{children:J,ref:p,style:{height:P?"100%":Z,pointerEvents:G?"none":void 0,width:P?Z:"100%"}}))},I._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var n=this.props.itemCount;if(n>0){var s=this._getRangeToRender(),a=s[0],l=s[1],u=s[2],p=s[3];this._callOnItemsRendered(a,l,u,p)}}if(typeof this.props.onScroll=="function"){var g=this.state,_=g.scrollDirection,O=g.scrollOffset,C=g.scrollUpdateWasRequested;this._callOnScroll(_,O,C)}},I._getRangeToRender=function(){var n=this.props,s=n.itemCount,a=n.overscanCount,l=this.state,u=l.isScrolling,p=l.scrollDirection,g=l.scrollOffset;if(s===0)return[0,0,0,0];var _=f(this.props,g,this._instanceProps),O=i(this.props,_,g,this._instanceProps),C=!u||p==="backward"?Math.max(1,a):1,q=!u||p==="forward"?Math.max(1,a):1;return[Math.max(0,_-C),Math.max(0,Math.min(s-1,O+q)),_,O]},E}(j.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var St=function(t,r){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,r.instance},It=vt({getItemOffset:function(t,r){var d=t.itemSize;return r*d},getItemSize:function(t,r){var d=t.itemSize;return d},getEstimatedTotalSize:function(t){var r=t.itemCount,d=t.itemSize;return d*r},getOffsetForIndexAndAlignment:function(t,r,d,c,y,f){var i=t.direction,o=t.height,h=t.itemCount,v=t.itemSize,b=t.layout,E=t.width,I=i==="horizontal"||b==="horizontal",S=I?E:o,n=Math.max(0,h*v-S),s=Math.min(n,r*v),a=Math.max(0,r*v-S+v+f);switch(d==="smart"&&(c>=a-S&&c<=s+S?d="auto":d="center"),d){case"start":return s;case"end":return a;case"center":{var l=Math.round(a+(s-a)/2);return l<Math.ceil(S/2)?0:l>n+Math.floor(S/2)?n:l}case"auto":default:return c>=a&&c<=s?c:c<a?a:s}},getStartIndexForOffset:function(t,r){var d=t.itemCount,c=t.itemSize;return Math.max(0,Math.min(d-1,Math.floor(r/c)))},getStopIndexForStartIndex:function(t,r,d){var c=t.direction,y=t.height,f=t.itemCount,i=t.itemSize,o=t.layout,h=t.width,v=c==="horizontal"||o==="horizontal",b=r*i,E=v?h:y,I=Math.ceil((E+d-b)/i);return Math.max(0,Math.min(f-1,r+I-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});const Ot="_layerContainer_1lbvo_1",Et="_layer_1lbvo_1",xt="_small_1lbvo_23",Tt="_heading_1lbvo_26",qt="_option_1lbvo_27",Ct="_message_1lbvo_28",Vt="_focused_1lbvo_64",Lt="_selected_1lbvo_68",Rt="_disabled_1lbvo_71",Nt="_check_1lbvo_75",jt="_optionContent_1lbvo_92",Ft="_label_1lbvo_97",At="_icon_1lbvo_104",wt="_details_1lbvo_109",w={layerContainer:Ot,layer:Et,small:xt,heading:Tt,option:qt,message:Ct,focused:Vt,selected:Lt,disabled:Rt,check:Nt,optionContent:jt,label:Ft,icon:At,details:wt},de=({label:e})=>m.jsx("div",{onClick:t=>t.stopPropagation(),className:w.heading,children:e});try{de.displayName="Heading",de.__docgenInfo={description:"",displayName:"Heading",props:{label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"TStringOrNumber"}}}}}catch{}const pe=({details:e,label:t,icon:r,disabled:d=!1,selected:c=!1,focused:y=!1,onSelectOption:f,actions:i,closeLayer:o,testId:h})=>m.jsxs("div",{className:U(w.option,d?w.disabled:"",c?w.selected:"",y?w.focused:""),onClick:!d&&f?f:void 0,"data-testid":h,children:[m.jsx("div",{className:w.optionContent,children:m.jsxs("span",{className:w.label,title:t,children:[t,r&&m.jsx("span",{className:w.icon,children:r})]})}),e&&m.jsx("div",{className:U(w.details),children:m.jsx(se,{faint:!0,children:e})}),!!(i!=null&&i.length)&&m.jsx("div",{className:U(w.actions),children:m.jsx(Be,{actions:i,closeLayer:o})}),m.jsx("span",{className:w.check,children:c?m.jsx(ue,{icon:Fe.CHECK}):null})]});try{pe.displayName="Option",pe.__docgenInfo={description:"",displayName:"Option",props:{details:{defaultValue:null,description:"",name:"details",required:!1,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"ReactNode"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},selected:{defaultValue:{value:"false"},description:"",name:"selected",required:!1,type:{name:"boolean"}},focused:{defaultValue:{value:"false"},description:"",name:"focused",required:!1,type:{name:"boolean"}},onSelectOption:{defaultValue:null,description:"",name:"onSelectOption",required:!1,type:{name:"((event?: MouseEvent<HTMLDivElement, MouseEvent>, section?: ISelectSectionProps) => void) | undefined"}},actions:{defaultValue:null,description:"",name:"actions",required:!1,type:{name:"any[]"}},closeLayer:{defaultValue:null,description:"",name:"closeLayer",required:!1,type:{name:"TEmpty"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const fe=({section:e,selected:t,focused:r,onSelectOption:d,closeLayer:c})=>{const y=j.useContext(Se);switch(e.type){case ae.HEADING:return m.jsx(de,{label:e.label});case ae.OPTION:default:return m.jsx(pe,{closeLayer:c,actions:e.actions,label:e.label,details:e.details,icon:e.icon,disabled:e.disabled||y,selected:t,focused:r,onSelectOption:d,testId:e.testId})}};try{fe.displayName="Section",fe.__docgenInfo={description:"",displayName:"Section",props:{section:{defaultValue:null,description:"",name:"section",required:!0,type:{name:"ISelectSection"}},selected:{defaultValue:null,description:"",name:"selected",required:!1,type:{name:"boolean"}},focused:{defaultValue:null,description:"",name:"focused",required:!1,type:{name:"boolean"}},onSelectOption:{defaultValue:null,description:"",name:"onSelectOption",required:!1,type:{name:"((event?: MouseEvent<HTMLDivElement, MouseEvent>, section?: ISelectSectionProps) => void) | undefined"}},closeLayer:{defaultValue:null,description:"",name:"closeLayer",required:!1,type:{name:"TEmpty"}}}}}catch{}const me=(e,t)=>{const d=document.createElement("canvas").getContext("2d");return d?(d.font=t,d.measureText(e).width):0},Me="13px",ke="12px",Pt="Roobert",Mt="sans-serif",kt=12,Ht=8,Wt=30,Dt=24,Ut=5,zt=3,Gt=1,$t=2,Ve=10,He=(e=!1,t=!1)=>`${e?ke:Me} ${t?Pt:Mt}`,Kt=(e=!1,t=!1)=>(e?Ht:kt)+(e?Dt:Wt)+(t?17:0),Le=(e,t,r,d)=>{const c=He(t,r),y=d?me(d,c):0,f=Math.ceil(e.reduce((o,h)=>{var S;const v=(((S=h==null?void 0:h.actions)==null?void 0:S.length)??0)*24,b=h.icon?parseInt(t?ke:Me)+7:0,E=`${h.label} ${h.details||""}`,I=me(E,c)+v+b;return o=I>o?I:o,o},y)),i=Kt(t,!0);return f+i},Yt=(e,t,r)=>{const d=He(!0,r),c=me(e.label,d),y=(t?zt:Ut)*2+Gt*2+$t;return Math.ceil(c+y)},ye=({listRef:e,isMulti:t,sections:r,selectedOptions:d,onSelectOption:c,focusedOptionIndex:y,width:f,small:i,firstSelectedOptionIndex:o,closeLayer:h,testId:v})=>{j.useEffect(()=>{o&&o!==null&&e.current!==null&&e.current.scrollToItem(o,"start")},[o,e]);const b=i?24:30;return m.jsx("div",{"data-testid":v,className:U(w.layer,i&&w.small),children:r.length?m.jsx(It,{ref:e,height:r.length<Ve?b*r.length:b*Ve,itemCount:r.length,itemSize:b,width:f,children:({index:E,style:I})=>{var S;return m.jsx("div",{style:I,children:m.jsx(fe,{closeLayer:h,section:r[E],selected:t&&r[E].type!==ae.HEADING&&Array.isArray(d)?d.some(n=>{var s;return n&&(n==null?void 0:n.value)===((s=r==null?void 0:r[E])==null?void 0:s.value)}):!Array.isArray(d)&&((S=r==null?void 0:r[E])==null?void 0:S.value)===(d==null?void 0:d.value),focused:y===E,onSelectOption:n=>c(n,r[E])})})}}):m.jsx("ul",{children:m.jsx("li",{children:m.jsx("div",{className:w.message,style:{width:f},children:"No matches"})})})})};try{ye.displayName="Layer",ye.__docgenInfo={description:"",displayName:"Layer",props:{listRef:{defaultValue:null,description:"",name:"listRef",required:!0,type:{name:"RefObject<any>"}},isMulti:{defaultValue:null,description:"",name:"isMulti",required:!1,type:{name:"boolean"}},sections:{defaultValue:null,description:"",name:"sections",required:!0,type:{name:"ISelectSection[]"}},selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!0,type:{name:"ISelectSelectedOption | ISelectSelectedOption[]"}},onSelectOption:{defaultValue:null,description:"",name:"onSelectOption",required:!0,type:{name:"(event?: MouseEvent<HTMLDivElement, MouseEvent> | undefined, section?: ISelectSection | undefined) => void"}},focusedOptionIndex:{defaultValue:null,description:"",name:"focusedOptionIndex",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!0,type:{name:"number"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},firstSelectedOptionIndex:{defaultValue:null,description:"",name:"firstSelectedOptionIndex",required:!1,type:{name:"number"}},closeLayer:{defaultValue:null,description:"",name:"closeLayer",required:!0,type:{name:"TEmpty"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const Bt="_inputInTable_1qfoj_1",Xt="_inputHover_1qfoj_13",Jt="_inputFocus_1qfoj_18",Zt="_inputError_1qfoj_25",Qt="_inputWarning_1qfoj_26",en="_inputDisabled_1qfoj_61",tn="_hideScrollbars_1qfoj_67",nn="_trigger_1qfoj_77",ln="_isInTable_1qfoj_93",rn="_input_1qfoj_1",an="_isOpen_1qfoj_114",on="_error_1qfoj_122",sn="_warning_1qfoj_139",un="_disabled_1qfoj_156",cn="_icons_1qfoj_162",dn="_clearAll_1qfoj_169",pn="_iconOpen_1qfoj_170",fn="_small_1qfoj_181",mn="_triggerInputContainer_1qfoj_189",yn="_right_1qfoj_198",hn="_multiOptions_1qfoj_211",gn="_multiOption_1qfoj_211",_n="_label_1qfoj_239",bn="_closeMultiOption_1qfoj_242",vn="_focus_1qfoj_253",Sn="_selectedSingleValue_1qfoj_257",In="_placeHolder_1qfoj_258",On="_groupOrderFirst_1qfoj_297",En="_groupOrderMiddle_1qfoj_298",xn="_groupOrderLast_1qfoj_302",Tn="_detailedLabel_1qfoj_307",N={inputInTable:Bt,inputHover:Xt,inputFocus:Jt,inputError:Zt,inputWarning:Qt,inputDisabled:en,hideScrollbars:tn,trigger:nn,isInTable:ln,input:rn,isOpen:an,error:on,warning:sn,disabled:un,icons:cn,clearAll:dn,iconOpen:pn,small:fn,triggerInputContainer:mn,right:yn,multiOptions:hn,multiOption:gn,label:_n,closeMultiOption:bn,focus:vn,selectedSingleValue:Sn,placeHolder:In,groupOrderFirst:On,groupOrderMiddle:En,groupOrderLast:xn,detailedLabel:Tn},he=({selectedOptions:e,small:t,width:r})=>{const d=Pe(),[c,y]=j.useState([]),[f,i]=j.useState([]);return j.useEffect(()=>{let o=[],h=[],v=0;e.forEach((b,E)=>{v+=Yt(b,t,d),E===e.length-1&&v<r||v<r-24?o.push(b):h.push(b)}),y(o),i(h)},[e,d,r]),m.jsxs("div",{className:N.multiOptions,children:[c.filter(o=>o&&o.label).map((o,h)=>m.jsx("span",{className:N.multiOption,onClick:v=>{v.stopPropagation()},children:o.label},h)),f.length>0&&m.jsx(Ie,{text:f.map((o,h)=>m.jsx("div",{children:o.label},h)),display:"inline-flex",children:m.jsx("span",{className:N.multiOption,children:c.length?`+${f.length}`:`${f.length} items`})})]})};try{he.displayName="MultiSelectedOptions",he.__docgenInfo={description:"",displayName:"MultiSelectedOptions",props:{selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!0,type:{name:"ISelectSelectedOption[]"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!0,type:{name:"number"}}}}}catch{}const ge=({selectedOptions:e,searchable:t=!1,searchValue:r,onChange:d=()=>{},inputRef:c,error:y,placeholder:f="Select...",small:i})=>{const o=j.useRef(null),h=Array.isArray(e),v=h?e.length>0:!!e,b=r?r.length+1:1,E=()=>{var n,s;const I=((n=o.current)==null?void 0:n.offsetWidth)||0,S=((s=c.current)==null?void 0:s.offsetWidth)||0;return I-S};return m.jsxs("div",{className:N.triggerInputContainer,ref:o,children:[v?h?m.jsx(he,{selectedOptions:e,small:i,width:E()}):m.jsx("span",{className:N.selectedSingleValue,children:r!=null&&r.length?"":e==null?void 0:e.label}):m.jsx("span",{className:N.placeHolder,children:r!=null&&r.length?"":f}),t?m.jsx("input",{tabIndex:-1,ref:c,size:b,className:U(N.input,y?N.error:""),value:r,onChange:I=>d(I.target.value)}):null]})};try{ge.displayName="Input",ge.__docgenInfo={description:"",displayName:"Input",props:{selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!1,type:{name:"ISelectSelectedOption | ISelectSelectedOption[]"}},searchable:{defaultValue:{value:"false"},description:"",name:"searchable",required:!1,type:{name:"boolean"}},searchValue:{defaultValue:null,description:"",name:"searchValue",required:!1,type:{name:"string"}},inputRef:{defaultValue:null,description:"",name:"inputRef",required:!0,type:{name:"MutableRefObject<HTMLInputElement | null>"}},onChange:{defaultValue:{value:"() => {}"},description:"",name:"onChange",required:!1,type:{name:"((value: string) => void)"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"ReactNode"}},placeholder:{defaultValue:{value:"Select..."},description:"",name:"placeholder",required:!1,type:{name:"string | null"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}}}}}catch{}const _e=({selectedOptions:e,searchValue:t,searchable:r,clearable:d,onClickTrigger:c,element:y,error:f,warning:i,tooltip:o,small:h,isInTable:v,disabled:b,onChangeSearch:E,onClickDeselect:I,onClickClear:S,tabIndex:n,isOpen:s,triggerRef:a,clearAllIsFocused:l,focusedSelectedOptionIndex:u,onFocus:p,onBlur:g,groupOrder:_,maxTooltipWidth:O,placeholder:C,right:q,testId:V})=>{var P;const[T,R]=we(),A=Array.isArray(e)?e.length>0&&((P=e[0])==null?void 0:P.value):e==null?void 0:e.value,F=d&&A,z=(()=>{if(_)switch(_){case re.FIRST:return N.groupOrderFirst;case re.LAST:return N.groupOrderLast;default:return N.groupOrderMiddle}return""})(),K=!Array.isArray(e)&&(e!=null&&e.details)?{...e,label:m.jsxs("div",{className:U(N.detailedLabel),children:[m.jsx(se,{children:e.label}),m.jsx(se,{muted:!0,children:e.details})]})}:e,G=m.jsxs(m.Fragment,{children:[y,m.jsxs("div",{ref:a,tabIndex:n,className:U(N.trigger,s?N.isOpen:"",f?N.error:i?N.warning:"",b?N.disabled:"",h?N.small:"",v?N.isInTable:"",q?N.right:"",z),onClick:M=>{M.stopPropagation(),typeof R=="function"&&R(),c(M)},onFocus:p,onBlur:g,"data-testid":V,children:[m.jsx(ge,{selectedOptions:K,placeholder:C,searchable:r,searchValue:t,inputRef:T,onChange:E,error:f,small:h}),m.jsx("span",{className:N.icons,children:F?m.jsx("span",{className:U(N.clearAll,l?N.focus:""),onClick:M=>{M.stopPropagation(),S&&S(M)},children:m.jsx(ue,{icon:Fe.CLOSE})}):m.jsx("span",{className:U(N.iconOpen),children:m.jsx(ue,{icon:"chevron down"})})})]})]});return m.jsx(m.Fragment,{children:m.jsx(Ie,{error:!!f,warning:!!i,text:o||f||i,enabled:o&&te(o)||f&&te(f)||i&&te(i)||!1,maxWidth:O,placement:"bottom-center",children:G})})};try{_e.displayName="Trigger",_e.__docgenInfo={description:"",displayName:"Trigger",props:{selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!1,type:{name:"ISelectSelectedOption | ISelectSelectedOption[]"}},searchValue:{defaultValue:null,description:"",name:"searchValue",required:!1,type:{name:"string"}},searchable:{defaultValue:null,description:"",name:"searchable",required:!1,type:{name:"boolean"}},clearable:{defaultValue:null,description:"",name:"clearable",required:!1,type:{name:"boolean"}},onClickTrigger:{defaultValue:null,description:"",name:"onClickTrigger",required:!0,type:{name:"(evt: MouseEvent<HTMLDivElement, MouseEvent>) => void"}},element:{defaultValue:null,description:"",name:"element",required:!1,type:{name:"ReactNode"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"ReactNode"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"ReactNode"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"ReactNode"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},isInTable:{defaultValue:null,description:"",name:"isInTable",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},onChangeSearch:{defaultValue:null,description:"",name:"onChangeSearch",required:!1,type:{name:"((value: string) => void)"}},onClickDeselect:{defaultValue:null,description:"",name:"onClickDeselect",required:!1,type:{name:"((evt: MouseEvent<HTMLDivElement, MouseEvent>) => void)"}},onClickClear:{defaultValue:null,description:"",name:"onClickClear",required:!1,type:{name:"((evt: MouseEvent<HTMLSpanElement, MouseEvent>) => void)"}},tabIndex:{defaultValue:null,description:"",name:"tabIndex",required:!1,type:{name:"number"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!1,type:{name:"boolean"}},triggerRef:{defaultValue:null,description:"",name:"triggerRef",required:!1,type:{name:"RefObject<HTMLDivElement>"}},clearAllIsFocused:{defaultValue:null,description:"",name:"clearAllIsFocused",required:!1,type:{name:"boolean"}},focusedSelectedOptionIndex:{defaultValue:null,description:"",name:"focusedSelectedOptionIndex",required:!1,type:{name:"number"}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"((evt: FocusEvent<HTMLDivElement, Element>) => void)"}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"((evt: FocusEvent<HTMLDivElement, Element>) => void)"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},maxTooltipWidth:{defaultValue:null,description:"",name:"maxTooltipWidth",required:!1,type:{name:"TStringOrNumber"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | null"}},right:{defaultValue:null,description:"",name:"right",required:!1,type:{name:"boolean"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}var D=(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))(D||{});const We={options:["none","clearAll"],currentIndex:0,currentOption:!1,clearAll:!1},qn=e=>e!==null?e+1:0,De=(e,t)=>{const r=["none",...e.map((c,y)=>c.type!==ae.HEADING?y:null).filter(c=>c!==null)],d=qn(t);return{options:r,currentIndex:d,current:r[d]}},Cn=(e,t)=>{const r=e==="up"?-1:1,d=t.currentIndex+r,c=(d<0?t.options.length-1:d)%t.options.length,y=t.options[c];return{...t,currentIndex:c,current:y}},Vn=(e,t,r)=>{const d=e==="left"?-1:1,c=t&&t.length?["none",...Array.from({length:t.length},(h,v)=>v),"clearAll"]:["none","clearAll"],y=r.currentIndex+d,f=(y<0?c.length-1:y)%c.length,i=c[f];return{options:c,currentIndex:f,currentOption:i,clearAll:i==="clearAll"}},Re=()=>We,Ne=e=>({...e,currentIndex:0,current:"none"}),Ln=(e,t)=>{switch(t.type){case D.SET_VISIBLE_OPTIONS:return{...e,visibleOptions:t.options||[]};case D.RESET_LAYER_FOCUS:return{...e,layerFocus:De(t.options||[],t.firstSelectedOptionIndex||0)};case D.CLEAR_SEARCH:return{...e,visibleOptions:t.options||[],searchValue:""};case D.ON_CHANGE_SEARCH:{let d=[...(t.options||[]).filter(c=>(String(c.label)+(c.details?String(c.details):"")).toLowerCase().includes(String(t.value||"").toLowerCase()))];return t.createAble&&t.value&&t.value!==""&&d.push({label:`Create "${t.value}"`,value:t.value,createAble:!0}),{...e,searchValue:t.value,visibleOptions:d,layerFocus:Ne(e.layerFocus)}}case D.FOCUS_TRIGGER_INPUTS:return{...e,triggerFocus:Vn(t.direction||"right",t.selectedOptions||[],e.triggerFocus),layerFocus:Ne(e.layerFocus)};case D.BLUR_TRIGGER_INPUTS:return{...e,triggerFocus:Re()};case D.FOCUS_LAYER_OPTIONS:return t.nextLayerFocus?{...e,layerFocus:t.nextLayerFocus,triggerFocus:Re()}:e;case D.OPEN_LAYER:return{...e,isLayerOpen:!0};case D.CLOSE_LAYER:return{...e,isLayerOpen:!1};default:return e}},Rn={auto:!0,possiblePlacements:["bottom-start","top-start"],placement:"bottom-start",preferX:"right",preferY:"bottom"};var k=(e=>(e.CLOSE_LAYER="CLOSE_LAYER",e.OPEN_LAYER="OPEN_LAYER",e.SET_VISIBLE_OPTIONS="SET_VISIBLE_OPTIONS",e.CLEAR_SEARCH="CLEAR_SEARCH",e.RESET_LAYER_FOCUS="RESET_LAYER_FOCUS",e.FOCUS_LAYER_OPTIONS="FOCUS_LAYER_OPTIONS",e.BLUR_TRIGGER_INPUTS="BLUR_TRIGGER_INPUTS",e.FOCUS_TRIGGER_INPUTS="FOCUS_TRIGGER_INPUTS",e.ON_CHANGE_SEARCH="ON_CHANGE_SEARCH",e))(k||{}),$=(e=>(e.RIGHT="right",e.LEFT="left",e.UP="up",e.DOWN="down",e.ENTER="enter",e.ESC="esc",e.TAB="tab",e))($||{});const be=({state:e,dispatch:t,options:r,setTriggerFocus:d,disabled:c,disabledContext:y,onCreate:f,onChange:i,selectedOptions:o,width:h,small:v,isFontLoaded:b,placeholder:E,firstSelectedOptionIndex:I,createAble:S,listRef:n,autoLayerWidth:s})=>{const a=()=>{e.isLayerOpen&&t({type:k.CLOSE_LAYER}),d()},l=()=>t({type:k.OPEN_LAYER}),u=j.useRef(!0);j.useEffect(()=>{u.current?u.current=!1:t({type:k.SET_VISIBLE_OPTIONS,options:r})},[r]);const p=(x,L,Q)=>{if(!(c||y)){if(Q&&Q(),L){if(L.createAble&&f)f(L.value);else if(!L.disabled)if(Array.isArray(o))if(o.some(B=>B.label===L.label)){const B=o.filter(Oe=>Oe.label!==L.label);i&&i(x,B)}else{const B=[...o,L];i&&i(x,B)}else i&&i(x,L)}t({type:k.CLEAR_SEARCH,options:r}),d()}},g=j.useCallback(()=>h?h!=="auto"?h:Le(r,v,b,E):"100%",[r,b]),_=j.useCallback(x=>s?Math.max(Le(r,v,b,E),x==null?void 0:x.width):x==null?void 0:x.width,[r,b]),{renderLayer:O,layerProps:C,triggerProps:q,triggerBounds:V}=ze({isOpen:(e==null?void 0:e.isLayerOpen)??!1,overflowContainer:!0,...Rn,ResizeObserver,onOutsideClick:a,onParentClose:a}),T=()=>{if(!(c||y)){if(e.isLayerOpen){a();return}t({type:k.RESET_LAYER_FOCUS,options:r,firstSelectedOptionIndex:I}),l()}},R=j.useRef(!0);j.useEffect(()=>{R.current?R.current=!1:e.isLayerOpen||t({type:k.CLEAR_SEARCH,options:r})},[e.isLayerOpen]);const A=(x,L)=>{const Q=o instanceof Array?o.filter(Y=>Y.value!==L.value):null;i&&i(x,Q)},F=x=>{const L=o instanceof Array?[]:{value:null};i&&i(x,L)},z=x=>t({type:k.ON_CHANGE_SEARCH,options:r,value:x,createAble:S}),K=()=>{l(),t({type:k.BLUR_TRIGGER_INPUTS})},G=x=>{n.current&&Number.isInteger(x)&&n.current.scrollToItem(x)},P=x=>{const L=Cn(x,e.layerFocus);t({type:k.FOCUS_LAYER_OPTIONS,nextLayerFocus:L}),G(L.current)},M=x=>{t({type:k.FOCUS_TRIGGER_INPUTS,ICustomSelectDirection:x,selectedOptions:o})},X=x=>F(x),ne=o&&o[e.triggerFocus.currentOption],le=x=>{A(x,o[e.triggerFocus.currentOption])},J=x=>{var L;p(x,(L=e==null?void 0:e.visibleOptions)==null?void 0:L[e.layerFocus.current],a)},H=e.triggerFocus.clearAll;return{getTriggerWidth:g,onKeyEvent:(x,L)=>{switch(x){case $.UP:{P(x);break}case $.DOWN:{e.isLayerOpen?P(x):K();break}case $.LEFT:case $.RIGHT:{M(x);break}case $.ENTER:{H?X(L):ne?le(L):J(L);break}case $.ESC:{a();break}}},clearAllIsFocused:H,triggerProps:q,onClickTrigger:T,onChangeSearch:z,onClickDeselectOption:A,onClickClearAll:F,renderLayer:O,layerProps:C,closeLayer:a,onSelectOption:p,getLayerWidth:_,triggerBounds:V}};try{be.displayName="useCustomSelectLogic",be.__docgenInfo={description:"",displayName:"useCustomSelectLogic",props:{state:{defaultValue:null,description:"",name:"state",required:!0,type:{name:"ICustomSelectState"}},dispatch:{defaultValue:null,description:"",name:"dispatch",required:!0,type:{name:"(action: any) => void"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"TCustomSelectSelectOption[]"}},setTriggerFocus:{defaultValue:null,description:"",name:"setTriggerFocus",required:!0,type:{name:"TEmpty"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!0,type:{name:"boolean"}},disabledContext:{defaultValue:null,description:"",name:"disabledContext",required:!0,type:{name:"boolean"}},onCreate:{defaultValue:null,description:"",name:"onCreate",required:!0,type:{name:"((value: string) => void) | null"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"((evt: any, selected: any) => void) | null"}},selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!0,type:{name:"ISelectSelectedOption | ISelectSelectedOption[]"}},width:{defaultValue:null,description:"",name:"width",required:!0,type:{name:"TStringOrNumber | null"}},small:{defaultValue:null,description:"",name:"small",required:!0,type:{name:"boolean"}},isFontLoaded:{defaultValue:null,description:"",name:"isFontLoaded",required:!0,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},firstSelectedOptionIndex:{defaultValue:null,description:"",name:"firstSelectedOptionIndex",required:!0,type:{name:"number"}},createAble:{defaultValue:null,description:"",name:"createAble",required:!0,type:{name:"boolean"}},listRef:{defaultValue:null,description:"",name:"listRef",required:!0,type:{name:"RefObject<any>"}},autoLayerWidth:{defaultValue:null,description:"",name:"autoLayerWidth",required:!0,type:{name:"boolean"}}}}}catch{}const ve=e=>{const{multi:t=!1,disabled:r=!1,error:d=null,warning:c=null,tooltip:y=null,options:f,selectedOptions:i,onCreate:o=null,placeholder:h="",small:v=!1,tabIndex:b=0,onFocus:E=()=>{},onBlur:I=()=>{},searchable:S=!0,clearable:n=!1,maxTooltipWidth:s,closeOnOptionActionClick:a,isInTable:l=!1,groupOrder:u,firstSelectedOptionIndex:p=0,right:g=!1,testId:_=void 0}=e,O=j.useContext(Se),C=o!==null,q=j.useRef(null),[V,T]=we(),R=Pe(),[A,F]=j.useReducer(Ln,{options:f,firstSelectedOptionIndex:p},({options:Y})=>({searchValue:"",visibleOptions:Y,layerFocus:De(Y,p??0),triggerFocus:We,isLayerOpen:!1})),{getTriggerWidth:z,onKeyEvent:K,clearAllIsFocused:G,triggerProps:P,onClickTrigger:M,onChangeSearch:X,onClickDeselectOption:ne,onClickClearAll:le,renderLayer:J,layerProps:H,closeLayer:Z,onSelectOption:x,getLayerWidth:L,triggerBounds:Q}=be({...e,state:A,dispatch:F,setTriggerFocus:T,disabledContext:O,isFontLoaded:R,createAble:C,listRef:q});return m.jsx("div",{style:{width:z()},children:m.jsxs(yt,{handleKeys:Object.values($),onKeyEvent:K,children:[m.jsx(_e,{selectedOptions:i,searchValue:A.searchValue,isOpen:A.isLayerOpen,focusedSelectedOptionIndex:A.triggerFocus.currentOption,clearAllIsFocused:G,searchable:S,triggerRef:Ge(V,P.ref),error:d,warning:c,tooltip:y,small:v,isInTable:l,disabled:r||O,clearable:n,tabIndex:b,onClickTrigger:M,onChangeSearch:X,onClickDeselect:ne,onClickClear:le,onFocus:E,onBlur:I,groupOrder:u,maxTooltipWidth:s,placeholder:h,right:g,testId:_}),A.isLayerOpen&&J(m.jsx("div",{...H,className:w.layerContainer,children:m.jsx(ye,{listRef:q,isMulti:t,sections:A.visibleOptions,selectedOptions:i,onSelectOption:(Y,B)=>{x(Y,B,t?void 0:Z)},closeLayer:()=>{a&&Z()},width:L(Q),small:v,focusedOptionIndex:A.layerFocus.current,firstSelectedOptionIndex:p??0,testId:_&&`${_}-layer`})}))]})})};try{ve.displayName="CustomSelect",ve.__docgenInfo={description:"",displayName:"CustomSelect",props:{multi:{defaultValue:null,description:"",name:"multi",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},tooltip:{defaultValue:null,description:"",name:"tooltip",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},options:{defaultValue:null,description:"",name:"options",required:!0,type:{name:"TCustomSelectSelectOption[]"}},selectedOptions:{defaultValue:null,description:"",name:"selectedOptions",required:!0,type:{name:"ISelectSelectedOption | ISelectSelectedOption[]"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((evt: ChangeEvent<HTMLInputElement>, newSelectedOptions: ISelectSelectedOption) => void)"}},onCreate:{defaultValue:null,description:"",name:"onCreate",required:!1,type:{name:"((value: string) => void)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | null"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},tabIndex:{defaultValue:null,description:"",name:"tabIndex",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber | null"}},autoLayerWidth:{defaultValue:null,description:"",name:"autoLayerWidth",required:!1,type:{name:"boolean"}},onFocus:{defaultValue:null,description:"",name:"onFocus",required:!1,type:{name:"TEmpty"}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!1,type:{name:"TEmpty"}},searchable:{defaultValue:null,description:"",name:"searchable",required:!1,type:{name:"boolean"}},clearable:{defaultValue:null,description:"",name:"clearable",required:!1,type:{name:"boolean"}},isInTable:{defaultValue:null,description:"",name:"isInTable",required:!1,type:{name:"boolean"}},groupOrder:{defaultValue:null,description:"",name:"groupOrder",required:!1,type:{name:"string"}},firstSelectedOptionIndex:{defaultValue:null,description:"",name:"firstSelectedOptionIndex",required:!0,type:{name:"number | null"}},right:{defaultValue:null,description:"",name:"right",required:!1,type:{name:"boolean"}},maxTooltipWidth:{defaultValue:null,description:"",name:"maxTooltipWidth",required:!1,type:{name:"TStringOrNumber"}},closeOnOptionActionClick:{defaultValue:null,description:"",name:"closeOnOptionActionClick",required:!1,type:{name:"boolean"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}const je=e=>{const{name:t="",options:r=[],value:d,native:c=!1,onChange:y=()=>{},deprecatedEventHandler:f=!1,autoScroll:i=!0,warning:o,error:h,checkNonExistentValues:v=!0,closeOnOptionActionClick:b=!0,testId:E,disabled:I}=e,S=!c&&i===!0,{multi:n,simpleInputs:s,options:a,selectedOptions:l,firstSelectedOptionIndex:u,hasNonExistentValue:p}=Xe(r,d,S,v),g=!n,_=c&&g;c&&!g&&console.warn("Native select does not support provided props (see stories)");const O="Value no longer available for re-selection",C=p&&!I?o?m.jsxs("div",{children:[m.jsx("div",{children:O}),m.jsx("div",{children:o})]}):O:o,q=p&&h&&!I?m.jsxs("div",{children:[m.jsx("div",{children:O}),m.jsx("div",{children:h})]}):h,V=(T,R)=>{if(f){const A=n?R.map(F=>s?F.value:F):s?R.value:R;y(A)}else{const A=!(T instanceof Event),F=n?R:R.value;A?(T.target.name=t,T.target.value=F,n||(T.target.label=R.label),y(T)):y({...T,target:{...T.target,name:t,value:F,...!n&&{label:R.label}}})}};return _?m.jsx(ce,{...e,options:a,selectedOption:l,onChange:V,hasNonExistentValue:p,warning:C,error:q,testId:E}):m.jsx(ve,{...e,options:a,selectedOptions:l,onChange:V,multi:n,firstSelectedOptionIndex:u,warning:C,error:q,testId:E,closeOnOptionActionClick:b})};try{je.displayName="Select",je.__docgenInfo={description:"",displayName:"Select",props:{name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"string"}},multi:{defaultValue:null,description:"",name:"multi",required:!1,type:{name:"boolean"}},options:{defaultValue:null,description:"",name:"options",required:!1,type:{name:"ISelectSelectedOption[]"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"any"}},native:{defaultValue:null,description:"",name:"native",required:!1,type:{name:"boolean"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((value: any) => void)"}},deprecatedEventHandler:{defaultValue:null,description:"",name:"deprecatedEventHandler",required:!1,type:{name:"boolean"}},autoScroll:{defaultValue:null,description:"",name:"autoScroll",required:!1,type:{name:"boolean"}},warning:{defaultValue:null,description:"",name:"warning",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | null"}},checkNonExistentValues:{defaultValue:null,description:"",name:"checkNonExistentValues",required:!1,type:{name:"boolean"}},closeOnOptionActionClick:{defaultValue:null,description:"",name:"closeOnOptionActionClick",required:!1,type:{name:"boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"TStringOrNumber | null"}},borderRadius:{defaultValue:null,description:"",name:"borderRadius",required:!1,type:{name:"TStringOrNumber"}},onCreate:{defaultValue:null,description:"",name:"onCreate",required:!1,type:{name:"((evt: any) => any)"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string | null"}},isInTable:{defaultValue:null,description:"",name:"isInTable",required:!1,type:{name:"boolean"}},clearable:{defaultValue:null,description:"",name:"clearable",required:!1,type:{name:"boolean"}},searchable:{defaultValue:null,description:"",name:"searchable",required:!1,type:{name:"boolean"}},maxTooltipWidth:{defaultValue:null,description:"",name:"maxTooltipWidth",required:!1,type:{name:"TStringOrNumber"}},autoLayerWidth:{defaultValue:null,description:"",name:"autoLayerWidth",required:!1,type:{name:"boolean"}},right:{defaultValue:null,description:"",name:"right",required:!1,type:{name:"boolean"}},tabIndex:{defaultValue:null,description:"",name:"tabIndex",required:!1,type:{name:"number"}},testId:{defaultValue:null,description:"",name:"testId",required:!1,type:{name:"string"}}}}}catch{}export{je as S};
|