@oliasoft-open-source/react-ui-library 4.7.8 → 4.7.9
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 +35 -30
- package/dist/index.js +80 -62
- package/dist/index.js.map +1 -1
- package/dist/storybook/assets/{Color-KGDBMAHA-CQlondIs.js → Color-KGDBMAHA-uRZOJgp_.js} +1 -1
- package/dist/storybook/assets/{DocsRenderer-PKQXORMH-CMePffZo.js → DocsRenderer-PKQXORMH-egQ32ash.js} +1 -1
- package/dist/storybook/assets/{accordion.stories-Cs2ubF5q.js → accordion.stories-B6aDvpbw.js} +2 -2
- package/dist/storybook/assets/{afe.stories-BejQRTzS.js → afe.stories-BmTkdVrX.js} +2 -2
- package/dist/storybook/assets/{buttons-and-links-CtQdvmxW.js → buttons-and-links-XmN6uPsc.js} +1 -1
- package/dist/storybook/assets/{casing-loads.stories-DYLqR3q4.js → casing-loads.stories-DMJrogpe.js} +2 -2
- package/dist/storybook/assets/{cell.stories-lHzrZ3g_.js → cell.stories-BuTZfvFG.js} +2 -2
- package/dist/storybook/assets/{chunk-HLWAVYOI-GiKqAqKE.js → chunk-HLWAVYOI-CSojG6Rw.js} +1 -1
- package/dist/storybook/assets/{color-DsEwQuSe.js → color-BMgUNoUe.js} +1 -1
- package/dist/storybook/assets/footer.stories-C7lpIpIw.js +3 -0
- package/dist/storybook/assets/form.stories-5K0J3e_K.js +49 -0
- package/dist/storybook/assets/{formation.stories-D4U2fgj6.js → formation.stories-dxrPMFRf.js} +2 -2
- package/dist/storybook/assets/helpers-JJxzGegQ.js +1 -0
- package/dist/storybook/assets/iframe-BJkqCqVQ.js +2 -0
- package/dist/storybook/assets/{index-CrEVlQ_6.js → index-BRwYuXC0.js} +1 -1
- package/dist/storybook/assets/{index-BAoS3bLT.js → index-DyiUARNs.js} +4 -4
- package/dist/storybook/assets/{input-group.stories-CFpFac6W.js → input-group.stories-CZV2LIx8.js} +2 -2
- package/dist/storybook/assets/{input-validation-X_m8WekI.js → input-validation-CP5zFo2k.js} +2 -2
- package/dist/storybook/assets/{inputs-D80uNhPY.js → inputs-B4ZYR2o3.js} +2 -2
- package/dist/storybook/assets/{layout-forms-0_2iXsYr.js → layout-forms-DwyWVJ0v.js} +4 -4
- package/dist/storybook/assets/{layout-general-E6Gt2dIZ.js → layout-general-DZ2dESQ5.js} +1 -1
- package/dist/storybook/assets/{modal.stories-CyMCZp33.js → modal.stories-DjqYt1p9.js} +2 -2
- package/dist/storybook/assets/number-input.stories-qoGbqZTo.js +110 -0
- package/dist/storybook/assets/{padding-and-spacing-yWT70QJX.js → padding-and-spacing-1HtBbptS.js} +1 -1
- package/dist/storybook/assets/{pagination-BcGXyU5V.js → pagination-CUgCn63Z.js} +1 -1
- package/dist/storybook/assets/{pagination.stories-DH-XbCfQ.js → pagination.stories-BGOImoU2.js} +2 -2
- package/dist/storybook/assets/popover.stories-Crowf5vG.js +10 -0
- package/dist/storybook/assets/{preview-DPs6y1HU.js → preview-DejXoruS.js} +2 -2
- package/dist/storybook/assets/{preview-BTEgxsm7.js → preview-TQh2Z4sk.js} +1 -1
- package/dist/storybook/assets/{projects.stories-Clez6c2x.js → projects.stories-DAf5OJ1x.js} +2 -2
- package/dist/storybook/assets/{radio-button-YBwYcMaM.js → radio-button-BbeNknd5.js} +1 -1
- package/dist/storybook/assets/{radio-button.stories-CGJnfCk-.js → radio-button.stories-Blh9iWKw.js} +2 -2
- package/dist/storybook/assets/{reservoirs.stories-CIUf8Stc.js → reservoirs.stories-D5ckP2e4.js} +2 -2
- package/dist/storybook/assets/{rich-text-input.stories-BxwJD_An.js → rich-text-input.stories-LVVpSs9G.js} +3 -3
- package/dist/storybook/assets/{row.stories-BqhC3_2k.js → row.stories-DOUSenyE.js} +2 -2
- package/dist/storybook/assets/{select-C1_gWJ7I.js → select-DRMh4SU1.js} +1 -1
- package/dist/storybook/assets/select.input-CJed_LLR.js +1 -0
- package/dist/storybook/assets/{select.stories-5JpxALAP.js → select.stories-DLPUuggI.js} +2 -2
- package/dist/storybook/assets/{site.stories-zUoOcZmf.js → site.stories-BPMSwYX0.js} +2 -2
- package/dist/storybook/assets/{table-5QX-8wvq.js → table-DpcRWK59.js} +1 -1
- package/dist/storybook/assets/{table.stories-lL4Wjd7C.js → table.stories-Cnt8aj8r.js} +2 -2
- package/dist/storybook/assets/{tabs-CAZ_dHGK.js → tabs-Cj0RKXvW.js} +1 -1
- package/dist/storybook/assets/tabs.stories-Ba_GVPSo.js +30 -0
- package/dist/storybook/assets/{title.stories-klSBDiXt.js → title.stories-Be_6D4wZ.js} +2 -2
- package/dist/storybook/assets/unit-input.stories-F0JfOMio.js +300 -0
- package/dist/storybook/assets/unit-table.stories-DpamFUAJ.js +152 -0
- package/dist/storybook/iframe.html +1 -1
- package/dist/storybook/index.json +1 -1
- package/dist/storybook/project.json +1 -1
- package/package.json +1 -1
- package/dist/storybook/assets/footer.stories-C2YHanQl.js +0 -3
- package/dist/storybook/assets/form.stories-DVcTzOpM.js +0 -49
- package/dist/storybook/assets/iframe-B1EjAYJz.js +0 -2
- package/dist/storybook/assets/number-input.stories-BCEHti8m.js +0 -107
- package/dist/storybook/assets/popover.stories-Ulut7imO.js +0 -10
- package/dist/storybook/assets/select.input-DIKP56UZ.js +0 -1
- package/dist/storybook/assets/tabs.stories-DXcDAqB2.js +0 -30
- package/dist/storybook/assets/unit-input.stories-D_hhvilo.js +0 -295
- package/dist/storybook/assets/unit-table.stories-Co3OB0Hd.js +0 -152
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var vf=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Ef=(t,e,n)=>e in t?vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Ef(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as _e,r as z}from"./index-DhsZuJvc.js";import{D as Cf}from"./disabled-context-rmpd7YJS.js";import{C as Tf}from"./common-types-Sih75Sav.js";import{B as vu}from"./button-DHevvVBE.js";import{r as Of}from"./index-CUZDtIZe.js";import{S as Mf}from"./select-
|
|
1
|
+
var vf=Object.defineProperty;var rl=t=>{throw TypeError(t)};var Ef=(t,e,n)=>e in t?vf(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Me=(t,e,n)=>Ef(t,typeof e!="symbol"?e+"":e,n),sl=(t,e,n)=>e.has(t)||rl("Cannot "+n);var B=(t,e,n)=>(sl(t,e,"read from private field"),n?n.call(t):e.get(t)),ft=(t,e,n)=>e.has(t)?rl("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),X=(t,e,n,r)=>(sl(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);import{j as ae}from"./jsx-runtime-eps93zm2.js";import{g as Ai,R as _e,r as z}from"./index-DhsZuJvc.js";import{D as Cf}from"./disabled-context-rmpd7YJS.js";import{C as Tf}from"./common-types-Sih75Sav.js";import{B as vu}from"./button-DHevvVBE.js";import{r as Of}from"./index-CUZDtIZe.js";import{S as Mf}from"./select-DRMh4SU1.js";import"./index-Bk2sglWO.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./inheritsLoose-DP0QEDDI.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-BhPnDYmS.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";var Co={exports:{}};(function(t,e){var n=typeof Reflect<"u"?Reflect.construct:void 0,r=Object.defineProperty,s=Error.captureStackTrace;s===void 0&&(s=function(c){var u=new Error;r(c,"stack",{configurable:!0,get:function(){var h=u.stack;return r(this,"stack",{configurable:!0,value:h,writable:!0}),h},set:function(h){r(c,"stack",{configurable:!0,value:h,writable:!0})}})});function i(l){l!==void 0&&r(this,"message",{configurable:!0,value:l,writable:!0});var c=this.constructor.name;c!==void 0&&c!==this.name&&r(this,"name",{configurable:!0,value:c,writable:!0}),s(this,this.constructor)}i.prototype=Object.create(Error.prototype,{constructor:{configurable:!0,value:i,writable:!0}});var o=function(){function l(u,d){return r(u,"name",{configurable:!0,value:d})}try{var c=function(){};if(l(c,"foo"),c.name==="foo")return l}catch{}}();function a(l,c){if(c==null||c===Error)c=i;else if(typeof c!="function")throw new TypeError("super_ should be a function");var u;if(typeof l=="string")u=l,l=n!==void 0?function(){return n(c,arguments,this.constructor)}:function(){c.apply(this,arguments)},o!==void 0&&(o(l,u),u=void 0);else if(typeof l!="function")throw new TypeError("constructor should be either a string or a function");l.super_=l.super=c;var d={constructor:{configurable:!0,value:l,writable:!0}};return u!==void 0&&(d.name={configurable:!0,value:u,writable:!0}),l.prototype=Object.create(c.prototype,d),l}e=t.exports=a,e.BaseError=i})(Co,Co.exports);var Eu=Co.exports,il="ProseMirror-selectednode",da="",Kt="\0",ol="__state_override__",Nf={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=Nf,It=Symbol.for("__remirror__"),xe=(t=>(t.PlainExtension="RemirrorPlainExtension",t.NodeExtension="RemirrorNodeExtension",t.MarkExtension="RemirrorMarkExtension",t.PlainExtensionConstructor="RemirrorPlainExtensionConstructor",t.NodeExtensionConstructor="RemirrorNodeExtensionConstructor",t.MarkExtensionConstructor="RemirrorMarkExtensionConstructor",t.Manager="RemirrorManager",t.Preset="RemirrorPreset",t.PresetConstructor="RemirrorPresetConstructor",t))(xe||{}),Y=(t=>(t[t.Critical=1e6]="Critical",t[t.Highest=1e5]="Highest",t[t.High=1e4]="High",t[t.Medium=1e3]="Medium",t[t.Default=100]="Default",t[t.Low=10]="Low",t[t.Lowest=0]="Lowest",t))(Y||{}),Pe=(t=>(t[t.None=0]="None",t[t.Create=1]="Create",t[t.EditorView=2]="EditorView",t[t.Runtime=3]="Runtime",t[t.Destroy=4]="Destroy",t))(Pe||{}),E=(t=>(t.Undo="_|undo|_",t.Redo="_|redo|_",t.Bold="_|bold|_",t.Italic="_|italic|_",t.Underline="_|underline|_",t.Strike="_|strike|_",t.Code="_|code|_",t.Paragraph="_|paragraph|_",t.H1="_|h1|_",t.H2="_|h2|_",t.H3="_|h3|_",t.H4="_|h4|_",t.H5="_|h5|_",t.H6="_|h6|_",t.TaskList="_|task|_",t.BulletList="_|bullet|_",t.OrderedList="_|number|_",t.Quote="_|quote|_",t.Divider="_|divider|_",t.Codeblock="_|codeblock|_",t.ClearFormatting="_|clear|_",t.Superscript="_|sup|_",t.Subscript="_|sub|_",t.LeftAlignment="_|left-align|_",t.CenterAlignment="_|center-align|_",t.RightAlignment="_|right-align|_",t.JustifyAlignment="_|justify-align|_",t.InsertLink="_|link|_",t.Find="_|find|_",t.FindBackwards="_|find-backwards|_",t.FindReplace="_|find-replace|_",t.AddFootnote="_|footnote|_",t.AddComment="_|comment|_",t.ContextMenu="_|context-menu|_",t.IncreaseFontSize="_|inc-font-size|_",t.DecreaseFontSize="_|dec-font-size|_",t.IncreaseIndent="_|indent|_",t.DecreaseIndent="_|dedent|_",t.Shortcuts="_|shortcuts|_",t.Copy="_|copy|_",t.Cut="_|cut|_",t.Paste="_|paste|_",t.PastePlain="_|paste-plain|_",t.SelectAll="_|select-all|_",t.Format="_|format|_",t))(E||{}),b=(t=>(t.PROD="RMR0000",t.UNKNOWN="RMR0001",t.INVALID_COMMAND_ARGUMENTS="RMR0002",t.CUSTOM="RMR0003",t.CORE_HELPERS="RMR0004",t.MUTATION="RMR0005",t.INTERNAL="RMR0006",t.MISSING_REQUIRED_EXTENSION="RMR0007",t.MANAGER_PHASE_ERROR="RMR0008",t.INVALID_GET_EXTENSION="RMR0010",t.INVALID_MANAGER_ARGUMENTS="RMR0011",t.SCHEMA="RMR0012",t.HELPERS_CALLED_IN_OUTER_SCOPE="RMR0013",t.INVALID_MANAGER_EXTENSION="RMR0014",t.DUPLICATE_COMMAND_NAMES="RMR0016",t.DUPLICATE_HELPER_NAMES="RMR0017",t.NON_CHAINABLE_COMMAND="RMR0018",t.INVALID_EXTENSION="RMR0019",t.INVALID_CONTENT="RMR0021",t.INVALID_NAME="RMR0050",t.EXTENSION="RMR0100",t.EXTENSION_SPEC="RMR0101",t.EXTENSION_EXTRA_ATTRIBUTES="RMR0102",t.INVALID_SET_EXTENSION_OPTIONS="RMR0103",t.REACT_PROVIDER_CONTEXT="RMR0200",t.REACT_GET_ROOT_PROPS="RMR0201",t.REACT_EDITOR_VIEW="RMR0202",t.REACT_CONTROLLED="RMR0203",t.REACT_NODE_VIEW="RMR0204",t.REACT_GET_CONTEXT="RMR0205",t.REACT_COMPONENTS="RMR0206",t.REACT_HOOKS="RMR0207",t.I18N_CONTEXT="RMR0300",t))(b||{}),_f=function(e){return Af(e)&&!Rf(e)};function Af(t){return!!t&&typeof t=="object"}function Rf(t){var e=Object.prototype.toString.call(t);return e==="[object RegExp]"||e==="[object Date]"||Pf(t)}var If=typeof Symbol=="function"&&Symbol.for,Df=If?Symbol.for("react.element"):60103;function Pf(t){return t.$$typeof===Df}function Lf(t){return Array.isArray(t)?[]:{}}function ss(t,e){return e.clone!==!1&&e.isMergeableObject(t)?sr(Lf(t),t,e):t}function Bf(t,e,n){return t.concat(e).map(function(r){return ss(r,n)})}function zf(t,e){if(!e.customMerge)return sr;var n=e.customMerge(t);return typeof n=="function"?n:sr}function $f(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[]}function al(t){return Object.keys(t).concat($f(t))}function Cu(t,e){try{return e in t}catch{return!1}}function Ff(t,e){return Cu(t,e)&&!(Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))}function Vf(t,e,n){var r={};return n.isMergeableObject(t)&&al(t).forEach(function(s){r[s]=ss(t[s],n)}),al(e).forEach(function(s){Ff(t,s)||(Cu(t,s)&&n.isMergeableObject(e[s])?r[s]=zf(s,n)(t[s],e[s],n):r[s]=ss(e[s],n))}),r}function sr(t,e,n){n=n||{},n.arrayMerge=n.arrayMerge||Bf,n.isMergeableObject=n.isMergeableObject||_f,n.cloneUnlessOtherwiseSpecified=ss;var r=Array.isArray(e),s=Array.isArray(t),i=r===s;return i?r?n.arrayMerge(t,e,n):Vf(t,e,n):ss(e,n)}sr.all=function(e,n){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(r,s){return sr(r,s,n)},{})};var Hf=sr,Uf=Hf;const jf=Ai(Uf);/*!
|
|
2
2
|
* isobject <https://github.com/jonschlinkert/isobject>
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
@@ -178,7 +178,7 @@ ${t}</ul>
|
|
|
178
178
|
`:`<li>${t}</li>
|
|
179
179
|
`}}});function uw(t,e){const n=_(t,{gfm:!0,smartLists:!0,xhtml:!0});return e?e(n):n}var yr=class extends te{get name(){return"markdown"}onCreate(){this.store.setStringHandler("markdown",this.markdownToProsemirrorNode.bind(this))}createPlugin(){return{props:{clipboardTextSerializer:this.options.copyAsMarkdown?e=>{const n=document.createElement("div"),r=Dt.fromSchema(this.store.schema);return n.append(r.serializeFragment(e.content)),this.options.htmlToMarkdown(n.innerHTML)}:void 0}}}markdownToProsemirrorNode(t){return this.store.stringHandlers.html({...t,content:this.options.markdownToHtml(t.content,this.options.htmlSanitizer)})}insertMarkdown(t,e){return n=>{const{state:r}=n;let s=this.options.markdownToHtml(t,this.options.htmlSanitizer);s=!(e!=null&&e.alwaysWrapInBlock)&&s.startsWith("<p><")&&s.endsWith(`</p>
|
|
180
180
|
`)?s.slice(3,-5):`<div>${s}</div>`;const i=this.store.stringHandlers.html({content:s,schema:r.schema,fragment:!0});return this.store.commands.insertNode.original(i,{...e,replaceEmptyParentBlock:!0})(n)}}getMarkdown(t){return this.options.htmlToMarkdown(this.store.helpers.getHTML(t))}toggleBoldMarkdown(){return t=>!1}};Gi([N()],yr.prototype,"insertMarkdown",1);Gi([se()],yr.prototype,"getMarkdown",1);Gi([N()],yr.prototype,"toggleBoldMarkdown",1);yr=Gi([G({defaultOptions:{htmlToMarkdown:aw,markdownToHtml:uw,htmlSanitizer:void 0,activeNodes:[j.Code],copyAsMarkdown:!1},staticKeys:["htmlToMarkdown","markdownToHtml","htmlSanitizer"]})],yr);var dw=Object.defineProperty,hw=Object.getOwnPropertyDescriptor,Xi=(t,e,n,r)=>{for(var s=r>1?void 0:r?hw(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&&dw(e,n,s),s},fw={icon:"paragraph",label:({t})=>t(hi.INSERT_LABEL),description:({t})=>t(hi.INSERT_DESCRIPTION)},pw={icon:"paragraph",label:({t})=>t(hi.CONVERT_LABEL),description:({t})=>t(hi.CONVERT_DESCRIPTION)},Pn=class extends Pt{get name(){return"paragraph"}createTags(){return[j.LastNodeCompatible,j.TextBlock,j.Block,j.FormattingNode]}createNodeSpec(t,e){return{content:"inline*",draggable:!1,...e,attrs:{...t.defaults()},parseDOM:[{tag:"p",getAttrs:n=>({...t.parse(n)})},...e.parseDOM??[]],toDOM:n=>["p",t.dom(n),0]}}convertParagraph(t={}){const{attrs:e,selection:n,preserveAttrs:r}=t;return this.store.commands.setBlockNodeType.original(this.type,e,n,r)}insertParagraph(t,e={}){const{selection:n,attrs:r}=e;return this.store.commands.insertNode.original(this.type,{content:t,selection:n,attrs:r})}shortcut(t){return this.convertParagraph()(t)}};Xi([N(pw)],Pn.prototype,"convertParagraph",1);Xi([N(fw)],Pn.prototype,"insertParagraph",1);Xi([Ye({shortcut:E.Paragraph,command:"convertParagraph"})],Pn.prototype,"shortcut",1);Pn=Xi([G({defaultPriority:Y.Medium})],Pn);var mw=Object.defineProperty,gw=Object.getOwnPropertyDescriptor,yw=(t,e,n,r)=>{for(var s=r>1?void 0:r?gw(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&&mw(e,n,s),s},un=class extends te{get name(){return"placeholder"}createAttributes(){return{"aria-placeholder":this.options.placeholder}}createPlugin(){return{state:{init:(t,e)=>({...this.options,empty:Ia(e.doc,{ignoreAttributes:!0})}),apply:(t,e,n,r)=>xw({pluginState:e,tr:t,extension:this,state:r})},props:{decorations:t=>bw({state:t,extension:this})}}}onSetOptions(t){const{changes:e}=t;e.placeholder.changed&&this.store.phase>=Pe.EditorView&&this.store.updateAttributes()}};un=yw([G({defaultOptions:{emptyNodeClass:z1.IS_EMPTY,placeholder:""}})],un);function xw(t){const{pluginState:e,extension:n,tr:r,state:s}=t;return r.docChanged?{...n.options,empty:Ia(s.doc)}:e}function bw(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 kw=Object.defineProperty,Sw=Object.getOwnPropertyDescriptor,ww=(t,e,n,r)=>{for(var s=r>1?void 0:r?Sw(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&&kw(e,n,s),s},aa=class extends Pt{get name(){return"text"}createTags(){return[j.InlineNode]}createNodeSpec(){return{}}};aa=ww([G({disableExtraAttributes:!0,defaultPriority:Y.Medium})],aa);var vw={...pr.defaultOptions,...Pn.defaultOptions,...kt.defaultOptions,excludeExtensions:[]};function Ew(t={}){t={...vw,...t};const{content:e,depth:n,getDispatch:r,getState:s,newGroupDelay:i,excludeExtensions:o}=t,a={};for(const c of o??[])a[c]=!0;const l=[];if(!a.history){const c=new kt({depth:n,getDispatch:r,getState:s,newGroupDelay:i});l.push(c)}return a.doc||l.push(new pr({content:e})),a.text||l.push(new aa),a.paragraph||l.push(new Pn),a.positioner||l.push(new ms),a.gapCursor||l.push(new sa),a.events||l.push(new wi),l}var Cw=Object.defineProperty,Tw=Object.getOwnPropertyDescriptor,Ow=(t,e,n,r)=>{for(var s=r>1?void 0:r?Tw(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&&Cw(e,n,s),s},cf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},O=(t,e,n)=>(cf(t,e,"read from private field"),n?n.call(t):e.get(t)),je=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},He=(t,e,n,r)=>(cf(t,e,"write to private field"),e.set(t,n),n),jr,Mw=class{constructor(){this.portals=new Map,je(this,jr,ji()),this.on=t=>O(this,jr).on("update",t),this.once=t=>{const e=O(this,jr).on("update",n=>{e(),t(n)});return e}}update(){O(this,jr).emit("update",this.portals)}render({Component:t,container:e}){const n=this.portals.get(e);this.portals.set(e,{Component:t,key:(n==null?void 0:n.key)??si()}),this.update()}forceUpdate(){for(const[t,{Component:e}]of this.portals)this.portals.set(t,{Component:e,key:si()})}remove(t){this.portals.delete(t),this.update()}};jr=new WeakMap;var Nw=t=>{const{portals:e}=t;return _e.createElement(_e.Fragment,null,e.map(([n,{Component:r,key:s}])=>Of.createPortal(_e.createElement(r,null),n,s)))};function _w(t){const[e,n]=z.useState(()=>Array.from(t.portals.entries()));return z.useEffect(()=>t.on(r=>{n(Array.from(r.entries()))}),[t]),z.useMemo(()=>e,[e])}var ne,Wr,yn,Kr,Qs,qr,Jn,Jr,ei,Et,Ne,la,uf=class{constructor({getPosition:t,node:e,portalContainer:n,view:r,ReactComponent:s,options:i}){je(this,ne,void 0),je(this,Wr,[]),je(this,yn,void 0),je(this,Kr,void 0),je(this,Qs,void 0),je(this,qr,void 0),je(this,Jn,void 0),je(this,Jr,!1),je(this,ei,void 0),je(this,Et,void 0),je(this,Ne,void 0),je(this,la,l=>{l&&(R(O(this,Et),{code:b.REACT_NODE_VIEW,message:`You have applied a ref to a node view provided for '${O(this,ne).type.name}' which doesn't support content.`}),l.append(O(this,Et)))}),this.Component=()=>{const l=O(this,Qs);return R(l,{code:b.REACT_NODE_VIEW,message:`The custom react node view provided for ${O(this,ne).type.name} doesn't have a valid ReactComponent`}),_e.createElement(l,{updateAttributes:this.updateAttributes,selected:this.selected,view:O(this,yn),getPosition:O(this,qr),node:O(this,ne),forwardRef:O(this,la),decorations:O(this,Wr)})},this.updateAttributes=l=>{if(!O(this,yn).editable)return;const c=O(this,qr).call(this);if(c==null)return;const u=O(this,yn).state.tr.setNodeMarkup(c,void 0,{...O(this,ne).attrs,...l});O(this,yn).dispatch(u)},R(ee(t),{message:"You are attempting to use a node view for a mark type. This is not supported yet. Please check your configuration."}),He(this,ne,e),He(this,yn,r),He(this,Kr,n),He(this,Qs,s),He(this,qr,t),He(this,Jn,i),He(this,Ne,this.createDom());const{contentDOM:o,wrapper:a}=this.createContentDom()??{};He(this,ei,o??void 0),He(this,Et,a),O(this,Et)&&O(this,Ne).append(O(this,Et)),this.setDomAttributes(O(this,ne),O(this,Ne)),this.Component.displayName=_u(`${O(this,ne).type.name}NodeView`),this.renderComponent()}static create(t){const{portalContainer:e,ReactComponent:n,options:r}=t;return(s,i,o)=>new uf({options:r,node:s,view:i,getPosition:o,portalContainer:e,ReactComponent:n})}get selected(){return O(this,Jr)}get contentDOM(){return O(this,ei)}get dom(){return O(this,Ne)}renderComponent(){O(this,Kr).render({Component:this.Component,container:O(this,Ne)})}createDom(){const{defaultBlockNode:t,defaultInlineNode:e}=O(this,Jn),n=O(this,ne).isInline?document.createElement(e):document.createElement(t);return n.classList.add(`${cl(O(this,ne).type.name)}-node-view-wrapper`),n}createContentDom(){var t,e;if(O(this,ne).isLeaf)return;const n=(e=(t=O(this,ne).type.spec).toDOM)==null?void 0:e.call(t,O(this,ne));if(!n)return;const{contentDOM:r,dom:s}=Dt.renderSpec(document,n);let i;if($e(s))return i=s,s===r&&(i=document.createElement("span"),i.classList.add(`${cl(O(this,ne).type.name)}-node-view-content-wrapper`),i.append(r)),$e(r),{wrapper:i,contentDOM:r}}update(t,e){return _a({types:O(this,ne).type,node:t})?(O(this,ne)===t&&O(this,Wr)===e||(O(this,ne).sameMarkup(t)||this.setDomAttributes(t,O(this,Ne)),He(this,ne,t),He(this,Wr,e),this.renderComponent()),!0):!1}setDomAttributes(t,e){const{toDOM:n}=O(this,ne).type.spec;let r=t.attrs;if(n){const s=n(t);if(P(s)||Aw(s))return;Ln(s[1])&&(r=s[1])}for(const[s,i]of fe(r))e.setAttribute(s,i)}selectNode(){He(this,Jr,!0),O(this,Ne)&&O(this,Ne).classList.add(il),this.renderComponent()}deselectNode(){He(this,Jr,!1),O(this,Ne)&&O(this,Ne).classList.remove(il),this.renderComponent()}destroy(){O(this,Kr).remove(O(this,Ne))}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,Ne))return!1;if(ee(O(this,Jn).stopEvent))return O(this,Jn).stopEvent({event:t});const n=t.target;if(!(O(this,Ne).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)}},Gc=uf;ne=new WeakMap;Wr=new WeakMap;yn=new WeakMap;Kr=new WeakMap;Qs=new WeakMap;qr=new WeakMap;Jn=new WeakMap;Jr=new WeakMap;ei=new WeakMap;Et=new WeakMap;Ne=new WeakMap;la=new WeakMap;function Aw(t){return Wo(t)||Ln(t)&&Wo(t.dom)}var ks=class extends te{constructor(){super(...arguments),this.portalContainer=new Mw}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||!Ns(r)||r.reactComponentEnvironment==="ssr"||(t[r.name]=Gc.create({options:this.options,ReactComponent:r.ReactComponent,portalContainer:this.portalContainer}));const n=fe({...this.options.nodeViewComponents,...e});for(const[r,s]of n)t[r]=Gc.create({options:this.options,ReactComponent:s,portalContainer:this.portalContainer});return t}};ks=Ow([G({defaultOptions:{defaultBlockNode:"div",defaultInlineNode:"span",defaultContentNode:"span",defaultEnvironment:"both",nodeViewComponents:{},stopEvent:null},staticKeys:["defaultBlockNode","defaultInlineNode","defaultContentNode","defaultEnvironment"]})],ks);function Rw(t){const e=z.createContext(null),n=Iw(e);return[s=>{const i=t(s);return _e.createElement(e.Provider,{value:i},s.children)},n,e]}function Iw(t){return(e,n)=>{const r=z.useContext(t),s=Dw(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 Dw(t){const e=z.useRef();return Pw(()=>{e.current=t}),e.current}var Pw=typeof document<"u"?z.useLayoutEffect:z.useEffect;function Lw(t,e){return Rw(n=>{const r=z.useRef(null),s=z.useRef(),i=void 0,[o,a]=z.useState(()=>t({get:Xc(r),set:Yc(s),previousContext:void 0,props:n,state:i})),l=[...Object.values(n),i];return z.useEffect(()=>{l.length!==0&&a(c=>t({get:Xc(r),set:Yc(s),previousContext:c,props:n,state:i}))},l),r.current=o,s.current=a,o})}function Xc(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 Yc(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 df={},hf={};(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"]])})(hf);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.unraw=t.errorMessages=t.ErrorType=void 0;const e=hf;Object.defineProperty(t,"ErrorType",{enumerable:!0,get:function(){return e.ErrorType}}),Object.defineProperty(t,"errorMessages",{enumerable:!0,get:function(){return e.errorMessages}});function n(f){return!f.match(/[^a-f0-9]/i)?parseInt(f,16):NaN}function r(f,p,m){const g=n(f);if(Number.isNaN(g)||m!==void 0&&m!==f.length)throw new SyntaxError(e.errorMessages.get(p));return g}function s(f){const p=r(f,e.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(p)}function i(f,p){const m=r(f,e.ErrorType.MalformedUnicode,4);if(p!==void 0){const g=r(p,e.ErrorType.MalformedUnicode,4);return String.fromCharCode(m,g)}return String.fromCharCode(m)}function o(f){return f.charAt(0)==="{"&&f.charAt(f.length-1)==="}"}function a(f){if(!o(f))throw new SyntaxError(e.errorMessages.get(e.ErrorType.MalformedUnicode));const p=f.slice(1,-1),m=r(p,e.ErrorType.MalformedUnicode);try{return String.fromCodePoint(m)}catch(g){throw g instanceof RangeError?new SyntaxError(e.errorMessages.get(e.ErrorType.CodePointLimit)):g}}function l(f,p=!1){if(p)throw new SyntaxError(e.errorMessages.get(e.ErrorType.OctalDeprecation));const m=parseInt(f,8);return String.fromCharCode(m)}const c=new Map([["b","\b"],["f","\f"],["n",`
|
|
181
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(df);const Nn=t=>typeof t=="string",Bw=t=>typeof t=="function",Zc=new Map,ff="en";function tl(t){return[...Array.isArray(t)?t:[t],ff]}function pf(t,e,n){const r=tl(t);return Ni(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(Nn(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return Ni(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function Qc(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?Ni(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Ni(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Ni(t,e){const n=t();let r=Zc.get(n);return r||(r=e(),Zc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const mf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,gf="%__lingui_octothorpe__%",zw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(gf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!0,o,a);return i(o-l,c)},select:$w,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>pf(r,o,s(a))}},$w=(t,e)=>e[t]??e.other;function Fw(t,e,n){return(r={},s)=>{const i=zw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+gf;if(Nn(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return Nn(a)&&mf.test(a)?df.unraw(a.trim()):Nn(a)?a.trim():a?String(a):""}}var Vw=Object.defineProperty,Hw=(t,e,n)=>e in t?Vw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uw=(t,e,n)=>(Hw(t,e+"",n),n);class jw{constructor(){Uw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Ww=Object.defineProperty,Kw=(t,e,n)=>e in t?Ww(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Kw(t,typeof e!="symbol"?e+"":e,n),n);class qw extends jw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ff,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),Nn(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Bw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return Nn(l)&&mf.test(l)?JSON.parse(`"${l}"`):Nn(l)?l:Fw(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return pf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Jw(t={}){return new qw(t)}const Yi=Jw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Gw=K,Xw=S,Yw=Lt;function Zw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const Qw=S;function ev(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 tv(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 nv(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 rv=S,sv=Fe;function iv(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 ov(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 av=S,lv=S,cv=S,uv=Lt,dv=K;function hv(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 fv=K;function pv(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 mv=S;function gv(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 yv(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 xv=S;function bv(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 kv=S,Sv=S,wv=S;function vv(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 Ev(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 Cv(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 Tv=Fe;function Ov(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 Mv=S,Nv=K,_v=S,Av=S;function Rv(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 Iv=S,Dv=S,Pv=Fe,Lv=S;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function zv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const $v=Fe;function Fv(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 Vv=S;function Hv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Uv=S,jv=Fe;function Wv(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 Kv(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 qv=Fe,Jv=S;function Gv(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 Xv=Lt;function Yv(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 Zv=S,Qv=S;function eE(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 tE(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 nE(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 rE(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 sE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function iE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const oE=Fe,aE=K,lE=K,cE=K,uE=Fe;function dE(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 hE(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 fE=fn;function pE(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 mE=K,gE=K,yE=S,xE=Fe,bE=S,kE=K,SE=K;function wE(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 vE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const EE=S,CE=S,TE=K,OE=K;function ME(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 NE=S,_E=S,AE=K;function RE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const IE=K,DE=S,PE=S;function LE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const BE=S;function zE(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 $E=S;function FE(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 VE=S,HE=S,UE=K,jE=Lt;function WE(t,e){return e&&t==1?"one":"other"}function KE(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 qE(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 JE=S,GE=Lt,XE=S;function YE(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 ZE=S,QE=S;function eC(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 tC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function nC(t,e){return e&&t==1?"one":"other"}function rC(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 sC=K,iC=S,oC=fn,aC=S,lC=S;function cC(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 uC=Fe,dC=S,hC=S,fC=S,pC=K,mC=S,gC=Lt,yC=S,xC=S,bC=S;function kC(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 SC=S,wC=K,vC=Lt,EC=S;function CC(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 TC(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 OC=S;function MC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const NC=Fe,_C=S;function AC(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 RC=S,IC=K;function DC(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 PC=S,LC=K,BC=S;function zC(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 $C(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 FC=S,VC=S,HC=fn,UC=S,jC=K,WC=K;function KC(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 qC(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 JC(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 GC(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 XC(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 YC=fn,ZC=fn,QC=fn,eT=fn,tT=fn,nT=S,rT=S;function sT(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 iT(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 oT=S,aT=S,lT=S,cT=K;function uT(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 dT=Fe,hT=S,fT=S,pT=S,mT=S,gT=K,yT=Lt,xT=S;function bT(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 kT(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 ST=S,wT=K,vT=S,ET=S;function CT(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 TT=S;function OT(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 MT=Fe,NT=S,_T=S;function AT(t,e){return e&&t==1?"one":"other"}const RT=S,IT=S,DT=Lt,PT=S,LT=K,BT=S,zT=S,$T=Fe,FT=K,VT=K,HT=K;function UT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const jT=Object.freeze(Object.defineProperty({__proto__:null,_in:Gw,af:Xw,ak:Yw,am:Zw,an:Qw,ar:ev,ars:tv,as:nv,asa:rv,ast:sv,az:iv,be:ov,bem:av,bez:lv,bg:cv,bho:uv,bm:dv,bn:hv,bo:fv,br:pv,brx:mv,bs:gv,ca:yv,ce:xv,ceb:bv,cgg:kv,chr:Sv,ckb:wv,cs:vv,cy:Ev,da:Cv,de:Tv,dsb:Ov,dv:Mv,dz:Nv,ee:_v,el:Av,en:Rv,eo:Iv,es:Dv,et:Pv,eu:Lv,fa:Bv,ff:zv,fi:$v,fil:Fv,fo:Vv,fr:Hv,fur:Uv,fy:jv,ga:Wv,gd:Kv,gl:qv,gsw:Jv,gu:Gv,guw:Xv,gv:Yv,ha:Zv,haw:Qv,he:eE,hi:tE,hr:nE,hsb:rE,hu:sE,hy:iE,ia:oE,id:aE,ig:lE,ii:cE,io:uE,is:dE,it:hE,iu:fE,iw:pE,ja:mE,jbo:gE,jgo:yE,ji:xE,jmc:bE,jv:kE,jw:SE,ka:wE,kab:vE,kaj:EE,kcg:CE,kde:TE,kea:OE,kk:ME,kkj:NE,kl:_E,km:AE,kn:RE,ko:IE,ks:DE,ksb:PE,ksh:LE,ku:BE,kw:zE,ky:$E,lag:FE,lb:VE,lg:HE,lkt:UE,ln:jE,lo:WE,lt:KE,lv:qE,mas:JE,mg:GE,mgo:XE,mk:YE,ml:ZE,mn:QE,mo:eC,mr:tC,ms:nC,mt:rC,my:sC,nah:iC,naq:oC,nb:aC,nd:lC,ne:cC,nl:uC,nn:dC,nnh:hC,no:fC,nqo:pC,nr:mC,nso:gC,ny:yC,nyn:xC,om:bC,or:kC,os:SC,osa:wC,pa:vC,pap:EC,pl:CC,prg:TC,ps:OC,pt:MC,pt_PT:NC,rm:_C,ro:AC,rof:RC,root:IC,ru:DC,rwk:PC,sah:LC,saq:BC,sc:zC,scn:$C,sd:FC,sdh:VC,se:HC,seh:UC,ses:jC,sg:WC,sh:KC,shi:qC,si:JC,sk:GC,sl:XC,sma:YC,smi:ZC,smj:QC,smn:eT,sms:tT,sn:nT,so:rT,sq:sT,sr:iT,ss:oT,ssy:aT,st:lT,su:cT,sv:uT,sw:dT,syr:hT,ta:fT,te:pT,teo:mT,th:gT,ti:yT,tig:xT,tk:bT,tl:kT,tn:ST,to:wT,tr:vT,ts:ET,tzm:CT,ug:TT,uk:OT,ur:MT,uz:NT,ve:_T,vi:AT,vo:RT,vun:IT,wa:DT,wae:PT,wo:LT,xh:BT,xog:zT,yi:$T,yo:FT,yue:VT,zh:HT,zu:UT},Symbol.toStringTag,{value:"Module"}));var WT=Object.defineProperty,KT=Object.getOwnPropertyDescriptor,qT=Object.getOwnPropertyNames,JT=Object.prototype.hasOwnProperty,GT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qT(e))!JT.call(t,s)&&s!==n&&WT(t,s,{get:()=>e[s],enumerable:!(r=KT(e,s))||r.enumerable});return t},XT=(t,e,n)=>(GT(t,e,"default"),n),YT=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"]]}'),yf={};XT(yf,jT);Yi.loadLocaleData("en",{plurals:yf.en});Yi.load("en",YT);Yi.activate("en");var ZT=Object.defineProperty,QT=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var s=r>1?void 0:r?QT(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&&ZT(e,n,s),s},tO={...un.defaultOptions,...ks.defaultOptions},nO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=eO([G({defaultOptions:tO,staticKeys:nO})],Ss);var xf={};Object.defineProperty(xf,"__esModule",{value:!0});function rO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return tu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return tu(r,s)},t[0]);return n||null}var Cr=xf.default=rO,eu=new WeakMap;function tu(t,e){if(t&&e){var n=eu.get(t)||new WeakMap;eu.set(t,n);var r=n.get(e)||function(s){nu(t,s),nu(e,s)};return n.set(e,r),r}return t||e}function nu(t,e){typeof t=="function"?t(e):t.current=e}var bf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(bf(t,e,"read from private field"),e.get(t)),sO=(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)},iO=(t,e,n,r)=>(bf(t,e,"write to private field"),e.set(t,n),n);function oO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var kf=z.createContext(null);function nl(t){const e=z.useContext(kf),n=z.useRef(oO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function aO(t=!0){return nl({autoUpdate:t}).active}function lO(){return nl().commands}var[cO,sM]=Lw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function ru(t,e={}){const{core:n,react:r,...s}=e;return mb(t)?t:pb.create(()=>[...Lu(t),new Ss(r),...Ew(n)],s)}function uO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>ru(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>ru(n.current,r.current))}),[s]),s}var dO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,hO=class extends cb{constructor(t){if(super(t),sO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:dO(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`}),iO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new _y(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Sf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function fO(t){const e=z.useRef();return Sf(()=>{e.current=t}),e.current}function pO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=mO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),gO(a),a.frameworkOutput}function mO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new hO(e.current),[]);return n.update(t),n}function gO(t){const{state:e}=t.props,n=z.useRef(!!e),r=fO(e);Sf(()=>{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 yO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=uO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>_e.createElement("div",{className:M1.EDITOR_WRAPPER,...nl().getRootProps()}),xO=t=>(t.hook(),null);function bO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=pO(a),c=_w(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return _e.createElement(cO,{i18n:r,locale:s,supportedLocales:i},_e.createElement(kf.Provider,{value:l},_e.createElement(Nw,{portals:c}),o.map((h,f)=>_e.createElement(xO,{hook:h,key:f})),u&&_e.createElement(ua,null),e,d&&_e.createElement(ua,null)))}const kO="_richTextToolbar_1gbkk_1",SO="_richTextToolbarContainer_1gbkk_5",su={richTextToolbar:kO,richTextToolbarContainer:SO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const wf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=lO(),l=aO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:su.richTextToolbarContainer,children:[ae.jsx("div",{className:su.richTextToolbar,children:c.map((u,d)=>ae.jsx(vu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Tf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};wf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const wO="_inputInTable_19adc_1",vO="_error_19adc_7",EO="_warning_19adc_7",CO="_inputHover_19adc_13",TO="_inputFocus_19adc_18",OO="_inputError_19adc_25",MO="_inputWarning_19adc_26",NO="_inputDisabled_19adc_61",_O="_hideScrollbars_19adc_67",AO="_richTextInput_19adc_77",RO={inputInTable:wO,error:vO,warning:EO,inputHover:CO,inputFocus:TO,inputError:OO,inputWarning:MO,inputDisabled:NO,hideScrollbars:_O,richTextInput:AO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(Cf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=yO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:RO.richTextInput,children:ae.jsxs(bO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(wf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const iM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=_e.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
|
|
181
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function u(f){return c.get(f)||f}const d=/\\(?:(\\)|x([\s\S]{0,2})|u(\{[^}]*\}?)|u([\s\S]{4})\\u([^{][\s\S]{0,3})|u([\s\S]{0,4})|([0-3]?[0-7]{1,2})|([\s\S])|$)/g;function h(f,p=!1){return f.replace(d,function(m,g,y,k,D,q,J,$,oe){if(g!==void 0)return"\\";if(y!==void 0)return s(y);if(k!==void 0)return a(k);if(D!==void 0)return i(D,q);if(J!==void 0)return i(J);if($==="0")return"\0";if($!==void 0)return l($,!p);if(oe!==void 0)return u(oe);throw new SyntaxError(e.errorMessages.get(e.ErrorType.EndOfString))})}t.unraw=h,t.default=h})(df);const Nn=t=>typeof t=="string",Bw=t=>typeof t=="function",Zc=new Map,ff="en";function tl(t){return[...Array.isArray(t)?t:[t],ff]}function pf(t,e,n){const r=tl(t);return Ni(()=>_i("date",r,n),()=>new Intl.DateTimeFormat(r,n)).format(Nn(e)?new Date(e):e)}function ca(t,e,n){const r=tl(t);return Ni(()=>_i("number",r,n),()=>new Intl.NumberFormat(r,n)).format(e)}function Qc(t,e,n,{offset:r=0,...s}){const i=tl(t),o=e?Ni(()=>_i("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Ni(()=>_i("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return s[n]??s[o.select(n-r)]??s.other}function Ni(t,e){const n=t();let r=Zc.get(n);return r||(r=e(),Zc.set(n,r)),r}function _i(t,e,n){const r=e.join("-");return`${t}-${r}-${JSON.stringify(n)}`}const mf=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/g,gf="%__lingui_octothorpe__%",zw=(t,e,n={})=>{const r=e||t,s=o=>typeof o=="object"?o:n[o]||{style:o},i=(o,a)=>{const l=Object.keys(n).length?s("number"):void 0,c=ca(r,o,l);return a.replace(new RegExp(gf,"g"),c)};return{plural:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!1,o,a);return i(o-l,c)},selectordinal:(o,a)=>{const{offset:l=0}=a,c=Qc(r,!0,o,a);return i(o-l,c)},select:$w,number:(o,a)=>ca(r,o,s(a)),date:(o,a)=>pf(r,o,s(a))}},$w=(t,e)=>e[t]??e.other;function Fw(t,e,n){return(r={},s)=>{const i=zw(e,n,s),o=(l,c=!1)=>Array.isArray(l)?l.reduce((u,d)=>{if(d==="#"&&c)return u+gf;if(Nn(d))return u+d;const[h,f,p]=d;let m={};f==="plural"||f==="selectordinal"||f==="select"?Object.entries(p).forEach(([y,k])=>{m[y]=o(k,f==="plural"||f==="selectordinal")}):m=p;let g;if(f){const y=i[f];g=y(r[h],m)}else g=r[h];return g==null?u:u+g},""):l,a=o(t);return Nn(a)&&mf.test(a)?df.unraw(a.trim()):Nn(a)?a.trim():a?String(a):""}}var Vw=Object.defineProperty,Hw=(t,e,n)=>e in t?Vw(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uw=(t,e,n)=>(Hw(t,e+"",n),n);class jw{constructor(){Uw(this,"_events",{})}on(e,n){var r;return(r=this._events)[e]??(r[e]=[]),this._events[e].push(n),()=>this.removeListener(e,n)}removeListener(e,n){const r=this._getListeners(e);if(!r)return;const s=r.indexOf(n);~s&&r.splice(s,1)}emit(e,...n){const r=this._getListeners(e);r&&r.map(s=>s.apply(this,n))}_getListeners(e){const n=this._events[e];return Array.isArray(n)?n:!1}}var Ww=Object.defineProperty,Kw=(t,e,n)=>e in t?Ww(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Un=(t,e,n)=>(Kw(t,typeof e!="symbol"?e+"":e,n),n);class qw extends jw{constructor(e){super(),Un(this,"_locale",""),Un(this,"_locales"),Un(this,"_localeData",{}),Un(this,"_messages",{}),Un(this,"_missing"),Un(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate(e.locale??ff,e.locales)}get locale(){return this._locale}get locales(){return this._locales}get messages(){return this._messages[this._locale]??{}}get localeData(){return this._localeData[this._locale]??{}}_loadLocaleData(e,n){const r=this._localeData[e];r?Object.assign(r,n):this._localeData[e]=n}loadLocaleData(e,n){n!=null?this._loadLocaleData(e,n):Object.keys(e).forEach(r=>this._loadLocaleData(r,e[r])),this.emit("change")}_load(e,n){const r=this._messages[e];r?Object.assign(r,n):this._messages[e]=n}load(e,n){typeof e=="string"&&typeof n=="object"?this._load(e,n):Object.entries(e).forEach(([r,s])=>this._load(r,s)),this.emit("change")}loadAndActivate({locale:e,locales:n,messages:r}){this._locale=e,this._locales=n||void 0,this._messages[this._locale]=r,this.emit("change")}activate(e,n){this._locale=e,this._locales=n,this.emit("change")}_(e,n,r){let s=r==null?void 0:r.message;e||(e=""),Nn(e)||(n=e.values||n,s=e.message,e=e.id);const i=this.messages[e],o=i===void 0,a=this._missing;if(a&&o)return Bw(a)?a(this._locale,e):a;o&&this.emit("missing",{id:e,locale:this._locale});let l=i||s||e;return Nn(l)&&mf.test(l)?JSON.parse(`"${l}"`):Nn(l)?l:Fw(l,this._locale,this._locales)(n,r==null?void 0:r.formats)}date(e,n){return pf(this._locales||this._locale,e,n)}number(e,n){return ca(this._locales||this._locale,e,n)}}function Jw(t={}){return new qw(t)}const Yi=Jw();function S(t,e){return e?"other":t==1?"one":"other"}function Lt(t,e){return e?"other":t==0||t==1?"one":"other"}function Fe(t,e){var n=String(t).split("."),r=!n[1];return e?"other":t==1&&r?"one":"other"}function K(t,e){return"other"}function fn(t,e){return e?"other":t==1?"one":t==2?"two":"other"}const Gw=K,Xw=S,Yw=Lt;function Zw(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const Qw=S;function ev(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 tv(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 nv(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 rv=S,sv=Fe;function iv(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 ov(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 av=S,lv=S,cv=S,uv=Lt,dv=K;function hv(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 fv=K;function pv(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 mv=S;function gv(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 yv(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 xv=S;function bv(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 kv=S,Sv=S,wv=S;function vv(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 Ev(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 Cv(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 Tv=Fe;function Ov(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 Mv=S,Nv=K,_v=S,Av=S;function Rv(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 Iv=S,Dv=S,Pv=Fe,Lv=S;function Bv(t,e){return e?"other":t>=0&&t<=1?"one":"other"}function zv(t,e){return e?"other":t>=0&&t<2?"one":"other"}const $v=Fe;function Fv(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 Vv=S;function Hv(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const Uv=S,jv=Fe;function Wv(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 Kv(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 qv=Fe,Jv=S;function Gv(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 Xv=Lt;function Yv(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 Zv=S,Qv=S;function eE(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 tE(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 nE(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 rE(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 sE(t,e){return e?t==1||t==5?"one":"other":t==1?"one":"other"}function iE(t,e){return e?t==1?"one":"other":t>=0&&t<2?"one":"other"}const oE=Fe,aE=K,lE=K,cE=K,uE=Fe;function dE(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 hE(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 fE=fn;function pE(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 mE=K,gE=K,yE=S,xE=Fe,bE=S,kE=K,SE=K;function wE(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 vE(t,e){return e?"other":t>=0&&t<2?"one":"other"}const EE=S,CE=S,TE=K,OE=K;function ME(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 NE=S,_E=S,AE=K;function RE(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const IE=K,DE=S,PE=S;function LE(t,e){return e?"other":t==0?"zero":t==1?"one":"other"}const BE=S;function zE(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 $E=S;function FE(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 VE=S,HE=S,UE=K,jE=Lt;function WE(t,e){return e&&t==1?"one":"other"}function KE(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 qE(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 JE=S,GE=Lt,XE=S;function YE(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 ZE=S,QE=S;function eC(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 tC(t,e){return e?t==1?"one":t==2||t==3?"two":t==4?"few":"other":t==1?"one":"other"}function nC(t,e){return e&&t==1?"one":"other"}function rC(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 sC=K,iC=S,oC=fn,aC=S,lC=S;function cC(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 uC=Fe,dC=S,hC=S,fC=S,pC=K,mC=S,gC=Lt,yC=S,xC=S,bC=S;function kC(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 SC=S,wC=K,vC=Lt,EC=S;function CC(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 TC(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 OC=S;function MC(t,e){var n=String(t).split("."),r=n[0];return e?"other":r==0||r==1?"one":"other"}const NC=Fe,_C=S;function AC(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 RC=S,IC=K;function DC(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 PC=S,LC=K,BC=S;function zC(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 $C(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 FC=S,VC=S,HC=fn,UC=S,jC=K,WC=K;function KC(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 qC(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 JC(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 GC(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 XC(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 YC=fn,ZC=fn,QC=fn,eT=fn,tT=fn,nT=S,rT=S;function sT(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 iT(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 oT=S,aT=S,lT=S,cT=K;function uT(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 dT=Fe,hT=S,fT=S,pT=S,mT=S,gT=K,yT=Lt,xT=S;function bT(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 kT(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 ST=S,wT=K,vT=S,ET=S;function CT(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 TT=S;function OT(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 MT=Fe,NT=S,_T=S;function AT(t,e){return e&&t==1?"one":"other"}const RT=S,IT=S,DT=Lt,PT=S,LT=K,BT=S,zT=S,$T=Fe,FT=K,VT=K,HT=K;function UT(t,e){return e?"other":t>=0&&t<=1?"one":"other"}const jT=Object.freeze(Object.defineProperty({__proto__:null,_in:Gw,af:Xw,ak:Yw,am:Zw,an:Qw,ar:ev,ars:tv,as:nv,asa:rv,ast:sv,az:iv,be:ov,bem:av,bez:lv,bg:cv,bho:uv,bm:dv,bn:hv,bo:fv,br:pv,brx:mv,bs:gv,ca:yv,ce:xv,ceb:bv,cgg:kv,chr:Sv,ckb:wv,cs:vv,cy:Ev,da:Cv,de:Tv,dsb:Ov,dv:Mv,dz:Nv,ee:_v,el:Av,en:Rv,eo:Iv,es:Dv,et:Pv,eu:Lv,fa:Bv,ff:zv,fi:$v,fil:Fv,fo:Vv,fr:Hv,fur:Uv,fy:jv,ga:Wv,gd:Kv,gl:qv,gsw:Jv,gu:Gv,guw:Xv,gv:Yv,ha:Zv,haw:Qv,he:eE,hi:tE,hr:nE,hsb:rE,hu:sE,hy:iE,ia:oE,id:aE,ig:lE,ii:cE,io:uE,is:dE,it:hE,iu:fE,iw:pE,ja:mE,jbo:gE,jgo:yE,ji:xE,jmc:bE,jv:kE,jw:SE,ka:wE,kab:vE,kaj:EE,kcg:CE,kde:TE,kea:OE,kk:ME,kkj:NE,kl:_E,km:AE,kn:RE,ko:IE,ks:DE,ksb:PE,ksh:LE,ku:BE,kw:zE,ky:$E,lag:FE,lb:VE,lg:HE,lkt:UE,ln:jE,lo:WE,lt:KE,lv:qE,mas:JE,mg:GE,mgo:XE,mk:YE,ml:ZE,mn:QE,mo:eC,mr:tC,ms:nC,mt:rC,my:sC,nah:iC,naq:oC,nb:aC,nd:lC,ne:cC,nl:uC,nn:dC,nnh:hC,no:fC,nqo:pC,nr:mC,nso:gC,ny:yC,nyn:xC,om:bC,or:kC,os:SC,osa:wC,pa:vC,pap:EC,pl:CC,prg:TC,ps:OC,pt:MC,pt_PT:NC,rm:_C,ro:AC,rof:RC,root:IC,ru:DC,rwk:PC,sah:LC,saq:BC,sc:zC,scn:$C,sd:FC,sdh:VC,se:HC,seh:UC,ses:jC,sg:WC,sh:KC,shi:qC,si:JC,sk:GC,sl:XC,sma:YC,smi:ZC,smj:QC,smn:eT,sms:tT,sn:nT,so:rT,sq:sT,sr:iT,ss:oT,ssy:aT,st:lT,su:cT,sv:uT,sw:dT,syr:hT,ta:fT,te:pT,teo:mT,th:gT,ti:yT,tig:xT,tk:bT,tl:kT,tn:ST,to:wT,tr:vT,ts:ET,tzm:CT,ug:TT,uk:OT,ur:MT,uz:NT,ve:_T,vi:AT,vo:RT,vun:IT,wa:DT,wae:PT,wo:LT,xh:BT,xog:zT,yi:$T,yo:FT,yue:VT,zh:HT,zu:UT},Symbol.toStringTag,{value:"Module"}));var WT=Object.defineProperty,KT=Object.getOwnPropertyDescriptor,qT=Object.getOwnPropertyNames,JT=Object.prototype.hasOwnProperty,GT=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qT(e))!JT.call(t,s)&&s!==n&&WT(t,s,{get:()=>e[s],enumerable:!(r=KT(e,s))||r.enumerable});return t},XT=(t,e,n)=>(GT(t,e,"default"),n),YT=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"]]}'),yf={};XT(yf,jT);Yi.loadLocaleData("en",{plurals:yf.en});Yi.load("en",YT);Yi.activate("en");var ZT=Object.defineProperty,QT=Object.getOwnPropertyDescriptor,eO=(t,e,n,r)=>{for(var s=r>1?void 0:r?QT(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&&ZT(e,n,s),s},tO={...un.defaultOptions,...ks.defaultOptions},nO=[...un.staticKeys,...ks.staticKeys],Ss=class extends te{get name(){return"react"}onSetOptions(t){const{pickChanged:e}=t;this.getExtension(un).setOptions(e(["placeholder"]))}createExtensions(){const{emptyNodeClass:t,placeholder:e,defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o}=this.options;return[new un({emptyNodeClass:t,placeholder:e,priority:Y.Low}),new ks({defaultBlockNode:n,defaultContentNode:r,defaultEnvironment:s,defaultInlineNode:i,nodeViewComponents:o})]}};Ss=eO([G({defaultOptions:tO,staticKeys:nO})],Ss);var xf={};Object.defineProperty(xf,"__esModule",{value:!0});function rO(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(t.length===2)return tu(t[0],t[1])||null;var n=t.slice(1).reduce(function(r,s){return tu(r,s)},t[0]);return n||null}var Cr=xf.default=rO,eu=new WeakMap;function tu(t,e){if(t&&e){var n=eu.get(t)||new WeakMap;eu.set(t,n);var r=n.get(e)||function(s){nu(t,s),nu(e,s)};return n.set(e,r),r}return t||e}function nu(t,e){typeof t=="function"?t(e):t.current=e}var bf=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Eo=(t,e,n)=>(bf(t,e,"read from private field"),e.get(t)),sO=(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)},iO=(t,e,n,r)=>(bf(t,e,"write to private field"),e.set(t,n),n);function oO(){const[,t]=z.useState(M());return z.useCallback(()=>{t(M())},[])}var kf=z.createContext(null);function nl(t){const e=z.useContext(kf),n=z.useRef(oO());R(e,{code:b.REACT_PROVIDER_CONTEXT});const{addHandler:r}=e;return z.useEffect(()=>{let s=t;if(s){if(Ln(s)){const{autoUpdate:i}=s;s=i?()=>n.current():void 0}if(ee(s))return r("updated",s)}},[r,t]),e}function aO(t=!0){return nl({autoUpdate:t}).active}function lO(){return nl().commands}var[cO,iM]=Lw(({props:t})=>{const e=t.locale??"en",n=t.i18n??Yi,r=t.supportedLocales??[e],s=n._.bind(n);return{locale:e,i18n:n,supportedLocales:r,t:s}});function ru(t,e={}){const{core:n,react:r,...s}=e;return mb(t)?t:pb.create(()=>[...Lu(t),new Ss(r),...Ew(n)],s)}function uO(t,e={}){const n=z.useRef(t),r=z.useRef(e),[s,i]=z.useState(()=>ru(t,e));return n.current=t,r.current=e,z.useEffect(()=>s.addHandler("destroy",()=>{i(()=>ru(n.current,r.current))}),[s]),s}var dO=typeof Cr=="object"&&Cr.__esModule&&Cr.default?Cr.default:Cr,Gn,hO=class extends cb{constructor(t){if(super(t),sO(this,Gn,void 0),this.rootPropsConfig={called:!1,count:0},this.getRootProps=e=>this.internalGetRootProps(e,null),this.internalGetRootProps=(e,n)=>{this.rootPropsConfig.called=!0;const{refKey:r="ref",ref:s,...i}=e??M();return{[r]:dO(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`}),iO(this,Gn,e),this.onRefLoad())},this.manager.view){this.manager.view.setProps({state:this.manager.view.state,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0});return}this.manager.getExtension(un).setOptions({placeholder:this.props.placeholder??""})}get name(){return"react"}update(t){return super.update(t),this}createView(t){return new _y(null,{state:t,dispatchTransaction:this.dispatchTransaction,attributes:()=>this.getAttributes(),editable:()=>this.props.editable??!0,plugins:[]})}updateState({state:t,...e}){const{triggerChange:n=!0,tr:r,transactions:s}=e;if(this.props.state){const{onChange:i}=this.props;R(i,{code:b.REACT_CONTROLLED,message:"You are required to provide the `onChange` handler when creating a controlled editor."}),R(n,{code:b.REACT_CONTROLLED,message:"Controlled editors do not support `clearContent` or `setContent` where `triggerChange` is `true`. Update the `state` prop instead."}),this.previousStateOverride||(this.previousStateOverride=this.getState()),this.onChange({state:t,tr:r,transactions:s});return}!r&&!s&&(t=t.apply(t.tr.setMeta(ol,{}))),this.view.updateState(t),n&&(s==null?void 0:s.length)!==0&&this.onChange({state:t,tr:r,transactions:s}),this.manager.onStateUpdate({previousState:this.previousState,state:t,tr:r,transactions:s})}updateControlledState(t,e){this.previousStateOverride=e,t=t.apply(t.tr.setMeta(ol,{})),this.view.updateState(t),this.manager.onStateUpdate({previousState:this.previousState,state:t}),this.previousStateOverride=void 0}addProsemirrorViewToDom(t,e){this.props.insertPosition==="start"?t.insertBefore(e,t.firstChild):t.append(e)}onRefLoad(){R(Eo(this,Gn),{code:b.REACT_EDITOR_VIEW,message:"Something went wrong when initializing the text editor. Please check your setup."});const{autoFocus:t}=this.props;this.addProsemirrorViewToDom(Eo(this,Gn),this.view.dom),t&&this.focus(t),this.onChange(),this.addFocusListeners()}onUpdate(){this.view&&Eo(this,Gn)&&this.view.setProps({...this.view.props,editable:()=>this.props.editable??!0})}get frameworkOutput(){return{...this.baseOutput,getRootProps:this.getRootProps,portalContainer:this.manager.store.portalContainer}}resetRender(){this.rootPropsConfig.called=!1,this.rootPropsConfig.count=0}};Gn=new WeakMap;var Sf=typeof document<"u"?z.useLayoutEffect:z.useEffect;function fO(t){const e=z.useRef();return Sf(()=>{e.current=t}),e.current}function pO(t){const{manager:e,state:n}=t,{placeholder:r,editable:s}=t;z.useRef(!0).current&&!tn(r)&&e.getExtension(Ss).setOptions({placeholder:r}),z.useEffect(()=>{r!=null&&e.getExtension(Ss).setOptions({placeholder:r})},[r,e]);const[o]=z.useState(()=>{if(n)return n;const l=e.createEmptyDoc(),[c,u]=me(t.initialContent)?t.initialContent:[t.initialContent??l];return e.createState({content:c,selection:u})}),a=mO({initialEditorState:o,getProps:()=>t});return z.useEffect(()=>()=>{a.destroy()},[a]),z.useEffect(()=>{a.onUpdate()},[s,a]),gO(a),a.frameworkOutput}function mO(t){const e=z.useRef(t);e.current=t;const n=z.useMemo(()=>new hO(e.current),[]);return n.update(t),n}function gO(t){const{state:e}=t.props,n=z.useRef(!!e),r=fO(e);Sf(()=>{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 yO(t={}){const{content:e,document:n,selection:r,extensions:s,...i}=t,o=uO(s??(()=>[]),i),[a,l]=z.useState(()=>o.createState({selection:r,content:e??o.createEmptyDoc()})),c=z.useCallback(({state:d})=>{l(d)},[]),u=z.useCallback(()=>o.output,[o]);return z.useMemo(()=>({state:a,setState:l,manager:o,onChange:c,getContext:u}),[u,o,c,a])}var ua=()=>_e.createElement("div",{className:M1.EDITOR_WRAPPER,...nl().getRootProps()}),xO=t=>(t.hook(),null);function bO(t){const{children:e,autoRender:n,i18n:r,locale:s,supportedLocales:i,hooks:o=[],...a}=t,l=pO(a),c=_w(l.portalContainer),u=n==="start"||n===!0||!e&&tn(n),d=n==="end";return _e.createElement(cO,{i18n:r,locale:s,supportedLocales:i},_e.createElement(kf.Provider,{value:l},_e.createElement(Nw,{portals:c}),o.map((h,f)=>_e.createElement(xO,{hook:h,key:f})),u&&_e.createElement(ua,null),e,d&&_e.createElement(ua,null)))}const kO="_richTextToolbar_1gbkk_1",SO="_richTextToolbarContainer_1gbkk_5",su={richTextToolbar:kO,richTextToolbarContainer:SO};var Xn=(t=>(t.BOLD="bold",t.ITALIC="italic",t.CODE="code",t.UL="ul",t.OL="ol",t))(Xn||{});const wf=({disabled:t=!1,toolbarComponent:e=null})=>{const{focus:n,toggleBold:r,toggleBulletList:s,toggleCode:i,toggleItalic:o,toggleOrderedList:a}=lO(),l=aO(),c=[{icon:Xn.BOLD,onClick:r,active:l.bold()},{icon:Xn.ITALIC,onClick:o,active:l.italic()},{icon:Xn.CODE,onClick:i,active:l.code()},{icon:Xn.UL,onClick:s,active:l.bulletList()},{icon:Xn.OL,onClick:a,active:l.orderedList()}];return ae.jsxs("div",{className:su.richTextToolbarContainer,children:[ae.jsx("div",{className:su.richTextToolbar,children:c.map((u,d)=>ae.jsx(vu,{small:!0,round:!0,basic:!0,icon:u.icon,colored:Tf.MUTED,onClick:()=>{u.onClick(),n()},active:u.active,disabled:t},d))}),e]})};wf.__docgenInfo={description:"",methods:[],displayName:"RichTextToolbar",props:{disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},toolbarComponent:{required:!1,tsType:{name:"ReactNode"},description:"",defaultValue:{value:"null",computed:!1}}}};const wO="_inputInTable_19adc_1",vO="_error_19adc_7",EO="_warning_19adc_7",CO="_inputHover_19adc_13",TO="_inputFocus_19adc_18",OO="_inputError_19adc_25",MO="_inputWarning_19adc_26",NO="_inputDisabled_19adc_61",_O="_hideScrollbars_19adc_67",AO="_richTextInput_19adc_77",RO={inputInTable:wO,error:vO,warning:EO,inputHover:CO,inputFocus:TO,inputError:OO,inputWarning:MO,inputDisabled:NO,hideScrollbars:_O,richTextInput:AO},Zi=z.forwardRef(({placeholder:t,onChange:e,value:n,disabled:r,toolbarComponent:s},i)=>{const o=z.useContext(Cf),a=r||o,{manager:l,state:c,setState:u,getContext:d}=yO({extensions:()=>[new Dn({}),new xs({}),new gs,new ys,new yr({}),new bs,new un({placeholder:t})],content:n,selection:"start",stringHandler:"markdown"});z.useImperativeHandle(i,()=>d(),[d]);const h=({helpers:f,state:p})=>{const m=f.getMarkdown(p);e&&e(m),u(p)};return ae.jsx("div",{className:RO.richTextInput,children:ae.jsxs(bO,{manager:l,state:c,placeholder:t,onChange:h,editable:!a,children:[ae.jsx(wf,{disabled:a,toolbarComponent:s}),ae.jsx(ua,{})]})})});Zi.__docgenInfo={description:"",methods:[],displayName:"RichTextInput"};const oM={title:"Forms/RichTextInput",component:Zi,args:{}},As=t=>{const[e,n]=_e.useState(t.value);return ae.jsxs(ae.Fragment,{children:[ae.jsx(Zi,{...t,value:e,onChange:n}),ae.jsx("pre",{children:ae.jsx("strong",{children:"Markdown output:"})}),ae.jsx("pre",{children:e})]})},Bs=As.bind({}),Gr=As.bind({});Gr.args={value:`Paragraph goes here lorem ipsum dolor.
|
|
182
182
|
1. Item (*italic*)
|
|
183
183
|
2. Item (**bold**)
|
|
184
184
|
3. Item (\`code\`)
|
|
@@ -253,4 +253,4 @@ ${t}</ul>
|
|
|
253
253
|
</pre>
|
|
254
254
|
<pre>{value}</pre>
|
|
255
255
|
</>;
|
|
256
|
-
}`,...(wu=(Su=Qr.parameters)==null?void 0:Su.docs)==null?void 0:wu.source}}};const
|
|
256
|
+
}`,...(wu=(Su=Qr.parameters)==null?void 0:Su.docs)==null?void 0:wu.source}}};const aM=["Default","Filled","Placeholder","Disabled","HandlingStateExternallyWithRef","WithToolbarComponent"];export{Bs as Default,Yr as Disabled,Gr as Filled,Zr as HandlingStateExternallyWithRef,Xr as Placeholder,Qr as WithToolbarComponent,aM as __namedExportsOrder,oM as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-
|
|
1
|
+
import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJvc.js";import{T as g}from"./table-DpcRWK59.js";import{T as z}from"./text-B3-TSWok.js";import{t as R,s as G,u as J,v as K,w as Q}from"./table.stories-data-CG4FwGG3.js";import"./index-Bk2sglWO.js";import"./index.es-DazXb-ul.js";import"./inheritsLoose-DP0QEDDI.js";import"./redux-tRgGMjwY.js";import"./objectSpread2-DW4nTBoq.js";import"./tiny-invariant-DqLgxztJ.js";import"./index-CUZDtIZe.js";import"./memoize-one.esm-CcMeOnPo.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./lodash-BHd_uQHh.js";import"./actions-BhPnDYmS.js";import"./common-types-Sih75Sav.js";import"./disabled-context-rmpd7YJS.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./icon-BSFY3vDO.js";import"./index-CEuq6vkz.js";import"./tooltip-1V7clEnw.js";import"./types-BmbYqTX_.js";import"./types-UmZ4Y_CR.js";import"./badge-CLQ59MDF.js";import"./heading-CRNoBc7q.js";import"./help-icon-Buhx5nl6.js";import"./pagination-CUgCn63Z.js";import"./select-DRMh4SU1.js";import"./assertThisInitialized-B9jnkVVz.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./input-DFNY9YDm.js";import"./input-group-BaRSJAEN.js";import"./input-group-addon-D68iUKV2.js";import"./number-input-B6I6KkcP.js";import"./index-DaLCDjg_.js";import"./index-DRSy5Ssd.js";import"./check-box-BtCGePRy.js";import"./slider-DckvIvC7.js";import"./index-BI4_Bp97.js";import"./popover-rq33c1W2.js";import"./flex-EllkLxgO.js";const Ve={title:"Basic/Table/Row",component:g,args:{table:{...R}}},v=n=>o.jsx(g,{...n}),i=v.bind({});i.args={table:G};const p=v.bind({});p.args={table:J};const c=v.bind({});c.args={table:K};const d=v.bind({});d.args={table:Q};const t=v.bind({});t.args={table:{...R,striped:!1}};t.parameters={docs:{description:{story:"`striped: false` removes tinted background on alternative rows."}}};const u=()=>{const[n,e]=D.useState(null),a=r=>e(n===r?null:r);return o.jsx(g,{table:{...R,striped:!1,rows:R.rows.map((r,x)=>({...r,onRowClick:()=>a(x),expandedContent:{content:n===x?o.jsx("div",{children:"Example expanded content"}):null}}))}})},m=()=>{const n={draggable:!0,headers:[{cells:[{value:"Name"},{value:"Weight (kg)"},{value:"Energy (kcal / 100g)"},{value:"Origin"}]}],rows:[{noDrag:!0,cells:[{value:"Undraggable"},{value:100},{value:361},{value:"Vietnam"}]},{cells:[{value:"Buckwheat"},{value:50},{value:358},{value:"Poland"}]},{cells:[{value:"Couscous"},{value:10},{value:368},{value:"France"}]}]},e=(s,b,l)=>{const y=[...s];return s[l].noDrag?s:(y.splice(l,0,y.splice(b,1)[0]),y)},[a,r]=D.useState(n.rows),x=s=>{const{to:b,from:l}=s;e(a,l,b),r(e(a,l,b))};return o.jsx(g,{table:{...n,rows:a},onListReorder:x})},w=()=>{const[n,e]=D.useState("Hover any row!"),a=[1,2,3,4,5].map(r=>({cells:[{value:`Row ${r}`},{value:`${r**2}`}],onRowMouseEnter:()=>e(`Hovering row ${r}`),onRowMouseLeave:()=>e("Not hovering any row...")}));return o.jsxs(o.Fragment,{children:[o.jsx(z,{children:n}),o.jsx(g,{table:{fixedWidth:"100%",headers:[{cells:[{value:"Description"},{value:"Value"}],onRowMouseEnter:()=>e("Hovering header row"),onRowMouseLeave:()=>e("Not hovering any row...")}],rows:a}})]})};u.__docgenInfo={description:"",methods:[],displayName:"Expandable"};m.__docgenInfo={description:"",methods:[],displayName:"DragAndDrop"};w.__docgenInfo={description:"",methods:[],displayName:"OnRowEnter"};var E,h,T;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => {
|
|
2
2
|
return <Table
|
|
3
3
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
4
4
|
{...args} />;
|
|
@@ -127,4 +127,4 @@ import{j as o}from"./jsx-runtime-eps93zm2.js";import{r as D}from"./index-DhsZuJv
|
|
|
127
127
|
rows
|
|
128
128
|
}} />
|
|
129
129
|
</>;
|
|
130
|
-
}`,...(q=(U=w.parameters)==null?void 0:U.docs)==null?void 0:q.source}}};const
|
|
130
|
+
}`,...(q=(U=w.parameters)==null?void 0:U.docs)==null?void 0:q.source}}};const Be=["ActiveRow","ErrorRow","WarningRow","RowFocusEvent","NotStriped","Expandable","DragAndDrop","OnRowEnter"];export{i as ActiveRow,m as DragAndDrop,p as ErrorRow,u as Expandable,t as NotStriped,w as OnRowEnter,d as RowFocusEvent,c as WarningRow,Be as __namedExportsOrder,Ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as q,g as ze}from"./index-DhsZuJvc.js";import{c as U}from"./index-Bk2sglWO.js";import{G as ae,I as Ee}from"./common-types-Sih75Sav.js";import{D as de}from"./disabled-context-rmpd7YJS.js";import{i as ne}from"./types-UmZ4Y_CR.js";import{T as me,u as We,m as Ue}from"./tooltip-1V7clEnw.js";import{p as Ge}from"./index-CEuq6vkz.js";import"./lodash-BHd_uQHh.js";import{a as $e,_ as Ve}from"./inheritsLoose-DP0QEDDI.js";import{_ as fe}from"./assertThisInitialized-B9jnkVVz.js";import{m as se}from"./memoize-one.esm-CcMeOnPo.js";import{M as ie}from"./types-BmbYqTX_.js";import{T as oe}from"./text-B3-TSWok.js";import{A as Ke}from"./actions-BhPnDYmS.js";import{I as ue}from"./icon-BSFY3vDO.js";import{s as Ye}from"./select.input-
|
|
1
|
+
import{j as p}from"./jsx-runtime-eps93zm2.js";import{r as q,g as ze}from"./index-DhsZuJvc.js";import{c as U}from"./index-Bk2sglWO.js";import{G as ae,I as Ee}from"./common-types-Sih75Sav.js";import{D as de}from"./disabled-context-rmpd7YJS.js";import{i as ne}from"./types-UmZ4Y_CR.js";import{T as me,u as We,m as Ue}from"./tooltip-1V7clEnw.js";import{p as Ge}from"./index-CEuq6vkz.js";import"./lodash-BHd_uQHh.js";import{a as $e,_ as Ve}from"./inheritsLoose-DP0QEDDI.js";import{_ as fe}from"./assertThisInitialized-B9jnkVVz.js";import{m as se}from"./memoize-one.esm-CcMeOnPo.js";import{M as ie}from"./types-BmbYqTX_.js";import{T as oe}from"./text-B3-TSWok.js";import{A as Ke}from"./actions-BhPnDYmS.js";import{I as ue}from"./icon-BSFY3vDO.js";import{s as Ye}from"./select.input-CJed_LLR.js";const Be="_inputInTable_1nzfr_1",Ze="_error_1nzfr_7",Xe="_warning_1nzfr_7",Je="_inputHover_1nzfr_13",Qe="_inputFocus_1nzfr_18",en="_inputError_1nzfr_25",nn="_inputWarning_1nzfr_26",tn="_inputDisabled_1nzfr_61",rn="_hideScrollbars_1nzfr_67",an="_select_1nzfr_77",sn="_isInTable_1nzfr_121",ln="_unSelected_1nzfr_133",on="_small_1nzfr_174",un="_right_1nzfr_182",cn="_groupOrderFirst_1nzfr_193",dn="_groupOrderMiddle_1nzfr_194",mn="_groupOrderLast_1nzfr_198",z={inputInTable:Be,error:Ze,warning:Xe,inputHover:Je,inputFocus:Qe,inputError:en,inputWarning:nn,inputDisabled:tn,hideScrollbars:rn,select:an,isInTable:sn,unSelected:ln,small:on,right:un,groupOrderFirst:cn,groupOrderMiddle:dn,groupOrderLast:mn},Ie=({disabled:e=!1,error:n=null,warning:a=null,tooltip:d=null,options:c,onChange:v=()=>{},onFocus:f=()=>{},onBlur:s=()=>{},right:o=!1,small:g=!1,tabIndex:b=0,selectedOption:S,width:T=null,groupOrder:E=null,testId:_,isInTable:t=!1,clearable:l,placeholder:i,hasNonExistentValue:r,maxTooltipWidth:u,borderRadius:m})=>{const y=q.useContext(de),h=S===null||(S==null?void 0:S.value)===null?"unselected":S==null?void 0:S.value,I=h==="unselected",L=(h==="unselected"||l?[p.jsx("option",{value:"unselected",disabled:!l,hidden:!l,children:i||"Select..."},"unselected")]:[]).concat(r?[p.jsx("option",{value:S==null?void 0:S.value,disabled:e||y,children:S==null?void 0:S.label},"selectedNonExistentValue")]:[]).concat(c.map((x,w)=>p.jsx("option",{value:x.value,"data-testid":x.testId,children:x.label},w))),R=(()=>{if(E)switch(E){case ae.FIRST:return z.groupOrderFirst;case ae.LAST:return z.groupOrderLast;default:return z.groupOrderMiddle}return""})();return p.jsx(me,{error:!!n,warning:!!a,text:d||n||a,enabled:d&&ne(d)||n&&ne(n)||a&&ne(a)||!1,maxWidth:u,placement:"bottom-center",children:p.jsx("select",{className:U(z.select,I?z.unSelected:"",n?z.error:a?z.warning:"",o?z.right:"",g?z.small:"",t?z.isInTable:"",R),style:{width:T||"",borderRadius:m||""},onChange:x=>{const{value:w}=x.target;let M;w==="unselected"?M={value:null}:M=c.find(A=>String(A.value)===String(w))||{value:null},v(x,M)},onFocus:f,onBlur:s,tabIndex:b,value:h,disabled:e||y,"data-testid":_,children:L})})};Ie.__docgenInfo={description:"",methods:[],displayName:"NativeSelect",props:{borderRadius:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},error:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},warning:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},tooltip:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | React.ReactNode | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"ReactReactNode",raw:"React.ReactNode"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},options:{required:!0,tsType:{name:"Array",elements:[{name:"ISelectSelectedOption"}],raw:"ISelectSelectedOption[]"},description:""},onChange:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
2
2
|
evt: ChangeEvent<HTMLSelectElement>,
|
|
3
3
|
value: ISelectSelectedOption | { value: null },
|
|
4
4
|
) => void`,signature:{arguments:[{type:{name:"ChangeEvent",elements:[{name:"HTMLSelectElement"}],raw:"ChangeEvent<HTMLSelectElement>"},name:"evt"},{type:{name:"union",raw:"ISelectSelectedOption | { value: null }",elements:[{name:"ISelectSelectedOption"},{name:"signature",type:"object",raw:"{ value: null }",signature:{properties:[{key:"value",value:{name:"null",required:!0}}]}}]},name:"value"}],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onFocus:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},onBlur:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:"",defaultValue:{value:"() => {}",computed:!1}},right:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},small:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},tabIndex:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"0",computed:!1}},selectedOption:{required:!1,tsType:{name:"ISelectSelectedOption"},description:""},width:{required:!1,tsType:{name:"union",raw:"TStringOrNumber | null",elements:[{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},groupOrder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:"",defaultValue:{value:"null",computed:!1}},testId:{required:!1,tsType:{name:"union",raw:"string | undefined",elements:[{name:"string"},{name:"undefined"}]},description:""},isInTable:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},clearable:{required:!1,tsType:{name:"boolean"},description:""},placeholder:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:""},hasNonExistentValue:{required:!1,tsType:{name:"boolean"},description:""},maxTooltipWidth:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};var Oe={exports:{}};(function(e,n){(function(a,d){e.exports=d(q,Ge)})(window,function(a,d){return function(c){var v={};function f(s){if(v[s])return v[s].exports;var o=v[s]={i:s,l:!1,exports:{}};return c[s].call(o.exports,o,o.exports,f),o.l=!0,o.exports}return f.m=c,f.c=v,f.d=function(s,o,g){f.o(s,o)||Object.defineProperty(s,o,{enumerable:!0,get:g})},f.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},f.t=function(s,o){if(1&o&&(s=f(s)),8&o||4&o&&typeof s=="object"&&s&&s.__esModule)return s;var g=Object.create(null);if(f.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:s}),2&o&&typeof s!="string")for(var b in s)f.d(g,b,(function(S){return s[S]}).bind(null,b));return g},f.n=function(s){var o=s&&s.__esModule?function(){return s.default}:function(){return s};return f.d(o,"a",o),o},f.o=function(s,o){return Object.prototype.hasOwnProperty.call(s,o)},f.p="",f(f.s=0)}([function(c,v,f){Object.defineProperty(v,"__esModule",{value:!0});var s=f(1);Object.defineProperty(v,"default",{enumerable:!0,get:function(){return function(o){return o&&o.__esModule?o:{default:o}}(s).default}}),c.exports=v.default},function(c,v,f){Object.defineProperty(v,"__esModule",{value:!0});var s=Object.assign||function(t){for(var l=1;l<arguments.length;l++){var i=arguments[l];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t},o=function(){function t(l,i){for(var r=0;r<i.length;r++){var u=i[r];u.enumerable=u.enumerable||!1,u.configurable=!0,"value"in u&&(u.writable=!0),Object.defineProperty(l,u.key,u)}}return function(l,i,r){return i&&t(l.prototype,i),r&&t(l,r),l}}(),g=T(f(2)),b=T(f(3)),S=f(4);function T(t){return t&&t.__esModule?t:{default:t}}var E=[],_=function(t){function l(i){(function(u,m){if(!(u instanceof m))throw new TypeError("Cannot call a class as a function")})(this,l);var r=function(u,m){if(!u)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!m||typeof m!="object"&&typeof m!="function"?u:m}(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,i));return r.handleKeyboardEvent=r.handleKeyboardEvent.bind(r),r.registerExclusiveHandler=r.registerExclusiveHandler.bind(r),r.deregisterExclusiveHandler=r.deregisterExclusiveHandler.bind(r),r}return function(i,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof r);i.prototype=Object.create(r&&r.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(i,r):i.__proto__=r)}(l,g.default.Component),o(l,[{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyboardEvent,!1),document.addEventListener("keyup",this.handleKeyboardEvent,!1),document.addEventListener("keypress",this.handleKeyboardEvent,!1);var i=this.props,r=i.isExclusive,u=i.isDisabled;r&&!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(i){var r=i.isExclusive,u=i.isDisabled;(this.props.isExclusive!==r||this.props.isDisabled!==u)&&(this.props.isExclusive&&!this.props.isDisabled?this.registerExclusiveHandler():this.deregisterExclusiveHandler())}},{key:"registerExclusiveHandler",value:function(){this.deregisterExclusiveHandler(),E.unshift(this)}},{key:"deregisterExclusiveHandler",value:function(){var i=this;E.includes(this)&&(E=E.filter(function(r){return r!==i}))}},{key:"handleKeyboardEvent",value:function(i){var r=this.props,u=r.isDisabled,m=r.handleKeys,y=r.onKeyEvent,h=r.handleEventType,I=r.children,L=r.handleFocusableElements;if(u||h!==i.type||E.length>0&&E[0]!==this)return!1;var R=i.target===document.body||L,x=this.childrenContainer&&this.childrenContainer.contains(i.target);if(!(I?x:R))return!1;var w=(0,S.findMatchedKey)(i,m);return!!w&&(y(w,i),!0)}},{key:"render",value:function(){var i=this,r=this.props.children,u=Object.assign({},this.props),m=!0,y=!1,h=void 0;try{for(var I,L=Object.keys(l.propTypes)[Symbol.iterator]();!(m=(I=L.next()).done);m=!0)delete u[I.value]}catch(R){y=!0,h=R}finally{try{!m&&L.return&&L.return()}finally{if(y)throw h}}return r?g.default.createElement("span",s({ref:function(R){i.childrenContainer=R}},u),r):null}}]),l}();v.default=_,_.propTypes={handleKeys:b.default.array,handleEventType:b.default.oneOf(["keydown","keyup","keypress"]),handleFocusableElements:b.default.bool,onKeyEvent:b.default.func,isDisabled:b.default.bool,isExclusive:b.default.bool,children:b.default.any},_.defaultProps={handleKeys:[],handleFocusableElements:!1,handleEventType:"keydown",onKeyEvent:function(){return null}},c.exports=v.default},function(c,v){c.exports=a},function(c,v){c.exports=d},function(c,v,f){function s(r,u,m){return u in r?Object.defineProperty(r,u,{value:m,enumerable:!0,configurable:!0,writable:!0}):r[u]=m,r}Object.defineProperty(v,"__esModule",{value:!0}),v.matchKeyEvent=i,v.findMatchedKey=function(r,u){var m=u.map(function(y){var h=y.toLowerCase(),I=l[h];return I||[y]}).reduce(function(y,h){return y.concat(h)},[]).find(function(y){return i(r,y)});return!m&&u.includes("all")&&(m="other"),m};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]},g=Object.keys(o).reduce(function(r,u){return Object.assign(r,s({},u.toUpperCase(),o[u]))},{}),b="0123456789".split("").reduce(function(r,u,m){return Object.assign(r,s({},u,[m+48,m+96]))},{}),S="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").reduce(function(r,u,m){return Object.assign(r,s({},u.toLowerCase(),[m+65]),s({},u,[m+65]))},{}),T="1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19".split(",").reduce(function(r,u,m){return Object.assign(r,s({},"f"+u,[m+112]))},{}),E={control:"ctrl",ctrl:"ctrl",shift:"shift",meta:"meta",cmd:"meta",command:"meta",option:"alt",alt:"alt"},_=v.AllKeys=Object.assign({},o,g,b,S,T),t=Object.assign({},b,S),l={all:Object.keys(_),alphanumeric:Object.keys(t),numeric:Object.keys(b),alphabetic:Object.keys(S),function:Object.keys(T)};function i(r,u){var m=r.which||r.keyCode,y=r.type,h=Object.keys(E).filter(function(A){return r[A+"Key"]}).sort(),I=u.toLowerCase().trim(),L=I==="+"?["+"]:I.split(/\s?\+\s?/),R=L.pop(),x=_[R],w=L;if(y==="keypress")return u==String.fromCharCode(m).toLowerCase();if(w.length===0&&h.length===0)return x.indexOf(m)>=0;if(w.length>0&&h.length>0){var M=w.map(function(A){return E[A]}).sort(),F=M.length===h.length&&M.every(function(A,G){return h[G]===A});return x.indexOf(m)>=0&&F}return w.length==0&&h.length===1&&R===h[0]}}])})})(Oe);var pn=Oe.exports;const fn=ze(pn),we=()=>{const e=q.useRef(null);return[e,()=>{e.current&&e.current.focus()}]},Re=()=>{const[e,n]=q.useState(!1);return q.useEffect(()=>{(async()=>{document.fonts&&await document.fonts.ready.then(()=>n(!0))})()},[]),e};var gn=typeof performance=="object"&&typeof performance.now=="function",ge=gn?function(){return performance.now()}:function(){return Date.now()};function ve(e){cancelAnimationFrame(e.id)}function vn(e,n){var a=ge();function d(){ge()-a>=n?e.call(null):c.id=requestAnimationFrame(d)}var c={id:requestAnimationFrame(d)};return c}var le=-1;function ye(e){if(e===void 0&&(e=!1),le===-1||e){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",document.body.appendChild(n),le=n.offsetWidth-n.clientWidth,document.body.removeChild(n)}return le}var ee=null;function he(e){if(e===void 0&&(e=!1),ee===null||e){var n=document.createElement("div"),a=n.style;a.width="50px",a.height="50px",a.overflow="scroll",a.direction="rtl";var d=document.createElement("div"),c=d.style;return c.width="100px",c.height="100px",n.appendChild(d),document.body.appendChild(n),n.scrollLeft>0?ee="positive-descending":(n.scrollLeft=1,n.scrollLeft===0?ee="negative":ee="positive-ascending"),document.body.removeChild(n),ee}return ee}var yn=150,hn=function(n,a){return n};function Sn(e){var n,a=e.getItemOffset,d=e.getEstimatedTotalSize,c=e.getItemSize,v=e.getOffsetForIndexAndAlignment,f=e.getStartIndexForOffset,s=e.getStopIndexForStartIndex,o=e.initInstanceProps,g=e.shouldResetStyleCacheOnItemSizeChange,b=e.validateProps;return n=function(S){$e(T,S);function T(_){var t;return t=S.call(this,_)||this,t._instanceProps=o(t.props,fe(t)),t._outerRef=void 0,t._resetIsScrollingTimeoutId=null,t.state={instance:fe(t),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof t.props.initialScrollOffset=="number"?t.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},t._callOnItemsRendered=void 0,t._callOnItemsRendered=se(function(l,i,r,u){return t.props.onItemsRendered({overscanStartIndex:l,overscanStopIndex:i,visibleStartIndex:r,visibleStopIndex:u})}),t._callOnScroll=void 0,t._callOnScroll=se(function(l,i,r){return t.props.onScroll({scrollDirection:l,scrollOffset:i,scrollUpdateWasRequested:r})}),t._getItemStyle=void 0,t._getItemStyle=function(l){var i=t.props,r=i.direction,u=i.itemSize,m=i.layout,y=t._getItemStyleCache(g&&u,g&&m,g&&r),h;if(y.hasOwnProperty(l))h=y[l];else{var I=a(t.props,l,t._instanceProps),L=c(t.props,l,t._instanceProps),R=r==="horizontal"||m==="horizontal",x=r==="rtl",w=R?I:0;y[l]=h={position:"absolute",left:x?void 0:w,right:x?w:void 0,top:R?0:I,height:R?"100%":L,width:R?L:"100%"}}return h},t._getItemStyleCache=void 0,t._getItemStyleCache=se(function(l,i,r){return{}}),t._onScrollHorizontal=function(l){var i=l.currentTarget,r=i.clientWidth,u=i.scrollLeft,m=i.scrollWidth;t.setState(function(y){if(y.scrollOffset===u)return null;var h=t.props.direction,I=u;if(h==="rtl")switch(he()){case"negative":I=-u;break;case"positive-descending":I=m-r-u;break}return I=Math.max(0,Math.min(I,m-r)),{isScrolling:!0,scrollDirection:y.scrollOffset<I?"forward":"backward",scrollOffset:I,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._onScrollVertical=function(l){var i=l.currentTarget,r=i.clientHeight,u=i.scrollHeight,m=i.scrollTop;t.setState(function(y){if(y.scrollOffset===m)return null;var h=Math.max(0,Math.min(m,u-r));return{isScrolling:!0,scrollDirection:y.scrollOffset<h?"forward":"backward",scrollOffset:h,scrollUpdateWasRequested:!1}},t._resetIsScrollingDebounced)},t._outerRefSetter=function(l){var i=t.props.outerRef;t._outerRef=l,typeof i=="function"?i(l):i!=null&&typeof i=="object"&&i.hasOwnProperty("current")&&(i.current=l)},t._resetIsScrollingDebounced=function(){t._resetIsScrollingTimeoutId!==null&&ve(t._resetIsScrollingTimeoutId),t._resetIsScrollingTimeoutId=vn(t._resetIsScrolling,yn)},t._resetIsScrolling=function(){t._resetIsScrollingTimeoutId=null,t.setState({isScrolling:!1},function(){t._getItemStyleCache(-1,null)})},t}T.getDerivedStateFromProps=function(t,l){return bn(t,l),b(t),null};var E=T.prototype;return E.scrollTo=function(t){t=Math.max(0,t),this.setState(function(l){return l.scrollOffset===t?null:{scrollDirection:l.scrollOffset<t?"forward":"backward",scrollOffset:t,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},E.scrollToItem=function(t,l){l===void 0&&(l="auto");var i=this.props,r=i.itemCount,u=i.layout,m=this.state.scrollOffset;t=Math.max(0,Math.min(t,r-1));var y=0;if(this._outerRef){var h=this._outerRef;u==="vertical"?y=h.scrollWidth>h.clientWidth?ye():0:y=h.scrollHeight>h.clientHeight?ye():0}this.scrollTo(v(this.props,t,l,m,this._instanceProps,y))},E.componentDidMount=function(){var t=this.props,l=t.direction,i=t.initialScrollOffset,r=t.layout;if(typeof i=="number"&&this._outerRef!=null){var u=this._outerRef;l==="horizontal"||r==="horizontal"?u.scrollLeft=i:u.scrollTop=i}this._callPropsCallbacks()},E.componentDidUpdate=function(){var t=this.props,l=t.direction,i=t.layout,r=this.state,u=r.scrollOffset,m=r.scrollUpdateWasRequested;if(m&&this._outerRef!=null){var y=this._outerRef;if(l==="horizontal"||i==="horizontal")if(l==="rtl")switch(he()){case"negative":y.scrollLeft=-u;break;case"positive-ascending":y.scrollLeft=u;break;default:var h=y.clientWidth,I=y.scrollWidth;y.scrollLeft=I-h-u;break}else y.scrollLeft=u;else y.scrollTop=u}this._callPropsCallbacks()},E.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&ve(this._resetIsScrollingTimeoutId)},E.render=function(){var t=this.props,l=t.children,i=t.className,r=t.direction,u=t.height,m=t.innerRef,y=t.innerElementType,h=t.innerTagName,I=t.itemCount,L=t.itemData,R=t.itemKey,x=R===void 0?hn:R,w=t.layout,M=t.outerElementType,F=t.outerTagName,A=t.style,G=t.useIsScrolling,K=t.width,$=this.state.isScrolling,H=r==="horizontal"||w==="horizontal",P=H?this._onScrollHorizontal:this._onScrollVertical,Z=this._getRangeToRender(),te=Z[0],re=Z[1],X=[];if(I>0)for(var k=te;k<=re;k++)X.push(q.createElement(l,{data:L,key:x(k,L),index:k,isScrolling:G?$:void 0,style:this._getItemStyle(k)}));var J=d(this.props,this._instanceProps);return q.createElement(M||F||"div",{className:i,onScroll:P,ref:this._outerRefSetter,style:Ve({position:"relative",height:u,width:K,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:r},A)},q.createElement(y||h||"div",{children:X,ref:m,style:{height:H?"100%":J,pointerEvents:$?"none":void 0,width:H?J:"100%"}}))},E._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var t=this.props.itemCount;if(t>0){var l=this._getRangeToRender(),i=l[0],r=l[1],u=l[2],m=l[3];this._callOnItemsRendered(i,r,u,m)}}if(typeof this.props.onScroll=="function"){var y=this.state,h=y.scrollDirection,I=y.scrollOffset,L=y.scrollUpdateWasRequested;this._callOnScroll(h,I,L)}},E._getRangeToRender=function(){var t=this.props,l=t.itemCount,i=t.overscanCount,r=this.state,u=r.isScrolling,m=r.scrollDirection,y=r.scrollOffset;if(l===0)return[0,0,0,0];var h=f(this.props,y,this._instanceProps),I=s(this.props,h,y,this._instanceProps),L=!u||m==="backward"?Math.max(1,i):1,R=!u||m==="forward"?Math.max(1,i):1;return[Math.max(0,h-L),Math.max(0,Math.min(l-1,I+R)),h,I]},T}(q.PureComponent),n.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},n}var bn=function(n,a){n.children,n.direction,n.height,n.layout,n.innerTagName,n.outerTagName,n.width,a.instance},_n=Sn({getItemOffset:function(n,a){var d=n.itemSize;return a*d},getItemSize:function(n,a){var d=n.itemSize;return d},getEstimatedTotalSize:function(n){var a=n.itemCount,d=n.itemSize;return d*a},getOffsetForIndexAndAlignment:function(n,a,d,c,v,f){var s=n.direction,o=n.height,g=n.itemCount,b=n.itemSize,S=n.layout,T=n.width,E=s==="horizontal"||S==="horizontal",_=E?T:o,t=Math.max(0,g*b-_),l=Math.min(t,a*b),i=Math.max(0,a*b-_+b+f);switch(d==="smart"&&(c>=i-_&&c<=l+_?d="auto":d="center"),d){case"start":return l;case"end":return i;case"center":{var r=Math.round(i+(l-i)/2);return r<Math.ceil(_/2)?0:r>t+Math.floor(_/2)?t:r}case"auto":default:return c>=i&&c<=l?c:c<i?i:l}},getStartIndexForOffset:function(n,a){var d=n.itemCount,c=n.itemSize;return Math.max(0,Math.min(d-1,Math.floor(a/c)))},getStopIndexForStartIndex:function(n,a,d){var c=n.direction,v=n.height,f=n.itemCount,s=n.itemSize,o=n.layout,g=n.width,b=c==="horizontal"||o==="horizontal",S=a*s,T=b?g:v,E=Math.ceil((T+d-S)/s);return Math.max(0,Math.min(f-1,a+E-1))},initInstanceProps:function(n){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(n){n.itemSize}});const Tn="_layerContainer_1lbvo_1",En="_layer_1lbvo_1",In="_small_1lbvo_23",On="_heading_1lbvo_26",wn="_option_1lbvo_27",Rn="_message_1lbvo_28",Ln="_focused_1lbvo_64",xn="_selected_1lbvo_68",Cn="_disabled_1lbvo_71",Mn="_check_1lbvo_75",Nn="_optionContent_1lbvo_92",qn="_label_1lbvo_97",An="_icon_1lbvo_104",Fn="_details_1lbvo_109",j={layerContainer:Tn,layer:En,small:In,heading:On,option:wn,message:Rn,focused:Ln,selected:xn,disabled:Cn,check:Mn,optionContent:Nn,label:qn,icon:An,details:Fn},Le=({label:e})=>p.jsx("div",{onClick:n=>n.stopPropagation(),className:j.heading,children:e});Le.__docgenInfo={description:"",methods:[],displayName:"Heading",props:{label:{required:!0,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""}}};const xe=({details:e,label:n,icon:a,disabled:d=!1,selected:c=!1,focused:v=!1,onSelectOption:f,actions:s,closeLayer:o,testId:g})=>p.jsxs("div",{className:U(j.option,d?j.disabled:"",c?j.selected:"",v?j.focused:""),onClick:!d&&f?f:void 0,"data-testid":g,children:[p.jsx("div",{className:j.optionContent,children:p.jsxs("span",{className:j.label,title:n,children:[n,a&&p.jsx("span",{className:j.icon,children:a})]})}),e&&p.jsx("div",{className:U(j.details),children:p.jsx(oe,{faint:!0,children:e})}),!!(s!=null&&s.length)&&p.jsx("div",{className:U(j.actions),children:p.jsx(Ke,{actions:s,closeLayer:o})}),p.jsx("span",{className:j.check,children:c?p.jsx(ue,{icon:Ee.CHECK}):null})]});xe.__docgenInfo={description:"",methods:[],displayName:"Option",props:{details:{required:!1,tsType:{name:"string"},description:""},label:{required:!0,tsType:{name:"string"},description:""},icon:{required:!1,tsType:{name:"ReactNode"},description:""},disabled:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},selected:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},focused:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onSelectOption:{required:!1,tsType:{name:"signature",type:"function",raw:`(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as y}from"./helpers-JJxzGegQ.js";import{M as m}from"./types-BmbYqTX_.js";const o=n=>n instanceof Array,v=(n,r)=>r&&Array.isArray(n)?n.map(t=>typeof t=="string"||typeof t=="number"?{label:t,value:t}:t):n,f=(n,r)=>{if(r!==null&&typeof r=="object"&&r.hasOwnProperty("label")&&r.hasOwnProperty("value"))return r;{const t=r!==null&&typeof r=="object"&&r.hasOwnProperty("value")?r.value:r;return(Array.isArray(n)?n.filter(e=>e.type!==m.HEADING).find(e=>e.value==t):void 0)||(y(t)?void 0:{value:t,label:t})}},p=(n,r)=>o(r)?r.map(u=>f(n,u)).filter(u=>u!==void 0):r===null?void 0:f(n,r),A=n=>Array.isArray(n)&&n.some(r=>typeof r=="string"||typeof r=="number"),b=(n,r)=>{const t=r instanceof Array?r.length?r[0]:null:r,u=t==null?null:typeof t=="string"||typeof t=="number"?t:t.value,e=n.filter(l=>l.type!==m.HEADING).findIndex(l=>typeof l=="string"||typeof l=="number"?l==u:l.value==u);return e===-1?null:e},S=(n,r)=>!(o(r)?r:y(r)?[]:[r]).every(e=>n.find(a=>a.value===e.value)!==void 0),g=(n,r,t,u)=>{const e=Array.isArray(n)?n:[],l=o(r),a=A(e),i=v(e,a),c=t?b(e,r):null,s=p(i,r),d=u&&s!==void 0?S(i,s):!1;return{options:i,selectedOptions:s,multi:l,simpleInputs:a,firstSelectedOptionIndex:c,hasNonExistentValue:d}};export{g as s};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{w as i,e as o,u as c}from"./index-DMAnyMX5.js";import{S as z}from"./select-
|
|
1
|
+
import{j as d}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJvc.js";import{w as i,e as o,u as c}from"./index-DMAnyMX5.js";import{S as z}from"./select-DRMh4SU1.js";import{S as qa}from"./spacer-BWoNR27H.js";import{I as Z}from"./common-types-Sih75Sav.js";import{I as $}from"./icon-BSFY3vDO.js";import"./index-CF7H4eMJ.js";import"./index-Bk2sglWO.js";import"./disabled-context-rmpd7YJS.js";import"./types-UmZ4Y_CR.js";import"./lodash-BHd_uQHh.js";import"./tooltip-1V7clEnw.js";import"./index-CUZDtIZe.js";import"./index-CEuq6vkz.js";import"./inheritsLoose-DP0QEDDI.js";import"./assertThisInitialized-B9jnkVVz.js";import"./memoize-one.esm-CcMeOnPo.js";import"./types-BmbYqTX_.js";import"./text-B3-TSWok.js";import"./actions-BhPnDYmS.js";import"./button-DHevvVBE.js";import"./spinner-AWUe4xwQ.js";import"./badge-CLQ59MDF.js";import"./select.input-CJed_LLR.js";import"./helpers-JJxzGegQ.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";const _a=[{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Koalas",value:"leaves"},{label:"Monkeys",value:"bananas",disabled:!0},{label:"Wombats",value:"bark"}],Fa=[{label:"Kangaroos",value:"grass",details:"(grass)"},{label:"Monkeys",value:"bananas",details:"(bananas)"},{label:"Possums",value:"slugs",details:"(slugs)"}],Ga=[{type:"Heading",label:"Large"},{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{type:"Heading",label:"Small"},{label:"Possums",value:"slugs"}],Ya=[{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4}],Za=[{label:"Yes",value:!0},{label:"No",value:!1}],$a=[{label:"Aardvarks",value:"termites"},{label:"Monkeys",value:"bananas"},{label:"Vampires",value:"blood",icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"})},{label:"Zombies",value:"brains",icon:d.jsx($,{icon:Z.ERROR,color:"var(--color-text-error)"})}],y=[{label:"Delete",icon:"delete",onClick:()=>{}},{label:"Rename",icon:"rename",onClick:()=>{}}],za=[{label:"Kangaroos",value:"grass",actions:y},{label:"Monkeys",value:"bananas",actions:y},{label:"Possums",value:"slugs",actions:y,details:"(some details)"}],Ja=[{label:"Kangaroos",value:"grass",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(grass)"},{label:"Monkeys",value:"bananas",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(bananas)"},{label:"Possums",value:"slugs",actions:y,icon:d.jsx($,{icon:Z.WARNING,color:"var(--color-text-warning)"}),details:"(slugs)"}],Qa=[...Array(1e4).keys()].map((t,l)=>({label:Math.random().toString(36).substring(7),value:l})),Ua=["Aardvarks","Kangaroos","Monkeys","Possums"],Bn={title:"Forms/Select",component:z,args:{options:_a,native:!1,multi:!1,disabled:!1,autoLayerWidth:!1,clearable:!1,searchable:!0,right:!1}},a=t=>{const{multi:l,value:e}=t,[s,n]=b.useState(e||(l?[]:void 0)),u=r=>{const{value:g}=r.target;n(l?g:{value:g})};return d.jsx(z,{value:s,onChange:u,...t})},J=a.bind({}),C=a.bind({});C.args={small:!0};const x=a.bind({});x.args={width:"auto"};const I=a.bind({});I.args={width:"200px"};const w=a.bind({});w.args={native:!0};const f=a.bind({});f.args={multi:!0,clearable:!0};const T=a.bind({});T.args={options:[]};const B=a.bind({});B.args={clearable:!0};const j=a.bind({});j.args={value:{label:"Vampires",value:"blood"}};const k=a.bind({});k.args={placeholder:"Select the best animal..."};const W=a.bind({});W.args={options:Ga};const O=a.bind({});O.args={options:Fa};const D=a.bind({});D.args={options:$a};const N=a.bind({});N.args={options:za};const A=a.bind({});A.args={options:Ja};const E=a.bind({});E.args={searchable:!1};const M=a.bind({});M.args={right:!0};const v=a.bind({});v.parameters={docs:{description:{story:"Avoid autoLayerWidth for very long lists in custom selects (slow)"}}};v.args={width:"70px",autoLayerWidth:!0};const L=a.bind({});L.args={tooltip:"Some info"};const K=a.bind({});K.args={error:"Some info"};const R=a.bind({});R.args={warning:"Some info"};const P=a.bind({});P.args={disabled:!0};const H=a.bind({});H.args={options:Ya,placeholder:void 0};const _=a.bind({});_.args={options:Za};const q=a.bind({});q.args={options:Ua};const m=a.bind({});m.parameters={docs:{description:{story:"Avoid `width: auto` and autoLayerWidth for very long lists in custom selects (slow). Consider checkNonExistentValues={false}."}}};m.args={options:Qa};const F=a.bind({});F.args={deprecatedEventHandler:!0};const G=a.bind({});G.args={value:{label:"Vampires",value:"blood"},disabled:!0};const Y=()=>{const[t,l]=b.useState([{label:"Aardvarks",value:"termites"},{label:"Kangaroos",value:"grass"},{label:"Monkeys",value:"bananas"},{label:"Possums",value:"slugs"}]),[e,s]=b.useState(void 0),[n,u]=b.useState([]);return d.jsxs(d.Fragment,{children:[d.jsx(z,{name:"example",options:t,onChange:r=>s({value:r.target.value}),onCreate:r=>{const g={label:r,value:r};l([...t,g]),s(g)},value:e,clearable:!0}),d.jsx(qa,{}),d.jsx(z,{name:"example",options:t,onChange:r=>u(r.target.value),onCreate:r=>{const g={label:r,value:r};l([...t,g]),console.log(r),u([...n,g])},value:n,multi:!0,clearable:!0})]})},h=a.bind({});h.args={testId:"testId",clearable:!0};h.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&(await l("Select item with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u);const r=e.getByTestId("testId-value");await o(i(r).getByText("Wombats")).toBeInTheDocument()}),await l("Clear selected value",async()=>{const s=e.getByTestId("testId-clear");await c.click(s);const n=e.queryByTestId("testId-value");await o(n).not.toBeInTheDocument()}))};const S=a.bind({});S.args={testId:"testId",clearable:!0,multi:!0};S.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&(await l("Select items with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u);const r=i(n).getByText("Kangaroos");await c.click(r),await c.click(t),await o(n).not.toBeInTheDocument();const g=e.getByTestId("testId-value");await o(i(g).getByText("Wombats")).toBeInTheDocument(),await o(i(g).getByText("Kangaroos")).toBeInTheDocument()}),await l("Deselect item with click",async()=>{const s=e.getByTestId("testId");await c.click(s);const n=e.getByTestId("testId-layer");await o(n).toBeInTheDocument();const u=i(n).getByText("Wombats");await c.click(u),await c.click(t),await o(n).not.toBeInTheDocument();const r=e.getByTestId("testId-value");await o(i(r).queryByText("Wombats")).not.toBeInTheDocument()}),await l("Clear selected values",async()=>{const s=e.getByTestId("testId-clear");await c.click(s);const n=e.queryByTestId("testId-value");await o(n).not.toBeInTheDocument()}))};const V=a.bind({});V.args={testId:"testId",disabled:!0};V.play=async({canvasElement:t,step:l})=>{const e=i(t);await l("Clicking disabled trigger should not show layer",async()=>{await e.getByTestId("testId").click();const n=e.queryByTestId("testId-layer");await o(n).toBeNull()})};const p=()=>{const[t,l]=b.useState(_a),[e,s]=b.useState(void 0);return d.jsx(z,{testId:"testId",name:"example",options:t,onChange:n=>s({value:n.target.value}),onCreate:n=>{const u={label:n,value:n};l([...t,u]),s(u)},value:e})};p.args={testId:"testId"};p.play=async({canvasElement:t,step:l})=>{const e=t.parentElement?i(t.parentElement):null;await o(e).toBeTruthy(),e&&await l("Create new item",async()=>{const s=e.getByTestId("testId-input");if(o(s).toBeInTheDocument(),!s)return;await c.type(s,"New value");const n=e.getByText('Create "New value"');await c.click(n);const u=e.getByTestId("testId-value");await o(i(u).getByText("New value")).toBeInTheDocument()})};Y.__docgenInfo={description:"",methods:[],displayName:"OnCreate"};p.__docgenInfo={description:"",methods:[{name:"play",docblock:null,modifiers:["static"],params:[{name:"{ canvasElement, step }",optional:!1,type:null}],returns:null}],displayName:"TestCreate"};var Q,U,X;J.parameters={...J.parameters,docs:{...(Q=J.parameters)==null?void 0:Q.docs,source:{originalSource:`(args: any) => {
|
|
2
2
|
const {
|
|
3
3
|
multi,
|
|
4
4
|
value
|
|
@@ -576,4 +576,4 @@ import{j as d}from"./jsx-runtime-eps93zm2.js";import{r as b}from"./index-DhsZuJv
|
|
|
576
576
|
setOptions([...options, newValue]);
|
|
577
577
|
setSingleValue(newValue);
|
|
578
578
|
}} value={singleValue} />;
|
|
579
|
-
}`,...(Ha=(Pa=p.parameters)==null?void 0:Pa.docs)==null?void 0:Ha.source}}};const
|
|
579
|
+
}`,...(Ha=(Pa=p.parameters)==null?void 0:Pa.docs)==null?void 0:Ha.source}}};const jn=["Default","Small","AutoWidth","FixedWidth","Native","Multiselect","Empty","Clearable","NonExistentValue","CustomPlaceholder","OptionsWithHeadings","OptionsWithDetails","OptionsWithIcons","OptionsWithActions","OptionsWithEverything","NotSearchable","RightAligned","AutoLayerWidth","Tooltip","Error","Warning","Disabled","NumericOptions","BooleanOptions","SimpleOptions","VeryLongList","DeprecatedEventHandler","TestDisabledNonExistentValue","OnCreate","Test","TestMulti","TestDisabled","TestCreate"];export{v as AutoLayerWidth,x as AutoWidth,_ as BooleanOptions,B as Clearable,k as CustomPlaceholder,J as Default,F as DeprecatedEventHandler,P as Disabled,T as Empty,K as Error,I as FixedWidth,f as Multiselect,w as Native,j as NonExistentValue,E as NotSearchable,H as NumericOptions,Y as OnCreate,N as OptionsWithActions,O as OptionsWithDetails,A as OptionsWithEverything,W as OptionsWithHeadings,D as OptionsWithIcons,M as RightAligned,q as SimpleOptions,C as Small,h as Test,p as TestCreate,V as TestDisabled,G as TestDisabledNonExistentValue,S as TestMulti,L as Tooltip,m as VeryLongList,R as Warning,jn as __namedExportsOrder,Bn as default};
|