@dialpad/dialtone 9.12.0 → 9.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/css/CHANGELOG.json +1 -1
  2. package/dist/css/dialtone.css +175 -157
  3. package/dist/css/dialtone.min.css +1 -1
  4. package/dist/icons/icons.json +1 -1
  5. package/dist/icons/keywords.json +1 -1
  6. package/dist/icons/svg/user-speak.svg +1 -0
  7. package/dist/tokens/android/java/tokens-dark.kt +1 -1
  8. package/dist/tokens/android/java/tokens-light.kt +1 -1
  9. package/dist/tokens/android/res/values/colors-dark.xml +1 -1
  10. package/dist/tokens/android/res/values/colors-light.xml +1 -1
  11. package/dist/tokens/android/res/values/dimens.xml +1 -1
  12. package/dist/tokens/css/variables-dark.css +71 -71
  13. package/dist/tokens/css/variables-light.css +71 -71
  14. package/dist/tokens/doc.json +480 -280
  15. package/dist/tokens/ios/tokens-dark.swift +1 -1
  16. package/dist/tokens/ios/tokens-light.swift +1 -1
  17. package/dist/tokens/less/variables-dark.less +71 -71
  18. package/dist/tokens/less/variables-light.less +71 -71
  19. package/dist/vue2/dialtone-vue.cjs +2 -2
  20. package/dist/vue2/dialtone-vue.js +15 -15
  21. package/dist/vue2/emoji.cjs +1 -1
  22. package/dist/vue2/emoji.js +3 -3
  23. package/dist/vue2/{emoji_picker-vsukB8Wg.cjs → emoji_picker-OvZiNbQL.cjs} +1 -1
  24. package/dist/vue2/{emoji_picker-KLEZsQG3.js → emoji_picker-ZCP0nGK3.js} +1 -1
  25. package/dist/vue2/{emoji_text_wrapper-_FmOgJHA.cjs → emoji_text_wrapper-ETfyiu5g.cjs} +1 -1
  26. package/dist/vue2/{emoji_text_wrapper--dDdt-Nq.js → emoji_text_wrapper-ObJLUqLj.js} +1 -1
  27. package/dist/vue2/{index-w3NKtwEr.js → index-i-V6G-jv.js} +306 -293
  28. package/dist/vue2/index-npEAeBD7.cjs +1 -0
  29. package/dist/vue2/message_input.cjs +1 -1
  30. package/dist/vue2/message_input.js +3 -3
  31. package/dist/vue2/{rich_text_editor-l0je0xEP.cjs → rich_text_editor-8eCw3JJK.cjs} +2 -2
  32. package/dist/vue2/{rich_text_editor-IfF_glhr.js → rich_text_editor-GclbjzaB.js} +2 -2
  33. package/dist/vue2/style.css +1 -1
  34. package/dist/vue2/types/components/stack/stack_constants.d.ts.map +1 -1
  35. package/dist/vue3/dialtone-vue.cjs +2 -2
  36. package/dist/vue3/dialtone-vue.js +193 -194
  37. package/dist/vue3/{emoji-5bJ2I-JN.js → emoji-Qb33TUJF.js} +5109 -5084
  38. package/dist/vue3/emoji-tjuFDLe0.cjs +1 -0
  39. package/dist/vue3/emoji.cjs +1 -1
  40. package/dist/vue3/emoji.js +3 -3
  41. package/dist/vue3/{emoji_picker-uX_EjNHa.js → emoji_picker-9GQGW9jo.js} +1 -1
  42. package/dist/vue3/{emoji_picker-Rd2jqRzm.cjs → emoji_picker-v0UvupZL.cjs} +1 -1
  43. package/dist/vue3/{emoji_text_wrapper-3gf3i4pj.cjs → emoji_text_wrapper-CYurj4BK.cjs} +1 -1
  44. package/dist/vue3/{emoji_text_wrapper-eOnmhh72.js → emoji_text_wrapper-plWr8zzQ.js} +1 -1
  45. package/dist/vue3/message_input.cjs +1 -1
  46. package/dist/vue3/message_input.js +3 -3
  47. package/dist/vue3/{rich_text_editor-UHm3sveX.js → rich_text_editor-I1OAinYe.js} +2 -2
  48. package/dist/vue3/{rich_text_editor-5Fj3bfLC.cjs → rich_text_editor-L0wz8Aqn.cjs} +2 -2
  49. package/dist/vue3/style.css +1 -1
  50. package/dist/vue3/types/components/stack/stack_constants.d.ts.map +1 -1
  51. package/package.json +2 -2
  52. package/dist/vue2/index-W9PuOJ1N.cjs +0 -1
  53. package/dist/vue3/emoji-Ran5txvJ.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./rich_text_editor-l0je0xEP.cjs"),a=require("./index-W9PuOJ1N.cjs"),l=require("./emoji_picker-vsukB8Wg.cjs"),s=require("./tooltip-6msmWvq0.cjs");require("vue");const u={name:"DtRecipeMessageInput",components:{DtButton:a.DtButton,DtEmojiPicker:l.DtEmojiPicker,DtIcon:a.DtIcon,DtInput:a.DtInput,DtPopover:o.DtPopover,DtRichTextEditor:o.DtRichTextEditor,DtTooltip:s.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},outputFormat:{type:String,default:"text",validator(t){return o.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(t)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:"unset"},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({}),validate(t){return["searchNoResultsLabel","searchResultsLabel","searchPlaceholderLabel","skinSelectorButtonTooltipLabel","tabSetLabels"].every(e=>t[e]!=null)}},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:""})},showImagePicker:{type:[Boolean,Object],default:()=>({tooltipLabel:"Attach Image",ariaLabel:"image button"})},showSend:{type:[Boolean,Object],default:()=>({icon:"send"})},showCancel:{type:[Boolean,Object],default:()=>({text:"Cancel"})}},emits:["submit","select-media","add-media","cancel","skin-tone","selected-emoji","focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSendDisabled(){return this.inputLength===0||this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},computedCloseButtonProps(){return{ariaLabel:"Close"}},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened},sendButtonKind(){return this.isSendDisabled?"muted":"default"}},watch:{value(t){this.internalInputValue=t}},methods:{onDrag(t){t.stopPropagation(),t.preventDefault()},onDrop(t){t.stopPropagation(),t.preventDefault();const e=t.dataTransfer,i=Array.from(e.files).map(r=>r.name);this.$emit("add-media",i)},onSkinTone(t){this.$emit("skin-tone",t)},onSelectEmoji(t){if(!t){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:t.shortname}}),this.emojiPickerOpened=!1,this.$emit("selected-emoji",t)},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(t){this.$emit("select-media",t)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},onCancel(){this.$emit("cancel")},onFocus(t){this.hasFocus=!0,console.log("B",this.hasFocus),this.$refs.richTextEditor.focusEditor(),console.log("A",this.hasFocus),this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}};var c=function(){var e=this,n=e._self._c;return n("div",{class:["d-d-flex","d-fd-column","d-bar8","d-baw1","d-ba","d-c-text",{"d-bc-black-500 d-bs-sm":e.hasFocus,"d-bc-default":!e.hasFocus}],attrs:{"data-qa":"dt-message-input",role:"presentation"},on:{click:function(i){return e.$refs.richTextEditor.focusEditor()},"drag-enter":e.onDrag,"drag-over":e.onDrag,drop:e.onDrop,keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:e.onSend.apply(null,arguments)}}},[n("div",{staticClass:"d-of-auto d-mx16 d-mt8 d-mb4",style:{"max-height":e.maxHeight}},[n("dt-rich-text-editor",e._b({ref:"richTextEditor",attrs:{editable:e.editable,"input-aria-label":e.inputAriaLabel,"input-class":e.inputClass,"output-format":e.outputFormat,"auto-focus":e.autoFocus,link:e.link,placeholder:e.placeholder},on:{focus:e.onFocus,blur:e.onBlur,input:function(i){return e.onInput(i)}},model:{value:e.internalInputValue,callback:function(i){e.internalInputValue=i},expression:"internalInputValue"}},"dt-rich-text-editor",e.$attrs,!1))],1),e._t("middle"),n("section",{staticClass:"d-d-flex d-jc-space-between d-mx8 d-my4"},[n("div",{staticClass:"d-d-flex"},[e.showImagePicker?n("dt-tooltip",{attrs:{placement:"top-start",message:e.showImagePicker.tooltipLabel,offset:[-4,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:e.imagePickerFocus?"default":"muted",importance:"clear","aria-label":e.showImagePicker.ariaLabel},on:{click:e.onSelectImage,mouseenter:function(i){e.imagePickerFocus=!0},mouseleave:function(i){e.imagePickerFocus=!1},focus:function(i){e.imagePickerFocus=!0},blur:function(i){e.imagePickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:"image",size:"300"}})]},proxy:!0}],null,!1,2561380377)}),n("dt-input",{ref:"messageInputImageUpload",staticClass:"d-ps-absolute",attrs:{"data-qa":"dt-message-input-image-input",type:"file",multiple:"",hidden:""},on:{input:e.onImageUpload}})]},proxy:!0}],null,!1,3687934814)}):e._e(),e.showEmojiPicker?n("dt-popover",{attrs:{"data-qa":"dt-message-input-emoji-picker-popover",open:e.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none"},on:{opened:i=>{e.emojiPickerOpened=i}},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-tooltip",{attrs:{message:e.emojiTooltipMessage,offset:[0,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:e.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":e.emojiButtonAriaLabel,offset:[0,0]},on:{click:e.toggleEmojiPicker,mouseenter:function(i){e.emojiPickerFocus=!0},mouseleave:function(i){e.emojiPickerFocus=!1},focus:function(i){e.emojiPickerFocus=!0},blur:function(i){e.emojiPickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"}})]},proxy:!0}],null,!1,352772906)})]},proxy:!0}],null,!1,3933528398)})]},proxy:!0},{key:"content",fn:function(){return[n("dt-emoji-picker",e._b({on:{"skin-tone":e.onSkinTone,"selected-emoji":e.onSelectEmoji}},"dt-emoji-picker",e.emojiPickerProps,!1))]},proxy:!0}],null,!1,1278205067)}):e._e()],1),n("div",{staticClass:"d-d-flex"},[e.showCharacterLimit?n("dt-tooltip",{staticClass:"dt-message-input--remaining-char-tooltip",attrs:{placement:"top-end",enabled:e.characterLimitTooltipEnabled,message:e.showCharacterLimit.message,offset:[10,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("p",{directives:[{name:"show",rawName:"v-show",value:e.displayCharacterLimitWarning,expression:"displayCharacterLimitWarning"}],staticClass:"d-fc-error d-mr16 dt-message-input--remaining-char",attrs:{"data-qa":"dt-message-input-character-limit"}},[e._v(" "+e._s(e.showCharacterLimit.count-e.inputLength)+" ")])]},proxy:!0}],null,!1,2591914334)}):e._e(),e.showCancel?n("dt-button",{staticClass:"dt-message-input--cancel-button",attrs:{"data-qa":"dt-message-input-cancel-button",size:"sm",kind:"muted",importance:"clear","aria-label":e.showCancel.ariaLabel},on:{click:e.onCancel}},[n("p",[e._v(e._s(e.showCancel.text))])]):e._e(),e.showSend?n("dt-tooltip",{attrs:{placement:"top-end",enabled:!e.showSend,message:e.showSend.tooltipLabel,show:!e.isSendDisabled&&e.sendButtonFocus,offset:[6,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{class:{"message-input-button__disabled d-fc-muted":e.isSendDisabled},attrs:{"data-qa":"dt-message-input-send-btn",size:"sm",kind:e.sendButtonKind,circle:!!e.showSend.icon,importance:"primary","aria-label":e.showSend.ariaLabel,"aria-disabled":e.isSendDisabled},on:{click:e.onSend,mouseenter:function(i){e.sendButtonFocus=!0},mouseleave:function(i){e.sendButtonFocus=!1},focus:function(i){e.sendButtonFocus=!0},blur:function(i){e.sendButtonFocus=!1}},scopedSlots:e._u([e.showSend.icon?{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.showSend.icon,size:"300"}})]},proxy:!0}:null],null,!0)},[e.showSend.text?[n("p",[e._v(e._s(e.showSend.text))])]:e._e()],2)]},proxy:!0}],null,!1,370079737)}):e._e()],1)])],2)},d=[],m=s.normalizeComponent(u,c,d,!1,null,null,null,null);const p=m.exports;exports.DtRichTextEditor=o.DtRichTextEditor;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=o.RICH_TEXT_EDITOR_OUTPUT_FORMATS;exports.DtRecipeMessageInput=p;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./rich_text_editor-8eCw3JJK.cjs"),a=require("./index-npEAeBD7.cjs"),l=require("./emoji_picker-OvZiNbQL.cjs"),s=require("./tooltip-6msmWvq0.cjs");require("vue");const u={name:"DtRecipeMessageInput",components:{DtButton:a.DtButton,DtEmojiPicker:l.DtEmojiPicker,DtIcon:a.DtIcon,DtInput:a.DtInput,DtPopover:o.DtPopover,DtRichTextEditor:o.DtRichTextEditor,DtTooltip:s.DtTooltip},mixins:[],inheritAttrs:!1,props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(t){return typeof t=="string"?o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES.includes(t):!0}},outputFormat:{type:String,default:"text",validator(t){return o.RICH_TEXT_EDITOR_OUTPUT_FORMATS.includes(t)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},maxHeight:{type:String,default:"unset"},showEmojiPicker:{type:Boolean,default:!0},emojiPickerProps:{type:Object,default:()=>({}),validate(t){return["searchNoResultsLabel","searchResultsLabel","searchPlaceholderLabel","skinSelectorButtonTooltipLabel","tabSetLabels"].every(e=>t[e]!=null)}},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},showCharacterLimit:{type:[Boolean,Object],default:()=>({count:1500,warning:500,message:""})},showImagePicker:{type:[Boolean,Object],default:()=>({tooltipLabel:"Attach Image",ariaLabel:"image button"})},showSend:{type:[Boolean,Object],default:()=>({icon:"send"})},showCancel:{type:[Boolean,Object],default:()=>({text:"Cancel"})}},emits:["submit","select-media","add-media","cancel","skin-tone","selected-emoji","focus","blur","input"],data(){return{internalInputValue:this.value,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return!!this.showCharacterLimit&&this.showCharacterLimit.count-this.inputLength<=this.showCharacterLimit.warning},characterLimitTooltipEnabled(){return this.showCharacterLimit.message&&this.showCharacterLimit.count-this.inputLength<0},isSendDisabled(){return this.inputLength===0||this.disableSend||this.showCharacterLimit&&this.inputLength>this.showCharacterLimit.count},computedCloseButtonProps(){return{ariaLabel:"Close"}},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened},sendButtonKind(){return this.isSendDisabled?"muted":"default"}},watch:{value(t){this.internalInputValue=t}},methods:{onDrag(t){t.stopPropagation(),t.preventDefault()},onDrop(t){t.stopPropagation(),t.preventDefault();const e=t.dataTransfer,i=Array.from(e.files).map(r=>r.name);this.$emit("add-media",i)},onSkinTone(t){this.$emit("skin-tone",t)},onSelectEmoji(t){if(!t){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:t.shortname}}),this.emojiPickerOpened=!1,this.$emit("selected-emoji",t)},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(t){this.$emit("select-media",t)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},onCancel(){this.$emit("cancel")},onFocus(t){this.hasFocus=!0,console.log("B",this.hasFocus),this.$refs.richTextEditor.focusEditor(),console.log("A",this.hasFocus),this.$emit("focus",t)},onBlur(t){this.hasFocus=!1,this.$emit("blur",t)},onInput(t){this.$emit("input",t)}}};var c=function(){var e=this,n=e._self._c;return n("div",{class:["d-d-flex","d-fd-column","d-bar8","d-baw1","d-ba","d-c-text",{"d-bc-black-500 d-bs-sm":e.hasFocus,"d-bc-default":!e.hasFocus}],attrs:{"data-qa":"dt-message-input",role:"presentation"},on:{click:function(i){return e.$refs.richTextEditor.focusEditor()},"drag-enter":e.onDrag,"drag-over":e.onDrag,drop:e.onDrop,keydown:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")||i.ctrlKey||i.shiftKey||i.altKey||i.metaKey?null:e.onSend.apply(null,arguments)}}},[n("div",{staticClass:"d-of-auto d-mx16 d-mt8 d-mb4",style:{"max-height":e.maxHeight}},[n("dt-rich-text-editor",e._b({ref:"richTextEditor",attrs:{editable:e.editable,"input-aria-label":e.inputAriaLabel,"input-class":e.inputClass,"output-format":e.outputFormat,"auto-focus":e.autoFocus,link:e.link,placeholder:e.placeholder},on:{focus:e.onFocus,blur:e.onBlur,input:function(i){return e.onInput(i)}},model:{value:e.internalInputValue,callback:function(i){e.internalInputValue=i},expression:"internalInputValue"}},"dt-rich-text-editor",e.$attrs,!1))],1),e._t("middle"),n("section",{staticClass:"d-d-flex d-jc-space-between d-mx8 d-my4"},[n("div",{staticClass:"d-d-flex"},[e.showImagePicker?n("dt-tooltip",{attrs:{placement:"top-start",message:e.showImagePicker.tooltipLabel,offset:[-4,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:e.imagePickerFocus?"default":"muted",importance:"clear","aria-label":e.showImagePicker.ariaLabel},on:{click:e.onSelectImage,mouseenter:function(i){e.imagePickerFocus=!0},mouseleave:function(i){e.imagePickerFocus=!1},focus:function(i){e.imagePickerFocus=!0},blur:function(i){e.imagePickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:"image",size:"300"}})]},proxy:!0}],null,!1,2561380377)}),n("dt-input",{ref:"messageInputImageUpload",staticClass:"d-ps-absolute",attrs:{"data-qa":"dt-message-input-image-input",type:"file",multiple:"",hidden:""},on:{input:e.onImageUpload}})]},proxy:!0}],null,!1,3687934814)}):e._e(),e.showEmojiPicker?n("dt-popover",{attrs:{"data-qa":"dt-message-input-emoji-picker-popover",open:e.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none"},on:{opened:i=>{e.emojiPickerOpened=i}},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-tooltip",{attrs:{message:e.emojiTooltipMessage,offset:[0,-4]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{attrs:{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:e.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":e.emojiButtonAriaLabel,offset:[0,0]},on:{click:e.toggleEmojiPicker,mouseenter:function(i){e.emojiPickerFocus=!0},mouseleave:function(i){e.emojiPickerFocus=!1},focus:function(i){e.emojiPickerFocus=!0},blur:function(i){e.emojiPickerFocus=!1}},scopedSlots:e._u([{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"}})]},proxy:!0}],null,!1,352772906)})]},proxy:!0}],null,!1,3933528398)})]},proxy:!0},{key:"content",fn:function(){return[n("dt-emoji-picker",e._b({on:{"skin-tone":e.onSkinTone,"selected-emoji":e.onSelectEmoji}},"dt-emoji-picker",e.emojiPickerProps,!1))]},proxy:!0}],null,!1,1278205067)}):e._e()],1),n("div",{staticClass:"d-d-flex"},[e.showCharacterLimit?n("dt-tooltip",{staticClass:"dt-message-input--remaining-char-tooltip",attrs:{placement:"top-end",enabled:e.characterLimitTooltipEnabled,message:e.showCharacterLimit.message,offset:[10,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("p",{directives:[{name:"show",rawName:"v-show",value:e.displayCharacterLimitWarning,expression:"displayCharacterLimitWarning"}],staticClass:"d-fc-error d-mr16 dt-message-input--remaining-char",attrs:{"data-qa":"dt-message-input-character-limit"}},[e._v(" "+e._s(e.showCharacterLimit.count-e.inputLength)+" ")])]},proxy:!0}],null,!1,2591914334)}):e._e(),e.showCancel?n("dt-button",{staticClass:"dt-message-input--cancel-button",attrs:{"data-qa":"dt-message-input-cancel-button",size:"sm",kind:"muted",importance:"clear","aria-label":e.showCancel.ariaLabel},on:{click:e.onCancel}},[n("p",[e._v(e._s(e.showCancel.text))])]):e._e(),e.showSend?n("dt-tooltip",{attrs:{placement:"top-end",enabled:!e.showSend,message:e.showSend.tooltipLabel,show:!e.isSendDisabled&&e.sendButtonFocus,offset:[6,-8]},scopedSlots:e._u([{key:"anchor",fn:function(){return[n("dt-button",{class:{"message-input-button__disabled d-fc-muted":e.isSendDisabled},attrs:{"data-qa":"dt-message-input-send-btn",size:"sm",kind:e.sendButtonKind,circle:!!e.showSend.icon,importance:"primary","aria-label":e.showSend.ariaLabel,"aria-disabled":e.isSendDisabled},on:{click:e.onSend,mouseenter:function(i){e.sendButtonFocus=!0},mouseleave:function(i){e.sendButtonFocus=!1},focus:function(i){e.sendButtonFocus=!0},blur:function(i){e.sendButtonFocus=!1}},scopedSlots:e._u([e.showSend.icon?{key:"icon",fn:function(){return[n("dt-icon",{attrs:{name:e.showSend.icon,size:"300"}})]},proxy:!0}:null],null,!0)},[e.showSend.text?[n("p",[e._v(e._s(e.showSend.text))])]:e._e()],2)]},proxy:!0}],null,!1,370079737)}):e._e()],1)])],2)},d=[],m=s.normalizeComponent(u,c,d,!1,null,null,null,null);const p=m.exports;exports.DtRichTextEditor=o.DtRichTextEditor;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=o.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=o.RICH_TEXT_EDITOR_OUTPUT_FORMATS;exports.DtRecipeMessageInput=p;
