@dialpad/dialtone-vue 2.113.0 → 2.114.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +19 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +1 -1
  5. package/dist/dialtone-vue.js +7 -7
  6. package/dist/directives.cjs +1 -1
  7. package/dist/directives.js +1 -1
  8. package/dist/emoji.cjs +1 -1
  9. package/dist/emoji.js +4 -4
  10. package/dist/{emoji_picker-50hU6Bus.cjs → emoji_picker-G_dpCtLb.cjs} +1 -1
  11. package/dist/{emoji_picker-3cVhhlbr.js → emoji_picker-H4Qp2wF5.js} +2 -2
  12. package/dist/{emoji_text_wrapper-45075bUQ.js → emoji_text_wrapper-B6LYaq-4.js} +6 -7
  13. package/dist/emoji_text_wrapper-HXzlY5eZ.cjs +1 -0
  14. package/dist/{index-NG2T0qK1.js → index-ASOzBdZi.js} +1009 -997
  15. package/dist/index-Fi4GXrPf.cjs +1 -0
  16. package/dist/message_input.cjs +1 -1
  17. package/dist/message_input.js +4 -4
  18. package/dist/{rich_text_editor-E7mcsC-J.cjs → rich_text_editor-HGWAxljc.cjs} +2 -2
  19. package/dist/{rich_text_editor-sxTdV897.js → rich_text_editor-hvsobGV1.js} +3 -3
  20. package/dist/style.css +1 -1
  21. package/dist/{tooltip-RmgCyjmY.cjs → tooltip-R7LTeOZf.cjs} +5 -5
  22. package/dist/{tooltip-UOWkfPpb.js → tooltip-vREVnN_1.js} +282 -263
  23. package/dist/types/components/emoji_text_wrapper/emoji_text_wrapper.vue.d.ts.map +1 -1
  24. package/dist/types/components/tooltip/tooltip.vue.d.ts +33 -1
  25. package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  26. package/dist/types/components/tooltip/tooltip_constants.d.ts +2 -0
  27. package/dist/types/components/tooltip/tooltip_constants.d.ts.map +1 -1
  28. package/package.json +4 -4
  29. package/dist/emoji_text_wrapper-dc6a_C0K.cjs +0 -1
  30. package/dist/index-8ytmeBCH.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./rich_text_editor-E7mcsC-J.cjs"),a=require("./index-8ytmeBCH.cjs"),l=require("./emoji_picker-50hU6Bus.cjs"),s=require("./tooltip-RmgCyjmY.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-HGWAxljc.cjs"),a=require("./index-Fi4GXrPf.cjs"),l=require("./emoji_picker-G_dpCtLb.cjs"),s=require("./tooltip-R7LTeOZf.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,7 +1,7 @@
1
- import { D as o, a as s, R as r, b as l } from "./rich_text_editor-sxTdV897.js";
2
- import { t as u, w as c, x as d } from "./index-NG2T0qK1.js";
3
- import { D as m } from "./emoji_picker-3cVhhlbr.js";
4
- import { n as p, D as f } from "./tooltip-UOWkfPpb.js";
1
+ import { D as o, a as s, R as r, b as l } from "./rich_text_editor-hvsobGV1.js";
2
+ import { t as u, w as c, x as d } from "./index-ASOzBdZi.js";
3
+ import { D as m } from "./emoji_picker-H4Qp2wF5.js";
4
+ import { n as p, D as f } from "./tooltip-vREVnN_1.js";
5
5
  import "vue";