@@ -1,6 +1,6 @@
1
- import { D as o, a as s, R as r, b as l } from "./rich_text_editor-IfF_glhr.js";
2
- import { t as u, w as c, x as d } from "./index-w3NKtwEr.js";
3
- import { D as m } from "./emoji_picker-KLEZsQG3.js";
1
+ import { D as o, a as s, R as r, b as l } from "./rich_text_editor-GclbjzaB.js";
2
+ import { t as u, w as c, x as d } from "./index-i-V6G-jv.js";
3
+ import { D as m } from "./emoji_picker-ZCP0nGK3.js";
4
4
  import { n as p, D as f } from "./tooltip-QB-zD49d.js";
5
5
  import "vue";
6
6
  const h = {
@@ -1,5 +1,5 @@
1
- "use strict";const I=require("./tooltip-6msmWvq0.cjs"),be=require("vue"),G=require("./index-W9PuOJ1N.cjs"),xt={BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ol=[xt.BUSY,xt.AWAY,xt.OFFLINE,xt.ACTIVE],uc={name:"DtPresence",props:{presence:{type:String,default:xt.ACTIVE,validator:n=>ol.includes(n)},srText:{type:String,default:null}}};var dc=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-presence",attrs:{"data-qa":"dt-presence",role:"status","aria-live":e.$attrs.ariaLive||"off"}},[e.srText?t("span",{staticClass:"sr-only",attrs:{"data-qa":"dt-presence-sr-text"}},[e._v(e._s(e.srText)+" ")]):e._e(),t("div",{staticClass:"d-presence__inner",class:{"d-presence__inner--active":e.presence==="active","d-presence__inner--away":e.presence==="away","d-presence__inner--busy":e.presence==="busy","d-presence__inner--offline":e.presence==="offline"}})])},fc=[],hc=I.normalizeComponent(uc,dc,fc,!1,null,null,null,null);const ll=hc.exports,Sn={xs:"d-avatar--xs",sm:"d-avatar--sm",md:"d-avatar--md",lg:"d-avatar--lg",xl:"d-avatar--xl"},al={default:"",icon:"d-avatar__icon",initials:"d-avatar__initials"},cl={md:"d-avatar__presence--md",lg:"d-avatar__presence--lg"},Mi={NONE:"",BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ul={xs:"100",sm:"200",md:"300",lg:"500",xl:"600"},dl=["100","200","300","400","500","600","700","800","900","1000","1100","1200","1300","1400","1500","1600","1700","1800"],wi=n=>n>1;function pc(){return[void 0,...G.iconNames]}const mc=n=>{if(typeof n!="string"||!n.trim())return"";const e=n.trim().split(/\s+/g);return e.length===1?e.join("").substring(0,2):e.filter((t,r)=>r===0||r===e.length-1).map(t=>t.slice(0,1).toUpperCase()).join("")},gc=pc(),yc={name:"DtAvatar",components:{DtPresence:ll,DtIcon:G.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return I.getUniqueString()}},seed:{type:String,default:void 0},color:{type:String,default:void 0},size:{type:String,default:"md",validator:n=>Object.keys(Sn).includes(n)},avatarClass:{type:[String,Array,Object],default:""},canvasClass:{type:[String,Array,Object],default:""},iconClass:{type:[String,Array,Object],default:""},presence:{type:String,default:Mi.NONE,validator:n=>Object.values(Mi).includes(n)},presenceProps:{type:Object,default:()=>({})},group:{type:Number,default:void 0,validator:n=>wi(n)},overlayIcon:{type:String,default:""},overlayText:{type:String,default:""},overlayClass:{type:[String,Array,Object],default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:""},iconName:{type:String,default:void 0,validator:n=>gc.includes(n)},iconSize:{type:String,default:"",validator:n=>!n||Object.keys(G.ICON_SIZE_MODIFIERS).includes(n)},fullName:{type:String,default:""},clickable:{type:Boolean,default:!1}},emits:["click"],data(){return{AVATAR_SIZE_MODIFIERS:Sn,AVATAR_KIND_MODIFIERS:al,AVATAR_PRESENCE_SIZE_MODIFIERS:cl,AVATAR_ICON_SIZES:ul,imageLoadedSuccessfully:null,formattedInitials:"",initializing:!1}},computed:{isNotIconType(){return!this.iconName},avatarClasses(){return["d-avatar",Sn[this.validatedSize],this.avatarClass,{"d-avatar--group":this.showGroup,[`d-avatar--color-${this.getColor()}`]:this.isNotIconType,"d-avatar--clickable":this.clickable}]},overlayClasses(){return["d-avatar__overlay",this.overlayClass]},showGroup(){return wi(this.group)},formattedGroup(){return this.group>99?"99+":this.group},validatedSize(){return this.group?"xs":this.size},showImage(){return this.imageLoadedSuccessfully!==!1&&this.imageSrc},buttonAriaLabel(){if(this.clickable)return this.fullName||this.imageAlt||this.$attrs["aria-label"]}},watch:{fullName:{immediate:!0,handler(){this.formatInitials()}},size:{immediate:!0,handler(){this.formatInitials()}},group:{immediate:!0,handler(){this.formatInitials()}},imageSrc(n){this.imageLoadedSuccessfully=null,n&&(this.validateProps(),this.setImageListeners())}},mounted(){this.validateProps(),this.setImageListeners()},methods:{async setImageListeners(){await this.$nextTick();const n=this.$refs.avatarImage;n&&(n.addEventListener("load",()=>this._loadedImageEventHandler(n),{once:!0}),n.addEventListener("error",()=>this._erroredImageEventHandler(n),{once:!0}))},formatInitials(){const n=mc(this.fullName);this.validatedSize==="xs"?this.formattedInitials="":this.validatedSize==="sm"?this.formattedInitials=n[0]:this.formattedInitials=n},getColor(){return this.color??I.getRandomElement(dl,this.seed)},_loadedImageEventHandler(n){this.imageLoadedSuccessfully=!0,n.classList.remove("d-d-none")},_erroredImageEventHandler(n){this.imageLoadedSuccessfully=!1,n.classList.add("d-d-none")},validateProps(){if(this.imageSrc&&!(this.fullName||this.imageAlt))throw new Error("full-name or image-alt must be set if image-src is provided")},handleClick(n){this.clickable&&this.$emit("click",n)}}};var bc=function(){var e=this,t=e._self._c;return t(e.clickable?"button":"div",{tag:"component",class:e.avatarClasses,attrs:{id:e.id,"data-qa":"dt-avatar","aria-label":e.buttonAriaLabel},on:{click:e.handleClick}},[t("div",{ref:"canvas",class:[e.canvasClass,"d-avatar__canvas",{"d-avatar--image-loaded":e.imageLoadedSuccessfully}]},[e.showImage?t("img",{ref:"avatarImage",staticClass:"d-avatar__image",attrs:{"data-qa":"dt-avatar-image",src:e.imageSrc,alt:e.imageAlt||e.fullName}}):e.iconName?t("dt-icon",{class:[e.iconClass,e.AVATAR_KIND_MODIFIERS.icon],attrs:{name:e.iconName,size:e.iconSize||e.AVATAR_ICON_SIZES[e.size],"data-qa":"dt-avatar-icon"}}):t("span",{class:[e.AVATAR_KIND_MODIFIERS.initials]},[e._v(" "+e._s(e.formattedInitials)+" ")])],1),e.overlayIcon||e.overlayText?t("div",{class:e.overlayClasses},[e.overlayIcon?t("dt-icon",{staticClass:"d-avatar__overlay-icon",attrs:{name:e.overlayIcon}}):e.overlayText?t("p",{staticClass:"d-avatar__overlay-text"},[e._v(" "+e._s(e.overlayText)+" ")]):e._e()],1):e._e(),e.showGroup?t("span",{staticClass:"d-avatar__count",attrs:{"data-qa":"dt-avatar-count"}},[e._v(e._s(e.formattedGroup))]):e._e(),e.presence&&!e.showGroup?t("dt-presence",e._b({class:["d-avatar__presence",e.AVATAR_PRESENCE_SIZE_MODIFIERS[e.size]],attrs:{presence:e.presence,"data-qa":"dt-presence"}},"dt-presence",e.presenceProps,!1)):e._e()],1)},kc=[],Sc=I.normalizeComponent(yc,bc,kc,!1,null,null,null,null);const fl=Sc.exports,Oc={name:"DtLink",props:{kind:{type:String,default:"",validator(n){return G.LINK_VARIANTS.includes(n)}}},emits:["click","focusin","focusout"],data(){return{LINK_KIND_MODIFIERS:G.LINK_KIND_MODIFIERS}}};var xc=function(){var e=this,t=e._self._c;return t("a",e._g({class:["d-link",e.LINK_KIND_MODIFIERS[e.kind]],attrs:{"data-qa":"dt-link",href:"href"in e.$attrs?e.$attrs.href:"javascript:void(0)"}},e.$listeners),[e._t("default")],2)},Ec=[],Tc=I.normalizeComponent(Oc,xc,Ec,!1,null,null,null,null);const hl=Tc.exports,pl={props:{visuallyHiddenClose:{type:Boolean,default:!1},visuallyHiddenCloseLabel:{type:String,default:null}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateVisuallyHiddenCloseProps()}}},computed:{showVisuallyHiddenClose(){return this.visuallyHiddenClose&&this.visuallyHiddenCloseLabel!=null}},methods:{validateVisuallyHiddenCloseProps(){this.visuallyHiddenClose&&!this.visuallyHiddenCloseLabel&&console.error(`If visuallyHiddenClose prop is true, the component includes
2
- a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`)}}},vc={name:"SrOnlyCloseButton",components:{DtIcon:G.DtIcon,DtButton:G.DtButton},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};var Cc=function(){var e=this,t=e._self._c;return t("dt-button",{staticClass:"d-vi-visible-sr",attrs:{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button","aria-label":e.visuallyHiddenCloseLabel},on:{click:e.close,keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"space",32,r.key,[" ","Spacebar"])?null:(r.preventDefault(),r.stopPropagation(),e.close.apply(null,arguments))}}},[t("dt-icon",{attrs:{name:"close"}})],1)},Mc=[],wc=I.normalizeComponent(vc,Cc,Mc,!1,null,null,null,null);const ml=wc.exports,gl=':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])',Ac=`${gl}:not([tabindex="-1"])`,Nc="button,[href],input,select,textarea,details,[tabindex]",yl={methods:{async getFirstFocusableElement(n){await this.$nextTick();const e=this._getFocusableElements(n,!0);return this._getFirstFocusElement(e)},async focusFirstElement(n=this.$el){const e=await this.getFirstFocusableElement(n);e==null||e.focus({preventScroll:!0})},async focusElementById(n){var t;await this.$nextTick();const e=(t=this.$el)==null?void 0:t.querySelector(n);if(e){e.focus();return}console.warn('Could not find the element specified in dt-modal prop "initialFocusElement". Defaulting to focusing the first element.'),await this.focusFirstElement()},_getFirstFocusElement(n){if(!n.length)return;let e=n[0];return e.matches('[type="radio"]:not(:checked)')&&(e=n.find(t=>t.checked&&t.name===e.name)||e),e},_getFocusableElements(n=this.$el,e=!1){return n?[...n.querySelectorAll(Nc)].filter(r=>{const i=window.getComputedStyle(r);return i.getPropertyValue("display")!=="none"&&i.getPropertyValue("visibility")!=="hidden"&&r.matches(e?gl:Ac)}):[]},focusTrappedTabPress(n,e){if(!(n.key==="Tab"))return;const r=this._getFocusableElements(e);if(!r.length){n.preventDefault();return}const i=this._getFirstFocusElement(r),s=r[r.length-1];n.shiftKey?document.activeElement===i&&(s.focus(),n.preventDefault()):document.activeElement===s&&(i.focus(),n.preventDefault())}}},On={DEFAULT:"default",CUSTOM:"custom"},$t={ARROW_KEYS:"arrow-keys",TAB:"tab",NONE:"none"},Pc={name:"DtItemLayout",props:{as:{type:String,default:"div"}}};var Ic=function(){var e=this,t=e._self._c;return t(e.as,{tag:"component",staticClass:"dt-item-layout"},[e.$slots.left?t("section",{staticClass:"dt-item-layout--left",attrs:{"data-qa":"dt-item-layout-left-wrapper"}},[e._t("left")],2):e._e(),t("section",{staticClass:"dt-item-layout--content",attrs:{"data-qa":"dt-item-layout-content-wrapper"}},[e.$slots.default?t("div",{staticClass:"dt-item-layout--title",attrs:{"data-qa":"dt-item-layout-title-wrapper"}},[e._t("default")],2):e._e(),e.$slots.subtitle?t("div",{class:["dt-item-layout--subtitle",{"dt-item-layout--subtitle--with-title":e.$slots.default}],attrs:{"data-qa":"dt-item-layout-subtitle-wrapper"}},[e._t("subtitle")],2):e._e(),e.$slots.bottom?t("div",{staticClass:"dt-item-layout--bottom",attrs:{"data-qa":"dt-item-layout-bottom-wrapper"}},[e._t("bottom")],2):e._e()]),e.$slots.right?t("section",{staticClass:"dt-item-layout--right",attrs:{"data-qa":"dt-item-layout-right-wrapper"}},[e._t("right")],2):e._e(),e.$slots.selected?t("section",{staticClass:"dt-item-layout--selected",attrs:{"data-qa":"dt-item-layout-selected-wrapper"}},[e._t("selected")],2):e._e()])},Dc=[],Rc=I.normalizeComponent(Pc,Ic,Dc,!1,null,"411cb81e",null,null);const Ai=Rc.exports,_c={name:"DtListItem",components:{DtItemLayout:Ai,DtIcon:G.DtIcon},inject:{highlightId:{default:null}},props:{id:{type:String,default(){return I.utils.getUniqueString()}},role:{type:String,default:"listitem"},elementType:{type:String,default:"li"},type:{type:String,default:On.DEFAULT,validator:n=>Object.values(On).includes(n)},navigationType:{type:String,default:$t.NONE,validator:n=>Object.values($t).includes(n)},selected:{type:Boolean,default:!1}},emits:["click","keydown","mousemove","mouseleave"],data(){return{injected:!1,mouseHighlighted:!1}},computed:{listItemType(){switch(this.type){case On.DEFAULT:return Ai;default:return null}},listItemListeners(){return{...this.$listeners,keydown:n=>{["enter","space"].includes(n.code.toLowerCase())&&this.onClick(n),this.$emit("keydown",n)},mousemove:n=>{this.onMouseHover(n),this.$emit("mousemove",n)},mouseleave:n=>{this.onMouseLeave(n),this.$emit("mouseleave",n)}}},isHighlighted(){return this.isHoverable?this.highlightId&&this.highlightId()?this.id===this.highlightId():this.mouseHighlighted:!1},isFocusable(){return this.navigationType===$t.TAB},isHoverable(){return this.navigationType!==$t.NONE}},methods:{onClick(n){this.$emit("click",n)},onMouseHover(){this.mouseHighlighted=!0},onMouseLeave(){this.mouseHighlighted=!1}}};var Lc=function(){var e=this,t=e._self._c;return t(e.elementType,e._g({tag:"component",class:["dt-list-item",{"dt-list-item--focusable":e.isFocusable,"dt-list-item--highlighted":e.isHighlighted,"dt-list-item--static":!e.isHoverable}],attrs:{id:e.id,tabindex:e.isFocusable?0:-1,role:e.role,"aria-selected":e.isHighlighted}},e.listItemListeners),[e.listItemType?t(e.listItemType,{tag:"component",scopedSlots:e._u([e._l(e.$slots,function(r,i){return{key:i,fn:function(){return[e._t(i)]},proxy:!0}}),e.selected?{key:"selected",fn:function(){return[t("dt-icon",{staticClass:"dt-list-item--selected-icon",attrs:{name:"check",size:"400"}})]},proxy:!0}:null],null,!0)}):e._t("default")],2)},Bc=[],$c=I.normalizeComponent(_c,Lc,Bc,!1,null,null,null,null);const bl=$c.exports,Ye={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},is=["sm","md","lg","xl"],gr=["0","100","200","300","400","500","600"],Ni={none:void 0,small:"d-p4",medium:"d-p8",large:"d-p16"},kl={none:void 0,small:"d-pl4",medium:"d-pl8",large:"d-pl16"},Sl=["dialog","menu","listbox","tree","grid"],Ol=["","anchor"],xl=["none","dialog","first"],El=["parent","body"],Tl=[...I.TIPPY_STICKY_VALUES],Fc=[...I.BASE_TIPPY_DIRECTIONS];let zc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Hc=(n=21)=>{let e="",t=n;for(;t--;)e+=zc[Math.random()*64|0];return e};function xn(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xn=function(e){return typeof e}:xn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(n)}var vl={selector:"vue-portal-target-".concat(Hc())},jc=function(e){return vl.selector=e},ei=typeof window<"u"&&(typeof document>"u"?"undefined":xn(document))!==void 0,Vc=be.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(e){return{updatedNodes:e.nodes}},render:function(e){var t=this.updatedNodes&&this.updatedNodes();return t?t.length===1&&!t[0].text?t:e(this.tag||"DIV",t):e()},destroyed:function(){var e=this.$el;e&&e.parentNode.removeChild(e)}}),ss=be.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(vl.selector)}},tag:{type:String,default:"DIV"}},render:function(e){if(this.disabled){var t=this.$scopedSlots&&this.$scopedSlots.default();return t?t.length<2&&!t[0].text?t:e(this.tag,t):e()}return e()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var e=this;this.$nextTick(function(){!e.disabled&&e.slotFn!==e.$scopedSlots.default&&(e.container.updatedNodes=e.$scopedSlots.default),e.slotFn=e.$scopedSlots.default})},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(e){e?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(ei)return document.querySelector(this.selector)},insertTargetEl:function(){if(ei){var e=document.querySelector("body"),t=document.createElement(this.tag);t.id=this.selector.substring(1),e.appendChild(t)}},mount:function(){if(ei){var e=this.getTargetEl(),t=document.createElement("DIV");this.prepend&&e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),this.container=new Vc({el:t,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function qc(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n.component(e.name||"portal",ss),e.defaultSelector&&jc(e.defaultSelector)}typeof window<"u"&&window.Vue&&window.Vue===be&&be.use(qc);const Kc={name:"PopoverHeaderFooter",components:{DtButton:G.DtButton,DtIcon:G.DtIcon},props:{type:{type:String,validator:function(n){return["header","footer"].includes(n)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>{}}},emits:["close"],methods:{focusCloseButton(){var e;const n=(e=this.$refs["popover__close-button"])==null?void 0:e.$el;n==null||n.focus()}}};var Wc=function(){var e=this,t=e._self._c;return t("div",{class:{"d-popover__header":e.type==="header","d-popover__footer":e.type==="footer"},attrs:{"data-qa":"dt-popover-header-footer"}},[e.$slots.content?t("div",{class:[{"d-popover__header__content":e.type==="header","d-popover__footer__content":e.type==="footer"},e.contentClass],attrs:{"data-qa":"dt-popover-header-footer-content"}},[e._t("content")],2):e._e(),e.showCloseButton?t("dt-button",e._b({ref:"popover__close-button",class:{"d-popover__header__close-button":e.type==="header","d-popover__footer__close-button":e.type==="footer"},attrs:{"data-qa":"dt-popover-close",importance:"outlined",kind:"muted",circle:""},on:{click:function(r){return e.$emit("close")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon",{attrs:{name:"close",size:"300"}})]},proxy:!0}],null,!1,2538694920)},"dt-button",e.closeButtonProps,!1)):e._e()],1)},Uc=[],Jc=I.normalizeComponent(Kc,Wc,Uc,!1,null,null,null,null);const Gc=Jc.exports,Yc={name:"DtPopover",components:{SrOnlyCloseButton:ml,DtLazyShow:I.DtLazyShow,PopoverHeaderFooter:Gc,Portal:ss},mixins:[yl,pl],props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:"div"},transition:{type:String,default:"fade"},role:{type:String,default:"dialog",validator:n=>Sl.includes(n)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},closeButtonProps:{type:Object,default:()=>({})},padding:{type:String,default:"large",validator:n=>Object.keys(Ni).some(e=>e===n)},contentClass:{type:[String,Array,Object],default:""},contentWidth:{type:String,default:"",validator:n=>Ol.includes(n)},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:""},id:{type:String,default(){return I.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},hideOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom-end"},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:n=>Tl.includes(n)},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},showCloseButton:{type:Boolean,default:!1},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""},dialogClass:{type:[String,Array,Object],default:""},initialFocusElement:{type:[String,HTMLElement],default:"first",validator:n=>xl.includes(n)||n instanceof HTMLElement||n.startsWith("#")},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[HTMLElement,String],default:"body",validator:n=>El.includes(n)||n instanceof HTMLElement},hovercard:{type:Boolean,default:!1},timer:{type:[Object,null],default:null,validator:n=>n===null||n.enter&&n.leave&&Object.keys(n).includes("current")}},emits:["opened","update:open"],data(){return{POPOVER_PADDING_CLASSES:Ni,POPOVER_HEADER_FOOTER_PADDING_CLASSES:kl,intersectionObserver:null,isOutsideViewport:!1,isOpen:!1,anchorEl:null,popoverContentEl:null,inTimer:null,outTimer:null}},computed:{popoverListeners(){return{...this.$listeners,keydown:n=>{this.onKeydown(n),this.$emit("keydown",n)},"after-leave":n=>{this.onLeaveTransitionComplete()},"after-enter":n=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?"calc(100vh - var(--dt-space-300))":this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&I.getUniqueString("DtPopover__anchor")},currentHovercard(){var n;return(n=this.timer)==null?void 0:n.current.value}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(n){var e;(e=this.tip)==null||e.setProps({zIndex:n?650:this.calculateAnchorZindex()})},offset(n){var e;(e=this.tip)==null||e.setProps({offset:n})},sticky(n){var e;(e=this.tip)==null||e.setProps({sticky:n})},fallbackPlacements(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},tether(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},placement(n){var e;(e=this.tip)==null||e.setProps({placement:n})},open:{handler:function(n){n!==null&&(this.isOpen=n)},immediate:!0},isOpen(n,e){n?(this.initTippyInstance(),this.tip.show()):!n&&e!==n&&(this.removeEventListeners(),this.tip.hide())},currentHovercard(){this.hovercard&&this.timer&&(this.currentHovercard===this.id?this.isOpen=!0:this.isOpen=!1)}},mounted(){const n=this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null;this.anchorEl=n??this.$refs.anchor.children[0],this.popoverContentEl=this.$refs.content.$el,this.isOpen&&(this.initTippyInstance(),this.tip.show()),this.intersectionObserver=new IntersectionObserver(this.hasIntersectedViewport),this.intersectionObserver.observe(this.popoverContentEl)},beforeDestroy(){var n;(n=this.tip)==null||n.destroy(),this.intersectionObserver.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{hasIntersectedViewport(n){var r;const e=(r=n==null?void 0:n[0])==null?void 0:r.target;if(!e)return;const t=I.isOutOfViewPort(e);this.isOutsideViewport=t.bottom||t.top},popperOptions(){return I.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement==="none"&&console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement')},calculateAnchorZindex(){var n;return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||(n=this.anchorEl)!=null&&n.closest(".d-zi-drawer")?650:300},defaultToggleOpen(n){var e,t;this.hovercard||this.openOnContext||(this.open??((e=this.anchorEl)!=null&&e.contains(n.target)&&!((t=this.anchorEl)!=null&&t.disabled)&&this.toggleOpen()))},async onContext(n){this.openOnContext&&(n.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip.setProps({placement:"right-start",getReferenceClientRect:()=>({width:0,height:0,top:n.clientY,bottom:n.clientY,left:n.clientX,right:n.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(n){var e;this.open===null&&this.openWithArrowKeys&&(e=this.anchorEl)!=null&&e.contains(n.target)&&(this.isOpen||(this.isOpen=!0))},addEventListeners(){window.addEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.addEventListener("resize",this.onResize)},removeEventListeners(){window.removeEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.removeEventListener("resize",this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){var n;if(this.modal){const e=(n=this.anchorEl)==null?void 0:n.closest("body, .tippy-box");e.tagName.toLowerCase()==="body"?(e.classList.add("d-of-hidden"),this.tip.setProps({offset:this.offset})):e.classList.add("d-zi-popover")}},enableScrolling(){var e,t;const n=(e=this.anchorEl)==null?void 0:e.closest("body, .tippy-box");n&&(((t=n.tagName)==null?void 0:t.toLowerCase())==="body"?(n.classList.remove("d-of-hidden"),this.tip.setProps({offset:this.offset})):n.classList.remove("d-zi-popover"))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth==="anchor"&&await this.setPopoverContentAnchorWidth(),this.contentWidth===null&&(this.popoverContentEl.style.width="auto"),this.addEventListeners()},async onLeaveTransitionComplete(){var n;this.modal&&(await this.focusFirstElement(this.$refs.anchor),await this.$nextTick(),this.enableScrolling()),(n=this.tip)==null||n.unmount(),this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},async onEnterTransitionComplete(){this.focusInitialElement(),await this.$nextTick(),this.preventScrolling(),this.$emit("opened",!0,this.$refs.popover__content),this.open!==null&&this.$emit("update:open",!0)},focusInitialElement(){this.initialFocusElement==="dialog"&&this.$refs.content.$el.focus(),this.initialFocusElement.startsWith("#")&&this.focusInitialElementById(),this.initialFocusElement==="first"&&this.focusFirstElementIfNeeded(this.$refs.popover__content),this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()},focusInitialElementById(){var e,t,r;const n=(t=(e=this.$refs.content)==null?void 0:e.$el)==null?void 0:t.querySelector(this.initialFocusElement);n?n.focus():console.warn('Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.'),n?n.focus():(r=this.$refs.content)==null||r.$el.focus()},onResize(){this.closePopover()},onClickOutside(){if(!this.hideOnClick)return;this.popoverContentEl.querySelector(".d-popover__anchor--opened")||this.closePopover()},onKeydown(n){n.key==="Tab"&&this.modal&&this.focusTrappedTabPress(n,this.popoverContentEl),n.key==="Escape"&&this.closePopover()},async setPopoverContentAnchorWidth(){var n;await this.$nextTick(),this.popoverContentEl.style.width=`${(n=this.anchorEl)==null?void 0:n.clientWidth}px`},focusFirstElementIfNeeded(n){var t,r;this._getFocusableElements(n,!0).length!==0?this.focusFirstElement(n):this.showCloseButton?(t=this.$refs.popover__header)==null||t.focusCloseButton():(r=this.$refs.content)==null||r.$el.focus()},initTippyInstance(){var n,e;this.tip=I.createTippy(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:this.appendTo==="body"?(e=(n=this.anchorEl)==null?void 0:n.getRootNode())==null?void 0:e.querySelector("body"):this.appendTo,interactive:!0,trigger:"manual",hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})},setInTimer(){this.inTimer=setTimeout(()=>{this.isOpen=!0},I.TOOLTIP_DELAY_MS)},setOutTimer(){this.outTimer=setTimeout(()=>{this.isOpen=!1},I.TOOLTIP_DELAY_MS)},onEnterAnchor(){this.hovercard&&(this.timer?this.timer.enter(this.id):(clearTimeout(this.outTimer),this.setInTimer()))},onLeaveAnchor(){this.hovercard&&(this.timer?this.timer.leave():(clearTimeout(this.inTimer),this.setOutTimer()))},onEnterContent(){this.hovercard&&(this.timer?this.timer.enter(this.id):clearTimeout(this.outTimer))},onLeaveContent(){this.hovercard&&(this.timer?this.timer.leave():this.setOutTimer())}}};var Xc=function(){var e=this,t=e._self._c;return t("div",[e.modal&&e.isOpen?t("portal",[t("div",{staticClass:"d-modal--transparent",attrs:{"aria-hidden":e.modal&&e.isOpen?"false":"true"},on:{click:function(r){r.preventDefault(),r.stopPropagation()}}})]):e._e(),t(e.elementType,e._g({ref:"popover",tag:"component",class:["d-popover",{"d-popover__anchor--opened":e.isOpen}],attrs:{"data-qa":"dt-popover-container"}},e.$listeners),[t("div",{ref:"anchor",attrs:{id:!e.ariaLabelledby&&e.labelledBy,"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-anchor`:"dt-popover-anchor",tabindex:e.openOnContext?0:void 0},on:{"!click":function(r){return e.defaultToggleOpen.apply(null,arguments)},contextmenu:e.onContext,keydown:[function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"up",38,r.key,["Up","ArrowUp"])?null:(r.preventDefault(),e.onArrowKeyPress.apply(null,arguments))},function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"down",40,r.key,["Down","ArrowDown"])?null:(r.preventDefault(),e.onArrowKeyPress.apply(null,arguments))}],"!keydown":function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"escape",void 0,r.key,void 0)?null:e.closePopover.apply(null,arguments)},mouseenter:e.onEnterAnchor,mouseleave:e.onLeaveAnchor}},[e._t("anchor",null,{attrs:{"aria-expanded":e.isOpen.toString(),"aria-controls":e.id,"aria-haspopup":e.role}})],2),t("dt-lazy-show",e._g({ref:"content",class:["d-popover__dialog",{"d-popover__dialog--modal":e.modal},e.dialogClass],style:{"max-height":e.calculatedMaxHeight,"max-width":e.maxWidth},attrs:{id:e.id,role:e.role,"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}__dialog`:"dt-popover","aria-hidden":`${!e.isOpen}`,"aria-labelledby":e.labelledBy,"aria-label":e.ariaLabel,"aria-modal":`${!e.modal}`,transition:e.transition,show:e.isOpen,tabindex:e.contentTabindex,appear:""},on:{mouseenter:e.onEnterContent,mouseleave:e.onLeaveContent}},e.popoverListeners),[e.$slots.headerContent||e.showCloseButton?t("popover-header-footer",{ref:"popover__header",class:e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding],attrs:{"content-class":e.headerClass,type:"header","show-close-button":e.showCloseButton,"close-button-props":e.closeButtonProps},on:{close:e.closePopover},scopedSlots:e._u([{key:"content",fn:function(){return[e._t("headerContent",null,{close:e.closePopover})]},proxy:!0}],null,!0)}):e._e(),t("div",{ref:"popover__content",class:["d-popover__content",e.POPOVER_PADDING_CLASSES[e.padding],e.contentClass],attrs:{"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-content`:"dt-popover-content"}},[e._t("content",null,{close:e.closePopover})],2),e.$slots.footerContent?t("popover-header-footer",{ref:"popover__footer",class:e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding],attrs:{type:"footer","content-class":e.footerClass},scopedSlots:e._u([{key:"content",fn:function(){return[e._t("footerContent",null,{close:e.closePopover})]},proxy:!0}],null,!0)}):e._e(),e.showVisuallyHiddenClose?t("sr-only-close-button",{attrs:{"visually-hidden-close-label":e.visuallyHiddenCloseLabel},on:{close:e.closePopover}}):e._e()],1)],1)],1)},Qc=[],Zc=I.normalizeComponent(Yc,Xc,Qc,!1,null,null,null,null);const eu=Zc.exports;function _s(n){return n===Ye.default}function Ls(n){if(Yt(n)==="string")return _s(n)?null:Ye[n];if(Yt(n)==="object"){const{default:e}=n;return _s(e)?null:Ye[e]}else return null}function Yt(n){return typeof n}function tu(n){return Ls(n)?`d-stack--${Ye[Ls(n)]}`:null}function nu(n){return Yt(n)==="object"?[...is.map(e=>n[e]?`d-stack--${e}--${n[e]}`:null)]:null}function ru(n){return gr.includes(n)?`d-stack--gap-${n}`:null}function iu(n){if(Yt(n)==="string")return Object.keys(Ye).includes(n);if(Yt(n)==="object"){const{default:e}=n;return Object.keys(Ye).includes(e)}else return null}function su(n){return gr.includes(n)}const ou={name:"DtStack",props:{direction:{type:[String,Object],default:"column",validator:n=>iu(n)},as:{type:String,default:"div"},gap:{type:String,default:"0",validator:n=>su(n)}},data(){return{DT_STACK_DIRECTION:Ye,DT_STACK_GAP:gr,DT_STACK_RESPONSIVE_BREAKPOINTS:is}},computed:{stackGap(){return ru(this.gap)},defaultDirection(){return tu(this.direction)},stackResponsive(){return nu(this.direction)}}};var lu=function(){var e=this,t=e._self._c;return t(e.as,{tag:"component",class:["d-stack",e.defaultDirection,e.stackResponsive,e.stackGap]},[e._t("default")],2)},au=[],cu=I.normalizeComponent(ou,lu,au,!1,null,null,null,null);const ls=cu.exports;function V(n){this.content=n}V.prototype={constructor:V,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),s=r.content.slice();return i==-1?s.push(t||n,e):(s[i+1]=e,t&&(s[i]=t)),new V(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new V(t)},addToStart:function(n,e){return new V([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new V(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),s=r.find(n);return i.splice(s==-1?i.length:s,0,e,t),new V(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=V.from(n),n.size?new V(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=V.from(n),n.size?new V(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=V.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};V.from=function(n){if(n instanceof V)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new V(e)};function Cl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Cl(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Ml(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Ml(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,s){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(s+=l.text.slice(Math.max(e,a)-a,t-a),o=!r):l.isLeaf?(i?s+=typeof i=="function"?i(l):i:l.type.spec.leafText&&(s+=l.type.spec.leafText(l)),o=!r):!o&&l.isBlock&&(s+=r,o=!0)},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new b(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new b(r,i)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new b(i,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Cl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Ml(this,e,t,r)}findIndex(e,t=-1){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=e)return o==e||t>0?fn(r+1,o):fn(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(t||(t=e.slice(0,i)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const ti={index:0,offset:0};function fn(n,e){return ti.index=n,ti.offset=e,ti}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class Pi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pi.none;if(e instanceof Pi)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};_.none=[];class wn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Al(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(wl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(b.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new S(e,r,i)}}S.empty=new S(b.empty,0,0);function wl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(wl(s.content,e-i-1,t-i-1)))}function Al(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Al(o.content,e-s-1,t);return l&&n.replaceChild(i,o.copy(l))}function uu(n,e,t){if(t.openStart>n.depth)throw new wn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new wn("Inconsistent open depths");return Nl(n,e,t,0)}function Nl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let o=Nl(n,e,t,r+1);return s.copy(s.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return at(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=du(t,n);return at(s,Il(n,o,l,e,r))}else return at(s,An(n,e,r))}function Pl(n,e){if(!e.type.compatibleContent(n.type))throw new wn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ii(n,e,t){let r=n.node(t);return Pl(r,e.node(t)),r}function lt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function jt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(lt(n.nodeAfter,r),s++));for(let l=s;l<o;l++)lt(i.child(l),r);e&&e.depth==t&&e.textOffset&&lt(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function Il(n,e,t,r,i){let s=n.depth>i&&Ii(n,e,i+1),o=r.depth>i&&Ii(t,r,i+1),l=[];return jt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(Pl(s,o),lt(at(s,Il(n,e,t,r,i+1)),l)):(s&&lt(at(s,An(n,e,i+1)),l),jt(e,t,i,l),o&&lt(at(o,An(t,r,i+1)),l)),jt(r,null,i,l),new b(l)}function An(n,e,t){let r=[];if(jt(null,n,t,r),n.depth>t){let i=Ii(n,e,t+1);lt(at(i,An(n,e,t+1)),r)}return jt(e,null,t,r),new b(r)}function du(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Xt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Nn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Xt(t,r,s)}static resolveCached(e,t){for(let i=0;i<ni.length;i++){let s=ni[i];if(s.pos==t&&s.doc==e)return s}let r=ni[ri]=Xt.resolve(e,t);return ri=(ri+1)%fu,r}}let ni=[],ri=0,fu=12;class Nn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const hu=Object.create(null);let ct=class Di{constructor(e,t,r,i=_.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||b.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||hu)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Di(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Di(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),s=this.resolve(t),o=r?0:i.sharedDepth(t),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new S(c,i.depth-o,s.depth-o)}replace(e,t,r){return uu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Xt.resolveCached(this,e)}resolveNoCache(e){return Xt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=_.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=b.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};ct.prototype.text=void 0;class Pn extends ct{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Pn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Pn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ft{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new pu(e,t);if(r.next==null)return ft.empty;let i=Rl(r);r.next&&r.err("Unexpected trailing text");let s=Ou(Su(i));return xu(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let s=t;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return b.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
1
+ "use strict";const I=require("./tooltip-6msmWvq0.cjs"),be=require("vue"),G=require("./index-npEAeBD7.cjs"),xt={BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ol=[xt.BUSY,xt.AWAY,xt.OFFLINE,xt.ACTIVE],uc={name:"DtPresence",props:{presence:{type:String,default:xt.ACTIVE,validator:n=>ol.includes(n)},srText:{type:String,default:null}}};var dc=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-presence",attrs:{"data-qa":"dt-presence",role:"status","aria-live":e.$attrs.ariaLive||"off"}},[e.srText?t("span",{staticClass:"sr-only",attrs:{"data-qa":"dt-presence-sr-text"}},[e._v(e._s(e.srText)+" ")]):e._e(),t("div",{staticClass:"d-presence__inner",class:{"d-presence__inner--active":e.presence==="active","d-presence__inner--away":e.presence==="away","d-presence__inner--busy":e.presence==="busy","d-presence__inner--offline":e.presence==="offline"}})])},fc=[],hc=I.normalizeComponent(uc,dc,fc,!1,null,null,null,null);const ll=hc.exports,Sn={xs:"d-avatar--xs",sm:"d-avatar--sm",md:"d-avatar--md",lg:"d-avatar--lg",xl:"d-avatar--xl"},al={default:"",icon:"d-avatar__icon",initials:"d-avatar__initials"},cl={md:"d-avatar__presence--md",lg:"d-avatar__presence--lg"},Mi={NONE:"",BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ul={xs:"100",sm:"200",md:"300",lg:"500",xl:"600"},dl=["100","200","300","400","500","600","700","800","900","1000","1100","1200","1300","1400","1500","1600","1700","1800"],wi=n=>n>1;function pc(){return[void 0,...G.iconNames]}const mc=n=>{if(typeof n!="string"||!n.trim())return"";const e=n.trim().split(/\s+/g);return e.length===1?e.join("").substring(0,2):e.filter((t,r)=>r===0||r===e.length-1).map(t=>t.slice(0,1).toUpperCase()).join("")},gc=pc(),yc={name:"DtAvatar",components:{DtPresence:ll,DtIcon:G.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return I.getUniqueString()}},seed:{type:String,default:void 0},color:{type:String,default:void 0},size:{type:String,default:"md",validator:n=>Object.keys(Sn).includes(n)},avatarClass:{type:[String,Array,Object],default:""},canvasClass:{type:[String,Array,Object],default:""},iconClass:{type:[String,Array,Object],default:""},presence:{type:String,default:Mi.NONE,validator:n=>Object.values(Mi).includes(n)},presenceProps:{type:Object,default:()=>({})},group:{type:Number,default:void 0,validator:n=>wi(n)},overlayIcon:{type:String,default:""},overlayText:{type:String,default:""},overlayClass:{type:[String,Array,Object],default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:""},iconName:{type:String,default:void 0,validator:n=>gc.includes(n)},iconSize:{type:String,default:"",validator:n=>!n||Object.keys(G.ICON_SIZE_MODIFIERS).includes(n)},fullName:{type:String,default:""},clickable:{type:Boolean,default:!1}},emits:["click"],data(){return{AVATAR_SIZE_MODIFIERS:Sn,AVATAR_KIND_MODIFIERS:al,AVATAR_PRESENCE_SIZE_MODIFIERS:cl,AVATAR_ICON_SIZES:ul,imageLoadedSuccessfully:null,formattedInitials:"",initializing:!1}},computed:{isNotIconType(){return!this.iconName},avatarClasses(){return["d-avatar",Sn[this.validatedSize],this.avatarClass,{"d-avatar--group":this.showGroup,[`d-avatar--color-${this.getColor()}`]:this.isNotIconType,"d-avatar--clickable":this.clickable}]},overlayClasses(){return["d-avatar__overlay",this.overlayClass]},showGroup(){return wi(this.group)},formattedGroup(){return this.group>99?"99+":this.group},validatedSize(){return this.group?"xs":this.size},showImage(){return this.imageLoadedSuccessfully!==!1&&this.imageSrc},buttonAriaLabel(){if(this.clickable)return this.fullName||this.imageAlt||this.$attrs["aria-label"]}},watch:{fullName:{immediate:!0,handler(){this.formatInitials()}},size:{immediate:!0,handler(){this.formatInitials()}},group:{immediate:!0,handler(){this.formatInitials()}},imageSrc(n){this.imageLoadedSuccessfully=null,n&&(this.validateProps(),this.setImageListeners())}},mounted(){this.validateProps(),this.setImageListeners()},methods:{async setImageListeners(){await this.$nextTick();const n=this.$refs.avatarImage;n&&(n.addEventListener("load",()=>this._loadedImageEventHandler(n),{once:!0}),n.addEventListener("error",()=>this._erroredImageEventHandler(n),{once:!0}))},formatInitials(){const n=mc(this.fullName);this.validatedSize==="xs"?this.formattedInitials="":this.validatedSize==="sm"?this.formattedInitials=n[0]:this.formattedInitials=n},getColor(){return this.color??I.getRandomElement(dl,this.seed)},_loadedImageEventHandler(n){this.imageLoadedSuccessfully=!0,n.classList.remove("d-d-none")},_erroredImageEventHandler(n){this.imageLoadedSuccessfully=!1,n.classList.add("d-d-none")},validateProps(){if(this.imageSrc&&!(this.fullName||this.imageAlt))throw new Error("full-name or image-alt must be set if image-src is provided")},handleClick(n){this.clickable&&this.$emit("click",n)}}};var bc=function(){var e=this,t=e._self._c;return t(e.clickable?"button":"div",{tag:"component",class:e.avatarClasses,attrs:{id:e.id,"data-qa":"dt-avatar","aria-label":e.buttonAriaLabel},on:{click:e.handleClick}},[t("div",{ref:"canvas",class:[e.canvasClass,"d-avatar__canvas",{"d-avatar--image-loaded":e.imageLoadedSuccessfully}]},[e.showImage?t("img",{ref:"avatarImage",staticClass:"d-avatar__image",attrs:{"data-qa":"dt-avatar-image",src:e.imageSrc,alt:e.imageAlt||e.fullName}}):e.iconName?t("dt-icon",{class:[e.iconClass,e.AVATAR_KIND_MODIFIERS.icon],attrs:{name:e.iconName,size:e.iconSize||e.AVATAR_ICON_SIZES[e.size],"data-qa":"dt-avatar-icon"}}):t("span",{class:[e.AVATAR_KIND_MODIFIERS.initials]},[e._v(" "+e._s(e.formattedInitials)+" ")])],1),e.overlayIcon||e.overlayText?t("div",{class:e.overlayClasses},[e.overlayIcon?t("dt-icon",{staticClass:"d-avatar__overlay-icon",attrs:{name:e.overlayIcon}}):e.overlayText?t("p",{staticClass:"d-avatar__overlay-text"},[e._v(" "+e._s(e.overlayText)+" ")]):e._e()],1):e._e(),e.showGroup?t("span",{staticClass:"d-avatar__count",attrs:{"data-qa":"dt-avatar-count"}},[e._v(e._s(e.formattedGroup))]):e._e(),e.presence&&!e.showGroup?t("dt-presence",e._b({class:["d-avatar__presence",e.AVATAR_PRESENCE_SIZE_MODIFIERS[e.size]],attrs:{presence:e.presence,"data-qa":"dt-presence"}},"dt-presence",e.presenceProps,!1)):e._e()],1)},kc=[],Sc=I.normalizeComponent(yc,bc,kc,!1,null,null,null,null);const fl=Sc.exports,Oc={name:"DtLink",props:{kind:{type:String,default:"",validator(n){return G.LINK_VARIANTS.includes(n)}}},emits:["click","focusin","focusout"],data(){return{LINK_KIND_MODIFIERS:G.LINK_KIND_MODIFIERS}}};var xc=function(){var e=this,t=e._self._c;return t("a",e._g({class:["d-link",e.LINK_KIND_MODIFIERS[e.kind]],attrs:{"data-qa":"dt-link",href:"href"in e.$attrs?e.$attrs.href:"javascript:void(0)"}},e.$listeners),[e._t("default")],2)},Ec=[],Tc=I.normalizeComponent(Oc,xc,Ec,!1,null,null,null,null);const hl=Tc.exports,pl={props:{visuallyHiddenClose:{type:Boolean,default:!1},visuallyHiddenCloseLabel:{type:String,default:null}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateVisuallyHiddenCloseProps()}}},computed:{showVisuallyHiddenClose(){return this.visuallyHiddenClose&&this.visuallyHiddenCloseLabel!=null}},methods:{validateVisuallyHiddenCloseProps(){this.visuallyHiddenClose&&!this.visuallyHiddenCloseLabel&&console.error(`If visuallyHiddenClose prop is true, the component includes
2
+ a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`)}}},vc={name:"SrOnlyCloseButton",components:{DtIcon:G.DtIcon,DtButton:G.DtButton},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};var Cc=function(){var e=this,t=e._self._c;return t("dt-button",{staticClass:"d-vi-visible-sr",attrs:{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button","aria-label":e.visuallyHiddenCloseLabel},on:{click:e.close,keydown:function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"space",32,r.key,[" ","Spacebar"])?null:(r.preventDefault(),r.stopPropagation(),e.close.apply(null,arguments))}}},[t("dt-icon",{attrs:{name:"close"}})],1)},Mc=[],wc=I.normalizeComponent(vc,Cc,Mc,!1,null,null,null,null);const ml=wc.exports,gl=':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])',Ac=`${gl}:not([tabindex="-1"])`,Nc="button,[href],input,select,textarea,details,[tabindex]",yl={methods:{async getFirstFocusableElement(n){await this.$nextTick();const e=this._getFocusableElements(n,!0);return this._getFirstFocusElement(e)},async focusFirstElement(n=this.$el){const e=await this.getFirstFocusableElement(n);e==null||e.focus({preventScroll:!0})},async focusElementById(n){var t;await this.$nextTick();const e=(t=this.$el)==null?void 0:t.querySelector(n);if(e){e.focus();return}console.warn('Could not find the element specified in dt-modal prop "initialFocusElement". Defaulting to focusing the first element.'),await this.focusFirstElement()},_getFirstFocusElement(n){if(!n.length)return;let e=n[0];return e.matches('[type="radio"]:not(:checked)')&&(e=n.find(t=>t.checked&&t.name===e.name)||e),e},_getFocusableElements(n=this.$el,e=!1){return n?[...n.querySelectorAll(Nc)].filter(r=>{const i=window.getComputedStyle(r);return i.getPropertyValue("display")!=="none"&&i.getPropertyValue("visibility")!=="hidden"&&r.matches(e?gl:Ac)}):[]},focusTrappedTabPress(n,e){if(!(n.key==="Tab"))return;const r=this._getFocusableElements(e);if(!r.length){n.preventDefault();return}const i=this._getFirstFocusElement(r),s=r[r.length-1];n.shiftKey?document.activeElement===i&&(s.focus(),n.preventDefault()):document.activeElement===s&&(i.focus(),n.preventDefault())}}},On={DEFAULT:"default",CUSTOM:"custom"},$t={ARROW_KEYS:"arrow-keys",TAB:"tab",NONE:"none"},Pc={name:"DtItemLayout",props:{as:{type:String,default:"div"}}};var Ic=function(){var e=this,t=e._self._c;return t(e.as,{tag:"component",staticClass:"dt-item-layout"},[e.$slots.left?t("section",{staticClass:"dt-item-layout--left",attrs:{"data-qa":"dt-item-layout-left-wrapper"}},[e._t("left")],2):e._e(),t("section",{staticClass:"dt-item-layout--content",attrs:{"data-qa":"dt-item-layout-content-wrapper"}},[e.$slots.default?t("div",{staticClass:"dt-item-layout--title",attrs:{"data-qa":"dt-item-layout-title-wrapper"}},[e._t("default")],2):e._e(),e.$slots.subtitle?t("div",{class:["dt-item-layout--subtitle",{"dt-item-layout--subtitle--with-title":e.$slots.default}],attrs:{"data-qa":"dt-item-layout-subtitle-wrapper"}},[e._t("subtitle")],2):e._e(),e.$slots.bottom?t("div",{staticClass:"dt-item-layout--bottom",attrs:{"data-qa":"dt-item-layout-bottom-wrapper"}},[e._t("bottom")],2):e._e()]),e.$slots.right?t("section",{staticClass:"dt-item-layout--right",attrs:{"data-qa":"dt-item-layout-right-wrapper"}},[e._t("right")],2):e._e(),e.$slots.selected?t("section",{staticClass:"dt-item-layout--selected",attrs:{"data-qa":"dt-item-layout-selected-wrapper"}},[e._t("selected")],2):e._e()])},Dc=[],Rc=I.normalizeComponent(Pc,Ic,Dc,!1,null,"411cb81e",null,null);const Ai=Rc.exports,_c={name:"DtListItem",components:{DtItemLayout:Ai,DtIcon:G.DtIcon},inject:{highlightId:{default:null}},props:{id:{type:String,default(){return I.utils.getUniqueString()}},role:{type:String,default:"listitem"},elementType:{type:String,default:"li"},type:{type:String,default:On.DEFAULT,validator:n=>Object.values(On).includes(n)},navigationType:{type:String,default:$t.NONE,validator:n=>Object.values($t).includes(n)},selected:{type:Boolean,default:!1}},emits:["click","keydown","mousemove","mouseleave"],data(){return{injected:!1,mouseHighlighted:!1}},computed:{listItemType(){switch(this.type){case On.DEFAULT:return Ai;default:return null}},listItemListeners(){return{...this.$listeners,keydown:n=>{["enter","space"].includes(n.code.toLowerCase())&&this.onClick(n),this.$emit("keydown",n)},mousemove:n=>{this.onMouseHover(n),this.$emit("mousemove",n)},mouseleave:n=>{this.onMouseLeave(n),this.$emit("mouseleave",n)}}},isHighlighted(){return this.isHoverable?this.highlightId&&this.highlightId()?this.id===this.highlightId():this.mouseHighlighted:!1},isFocusable(){return this.navigationType===$t.TAB},isHoverable(){return this.navigationType!==$t.NONE}},methods:{onClick(n){this.$emit("click",n)},onMouseHover(){this.mouseHighlighted=!0},onMouseLeave(){this.mouseHighlighted=!1}}};var Lc=function(){var e=this,t=e._self._c;return t(e.elementType,e._g({tag:"component",class:["dt-list-item",{"dt-list-item--focusable":e.isFocusable,"dt-list-item--highlighted":e.isHighlighted,"dt-list-item--static":!e.isHoverable}],attrs:{id:e.id,tabindex:e.isFocusable?0:-1,role:e.role,"aria-selected":e.isHighlighted}},e.listItemListeners),[e.listItemType?t(e.listItemType,{tag:"component",scopedSlots:e._u([e._l(e.$slots,function(r,i){return{key:i,fn:function(){return[e._t(i)]},proxy:!0}}),e.selected?{key:"selected",fn:function(){return[t("dt-icon",{staticClass:"dt-list-item--selected-icon",attrs:{name:"check",size:"400"}})]},proxy:!0}:null],null,!0)}):e._t("default")],2)},Bc=[],$c=I.normalizeComponent(_c,Lc,Bc,!1,null,null,null,null);const bl=$c.exports,Ye={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},is=["sm","md","lg","xl"],gr=["0","100","200","300","400","450","500","600"],Ni={none:void 0,small:"d-p4",medium:"d-p8",large:"d-p16"},kl={none:void 0,small:"d-pl4",medium:"d-pl8",large:"d-pl16"},Sl=["dialog","menu","listbox","tree","grid"],Ol=["","anchor"],xl=["none","dialog","first"],El=["parent","body"],Tl=[...I.TIPPY_STICKY_VALUES],Fc=[...I.BASE_TIPPY_DIRECTIONS];let zc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Hc=(n=21)=>{let e="",t=n;for(;t--;)e+=zc[Math.random()*64|0];return e};function xn(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?xn=function(e){return typeof e}:xn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(n)}var vl={selector:"vue-portal-target-".concat(Hc())},jc=function(e){return vl.selector=e},ei=typeof window<"u"&&(typeof document>"u"?"undefined":xn(document))!==void 0,Vc=be.extend({abstract:!0,name:"PortalOutlet",props:["nodes","tag"],data:function(e){return{updatedNodes:e.nodes}},render:function(e){var t=this.updatedNodes&&this.updatedNodes();return t?t.length===1&&!t[0].text?t:e(this.tag||"DIV",t):e()},destroyed:function(){var e=this.$el;e&&e.parentNode.removeChild(e)}}),ss=be.extend({name:"VueSimplePortal",props:{disabled:{type:Boolean},prepend:{type:Boolean},selector:{type:String,default:function(){return"#".concat(vl.selector)}},tag:{type:String,default:"DIV"}},render:function(e){if(this.disabled){var t=this.$scopedSlots&&this.$scopedSlots.default();return t?t.length<2&&!t[0].text?t:e(this.tag,t):e()}return e()},created:function(){this.getTargetEl()||this.insertTargetEl()},updated:function(){var e=this;this.$nextTick(function(){!e.disabled&&e.slotFn!==e.$scopedSlots.default&&(e.container.updatedNodes=e.$scopedSlots.default),e.slotFn=e.$scopedSlots.default})},beforeDestroy:function(){this.unmount()},watch:{disabled:{immediate:!0,handler:function(e){e?this.unmount():this.$nextTick(this.mount)}}},methods:{getTargetEl:function(){if(ei)return document.querySelector(this.selector)},insertTargetEl:function(){if(ei){var e=document.querySelector("body"),t=document.createElement(this.tag);t.id=this.selector.substring(1),e.appendChild(t)}},mount:function(){if(ei){var e=this.getTargetEl(),t=document.createElement("DIV");this.prepend&&e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t),this.container=new Vc({el:t,parent:this,propsData:{tag:this.tag,nodes:this.$scopedSlots.default}})}},unmount:function(){this.container&&(this.container.$destroy(),delete this.container)}}});function qc(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n.component(e.name||"portal",ss),e.defaultSelector&&jc(e.defaultSelector)}typeof window<"u"&&window.Vue&&window.Vue===be&&be.use(qc);const Kc={name:"PopoverHeaderFooter",components:{DtButton:G.DtButton,DtIcon:G.DtIcon},props:{type:{type:String,validator:function(n){return["header","footer"].includes(n)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>{}}},emits:["close"],methods:{focusCloseButton(){var e;const n=(e=this.$refs["popover__close-button"])==null?void 0:e.$el;n==null||n.focus()}}};var Wc=function(){var e=this,t=e._self._c;return t("div",{class:{"d-popover__header":e.type==="header","d-popover__footer":e.type==="footer"},attrs:{"data-qa":"dt-popover-header-footer"}},[e.$slots.content?t("div",{class:[{"d-popover__header__content":e.type==="header","d-popover__footer__content":e.type==="footer"},e.contentClass],attrs:{"data-qa":"dt-popover-header-footer-content"}},[e._t("content")],2):e._e(),e.showCloseButton?t("dt-button",e._b({ref:"popover__close-button",class:{"d-popover__header__close-button":e.type==="header","d-popover__footer__close-button":e.type==="footer"},attrs:{"data-qa":"dt-popover-close",importance:"outlined",kind:"muted",circle:""},on:{click:function(r){return e.$emit("close")}},scopedSlots:e._u([{key:"icon",fn:function(){return[t("dt-icon",{attrs:{name:"close",size:"300"}})]},proxy:!0}],null,!1,2538694920)},"dt-button",e.closeButtonProps,!1)):e._e()],1)},Uc=[],Jc=I.normalizeComponent(Kc,Wc,Uc,!1,null,null,null,null);const Gc=Jc.exports,Yc={name:"DtPopover",components:{SrOnlyCloseButton:ml,DtLazyShow:I.DtLazyShow,PopoverHeaderFooter:Gc,Portal:ss},mixins:[yl,pl],props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:"div"},transition:{type:String,default:"fade"},role:{type:String,default:"dialog",validator:n=>Sl.includes(n)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},closeButtonProps:{type:Object,default:()=>({})},padding:{type:String,default:"large",validator:n=>Object.keys(Ni).some(e=>e===n)},contentClass:{type:[String,Array,Object],default:""},contentWidth:{type:String,default:"",validator:n=>Ol.includes(n)},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:""},id:{type:String,default(){return I.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},hideOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom-end"},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:n=>Tl.includes(n)},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},showCloseButton:{type:Boolean,default:!1},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""},dialogClass:{type:[String,Array,Object],default:""},initialFocusElement:{type:[String,HTMLElement],default:"first",validator:n=>xl.includes(n)||n instanceof HTMLElement||n.startsWith("#")},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[HTMLElement,String],default:"body",validator:n=>El.includes(n)||n instanceof HTMLElement},hovercard:{type:Boolean,default:!1},timer:{type:[Object,null],default:null,validator:n=>n===null||n.enter&&n.leave&&Object.keys(n).includes("current")}},emits:["opened","update:open"],data(){return{POPOVER_PADDING_CLASSES:Ni,POPOVER_HEADER_FOOTER_PADDING_CLASSES:kl,intersectionObserver:null,isOutsideViewport:!1,isOpen:!1,anchorEl:null,popoverContentEl:null,inTimer:null,outTimer:null}},computed:{popoverListeners(){return{...this.$listeners,keydown:n=>{this.onKeydown(n),this.$emit("keydown",n)},"after-leave":n=>{this.onLeaveTransitionComplete()},"after-enter":n=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?"calc(100vh - var(--dt-space-300))":this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&I.getUniqueString("DtPopover__anchor")},currentHovercard(){var n;return(n=this.timer)==null?void 0:n.current.value}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(n){var e;(e=this.tip)==null||e.setProps({zIndex:n?650:this.calculateAnchorZindex()})},offset(n){var e;(e=this.tip)==null||e.setProps({offset:n})},sticky(n){var e;(e=this.tip)==null||e.setProps({sticky:n})},fallbackPlacements(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},tether(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},placement(n){var e;(e=this.tip)==null||e.setProps({placement:n})},open:{handler:function(n){n!==null&&(this.isOpen=n)},immediate:!0},isOpen(n,e){n?(this.initTippyInstance(),this.tip.show()):!n&&e!==n&&(this.removeEventListeners(),this.tip.hide())},currentHovercard(){this.hovercard&&this.timer&&(this.currentHovercard===this.id?this.isOpen=!0:this.isOpen=!1)}},mounted(){const n=this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null;this.anchorEl=n??this.$refs.anchor.children[0],this.popoverContentEl=this.$refs.content.$el,this.isOpen&&(this.initTippyInstance(),this.tip.show()),this.intersectionObserver=new IntersectionObserver(this.hasIntersectedViewport),this.intersectionObserver.observe(this.popoverContentEl)},beforeDestroy(){var n;(n=this.tip)==null||n.destroy(),this.intersectionObserver.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{hasIntersectedViewport(n){var r;const e=(r=n==null?void 0:n[0])==null?void 0:r.target;if(!e)return;const t=I.isOutOfViewPort(e);this.isOutsideViewport=t.bottom||t.top},popperOptions(){return I.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement==="none"&&console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement')},calculateAnchorZindex(){var n;return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||(n=this.anchorEl)!=null&&n.closest(".d-zi-drawer")?650:300},defaultToggleOpen(n){var e,t;this.hovercard||this.openOnContext||(this.open??((e=this.anchorEl)!=null&&e.contains(n.target)&&!((t=this.anchorEl)!=null&&t.disabled)&&this.toggleOpen()))},async onContext(n){this.openOnContext&&(n.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip.setProps({placement:"right-start",getReferenceClientRect:()=>({width:0,height:0,top:n.clientY,bottom:n.clientY,left:n.clientX,right:n.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(n){var e;this.open===null&&this.openWithArrowKeys&&(e=this.anchorEl)!=null&&e.contains(n.target)&&(this.isOpen||(this.isOpen=!0))},addEventListeners(){window.addEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.addEventListener("resize",this.onResize)},removeEventListeners(){window.removeEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.removeEventListener("resize",this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){var n;if(this.modal){const e=(n=this.anchorEl)==null?void 0:n.closest("body, .tippy-box");e.tagName.toLowerCase()==="body"?(e.classList.add("d-of-hidden"),this.tip.setProps({offset:this.offset})):e.classList.add("d-zi-popover")}},enableScrolling(){var e,t;const n=(e=this.anchorEl)==null?void 0:e.closest("body, .tippy-box");n&&(((t=n.tagName)==null?void 0:t.toLowerCase())==="body"?(n.classList.remove("d-of-hidden"),this.tip.setProps({offset:this.offset})):n.classList.remove("d-zi-popover"))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth==="anchor"&&await this.setPopoverContentAnchorWidth(),this.contentWidth===null&&(this.popoverContentEl.style.width="auto"),this.addEventListeners()},async onLeaveTransitionComplete(){var n;this.modal&&(await this.focusFirstElement(this.$refs.anchor),await this.$nextTick(),this.enableScrolling()),(n=this.tip)==null||n.unmount(),this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},async onEnterTransitionComplete(){this.focusInitialElement(),await this.$nextTick(),this.preventScrolling(),this.$emit("opened",!0,this.$refs.popover__content),this.open!==null&&this.$emit("update:open",!0)},focusInitialElement(){this.initialFocusElement==="dialog"&&this.$refs.content.$el.focus(),this.initialFocusElement.startsWith("#")&&this.focusInitialElementById(),this.initialFocusElement==="first"&&this.focusFirstElementIfNeeded(this.$refs.popover__content),this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()},focusInitialElementById(){var e,t,r;const n=(t=(e=this.$refs.content)==null?void 0:e.$el)==null?void 0:t.querySelector(this.initialFocusElement);n?n.focus():console.warn('Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.'),n?n.focus():(r=this.$refs.content)==null||r.$el.focus()},onResize(){this.closePopover()},onClickOutside(){if(!this.hideOnClick)return;this.popoverContentEl.querySelector(".d-popover__anchor--opened")||this.closePopover()},onKeydown(n){n.key==="Tab"&&this.modal&&this.focusTrappedTabPress(n,this.popoverContentEl),n.key==="Escape"&&this.closePopover()},async setPopoverContentAnchorWidth(){var n;await this.$nextTick(),this.popoverContentEl.style.width=`${(n=this.anchorEl)==null?void 0:n.clientWidth}px`},focusFirstElementIfNeeded(n){var t,r;this._getFocusableElements(n,!0).length!==0?this.focusFirstElement(n):this.showCloseButton?(t=this.$refs.popover__header)==null||t.focusCloseButton():(r=this.$refs.content)==null||r.$el.focus()},initTippyInstance(){var n,e;this.tip=I.createTippy(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:this.appendTo==="body"?(e=(n=this.anchorEl)==null?void 0:n.getRootNode())==null?void 0:e.querySelector("body"):this.appendTo,interactive:!0,trigger:"manual",hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})},setInTimer(){this.inTimer=setTimeout(()=>{this.isOpen=!0},I.TOOLTIP_DELAY_MS)},setOutTimer(){this.outTimer=setTimeout(()=>{this.isOpen=!1},I.TOOLTIP_DELAY_MS)},onEnterAnchor(){this.hovercard&&(this.timer?this.timer.enter(this.id):(clearTimeout(this.outTimer),this.setInTimer()))},onLeaveAnchor(){this.hovercard&&(this.timer?this.timer.leave():(clearTimeout(this.inTimer),this.setOutTimer()))},onEnterContent(){this.hovercard&&(this.timer?this.timer.enter(this.id):clearTimeout(this.outTimer))},onLeaveContent(){this.hovercard&&(this.timer?this.timer.leave():this.setOutTimer())}}};var Xc=function(){var e=this,t=e._self._c;return t("div",[e.modal&&e.isOpen?t("portal",[t("div",{staticClass:"d-modal--transparent",attrs:{"aria-hidden":e.modal&&e.isOpen?"false":"true"},on:{click:function(r){r.preventDefault(),r.stopPropagation()}}})]):e._e(),t(e.elementType,e._g({ref:"popover",tag:"component",class:["d-popover",{"d-popover__anchor--opened":e.isOpen}],attrs:{"data-qa":"dt-popover-container"}},e.$listeners),[t("div",{ref:"anchor",attrs:{id:!e.ariaLabelledby&&e.labelledBy,"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-anchor`:"dt-popover-anchor",tabindex:e.openOnContext?0:void 0},on:{"!click":function(r){return e.defaultToggleOpen.apply(null,arguments)},contextmenu:e.onContext,keydown:[function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"up",38,r.key,["Up","ArrowUp"])?null:(r.preventDefault(),e.onArrowKeyPress.apply(null,arguments))},function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"down",40,r.key,["Down","ArrowDown"])?null:(r.preventDefault(),e.onArrowKeyPress.apply(null,arguments))}],"!keydown":function(r){return!r.type.indexOf("key")&&e._k(r.keyCode,"escape",void 0,r.key,void 0)?null:e.closePopover.apply(null,arguments)},mouseenter:e.onEnterAnchor,mouseleave:e.onLeaveAnchor}},[e._t("anchor",null,{attrs:{"aria-expanded":e.isOpen.toString(),"aria-controls":e.id,"aria-haspopup":e.role}})],2),t("dt-lazy-show",e._g({ref:"content",class:["d-popover__dialog",{"d-popover__dialog--modal":e.modal},e.dialogClass],style:{"max-height":e.calculatedMaxHeight,"max-width":e.maxWidth},attrs:{id:e.id,role:e.role,"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}__dialog`:"dt-popover","aria-hidden":`${!e.isOpen}`,"aria-labelledby":e.labelledBy,"aria-label":e.ariaLabel,"aria-modal":`${!e.modal}`,transition:e.transition,show:e.isOpen,tabindex:e.contentTabindex,appear:""},on:{mouseenter:e.onEnterContent,mouseleave:e.onLeaveContent}},e.popoverListeners),[e.$slots.headerContent||e.showCloseButton?t("popover-header-footer",{ref:"popover__header",class:e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding],attrs:{"content-class":e.headerClass,type:"header","show-close-button":e.showCloseButton,"close-button-props":e.closeButtonProps},on:{close:e.closePopover},scopedSlots:e._u([{key:"content",fn:function(){return[e._t("headerContent",null,{close:e.closePopover})]},proxy:!0}],null,!0)}):e._e(),t("div",{ref:"popover__content",class:["d-popover__content",e.POPOVER_PADDING_CLASSES[e.padding],e.contentClass],attrs:{"data-qa":e.$attrs["data-qa"]?`${e.$attrs["data-qa"]}-content`:"dt-popover-content"}},[e._t("content",null,{close:e.closePopover})],2),e.$slots.footerContent?t("popover-header-footer",{ref:"popover__footer",class:e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding],attrs:{type:"footer","content-class":e.footerClass},scopedSlots:e._u([{key:"content",fn:function(){return[e._t("footerContent",null,{close:e.closePopover})]},proxy:!0}],null,!0)}):e._e(),e.showVisuallyHiddenClose?t("sr-only-close-button",{attrs:{"visually-hidden-close-label":e.visuallyHiddenCloseLabel},on:{close:e.closePopover}}):e._e()],1)],1)],1)},Qc=[],Zc=I.normalizeComponent(Yc,Xc,Qc,!1,null,null,null,null);const eu=Zc.exports;function _s(n){return n===Ye.default}function Ls(n){if(Yt(n)==="string")return _s(n)?null:Ye[n];if(Yt(n)==="object"){const{default:e}=n;return _s(e)?null:Ye[e]}else return null}function Yt(n){return typeof n}function tu(n){return Ls(n)?`d-stack--${Ye[Ls(n)]}`:null}function nu(n){return Yt(n)==="object"?[...is.map(e=>n[e]?`d-stack--${e}--${n[e]}`:null)]:null}function ru(n){return gr.includes(n)?`d-stack--gap-${n}`:null}function iu(n){if(Yt(n)==="string")return Object.keys(Ye).includes(n);if(Yt(n)==="object"){const{default:e}=n;return Object.keys(Ye).includes(e)}else return null}function su(n){return gr.includes(n)}const ou={name:"DtStack",props:{direction:{type:[String,Object],default:"column",validator:n=>iu(n)},as:{type:String,default:"div"},gap:{type:String,default:"0",validator:n=>su(n)}},data(){return{DT_STACK_DIRECTION:Ye,DT_STACK_GAP:gr,DT_STACK_RESPONSIVE_BREAKPOINTS:is}},computed:{stackGap(){return ru(this.gap)},defaultDirection(){return tu(this.direction)},stackResponsive(){return nu(this.direction)}}};var lu=function(){var e=this,t=e._self._c;return t(e.as,{tag:"component",class:["d-stack",e.defaultDirection,e.stackResponsive,e.stackGap]},[e._t("default")],2)},au=[],cu=I.normalizeComponent(ou,lu,au,!1,null,null,null,null);const ls=cu.exports;function V(n){this.content=n}V.prototype={constructor:V,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),s=r.content.slice();return i==-1?s.push(t||n,e):(s[i+1]=e,t&&(s[i]=t)),new V(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new V(t)},addToStart:function(n,e){return new V([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new V(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),s=r.find(n);return i.splice(s==-1?i.length:s,0,e,t),new V(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=V.from(n),n.size?new V(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=V.from(n),n.size?new V(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=V.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};V.from=function(n){if(n instanceof V)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new V(e)};function Cl(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=Cl(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function Ml(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,u=Math.min(o.text.length,l.text.length);for(;c<u&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=Ml(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class b{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,s){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let u=l+1;a.nodesBetween(Math.max(0,e-u),Math.min(a.content.size,t-u),r,i+u)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(s+=l.text.slice(Math.max(e,a)-a,t-a),o=!r):l.isLeaf?(i?s+=typeof i=="function"?i(l):i:l.type.spec.leafText&&(s+=l.type.spec.leafText(l)),o=!r):!o&&l.isBlock&&(s+=r,o=!0)},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new b(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new b(r,i)}cutByIndex(e,t){return e==t?b.empty:e==0&&t==this.content.length?this:new b(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new b(i,s)}addToStart(e){return new b([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new b(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return Cl(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return Ml(this,e,t,r)}findIndex(e,t=-1){if(e==0)return fn(0,e);if(e==this.size)return fn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=e)return o==e||t>0?fn(r+1,o):fn(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return b.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new b(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return b.empty;let t,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(t||(t=e.slice(0,i)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new b(t||e,r)}static from(e){if(!e)return b.empty;if(e instanceof b)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new b([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}b.empty=new b([],0);const ti={index:0,offset:0};function fn(n,e){return ti.index=n,ti.offset=e,ti}function Mn(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Mn(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Mn(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let _=class Pi{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Mn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Pi.none;if(e instanceof Pi)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};_.none=[];class wn extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=Al(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(wl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(b.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new S(e,r,i)}}S.empty=new S(b.empty,0,0);function wl(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(wl(s.content,e-i-1,t-i-1)))}function Al(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=Al(o.content,e-s-1,t);return l&&n.replaceChild(i,o.copy(l))}function uu(n,e,t){if(t.openStart>n.depth)throw new wn("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new wn("Inconsistent open depths");return Nl(n,e,t,0)}function Nl(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let o=Nl(n,e,t,r+1);return s.copy(s.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return at(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=du(t,n);return at(s,Il(n,o,l,e,r))}else return at(s,An(n,e,r))}function Pl(n,e){if(!e.type.compatibleContent(n.type))throw new wn("Cannot join "+e.type.name+" onto "+n.type.name)}function Ii(n,e,t){let r=n.node(t);return Pl(r,e.node(t)),r}function lt(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function jt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(lt(n.nodeAfter,r),s++));for(let l=s;l<o;l++)lt(i.child(l),r);e&&e.depth==t&&e.textOffset&&lt(e.nodeBefore,r)}function at(n,e){return n.type.checkContent(e),n.copy(e)}function Il(n,e,t,r,i){let s=n.depth>i&&Ii(n,e,i+1),o=r.depth>i&&Ii(t,r,i+1),l=[];return jt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(Pl(s,o),lt(at(s,Il(n,e,t,r,i+1)),l)):(s&&lt(at(s,An(n,e,i+1)),l),jt(e,t,i,l),o&&lt(at(o,An(t,r,i+1)),l)),jt(r,null,i,l),new b(l)}function An(n,e,t){let r=[];if(jt(null,n,t,r),n.depth>t){let i=Ii(n,e,t+1);lt(at(i,An(n,e,t+1)),r)}return jt(e,null,t,r),new b(r)}function du(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(b.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Xt{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return _.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Nn(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Xt(t,r,s)}static resolveCached(e,t){for(let i=0;i<ni.length;i++){let s=ni[i];if(s.pos==t&&s.doc==e)return s}let r=ni[ri]=Xt.resolve(e,t);return ri=(ri+1)%fu,r}}let ni=[],ri=0,fu=12;class Nn{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const hu=Object.create(null);let ct=class Di{constructor(e,t,r,i=_.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||b.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Mn(this.attrs,t||e.defaultAttrs||hu)&&_.sameSet(this.marks,r||_.none)}copy(e=null){return e==this.content?this:new Di(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Di(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),s=this.resolve(t),o=r?0:i.sharedDepth(t),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new S(c,i.depth-o,s.depth-o)}replace(e,t,r){return uu(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Xt.resolveCached(this,e)}resolveNoCache(e){return Xt.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Dl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=b.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=_.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!_.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=b.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};ct.prototype.text=void 0;class Pn extends ct{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Dl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Pn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Pn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Dl(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ft{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new pu(e,t);if(r.next==null)return ft.empty;let i=Rl(r);r.next&&r.err("Unexpected trailing text");let s=Ou(Su(i));return xu(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let s=t;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return b.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:u,next:d}=o.next[c];if(!(u.isText||u.hasRequiredAttrs())&&i.indexOf(d)==-1){i.push(d);let f=s(d,l.concat(u));if(f)return f}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
3
3
  `)}}ft.empty=new ft(!0);class pu{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Rl(n){let e=[];do e.push(mu(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function mu(n){let e=[];do e.push(gu(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function gu(n){let e=ku(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=yu(n,e);else break;return e}function Bs(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function yu(n,e){let t=Bs(n),r=t;return n.eat(",")&&(n.next!="}"?r=Bs(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function bu(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.groups.indexOf(e)>-1&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function ku(n){if(n.eat("(")){let e=Rl(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=bu(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function Su(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let u=t();i(s(o.expr,a),u),a=u}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let u=t();r(a,u),i(s(o.expr,a),u),a=u}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function _l(n,e){return e-n}function $s(n,e){let t=[];return r(e),t.sort(_l);function r(i){let s=n[i];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&t.indexOf(a)==-1&&r(a)}}}function Ou(n){let e=Object.create(null);return t($s(n,0));function t(r){let i=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let u=0;u<i.length;u++)i[u][0]==l&&(c=i[u][1]);$s(n,a).forEach(u=>{c||i.push([l,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let s=e[r.join(",")]=new ft(r.indexOf(n.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(_l);s.next.push({type:i[o][0],next:e[l.join(",")]||t(l)})}return s}}function xu(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Ll(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function Bl(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let s=n[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function $l(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new Eu(n[t]);return e}let Fs=class Fl{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=$l(r.attrs),this.defaultAttrs=Ll(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ft.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Bl(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new ct(this,this.computeAttrs(e),b.from(t),_.setFrom(r))}createChecked(e=null,t,r){return t=b.from(t),this.checkContent(t),new ct(this,this.computeAttrs(e),t,_.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=b.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(b.empty,!0);return s?new ct(this,e,t.append(s),_.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:_.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,o)=>r[s]=new Fl(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Eu{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class yr{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=$l(i.attrs),this.excluded=null;let s=Ll(this.attrs);this.instance=s?new _(this,s):null}create(e=null){return!e&&this.instance?this.instance:new _(this,Bl(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new yr(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class Tu{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=V.from(e.nodes),t.marks=V.from(e.marks||{}),this.nodes=Fs.compile(this.spec.nodes,this),this.marks=yr.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;s.contentMatch=r[o]||(r[o]=ft.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=l=="_"?null:l?zs(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:zs(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Fs){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new Pn(r,r.defaultAttrs,e,_.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return ct.fromJSON(this,e)}markFromJSON(e){return _.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function zs(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],s=n.marks[i],o=s;if(s)t.push(s);else for(let l in n.marks){let a=n.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}let as=class Ri{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new js(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new js(this,t,!0);return r.addAll(e,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(Mu(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,t,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<s)break}t.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Vs(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Vs(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Ri(e,Ri.schemaRules(e)))}};const zl={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},vu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Hl={ol:!0,ul:!0},In=1,Dn=2,Vt=4;function Hs(n,e,t){return e!=null?(e?In:0)|(e==="full"?Dn:0):n&&n.whitespace=="pre"?In|Dn:t&~Vt}class hn{constructor(e,t,r,i,s,o,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=i,this.solid=s,this.options=l,this.content=[],this.activeMarks=_.none,this.stashMarks=[],this.match=o||(l&Vt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(b.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&In)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=b.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(b.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let i=r[t];(this.type?this.type.allowsMarkType(i.type):Au(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!zl.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class js{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,s,o=Hs(null,t.preserveWhitespace,0)|(r?Vt:0);i?s=new hn(i.type,i.attrs,_.none,_.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new hn(null,null,_.none,_.none,!0,null,o):s=new hn(e.schema.topNodeType,null,_.none,_.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){e.nodeType==3?this.addTextNode(e):e.nodeType==1&&this.addElement(e)}withStyleRules(e,t){let r=e.getAttribute("style");if(!r)return t();let i=this.readStyles(wu(r));if(!i)return;let[s,o]=i,l=this.top;for(let a=0;a<o.length;a++)this.removePendingMark(o[a],l);for(let a=0;a<s.length;a++)this.addPendingMark(s[a]);t();for(let a=0;a<s.length;a++)this.removePendingMark(s[a],l);for(let a=0;a<o.length;a++)this.addPendingMark(o[a])}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Dn||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&In)r.options&Dn?t=t.replace(/\r\n?/g,`
4
4
  `):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],s=e.previousSibling;(!i||s&&s.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),i;Hl.hasOwnProperty(r)&&this.parser.normalizeLists&&Cu(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,t));if(s?s.ignore:vu.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let o,l=this.top,a=this.needsBlock;if(zl.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),o=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}s&&s.skip?this.addAll(e):this.withStyleRules(e,()=>this.addAll(e)),o&&this.sync(l),this.needsBlock=a}else this.withStyleRules(e,()=>{this.addElementByRule(e,s,s.consuming===!1?i:void 0)})}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
5
5
  `))}ignoreFallback(e){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=_.none,r=_.none;for(let i=0;i<e.length;i+=2)for(let s=void 0;;){let o=this.parser.matchStyle(e[i],e[i+1],this,s);if(!o)break;if(o.ignore)return null;if(o.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach(l=>{o.clearMark(l)&&(r=l.addToSet(r))}):t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),o.consuming===!1)s=o;else break}return[t,r]}addElementByRule(e,t,r){let i,s,o;t.node?(s=this.parser.schema.nodes[t.node],s.isLeaf?this.insertNode(s.create(t.attrs))||this.leafFallback(e):i=this.enter(s,t.attrs||null,t.preserveWhitespace)):(o=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(o));let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(r)this.addElement(e,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(a=>this.insertNode(a));else{let a=e;typeof t.contentElement=="string"?a=e.querySelector(t.contentElement):typeof t.contentElement=="function"?a=t.contentElement(e):t.contentElement&&(a=t.contentElement),this.findAround(e,a,!0),this.addAll(a)}i&&this.sync(l)&&this.open--,o&&this.removePendingMark(o,l)}addAll(e,t,r){let i=t||0;for(let s=t?e.childNodes[t]:e.firstChild,o=r==null?null:e.childNodes[r];s!=o;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s);this.findAtPoint(e,i)}findPlace(e){let t,r;for(let i=this.open;i>=0;i--){let s=this.nodes[i],o=s.findWrapping(e);if(o&&(!t||t.length>o.length)&&(t=o,r=s,!o.length)||s.solid)break}if(!t)return!1;this.sync(r);for(let i=0;i<t.length;i++)this.enterInner(t[i],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let t=this.textblockFromContext();t&&this.enterInner(t)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let r=t.activeMarks;for(let i=0;i<e.marks.length;i++)(!t.type||t.type.allowsMarkType(e.marks[i].type))&&(r=e.marks[i].addToSet(r));return t.content.push(e.mark(r)),!0}return!1}enter(e,t,r){let i=this.findPlace(e.create(t));return i&&this.enterInner(e,t,!0,r),i}enterInner(e,t=null,r=!1,i){this.closeExtra();let s=this.top;s.applyPending(e),s.match=s.match&&s.match.matchType(e);let o=Hs(e,i,s.options);s.options&Vt&&s.content.length==0&&(o|=Vt),this.nodes.push(new hn(e,t,s.activeMarks,s.pendingMarks,r,null,o)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let r=this.nodes[t].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==t&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,r){if(e!=t&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&t.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),s=-(r?r.depth+1:0)+(i?0:1),o=(l,a)=>{for(;l>=0;l--){let c=t[l];if(c==""){if(l==t.length-1||l==0)continue;for(;a>=s;a--)if(o(l-1,a))return!0;return!1}else{let u=a>0||a==0&&i?this.nodes[a].type:r&&a>=s?r.node(a-s).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;a--}}return!0};return o(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let r=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let t in this.parser.schema.nodes){let r=this.parser.schema.nodes[t];if(r.isTextblock&&r.defaultAttrs)return r}}addPendingMark(e){let t=Nu(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let r=this.open;r>=0;r--){let i=this.nodes[r];if(i.pendingMarks.lastIndexOf(e)>-1)i.pendingMarks=e.removeFromSet(i.pendingMarks);else{i.activeMarks=e.removeFromSet(i.activeMarks);let o=i.popFromStashMark(e);o&&i.type&&i.type.allowsMarkType(o.type)&&(i.activeMarks=o.addToSet(i.activeMarks))}if(i==t)break}}}function Cu(n){for(let e=n.firstChild,t=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Hl.hasOwnProperty(r)&&t?(t.appendChild(e),e=t):r=="li"?t=e:r&&(t=null)}}function Mu(n,e){return(n.matches||n.msMatchesSelector||n.webkitMatchesSelector||n.mozMatchesSelector).call(n,e)}function wu(n){let e=/\s*([\w-]+)\s*:\s*([^;]+)/g,t,r=[];for(;t=e.exec(n);)r.push(t[1],t[2].trim());return r}function Vs(n){let e={};for(let t in n)e[t]=n[t];return e}function Au(n,e){let t=e.schema.nodes;for(let r in t){let i=t[r];if(!i.allowsMarkType(n))continue;let s=[],o=l=>{s.push(l);for(let a=0;a<l.edgeCount;a++){let{type:c,next:u}=l.edge(a);if(c==e||s.indexOf(u)<0&&o(u))return!0}};if(o(i.contentMatch))return!0}}function Nu(n,e){for(let t=0;t<e.length;t++)if(n.eq(e[t]))return e[t]}class ve{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},r){r||(r=ii(t).createDocumentFragment());let i=r,s=[];return e.forEach(o=>{if(s.length||o.marks.length){let l=0,a=0;for(;l<s.length&&a<o.marks.length;){let c=o.marks[a];if(!this.marks[c.type.name]){a++;continue}if(!c.eq(s[l][0])||c.type.spec.spanning===!1)break;l++,a++}for(;l<s.length;)i=s.pop()[1];for(;a<o.marks.length;){let c=o.marks[a++],u=this.serializeMark(c,o.isInline,t);u&&(s.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(o,t))}),r}serializeNodeInner(e,t){let{dom:r,contentDOM:i}=ve.renderSpec(ii(t),this.nodes[e.type.name](e));if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,i)}return r}serializeNode(e,t={}){let r=this.serializeNodeInner(e,t);for(let i=e.marks.length-1;i>=0;i--){let s=this.serializeMark(e.marks[i],e.isInline,t);s&&((s.contentDOM||s.dom).appendChild(r),r=s.dom)}return r}serializeMark(e,t,r={}){let i=this.marks[e.type.name];return i&&ve.renderSpec(ii(r),i(e,t))}static renderSpec(e,t,r=null){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i=t[0],s=i.indexOf(" ");s>0&&(r=i.slice(0,s),i=i.slice(s+1));let o,l=r?e.createElementNS(r,i):e.createElement(i),a=t[1],c=1;if(a&&typeof a=="object"&&a.nodeType==null&&!Array.isArray(a)){c=2;for(let u in a)if(a[u]!=null){let d=u.indexOf(" ");d>0?l.setAttributeNS(u.slice(0,d),u.slice(d+1),a[u]):l.setAttribute(u,a[u])}}for(let u=c;u<t.length;u++){let d=t[u];if(d===0){if(u<t.length-1||u>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:h}=ve.renderSpec(e,d,r);if(l.appendChild(f),h){if(o)throw new RangeError("Multiple content holes");o=h}}}return{dom:l,contentDOM:o}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new ve(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=qs(e.nodes);return t.text||(t.text=r=>r.text),t}static marksFromSchema(e){return qs(e.marks)}}function qs(n){let e={};for(let t in n){let r=n[t].spec.toDOM;r&&(e[t]=r)}return e}function ii(n){return n.document||window.document}const jl=65535,Vl=Math.pow(2,16);function Pu(n,e){return n+e*Vl}function Ks(n){return n&jl}function Iu(n){return(n-(n&jl))/Vl}const ql=1,Kl=2,En=4,Wl=8;class _i{constructor(e,t,r){this.pos=e,this.delInfo=t,this.recover=r}get deleted(){return(this.delInfo&Wl)>0}get deletedBefore(){return(this.delInfo&(ql|En))>0}get deletedAfter(){return(this.delInfo&(Kl|En))>0}get deletedAcross(){return(this.delInfo&En)>0}}class ae{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&ae.empty)return ae.empty}recover(e){let t=0,r=Ks(e);if(!this.inverted)for(let i=0;i<r;i++)t+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+t+Iu(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,r){let i=0,s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?i:0);if(a>e)break;let c=this.ranges[l+s],u=this.ranges[l+o],d=a+c;if(e<=d){let f=c?e==a?-1:e==d?1:t:t,h=a+i+(f<0?0:u);if(r)return h;let p=e==(t<0?a:d)?null:Pu(l/3,e-a),m=e==a?Kl:e==d?ql:En;return(t<0?e!=a:e!=d)&&(m|=Wl),new _i(h,m,p)}i+=u-c}return r?e+i:new _i(e+i,0,null)}touches(e,t){let r=0,i=Ks(t),s=this.inverted?2:1,o=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let a=this.ranges[l]-(this.inverted?r:0);if(a>e)break;let c=this.ranges[l+s],u=a+c;if(e<=u&&l==i*3)return!0;r+=this.ranges[l+o]-c}return!1}forEach(e){let t=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,s=0;i<this.ranges.length;i+=3){let o=this.ranges[i],l=o-(this.inverted?s:0),a=o+(this.inverted?0:s),c=this.ranges[i+t],u=this.ranges[i+r];e(l,l+c,a,a+u),s+=u-c}}invert(){return new ae(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?ae.empty:new ae(e<0?[0,-e,0]:[0,0,e])}}ae.empty=new ae([]);class qt{constructor(e=[],t,r=0,i=e.length){this.maps=e,this.mirror=t,this.from=r,this.to=i}slice(e=0,t=this.maps.length){return new qt(this.maps,this.mirror,e,t)}copy(){return new qt(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),t!=null&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,r=this.maps.length;t<e.maps.length;t++){let i=e.getMirror(t);this.appendMap(e.maps[t],i!=null&&i<t?r+i:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,r=this.maps.length+e.maps.length;t>=0;t--){let i=e.getMirror(t);this.appendMap(e.maps[t].invert(),i!=null&&i>t?r-i-1:void 0)}}invert(){let e=new qt;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let r=this.from;r<this.to;r++)e=this.maps[r].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,r){let i=0;for(let s=this.from;s<this.to;s++){let o=this.maps[s],l=o.mapResult(e,t);if(l.recover!=null){let a=this.getMirror(s);if(a!=null&&a>s&&a<this.to){s=a,e=this.maps[a].recover(l.recover);continue}}i|=l.delInfo,e=l.pos}return r?e:new _i(e,i,null)}}const si=Object.create(null);class X{getMap(){return ae.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=si[t.stepType];if(!r)throw new RangeError(`No step type ${t.stepType} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in si)throw new RangeError("Duplicate use of step JSON ID "+e);return si[e]=t,t.prototype.jsonID=e,t}}class z{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new z(e,null)}static fail(e){return new z(null,e)}static fromReplace(e,t,r,i){try{return z.ok(e.replace(t,r,i))}catch(s){if(s instanceof wn)return z.fail(s.message);throw s}}}function cs(n,e,t){let r=[];for(let i=0;i<n.childCount;i++){let s=n.child(i);s.content.size&&(s=s.copy(cs(s.content,e,s))),s.isInline&&(s=e(s,t,i)),r.push(s)}return b.fromArray(r)}class qe extends X{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),s=new S(cs(t.content,(o,l)=>!o.isAtom||!l.type.allowsMarkType(this.mark.type)?o:o.mark(this.mark.addToSet(o.marks)),i),t.openStart,t.openEnd);return z.fromReplace(e,this.from,this.to,s)}invert(){return new Ce(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new qe(t.pos,r.pos,this.mark)}merge(e){return e instanceof qe&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new qe(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new qe(t.from,t.to,e.markFromJSON(t.mark))}}X.jsonID("addMark",qe);class Ce extends X{constructor(e,t,r){super(),this.from=e,this.to=t,this.mark=r}apply(e){let t=e.slice(this.from,this.to),r=new S(cs(t.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),t.openStart,t.openEnd);return z.fromReplace(e,this.from,this.to,r)}invert(){return new qe(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deleted&&r.deleted||t.pos>=r.pos?null:new Ce(t.pos,r.pos,this.mark)}merge(e){return e instanceof Ce&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ce(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ce(t.from,t.to,e.markFromJSON(t.mark))}}X.jsonID("removeMark",Ce);class Ke extends X{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return z.fromReplace(e,this.pos,this.pos+1,new S(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let r=this.mark.addToSet(t.marks);if(r.length==t.marks.length){for(let i=0;i<t.marks.length;i++)if(!t.marks[i].isInSet(r))return new Ke(this.pos,t.marks[i]);return new Ke(this.pos,this.mark)}}return new wt(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ke(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Ke(t.pos,e.markFromJSON(t.mark))}}X.jsonID("addNodeMark",Ke);class wt extends X{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return z.fail("No node at mark step's position");let r=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return z.fromReplace(e,this.pos,this.pos+1,new S(b.from(r),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new Ke(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new wt(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new wt(t.pos,e.markFromJSON(t.mark))}}X.jsonID("removeNodeMark",wt);class q extends X{constructor(e,t,r,i=!1){super(),this.from=e,this.to=t,this.slice=r,this.structure=i}apply(e){return this.structure&&Li(e,this.from,this.to)?z.fail("Structure replace would overwrite content"):z.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new ae([this.from,this.to-this.from,this.slice.size])}invert(e){return new q(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return t.deletedAcross&&r.deletedAcross?null:new q(t.pos,Math.max(t.pos,r.pos),this.slice)}merge(e){if(!(e instanceof q)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?S.empty:new S(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new q(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?S.empty:new S(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new q(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new q(t.from,t.to,S.fromJSON(e,t.slice),!!t.structure)}}X.jsonID("replace",q);class H extends X{constructor(e,t,r,i,s,o,l=!1){super(),this.from=e,this.to=t,this.gapFrom=r,this.gapTo=i,this.slice=s,this.insert=o,this.structure=l}apply(e){if(this.structure&&(Li(e,this.from,this.gapFrom)||Li(e,this.gapTo,this.to)))return z.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return z.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,t.content);return r?z.fromReplace(e,this.from,this.to,r):z.fail("Content does not fit in gap")}getMap(){return new ae([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new H(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=e.map(this.gapFrom,-1),s=e.map(this.gapTo,1);return t.deletedAcross&&r.deletedAcross||i<t.pos||s>r.pos?null:new H(t.pos,r.pos,i,s,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new H(t.from,t.to,t.gapFrom,t.gapTo,S.fromJSON(e,t.slice),t.insert,!!t.structure)}}X.jsonID("replaceAround",H);function Li(n,e,t){let r=n.resolve(e),i=t-e,s=r.depth;for(;i>0&&s>0&&r.indexAfter(s)==r.node(s).childCount;)s--,i--;if(i>0){let o=r.node(s).maybeChild(r.indexAfter(s));for(;i>0;){if(!o||o.isLeaf)return!0;o=o.firstChild,i--}}return!1}function Du(n,e,t,r){let i=[],s=[],o,l;n.doc.nodesBetween(e,t,(a,c,u)=>{if(!a.isInline)return;let d=a.marks;if(!r.isInSet(d)&&u.type.allowsMarkType(r.type)){let f=Math.max(c,e),h=Math.min(c+a.nodeSize,t),p=r.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(o&&o.to==f&&o.mark.eq(d[m])?o.to=h:i.push(o=new Ce(f,h,d[m])));l&&l.to==f?l.to=h:s.push(l=new qe(f,h,r))}}),i.forEach(a=>n.step(a)),s.forEach(a=>n.step(a))}function Ru(n,e,t,r){let i=[],s=0;n.doc.nodesBetween(e,t,(o,l)=>{if(!o.isInline)return;s++;let a=null;if(r instanceof yr){let c=o.marks,u;for(;u=r.isInSet(c);)(a||(a=[])).push(u),c=u.removeFromSet(c)}else r?r.isInSet(o.marks)&&(a=[r]):a=o.marks;if(a&&a.length){let c=Math.min(l+o.nodeSize,t);for(let u=0;u<a.length;u++){let d=a[u],f;for(let h=0;h<i.length;h++){let p=i[h];p.step==s-1&&d.eq(i[h].style)&&(f=p)}f?(f.to=c,f.step=s):i.push({style:d,from:Math.max(l,e),to:c,step:s})}}}),i.forEach(o=>n.step(new Ce(o.from,o.to,o.style)))}function _u(n,e,t,r=t.contentMatch){let i=n.doc.nodeAt(e),s=[],o=e+1;for(let l=0;l<i.childCount;l++){let a=i.child(l),c=o+a.nodeSize,u=r.matchType(a.type);if(!u)s.push(new q(o,c,S.empty));else{r=u;for(let d=0;d<a.marks.length;d++)t.allowsMarkType(a.marks[d].type)||n.step(new Ce(o,c,a.marks[d]));if(a.isText&&!t.spec.code){let d,f=/\r?\n|\r/g,h;for(;d=f.exec(a.text);)h||(h=new S(b.from(t.schema.text(" ",t.allowedMarks(a.marks))),0,0)),s.push(new q(o+d.index,o+d.index+d[0].length,h))}}o=c}if(!r.validEnd){let l=r.fillBefore(b.empty,!0);n.replace(o,o,new S(l,0,0))}for(let l=s.length-1;l>=0;l--)n.step(s[l])}function Lu(n,e,t){return(e==0||n.canReplace(e,n.childCount))&&(t==n.childCount||n.canReplace(0,t))}function Rt(n){let t=n.parent.content.cutByIndex(n.startIndex,n.endIndex);for(let r=n.depth;;--r){let i=n.$from.node(r),s=n.$from.index(r),o=n.$to.indexAfter(r);if(r<n.depth&&i.canReplace(s,o,t))return r;if(r==0||i.type.spec.isolating||!Lu(i,s,o))break}return null}function Bu(n,e,t){let{$from:r,$to:i,depth:s}=e,o=r.before(s+1),l=i.after(s+1),a=o,c=l,u=b.empty,d=0;for(let p=s,m=!1;p>t;p--)m||r.index(p)>0?(m=!0,u=b.from(r.node(p).copy(u)),d++):a--;let f=b.empty,h=0;for(let p=s,m=!1;p>t;p--)m||i.after(p+1)<i.end(p)?(m=!0,f=b.from(i.node(p).copy(f)),h++):c++;n.step(new H(a,c,o,l,new S(u.append(f),d,h),u.size-d,!0))}function us(n,e,t=null,r=n){let i=$u(n,e),s=i&&Fu(r,e);return s?i.map(Ws).concat({type:e,attrs:t}).concat(s.map(Ws)):null}function Ws(n){return{type:n,attrs:null}}function $u(n,e){let{parent:t,startIndex:r,endIndex:i}=n,s=t.contentMatchAt(r).findWrapping(e);if(!s)return null;let o=s.length?s[0]:e;return t.canReplaceWith(r,i,o)?s:null}function Fu(n,e){let{parent:t,startIndex:r,endIndex:i}=n,s=t.child(r),o=e.contentMatch.findWrapping(s.type);if(!o)return null;let a=(o.length?o[o.length-1]:e).contentMatch;for(let c=r;a&&c<i;c++)a=a.matchType(t.child(c).type);return!a||!a.validEnd?null:o}function zu(n,e,t){let r=b.empty;for(let o=t.length-1;o>=0;o--){if(r.size){let l=t[o].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=b.from(t[o].type.create(t[o].attrs,r))}let i=e.start,s=e.end;n.step(new H(i,s,i,s,new S(r,0,0),t.length,!0))}function Hu(n,e,t,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let s=n.steps.length;n.doc.nodesBetween(e,t,(o,l)=>{if(o.isTextblock&&!o.hasMarkup(r,i)&&ju(n.doc,n.mapping.slice(s).map(l),r)){n.clearIncompatible(n.mapping.slice(s).map(l,1),r);let a=n.mapping.slice(s),c=a.map(l,1),u=a.map(l+o.nodeSize,1);return n.step(new H(c,u,c+1,u-1,new S(b.from(r.create(i,null,o.marks)),0,0),1,!0)),!1}})}function ju(n,e,t){let r=n.resolve(e),i=r.index();return r.parent.canReplaceWith(i,i+1,t)}function Vu(n,e,t,r,i){let s=n.doc.nodeAt(e);if(!s)throw new RangeError("No node at given position");t||(t=s.type);let o=t.create(r,null,i||s.marks);if(s.isLeaf)return n.replaceWith(e,e+s.nodeSize,o);if(!t.validContent(s.content))throw new RangeError("Invalid content for node type "+t.name);n.step(new H(e,e+s.nodeSize,e+1,e+s.nodeSize-1,new S(b.from(o),0,0),1,!0))}function vt(n,e,t=1,r){let i=n.resolve(e),s=i.depth-t,o=r&&r[r.length-1]||i.parent;if(s<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=t-2;c>s;c--,u--){let d=i.node(c),f=i.index(c);if(d.type.spec.isolating)return!1;let h=d.content.cutByIndex(f,d.childCount),p=r&&r[u+1];p&&(h=h.replaceChild(0,p.type.create(p.attrs)));let m=r&&r[u]||d;if(!d.canReplace(f+1,d.childCount)||!m.type.validContent(h))return!1}let l=i.indexAfter(s),a=r&&r[0];return i.node(s).canReplaceWith(l,l,a?a.type:i.node(s+1).type)}function qu(n,e,t=1,r){let i=n.doc.resolve(e),s=b.empty,o=b.empty;for(let l=i.depth,a=i.depth-t,c=t-1;l>a;l--,c--){s=b.from(i.node(l).copy(s));let u=r&&r[c];o=b.from(u?u.type.create(u.attrs,o):i.node(l).copy(o))}n.step(new q(e,e,new S(s.append(o),t,t),!0))}function Qe(n,e){let t=n.resolve(e),r=t.index();return Ul(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(r,r+1)}function Ul(n,e){return!!(n&&e&&!n.isLeaf&&n.canAppend(e))}function Jl(n,e,t=-1){let r=n.resolve(e);for(let i=r.depth;;i--){let s,o,l=r.index(i);if(i==r.depth?(s=r.nodeBefore,o=r.nodeAfter):t>0?(s=r.node(i+1),l++,o=r.node(i).maybeChild(l)):(s=r.node(i).maybeChild(l-1),o=r.node(i+1)),s&&!s.isTextblock&&Ul(s,o)&&r.node(i).canReplace(l,l+1))return e;if(i==0)break;e=t<0?r.before(i):r.after(i)}}function Ku(n,e,t){let r=new q(e-t,e+t,S.empty,!0);n.step(r)}function Wu(n,e,t){let r=n.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),t))return e;if(r.parentOffset==0)for(let i=r.depth-1;i>=0;i--){let s=r.index(i);if(r.node(i).canReplaceWith(s,s,t))return r.before(i+1);if(s>0)return null}if(r.parentOffset==r.parent.content.size)for(let i=r.depth-1;i>=0;i--){let s=r.indexAfter(i);if(r.node(i).canReplaceWith(s,s,t))return r.after(i+1);if(s<r.node(i).childCount)return null}return null}function Uu(n,e,t){let r=n.resolve(e);if(!t.content.size)return e;let i=t.content;for(let s=0;s<t.openStart;s++)i=i.firstChild.content;for(let s=1;s<=(t.openStart==0&&t.size?2:1);s++)for(let o=r.depth;o>=0;o--){let l=o==r.depth?0:r.pos<=(r.start(o+1)+r.end(o+1))/2?-1:1,a=r.index(o)+(l>0?1:0),c=r.node(o),u=!1;if(s==1)u=c.canReplace(a,a,i);else{let d=c.contentMatchAt(a).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(a,a,d[0])}if(u)return l==0?r.pos:l<0?r.before(o+1):r.after(o+1)}return null}function ds(n,e,t=e,r=S.empty){if(e==t&&!r.size)return null;let i=n.resolve(e),s=n.resolve(t);return Gl(i,s,r)?new q(e,t,r):new Ju(i,s,r).fit()}function Gl(n,e,t){return!t.openStart&&!t.openEnd&&n.start()==e.start()&&n.parent.canReplace(n.index(),e.index(),t.content)}class Ju{constructor(e,t,r){this.$from=e,this.$to=t,this.unplaced=r,this.frontier=[],this.placed=b.empty;for(let i=0;i<=e.depth;i++){let s=e.node(i);this.frontier.push({type:s.type,match:s.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=b.from(e.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,r=this.$from,i=this.close(e<0?this.$to:r.doc.resolve(e));if(!i)return null;let s=this.placed,o=r.depth,l=i.depth;for(;o&&l&&s.childCount==1;)s=s.firstChild.content,o--,l--;let a=new S(s,o,l);return e>-1?new H(r.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||r.pos!=this.$to.pos?new q(r.pos,i.pos,a):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<e;r++){let s=t.firstChild;if(t.childCount>1&&(i=0),s.type.spec.isolating&&i<=r){e=r;break}t=s.content}for(let t=1;t<=2;t++)for(let r=t==1?e:this.unplaced.openStart;r>=0;r--){let i,s=null;r?(s=oi(this.unplaced.content,r-1).firstChild,i=s.content):i=this.unplaced.content;let o=i.firstChild;for(let l=this.depth;l>=0;l--){let{type:a,match:c}=this.frontier[l],u,d=null;if(t==1&&(o?c.matchType(o.type)||(d=c.fillBefore(b.from(o),!1)):s&&a.compatibleContent(s.type)))return{sliceDepth:r,frontierDepth:l,parent:s,inject:d};if(t==2&&o&&(u=c.findWrapping(o.type)))return{sliceDepth:r,frontierDepth:l,parent:s,wrap:u};if(s&&c.matchType(s.type))break}}}openMore(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=oi(e,t);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new S(e,t+1,Math.max(r,i.size+t>=e.size-r?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:r}=this.unplaced,i=oi(e,t);if(i.childCount<=1&&t>0){let s=e.size-t<=t+i.size;this.unplaced=new S(Ft(e,t-1,1),t-1,s?t-1:r)}else this.unplaced=new S(Ft(e,t,1),t,r)}placeNodes({sliceDepth:e,frontierDepth:t,parent:r,inject:i,wrap:s}){for(;this.depth>t;)this.closeFrontierNode();if(s)for(let m=0;m<s.length;m++)this.openFrontierNode(s[m]);let o=this.unplaced,l=r?r.content:o.content,a=o.openStart-e,c=0,u=[],{match:d,type:f}=this.frontier[t];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));d=d.matchFragment(i)}let h=l.size+e-(o.content.size-o.openEnd);for(;c<l.childCount;){let m=l.child(c),g=d.matchType(m.type);if(!g)break;c++,(c>1||a==0||m.content.size)&&(d=g,u.push(Yl(m.mark(f.allowedMarks(m.marks)),c==1?a:0,c==l.childCount?h:-1)))}let p=c==l.childCount;p||(h=-1),this.placed=zt(this.placed,t,b.from(u)),this.frontier[t].match=d,p&&h<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,g=l;m<h;m++){let y=g.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),g=y.content}this.unplaced=p?e==0?S.empty:new S(Ft(o.content,e-1,1),e-1,h<0?o.openEnd:e-1):new S(Ft(o.content,e,c),o.openStart,o.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!li(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:r}=this.$to,i=this.$to.after(r);for(;r>1&&i==this.$to.end(--r);)++i;return i}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:r,type:i}=this.frontier[t],s=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),o=li(e,t,i,r,s);if(o){for(let l=t-1;l>=0;l--){let{match:a,type:c}=this.frontier[l],u=li(e,l,c,a,!0);if(!u||u.childCount)continue e}return{depth:t,fit:o,move:s?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=zt(this.placed,t.depth,t.fit)),e=t.move;for(let r=t.depth+1;r<=e.depth;r++){let i=e.node(r),s=i.type.contentMatch.fillBefore(i.content,!0,e.index(r));this.openFrontierNode(i.type,i.attrs,s)}return e}openFrontierNode(e,t=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=zt(this.placed,this.depth,b.from(e.create(t,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(b.empty,!0);t.childCount&&(this.placed=zt(this.placed,this.frontier.length,t))}}function Ft(n,e,t){return e==0?n.cutByIndex(t,n.childCount):n.replaceChild(0,n.firstChild.copy(Ft(n.firstChild.content,e-1,t)))}function zt(n,e,t){return e==0?n.append(t):n.replaceChild(n.childCount-1,n.lastChild.copy(zt(n.lastChild.content,e-1,t)))}function oi(n,e){for(let t=0;t<e;t++)n=n.firstChild.content;return n}function Yl(n,e,t){if(e<=0)return n;let r=n.content;return e>1&&(r=r.replaceChild(0,Yl(r.firstChild,e-1,r.childCount==1?t-1:0))),e>0&&(r=n.type.contentMatch.fillBefore(r).append(r),t<=0&&(r=r.append(n.type.contentMatch.matchFragment(r).fillBefore(b.empty,!0)))),n.copy(r)}function li(n,e,t,r,i){let s=n.node(e),o=i?n.indexAfter(e):n.index(e);if(o==s.childCount&&!t.compatibleContent(s.type))return null;let l=r.fillBefore(s.content,!0,o);return l&&!Gu(t,s.content,o)?l:null}function Gu(n,e,t){for(let r=t;r<e.childCount;r++)if(!n.allowsMarks(e.child(r).marks))return!0;return!1}function Yu(n){return n.spec.defining||n.spec.definingForContent}function Xu(n,e,t,r){if(!r.size)return n.deleteRange(e,t);let i=n.doc.resolve(e),s=n.doc.resolve(t);if(Gl(i,s,r))return n.step(new q(e,t,r));let o=Ql(i,n.doc.resolve(t));o[o.length-1]==0&&o.pop();let l=-(i.depth+1);o.unshift(l);for(let f=i.depth,h=i.pos-1;f>0;f--,h--){let p=i.node(f).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;o.indexOf(f)>-1?l=f:i.before(f)==h&&o.splice(1,0,-f)}let a=o.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let p=f.firstChild;if(c.push(p),h==r.openStart)break;f=p.content}for(let f=u-1;f>=0;f--){let h=c[f],p=Yu(h.type);if(p&&!h.sameMarkup(i.node(Math.abs(l)-1)))u=f;else if(p||!h.type.isTextblock)break}for(let f=r.openStart;f>=0;f--){let h=(f+u+1)%(r.openStart+1),p=c[h];if(p)for(let m=0;m<o.length;m++){let g=o[(m+a)%o.length],y=!0;g<0&&(y=!1,g=-g);let x=i.node(g-1),v=i.index(g-1);if(x.canReplaceWith(v,v,p.type,p.marks))return n.replace(i.before(g),y?s.after(g):t,new S(Xl(r.content,0,r.openStart,h),h,r.openEnd))}}let d=n.steps.length;for(let f=o.length-1;f>=0&&(n.replace(e,t,r),!(n.steps.length>d));f--){let h=o[f];h<0||(e=i.before(h),t=s.after(h))}}function Xl(n,e,t,r,i){if(e<t){let s=n.firstChild;n=n.replaceChild(0,s.copy(Xl(s.content,e+1,t,r,s)))}if(e>r){let s=i.contentMatchAt(0),o=s.fillBefore(n).append(n);n=o.append(s.matchFragment(o).fillBefore(b.empty,!0))}return n}function Qu(n,e,t,r){if(!r.isInline&&e==t&&n.doc.resolve(e).parent.content.size){let i=Wu(n.doc,e,r.type);i!=null&&(e=t=i)}n.replaceRange(e,t,new S(b.from(r),0,0))}function Zu(n,e,t){let r=n.doc.resolve(e),i=n.doc.resolve(t),s=Ql(r,i);for(let o=0;o<s.length;o++){let l=s[o],a=o==s.length-1;if(a&&l==0||r.node(l).type.contentMatch.validEnd)return n.delete(r.start(l),i.end(l));if(l>0&&(a||r.node(l-1).canReplace(r.index(l-1),i.indexAfter(l-1))))return n.delete(r.before(l),i.after(l))}for(let o=1;o<=r.depth&&o<=i.depth;o++)if(e-r.start(o)==r.depth-o&&t>r.end(o)&&i.end(o)-t!=i.depth-o)return n.delete(r.before(o),t);n.delete(e,t)}function Ql(n,e){let t=[],r=Math.min(n.depth,e.depth);for(let i=r;i>=0;i--){let s=n.start(i);if(s<n.pos-(n.depth-i)||e.end(i)>e.pos+(e.depth-i)||n.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(s==e.start(i)||i==n.depth&&i==e.depth&&n.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==s-1)&&t.push(i)}return t}class Ct extends X{constructor(e,t,r){super(),this.pos=e,this.attr=t,this.value=r}apply(e){let t=e.nodeAt(this.pos);if(!t)return z.fail("No node at attribute step's position");let r=Object.create(null);for(let s in t.attrs)r[s]=t.attrs[s];r[this.attr]=this.value;let i=t.type.create(r,null,t.marks);return z.fromReplace(e,this.pos,this.pos+1,new S(b.from(i),0,t.isLeaf?0:1))}getMap(){return ae.empty}invert(e){return new Ct(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Ct(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Ct(t.pos,t.attr,t.value)}}X.jsonID("attr",Ct);class Qt extends X{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let i in e.attrs)t[i]=e.attrs[i];t[this.attr]=this.value;let r=e.type.create(t,e.content,e.marks);return z.ok(r)}getMap(){return ae.empty}invert(e){return new Qt(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Qt(t.attr,t.value)}}X.jsonID("docAttr",Qt);let At=class extends Error{};At=function n(e){let t=Error.call(this,e);return t.__proto__=n.prototype,t};At.prototype=Object.create(Error.prototype);At.prototype.constructor=At;At.prototype.name="TransformError";class Zl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new qt}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new At(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,r=S.empty){let i=ds(this.doc,e,t,r);return i&&this.step(i),this}replaceWith(e,t,r){return this.replace(e,t,new S(b.from(r),0,0))}delete(e,t){return this.replace(e,t,S.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,r){return Xu(this,e,t,r),this}replaceRangeWith(e,t,r){return Qu(this,e,t,r),this}deleteRange(e,t){return Zu(this,e,t),this}lift(e,t){return Bu(this,e,t),this}join(e,t=1){return Ku(this,e,t),this}wrap(e,t){return zu(this,e,t),this}setBlockType(e,t=e,r,i=null){return Hu(this,e,t,r,i),this}setNodeMarkup(e,t,r=null,i){return Vu(this,e,t,r,i),this}setNodeAttribute(e,t,r){return this.step(new Ct(e,t,r)),this}setDocAttribute(e,t){return this.step(new Qt(e,t)),this}addNodeMark(e,t){return this.step(new Ke(e,t)),this}removeNodeMark(e,t){if(!(t instanceof _)){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(t=t.isInSet(r.marks),!t)return this}return this.step(new wt(e,t)),this}split(e,t=1,r){return qu(this,e,t,r),this}addMark(e,t,r){return Du(this,e,t,r),this}removeMark(e,t,r){return Ru(this,e,t,r),this}clearIncompatible(e,t,r){return _u(this,e,t,r),this}}const ai=Object.create(null);class A{constructor(e,t,r){this.$anchor=e,this.$head=t,this.ranges=r||[new ed(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=S.empty){let r=t.content.lastChild,i=null;for(let l=0;l<t.openEnd;l++)i=r,r=r.lastChild;let s=e.steps.length,o=this.ranges;for(let l=0;l<o.length;l++){let{$from:a,$to:c}=o[l],u=e.mapping.slice(s);e.replaceRange(u.map(a.pos),u.map(c.pos),l?S.empty:t),l==0&&Gs(e,s,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,t){let r=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:o,$to:l}=i[s],a=e.mapping.slice(r),c=a.map(o.pos),u=a.map(l.pos);s?e.deleteRange(c,u):(e.replaceRangeWith(c,u,t),Gs(e,r,t.isInline?-1:1))}}static findFrom(e,t,r=!1){let i=e.parent.inlineContent?new N(e):kt(e.node(0),e.parent,e.pos,e.index(),t,r);if(i)return i;for(let s=e.depth-1;s>=0;s--){let o=t<0?kt(e.node(0),e.node(s),e.before(s+1),e.index(s),t,r):kt(e.node(0),e.node(s),e.after(s+1),e.index(s)+1,t,r);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new ye(e.node(0))}static atStart(e){return kt(e,e,0,0,1)||new ye(e)}static atEnd(e){return kt(e,e,e.content.size,e.childCount,-1)||new ye(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ai[t.type];if(!r)throw new RangeError(`No selection type ${t.type} defined`);return r.fromJSON(e,t)}static jsonID(e,t){if(e in ai)throw new RangeError("Duplicate use of selection JSON ID "+e);return ai[e]=t,t.prototype.jsonID=e,t}getBookmark(){return N.between(this.$anchor,this.$head).getBookmark()}}A.prototype.visible=!0;class ed{constructor(e,t){this.$from=e,this.$to=t}}let Us=!1;function Js(n){!Us&&!n.parent.inlineContent&&(Us=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+n.parent.type.name+")"))}class N extends A{constructor(e,t=e){Js(e),Js(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let r=e.resolve(t.map(this.head));if(!r.parent.inlineContent)return A.near(r);let i=e.resolve(t.map(this.anchor));return new N(i.parent.inlineContent?i:r,r)}replace(e,t=S.empty){if(super.replace(e,t),t==S.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof N&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new br(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new N(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){let i=e.resolve(t);return new this(i,r==t?i:e.resolve(r))}static between(e,t,r){let i=e.pos-t.pos;if((!r||i)&&(r=i>=0?1:-1),!t.parent.inlineContent){let s=A.findFrom(t,r,!0)||A.findFrom(t,-r,!0);if(s)t=s.$head;else return A.near(t,r)}return e.parent.inlineContent||(i==0?e=t:(e=(A.findFrom(e,-r,!0)||A.findFrom(e,r,!0)).$anchor,e.pos<t.pos!=i<0&&(e=t))),new N(e,t)}}A.jsonID("text",N);class br{constructor(e,t){this.anchor=e,this.head=t}map(e){return new br(e.map(this.anchor),e.map(this.head))}resolve(e){return N.between(e.resolve(this.anchor),e.resolve(this.head))}}class T extends A{constructor(e){let t=e.nodeAfter,r=e.node(0).resolve(e.pos+t.nodeSize);super(e,r),this.node=t}map(e,t){let{deleted:r,pos:i}=t.mapResult(this.anchor),s=e.resolve(i);return r?A.near(s):new T(s)}content(){return new S(b.from(this.node),0,0)}eq(e){return e instanceof T&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new fs(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new T(e.resolve(t.anchor))}static create(e,t){return new T(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}T.prototype.visible=!1;A.jsonID("node",T);class fs{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:r}=e.mapResult(this.anchor);return t?new br(r,r):new fs(r)}resolve(e){let t=e.resolve(this.anchor),r=t.nodeAfter;return r&&T.isSelectable(r)?new T(t):A.near(t)}}class ye extends A{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=S.empty){if(t==S.empty){e.delete(0,e.doc.content.size);let r=A.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new ye(e)}map(e){return new ye(e)}eq(e){return e instanceof ye}getBookmark(){return td}}A.jsonID("all",ye);const td={map(){return this},resolve(n){return new ye(n)}};function kt(n,e,t,r,i,s=!1){if(e.inlineContent)return N.create(n,t);for(let o=r-(i>0?0:1);i>0?o<e.childCount:o>=0;o+=i){let l=e.child(o);if(l.isAtom){if(!s&&T.isSelectable(l))return T.create(n,t-(i<0?l.nodeSize:0))}else{let a=kt(n,l,t+i,i<0?l.childCount:0,i,s);if(a)return a}t+=l.nodeSize*i}return null}function Gs(n,e,t){let r=n.steps.length-1;if(r<e)return;let i=n.steps[r];if(!(i instanceof q||i instanceof H))return;let s=n.mapping.maps[r],o;s.forEach((l,a,c,u)=>{o==null&&(o=u)}),n.setSelection(A.near(n.doc.resolve(o),t))}const Ys=1,pn=2,Xs=4;class nd extends Zl{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|Ys)&~pn,this.storedMarks=null,this}get selectionSet(){return(this.updated&Ys)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=pn,this}ensureMarks(e){return _.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&pn)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~pn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let r=this.selection;return t&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||_.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,r){let i=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(r==null&&(r=t),r=r??t,!e)return this.deleteRange(t,r);let s=this.storedMarks;if(!s){let o=this.doc.resolve(t);s=r==t?o.marks():o.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(t,r,i.text(e,s)),this.selection.empty||this.setSelection(A.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Xs,this}get scrolledIntoView(){return(this.updated&Xs)>0}}function Qs(n,e){return!e||!n?n:n.bind(e)}class Ht{constructor(e,t,r){this.name=e,this.init=Qs(t.init,r),this.apply=Qs(t.apply,r)}}const rd=[new Ht("doc",{init(n){return n.doc||n.schema.topNodeType.createAndFill()},apply(n){return n.doc}}),new Ht("selection",{init(n,e){return n.selection||A.atStart(e.doc)},apply(n){return n.selection}}),new Ht("storedMarks",{init(n){return n.storedMarks||null},apply(n,e,t,r){return r.selection.$cursor?n.storedMarks:null}}),new Ht("scrollToSelection",{init(){return 0},apply(n,e){return n.scrolledIntoView?e+1:e}})];class ci{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=rd.slice(),t&&t.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Ht(r.key,r.spec.state,r))})}}class Et{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=t){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],r=this.applyInner(e),i=null;for(;;){let s=!1;for(let o=0;o<this.config.plugins.length;o++){let l=this.config.plugins[o];if(l.spec.appendTransaction){let a=i?i[o].n:0,c=i?i[o].state:this,u=a<t.length&&l.spec.appendTransaction.call(l,a?t.slice(a):t,c,r);if(u&&r.filterTransaction(u,o)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<o?{state:r,n:t.length}:{state:this,n:0})}t.push(u),r=r.applyInner(u),s=!0}i&&(i[o]={state:r,n:t.length})}}if(!s)return{state:r,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new Et(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let s=r[i];t[s.name]=s.apply(e,this[s.name],this,t)}return t}get tr(){return new nd(this)}static create(e){let t=new ci(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new Et(t);for(let i=0;i<t.fields.length;i++)r[t.fields[i].name]=t.fields[i].init(e,r);return r}reconfigure(e){let t=new ci(this.schema,e.plugins),r=t.fields,i=new Et(t);for(let s=0;s<r.length;s++){let o=r[s].name;i[o]=this.hasOwnProperty(o)?this[o]:r[s].init(e,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[r],s=i.spec.state;s&&s.toJSON&&(t[r]=s.toJSON.call(i,this[i.key]))}return t}static fromJSON(e,t,r){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new ci(e.schema,e.plugins),s=new Et(i);return i.fields.forEach(o=>{if(o.name=="doc")s.doc=ct.fromJSON(e.schema,t.doc);else if(o.name=="selection")s.selection=A.fromJSON(s.doc,t.selection);else if(o.name=="storedMarks")t.storedMarks&&(s.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let a=r[l],c=a.spec.state;if(a.key==o.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){s[o.name]=c.fromJSON.call(a,e,t[l],s);return}}s[o.name]=o.init(e,s)}}),s}}function ea(n,e,t){for(let r in n){let i=n[r];i instanceof Function?i=i.bind(e):r=="handleDOMEvents"&&(i=ea(i,e,{})),t[r]=i}return t}class ne{constructor(e){this.spec=e,this.props={},e.props&&ea(e.props,this,this.props),this.key=e.key?e.key.key:ta("plugin")}getState(e){return e[this.key]}}const ui=Object.create(null);function ta(n){return n in ui?n+"$"+ ++ui[n]:(ui[n]=0,n+"$")}class oe{constructor(e="key"){this.key=ta(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Q=function(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e},Zt=function(n){let e=n.assignedSlot||n.parentNode;return e&&e.nodeType==11?e.host:e};let Zs=null;const Ie=function(n,e,t){let r=Zs||(Zs=document.createRange());return r.setEnd(n,t??n.nodeValue.length),r.setStart(n,e||0),r},ht=function(n,e,t,r){return t&&(eo(n,e,t,r,-1)||eo(n,e,t,r,1))},id=/^(img|br|input|textarea|hr)$/i;function eo(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:Te(n))){let s=n.parentNode;if(!s||s.nodeType!=1||hs(n)||id.test(n.nodeName)||n.contentEditable=="false")return!1;e=Q(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.contentEditable=="false")return!1;e=i<0?Te(n):0}else return!1}}function Te(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function sd(n,e,t){for(let r=e==0,i=e==Te(n);r||i;){if(n==t)return!0;let s=Q(n);if(n=n.parentNode,!n)return!1;r=r&&s==0,i=i&&s==Te(n)}}function hs(n){let e;for(let t=n;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==n||e.contentDOM==n)}const kr=function(n){return n.focusNode&&ht(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)};function nt(n,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=n,t.key=t.code=e,t}function od(n){let e=n.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function ld(n,e,t){if(n.caretPositionFromPoint)try{let r=n.caretPositionFromPoint(e,t);if(r)return{node:r.offsetNode,offset:r.offset}}catch{}if(n.caretRangeFromPoint){let r=n.caretRangeFromPoint(e,t);if(r)return{node:r.startContainer,offset:r.startOffset}}}const Me=typeof navigator<"u"?navigator:null,to=typeof document<"u"?document:null,Ze=Me&&Me.userAgent||"",Bi=/Edge\/(\d+)/.exec(Ze),na=/MSIE \d/.exec(Ze),$i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ze),se=!!(na||$i||Bi),Ue=na?document.documentMode:$i?+$i[1]:Bi?+Bi[1]:0,ke=!se&&/gecko\/(\d+)/i.test(Ze);ke&&+(/Firefox\/(\d+)/.exec(Ze)||[0,0])[1];const Fi=!se&&/Chrome\/(\d+)/.exec(Ze),J=!!Fi,ad=Fi?+Fi[1]:0,Z=!se&&!!Me&&/Apple Computer/.test(Me.vendor),Nt=Z&&(/Mobile\/\w+/.test(Ze)||!!Me&&Me.maxTouchPoints>2),fe=Nt||(Me?/Mac/.test(Me.platform):!1),cd=Me?/Win/.test(Me.platform):!1,ge=/Android \d/.test(Ze),cn=!!to&&"webkitFontSmoothing"in to.documentElement.style,ud=cn?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dd(n){return{left:0,right:n.documentElement.clientWidth,top:0,bottom:n.documentElement.clientHeight}}function Ae(n,e){return typeof n=="number"?n:n[e]}function fd(n){let e=n.getBoundingClientRect(),t=e.width/n.offsetWidth||1,r=e.height/n.offsetHeight||1;return{left:e.left,right:e.left+n.clientWidth*t,top:e.top,bottom:e.top+n.clientHeight*r}}function no(n,e,t){let r=n.someProp("scrollThreshold")||0,i=n.someProp("scrollMargin")||5,s=n.dom.ownerDocument;for(let o=t||n.dom;o;o=Zt(o)){if(o.nodeType!=1)continue;let l=o,a=l==s.body,c=a?dd(s):fd(l),u=0,d=0;if(e.top<c.top+Ae(r,"top")?d=-(c.top-e.top+Ae(i,"top")):e.bottom>c.bottom-Ae(r,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Ae(i,"top")-c.top:e.bottom-c.bottom+Ae(i,"bottom")),e.left<c.left+Ae(r,"left")?u=-(c.left-e.left+Ae(i,"left")):e.right>c.right-Ae(r,"right")&&(u=e.right-c.right+Ae(i,"right")),u||d)if(a)s.defaultView.scrollBy(u,d);else{let f=l.scrollLeft,h=l.scrollTop;d&&(l.scrollTop+=d),u&&(l.scrollLeft+=u);let p=l.scrollLeft-f,m=l.scrollTop-h;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(a||/^(fixed|sticky)$/.test(getComputedStyle(o).position))break}}function hd(n){let e=n.dom.getBoundingClientRect(),t=Math.max(0,e.top),r,i;for(let s=(e.left+e.right)/2,o=t+1;o<Math.min(innerHeight,e.bottom);o+=5){let l=n.root.elementFromPoint(s,o);if(!l||l==n.dom||!n.dom.contains(l))continue;let a=l.getBoundingClientRect();if(a.top>=t-20){r=l,i=a.top;break}}return{refDOM:r,refTop:i,stack:ra(n.dom)}}function ra(n){let e=[],t=n.ownerDocument;for(let r=n;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),n!=t);r=Zt(r));return e}function pd({refDOM:n,refTop:e,stack:t}){let r=n?n.getBoundingClientRect().top:0;ia(t,r==0?0:r-e)}function ia(n,e){for(let t=0;t<n.length;t++){let{dom:r,top:i,left:s}=n[t];r.scrollTop!=i+e&&(r.scrollTop=i+e),r.scrollLeft!=s&&(r.scrollLeft=s)}}let gt=null;function md(n){if(n.setActive)return n.setActive();if(gt)return n.focus(gt);let e=ra(n);n.focus(gt==null?{get preventScroll(){return gt={preventScroll:!0},!0}}:void 0),gt||(gt=!1,ia(e,0))}function sa(n,e){let t,r=2e8,i,s=0,o=e.top,l=e.top,a,c;for(let u=n.firstChild,d=0;u;u=u.nextSibling,d++){let f;if(u.nodeType==1)f=u.getClientRects();else if(u.nodeType==3)f=Ie(u).getClientRects();else continue;for(let h=0;h<f.length;h++){let p=f[h];if(p.top<=o&&p.bottom>=l){o=Math.max(p.bottom,o),l=Math.min(p.top,l);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<r){t=u,r=m,i=m&&t.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(s=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!a&&p.left<=e.left&&p.right>=e.left&&(a=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!t&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(s=d+1)}}return!t&&a&&(t=a,i=c,r=0),t&&t.nodeType==3?gd(t,i):!t||r&&t.nodeType==1?{node:n,offset:s}:sa(t,i)}function gd(n,e){let t=n.nodeValue.length,r=document.createRange();for(let i=0;i<t;i++){r.setEnd(n,i+1),r.setStart(n,i);let s=Fe(r,1);if(s.top!=s.bottom&&ps(e,s))return{node:n,offset:i+(e.left>=(s.left+s.right)/2?1:0)}}return{node:n,offset:0}}function ps(n,e){return n.left>=e.left-1&&n.left<=e.right+1&&n.top>=e.top-1&&n.top<=e.bottom+1}function yd(n,e){let t=n.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<n.getBoundingClientRect().left?t:n}function bd(n,e,t){let{node:r,offset:i}=sa(e,t),s=-1;if(r.nodeType==1&&!r.firstChild){let o=r.getBoundingClientRect();s=o.left!=o.right&&t.left>(o.left+o.right)/2?1:-1}return n.docView.posFromDOM(r,i,s)}function kd(n,e,t,r){let i=-1;for(let s=e,o=!1;s!=n.dom;){let l=n.docView.nearestDesc(s,!0);if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent&&!o||!l.contentDOM)){let a=l.dom.getBoundingClientRect();if(l.node.isBlock&&l.parent&&!o&&(o=!0,a.left>r.left||a.top>r.top?i=l.posBefore:(a.right<r.left||a.bottom<r.top)&&(i=l.posAfter)),!l.contentDOM&&i<0&&!l.node.isText)return(l.node.isBlock?r.top<(a.top+a.bottom)/2:r.left<(a.left+a.right)/2)?l.posBefore:l.posAfter}s=l.dom.parentNode}return i>-1?i:n.docView.posFromDOM(e,t,-1)}function oa(n,e,t){let r=n.childNodes.length;if(r&&t.top<t.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-t.top)/(t.bottom-t.top))-2)),s=i;;){let o=n.childNodes[s];if(o.nodeType==1){let l=o.getClientRects();for(let a=0;a<l.length;a++){let c=l[a];if(ps(e,c))return oa(o,e,c)}}if((s=(s+1)%r)==i)break}return n}function Sd(n,e){let t=n.dom.ownerDocument,r,i=0,s=ld(t,e.left,e.top);s&&({node:r,offset:i}=s);let o=(n.root.elementFromPoint?n.root:t).elementFromPoint(e.left,e.top),l;if(!o||!n.dom.contains(o.nodeType!=1?o.parentNode:o)){let c=n.dom.getBoundingClientRect();if(!ps(e,c)||(o=oa(n.dom,e,c),!o))return null}if(Z)for(let c=o;r&&c;c=Zt(c))c.draggable&&(r=void 0);if(o=yd(o,e),r){if(ke&&r.nodeType==1&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let u=r.childNodes[i],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let c;cn&&i&&r.nodeType==1&&(c=r.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,r==n.dom&&i==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=n.state.doc.content.size:(i==0||r.nodeType!=1||r.childNodes[i-1].nodeName!="BR")&&(l=kd(n,r,i,e))}l==null&&(l=bd(n,o,e));let a=n.docView.nearestDesc(o,!0);return{pos:l,inside:a?a.posAtStart-a.border:-1}}function ro(n){return n.top<n.bottom||n.left<n.right}function Fe(n,e){let t=n.getClientRects();if(t.length){let r=t[e<0?0:t.length-1];if(ro(r))return r}return Array.prototype.find.call(t,ro)||n.getBoundingClientRect()}const Od=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function la(n,e,t){let{node:r,offset:i,atom:s}=n.docView.domFromPos(e,t<0?-1:1),o=cn||ke;if(r.nodeType==3)if(o&&(Od.test(r.nodeValue)||(t<0?!i:i==r.nodeValue.length))){let a=Fe(Ie(r,i,i),t);if(ke&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let c=Fe(Ie(r,i-1,i-1),-1);if(c.top==a.top){let u=Fe(Ie(r,i,i+1),-1);if(u.top!=a.top)return Bt(u,u.left<c.left)}}return a}else{let a=i,c=i,u=t<0?1:-1;return t<0&&!i?(c++,u=-1):t>=0&&i==r.nodeValue.length?(a--,u=1):t<0?a--:c++,Bt(Fe(Ie(r,a,c),u),u<0)}if(!n.state.doc.resolve(e-(s||0)).parent.inlineContent){if(s==null&&i&&(t<0||i==Te(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return di(a.getBoundingClientRect(),!1)}if(s==null&&i<Te(r)){let a=r.childNodes[i];if(a.nodeType==1)return di(a.getBoundingClientRect(),!0)}return di(r.getBoundingClientRect(),t>=0)}if(s==null&&i&&(t<0||i==Te(r))){let a=r.childNodes[i-1],c=a.nodeType==3?Ie(a,Te(a)-(o?0:1)):a.nodeType==1&&(a.nodeName!="BR"||!a.nextSibling)?a:null;if(c)return Bt(Fe(c,1),!1)}if(s==null&&i<Te(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let c=a?a.nodeType==3?Ie(a,0,o?0:1):a.nodeType==1?a:null:null;if(c)return Bt(Fe(c,-1),!0)}return Bt(Fe(r.nodeType==3?Ie(r):r,-t),t>=0)}function Bt(n,e){if(n.width==0)return n;let t=e?n.left:n.right;return{top:n.top,bottom:n.bottom,left:t,right:t}}function di(n,e){if(n.height==0)return n;let t=e?n.top:n.bottom;return{top:t,bottom:t,left:n.left,right:n.right}}function aa(n,e,t){let r=n.state,i=n.root.activeElement;r!=e&&n.updateState(e),i!=n.dom&&n.focus();try{return t()}finally{r!=e&&n.updateState(r),i!=n.dom&&i&&i.focus()}}function xd(n,e,t){let r=e.selection,i=t=="up"?r.$from:r.$to;return aa(n,e,()=>{let{node:s}=n.docView.domFromPos(i.pos,t=="up"?-1:1);for(;;){let l=n.docView.nearestDesc(s,!0);if(!l)break;if(l.node.isBlock){s=l.contentDOM||l.dom;break}s=l.dom.parentNode}let o=la(n,i.pos,1);for(let l=s.firstChild;l;l=l.nextSibling){let a;if(l.nodeType==1)a=l.getClientRects();else if(l.nodeType==3)a=Ie(l,0,l.nodeValue.length).getClientRects();else continue;for(let c=0;c<a.length;c++){let u=a[c];if(u.bottom>u.top+1&&(t=="up"?o.top-u.top>(u.bottom-o.top)*2:u.bottom-o.bottom>(o.bottom-u.top)*2))return!1}}return!0})}const Ed=/[\u0590-\u08ac]/;function Td(n,e,t){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,s=!i,o=i==r.parent.content.size,l=n.domSelection();return!Ed.test(r.parent.textContent)||!l.modify?t=="left"||t=="backward"?s:o:aa(n,e,()=>{let{focusNode:a,focusOffset:c,anchorNode:u,anchorOffset:d}=n.domSelectionRange(),f=l.caretBidiLevel;l.modify("move",t,"character");let h=r.depth?n.docView.domAfterPos(r.before()):n.dom,{focusNode:p,focusOffset:m}=n.domSelectionRange(),g=p&&!h.contains(p.nodeType==1?p:p.parentNode)||a==p&&c==m;try{l.collapse(u,d),a&&(a!=u||c!=d)&&l.extend&&l.extend(a,c)}catch{}return f!=null&&(l.caretBidiLevel=f),g})}let io=null,so=null,oo=!1;function vd(n,e,t){return io==e&&so==t?oo:(io=e,so=t,oo=t=="up"||t=="down"?xd(n,e,t):Td(n,e,t))}const he=0,lo=1,rt=2,we=3;class un{constructor(e,t,r,i){this.parent=e,this.children=t,this.dom=r,this.contentDOM=i,this.dirty=he,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,r=this.posAtStart;;t++){let i=this.children[t];if(i==e)return r;r+=i.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let s,o;if(e==this.contentDOM)s=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.previousSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.previousSibling;return s?this.posBeforeChild(o)+o.size:this.posAtStart}else{let s,o;if(e==this.contentDOM)s=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;s=e.nextSibling}for(;s&&!((o=s.pmViewDesc)&&o.parent==this);)s=s.nextSibling;return s?this.posBeforeChild(o):this.posAtEnd}let i;if(e==this.dom&&this.contentDOM)i=t>Q(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!1;break}if(s.previousSibling)break}if(i==null&&t==e.childNodes.length)for(let s=e;;s=s.parentNode){if(s==this.dom){i=!0;break}if(s.nextSibling)break}}return i??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let r=!0,i=e;i;i=i.parentNode){let s=this.getDesc(i),o;if(s&&(!t||s.node))if(r&&(o=s.nodeDOM)&&!(o.nodeType==1?o.contains(e.nodeType==1?e:e.parentNode):o==e))r=!1;else return s}}getDesc(e){let t=e.pmViewDesc;for(let r=t;r;r=r.parent)if(r==this)return t}posFromDOM(e,t,r){for(let i=e;i;i=i.parentNode){let s=this.getDesc(i);if(s)return s.localPosFromDOM(e,t,r)}return-1}descAt(e){for(let t=0,r=0;t<this.children.length;t++){let i=this.children[t],s=r+i.size;if(r==e&&s!=r){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<s)return i.descAt(e-r-i.border);r=s}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,i=0;for(let s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.size;if(l>e||o instanceof ua){i=e-s;break}s=l}if(i)return this.children[r].domFromPos(i-this.children[r].border,t);for(let s;r&&!(s=this.children[r-1]).size&&s instanceof ca&&s.side>=0;r--);if(t<=0){let s,o=!0;for(;s=r?this.children[r-1]:null,!(!s||s.dom.parentNode==this.contentDOM);r--,o=!1);return s&&t&&o&&!s.border&&!s.domAtom?s.domFromPos(s.size,t):{node:this.contentDOM,offset:s?Q(s.dom)+1:0}}else{let s,o=!0;for(;s=r<this.children.length?this.children[r]:null,!(!s||s.dom.parentNode==this.contentDOM);r++,o=!1);return s&&o&&!s.border&&!s.domAtom?s.domFromPos(0,t):{node:this.contentDOM,offset:s?Q(s.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,s=-1;for(let o=r,l=0;;l++){let a=this.children[l],c=o+a.size;if(i==-1&&e<=c){let u=o+a.border;if(e>=u&&t<=c-a.border&&a.node&&a.contentDOM&&this.contentDOM.contains(a.contentDOM))return a.parseRange(e,t,u);e=o;for(let d=l;d>0;d--){let f=this.children[d-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){i=Q(f.dom)+1;break}e-=f.size}i==-1&&(i=0)}if(i>-1&&(c>t||l==this.children.length-1)){t=c;for(let u=l+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){s=Q(d.dom);break}t+=d.size}s==-1&&(s=this.contentDOM.childNodes.length);break}o=c}return{node:this.contentDOM,from:e,to:t,fromOffset:i,toOffset:s}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:r}=this.domFromPos(e,0);if(t.nodeType!=1||r==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[r]}setSelection(e,t,r,i=!1){let s=Math.min(e,t),o=Math.max(e,t);for(let f=0,h=0;f<this.children.length;f++){let p=this.children[f],m=h+p.size;if(s>h&&o<m)return p.setSelection(e-h-p.border,t-h-p.border,r,i);h=m}let l=this.domFromPos(e,e?-1:1),a=t==e?l:this.domFromPos(t,t?-1:1),c=r.getSelection(),u=!1;if((ke||Z)&&e==t){let{node:f,offset:h}=l;if(f.nodeType==3){if(u=!!(h&&f.nodeValue[h-1]==`
@@ -1,6 +1,6 @@
1
1
  import { n as ee, g as Ti, a as Xa, u as Qa, b as Za, B as ec, c as tc, i as nc, d as rc, e as ic, f as As, t as sl, h as sc, l as oc } from "./tooltip-QB-zD49d.js";
2
2
  import Ie, { markRaw as ol } from "vue";
3
- import { B as lc, w as hr, I as ac, L as cc, C as uc, t as ll, D as al, E as dc, m as fc, o as cl } from "./index-w3NKtwEr.js";
3
+ import { B as lc, w as hr, I as ac, L as cc, C as uc, t as ll, D as al, E as dc, m as fc, o as cl } from "./index-i-V6G-jv.js";
4
4
  const Lt = {
5
5
  BUSY: "busy",
6
6
  AWAY: "away",
@@ -824,7 +824,7 @@ const Zc = Qc.exports, ut = {
824
824
  row: "row",
825
825
  "row-reverse": "row-reverse",
826
826
  "column-reverse": "column-reverse"
827
- }, dl = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "500", "600"], Ds = {
827
+ }, dl = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "450", "500", "600"], Ds = {
828
828
  none: void 0,
829
829
  small: "d-p4",
830
830
  medium: "d-p8",