6
6
  const h = {
7
7
  name: "DtRecipeMessageInput",
@@ -1,4 +1,4 @@
1
- "use strict";const I=require("./tooltip-RmgCyjmY.cjs"),be=require("vue"),G=require("./index-8ytmeBCH.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
1
+ "use strict";const I=require("./tooltip-R7LTeOZf.cjs"),be=require("vue"),G=require("./index-Fi4GXrPf.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
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(`
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(`
@@ -94,4 +94,4 @@ img.ProseMirror-separator {
94
94
  `,yg="️",bg="‍";let yn=null,bn=null;function kg(n){n===void 0&&(n=[]);const e={};ie.groups=e;const t=new ie;yn==null&&(yn=Yo(dg)),bn==null&&(bn=Yo(fg)),k(t,"'",nr),k(t,"{",Ut),k(t,"}",Jt),k(t,"[",Hn),k(t,"]",jn),k(t,"(",Vn),k(t,")",qn),k(t,"<",Kn),k(t,">",Wn),k(t,"(",Un),k(t,")",Jn),k(t,"「",Gn),k(t,"」",Yn),k(t,"『",Xn),k(t,"』",Qn),k(t,"<",Zn),k(t,">",er),k(t,"&",tr),k(t,"*",rr),k(t,"@",He),k(t,"`",sr),k(t,"^",or),k(t,":",Ve),k(t,",",As),k(t,"$",lr),k(t,".",Oe),k(t,"=",ar),k(t,"!",Ns),k(t,"-",xe),k(t,"%",cr),k(t,"|",ur),k(t,"+",dr),k(t,"#",fr),k(t,"?",hr),k(t,'"',Ps),k(t,"/",Ee),k(t,";",Is),k(t,"~",Gt),k(t,"_",pr),k(t,"\\",ir);const r=ue(t,vi,Ms,{[Yi]:!0});ue(r,vi,r);const i=ue(t,bt,Pe,{[Xi]:!0});ue(i,bt,i);const s=ue(t,Ei,es,{[Qi]:!0});ue(s,bt),ue(s,Ei,s);const o=ue(t,Jo,tc,{[Wo]:!0});k(t,Go,ws,{[Wo]:!0}),k(o,Go),ue(o,Jo,o);const l=ue(t,Ti,nc,{[ec]:!0});ue(l,Ti,l),k(l,yg,l);const a=k(l,bg);ue(a,Ti,l);const c=[[bt,i]],u=[[bt,null],[Ei,s]];for(let d=0;d<yn.length;d++)$e(t,yn[d],ts,Pe,c);for(let d=0;d<bn.length;d++)$e(t,bn[d],ns,es,u);ot(ts,{tld:!0,ascii:!0},e),ot(ns,{utld:!0,alpha:!0},e),$e(t,"file",Cn,Pe,c),$e(t,"mailto",Cn,Pe,c),$e(t,"http",Ot,Pe,c),$e(t,"https",Ot,Pe,c),$e(t,"ftp",Ot,Pe,c),$e(t,"ftps",Ot,Pe,c),ot(Cn,{scheme:!0,ascii:!0},e),ot(Ot,{slashscheme:!0,ascii:!0},e),n=n.sort((d,f)=>d[0]>f[0]?1:-1);for(let d=0;d<n.length;d++){const f=n[d][0],p=n[d][1]?{[hg]:!0}:{[pg]:!0};f.indexOf("-")>=0?p[Zi]=!0:bt.test(f)?vi.test(f)?p[vn]=!0:p[Xi]=!0:p[Yi]=!0,Uo(t,f,f,p)}return Uo(t,"localhost",ln,{ascii:!0}),t.jd=new ie(mr),{start:t,tokens:Dt({groups:e},rc)}}function Sg(n,e){const t=Og(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=t.length,i=[];let s=0,o=0;for(;o<r;){let l=n,a=null,c=0,u=null,d=-1,f=-1;for(;o<r&&(a=l.go(t[o]));)l=a,l.accepts()?(d=0,f=0,u=l):d>=0&&(d+=t[o].length,f++),c+=t[o].length,s+=t[o].length,o++;s-=d,o-=f,c-=d,i.push({t:u.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function Og(n){const e=[],t=n.length;let r=0;for(;r<t;){let i=n.charCodeAt(r),s,o=i<55296||i>56319||r+1===t||(s=n.charCodeAt(r+1))<56320||s>57343?n[r]:n.slice(r,r+2);e.push(o),r+=o.length}return e}function $e(n,e,t,r,i){let s;const o=e.length;for(let l=0;l<o-1;l++){const a=e[l];n.j[a]?s=n.j[a]:(s=new ie(r),s.jr=i.slice(),n.j[a]=s),n=s}return s=new ie(t),s.jr=i.slice(),n.j[e[o-1]]=s,s}function Yo(n){const e=[],t=[];let r=0,i="0123456789";for(;r<n.length;){let s=0;for(;i.indexOf(n[r+s])>=0;)s++;if(s>0){e.push(t.join(""));for(let o=parseInt(n.substring(r,r+s),10);o>0;o--)t.pop();r+=s}else t.push(n[r]),r++}return e}const an={defaultProtocol:"http",events:null,format:Xo,formatHref:Xo,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ds(n,e){e===void 0&&(e=null);let t=Dt({},an);n&&(t=Dt(t,n instanceof Ds?n.o:n));const r=t.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=i}Ds.prototype={o:an,ignoreTags:[],defaultRender(n){return n},check(n){return this.get("validate",n.toString(),n)},get(n,e,t){const r=e!=null;let i=this.o[n];return i&&(typeof i=="object"?(i=t.t in i?i[t.t]:an[n],typeof i=="function"&&r&&(i=i(e,t))):typeof i=="function"&&r&&(i=i(e,t.t,t)),i)},getObj(n,e,t){let r=this.o[n];return typeof r=="function"&&e!=null&&(r=r(e,t.t,t)),r},render(n){const e=n.render(this);return(this.get("render",null,n)||this.defaultRender)(e,n.t,n)}};function Xo(n){return n}function ic(n,e){this.t="token",this.v=n,this.tk=e}ic.prototype={isLink:!1,toString(){return this.v},toHref(n){return this.toString()},toFormattedString(n){const e=this.toString(),t=n.get("truncate",e,this),r=n.get("format",e,this);return t&&r.length>t?r.substring(0,t)+"…":r},toFormattedHref(n){return n.get("formatHref",this.toHref(n.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(n){return n===void 0&&(n=an.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(n),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(n){return{type:this.t,value:this.toFormattedString(n),isLink:this.isLink,href:this.toFormattedHref(n),start:this.startIndex(),end:this.endIndex()}},validate(n){return n.get("validate",this.toString(),this)},render(n){const e=this,t=this.toHref(n.get("defaultProtocol")),r=n.get("formatHref",t,this),i=n.get("tagName",t,e),s=this.toFormattedString(n),o={},l=n.get("className",t,e),a=n.get("target",t,e),c=n.get("rel",t,e),u=n.getObj("attributes",t,e),d=n.getObj("events",t,e);return o.href=r,l&&(o.class=l),a&&(o.target=a),c&&(o.rel=c),u&&Dt(o,u),{tagName:i,attributes:o,content:s,eventListeners:d}}};function Qr(n,e){class t extends ic{constructor(i,s){super(i,s),this.t=n}}for(const r in e)t.prototype[r]=e[r];return t.t=n,t}const Qo=Qr("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Zo=Qr("text"),xg=Qr("nl"),kn=Qr("url",{isLink:!0,toHref(n){return n===void 0&&(n=an.defaultProtocol),this.hasProtocol()?this.v:`${n}://${this.v}`},hasProtocol(){const n=this.tk;return n.length>=2&&n[0].t!==ln&&n[1].t===Ve}}),de=n=>new ie(n);function Eg(n){let{groups:e}=n;const t=e.domain.concat([tr,rr,He,ir,sr,or,lr,ar,xe,Ms,cr,ur,dr,fr,Ee,mr,Gt,pr]),r=[nr,Ve,As,Oe,Ns,hr,Ps,Is,Kn,Wn,Ut,Jt,jn,Hn,Vn,qn,Un,Jn,Gn,Yn,Xn,Qn,Zn,er],i=[tr,nr,rr,ir,sr,or,lr,ar,xe,Ut,Jt,cr,ur,dr,fr,hr,Ee,mr,Gt,pr],s=de(),o=k(s,Gt);M(o,i,o),M(o,e.domain,o);const l=de(),a=de(),c=de();M(s,e.domain,l),M(s,e.scheme,a),M(s,e.slashscheme,c),M(l,i,o),M(l,e.domain,l);const u=k(l,He);k(o,He,u),k(a,He,u),k(c,He,u);const d=k(o,Oe);M(d,i,o),M(d,e.domain,o);const f=de();M(u,e.domain,f),M(f,e.domain,f);const h=k(f,Oe);M(h,e.domain,f);const p=de(Qo);M(h,e.tld,p),M(h,e.utld,p),k(u,ln,p);const m=k(f,xe);M(m,e.domain,f),M(p,e.domain,f),k(p,Oe,h),k(p,xe,m);const g=k(p,Ve);M(g,e.numeric,Qo);const y=k(l,xe),x=k(l,Oe);M(y,e.domain,l),M(x,i,o),M(x,e.domain,l);const v=de(kn);M(x,e.tld,v),M(x,e.utld,v),M(v,e.domain,l),M(v,i,o),k(v,Oe,x),k(v,xe,y),k(v,He,u);const R=k(v,Ve),D=de(kn);M(R,e.numeric,D);const C=de(kn),L=de();M(C,t,C),M(C,r,L),M(L,t,C),M(L,r,L),k(v,Ee,C),k(D,Ee,C);const P=k(a,Ve),E=k(c,Ve),W=k(E,Ee),me=k(W,Ee);M(a,e.domain,l),k(a,Oe,x),k(a,xe,y),M(c,e.domain,l),k(c,Oe,x),k(c,xe,y),M(P,e.domain,C),k(P,Ee,C),M(me,e.domain,C),M(me,t,C),k(me,Ee,C);const tt=[[Ut,Jt],[Hn,jn],[Vn,qn],[Kn,Wn],[Un,Jn],[Gn,Yn],[Xn,Qn],[Zn,er]];for(let _t=0;_t<tt.length;_t++){const[Re,_e]=tt[_t],Le=k(C,Re);k(L,Re,Le),k(Le,_e,C);const le=de(kn);M(Le,t,le);const Be=de();M(Le,r),M(le,t,le),M(le,r,Be),M(Be,t,le),M(Be,r,Be),k(le,_e,C),k(Be,_e,C)}return k(s,ln,v),k(s,ws,xg),{start:s,tokens:rc}}function Tg(n,e,t){let r=t.length,i=0,s=[],o=[];for(;i<r;){let l=n,a=null,c=null,u=0,d=null,f=-1;for(;i<r&&!(a=l.go(t[i].t));)o.push(t[i++]);for(;i<r&&(c=a||l.go(t[i].t));)a=null,l=c,l.accepts()?(f=0,d=l):f>=0&&f++,i++,u++;if(f<0)i-=u,i<r&&(o.push(t[i]),i++);else{o.length>0&&(s.push(Ci(Zo,e,o)),o=[]),i-=f,u-=f;const h=d.t,p=t.slice(i-u,i);s.push(Ci(h,e,p))}}return o.length>0&&s.push(Ci(Zo,e,o)),s}function Ci(n,e,t){const r=t[0].s,i=t[t.length-1].e,s=e.slice(r,i);return new n(s,t)}const vg=typeof console<"u"&&console&&console.warn||(()=>{}),Cg="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",B={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Mg(){ie.groups={},B.scanner=null,B.parser=null,B.tokenQueue=[],B.pluginQueue=[],B.customSchemes=[],B.initialized=!1}function el(n,e){if(e===void 0&&(e=!1),B.initialized&&vg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${Cg}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))throw new Error(`linkifyjs: incorrect scheme format.
95
95
  1. Must only contain digits, lowercase ASCII letters or "-"
96
96
  2. Cannot start or end with "-"
97
- 3. "-" cannot repeat`);B.customSchemes.push([n,e])}function wg(){B.scanner=kg(B.customSchemes);for(let n=0;n<B.tokenQueue.length;n++)B.tokenQueue[n][1]({scanner:B.scanner});B.parser=Eg(B.scanner.tokens);for(let n=0;n<B.pluginQueue.length;n++)B.pluginQueue[n][1]({scanner:B.scanner,parser:B.parser});B.initialized=!0}function Ag(n){return B.initialized||wg(),Tg(B.parser.start,n,Sg(B.scanner.start,n))}function Rs(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Ds(t),i=Ag(n),s=[];for(let o=0;o<i.length;o++){const l=i[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function Ng(n){return new ne({key:new oe("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,l=Ua(t.doc,[...e]);if(Ya(l).forEach(({newRange:c})=>{const u=Ja(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(g=>g!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;Rs(p).filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>n.validate?n.validate(g.value):!0).forEach(g=>{Nr(g.from,g.to,r.doc).some(y=>y.mark.type===n.type)||o.addMark(g.from,g.to,n.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function Pg(n){return new ne({key:new oe("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Ga(e.state,n.type.name),a=r.target,c=(i=a==null?void 0:a.href)!==null&&i!==void 0?i:l.href,u=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function Ig(n){return new ne({key:new oe("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:s}=i,{empty:o}=s;if(o)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const a=Rs(l).find(c=>c.isLink&&c.value===l);return!l||!a?!1:(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}})}const Dg=pe.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){el(n);return}el(n.scheme,n.optionalSlashes)})},onDestroy(){Mg()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){var e;return!((e=n.href)===null||e===void 0)&&e.startsWith("javascript:")?["a",$(this.options.HTMLAttributes,{...n,href:""}),0]:["a",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[It({find:(n,e)=>{var t;const r=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),i=[];if(r){const s=new DOMParser().parseFromString(r,"text/html"),o=s.querySelectorAll("a");o.length&&[...o].forEach(l=>i.push({text:l.innerText,data:{href:l.getAttribute("href")},index:s.body.innerText.indexOf(l.innerText)+l.innerText.length}))}if(n){const s=Rs(n).filter(o=>o.isLink);s.length&&s.forEach(o=>i.push({text:o.value,data:{href:o.href},index:o.start}))}return i},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(Ng({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(Pg({type:this.type})),this.options.linkOnPaste&&n.push(Ig({editor:this.editor,type:this.type})),n}}),Rg=Y.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",$(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),_g=Y.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",$(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tl=pe.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",$(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ar(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),nl=/^(\d+)\.\s$/,Lg=Y.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",$(this.options.HTMLAttributes,t),0]:["ol",$(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_g.name,this.editor.getAttributes(tl.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=on({find:nl,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=on({find:nl,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tl.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Bg=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,$g=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Fg=pe.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){const n={};return Ts()?n["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():n["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),n},addInputRules(){return[sn({find:Bg,type:this.type})]},addPasteRules(){return[It({find:$g,type:this.type})]}}),zg=pe.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Hg=Y.create({name:"text",group:"inline"}),jg=Se.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Vg={name:"EmojiComponent",components:{NodeViewWrapper:Xa,DtEmoji:G.DtEmoji},props:Qa};var qg=function(){var e=this,t=e._self._c;return t("node-view-wrapper",{staticClass:"d-d-inline-block"},[t("dt-emoji",{attrs:{size:"300",code:e.node.attrs.code}})],1)},Kg=[],Wg=I.normalizeComponent(Vg,qg,Kg,!1,null,null,null,null);const Ug=Wg.exports;function Jg(n){var e;const{char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:o}=n,l=Zp(t),a=new RegExp(`\\s${l}$`),c=s?"^":"",u=r?new RegExp(`${c}${l}.*?(?=\\s${l}|$)`,"gm"):new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`,"gm"),d=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!d)return null;const f=o.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const p=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(p);if(i!==null&&!m)return null;const g=f+h.index;let y=g+h[0].length;return r&&a.test(d.slice(y-1,y+1))&&(h[0]+=" ",y+=1),g<o.pos&&y>=o.pos?{range:{from:g,to:y},query:h[0].slice(t.length),text:h[0]}:null}const Gg=new oe("suggestion");function sc({pluginKey:n=Gg,editor:e,char:t="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:l="suggestion",command:a=()=>null,items:c=()=>[],render:u=()=>({}),allow:d=()=>!0}){let f;const h=u==null?void 0:u(),p=new ne({key:n,view(){return{update:async(m,g)=>{var y,x,v,R,D,C,L;const P=(y=this.key)===null||y===void 0?void 0:y.getState(g),E=(x=this.key)===null||x===void 0?void 0:x.getState(m.state),W=P.active&&E.active&&P.range.from!==E.range.from,me=!P.active&&E.active,tt=P.active&&!E.active,_t=!me&&!tt&&P.query!==E.query,Re=me||W,_e=_t&&!W,Le=tt||W;if(!Re&&!_e&&!Le)return;const le=Le&&!Re?P:E,Be=m.dom.querySelector(`[data-decoration-id="${le.decorationId}"]`);f={editor:e,range:le.range,query:le.query,text:le.text,items:[],command:Lt=>{a({editor:e,range:le.range,props:Lt})},decorationNode:Be,clientRect:Be?()=>{var Lt;const{decorationId:cc}=(Lt=this.key)===null||Lt===void 0?void 0:Lt.getState(e.state),Zr=m.dom.querySelector(`[data-decoration-id="${cc}"]`);return(Zr==null?void 0:Zr.getBoundingClientRect())||null}:null},Re&&((v=h==null?void 0:h.onBeforeStart)===null||v===void 0||v.call(h,f)),_e&&((R=h==null?void 0:h.onBeforeUpdate)===null||R===void 0||R.call(h,f)),(_e||Re)&&(f.items=await c({editor:e,query:le.query})),Le&&((D=h==null?void 0:h.onExit)===null||D===void 0||D.call(h,f)),_e&&((C=h==null?void 0:h.onUpdate)===null||C===void 0||C.call(h,f)),Re&&((L=h==null?void 0:h.onStart)===null||L===void 0||L.call(h,f))},destroy:()=>{var m;f&&((m=h==null?void 0:h.onExit)===null||m===void 0||m.call(h,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(m,g,y,x){const{isEditable:v}=e,{composing:R}=e.view,{selection:D}=m,{empty:C,from:L}=D,P={...g};if(P.composing=R,v&&(C||e.view.composing)){(L<g.range.from||L>g.range.to)&&!R&&!g.composing&&(P.active=!1);const E=Jg({char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:D.$from}),W=`id_${Math.floor(Math.random()*4294967295)}`;E&&d({editor:e,state:x,range:E.range})?(P.active=!0,P.decorationId=g.decorationId?g.decorationId:W,P.range=E.range,P.query=E.query,P.text=E.text):P.active=!1}else P.active=!1;return P.active||(P.decorationId=null,P.range={from:0,to:0},P.query=null,P.text=null),P}},props:{handleKeyDown(m,g){var y;const{active:x,range:v}=p.getState(m.state);return x&&((y=h==null?void 0:h.onKeyDown)===null||y===void 0?void 0:y.call(h,{view:m,event:g,range:v}))||!1},decorations(m){const{active:g,range:y,decorationId:x}=p.getState(m);return g?F.create(m.doc,[ce.inline(y.from,y.to,{nodeName:o,class:l,"data-decoration-id":x})]):null}}});return p}const Yg={name:"SuggestionList",components:{DtListItem:bl},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),n.stopPropagation(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},scrollActiveElementIntoView(){const n=this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");n&&n.scrollIntoView({behaviour:"smooth",block:"center"})},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(n){const e=this.items[n];switch(this.itemType){case"emoji":this.command(e);return;case"mention":this.command({name:e.name,id:e.contactId,avatarSrc:e.avatarSrc});break}}}};var Xg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-popover__dialog"},[t("ul",{directives:[{name:"show",rawName:"v-show",value:e.items.length,expression:"items.length"}],ref:"suggestionList",staticClass:"dt-suggestion-list"},e._l(e.items,function(r,i){return t("dt-list-item",{key:r.id,class:["dt-suggestion-list--item",{"dt-list-item--highlighted":i===e.selectedIndex}],attrs:{"navigation-type":"arrow-keys"},on:{click:function(s){return e.selectItem(i)},keydown:function(s){return s.preventDefault(),s.stopPropagation(),e.onKeyDown.apply(null,arguments)}}},[t(e.itemComponent,{tag:"component",attrs:{item:r}})],1)}),1)])},Qg=[],Zg=I.normalizeComponent(Yg,Xg,Qg,!1,null,null,null,null);const oc=Zg.exports,ey={name:"EmojiSuggestion",components:{DtEmoji:G.DtEmoji,DtStack:ls},props:{item:{type:Object,required:!0}}};var ty=function(){var e=this,t=e._self._c;return t("dt-stack",{attrs:{direction:"row",gap:"400"}},[t("dt-emoji",{attrs:{size:"200",code:e.item.code}}),e._v(" "+e._s(e.item.code)+" ")],1)},ny=[],ry=I.normalizeComponent(ey,ty,ny,!1,null,null,null,null);const iy=ry.exports,sy={items:({query:n})=>n.length<2?[]:Object.values(G.emojisIndexed).filter(function(r){return!!r.shortname.substring(1,r.shortname.length-1).startsWith(n.toLowerCase())}).map(r=>({id:r.unicode_character,code:r.shortname})),command:({editor:n,range:e,props:t})=>{var s,o;const r=n.view.state.selection.$to.nodeAfter;((s=r==null?void 0:r.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:"emoji",attrs:t},{type:"text",text:" "}]).run(),(o=window.getSelection())==null||o.collapseToEnd()},render:()=>{let n,e;return{onStart:t=>{n=new Cs(oc,{parent:void 0,propsData:{itemComponent:be.markRaw(iy),itemType:"emoji",...t},editor:t.editor}),t.clientRect&&(e=I.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",contentElement:null,zIndex:650}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},oy=new oe("emoji"),ly=/:\w+:$/,ay=/:\w+:/g,cy=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/,uy=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g,rl=n=>{if(n&&G.codeToEmojiData(n[0]))return{index:n.index,text:n[0],match:n}},dy=n=>[...n.matchAll(ay)].filter(t=>G.codeToEmojiData(t[0])).map(t=>({index:t.index,text:t[0],match:t})),fy=Y.create({addOptions(){return{HTMLAttributes:{},suggestion:{char:":",pluginKey:oy}}},name:"emoji",group:"inline",inline:!0,selectable:!0,addNodeView(){return Za(Ug)},addAttributes(){return{code:{default:null},id:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:n}){return n.attrs.code},renderHTML({HTMLAttributes:n}){return["emoji-component",$(this.options.HTMLAttributes,n),0]},addInputRules(){return[zo({find:n=>{const e=n.match(ly);return rl(e)},type:this.type,getAttributes(n){return{code:n[0]}}}),zo({find:n=>{const e=n.match(cy);return rl(e)},type:this.type,getAttributes(n){const e=G.shortcodeToEmojiData(n[0]).unicode_output;return{code:String.fromCodePoint(parseInt(e,16)),label:"emoji"}}})]},addPasteRules(){return[jo({find:dy,type:this.type,getAttributes(n){return{code:n[0]}}}),jo({find:uy,type:this.type,getAttributes(n){return{code:n[0]}}})]},addProseMirrorPlugins(){return[sc({editor:this.editor,...this.options.suggestion,...sy})]}});function hy(n,e,t=()=>!0){const r=[];e.lastIndex=0;let i;for(;i=e.exec(n);)t(n,i)&&r.push(i);return r}function py(n,e){return!["#","@"].includes(n.charAt(e.index))&&!["#","@"].includes(n.charAt(e.index-1))}function my(n){const e=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return n.replace(e,"")}function gy(n,e){const t=n.slice(0,e+1).search(/\S+\s*$/),r=n.slice(e).search(/\s/);if(r<0){const i=n.slice(t);return{text:i,from:t,to:t+i.length}}return{text:n.slice(t,r+e),from:t,to:r+e}}function rs(n,e,t,r){const i=gy(n,e);if(r.lastIndex=0,!r.test(i.text))return i;const s=t==="left"?i.from-1:i.to+1;return s<=0||s>=n.length||s===e?i:rs(n,s,t,r)}function yy(n,e,t,r){const i=Math.max(n.from-1,0),s=Math.min(n.to+1,e.content.size),o=Nr(i,s,e);for(const l of o)l.mark.type===r&&t.removeMark(l.from,l.to,r)}const il=I.getPhoneNumberRegex(1,15);function sl(n,e,t,r,i,s){if(!n)return;let o=t-e-1;o=o<0?0:o;const l=r-e,a=rs(n,o,"left",il),c=rs(n,l,"right",il),u=n.slice(a.from,c.to);hy(u,I.linkRegex,py).forEach(f=>{const h=my(f[0]),p=e+a.from+f.index+1,m=p+h.length;i.addMark(p,m,s.create())})}function by(n){let e=!1;return new ne({key:new oe("autolink"),appendTransaction:(t,r,i)=>{const s=t.some(u=>u.docChanged)&&!r.doc.eq(i.doc);if(e&&!s)return;const{tr:o}=i,{textContent:l}=i.doc;e||sl(l,0,0,l.length,o,n.type),e=!0;const a=Ua(r.doc,[...t]);return Ya(a).forEach(({oldRange:u,newRange:d})=>{yy(d,i.doc,o,n.type),Ja(i.doc,d,h=>h.isTextblock).forEach(({node:h,pos:p})=>{sl(h.textContent,p,u.from,d.to,o,n.type)})}),o}})}const ky={class:"d-link d-c-text d-d-inline-block",rel:"noopener noreferrer nofollow"},Sy=pe.create({name:"Link",renderHTML({HTMLAttributes:n}){return["a",$(this.options.HTMLAttributes,n,ky),0]},renderText({node:n}){return n.attrs.text},addProseMirrorPlugins(){return[by({type:this.type})]}}),Oy=new oe("mention"),xy=Y.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:e}){var t;return`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`},suggestion:{char:"@",pluginKey:Oy,command:({editor:n,range:e,props:t})=>{var r,i;const s=n.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:this.name,attrs:t},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:n,range:e})=>{const t=n.doc.resolve(e.from),r=n.schema.nodes[this.name];return!!t.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:e}){return["span",$({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:e})=>{let t=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name)return t=!0,n.insertText(this.options.suggestion.char||"",l,l+o.nodeSize),!1}),t):!1})}},addProseMirrorPlugins(){return[sc({editor:this.editor,...this.options.suggestion})]}}),Ey={name:"MentionComponent",components:{NodeViewWrapper:Xa,DtLink:hl},props:Qa,computed:{text(){return"@"+this.$props.node.attrs.name}}};var Ty=function(){var e=this,t=e._self._c;return t("node-view-wrapper",{staticClass:"d-d-inline-block"},[t("dt-link",{staticClass:"dt-link--mention",attrs:{kind:"inverted",href:null}},[e._v(" "+e._s(e.text)+" ")])],1)},vy=[],Cy=I.normalizeComponent(Ey,Ty,vy,!1,null,null,null,null);const My=Cy.exports,wy=xy.extend({addNodeView(){return Za(My)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""}}},renderText({node:n}){return"@ "+n.attrs.name},renderHTML({HTMLAttributes:n}){return["mention-component",$(this.options.HTMLAttributes,n),0]}}),lc=["text","json","html"],ac=["start","end","all"],Ay=["https","http","ftp","ftps","sftp","mailto"],Ny={name:"MentionSuggestion",components:{DtAvatar:fl,DtStack:ls},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc}}};var Py=function(){var e=this,t=e._self._c;return t("dt-stack",{attrs:{direction:"row",gap:"400"}},[t("dt-avatar",{attrs:{"full-name":e.name,"image-src":e.avatarSrc,size:"xs"}}),e._v(" "+e._s(e.name)+" ")],1)},Iy=[],Dy=I.normalizeComponent(Ny,Py,Iy,!1,null,null,null,null);const Ry=Dy.exports,_y={render:()=>{let n,e;return{onStart:t=>{n=new Cs(oc,{parent:void 0,propsData:{itemComponent:be.markRaw(Ry),itemType:"mention",...t},editor:t.editor}),t.clientRect&&(e=I.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},Ly={name:"DtRichTextEditor",components:{EditorContent:jm},props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?ac.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return lc.includes(n)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null}},emits:["input","update:value","blur","focus"],data(){return{editor:null,popoverOpened:!1}},computed:{extensions(){const n=[Km,rg,sg,Gm,ug,Rg,Xm,Fg,Hg,zg];if(this.link&&n.push(this.getExtension(Sy,this.link)),n.push(Qm.configure({placeholder:this.placeholder})),this.allowLineBreaks||n.push(Ym.extend({addKeyboardShortcuts(){return{Enter:()=>!0,"Shift-Enter":()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])}}})),n.push(Dg.extend({inclusive:!1}).configure({autolink:!0,protocols:Ay})),this.mentionSuggestion){const e={...this.mentionSuggestion,..._y};n.push(wy.configure({suggestion:e}))}return n.push(fy),n.push(jg.configure({types:["paragraph"],defaultAlignment:"left"})),n.push(Jm.configure({HTMLAttributes:{class:"dt-rich-text-editor--code-block"}})),n.push(Lg.configure({itemTypeName:"listItem"})),n},inputAttrs(){const n={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(n["aria-readonly"]=!0),n}},watch:{editable(n){this.editor.setEditable(n),this.updateEditorAttributes({"aria-readonly":!n})},inputClass(n){this.updateEditorAttributes({class:n})},inputAriaLabel(n){this.updateEditorAttributes({"aria-label":n})},extensions(){this.destroyEditor(),this.createEditor()},value(n){let e=this.getOutput();this.outputFormat==="json"&&(n=JSON.stringify(n),e=JSON.stringify(e)),n!==e&&this.editor.commands.setContent(n,!1)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},methods:{createEditor(){this.editor=new Hm({autofocus:this.autoFocus,content:this.value,editable:this.editable,extensions:this.extensions,editorProps:{attributes:{...this.inputAttrs,class:this.inputClass}}}),this.addEditorListeners()},destroyEditor(){this.editor.destroy()},addEditorListeners(){this.editor.on("update",()=>{const n=this.getOutput();this.$emit("input",n),this.$emit("update:value",n)}),this.editor.on("focus",({event:n})=>{this.$emit("focus",n)}),this.editor.on("blur",({event:n})=>{this.$emit("blur",n)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"text":default:return this.editor.getText()}},getExtension(n,e){var t;return typeof e=="boolean"?n:(t=n.configure)==null?void 0:t.call(n,e)},updateEditorAttributes(n){this.editor.setOptions({editorProps:{attributes:n}})},focusEditor(){this.editor.commands.focus()}}};var By=function(){var e=this,t=e._self._c;return t("editor-content",{attrs:{editor:e.editor,"data-qa":"dt-rich-text-editor"}})},$y=[],Fy=I.normalizeComponent(Ly,By,$y,!1,null,null,null,null);const zy=Fy.exports;exports.AVATAR_COLORS=dl;exports.AVATAR_GROUP_VALIDATOR=wi;exports.AVATAR_ICON_SIZES=ul;exports.AVATAR_KIND_MODIFIERS=al;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=cl;exports.AVATAR_PRESENCE_STATES=Mi;exports.AVATAR_SIZE_MODIFIERS=Sn;exports.DT_STACK_DIRECTION=Ye;exports.DT_STACK_GAP=gr;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=is;exports.DtAvatar=fl;exports.DtItemLayout=Ai;exports.DtLink=hl;exports.DtListItem=bl;exports.DtPopover=eu;exports.DtPresence=ll;exports.DtRichTextEditor=zy;exports.DtStack=ls;exports.LIST_ITEM_NAVIGATION_TYPES=$t;exports.LIST_ITEM_TYPES=On;exports.Modal=yl;exports.POPOVER_APPEND_TO_VALUES=El;exports.POPOVER_CONTENT_WIDTHS=Ol;exports.POPOVER_DIRECTIONS=Fc;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=kl;exports.POPOVER_INITIAL_FOCUS_STRINGS=xl;exports.POPOVER_PADDING_CLASSES=Ni;exports.POPOVER_ROLES=Sl;exports.POPOVER_STICKY_VALUES=Tl;exports.PRESENCE_STATES=xt;exports.PRESENCE_STATES_LIST=ol;exports.Portal=ss;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=ac;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=lc;exports.SrOnlyCloseButton=ml;exports.SrOnlyCloseButtonMixin=pl;
97
+ 3. "-" cannot repeat`);B.customSchemes.push([n,e])}function wg(){B.scanner=kg(B.customSchemes);for(let n=0;n<B.tokenQueue.length;n++)B.tokenQueue[n][1]({scanner:B.scanner});B.parser=Eg(B.scanner.tokens);for(let n=0;n<B.pluginQueue.length;n++)B.pluginQueue[n][1]({scanner:B.scanner,parser:B.parser});B.initialized=!0}function Ag(n){return B.initialized||wg(),Tg(B.parser.start,n,Sg(B.scanner.start,n))}function Rs(n,e,t){if(e===void 0&&(e=null),t===void 0&&(t=null),e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new Ds(t),i=Ag(n),s=[];for(let o=0;o<i.length;o++){const l=i[o];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function Ng(n){return new ne({key:new oe("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(c=>c.docChanged)&&!t.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:o}=r,l=Ua(t.doc,[...e]);if(Ya(l).forEach(({newRange:c})=>{const u=Ja(r.doc,c,h=>h.isTextblock);let d,f;if(u.length>1?(d=u[0],f=r.doc.textBetween(d.pos,d.pos+d.node.nodeSize,void 0," ")):u.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(d=u[0],f=r.doc.textBetween(d.pos,c.to,void 0," ")),d&&f){const h=f.split(" ").filter(g=>g!=="");if(h.length<=0)return!1;const p=h[h.length-1],m=d.pos+f.lastIndexOf(p);if(!p)return!1;Rs(p).filter(g=>g.isLink).map(g=>({...g,from:m+g.start+1,to:m+g.end+1})).filter(g=>r.schema.marks.code?!r.doc.rangeHasMark(g.from,g.to,r.schema.marks.code):!0).filter(g=>n.validate?n.validate(g.value):!0).forEach(g=>{Nr(g.from,g.to,r.doc).some(y=>y.mark.type===n.type)||o.addMark(g.from,g.to,n.type.create({href:g.href}))})}}),!!o.steps.length)return o}})}function Pg(n){return new ne({key:new oe("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,s;if(r.button!==0||r.target.nodeName!=="A")return!1;const l=Ga(e.state,n.type.name),a=r.target,c=(i=a==null?void 0:a.href)!==null&&i!==void 0?i:l.href,u=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:l.target;return a&&c?(e.editable&&window.open(c,u),!0):!1}}})}function Ig(n){return new ne({key:new oe("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:s}=i,{empty:o}=s;if(o)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const a=Rs(l).find(c=>c.isLink&&c.value===l);return!l||!a?!1:(n.editor.commands.setMark(n.type,{href:a.href}),!0)}}})}const Dg=pe.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){el(n);return}el(n.scheme,n.optionalSlashes)})},onDestroy(){Mg()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){var e;return!((e=n.href)===null||e===void 0)&&e.startsWith("javascript:")?["a",$(this.options.HTMLAttributes,{...n,href:""}),0]:["a",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[It({find:(n,e)=>{var t;const r=(t=e==null?void 0:e.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),i=[];if(r){const s=new DOMParser().parseFromString(r,"text/html"),o=s.querySelectorAll("a");o.length&&[...o].forEach(l=>i.push({text:l.innerText,data:{href:l.getAttribute("href")},index:s.body.innerText.indexOf(l.innerText)+l.innerText.length}))}if(n){const s=Rs(n).filter(o=>o.isLink);s.length&&s.forEach(o=>i.push({text:o.value,data:{href:o.href},index:o.start}))}return i},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(Ng({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(Pg({type:this.type})),this.options.linkOnPaste&&n.push(Ig({editor:this.editor,type:this.type})),n}}),Rg=Y.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",$(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),_g=Y.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",$(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),tl=pe.create({name:"textStyle",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"span",getAttrs:n=>n.hasAttribute("style")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["span",$(this.options.HTMLAttributes,n),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:n,commands:e})=>{const t=Ar(n,this.type);return Object.entries(t).some(([,i])=>!!i)?!0:e.unsetMark(this.name)}}}}),nl=/^(\d+)\.\s$/,Lg=Y.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",$(this.options.HTMLAttributes,t),0]:["ol",$(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(_g.name,this.editor.getAttributes(tl.name)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=on({find:nl,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(n=on({find:nl,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(tl.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),Bg=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))$/,$g=/(?:^|\s)((?:~~)((?:[^~]+))(?:~~))/g,Fg=pe.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["s",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setStrike:()=>({commands:n})=>n.setMark(this.name),toggleStrike:()=>({commands:n})=>n.toggleMark(this.name),unsetStrike:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){const n={};return Ts()?n["Mod-Shift-s"]=()=>this.editor.commands.toggleStrike():n["Ctrl-Shift-s"]=()=>this.editor.commands.toggleStrike(),n},addInputRules(){return[sn({find:Bg,type:this.type})]},addPasteRules(){return[It({find:$g,type:this.type})]}}),zg=pe.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:n=>n.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:n}){return["u",$(this.options.HTMLAttributes,n),0]},addCommands(){return{setUnderline:()=>({commands:n})=>n.setMark(this.name),toggleUnderline:()=>({commands:n})=>n.toggleMark(this.name),unsetUnderline:()=>({commands:n})=>n.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),Hg=Y.create({name:"text",group:"inline"}),jg=Se.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${n.textAlign}`}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.every(t=>e.updateAttributes(t,{textAlign:n})):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"textAlign"))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}),Vg={name:"EmojiComponent",components:{NodeViewWrapper:Xa,DtEmoji:G.DtEmoji},props:Qa};var qg=function(){var e=this,t=e._self._c;return t("node-view-wrapper",{staticClass:"d-d-inline-block d-va-bottom d-lh0"},[t("dt-emoji",{attrs:{size:"500",code:e.node.attrs.code}})],1)},Kg=[],Wg=I.normalizeComponent(Vg,qg,Kg,!1,null,null,null,null);const Ug=Wg.exports;function Jg(n){var e;const{char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:o}=n,l=Zp(t),a=new RegExp(`\\s${l}$`),c=s?"^":"",u=r?new RegExp(`${c}${l}.*?(?=\\s${l}|$)`,"gm"):new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`,"gm"),d=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!d)return null;const f=o.pos-d.length,h=Array.from(d.matchAll(u)).pop();if(!h||h.input===void 0||h.index===void 0)return null;const p=h.input.slice(Math.max(0,h.index-1),h.index),m=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(p);if(i!==null&&!m)return null;const g=f+h.index;let y=g+h[0].length;return r&&a.test(d.slice(y-1,y+1))&&(h[0]+=" ",y+=1),g<o.pos&&y>=o.pos?{range:{from:g,to:y},query:h[0].slice(t.length),text:h[0]}:null}const Gg=new oe("suggestion");function sc({pluginKey:n=Gg,editor:e,char:t="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:l="suggestion",command:a=()=>null,items:c=()=>[],render:u=()=>({}),allow:d=()=>!0}){let f;const h=u==null?void 0:u(),p=new ne({key:n,view(){return{update:async(m,g)=>{var y,x,v,R,D,C,L;const P=(y=this.key)===null||y===void 0?void 0:y.getState(g),E=(x=this.key)===null||x===void 0?void 0:x.getState(m.state),W=P.active&&E.active&&P.range.from!==E.range.from,me=!P.active&&E.active,tt=P.active&&!E.active,_t=!me&&!tt&&P.query!==E.query,Re=me||W,_e=_t&&!W,Le=tt||W;if(!Re&&!_e&&!Le)return;const le=Le&&!Re?P:E,Be=m.dom.querySelector(`[data-decoration-id="${le.decorationId}"]`);f={editor:e,range:le.range,query:le.query,text:le.text,items:[],command:Lt=>{a({editor:e,range:le.range,props:Lt})},decorationNode:Be,clientRect:Be?()=>{var Lt;const{decorationId:cc}=(Lt=this.key)===null||Lt===void 0?void 0:Lt.getState(e.state),Zr=m.dom.querySelector(`[data-decoration-id="${cc}"]`);return(Zr==null?void 0:Zr.getBoundingClientRect())||null}:null},Re&&((v=h==null?void 0:h.onBeforeStart)===null||v===void 0||v.call(h,f)),_e&&((R=h==null?void 0:h.onBeforeUpdate)===null||R===void 0||R.call(h,f)),(_e||Re)&&(f.items=await c({editor:e,query:le.query})),Le&&((D=h==null?void 0:h.onExit)===null||D===void 0||D.call(h,f)),_e&&((C=h==null?void 0:h.onUpdate)===null||C===void 0||C.call(h,f)),Re&&((L=h==null?void 0:h.onStart)===null||L===void 0||L.call(h,f))},destroy:()=>{var m;f&&((m=h==null?void 0:h.onExit)===null||m===void 0||m.call(h,f))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(m,g,y,x){const{isEditable:v}=e,{composing:R}=e.view,{selection:D}=m,{empty:C,from:L}=D,P={...g};if(P.composing=R,v&&(C||e.view.composing)){(L<g.range.from||L>g.range.to)&&!R&&!g.composing&&(P.active=!1);const E=Jg({char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:D.$from}),W=`id_${Math.floor(Math.random()*4294967295)}`;E&&d({editor:e,state:x,range:E.range})?(P.active=!0,P.decorationId=g.decorationId?g.decorationId:W,P.range=E.range,P.query=E.query,P.text=E.text):P.active=!1}else P.active=!1;return P.active||(P.decorationId=null,P.range={from:0,to:0},P.query=null,P.text=null),P}},props:{handleKeyDown(m,g){var y;const{active:x,range:v}=p.getState(m.state);return x&&((y=h==null?void 0:h.onKeyDown)===null||y===void 0?void 0:y.call(h,{view:m,event:g,range:v}))||!1},decorations(m){const{active:g,range:y,decorationId:x}=p.getState(m);return g?F.create(m.doc,[ce.inline(y.from,y.to,{nodeName:o,class:l,"data-decoration-id":x})]):null}}});return p}const Yg={name:"SuggestionList",components:{DtListItem:bl},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),n.stopPropagation(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},scrollActiveElementIntoView(){const n=this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");n&&n.scrollIntoView({behaviour:"smooth",block:"center"})},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(n){const e=this.items[n];switch(this.itemType){case"emoji":this.command(e);return;case"mention":this.command({name:e.name,id:e.contactId,avatarSrc:e.avatarSrc});break}}}};var Xg=function(){var e=this,t=e._self._c;return t("div",{staticClass:"d-popover__dialog"},[t("ul",{directives:[{name:"show",rawName:"v-show",value:e.items.length,expression:"items.length"}],ref:"suggestionList",staticClass:"dt-suggestion-list"},e._l(e.items,function(r,i){return t("dt-list-item",{key:r.id,class:["dt-suggestion-list--item",{"dt-list-item--highlighted":i===e.selectedIndex}],attrs:{"navigation-type":"arrow-keys"},on:{click:function(s){return e.selectItem(i)},keydown:function(s){return s.preventDefault(),s.stopPropagation(),e.onKeyDown.apply(null,arguments)}}},[t(e.itemComponent,{tag:"component",attrs:{item:r}})],1)}),1)])},Qg=[],Zg=I.normalizeComponent(Yg,Xg,Qg,!1,null,null,null,null);const oc=Zg.exports,ey={name:"EmojiSuggestion",components:{DtEmoji:G.DtEmoji,DtStack:ls},props:{item:{type:Object,required:!0}}};var ty=function(){var e=this,t=e._self._c;return t("dt-stack",{attrs:{direction:"row",gap:"400"}},[t("dt-emoji",{attrs:{size:"200",code:e.item.code}}),e._v(" "+e._s(e.item.code)+" ")],1)},ny=[],ry=I.normalizeComponent(ey,ty,ny,!1,null,null,null,null);const iy=ry.exports,sy={items:({query:n})=>n.length<2?[]:Object.values(G.emojisIndexed).filter(function(r){return!!r.shortname.substring(1,r.shortname.length-1).startsWith(n.toLowerCase())}).map(r=>({id:r.unicode_character,code:r.shortname})),command:({editor:n,range:e,props:t})=>{var s,o;const r=n.view.state.selection.$to.nodeAfter;((s=r==null?void 0:r.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:"emoji",attrs:t},{type:"text",text:" "}]).run(),(o=window.getSelection())==null||o.collapseToEnd()},render:()=>{let n,e;return{onStart:t=>{n=new Cs(oc,{parent:void 0,propsData:{itemComponent:be.markRaw(iy),itemType:"emoji",...t},editor:t.editor}),t.clientRect&&(e=I.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",contentElement:null,zIndex:650}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},oy=new oe("emoji"),ly=/:\w+:$/,ay=/:\w+:/g,cy=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/,uy=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g,rl=n=>{if(n&&G.codeToEmojiData(n[0]))return{index:n.index,text:n[0],match:n}},dy=n=>[...n.matchAll(ay)].filter(t=>G.codeToEmojiData(t[0])).map(t=>({index:t.index,text:t[0],match:t})),fy=Y.create({addOptions(){return{HTMLAttributes:{},suggestion:{char:":",pluginKey:oy}}},name:"emoji",group:"inline",inline:!0,selectable:!0,addNodeView(){return Za(Ug)},addAttributes(){return{code:{default:null},id:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:n}){return n.attrs.code},renderHTML({HTMLAttributes:n}){return["emoji-component",$(this.options.HTMLAttributes,n),0]},addInputRules(){return[zo({find:n=>{const e=n.match(ly);return rl(e)},type:this.type,getAttributes(n){return{code:n[0]}}}),zo({find:n=>{const e=n.match(cy);return rl(e)},type:this.type,getAttributes(n){const e=G.shortcodeToEmojiData(n[0]).unicode_output;return{code:String.fromCodePoint(parseInt(e,16)),label:"emoji"}}})]},addPasteRules(){return[jo({find:dy,type:this.type,getAttributes(n){return{code:n[0]}}}),jo({find:uy,type:this.type,getAttributes(n){return{code:n[0]}}})]},addProseMirrorPlugins(){return[sc({editor:this.editor,...this.options.suggestion,...sy})]}});function hy(n,e,t=()=>!0){const r=[];e.lastIndex=0;let i;for(;i=e.exec(n);)t(n,i)&&r.push(i);return r}function py(n,e){return!["#","@"].includes(n.charAt(e.index))&&!["#","@"].includes(n.charAt(e.index-1))}function my(n){const e=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return n.replace(e,"")}function gy(n,e){const t=n.slice(0,e+1).search(/\S+\s*$/),r=n.slice(e).search(/\s/);if(r<0){const i=n.slice(t);return{text:i,from:t,to:t+i.length}}return{text:n.slice(t,r+e),from:t,to:r+e}}function rs(n,e,t,r){const i=gy(n,e);if(r.lastIndex=0,!r.test(i.text))return i;const s=t==="left"?i.from-1:i.to+1;return s<=0||s>=n.length||s===e?i:rs(n,s,t,r)}function yy(n,e,t,r){const i=Math.max(n.from-1,0),s=Math.min(n.to+1,e.content.size),o=Nr(i,s,e);for(const l of o)l.mark.type===r&&t.removeMark(l.from,l.to,r)}const il=I.getPhoneNumberRegex(1,15);function sl(n,e,t,r,i,s){if(!n)return;let o=t-e-1;o=o<0?0:o;const l=r-e,a=rs(n,o,"left",il),c=rs(n,l,"right",il),u=n.slice(a.from,c.to);hy(u,I.linkRegex,py).forEach(f=>{const h=my(f[0]),p=e+a.from+f.index+1,m=p+h.length;i.addMark(p,m,s.create())})}function by(n){let e=!1;return new ne({key:new oe("autolink"),appendTransaction:(t,r,i)=>{const s=t.some(u=>u.docChanged)&&!r.doc.eq(i.doc);if(e&&!s)return;const{tr:o}=i,{textContent:l}=i.doc;e||sl(l,0,0,l.length,o,n.type),e=!0;const a=Ua(r.doc,[...t]);return Ya(a).forEach(({oldRange:u,newRange:d})=>{yy(d,i.doc,o,n.type),Ja(i.doc,d,h=>h.isTextblock).forEach(({node:h,pos:p})=>{sl(h.textContent,p,u.from,d.to,o,n.type)})}),o}})}const ky={class:"d-link d-c-text d-d-inline-block",rel:"noopener noreferrer nofollow"},Sy=pe.create({name:"Link",renderHTML({HTMLAttributes:n}){return["a",$(this.options.HTMLAttributes,n,ky),0]},renderText({node:n}){return n.attrs.text},addProseMirrorPlugins(){return[by({type:this.type})]}}),Oy=new oe("mention"),xy=Y.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:e}){var t;return`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`},suggestion:{char:"@",pluginKey:Oy,command:({editor:n,range:e,props:t})=>{var r,i;const s=n.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:this.name,attrs:t},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:n,range:e})=>{const t=n.doc.resolve(e.from),r=n.schema.nodes[this.name];return!!t.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:e}){return["span",$({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:e})=>{let t=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name)return t=!0,n.insertText(this.options.suggestion.char||"",l,l+o.nodeSize),!1}),t):!1})}},addProseMirrorPlugins(){return[sc({editor:this.editor,...this.options.suggestion})]}}),Ey={name:"MentionComponent",components:{NodeViewWrapper:Xa,DtLink:hl},props:Qa,computed:{text(){return"@"+this.$props.node.attrs.name}}};var Ty=function(){var e=this,t=e._self._c;return t("node-view-wrapper",{staticClass:"d-d-inline-block"},[t("dt-link",{staticClass:"dt-link--mention",attrs:{kind:"inverted",href:null}},[e._v(" "+e._s(e.text)+" ")])],1)},vy=[],Cy=I.normalizeComponent(Ey,Ty,vy,!1,null,null,null,null);const My=Cy.exports,wy=xy.extend({addNodeView(){return Za(My)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""}}},renderText({node:n}){return"@ "+n.attrs.name},renderHTML({HTMLAttributes:n}){return["mention-component",$(this.options.HTMLAttributes,n),0]}}),lc=["text","json","html"],ac=["start","end","all"],Ay=["https","http","ftp","ftps","sftp","mailto"],Ny={name:"MentionSuggestion",components:{DtAvatar:fl,DtStack:ls},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc}}};var Py=function(){var e=this,t=e._self._c;return t("dt-stack",{attrs:{direction:"row",gap:"400"}},[t("dt-avatar",{attrs:{"full-name":e.name,"image-src":e.avatarSrc,size:"xs"}}),e._v(" "+e._s(e.name)+" ")],1)},Iy=[],Dy=I.normalizeComponent(Ny,Py,Iy,!1,null,null,null,null);const Ry=Dy.exports,_y={render:()=>{let n,e;return{onStart:t=>{n=new Cs(oc,{parent:void 0,propsData:{itemComponent:be.markRaw(Ry),itemType:"mention",...t},editor:t.editor}),t.clientRect&&(e=I.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},Ly={name:"DtRichTextEditor",components:{EditorContent:jm},props:{value:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},allowLineBreaks:{type:Boolean,default:!1},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?ac.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return lc.includes(n)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null}},emits:["input","update:value","blur","focus"],data(){return{editor:null,popoverOpened:!1}},computed:{extensions(){const n=[Km,rg,sg,Gm,ug,Rg,Xm,Fg,Hg,zg];if(this.link&&n.push(this.getExtension(Sy,this.link)),n.push(Qm.configure({placeholder:this.placeholder})),this.allowLineBreaks||n.push(Ym.extend({addKeyboardShortcuts(){return{Enter:()=>!0,"Shift-Enter":()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])}}})),n.push(Dg.extend({inclusive:!1}).configure({autolink:!0,protocols:Ay})),this.mentionSuggestion){const e={...this.mentionSuggestion,..._y};n.push(wy.configure({suggestion:e}))}return n.push(fy),n.push(jg.configure({types:["paragraph"],defaultAlignment:"left"})),n.push(Jm.configure({HTMLAttributes:{class:"dt-rich-text-editor--code-block"}})),n.push(Lg.configure({itemTypeName:"listItem"})),n},inputAttrs(){const n={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(n["aria-readonly"]=!0),n}},watch:{editable(n){this.editor.setEditable(n),this.updateEditorAttributes({"aria-readonly":!n})},inputClass(n){this.updateEditorAttributes({class:n})},inputAriaLabel(n){this.updateEditorAttributes({"aria-label":n})},extensions(){this.destroyEditor(),this.createEditor()},value(n){let e=this.getOutput();this.outputFormat==="json"&&(n=JSON.stringify(n),e=JSON.stringify(e)),n!==e&&this.editor.commands.setContent(n,!1)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},methods:{createEditor(){this.editor=new Hm({autofocus:this.autoFocus,content:this.value,editable:this.editable,extensions:this.extensions,editorProps:{attributes:{...this.inputAttrs,class:this.inputClass}}}),this.addEditorListeners()},destroyEditor(){this.editor.destroy()},addEditorListeners(){this.editor.on("update",()=>{const n=this.getOutput();this.$emit("input",n),this.$emit("update:value",n)}),this.editor.on("focus",({event:n})=>{this.$emit("focus",n)}),this.editor.on("blur",({event:n})=>{this.$emit("blur",n)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"text":default:return this.editor.getText()}},getExtension(n,e){var t;return typeof e=="boolean"?n:(t=n.configure)==null?void 0:t.call(n,e)},updateEditorAttributes(n){this.editor.setOptions({editorProps:{attributes:n}})},focusEditor(){this.editor.commands.focus()}}};var By=function(){var e=this,t=e._self._c;return t("editor-content",{attrs:{editor:e.editor,"data-qa":"dt-rich-text-editor"}})},$y=[],Fy=I.normalizeComponent(Ly,By,$y,!1,null,null,null,null);const zy=Fy.exports;exports.AVATAR_COLORS=dl;exports.AVATAR_GROUP_VALIDATOR=wi;exports.AVATAR_ICON_SIZES=ul;exports.AVATAR_KIND_MODIFIERS=al;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=cl;exports.AVATAR_PRESENCE_STATES=Mi;exports.AVATAR_SIZE_MODIFIERS=Sn;exports.DT_STACK_DIRECTION=Ye;exports.DT_STACK_GAP=gr;exports.DT_STACK_RESPONSIVE_BREAKPOINTS=is;exports.DtAvatar=fl;exports.DtItemLayout=Ai;exports.DtLink=hl;exports.DtListItem=bl;exports.DtPopover=eu;exports.DtPresence=ll;exports.DtRichTextEditor=zy;exports.DtStack=ls;exports.LIST_ITEM_NAVIGATION_TYPES=$t;exports.LIST_ITEM_TYPES=On;exports.Modal=yl;exports.POPOVER_APPEND_TO_VALUES=El;exports.POPOVER_CONTENT_WIDTHS=Ol;exports.POPOVER_DIRECTIONS=Fc;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=kl;exports.POPOVER_INITIAL_FOCUS_STRINGS=xl;exports.POPOVER_PADDING_CLASSES=Ni;exports.POPOVER_ROLES=Sl;exports.POPOVER_STICKY_VALUES=Tl;exports.PRESENCE_STATES=xt;exports.PRESENCE_STATES_LIST=ol;exports.Portal=ss;exports.RICH_TEXT_EDITOR_AUTOFOCUS_TYPES=ac;exports.RICH_TEXT_EDITOR_OUTPUT_FORMATS=lc;exports.SrOnlyCloseButton=ml;exports.SrOnlyCloseButtonMixin=pl;
@@ -1,6 +1,6 @@
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-UOWkfPpb.js";
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-vREVnN_1.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-NG2T0qK1.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-ASOzBdZi.js";
4
4
  const Lt = {
5
5
  BUSY: "busy",
6
6
  AWAY: "away",
@@ -15363,7 +15363,7 @@ const Qg = he.create({
15363
15363
  };
15364
15364
  var cy = function() {
15365
15365
  var e = this, t = e._self._c;
15366
- return t("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t("dt-emoji", { attrs: { size: "300", code: e.node.attrs.code } })], 1);
15366
+ return t("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [t("dt-emoji", { attrs: { size: "500", code: e.node.attrs.code } })], 1);
15367
15367
  }, uy = [], dy = /* @__PURE__ */ ee(
15368
15368
  ay,
15369
15369
  cy,