@avenirs-esr/avenirs-dsav 0.1.185 → 0.1.186
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +32 -32
- package/dist/index.es.js +67 -55
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/links/links.d.ts +20 -0
- package/dist/utils/links/links.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),Zc=require("./injection-key.cjs.js");function Yc(t){const e=t==null?void 0:t.trim();return e?e.startsWith("data:")?{"--icon-path":`url(${e})`}:{"--icon-path":`var(--icon-${e.replace(":","-")})`}:{}}const Sh=["title"],Th=a.defineComponent({__name:"AvBadge",props:{color:{},backgroundColor:{},borderColor:{default:"transparent"},icon:{},label:{},small:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!1}},setup(t){a.useCssVars(n=>({daab4f7c:n.color,v2120d4f4:n.backgroundColor,v90af6794:n.borderColor}));const e=a.computed(()=>Yc(t.icon));return(n,r)=>(a.openBlock(),a.createElementBlock("span",{role:"status",class:a.normalizeClass(["av-badge av-row av-align-center av-py-none av-m-none av-radius-sm",{"av-badge--sm av-px-xxs":t.small,"av-px-xs":!t.small,"av-badge--custom-icon":t.icon,"av-badge--no-icon":!t.icon}]),title:t.label,style:a.normalizeStyle(a.unref(e))},[a.createElementVNode("span",{class:a.normalizeClass({"av-ellipsis":t.ellipsis,"caption-regular":t.small,"b2-regular":!t.small})},a.toDisplayString(t.label),3)],14,Sh))}}),z=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Lh=z(Th,[["__scopeId","data-v-7c129502"]]),Dh=["title"],Oh=a.defineComponent({__name:"AvIcon",props:{size:{default:1},name:{},animation:{},speed:{},flip:{},title:{},color:{default:"currentColor"}},setup(t){a.useCssVars(o=>({v0fe1d2a2:a.unref(e),v52daaaf1:o.color}));const e=a.computed(()=>`${t.size}rem`),n=a.computed(()=>Yc(t.name)),r=a.computed(()=>{switch(t.flip){case"horizontal":return"scaleX(-1)";case"vertical":return"scaleY(-1)";case"both":return"scale(-1, -1)";default:return}});return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-icon av-col",{"av-icon--spin":t.animation==="spin","av-icon--wrench":t.animation==="wrench","av-icon--pulse":t.animation==="pulse","av-icon--spin-pulse":t.animation==="spin-pulse","av-icon--flash":t.animation==="flash","av-icon--float":t.animation==="float","av-icon--ring":t.animation==="ring","av-icon--slow":t.speed==="slow","av-icon--fast":t.speed==="fast"}]),title:t.title,"aria-hidden":"true"},[a.createElementVNode("span",{class:"av-icon__icon av-w-full av-h-full av-align-center av-justify-center",style:a.normalizeStyle([a.unref(n),{transform:a.unref(r)}])},null,4)],10,Dh))}}),le=z(Oh,[["__scopeId","data-v-050015d7"]]),Bh={VISIBILITY_ON_OUTLINE:"cuida:visibility-on-outline"},Rh={ACTION_CHAINS_OUTLINED:"eos-icons:action-chains-outlined"},zh={TASK_LIST_SQUARE_SPARKLE_24_REGULAR:"fluent:task-list-square-sparkle-24-regular"},Ph={LIBRARY_NEW:"ix:library-new"},D={ACCOUNT_CIRCLE_OUTLINE:"mdi:account-circle-outline",ACCOUNT_STUDENT_OUTLINE:"mdi:account-student-outline",ALERT_CIRCLE_OUTLINE:"mdi:alert-circle-outline",ALERT_OUTLINE:"mdi:alert-outline",ARROW_DECISION:"mdi:arrow-decision",ARROW_LEFT_THIN:"mdi:arrow-left-thin",ARROW_RIGHT:"mdi:arrow-right",ARROW_RIGHT_BOTTOM:"mdi:arrow-right-bottom",ARROW_RIGHT_THIN:"mdi:arrow-right-thin",ARROW_TOP_RIGHT_THICK:"mdi:arrow-top-right-thick",ATTACH_FILE:"mdi:attach-file",ATTACHMENT_PLUS:"mdi:attachment-plus",BACKUP_RESTORE:"mdi:backup-restore",BELL_NOTIFICATION:"mdi:bell-notification",BOOK_LOCATION_OUTLINE:"mdi:book-location-outline",BOOK_OPEN_VARIANT:"mdi:book-open-variant",BOOK_OUTLINE:"mdi:book-outline",BOOKMARK_CHECK:"mdi:bookmark-check",BRIEFCASE_VARIANT_OUTLINE:"mdi:briefcase-variant-outline",BUILDING:"mdi:building",CALENDAR_BLANK_OUTLINE:"mdi:calendar-blank-outline",CALENDAR_CHECK_OUTLINE:"mdi:calendar-check-outline",CALENDAR_CLOCK_OUTLINE:"mdi:calendar-clock-outline",CALENDAR_MONTH_OUTLINE:"mdi:calendar-month-outline",CALENDAR_OUTLINE:"mdi:calendar-outline",CALENDAR_TIME:"mdi:calendar-time",CALENDAR_RANGE_OUTLINE:"mdi:calendar-range-outline",CALENDAR_WEEK_OUTLINE:"mdi:calendar-week-outline",CHART_TIMELINE_VARIANT_SHIMMER:"mdi:chart-timeline-variant-shimmer",CHAT_ALERT:"mdi:chat-alert",CHAT_BUBBLE_OUTLINE:"mdi:chat-bubble-outline",CHECK:"mdi:check",CHECK_CIRCLE:"mdi:check-circle",CHECK_CIRCLE_OUTLINE:"mdi:check-circle-outline",CHECK_DECAGRAM_OUTLINE:"mdi:check-decagram-outline",CHECKBOX_BLANK_OUTLINE:"mdi:checkbox-blank-outline",CHECKBOX_MARKED:"mdi:checkbox-marked",CHEVRON_DOUBLE_LEFT:"mdi:chevron-double-left",CHEVRON_DOUBLE_RIGHT:"mdi:chevron-double-right",CHEVRON_DOWN:"mdi:chevron-down",CHEVRON_LEFT:"mdi:chevron-left",CHEVRON_RIGHT:"mdi:chevron-right",CIRCLE:"mdi:circle",CIRCLE_OUTLINE:"mdi:circle-outline",CLAPPERBOARD_OUTLINE:"mdi:clapperboard-outline",CLOCK_OUTLINE:"mdi:clock-outline",CLOSE_CIRCLE_OUTLINE:"mdi:close-circle-outline",CLOSE_OCTAGON:"mdi:close-octagon",CONTENT_SAVE_OUTLINE:"mdi:content-save-outline",DIAMOND_STONE:"mdi:diamond-stone",DOTS_HORIZONTAL_CIRCLE_OUTLINE:"mdi:dots-horizontal-circle-outline",DOTS_VERTICAL:"mdi:dots-vertical",ELECTRON_FRAMEWORK:"mdi:electron-framework",EMAIL_OUTLINE:"mdi:email-outline",FAMILY:"mdi:family",FILE:"mdi:file",FILE_ACCOUNT_OUTLINE:"mdi:file-account-outline",FILE_DOCUMENT_BOX_MULTIPLE_OUTLINE:"mdi:file-document-box-multiple-outline",FILE_DOCUMENT_EDIT_OUTLINE:"mdi:file-document-edit-outline",FILE_DOCUMENT_MULTIPLE_OUTLINE:"mdi:file-document-multiple-outline",FILE_IMAGE_OUTLINE:"mdi:file-image-outline",FILE_REFRESH_OUTLINE:"mdi:file-refresh-outline",FILE_RESTORE_OUTLINE:"mdi:file-restore-outline",FILE_TREE_OUTLINE:"mdi:file-tree-outline",FILTER_OUTLINE:"mdi:filter-outline",FLAG_VARIANT:"mdi:flag-variant",FLARE:"mdi:flare",FORMAT_ALIGN_CENTER:"mdi:format-align-center",FORMAT_ALIGN_JUSTIFY:"mdi:format-align-justify",FORMAT_ALIGN_LEFT:"mdi:format-align-left",FORMAT_ALIGN_RIGHT:"mdi:format-align-right",FORMAT_BOLD:"mdi:format-bold",FORMAT_HEADING_1:"mdi:format-heading-1",FORMAT_HEADING_2:"mdi:format-heading-2",FORMAT_HEADING_3:"mdi:format-heading-3",FORMAT_INDENT_DECREASE:"mdi:format-indent-decrease",FORMAT_INDENT_INCREASE:"mdi:format-indent-increase",FORMAT_ITALIC:"mdi:format-italic",FORMAT_LIST_BULLETED:"mdi:format-list-bulleted",FORMAT_LIST_NUMBERED:"mdi:format-list-numbered",FORMAT_PARAGRAPH:"mdi:format-paragraph",FORMAT_UNDERLINE:"mdi:format-underline",HAMBURGER_MENU:"mdi:hamburger-menu",HISTORY:"mdi:history",HOME_VARIANT_OUTLINE:"mdi:home-variant-outline",HOURGLASS:"mdi:hourglass",HUB_OUTLINE:"mdi:hub-outline",IMAGE_FILTER_CENTER_FOCUS_WEAK:"mdi:image-filter-center-focus-weak",IMAGE_OUTLINE:"mdi:image-outline",IMAGE_REMOVE_OUTLINE:"mdi:image-remove-outline",IMAGE_REFRESH_OUTLINE:"mdi:image-refresh-outline",INFORMATION_BOX:"mdi:information-box",INFORMATION_BOX_OUTLINE:"mdi:information-box-outline",INFORMATION_OUTLINE:"mdi:information-outline",KEYBOARD_ARROW_DOWN:"mdi:keyboard-arrow-down",KEYBOARD_ARROW_RIGHT:"mdi:keyboard-arrow-right",LINK:"mdi:link",LOADING:"mdi:loading",LOCK_OUTLINE:"mdi:lock-outline",LOGOUT:"mdi:logout",LOUDSPEAKER_OUTLINE:"mdi:loudspeaker-outline",MAGNIFY:"mdi:magnify",MAP_MARKER_OUTLINE:"mdi:map-marker-outline",MESSAGE_BADGE:"mdi:message-badge",MINUS:"mdi:minus",NAVIGATE_BEFORE:"mdi:navigate-before",NAVIGATE_NEXT:"mdi:navigate-next",NEWSPAPER_VARIANT:"mdi:newspaper-variant",NOTEBOOK_CHECK:"mdi:notebook-check",NOTIFICATIONS_NONE:"mdi:notifications-none",PAGE_FIRST:"mdi:page-first",PAGE_LAST:"mdi:page-last",PENCIL_OUTLINE:"mdi:pencil-outline",PEOPLE_GROUP_OUTLINE:"mdi:people-group-outline",PHONE_OUTLINE:"mdi:phone-outline",PLUS:"mdi:plus",PLUS_CIRCLE_OUTLINE:"mdi:plus-circle-outline",POST_IT_NOTES_OUTLINE:"mdi:post-it-notes-outline",PRINTER_OUTLINE:"mdi:printer-outline",RATE_REVIEW:"mdi:rate-review",RECORD_CIRCLE_OUTLINE:"mdi:record-circle-outline",REDO:"mdi:redo",REFRESH:"mdi:refresh",RESTART:"mdi:restart",RESTORE:"mdi:restore",SCHOOL_OUTLINE:"mdi:school-outline",SETTINGS:"mdi:settings",SHARE_VARIANT_OUTLINE:"mdi:share-variant-outline",STAR:"mdi:star",STAR_CHECK_OUTLINE:"mdi:star-check-outline",STAR_SHOOTING_OUTLINE:"mdi:star-shooting-outline",STARS:"mdi:stars",STOREFRONT_OUTLINE:"mdi:storefront-outline",SUCCESS_CIRCLE_OUTLINE:"mdi:success-circle-outline",SWAP_HORIZONTAL:"mdi:swap-horizontal",SWAP_VERTICAL_VARIANT:"mdi:swap-vertical-variant",TABLE_COLUMN_PLUS_AFTER:"mdi:table-column-plus-after",TABLE_COLUMN_PLUS_BEFORE:"mdi:table-column-plus-before",TABLE_COLUMN_REMOVE:"mdi:table-column-remove",TABLE_PLUS:"mdi:table-plus",TABLE_REMOVE:"mdi:table-remove",TABLE_ROW_PLUS_AFTER:"mdi:table-row-plus-after",TABLE_ROW_PLUS_BEFORE:"mdi:table-row-plus-before",TABLE_ROW_REMOVE:"mdi:table-row-remove",TABLE_SETTINGS:"mdi:table-settings",TARGET_ARROW:"mdi:target-arrow",TEST_TUBE_EMPTY:"mdi:test-tube-empty",TEXT_BOX_CHECK_OUTLINE:"mdi:text-box-check-outline",TRANSLATE:"mdi:translate",TRASH_CAN_OUTLINE:"mdi:trash-can-outline",TRAY_UPLOAD:"mdi:tray-upload",UNDO:"mdi:undo",VECTOR_POLYGON_VARIANT:"mdi:vector-polygon-variant",WARNING:"mdi:warning",WARNING_CIRCLE:"mdi:warning-circle",WARNING_OUTLINE:"mdi:warning-outline",WEIGHTS:"mdi:weights"},Un={BOOKMARK_STAR_OUTLINE:"material-symbols:bookmark-star-outline",CLOCK_LOADER_20:"material-symbols:clock-loader-20",CLOCK_LOADER_40:"material-symbols:clock-loader-40",CLOCK_LOADER_60:"material-symbols:clock-loader-60",CLOCK_LOADER_90:"material-symbols:clock-loader-90",FEATURED_PLAY_LIST_OUTLINE:"material-symbols:featured-play-list-outline",LINK_OFF_ROUNDED:"material-symbols:link-off-rounded",LINK_ROUNDED:"material-symbols:link-rounded",REDO:"material-symbols:redo",UNDO:"material-symbols:undo"},Vh={NOTE_PENCIL:"ph:note-pencil"},jh={BOOK_SHELF_LINE:"ri:book-shelf-line",DIAMOND_FILL:"ri:diamond-fill",DICE_1_LINE:"ri:dice-1-line",DICE_4_LINE:"ri:dice-4-line",DRAW_LINE:"ri:draw-line",HAND_HEART_LINE:"ri:hand-heart-line",HONOUR_LINE:"ri:honour-line",LAYOUT_6_LINE:"ri:layout-6-line",LOADER_LINE:"ri:loader-line",TIMER_LINE:"ri:timer-line"},Fe={AMS_SAE:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgZmlsbD0iY3VycmVudENvbG9yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNS4yNSAxNy41SDExLjM3NVYxOS4yNUg1LjI1QzQuMjc4NzUgMTkuMjUgMy41IDE4LjQ3MTMgMy41IDE3LjVWMy41QzMuNSAzLjAzNTg3IDMuNjg0MzcgMi41OTA3NSA0LjAxMjU2IDIuMjYyNTZDNC4zNDA3NSAxLjkzNDM3IDQuNzg1ODcgMS43NSA1LjI1IDEuNzVIMTUuNzVDMTYuMjE0MSAxLjc1IDE2LjY1OTIgMS45MzQzNyAxNi45ODc0IDIuMjYyNTZDMTcuMzE1NiAyLjU5MDc1IDE3LjUgMy4wMzU4NyAxNy41IDMuNVYxMC45NzI1TDE2LjE4NzUgMTAuMjU1TDE1Ljc1IDEwLjVWMy41SDExLjM3NVYxMC41TDkuMTg3NSA4LjUzMTI1TDcgMTAuNVYzLjVINS4yNVYxNy41Wk0yMSAxNC44NzVMMTYuMTg3NSAxMi4yNUwxMS4zNzUgMTQuODc1TDE2LjE4NzUgMTcuNUwyMSAxNC44NzVaTTEzLjEyNSAxNi43MDM4VjE4LjQ1MzhMMTYuMTg3NSAyMC4xMjVMMTkuMjUgMTguNDUzOFYxNi43MDM4TDE2LjE4NzUgMTguMzc1TDEzLjEyNSAxNi43MDM4WiIgZmlsbD0iY3VycmVudENvbG9yIiAvPgo8L3N2Zz4K",CLOCK_ALMOST_CHECK:"data:image/svg+xml;base64,PHN2ZyB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OTJNMTcgOUg3VjdoMTAiLz48L3N2Zz4=",MDI_WARNING_OUTLINE:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik0xMiAyTDEgMjFoMjJNMTIgNmw3LjUzIDEzSDQuNDdNMTEgMTB2NGgydi00bS0yIDZ2Mmgydi0yIi8+PC9zdmc+",TEXT_BULLET_LIST_SPARKLE:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M9.089%203a1.42%201.42%200%200%200%20.003%201H6a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h8a2%202%200%200%200%202-2v-2.104q.238.1.502.103c.173%200%20.341-.022.498-.08V14a3%203%200%200%201-3%203H6a3%203%200%200%201-3-3V6a3%203%200%200%201%203-3zm-.443%208.397a.5.5%200%201%201%20.708.707l-1.75%201.75a.5.5%200%200%201-.69.015l-.75-.684a.5.5%200%200%201%20.673-.74l.397.364zM13.5%2012a.5.5%200%200%201%200%201H11a.5.5%200%200%201%200-1zm2.997%200h.01l-.005-.001zm-.013-6a.3.3%200%200%201%20.285.201l.25.766a1.58%201.58%200%200%200%20.999.998l.765.248l.015.004a.303.303%200%200%201%20.146.46a.3.3%200%200%201-.146.11l-.765.248a1.58%201.58%200%200%200-.999.998l-.249.766a.302.302%200%200%201-.57%200l-.25-.766a1.58%201.58%200%200%200-.998-1.002l-.765-.248a.303.303%200%200%201-.146-.46a.3.3%200%200%201%20.146-.11l.765-.248a1.58%201.58%200%200%200%20.984-.998L16.2%206.2a.3.3%200%200%201%20.284-.2m-7.838.396a.5.5%200%201%201%20.708.708l-1.75%201.75a.5.5%200%200%201-.69.015l-.75-.684a.5.5%200%200%201%20.673-.74l.397.364zm3.507.656c.09.25.25.48.52.691q.21.15.451.21L13.105%208H11a.5.5%200%200%201%200-1h1.137zM13.48%200a.42.42%200%200%201%20.399.282l.348%201.072a2.2%202.2%200%200%200%201.398%201.396l1.072.349l.022.005a.424.424%200%200%201%200%20.797l-1.072.349a2.21%202.21%200%200%200-1.399%201.396L13.9%206.718a.423.423%200%200%201-.643.204l-.02-.015a.43.43%200%200%201-.135-.19l-.348-1.07a2.22%202.22%200%200%200-1.399-1.403l-1.072-.348a.424.424%200%200%201%200-.797l1.072-.349a2.21%202.21%200%200%200%201.377-1.396L13.08.282a.42.42%200%200%201%20.4-.282%22%2F%3E%3C%2Fsvg%3E"},Hh=a.defineComponent({__name:"AvTag",props:{label:{},tagName:{default:"p"},icon:{},disabled:{type:Boolean},small:{type:Boolean},iconOnly:{type:Boolean},selectable:{type:Boolean},selected:{type:Boolean},value:{}},emits:["select"],setup(t,{emit:e}){const n=a.createPropsRestProxy(t,["label","tagName","icon","disabled","small","iconOnly"]),r=e,o=a.computed(()=>t.disabled||n.selectable?"button":t.tagName),i=a.computed(()=>({"--icon-path":`url(${Fe.MDI_CHECK_CIRCLE_OUTLINE})`}));function s(){!t.disabled&&n.selectable&&r("select",[n.value,n.selected??!1])}return(l,c)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(o)),a.mergeProps({"aria-pressed":n.selectable?n.selected:void 0,class:["av-tag av-row av-gap-xxs av-align-center",{"av-tag--sm av-py-xxxs av-px-xs av-radius-lg":t.small,"av-py-xxs av-px-sm av-radius-xl":!t.small}],disabled:t.disabled},l.$attrs,{style:a.unref(i),onClick:s}),{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createBlock(le,{key:0,title:t.iconOnly?t.label:void 0,size:t.small?.875:1,name:t.icon},null,8,["title","size","name"])):a.createCommentVNode("",!0),t.iconOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(t.small?"caption-regular":"b2-regular")},a.toDisplayString(t.label),3))]),_:1},16,["aria-pressed","disabled","class","style"]))}}),Xc=z(Hh,[["__scopeId","data-v-937b45e8"]]),fi=1.3125,Qh=1,Wh=6,Fh=a.defineComponent({__name:"AvIconText",props:{textColor:{default:"var(--text1)"},iconColor:{default:"var(--text1)"},icon:{},text:{},typographyClass:{default:"b2-regular"},gap:{default:"var(--spacing-xs)"},inline:{type:Boolean,default:!1}},setup(t){a.useCssVars(s=>({fbbe6b4e:s.gap,v10f27b79:s.textColor}));const e=a.ref(null),n=a.ref(fi);function r(){if(!e.value){n.value=fi;return}const s=window.getComputedStyle(e.value),l=window.getComputedStyle(document.documentElement),c=Number.parseFloat(l.fontSize),d=Number.parseFloat(s.fontSize),u=Number.parseFloat(s.lineHeight),f=Number.isFinite(u)?u:d;if(!Number.isFinite(c)||c<=0||!Number.isFinite(f)||f<=0){n.value=fi;return}const h=f/c;n.value=Math.min(Wh,Math.max(Qh,h))}a.watch(()=>[t.typographyClass,t.text],async()=>{await a.nextTick(),r()},{immediate:!0}),a.onMounted(()=>{r(),window.addEventListener("resize",r)}),a.onBeforeUnmount(()=>{window.removeEventListener("resize",r)});const o=a.computed(()=>t.inline?void 0:"ellipsis-container"),i=a.computed(()=>t.inline?void 0:"ellipsis");return(s,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["icon-text--container av-row av-align-start",[a.unref(o)]])},[a.createVNode(le,{class:"icon-text--icon",name:t.icon,color:t.iconColor,size:a.unref(n)},null,8,["name","color","size"]),a.createElementVNode("span",{ref_key:"textElementRef",ref:e,class:a.normalizeClass(["icon-text--text",[a.unref(i),t.typographyClass]])},a.toDisplayString(t.text),3)],2))}}),Jc=z(Fh,[["__scopeId","data-v-8e81fdbe"]]),Uh=["role"],qh=a.defineComponent({__name:"AvMessage",props:{messageId:{},type:{},message:{}},setup(t){const e=a.computed(()=>t.messageId??`message-${crypto.randomUUID()}`),n=a.computed(()=>{switch(t.type){case"success":return{icon:D.SUCCESS_CIRCLE_OUTLINE,iconColor:"var(--dark-background-success)",textColor:"var(--dark-background-success)",typographyClass:"caption-regular"};case"warning":return{icon:D.WARNING_OUTLINE,iconColor:"var(--dark-background-warn)",textColor:"var(--dark-background-warn)",typographyClass:"caption-regular"};case"error":return{icon:D.CLOSE_OCTAGON,iconColor:"var(--dark-background-error)",textColor:"var(--dark-background-error)",typographyClass:"caption-regular"};default:return{icon:D.INFORMATION_BOX_OUTLINE,iconColor:"var(--dark-background-info)",textColor:"var(--dark-background-info)",typographyClass:"caption-regular"}}}),r=a.computed(()=>t.message?Array.isArray(t.message)?t.message:[t.message]:[]),o=a.computed(()=>t.type==="error"||t.type==="warning"?"alert":"status");return(i,s)=>{const l=Jc;return a.openBlock(),a.createElementBlock("div",{class:"av-message av-col av-gap-xs",role:a.unref(o)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r),(c,d)=>(a.openBlock(),a.createBlock(l,a.mergeProps({id:`${a.unref(e)}-${d}`,key:`${a.unref(e)}-${d}`,class:`av-message--${t.type}`},{ref_for:!0},a.unref(n),{text:c}),null,16,["id","class","text"]))),128))],8,Uh)}}}),wn=z(qh,[["__scopeId","data-v-54a570db"]]),Kh=["id"],Zh={key:1,class:"av-fieldset__element"},Yh={key:0,class:"caption-regular required"},Xh=a.defineComponent({__name:"AvFieldset",props:{legend:{default:""},legendClass:{default:"caption-regular"},legendId:{default:""},hint:{default:""},hintClass:{default:""},errorMessage:{default:""},successMessage:{default:""},inline:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},setup(t){const e=a.useSlots(),n=a.computed(()=>t.errorMessage||t.successMessage);return(r,o)=>{const i=wn;return a.openBlock(),a.createElementBlock("fieldset",{class:a.normalizeClass(["av-fieldset av-col av-pl-xs",{"av-fieldset--error":t.errorMessage,"av-fieldset--success":t.successMessage&&!t.errorMessage}])},[a.createElementVNode("div",null,[t.legend||e.legend?(a.openBlock(),a.createElementBlock("legend",{key:0,id:t.legendId,class:a.normalizeClass(["av-fieldset__legend av-w-full av-pb-xs",t.legendClass])},[a.createTextVNode(a.toDisplayString(t.legend)+" ",1),a.renderSlot(r.$slots,"legend",{},void 0,!0)],10,Kh)):a.createCommentVNode("",!0),t.hint||e.hint?(a.openBlock(),a.createElementBlock("div",Zh,[a.createElementVNode("span",{class:a.normalizeClass(["av-hint-text",t.hintClass])},[a.createTextVNode(a.toDisplayString(t.hint)+" ",1),a.renderSlot(r.$slots,"hint",{},void 0,!0)],2),t.required?(a.openBlock(),a.createElementBlock("span",Yh," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["av-fieldset__content av-col av-gap-xs",{"av-col":!t.inline,"av-row av-row-wrap av-justify-start":t.inline}])},[a.renderSlot(r.$slots,"default",{},void 0,!0)],2),a.createVNode(i,{type:t.errorMessage?"error":"success",message:a.unref(n)},null,8,["type","message"])])],2)}}}),Os=z(Xh,[["__scopeId","data-v-950baa09"]]),Jh=a.defineComponent({__name:"AvFieldsetElement",props:{disabled:{type:Boolean,default:!1}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-fieldset__element av-col av-px-xs",{"av-fieldset__element--disabled":t.disabled}])},[a.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),Bs=z(Jh,[["__scopeId","data-v-06db26e9"]]);function Gc(t,e="var(--dark-background-primary1)"){return t.replace(/###(.+?)###/gs,`<h1 style="display:flex;flex-direction:row;justify-content:start;font-size:var(--font-size-n6);line-height:var(--line-height-n5);color:${e}">$1</h1>`).replace(/@@([\s\S]+?)@@/g,"<div>$1</div>").replace(/^\s*--\s+(.*)$/gm,'<li class="indented-list">$1</li>').replace(/(\r\n|\n|\r|\\n|\\r)/g,'<div class="line-break"></div>').replace(/__(.+?)__/g,'<span class="text-underline">$1</span>').replace(/\*\*(.+?)\*\*/g,`<strong style="color: ${e}">$1</strong>`)}function $c(t){return t?t[0].toUpperCase()+t.slice(1).toLowerCase():""}const Gh={class:"b2-bold"},$h={class:"b2-regular"},_h=["innerHTML"],ep=a.defineComponent({__name:"AvNotice",props:{title:{default:""},text:{default:""},type:{}},setup(t){const e=a.computed(()=>Gc(t.text)),n=a.computed(()=>{switch(t.type){case"warning":return{name:D.WARNING,color:"var(--dark-background-warn)"};case"alert":return{name:D.WARNING_CIRCLE,color:"var(--dark-background-error)"};case"info":default:return{name:D.INFORMATION_BOX,color:"var(--dark-background-info)"}}});return(r,o)=>{const i=le;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-notice av-row av-align-center av-gap-sm av-p-sm",`av-notice--${t.type}`])},[a.createVNode(i,a.mergeProps(a.unref(n),{size:1.5}),null,16),a.createElementVNode("span",Gh,[a.createTextVNode(a.toDisplayString(t.title)+" ",1),a.createElementVNode("span",$h,[a.createElementVNode("span",{innerHTML:a.unref(e)},null,8,_h)])])],2)}}}),tp=z(ep,[["__scopeId","data-v-4d37ebd3"]]);function _c(t){return[...new Set(t)]}function np(t){return/^[^\s@]+@[^\s.@]+\.[^\s@]+$/.test(t)}const rp=["title","aria-label","aria-disabled","disabled"],op=a.defineComponent({inheritAttrs:!1,__name:"AvButton",props:{variant:{default:"DEFAULT"},theme:{default:"PRIMARY"},isLoading:{type:Boolean,default:!1},iconScale:{},noRadius:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{},iconOnly:{type:Boolean,default:!1},small:{type:Boolean,default:!1},icon:{},noSentenceCase:{type:Boolean,default:!1}},emits:["click"],setup(t,{expose:e}){const n=a.ref(null),r=a.useAttrs();function o(){var h;(h=n.value)==null||h.focus()}e({focus:o});const i={name:D.LOADING,animation:"spin"},s=a.computed(()=>t.iconScale&&!Number.isNaN(t.iconScale)?t.iconScale:t.small?1:1.5),l=a.computed(()=>{if(t.isLoading)return{...i,size:s.value};if(typeof t.icon=="string"&&t.icon.trim())return{name:t.icon,size:s.value};if(t.icon&&typeof t.icon!="string")return{...t.icon,size:s.value}}),c=a.computed(()=>t.noSentenceCase?t.label:$c(t.label)),d=a.computed(()=>t.disabled||t.isLoading),u=a.computed(()=>`av-button--variant-${t.variant.toLowerCase()}`),f=a.computed(()=>`av-button--theme-${t.theme.toLowerCase()}`);return(h,p)=>{const m=le;return a.openBlock(),a.createElementBlock("button",a.mergeProps({ref_key:"btn",ref:n},a.unref(r),{title:t.iconOnly?a.unref(c):void 0,"aria-label":a.unref(c),"aria-disabled":a.unref(d),class:["av-button av-row av-align-center av-gap-xs",[{"av-button--disabled":a.unref(d),"av-button--sm":t.small,"av-px-xs av-py-xxs":t.small&&!t.iconOnly,"av-px-sm av-py-xs":!t.small&&!t.iconOnly,"av-px-xxs av-py-xxs":t.small&&t.iconOnly,"av-px-xs av-py-xs":!t.small&&t.iconOnly,"av-radius-md":!t.noRadius&&t.small,"av-radius-lg":!t.noRadius&&!t.small,"av-radius-none":t.noRadius},a.unref(u),a.unref(f)]],disabled:a.unref(d),onClick:p[0]||(p[0]=A=>h.$emit("click",A))}),[a.unref(l)?(a.openBlock(),a.createBlock(m,a.normalizeProps(a.mergeProps({key:0},a.unref(l))),null,16)):a.createCommentVNode("",!0),t.iconOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(t.small?"b2-regular":"b1-regular")},a.toDisplayString(a.unref(c)),3))],16,rp)}}}),q=z(op,[["__scopeId","data-v-cbbd4ba0"]]),ip=["id","aria-hidden"],sp={key:0,class:"av-card__body"},ap={key:1,class:"av-card__footer"},lp=a.defineComponent({__name:"AvCard",props:{titleOnly:{type:Boolean,default:!1},backgroundColor:{default:"var(--card)"},borderColor:{default:"var(--stroke)"},titleBackground:{default:"var(--surface-background)"},titleHeight:{},collapsible:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1}},setup(t){a.useCssVars(h=>({v5196d6be:h.borderColor}));const e=a.useSlots(),n=a.ref(t.collapsed),r=a.ref(!1),o=a.computed(()=>`av-card-${crypto.randomUUID()}`),i=a.ref(null),s=a.computed(()=>n.value?"av-card__title--collapsed av--m-sm":t.titleOnly?"av-card__title--title-only av--m-sm":"av--mt-sm av--mx-sm");function l(){n.value=!n.value}function c(h){const p=["A","BUTTON","INPUT","SELECT","TEXTAREA"],m=["button","link","checkbox","radio","textbox","tab","menuitem"];if(p.includes(h.tagName))return!0;const A=h.getAttribute("role");return!!(A&&m.includes(A)||h.hasAttribute("tabindex")&&h.getAttribute("tabindex")!=="-1")}function d(h,p){if(i.value&&(h===i.value.$el||i.value.$el.contains(h)))return null;let m=h;for(;m&&m!==p;){if(c(m))return m;m=m.parentElement}return null}function u(h){var A;const p=h.target;d(p,h.currentTarget)||t.collapsible&&(l(),(A=i.value)==null||A.$el.focus())}function f(h){if(!t.collapsible)return;const p=h.target,m=d(p,h.currentTarget);r.value=!!m}return(h,p)=>{const m=q;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-card av-col av-p-sm av-justify-start av-radius-2xl",{"av-card--collapsible":t.collapsible,"av-card--hovering-interactive":a.unref(r)}]),style:a.normalizeStyle({borderColor:t.borderColor,background:t.backgroundColor}),onClick:u,onMousemove:f},[e.title?(a.openBlock(),a.createElementBlock("header",{key:0,class:a.normalizeClass(["av-card__title av-row av-align-center av-justify-between av-p-sm av-gap-sm",a.unref(s)]),style:a.normalizeStyle({background:t.titleBackground,minHeight:t.titleHeight,maxHeight:t.titleHeight})},[a.renderSlot(h.$slots,"title",{},void 0,!0),t.collapsible?(a.openBlock(),a.createBlock(m,{key:0,ref_key:"buttonRef",ref:i,"aria-controls":`${a.unref(o)}-content`,"aria-expanded":!a.unref(n),icon:a.unref(n)?a.unref(D).CHEVRON_DOWN:a.unref(D).CHEVRON_LEFT,"icon-only":"",label:"Details",onClick:a.withModifiers(l,["stop"])},null,8,["aria-controls","aria-expanded","icon"])):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.titleOnly?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:1,id:`${a.unref(o)}-content`,"aria-hidden":t.collapsible&&a.unref(n),class:a.normalizeClass(["av-card__content-collapsible av-col av-justify-between av-h-full av-gap-sm",{"av-pt-sm":!!e.title}])},[a.renderSlot(h.$slots,"default",{},void 0,!0),e.body?(a.openBlock(),a.createElementBlock("div",sp,[a.renderSlot(h.$slots,"body",{},void 0,!0)])):a.createCommentVNode("",!0),e.footer?(a.openBlock(),a.createElementBlock("div",ap,[a.renderSlot(h.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],10,ip)),[[a.vShow,!t.collapsible||!a.unref(n)]])],38)}}}),cp=z(lp,[["__scopeId","data-v-2b7e7419"]]),dp=["id","role"],up={class:"av-alert__container av-row av-align-center av-justify-between av-w-full av-gap-md"},fp={class:"av-alert__content av-row av-align-center av-gap-sm"},hp={class:"av-col"},pp={key:0,class:"s2-bold"},mp={class:"b1-regular"},Ap=a.defineComponent({__name:"AvAlert",props:{closed:{type:Boolean},closeable:{type:Boolean},id:{},title:{default:""},description:{},small:{type:Boolean,default:!1},type:{default:"info"},closeButtonLabel:{default:"Fermer"}},emits:["close"],setup(t,{emit:e}){const n=e,r=t.id??`alert-${crypto.randomUUID()}`,o=()=>n("close"),i=a.computed(()=>[`av-alert--${t.type}`,{"av-alert--sm av-p-sm":t.small,"av-p-md":!t.small}]),s=a.computed(()=>{switch(t.type){case"error":return{name:D.ALERT_CIRCLE_OUTLINE,color:"var(--dark-background-error)"};case"success":return{name:D.CHECK_CIRCLE,color:"var(--dark-background-success)"};case"warning":return{name:D.WARNING_OUTLINE,color:"var(--dark-background-warn)"};case"info":default:return{name:D.INFORMATION_OUTLINE,color:"var(--dark-background-primary1)"}}}),l=a.computed(()=>t.type==="error"||t.type==="warning"?"alert":"status");return(c,d)=>t.closed?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(r),class:a.normalizeClass(["av-alert av-radius-lg",a.unref(i)]),role:a.unref(l)},[a.createElementVNode("div",up,[a.createElementVNode("div",fp,[a.createVNode(le,a.mergeProps(a.unref(s),{size:3}),null,16),a.createElementVNode("div",hp,[t.small?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",pp,a.toDisplayString(t.title),1)),a.createElementVNode("span",mp,a.toDisplayString(t.description),1)])]),t.closeable?(a.openBlock(),a.createBlock(q,{key:0,"icon-only":"",icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,label:t.closeButtonLabel,small:t.small,onClick:o},null,8,["icon","label","small"])):a.createCommentVNode("",!0)])],10,dp))}}),ed=z(Ap,[["__scopeId","data-v-ca1d56c7"]]),gp={class:"toaster-container"},bp=a.defineComponent({__name:"AvToaster",props:{messages:{},onRemoveMessage:{type:Function}},setup(t){function e(r){return`av-toaster--${r??"info"} av-toaster--icon`}function n(r){switch(r){case"error":return{"--icon-path":`url(${Fe.MDI_ALERT_CIRCLE_OUTLINE})`};case"success":return{"--icon-path":`url(${Fe.MDI_CHECK_CIRCLE})`};case"warning":return{"--icon-path":`url(${Fe.MDI_WARNING_OUTLINE})`};case"info":default:return{"--icon-path":`url(${Fe.MDI_MESSAGE_BADGE})`}}}return(r,o)=>(a.openBlock(),a.createElementBlock("div",gp,[a.createVNode(a.TransitionGroup,{mode:"out-in",name:"list",tag:"div",class:"toasters av-col av-align-center"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.messages,i=>(a.openBlock(),a.createBlock(ed,a.mergeProps({key:i.id,class:["av-toaster",e(i.type)]},{ref_for:!0},i,{style:n(i.type),onClose:s=>t.onRemoveMessage(i.id)}),null,16,["class","style","onClose"]))),128))]),_:1})]))}}),vp=z(bp,[["__scopeId","data-v-cfd2bdbb"]]),yp={},Cp={width:"214",height:"97",viewBox:"0 0 214 97",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function Ip(t,e){return a.openBlock(),a.createElementBlock("svg",Cp,[...e[0]||(e[0]=[a.createElementVNode("rect",{width:"213.732",height:"96.9",fill:"url(#pattern0_40000620_15397)"},null,-1),a.createElementVNode("defs",null,[a.createElementVNode("pattern",{id:"pattern0_40000620_15397",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},[a.createElementVNode("use",{"xlink:href":"#image0_40000620_15397",transform:"matrix(0.00087108 0 0 0.00192134 0 -0.0139577)"})]),a.createElementVNode("image",{id:"image0_40000620_15397",width:"1148",height:"535",preserveAspectRatio:"none","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABHwAAAIXCAYAAADua0mMAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAEfKADAAQAAAABAAACFwAAAAAm6OSwAABAAElEQVR4Aey9bZAcR3rnl1ndMwOtZAEbku5MEDzMSicCcZKFWYlgSOYCaJzOsQZ4NoZ2nMNyxB2alu2P5jD84b4ARJNAOBz2Bw4/2I6wfWbjwmfrfIrbYZyXCIV9wR5w115jcNqZs3UHgFpzcMSCp7dbjG7FnZfuSj9Z3T3T069V1ZlPZlX9KwhOV1XWk5m/zO6qevJ5EQIbCIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACICAGQLSjBhIAQEQAAEQAAEQAAEQAAEQAAEQmJbA6V+tzYtmc17L2W6W1zfXa8+mlYnrQQAEikkACp9ijjt6DQIgAAIgAAIgAAIgAAIg4JjAiy9fW5QqqAihFqgp+t9R+je4SfFYKLEppWy0VLDyyVptfbAQjoAACIDAYQJQ+BzmgT0QAAEQAAEQAAEQAAEQAAEQsEbg58/WFqRoLkkhF6mS4QqeSbWTAoiur2/vBsuwAJoEC+dBoLgEoPAp7tij5yAAAiAAAiAAAiAAAiAAAkwEtKuWarXqVN0Fs1XK93b2ghoUP2apQhoI5IEAFD55GEX0AQRAAARAAARAAARAAARAwEsC8wu1Y3MzYY3ctt6w2MAtcvmqPbx/c9liHRANAiCQMQJQ+GRswNBcEAABEAABEAABEAABEACBbBDQ7luBiKx6zrC0WIoPdnZLVVj7sNBGJSDgPQEofLwfIjQQBEAABEAABEAABEAABEAgawQ6yp4GtTtdnJ70Hd7Y2StVoPRJDxBXgkBeCAR56Qj6AQIgAAIgAAIgAAIgA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QgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAoBUC/xeO1ficY0Mf5gAAAABJRU5ErkJggg=="})],-1)])])}const td=z(yp,[["render",Ip]]),kp={class:"av-header__brand av-row av-justify-start av-align-center av-wrap av-px-xxs av-w-full av-nowrap--lg av--my-sm--lg av-px-none--lg"},Ep={class:"av-header__brand-top av-row av-justify-start av-align-center av-w-full"},Mp={class:"av-header__logo av-enlarge-link"},wp={key:0,class:"av-header__navbar av-row av-flex-fill av-align-start av-justify-end av-mt-xxs av-p-xxs av-gap-sm av-unhidden av-hidden--lg"},Np=a.defineComponent({__name:"HeaderBrand",props:{homeTo:{},title:{},showSearchButton:{type:Boolean},showSearchLabel:{},showMenuButton:{type:Boolean},showMenuLabel:{}},emits:["showSearchDrawer","showMenuDrawer"],setup(t,{emit:e}){const n=e;return(r,o)=>{const i=a.resolveComponent("RouterLink");return a.openBlock(),a.createElementBlock("div",kp,[a.createElementVNode("div",Ep,[a.createElementVNode("div",Mp,[a.createVNode(i,{to:t.homeTo,title:t.title},{default:a.withCtx(()=>[a.createVNode(td,{"data-testid":"header-logo"})]),_:1},8,["to","title"])]),t.showSearchButton||t.showMenuButton?(a.openBlock(),a.createElementBlock("div",wp,[t.showSearchButton?(a.openBlock(),a.createBlock(q,{key:0,label:t.showSearchLabel,"aria-label":t.showSearchLabel,title:t.showSearchLabel,icon:a.unref(D).MAGNIFY,"icon-only":"","data-testid":"open-search-btn",onClick:o[0]||(o[0]=a.withModifiers(s=>n("showSearchDrawer"),["prevent","stop"]))},null,8,["label","aria-label","title","icon"])):a.createCommentVNode("",!0),t.showMenuButton?(a.openBlock(),a.createBlock(q,{key:1,variant:"OUTLINED",icon:a.unref(D).HAMBURGER_MENU,"aria-haspopup":"dialog",label:t.showMenuLabel,"aria-label":t.showMenuLabel,title:t.showMenuLabel,"icon-only":"","data-testid":"open-menu-btn",onClick:o[1]||(o[1]=a.withModifiers(s=>n("showMenuDrawer"),["prevent","stop"]))},null,8,["icon","label","aria-label","title"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),a.renderSlot(r.$slots,"roleContext",{},void 0,!0)])}}}),xp=z(Np,[["__scopeId","data-v-f3484d39"]]);function Rs(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}const hi=new WeakMap,Sp=(...t)=>{var e;const n=t[0],r=(e=a.getCurrentInstance())==null?void 0:e.proxy;if(r==null&&!a.hasInjectionContext())throw new Error("injectLocal must be called in setup");return r&&hi.has(r)&&n in hi.get(r)?hi.get(r)[n]:a.inject(...t)},nd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Tp=t=>t!=null,Lp=Object.prototype.toString,Dp=t=>Lp.call(t)==="[object Object]",Yt=()=>{},Wa=Op();function Op(){var t,e;return nd&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Bp(...t){if(t.length!==1)return a.toRef(...t);const e=t[0];return typeof e=="function"?a.readonly(a.customRef(()=>({get:e,set:Yt}))):a.ref(e)}function rd(t,e){function n(...r){return new Promise((o,i)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(i)})}return n}function Rp(t,e={}){let n,r,o=Yt;const i=c=>{clearTimeout(c),o(),o=Yt};let s;return c=>{const d=a.toValue(t),u=a.toValue(e.maxWait);return n&&i(n),d<=0||u!==void 0&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(c())):new Promise((f,h)=>{o=e.rejectOnCancel?h:f,s=c,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,f(s())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,f(c())},d)})}}function zp(...t){let e=0,n,r=!0,o=Yt,i,s,l,c,d;!a.isRef(t[0])&&typeof t[0]=="object"?{delay:s,trailing:l=!0,leading:c=!0,rejectOnCancel:d=!1}=t[0]:[s,l=!0,c=!0,d=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,o(),o=Yt)};return h=>{const p=a.toValue(s),m=Date.now()-e,A=()=>i=h();return u(),p<=0?(e=Date.now(),A()):(m>p&&(c||!r)?(e=Date.now(),A()):l&&(i=new Promise((g,b)=>{o=d?b:g,n=setTimeout(()=>{e=Date.now(),r=!0,g(A()),u()},Math.max(0,p-m))})),!c&&!n&&(n=setTimeout(()=>r=!0,p)),r=!1,i)}}function Pp(t,e){var n;if(typeof t=="number")return t+e;const r=((n=t.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",o=t.slice(r.length),i=Number.parseFloat(r)+e;return Number.isNaN(i)?t:i+o}function qn(t){return t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t)}function Qr(t){return Array.isArray(t)?t:[t]}function Vp(t){return a.getCurrentInstance()}function jp(t,e=200,n={}){return rd(Rp(e,n),t)}function Hp(t,e=200,n=!1,r=!0,o=!1){return rd(zp(e,n,r,o),t)}function od(t,e=!0,n){Vp()?a.onMounted(t,n):e?t():a.nextTick(t)}function Qp(t,e,n){return a.watch(t,e,{...n,immediate:!0})}const vr=nd?window:void 0;function zs(t){var e;const n=a.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Xr(...t){const e=[],n=()=>{e.forEach(l=>l()),e.length=0},r=(l,c,d,u)=>(l.addEventListener(c,d,u),()=>l.removeEventListener(c,d,u)),o=a.computed(()=>{const l=Qr(a.toValue(t[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=Qp(()=>{var l,c;return[(c=(l=o.value)==null?void 0:l.map(d=>zs(d)))!=null?c:[vr].filter(d=>d!=null),Qr(a.toValue(o.value?t[1]:t[0])),Qr(a.unref(o.value?t[2]:t[1])),a.toValue(o.value?t[3]:t[2])]},([l,c,d,u])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(d!=null&&d.length))return;const f=Dp(u)?{...u}:u;e.push(...l.flatMap(h=>c.flatMap(p=>d.map(m=>r(h,p,m,f)))))},{flush:"post"}),s=()=>{i(),n()};return Rs(n),s}function Wp(){const t=a.shallowRef(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{t.value=!0},e),t}function id(t){const e=Wp();return a.computed(()=>(e.value,!!t()))}function Fp(t,e,n={}){const{window:r=vr,...o}=n;let i;const s=id(()=>r&&"MutationObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},c=a.computed(()=>{const h=a.toValue(t),p=Qr(h).map(zs).filter(Tp);return new Set(p)}),d=a.watch(c,h=>{l(),s.value&&h.size&&(i=new MutationObserver(e),h.forEach(p=>i.observe(p,o)))},{immediate:!0,flush:"post"}),u=()=>i==null?void 0:i.takeRecords(),f=()=>{d(),l()};return Rs(f),{isSupported:s,stop:f,takeRecords:u}}const Up=Symbol("vueuse-ssr-width");function sd(){const t=a.hasInjectionContext()?Sp(Up,null):null;return typeof t=="number"?t:void 0}function Tn(t,e={}){const{window:n=vr,ssrWidth:r=sd()}=e,o=id(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=a.shallowRef(typeof r=="number"),s=a.shallowRef(),l=a.shallowRef(!1),c=d=>{l.value=d.matches};return a.watchEffect(()=>{if(i.value){i.value=!o.value;const d=a.toValue(t).split(",");l.value=d.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let m=!!(h||p);return h&&m&&(m=r>=qn(h[1])),p&&m&&(m=r<=qn(p[1])),f?!m:m});return}o.value&&(s.value=n.matchMedia(a.toValue(t)),l.value=s.value.matches)}),Xr(s,"change",c,{passive:!0}),a.computed(()=>l.value)}function qp(t,e={}){function n(p,m){let A=a.toValue(t[a.toValue(p)]);return m!=null&&(A=Pp(A,m)),typeof A=="number"&&(A=`${A}px`),A}const{window:r=vr,strategy:o="min-width",ssrWidth:i=sd()}=e,s=typeof i=="number",l=s?a.shallowRef(!1):{value:!0};s&&od(()=>l.value=!!r);function c(p,m){return!l.value&&s?p==="min"?i>=qn(m):i<=qn(m):r?r.matchMedia(`(${p}-width: ${m})`).matches:!1}const d=p=>Tn(()=>`(min-width: ${n(p)})`,e),u=p=>Tn(()=>`(max-width: ${n(p)})`,e),f=Object.keys(t).reduce((p,m)=>(Object.defineProperty(p,m,{get:()=>o==="min-width"?d(m):u(m),enumerable:!0,configurable:!0}),p),{});function h(){const p=Object.keys(t).map(m=>[m,f[m],qn(n(m))]).sort((m,A)=>m[2]-A[2]);return a.computed(()=>p.filter(([,m])=>m.value).map(([m])=>m))}return Object.assign(f,{greaterOrEqual:d,smallerOrEqual:u,greater(p){return Tn(()=>`(min-width: ${n(p,.1)})`,e)},smaller(p){return Tn(()=>`(max-width: ${n(p,-.1)})`,e)},between(p,m){return Tn(()=>`(min-width: ${n(p)}) and (max-width: ${n(m,-.1)})`,e)},isGreater(p){return c("min",n(p,.1))},isGreaterOrEqual(p){return c("min",n(p))},isSmaller(p){return c("max",n(p,-.1))},isSmallerOrEqual(p){return c("max",n(p))},isInBetween(p,m){return c("min",n(p))&&c("max",n(m,-.1))},current:h,active(){const p=h();return a.computed(()=>p.value.length===0?"":p.value.at(o==="min-width"?-1:0))}})}function pi(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const Fa=1;function Kp(t,e={}){const{throttle:n=0,idle:r=200,onStop:o=Yt,onScroll:i=Yt,offset:s={left:0,right:0,top:0,bottom:0},observe:l={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:d="auto",window:u=vr,onError:f=I=>{console.error(I)}}=e,h=typeof l=="boolean"?{mutation:l}:l,p=a.shallowRef(0),m=a.shallowRef(0),A=a.computed({get(){return p.value},set(I){b(I,void 0)}}),g=a.computed({get(){return m.value},set(I){b(void 0,I)}});function b(I,U){var K,Q,M,E;if(!u)return;const L=a.toValue(t);if(!L)return;(M=L instanceof Document?u.document.body:L)==null||M.scrollTo({top:(K=a.toValue(U))!=null?K:g.value,left:(Q=a.toValue(I))!=null?Q:A.value,behavior:a.toValue(d)});const V=((E=L==null?void 0:L.document)==null?void 0:E.documentElement)||(L==null?void 0:L.documentElement)||L;A!=null&&(p.value=V.scrollLeft),g!=null&&(m.value=V.scrollTop)}const v=a.shallowRef(!1),y=a.reactive({left:!0,right:!1,top:!0,bottom:!1}),C=a.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=I=>{v.value&&(v.value=!1,C.left=!1,C.right=!1,C.top=!1,C.bottom=!1,o(I))},N=jp(k,n+r),S=I=>{var U;if(!u)return;const K=((U=I==null?void 0:I.document)==null?void 0:U.documentElement)||(I==null?void 0:I.documentElement)||zs(I),{display:Q,flexDirection:M,direction:E}=getComputedStyle(K),L=E==="rtl"?-1:1,V=K.scrollLeft;C.left=V<p.value,C.right=V>p.value;const W=Math.abs(V*L)<=(s.left||0),Z=Math.abs(V*L)+K.clientWidth>=K.scrollWidth-(s.right||0)-Fa;Q==="flex"&&M==="row-reverse"?(y.left=Z,y.right=W):(y.left=W,y.right=Z),p.value=V;let H=K.scrollTop;I===u.document&&!H&&(H=u.document.body.scrollTop),C.top=H<m.value,C.bottom=H>m.value;const _=Math.abs(H)<=(s.top||0),re=Math.abs(H)+K.clientHeight>=K.scrollHeight-(s.bottom||0)-Fa;Q==="flex"&&M==="column-reverse"?(y.top=re,y.bottom=_):(y.top=_,y.bottom=re),m.value=H},O=I=>{var U;if(!u)return;const K=(U=I.target.documentElement)!=null?U:I.target;S(K),v.value=!0,N(I),i(I)};return Xr(t,"scroll",n?Hp(O,n,!0,!1):O,c),od(()=>{try{const I=a.toValue(t);if(!I)return;S(I)}catch(I){f(I)}}),h!=null&&h.mutation&&t!=null&&t!==u&&t!==document&&Fp(t,()=>{const I=a.toValue(t);I&&S(I)},{attributes:!0,childList:!0,subtree:!0}),Xr(t,"scrollend",k,c),{x:A,y:g,isScrolling:v,arrivedState:y,directions:C,measure(){const I=a.toValue(t);u&&I&&S(I)}}}function ad(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:ad(n)}}function Zp(t){const e=t||window.event,n=e.target;return ad(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const mi=new WeakMap;function Yp(t,e=!1){const n=a.shallowRef(e);let r=null,o="";a.watch(Bp(t),l=>{const c=pi(a.toValue(l));if(c){const d=c;if(mi.get(d)||mi.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(o=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=pi(a.toValue(t));!l||n.value||(Wa&&(r=Xr(l,"touchmove",c=>{Zp(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},s=()=>{const l=pi(a.toValue(t));!l||!n.value||(Wa&&(r==null||r()),l.style.overflow=o,mi.delete(l),n.value=!1)};return Rs(s),a.computed({get(){return n.value},set(l){l?i():s()}})}/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),Zc=require("./injection-key.cjs.js");function Yc(t){const e=t==null?void 0:t.trim();return e?e.startsWith("data:")?{"--icon-path":`url(${e})`}:{"--icon-path":`var(--icon-${e.replace(":","-")})`}:{}}const Sh=["title"],Th=a.defineComponent({__name:"AvBadge",props:{color:{},backgroundColor:{},borderColor:{default:"transparent"},icon:{},label:{},small:{type:Boolean,default:!1},ellipsis:{type:Boolean,default:!1}},setup(t){a.useCssVars(n=>({daab4f7c:n.color,v2120d4f4:n.backgroundColor,v90af6794:n.borderColor}));const e=a.computed(()=>Yc(t.icon));return(n,r)=>(a.openBlock(),a.createElementBlock("span",{role:"status",class:a.normalizeClass(["av-badge av-row av-align-center av-py-none av-m-none av-radius-sm",{"av-badge--sm av-px-xxs":t.small,"av-px-xs":!t.small,"av-badge--custom-icon":t.icon,"av-badge--no-icon":!t.icon}]),title:t.label,style:a.normalizeStyle(a.unref(e))},[a.createElementVNode("span",{class:a.normalizeClass({"av-ellipsis":t.ellipsis,"caption-regular":t.small,"b2-regular":!t.small})},a.toDisplayString(t.label),3)],14,Sh))}}),z=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},Lh=z(Th,[["__scopeId","data-v-7c129502"]]),Dh=["title"],Oh=a.defineComponent({__name:"AvIcon",props:{size:{default:1},name:{},animation:{},speed:{},flip:{},title:{},color:{default:"currentColor"}},setup(t){a.useCssVars(o=>({v0fe1d2a2:a.unref(e),v52daaaf1:o.color}));const e=a.computed(()=>`${t.size}rem`),n=a.computed(()=>Yc(t.name)),r=a.computed(()=>{switch(t.flip){case"horizontal":return"scaleX(-1)";case"vertical":return"scaleY(-1)";case"both":return"scale(-1, -1)";default:return}});return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-icon av-col",{"av-icon--spin":t.animation==="spin","av-icon--wrench":t.animation==="wrench","av-icon--pulse":t.animation==="pulse","av-icon--spin-pulse":t.animation==="spin-pulse","av-icon--flash":t.animation==="flash","av-icon--float":t.animation==="float","av-icon--ring":t.animation==="ring","av-icon--slow":t.speed==="slow","av-icon--fast":t.speed==="fast"}]),title:t.title,"aria-hidden":"true"},[a.createElementVNode("span",{class:"av-icon__icon av-w-full av-h-full av-align-center av-justify-center",style:a.normalizeStyle([a.unref(n),{transform:a.unref(r)}])},null,4)],10,Dh))}}),le=z(Oh,[["__scopeId","data-v-050015d7"]]),Bh={VISIBILITY_ON_OUTLINE:"cuida:visibility-on-outline"},Rh={ACTION_CHAINS_OUTLINED:"eos-icons:action-chains-outlined"},zh={TASK_LIST_SQUARE_SPARKLE_24_REGULAR:"fluent:task-list-square-sparkle-24-regular"},Ph={LIBRARY_NEW:"ix:library-new"},D={ACCOUNT_CIRCLE_OUTLINE:"mdi:account-circle-outline",ACCOUNT_STUDENT_OUTLINE:"mdi:account-student-outline",ALERT_CIRCLE_OUTLINE:"mdi:alert-circle-outline",ALERT_OUTLINE:"mdi:alert-outline",ARROW_DECISION:"mdi:arrow-decision",ARROW_LEFT_THIN:"mdi:arrow-left-thin",ARROW_RIGHT:"mdi:arrow-right",ARROW_RIGHT_BOTTOM:"mdi:arrow-right-bottom",ARROW_RIGHT_THIN:"mdi:arrow-right-thin",ARROW_TOP_RIGHT_THICK:"mdi:arrow-top-right-thick",ATTACH_FILE:"mdi:attach-file",ATTACHMENT_PLUS:"mdi:attachment-plus",BACKUP_RESTORE:"mdi:backup-restore",BELL_NOTIFICATION:"mdi:bell-notification",BOOK_LOCATION_OUTLINE:"mdi:book-location-outline",BOOK_OPEN_VARIANT:"mdi:book-open-variant",BOOK_OUTLINE:"mdi:book-outline",BOOKMARK_CHECK:"mdi:bookmark-check",BRIEFCASE_VARIANT_OUTLINE:"mdi:briefcase-variant-outline",BUILDING:"mdi:building",CALENDAR_BLANK_OUTLINE:"mdi:calendar-blank-outline",CALENDAR_CHECK_OUTLINE:"mdi:calendar-check-outline",CALENDAR_CLOCK_OUTLINE:"mdi:calendar-clock-outline",CALENDAR_MONTH_OUTLINE:"mdi:calendar-month-outline",CALENDAR_OUTLINE:"mdi:calendar-outline",CALENDAR_TIME:"mdi:calendar-time",CALENDAR_RANGE_OUTLINE:"mdi:calendar-range-outline",CALENDAR_WEEK_OUTLINE:"mdi:calendar-week-outline",CHART_TIMELINE_VARIANT_SHIMMER:"mdi:chart-timeline-variant-shimmer",CHAT_ALERT:"mdi:chat-alert",CHAT_BUBBLE_OUTLINE:"mdi:chat-bubble-outline",CHECK:"mdi:check",CHECK_CIRCLE:"mdi:check-circle",CHECK_CIRCLE_OUTLINE:"mdi:check-circle-outline",CHECK_DECAGRAM_OUTLINE:"mdi:check-decagram-outline",CHECKBOX_BLANK_OUTLINE:"mdi:checkbox-blank-outline",CHECKBOX_MARKED:"mdi:checkbox-marked",CHEVRON_DOUBLE_LEFT:"mdi:chevron-double-left",CHEVRON_DOUBLE_RIGHT:"mdi:chevron-double-right",CHEVRON_DOWN:"mdi:chevron-down",CHEVRON_LEFT:"mdi:chevron-left",CHEVRON_RIGHT:"mdi:chevron-right",CIRCLE:"mdi:circle",CIRCLE_OUTLINE:"mdi:circle-outline",CLAPPERBOARD_OUTLINE:"mdi:clapperboard-outline",CLOCK_OUTLINE:"mdi:clock-outline",CLOSE_CIRCLE_OUTLINE:"mdi:close-circle-outline",CLOSE_OCTAGON:"mdi:close-octagon",CONTENT_SAVE_OUTLINE:"mdi:content-save-outline",DIAMOND_STONE:"mdi:diamond-stone",DOTS_HORIZONTAL_CIRCLE_OUTLINE:"mdi:dots-horizontal-circle-outline",DOTS_VERTICAL:"mdi:dots-vertical",ELECTRON_FRAMEWORK:"mdi:electron-framework",EMAIL_OUTLINE:"mdi:email-outline",FAMILY:"mdi:family",FILE:"mdi:file",FILE_ACCOUNT_OUTLINE:"mdi:file-account-outline",FILE_DOCUMENT_BOX_MULTIPLE_OUTLINE:"mdi:file-document-box-multiple-outline",FILE_DOCUMENT_EDIT_OUTLINE:"mdi:file-document-edit-outline",FILE_DOCUMENT_MULTIPLE_OUTLINE:"mdi:file-document-multiple-outline",FILE_IMAGE_OUTLINE:"mdi:file-image-outline",FILE_REFRESH_OUTLINE:"mdi:file-refresh-outline",FILE_RESTORE_OUTLINE:"mdi:file-restore-outline",FILE_TREE_OUTLINE:"mdi:file-tree-outline",FILTER_OUTLINE:"mdi:filter-outline",FLAG_VARIANT:"mdi:flag-variant",FLARE:"mdi:flare",FORMAT_ALIGN_CENTER:"mdi:format-align-center",FORMAT_ALIGN_JUSTIFY:"mdi:format-align-justify",FORMAT_ALIGN_LEFT:"mdi:format-align-left",FORMAT_ALIGN_RIGHT:"mdi:format-align-right",FORMAT_BOLD:"mdi:format-bold",FORMAT_HEADING_1:"mdi:format-heading-1",FORMAT_HEADING_2:"mdi:format-heading-2",FORMAT_HEADING_3:"mdi:format-heading-3",FORMAT_INDENT_DECREASE:"mdi:format-indent-decrease",FORMAT_INDENT_INCREASE:"mdi:format-indent-increase",FORMAT_ITALIC:"mdi:format-italic",FORMAT_LIST_BULLETED:"mdi:format-list-bulleted",FORMAT_LIST_NUMBERED:"mdi:format-list-numbered",FORMAT_PARAGRAPH:"mdi:format-paragraph",FORMAT_UNDERLINE:"mdi:format-underline",HAMBURGER_MENU:"mdi:hamburger-menu",HISTORY:"mdi:history",HOME_VARIANT_OUTLINE:"mdi:home-variant-outline",HOURGLASS:"mdi:hourglass",HUB_OUTLINE:"mdi:hub-outline",IMAGE_FILTER_CENTER_FOCUS_WEAK:"mdi:image-filter-center-focus-weak",IMAGE_OUTLINE:"mdi:image-outline",IMAGE_REMOVE_OUTLINE:"mdi:image-remove-outline",IMAGE_REFRESH_OUTLINE:"mdi:image-refresh-outline",INFORMATION_BOX:"mdi:information-box",INFORMATION_BOX_OUTLINE:"mdi:information-box-outline",INFORMATION_OUTLINE:"mdi:information-outline",KEYBOARD_ARROW_DOWN:"mdi:keyboard-arrow-down",KEYBOARD_ARROW_RIGHT:"mdi:keyboard-arrow-right",LINK:"mdi:link",LOADING:"mdi:loading",LOCK_OUTLINE:"mdi:lock-outline",LOGOUT:"mdi:logout",LOUDSPEAKER_OUTLINE:"mdi:loudspeaker-outline",MAGNIFY:"mdi:magnify",MAP_MARKER_OUTLINE:"mdi:map-marker-outline",MESSAGE_BADGE:"mdi:message-badge",MINUS:"mdi:minus",NAVIGATE_BEFORE:"mdi:navigate-before",NAVIGATE_NEXT:"mdi:navigate-next",NEWSPAPER_VARIANT:"mdi:newspaper-variant",NOTEBOOK_CHECK:"mdi:notebook-check",NOTIFICATIONS_NONE:"mdi:notifications-none",PAGE_FIRST:"mdi:page-first",PAGE_LAST:"mdi:page-last",PENCIL_OUTLINE:"mdi:pencil-outline",PEOPLE_GROUP_OUTLINE:"mdi:people-group-outline",PHONE_OUTLINE:"mdi:phone-outline",PLUS:"mdi:plus",PLUS_CIRCLE_OUTLINE:"mdi:plus-circle-outline",POST_IT_NOTES_OUTLINE:"mdi:post-it-notes-outline",PRINTER_OUTLINE:"mdi:printer-outline",RATE_REVIEW:"mdi:rate-review",RECORD_CIRCLE_OUTLINE:"mdi:record-circle-outline",REDO:"mdi:redo",REFRESH:"mdi:refresh",RESTART:"mdi:restart",RESTORE:"mdi:restore",SCHOOL_OUTLINE:"mdi:school-outline",SETTINGS:"mdi:settings",SHARE_VARIANT_OUTLINE:"mdi:share-variant-outline",STAR:"mdi:star",STAR_CHECK_OUTLINE:"mdi:star-check-outline",STAR_SHOOTING_OUTLINE:"mdi:star-shooting-outline",STARS:"mdi:stars",STOREFRONT_OUTLINE:"mdi:storefront-outline",SUCCESS_CIRCLE_OUTLINE:"mdi:success-circle-outline",SWAP_HORIZONTAL:"mdi:swap-horizontal",SWAP_VERTICAL_VARIANT:"mdi:swap-vertical-variant",TABLE_COLUMN_PLUS_AFTER:"mdi:table-column-plus-after",TABLE_COLUMN_PLUS_BEFORE:"mdi:table-column-plus-before",TABLE_COLUMN_REMOVE:"mdi:table-column-remove",TABLE_PLUS:"mdi:table-plus",TABLE_REMOVE:"mdi:table-remove",TABLE_ROW_PLUS_AFTER:"mdi:table-row-plus-after",TABLE_ROW_PLUS_BEFORE:"mdi:table-row-plus-before",TABLE_ROW_REMOVE:"mdi:table-row-remove",TABLE_SETTINGS:"mdi:table-settings",TARGET_ARROW:"mdi:target-arrow",TEST_TUBE_EMPTY:"mdi:test-tube-empty",TEXT_BOX_CHECK_OUTLINE:"mdi:text-box-check-outline",TRANSLATE:"mdi:translate",TRASH_CAN_OUTLINE:"mdi:trash-can-outline",TRAY_UPLOAD:"mdi:tray-upload",UNDO:"mdi:undo",VECTOR_POLYGON_VARIANT:"mdi:vector-polygon-variant",WARNING:"mdi:warning",WARNING_CIRCLE:"mdi:warning-circle",WARNING_OUTLINE:"mdi:warning-outline",WEIGHTS:"mdi:weights"},Un={BOOKMARK_STAR_OUTLINE:"material-symbols:bookmark-star-outline",CLOCK_LOADER_20:"material-symbols:clock-loader-20",CLOCK_LOADER_40:"material-symbols:clock-loader-40",CLOCK_LOADER_60:"material-symbols:clock-loader-60",CLOCK_LOADER_90:"material-symbols:clock-loader-90",FEATURED_PLAY_LIST_OUTLINE:"material-symbols:featured-play-list-outline",LINK_OFF_ROUNDED:"material-symbols:link-off-rounded",LINK_ROUNDED:"material-symbols:link-rounded",REDO:"material-symbols:redo",UNDO:"material-symbols:undo"},Vh={NOTE_PENCIL:"ph:note-pencil"},jh={BOOK_SHELF_LINE:"ri:book-shelf-line",DIAMOND_FILL:"ri:diamond-fill",DICE_1_LINE:"ri:dice-1-line",DICE_4_LINE:"ri:dice-4-line",DRAW_LINE:"ri:draw-line",HAND_HEART_LINE:"ri:hand-heart-line",HONOUR_LINE:"ri:honour-line",LAYOUT_6_LINE:"ri:layout-6-line",LOADER_LINE:"ri:loader-line",TIMER_LINE:"ri:timer-line"},Fe={AMS_SAE:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgZmlsbD0iY3VycmVudENvbG9yIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNNS4yNSAxNy41SDExLjM3NVYxOS4yNUg1LjI1QzQuMjc4NzUgMTkuMjUgMy41IDE4LjQ3MTMgMy41IDE3LjVWMy41QzMuNSAzLjAzNTg3IDMuNjg0MzcgMi41OTA3NSA0LjAxMjU2IDIuMjYyNTZDNC4zNDA3NSAxLjkzNDM3IDQuNzg1ODcgMS43NSA1LjI1IDEuNzVIMTUuNzVDMTYuMjE0MSAxLjc1IDE2LjY1OTIgMS45MzQzNyAxNi45ODc0IDIuMjYyNTZDMTcuMzE1NiAyLjU5MDc1IDE3LjUgMy4wMzU4NyAxNy41IDMuNVYxMC45NzI1TDE2LjE4NzUgMTAuMjU1TDE1Ljc1IDEwLjVWMy41SDExLjM3NVYxMC41TDkuMTg3NSA4LjUzMTI1TDcgMTAuNVYzLjVINS4yNVYxNy41Wk0yMSAxNC44NzVMMTYuMTg3NSAxMi4yNUwxMS4zNzUgMTQuODc1TDE2LjE4NzUgMTcuNUwyMSAxNC44NzVaTTEzLjEyNSAxNi43MDM4VjE4LjQ1MzhMMTYuMTg3NSAyMC4xMjVMMTkuMjUgMTguNDUzOFYxNi43MDM4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TItLjcyVjVINXYxNGg3LjA4Yy4xMi43Mi4zNyAxLjM5LjcyIDJtLS44LTRIN3YtMmg1bTIuNjgtMkg3di0yaDEwdjEuMDhjLS44NS4xNC0xLjYzLjQ2LTIuMzIuOTJNMTcgOUg3VjdoMTAiLz48L3N2Zz4=",MDI_WARNING_OUTLINE:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBmaWxsPSJjdXJyZW50Q29sb3IiIGQ9Ik0xMiAyTDEgMjFoMjJNMTIgNmw3LjUzIDEzSDQuNDdNMTEgMTB2NGgydi00bS0yIDZ2Mmgydi0yIi8+PC9zdmc+",TEXT_BULLET_LIST_SPARKLE:"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%3E%3Cpath%20fill%3D%22currentColor%22%20d%3D%22M9.089%203a1.42%201.42%200%200%200%20.003%201H6a2%202%200%200%200-2%202v8a2%202%200%200%200%202%202h8a2%202%200%200%200%202-2v-2.104q.238.1.502.103c.173%200%20.341-.022.498-.08V14a3%203%200%200%201-3%203H6a3%203%200%200%201-3-3V6a3%203%200%200%201%203-3zm-.443%208.397a.5.5%200%201%201%20.708.707l-1.75%201.75a.5.5%200%200%201-.69.015l-.75-.684a.5.5%200%200%201%20.673-.74l.397.364zM13.5%2012a.5.5%200%200%201%200%201H11a.5.5%200%200%201%200-1zm2.997%200h.01l-.005-.001zm-.013-6a.3.3%200%200%201%20.285.201l.25.766a1.58%201.58%200%200%200%20.999.998l.765.248l.015.004a.303.303%200%200%201%20.146.46a.3.3%200%200%201-.146.11l-.765.248a1.58%201.58%200%200%200-.999.998l-.249.766a.302.302%200%200%201-.57%200l-.25-.766a1.58%201.58%200%200%200-.998-1.002l-.765-.248a.303.303%200%200%201-.146-.46a.3.3%200%200%201%20.146-.11l.765-.248a1.58%201.58%200%200%200%20.984-.998L16.2%206.2a.3.3%200%200%201%20.284-.2m-7.838.396a.5.5%200%201%201%20.708.708l-1.75%201.75a.5.5%200%200%201-.69.015l-.75-.684a.5.5%200%200%201%20.673-.74l.397.364zm3.507.656c.09.25.25.48.52.691q.21.15.451.21L13.105%208H11a.5.5%200%200%201%200-1h1.137zM13.48%200a.42.42%200%200%201%20.399.282l.348%201.072a2.2%202.2%200%200%200%201.398%201.396l1.072.349l.022.005a.424.424%200%200%201%200%20.797l-1.072.349a2.21%202.21%200%200%200-1.399%201.396L13.9%206.718a.423.423%200%200%201-.643.204l-.02-.015a.43.43%200%200%201-.135-.19l-.348-1.07a2.22%202.22%200%200%200-1.399-1.403l-1.072-.348a.424.424%200%200%201%200-.797l1.072-.349a2.21%202.21%200%200%200%201.377-1.396L13.08.282a.42.42%200%200%201%20.4-.282%22%2F%3E%3C%2Fsvg%3E"},Hh=a.defineComponent({__name:"AvTag",props:{label:{},tagName:{default:"p"},icon:{},disabled:{type:Boolean},small:{type:Boolean},iconOnly:{type:Boolean},selectable:{type:Boolean},selected:{type:Boolean},value:{}},emits:["select"],setup(t,{emit:e}){const n=a.createPropsRestProxy(t,["label","tagName","icon","disabled","small","iconOnly"]),r=e,o=a.computed(()=>t.disabled||n.selectable?"button":t.tagName),i=a.computed(()=>({"--icon-path":`url(${Fe.MDI_CHECK_CIRCLE_OUTLINE})`}));function s(){!t.disabled&&n.selectable&&r("select",[n.value,n.selected??!1])}return(l,c)=>(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(o)),a.mergeProps({"aria-pressed":n.selectable?n.selected:void 0,class:["av-tag av-row av-gap-xxs av-align-center",{"av-tag--sm av-py-xxxs av-px-xs av-radius-lg":t.small,"av-py-xxs av-px-sm av-radius-xl":!t.small}],disabled:t.disabled},l.$attrs,{style:a.unref(i),onClick:s}),{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createBlock(le,{key:0,title:t.iconOnly?t.label:void 0,size:t.small?.875:1,name:t.icon},null,8,["title","size","name"])):a.createCommentVNode("",!0),t.iconOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(t.small?"caption-regular":"b2-regular")},a.toDisplayString(t.label),3))]),_:1},16,["aria-pressed","disabled","class","style"]))}}),Xc=z(Hh,[["__scopeId","data-v-937b45e8"]]),fi=1.3125,Qh=1,Wh=6,Fh=a.defineComponent({__name:"AvIconText",props:{textColor:{default:"var(--text1)"},iconColor:{default:"var(--text1)"},icon:{},text:{},typographyClass:{default:"b2-regular"},gap:{default:"var(--spacing-xs)"},inline:{type:Boolean,default:!1}},setup(t){a.useCssVars(s=>({fbbe6b4e:s.gap,v10f27b79:s.textColor}));const e=a.ref(null),n=a.ref(fi);function r(){if(!e.value){n.value=fi;return}const s=window.getComputedStyle(e.value),l=window.getComputedStyle(document.documentElement),c=Number.parseFloat(l.fontSize),d=Number.parseFloat(s.fontSize),u=Number.parseFloat(s.lineHeight),f=Number.isFinite(u)?u:d;if(!Number.isFinite(c)||c<=0||!Number.isFinite(f)||f<=0){n.value=fi;return}const h=f/c;n.value=Math.min(Wh,Math.max(Qh,h))}a.watch(()=>[t.typographyClass,t.text],async()=>{await a.nextTick(),r()},{immediate:!0}),a.onMounted(()=>{r(),window.addEventListener("resize",r)}),a.onBeforeUnmount(()=>{window.removeEventListener("resize",r)});const o=a.computed(()=>t.inline?void 0:"ellipsis-container"),i=a.computed(()=>t.inline?void 0:"ellipsis");return(s,l)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["icon-text--container av-row av-align-start",[a.unref(o)]])},[a.createVNode(le,{class:"icon-text--icon",name:t.icon,color:t.iconColor,size:a.unref(n)},null,8,["name","color","size"]),a.createElementVNode("span",{ref_key:"textElementRef",ref:e,class:a.normalizeClass(["icon-text--text",[a.unref(i),t.typographyClass]])},a.toDisplayString(t.text),3)],2))}}),Jc=z(Fh,[["__scopeId","data-v-8e81fdbe"]]),Uh=["role"],qh=a.defineComponent({__name:"AvMessage",props:{messageId:{},type:{},message:{}},setup(t){const e=a.computed(()=>t.messageId??`message-${crypto.randomUUID()}`),n=a.computed(()=>{switch(t.type){case"success":return{icon:D.SUCCESS_CIRCLE_OUTLINE,iconColor:"var(--dark-background-success)",textColor:"var(--dark-background-success)",typographyClass:"caption-regular"};case"warning":return{icon:D.WARNING_OUTLINE,iconColor:"var(--dark-background-warn)",textColor:"var(--dark-background-warn)",typographyClass:"caption-regular"};case"error":return{icon:D.CLOSE_OCTAGON,iconColor:"var(--dark-background-error)",textColor:"var(--dark-background-error)",typographyClass:"caption-regular"};default:return{icon:D.INFORMATION_BOX_OUTLINE,iconColor:"var(--dark-background-info)",textColor:"var(--dark-background-info)",typographyClass:"caption-regular"}}}),r=a.computed(()=>t.message?Array.isArray(t.message)?t.message:[t.message]:[]),o=a.computed(()=>t.type==="error"||t.type==="warning"?"alert":"status");return(i,s)=>{const l=Jc;return a.openBlock(),a.createElementBlock("div",{class:"av-message av-col av-gap-xs",role:a.unref(o)},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(r),(c,d)=>(a.openBlock(),a.createBlock(l,a.mergeProps({id:`${a.unref(e)}-${d}`,key:`${a.unref(e)}-${d}`,class:`av-message--${t.type}`},{ref_for:!0},a.unref(n),{text:c}),null,16,["id","class","text"]))),128))],8,Uh)}}}),wn=z(qh,[["__scopeId","data-v-54a570db"]]),Kh=["id"],Zh={key:1,class:"av-fieldset__element"},Yh={key:0,class:"caption-regular required"},Xh=a.defineComponent({__name:"AvFieldset",props:{legend:{default:""},legendClass:{default:"caption-regular"},legendId:{default:""},hint:{default:""},hintClass:{default:""},errorMessage:{default:""},successMessage:{default:""},inline:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},setup(t){const e=a.useSlots(),n=a.computed(()=>t.errorMessage||t.successMessage);return(r,o)=>{const i=wn;return a.openBlock(),a.createElementBlock("fieldset",{class:a.normalizeClass(["av-fieldset av-col av-pl-xs",{"av-fieldset--error":t.errorMessage,"av-fieldset--success":t.successMessage&&!t.errorMessage}])},[a.createElementVNode("div",null,[t.legend||e.legend?(a.openBlock(),a.createElementBlock("legend",{key:0,id:t.legendId,class:a.normalizeClass(["av-fieldset__legend av-w-full av-pb-xs",t.legendClass])},[a.createTextVNode(a.toDisplayString(t.legend)+" ",1),a.renderSlot(r.$slots,"legend",{},void 0,!0)],10,Kh)):a.createCommentVNode("",!0),t.hint||e.hint?(a.openBlock(),a.createElementBlock("div",Zh,[a.createElementVNode("span",{class:a.normalizeClass(["av-hint-text",t.hintClass])},[a.createTextVNode(a.toDisplayString(t.hint)+" ",1),a.renderSlot(r.$slots,"hint",{},void 0,!0)],2),t.required?(a.openBlock(),a.createElementBlock("span",Yh," *")):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:a.normalizeClass(["av-fieldset__content av-col av-gap-xs",{"av-col":!t.inline,"av-row av-row-wrap av-justify-start":t.inline}])},[a.renderSlot(r.$slots,"default",{},void 0,!0)],2),a.createVNode(i,{type:t.errorMessage?"error":"success",message:a.unref(n)},null,8,["type","message"])])],2)}}}),Os=z(Xh,[["__scopeId","data-v-950baa09"]]),Jh=a.defineComponent({__name:"AvFieldsetElement",props:{disabled:{type:Boolean,default:!1}},setup(t){return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-fieldset__element av-col av-px-xs",{"av-fieldset__element--disabled":t.disabled}])},[a.renderSlot(e.$slots,"default",{},void 0,!0)],2))}}),Bs=z(Jh,[["__scopeId","data-v-06db26e9"]]);function Gc(t,e="var(--dark-background-primary1)"){return t.replace(/###(.+?)###/gs,`<h1 style="display:flex;flex-direction:row;justify-content:start;font-size:var(--font-size-n6);line-height:var(--line-height-n5);color:${e}">$1</h1>`).replace(/@@([\s\S]+?)@@/g,"<div>$1</div>").replace(/^\s*--\s+(.*)$/gm,'<li class="indented-list">$1</li>').replace(/(\r\n|\n|\r|\\n|\\r)/g,'<div class="line-break"></div>').replace(/__(.+?)__/g,'<span class="text-underline">$1</span>').replace(/\*\*(.+?)\*\*/g,`<strong style="color: ${e}">$1</strong>`)}function $c(t){return t?t[0].toUpperCase()+t.slice(1).toLowerCase():""}const Gh={class:"b2-bold"},$h={class:"b2-regular"},_h=["innerHTML"],ep=a.defineComponent({__name:"AvNotice",props:{title:{default:""},text:{default:""},type:{}},setup(t){const e=a.computed(()=>Gc(t.text)),n=a.computed(()=>{switch(t.type){case"warning":return{name:D.WARNING,color:"var(--dark-background-warn)"};case"alert":return{name:D.WARNING_CIRCLE,color:"var(--dark-background-error)"};case"info":default:return{name:D.INFORMATION_BOX,color:"var(--dark-background-info)"}}});return(r,o)=>{const i=le;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-notice av-row av-align-center av-gap-sm av-p-sm",`av-notice--${t.type}`])},[a.createVNode(i,a.mergeProps(a.unref(n),{size:1.5}),null,16),a.createElementVNode("span",Gh,[a.createTextVNode(a.toDisplayString(t.title)+" ",1),a.createElementVNode("span",$h,[a.createElementVNode("span",{innerHTML:a.unref(e)},null,8,_h)])])],2)}}}),tp=z(ep,[["__scopeId","data-v-4d37ebd3"]]);function _c(t){return[...new Set(t)]}function np(t){return/^[^\s@]+@[^\s.@]+\.[^\s@]+$/.test(t)}function rp(t){const e=(t==null?void 0:t.trim())??"";if(!e)return!1;try{const n=new URL(e);return["http:","https:"].includes(n.protocol.toLowerCase())}catch{return!1}}const op=["title","aria-label","aria-disabled","disabled"],ip=a.defineComponent({inheritAttrs:!1,__name:"AvButton",props:{variant:{default:"DEFAULT"},theme:{default:"PRIMARY"},isLoading:{type:Boolean,default:!1},iconScale:{},noRadius:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{},iconOnly:{type:Boolean,default:!1},small:{type:Boolean,default:!1},icon:{},noSentenceCase:{type:Boolean,default:!1}},emits:["click"],setup(t,{expose:e}){const n=a.ref(null),r=a.useAttrs();function o(){var h;(h=n.value)==null||h.focus()}e({focus:o});const i={name:D.LOADING,animation:"spin"},s=a.computed(()=>t.iconScale&&!Number.isNaN(t.iconScale)?t.iconScale:t.small?1:1.5),l=a.computed(()=>{if(t.isLoading)return{...i,size:s.value};if(typeof t.icon=="string"&&t.icon.trim())return{name:t.icon,size:s.value};if(t.icon&&typeof t.icon!="string")return{...t.icon,size:s.value}}),c=a.computed(()=>t.noSentenceCase?t.label:$c(t.label)),d=a.computed(()=>t.disabled||t.isLoading),u=a.computed(()=>`av-button--variant-${t.variant.toLowerCase()}`),f=a.computed(()=>`av-button--theme-${t.theme.toLowerCase()}`);return(h,p)=>{const m=le;return a.openBlock(),a.createElementBlock("button",a.mergeProps({ref_key:"btn",ref:n},a.unref(r),{title:t.iconOnly?a.unref(c):void 0,"aria-label":a.unref(c),"aria-disabled":a.unref(d),class:["av-button av-row av-align-center av-gap-xs",[{"av-button--disabled":a.unref(d),"av-button--sm":t.small,"av-px-xs av-py-xxs":t.small&&!t.iconOnly,"av-px-sm av-py-xs":!t.small&&!t.iconOnly,"av-px-xxs av-py-xxs":t.small&&t.iconOnly,"av-px-xs av-py-xs":!t.small&&t.iconOnly,"av-radius-md":!t.noRadius&&t.small,"av-radius-lg":!t.noRadius&&!t.small,"av-radius-none":t.noRadius},a.unref(u),a.unref(f)]],disabled:a.unref(d),onClick:p[0]||(p[0]=A=>h.$emit("click",A))}),[a.unref(l)?(a.openBlock(),a.createBlock(m,a.normalizeProps(a.mergeProps({key:0},a.unref(l))),null,16)):a.createCommentVNode("",!0),t.iconOnly?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(t.small?"b2-regular":"b1-regular")},a.toDisplayString(a.unref(c)),3))],16,op)}}}),q=z(ip,[["__scopeId","data-v-cbbd4ba0"]]),sp=["id","aria-hidden"],ap={key:0,class:"av-card__body"},lp={key:1,class:"av-card__footer"},cp=a.defineComponent({__name:"AvCard",props:{titleOnly:{type:Boolean,default:!1},backgroundColor:{default:"var(--card)"},borderColor:{default:"var(--stroke)"},titleBackground:{default:"var(--surface-background)"},titleHeight:{},collapsible:{type:Boolean,default:!1},collapsed:{type:Boolean,default:!1}},setup(t){a.useCssVars(h=>({v5196d6be:h.borderColor}));const e=a.useSlots(),n=a.ref(t.collapsed),r=a.ref(!1),o=a.computed(()=>`av-card-${crypto.randomUUID()}`),i=a.ref(null),s=a.computed(()=>n.value?"av-card__title--collapsed av--m-sm":t.titleOnly?"av-card__title--title-only av--m-sm":"av--mt-sm av--mx-sm");function l(){n.value=!n.value}function c(h){const p=["A","BUTTON","INPUT","SELECT","TEXTAREA"],m=["button","link","checkbox","radio","textbox","tab","menuitem"];if(p.includes(h.tagName))return!0;const A=h.getAttribute("role");return!!(A&&m.includes(A)||h.hasAttribute("tabindex")&&h.getAttribute("tabindex")!=="-1")}function d(h,p){if(i.value&&(h===i.value.$el||i.value.$el.contains(h)))return null;let m=h;for(;m&&m!==p;){if(c(m))return m;m=m.parentElement}return null}function u(h){var A;const p=h.target;d(p,h.currentTarget)||t.collapsible&&(l(),(A=i.value)==null||A.$el.focus())}function f(h){if(!t.collapsible)return;const p=h.target,m=d(p,h.currentTarget);r.value=!!m}return(h,p)=>{const m=q;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-card av-col av-p-sm av-justify-start av-radius-2xl",{"av-card--collapsible":t.collapsible,"av-card--hovering-interactive":a.unref(r)}]),style:a.normalizeStyle({borderColor:t.borderColor,background:t.backgroundColor}),onClick:u,onMousemove:f},[e.title?(a.openBlock(),a.createElementBlock("header",{key:0,class:a.normalizeClass(["av-card__title av-row av-align-center av-justify-between av-p-sm av-gap-sm",a.unref(s)]),style:a.normalizeStyle({background:t.titleBackground,minHeight:t.titleHeight,maxHeight:t.titleHeight})},[a.renderSlot(h.$slots,"title",{},void 0,!0),t.collapsible?(a.openBlock(),a.createBlock(m,{key:0,ref_key:"buttonRef",ref:i,"aria-controls":`${a.unref(o)}-content`,"aria-expanded":!a.unref(n),icon:a.unref(n)?a.unref(D).CHEVRON_DOWN:a.unref(D).CHEVRON_LEFT,"icon-only":"",label:"Details",onClick:a.withModifiers(l,["stop"])},null,8,["aria-controls","aria-expanded","icon"])):a.createCommentVNode("",!0)],6)):a.createCommentVNode("",!0),t.titleOnly?a.createCommentVNode("",!0):a.withDirectives((a.openBlock(),a.createElementBlock("div",{key:1,id:`${a.unref(o)}-content`,"aria-hidden":t.collapsible&&a.unref(n),class:a.normalizeClass(["av-card__content-collapsible av-col av-justify-between av-h-full av-gap-sm",{"av-pt-sm":!!e.title}])},[a.renderSlot(h.$slots,"default",{},void 0,!0),e.body?(a.openBlock(),a.createElementBlock("div",ap,[a.renderSlot(h.$slots,"body",{},void 0,!0)])):a.createCommentVNode("",!0),e.footer?(a.openBlock(),a.createElementBlock("div",lp,[a.renderSlot(h.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)],10,sp)),[[a.vShow,!t.collapsible||!a.unref(n)]])],38)}}}),dp=z(cp,[["__scopeId","data-v-2b7e7419"]]),up=["id","role"],fp={class:"av-alert__container av-row av-align-center av-justify-between av-w-full av-gap-md"},hp={class:"av-alert__content av-row av-align-center av-gap-sm"},pp={class:"av-col"},mp={key:0,class:"s2-bold"},Ap={class:"b1-regular"},gp=a.defineComponent({__name:"AvAlert",props:{closed:{type:Boolean},closeable:{type:Boolean},id:{},title:{default:""},description:{},small:{type:Boolean,default:!1},type:{default:"info"},closeButtonLabel:{default:"Fermer"}},emits:["close"],setup(t,{emit:e}){const n=e,r=t.id??`alert-${crypto.randomUUID()}`,o=()=>n("close"),i=a.computed(()=>[`av-alert--${t.type}`,{"av-alert--sm av-p-sm":t.small,"av-p-md":!t.small}]),s=a.computed(()=>{switch(t.type){case"error":return{name:D.ALERT_CIRCLE_OUTLINE,color:"var(--dark-background-error)"};case"success":return{name:D.CHECK_CIRCLE,color:"var(--dark-background-success)"};case"warning":return{name:D.WARNING_OUTLINE,color:"var(--dark-background-warn)"};case"info":default:return{name:D.INFORMATION_OUTLINE,color:"var(--dark-background-primary1)"}}}),l=a.computed(()=>t.type==="error"||t.type==="warning"?"alert":"status");return(c,d)=>t.closed?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",{key:0,id:a.unref(r),class:a.normalizeClass(["av-alert av-radius-lg",a.unref(i)]),role:a.unref(l)},[a.createElementVNode("div",fp,[a.createElementVNode("div",hp,[a.createVNode(le,a.mergeProps(a.unref(s),{size:3}),null,16),a.createElementVNode("div",pp,[t.small?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",mp,a.toDisplayString(t.title),1)),a.createElementVNode("span",Ap,a.toDisplayString(t.description),1)])]),t.closeable?(a.openBlock(),a.createBlock(q,{key:0,"icon-only":"",icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,label:t.closeButtonLabel,small:t.small,onClick:o},null,8,["icon","label","small"])):a.createCommentVNode("",!0)])],10,up))}}),ed=z(gp,[["__scopeId","data-v-ca1d56c7"]]),bp={class:"toaster-container"},vp=a.defineComponent({__name:"AvToaster",props:{messages:{},onRemoveMessage:{type:Function}},setup(t){function e(r){return`av-toaster--${r??"info"} av-toaster--icon`}function n(r){switch(r){case"error":return{"--icon-path":`url(${Fe.MDI_ALERT_CIRCLE_OUTLINE})`};case"success":return{"--icon-path":`url(${Fe.MDI_CHECK_CIRCLE})`};case"warning":return{"--icon-path":`url(${Fe.MDI_WARNING_OUTLINE})`};case"info":default:return{"--icon-path":`url(${Fe.MDI_MESSAGE_BADGE})`}}}return(r,o)=>(a.openBlock(),a.createElementBlock("div",bp,[a.createVNode(a.TransitionGroup,{mode:"out-in",name:"list",tag:"div",class:"toasters av-col av-align-center"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.messages,i=>(a.openBlock(),a.createBlock(ed,a.mergeProps({key:i.id,class:["av-toaster",e(i.type)]},{ref_for:!0},i,{style:n(i.type),onClose:s=>t.onRemoveMessage(i.id)}),null,16,["class","style","onClose"]))),128))]),_:1})]))}}),yp=z(vp,[["__scopeId","data-v-cfd2bdbb"]]),Cp={},Ip={width:"214",height:"97",viewBox:"0 0 214 97",fill:"none",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"};function kp(t,e){return a.openBlock(),a.createElementBlock("svg",Ip,[...e[0]||(e[0]=[a.createElementVNode("rect",{width:"213.732",height:"96.9",fill:"url(#pattern0_40000620_15397)"},null,-1),a.createElementVNode("defs",null,[a.createElementVNode("pattern",{id:"pattern0_40000620_15397",patternContentUnits:"objectBoundingBox",width:"1",height:"1"},[a.createElementVNode("use",{"xlink:href":"#image0_40000620_15397",transform:"matrix(0.00087108 0 0 0.00192134 0 -0.0139577)"})]),a.createElementVNode("image",{id:"image0_40000620_15397",width:"1148",height:"535",preserveAspectRatio:"none","xlink:href":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABHwAAAIXCAYAAADua0mMAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAEfKADAAQAAAABAAACFwAAAAAm6OSwAABAAElEQVR4Aey9bZAcR3rnl1ndMwOtZAEbku5MEDzMSicCcZKFWYlgSOYCaJzOsQZ4NoZ2nMNyxB2alu2P5jD84b4ARJNAOBz2Bw4/2I6wfWbjwmfrfIrbYZyXCIV9wR5w115jcNqZs3UHgFpzcMSCp7dbjG7FnZfuSj9Z3T3T069V1ZlPZlX9KwhOV1XWk5m/zO6qevJ5EQIbCIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACIAACICAGQLSjBhIAQEQAAEQAAEQAAEQAAEQAAEQmJbA6V+tzYtmc17L2W6W1zfXa8+mlYnrQQAEikkACp9ijjt6DQIgAAIgAAIgAAIgAAIg4JjAiy9fW5QqqAihFqgp+t9R+je4SfFYKLEppWy0VLDyyVptfbAQjoAACIDAYQJQ+BzmgT0QAAEQAAEQAAEQAAEQAAEQsEbg58/WFqRoLkkhF6mS4QqeSbWTAoiur2/vBsuwAJoEC+dBoLgEoPAp7tij5yAAAiAAAiAAAiAAAiAAAkwEtKuWarXqVN0Fs1XK93b2ghoUP2apQhoI5IEAFD55GEX0AQRAAARAAARAA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"av-header__brand av-row av-justify-start av-align-center av-wrap av-px-xxs av-w-full av-nowrap--lg av--my-sm--lg av-px-none--lg"},Mp={class:"av-header__brand-top av-row av-justify-start av-align-center av-w-full"},wp={class:"av-header__logo av-enlarge-link"},Np={key:0,class:"av-header__navbar av-row av-flex-fill av-align-start av-justify-end av-mt-xxs av-p-xxs av-gap-sm av-unhidden av-hidden--lg"},xp=a.defineComponent({__name:"HeaderBrand",props:{homeTo:{},title:{},showSearchButton:{type:Boolean},showSearchLabel:{},showMenuButton:{type:Boolean},showMenuLabel:{}},emits:["showSearchDrawer","showMenuDrawer"],setup(t,{emit:e}){const n=e;return(r,o)=>{const i=a.resolveComponent("RouterLink");return a.openBlock(),a.createElementBlock("div",Ep,[a.createElementVNode("div",Mp,[a.createElementVNode("div",wp,[a.createVNode(i,{to:t.homeTo,title:t.title},{default:a.withCtx(()=>[a.createVNode(td,{"data-testid":"header-logo"})]),_:1},8,["to","title"])]),t.showSearchButton||t.showMenuButton?(a.openBlock(),a.createElementBlock("div",Np,[t.showSearchButton?(a.openBlock(),a.createBlock(q,{key:0,label:t.showSearchLabel,"aria-label":t.showSearchLabel,title:t.showSearchLabel,icon:a.unref(D).MAGNIFY,"icon-only":"","data-testid":"open-search-btn",onClick:o[0]||(o[0]=a.withModifiers(s=>n("showSearchDrawer"),["prevent","stop"]))},null,8,["label","aria-label","title","icon"])):a.createCommentVNode("",!0),t.showMenuButton?(a.openBlock(),a.createBlock(q,{key:1,variant:"OUTLINED",icon:a.unref(D).HAMBURGER_MENU,"aria-haspopup":"dialog",label:t.showMenuLabel,"aria-label":t.showMenuLabel,title:t.showMenuLabel,"icon-only":"","data-testid":"open-menu-btn",onClick:o[1]||(o[1]=a.withModifiers(s=>n("showMenuDrawer"),["prevent","stop"]))},null,8,["icon","label","aria-label","title"])):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)]),a.renderSlot(r.$slots,"roleContext",{},void 0,!0)])}}}),Sp=z(xp,[["__scopeId","data-v-f3484d39"]]);function Rs(t){return a.getCurrentScope()?(a.onScopeDispose(t),!0):!1}const hi=new WeakMap,Tp=(...t)=>{var e;const n=t[0],r=(e=a.getCurrentInstance())==null?void 0:e.proxy;if(r==null&&!a.hasInjectionContext())throw new Error("injectLocal must be called in setup");return r&&hi.has(r)&&n in hi.get(r)?hi.get(r)[n]:a.inject(...t)},nd=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Lp=t=>t!=null,Dp=Object.prototype.toString,Op=t=>Dp.call(t)==="[object Object]",Yt=()=>{},Wa=Bp();function Bp(){var t,e;return nd&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Rp(...t){if(t.length!==1)return a.toRef(...t);const e=t[0];return typeof e=="function"?a.readonly(a.customRef(()=>({get:e,set:Yt}))):a.ref(e)}function rd(t,e){function n(...r){return new Promise((o,i)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(o).catch(i)})}return n}function zp(t,e={}){let n,r,o=Yt;const i=c=>{clearTimeout(c),o(),o=Yt};let s;return c=>{const d=a.toValue(t),u=a.toValue(e.maxWait);return n&&i(n),d<=0||u!==void 0&&u<=0?(r&&(i(r),r=void 0),Promise.resolve(c())):new Promise((f,h)=>{o=e.rejectOnCancel?h:f,s=c,u&&!r&&(r=setTimeout(()=>{n&&i(n),r=void 0,f(s())},u)),n=setTimeout(()=>{r&&i(r),r=void 0,f(c())},d)})}}function Pp(...t){let e=0,n,r=!0,o=Yt,i,s,l,c,d;!a.isRef(t[0])&&typeof t[0]=="object"?{delay:s,trailing:l=!0,leading:c=!0,rejectOnCancel:d=!1}=t[0]:[s,l=!0,c=!0,d=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,o(),o=Yt)};return h=>{const p=a.toValue(s),m=Date.now()-e,A=()=>i=h();return u(),p<=0?(e=Date.now(),A()):(m>p&&(c||!r)?(e=Date.now(),A()):l&&(i=new Promise((g,b)=>{o=d?b:g,n=setTimeout(()=>{e=Date.now(),r=!0,g(A()),u()},Math.max(0,p-m))})),!c&&!n&&(n=setTimeout(()=>r=!0,p)),r=!1,i)}}function Vp(t,e){var n;if(typeof t=="number")return t+e;const r=((n=t.match(/^-?\d+\.?\d*/))==null?void 0:n[0])||"",o=t.slice(r.length),i=Number.parseFloat(r)+e;return Number.isNaN(i)?t:i+o}function qn(t){return t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t)}function Qr(t){return Array.isArray(t)?t:[t]}function jp(t){return a.getCurrentInstance()}function Hp(t,e=200,n={}){return rd(zp(e,n),t)}function Qp(t,e=200,n=!1,r=!0,o=!1){return rd(Pp(e,n,r,o),t)}function od(t,e=!0,n){jp()?a.onMounted(t,n):e?t():a.nextTick(t)}function Wp(t,e,n){return a.watch(t,e,{...n,immediate:!0})}const vr=nd?window:void 0;function zs(t){var e;const n=a.toValue(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Xr(...t){const e=[],n=()=>{e.forEach(l=>l()),e.length=0},r=(l,c,d,u)=>(l.addEventListener(c,d,u),()=>l.removeEventListener(c,d,u)),o=a.computed(()=>{const l=Qr(a.toValue(t[0])).filter(c=>c!=null);return l.every(c=>typeof c!="string")?l:void 0}),i=Wp(()=>{var l,c;return[(c=(l=o.value)==null?void 0:l.map(d=>zs(d)))!=null?c:[vr].filter(d=>d!=null),Qr(a.toValue(o.value?t[1]:t[0])),Qr(a.unref(o.value?t[2]:t[1])),a.toValue(o.value?t[3]:t[2])]},([l,c,d,u])=>{if(n(),!(l!=null&&l.length)||!(c!=null&&c.length)||!(d!=null&&d.length))return;const f=Op(u)?{...u}:u;e.push(...l.flatMap(h=>c.flatMap(p=>d.map(m=>r(h,p,m,f)))))},{flush:"post"}),s=()=>{i(),n()};return Rs(n),s}function Fp(){const t=a.shallowRef(!1),e=a.getCurrentInstance();return e&&a.onMounted(()=>{t.value=!0},e),t}function id(t){const e=Fp();return a.computed(()=>(e.value,!!t()))}function Up(t,e,n={}){const{window:r=vr,...o}=n;let i;const s=id(()=>r&&"MutationObserver"in r),l=()=>{i&&(i.disconnect(),i=void 0)},c=a.computed(()=>{const h=a.toValue(t),p=Qr(h).map(zs).filter(Lp);return new Set(p)}),d=a.watch(c,h=>{l(),s.value&&h.size&&(i=new MutationObserver(e),h.forEach(p=>i.observe(p,o)))},{immediate:!0,flush:"post"}),u=()=>i==null?void 0:i.takeRecords(),f=()=>{d(),l()};return Rs(f),{isSupported:s,stop:f,takeRecords:u}}const qp=Symbol("vueuse-ssr-width");function sd(){const t=a.hasInjectionContext()?Tp(qp,null):null;return typeof t=="number"?t:void 0}function Tn(t,e={}){const{window:n=vr,ssrWidth:r=sd()}=e,o=id(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),i=a.shallowRef(typeof r=="number"),s=a.shallowRef(),l=a.shallowRef(!1),c=d=>{l.value=d.matches};return a.watchEffect(()=>{if(i.value){i.value=!o.value;const d=a.toValue(t).split(",");l.value=d.some(u=>{const f=u.includes("not all"),h=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let m=!!(h||p);return h&&m&&(m=r>=qn(h[1])),p&&m&&(m=r<=qn(p[1])),f?!m:m});return}o.value&&(s.value=n.matchMedia(a.toValue(t)),l.value=s.value.matches)}),Xr(s,"change",c,{passive:!0}),a.computed(()=>l.value)}function Kp(t,e={}){function n(p,m){let A=a.toValue(t[a.toValue(p)]);return m!=null&&(A=Vp(A,m)),typeof A=="number"&&(A=`${A}px`),A}const{window:r=vr,strategy:o="min-width",ssrWidth:i=sd()}=e,s=typeof i=="number",l=s?a.shallowRef(!1):{value:!0};s&&od(()=>l.value=!!r);function c(p,m){return!l.value&&s?p==="min"?i>=qn(m):i<=qn(m):r?r.matchMedia(`(${p}-width: ${m})`).matches:!1}const d=p=>Tn(()=>`(min-width: ${n(p)})`,e),u=p=>Tn(()=>`(max-width: ${n(p)})`,e),f=Object.keys(t).reduce((p,m)=>(Object.defineProperty(p,m,{get:()=>o==="min-width"?d(m):u(m),enumerable:!0,configurable:!0}),p),{});function h(){const p=Object.keys(t).map(m=>[m,f[m],qn(n(m))]).sort((m,A)=>m[2]-A[2]);return a.computed(()=>p.filter(([,m])=>m.value).map(([m])=>m))}return Object.assign(f,{greaterOrEqual:d,smallerOrEqual:u,greater(p){return Tn(()=>`(min-width: ${n(p,.1)})`,e)},smaller(p){return Tn(()=>`(max-width: ${n(p,-.1)})`,e)},between(p,m){return Tn(()=>`(min-width: ${n(p)}) and (max-width: ${n(m,-.1)})`,e)},isGreater(p){return c("min",n(p,.1))},isGreaterOrEqual(p){return c("min",n(p))},isSmaller(p){return c("max",n(p,-.1))},isSmallerOrEqual(p){return c("max",n(p))},isInBetween(p,m){return c("min",n(p))&&c("max",n(m,-.1))},current:h,active(){const p=h();return a.computed(()=>p.value.length===0?"":p.value.at(o==="min-width"?-1:0))}})}function pi(t){return typeof Window<"u"&&t instanceof Window?t.document.documentElement:typeof Document<"u"&&t instanceof Document?t.documentElement:t}const Fa=1;function Zp(t,e={}){const{throttle:n=0,idle:r=200,onStop:o=Yt,onScroll:i=Yt,offset:s={left:0,right:0,top:0,bottom:0},observe:l={mutation:!1},eventListenerOptions:c={capture:!1,passive:!0},behavior:d="auto",window:u=vr,onError:f=I=>{console.error(I)}}=e,h=typeof l=="boolean"?{mutation:l}:l,p=a.shallowRef(0),m=a.shallowRef(0),A=a.computed({get(){return p.value},set(I){b(I,void 0)}}),g=a.computed({get(){return m.value},set(I){b(void 0,I)}});function b(I,U){var K,Q,M,E;if(!u)return;const L=a.toValue(t);if(!L)return;(M=L instanceof Document?u.document.body:L)==null||M.scrollTo({top:(K=a.toValue(U))!=null?K:g.value,left:(Q=a.toValue(I))!=null?Q:A.value,behavior:a.toValue(d)});const V=((E=L==null?void 0:L.document)==null?void 0:E.documentElement)||(L==null?void 0:L.documentElement)||L;A!=null&&(p.value=V.scrollLeft),g!=null&&(m.value=V.scrollTop)}const v=a.shallowRef(!1),y=a.reactive({left:!0,right:!1,top:!0,bottom:!1}),C=a.reactive({left:!1,right:!1,top:!1,bottom:!1}),k=I=>{v.value&&(v.value=!1,C.left=!1,C.right=!1,C.top=!1,C.bottom=!1,o(I))},N=Hp(k,n+r),S=I=>{var U;if(!u)return;const K=((U=I==null?void 0:I.document)==null?void 0:U.documentElement)||(I==null?void 0:I.documentElement)||zs(I),{display:Q,flexDirection:M,direction:E}=getComputedStyle(K),L=E==="rtl"?-1:1,V=K.scrollLeft;C.left=V<p.value,C.right=V>p.value;const W=Math.abs(V*L)<=(s.left||0),Z=Math.abs(V*L)+K.clientWidth>=K.scrollWidth-(s.right||0)-Fa;Q==="flex"&&M==="row-reverse"?(y.left=Z,y.right=W):(y.left=W,y.right=Z),p.value=V;let H=K.scrollTop;I===u.document&&!H&&(H=u.document.body.scrollTop),C.top=H<m.value,C.bottom=H>m.value;const _=Math.abs(H)<=(s.top||0),re=Math.abs(H)+K.clientHeight>=K.scrollHeight-(s.bottom||0)-Fa;Q==="flex"&&M==="column-reverse"?(y.top=re,y.bottom=_):(y.top=_,y.bottom=re),m.value=H},O=I=>{var U;if(!u)return;const K=(U=I.target.documentElement)!=null?U:I.target;S(K),v.value=!0,N(I),i(I)};return Xr(t,"scroll",n?Qp(O,n,!0,!1):O,c),od(()=>{try{const I=a.toValue(t);if(!I)return;S(I)}catch(I){f(I)}}),h!=null&&h.mutation&&t!=null&&t!==u&&t!==document&&Up(t,()=>{const I=a.toValue(t);I&&S(I)},{attributes:!0,childList:!0,subtree:!0}),Xr(t,"scrollend",k,c),{x:A,y:g,isScrolling:v,arrivedState:y,directions:C,measure(){const I=a.toValue(t);u&&I&&S(I)}}}function ad(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!n||n.tagName==="BODY"?!1:ad(n)}}function Yp(t){const e=t||window.event,n=e.target;return ad(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.preventDefault(),!1)}const mi=new WeakMap;function Xp(t,e=!1){const n=a.shallowRef(e);let r=null,o="";a.watch(Rp(t),l=>{const c=pi(a.toValue(l));if(c){const d=c;if(mi.get(d)||mi.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(o=d.style.overflow),d.style.overflow==="hidden")return n.value=!0;if(n.value)return d.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=pi(a.toValue(t));!l||n.value||(Wa&&(r=Xr(l,"touchmove",c=>{Yp(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},s=()=>{const l=pi(a.toValue(t));!l||!n.value||(Wa&&(r==null||r()),l.style.overflow=o,mi.delete(l),n.value=!1)};return Rs(s),a.computed({get(){return n.value},set(l){l?i():s()}})}/*!
|
|
2
2
|
* tabbable 6.2.0
|
|
3
3
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var ld=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Jr=ld.join(","),cd=typeof Element>"u",Xt=cd?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gr=!cd&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},$r=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},
|
|
4
|
+
*/var ld=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Jr=ld.join(","),cd=typeof Element>"u",Xt=cd?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gr=!cd&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t==null?void 0:t.ownerDocument},$r=function t(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&t(e.parentNode);return s},Jp=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},dd=function(e,n,r){if($r(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(Jr));return n&&Xt.call(e,Jr)&&o.unshift(e),o=o.filter(r),o},ud=function t(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!$r(s,!1))if(s.tagName==="SLOT"){var l=s.assignedElements(),c=l.length?l:s.children,d=t(c,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else{var u=Xt.call(s,Jr);u&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var f=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),h=!$r(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(f&&h){var p=t(f===!0?s.children:f.children,!0,r);r.flatten?o.push.apply(o,p):o.push({scopeParent:s,candidates:p})}else i.unshift.apply(i,s.children)}}return o},fd=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},zt=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Jp(e))&&!fd(e)?0:e.tabIndex},Gp=function(e,n){var r=zt(e);return r<0&&n&&!fd(e)?0:r},$p=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},hd=function(e){return e.tagName==="INPUT"},_p=function(e){return hd(e)&&e.type==="hidden"},em=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},tm=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},nm=function(e){if(!e.name)return!0;var n=e.form||Gr(e),r=function(l){return n.querySelectorAll('input[type="radio"][name="'+l+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=tm(o,e.form);return!i||i===e},rm=function(e){return hd(e)&&e.type==="radio"},om=function(e){return rm(e)&&!nm(e)},im=function(e){var n,r=e&&Gr(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,l,c;for(i=!!((s=o)!==null&&s!==void 0&&(l=s.ownerDocument)!==null&&l!==void 0&&l.contains(o)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!i&&o;){var d,u,f;r=Gr(o),o=(d=r)===null||d===void 0?void 0:d.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},Ua=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},sm=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var i=Xt.call(e,"details>summary:first-of-type"),s=i?e.parentElement:e;if(Xt.call(s,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var l=e;e;){var c=e.parentElement,d=Gr(e);if(c&&!c.shadowRoot&&o(c)===!0)return Ua(e);e.assignedSlot?e=e.assignedSlot:!c&&d!==e.ownerDocument?e=d.host:e=c}e=l}if(im(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return Ua(e);return!1},am=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return Xt.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},_r=function(e,n){return!(n.disabled||$r(n)||_p(n)||sm(n,e)||em(n)||am(n))},Zi=function(e,n){return!(om(n)||zt(n)<0||!_r(e,n))},lm=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},cm=function t(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,l=s?o.scopeParent:o,c=Gp(l,s),d=s?t(o.candidates):l;c===0?s?n.push.apply(n,d):n.push(l):r.push({documentOrder:i,tabIndex:c,item:o,isScope:s,content:d})}),r.sort($p).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},dm=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ud([e],n.includeContainer,{filter:Zi.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:lm}):r=dd(e,n.includeContainer,Zi.bind(null,n)),cm(r)},um=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ud([e],n.includeContainer,{filter:_r.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=dd(e,n.includeContainer,_r.bind(null,n)),r},cn=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Xt.call(e,Jr)===!1?!1:Zi(n,e)},fm=ld.concat("iframe").join(","),Ai=function(e,n){if(n=n||{},!e)throw new Error("No node provided");return Xt.call(e,fm)===!1?!1:_r(n,e)};/*!
|
|
5
5
|
* focus-trap 7.6.5
|
|
6
6
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
7
|
-
*/function Yi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function
|
|
8
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ka(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qa(Object(n),!0).forEach(function(r){hm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qa(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Am(t){return fm(t)||pm(t)||vm(t)||mm()}function gm(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function bm(t){var e=gm(t,"string");return typeof e=="symbol"?e:e+""}function vm(t,e){if(t){if(typeof t=="string")return Yi(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(t,e):void 0}}var Za={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r._setPausedState(!0)}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},ym=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Cm=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Kn=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},Im=function(e){return Kn(e)&&!e.shiftKey},km=function(e){return Kn(e)&&e.shiftKey},Ya=function(e){return setTimeout(e,0)},Ln=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,r):e},Er=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Em=[],pd=function(e,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||Em,i=Ka({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Im,isKeyBackward:km},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,c=function(M,E,L){return M&&M[E]!==void 0?M[E]:i[L||E]},d=function(M,E){var L=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return s.containerGroups.findIndex(function(V){var W=V.container,Z=V.tabbableNodes;return W.contains(M)||(L==null?void 0:L.includes(W))||Z.find(function(H){return H===M})})},u=function(M){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=E.hasFallback,V=L===void 0?!1:L,W=E.params,Z=W===void 0?[]:W,H=i[M];if(typeof H=="function"&&(H=H.apply(void 0,Am(Z))),H===!0&&(H=void 0),!H){if(H===void 0||H===!1)return H;throw new Error("`".concat(M,"` was specified but was not a node, or did not return a node"))}var _=H;if(typeof H=="string"){try{_=r.querySelector(H)}catch(re){throw new Error("`".concat(M,'` appears to be an invalid selector; error="').concat(re.message,'"'))}if(!_&&!V)throw new Error("`".concat(M,"` as selector refers to no known node"))}return _},f=function(){var M=u("initialFocus",{hasFallback:!0});if(M===!1)return!1;if(M===void 0||M&&!Ai(M,i.tabbableOptions))if(d(r.activeElement)>=0)M=r.activeElement;else{var E=s.tabbableGroups[0],L=E&&E.firstTabbableNode;M=L||u("fallbackFocus")}else M===null&&(M=u("fallbackFocus"));if(!M)throw new Error("Your focus-trap needs to have at least one focusable element");return M},h=function(){if(s.containerGroups=s.containers.map(function(M){var E=cm(M,i.tabbableOptions),L=dm(M,i.tabbableOptions),V=E.length>0?E[0]:void 0,W=E.length>0?E[E.length-1]:void 0,Z=L.find(function(re){return cn(re)}),H=L.slice().reverse().find(function(re){return cn(re)}),_=!!E.find(function(re){return zt(re)>0});return{container:M,tabbableNodes:E,focusableNodes:L,posTabIndexesFound:_,firstTabbableNode:V,lastTabbableNode:W,firstDomTabbableNode:Z,lastDomTabbableNode:H,nextTabbableNode:function(Ke){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Qe=E.indexOf(Ke);return Qe<0?ut?L.slice(L.indexOf(Ke)+1).find(function(ft){return cn(ft)}):L.slice(0,L.indexOf(Ke)).reverse().find(function(ft){return cn(ft)}):E[Qe+(ut?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(M){return M.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(M){return M.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(M){var E=M.activeElement;if(E)return E.shadowRoot&&E.shadowRoot.activeElement!==null?p(E.shadowRoot):E},m=function(M){if(M!==!1&&M!==p(document)){if(!M||!M.focus){m(f());return}M.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=M,ym(M)&&M.select()}},A=function(M){var E=u("setReturnFocus",{params:[M]});return E||(E===!1?!1:M)},g=function(M){var E=M.target,L=M.event,V=M.isBackward,W=V===void 0?!1:V;E=E||Er(L),h();var Z=null;if(s.tabbableGroups.length>0){var H=d(E,L),_=H>=0?s.containerGroups[H]:void 0;if(H<0)W?Z=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:Z=s.tabbableGroups[0].firstTabbableNode;else if(W){var re=s.tabbableGroups.findIndex(function(sn){var an=sn.firstTabbableNode;return E===an});if(re<0&&(_.container===E||Ai(E,i.tabbableOptions)&&!cn(E,i.tabbableOptions)&&!_.nextTabbableNode(E,!1))&&(re=H),re>=0){var Ke=re===0?s.tabbableGroups.length-1:re-1,ut=s.tabbableGroups[Ke];Z=zt(E)>=0?ut.lastTabbableNode:ut.lastDomTabbableNode}else Kn(L)||(Z=_.nextTabbableNode(E,!1))}else{var Qe=s.tabbableGroups.findIndex(function(sn){var an=sn.lastTabbableNode;return E===an});if(Qe<0&&(_.container===E||Ai(E,i.tabbableOptions)&&!cn(E,i.tabbableOptions)&&!_.nextTabbableNode(E))&&(Qe=H),Qe>=0){var ft=Qe===s.tabbableGroups.length-1?0:Qe+1,Sn=s.tabbableGroups[ft];Z=zt(E)>=0?Sn.firstTabbableNode:Sn.firstDomTabbableNode}else Kn(L)||(Z=_.nextTabbableNode(E))}}else Z=u("fallbackFocus");return Z},b=function(M){var E=Er(M);if(!(d(E,M)>=0)){if(Ln(i.clickOutsideDeactivates,M)){l.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Ln(i.allowOutsideClick,M)||M.preventDefault()}},v=function(M){var E=Er(M),L=d(E,M)>=0;if(L||E instanceof Document)L&&(s.mostRecentlyFocusedNode=E);else{M.stopImmediatePropagation();var V,W=!0;if(s.mostRecentlyFocusedNode)if(zt(s.mostRecentlyFocusedNode)>0){var Z=d(s.mostRecentlyFocusedNode),H=s.containerGroups[Z].tabbableNodes;if(H.length>0){var _=H.findIndex(function(re){return re===s.mostRecentlyFocusedNode});_>=0&&(i.isKeyForward(s.recentNavEvent)?_+1<H.length&&(V=H[_+1],W=!1):_-1>=0&&(V=H[_-1],W=!1))}}else s.containerGroups.some(function(re){return re.tabbableNodes.some(function(Ke){return zt(Ke)>0})})||(W=!1);else W=!1;W&&(V=g({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),m(V||s.mostRecentlyFocusedNode||f())}s.recentNavEvent=void 0},y=function(M){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=M;var L=g({event:M,isBackward:E});L&&(Kn(M)&&M.preventDefault(),m(L))},C=function(M){(i.isKeyForward(M)||i.isKeyBackward(M))&&y(M,i.isKeyBackward(M))},k=function(M){Cm(M)&&Ln(i.escapeDeactivates,M)!==!1&&(M.preventDefault(),l.deactivate())},N=function(M){var E=Er(M);d(E,M)>=0||Ln(i.clickOutsideDeactivates,M)||Ln(i.allowOutsideClick,M)||(M.preventDefault(),M.stopImmediatePropagation())},S=function(){if(s.active)return Za.activateTrap(o,l),s.delayInitialFocusTimer=i.delayInitialFocus?Ya(function(){m(f())}):m(f()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",N,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),r.addEventListener("keydown",k),l},O=function(){if(s.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",N,!0),r.removeEventListener("keydown",C,!0),r.removeEventListener("keydown",k),l},I=function(M){var E=M.some(function(L){var V=Array.from(L.removedNodes);return V.some(function(W){return W===s.mostRecentlyFocusedNode})});E&&m(f())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(I):void 0,K=function(){U&&(U.disconnect(),s.active&&!s.paused&&s.containers.map(function(M){U.observe(M,{subtree:!0,childList:!0})}))};return l={get active(){return s.active},get paused(){return s.paused},activate:function(M){if(s.active)return this;var E=c(M,"onActivate"),L=c(M,"onPostActivate"),V=c(M,"checkCanFocusTrap");V||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=p(r),E==null||E();var W=function(){V&&h(),S(),K(),L==null||L()};return V?(V(s.containers.concat()).then(W,W),this):(W(),this)},deactivate:function(M){if(!s.active)return this;var E=Ka({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},M);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,O(),s.active=!1,s.paused=!1,K(),Za.deactivateTrap(o,l);var L=c(E,"onDeactivate"),V=c(E,"onPostDeactivate"),W=c(E,"checkCanReturnFocus"),Z=c(E,"returnFocus","returnFocusOnDeactivate");L==null||L();var H=function(){Ya(function(){Z&&m(A(s.nodeFocusedBeforeActivation)),V==null||V()})};return Z&&W?(W(A(s.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(M){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,M)):this},unpause:function(M){return s.active?(s.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,M)):this},updateContainerElements:function(M){var E=[].concat(M).filter(Boolean);return s.containers=E.map(function(L){return typeof L=="string"?r.querySelector(L):L}),s.active&&h(),K(),this}},Object.defineProperties(l,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(M,E){if(s.paused===M)return this;if(s.paused=M,M){var L=c(E,"onPause"),V=c(E,"onPostPause");L==null||L(),O(),K(),V==null||V()}else{var W=c(E,"onUnpause"),Z=c(E,"onPostUnpause");W==null||W(),h(),S(),K(),Z==null||Z()}return this}}}),l.updateContainerElements(e),l};/*!
|
|
7
|
+
*/function Yi(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function hm(t){if(Array.isArray(t))return Yi(t)}function pm(t,e,n){return(e=vm(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function mm(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Am(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
8
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,r)}return n}function Ka(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?qa(Object(n),!0).forEach(function(r){pm(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qa(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function gm(t){return hm(t)||mm(t)||ym(t)||Am()}function bm(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function vm(t){var e=bm(t,"string");return typeof e=="symbol"?e:e+""}function ym(t,e){if(t){if(typeof t=="string")return Yi(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yi(t,e):void 0}}var Za={activateTrap:function(e,n){if(e.length>0){var r=e[e.length-1];r!==n&&r._setPausedState(!0)}var o=e.indexOf(n);o===-1||e.splice(o,1),e.push(n)},deactivateTrap:function(e,n){var r=e.indexOf(n);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Cm=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Im=function(e){return(e==null?void 0:e.key)==="Escape"||(e==null?void 0:e.key)==="Esc"||(e==null?void 0:e.keyCode)===27},Kn=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},km=function(e){return Kn(e)&&!e.shiftKey},Em=function(e){return Kn(e)&&e.shiftKey},Ya=function(e){return setTimeout(e,0)},Ln=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return typeof e=="function"?e.apply(void 0,r):e},Er=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Mm=[],pd=function(e,n){var r=(n==null?void 0:n.document)||document,o=(n==null?void 0:n.trapStack)||Mm,i=Ka({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:km,isKeyBackward:Em},n),s={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,c=function(M,E,L){return M&&M[E]!==void 0?M[E]:i[L||E]},d=function(M,E){var L=typeof(E==null?void 0:E.composedPath)=="function"?E.composedPath():void 0;return s.containerGroups.findIndex(function(V){var W=V.container,Z=V.tabbableNodes;return W.contains(M)||(L==null?void 0:L.includes(W))||Z.find(function(H){return H===M})})},u=function(M){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=E.hasFallback,V=L===void 0?!1:L,W=E.params,Z=W===void 0?[]:W,H=i[M];if(typeof H=="function"&&(H=H.apply(void 0,gm(Z))),H===!0&&(H=void 0),!H){if(H===void 0||H===!1)return H;throw new Error("`".concat(M,"` was specified but was not a node, or did not return a node"))}var _=H;if(typeof H=="string"){try{_=r.querySelector(H)}catch(re){throw new Error("`".concat(M,'` appears to be an invalid selector; error="').concat(re.message,'"'))}if(!_&&!V)throw new Error("`".concat(M,"` as selector refers to no known node"))}return _},f=function(){var M=u("initialFocus",{hasFallback:!0});if(M===!1)return!1;if(M===void 0||M&&!Ai(M,i.tabbableOptions))if(d(r.activeElement)>=0)M=r.activeElement;else{var E=s.tabbableGroups[0],L=E&&E.firstTabbableNode;M=L||u("fallbackFocus")}else M===null&&(M=u("fallbackFocus"));if(!M)throw new Error("Your focus-trap needs to have at least one focusable element");return M},h=function(){if(s.containerGroups=s.containers.map(function(M){var E=dm(M,i.tabbableOptions),L=um(M,i.tabbableOptions),V=E.length>0?E[0]:void 0,W=E.length>0?E[E.length-1]:void 0,Z=L.find(function(re){return cn(re)}),H=L.slice().reverse().find(function(re){return cn(re)}),_=!!E.find(function(re){return zt(re)>0});return{container:M,tabbableNodes:E,focusableNodes:L,posTabIndexesFound:_,firstTabbableNode:V,lastTabbableNode:W,firstDomTabbableNode:Z,lastDomTabbableNode:H,nextTabbableNode:function(Ke){var ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,Qe=E.indexOf(Ke);return Qe<0?ut?L.slice(L.indexOf(Ke)+1).find(function(ft){return cn(ft)}):L.slice(0,L.indexOf(Ke)).reverse().find(function(ft){return cn(ft)}):E[Qe+(ut?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(M){return M.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!u("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(M){return M.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},p=function(M){var E=M.activeElement;if(E)return E.shadowRoot&&E.shadowRoot.activeElement!==null?p(E.shadowRoot):E},m=function(M){if(M!==!1&&M!==p(document)){if(!M||!M.focus){m(f());return}M.focus({preventScroll:!!i.preventScroll}),s.mostRecentlyFocusedNode=M,Cm(M)&&M.select()}},A=function(M){var E=u("setReturnFocus",{params:[M]});return E||(E===!1?!1:M)},g=function(M){var E=M.target,L=M.event,V=M.isBackward,W=V===void 0?!1:V;E=E||Er(L),h();var Z=null;if(s.tabbableGroups.length>0){var H=d(E,L),_=H>=0?s.containerGroups[H]:void 0;if(H<0)W?Z=s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:Z=s.tabbableGroups[0].firstTabbableNode;else if(W){var re=s.tabbableGroups.findIndex(function(sn){var an=sn.firstTabbableNode;return E===an});if(re<0&&(_.container===E||Ai(E,i.tabbableOptions)&&!cn(E,i.tabbableOptions)&&!_.nextTabbableNode(E,!1))&&(re=H),re>=0){var Ke=re===0?s.tabbableGroups.length-1:re-1,ut=s.tabbableGroups[Ke];Z=zt(E)>=0?ut.lastTabbableNode:ut.lastDomTabbableNode}else Kn(L)||(Z=_.nextTabbableNode(E,!1))}else{var Qe=s.tabbableGroups.findIndex(function(sn){var an=sn.lastTabbableNode;return E===an});if(Qe<0&&(_.container===E||Ai(E,i.tabbableOptions)&&!cn(E,i.tabbableOptions)&&!_.nextTabbableNode(E))&&(Qe=H),Qe>=0){var ft=Qe===s.tabbableGroups.length-1?0:Qe+1,Sn=s.tabbableGroups[ft];Z=zt(E)>=0?Sn.firstTabbableNode:Sn.firstDomTabbableNode}else Kn(L)||(Z=_.nextTabbableNode(E))}}else Z=u("fallbackFocus");return Z},b=function(M){var E=Er(M);if(!(d(E,M)>=0)){if(Ln(i.clickOutsideDeactivates,M)){l.deactivate({returnFocus:i.returnFocusOnDeactivate});return}Ln(i.allowOutsideClick,M)||M.preventDefault()}},v=function(M){var E=Er(M),L=d(E,M)>=0;if(L||E instanceof Document)L&&(s.mostRecentlyFocusedNode=E);else{M.stopImmediatePropagation();var V,W=!0;if(s.mostRecentlyFocusedNode)if(zt(s.mostRecentlyFocusedNode)>0){var Z=d(s.mostRecentlyFocusedNode),H=s.containerGroups[Z].tabbableNodes;if(H.length>0){var _=H.findIndex(function(re){return re===s.mostRecentlyFocusedNode});_>=0&&(i.isKeyForward(s.recentNavEvent)?_+1<H.length&&(V=H[_+1],W=!1):_-1>=0&&(V=H[_-1],W=!1))}}else s.containerGroups.some(function(re){return re.tabbableNodes.some(function(Ke){return zt(Ke)>0})})||(W=!1);else W=!1;W&&(V=g({target:s.mostRecentlyFocusedNode,isBackward:i.isKeyBackward(s.recentNavEvent)})),m(V||s.mostRecentlyFocusedNode||f())}s.recentNavEvent=void 0},y=function(M){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;s.recentNavEvent=M;var L=g({event:M,isBackward:E});L&&(Kn(M)&&M.preventDefault(),m(L))},C=function(M){(i.isKeyForward(M)||i.isKeyBackward(M))&&y(M,i.isKeyBackward(M))},k=function(M){Im(M)&&Ln(i.escapeDeactivates,M)!==!1&&(M.preventDefault(),l.deactivate())},N=function(M){var E=Er(M);d(E,M)>=0||Ln(i.clickOutsideDeactivates,M)||Ln(i.allowOutsideClick,M)||(M.preventDefault(),M.stopImmediatePropagation())},S=function(){if(s.active)return Za.activateTrap(o,l),s.delayInitialFocusTimer=i.delayInitialFocus?Ya(function(){m(f())}):m(f()),r.addEventListener("focusin",v,!0),r.addEventListener("mousedown",b,{capture:!0,passive:!1}),r.addEventListener("touchstart",b,{capture:!0,passive:!1}),r.addEventListener("click",N,{capture:!0,passive:!1}),r.addEventListener("keydown",C,{capture:!0,passive:!1}),r.addEventListener("keydown",k),l},O=function(){if(s.active)return r.removeEventListener("focusin",v,!0),r.removeEventListener("mousedown",b,!0),r.removeEventListener("touchstart",b,!0),r.removeEventListener("click",N,!0),r.removeEventListener("keydown",C,!0),r.removeEventListener("keydown",k),l},I=function(M){var E=M.some(function(L){var V=Array.from(L.removedNodes);return V.some(function(W){return W===s.mostRecentlyFocusedNode})});E&&m(f())},U=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(I):void 0,K=function(){U&&(U.disconnect(),s.active&&!s.paused&&s.containers.map(function(M){U.observe(M,{subtree:!0,childList:!0})}))};return l={get active(){return s.active},get paused(){return s.paused},activate:function(M){if(s.active)return this;var E=c(M,"onActivate"),L=c(M,"onPostActivate"),V=c(M,"checkCanFocusTrap");V||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=p(r),E==null||E();var W=function(){V&&h(),S(),K(),L==null||L()};return V?(V(s.containers.concat()).then(W,W),this):(W(),this)},deactivate:function(M){if(!s.active)return this;var E=Ka({onDeactivate:i.onDeactivate,onPostDeactivate:i.onPostDeactivate,checkCanReturnFocus:i.checkCanReturnFocus},M);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,O(),s.active=!1,s.paused=!1,K(),Za.deactivateTrap(o,l);var L=c(E,"onDeactivate"),V=c(E,"onPostDeactivate"),W=c(E,"checkCanReturnFocus"),Z=c(E,"returnFocus","returnFocusOnDeactivate");L==null||L();var H=function(){Ya(function(){Z&&m(A(s.nodeFocusedBeforeActivation)),V==null||V()})};return Z&&W?(W(A(s.nodeFocusedBeforeActivation)).then(H,H),this):(H(),this)},pause:function(M){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,M)):this},unpause:function(M){return s.active?(s.manuallyPaused=!1,o[o.length-1]!==this?this:this._setPausedState(!1,M)):this},updateContainerElements:function(M){var E=[].concat(M).filter(Boolean);return s.containers=E.map(function(L){return typeof L=="string"?r.querySelector(L):L}),s.active&&h(),K(),this}},Object.defineProperties(l,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(M,E){if(s.paused===M)return this;if(s.paused=M,M){var L=c(E,"onPause"),V=c(E,"onPostPause");L==null||L(),O(),K(),V==null||V()}else{var W=c(E,"onUnpause"),Z=c(E,"onPostUnpause");W==null||W(),h(),S(),K(),Z==null||Z()}return this}}}),l.updateContainerElements(e),l};/*!
|
|
9
9
|
* focus-trap-vue v4.0.3
|
|
10
10
|
* (c) 2025 Eduardo San Martin Morote
|
|
11
11
|
* @license MIT
|
|
12
|
-
*/const Mm={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},md=a.defineComponent({name:"FocusTrap",props:Object.assign({active:{type:Boolean,default:!0}},Mm),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(t,{slots:e,emit:n}){let r;const o=a.ref(null),i=a.computed(()=>{const l=o.value;return l&&(l instanceof HTMLElement?l:l.$el)});function s(){return r||(r=pd(i.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,clickOutsideDeactivates:t.clickOutsideDeactivates,onActivate:()=>{n("update:active",!0),n("activate")},onDeactivate:()=>{n("update:active",!1),n("deactivate")},onPostActivate:()=>n("postActivate"),onPostDeactivate:()=>n("postDeactivate"),initialFocus:t.initialFocus,fallbackFocus:t.fallbackFocus,tabbableOptions:t.tabbableOptions,delayInitialFocus:t.delayInitialFocus,preventScroll:t.preventScroll}))}return a.onMounted(()=>{a.watch(()=>t.active,l=>{l&&i.value?s().activate():r&&(r.deactivate(),(!i.value||i.value.nodeType===Node.COMMENT_NODE)&&(r=null))},{immediate:!0,flush:"post"})}),a.onUnmounted(()=>{r&&r.deactivate(),r=null}),{activate(){s().activate()},deactivate(){r&&r.deactivate()},renderImpl(){if(!e.default)return null;const l=e.default().filter(d=>d.type!==a.Comment);return!l||!l.length||l.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),l):a.cloneVNode(l[0],{ref:o})}}}}),wm={key:0},Nm={key:0,class:"av-drawer-backdrop"},xm=["aria-label"],Sm={class:"av-drawer__content-wrapper av-col"},Tm={class:"av-drawer__content"},Lm={key:0,class:"footer-container av-p-md"},Dm=a.defineComponent({__name:"AvDrawer",props:{show:{type:Boolean},position:{default:"right"},width:{default:"35rem"},backdrop:{type:Boolean,default:!0},padding:{default:"var(--spacing-md)"},ariaLabel:{default:"Menu latéral"}},emits:["escapePressed"],setup(t,{emit:e}){a.useCssVars(f=>({v019955c8:a.unref(s),v7fb8e5e7:a.unref(l)}));const n=t,r=e,o=a.useSlots(),{position:i,width:s,padding:l,show:c}=a.toRefs(n),d=a.ref(null),u=Yp(document.body);return a.watch(c,f=>{u.value=f}),(f,h)=>a.unref(c)?(a.openBlock(),a.createElementBlock("div",wm,[t.backdrop?(a.openBlock(),a.createElementBlock("div",Nm)):a.createCommentVNode("",!0),a.createVNode(a.unref(md),{onDeactivate:h[0]||(h[0]=p=>r("escapePressed"))},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"drawerRef",ref:d,class:a.normalizeClass(["av-drawer av-col",`av-drawer--${a.unref(i)}`]),role:"dialog","aria-modal":"true","aria-label":t.ariaLabel},[a.createElementVNode("div",Sm,[a.createElementVNode("div",Tm,[a.renderSlot(f.$slots,"default",{},void 0,!0)]),o.footer?(a.openBlock(),a.createElementBlock("div",Lm,[a.renderSlot(f.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)])],10,xm)]),_:3})])):a.createCommentVNode("",!0)}}),Ps=z(Dm,[["__scopeId","data-v-435094ba"]]),Om=["aria-label"],Bm={class:"av-btns-group"},Vs=a.defineComponent({__name:"AvHeaderMenuLinks",props:{links:{},navAriaLabel:{default:"Menu secondaire"}},emits:["linkClick"],setup(t,{emit:e}){const n=e;return(r,o)=>(a.openBlock(),a.createElementBlock("nav",{role:"navigation","aria-label":t.navAriaLabel},[a.createElementVNode("ul",Bm,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(i,s)=>(a.openBlock(),a.createElementBlock("li",{key:s},[a.createVNode(q,{icon:i.icon,label:i.label??"",onClick:l=>{var c;n("linkClick",l),(c=i.onClick)==null||c.call(i,l)}},null,8,["icon","label","onClick"])]))),128))])],8,Om))}});function Rm(t,e){const n=a.ref(!1),r=a.ref({top:0,left:0}),o=async()=>{if(n.value=!n.value,n.value&&t.value){await a.nextTick();const l=t.value.getBoundingClientRect(),c=l.bottom+window.scrollY+4;let d=l.left+window.scrollX;if(e.value){const u=e.value.getBoundingClientRect(),f=window.innerWidth;d+u.width>f&&(d=f-u.width-16,d<0&&(d=16))}r.value={top:c/16,left:d/16}}},i=()=>{n.value=!1},s=l=>{const c=l.target,d=!t.value||!t.value.contains(c),u=!e.value||!e.value.contains(c);d&&u&&i()};return a.onMounted(()=>{document.addEventListener("click",s)}),a.onUnmounted(()=>{document.removeEventListener("click",s)}),{showPopover:n,popoverPosition:r,togglePopover:o,closePopover:i}}const Ad={sm:576,md:768,lg:1024,xl:1440};function js(){const t=qp(Ad),e=t.smaller("sm"),n=t.smaller("md"),r=t.smaller("lg"),o=t.smaller("xl"),i=t.greater("md"),s=t.greater("lg"),l=n,c=a.computed(()=>i.value&&r.value),d=s,u=t.active();return{isMobile:l,isTablet:c,isDesktop:d,isBelowSm:e,isBelowMd:n,isBelowLg:r,isBelowXl:o,isAboveMd:i,isAboveLg:s,currentBreakpoint:u}}function Ko(){const t=a.ref(),e=a.ref(!1),n=a.ref(!1),r=()=>{if(!t.value)return;t.value.style.setProperty("--collapser","none");const s=t.value.offsetHeight;t.value.style.setProperty("--collapse",`${-s}px`),t.value.style.setProperty("--collapser","")};return{collapse:t,collapsing:e,cssExpanded:n,doExpand:s=>{t.value&&(s===!0&&t.value.style.setProperty("--collapse-max-height","none"),window.requestAnimationFrame(()=>{e.value=!0,r(),window.requestAnimationFrame(()=>{n.value=s})}))},adjust:r,onTransitionEnd:(s,l=!0)=>{var c,d;e.value=!1,l&&((d=(c=t.value)==null?void 0:c.querySelector("a"))==null||d.focus()),t.value&&s===!1&&t.value.style.removeProperty("--collapse-max-height")}}}function gd(t,e){let n=null;function r(){!t.value||!t.value.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')||(n=pd(t.value,{escapeDeactivates:!0,onDeactivate:e,returnFocusOnDeactivate:!0,clickOutsideDeactivates:!0}),n.activate())}function o(){n==null||n.deactivate(),n=null}return{initializeFocusTrap:r,cleanupFocusTrap:o}}function zm(t){a.onMounted(()=>{document.documentElement.style.setProperty("--global-background-color",t)}),a.onUnmounted(()=>{document.documentElement.style.setProperty("--global-background-color","var(--default-global-background-color)")})}const Pm={class:"av-popover-wrapper av-row"},Vm=a.defineComponent({__name:"AvPopover",props:{width:{default:"fit-content"},padding:{default:"var(--spacing-md)"}},setup(t,{expose:e}){a.useCssVars(f=>({v382ef208:f.width,v0be91fc7:f.padding}));const n=a.ref(null),r=a.ref(null),{showPopover:o,popoverPosition:i,togglePopover:s,closePopover:l}=Rm(n,r),{initializeFocusTrap:c,cleanupFocusTrap:d}=gd(r,l);function u(f){if(!f){n.value=null;return}if(f instanceof HTMLElement){n.value=f;return}const h=f.$el;h instanceof HTMLElement?n.value=h:n.value=null}return e({setTriggerRef:u,triggerRef:n}),a.watch(o,async f=>{f?(await a.nextTick(),c()):d()}),a.onBeforeUnmount(()=>{d()}),(f,h)=>(a.openBlock(),a.createElementBlock("div",Pm,[a.createElementVNode("div",{ref:u,class:"av-popover-trigger-wrapper av-row av-flex-fill"},[a.renderSlot(f.$slots,"trigger",{toggle:a.unref(s)},void 0,!0)]),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.unref(o)?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:r,role:"dialog","aria-modal":"false",tabindex:"-1",class:"av-popover av-radius-lg",style:a.normalizeStyle(`top: ${a.unref(i).top}rem; left: ${a.unref(i).left}rem;`),onKeydown:h[0]||(h[0]=a.withKeys(a.withModifiers((...p)=>a.unref(l)&&a.unref(l)(...p),["prevent"]),["esc"]))},[a.renderSlot(f.$slots,"popover",{close:a.unref(l)},void 0,!0)],36)):a.createCommentVNode("",!0)]))]))}}),Zo=z(Vm,[["__scopeId","data-v-b54eb288"]]),jm={class:"av-dropdown av-col"},Hm=a.defineComponent({__name:"AvDropdown",props:{items:{},triggerAriaLabel:{},triggerActive:{type:Boolean,default:!1},triggerIcon:{default:()=>D.DOTS_VERTICAL},triggerLabel:{},triggerVariant:{default:"OUTLINED"},triggerSmall:{type:Boolean,default:!0},triggerNoSentenceCase:{type:Boolean,default:!1},width:{default:"15rem"},padding:{default:"var(--spacing-xs)"},itemSmall:{type:Boolean,default:!0},itemTheme:{default:"SECONDARY"},itemIconScale:{default:1.3}},emits:["itemSelected"],setup(t,{emit:e}){const n=e;function r(o,i){n("itemSelected",o),i()}return(o,i)=>(a.openBlock(),a.createBlock(Zo,{width:t.width,padding:t.padding},{trigger:a.withCtx(({toggle:s})=>[a.createVNode(q,{icon:t.triggerIcon,label:t.triggerLabel||t.triggerAriaLabel,"aria-label":t.triggerAriaLabel,variant:t.triggerVariant,small:t.triggerSmall,"no-sentence-case":t.triggerNoSentenceCase,"icon-only":!t.triggerLabel,active:t.triggerActive,onClick:s},null,8,["icon","label","aria-label","variant","small","no-sentence-case","icon-only","active","onClick"])]),popover:a.withCtx(({close:s})=>[a.createElementVNode("div",jm,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,l=>(a.openBlock(),a.createBlock(q,{key:l.name,class:"av-dropdown__menu-item",icon:l.icon,label:l.label,"aria-label":l.label,small:t.itemSmall,theme:t.itemTheme,"icon-scale":t.itemIconScale,disabled:l.disabled,"icon-only":l.iconOnly,"data-testid":l.name,"no-radius":"",onClick:c=>r(l.name,s)},null,8,["icon","label","aria-label","small","theme","icon-scale","disabled","icon-only","data-testid","onClick"]))),128))])]),_:1},8,["width","padding"]))}}),Hs=z(Hm,[["__scopeId","data-v-39a8769d"]]),Qm={role:"navigation",class:"av-translate av-nav"},Qs=a.defineComponent({__name:"AvLanguageSelector",props:{id:{},languages:{},currentLanguage:{default:"fr"},title:{default:"Sélectionner une langue"}},emits:["select"],setup(t,{emit:e}){const n=e,{isBelowLg:r}=js(),o=a.computed(()=>t.id??`language-selector-${crypto.randomUUID()}`),i=a.computed(()=>t.languages.find(({codeIso:d})=>d===t.currentLanguage)),s=a.computed(()=>{var f,h;const d=((f=i.value)==null?void 0:f.codeIso.toUpperCase())??"",u=`${d} - ${(h=i.value)==null?void 0:h.label}`;return r.value?u:d}),l=a.computed(()=>t.languages.map(d=>({name:d.codeIso,label:`${d.codeIso.toUpperCase()} - ${d.label}`})));function c(d){const u=t.languages.find(f=>f.codeIso===d);u&&n("select",u)}return(d,u)=>{const f=Hs;return a.openBlock(),a.createElementBlock("nav",Qm,[a.createVNode(f,{id:a.unref(o),items:a.unref(l),title:t.title,"trigger-aria-label":a.unref(s),"trigger-label":a.unref(s),"trigger-icon":a.unref(D).TRANSLATE,"trigger-small":"",width:"max-content","trigger-no-sentence-case":"",onItemSelected:c},null,8,["id","items","title","trigger-aria-label","trigger-label","trigger-icon"])])}}}),Wm={class:"av-accordion"},Fm=["id","aria-expanded","aria-controls"],Um={class:"title-container av-row av-gap-sm"},qm={class:"n6"},Km=["id","aria-labelledby"],Zm={class:"accordion-content-container av-pt-sm"},Ym=a.defineComponent({__name:"AvAccordion",props:{id:{},title:{},icon:{},headingLevel:{default:"h3"},overflowVisible:{type:Boolean,default:!1}},setup(t){a.useCssVars(b=>({v5e9e749e:a.unref(g)}));const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o,onTransitionEnd:i}=Ko(),s=t.id??`accordion-${crypto.randomUUID()}`,l=a.computed(()=>`${s}-panel`),c=a.ref(),d=a.ref(null),u=a.inject(Zc.registerAccordionKey),{isActive:f,expand:h,onKeydown:p,setTriggerRef:m}=(u==null?void 0:u(a.toRef(()=>t.title)))??{isActive:c,expand:()=>c.value=!c.value,onKeydown:void 0,setTriggerRef:void 0},A=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));a.onMounted(()=>{m==null||m(d.value),f.value&&o(!0)});const g=a.computed(()=>t.overflowVisible?"visible":"hidden");return a.watch(f,(b,v)=>{b!==v&&o(b)}),(b,v)=>{const y=le;return a.openBlock(),a.createElementBlock("section",Wm,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.headingLevel),{class:"av-accordion__header"},{default:a.withCtx(()=>[a.createElementVNode("button",{id:a.unref(s),ref_key:"triggerRef",ref:d,type:"button","aria-expanded":a.unref(f),"aria-controls":a.unref(l),class:"av-accordion__trigger av-row av-align-center av-p-sm av-w-full",style:a.normalizeStyle(a.unref(A)),onClick:v[0]||(v[0]=(...C)=>a.unref(h)&&a.unref(h)(...C)),onKeydown:v[1]||(v[1]=(...C)=>a.unref(p)&&a.unref(p)(...C))},[a.createElementVNode("div",Um,[t.icon?(a.openBlock(),a.createBlock(y,{key:0,size:2,name:t.icon,color:"var(--icon)"},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",qm,a.toDisplayString(t.title),1)])],44,Fm)]),_:1})),a.createElementVNode("div",{id:a.unref(l),ref_key:"collapse",ref:e,role:"region","aria-labelledby":a.unref(s),class:a.normalizeClass(["av-accordion__panel av-collapse av-my-none--md av--mx-xxs--md av-px-sm--md",{"av-collapse--expanded av-py-md":a.unref(r),"av-collapsing":a.unref(n)}]),onTransitionend:v[2]||(v[2]=C=>a.unref(i)(a.unref(f),!1))},[a.createElementVNode("div",Zm,[a.renderSlot(b.$slots,"default",{},void 0,!0)])],42,Km)])}}}),Xm=z(Ym,[["__scopeId","data-v-1fab3f4d"]]),Jm={class:"av-accordions-group",role:"group","aria-label":"Accordion group"},Gm=a.defineComponent({__name:"AvAccordionsGroup",props:{activeAccordion:{}},emits:["update:activeAccordion"],setup(t,{emit:e}){const n=e,r=a.ref(t.activeAccordion??-1),o=a.computed({get:()=>r.value,set(f){r.value=f,n("update:activeAccordion",f)}}),i=a.ref(new Map),s=a.ref(0),l=a.ref([]);function c(f,h){l.value[h]=f}function d(f){var h;(h=l.value[f])==null||h.focus()}function u(f,h){const p=l.value.length;if(!p)return;const m=(f+h+p)%p;d(m)}return a.provide(Zc.registerAccordionKey,f=>{const h=s.value++;i.value.set(h,f.value);const p=a.computed(()=>h===o.value);a.watch(f,()=>{i.value.set(h,f.value)});function m(){if(o.value===h){o.value=-1;return}o.value=h}function A(b){switch(b.key){case"ArrowDown":b.preventDefault(),u(h,1);break;case"ArrowUp":b.preventDefault(),u(h,-1);break;case"Home":b.preventDefault(),d(0);break;case"End":b.preventDefault(),d(l.value.length-1);break}}function g(b){b&&c(b,h)}return a.onUnmounted(()=>{i.value.delete(h)}),{isActive:p,expand:m,onKeydown:A,setTriggerRef:g}}),(f,h)=>(a.openBlock(),a.createElementBlock("div",Jm,[a.renderSlot(f.$slots,"default")]))}}),$m=["title","aria-label"],_m={class:"av-rich-button__line av-row av-align-center av-w-full"},eA={class:"av-rich-button__left av-row av-align-center av-w-full av-gap-sm av-pr-sm"},tA=a.defineComponent({__name:"AvRichButton",props:{label:{},iconLeft:{default:()=>{}},iconRight:{default:()=>{}},customPadding:{default:"var(--spacing-sm)"}},emits:["click"],setup(t){return a.useCssVars(e=>({v2deb83d4:e.customPadding})),(e,n)=>(a.openBlock(),a.createElementBlock("button",{title:t.label,"aria-label":t.label,class:"av-rich-button av-row av-w-full av-align-center av-justify-between",onClick:n[0]||(n[0]=r=>e.$emit("click",r))},[a.createElementVNode("div",_m,[a.createElementVNode("div",eA,[t.iconLeft?(a.openBlock(),a.createBlock(le,{key:0,name:t.iconLeft,color:"var(--dark-background-primary1)",size:1.5},null,8,["name"])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{},void 0,!0)]),t.iconRight?(a.openBlock(),a.createBlock(le,{key:0,name:t.iconRight,color:"var(--dark-background-primary1)",size:1.5},null,8,["name"])):a.createCommentVNode("",!0)])],8,$m))}}),nA=z(tA,[["__scopeId","data-v-ff4425d7"]]),rA=["id","name","value","checked","required","data-testid","data-test","tabindex","aria-describedby"],oA=["for"],iA={class:"label-container av-row av-gap-xs av-align-center"},sA={key:0,class:"av-hint-text"},aA=a.defineComponent({inheritAttrs:!1,__name:"AvCheckbox",props:a.mergeModels({id:{},icon:{},name:{},required:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{},errorMessage:{},validMessage:{},hint:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.computed(()=>t.id??`checkbox-${crypto.randomUUID()}`),n=a.computed(()=>t.errorMessage||t.validMessage),r=a.computed(()=>n.value?`message-${e.value}`:void 0),o=a.useModel(t,"modelValue"),i=a.computed(()=>o.value.includes(t.value)),s=a.computed(()=>i.value?D.CHECKBOX_MARKED:D.CHECKBOX_BLANK_OUTLINE),l=a.computed(()=>i.value?"var(--dark-background-primary1)":"var(--icon)"),c=a.computed(()=>t.small?1:1.5),d=a.computed(()=>t.small?i.value?"caption-bold":"caption-regular":i.value?"b2-bold":"b2-regular");return(u,f)=>{const h=le,p=wn,m=Bs;return a.openBlock(),a.createBlock(m,{inline:t.inline,disabled:t.disabled},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("input",a.mergeProps({id:a.unref(e),"onUpdate:modelValue":f[0]||(f[0]=A=>o.value=A),name:t.name,class:"av-sr-only",type:"checkbox",value:t.value,checked:a.unref(i),required:t.required},u.$attrs,{"data-testid":`input-checkbox-${a.unref(e)}`,"data-test":`input-checkbox-${a.unref(e)}`,tabindex:t.disabled?-1:void 0,"aria-describedby":a.unref(r)}),null,16,rA),[[a.vModelCheckbox,o.value]]),a.createElementVNode("label",{for:a.unref(e),class:"av-label av-pb-none"},[a.createElementVNode("div",iA,[a.createVNode(h,{class:"option-checkbox",name:a.unref(s),color:a.unref(l),size:a.unref(c)},null,8,["name","color","size"]),t.icon?(a.openBlock(),a.createBlock(h,{key:0,class:"option-icon",name:t.icon,color:a.unref(l),size:a.unref(c)},null,8,["name","color","size"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["label",a.unref(d)])},[a.renderSlot(u.$slots,"label",{},()=>[a.createTextVNode(a.toDisplayString(t.label),1)],!0)],2),t.required?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["required",a.unref(d)])}," *",2)):a.createCommentVNode("",!0)]),t.hint?(a.openBlock(),a.createElementBlock("span",sA,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],8,oA),a.createVNode(p,{"message-id":a.unref(r),type:t.errorMessage?"error":"success",message:a.unref(n)},null,8,["message-id","type","message"])]),_:3},8,["inline","disabled"])}}}),bd=z(aA,[["__scopeId","data-v-8150e911"]]),lA=a.defineComponent({__name:"AvCheckboxesGroup",props:{id:{},legend:{default:""},legendId:{default:""},errorMessage:{default:""},successMessage:{default:""},hint:{default:""},inline:{type:Boolean,default:!1}},setup(t){const e=a.computed(()=>t.id??`checkboxes-group-${crypto.randomUUID()}`);return(n,r)=>{const o=Os;return a.openBlock(),a.createBlock(o,{id:a.unref(e),legend:t.legend,"legend-id":t.legendId,hint:t.hint,"error-message":t.errorMessage,"success-message":t.successMessage,inline:t.inline,"aria-live":"polite"},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["av-checkboxes-group av-gap-sm",{"av-checkboxes-group--inline av-row av-row-wrap":t.inline,"av-col":!t.inline}])},[a.renderSlot(n.$slots,"default")],2)]),_:3},8,["id","legend","legend-id","hint","error-message","success-message","inline"])}}}),cA={class:"av-row av-align-center av-gap-xs"},dA={class:"left-content-container av-row av-align-center av-justify-center av-radius-md"},uA={class:"content-container av-col"},fA={key:0},hA={class:"b2-bold"},pA={key:1,class:"av-col av-gap-xxs"},mA={class:"b2-regular"},AA={class:"caption-light"},gA={key:0,class:"av-px-xs"},bA=["id","aria-describedby","disabled","aria-disabled","accept"],vA={class:"caption-light"},yA=a.defineComponent({inheritAttrs:!1,__name:"AvFileUpload",props:{id:{},ariaLabel:{default:""},accept:{default:()=>{}},error:{default:""},validMessage:{default:""},disabled:{type:Boolean,default:!1},modelValue:{default:null},maxWidth:{default:"none"},title:{},description:{},deleteButtonLabel:{default:"Remove"},fileName:{},onDeleteFile:{type:Function},enableMultiple:{type:Boolean,default:!1}},emits:["update:modelValue","update:validMessage","update:error","change","acceptTypeError"],setup(t,{emit:e}){a.useCssVars(m=>({v25f2c89c:m.maxWidth}));const n=e,r=t.id??`file-upload-${crypto.randomUUID()}`,o=a.computed(()=>Array.isArray(t.accept)?t.accept.join(","):t.accept),i=a.ref(!1);function s(m){const A=o.value;return A?A.split(",").map(b=>b.trim().toLowerCase()).some(b=>b.startsWith(".")?m.name.toLowerCase().endsWith(b):b.includes("/")?m.type===b||m.type.startsWith(`${b.split("/")[0]}/`):!1):!0}async function l(m){var g,b;if(m.preventDefault(),i.value=!1,t.disabled||!((b=(g=m.dataTransfer)==null?void 0:g.files)!=null&&b.length))return;const A=Array.from(m.dataTransfer.files).filter(s);await a.nextTick(),A.length?(n("change",A),n("update:modelValue",A[0]??null)):n("acceptTypeError")}function c(m){m.preventDefault(),t.disabled||(i.value=!0)}function d(){i.value=!1}function u(m){const A=m.target.files;if(A!=null&&A.length&&!Array.from(A).filter(s).length){n("acceptTypeError");return}n("change",A),n("update:modelValue",(A==null?void 0:A[0])??null)}const f=a.computed(()=>t.fileName||t.modelValue&&!t.enableMultiple),h=a.computed(()=>({for:r,class:["av-upload-group",{"av-upload-group--error":t.error,"av-upload-group--valid":t.validMessage,"av-upload-group--disabled":t.disabled,"drag-over":i.value}],"aria-label":t.ariaLabel,onDragover:c,onDragleave:d,onDrop:l}));function p(m){var A;m?(n("update:modelValue",null),n("update:validMessage",null),n("update:error",null),n("change",[])):(A=t.onDeleteFile)==null||A.call(t)}return(m,A)=>{const g=wn;return a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)?"div":"label"),a.mergeProps(a.unref(f)?{}:a.unref(h),{class:a.unref(f)?"file-preview-container av-radius-lg av-p-xs":""}),{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(a.unref(f)?"":"file-upload-container av-radius-lg av-p-xs")},[a.createElementVNode("div",cA,[a.createElementVNode("div",dA,[a.renderSlot(m.$slots,"left",{},()=>[a.createVNode(le,{size:2.5,name:a.unref(D).ATTACHMENT_PLUS,color:"var(--icon)"},null,8,["name"])],!0)]),a.createElementVNode("div",uA,[a.unref(f)?(a.openBlock(),a.createElementBlock("div",fA,[a.createElementVNode("span",hA,a.toDisplayString(t.fileName||t.modelValue.name),1)])):(a.openBlock(),a.createElementBlock("div",pA,[a.createElementVNode("span",mA,a.toDisplayString(t.title),1),a.createElementVNode("span",AA,a.toDisplayString(t.description),1)])),a.createVNode(g,{type:t.error?"error":"success",message:t.error?t.error:t.validMessage},null,8,["type","message"])]),t.disabled?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",gA,[a.unref(f)?(a.openBlock(),a.createBlock(q,{key:0,label:t.deleteButtonLabel,theme:"SECONDARY",onClick:A[0]||(A[0]=()=>p(t.modelValue))},null,8,["label"])):(a.openBlock(),a.createBlock(le,{key:1,size:1.5,name:a.unref(D).TRAY_UPLOAD,color:"var(--dark-background-primary1)"},null,8,["name"]))])),a.unref(f)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("input",a.mergeProps({key:1,id:a.unref(r),class:"av-upload",type:"file","aria-describedby":t.error||t.validMessage?`${a.unref(r)}-desc`:void 0},m.$attrs,{disabled:t.disabled,"aria-disabled":t.disabled,accept:a.unref(o),onChange:A[1]||(A[1]=b=>u(b))}),null,16,bA))])],2)]),_:3},16,["class"])),a.createElementVNode("span",vA,[a.renderSlot(m.$slots,"hint",{},void 0,!0)])],64)}}}),CA=z(yA,[["__scopeId","data-v-e5c14747"]]),vd=6048e5,IA=864e5,yd=6e4,Cd=36e5,Xa=Symbol.for("constructDateFrom");function Oe(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Xa in t?t[Xa](e):t instanceof Date?new t.constructor(e):new Date(e)}function Me(t,e){return Oe(e||t,t)}let kA={};function Yo(){return kA}function or(t,e){var l,c,d,u;const n=Yo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(t,e==null?void 0:e.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function eo(t,e){return or(t,{...e,weekStartsOn:1})}function Id(t,e){const n=Me(t,e==null?void 0:e.in),r=n.getFullYear(),o=Oe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=eo(o),s=Oe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=eo(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ja(t){const e=Me(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function EA(t,...e){const n=Oe.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Ga(t,e){const n=Me(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function MA(t,e,n){const[r,o]=EA(n==null?void 0:n.in,t,e),i=Ga(r),s=Ga(o),l=+i-Ja(i),c=+s-Ja(s);return Math.round((l-c)/IA)}function wA(t,e){const n=Id(t,e),r=Oe(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),eo(r)}function NA(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const i=Me(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),Oe(r,n||NaN)}function xA(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const i=Me(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),Oe(r,n||NaN)}function SA(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Xo(t){return!(!SA(t)&&typeof t!="number"||isNaN(+Me(t)))}function TA(t,e){const n=Me(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const LA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},DA=(t,e,n)=>{let r;const o=LA[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function gi(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const OA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},BA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},RA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zA={date:gi({formats:OA,defaultWidth:"full"}),time:gi({formats:BA,defaultWidth:"full"}),dateTime:gi({formats:RA,defaultWidth:"full"})},PA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},VA=(t,e,n,r)=>PA[t];function Dn(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const s=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):s;o=t.formattingValues[l]||t.formattingValues[s]}else{const s=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[l]||t.values[s]}const i=t.argumentCallback?t.argumentCallback(e):e;return o[i]}}const jA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},WA={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},FA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},UA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qA=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},KA={ordinalNumber:qA,era:Dn({values:jA,defaultWidth:"wide"}),quarter:Dn({values:HA,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dn({values:QA,defaultWidth:"wide"}),day:Dn({values:WA,defaultWidth:"wide"}),dayPeriod:Dn({values:FA,defaultWidth:"wide",formattingValues:UA,defaultFormattingWidth:"wide"})};function On(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(o);if(!i)return null;const s=i[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?YA(l,f=>f.test(s)):ZA(l,f=>f.test(s));let d;d=t.valueCallback?t.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const u=e.slice(s.length);return{value:d,rest:u}}}function ZA(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function YA(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function XA(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],i=e.match(t.parsePattern);if(!i)return null;let s=t.valueCallback?t.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const l=e.slice(o.length);return{value:s,rest:l}}}const JA=/^(\d+)(th|st|nd|rd)?/i,GA=/\d+/i,$A={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},_A={any:[/^b/i,/^(a|c)/i]},eg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tg={any:[/1/i,/2/i,/3/i,/4/i]},ng={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rg={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},og={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ig={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},sg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ag={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lg={ordinalNumber:XA({matchPattern:JA,parsePattern:GA,valueCallback:t=>parseInt(t,10)}),era:On({matchPatterns:$A,defaultMatchWidth:"wide",parsePatterns:_A,defaultParseWidth:"any"}),quarter:On({matchPatterns:eg,defaultMatchWidth:"wide",parsePatterns:tg,defaultParseWidth:"any",valueCallback:t=>t+1}),month:On({matchPatterns:ng,defaultMatchWidth:"wide",parsePatterns:rg,defaultParseWidth:"any"}),day:On({matchPatterns:og,defaultMatchWidth:"wide",parsePatterns:ig,defaultParseWidth:"any"}),dayPeriod:On({matchPatterns:sg,defaultMatchWidth:"any",parsePatterns:ag,defaultParseWidth:"any"})},cg={code:"en-US",formatDistance:DA,formatLong:zA,formatRelative:VA,localize:KA,match:lg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dg(t,e){const n=Me(t,e==null?void 0:e.in);return MA(n,TA(n))+1}function ug(t,e){const n=Me(t,e==null?void 0:e.in),r=+eo(n)-+wA(n);return Math.round(r/vd)+1}function kd(t,e){var u,f,h,p;const n=Me(t,e==null?void 0:e.in),r=n.getFullYear(),o=Yo(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=Oe((e==null?void 0:e.in)||t,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const l=or(s,e),c=Oe((e==null?void 0:e.in)||t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const d=or(c,e);return+n>=+l?r+1:+n>=+d?r:r-1}function fg(t,e){var l,c,d,u;const n=Yo(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=kd(t,e),i=Oe((e==null?void 0:e.in)||t,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),or(i,e)}function hg(t,e){const n=Me(t,e==null?void 0:e.in),r=+or(n,e)-+fg(n,e);return Math.round(r/vd)+1}function X(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const ht={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return X(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):X(n+1,2)},d(t,e){return X(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return X(t.getHours()%12||12,e.length)},H(t,e){return X(t.getHours(),e.length)},m(t,e){return X(t.getMinutes(),e.length)},s(t,e){return X(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return X(o,e.length)}},dn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$a={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ht.y(t,e)},Y:function(t,e,n,r){const o=kd(t,r),i=o>0?o:1-o;if(e==="YY"){const s=i%100;return X(s,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):X(i,e.length)},R:function(t,e){const n=Id(t);return X(n,e.length)},u:function(t,e){const n=t.getFullYear();return X(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return X(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return X(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return ht.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return X(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const o=hg(t,r);return e==="wo"?n.ordinalNumber(o,{unit:"week"}):X(o,e.length)},I:function(t,e,n){const r=ug(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):X(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ht.d(t,e)},D:function(t,e,n){const r=dg(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):X(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return X(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return X(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return X(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let o;switch(r===12?o=dn.noon:r===0?o=dn.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let o;switch(r>=17?o=dn.evening:r>=12?o=dn.afternoon:r>=4?o=dn.morning:o=dn.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ht.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ht.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ht.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ht.s(t,e)},S:function(t,e){return ht.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return el(r);case"XXXX":case"XX":return Rt(r);case"XXXXX":case"XXX":default:return Rt(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return el(r);case"xxxx":case"xx":return Rt(r);case"xxxxx":case"xxx":default:return Rt(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_a(r,":");case"OOOO":default:return"GMT"+Rt(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_a(r,":");case"zzzz":default:return"GMT"+Rt(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return X(r,e.length)},T:function(t,e,n){return X(+t,e.length)}};function _a(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+e+X(i,2)}function el(t,e){return t%60===0?(t>0?"-":"+")+X(Math.abs(t)/60,2):Rt(t,e)}function Rt(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=X(Math.trunc(r/60),2),i=X(r%60,2);return n+o+e+i}const tl=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ed=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},pg=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return tl(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",tl(r,e)).replace("{{time}}",Ed(o,e))},mg={p:Ed,P:pg},Ag=/^D+$/,gg=/^Y+$/,bg=["D","DD","YY","YYYY"];function vg(t){return Ag.test(t)}function yg(t){return gg.test(t)}function Cg(t,e,n){const r=Ig(t,e,n);if(console.warn(r),bg.includes(t))throw new RangeError(r)}function Ig(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const kg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Eg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mg=/^'([^]*?)'?$/,wg=/''/g,Ng=/[a-zA-Z]/;function Ze(t,e,n){var u,f,h,p;const r=Yo(),o=r.locale??cg,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,l=Me(t,n==null?void 0:n.in);if(!Xo(l))throw new RangeError("Invalid time value");let c=e.match(Eg).map(m=>{const A=m[0];if(A==="p"||A==="P"){const g=mg[A];return g(m,o.formatLong)}return m}).join("").match(kg).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const A=m[0];if(A==="'")return{isToken:!1,value:xg(m)};if($a[A])return{isToken:!0,value:m};if(A.match(Ng))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return c.map(m=>{if(!m.isToken)return m.value;const A=m.value;(yg(A)||vg(A))&&Cg(A,e,String(t));const g=$a[A[0]];return g(l,A,o.localize,d)}).join("")}function xg(t){const e=t.match(Mg);return e?e[1].replace(wg,"'"):t}function Md(t,e){const n=()=>Oe(e==null?void 0:e.in,NaN),o=Dg(t);let i;if(o.date){const d=Og(o.date,2);i=Bg(d.restDateString,d.year)}if(!i||isNaN(+i))return n();const s=+i;let l=0,c;if(o.time&&(l=Rg(o.time),isNaN(l)))return n();if(o.timezone){if(c=zg(o.timezone),isNaN(c))return n()}else{const d=new Date(s+l),u=Me(0,e==null?void 0:e.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return Me(s+l+c,e==null?void 0:e.in)}const Mr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Sg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Tg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Lg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Dg(t){const e={},n=t.split(Mr.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Mr.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Mr.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const o=Mr.timezone.exec(r);o?(e.time=r.replace(o[1],""),e.timezone=o[1]):e.time=r}return e}function Og(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function Bg(t,e){if(e===null)return new Date(NaN);const n=t.match(Sg);if(!n)return new Date(NaN);const r=!!n[4],o=Bn(n[1]),i=Bn(n[2])-1,s=Bn(n[3]),l=Bn(n[4]),c=Bn(n[5])-1;if(r)return Qg(e,l,c)?Pg(e,l,c):new Date(NaN);{const d=new Date(0);return!jg(e,i,s)||!Hg(e,o)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(o,s)),d)}}function Bn(t){return t?parseInt(t):1}function Rg(t){const e=t.match(Tg);if(!e)return NaN;const n=bi(e[1]),r=bi(e[2]),o=bi(e[3]);return Wg(n,r,o)?n*Cd+r*yd+o*1e3:NaN}function bi(t){return t&&parseFloat(t.replace(",","."))||0}function zg(t){if(t==="Z")return 0;const e=t.match(Lg);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return Fg(r,o)?n*(r*Cd+o*yd):NaN}function Pg(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const o=r.getUTCDay()||7,i=(e-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const Vg=[31,null,31,30,31,30,31,31,30,31,30,31];function wd(t){return t%400===0||t%4===0&&t%100!==0}function jg(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(Vg[e]||(wd(t)?29:28))}function Hg(t,e){return e>=1&&e<=(wd(t)?366:365)}function Qg(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function Wg(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Fg(t,e){return e>=0&&e<=59}const Ug=["date","datetime-local","month","time","week"],qg={date:"yyyy-MM-dd","datetime-local":"yyyy-MM-dd'T'HH:mm",month:"yyyy-MM",time:"HH:mm",week:"yyyy-'W'II"};function to(t){return!!t&&Ug.includes(t)}function nl(t,e){if(!(!e||!Xo(e)||!to(t)))return Ze(e,qg[t])}function Kg(t,e,n){if(!e||!to(t)||typeof e!="string")return"";const r=Md(e);if(!Xo(r))return"";if(n)try{if(t==="week"){const o=Ze(r,n),i=Ze(new Date(r.getTime()+8640*60*1e3),n);return`${o} - ${i}`}return Ze(r,n)}catch{console.warn(`[formatDisplayedDate] Invalid format string: ${n}. Falling back to default format for type "${t}".`)}switch(t){case"date":return Ze(r,"dd/MM/yyyy");case"datetime-local":return Ze(r,"dd/MM/yyyy hh:mm");case"month":return Ze(r,"MM/yyyy");case"time":return Ze(r,"p");case"week":{const o=Ze(r,"dd/MM/yyyy"),i=Ze(new Date(r.getTime()+8640*60*1e3),"dd/MM/yyyy");return`${o} - ${i}`}}}function Zg(t){switch(t){case"date":return"dd/mm/yyyy";case"datetime-local":return"dd/mm/yyyy --:--";case"month":return"mm/yyyy";case"time":return"--:--";case"week":return"dd/mm/yyyy - dd/mm/yyyy";default:return""}}function Yg(t){switch(t){case"date":return D.CALENDAR_BLANK_OUTLINE;case"datetime-local":return D.CALENDAR_TIME;case"month":return D.CALENDAR_MONTH_OUTLINE;case"week":return D.CALENDAR_WEEK_OUTLINE;case"time":return D.CLOCK_OUTLINE;default:return}}const Xg={class:"av-input__wrapper av-col av-gap-xxs"},Jg={class:"av-input__control"},Gg={key:0,class:"av-input__prefix av-align-center av-col"},$g=["for"],_g={key:0,"aria-hidden":"true",class:"required"},eb={key:1,class:"av-input__date-wrapper"},tb={key:3,class:"av-align-center av-col av-input__suffix"},nb={key:0,class:"caption-light"},rb={key:0,class:"av-hint-text"},ob=a.defineComponent({inheritAttrs:!1,__name:"AvInput",props:{id:{},descriptionId:{},hint:{default:""},isValid:{type:Boolean,default:!1},isTextarea:{type:Boolean,default:!1},labelVisible:{type:Boolean,default:!0},label:{default:""},labelClass:{default:"b2-light"},modelValue:{default:""},placeholder:{},type:{default:"text"},minDate:{},maxDate:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{},minlength:{},errorMessage:{},validMessage:{},prefixIcon:{},textareaMinHeight:{default:"var(--dimension-5xl)"},width:{},noRadius:{type:Boolean,default:!1},formatDateStr:{}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){a.useCssVars(b=>({f16c69c2:b.width,v3814c9aa:a.unref(p),v48823050:b.textareaMinHeight}));const r=n,o=a.useAttrs(),i=t.id??`input-${crypto.randomUUID()}`,s=a.computed(()=>t.errorMessage?Array.isArray(t.errorMessage)?t.errorMessage:[t.errorMessage]:[]),l=a.computed(()=>t.validMessage?Array.isArray(t.validMessage)?t.validMessage:[t.validMessage]:[]),c=a.computed(()=>!!t.errorMessage),d=a.ref(null),u=()=>{var b;return(b=d.value)==null?void 0:b.focus()},f=a.computed(()=>t.isTextarea?"textarea":"input"),h=a.computed(()=>["av-label",{invisible:!t.labelVisible}]),p=a.computed(()=>t.labelVisible&&t.label?"69%":"60%"),m=a.computed(()=>({"av-input__input av-col av-align-center av-w-full b2-light av-py-xs av-px-sm":!0,"av-input__input--error":c.value,"av-input__input--valid":t.isValid,"av-pt-xs av-align-start":t.isTextarea,"av-radius-none":t.noRadius,"av-radius-lg":!t.noRadius})),A=a.computed(()=>({...o,disabled:t.disabled,maxlength:t.maxlength,minlength:t.minlength,required:t.required,type:t.type,placeholder:t.disabled?"":t.placeholder,max:nl(t.type,t.maxDate),min:nl(t.type,t.minDate),ariaDescribedBy:t.descriptionId||void 0})),g=a.computed(()=>to(t.type)?Yg(t.type):t.prefixIcon);return e({focus:u}),(b,v)=>{const y=wn;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-input av-col av-gap-xxs",{"av-input--date":t.type==="date","av-input--no-radius":t.noRadius}])},[a.createElementVNode("div",Xg,[a.createElementVNode("div",Jg,[a.unref(g)?(a.openBlock(),a.createElementBlock("div",Gg,[a.createVNode(le,{name:a.unref(g),size:1.2},null,8,["name"])])):a.createCommentVNode("",!0),a.createElementVNode("label",{class:a.normalizeClass(a.unref(h)),for:a.unref(i)},[a.createElementVNode("span",{class:a.normalizeClass(t.labelClass)},[a.createTextVNode(a.toDisplayString(t.label)+" ",1),a.renderSlot(b.$slots,"requiredTip",{},()=>[t.required?(a.openBlock(),a.createElementBlock("span",_g,"*")):a.createCommentVNode("",!0)],!0)],2)],10,$g),a.unref(to)(t.type)?(a.openBlock(),a.createElementBlock("div",eb,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps(a.unref(A),{id:a.unref(i),ref_key:"__input",ref:d,class:["av-input__input--date-real",[a.unref(m)]],value:t.modelValue,onInput:v[0]||(v[0]=C=>r("update:modelValue",C.target.value)),onChange:v[1]||(v[1]=C=>r("update:modelValue",C.target.value))}),null,16,["id","class","value"])),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps(a.unref(A),{id:`${a.unref(i)}-picker`,class:["av-input__input--date-picker",[a.unref(m)]],placeholder:t.disabled?"":a.unref(Zg)(t.type),type:"text",readonly:"","aria-hidden":"true",tabindex:"-1",value:a.unref(Kg)(t.type,t.modelValue,t.formatDateStr),onMousedown:v[2]||(v[2]=a.withModifiers(()=>{},["prevent"])),onTouchstart:v[3]||(v[3]=a.withModifiers(()=>{},["prevent"]))}),null,16,["id","class","placeholder","value"]))])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps({key:2},a.unref(A),{id:a.unref(i),ref_key:"__input",ref:d,class:a.unref(m),value:t.modelValue,onInput:v[4]||(v[4]=C=>r("update:modelValue",C.target.value))}),null,16,["id","class","value"])),b.$slots.suffix?(a.openBlock(),a.createElementBlock("div",tb,[a.renderSlot(b.$slots,"suffix",{},void 0,!0)])):a.createCommentVNode("",!0)]),t.disabled?a.createCommentVNode("",!0):a.renderSlot(b.$slots,"maxLengthCaption",{key:0,currentValue:t.modelValue,maxlength:t.maxlength},()=>{var C;return[t.maxlength?(a.openBlock(),a.createElementBlock("span",nb,a.toDisplayString((C=t.modelValue)==null?void 0:C.toString().length)+" / "+a.toDisplayString(t.maxlength),1)):a.createCommentVNode("",!0)]},!0)]),t.hint?(a.openBlock(),a.createElementBlock("span",rb,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0),a.unref(s).length>0?(a.openBlock(),a.createBlock(y,{key:1,message:a.unref(s),type:"error"},null,8,["message"])):a.createCommentVNode("",!0),a.unref(l).length>0?(a.openBlock(),a.createBlock(y,{key:2,message:a.unref(l),type:"success"},null,8,["message"])):a.createCommentVNode("",!0)],2)}}}),Ge=z(ob,[["__scopeId","data-v-2d7389df"]]),ib=["for"],sb=a.defineComponent({__name:"AvPeriodInput",props:{id:{},labelClass:{default:"b2-light"},startModelValue:{default:""},endModelValue:{default:""},width:{},startMinDate:{},startMaxDate:{},endMinDate:{},endMaxDate:{},stacked:{type:Boolean,default:!1},separatorSpacing:{default:"var(--spacing-sm)"},endDateDisabled:{type:Boolean,default:!1},startDateDisabled:{type:Boolean,default:!1},type:{default:"date"},labelVisible:{type:Boolean,default:!0},startErrorMessage:{},endErrorMessage:{},showEachInputLabel:{type:Boolean,default:!1},startLabel:{},endLabel:{},label:{}},emits:["update:startModelValue","update:endModelValue","change"],setup(t,{emit:e}){a.useCssVars(v=>({c7edf41e:v.separatorSpacing}));const n=e,r=a.computed(()=>t.id??`period-input-${crypto.randomUUID()}`),o=a.computed(()=>`${r.value}__start`),i=a.computed(()=>`${r.value}__end`);function s(v){if(!v)return;const y=Md(v);return Xo(y)?y:void 0}function l(v,y){return v&&y?NA([v,y]):v??y}function c(v,y){return v&&y?xA([v,y]):v??y}const d=a.computed(()=>s(t.startModelValue)),u=a.computed(()=>s(t.endModelValue)),f=a.computed(()=>t.startMinDate),h=a.computed(()=>c(t.startMaxDate,u.value)),p=a.computed(()=>l(t.endMinDate,d.value)),m=a.computed(()=>t.endMaxDate),A=a.computed(()=>["av-label",{"av-sr-only":!t.labelVisible},t.labelClass]);function g(v){const y=(v==null?void 0:v.toString())??"";n("update:startModelValue",y),n("change",{start:y,end:t.endModelValue})}function b(v){const y=(v==null?void 0:v.toString())??"";n("update:endModelValue",y),n("change",{start:t.startModelValue,end:y})}return(v,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-period-input av-col av-gap-xxs",{"av-period-input--stacked":t.stacked}])},[t.showEachInputLabel?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("label",{key:0,class:a.normalizeClass(a.unref(A)),for:a.unref(o),"data-testid":"common-label"},a.toDisplayString(t.label),11,ib)),a.createElementVNode("div",{class:a.normalizeClass(["av-period-input__row",{"av-row av-align-start":!t.stacked,"av-col av-align-stretch":t.stacked}])},[a.createVNode(Ge,{id:a.unref(o),type:t.type,"model-value":t.startModelValue,label:t.startLabel,"aria-label":t.startLabel,"label-visible":t.showEachInputLabel,disabled:t.startDateDisabled,width:t.width,"min-date":a.unref(f),"max-date":a.unref(h),"error-message":t.startErrorMessage,"data-testid":"start-date-input","onUpdate:modelValue":y[0]||(y[0]=C=>g(C))},null,8,["id","type","model-value","label","aria-label","label-visible","disabled","width","min-date","max-date","error-message"]),a.createVNode(Ge,{id:a.unref(i),type:t.type,"model-value":t.endModelValue,label:t.endLabel,"aria-label":t.endLabel,"label-visible":t.showEachInputLabel,disabled:t.endDateDisabled,width:t.width,"min-date":a.unref(p),"max-date":a.unref(m),"error-message":t.endErrorMessage,"data-testid":"end-date-input","onUpdate:modelValue":y[1]||(y[1]=C=>b(C))},null,8,["id","type","model-value","label","aria-label","label-visible","disabled","width","min-date","max-date","error-message"])],2)],2))}}),ab=z(sb,[["__scopeId","data-v-d5e737a7"]]);function ge(t){this.content=t}ge.prototype={constructor:ge,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new ge(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ge(n)},addToStart:function(t,e){return new ge([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ge(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new ge(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ge.from(t),t.size?new ge(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ge.from(t),t.size?new ge(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ge.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ge.from=function(t){if(t instanceof ge)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ge(e)};function Nd(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=Nd(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function xd(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),c=s.nodeSize;if(s==l){n-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let d=xd(s.content,l.content,n-1,r-1);if(d)return d}n-=c,r-=c}}class w{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,l=0;l<n;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,o+l,i||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,n-u),r,o+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,n-c):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=d},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new w(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let l=this.content[i],c=s+l.nodeSize;c>e&&((s<e||c>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=c}return new w(r,o)}cutByIndex(e,n){return e==n?w.empty:e==0&&n==this.content.length?this:new w(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new w(o,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return Nd(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return xd(this,e,n,r)}findIndex(e){if(e==0)return wr(0,e);if(e==this.size)return wr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?wr(n+1,i):wr(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return w.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new w(n||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const vi={index:0,offset:0};function wr(t,e){return vi.index=t,vi.offset=e,vi}function no(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!no(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!no(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let J=class Xi{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&no(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Xi.none;if(e instanceof Xi)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};J.none=[];class ro extends Error{}class T{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Td(this.content,e+this.openStart,n);return r&&new T(r,this.openStart,this.openEnd)}removeBetween(e,n){return new T(Sd(this.content,e+this.openStart,n+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,n){if(!n)return T.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new T(w.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new T(e,r,o)}}T.empty=new T(w.empty,0,0);function Sd(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(Sd(i.content,e-o-1,n-o-1)))}function Td(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=Td(s.content,e-i-1,n,s);return l&&t.replaceChild(o,s.copy(l))}function lb(t,e,n){if(n.openStart>t.depth)throw new ro("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ro("Inconsistent open depths");return Ld(t,e,n,0)}function Ld(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=Ld(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return Ut(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=cb(n,t);return Ut(i,Od(t,s,l,e,r))}else return Ut(i,oo(t,e,r))}function Dd(t,e){if(!e.type.compatibleContent(t.type))throw new ro("Cannot join "+e.type.name+" onto "+t.type.name)}function Ji(t,e,n){let r=t.node(n);return Dd(r,e.node(n)),r}function Ft(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Zn(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ft(t.nodeAfter,r),i++));for(let l=i;l<s;l++)Ft(o.child(l),r);e&&e.depth==n&&e.textOffset&&Ft(e.nodeBefore,r)}function Ut(t,e){return t.type.checkContent(e),t.copy(e)}function Od(t,e,n,r,o){let i=t.depth>o&&Ji(t,e,o+1),s=r.depth>o&&Ji(n,r,o+1),l=[];return Zn(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(Dd(i,s),Ft(Ut(i,Od(t,e,n,r,o+1)),l)):(i&&Ft(Ut(i,oo(t,e,o+1)),l),Zn(e,n,o,l),s&&Ft(Ut(s,oo(n,r,o+1)),l)),Zn(r,null,o,l),new w(l)}function oo(t,e,n){let r=[];if(Zn(null,t,n,r),t.depth>n){let o=Ji(t,e,n+1);Ft(Ut(o,oo(t,e,n+1)),r)}return Zn(e,null,n,r),new w(r)}function cb(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(w.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ir{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return J.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new io(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(i),d=i-c;if(r.push(s,l,o+c),!d||(s=s.child(l),s.isText))break;i=d-1,o+=c+1}return new ir(n,r,i)}static resolveCached(e,n){let r=rl.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else rl.set(e,r=new db);let o=r.elts[r.i]=ir.resolve(e,n);return r.i=(r.i+1)%ub,o}}class db{constructor(){this.elts=[],this.i=0}}const ub=12,rl=new WeakMap;class io{constructor(e,n,r){this.$from=e,this.$to=n,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 fb=Object.create(null);let Mt=class Gi{constructor(e,n,r,o=J.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||w.empty}get children(){return this.content.content}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,n,r,o=0){this.content.nodesBetween(e,n,r,o,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,n,r,o){return this.content.textBetween(e,n,r,o)}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,n,r){return this.type==e&&no(this.attrs,n||e.defaultAttrs||fb)&&J.sameSet(this.marks,r||J.none)}copy(e=null){return e==this.content?this:new Gi(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Gi(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return T.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),l=o.start(s),d=o.node(s).content.cut(o.pos-l,i.pos-l);return new T(d,o.depth-s,i.depth-s)}replace(e,n,r){return lb(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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()+")"),Bd(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=w.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let c=o;c<i;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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),this.type.checkAttrs(this.attrs);let e=J.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!J.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=w.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Mt.prototype.text=void 0;class so extends Mt{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Bd(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new so(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new so(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Bd(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Jt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new hb(e,n);if(r.next==null)return Jt.empty;let o=Rd(r);r.next&&r.err("Unexpected trailing text");let i=yb(vb(o));return Cb(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,l){let c=s.matchFragment(e,r);if(c&&(!n||c.validEnd))return w.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=i(f,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:c}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!o.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),n[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 n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
13
|
-
`)}}Jt.empty=new Jt(!0);class hb{constructor(e,n){this.string=e,this.nodeTypes=n,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 Rd(t){let e=[];do e.push(pb(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function pb(t){let e=[];do e.push(mb(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function mb(t){let e=bb(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=Ab(t,e);else break;return e}function ol(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function Ab(t,e){let n=ol(t),r=n;return t.eat(",")&&(t.next!="}"?r=ol(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function gb(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function bb(t){if(t.eat("(")){let e=Rd(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=gb(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function vb(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,c){let d={term:c,to:l};return e[s].push(d),d}function o(s,l){s.forEach(c=>c.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((c,d)=>c.concat(i(d,l)),[]);if(s.type=="seq")for(let c=0;;c++){let d=i(s.exprs[c],l);if(c==s.exprs.length-1)return d;o(d,l=n())}else if(s.type=="star"){let c=n();return r(l,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,l),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let c=l;for(let d=0;d<s.min;d++){let u=n();o(i(s.expr,c),u),c=u}if(s.max==-1)o(i(s.expr,c),c);else for(let d=s.min;d<s.max;d++){let u=n();r(c,u),o(i(s.expr,c),u),c=u}return[r(c)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function zd(t,e){return e-t}function il(t,e){let n=[];return r(e),n.sort(zd);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:c}=i[s];!l&&n.indexOf(c)==-1&&r(c)}}}function yb(t){let e=Object.create(null);return n(il(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:c})=>{if(!l)return;let d;for(let u=0;u<o.length;u++)o[u][0]==l&&(d=o[u][1]);il(t,c).forEach(u=>{d||o.push([l,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let i=e[r.join(",")]=new Jt(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(zd);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Cb(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:c,next:d}=o.next[l];s.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),r.indexOf(d)==-1&&r.push(d)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pd(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Vd(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function jd(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function Hd(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new kb(t,r,e[r]);return n}let sl=class Qd{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Hd(e,r.attrs),this.defaultAttrs=Pd(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==Jt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}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:Vd(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Mt(this,this.computeAttrs(e),w.from(n),J.setFrom(r))}createChecked(e=null,n,r){return n=w.from(n),this.checkContent(n),new Mt(this,this.computeAttrs(e),n,J.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=w.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(w.empty,!0);return i?new Mt(this,e,n.append(i),J.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.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)}`)}checkAttrs(e){jd(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:J.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new Qd(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function Ib(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class kb{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?Ib(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Jo{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=Hd(e,o.attrs),this.excluded=null;let i=Pd(this.attrs);this.instance=i?new J(this,i):null}create(e=null){return!e&&this.instance?this.instance:new J(this,Vd(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Jo(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){jd(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Wd{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=ge.from(e.nodes),n.marks=ge.from(e.marks||{}),this.nodes=sl.compile(this.spec.nodes,this),this.marks=Jo.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Jt.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?al(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:al(this,s.split(" "))}this.nodeFromJSON=o=>Mt.fromJSON(this,o),this.markFromJSON=o=>J.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof sl){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(n,r,o)}text(e,n){let r=this.nodes.text;return new so(r,r.defaultAttrs,e,J.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function al(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let l in t.marks){let c=t.marks[l];(o=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Eb(t){return t.tag!=null}function Mb(t){return t.style!=null}class wt{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Eb(o))this.tags.push(o);else if(Mb(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new cl(this,n,!1);return r.addAll(e,J.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new cl(this,n,!0);return r.addAll(e,J.none,n.from,n.to),T.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(xb(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=dl(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=dl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new wt(e,wt.schemaRules(e)))}}const Fd={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},wb={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ud={ol:!0,ul:!0},sr=1,$i=2,Yn=4;function ll(t,e,n){return e!=null?(e?sr:0)|(e==="full"?$i:0):t&&t.whitespace=="pre"?sr|$i:n&~Yn}class Nr{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=J.none,this.match=i||(s&Yn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(w.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&sr)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=w.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Fd.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class cl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=ll(null,n.preserveWhitespace,0)|(r?Yn:0);o?i=new Nr(o.type,o.attrs,J.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Nr(null,null,J.none,!0,null,s):i=new Nr(e.schema.topNodeType,null,J.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&$i?"full":this.localPreserveWS||(o.options&sr)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
14
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let c=0;c<l.length;c++)c&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[c]&&this.insertNode(s.text(l[c]),n,!/\S/.test(l[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],c=e.previousSibling;(!l||c&&c.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Ud.hasOwnProperty(s)&&this.parser.normalizeLists&&
|
|
15
|
-
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let c=this.parser.matchStyle(i,s,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(d=>!c.clearMark(d)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let c=this.enter(s,n.attrs||null,r,n.preserveWhitespace);c&&(i=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r,!1));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let c=this.nodes[s],d=c.findWrapping(e);if(d&&(!o||o.length>d.length+l)&&(o=d,i=c,!d.length))break;if(c.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=J.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):ul(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=ll(e,i,s.options);s.options&Yn&&s.content.length==0&&(l|=Yn);let c=J.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):ul(d.type,e))?(c=d.addToSet(c),!1):!0),this.nodes.push(new Nr(e,n,c,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=sr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,c)=>{for(;l>=0;l--){let d=n[l];if(d==""){if(l==n.length-1||l==0)continue;for(;c>=i;c--)if(s(l-1,c))return!0;return!1}else{let u=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Nb(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ud.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function xb(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function dl(t){let e={};for(let n in t)e[n]=t[n];return e}function ul(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let c=0;c<l.edgeCount;c++){let{type:d,next:u}=l.edge(c);if(d==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}class rn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=yi(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,c=0;for(;l<i.length&&c<s.marks.length;){let d=s.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(i[l][0])||d.type.spec.spanning===!1)break;l++,c++}for(;l<i.length;)o=i.pop()[1];for(;c<s.marks.length;){let d=s.marks[c++],u=this.serializeMark(d,s.isInline,n);u&&(i.push([d,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Wr(yi(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Wr(yi(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Wr(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=fl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return fl(e.marks)}}function fl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function yi(t){return t.document||window.document}const hl=new WeakMap;function Sb(t){let e=hl.get(t);return e===void 0&&hl.set(t,e=Tb(t)),e}function Tb(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Wr(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Sb(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,c=n?t.createElementNS(n,o):t.createElement(o),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?c.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):f=="style"&&c.style?c.style.cssText=d[f]:c.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=Wr(t,h,n,r);if(c.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const qd=65535,Kd=Math.pow(2,16);function Lb(t,e){return t+e*Kd}function pl(t){return t&qd}function Db(t){return(t-(t&qd))/Kd}const Zd=1,Yd=2,Fr=4,Xd=8;class _i{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Xd)>0}get deletedBefore(){return(this.delInfo&(Zd|Fr))>0}get deletedAfter(){return(this.delInfo&(Yd|Fr))>0}get deletedAcross(){return(this.delInfo&Fr)>0}}class Te{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Te.empty)return Te.empty}recover(e){let n=0,r=pl(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+Db(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?o:0);if(c>e)break;let d=this.ranges[l+i],u=this.ranges[l+s],f=c+d;if(e<=f){let h=d?e==c?-1:e==f?1:n:n,p=c+o+(h<0?0:u);if(r)return p;let m=e==(n<0?c:f)?null:Lb(l/3,e-c),A=e==c?Yd:e==f?Zd:Fr;return(n<0?e!=c:e!=f)&&(A|=Xd),new _i(p,A,m)}o+=u-d}return r?e+o:new _i(e+o,0,null)}touches(e,n){let r=0,o=pl(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let d=this.ranges[l+i],u=c+d;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),c=s+(this.inverted?0:i),d=this.ranges[o+n],u=this.ranges[o+r];e(l,l+d,c,c+u),i+=u-d}}invert(){return new Te(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Te.empty:new Te(e<0?[0,-e,0]:[0,0,e])}}Te.empty=new Te([]);class ar{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ar(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new ar;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],l=s.mapResult(e,n);if(l.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,e=this._maps[c].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new _i(e,o,null)}}const Ci=Object.create(null);class Ee{getMap(){return Te.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ci[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ci)throw new RangeError("Duplicate use of step JSON ID "+e);return Ci[e]=n,n.prototype.jsonID=e,n}}class de{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new de(e,null)}static fail(e){return new de(null,e)}static fromReplace(e,n,r,o){try{return de.ok(e.replace(n,r,o))}catch(i){if(i instanceof ro)return de.fail(i.message);throw i}}}function Ws(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Ws(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return w.fromArray(r)}class It extends Ee{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new T(Ws(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return de.fromReplace(e,this.from,this.to,i)}invert(){return new Ue(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new It(n.pos,r.pos,this.mark)}merge(e){return e instanceof It&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new It(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new It(n.from,n.to,e.markFromJSON(n.mark))}}Ee.jsonID("addMark",It);class Ue extends Ee{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new T(Ws(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return de.fromReplace(e,this.from,this.to,r)}invert(){return new It(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ue(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ue&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ue(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ue(n.from,n.to,e.markFromJSON(n.mark))}}Ee.jsonID("removeMark",Ue);class kt extends Ee{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new kt(this.pos,n.marks[o]);return new kt(this.pos,this.mark)}}return new Gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new kt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new kt(n.pos,e.markFromJSON(n.mark))}}Ee.jsonID("addNodeMark",kt);class Gt extends Ee{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new kt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Gt(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Gt(n.pos,e.markFromJSON(n.mark))}}Ee.jsonID("removeNodeMark",Gt);class fe extends Ee{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&es(e,this.from,this.to)?de.fail("Structure replace would overwrite content"):de.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Te([this.from,this.to-this.from,this.slice.size])}invert(e){return new fe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new fe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof fe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?T.empty:new T(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new fe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?T.empty:new T(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new fe(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new fe(n.from,n.to,T.fromJSON(e,n.slice),!!n.structure)}}Ee.jsonID("replace",fe);class pe extends Ee{constructor(e,n,r,o,i,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(es(e,this.from,this.gapFrom)||es(e,this.gapTo,this.to)))return de.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return de.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?de.fromReplace(e,this.from,this.to,r):de.fail("Content does not fit in gap")}getMap(){return new Te([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new pe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new pe(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new pe(n.from,n.to,n.gapFrom,n.gapTo,T.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ee.jsonID("replaceAround",pe);function es(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function Ob(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+c.nodeSize,n),m=r.addToSet(f);for(let A=0;A<f.length;A++)f[A].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[A])?s.to=p:o.push(s=new Ue(h,p,f[A])));l&&l.to==h?l.to=p:i.push(l=new It(h,p,r))}}),o.forEach(c=>t.step(c)),i.forEach(c=>t.step(c))}function Bb(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof Jo){let d=s.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let d=Math.min(l+s.nodeSize,n);for(let u=0;u<c.length;u++){let f=c[u],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=d,h.step=i):o.push({style:f,from:Math.max(l,e),to:d,step:i})}}}),o.forEach(s=>t.step(new Ue(s.from,s.to,s.style)))}function Fs(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],l=e+1;for(let c=0;c<i.childCount;c++){let d=i.child(c),u=l+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new fe(l,u,T.empty));else{r=f;for(let h=0;h<d.marks.length;h++)n.allowsMarkType(d.marks[h].type)||t.step(new Ue(l,u,d.marks[h]));if(o&&d.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new T(w.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new fe(l+h.index,l+h.index+h[0].length,m))}}l=u}if(!r.validEnd){let c=r.fillBefore(w.empty,!0);t.replace(l,l,new T(c,0,0))}for(let c=s.length-1;c>=0;c--)t.step(s[c])}function Rb(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Nn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),l=t.$from.index(r)+o,c=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(l,c,n))return r;if(r==0||s.type.spec.isolating||!Rb(s,l,c))break;l&&(o=1),c<s.childCount&&(i=1)}return null}function zb(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),c=s,d=l,u=w.empty,f=0;for(let m=i,A=!1;m>n;m--)A||r.index(m)>0?(A=!0,u=w.from(r.node(m).copy(u)),f++):c--;let h=w.empty,p=0;for(let m=i,A=!1;m>n;m--)A||o.after(m+1)<o.end(m)?(A=!0,h=w.from(o.node(m).copy(h)),p++):d++;t.step(new pe(c,d,s,l,new T(u.append(h),f,p),u.size-f,!0))}function Us(t,e,n=null,r=t){let o=Pb(t,e),i=o&&Vb(r,e);return i?o.map(ml).concat({type:e,attrs:n}).concat(i.map(ml)):null}function ml(t){return{type:t,attrs:null}}function Pb(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function Vb(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;c&&d<o;d++)c=c.matchType(n.child(d).type);return!c||!c.validEnd?null:s}function jb(t,e,n){let r=w.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new pe(o,i,o,i,new T(r,0,0),n.length,!0))}function Hb(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let c=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,c)&&Qb(t.doc,t.mapping.slice(i).map(l),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&Gd(t,s,l,i),Fs(t,t.mapping.slice(i).map(l,1),r,void 0,d===null);let u=t.mapping.slice(i),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return t.step(new pe(f,h,f+1,h-1,new T(w.from(r.create(c,null,s.marks)),0,0),1,!0)),d===!0&&Jd(t,s,l,i),!1}})}function Jd(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let c=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function Gd(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
16
|
-
`))}})}function Qb(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Wb(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new pe(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new T(w.from(s),0,0),1,!0))}function lt(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let d=o.depth-1,u=n-2;d>i;d--,u--){let f=o.node(d),h=o.index(d);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let A=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!A.type.validContent(p))return!1}let l=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(l,l,c?c.type:o.node(i+1).type)}function Fb(t,e,n=1,r){let o=t.doc.resolve(e),i=w.empty,s=w.empty;for(let l=o.depth,c=o.depth-n,d=n-1;l>c;l--,d--){i=w.from(o.node(l).copy(i));let u=r&&r[d];s=w.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}t.step(new fe(e,e,new T(i.append(s),n,n),!0))}function Dt(t,e){let n=t.resolve(e),r=n.index();return $d(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function Ub(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function $d(t,e){return!!(t&&e&&!t.isLeaf&&Ub(t,e))}function Go(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&$d(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function qb(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let u=s.whitespace=="pre",f=!!s.contentMatch.matchType(o);u&&!f?r=!1:!u&&f&&(r=!0)}let l=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);Gd(t,u.node(),u.before(),l)}s.inlineContent&&Fs(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let c=t.mapping.slice(l),d=c.map(e-n);if(t.step(new fe(d,c.map(e+n,-1),T.empty,!0)),r===!0){let u=t.doc.resolve(d);Jd(t,u.node(),u.before(),t.steps.length)}return t}function Kb(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function _d(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0),d=r.node(s),u=!1;if(i==1)u=d.canReplace(c,c,o);else{let f=d.contentMatchAt(c).findWrapping(o.firstChild.type);u=f&&d.canReplaceWith(c,c,f[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function $o(t,e,n=e,r=T.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return eu(o,i,r)?new fe(e,n,r):new Zb(o,i,r).fit()}function eu(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Zb{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=w.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=w.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let c=new T(i,s,l);return e>-1?new pe(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new fe(r.pos,o.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Ii(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:c,match:d}=this.frontier[l],u,f=null;if(n==1&&(s?d.matchType(s.type)||(f=d.fillBefore(w.from(s),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:f};if(n==2&&s&&(u=d.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:u};if(i&&d.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ii(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new T(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ii(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new T(jn(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new T(jn(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let A=0;A<i.length;A++)this.openFrontierNode(i[A]);let s=this.unplaced,l=r?r.content:s.content,c=s.openStart-e,d=0,u=[],{match:f,type:h}=this.frontier[n];if(o){for(let A=0;A<o.childCount;A++)u.push(o.child(A));f=f.matchFragment(o)}let p=l.size+e-(s.content.size-s.openEnd);for(;d<l.childCount;){let A=l.child(d),g=f.matchType(A.type);if(!g)break;d++,(d>1||c==0||A.content.size)&&(f=g,u.push(tu(A.mark(h.allowedMarks(A.marks)),d==1?c:0,d==l.childCount?p:-1)))}let m=d==l.childCount;m||(p=-1),this.placed=Hn(this.placed,n,w.from(u)),this.frontier[n].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let A=0,g=l;A<p;A++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=m?e==0?T.empty:new T(jn(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new T(jn(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!ki(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=ki(e,n,o,r,i);if(s){for(let l=n-1;l>=0;l--){let{match:c,type:d}=this.frontier[l],u=ki(e,l,d,c,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Hn(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Hn(this.placed,this.depth,w.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(w.empty,!0);n.childCount&&(this.placed=Hn(this.placed,this.frontier.length,n))}}function jn(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(jn(t.firstChild.content,e-1,n)))}function Hn(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Hn(t.lastChild.content,e-1,n)))}function Ii(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function tu(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,tu(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(w.empty,!0)))),t.copy(r)}function ki(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!Yb(n,i.content,s)?l:null}function Yb(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Xb(t){return t.spec.defining||t.spec.definingForContent}function Jb(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(eu(o,i,r))return t.step(new fe(e,n,r));let s=ru(o,i);s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let m=o.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let c=s.indexOf(l),d=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(d.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=d[h],m=Xb(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(l)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=d[p];if(m)for(let A=0;A<s.length;A++){let g=s[(A+c)%s.length],b=!0;g<0&&(b=!1,g=-g);let v=o.node(g-1),y=o.index(g-1);if(v.canReplaceWith(y,y,m.type,m.marks))return t.replace(o.before(g),b?i.after(g):n,new T(nu(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function nu(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(nu(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(w.empty,!0))}return t}function Gb(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=Kb(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new T(w.from(r),0,0))}function $b(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=ru(r,o);for(let s=0;s<i.length;s++){let l=i[s],c=s==i.length-1;if(c&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),o.end(l));if(l>0&&(c||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function ru(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class gn extends Ee{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(o),0,n.isLeaf?0:1))}getMap(){return Te.empty}invert(e){return new gn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gn(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new gn(n.pos,n.attr,n.value)}}Ee.jsonID("attr",gn);class lr extends Ee{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return de.ok(r)}getMap(){return Te.empty}invert(e){return new lr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new lr(n.attr,n.value)}}Ee.jsonID("docAttr",lr);let vn=class extends Error{};vn=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};vn.prototype=Object.create(Error.prototype);vn.prototype.constructor=vn;vn.prototype.name="TransformError";class qs{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ar}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new vn(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((i,s,l,c)=>{e=Math.min(e,l),n=Math.max(n,c)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=T.empty){let o=$o(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new T(w.from(r),0,0))}delete(e,n){return this.replace(e,n,T.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return Jb(this,e,n,r),this}replaceRangeWith(e,n,r){return Gb(this,e,n,r),this}deleteRange(e,n){return $b(this,e,n),this}lift(e,n){return zb(this,e,n),this}join(e,n=1){return qb(this,e,n),this}wrap(e,n){return jb(this,e,n),this}setBlockType(e,n=e,r,o=null){return Hb(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return Wb(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new gn(e,n,r)),this}setDocAttribute(e,n){return this.step(new lr(e,n)),this}addNodeMark(e,n){return this.step(new kt(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof J)n.isInSet(r.marks)&&this.step(new Gt(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new Gt(e,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(e,n=1,r){return Fb(this,e,n,r),this}addMark(e,n,r){return Ob(this,e,n,r),this}removeMark(e,n,r){return Bb(this,e,n,r),this}clearIncompatible(e,n,r){return Fs(this,e,n,r),this}}const Ei=Object.create(null);class j{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new ou(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=T.empty){let r=n.content.lastChild,o=null;for(let l=0;l<n.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:c,$to:d}=s[l],u=e.mapping.slice(i);e.replaceRange(u.map(c.pos),u.map(d.pos),l?T.empty:n),l==0&&bl(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],c=e.mapping.slice(r),d=c.map(s.pos),u=c.map(l.pos);i?e.deleteRange(d,u):(e.replaceRangeWith(d,u,n),bl(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new P(e):hn(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?hn(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):hn(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new De(e.node(0))}static atStart(e){return hn(e,e,0,0,1)||new De(e)}static atEnd(e){return hn(e,e,e.content.size,e.childCount,-1)||new De(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ei[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ei)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ei[e]=n,n.prototype.jsonID=e,n}getBookmark(){return P.between(this.$anchor,this.$head).getBookmark()}}j.prototype.visible=!0;class ou{constructor(e,n){this.$from=e,this.$to=n}}let Al=!1;function gl(t){!Al&&!t.parent.inlineContent&&(Al=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class P extends j{constructor(e,n=e){gl(e),gl(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return j.near(r);let o=e.resolve(n.map(this.anchor));return new P(o.parent.inlineContent?o:r,r)}replace(e,n=T.empty){if(super.replace(e,n),n==T.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof P&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new _o(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new P(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=j.findFrom(n,r,!0)||j.findFrom(n,-r,!0);if(i)n=i.$head;else return j.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(j.findFrom(e,-r,!0)||j.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new P(e,n)}}j.jsonID("text",P);class _o{constructor(e,n){this.anchor=e,this.head=n}map(e){return new _o(e.map(this.anchor),e.map(this.head))}resolve(e){return P.between(e.resolve(this.anchor),e.resolve(this.head))}}class R extends j{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?j.near(i):new R(i)}content(){return new T(w.from(this.node),0,0)}eq(e){return e instanceof R&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ks(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new R(e.resolve(n.anchor))}static create(e,n){return new R(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}R.prototype.visible=!1;j.jsonID("node",R);class Ks{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new _o(r,r):new Ks(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&R.isSelectable(r)?new R(n):j.near(n)}}class De extends j{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=T.empty){if(n==T.empty){e.delete(0,e.doc.content.size);let r=j.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new De(e)}map(e){return new De(e)}eq(e){return e instanceof De}getBookmark(){return _b}}j.jsonID("all",De);const _b={map(){return this},resolve(t){return new De(t)}};function hn(t,e,n,r,o,i=!1){if(e.inlineContent)return P.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&R.isSelectable(l))return R.create(t,n-(o<0?l.nodeSize:0))}else{let c=hn(t,l,n+o,o<0?l.childCount:0,o,i);if(c)return c}n+=l.nodeSize*o}return null}function bl(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof fe||o instanceof pe))return;let i=t.mapping.maps[r],s;i.forEach((l,c,d,u)=>{s==null&&(s=u)}),t.setSelection(j.near(t.doc.resolve(s),n))}const vl=1,xr=2,yl=4;class ev extends qs{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|vl)&~xr,this.storedMarks=null,this}get selectionSet(){return(this.updated&vl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=xr,this}ensureMarks(e){return J.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&xr)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~xr,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||J.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(j.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=yl,this}get scrolledIntoView(){return(this.updated&yl)>0}}function Cl(t,e){return!e||!t?t:t.bind(e)}class Qn{constructor(e,n,r){this.name=e,this.init=Cl(n.init,r),this.apply=Cl(n.apply,r)}}const tv=[new Qn("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Qn("selection",{init(t,e){return t.selection||j.atStart(e.doc)},apply(t){return t.selection}}),new Qn("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Qn("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Mi{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=tv.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Qn(r.key,r.spec.state,r))})}}class An{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let c=o?o[s].n:0,d=o?o[s].state:this,u=c<n.length&&l.spec.appendTransaction.call(l,c?n.slice(c):n,d,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new An(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new ev(this)}static create(e){let n=new Mi(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new An(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Mi(this.schema,e.plugins),r=n.fields,o=new An(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Mi(e.schema,e.plugins),i=new An(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Mt.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=j.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let c=r[l],d=c.spec.state;if(c.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=d.fromJSON.call(c,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function iu(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=iu(o,e,{})),n[r]=o}return n}class ne{constructor(e){this.spec=e,this.props={},e.props&&iu(e.props,this,this.props),this.key=e.key?e.key.key:su("plugin")}getState(e){return e[this.key]}}const wi=Object.create(null);function su(t){return t in wi?t+"$"+ ++wi[t]:(wi[t]=0,t+"$")}class ce{constructor(e="key"){this.key=su(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Zs=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function au(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const lu=(t,e,n)=>{let r=au(t,n);if(!r)return!1;let o=Ys(r);if(!o){let s=r.blockRange(),l=s&&Nn(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(gu(t,o,e,-1))return!0;if(r.parent.content.size==0&&(yn(i,"end")||R.isSelectable(i)))for(let s=r.depth;;s--){let l=$o(t.doc,r.before(s),r.after(s),T.empty);if(l&&l.slice.size<l.to-l.from){if(e){let c=t.tr.step(l);c.setSelection(yn(i,"end")?j.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):R.create(c.doc,o.pos-i.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},nv=(t,e,n)=>{let r=au(t,n);if(!r)return!1;let o=Ys(r);return o?cu(t,o,e):!1},rv=(t,e,n)=>{let r=uu(t,n);if(!r)return!1;let o=Xs(r);return o?cu(t,o,e):!1};function cu(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let s=e.nodeAfter,l=s,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let d=$o(t.doc,i,c,T.empty);if(!d||d.from!=i||d instanceof fe&&d.slice.size>=c-i)return!1;if(n){let u=t.tr.step(d);u.setSelection(P.create(u.doc,i)),n(u.scrollIntoView())}return!0}function yn(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const du=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Ys(r)}let s=i&&i.nodeBefore;return!s||!R.isSelectable(s)?!1:(e&&e(t.tr.setSelection(R.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Ys(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function uu(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const fu=(t,e,n)=>{let r=uu(t,n);if(!r)return!1;let o=Xs(r);if(!o)return!1;let i=o.nodeAfter;if(gu(t,o,e,1))return!0;if(r.parent.content.size==0&&(yn(i,"start")||R.isSelectable(i))){let s=$o(t.doc,r.before(),r.after(),T.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(yn(i,"start")?j.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):R.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},hu=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=Xs(r)}let s=i&&i.nodeAfter;return!s||!R.isSelectable(s)?!1:(e&&e(t.tr.setSelection(R.create(t.doc,i.pos)).scrollIntoView()),!0)};function Xs(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const ov=(t,e)=>{let n=t.selection,r=n instanceof R,o;if(r){if(n.node.isTextblock||!Dt(t.doc,n.from))return!1;o=n.from}else if(o=Go(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(R.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},iv=(t,e)=>{let n=t.selection,r;if(n instanceof R){if(n.node.isTextblock||!Dt(t.doc,n.to))return!1;r=n.to}else if(r=Go(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},sv=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Nn(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},pu=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
17
|
-
`).scrollIntoView()),!0)};function Js(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const av=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Js(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),c=t.tr.replaceWith(l,l,s.createAndFill());c.setSelection(j.near(c.doc.resolve(l),1)),e(c.scrollIntoView())}return!0},mu=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof De||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Js(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(P.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Au=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(lt(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Nn(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function lv(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof R&&e.selection.node.isBlock)return!r.parentOffset||!lt(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,c=!1,d=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){c=r.end(p)==r.pos+(r.depth-p),d=r.start(p)==r.pos-(r.depth-p),l=Js(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(c&&l?{type:l}:null),s=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof P||e.selection instanceof De)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=lt(u.doc,f,i.length,i);if(h||(i[0]=l?{type:l}:null,h=lt(u.doc,f,i.length,i)),!h)return!1;if(u.split(f,i.length,i),!c&&d&&r.node(s).type!=l){let p=u.mapping.map(r.before(s)),m=u.doc.resolve(p);l&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,l)&&u.setNodeMarkup(u.mapping.map(r.before(s)),l)}return n&&n(u.scrollIntoView()),!0}}const cv=lv(),dv=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(R.create(t.doc,o))),!0)};function uv(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Dt(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function gu(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,c=o.type.spec.isolating||i.type.spec.isolating;if(!c&&uv(t,e,n))return!0;let d=!c&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=w.empty;for(let b=s.length-1;b>=0;b--)m=w.from(s[b].create(null,m));m=w.from(o.copy(m));let A=t.tr.step(new pe(e.pos-1,p,e.pos,p,new T(m,1,0),s.length,!0)),g=A.doc.resolve(p+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Dt(A.doc,g.pos)&&A.join(g.pos),n(A.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&c?null:j.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Nn(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(d&&yn(i,"start",!0)&&yn(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let A=i,g=1;for(;!A.isTextblock;A=A.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,A.content)){if(n){let b=w.empty;for(let y=m.length-1;y>=0;y--)b=w.from(m[y].copy(b));let v=t.tr.step(new pe(e.pos-m.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new T(b,m.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function bu(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(P.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const fv=bu(-1),hv=bu(1);function pv(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Us(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Il(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(c,d)=>{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)o=!0;else{let u=n.doc.resolve(d),f=u.index();o=u.parent.canReplaceWith(f,f+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:c}}=n.selection.ranges[s];i.setBlockType(l,c,t,e)}r(i.scrollIntoView())}return!0}}function Gs(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}Gs(Zs,lu,du);Gs(Zs,fu,hu);Gs(pu,mu,Au,cv);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function mv(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let l=r?n.tr:null;return Av(l,s,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function Av(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let c=s.resolve(e.start-2);i=new io(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new io(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let l=Us(i,n,r,e);return l?(t&&gv(t,e,l,o,n),!0):!1}function gv(t,e,n,r,o){let i=w.empty;for(let u=n.length-1;u>=0;u--)i=w.from(n[u].type.create(n[u].attrs,i));t.step(new pe(e.start-(r?2:0),e.end,e.start,e.end,new T(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let l=n.length-s,c=e.start+n.length-(r?2:0),d=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&<(t.doc,c,l)&&(t.split(c,l),c+=2*l),c+=d.child(u).nodeSize;return t}function bv(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?vv(e,n,t,i):yv(e,n,i):!0:!1}}function vv(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new pe(i-1,s,i,s,new T(w.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new io(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=Nn(r);if(l==null)return!1;o.lift(r,l);let c=o.doc.resolve(o.mapping.map(i,-1)-1);return Dt(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),e(o.scrollIntoView()),!0}function yv(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,A=n.startIndex;m>A;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,c=n.endIndex==o.childCount,d=i.node(-1),u=i.index(-1);if(!d.canReplace(u+(l?0:1),u+1,s.content.append(c?w.empty:w.from(o))))return!1;let f=i.pos,h=f+s.nodeSize;return r.step(new pe(f-(l?1:0),h+(c?1:0),f+1,h-1,new T((l?w.empty:w.from(o.copy(w.empty))).append(c?w.empty:w.from(o.copy(w.empty))),l?0:1,c?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Cv(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,d=>d.childCount>0&&d.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,c=l.child(s-1);if(c.type!=t)return!1;if(n){let d=c.lastChild&&c.lastChild.type==l.type,u=w.from(d?t.create():null),f=new T(w.from(t.create(null,w.from(l.type.create(null,u)))),d?3:1,0),h=i.start,p=i.end;n(e.tr.step(new pe(h-(d?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}const be=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Cn=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ts=null;const st=function(t,e,n){let r=ts||(ts=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},Iv=function(){ts=null},$t=function(t,e,n,r){return n&&(kl(t,e,n,r,-1)||kl(t,e,n,r,1))},kv=/^(img|br|input|textarea|hr)$/i;function kl(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ve(t))){let s=t.parentNode;if(!s||s.nodeType!=1||yr(t)||kv.test(t.nodeName)||t.contentEditable=="false")return!1;e=be(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?Ve(t):0}else return!1}}function Ve(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Ev(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Ve(t)}else if(t.parentNode&&!yr(t))e=be(t),t=t.parentNode;else return null}}function Mv(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!yr(t))e=be(t)+1,t=t.parentNode;else return null}}function wv(t,e,n){for(let r=e==0,o=e==Ve(t);r||o;){if(t==n)return!0;let i=be(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==Ve(t)}}function yr(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const ei=function(t){return t.focusNode&&$t(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Pt(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function Nv(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function xv(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Ve(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Ve(r.startContainer),r.startOffset)}}}const $e=typeof navigator<"u"?navigator:null,El=typeof document<"u"?document:null,Ot=$e&&$e.userAgent||"",ns=/Edge\/(\d+)/.exec(Ot),vu=/MSIE \d/.exec(Ot),rs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ot),Se=!!(vu||rs||ns),Nt=vu?document.documentMode:rs?+rs[1]:ns?+ns[1]:0,je=!Se&&/gecko\/(\d+)/i.test(Ot);je&&+(/Firefox\/(\d+)/.exec(Ot)||[0,0])[1];const is=!Se&&/Chrome\/(\d+)/.exec(Ot),ye=!!is,yu=is?+is[1]:0,Ie=!Se&&!!$e&&/Apple Computer/.test($e.vendor),In=Ie&&(/Mobile\/\w+/.test(Ot)||!!$e&&$e.maxTouchPoints>2),Pe=In||($e?/Mac/.test($e.platform):!1),Cu=$e?/Win/.test($e.platform):!1,at=/Android \d/.test(Ot),Cr=!!El&&"webkitFontSmoothing"in El.documentElement.style,Sv=Cr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Tv(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function tt(t,e){return typeof t=="number"?t:t[e]}function Lv(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ml(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=Cn(s);continue}let l=s,c=l==i.body,d=c?Tv(i):Lv(l),u=0,f=0;if(e.top<d.top+tt(r,"top")?f=-(d.top-e.top+tt(o,"top")):e.bottom>d.bottom-tt(r,"bottom")&&(f=e.bottom-e.top>d.bottom-d.top?e.top+tt(o,"top")-d.top:e.bottom-d.bottom+tt(o,"bottom")),e.left<d.left+tt(r,"left")?u=-(d.left-e.left+tt(o,"left")):e.right>d.right-tt(r,"right")&&(u=e.right-d.right+tt(o,"right")),u||f)if(c)i.defaultView.scrollBy(u,f);else{let p=l.scrollLeft,m=l.scrollTop;f&&(l.scrollTop+=f),u&&(l.scrollLeft+=u);let A=l.scrollLeft-p,g=l.scrollTop-m;e={left:e.left-A,top:e.top-g,right:e.right-A,bottom:e.bottom-g}}let h=c?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:Cn(s)}}function Dv(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=t.root.elementFromPoint(i,s);if(!l||l==t.dom||!t.dom.contains(l))continue;let c=l.getBoundingClientRect();if(c.top>=n-20){r=l,o=c.top;break}}return{refDOM:r,refTop:o,stack:Iu(t.dom)}}function Iu(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Cn(r));return e}function Ov({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;ku(n,r==0?0:r-e)}function ku(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let un=null;function Bv(t){if(t.setActive)return t.setActive();if(un)return t.focus(un);let e=Iu(t);t.focus(un==null?{get preventScroll(){return un={preventScroll:!0},!0}}:void 0),un||(un=!1,ku(e,0))}function Eu(t,e){let n,r=2e8,o,i=0,s=e.top,l=e.top,c,d;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=st(u).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=l){s=Math.max(m.bottom,s),l=Math.min(m.top,l);let A=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(A<r){n=u,r=A,o=A&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&A&&(i=f+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!c&&m.left<=e.left&&m.right>=e.left&&(c=u,d={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=f+1)}}return!n&&c&&(n=c,o=d,r=0),n&&n.nodeType==3?Rv(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:Eu(n,o)}function Rv(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=mt(r,1);if(s.top!=s.bottom&&$s(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function $s(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function zv(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Pv(t,e,n){let{node:r,offset:o}=Eu(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function Vv(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0),c;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((c=l.dom.getBoundingClientRect()).width||c.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&c.left>r.left||c.top>r.top?o=l.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(o=l.posAfter),s=!0),!l.contentDOM&&o<0&&!l.node.isText))return(l.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function Mu(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let c=0;c<l.length;c++){let d=l[c];if($s(e,d))return Mu(s,e,d)}}if((i=(i+1)%r)==o)break}return t}function jv(t,e){let n=t.dom.ownerDocument,r,o=0,i=xv(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=t.dom.getBoundingClientRect();if(!$s(e,d)||(s=Mu(t.dom,e,d),!s))return null}if(Ie)for(let d=s;r&&d;d=Cn(d))d.draggable&&(r=void 0);if(s=zv(s,e),r){if(je&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let d;Cr&&o&&r.nodeType==1&&(d=r.childNodes[o-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=Vv(t,r,o,e))}l==null&&(l=Pv(t,s,e));let c=t.docView.nearestDesc(s,!0);return{pos:l,inside:c?c.posAtStart-c.border:-1}}function wl(t){return t.top<t.bottom||t.left<t.right}function mt(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(wl(r))return r}return Array.prototype.find.call(n,wl)||t.getBoundingClientRect()}const Hv=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function wu(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=Cr||je;if(r.nodeType==3)if(s&&(Hv.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=mt(st(r,o,o),n);if(je&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let d=mt(st(r,o-1,o-1),-1);if(d.top==c.top){let u=mt(st(r,o,o+1),-1);if(u.top!=c.top)return Rn(u,u.left<d.left)}}return c}else{let c=o,d=o,u=n<0?1:-1;return n<0&&!o?(d++,u=-1):n>=0&&o==r.nodeValue.length?(c--,u=1):n<0?c--:d++,Rn(mt(st(r,c,d),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Ve(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return Ni(c.getBoundingClientRect(),!1)}if(i==null&&o<Ve(r)){let c=r.childNodes[o];if(c.nodeType==1)return Ni(c.getBoundingClientRect(),!0)}return Ni(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==Ve(r))){let c=r.childNodes[o-1],d=c.nodeType==3?st(c,Ve(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(d)return Rn(mt(d,1),!1)}if(i==null&&o<Ve(r)){let c=r.childNodes[o];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let d=c?c.nodeType==3?st(c,0,s?0:1):c.nodeType==1?c:null:null;if(d)return Rn(mt(d,-1),!0)}return Rn(mt(r.nodeType==3?st(r):r,-n),n>=0)}function Rn(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Ni(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Nu(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function Qv(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return Nu(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=wu(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let c;if(l.nodeType==1)c=l.getClientRects();else if(l.nodeType==3)c=st(l,0,l.nodeValue.length).getClientRects();else continue;for(let d=0;d<c.length;d++){let u=c[d];if(u.bottom>u.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Wv=/[\u0590-\u08ac]/;function Fv(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return l?!Wv.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:Nu(t,e,()=>{let{focusNode:c,focusOffset:d,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:A}=t.domSelectionRange(),g=m&&!p.contains(m.nodeType==1?m:m.parentNode)||c==m&&d==A;try{l.collapse(u,f),c&&(c!=u||d!=f)&&l.extend&&l.extend(c,d)}catch{}return h!=null&&(l.caretBidiLevel=h),g}):r.pos==r.start()||r.pos==r.end()}let Nl=null,xl=null,Sl=!1;function Uv(t,e,n){return Nl==e&&xl==n?Sl:(Nl=e,xl=n,Sl=n=="up"||n=="down"?Qv(t,e,n):Fv(t,e,n))}const He=0,Tl=1,jt=2,_e=3;class Ir{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=He,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>be(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let l=o.children[s];if(l.size){o=l;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof Su){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof xu&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?be(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?be(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let c=this.children[l],d=s+c.size;if(o==-1&&e<=d){let u=s+c.border;if(e>=u&&n<=d-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,n,u);e=s;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=be(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(d>n||l==this.children.length-1)){n=d;for(let u=l+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=be(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let A=this.children[p],g=m+A.size;if(i>m&&s<g)return A.setSelection(e-m-A.border,n-m-A.border,r,o);m=g}let l=this.domFromPos(e,e?-1:1),c=n==e?l:this.domFromPos(n,n?-1:1),d=r.root.getSelection(),u=r.domSelectionRange(),f=!1;if((je||Ie)&&e==n){let{node:p,offset:m}=l;if(p.nodeType==3){if(f=!!(m&&p.nodeValue[m-1]==`
|
|
18
|
-
`),f&&m==p.nodeValue.length)for(let A=p,g;A;A=A.parentNode){if(g=A.nextSibling){g.nodeName=="BR"&&(l=c={node:g.parentNode,offset:be(g)+1});break}let b=A.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let A=p.childNodes[m-1];f=A&&(A.nodeName=="BR"||A.contentEditable=="false")}}if(je&&u.focusNode&&u.focusNode!=c.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||f&&Ie)&&$t(l.node,l.offset,u.anchorNode,u.anchorOffset)&&$t(c.node,c.offset,u.focusNode,u.focusOffset))return;let h=!1;if((d.extend||e==n)&&!(f&&je)){d.collapse(l.node,l.offset);try{e!=n&&d.extend(c.node,c.offset),h=!0}catch{}}if(!h){if(e>n){let m=l;l=c,c=m}let p=document.createRange();p.setEnd(c.node,c.offset),p.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,c=s-i.border;if(e>=l&&n<=c){this.dirty=e==r||n==s?jt:Tl,e==l&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=_e:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?jt:_e}r=s}this.dirty=jt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?jt:Tl;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class xu extends Ir{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==He&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class qv extends Ir{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class _t extends Ir{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=rn.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new _t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&_e||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=_e&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=He){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=He}}slice(e,n,r){let o=_t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=as(i,n,s,r)),e>0&&(i=as(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class xt extends Ir{constructor(e,n,r,o,i,s,l,c,d){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],c,d=l&&l(n,i,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,o),u=d&&d.dom,f=d&&d.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=rn.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Du(u,r,n),d?c=new Kv(e,n,r,o,u,f||null,h,d,i,s+1):n.isText?new ti(e,n,r,o,u,h,i):new xt(e,n,r,o,u,f||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>w.empty)}return e}matchesNode(e,n,r){return this.dirty==He&&e.eq(this.node)&&ao(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,c=new Yv(this,s&&s.node,e);Gv(this.node,this.innerDeco,(d,u,f)=>{d.spec.marks?c.syncToMarks(d.spec.marks,r,e,u):d.type.side>=0&&!f&&c.syncToMarks(u==this.node.childCount?J.none:this.node.child(u).marks,r,e,u),c.placeWidget(d,e,o)},(d,u,f,h)=>{c.syncToMarks(d.marks,r,e,h);let p;c.findNodeMatch(d,u,f,h)||l&&e.state.selection.from>o&&e.state.selection.to<o+d.nodeSize&&(p=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(d,u,f,p,e)||c.updateNextNode(d,u,f,e,h,o)||c.addNode(d,u,f,e,o),o+=d.nodeSize}),c.syncToMarks([],r,e,0),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==jt)&&(s&&this.protectLocalComposition(e,s),Tu(this.contentDOM,this.children,e),In&&$v(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof P)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=_v(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new qv(this,i,n,o);e.input.compositionNodes.push(s),this.children=as(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==_e||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=He}updateOuterDeco(e){if(ao(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Lu(this.dom,this.nodeDOM,ss(this.outerDeco,this.node,n),ss(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ll(t,e,n,r,o){Du(r,e,t);let i=new xt(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ti extends xt{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==_e||this.dirty!=He&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=He||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=He,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new ti(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=_e)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Su extends Ir{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==He&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Kv extends xt{constructor(e,n,r,o,i,s,l,c,d,u){super(e,n,r,o,i,s,l,d,u),this.spec=c}update(e,n,r,o){if(this.dirty==_e)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Tu(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=Dl(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(l,r);if(s instanceof _t){let c=r?r.previousSibling:t.lastChild;Tu(s.contentDOM,s.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=Dl(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Xn=function(t){t&&(this.nodeName=t)};Xn.prototype=Object.create(null);const Ht=[new Xn];function ss(t,e,n){if(t.length==0)return Ht;let r=n?Ht[0]:new Xn,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new Xn(s.nodeName));for(let l in s){let c=s[l];c!=null&&(n&&o.length==1&&o.push(r=new Xn(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+c:l=="style"?r.style=(r.style?r.style+";":"")+c:l!="nodeName"&&(r[l]=c))}}}return o}function Lu(t,e,n,r){if(n==Ht&&r==Ht)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],l=n[i];if(i){let c;l&&l.nodeName==s.nodeName&&o!=t&&(c=o.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(o),l=Ht[0]),o=c}Zv(o,l||Ht[0],s)}return o}function Zv(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function Du(t,e,n){return Lu(t,t,Ht,ss(e,n,t.nodeType!=1))}function ao(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Dl(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Yv{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Xv(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let i=0,s=this.stack.length>>1,l=Math.min(s,e.length);for(;i<l&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=He,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let c=-1,d=this.top.children.length;o<this.preMatch.index&&(d=Math.min(this.index+3,d));for(let u=this.index;u<d;u++){let f=this.top.children[u];if(f.matchesMark(e[s])&&!this.isLocked(f.dom)){c=u;break}}if(c>-1)c>this.index&&(this.changed=!0,this.destroyBetween(this.index,c)),this.top=this.top.children[this.index];else{let u=_t.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,c=Math.min(this.top.children.length,l+5);l<c;l++){let d=this.top.children[l];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==_e&&s.dom==s.contentDOM&&(s.dirty=jt),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let l=this.index;l<this.top.children.length;l++){let c=this.top.children[l];if(c instanceof xt){let d=this.preMatch.matched.get(c);if(d!=null&&d!=i)return!1;let u=c.dom,f,h=this.isLocked(u)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=_e&&ao(n,c.outerDeco));if(!h&&c.update(e,n,r,o))return this.destroyBetween(this.index,l),c.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(c,e,n,r,o,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=jt,f.updateChildren(o,s+1),f.dirty=He),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!ao(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let l=xt.create(this.top,n,r,o,i,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let c of l.children)c.parent=l}return e.destroy(),l}addNode(e,n,r,o,i){let s=xt.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new xu(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof _t;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof ti)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ie||ye)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Su(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Xv(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let d=n.children[r-1];if(d instanceof _t)n=d,r=d.children.length;else{l=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=l.node;if(c){if(c!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function Jv(t,e){return t.type.side-e.type.side}function Gv(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let d=0;d<t.childCount;d++){let u=t.child(d);r(u,o,e.forChild(i,u),d),i+=u.nodeSize}return}let s=0,l=[],c=null;for(let d=0;;){let u,f;for(;s<o.length&&o[s].to==i;){let g=o[s++];g.widget&&(u?(f||(f=[u])).push(g):u=g)}if(u)if(f){f.sort(Jv);for(let g=0;g<f.length;g++)n(f[g],d,!!c)}else n(u,d,!!c);let h,p;if(c)p=-1,h=c,c=null;else if(d<t.childCount)p=d,h=t.child(d++);else break;for(let g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let m=i+h.nodeSize;if(h.isText){let g=m;s<o.length&&o[s].from<g&&(g=o[s].from);for(let b=0;b<l.length;b++)l[b].to<g&&(g=l[b].to);g<m&&(c=h.cut(g-i),h=h.cut(0,g-i),m=g,p=-1)}else for(;s<o.length&&o[s].to<m;)s++;let A=h.isInline&&!h.isLeaf?l.filter(g=>!g.inline):l.slice();r(h,A,e.forChild(i,h),p),i=m}}function $v(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function _v(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let c=s.text;for(;o<t.childCount;){let d=t.child(o++);if(i+=d.nodeSize,!d.isText)break;c+=d.text}if(i>=n){if(i>=r&&c.slice(r-e.length-l,r-l)==e)return r-e.length;let d=l<r?c.lastIndexOf(e,r-l-1):-1;if(d>=0&&d+e.length+l>=n)return l+d;if(n==r&&c.length>=r+e.length-l&&c.slice(r-l,r-l+e.length)==e)return r}}return-1}function as(t,e,n,r,o){let i=[];for(let s=0,l=0;s<t.length;s++){let c=t[s],d=l,u=l+=c.size;d>=n||u<=e?i.push(c):(d<e&&i.push(c.slice(0,e-d,r)),o&&(i.push(o),o=void 0),u>n&&i.push(c.slice(n-d,c.size,r)))}return i}function _s(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),c,d;if(ei(n)){for(c=s;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&R.isSelectable(f)&&o.parent&&!(f.isInline&&wv(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;d=new R(s==h?l:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[c,s]=h==t.state.selection.anchor?[h,f]:[f,h],l=r.resolve(s)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!d){let f=e=="pointer"||t.state.selection.head<l.pos&&!i?1:-1;d=ea(t,u,l,f)}return d}function Ou(t){return t.editable?t.hasFocus():Ru(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ct(t,e=!1){let n=t.state.selection;if(Bu(t,n),!!Ou(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ye){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&$t(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)ty(t);else{let{anchor:r,head:o}=n,i,s;Ol&&!(n instanceof P)&&(n.$from.parent.inlineContent||(i=Bl(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Bl(t,n.to))),t.docView.setSelection(r,o,t,e),Ol&&(i&&Rl(i),s&&Rl(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ey(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Ol=Ie||ye&&yu<63;function Bl(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Ie&&o&&o.contentEditable=="false")return xi(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return xi(o);if(i)return xi(i)}}function xi(t){return t.contentEditable="true",Ie&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Rl(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function ey(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ou(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function ty(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,be(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Se&&Nt<=11&&(n.disabled=!0,n.disabled=!1)}function Bu(t,e){if(e instanceof R){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(zl(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else zl(t)}function zl(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ea(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||P.between(e,n,r)}function Pl(t){return t.editable&&!t.hasFocus()?!1:Ru(t)}function Ru(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function ny(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return $t(e.node,e.offset,n.anchorNode,n.anchorOffset)}function ls(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&j.findFrom(i,e)}function At(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Vl(t,e,n){let r=t.state.selection;if(r instanceof P)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return At(t,new P(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=ls(t.state,e);return o&&o instanceof R?At(t,o):!1}else if(!(Pe&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?R.isSelectable(i)?At(t,new R(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Cr?At(t,new P(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof R&&r.node.isInline)return At(t,new P(e>0?r.$to:r.$from));{let o=ls(t.state,e);return o?At(t,o):!1}}}function lo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Jn(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function fn(t,e){return e<0?ry(t):oy(t)}function ry(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(je&&n.nodeType==1&&r<lo(n)&&Jn(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Jn(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(zu(n))break;{let l=n.previousSibling;for(;l&&Jn(l,-1);)o=n.parentNode,i=be(l),l=l.previousSibling;if(l)n=l,r=lo(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?cs(t,n,r):o&&cs(t,o,i)}function oy(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=lo(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Jn(l,1))i=n,s=++r;else break}else{if(zu(n))break;{let l=n.nextSibling;for(;l&&Jn(l,1);)i=l.parentNode,s=be(l)+1,l=l.nextSibling;if(l)n=l,r=0,o=lo(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&cs(t,i,s)}function zu(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function iy(t,e){for(;t&&e==t.childNodes.length&&!yr(t);)e=be(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function sy(t,e){for(;t&&!e&&!yr(t);)e=be(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function cs(t,e,n){if(e.nodeType!=3){let i,s;(s=iy(e,n))?(e=s,n=0):(i=sy(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(ei(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&ct(t)},50)}function jl(t,e){let n=t.state.doc.resolve(e);if(!(ye||Cu)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Hl(t,e,n){let r=t.state.selection;if(r instanceof P&&!r.empty||n.indexOf("s")>-1||Pe&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=ls(t.state,e);if(s&&s instanceof R)return At(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof De?j.near(s,e):j.findFrom(s,e);return l?At(t,l):!1}return!1}function Ql(t,e){if(!(t.state.selection instanceof P))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function Wl(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function ay(t){if(!Ie||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Wl(t,r,"true"),setTimeout(()=>Wl(t,r,"false"),20)}return!1}function ly(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function cy(t,e){let n=e.keyCode,r=ly(e);if(n==8||Pe&&n==72&&r=="c")return Ql(t,-1)||fn(t,-1);if(n==46&&!e.shiftKey||Pe&&n==68&&r=="c")return Ql(t,1)||fn(t,1);if(n==13||n==27)return!0;if(n==37||Pe&&n==66&&r=="c"){let o=n==37?jl(t,t.state.selection.from)=="ltr"?-1:1:-1;return Vl(t,o,r)||fn(t,o)}else if(n==39||Pe&&n==70&&r=="c"){let o=n==39?jl(t,t.state.selection.from)=="ltr"?1:-1:1;return Vl(t,o,r)||fn(t,o)}else{if(n==38||Pe&&n==80&&r=="c")return Hl(t,-1,r)||fn(t,-1);if(n==40||Pe&&n==78&&r=="c")return ay(t)||Hl(t,1,r)||fn(t,1);if(r==(Pe?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function ta(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||rn.fromSchema(t.state.schema),l=Wu(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));let d=c.firstChild,u,f=0;for(;d&&d.nodeType==1&&(u=Qu[d.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=l.createElement(u[p]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),f++}d=c.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${o} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
12
|
+
*/const wm={escapeDeactivates:{type:Boolean,default:!0},returnFocusOnDeactivate:{type:Boolean,default:!0},allowOutsideClick:{type:[Boolean,Function],default:!0},clickOutsideDeactivates:[Boolean,Function],initialFocus:[String,Function,Boolean],fallbackFocus:[String,Function],checkCanFocusTrap:Function,checkCanReturnFocus:Function,delayInitialFocus:{type:Boolean,default:!0},document:Object,preventScroll:Boolean,setReturnFocus:[Object,String,Boolean,Function],tabbableOptions:Object},md=a.defineComponent({name:"FocusTrap",props:Object.assign({active:{type:Boolean,default:!0}},wm),emits:["update:active","activate","postActivate","deactivate","postDeactivate"],render(){return this.renderImpl()},setup(t,{slots:e,emit:n}){let r;const o=a.ref(null),i=a.computed(()=>{const l=o.value;return l&&(l instanceof HTMLElement?l:l.$el)});function s(){return r||(r=pd(i.value,{escapeDeactivates:t.escapeDeactivates,allowOutsideClick:t.allowOutsideClick,returnFocusOnDeactivate:t.returnFocusOnDeactivate,clickOutsideDeactivates:t.clickOutsideDeactivates,onActivate:()=>{n("update:active",!0),n("activate")},onDeactivate:()=>{n("update:active",!1),n("deactivate")},onPostActivate:()=>n("postActivate"),onPostDeactivate:()=>n("postDeactivate"),initialFocus:t.initialFocus,fallbackFocus:t.fallbackFocus,tabbableOptions:t.tabbableOptions,delayInitialFocus:t.delayInitialFocus,preventScroll:t.preventScroll}))}return a.onMounted(()=>{a.watch(()=>t.active,l=>{l&&i.value?s().activate():r&&(r.deactivate(),(!i.value||i.value.nodeType===Node.COMMENT_NODE)&&(r=null))},{immediate:!0,flush:"post"})}),a.onUnmounted(()=>{r&&r.deactivate(),r=null}),{activate(){s().activate()},deactivate(){r&&r.deactivate()},renderImpl(){if(!e.default)return null;const l=e.default().filter(d=>d.type!==a.Comment);return!l||!l.length||l.length>1?(console.error("[focus-trap-vue]: FocusTrap requires exactly one child."),l):a.cloneVNode(l[0],{ref:o})}}}}),Nm={key:0},xm={key:0,class:"av-drawer-backdrop"},Sm=["aria-label"],Tm={class:"av-drawer__content-wrapper av-col"},Lm={class:"av-drawer__content"},Dm={key:0,class:"footer-container av-p-md"},Om=a.defineComponent({__name:"AvDrawer",props:{show:{type:Boolean},position:{default:"right"},width:{default:"35rem"},backdrop:{type:Boolean,default:!0},padding:{default:"var(--spacing-md)"},ariaLabel:{default:"Menu latéral"}},emits:["escapePressed"],setup(t,{emit:e}){a.useCssVars(f=>({v019955c8:a.unref(s),v7fb8e5e7:a.unref(l)}));const n=t,r=e,o=a.useSlots(),{position:i,width:s,padding:l,show:c}=a.toRefs(n),d=a.ref(null),u=Xp(document.body);return a.watch(c,f=>{u.value=f}),(f,h)=>a.unref(c)?(a.openBlock(),a.createElementBlock("div",Nm,[t.backdrop?(a.openBlock(),a.createElementBlock("div",xm)):a.createCommentVNode("",!0),a.createVNode(a.unref(md),{onDeactivate:h[0]||(h[0]=p=>r("escapePressed"))},{default:a.withCtx(()=>[a.createElementVNode("div",{ref_key:"drawerRef",ref:d,class:a.normalizeClass(["av-drawer av-col",`av-drawer--${a.unref(i)}`]),role:"dialog","aria-modal":"true","aria-label":t.ariaLabel},[a.createElementVNode("div",Tm,[a.createElementVNode("div",Lm,[a.renderSlot(f.$slots,"default",{},void 0,!0)]),o.footer?(a.openBlock(),a.createElementBlock("div",Dm,[a.renderSlot(f.$slots,"footer",{},void 0,!0)])):a.createCommentVNode("",!0)])],10,Sm)]),_:3})])):a.createCommentVNode("",!0)}}),Ps=z(Om,[["__scopeId","data-v-435094ba"]]),Bm=["aria-label"],Rm={class:"av-btns-group"},Vs=a.defineComponent({__name:"AvHeaderMenuLinks",props:{links:{},navAriaLabel:{default:"Menu secondaire"}},emits:["linkClick"],setup(t,{emit:e}){const n=e;return(r,o)=>(a.openBlock(),a.createElementBlock("nav",{role:"navigation","aria-label":t.navAriaLabel},[a.createElementVNode("ul",Rm,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(i,s)=>(a.openBlock(),a.createElementBlock("li",{key:s},[a.createVNode(q,{icon:i.icon,label:i.label??"",onClick:l=>{var c;n("linkClick",l),(c=i.onClick)==null||c.call(i,l)}},null,8,["icon","label","onClick"])]))),128))])],8,Bm))}});function zm(t,e){const n=a.ref(!1),r=a.ref({top:0,left:0}),o=async()=>{if(n.value=!n.value,n.value&&t.value){await a.nextTick();const l=t.value.getBoundingClientRect(),c=l.bottom+window.scrollY+4;let d=l.left+window.scrollX;if(e.value){const u=e.value.getBoundingClientRect(),f=window.innerWidth;d+u.width>f&&(d=f-u.width-16,d<0&&(d=16))}r.value={top:c/16,left:d/16}}},i=()=>{n.value=!1},s=l=>{const c=l.target,d=!t.value||!t.value.contains(c),u=!e.value||!e.value.contains(c);d&&u&&i()};return a.onMounted(()=>{document.addEventListener("click",s)}),a.onUnmounted(()=>{document.removeEventListener("click",s)}),{showPopover:n,popoverPosition:r,togglePopover:o,closePopover:i}}const Ad={sm:576,md:768,lg:1024,xl:1440};function js(){const t=Kp(Ad),e=t.smaller("sm"),n=t.smaller("md"),r=t.smaller("lg"),o=t.smaller("xl"),i=t.greater("md"),s=t.greater("lg"),l=n,c=a.computed(()=>i.value&&r.value),d=s,u=t.active();return{isMobile:l,isTablet:c,isDesktop:d,isBelowSm:e,isBelowMd:n,isBelowLg:r,isBelowXl:o,isAboveMd:i,isAboveLg:s,currentBreakpoint:u}}function Ko(){const t=a.ref(),e=a.ref(!1),n=a.ref(!1),r=()=>{if(!t.value)return;t.value.style.setProperty("--collapser","none");const s=t.value.offsetHeight;t.value.style.setProperty("--collapse",`${-s}px`),t.value.style.setProperty("--collapser","")};return{collapse:t,collapsing:e,cssExpanded:n,doExpand:s=>{t.value&&(s===!0&&t.value.style.setProperty("--collapse-max-height","none"),window.requestAnimationFrame(()=>{e.value=!0,r(),window.requestAnimationFrame(()=>{n.value=s})}))},adjust:r,onTransitionEnd:(s,l=!0)=>{var c,d;e.value=!1,l&&((d=(c=t.value)==null?void 0:c.querySelector("a"))==null||d.focus()),t.value&&s===!1&&t.value.style.removeProperty("--collapse-max-height")}}}function gd(t,e){let n=null;function r(){!t.value||!t.value.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')||(n=pd(t.value,{escapeDeactivates:!0,onDeactivate:e,returnFocusOnDeactivate:!0,clickOutsideDeactivates:!0}),n.activate())}function o(){n==null||n.deactivate(),n=null}return{initializeFocusTrap:r,cleanupFocusTrap:o}}function Pm(t){a.onMounted(()=>{document.documentElement.style.setProperty("--global-background-color",t)}),a.onUnmounted(()=>{document.documentElement.style.setProperty("--global-background-color","var(--default-global-background-color)")})}const Vm={class:"av-popover-wrapper av-row"},jm=a.defineComponent({__name:"AvPopover",props:{width:{default:"fit-content"},padding:{default:"var(--spacing-md)"}},setup(t,{expose:e}){a.useCssVars(f=>({v382ef208:f.width,v0be91fc7:f.padding}));const n=a.ref(null),r=a.ref(null),{showPopover:o,popoverPosition:i,togglePopover:s,closePopover:l}=zm(n,r),{initializeFocusTrap:c,cleanupFocusTrap:d}=gd(r,l);function u(f){if(!f){n.value=null;return}if(f instanceof HTMLElement){n.value=f;return}const h=f.$el;h instanceof HTMLElement?n.value=h:n.value=null}return e({setTriggerRef:u,triggerRef:n}),a.watch(o,async f=>{f?(await a.nextTick(),c()):d()}),a.onBeforeUnmount(()=>{d()}),(f,h)=>(a.openBlock(),a.createElementBlock("div",Vm,[a.createElementVNode("div",{ref:u,class:"av-popover-trigger-wrapper av-row av-flex-fill"},[a.renderSlot(f.$slots,"trigger",{toggle:a.unref(s)},void 0,!0)]),(a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[a.unref(o)?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"popoverRef",ref:r,role:"dialog","aria-modal":"false",tabindex:"-1",class:"av-popover av-radius-lg",style:a.normalizeStyle(`top: ${a.unref(i).top}rem; left: ${a.unref(i).left}rem;`),onKeydown:h[0]||(h[0]=a.withKeys(a.withModifiers((...p)=>a.unref(l)&&a.unref(l)(...p),["prevent"]),["esc"]))},[a.renderSlot(f.$slots,"popover",{close:a.unref(l)},void 0,!0)],36)):a.createCommentVNode("",!0)]))]))}}),Zo=z(jm,[["__scopeId","data-v-b54eb288"]]),Hm={class:"av-dropdown av-col"},Qm=a.defineComponent({__name:"AvDropdown",props:{items:{},triggerAriaLabel:{},triggerActive:{type:Boolean,default:!1},triggerIcon:{default:()=>D.DOTS_VERTICAL},triggerLabel:{},triggerVariant:{default:"OUTLINED"},triggerSmall:{type:Boolean,default:!0},triggerNoSentenceCase:{type:Boolean,default:!1},width:{default:"15rem"},padding:{default:"var(--spacing-xs)"},itemSmall:{type:Boolean,default:!0},itemTheme:{default:"SECONDARY"},itemIconScale:{default:1.3}},emits:["itemSelected"],setup(t,{emit:e}){const n=e;function r(o,i){n("itemSelected",o),i()}return(o,i)=>(a.openBlock(),a.createBlock(Zo,{width:t.width,padding:t.padding},{trigger:a.withCtx(({toggle:s})=>[a.createVNode(q,{icon:t.triggerIcon,label:t.triggerLabel||t.triggerAriaLabel,"aria-label":t.triggerAriaLabel,variant:t.triggerVariant,small:t.triggerSmall,"no-sentence-case":t.triggerNoSentenceCase,"icon-only":!t.triggerLabel,active:t.triggerActive,onClick:s},null,8,["icon","label","aria-label","variant","small","no-sentence-case","icon-only","active","onClick"])]),popover:a.withCtx(({close:s})=>[a.createElementVNode("div",Hm,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,l=>(a.openBlock(),a.createBlock(q,{key:l.name,class:"av-dropdown__menu-item",icon:l.icon,label:l.label,"aria-label":l.label,small:t.itemSmall,theme:t.itemTheme,"icon-scale":t.itemIconScale,disabled:l.disabled,"icon-only":l.iconOnly,"data-testid":l.name,"no-radius":"",onClick:c=>r(l.name,s)},null,8,["icon","label","aria-label","small","theme","icon-scale","disabled","icon-only","data-testid","onClick"]))),128))])]),_:1},8,["width","padding"]))}}),Hs=z(Qm,[["__scopeId","data-v-39a8769d"]]),Wm={role:"navigation",class:"av-translate av-nav"},Qs=a.defineComponent({__name:"AvLanguageSelector",props:{id:{},languages:{},currentLanguage:{default:"fr"},title:{default:"Sélectionner une langue"}},emits:["select"],setup(t,{emit:e}){const n=e,{isBelowLg:r}=js(),o=a.computed(()=>t.id??`language-selector-${crypto.randomUUID()}`),i=a.computed(()=>t.languages.find(({codeIso:d})=>d===t.currentLanguage)),s=a.computed(()=>{var f,h;const d=((f=i.value)==null?void 0:f.codeIso.toUpperCase())??"",u=`${d} - ${(h=i.value)==null?void 0:h.label}`;return r.value?u:d}),l=a.computed(()=>t.languages.map(d=>({name:d.codeIso,label:`${d.codeIso.toUpperCase()} - ${d.label}`})));function c(d){const u=t.languages.find(f=>f.codeIso===d);u&&n("select",u)}return(d,u)=>{const f=Hs;return a.openBlock(),a.createElementBlock("nav",Wm,[a.createVNode(f,{id:a.unref(o),items:a.unref(l),title:t.title,"trigger-aria-label":a.unref(s),"trigger-label":a.unref(s),"trigger-icon":a.unref(D).TRANSLATE,"trigger-small":"",width:"max-content","trigger-no-sentence-case":"",onItemSelected:c},null,8,["id","items","title","trigger-aria-label","trigger-label","trigger-icon"])])}}}),Fm={class:"av-accordion"},Um=["id","aria-expanded","aria-controls"],qm={class:"title-container av-row av-gap-sm"},Km={class:"n6"},Zm=["id","aria-labelledby"],Ym={class:"accordion-content-container av-pt-sm"},Xm=a.defineComponent({__name:"AvAccordion",props:{id:{},title:{},icon:{},headingLevel:{default:"h3"},overflowVisible:{type:Boolean,default:!1}},setup(t){a.useCssVars(b=>({v5e9e749e:a.unref(g)}));const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o,onTransitionEnd:i}=Ko(),s=t.id??`accordion-${crypto.randomUUID()}`,l=a.computed(()=>`${s}-panel`),c=a.ref(),d=a.ref(null),u=a.inject(Zc.registerAccordionKey),{isActive:f,expand:h,onKeydown:p,setTriggerRef:m}=(u==null?void 0:u(a.toRef(()=>t.title)))??{isActive:c,expand:()=>c.value=!c.value,onKeydown:void 0,setTriggerRef:void 0},A=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));a.onMounted(()=>{m==null||m(d.value),f.value&&o(!0)});const g=a.computed(()=>t.overflowVisible?"visible":"hidden");return a.watch(f,(b,v)=>{b!==v&&o(b)}),(b,v)=>{const y=le;return a.openBlock(),a.createElementBlock("section",Fm,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(t.headingLevel),{class:"av-accordion__header"},{default:a.withCtx(()=>[a.createElementVNode("button",{id:a.unref(s),ref_key:"triggerRef",ref:d,type:"button","aria-expanded":a.unref(f),"aria-controls":a.unref(l),class:"av-accordion__trigger av-row av-align-center av-p-sm av-w-full",style:a.normalizeStyle(a.unref(A)),onClick:v[0]||(v[0]=(...C)=>a.unref(h)&&a.unref(h)(...C)),onKeydown:v[1]||(v[1]=(...C)=>a.unref(p)&&a.unref(p)(...C))},[a.createElementVNode("div",qm,[t.icon?(a.openBlock(),a.createBlock(y,{key:0,size:2,name:t.icon,color:"var(--icon)"},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",Km,a.toDisplayString(t.title),1)])],44,Um)]),_:1})),a.createElementVNode("div",{id:a.unref(l),ref_key:"collapse",ref:e,role:"region","aria-labelledby":a.unref(s),class:a.normalizeClass(["av-accordion__panel av-collapse av-my-none--md av--mx-xxs--md av-px-sm--md",{"av-collapse--expanded av-py-md":a.unref(r),"av-collapsing":a.unref(n)}]),onTransitionend:v[2]||(v[2]=C=>a.unref(i)(a.unref(f),!1))},[a.createElementVNode("div",Ym,[a.renderSlot(b.$slots,"default",{},void 0,!0)])],42,Zm)])}}}),Jm=z(Xm,[["__scopeId","data-v-1fab3f4d"]]),Gm={class:"av-accordions-group",role:"group","aria-label":"Accordion group"},$m=a.defineComponent({__name:"AvAccordionsGroup",props:{activeAccordion:{}},emits:["update:activeAccordion"],setup(t,{emit:e}){const n=e,r=a.ref(t.activeAccordion??-1),o=a.computed({get:()=>r.value,set(f){r.value=f,n("update:activeAccordion",f)}}),i=a.ref(new Map),s=a.ref(0),l=a.ref([]);function c(f,h){l.value[h]=f}function d(f){var h;(h=l.value[f])==null||h.focus()}function u(f,h){const p=l.value.length;if(!p)return;const m=(f+h+p)%p;d(m)}return a.provide(Zc.registerAccordionKey,f=>{const h=s.value++;i.value.set(h,f.value);const p=a.computed(()=>h===o.value);a.watch(f,()=>{i.value.set(h,f.value)});function m(){if(o.value===h){o.value=-1;return}o.value=h}function A(b){switch(b.key){case"ArrowDown":b.preventDefault(),u(h,1);break;case"ArrowUp":b.preventDefault(),u(h,-1);break;case"Home":b.preventDefault(),d(0);break;case"End":b.preventDefault(),d(l.value.length-1);break}}function g(b){b&&c(b,h)}return a.onUnmounted(()=>{i.value.delete(h)}),{isActive:p,expand:m,onKeydown:A,setTriggerRef:g}}),(f,h)=>(a.openBlock(),a.createElementBlock("div",Gm,[a.renderSlot(f.$slots,"default")]))}}),_m=["title","aria-label"],eA={class:"av-rich-button__line av-row av-align-center av-w-full"},tA={class:"av-rich-button__left av-row av-align-center av-w-full av-gap-sm av-pr-sm"},nA=a.defineComponent({__name:"AvRichButton",props:{label:{},iconLeft:{default:()=>{}},iconRight:{default:()=>{}},customPadding:{default:"var(--spacing-sm)"}},emits:["click"],setup(t){return a.useCssVars(e=>({v2deb83d4:e.customPadding})),(e,n)=>(a.openBlock(),a.createElementBlock("button",{title:t.label,"aria-label":t.label,class:"av-rich-button av-row av-w-full av-align-center av-justify-between",onClick:n[0]||(n[0]=r=>e.$emit("click",r))},[a.createElementVNode("div",eA,[a.createElementVNode("div",tA,[t.iconLeft?(a.openBlock(),a.createBlock(le,{key:0,name:t.iconLeft,color:"var(--dark-background-primary1)",size:1.5},null,8,["name"])):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"default",{},void 0,!0)]),t.iconRight?(a.openBlock(),a.createBlock(le,{key:0,name:t.iconRight,color:"var(--dark-background-primary1)",size:1.5},null,8,["name"])):a.createCommentVNode("",!0)])],8,_m))}}),rA=z(nA,[["__scopeId","data-v-ff4425d7"]]),oA=["id","name","value","checked","required","data-testid","data-test","tabindex","aria-describedby"],iA=["for"],sA={class:"label-container av-row av-gap-xs av-align-center"},aA={key:0,class:"av-hint-text"},lA=a.defineComponent({inheritAttrs:!1,__name:"AvCheckbox",props:a.mergeModels({id:{},icon:{},name:{},required:{type:Boolean,default:!1},value:{type:[String,Number,Boolean]},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},label:{},errorMessage:{},validMessage:{},hint:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.computed(()=>t.id??`checkbox-${crypto.randomUUID()}`),n=a.computed(()=>t.errorMessage||t.validMessage),r=a.computed(()=>n.value?`message-${e.value}`:void 0),o=a.useModel(t,"modelValue"),i=a.computed(()=>o.value.includes(t.value)),s=a.computed(()=>i.value?D.CHECKBOX_MARKED:D.CHECKBOX_BLANK_OUTLINE),l=a.computed(()=>i.value?"var(--dark-background-primary1)":"var(--icon)"),c=a.computed(()=>t.small?1:1.5),d=a.computed(()=>t.small?i.value?"caption-bold":"caption-regular":i.value?"b2-bold":"b2-regular");return(u,f)=>{const h=le,p=wn,m=Bs;return a.openBlock(),a.createBlock(m,{inline:t.inline,disabled:t.disabled},{default:a.withCtx(()=>[a.withDirectives(a.createElementVNode("input",a.mergeProps({id:a.unref(e),"onUpdate:modelValue":f[0]||(f[0]=A=>o.value=A),name:t.name,class:"av-sr-only",type:"checkbox",value:t.value,checked:a.unref(i),required:t.required},u.$attrs,{"data-testid":`input-checkbox-${a.unref(e)}`,"data-test":`input-checkbox-${a.unref(e)}`,tabindex:t.disabled?-1:void 0,"aria-describedby":a.unref(r)}),null,16,oA),[[a.vModelCheckbox,o.value]]),a.createElementVNode("label",{for:a.unref(e),class:"av-label av-pb-none"},[a.createElementVNode("div",sA,[a.createVNode(h,{class:"option-checkbox",name:a.unref(s),color:a.unref(l),size:a.unref(c)},null,8,["name","color","size"]),t.icon?(a.openBlock(),a.createBlock(h,{key:0,class:"option-icon",name:t.icon,color:a.unref(l),size:a.unref(c)},null,8,["name","color","size"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(["label",a.unref(d)])},[a.renderSlot(u.$slots,"label",{},()=>[a.createTextVNode(a.toDisplayString(t.label),1)],!0)],2),t.required?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["required",a.unref(d)])}," *",2)):a.createCommentVNode("",!0)]),t.hint?(a.openBlock(),a.createElementBlock("span",aA,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],8,iA),a.createVNode(p,{"message-id":a.unref(r),type:t.errorMessage?"error":"success",message:a.unref(n)},null,8,["message-id","type","message"])]),_:3},8,["inline","disabled"])}}}),bd=z(lA,[["__scopeId","data-v-8150e911"]]),cA=a.defineComponent({__name:"AvCheckboxesGroup",props:{id:{},legend:{default:""},legendId:{default:""},errorMessage:{default:""},successMessage:{default:""},hint:{default:""},inline:{type:Boolean,default:!1}},setup(t){const e=a.computed(()=>t.id??`checkboxes-group-${crypto.randomUUID()}`);return(n,r)=>{const o=Os;return a.openBlock(),a.createBlock(o,{id:a.unref(e),legend:t.legend,"legend-id":t.legendId,hint:t.hint,"error-message":t.errorMessage,"success-message":t.successMessage,inline:t.inline,"aria-live":"polite"},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["av-checkboxes-group av-gap-sm",{"av-checkboxes-group--inline av-row av-row-wrap":t.inline,"av-col":!t.inline}])},[a.renderSlot(n.$slots,"default")],2)]),_:3},8,["id","legend","legend-id","hint","error-message","success-message","inline"])}}}),dA={class:"av-row av-align-center av-gap-xs"},uA={class:"left-content-container av-row av-align-center av-justify-center av-radius-md"},fA={class:"content-container av-col"},hA={key:0},pA={class:"b2-bold"},mA={key:1,class:"av-col av-gap-xxs"},AA={class:"b2-regular"},gA={class:"caption-light"},bA={key:0,class:"av-px-xs"},vA=["id","aria-describedby","disabled","aria-disabled","accept"],yA={class:"caption-light"},CA=a.defineComponent({inheritAttrs:!1,__name:"AvFileUpload",props:{id:{},ariaLabel:{default:""},accept:{default:()=>{}},error:{default:""},validMessage:{default:""},disabled:{type:Boolean,default:!1},modelValue:{default:null},maxWidth:{default:"none"},title:{},description:{},deleteButtonLabel:{default:"Remove"},fileName:{},onDeleteFile:{type:Function},enableMultiple:{type:Boolean,default:!1}},emits:["update:modelValue","update:validMessage","update:error","change","acceptTypeError"],setup(t,{emit:e}){a.useCssVars(m=>({v25f2c89c:m.maxWidth}));const n=e,r=t.id??`file-upload-${crypto.randomUUID()}`,o=a.computed(()=>Array.isArray(t.accept)?t.accept.join(","):t.accept),i=a.ref(!1);function s(m){const A=o.value;return A?A.split(",").map(b=>b.trim().toLowerCase()).some(b=>b.startsWith(".")?m.name.toLowerCase().endsWith(b):b.includes("/")?m.type===b||m.type.startsWith(`${b.split("/")[0]}/`):!1):!0}async function l(m){var g,b;if(m.preventDefault(),i.value=!1,t.disabled||!((b=(g=m.dataTransfer)==null?void 0:g.files)!=null&&b.length))return;const A=Array.from(m.dataTransfer.files).filter(s);await a.nextTick(),A.length?(n("change",A),n("update:modelValue",A[0]??null)):n("acceptTypeError")}function c(m){m.preventDefault(),t.disabled||(i.value=!0)}function d(){i.value=!1}function u(m){const A=m.target.files;if(A!=null&&A.length&&!Array.from(A).filter(s).length){n("acceptTypeError");return}n("change",A),n("update:modelValue",(A==null?void 0:A[0])??null)}const f=a.computed(()=>t.fileName||t.modelValue&&!t.enableMultiple),h=a.computed(()=>({for:r,class:["av-upload-group",{"av-upload-group--error":t.error,"av-upload-group--valid":t.validMessage,"av-upload-group--disabled":t.disabled,"drag-over":i.value}],"aria-label":t.ariaLabel,onDragover:c,onDragleave:d,onDrop:l}));function p(m){var A;m?(n("update:modelValue",null),n("update:validMessage",null),n("update:error",null),n("change",[])):(A=t.onDeleteFile)==null||A.call(t)}return(m,A)=>{const g=wn;return a.openBlock(),a.createElementBlock(a.Fragment,null,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)?"div":"label"),a.mergeProps(a.unref(f)?{}:a.unref(h),{class:a.unref(f)?"file-preview-container av-radius-lg av-p-xs":""}),{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(a.unref(f)?"":"file-upload-container av-radius-lg av-p-xs")},[a.createElementVNode("div",dA,[a.createElementVNode("div",uA,[a.renderSlot(m.$slots,"left",{},()=>[a.createVNode(le,{size:2.5,name:a.unref(D).ATTACHMENT_PLUS,color:"var(--icon)"},null,8,["name"])],!0)]),a.createElementVNode("div",fA,[a.unref(f)?(a.openBlock(),a.createElementBlock("div",hA,[a.createElementVNode("span",pA,a.toDisplayString(t.fileName||t.modelValue.name),1)])):(a.openBlock(),a.createElementBlock("div",mA,[a.createElementVNode("span",AA,a.toDisplayString(t.title),1),a.createElementVNode("span",gA,a.toDisplayString(t.description),1)])),a.createVNode(g,{type:t.error?"error":"success",message:t.error?t.error:t.validMessage},null,8,["type","message"])]),t.disabled?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("div",bA,[a.unref(f)?(a.openBlock(),a.createBlock(q,{key:0,label:t.deleteButtonLabel,theme:"SECONDARY",onClick:A[0]||(A[0]=()=>p(t.modelValue))},null,8,["label"])):(a.openBlock(),a.createBlock(le,{key:1,size:1.5,name:a.unref(D).TRAY_UPLOAD,color:"var(--dark-background-primary1)"},null,8,["name"]))])),a.unref(f)?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("input",a.mergeProps({key:1,id:a.unref(r),class:"av-upload",type:"file","aria-describedby":t.error||t.validMessage?`${a.unref(r)}-desc`:void 0},m.$attrs,{disabled:t.disabled,"aria-disabled":t.disabled,accept:a.unref(o),onChange:A[1]||(A[1]=b=>u(b))}),null,16,vA))])],2)]),_:3},16,["class"])),a.createElementVNode("span",yA,[a.renderSlot(m.$slots,"hint",{},void 0,!0)])],64)}}}),IA=z(CA,[["__scopeId","data-v-e5c14747"]]),vd=6048e5,kA=864e5,yd=6e4,Cd=36e5,Xa=Symbol.for("constructDateFrom");function Oe(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Xa in t?t[Xa](e):t instanceof Date?new t.constructor(e):new Date(e)}function Me(t,e){return Oe(e||t,t)}let EA={};function Yo(){return EA}function or(t,e){var l,c,d,u;const n=Yo(),r=(e==null?void 0:e.weekStartsOn)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,o=Me(t,e==null?void 0:e.in),i=o.getDay(),s=(i<r?7:0)+i-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function eo(t,e){return or(t,{...e,weekStartsOn:1})}function Id(t,e){const n=Me(t,e==null?void 0:e.in),r=n.getFullYear(),o=Oe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const i=eo(o),s=Oe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const l=eo(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=l.getTime()?r:r-1}function Ja(t){const e=Me(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function MA(t,...e){const n=Oe.bind(null,e.find(r=>typeof r=="object"));return e.map(n)}function Ga(t,e){const n=Me(t,e==null?void 0:e.in);return n.setHours(0,0,0,0),n}function wA(t,e,n){const[r,o]=MA(n==null?void 0:n.in,t,e),i=Ga(r),s=Ga(o),l=+i-Ja(i),c=+s-Ja(s);return Math.round((l-c)/kA)}function NA(t,e){const n=Id(t,e),r=Oe(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),eo(r)}function xA(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const i=Me(o,r);(!n||n<i||isNaN(+i))&&(n=i)}),Oe(r,n||NaN)}function SA(t,e){let n,r=e==null?void 0:e.in;return t.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const i=Me(o,r);(!n||n>i||isNaN(+i))&&(n=i)}),Oe(r,n||NaN)}function TA(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Xo(t){return!(!TA(t)&&typeof t!="number"||isNaN(+Me(t)))}function LA(t,e){const n=Me(t,e==null?void 0:e.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const DA={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},OA=(t,e,n)=>{let r;const o=DA[t];return typeof o=="string"?r=o:e===1?r=o.one:r=o.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function gi(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const BA={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},RA={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zA={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},PA={date:gi({formats:BA,defaultWidth:"full"}),time:gi({formats:RA,defaultWidth:"full"}),dateTime:gi({formats:zA,defaultWidth:"full"})},VA={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},jA=(t,e,n,r)=>VA[t];function Dn(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&t.formattingValues){const s=t.defaultFormattingWidth||t.defaultWidth,l=n!=null&&n.width?String(n.width):s;o=t.formattingValues[l]||t.formattingValues[s]}else{const s=t.defaultWidth,l=n!=null&&n.width?String(n.width):t.defaultWidth;o=t.values[l]||t.values[s]}const i=t.argumentCallback?t.argumentCallback(e):e;return o[i]}}const HA={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},QA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},WA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},FA={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},UA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qA={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},KA=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ZA={ordinalNumber:KA,era:Dn({values:HA,defaultWidth:"wide"}),quarter:Dn({values:QA,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Dn({values:WA,defaultWidth:"wide"}),day:Dn({values:FA,defaultWidth:"wide"}),dayPeriod:Dn({values:UA,defaultWidth:"wide",formattingValues:qA,defaultFormattingWidth:"wide"})};function On(t){return(e,n={})=>{const r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(o);if(!i)return null;const s=i[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?XA(l,f=>f.test(s)):YA(l,f=>f.test(s));let d;d=t.valueCallback?t.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const u=e.slice(s.length);return{value:d,rest:u}}}function YA(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function XA(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function JA(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const o=r[0],i=e.match(t.parsePattern);if(!i)return null;let s=t.valueCallback?t.valueCallback(i[0]):i[0];s=n.valueCallback?n.valueCallback(s):s;const l=e.slice(o.length);return{value:s,rest:l}}}const GA=/^(\d+)(th|st|nd|rd)?/i,$A=/\d+/i,_A={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},eg={any:[/^b/i,/^(a|c)/i]},tg={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ng={any:[/1/i,/2/i,/3/i,/4/i]},rg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},og={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ig={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},sg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ag={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},lg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},cg={ordinalNumber:JA({matchPattern:GA,parsePattern:$A,valueCallback:t=>parseInt(t,10)}),era:On({matchPatterns:_A,defaultMatchWidth:"wide",parsePatterns:eg,defaultParseWidth:"any"}),quarter:On({matchPatterns:tg,defaultMatchWidth:"wide",parsePatterns:ng,defaultParseWidth:"any",valueCallback:t=>t+1}),month:On({matchPatterns:rg,defaultMatchWidth:"wide",parsePatterns:og,defaultParseWidth:"any"}),day:On({matchPatterns:ig,defaultMatchWidth:"wide",parsePatterns:sg,defaultParseWidth:"any"}),dayPeriod:On({matchPatterns:ag,defaultMatchWidth:"any",parsePatterns:lg,defaultParseWidth:"any"})},dg={code:"en-US",formatDistance:OA,formatLong:PA,formatRelative:jA,localize:ZA,match:cg,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ug(t,e){const n=Me(t,e==null?void 0:e.in);return wA(n,LA(n))+1}function fg(t,e){const n=Me(t,e==null?void 0:e.in),r=+eo(n)-+NA(n);return Math.round(r/vd)+1}function kd(t,e){var u,f,h,p;const n=Me(t,e==null?void 0:e.in),r=n.getFullYear(),o=Yo(),i=(e==null?void 0:e.firstWeekContainsDate)??((f=(u=e==null?void 0:e.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,s=Oe((e==null?void 0:e.in)||t,0);s.setFullYear(r+1,0,i),s.setHours(0,0,0,0);const l=or(s,e),c=Oe((e==null?void 0:e.in)||t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const d=or(c,e);return+n>=+l?r+1:+n>=+d?r:r-1}function hg(t,e){var l,c,d,u;const n=Yo(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(l=e==null?void 0:e.locale)==null?void 0:l.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(d=n.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,o=kd(t,e),i=Oe((e==null?void 0:e.in)||t,0);return i.setFullYear(o,0,r),i.setHours(0,0,0,0),or(i,e)}function pg(t,e){const n=Me(t,e==null?void 0:e.in),r=+or(n,e)-+hg(n,e);return Math.round(r/vd)+1}function X(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const ht={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return X(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):X(n+1,2)},d(t,e){return X(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return X(t.getHours()%12||12,e.length)},H(t,e){return X(t.getHours(),e.length)},m(t,e){return X(t.getMinutes(),e.length)},s(t,e){return X(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return X(o,e.length)}},dn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},$a={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return ht.y(t,e)},Y:function(t,e,n,r){const o=kd(t,r),i=o>0?o:1-o;if(e==="YY"){const s=i%100;return X(s,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):X(i,e.length)},R:function(t,e){const n=Id(t);return X(n,e.length)},u:function(t,e){const n=t.getFullYear();return X(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return X(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return X(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return ht.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return X(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const o=pg(t,r);return e==="wo"?n.ordinalNumber(o,{unit:"week"}):X(o,e.length)},I:function(t,e,n){const r=fg(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):X(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):ht.d(t,e)},D:function(t,e,n){const r=ug(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):X(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return X(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const o=t.getDay(),i=(o-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return X(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),o=r===0?7:r;switch(e){case"i":return String(o);case"ii":return X(o,e.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const o=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let o;switch(r===12?o=dn.noon:r===0?o=dn.midnight:o=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let o;switch(r>=17?o=dn.evening:r>=12?o=dn.afternoon:r>=4?o=dn.morning:o=dn.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return ht.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):ht.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):ht.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):ht.s(t,e)},S:function(t,e){return ht.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return el(r);case"XXXX":case"XX":return Rt(r);case"XXXXX":case"XXX":default:return Rt(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return el(r);case"xxxx":case"xx":return Rt(r);case"xxxxx":case"xxx":default:return Rt(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+_a(r,":");case"OOOO":default:return"GMT"+Rt(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+_a(r,":");case"zzzz":default:return"GMT"+Rt(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return X(r,e.length)},T:function(t,e,n){return X(+t,e.length)}};function _a(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=Math.trunc(r/60),i=r%60;return i===0?n+String(o):n+String(o)+e+X(i,2)}function el(t,e){return t%60===0?(t>0?"-":"+")+X(Math.abs(t)/60,2):Rt(t,e)}function Rt(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),o=X(Math.trunc(r/60),2),i=X(r%60,2);return n+o+e+i}const tl=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},Ed=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},mg=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return tl(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",tl(r,e)).replace("{{time}}",Ed(o,e))},Ag={p:Ed,P:mg},gg=/^D+$/,bg=/^Y+$/,vg=["D","DD","YY","YYYY"];function yg(t){return gg.test(t)}function Cg(t){return bg.test(t)}function Ig(t,e,n){const r=kg(t,e,n);if(console.warn(r),vg.includes(t))throw new RangeError(r)}function kg(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Eg=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mg=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wg=/^'([^]*?)'?$/,Ng=/''/g,xg=/[a-zA-Z]/;function Ze(t,e,n){var u,f,h,p;const r=Yo(),o=r.locale??dg,i=r.firstWeekContainsDate??((f=(u=r.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=r.weekStartsOn??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.weekStartsOn)??0,l=Me(t,n==null?void 0:n.in);if(!Xo(l))throw new RangeError("Invalid time value");let c=e.match(Mg).map(m=>{const A=m[0];if(A==="p"||A==="P"){const g=Ag[A];return g(m,o.formatLong)}return m}).join("").match(Eg).map(m=>{if(m==="''")return{isToken:!1,value:"'"};const A=m[0];if(A==="'")return{isToken:!1,value:Sg(m)};if($a[A])return{isToken:!0,value:m};if(A.match(xg))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return{isToken:!1,value:m}});o.localize.preprocessor&&(c=o.localize.preprocessor(l,c));const d={firstWeekContainsDate:i,weekStartsOn:s,locale:o};return c.map(m=>{if(!m.isToken)return m.value;const A=m.value;(Cg(A)||yg(A))&&Ig(A,e,String(t));const g=$a[A[0]];return g(l,A,o.localize,d)}).join("")}function Sg(t){const e=t.match(wg);return e?e[1].replace(Ng,"'"):t}function Md(t,e){const n=()=>Oe(e==null?void 0:e.in,NaN),o=Og(t);let i;if(o.date){const d=Bg(o.date,2);i=Rg(d.restDateString,d.year)}if(!i||isNaN(+i))return n();const s=+i;let l=0,c;if(o.time&&(l=zg(o.time),isNaN(l)))return n();if(o.timezone){if(c=Pg(o.timezone),isNaN(c))return n()}else{const d=new Date(s+l),u=Me(0,e==null?void 0:e.in);return u.setFullYear(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()),u.setHours(d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),d.getUTCMilliseconds()),u}return Me(s+l+c,e==null?void 0:e.in)}const Mr={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},Tg=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,Lg=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,Dg=/^([+-])(\d{2})(?::?(\d{2}))?$/;function Og(t){const e={},n=t.split(Mr.dateTimeDelimiter);let r;if(n.length>2)return e;if(/:/.test(n[0])?r=n[0]:(e.date=n[0],r=n[1],Mr.timeZoneDelimiter.test(e.date)&&(e.date=t.split(Mr.timeZoneDelimiter)[0],r=t.substr(e.date.length,t.length))),r){const o=Mr.timezone.exec(r);o?(e.time=r.replace(o[1],""),e.timezone=o[1]):e.time=r}return e}function Bg(t,e){const n=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+e)+"})|(\\d{2}|[+-]\\d{"+(2+e)+"})$)"),r=t.match(n);if(!r)return{year:NaN,restDateString:""};const o=r[1]?parseInt(r[1]):null,i=r[2]?parseInt(r[2]):null;return{year:i===null?o:i*100,restDateString:t.slice((r[1]||r[2]).length)}}function Rg(t,e){if(e===null)return new Date(NaN);const n=t.match(Tg);if(!n)return new Date(NaN);const r=!!n[4],o=Bn(n[1]),i=Bn(n[2])-1,s=Bn(n[3]),l=Bn(n[4]),c=Bn(n[5])-1;if(r)return Wg(e,l,c)?Vg(e,l,c):new Date(NaN);{const d=new Date(0);return!Hg(e,i,s)||!Qg(e,o)?new Date(NaN):(d.setUTCFullYear(e,i,Math.max(o,s)),d)}}function Bn(t){return t?parseInt(t):1}function zg(t){const e=t.match(Lg);if(!e)return NaN;const n=bi(e[1]),r=bi(e[2]),o=bi(e[3]);return Fg(n,r,o)?n*Cd+r*yd+o*1e3:NaN}function bi(t){return t&&parseFloat(t.replace(",","."))||0}function Pg(t){if(t==="Z")return 0;const e=t.match(Dg);if(!e)return 0;const n=e[1]==="+"?-1:1,r=parseInt(e[2]),o=e[3]&&parseInt(e[3])||0;return Ug(r,o)?n*(r*Cd+o*yd):NaN}function Vg(t,e,n){const r=new Date(0);r.setUTCFullYear(t,0,4);const o=r.getUTCDay()||7,i=(e-1)*7+n+1-o;return r.setUTCDate(r.getUTCDate()+i),r}const jg=[31,null,31,30,31,30,31,31,30,31,30,31];function wd(t){return t%400===0||t%4===0&&t%100!==0}function Hg(t,e,n){return e>=0&&e<=11&&n>=1&&n<=(jg[e]||(wd(t)?29:28))}function Qg(t,e){return e>=1&&e<=(wd(t)?366:365)}function Wg(t,e,n){return e>=1&&e<=53&&n>=0&&n<=6}function Fg(t,e,n){return t===24?e===0&&n===0:n>=0&&n<60&&e>=0&&e<60&&t>=0&&t<25}function Ug(t,e){return e>=0&&e<=59}const qg=["date","datetime-local","month","time","week"],Kg={date:"yyyy-MM-dd","datetime-local":"yyyy-MM-dd'T'HH:mm",month:"yyyy-MM",time:"HH:mm",week:"yyyy-'W'II"};function to(t){return!!t&&qg.includes(t)}function nl(t,e){if(!(!e||!Xo(e)||!to(t)))return Ze(e,Kg[t])}function Zg(t,e,n){if(!e||!to(t)||typeof e!="string")return"";const r=Md(e);if(!Xo(r))return"";if(n)try{if(t==="week"){const o=Ze(r,n),i=Ze(new Date(r.getTime()+8640*60*1e3),n);return`${o} - ${i}`}return Ze(r,n)}catch{console.warn(`[formatDisplayedDate] Invalid format string: ${n}. Falling back to default format for type "${t}".`)}switch(t){case"date":return Ze(r,"dd/MM/yyyy");case"datetime-local":return Ze(r,"dd/MM/yyyy hh:mm");case"month":return Ze(r,"MM/yyyy");case"time":return Ze(r,"p");case"week":{const o=Ze(r,"dd/MM/yyyy"),i=Ze(new Date(r.getTime()+8640*60*1e3),"dd/MM/yyyy");return`${o} - ${i}`}}}function Yg(t){switch(t){case"date":return"dd/mm/yyyy";case"datetime-local":return"dd/mm/yyyy --:--";case"month":return"mm/yyyy";case"time":return"--:--";case"week":return"dd/mm/yyyy - dd/mm/yyyy";default:return""}}function Xg(t){switch(t){case"date":return D.CALENDAR_BLANK_OUTLINE;case"datetime-local":return D.CALENDAR_TIME;case"month":return D.CALENDAR_MONTH_OUTLINE;case"week":return D.CALENDAR_WEEK_OUTLINE;case"time":return D.CLOCK_OUTLINE;default:return}}const Jg={class:"av-input__wrapper av-col av-gap-xxs"},Gg={class:"av-input__control"},$g={key:0,class:"av-input__prefix av-align-center av-col"},_g=["for"],eb={key:0,"aria-hidden":"true",class:"required"},tb={key:1,class:"av-input__date-wrapper"},nb={key:3,class:"av-align-center av-col av-input__suffix"},rb={key:0,class:"caption-light"},ob={key:0,class:"av-hint-text"},ib=a.defineComponent({inheritAttrs:!1,__name:"AvInput",props:{id:{},descriptionId:{},hint:{default:""},isValid:{type:Boolean,default:!1},isTextarea:{type:Boolean,default:!1},labelVisible:{type:Boolean,default:!0},label:{default:""},labelClass:{default:"b2-light"},modelValue:{default:""},placeholder:{},type:{default:"text"},minDate:{},maxDate:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{},minlength:{},errorMessage:{},validMessage:{},prefixIcon:{},textareaMinHeight:{default:"var(--dimension-5xl)"},width:{},noRadius:{type:Boolean,default:!1},formatDateStr:{}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){a.useCssVars(b=>({f16c69c2:b.width,v3814c9aa:a.unref(p),v48823050:b.textareaMinHeight}));const r=n,o=a.useAttrs(),i=t.id??`input-${crypto.randomUUID()}`,s=a.computed(()=>t.errorMessage?Array.isArray(t.errorMessage)?t.errorMessage:[t.errorMessage]:[]),l=a.computed(()=>t.validMessage?Array.isArray(t.validMessage)?t.validMessage:[t.validMessage]:[]),c=a.computed(()=>!!t.errorMessage),d=a.ref(null),u=()=>{var b;return(b=d.value)==null?void 0:b.focus()},f=a.computed(()=>t.isTextarea?"textarea":"input"),h=a.computed(()=>["av-label",{invisible:!t.labelVisible}]),p=a.computed(()=>t.labelVisible&&t.label?"69%":"60%"),m=a.computed(()=>({"av-input__input av-col av-align-center av-w-full b2-light av-py-xs av-px-sm":!0,"av-input__input--error":c.value,"av-input__input--valid":t.isValid,"av-pt-xs av-align-start":t.isTextarea,"av-radius-none":t.noRadius,"av-radius-lg":!t.noRadius})),A=a.computed(()=>({...o,disabled:t.disabled,maxlength:t.maxlength,minlength:t.minlength,required:t.required,type:t.type,placeholder:t.disabled?"":t.placeholder,max:nl(t.type,t.maxDate),min:nl(t.type,t.minDate),ariaDescribedBy:t.descriptionId||void 0})),g=a.computed(()=>to(t.type)?Xg(t.type):t.prefixIcon);return e({focus:u}),(b,v)=>{const y=wn;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-input av-col av-gap-xxs",{"av-input--date":t.type==="date","av-input--no-radius":t.noRadius}])},[a.createElementVNode("div",Jg,[a.createElementVNode("div",Gg,[a.unref(g)?(a.openBlock(),a.createElementBlock("div",$g,[a.createVNode(le,{name:a.unref(g),size:1.2},null,8,["name"])])):a.createCommentVNode("",!0),a.createElementVNode("label",{class:a.normalizeClass(a.unref(h)),for:a.unref(i)},[a.createElementVNode("span",{class:a.normalizeClass(t.labelClass)},[a.createTextVNode(a.toDisplayString(t.label)+" ",1),a.renderSlot(b.$slots,"requiredTip",{},()=>[t.required?(a.openBlock(),a.createElementBlock("span",eb,"*")):a.createCommentVNode("",!0)],!0)],2)],10,_g),a.unref(to)(t.type)?(a.openBlock(),a.createElementBlock("div",tb,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps(a.unref(A),{id:a.unref(i),ref_key:"__input",ref:d,class:["av-input__input--date-real",[a.unref(m)]],value:t.modelValue,onInput:v[0]||(v[0]=C=>r("update:modelValue",C.target.value)),onChange:v[1]||(v[1]=C=>r("update:modelValue",C.target.value))}),null,16,["id","class","value"])),(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps(a.unref(A),{id:`${a.unref(i)}-picker`,class:["av-input__input--date-picker",[a.unref(m)]],placeholder:t.disabled?"":a.unref(Yg)(t.type),type:"text",readonly:"","aria-hidden":"true",tabindex:"-1",value:a.unref(Zg)(t.type,t.modelValue,t.formatDateStr),onMousedown:v[2]||(v[2]=a.withModifiers(()=>{},["prevent"])),onTouchstart:v[3]||(v[3]=a.withModifiers(()=>{},["prevent"]))}),null,16,["id","class","placeholder","value"]))])):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(f)),a.mergeProps({key:2},a.unref(A),{id:a.unref(i),ref_key:"__input",ref:d,class:a.unref(m),value:t.modelValue,onInput:v[4]||(v[4]=C=>r("update:modelValue",C.target.value))}),null,16,["id","class","value"])),b.$slots.suffix?(a.openBlock(),a.createElementBlock("div",nb,[a.renderSlot(b.$slots,"suffix",{},void 0,!0)])):a.createCommentVNode("",!0)]),t.disabled?a.createCommentVNode("",!0):a.renderSlot(b.$slots,"maxLengthCaption",{key:0,currentValue:t.modelValue,maxlength:t.maxlength},()=>{var C;return[t.maxlength?(a.openBlock(),a.createElementBlock("span",rb,a.toDisplayString((C=t.modelValue)==null?void 0:C.toString().length)+" / "+a.toDisplayString(t.maxlength),1)):a.createCommentVNode("",!0)]},!0)]),t.hint?(a.openBlock(),a.createElementBlock("span",ob,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0),a.unref(s).length>0?(a.openBlock(),a.createBlock(y,{key:1,message:a.unref(s),type:"error"},null,8,["message"])):a.createCommentVNode("",!0),a.unref(l).length>0?(a.openBlock(),a.createBlock(y,{key:2,message:a.unref(l),type:"success"},null,8,["message"])):a.createCommentVNode("",!0)],2)}}}),Ge=z(ib,[["__scopeId","data-v-2d7389df"]]),sb=["for"],ab=a.defineComponent({__name:"AvPeriodInput",props:{id:{},labelClass:{default:"b2-light"},startModelValue:{default:""},endModelValue:{default:""},width:{},startMinDate:{},startMaxDate:{},endMinDate:{},endMaxDate:{},stacked:{type:Boolean,default:!1},separatorSpacing:{default:"var(--spacing-sm)"},endDateDisabled:{type:Boolean,default:!1},startDateDisabled:{type:Boolean,default:!1},type:{default:"date"},labelVisible:{type:Boolean,default:!0},startErrorMessage:{},endErrorMessage:{},showEachInputLabel:{type:Boolean,default:!1},startLabel:{},endLabel:{},label:{}},emits:["update:startModelValue","update:endModelValue","change"],setup(t,{emit:e}){a.useCssVars(v=>({c7edf41e:v.separatorSpacing}));const n=e,r=a.computed(()=>t.id??`period-input-${crypto.randomUUID()}`),o=a.computed(()=>`${r.value}__start`),i=a.computed(()=>`${r.value}__end`);function s(v){if(!v)return;const y=Md(v);return Xo(y)?y:void 0}function l(v,y){return v&&y?xA([v,y]):v??y}function c(v,y){return v&&y?SA([v,y]):v??y}const d=a.computed(()=>s(t.startModelValue)),u=a.computed(()=>s(t.endModelValue)),f=a.computed(()=>t.startMinDate),h=a.computed(()=>c(t.startMaxDate,u.value)),p=a.computed(()=>l(t.endMinDate,d.value)),m=a.computed(()=>t.endMaxDate),A=a.computed(()=>["av-label",{"av-sr-only":!t.labelVisible},t.labelClass]);function g(v){const y=(v==null?void 0:v.toString())??"";n("update:startModelValue",y),n("change",{start:y,end:t.endModelValue})}function b(v){const y=(v==null?void 0:v.toString())??"";n("update:endModelValue",y),n("change",{start:t.startModelValue,end:y})}return(v,y)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-period-input av-col av-gap-xxs",{"av-period-input--stacked":t.stacked}])},[t.showEachInputLabel?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("label",{key:0,class:a.normalizeClass(a.unref(A)),for:a.unref(o),"data-testid":"common-label"},a.toDisplayString(t.label),11,sb)),a.createElementVNode("div",{class:a.normalizeClass(["av-period-input__row",{"av-row av-align-start":!t.stacked,"av-col av-align-stretch":t.stacked}])},[a.createVNode(Ge,{id:a.unref(o),type:t.type,"model-value":t.startModelValue,label:t.startLabel,"aria-label":t.startLabel,"label-visible":t.showEachInputLabel,disabled:t.startDateDisabled,width:t.width,"min-date":a.unref(f),"max-date":a.unref(h),"error-message":t.startErrorMessage,"data-testid":"start-date-input","onUpdate:modelValue":y[0]||(y[0]=C=>g(C))},null,8,["id","type","model-value","label","aria-label","label-visible","disabled","width","min-date","max-date","error-message"]),a.createVNode(Ge,{id:a.unref(i),type:t.type,"model-value":t.endModelValue,label:t.endLabel,"aria-label":t.endLabel,"label-visible":t.showEachInputLabel,disabled:t.endDateDisabled,width:t.width,"min-date":a.unref(p),"max-date":a.unref(m),"error-message":t.endErrorMessage,"data-testid":"end-date-input","onUpdate:modelValue":y[1]||(y[1]=C=>b(C))},null,8,["id","type","model-value","label","aria-label","label-visible","disabled","width","min-date","max-date","error-message"])],2)],2))}}),lb=z(ab,[["__scopeId","data-v-d5e737a7"]]);function ge(t){this.content=t}ge.prototype={constructor:ge,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var r=n&&n!=t?this.remove(n):this,o=r.find(t),i=r.content.slice();return o==-1?i.push(n||t,e):(i[o+1]=e,n&&(i[o]=n)),new ge(i)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ge(n)},addToStart:function(t,e){return new ge([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ge(n)},addBefore:function(t,e,n){var r=this.remove(e),o=r.content.slice(),i=r.find(t);return o.splice(i==-1?o.length:i,0,e,n),new ge(o)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=ge.from(t),t.size?new ge(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=ge.from(t),t.size?new ge(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=ge.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};ge.from=function(t){if(t instanceof ge)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ge(e)};function Nd(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let o=t.child(r),i=e.child(r);if(o==i){n+=o.nodeSize;continue}if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let s=0;o.text[s]==i.text[s];s++)n++;return n}if(o.content.size||i.content.size){let s=Nd(o.content,i.content,n+1);if(s!=null)return s}n+=o.nodeSize}}function xd(t,e,n,r){for(let o=t.childCount,i=e.childCount;;){if(o==0||i==0)return o==i?null:{a:n,b:r};let s=t.child(--o),l=e.child(--i),c=s.nodeSize;if(s==l){n-=c,r-=c;continue}if(!s.sameMarkup(l))return{a:n,b:r};if(s.isText&&s.text!=l.text){let d=0,u=Math.min(s.text.length,l.text.length);for(;d<u&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,n--,r--;return{a:n,b:r}}if(s.content.size||l.content.size){let d=xd(s.content,l.content,n-1,r-1);if(d)return d}n-=c,r-=c}}class w{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,o=0,i){for(let s=0,l=0;l<n;s++){let c=this.content[s],d=l+c.nodeSize;if(d>e&&r(c,o+l,i||null,s)!==!1&&c.content.size){let u=l+1;c.nodesBetween(Math.max(0,e-u),Math.min(c.content.size,n-u),r,o+u)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,o){let i="",s=!0;return this.nodesBetween(e,n,(l,c)=>{let d=l.isText?l.text.slice(Math.max(e,c)-c,n-c):l.isLeaf?o?typeof o=="function"?o(l):o:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&r&&(s?s=!1:i+=r),i+=d},0),i}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,o=this.content.slice(),i=0;for(n.isText&&n.sameMarkup(r)&&(o[o.length-1]=n.withText(n.text+r.text),i=1);i<e.content.length;i++)o.push(e.content[i]);return new w(o,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],o=0;if(n>e)for(let i=0,s=0;s<n;i++){let l=this.content[i],c=s+l.nodeSize;c>e&&((s<e||c>n)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,n-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,n-s-1))),r.push(l),o+=l.nodeSize),s=c}return new w(r,o)}cutByIndex(e,n){return e==n?w.empty:e==0&&n==this.content.length?this:new w(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let o=this.content.slice(),i=this.size+n.nodeSize-r.nodeSize;return o[e]=n,new w(o,i)}addToStart(e){return new w([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new w(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))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 n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let o=this.content[n];e(o,r,n),r+=o.nodeSize}}findDiffStart(e,n=0){return Nd(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return xd(this,e,n,r)}findIndex(e){if(e==0)return wr(0,e);if(e==this.size)return wr(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=this.child(n),i=r+o.nodeSize;if(i>=e)return i==e?wr(n+1,i):wr(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return w.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new w(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return w.empty;let n,r=0;for(let o=0;o<e.length;o++){let i=e[o];r+=i.nodeSize,o&&i.isText&&e[o-1].sameMarkup(i)?(n||(n=e.slice(0,o)),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new w(n||e,r)}static from(e){if(!e)return w.empty;if(e instanceof w)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new w([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}w.empty=new w([],0);const vi={index:0,offset:0};function wr(t,e){return vi.index=t,vi.offset=e,vi}function no(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!no(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!no(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}let J=class Xi{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let o=0;o<e.length;o++){let i=e[o];if(this.eq(i))return e;if(this.type.excludes(i.type))n||(n=e.slice(0,o));else{if(i.type.excludes(this.type))return e;!r&&i.type.rank>this.type.rank&&(n||(n=e.slice(0,o)),n.push(this),r=!0),n&&n.push(i)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&no(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let o=r.create(n.attrs);return r.checkAttrs(o.attrs),o}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Xi.none;if(e instanceof Xi)return[e];let n=e.slice();return n.sort((r,o)=>r.type.rank-o.type.rank),n}};J.none=[];class ro extends Error{}class T{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=Td(this.content,e+this.openStart,n);return r&&new T(r,this.openStart,this.openEnd)}removeBetween(e,n){return new T(Sd(this.content,e+this.openStart,n+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,n){if(!n)return T.empty;let r=n.openStart||0,o=n.openEnd||0;if(typeof r!="number"||typeof o!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new T(w.fromJSON(e,n.content),r,o)}static maxOpen(e,n=!0){let r=0,o=0;for(let i=e.firstChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.firstChild)r++;for(let i=e.lastChild;i&&!i.isLeaf&&(n||!i.type.spec.isolating);i=i.lastChild)o++;return new T(e,r,o)}}T.empty=new T(w.empty,0,0);function Sd(t,e,n){let{index:r,offset:o}=t.findIndex(e),i=t.maybeChild(r),{index:s,offset:l}=t.findIndex(n);if(o==e||i.isText){if(l!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,i.copy(Sd(i.content,e-o-1,n-o-1)))}function Td(t,e,n,r){let{index:o,offset:i}=t.findIndex(e),s=t.maybeChild(o);if(i==e||s.isText)return r&&!r.canReplace(o,o,n)?null:t.cut(0,e).append(n).append(t.cut(e));let l=Td(s.content,e-i-1,n,s);return l&&t.replaceChild(o,s.copy(l))}function cb(t,e,n){if(n.openStart>t.depth)throw new ro("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new ro("Inconsistent open depths");return Ld(t,e,n,0)}function Ld(t,e,n,r){let o=t.index(r),i=t.node(r);if(o==e.index(r)&&r<t.depth-n.openStart){let s=Ld(t,e,n,r+1);return i.copy(i.content.replaceChild(o,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,l=s.content;return Ut(s,l.cut(0,t.parentOffset).append(n.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=db(n,t);return Ut(i,Od(t,s,l,e,r))}else return Ut(i,oo(t,e,r))}function Dd(t,e){if(!e.type.compatibleContent(t.type))throw new ro("Cannot join "+e.type.name+" onto "+t.type.name)}function Ji(t,e,n){let r=t.node(n);return Dd(r,e.node(n)),r}function Ft(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function Zn(t,e,n,r){let o=(e||t).node(n),i=0,s=e?e.index(n):o.childCount;t&&(i=t.index(n),t.depth>n?i++:t.textOffset&&(Ft(t.nodeAfter,r),i++));for(let l=i;l<s;l++)Ft(o.child(l),r);e&&e.depth==n&&e.textOffset&&Ft(e.nodeBefore,r)}function Ut(t,e){return t.type.checkContent(e),t.copy(e)}function Od(t,e,n,r,o){let i=t.depth>o&&Ji(t,e,o+1),s=r.depth>o&&Ji(n,r,o+1),l=[];return Zn(null,t,o,l),i&&s&&e.index(o)==n.index(o)?(Dd(i,s),Ft(Ut(i,Od(t,e,n,r,o+1)),l)):(i&&Ft(Ut(i,oo(t,e,o+1)),l),Zn(e,n,o,l),s&&Ft(Ut(s,oo(n,r,o+1)),l)),Zn(r,null,o,l),new w(l)}function oo(t,e,n){let r=[];if(Zn(null,t,n,r),t.depth>n){let o=Ji(t,e,n+1);Ft(Ut(o,oo(t,e,n+1)),r)}return Zn(e,null,n,r),new w(r)}function db(t,e){let n=e.depth-t.openStart,o=e.node(n).copy(t.content);for(let i=n-1;i>=0;i--)o=e.node(i).copy(w.from(o));return{start:o.resolveNoCache(t.openStart+n),end:o.resolveNoCache(o.content.size-t.openEnd-n)}}class ir{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],o=e.child(n);return r?e.child(n).cut(r):o}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],o=n==0?0:this.path[n*3-1]+1;for(let i=0;i<e;i++)o+=r.child(i).nodeSize;return o}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return J.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),o=e.maybeChild(n);if(!r){let l=r;r=o,o=l}let i=r.marks;for(var s=0;s<i.length;s++)i[s].type.spec.inclusive===!1&&(!o||!i[s].isInSet(o.marks))&&(i=i[s--].removeFromSet(i));return i}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,o=e.parent.maybeChild(e.index());for(var i=0;i<r.length;i++)r[i].type.spec.inclusive===!1&&(!o||!r[i].isInSet(o.marks))&&(r=r[i--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){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)&&(!n||n(this.node(r))))return new io(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 n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],o=0,i=n;for(let s=e;;){let{index:l,offset:c}=s.content.findIndex(i),d=i-c;if(r.push(s,l,o+c),!d||(s=s.child(l),s.isText))break;i=d-1,o+=c+1}return new ir(n,r,i)}static resolveCached(e,n){let r=rl.get(e);if(r)for(let i=0;i<r.elts.length;i++){let s=r.elts[i];if(s.pos==n)return s}else rl.set(e,r=new ub);let o=r.elts[r.i]=ir.resolve(e,n);return r.i=(r.i+1)%fb,o}}class ub{constructor(){this.elts=[],this.i=0}}const fb=12,rl=new WeakMap;class io{constructor(e,n,r){this.$from=e,this.$to=n,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 hb=Object.create(null);let Mt=class Gi{constructor(e,n,r,o=J.none){this.type=e,this.attrs=n,this.marks=o,this.content=r||w.empty}get children(){return this.content.content}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,n,r,o=0){this.content.nodesBetween(e,n,r,o,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,n,r,o){return this.content.textBetween(e,n,r,o)}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,n,r){return this.type==e&&no(this.attrs,n||e.defaultAttrs||hb)&&J.sameSet(this.marks,r||J.none)}copy(e=null){return e==this.content?this:new Gi(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Gi(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return T.empty;let o=this.resolve(e),i=this.resolve(n),s=r?0:o.sharedDepth(n),l=o.start(s),d=o.node(s).content.cut(o.pos-l,i.pos-l);return new T(d,o.depth-s,i.depth-s)}replace(e,n,r){return cb(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:o}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(o==e||n.isText)return n;e-=o+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let o=this.content.child(n-1);return{node:o,index:n-1,offset:r-o.nodeSize}}resolve(e){return ir.resolveCached(this,e)}resolveNoCache(e){return ir.resolve(this,e)}rangeHasMark(e,n,r){let o=!1;return n>e&&this.nodesBetween(e,n,i=>(r.isInSet(i.marks)&&(o=!0),!o)),o}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()+")"),Bd(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=w.empty,o=0,i=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,o,i),l=s&&s.matchFragment(this.content,n);if(!l||!l.validEnd)return!1;for(let c=o;c<i;c++)if(!this.type.allowsMarks(r.child(c).marks))return!1;return!0}canReplaceWith(e,n,r,o){if(o&&!this.type.allowsMarks(o))return!1;let i=this.contentMatchAt(e).matchType(r),s=i&&i.matchFragment(this.content,n);return s?s.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),this.type.checkAttrs(this.attrs);let e=J.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!J.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n 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(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let o=w.fromJSON(e,n.content),i=e.nodeType(n.type).create(n.attrs,o,r);return i.type.checkAttrs(i.attrs),i}};Mt.prototype.text=void 0;class so extends Mt{constructor(e,n,r,o){if(super(e,n,null,o),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Bd(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new so(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new so(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Bd(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Jt{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new pb(e,n);if(r.next==null)return Jt.empty;let o=Rd(r);r.next&&r.err("Unexpected trailing text");let i=Cb(yb(o));return Ib(i,r),i}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let o=this;for(let i=n;o&&i<r;i++)o=o.matchType(e.child(i).type);return o}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:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let o=[this];function i(s,l){let c=s.matchFragment(e,r);if(c&&(!n||c.validEnd))return w.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:u,next:f}=s.next[d];if(!(u.isText||u.hasRequiredAttrs())&&o.indexOf(f)==-1){o.push(f);let h=i(f,l.concat(u));if(h)return h}}return null}return i(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let o=r.shift(),i=o.match;if(i.matchType(e)){let s=[];for(let l=o;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<i.next.length;s++){let{type:l,next:c}=i.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in n)&&(!o.type||c.validEnd)&&(r.push({match:l.contentMatch,type:l,via:o}),n[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 n(r){e.push(r);for(let o=0;o<r.next.length;o++)e.indexOf(r.next[o].next)==-1&&n(r.next[o].next)}return n(this),e.map((r,o)=>{let i=o+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)i+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return i}).join(`
|
|
13
|
+
`)}}Jt.empty=new Jt(!0);class pb{constructor(e,n){this.string=e,this.nodeTypes=n,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 Rd(t){let e=[];do e.push(mb(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function mb(t){let e=[];do e.push(Ab(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Ab(t){let e=vb(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=gb(t,e);else break;return e}function ol(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function gb(t,e){let n=ol(t),r=n;return t.eat(",")&&(t.next!="}"?r=ol(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}function bb(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let o=[];for(let i in n){let s=n[i];s.isInGroup(e)&&o.push(s)}return o.length==0&&t.err("No node type or group '"+e+"' found"),o}function vb(t){if(t.eat("(")){let e=Rd(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=bb(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function yb(t){let e=[[]];return o(i(t,0),n()),e;function n(){return e.push([])-1}function r(s,l,c){let d={term:c,to:l};return e[s].push(d),d}function o(s,l){s.forEach(c=>c.to=l)}function i(s,l){if(s.type=="choice")return s.exprs.reduce((c,d)=>c.concat(i(d,l)),[]);if(s.type=="seq")for(let c=0;;c++){let d=i(s.exprs[c],l);if(c==s.exprs.length-1)return d;o(d,l=n())}else if(s.type=="star"){let c=n();return r(l,c),o(i(s.expr,c),c),[r(c)]}else if(s.type=="plus"){let c=n();return o(i(s.expr,l),c),o(i(s.expr,c),c),[r(c)]}else{if(s.type=="opt")return[r(l)].concat(i(s.expr,l));if(s.type=="range"){let c=l;for(let d=0;d<s.min;d++){let u=n();o(i(s.expr,c),u),c=u}if(s.max==-1)o(i(s.expr,c),c);else for(let d=s.min;d<s.max;d++){let u=n();r(c,u),o(i(s.expr,c),u),c=u}return[r(c)]}else{if(s.type=="name")return[r(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function zd(t,e){return e-t}function il(t,e){let n=[];return r(e),n.sort(zd);function r(o){let i=t[o];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(o);for(let s=0;s<i.length;s++){let{term:l,to:c}=i[s];!l&&n.indexOf(c)==-1&&r(c)}}}function Cb(t){let e=Object.create(null);return n(il(t,0));function n(r){let o=[];r.forEach(s=>{t[s].forEach(({term:l,to:c})=>{if(!l)return;let d;for(let u=0;u<o.length;u++)o[u][0]==l&&(d=o[u][1]);il(t,c).forEach(u=>{d||o.push([l,d=[]]),d.indexOf(u)==-1&&d.push(u)})})});let i=e[r.join(",")]=new Jt(r.indexOf(t.length-1)>-1);for(let s=0;s<o.length;s++){let l=o[s][1].sort(zd);i.next.push({type:o[s][0],next:e[l.join(",")]||n(l)})}return i}}function Ib(t,e){for(let n=0,r=[t];n<r.length;n++){let o=r[n],i=!o.validEnd,s=[];for(let l=0;l<o.next.length;l++){let{type:c,next:d}=o.next[l];s.push(c.name),i&&!(c.isText||c.hasRequiredAttrs())&&(i=!1),r.indexOf(d)==-1&&r.push(d)}i&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Pd(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}function Vd(t,e){let n=Object.create(null);for(let r in t){let o=e&&e[r];if(o===void 0){let i=t[r];if(i.hasDefault)o=i.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=o}return n}function jd(t,e,n,r){for(let o in e)if(!(o in t))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in t){let i=t[o];i.validate&&i.validate(e[o])}}function Hd(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new Eb(t,r,e[r]);return n}let sl=class Qd{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Hd(e,r.attrs),this.defaultAttrs=Pd(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==Jt.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}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:Vd(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Mt(this,this.computeAttrs(e),w.from(n),J.setFrom(r))}createChecked(e=null,n,r){return n=w.from(n),this.checkContent(n),new Mt(this,this.computeAttrs(e),n,J.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=w.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let o=this.contentMatch.matchFragment(n),i=o&&o.fillBefore(w.empty,!0);return i?new Mt(this,e,n.append(i),J.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.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)}`)}checkAttrs(e){jd(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:J.none:e}static compile(e,n){let r=Object.create(null);e.forEach((i,s)=>r[i]=new Qd(i,n,s));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let i in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};function kb(t,e,n){let r=n.split("|");return o=>{let i=o===null?"null":typeof o;if(r.indexOf(i)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${i}`)}}class Eb{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?kb(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class Jo{constructor(e,n,r,o){this.name=e,this.rank=n,this.schema=r,this.spec=o,this.attrs=Hd(e,o.attrs),this.excluded=null;let i=Pd(this.attrs);this.instance=i?new J(this,i):null}create(e=null){return!e&&this.instance?this.instance:new J(this,Vd(this.attrs,e))}static compile(e,n){let r=Object.create(null),o=0;return e.forEach((i,s)=>r[i]=new Jo(i,o++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){jd(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Wd{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let o in e)n[o]=e[o];n.nodes=ge.from(e.nodes),n.marks=ge.from(e.marks||{}),this.nodes=sl.compile(this.spec.nodes,this),this.marks=Jo.compile(this.spec.marks,this);let r=Object.create(null);for(let o in this.nodes){if(o in this.marks)throw new RangeError(o+" can not be both a node and a mark");let i=this.nodes[o],s=i.spec.content||"",l=i.spec.marks;if(i.contentMatch=r[s]||(r[s]=Jt.parse(s,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=l=="_"?null:l?al(this,l.split(" ")):l==""||!i.inlineContent?[]:null}for(let o in this.marks){let i=this.marks[o],s=i.spec.excludes;i.excluded=s==null?[i]:s==""?[]:al(this,s.split(" "))}this.nodeFromJSON=o=>Mt.fromJSON(this,o),this.markFromJSON=o=>J.fromJSON(this,o),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,o){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof sl){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(n,r,o)}text(e,n){let r=this.nodes.text;return new so(r,r.defaultAttrs,e,J.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function al(t,e){let n=[];for(let r=0;r<e.length;r++){let o=e[r],i=t.marks[o],s=i;if(i)n.push(i);else for(let l in t.marks){let c=t.marks[l];(o=="_"||c.spec.group&&c.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=c)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}function Mb(t){return t.tag!=null}function wb(t){return t.style!=null}class wt{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(o=>{if(Mb(o))this.tags.push(o);else if(wb(o)){let i=/[^=]*/.exec(o.style)[0];r.indexOf(i)<0&&r.push(i),this.styles.push(o)}}),this.normalizeLists=!this.tags.some(o=>{if(!/^(ul|ol)\b/.test(o.tag)||!o.node)return!1;let i=e.nodes[o.node];return i.contentMatch.matchType(i)})}parse(e,n={}){let r=new cl(this,n,!1);return r.addAll(e,J.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new cl(this,n,!0);return r.addAll(e,J.none,n.from,n.to),T.maxOpen(r.finish())}matchTag(e,n,r){for(let o=r?this.tags.indexOf(r)+1:0;o<this.tags.length;o++){let i=this.tags[o];if(Sb(e,i.tag)&&(i.namespace===void 0||e.namespaceURI==i.namespace)&&(!i.context||n.matchesContext(i.context))){if(i.getAttrs){let s=i.getAttrs(e);if(s===!1)continue;i.attrs=s||void 0}return i}}}matchStyle(e,n,r,o){for(let i=o?this.styles.indexOf(o)+1:0;i<this.styles.length;i++){let s=this.styles[i],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=n))){if(s.getAttrs){let c=s.getAttrs(n);if(c===!1)continue;s.attrs=c||void 0}return s}}}static schemaRules(e){let n=[];function r(o){let i=o.priority==null?50:o.priority,s=0;for(;s<n.length;s++){let l=n[s];if((l.priority==null?50:l.priority)<i)break}n.splice(s,0,o)}for(let o in e.marks){let i=e.marks[o].spec.parseDOM;i&&i.forEach(s=>{r(s=dl(s)),s.mark||s.ignore||s.clearMark||(s.mark=o)})}for(let o in e.nodes){let i=e.nodes[o].spec.parseDOM;i&&i.forEach(s=>{r(s=dl(s)),s.node||s.ignore||s.mark||(s.node=o)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new wt(e,wt.schemaRules(e)))}}const Fd={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},Nb={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ud={ol:!0,ul:!0},sr=1,$i=2,Yn=4;function ll(t,e,n){return e!=null?(e?sr:0)|(e==="full"?$i:0):t&&t.whitespace=="pre"?sr|$i:n&~Yn}class Nr{constructor(e,n,r,o,i,s){this.type=e,this.attrs=n,this.marks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=J.none,this.match=i||(s&Yn?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(w.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,o;return(o=r.findWrapping(e.type))?(this.match=r,o):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&sr)){let r=this.content[this.content.length-1],o;if(r&&r.isText&&(o=/[ \t\r\n\u000c]+$/.exec(r.text))){let i=r;r.text.length==o[0].length?this.content.pop():this.content[this.content.length-1]=i.withText(i.text.slice(0,i.text.length-o[0].length))}}let n=w.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(w.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Fd.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class cl{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let o=n.topNode,i,s=ll(null,n.preserveWhitespace,0)|(r?Yn:0);o?i=new Nr(o.type,o.attrs,J.none,!0,n.topMatch||o.type.contentMatch,s):r?i=new Nr(null,null,J.none,!0,null,s):i=new Nr(e.schema.topNodeType,null,J.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,o=this.top,i=o.options&$i?"full":this.localPreserveWS||(o.options&sr)>0,{schema:s}=this.parser;if(i==="full"||o.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(i)if(i==="full")r=r.replace(/\r\n?/g,`
|
|
14
|
+
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let l=r.split(/\r?\n|\r/);for(let c=0;c<l.length;c++)c&&this.insertNode(s.linebreakReplacement.create(),n,!0),l[c]&&this.insertNode(s.text(l[c]),n,!/\S/.test(l[c]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let l=o.content[o.content.length-1],c=e.previousSibling;(!l||c&&c.nodeName=="BR"||l.isText&&/[ \t\r\n\u000c]$/.test(l.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let o=this.localPreserveWS,i=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Ud.hasOwnProperty(s)&&this.parser.normalizeLists&&xb(e);let c=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,r));e:if(c?c.ignore:Nb.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!c||c.skip||c.closeParent){c&&c.closeParent?this.open=Math.max(0,this.open-1):c&&c.skip.nodeType&&(e=c.skip);let d,u=this.needsBlock;if(Fd.hasOwnProperty(s))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),d=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=c&&c.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),d&&this.sync(i),this.needsBlock=u}else{let d=this.readStyles(e,n);d&&this.addElementByRule(e,c,d,c.consuming===!1?l:void 0)}this.localPreserveWS=o}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
15
|
+
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let o=0;o<this.parser.matchedStyles.length;o++){let i=this.parser.matchedStyles[o],s=r.getPropertyValue(i);if(s)for(let l=void 0;;){let c=this.parser.matchStyle(i,s,this,l);if(!c)break;if(c.ignore)return null;if(c.clearMark?n=n.filter(d=>!c.clearMark(d)):n=n.concat(this.parser.schema.marks[c.mark].create(c.attrs)),c.consuming===!1)l=c;else break}}return n}addElementByRule(e,n,r,o){let i,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let c=this.enter(s,n.attrs||null,r,n.preserveWhitespace);c&&(i=!0,r=c)}else{let c=this.parser.schema.marks[n.mark];r=r.concat(c.create(n.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(o)this.addElement(e,r,o);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(c=>this.insertNode(c,r,!1));else{let c=e;typeof n.contentElement=="string"?c=e.querySelector(n.contentElement):typeof n.contentElement=="function"?c=n.contentElement(e):n.contentElement&&(c=n.contentElement),this.findAround(e,c,!0),this.addAll(c,r),this.findAround(e,c,!1)}i&&this.sync(l)&&this.open--}addAll(e,n,r,o){let i=r||0;for(let s=r?e.childNodes[r]:e.firstChild,l=o==null?null:e.childNodes[o];s!=l;s=s.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(s,n);this.findAtPoint(e,i)}findPlace(e,n,r){let o,i;for(let s=this.open,l=0;s>=0;s--){let c=this.nodes[s],d=c.findWrapping(e);if(d&&(!o||o.length>d.length+l)&&(o=d,i=c,!d.length))break;if(c.solid){if(r)break;l+=2}}if(!o)return null;this.sync(i);for(let s=0;s<o.length;s++)n=this.enterInner(o[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let o=this.findPlace(e,n,r);if(o){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let s=J.none;for(let l of o.concat(e.marks))(i.type?i.type.allowsMarkType(l.type):ul(l.type,e.type))&&(s=l.addToSet(s));return i.content.push(e.mark(s)),!0}return!1}enter(e,n,r,o){let i=this.findPlace(e.create(n),r,!1);return i&&(i=this.enterInner(e,n,r,!0,o)),i}enterInner(e,n,r,o=!1,i){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=ll(e,i,s.options);s.options&Yn&&s.content.length==0&&(l|=Yn);let c=J.none;return r=r.filter(d=>(s.type?s.type.allowsMarkType(d.type):ul(d.type,e))?(c=d.addToSet(c),!1):!0),this.nodes.push(new Nr(e,n,c,o,null,l)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=sr)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let o=r.length-1;o>=0;o--)e+=r[o].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let o=0;o<this.find.length;o++)this.find[o].pos==null&&e.nodeType==1&&e.contains(this.find[o].node)&&n.compareDocumentPosition(this.find[o].node)&(r?2:4)&&(this.find[o].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,o=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),s=(l,c)=>{for(;l>=0;l--){let d=n[l];if(d==""){if(l==n.length-1||l==0)continue;for(;c>=i;c--)if(s(l-1,c))return!0;return!1}else{let u=c>0||c==0&&o?this.nodes[c].type:r&&c>=i?r.node(c-i).type:null;if(!u||u.name!=d&&!u.isInGroup(d))return!1;c--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function xb(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Ud.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}function Sb(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function dl(t){let e={};for(let n in t)e[n]=t[n];return e}function ul(t,e){let n=e.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(t))continue;let i=[],s=l=>{i.push(l);for(let c=0;c<l.edgeCount;c++){let{type:d,next:u}=l.edge(c);if(d==e||i.indexOf(u)<0&&s(u))return!0}};if(s(o.contentMatch))return!0}}class rn{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=yi(n).createDocumentFragment());let o=r,i=[];return e.forEach(s=>{if(i.length||s.marks.length){let l=0,c=0;for(;l<i.length&&c<s.marks.length;){let d=s.marks[c];if(!this.marks[d.type.name]){c++;continue}if(!d.eq(i[l][0])||d.type.spec.spanning===!1)break;l++,c++}for(;l<i.length;)o=i.pop()[1];for(;c<s.marks.length;){let d=s.marks[c++],u=this.serializeMark(d,s.isInline,n);u&&(i.push([d,o]),o.appendChild(u.dom),o=u.contentDOM||u.dom)}}o.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:o}=Wr(yi(n),this.nodes[e.type.name](e),null,e.attrs);if(o){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,o)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let o=e.marks.length-1;o>=0;o--){let i=this.serializeMark(e.marks[o],e.isInline,n);i&&((i.contentDOM||i.dom).appendChild(r),r=i.dom)}return r}serializeMark(e,n,r={}){let o=this.marks[e.type.name];return o&&Wr(yi(r),o(e,n),null,e.attrs)}static renderSpec(e,n,r=null,o){return Wr(e,n,r,o)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new rn(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=fl(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return fl(e.marks)}}function fl(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}function yi(t){return t.document||window.document}const hl=new WeakMap;function Tb(t){let e=hl.get(t);return e===void 0&&hl.set(t,e=Lb(t)),e}function Lb(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let o=0;o<r.length;o++)n(r[o]);else for(let o in r)n(r[o])}return n(t),e}function Wr(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let o=e[0],i;if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Tb(r))&&i.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s=o.indexOf(" ");s>0&&(n=o.slice(0,s),o=o.slice(s+1));let l,c=n?t.createElementNS(n,o):t.createElement(o),d=e[1],u=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){u=2;for(let f in d)if(d[f]!=null){let h=f.indexOf(" ");h>0?c.setAttributeNS(f.slice(0,h),f.slice(h+1),d[f]):f=="style"&&c.style?c.style.cssText=d[f]:c.setAttribute(f,d[f])}}for(let f=u;f<e.length;f++){let h=e[f];if(h===0){if(f<e.length-1||f>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:c,contentDOM:c}}else{let{dom:p,contentDOM:m}=Wr(t,h,n,r);if(c.appendChild(p),m){if(l)throw new RangeError("Multiple content holes");l=m}}}return{dom:c,contentDOM:l}}const qd=65535,Kd=Math.pow(2,16);function Db(t,e){return t+e*Kd}function pl(t){return t&qd}function Ob(t){return(t-(t&qd))/Kd}const Zd=1,Yd=2,Fr=4,Xd=8;class _i{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Xd)>0}get deletedBefore(){return(this.delInfo&(Zd|Fr))>0}get deletedAfter(){return(this.delInfo&(Yd|Fr))>0}get deletedAcross(){return(this.delInfo&Fr)>0}}class Te{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Te.empty)return Te.empty}recover(e){let n=0,r=pl(e);if(!this.inverted)for(let o=0;o<r;o++)n+=this.ranges[o*3+2]-this.ranges[o*3+1];return this.ranges[r*3]+n+Ob(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let o=0,i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?o:0);if(c>e)break;let d=this.ranges[l+i],u=this.ranges[l+s],f=c+d;if(e<=f){let h=d?e==c?-1:e==f?1:n:n,p=c+o+(h<0?0:u);if(r)return p;let m=e==(n<0?c:f)?null:Db(l/3,e-c),A=e==c?Yd:e==f?Zd:Fr;return(n<0?e!=c:e!=f)&&(A|=Xd),new _i(p,A,m)}o+=u-d}return r?e+o:new _i(e+o,0,null)}touches(e,n){let r=0,o=pl(n),i=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let c=this.ranges[l]-(this.inverted?r:0);if(c>e)break;let d=this.ranges[l+i],u=c+d;if(e<=u&&l==o*3)return!0;r+=this.ranges[l+s]-d}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let o=0,i=0;o<this.ranges.length;o+=3){let s=this.ranges[o],l=s-(this.inverted?i:0),c=s+(this.inverted?0:i),d=this.ranges[o+n],u=this.ranges[o+r];e(l,l+d,c,c+u),i+=u-d}}invert(){return new Te(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Te.empty:new Te(e<0?[0,-e,0]:[0,0,e])}}Te.empty=new Te([]);class ar{constructor(e,n,r=0,o=e?e.length:0){this.mirror=n,this.from=r,this.to=o,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new ar(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let o=e.getMirror(n);this.appendMap(e._maps[n],o!=null&&o<n?r+o:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let o=e.getMirror(n);this.appendMap(e._maps[n].invert(),o!=null&&o>n?r-o-1:void 0)}}invert(){let e=new ar;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let o=0;for(let i=this.from;i<this.to;i++){let s=this._maps[i],l=s.mapResult(e,n);if(l.recover!=null){let c=this.getMirror(i);if(c!=null&&c>i&&c<this.to){i=c,e=this._maps[c].recover(l.recover);continue}}o|=l.delInfo,e=l.pos}return r?e:new _i(e,o,null)}}const Ci=Object.create(null);class Ee{getMap(){return Te.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ci[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ci)throw new RangeError("Duplicate use of step JSON ID "+e);return Ci[e]=n,n.prototype.jsonID=e,n}}class de{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new de(e,null)}static fail(e){return new de(null,e)}static fromReplace(e,n,r,o){try{return de.ok(e.replace(n,r,o))}catch(i){if(i instanceof ro)return de.fail(i.message);throw i}}}function Ws(t,e,n){let r=[];for(let o=0;o<t.childCount;o++){let i=t.child(o);i.content.size&&(i=i.copy(Ws(i.content,e,i))),i.isInline&&(i=e(i,n,o)),r.push(i)}return w.fromArray(r)}class It extends Ee{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),o=r.node(r.sharedDepth(this.to)),i=new T(Ws(n.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),o),n.openStart,n.openEnd);return de.fromReplace(e,this.from,this.to,i)}invert(){return new Ue(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new It(n.pos,r.pos,this.mark)}merge(e){return e instanceof It&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new It(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new It(n.from,n.to,e.markFromJSON(n.mark))}}Ee.jsonID("addMark",It);class Ue extends Ee{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new T(Ws(n.content,o=>o.mark(this.mark.removeFromSet(o.marks)),e),n.openStart,n.openEnd);return de.fromReplace(e,this.from,this.to,r)}invert(){return new It(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Ue(n.pos,r.pos,this.mark)}merge(e){return e instanceof Ue&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ue(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Ue(n.from,n.to,e.markFromJSON(n.mark))}}Ee.jsonID("removeMark",Ue);class kt extends Ee{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let o=0;o<n.marks.length;o++)if(!n.marks[o].isInSet(r))return new kt(this.pos,n.marks[o]);return new kt(this.pos,this.mark)}}return new Gt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new kt(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new kt(n.pos,e.markFromJSON(n.mark))}}Ee.jsonID("addNodeMark",kt);class Gt extends Ee{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new kt(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Gt(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Gt(n.pos,e.markFromJSON(n.mark))}}Ee.jsonID("removeNodeMark",Gt);class fe extends Ee{constructor(e,n,r,o=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=o}apply(e){return this.structure&&es(e,this.from,this.to)?de.fail("Structure replace would overwrite content"):de.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Te([this.from,this.to-this.from,this.slice.size])}invert(e){return new fe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new fe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof fe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?T.empty:new T(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new fe(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?T.empty:new T(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new fe(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new fe(n.from,n.to,T.fromJSON(e,n.slice),!!n.structure)}}Ee.jsonID("replace",fe);class pe extends Ee{constructor(e,n,r,o,i,s,l=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=s,this.structure=l}apply(e){if(this.structure&&(es(e,this.from,this.gapFrom)||es(e,this.gapTo,this.to)))return de.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return de.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?de.fromReplace(e,this.from,this.to,r):de.fail("Content does not fit in gap")}getMap(){return new Te([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new pe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),i=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||o<n.pos||i>r.pos?null:new pe(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new pe(n.from,n.to,n.gapFrom,n.gapTo,T.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ee.jsonID("replaceAround",pe);function es(t,e,n){let r=t.resolve(e),o=n-e,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let s=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,o--}}return!1}function Bb(t,e,n,r){let o=[],i=[],s,l;t.doc.nodesBetween(e,n,(c,d,u)=>{if(!c.isInline)return;let f=c.marks;if(!r.isInSet(f)&&u.type.allowsMarkType(r.type)){let h=Math.max(d,e),p=Math.min(d+c.nodeSize,n),m=r.addToSet(f);for(let A=0;A<f.length;A++)f[A].isInSet(m)||(s&&s.to==h&&s.mark.eq(f[A])?s.to=p:o.push(s=new Ue(h,p,f[A])));l&&l.to==h?l.to=p:i.push(l=new It(h,p,r))}}),o.forEach(c=>t.step(c)),i.forEach(c=>t.step(c))}function Rb(t,e,n,r){let o=[],i=0;t.doc.nodesBetween(e,n,(s,l)=>{if(!s.isInline)return;i++;let c=null;if(r instanceof Jo){let d=s.marks,u;for(;u=r.isInSet(d);)(c||(c=[])).push(u),d=u.removeFromSet(d)}else r?r.isInSet(s.marks)&&(c=[r]):c=s.marks;if(c&&c.length){let d=Math.min(l+s.nodeSize,n);for(let u=0;u<c.length;u++){let f=c[u],h;for(let p=0;p<o.length;p++){let m=o[p];m.step==i-1&&f.eq(o[p].style)&&(h=m)}h?(h.to=d,h.step=i):o.push({style:f,from:Math.max(l,e),to:d,step:i})}}}),o.forEach(s=>t.step(new Ue(s.from,s.to,s.style)))}function Fs(t,e,n,r=n.contentMatch,o=!0){let i=t.doc.nodeAt(e),s=[],l=e+1;for(let c=0;c<i.childCount;c++){let d=i.child(c),u=l+d.nodeSize,f=r.matchType(d.type);if(!f)s.push(new fe(l,u,T.empty));else{r=f;for(let h=0;h<d.marks.length;h++)n.allowsMarkType(d.marks[h].type)||t.step(new Ue(l,u,d.marks[h]));if(o&&d.isText&&n.whitespace!="pre"){let h,p=/\r?\n|\r/g,m;for(;h=p.exec(d.text);)m||(m=new T(w.from(n.schema.text(" ",n.allowedMarks(d.marks))),0,0)),s.push(new fe(l+h.index,l+h.index+h[0].length,m))}}l=u}if(!r.validEnd){let c=r.fillBefore(w.empty,!0);t.replace(l,l,new T(c,0,0))}for(let c=s.length-1;c>=0;c--)t.step(s[c])}function zb(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Nn(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,o=0,i=0;;--r){let s=t.$from.node(r),l=t.$from.index(r)+o,c=t.$to.indexAfter(r)-i;if(r<t.depth&&s.canReplace(l,c,n))return r;if(r==0||s.type.spec.isolating||!zb(s,l,c))break;l&&(o=1),c<s.childCount&&(i=1)}return null}function Pb(t,e,n){let{$from:r,$to:o,depth:i}=e,s=r.before(i+1),l=o.after(i+1),c=s,d=l,u=w.empty,f=0;for(let m=i,A=!1;m>n;m--)A||r.index(m)>0?(A=!0,u=w.from(r.node(m).copy(u)),f++):c--;let h=w.empty,p=0;for(let m=i,A=!1;m>n;m--)A||o.after(m+1)<o.end(m)?(A=!0,h=w.from(o.node(m).copy(h)),p++):d++;t.step(new pe(c,d,s,l,new T(u.append(h),f,p),u.size-f,!0))}function Us(t,e,n=null,r=t){let o=Vb(t,e),i=o&&jb(r,e);return i?o.map(ml).concat({type:e,attrs:n}).concat(i.map(ml)):null}function ml(t){return{type:t,attrs:null}}function Vb(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.contentMatchAt(r).findWrapping(e);if(!i)return null;let s=i.length?i[0]:e;return n.canReplaceWith(r,o,s)?i:null}function jb(t,e){let{parent:n,startIndex:r,endIndex:o}=t,i=n.child(r),s=e.contentMatch.findWrapping(i.type);if(!s)return null;let c=(s.length?s[s.length-1]:e).contentMatch;for(let d=r;c&&d<o;d++)c=c.matchType(n.child(d).type);return!c||!c.validEnd?null:s}function Hb(t,e,n){let r=w.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let l=n[s].type.contentMatch.matchFragment(r);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=w.from(n[s].type.create(n[s].attrs,r))}let o=e.start,i=e.end;t.step(new pe(o,i,o,i,new T(r,0,0),n.length,!0))}function Qb(t,e,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=t.steps.length;t.doc.nodesBetween(e,n,(s,l)=>{let c=typeof o=="function"?o(s):o;if(s.isTextblock&&!s.hasMarkup(r,c)&&Wb(t.doc,t.mapping.slice(i).map(l),r)){let d=null;if(r.schema.linebreakReplacement){let p=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);p&&!m?d=!1:!p&&m&&(d=!0)}d===!1&&Gd(t,s,l,i),Fs(t,t.mapping.slice(i).map(l,1),r,void 0,d===null);let u=t.mapping.slice(i),f=u.map(l,1),h=u.map(l+s.nodeSize,1);return t.step(new pe(f,h,f+1,h-1,new T(w.from(r.create(c,null,s.marks)),0,0),1,!0)),d===!0&&Jd(t,s,l,i),!1}})}function Jd(t,e,n,r){e.forEach((o,i)=>{if(o.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(o.text);){let c=t.mapping.slice(r).map(n+1+i+s.index);t.replaceWith(c,c+1,e.type.schema.linebreakReplacement.create())}}})}function Gd(t,e,n,r){e.forEach((o,i)=>{if(o.type==o.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+i);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
16
|
+
`))}})}function Wb(t,e,n){let r=t.resolve(e),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}function Fb(t,e,n,r,o){let i=t.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return t.replaceWith(e,e+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new pe(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new T(w.from(s),0,0),1,!0))}function lt(t,e,n=1,r){let o=t.resolve(e),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let d=o.depth-1,u=n-2;d>i;d--,u--){let f=o.node(d),h=o.index(d);if(f.type.spec.isolating)return!1;let p=f.content.cutByIndex(h,f.childCount),m=r&&r[u+1];m&&(p=p.replaceChild(0,m.type.create(m.attrs)));let A=r&&r[u]||f;if(!f.canReplace(h+1,f.childCount)||!A.type.validContent(p))return!1}let l=o.indexAfter(i),c=r&&r[0];return o.node(i).canReplaceWith(l,l,c?c.type:o.node(i+1).type)}function Ub(t,e,n=1,r){let o=t.doc.resolve(e),i=w.empty,s=w.empty;for(let l=o.depth,c=o.depth-n,d=n-1;l>c;l--,d--){i=w.from(o.node(l).copy(i));let u=r&&r[d];s=w.from(u?u.type.create(u.attrs,s):o.node(l).copy(s))}t.step(new fe(e,e,new T(i.append(s),n,n),!0))}function Dt(t,e){let n=t.resolve(e),r=n.index();return $d(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function qb(t,e){e.content.size||t.type.compatibleContent(e.type);let n=t.contentMatchAt(t.childCount),{linebreakReplacement:r}=t.type.schema;for(let o=0;o<e.childCount;o++){let i=e.child(o),s=i.type==r?t.type.schema.nodes.text:i.type;if(n=n.matchType(s),!n||!t.type.allowsMarks(i.marks))return!1}return n.validEnd}function $d(t,e){return!!(t&&e&&!t.isLeaf&&qb(t,e))}function Go(t,e,n=-1){let r=t.resolve(e);for(let o=r.depth;;o--){let i,s,l=r.index(o);if(o==r.depth?(i=r.nodeBefore,s=r.nodeAfter):n>0?(i=r.node(o+1),l++,s=r.node(o).maybeChild(l)):(i=r.node(o).maybeChild(l-1),s=r.node(o+1)),i&&!i.isTextblock&&$d(i,s)&&r.node(o).canReplace(l,l+1))return e;if(o==0)break;e=n<0?r.before(o):r.after(o)}}function Kb(t,e,n){let r=null,{linebreakReplacement:o}=t.doc.type.schema,i=t.doc.resolve(e-n),s=i.node().type;if(o&&s.inlineContent){let u=s.whitespace=="pre",f=!!s.contentMatch.matchType(o);u&&!f?r=!1:!u&&f&&(r=!0)}let l=t.steps.length;if(r===!1){let u=t.doc.resolve(e+n);Gd(t,u.node(),u.before(),l)}s.inlineContent&&Fs(t,e+n-1,s,i.node().contentMatchAt(i.index()),r==null);let c=t.mapping.slice(l),d=c.map(e-n);if(t.step(new fe(d,c.map(e+n,-1),T.empty,!0)),r===!0){let u=t.doc.resolve(d);Jd(t,u.node(),u.before(),t.steps.length)}return t}function Zb(t,e,n){let r=t.resolve(e);if(r.parent.canReplaceWith(r.index(),r.index(),n))return e;if(r.parentOffset==0)for(let o=r.depth-1;o>=0;o--){let i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let i=r.indexAfter(o);if(r.node(o).canReplaceWith(i,i,n))return r.after(o+1);if(i<r.node(o).childCount)return null}return null}function _d(t,e,n){let r=t.resolve(e);if(!n.content.size)return e;let o=n.content;for(let i=0;i<n.openStart;i++)o=o.firstChild.content;for(let i=1;i<=(n.openStart==0&&n.size?2:1);i++)for(let s=r.depth;s>=0;s--){let l=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,c=r.index(s)+(l>0?1:0),d=r.node(s),u=!1;if(i==1)u=d.canReplace(c,c,o);else{let f=d.contentMatchAt(c).findWrapping(o.firstChild.type);u=f&&d.canReplaceWith(c,c,f[0])}if(u)return l==0?r.pos:l<0?r.before(s+1):r.after(s+1)}return null}function $o(t,e,n=e,r=T.empty){if(e==n&&!r.size)return null;let o=t.resolve(e),i=t.resolve(n);return eu(o,i,r)?new fe(e,n,r):new Yb(o,i,r).fit()}function eu(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Yb{constructor(e,n,r){this.$from=e,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=w.empty;for(let o=0;o<=e.depth;o++){let i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}for(let o=e.depth;o>0;o--)this.placed=w.from(e.node(o).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let d=this.findFittable();d?this.placeNodes(d):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,r=this.$from,o=this.close(e<0?this.$to:r.doc.resolve(e));if(!o)return null;let i=this.placed,s=r.depth,l=o.depth;for(;s&&l&&i.childCount==1;)i=i.firstChild.content,s--,l--;let c=new T(i,s,l);return e>-1?new pe(r.pos,e,this.$to.pos,this.$to.end(),c,n):c.size||r.pos!=this.$to.pos?new fe(r.pos,o.pos,c):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,o=this.unplaced.openEnd;r<e;r++){let i=n.firstChild;if(n.childCount>1&&(o=0),i.type.spec.isolating&&o<=r){e=r;break}n=i.content}for(let n=1;n<=2;n++)for(let r=n==1?e:this.unplaced.openStart;r>=0;r--){let o,i=null;r?(i=Ii(this.unplaced.content,r-1).firstChild,o=i.content):o=this.unplaced.content;let s=o.firstChild;for(let l=this.depth;l>=0;l--){let{type:c,match:d}=this.frontier[l],u,f=null;if(n==1&&(s?d.matchType(s.type)||(f=d.fillBefore(w.from(s),!1)):i&&c.compatibleContent(i.type)))return{sliceDepth:r,frontierDepth:l,parent:i,inject:f};if(n==2&&s&&(u=d.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:l,parent:i,wrap:u};if(i&&d.matchType(i.type))break}}}openMore(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ii(e,n);return!o.childCount||o.firstChild.isLeaf?!1:(this.unplaced=new T(e,n+1,Math.max(r,o.size+n>=e.size-r?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:r}=this.unplaced,o=Ii(e,n);if(o.childCount<=1&&n>0){let i=e.size-n<=n+o.size;this.unplaced=new T(jn(e,n-1,1),n-1,i?n-1:r)}else this.unplaced=new T(jn(e,n,1),n,r)}placeNodes({sliceDepth:e,frontierDepth:n,parent:r,inject:o,wrap:i}){for(;this.depth>n;)this.closeFrontierNode();if(i)for(let A=0;A<i.length;A++)this.openFrontierNode(i[A]);let s=this.unplaced,l=r?r.content:s.content,c=s.openStart-e,d=0,u=[],{match:f,type:h}=this.frontier[n];if(o){for(let A=0;A<o.childCount;A++)u.push(o.child(A));f=f.matchFragment(o)}let p=l.size+e-(s.content.size-s.openEnd);for(;d<l.childCount;){let A=l.child(d),g=f.matchType(A.type);if(!g)break;d++,(d>1||c==0||A.content.size)&&(f=g,u.push(tu(A.mark(h.allowedMarks(A.marks)),d==1?c:0,d==l.childCount?p:-1)))}let m=d==l.childCount;m||(p=-1),this.placed=Hn(this.placed,n,w.from(u)),this.frontier[n].match=f,m&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let A=0,g=l;A<p;A++){let b=g.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),g=b.content}this.unplaced=m?e==0?T.empty:new T(jn(s.content,e-1,1),e-1,p<0?s.openEnd:e-1):new T(jn(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!ki(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:r}=this.$to,o=this.$to.after(r);for(;r>1&&o==this.$to.end(--r);)++o;return o}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:r,type:o}=this.frontier[n],i=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),s=ki(e,n,o,r,i);if(s){for(let l=n-1;l>=0;l--){let{match:c,type:d}=this.frontier[l],u=ki(e,l,d,c,!0);if(!u||u.childCount)continue e}return{depth:n,fit:s,move:i?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Hn(this.placed,n.depth,n.fit)),e=n.move;for(let r=n.depth+1;r<=e.depth;r++){let o=e.node(r),i=o.type.contentMatch.fillBefore(o.content,!0,e.index(r));this.openFrontierNode(o.type,o.attrs,i)}return e}openFrontierNode(e,n=null,r){let o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=Hn(this.placed,this.depth,w.from(e.create(n,r))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(w.empty,!0);n.childCount&&(this.placed=Hn(this.placed,this.frontier.length,n))}}function jn(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(jn(t.firstChild.content,e-1,n)))}function Hn(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Hn(t.lastChild.content,e-1,n)))}function Ii(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function tu(t,e,n){if(e<=0)return t;let r=t.content;return e>1&&(r=r.replaceChild(0,tu(r.firstChild,e-1,r.childCount==1?n-1:0))),e>0&&(r=t.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(t.type.contentMatch.matchFragment(r).fillBefore(w.empty,!0)))),t.copy(r)}function ki(t,e,n,r,o){let i=t.node(e),s=o?t.indexAfter(e):t.index(e);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let l=r.fillBefore(i.content,!0,s);return l&&!Xb(n,i.content,s)?l:null}function Xb(t,e,n){for(let r=n;r<e.childCount;r++)if(!t.allowsMarks(e.child(r).marks))return!0;return!1}function Jb(t){return t.spec.defining||t.spec.definingForContent}function Gb(t,e,n,r){if(!r.size)return t.deleteRange(e,n);let o=t.doc.resolve(e),i=t.doc.resolve(n);if(eu(o,i,r))return t.step(new fe(e,n,r));let s=ru(o,i);s[s.length-1]==0&&s.pop();let l=-(o.depth+1);s.unshift(l);for(let h=o.depth,p=o.pos-1;h>0;h--,p--){let m=o.node(h).type.spec;if(m.defining||m.definingAsContext||m.isolating)break;s.indexOf(h)>-1?l=h:o.before(h)==p&&s.splice(1,0,-h)}let c=s.indexOf(l),d=[],u=r.openStart;for(let h=r.content,p=0;;p++){let m=h.firstChild;if(d.push(m),p==r.openStart)break;h=m.content}for(let h=u-1;h>=0;h--){let p=d[h],m=Jb(p.type);if(m&&!p.sameMarkup(o.node(Math.abs(l)-1)))u=h;else if(m||!p.type.isTextblock)break}for(let h=r.openStart;h>=0;h--){let p=(h+u+1)%(r.openStart+1),m=d[p];if(m)for(let A=0;A<s.length;A++){let g=s[(A+c)%s.length],b=!0;g<0&&(b=!1,g=-g);let v=o.node(g-1),y=o.index(g-1);if(v.canReplaceWith(y,y,m.type,m.marks))return t.replace(o.before(g),b?i.after(g):n,new T(nu(r.content,0,r.openStart,p),p,r.openEnd))}}let f=t.steps.length;for(let h=s.length-1;h>=0&&(t.replace(e,n,r),!(t.steps.length>f));h--){let p=s[h];p<0||(e=o.before(p),n=i.after(p))}}function nu(t,e,n,r,o){if(e<n){let i=t.firstChild;t=t.replaceChild(0,i.copy(nu(i.content,e+1,n,r,i)))}if(e>r){let i=o.contentMatchAt(0),s=i.fillBefore(t).append(t);t=s.append(i.matchFragment(s).fillBefore(w.empty,!0))}return t}function $b(t,e,n,r){if(!r.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let o=Zb(t.doc,e,r.type);o!=null&&(e=n=o)}t.replaceRange(e,n,new T(w.from(r),0,0))}function _b(t,e,n){let r=t.doc.resolve(e),o=t.doc.resolve(n),i=ru(r,o);for(let s=0;s<i.length;s++){let l=i[s],c=s==i.length-1;if(c&&l==0||r.node(l).type.contentMatch.validEnd)return t.delete(r.start(l),o.end(l));if(l>0&&(c||r.node(l-1).canReplace(r.index(l-1),o.indexAfter(l-1))))return t.delete(r.before(l),o.after(l))}for(let s=1;s<=r.depth&&s<=o.depth;s++)if(e-r.start(s)==r.depth-s&&n>r.end(s)&&o.end(s)-n!=o.depth-s&&r.start(s-1)==o.start(s-1)&&r.node(s-1).canReplace(r.index(s-1),o.index(s-1)))return t.delete(r.before(s),n);t.delete(e,n)}function ru(t,e){let n=[],r=Math.min(t.depth,e.depth);for(let o=r;o>=0;o--){let i=t.start(o);if(i<t.pos-(t.depth-o)||e.end(o)>e.pos+(e.depth-o)||t.node(o).type.spec.isolating||e.node(o).type.spec.isolating)break;(i==e.start(o)||o==t.depth&&o==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&o&&e.start(o-1)==i-1)&&n.push(o)}return n}class gn extends Ee{constructor(e,n,r){super(),this.pos=e,this.attr=n,this.value=r}apply(e){let n=e.nodeAt(this.pos);if(!n)return de.fail("No node at attribute step's position");let r=Object.create(null);for(let i in n.attrs)r[i]=n.attrs[i];r[this.attr]=this.value;let o=n.type.create(r,null,n.marks);return de.fromReplace(e,this.pos,this.pos+1,new T(w.from(o),0,n.isLeaf?0:1))}getMap(){return Te.empty}invert(e){return new gn(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new gn(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new gn(n.pos,n.attr,n.value)}}Ee.jsonID("attr",gn);class lr extends Ee{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let o in e.attrs)n[o]=e.attrs[o];n[this.attr]=this.value;let r=e.type.create(n,e.content,e.marks);return de.ok(r)}getMap(){return Te.empty}invert(e){return new lr(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new lr(n.attr,n.value)}}Ee.jsonID("docAttr",lr);let vn=class extends Error{};vn=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};vn.prototype=Object.create(Error.prototype);vn.prototype.constructor=vn;vn.prototype.name="TransformError";class qs{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new ar}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new vn(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,n=-1e9;for(let r=0;r<this.mapping.maps.length;r++){let o=this.mapping.maps[r];r&&(e=o.map(e,1),n=o.map(n,-1)),o.forEach((i,s,l,c)=>{e=Math.min(e,l),n=Math.max(n,c)})}return e==1e9?null:{from:e,to:n}}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,r=T.empty){let o=$o(this.doc,e,n,r);return o&&this.step(o),this}replaceWith(e,n,r){return this.replace(e,n,new T(w.from(r),0,0))}delete(e,n){return this.replace(e,n,T.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,r){return Gb(this,e,n,r),this}replaceRangeWith(e,n,r){return $b(this,e,n,r),this}deleteRange(e,n){return _b(this,e,n),this}lift(e,n){return Pb(this,e,n),this}join(e,n=1){return Kb(this,e,n),this}wrap(e,n){return Hb(this,e,n),this}setBlockType(e,n=e,r,o=null){return Qb(this,e,n,r,o),this}setNodeMarkup(e,n,r=null,o){return Fb(this,e,n,r,o),this}setNodeAttribute(e,n,r){return this.step(new gn(e,n,r)),this}setDocAttribute(e,n){return this.step(new lr(e,n)),this}addNodeMark(e,n){return this.step(new kt(e,n)),this}removeNodeMark(e,n){let r=this.doc.nodeAt(e);if(!r)throw new RangeError("No node at position "+e);if(n instanceof J)n.isInSet(r.marks)&&this.step(new Gt(e,n));else{let o=r.marks,i,s=[];for(;i=n.isInSet(o);)s.push(new Gt(e,i)),o=i.removeFromSet(o);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(e,n=1,r){return Ub(this,e,n,r),this}addMark(e,n,r){return Bb(this,e,n,r),this}removeMark(e,n,r){return Rb(this,e,n,r),this}clearIncompatible(e,n,r){return Fs(this,e,n,r),this}}const Ei=Object.create(null);class j{constructor(e,n,r){this.$anchor=e,this.$head=n,this.ranges=r||[new ou(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=T.empty){let r=n.content.lastChild,o=null;for(let l=0;l<n.openEnd;l++)o=r,r=r.lastChild;let i=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:c,$to:d}=s[l],u=e.mapping.slice(i);e.replaceRange(u.map(c.pos),u.map(d.pos),l?T.empty:n),l==0&&bl(e,i,(r?r.isInline:o&&o.isTextblock)?-1:1)}}replaceWith(e,n){let r=e.steps.length,o=this.ranges;for(let i=0;i<o.length;i++){let{$from:s,$to:l}=o[i],c=e.mapping.slice(r),d=c.map(s.pos),u=c.map(l.pos);i?e.deleteRange(d,u):(e.replaceRangeWith(d,u,n),bl(e,r,n.isInline?-1:1))}}static findFrom(e,n,r=!1){let o=e.parent.inlineContent?new P(e):hn(e.node(0),e.parent,e.pos,e.index(),n,r);if(o)return o;for(let i=e.depth-1;i>=0;i--){let s=n<0?hn(e.node(0),e.node(i),e.before(i+1),e.index(i),n,r):hn(e.node(0),e.node(i),e.after(i+1),e.index(i)+1,n,r);if(s)return s}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new De(e.node(0))}static atStart(e){return hn(e,e,0,0,1)||new De(e)}static atEnd(e){return hn(e,e,e.content.size,e.childCount,-1)||new De(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Ei[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in Ei)throw new RangeError("Duplicate use of selection JSON ID "+e);return Ei[e]=n,n.prototype.jsonID=e,n}getBookmark(){return P.between(this.$anchor,this.$head).getBookmark()}}j.prototype.visible=!0;class ou{constructor(e,n){this.$from=e,this.$to=n}}let Al=!1;function gl(t){!Al&&!t.parent.inlineContent&&(Al=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class P extends j{constructor(e,n=e){gl(e),gl(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let r=e.resolve(n.map(this.head));if(!r.parent.inlineContent)return j.near(r);let o=e.resolve(n.map(this.anchor));return new P(o.parent.inlineContent?o:r,r)}replace(e,n=T.empty){if(super.replace(e,n),n==T.empty){let r=this.$from.marksAcross(this.$to);r&&e.ensureMarks(r)}}eq(e){return e instanceof P&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new _o(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new P(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){let o=e.resolve(n);return new this(o,r==n?o:e.resolve(r))}static between(e,n,r){let o=e.pos-n.pos;if((!r||o)&&(r=o>=0?1:-1),!n.parent.inlineContent){let i=j.findFrom(n,r,!0)||j.findFrom(n,-r,!0);if(i)n=i.$head;else return j.near(n,r)}return e.parent.inlineContent||(o==0?e=n:(e=(j.findFrom(e,-r,!0)||j.findFrom(e,r,!0)).$anchor,e.pos<n.pos!=o<0&&(e=n))),new P(e,n)}}j.jsonID("text",P);class _o{constructor(e,n){this.anchor=e,this.head=n}map(e){return new _o(e.map(this.anchor),e.map(this.head))}resolve(e){return P.between(e.resolve(this.anchor),e.resolve(this.head))}}class R extends j{constructor(e){let n=e.nodeAfter,r=e.node(0).resolve(e.pos+n.nodeSize);super(e,r),this.node=n}map(e,n){let{deleted:r,pos:o}=n.mapResult(this.anchor),i=e.resolve(o);return r?j.near(i):new R(i)}content(){return new T(w.from(this.node),0,0)}eq(e){return e instanceof R&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Ks(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new R(e.resolve(n.anchor))}static create(e,n){return new R(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}R.prototype.visible=!1;j.jsonID("node",R);class Ks{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:r}=e.mapResult(this.anchor);return n?new _o(r,r):new Ks(r)}resolve(e){let n=e.resolve(this.anchor),r=n.nodeAfter;return r&&R.isSelectable(r)?new R(n):j.near(n)}}class De extends j{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=T.empty){if(n==T.empty){e.delete(0,e.doc.content.size);let r=j.atStart(e.doc);r.eq(e.selection)||e.setSelection(r)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new De(e)}map(e){return new De(e)}eq(e){return e instanceof De}getBookmark(){return ev}}j.jsonID("all",De);const ev={map(){return this},resolve(t){return new De(t)}};function hn(t,e,n,r,o,i=!1){if(e.inlineContent)return P.create(t,n);for(let s=r-(o>0?0:1);o>0?s<e.childCount:s>=0;s+=o){let l=e.child(s);if(l.isAtom){if(!i&&R.isSelectable(l))return R.create(t,n-(o<0?l.nodeSize:0))}else{let c=hn(t,l,n+o,o<0?l.childCount:0,o,i);if(c)return c}n+=l.nodeSize*o}return null}function bl(t,e,n){let r=t.steps.length-1;if(r<e)return;let o=t.steps[r];if(!(o instanceof fe||o instanceof pe))return;let i=t.mapping.maps[r],s;i.forEach((l,c,d,u)=>{s==null&&(s=u)}),t.setSelection(j.near(t.doc.resolve(s),n))}const vl=1,xr=2,yl=4;class tv extends qs{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|vl)&~xr,this.storedMarks=null,this}get selectionSet(){return(this.updated&vl)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=xr,this}ensureMarks(e){return J.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&xr)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~xr,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let r=this.selection;return n&&(e=e.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||J.none))),r.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,r){let o=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(o.text(e),!0):this.deleteSelection();{if(r==null&&(r=n),!e)return this.deleteRange(n,r);let i=this.storedMarks;if(!i){let s=this.doc.resolve(n);i=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,o.text(e,i)),!this.selection.empty&&this.selection.to==n+e.length&&this.setSelection(j.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=yl,this}get scrolledIntoView(){return(this.updated&yl)>0}}function Cl(t,e){return!e||!t?t:t.bind(e)}class Qn{constructor(e,n,r){this.name=e,this.init=Cl(n.init,r),this.apply=Cl(n.apply,r)}}const nv=[new Qn("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Qn("selection",{init(t,e){return t.selection||j.atStart(e.doc)},apply(t){return t.selection}}),new Qn("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,r){return r.selection.$cursor?t.storedMarks:null}}),new Qn("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Mi{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=nv.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Qn(r.key,r.spec.state,r))})}}class An{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let o=this.config.plugins[r];if(o.spec.filterTransaction&&!o.spec.filterTransaction.call(o,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],r=this.applyInner(e),o=null;for(;;){let i=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let c=o?o[s].n:0,d=o?o[s].state:this,u=c<n.length&&l.spec.appendTransaction.call(l,c?n.slice(c):n,d,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",e),!o){o=[];for(let f=0;f<this.config.plugins.length;f++)o.push(f<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),i=!0}o&&(o[s]={state:r,n:n.length})}}if(!i)return{state:r,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new An(this.config),r=this.config.fields;for(let o=0;o<r.length;o++){let i=r[o];n[i.name]=i.apply(e,this[i.name],this,n)}return n}get tr(){return new tv(this)}static create(e){let n=new Mi(e.doc?e.doc.type.schema:e.schema,e.plugins),r=new An(n);for(let o=0;o<n.fields.length;o++)r[n.fields[o].name]=n.fields[o].init(e,r);return r}reconfigure(e){let n=new Mi(this.schema,e.plugins),r=n.fields,o=new An(n);for(let i=0;i<r.length;i++){let s=r[i].name;o[s]=this.hasOwnProperty(s)?this[s]:r[i].init(e,o)}return o}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(r=>r.toJSON())),e&&typeof e=="object")for(let r in e){if(r=="doc"||r=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let o=e[r],i=o.spec.state;i&&i.toJSON&&(n[r]=i.toJSON.call(o,this[o.key]))}return n}static fromJSON(e,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let o=new Mi(e.schema,e.plugins),i=new An(o);return o.fields.forEach(s=>{if(s.name=="doc")i.doc=Mt.fromJSON(e.schema,n.doc);else if(s.name=="selection")i.selection=j.fromJSON(i.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(i.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(r)for(let l in r){let c=r[l],d=c.spec.state;if(c.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(n,l)){i[s.name]=d.fromJSON.call(c,e,n[l],i);return}}i[s.name]=s.init(e,i)}}),i}}function iu(t,e,n){for(let r in t){let o=t[r];o instanceof Function?o=o.bind(e):r=="handleDOMEvents"&&(o=iu(o,e,{})),n[r]=o}return n}class ne{constructor(e){this.spec=e,this.props={},e.props&&iu(e.props,this,this.props),this.key=e.key?e.key.key:su("plugin")}getState(e){return e[this.key]}}const wi=Object.create(null);function su(t){return t in wi?t+"$"+ ++wi[t]:(wi[t]=0,t+"$")}class ce{constructor(e="key"){this.key=su(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Zs=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function au(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const lu=(t,e,n)=>{let r=au(t,n);if(!r)return!1;let o=Ys(r);if(!o){let s=r.blockRange(),l=s&&Nn(s);return l==null?!1:(e&&e(t.tr.lift(s,l).scrollIntoView()),!0)}let i=o.nodeBefore;if(gu(t,o,e,-1))return!0;if(r.parent.content.size==0&&(yn(i,"end")||R.isSelectable(i)))for(let s=r.depth;;s--){let l=$o(t.doc,r.before(s),r.after(s),T.empty);if(l&&l.slice.size<l.to-l.from){if(e){let c=t.tr.step(l);c.setSelection(yn(i,"end")?j.findFrom(c.doc.resolve(c.mapping.map(o.pos,-1)),-1):R.create(c.doc,o.pos-i.nodeSize)),e(c.scrollIntoView())}return!0}if(s==1||r.node(s-1).childCount>1)break}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),!0):!1},rv=(t,e,n)=>{let r=au(t,n);if(!r)return!1;let o=Ys(r);return o?cu(t,o,e):!1},ov=(t,e,n)=>{let r=uu(t,n);if(!r)return!1;let o=Xs(r);return o?cu(t,o,e):!1};function cu(t,e,n){let r=e.nodeBefore,o=r,i=e.pos-1;for(;!o.isTextblock;i--){if(o.type.spec.isolating)return!1;let u=o.lastChild;if(!u)return!1;o=u}let s=e.nodeAfter,l=s,c=e.pos+1;for(;!l.isTextblock;c++){if(l.type.spec.isolating)return!1;let u=l.firstChild;if(!u)return!1;l=u}let d=$o(t.doc,i,c,T.empty);if(!d||d.from!=i||d instanceof fe&&d.slice.size>=c-i)return!1;if(n){let u=t.tr.step(d);u.setSelection(P.create(u.doc,i)),n(u.scrollIntoView())}return!0}function yn(t,e,n=!1){for(let r=t;r;r=e=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}const du=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):r.parentOffset>0)return!1;i=Ys(r)}let s=i&&i.nodeBefore;return!s||!R.isSelectable(s)?!1:(e&&e(t.tr.setSelection(R.create(t.doc,i.pos-s.nodeSize)).scrollIntoView()),!0)};function Ys(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function uu(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const fu=(t,e,n)=>{let r=uu(t,n);if(!r)return!1;let o=Xs(r);if(!o)return!1;let i=o.nodeAfter;if(gu(t,o,e,1))return!0;if(r.parent.content.size==0&&(yn(i,"start")||R.isSelectable(i))){let s=$o(t.doc,r.before(),r.after(),T.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=t.tr.step(s);l.setSelection(yn(i,"start")?j.findFrom(l.doc.resolve(l.mapping.map(o.pos)),1):R.create(l.doc,l.mapping.map(o.pos))),e(l.scrollIntoView())}return!0}}return i.isAtom&&o.depth==r.depth-1?(e&&e(t.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),!0):!1},hu=(t,e,n)=>{let{$head:r,empty:o}=t.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):r.parentOffset<r.parent.content.size)return!1;i=Xs(r)}let s=i&&i.nodeAfter;return!s||!R.isSelectable(s)?!1:(e&&e(t.tr.setSelection(R.create(t.doc,i.pos)).scrollIntoView()),!0)};function Xs(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const iv=(t,e)=>{let n=t.selection,r=n instanceof R,o;if(r){if(n.node.isTextblock||!Dt(t.doc,n.from))return!1;o=n.from}else if(o=Go(t.doc,n.from,-1),o==null)return!1;if(e){let i=t.tr.join(o);r&&i.setSelection(R.create(i.doc,o-t.doc.resolve(o).nodeBefore.nodeSize)),e(i.scrollIntoView())}return!0},sv=(t,e)=>{let n=t.selection,r;if(n instanceof R){if(n.node.isTextblock||!Dt(t.doc,n.to))return!1;r=n.to}else if(r=Go(t.doc,n.to,1),r==null)return!1;return e&&e(t.tr.join(r).scrollIntoView()),!0},av=(t,e)=>{let{$from:n,$to:r}=t.selection,o=n.blockRange(r),i=o&&Nn(o);return i==null?!1:(e&&e(t.tr.lift(o,i).scrollIntoView()),!0)},pu=(t,e)=>{let{$head:n,$anchor:r}=t.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(e&&e(t.tr.insertText(`
|
|
17
|
+
`).scrollIntoView()),!0)};function Js(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const lv=(t,e)=>{let{$head:n,$anchor:r}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Js(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(e){let l=n.after(),c=t.tr.replaceWith(l,l,s.createAndFill());c.setSelection(j.near(c.doc.resolve(l),1)),e(c.scrollIntoView())}return!0},mu=(t,e)=>{let n=t.selection,{$from:r,$to:o}=n;if(n instanceof De||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Js(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(e){let s=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,l=t.tr.insert(s,i.createAndFill());l.setSelection(P.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Au=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let i=n.before();if(lt(t.doc,i))return e&&e(t.tr.split(i).scrollIntoView()),!0}let r=n.blockRange(),o=r&&Nn(r);return o==null?!1:(e&&e(t.tr.lift(r,o).scrollIntoView()),!0)};function cv(t){return(e,n)=>{let{$from:r,$to:o}=e.selection;if(e.selection instanceof R&&e.selection.node.isBlock)return!r.parentOffset||!lt(e.doc,r.pos)?!1:(n&&n(e.tr.split(r.pos).scrollIntoView()),!0);if(!r.depth)return!1;let i=[],s,l,c=!1,d=!1;for(let p=r.depth;;p--)if(r.node(p).isBlock){c=r.end(p)==r.pos+(r.depth-p),d=r.start(p)==r.pos-(r.depth-p),l=Js(r.node(p-1).contentMatchAt(r.indexAfter(p-1))),i.unshift(c&&l?{type:l}:null),s=p;break}else{if(p==1)return!1;i.unshift(null)}let u=e.tr;(e.selection instanceof P||e.selection instanceof De)&&u.deleteSelection();let f=u.mapping.map(r.pos),h=lt(u.doc,f,i.length,i);if(h||(i[0]=l?{type:l}:null,h=lt(u.doc,f,i.length,i)),!h)return!1;if(u.split(f,i.length,i),!c&&d&&r.node(s).type!=l){let p=u.mapping.map(r.before(s)),m=u.doc.resolve(p);l&&r.node(s-1).canReplaceWith(m.index(),m.index()+1,l)&&u.setNodeMarkup(u.mapping.map(r.before(s)),l)}return n&&n(u.scrollIntoView()),!0}}const dv=cv(),uv=(t,e)=>{let{$from:n,to:r}=t.selection,o,i=n.sharedDepth(r);return i==0?!1:(o=n.before(i),e&&e(t.tr.setSelection(R.create(t.doc,o))),!0)};function fv(t,e,n){let r=e.nodeBefore,o=e.nodeAfter,i=e.index();return!r||!o||!r.type.compatibleContent(o.type)?!1:!r.content.size&&e.parent.canReplace(i-1,i)?(n&&n(t.tr.delete(e.pos-r.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(i,i+1)||!(o.isTextblock||Dt(t.doc,e.pos))?!1:(n&&n(t.tr.join(e.pos).scrollIntoView()),!0)}function gu(t,e,n,r){let o=e.nodeBefore,i=e.nodeAfter,s,l,c=o.type.spec.isolating||i.type.spec.isolating;if(!c&&fv(t,e,n))return!0;let d=!c&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=o.contentMatchAt(o.childCount)).findWrapping(i.type))&&l.matchType(s[0]||i.type).validEnd){if(n){let p=e.pos+i.nodeSize,m=w.empty;for(let b=s.length-1;b>=0;b--)m=w.from(s[b].create(null,m));m=w.from(o.copy(m));let A=t.tr.step(new pe(e.pos-1,p,e.pos,p,new T(m,1,0),s.length,!0)),g=A.doc.resolve(p+2*s.length);g.nodeAfter&&g.nodeAfter.type==o.type&&Dt(A.doc,g.pos)&&A.join(g.pos),n(A.scrollIntoView())}return!0}let u=i.type.spec.isolating||r>0&&c?null:j.findFrom(e,1),f=u&&u.$from.blockRange(u.$to),h=f&&Nn(f);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(f,h).scrollIntoView()),!0;if(d&&yn(i,"start",!0)&&yn(o,"end")){let p=o,m=[];for(;m.push(p),!p.isTextblock;)p=p.lastChild;let A=i,g=1;for(;!A.isTextblock;A=A.firstChild)g++;if(p.canReplace(p.childCount,p.childCount,A.content)){if(n){let b=w.empty;for(let y=m.length-1;y>=0;y--)b=w.from(m[y].copy(b));let v=t.tr.step(new pe(e.pos-m.length,e.pos+i.nodeSize,e.pos+g,e.pos+i.nodeSize-g,new T(b,m.length,0),0,!0));n(v.scrollIntoView())}return!0}}return!1}function bu(t){return function(e,n){let r=e.selection,o=t<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return o.node(i).isTextblock?(n&&n(e.tr.setSelection(P.create(e.doc,t<0?o.start(i):o.end(i)))),!0):!1}}const hv=bu(-1),pv=bu(1);function mv(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),l=s&&Us(s,t,e);return l?(r&&r(n.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Il(t,e=null){return function(n,r){let o=!1;for(let i=0;i<n.selection.ranges.length&&!o;i++){let{$from:{pos:s},$to:{pos:l}}=n.selection.ranges[i];n.doc.nodesBetween(s,l,(c,d)=>{if(o)return!1;if(!(!c.isTextblock||c.hasMarkup(t,e)))if(c.type==t)o=!0;else{let u=n.doc.resolve(d),f=u.index();o=u.parent.canReplaceWith(f,f+1,t)}})}if(!o)return!1;if(r){let i=n.tr;for(let s=0;s<n.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:c}}=n.selection.ranges[s];i.setBlockType(l,c,t,e)}r(i.scrollIntoView())}return!0}}function Gs(...t){return function(e,n,r){for(let o=0;o<t.length;o++)if(t[o](e,n,r))return!0;return!1}}Gs(Zs,lu,du);Gs(Zs,fu,hu);Gs(pu,mu,Au,dv);typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Av(t,e=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i);if(!s)return!1;let l=r?n.tr:null;return gv(l,s,t,e)?(r&&r(l.scrollIntoView()),!0):!1}}function gv(t,e,n,r=null){let o=!1,i=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(n)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let c=s.resolve(e.start-2);i=new io(c,c,e.depth),e.endIndex<e.parent.childCount&&(e=new io(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),o=!0}let l=Us(i,n,r,e);return l?(t&&bv(t,e,l,o,n),!0):!1}function bv(t,e,n,r,o){let i=w.empty;for(let u=n.length-1;u>=0;u--)i=w.from(n[u].type.create(n[u].attrs,i));t.step(new pe(e.start-(r?2:0),e.end,e.start,e.end,new T(i,0,0),n.length,!0));let s=0;for(let u=0;u<n.length;u++)n[u].type==o&&(s=u+1);let l=n.length-s,c=e.start+n.length-(r?2:0),d=e.parent;for(let u=e.startIndex,f=e.endIndex,h=!0;u<f;u++,h=!1)!h&<(t.doc,c,l)&&(t.split(c,l),c+=2*l),c+=d.child(u).nodeSize;return t}function vv(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,s=>s.childCount>0&&s.firstChild.type==t);return i?n?r.node(i.depth-1).type==t?yv(e,n,t,i):Cv(e,n,i):!0:!1}}function yv(t,e,n,r){let o=t.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new pe(i-1,s,i,s,new T(w.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new io(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));const l=Nn(r);if(l==null)return!1;o.lift(r,l);let c=o.doc.resolve(o.mapping.map(i,-1)-1);return Dt(o.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&o.join(c.pos),e(o.scrollIntoView()),!0}function Cv(t,e,n){let r=t.tr,o=n.parent;for(let p=n.end,m=n.endIndex-1,A=n.startIndex;m>A;m--)p-=o.child(m).nodeSize,r.delete(p-1,p+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let l=n.startIndex==0,c=n.endIndex==o.childCount,d=i.node(-1),u=i.index(-1);if(!d.canReplace(u+(l?0:1),u+1,s.content.append(c?w.empty:w.from(o))))return!1;let f=i.pos,h=f+s.nodeSize;return r.step(new pe(f-(l?1:0),h+(c?1:0),f+1,h-1,new T((l?w.empty:w.from(o.copy(w.empty))).append(c?w.empty:w.from(o.copy(w.empty))),l?0:1,c?0:1),l?0:1)),e(r.scrollIntoView()),!0}function Iv(t){return function(e,n){let{$from:r,$to:o}=e.selection,i=r.blockRange(o,d=>d.childCount>0&&d.firstChild.type==t);if(!i)return!1;let s=i.startIndex;if(s==0)return!1;let l=i.parent,c=l.child(s-1);if(c.type!=t)return!1;if(n){let d=c.lastChild&&c.lastChild.type==l.type,u=w.from(d?t.create():null),f=new T(w.from(t.create(null,w.from(l.type.create(null,u)))),d?3:1,0),h=i.start,p=i.end;n(e.tr.step(new pe(h-(d?3:1),p,h,p,f,1,!0)).scrollIntoView())}return!0}}const be=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Cn=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ts=null;const st=function(t,e,n){let r=ts||(ts=document.createRange());return r.setEnd(t,n??t.nodeValue.length),r.setStart(t,e||0),r},kv=function(){ts=null},$t=function(t,e,n,r){return n&&(kl(t,e,n,r,-1)||kl(t,e,n,r,1))},Ev=/^(img|br|input|textarea|hr)$/i;function kl(t,e,n,r,o){for(var i;;){if(t==n&&e==r)return!0;if(e==(o<0?0:Ve(t))){let s=t.parentNode;if(!s||s.nodeType!=1||yr(t)||Ev.test(t.nodeName)||t.contentEditable=="false")return!1;e=be(t)+(o<0?0:1),t=s}else if(t.nodeType==1){let s=t.childNodes[e+(o<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((i=s.pmViewDesc)===null||i===void 0)&&i.ignoreForSelection)e+=o;else return!1;else t=s,e=o<0?Ve(t):0}else return!1}}function Ve(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Mv(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=Ve(t)}else if(t.parentNode&&!yr(t))e=be(t),t=t.parentNode;else return null}}function wv(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!yr(t))e=be(t)+1,t=t.parentNode;else return null}}function Nv(t,e,n){for(let r=e==0,o=e==Ve(t);r||o;){if(t==n)return!0;let i=be(t);if(t=t.parentNode,!t)return!1;r=r&&i==0,o=o&&i==Ve(t)}}function yr(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const ei=function(t){return t.focusNode&&$t(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Pt(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function xv(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Sv(t,e,n){if(t.caretPositionFromPoint)try{let r=t.caretPositionFromPoint(e,n);if(r)return{node:r.offsetNode,offset:Math.min(Ve(r.offsetNode),r.offset)}}catch{}if(t.caretRangeFromPoint){let r=t.caretRangeFromPoint(e,n);if(r)return{node:r.startContainer,offset:Math.min(Ve(r.startContainer),r.startOffset)}}}const $e=typeof navigator<"u"?navigator:null,El=typeof document<"u"?document:null,Ot=$e&&$e.userAgent||"",ns=/Edge\/(\d+)/.exec(Ot),vu=/MSIE \d/.exec(Ot),rs=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ot),Se=!!(vu||rs||ns),Nt=vu?document.documentMode:rs?+rs[1]:ns?+ns[1]:0,je=!Se&&/gecko\/(\d+)/i.test(Ot);je&&+(/Firefox\/(\d+)/.exec(Ot)||[0,0])[1];const is=!Se&&/Chrome\/(\d+)/.exec(Ot),ye=!!is,yu=is?+is[1]:0,Ie=!Se&&!!$e&&/Apple Computer/.test($e.vendor),In=Ie&&(/Mobile\/\w+/.test(Ot)||!!$e&&$e.maxTouchPoints>2),Pe=In||($e?/Mac/.test($e.platform):!1),Cu=$e?/Win/.test($e.platform):!1,at=/Android \d/.test(Ot),Cr=!!El&&"webkitFontSmoothing"in El.documentElement.style,Tv=Cr?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function Lv(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function tt(t,e){return typeof t=="number"?t:t[e]}function Dv(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,r=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*r}}function Ml(t,e,n){let r=t.someProp("scrollThreshold")||0,o=t.someProp("scrollMargin")||5,i=t.dom.ownerDocument;for(let s=n||t.dom;s;){if(s.nodeType!=1){s=Cn(s);continue}let l=s,c=l==i.body,d=c?Lv(i):Dv(l),u=0,f=0;if(e.top<d.top+tt(r,"top")?f=-(d.top-e.top+tt(o,"top")):e.bottom>d.bottom-tt(r,"bottom")&&(f=e.bottom-e.top>d.bottom-d.top?e.top+tt(o,"top")-d.top:e.bottom-d.bottom+tt(o,"bottom")),e.left<d.left+tt(r,"left")?u=-(d.left-e.left+tt(o,"left")):e.right>d.right-tt(r,"right")&&(u=e.right-d.right+tt(o,"right")),u||f)if(c)i.defaultView.scrollBy(u,f);else{let p=l.scrollLeft,m=l.scrollTop;f&&(l.scrollTop+=f),u&&(l.scrollLeft+=u);let A=l.scrollLeft-p,g=l.scrollTop-m;e={left:e.left-A,top:e.top-g,right:e.right-A,bottom:e.bottom-g}}let h=c?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(h))break;s=h=="absolute"?s.offsetParent:Cn(s)}}function Ov(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),r,o;for(let i=(e.left+e.right)/2,s=n+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=t.root.elementFromPoint(i,s);if(!l||l==t.dom||!t.dom.contains(l))continue;let c=l.getBoundingClientRect();if(c.top>=n-20){r=l,o=c.top;break}}return{refDOM:r,refTop:o,stack:Iu(t.dom)}}function Iu(t){let e=[],n=t.ownerDocument;for(let r=t;r&&(e.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),t!=n);r=Cn(r));return e}function Bv({refDOM:t,refTop:e,stack:n}){let r=t?t.getBoundingClientRect().top:0;ku(n,r==0?0:r-e)}function ku(t,e){for(let n=0;n<t.length;n++){let{dom:r,top:o,left:i}=t[n];r.scrollTop!=o+e&&(r.scrollTop=o+e),r.scrollLeft!=i&&(r.scrollLeft=i)}}let un=null;function Rv(t){if(t.setActive)return t.setActive();if(un)return t.focus(un);let e=Iu(t);t.focus(un==null?{get preventScroll(){return un={preventScroll:!0},!0}}:void 0),un||(un=!1,ku(e,0))}function Eu(t,e){let n,r=2e8,o,i=0,s=e.top,l=e.top,c,d;for(let u=t.firstChild,f=0;u;u=u.nextSibling,f++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=st(u).getClientRects();else continue;for(let p=0;p<h.length;p++){let m=h[p];if(m.top<=s&&m.bottom>=l){s=Math.max(m.bottom,s),l=Math.min(m.top,l);let A=m.left>e.left?m.left-e.left:m.right<e.left?e.left-m.right:0;if(A<r){n=u,r=A,o=A&&n.nodeType==3?{left:m.right<e.left?m.right:m.left,top:e.top}:e,u.nodeType==1&&A&&(i=f+(e.left>=(m.left+m.right)/2?1:0));continue}}else m.top>e.top&&!c&&m.left<=e.left&&m.right>=e.left&&(c=u,d={left:Math.max(m.left,Math.min(m.right,e.left)),top:m.top});!n&&(e.left>=m.right&&e.top>=m.top||e.left>=m.left&&e.top>=m.bottom)&&(i=f+1)}}return!n&&c&&(n=c,o=d,r=0),n&&n.nodeType==3?zv(n,o):!n||r&&n.nodeType==1?{node:t,offset:i}:Eu(n,o)}function zv(t,e){let n=t.nodeValue.length,r=document.createRange(),o;for(let i=0;i<n;i++){r.setEnd(t,i+1),r.setStart(t,i);let s=mt(r,1);if(s.top!=s.bottom&&$s(e,s)){o={node:t,offset:i+(e.left>=(s.left+s.right)/2?1:0)};break}}return r.detach(),o||{node:t,offset:0}}function $s(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function Pv(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function Vv(t,e,n){let{node:r,offset:o}=Eu(e,n),i=-1;if(r.nodeType==1&&!r.firstChild){let s=r.getBoundingClientRect();i=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return t.docView.posFromDOM(r,o,i)}function jv(t,e,n,r){let o=-1;for(let i=e,s=!1;i!=t.dom;){let l=t.docView.nearestDesc(i,!0),c;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((c=l.dom.getBoundingClientRect()).width||c.height)&&(l.node.isBlock&&l.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(l.dom.nodeName)&&(!s&&c.left>r.left||c.top>r.top?o=l.posBefore:(!s&&c.right<r.left||c.bottom<r.top)&&(o=l.posAfter),s=!0),!l.contentDOM&&o<0&&!l.node.isText))return(l.node.isBlock?r.top<(c.top+c.bottom)/2:r.left<(c.left+c.right)/2)?l.posBefore:l.posAfter;i=l.dom.parentNode}return o>-1?o:t.docView.posFromDOM(e,n,-1)}function Mu(t,e,n){let r=t.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(e.top-n.top)/(n.bottom-n.top))-2)),i=o;;){let s=t.childNodes[i];if(s.nodeType==1){let l=s.getClientRects();for(let c=0;c<l.length;c++){let d=l[c];if($s(e,d))return Mu(s,e,d)}}if((i=(i+1)%r)==o)break}return t}function Hv(t,e){let n=t.dom.ownerDocument,r,o=0,i=Sv(n,e.left,e.top);i&&({node:r,offset:o}=i);let s=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),l;if(!s||!t.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=t.dom.getBoundingClientRect();if(!$s(e,d)||(s=Mu(t.dom,e,d),!s))return null}if(Ie)for(let d=s;r&&d;d=Cn(d))d.draggable&&(r=void 0);if(s=Pv(s,e),r){if(je&&r.nodeType==1&&(o=Math.min(o,r.childNodes.length),o<r.childNodes.length)){let u=r.childNodes[o],f;u.nodeName=="IMG"&&(f=u.getBoundingClientRect()).right<=e.left&&f.bottom>e.top&&o++}let d;Cr&&o&&r.nodeType==1&&(d=r.childNodes[o-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&o--,r==t.dom&&o==r.childNodes.length-1&&r.lastChild.nodeType==1&&e.top>r.lastChild.getBoundingClientRect().bottom?l=t.state.doc.content.size:(o==0||r.nodeType!=1||r.childNodes[o-1].nodeName!="BR")&&(l=jv(t,r,o,e))}l==null&&(l=Vv(t,s,e));let c=t.docView.nearestDesc(s,!0);return{pos:l,inside:c?c.posAtStart-c.border:-1}}function wl(t){return t.top<t.bottom||t.left<t.right}function mt(t,e){let n=t.getClientRects();if(n.length){let r=n[e<0?0:n.length-1];if(wl(r))return r}return Array.prototype.find.call(n,wl)||t.getBoundingClientRect()}const Qv=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function wu(t,e,n){let{node:r,offset:o,atom:i}=t.docView.domFromPos(e,n<0?-1:1),s=Cr||je;if(r.nodeType==3)if(s&&(Qv.test(r.nodeValue)||(n<0?!o:o==r.nodeValue.length))){let c=mt(st(r,o,o),n);if(je&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let d=mt(st(r,o-1,o-1),-1);if(d.top==c.top){let u=mt(st(r,o,o+1),-1);if(u.top!=c.top)return Rn(u,u.left<d.left)}}return c}else{let c=o,d=o,u=n<0?1:-1;return n<0&&!o?(d++,u=-1):n>=0&&o==r.nodeValue.length?(c--,u=1):n<0?c--:d++,Rn(mt(st(r,c,d),u),u<0)}if(!t.state.doc.resolve(e-(i||0)).parent.inlineContent){if(i==null&&o&&(n<0||o==Ve(r))){let c=r.childNodes[o-1];if(c.nodeType==1)return Ni(c.getBoundingClientRect(),!1)}if(i==null&&o<Ve(r)){let c=r.childNodes[o];if(c.nodeType==1)return Ni(c.getBoundingClientRect(),!0)}return Ni(r.getBoundingClientRect(),n>=0)}if(i==null&&o&&(n<0||o==Ve(r))){let c=r.childNodes[o-1],d=c.nodeType==3?st(c,Ve(c)-(s?0:1)):c.nodeType==1&&(c.nodeName!="BR"||!c.nextSibling)?c:null;if(d)return Rn(mt(d,1),!1)}if(i==null&&o<Ve(r)){let c=r.childNodes[o];for(;c.pmViewDesc&&c.pmViewDesc.ignoreForCoords;)c=c.nextSibling;let d=c?c.nodeType==3?st(c,0,s?0:1):c.nodeType==1?c:null:null;if(d)return Rn(mt(d,-1),!0)}return Rn(mt(r.nodeType==3?st(r):r,-n),n>=0)}function Rn(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Ni(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function Nu(t,e,n){let r=t.state,o=t.root.activeElement;r!=e&&t.updateState(e),o!=t.dom&&t.focus();try{return n()}finally{r!=e&&t.updateState(r),o!=t.dom&&o&&o.focus()}}function Wv(t,e,n){let r=e.selection,o=n=="up"?r.$from:r.$to;return Nu(t,e,()=>{let{node:i}=t.docView.domFromPos(o.pos,n=="up"?-1:1);for(;;){let l=t.docView.nearestDesc(i,!0);if(!l)break;if(l.node.isBlock){i=l.contentDOM||l.dom;break}i=l.dom.parentNode}let s=wu(t,o.pos,1);for(let l=i.firstChild;l;l=l.nextSibling){let c;if(l.nodeType==1)c=l.getClientRects();else if(l.nodeType==3)c=st(l,0,l.nodeValue.length).getClientRects();else continue;for(let d=0;d<c.length;d++){let u=c[d];if(u.bottom>u.top+1&&(n=="up"?s.top-u.top>(u.bottom-s.top)*2:u.bottom-s.bottom>(s.bottom-u.top)*2))return!1}}return!0})}const Fv=/[\u0590-\u08ac]/;function Uv(t,e,n){let{$head:r}=e.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,i=!o,s=o==r.parent.content.size,l=t.domSelection();return l?!Fv.test(r.parent.textContent)||!l.modify?n=="left"||n=="backward"?i:s:Nu(t,e,()=>{let{focusNode:c,focusOffset:d,anchorNode:u,anchorOffset:f}=t.domSelectionRange(),h=l.caretBidiLevel;l.modify("move",n,"character");let p=r.depth?t.docView.domAfterPos(r.before()):t.dom,{focusNode:m,focusOffset:A}=t.domSelectionRange(),g=m&&!p.contains(m.nodeType==1?m:m.parentNode)||c==m&&d==A;try{l.collapse(u,f),c&&(c!=u||d!=f)&&l.extend&&l.extend(c,d)}catch{}return h!=null&&(l.caretBidiLevel=h),g}):r.pos==r.start()||r.pos==r.end()}let Nl=null,xl=null,Sl=!1;function qv(t,e,n){return Nl==e&&xl==n?Sl:(Nl=e,xl=n,Sl=n=="up"||n=="down"?Wv(t,e,n):Uv(t,e,n))}const He=0,Tl=1,jt=2,_e=3;class Ir{constructor(e,n,r,o){this.parent=e,this.children=n,this.dom=r,this.contentDOM=o,this.dirty=He,r.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,r){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,r=this.posAtStart;;n++){let o=this.children[n];if(o==e)return r;r+=o.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,r){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(r<0){let i,s;if(e==this.contentDOM)i=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.previousSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.previousSibling;return i?this.posBeforeChild(s)+s.size:this.posAtStart}else{let i,s;if(e==this.contentDOM)i=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;i=e.nextSibling}for(;i&&!((s=i.pmViewDesc)&&s.parent==this);)i=i.nextSibling;return i?this.posBeforeChild(s):this.posAtEnd}let o;if(e==this.dom&&this.contentDOM)o=n>be(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))o=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!1;break}if(i.previousSibling)break}if(o==null&&n==e.childNodes.length)for(let i=e;;i=i.parentNode){if(i==this.dom){o=!0;break}if(i.nextSibling)break}}return o??r>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let r=!0,o=e;o;o=o.parentNode){let i=this.getDesc(o),s;if(i&&(!n||i.node))if(r&&(s=i.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))r=!1;else return i}}getDesc(e){let n=e.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(e,n,r){for(let o=e;o;o=o.parentNode){let i=this.getDesc(o);if(i)return i.localPosFromDOM(e,n,r)}return-1}descAt(e){for(let n=0,r=0;n<this.children.length;n++){let o=this.children[n],i=r+o.size;if(r==e&&i!=r){for(;!o.border&&o.children.length;)for(let s=0;s<o.children.length;s++){let l=o.children[s];if(l.size){o=l;break}}return o}if(e<i)return o.descAt(e-r-o.border);r=i}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let r=0,o=0;for(let i=0;r<this.children.length;r++){let s=this.children[r],l=i+s.size;if(l>e||s instanceof Su){o=e-i;break}i=l}if(o)return this.children[r].domFromPos(o-this.children[r].border,n);for(let i;r&&!(i=this.children[r-1]).size&&i instanceof xu&&i.side>=0;r--);if(n<=0){let i,s=!0;for(;i=r?this.children[r-1]:null,!(!i||i.dom.parentNode==this.contentDOM);r--,s=!1);return i&&n&&s&&!i.border&&!i.domAtom?i.domFromPos(i.size,n):{node:this.contentDOM,offset:i?be(i.dom)+1:0}}else{let i,s=!0;for(;i=r<this.children.length?this.children[r]:null,!(!i||i.dom.parentNode==this.contentDOM);r++,s=!1);return i&&s&&!i.border&&!i.domAtom?i.domFromPos(0,n):{node:this.contentDOM,offset:i?be(i.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let o=-1,i=-1;for(let s=r,l=0;;l++){let c=this.children[l],d=s+c.size;if(o==-1&&e<=d){let u=s+c.border;if(e>=u&&n<=d-c.border&&c.node&&c.contentDOM&&this.contentDOM.contains(c.contentDOM))return c.parseRange(e,n,u);e=s;for(let f=l;f>0;f--){let h=this.children[f-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){o=be(h.dom)+1;break}e-=h.size}o==-1&&(o=0)}if(o>-1&&(d>n||l==this.children.length-1)){n=d;for(let u=l+1;u<this.children.length;u++){let f=this.children[u];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(-1)){i=be(f.dom);break}n+=f.size}i==-1&&(i=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:n,fromOffset:o,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:r}=this.domFromPos(e,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[r]}setSelection(e,n,r,o=!1){let i=Math.min(e,n),s=Math.max(e,n);for(let p=0,m=0;p<this.children.length;p++){let A=this.children[p],g=m+A.size;if(i>m&&s<g)return A.setSelection(e-m-A.border,n-m-A.border,r,o);m=g}let l=this.domFromPos(e,e?-1:1),c=n==e?l:this.domFromPos(n,n?-1:1),d=r.root.getSelection(),u=r.domSelectionRange(),f=!1;if((je||Ie)&&e==n){let{node:p,offset:m}=l;if(p.nodeType==3){if(f=!!(m&&p.nodeValue[m-1]==`
|
|
18
|
+
`),f&&m==p.nodeValue.length)for(let A=p,g;A;A=A.parentNode){if(g=A.nextSibling){g.nodeName=="BR"&&(l=c={node:g.parentNode,offset:be(g)+1});break}let b=A.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let A=p.childNodes[m-1];f=A&&(A.nodeName=="BR"||A.contentEditable=="false")}}if(je&&u.focusNode&&u.focusNode!=c.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(o=!0)}if(!(o||f&&Ie)&&$t(l.node,l.offset,u.anchorNode,u.anchorOffset)&&$t(c.node,c.offset,u.focusNode,u.focusOffset))return;let h=!1;if((d.extend||e==n)&&!(f&&je)){d.collapse(l.node,l.offset);try{e!=n&&d.extend(c.node,c.offset),h=!0}catch{}}if(!h){if(e>n){let m=l;l=c,c=m}let p=document.createRange();p.setEnd(c.node,c.offset),p.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(p)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let r=0,o=0;o<this.children.length;o++){let i=this.children[o],s=r+i.size;if(r==s?e<=s&&n>=r:e<s&&n>r){let l=r+i.border,c=s-i.border;if(e>=l&&n<=c){this.dirty=e==r||n==s?jt:Tl,e==l&&n==c&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=_e:i.markDirty(e-l,n-l);return}else i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?jt:_e}r=s}this.dirty=jt}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let r=e==1?jt:Tl;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class xu extends Ir{constructor(e,n,r,o){let i,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>{if(!i)return o;if(i.parent)return i.parent.posBeforeChild(i)})),!n.type.spec.raw){if(s.nodeType!=1){let l=document.createElement("span");l.appendChild(s),s=l}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(e,[],s,null),this.widget=n,this.widget=n,i=this}matchesWidget(e){return this.dirty==He&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class Kv extends Ir{constructor(e,n,r,o){super(e,[],n,null),this.textDOM=r,this.text=o}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class _t extends Ir{constructor(e,n,r,o,i){super(e,[],r,o),this.mark=n,this.spec=i}static create(e,n,r,o){let i=o.nodeViews[n.type.name],s=i&&i(n,o,r);return(!s||!s.dom)&&(s=rn.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new _t(e,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&_e||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=_e&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=He){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=He}}slice(e,n,r){let o=_t.create(this.parent,this.mark,!0,r),i=this.children,s=this.size;n<s&&(i=as(i,n,s,r)),e>0&&(i=as(i,0,e,r));for(let l=0;l<i.length;l++)i[l].parent=o;return o.children=i,o}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class xt extends Ir{constructor(e,n,r,o,i,s,l,c,d){super(e,[],i,s),this.node=n,this.outerDeco=r,this.innerDeco=o,this.nodeDOM=l}static create(e,n,r,o,i,s){let l=i.nodeViews[n.type.name],c,d=l&&l(n,i,()=>{if(!c)return s;if(c.parent)return c.parent.posBeforeChild(c)},r,o),u=d&&d.dom,f=d&&d.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:f}=rn.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!f&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=Du(u,r,n),d?c=new Zv(e,n,r,o,u,f||null,h,d,i,s+1):n.isText?new ti(e,n,r,o,u,h,i):new xt(e,n,r,o,u,f||null,h,i,s+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){e.contentElement=r.dom.parentNode;break}}e.contentElement||(e.getContent=()=>w.empty)}return e}matchesNode(e,n,r){return this.dirty==He&&e.eq(this.node)&&ao(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let r=this.node.inlineContent,o=n,i=e.composing?this.localCompositionInfo(e,n):null,s=i&&i.pos>-1?i:null,l=i&&i.pos<0,c=new Xv(this,s&&s.node,e);$v(this.node,this.innerDeco,(d,u,f)=>{d.spec.marks?c.syncToMarks(d.spec.marks,r,e,u):d.type.side>=0&&!f&&c.syncToMarks(u==this.node.childCount?J.none:this.node.child(u).marks,r,e,u),c.placeWidget(d,e,o)},(d,u,f,h)=>{c.syncToMarks(d.marks,r,e,h);let p;c.findNodeMatch(d,u,f,h)||l&&e.state.selection.from>o&&e.state.selection.to<o+d.nodeSize&&(p=c.findIndexWithChild(i.node))>-1&&c.updateNodeAt(d,u,f,p,e)||c.updateNextNode(d,u,f,e,h,o)||c.addNode(d,u,f,e,o),o+=d.nodeSize}),c.syncToMarks([],r,e,0),this.node.isTextblock&&c.addTextblockHacks(),c.destroyRest(),(c.changed||this.dirty==jt)&&(s&&this.protectLocalComposition(e,s),Tu(this.contentDOM,this.children,e),In&&_v(this.dom))}localCompositionInfo(e,n){let{from:r,to:o}=e.state.selection;if(!(e.state.selection instanceof P)||r<n||o>n+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let s=i.nodeValue,l=ey(this.node.content,s,r-n,o-n);return l<0?null:{node:i,pos:l,text:s}}else return{node:i,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:r,text:o}){if(this.getDesc(n))return;let i=n;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let s=new Kv(this,i,n,o);e.input.compositionNodes.push(s),this.children=as(this.children,r,r+o.length,e,s)}update(e,n,r,o){return this.dirty==_e||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,r,o),!0)}updateInner(e,n,r,o){this.updateOuterDeco(n),this.node=e,this.innerDeco=r,this.contentDOM&&this.updateChildren(o,this.posAtStart),this.dirty=He}updateOuterDeco(e){if(ao(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=Lu(this.dom,this.nodeDOM,ss(this.outerDeco,this.node,n),ss(e,this.node,n)),this.dom!=r&&(r.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function Ll(t,e,n,r,o){Du(r,e,t);let i=new xt(void 0,t,e,n,r,r,r,o,0);return i.contentDOM&&i.updateChildren(o,0),i}class ti extends xt{constructor(e,n,r,o,i,s,l){super(e,n,r,o,i,null,s,l,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,r,o){return this.dirty==_e||this.dirty!=He&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=He||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,o.trackWrites==this.nodeDOM&&(o.trackWrites=null)),this.node=e,this.dirty=He,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,r){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,r)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,r){let o=this.node.cut(e,n),i=document.createTextNode(o.text);return new ti(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=_e)}get domAtom(){return!1}isText(e){return this.node.text==e}}class Su extends Ir{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==He&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class Zv extends xt{constructor(e,n,r,o,i,s,l,c,d,u){super(e,n,r,o,i,s,l,d,u),this.spec=c}update(e,n,r,o){if(this.dirty==_e)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,n,r);return i&&this.updateInner(e,n,r,o),i}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,r,o)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,r,o){this.spec.setSelection?this.spec.setSelection(e,n,r.root):super.setSelection(e,n,r,o)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function Tu(t,e,n){let r=t.firstChild,o=!1;for(let i=0;i<e.length;i++){let s=e[i],l=s.dom;if(l.parentNode==t){for(;l!=r;)r=Dl(r),o=!0;r=r.nextSibling}else o=!0,t.insertBefore(l,r);if(s instanceof _t){let c=r?r.previousSibling:t.lastChild;Tu(s.contentDOM,s.children,n),r=c?c.nextSibling:t.firstChild}}for(;r;)r=Dl(r),o=!0;o&&n.trackWrites==t&&(n.trackWrites=null)}const Xn=function(t){t&&(this.nodeName=t)};Xn.prototype=Object.create(null);const Ht=[new Xn];function ss(t,e,n){if(t.length==0)return Ht;let r=n?Ht[0]:new Xn,o=[r];for(let i=0;i<t.length;i++){let s=t[i].type.attrs;if(s){s.nodeName&&o.push(r=new Xn(s.nodeName));for(let l in s){let c=s[l];c!=null&&(n&&o.length==1&&o.push(r=new Xn(e.isInline?"span":"div")),l=="class"?r.class=(r.class?r.class+" ":"")+c:l=="style"?r.style=(r.style?r.style+";":"")+c:l!="nodeName"&&(r[l]=c))}}}return o}function Lu(t,e,n,r){if(n==Ht&&r==Ht)return e;let o=e;for(let i=0;i<r.length;i++){let s=r[i],l=n[i];if(i){let c;l&&l.nodeName==s.nodeName&&o!=t&&(c=o.parentNode)&&c.nodeName.toLowerCase()==s.nodeName||(c=document.createElement(s.nodeName),c.pmIsDeco=!0,c.appendChild(o),l=Ht[0]),o=c}Yv(o,l||Ht[0],s)}return o}function Yv(t,e,n){for(let r in e)r!="class"&&r!="style"&&r!="nodeName"&&!(r in n)&&t.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=e[r]&&t.setAttribute(r,n[r]);if(e.class!=n.class){let r=e.class?e.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let i=0;i<r.length;i++)o.indexOf(r[i])==-1&&t.classList.remove(r[i]);for(let i=0;i<o.length;i++)r.indexOf(o[i])==-1&&t.classList.add(o[i]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,o;for(;o=r.exec(e.style);)t.style.removeProperty(o[1])}n.style&&(t.style.cssText+=n.style)}}function Du(t,e,n){return Lu(t,t,Ht,ss(e,n,t.nodeType!=1))}function ao(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function Dl(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Xv{constructor(e,n,r){this.lock=n,this.view=r,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Jv(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let r=e;r<n;r++)this.top.children[r].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,r,o){let i=0,s=this.stack.length>>1,l=Math.min(s,e.length);for(;i<l&&(i==s-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<s;)this.destroyRest(),this.top.dirty=He,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<e.length;){this.stack.push(this.top,this.index+1);let c=-1,d=this.top.children.length;o<this.preMatch.index&&(d=Math.min(this.index+3,d));for(let u=this.index;u<d;u++){let f=this.top.children[u];if(f.matchesMark(e[s])&&!this.isLocked(f.dom)){c=u;break}}if(c>-1)c>this.index&&(this.changed=!0,this.destroyBetween(this.index,c)),this.top=this.top.children[this.index];else{let u=_t.create(this.top,e[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(e,n,r,o){let i=-1,s;if(o>=this.preMatch.index&&(s=this.preMatch.matches[o-this.preMatch.index]).parent==this.top&&s.matchesNode(e,n,r))i=this.top.children.indexOf(s,this.index);else for(let l=this.index,c=Math.min(this.top.children.length,l+5);l<c;l++){let d=this.top.children[l];if(d.matchesNode(e,n,r)&&!this.preMatch.matched.has(d)){i=l;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,n,r,o,i){let s=this.top.children[o];return s.dirty==_e&&s.dom==s.contentDOM&&(s.dirty=jt),s.update(e,n,r,i)?(this.destroyBetween(this.index,o),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let r=e.pmViewDesc;if(r){for(let o=this.index;o<this.top.children.length;o++)if(this.top.children[o]==r)return o}return-1}e=n}}updateNextNode(e,n,r,o,i,s){for(let l=this.index;l<this.top.children.length;l++){let c=this.top.children[l];if(c instanceof xt){let d=this.preMatch.matched.get(c);if(d!=null&&d!=i)return!1;let u=c.dom,f,h=this.isLocked(u)&&!(e.isText&&c.node&&c.node.isText&&c.nodeDOM.nodeValue==e.text&&c.dirty!=_e&&ao(n,c.outerDeco));if(!h&&c.update(e,n,r,o))return this.destroyBetween(this.index,l),c.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(f=this.recreateWrapper(c,e,n,r,o,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=f,f.contentDOM&&(f.dirty=jt,f.updateChildren(o,s+1),f.dirty=He),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,r,o,i,s){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content)||!ao(r,e.outerDeco)||!o.eq(e.innerDeco))return null;let l=xt.create(this.top,n,r,o,i,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let c of l.children)c.parent=l}return e.destroy(),l}addNode(e,n,r,o,i){let s=xt.create(this.top,e,n,r,o,i);s.contentDOM&&s.updateChildren(o,i+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,n,r){let o=this.index<this.top.children.length?this.top.children[this.index]:null;if(o&&o.matchesWidget(e)&&(e==o.widget||!o.widget.type.toDOM.parentNode))this.index++;else{let i=new xu(this.top,e,n,r);this.top.children.splice(this.index++,0,i),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof _t;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof ti)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ie||ye)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let r=document.createElement(e);e=="IMG"&&(r.className="ProseMirror-separator",r.alt=""),e=="BR"&&(r.className="ProseMirror-trailingBreak");let o=new Su(this.top,[],r,null);n!=this.top?n.children.push(o):n.children.splice(this.index++,0,o),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Jv(t,e){let n=e,r=n.children.length,o=t.childCount,i=new Map,s=[];e:for(;o>0;){let l;for(;;)if(r){let d=n.children[r-1];if(d instanceof _t)n=d,r=d.children.length;else{l=d,r--;break}}else{if(n==e)break e;r=n.parent.children.indexOf(n),n=n.parent}let c=l.node;if(c){if(c!=t.child(o-1))break;--o,i.set(l,o),s.push(l)}}return{index:o,matched:i,matches:s.reverse()}}function Gv(t,e){return t.type.side-e.type.side}function $v(t,e,n,r){let o=e.locals(t),i=0;if(o.length==0){for(let d=0;d<t.childCount;d++){let u=t.child(d);r(u,o,e.forChild(i,u),d),i+=u.nodeSize}return}let s=0,l=[],c=null;for(let d=0;;){let u,f;for(;s<o.length&&o[s].to==i;){let g=o[s++];g.widget&&(u?(f||(f=[u])).push(g):u=g)}if(u)if(f){f.sort(Gv);for(let g=0;g<f.length;g++)n(f[g],d,!!c)}else n(u,d,!!c);let h,p;if(c)p=-1,h=c,c=null;else if(d<t.childCount)p=d,h=t.child(d++);else break;for(let g=0;g<l.length;g++)l[g].to<=i&&l.splice(g--,1);for(;s<o.length&&o[s].from<=i&&o[s].to>i;)l.push(o[s++]);let m=i+h.nodeSize;if(h.isText){let g=m;s<o.length&&o[s].from<g&&(g=o[s].from);for(let b=0;b<l.length;b++)l[b].to<g&&(g=l[b].to);g<m&&(c=h.cut(g-i),h=h.cut(0,g-i),m=g,p=-1)}else for(;s<o.length&&o[s].to<m;)s++;let A=h.isInline&&!h.isLeaf?l.filter(g=>!g.inline):l.slice();r(h,A,e.forChild(i,h),p),i=m}}function _v(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function ey(t,e,n,r){for(let o=0,i=0;o<t.childCount&&i<=r;){let s=t.child(o++),l=i;if(i+=s.nodeSize,!s.isText)continue;let c=s.text;for(;o<t.childCount;){let d=t.child(o++);if(i+=d.nodeSize,!d.isText)break;c+=d.text}if(i>=n){if(i>=r&&c.slice(r-e.length-l,r-l)==e)return r-e.length;let d=l<r?c.lastIndexOf(e,r-l-1):-1;if(d>=0&&d+e.length+l>=n)return l+d;if(n==r&&c.length>=r+e.length-l&&c.slice(r-l,r-l+e.length)==e)return r}}return-1}function as(t,e,n,r,o){let i=[];for(let s=0,l=0;s<t.length;s++){let c=t[s],d=l,u=l+=c.size;d>=n||u<=e?i.push(c):(d<e&&i.push(c.slice(0,e-d,r)),o&&(i.push(o),o=void 0),u>n&&i.push(c.slice(n-d,c.size,r)))}return i}function _s(t,e=null){let n=t.domSelectionRange(),r=t.state.doc;if(!n.focusNode)return null;let o=t.docView.nearestDesc(n.focusNode),i=o&&o.size==0,s=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let l=r.resolve(s),c,d;if(ei(n)){for(c=s;o&&!o.node;)o=o.parent;let f=o.node;if(o&&f.isAtom&&R.isSelectable(f)&&o.parent&&!(f.isInline&&Nv(n.focusNode,n.focusOffset,o.dom))){let h=o.posBefore;d=new R(s==h?l:r.resolve(h))}}else{if(n instanceof t.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let f=s,h=s;for(let p=0;p<n.rangeCount;p++){let m=n.getRangeAt(p);f=Math.min(f,t.docView.posFromDOM(m.startContainer,m.startOffset,1)),h=Math.max(h,t.docView.posFromDOM(m.endContainer,m.endOffset,-1))}if(f<0)return null;[c,s]=h==t.state.selection.anchor?[h,f]:[f,h],l=r.resolve(s)}else c=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!d){let f=e=="pointer"||t.state.selection.head<l.pos&&!i?1:-1;d=ea(t,u,l,f)}return d}function Ou(t){return t.editable?t.hasFocus():Ru(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ct(t,e=!1){let n=t.state.selection;if(Bu(t,n),!!Ou(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ye){let r=t.domSelectionRange(),o=t.domObserver.currentSelection;if(r.anchorNode&&o.anchorNode&&$t(r.anchorNode,r.anchorOffset,o.anchorNode,o.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)ny(t);else{let{anchor:r,head:o}=n,i,s;Ol&&!(n instanceof P)&&(n.$from.parent.inlineContent||(i=Bl(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(s=Bl(t,n.to))),t.docView.setSelection(r,o,t,e),Ol&&(i&&Rl(i),s&&Rl(s)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ty(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const Ol=Ie||ye&&yu<63;function Bl(t,e){let{node:n,offset:r}=t.docView.domFromPos(e,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Ie&&o&&o.contentEditable=="false")return xi(o);if((!o||o.contentEditable=="false")&&(!i||i.contentEditable=="false")){if(o)return xi(o);if(i)return xi(i)}}function xi(t){return t.contentEditable="true",Ie&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function Rl(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function ty(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=o)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!Ou(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function ny(t){let e=t.domSelection();if(!e)return;let n=t.cursorWrapper.dom,r=n.nodeName=="IMG";r?e.collapse(n.parentNode,be(n)+1):e.collapse(n,0),!r&&!t.state.selection.visible&&Se&&Nt<=11&&(n.disabled=!0,n.disabled=!1)}function Bu(t,e){if(e instanceof R){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(zl(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else zl(t)}function zl(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function ea(t,e,n,r){return t.someProp("createSelectionBetween",o=>o(t,e,n))||P.between(e,n,r)}function Pl(t){return t.editable&&!t.hasFocus()?!1:Ru(t)}function Ru(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function ry(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return $t(e.node,e.offset,n.anchorNode,n.anchorOffset)}function ls(t,e){let{$anchor:n,$head:r}=t.selection,o=e>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?t.doc.resolve(e>0?o.after():o.before()):null:o;return i&&j.findFrom(i,e)}function At(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function Vl(t,e,n){let r=t.state.selection;if(r instanceof P)if(n.indexOf("s")>-1){let{$head:o}=r,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let s=t.state.doc.resolve(o.pos+i.nodeSize*(e<0?-1:1));return At(t,new P(r.$anchor,s))}else if(r.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let o=ls(t.state,e);return o&&o instanceof R?At(t,o):!1}else if(!(Pe&&n.indexOf("m")>-1)){let o=r.$head,i=o.textOffset?null:e<0?o.nodeBefore:o.nodeAfter,s;if(!i||i.isText)return!1;let l=e<0?o.pos-i.nodeSize:o.pos;return i.isAtom||(s=t.docView.descAt(l))&&!s.contentDOM?R.isSelectable(i)?At(t,new R(e<0?t.state.doc.resolve(o.pos-i.nodeSize):o)):Cr?At(t,new P(t.state.doc.resolve(e<0?l:l+i.nodeSize))):!1:!1}}else return!1;else{if(r instanceof R&&r.node.isInline)return At(t,new P(e>0?r.$to:r.$from));{let o=ls(t.state,e);return o?At(t,o):!1}}}function lo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Jn(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function fn(t,e){return e<0?oy(t):iy(t)}function oy(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o,i,s=!1;for(je&&n.nodeType==1&&r<lo(n)&&Jn(n.childNodes[r],-1)&&(s=!0);;)if(r>0){if(n.nodeType!=1)break;{let l=n.childNodes[r-1];if(Jn(l,-1))o=n,i=--r;else if(l.nodeType==3)n=l,r=n.nodeValue.length;else break}}else{if(zu(n))break;{let l=n.previousSibling;for(;l&&Jn(l,-1);)o=n.parentNode,i=be(l),l=l.previousSibling;if(l)n=l,r=lo(n);else{if(n=n.parentNode,n==t.dom)break;r=0}}}s?cs(t,n,r):o&&cs(t,o,i)}function iy(t){let e=t.domSelectionRange(),n=e.focusNode,r=e.focusOffset;if(!n)return;let o=lo(n),i,s;for(;;)if(r<o){if(n.nodeType!=1)break;let l=n.childNodes[r];if(Jn(l,1))i=n,s=++r;else break}else{if(zu(n))break;{let l=n.nextSibling;for(;l&&Jn(l,1);)i=l.parentNode,s=be(l)+1,l=l.nextSibling;if(l)n=l,r=0,o=lo(n);else{if(n=n.parentNode,n==t.dom)break;r=o=0}}}i&&cs(t,i,s)}function zu(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function sy(t,e){for(;t&&e==t.childNodes.length&&!yr(t);)e=be(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function ay(t,e){for(;t&&!e&&!yr(t);)e=be(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function cs(t,e,n){if(e.nodeType!=3){let i,s;(s=sy(e,n))?(e=s,n=0):(i=ay(e,n))&&(e=i,n=i.nodeValue.length)}let r=t.domSelection();if(!r)return;if(ei(r)){let i=document.createRange();i.setEnd(e,n),i.setStart(e,n),r.removeAllRanges(),r.addRange(i)}else r.extend&&r.extend(e,n);t.domObserver.setCurSelection();let{state:o}=t;setTimeout(()=>{t.state==o&&ct(t)},50)}function jl(t,e){let n=t.state.doc.resolve(e);if(!(ye||Cu)&&n.parent.inlineContent){let o=t.coordsAtPos(e);if(e>n.start()){let i=t.coordsAtPos(e-1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left<o.left?"ltr":"rtl"}if(e<n.end()){let i=t.coordsAtPos(e+1),s=(i.top+i.bottom)/2;if(s>o.top&&s<o.bottom&&Math.abs(i.left-o.left)>1)return i.left>o.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function Hl(t,e,n){let r=t.state.selection;if(r instanceof P&&!r.empty||n.indexOf("s")>-1||Pe&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let s=ls(t.state,e);if(s&&s instanceof R)return At(t,s)}if(!o.parent.inlineContent){let s=e<0?o:i,l=r instanceof De?j.near(s,e):j.findFrom(s,e);return l?At(t,l):!1}return!1}function Ql(t,e){if(!(t.state.selection instanceof P))return!0;let{$head:n,$anchor:r,empty:o}=t.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let i=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let s=t.state.tr;return e<0?s.delete(n.pos-i.nodeSize,n.pos):s.delete(n.pos,n.pos+i.nodeSize),t.dispatch(s),!0}return!1}function Wl(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function ly(t){if(!Ie||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let r=e.firstChild;Wl(t,r,"true"),setTimeout(()=>Wl(t,r,"false"),20)}return!1}function cy(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function dy(t,e){let n=e.keyCode,r=cy(e);if(n==8||Pe&&n==72&&r=="c")return Ql(t,-1)||fn(t,-1);if(n==46&&!e.shiftKey||Pe&&n==68&&r=="c")return Ql(t,1)||fn(t,1);if(n==13||n==27)return!0;if(n==37||Pe&&n==66&&r=="c"){let o=n==37?jl(t,t.state.selection.from)=="ltr"?-1:1:-1;return Vl(t,o,r)||fn(t,o)}else if(n==39||Pe&&n==70&&r=="c"){let o=n==39?jl(t,t.state.selection.from)=="ltr"?1:-1:1;return Vl(t,o,r)||fn(t,o)}else{if(n==38||Pe&&n==80&&r=="c")return Hl(t,-1,r)||fn(t,-1);if(n==40||Pe&&n==78&&r=="c")return ly(t)||Hl(t,1,r)||fn(t,1);if(r==(Pe?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function ta(t,e){t.someProp("transformCopied",p=>{e=p(e,t)});let n=[],{content:r,openStart:o,openEnd:i}=e;for(;o>1&&i>1&&r.childCount==1&&r.firstChild.childCount==1;){o--,i--;let p=r.firstChild;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=t.someProp("clipboardSerializer")||rn.fromSchema(t.state.schema),l=Wu(),c=l.createElement("div");c.appendChild(s.serializeFragment(r,{document:l}));let d=c.firstChild,u,f=0;for(;d&&d.nodeType==1&&(u=Qu[d.nodeName.toLowerCase()]);){for(let p=u.length-1;p>=0;p--){let m=l.createElement(u[p]);for(;c.firstChild;)m.appendChild(c.firstChild);c.appendChild(m),f++}d=c.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${o} ${i}${f?` -${f}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",p=>p(e,t))||e.content.textBetween(0,e.content.size,`
|
|
19
19
|
|
|
20
20
|
`);return{dom:c,text:h,slice:e}}function Pu(t,e,n,r,o){let i=o.parent.type.spec.code,s,l;if(!n&&!e)return null;let c=!!e&&(r||i||!n);if(c){if(t.someProp("transformPastedText",h=>{e=h(e,i||r,t)}),i)return l=new T(w.from(t.state.schema.text(e.replace(/\r\n?/g,`
|
|
21
|
-
`))),0,0),t.someProp("transformPasted",h=>{l=h(l,t,!0)}),l;let f=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(f)l=f;else{let h=o.marks(),{schema:p}=t.state,m=rn.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(A=>{let g=s.appendChild(document.createElement("p"));A&&g.appendChild(m.serializeNode(p.text(A,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=hy(n),Cr&&py(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||wt.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||u),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!dy.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=my(Fl(l,+u[1],+u[2]),u[4]);else if(l=T.maxOpen(uy(l.content,o),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=Fl(l,f,h)}return t.someProp("transformPasted",f=>{l=f(l,t,c)}),l}const dy=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function uy(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let c=o.findWrapping(l.type),d;if(!c)return s=null;if(d=s.length&&i.length&&ju(c,i,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=Hu(s[s.length-1],i.length));let u=Vu(l,c);s.push(u),o=o.matchType(u.type),i=c}}),s)return w.from(s)}return t}function Vu(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,w.from(t));return t}function ju(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=ju(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(w.from(Vu(n,t,o+1))))}}function Hu(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Hu(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(w.empty,!0);return t.copy(n.append(r))}function ds(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=ds(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(w.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function Fl(t,e,n){return e<t.openStart&&(t=new T(ds(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new T(ds(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Qu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ul=null;function Wu(){return Ul||(Ul=document.implementation.createHTMLDocument("title"))}let Si=null;function fy(t){let e=window.trustedTypes;return e?(Si||(Si=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Si.createHTML(t)):t}function hy(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Wu().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Qu[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=fy(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function py(t){let e=t.querySelectorAll(ye?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function my(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let c=n.nodes[r[l]];if(!c||c.hasRequiredAttrs())break;o=w.from(c.create(r[l+1],o)),i++,s++}return new T(o,i,s)}const we={},Ne={},Ay={touchstart:!0,touchmove:!0};class gy{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function by(t){for(let e in we){let n=we[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{yy(t,r)&&!na(t,r)&&(t.editable||!(r.type in Ne))&&n(t,r)},Ay[e]?{passive:!0}:void 0)}Ie&&t.dom.addEventListener("input",()=>null),us(t)}function Et(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function vy(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function us(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>na(t,r))})}function na(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function yy(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Cy(t,e){!na(t,e)&&we[e.type]&&(t.editable||!(e.type in Ne))&&we[e.type](t,e)}Ne.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Uu(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(at&&ye&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),In&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Pt(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||cy(t,n)?n.preventDefault():Et(t,"key")};Ne.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ne.keypress=(t,e)=>{let n=e;if(Uu(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Pe&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof P)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function ni(t){return{left:t.clientX,top:t.clientY}}function Iy(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function ra(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function bn(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function ky(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&R.isSelectable(r)?(bn(t,new R(n)),!0):!1}function Ey(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof R&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(R.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(bn(t,R.create(t.state.doc,o)),!0):!1}function My(t,e,n,r,o){return ra(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?Ey(t,n):ky(t,n))}function wy(t,e,n,r){return ra(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function Ny(t,e,n,r){return ra(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||xy(t,n,r)}function xy(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(bn(t,P.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)bn(t,P.create(r,l+1,l+1+s.content.size));else if(R.isSelectable(s))bn(t,R.create(r,l));else continue;return!0}}function oa(t){return co(t)}const Fu=Pe?"metaKey":"ctrlKey";we.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=oa(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&Iy(n,t.input.lastClick)&&!n[Fu]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=t.posAtCoords(ni(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Sy(t,s,n,!!r)):(i=="doubleClick"?wy:Ny)(t,s.pos,s.inside,n)?n.preventDefault():Et(t,"pointer"))};class Sy{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Fu],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,s=u.depth?u.before():0}const l=o?null:r.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:d}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||d instanceof R&&d.from<=s&&d.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&je&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Et(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ct(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ni(e))),this.updateAllowDefault(e),this.allowDefault||!n?Et(this.view,"pointer"):My(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ie&&this.mightDrag&&!this.mightDrag.node.isAtom||ye&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(bn(this.view,j.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Et(this.view,"pointer")}move(e){this.updateAllowDefault(e),Et(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}we.touchstart=t=>{t.input.lastTouch=Date.now(),oa(t),Et(t,"pointer")};we.touchmove=t=>{t.input.lastTouch=Date.now(),Et(t,"pointer")};we.contextmenu=t=>oa(t);function Uu(t,e){return t.composing?!0:Ie&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Ty=at?5e3:-1;Ne.compositionstart=Ne.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof P&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||ye&&Cu&&Ly(t)))t.markCursor=t.state.storedMarks||n.marks(),co(t,!0),t.markCursor=null;else if(co(t,!e.selection.empty),je&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}qu(t,Ty)};function Ly(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Ne.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,qu(t,20))};function qu(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>co(t),e))}function Ku(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=Oy());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Dy(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Ev(e.focusNode,e.focusOffset),r=Mv(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function Oy(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function co(t,e=!1){if(!(at&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Ku(t),e||t.docView&&t.docView.dirty){let n=_s(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function By(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const cr=Se&&Nt<15||In&&Sv<604;we.copy=Ne.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=cr?null:n.clipboardData,s=r.content(),{dom:l,text:c}=ta(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",c)):By(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function Ry(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function zy(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?dr(t,r.value,null,o,e):dr(t,r.textContent,r.innerHTML,o,e)},50)}function dr(t,e,n,r,o){let i=Pu(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,o,i||T.empty)))return!0;if(!i)return!1;let s=Ry(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Zu(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ne.paste=(t,e)=>{let n=e;if(t.composing&&!at)return;let r=cr?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&dr(t,Zu(r),r.getData("text/html"),o,n)?n.preventDefault():zy(t,n)};class Yu{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Py=Pe?"altKey":"ctrlKey";function Xu(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[Py]}we.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(ni(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof R?o.to-1:o.to))){if(r&&r.mightDrag)s=R.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=R.create(t.state.doc,f.posBefore))}}let l=(s||t.state.selection).content(),{dom:c,text:d,slice:u}=ta(t,l);(!n.dataTransfer.files.length||!ye||yu>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(cr?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",cr||n.dataTransfer.setData("text/plain",d),t.dragging=new Yu(u,Xu(t,n),s)};we.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ne.dragover=Ne.dragenter=(t,e)=>e.preventDefault();Ne.drop=(t,e)=>{try{Vy(t,e,t.dragging)}finally{t.dragging=null}};function Vy(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(ni(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",p=>{i=p(i,t,!1)}):i=Pu(t,Zu(e.dataTransfer),cr?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&Xu(t,e));if(t.someProp("handleDrop",p=>p(t,e,i||T.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let l=i?_d(t.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(s){let{node:p}=n;p?p.replace(c):c.deleteSelection()}let d=c.mapping.map(l),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=c.doc;if(u?c.replaceRangeWith(d,d,i.content.firstChild):c.replaceRange(d,d,i),c.doc.eq(f))return;let h=c.doc.resolve(d);if(u&&R.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new R(h));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,A,g,b)=>p=b),c.setSelection(ea(t,h,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}we.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ct(t)},20))};we.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};we.beforeinput=(t,e)=>{if(ye&&at&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Pt(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Ne)we[t]=Ne[t];function ur(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class uo{constructor(e,n){this.toDOM=e,this.spec=n||qt,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new he(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof uo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ur(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class St{constructor(e,n){this.attrs=e,this.spec=n||qt}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new he(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof St&&ur(this.attrs,e.attrs)&&ur(this.spec,e.spec)}static is(e){return e.type instanceof St}destroy(){}}class ia{constructor(e,n){this.attrs=e,this.spec=n||qt}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new he(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof ia&&ur(this.attrs,e.attrs)&&ur(this.spec,e.spec)}destroy(){}}class he{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new he(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new he(e,e,new uo(n,r))}static inline(e,n,r,o){return new he(e,n,new St(r,o))}static node(e,n,r,o){return new he(e,n,new ia(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof St}get widget(){return this.type instanceof uo}}const pn=[],qt={};class G{constructor(e,n){this.local=e.length?e:pn,this.children=n.length?n:pn}static create(e,n){return n.length?fo(n,e,0,qt):Ce}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Ce||e.maps.length==0?this:this.mapInner(e,n,0,0,r||qt)}mapInner(e,n,r,o,i){let s;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(e,r,o);c&&c.type.valid(n,c)?(s||(s=[])).push(c):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?jy(this.children,s||[],e,n,r,o,i):s?new G(s.sort(Kt),pn):Ce}add(e,n){return n.length?this==Ce?G.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((l,c)=>{let d=c+r,u;if(u=Gu(n,l,d)){for(o||(o=this.children.slice());i<o.length&&o[i]<c;)i+=3;o[i]==c?o[i+2]=o[i+2].addInner(l,u,d+1):o.splice(i,0,c,c+l.nodeSize,fo(u,l,d+1,qt)),i+=3}});let s=Ju(i?$u(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new G(s.length?this.local.concat(s).sort(Kt):this.local,o||this.children)}remove(e){return e.length==0||this==Ce?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,l=r[i]+n,c=r[i+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>l&&f.to<c&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[i+2].removeInner(s,l+1);d!=Ce?r[i+2]=d:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let l=0;l<o.length;l++)o[l].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new G(o,r):Ce}forChild(e,n){if(this==Ce)return this;if(n.isLeaf)return G.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<s&&c.to>i&&c.type instanceof St){let d=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;d<u&&(o||(o=[])).push(c.copy(d,u))}}if(o){let l=new G(o.sort(Kt),pn);return r?new vt([l,r]):l}return r||Ce}eq(e){if(this==e)return!0;if(!(e instanceof G)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return sa(this.localsInner(e))}localsInner(e){if(this==Ce)return pn;if(e.inlineContent||!this.local.some(St.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof St||n.push(this.local[r]);return n}forEachSet(e){e(this)}}G.empty=new G([],[]);G.removeOverlap=sa;const Ce=G.empty;class vt{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,qt));return vt.from(r)}forChild(e,n){if(n.isLeaf)return G.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=Ce&&(i instanceof vt?r=r.concat(i.members):r.push(i))}return vt.from(r)}eq(e){if(!(e instanceof vt)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?sa(r?n:n.sort(Kt)):pn}static from(e){switch(e.length){case 0:return Ce;case 1:return e[0];default:return new vt(e.every(n=>n instanceof G)?e:e.reduce((n,r)=>n.concat(r instanceof G?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function jy(t,e,n,r,o,i,s){let l=t.slice();for(let d=0,u=i;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,A)=>{let g=A-m-(p-h);for(let b=0;b<l.length;b+=3){let v=l[b+1];if(v<0||h>v+u-f)continue;let y=l[b]+u-f;p>=y?l[b+1]=h<=y?-2:-1:h>=u&&g&&(l[b]+=g,l[b+1]+=g)}f+=g}),u=n.maps[d].map(u,-1)}let c=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){c=!0,l[d+1]=-1;continue}let u=n.map(t[d]+i),f=u-o;if(f<0||f>=r.content.size){c=!0;continue}let h=n.map(t[d+1]+i,-1),p=h-o,{index:m,offset:A}=r.content.findIndex(f),g=r.maybeChild(m);if(g&&A==f&&A+g.nodeSize==p){let b=l[d+2].mapInner(n,g,u+1,t[d]+i+1,s);b!=Ce?(l[d]=f,l[d+1]=p,l[d+2]=b):(l[d+1]=-2,c=!0)}else c=!0}if(c){let d=Hy(l,t,e,n,o,i,s),u=fo(d,r,0,s);e=u.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new G(e.sort(Kt),l)}function Ju(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new he(o.from+e,o.to+e,o.type))}return n}function Hy(t,e,n,r,o,i,s){function l(c,d){for(let u=0;u<c.local.length;u++){let f=c.local[u].map(r,o,d);f?n.push(f):s.onRemove&&s.onRemove(c.local[u].spec)}for(let u=0;u<c.children.length;u+=3)l(c.children[u+2],c.children[u]+d+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&l(t[c+2],e[c]+i+1);return n}function Gu(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function $u(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function fo(t,e,n,r){let o=[],i=!1;e.forEach((l,c)=>{let d=Gu(t,l,c+n);if(d){i=!0;let u=fo(d,l,n+c+1,r);u!=Ce&&o.push(c,c+l.nodeSize,u)}});let s=Ju(i?$u(t):t,-n).sort(Kt);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new G(s,o):Ce}function Kt(t,e){return t.from-e.from||t.to-e.to}function sa(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),ql(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),ql(e,o,r.copy(i.from,r.to)));break}}}return e}function ql(t,e,n){for(;e<t.length&&Kt(n,t[e])>0;)e++;t.splice(e,0,n)}function Ti(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ce&&e.push(r)}),t.cursorWrapper&&e.push(G.create(t.state.doc,[t.cursorWrapper.deco])),vt.from(e)}const Qy={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Wy=Se&&Nt<=11;class Fy{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class Uy{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Fy,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Se&&Nt<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():Ie&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Wy&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Qy)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Pl(this.view)){if(this.suppressingSelectionUpdates)return ct(this.view);if(Se&&Nt<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&$t(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Cn(i))n.add(i);for(let i=e.anchorNode;i;i=Cn(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Pl(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,c=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],c);f&&(i=i<0?f.from:Math.min(f.from,i),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(c.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of c)if(u.nodeName=="BR"&&u.parentNode){let f=u.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(je&&c.length){let u=c.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||Zy(e,f)!=p)&&h.remove()}}}let d=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ei(r)&&(d=_s(e))&&d.eq(j.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ct(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),qy(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Yy(e,c)),this.handleDOMChange(i,s,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ct(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Se&&Nt<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(i=h)}let s=o&&o.parentNode==e.target?be(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),c=i&&i.parentNode==e.target?be(i):e.target.childNodes.length,d=r.localPosFromDOM(e.target,c,1);return{from:l,to:d}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Kl=new WeakMap,Zl=!1;function qy(t){if(!Kl.has(t)&&(Kl.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=je,Zl)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Zl=!0}}function Yl(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return $t(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function Ky(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Yl(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Yl(t,n):null}function Zy(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Yy(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=i.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let l=s;for(;;){let c=l.firstChild;if(!c||c.nodeType!=1||c.contentEditable=="false"||/^(BR|IMG)$/.test(c.nodeName))break;l=c}l.insertBefore(i,l.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}function Xy(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),d,u=c.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:c.anchorOffset}],ei(c)||d.push({node:c.focusNode,offset:c.focusOffset})),ye&&t.input.lastKeyCode===8)for(let g=i;g>o;g--){let b=r.childNodes[g-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){i=g;break}if(!v||v.size)break}let f=t.state.doc,h=t.someProp("domParser")||wt.fromSchema(t.state.schema),p=f.resolve(s),m=null,A=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:Jy,context:p});if(d&&d[0].pos!=null){let g=d[0].pos,b=d[1]&&d[1].pos;b==null&&(b=g),m={anchor:g+s,head:b+s}}return{doc:A,sel:m,from:s,to:l}}function Jy(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ie&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Ie&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const Gy=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function $y(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let S=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=_s(t,S);if(O&&!t.state.selection.eq(O)){if(ye&&at&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",U=>U(t,Pt(13,"Enter"))))return;let I=t.state.tr.setSelection(O);S=="pointer"?I.setMeta("pointer",!0):S=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),t.dispatch(I)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let c=t.state.selection,d=Xy(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=t0(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(In&&t.input.lastIOSEnter>Date.now()-225||at)&&o.some(S=>S.nodeType==1&&!Gy.test(S.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",S=>S(t,Pt(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof P&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(d.sel){let S=Xl(t,t.state.doc,d.sel);if(S&&!S.eq(t.state.selection)){let O=t.state.tr.setSelection(S);i&&O.setMeta("composition",i),t.dispatch(O)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof P&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Se&&Nt<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)==" "&&(m.start--,m.endA--,m.endB--);let A=d.doc.resolveNoCache(m.start-d.from),g=d.doc.resolveNoCache(m.endB-d.from),b=u.resolve(m.start),v=A.sameParent(g)&&A.parent.inlineContent&&b.end()>=m.endA;if((In&&t.input.lastIOSEnter>Date.now()-225&&(!v||o.some(S=>S.nodeName=="DIV"||S.nodeName=="P"))||!v&&A.pos<d.doc.content.size&&(!A.sameParent(g)||!A.parent.inlineContent)&&A.pos<g.pos&&!/\S/.test(d.doc.textBetween(A.pos,g.pos,"","")))&&t.someProp("handleKeyDown",S=>S(t,Pt(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&e0(u,m.start,m.endA,A,g)&&t.someProp("handleKeyDown",S=>S(t,Pt(8,"Backspace")))){at&&ye&&t.domObserver.suppressSelectionUpdates();return}ye&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),at&&!v&&A.start()!=g.start()&&g.parentOffset==0&&A.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,g=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(S){return S(t,Pt(13,"Enter"))})},20));let y=m.start,C=m.endA,k=S=>{let O=S||t.state.tr.replace(y,C,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let I=Xl(t,O.doc,d.sel);I&&!(ye&&t.composing&&I.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(I.head==y||I.head==O.mapping.map(C)-1)||Se&&I.empty&&I.head==y)&&O.setSelection(I)}return i&&O.setMeta("composition",i),O.scrollIntoView()},N;if(v)if(A.pos==g.pos){Se&&Nt<=11&&A.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ct(t),20));let S=k(t.state.tr.delete(y,C)),O=u.resolve(m.start).marksAcross(u.resolve(m.endA));O&&S.ensureMarks(O),t.dispatch(S)}else if(m.endA==m.endB&&(N=_y(A.parent.content.cut(A.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,m.endA-b.start())))){let S=k(t.state.tr);N.type=="add"?S.addMark(y,C,N.mark):S.removeMark(y,C,N.mark),t.dispatch(S)}else if(A.parent.child(A.index()).isText&&A.index()==g.index()-(g.textOffset?0:1)){let S=A.parent.textBetween(A.parentOffset,g.parentOffset),O=()=>k(t.state.tr.insertText(S,y,C));t.someProp("handleTextInput",I=>I(t,y,C,S,O))||t.dispatch(O())}else t.dispatch(k());else t.dispatch(k())}function Xl(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ea(t,e.resolve(n.anchor),e.resolve(n.head))}function _y(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,c;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)l=o[0],s="add",c=u=>u.mark(l.addToSet(u.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",c=u=>u.mark(l.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(c(e.child(u)));if(w.from(d).eq(t))return{mark:l,type:s}}function e0(t,e,n,r,o){if(n-e<=o.pos-r.pos||Li(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&n==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Li(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Li(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Li(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function t0(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let c=Math.max(0,i-Math.min(s,l));r-=s+c-i}if(s<i&&t.size<e.size){let c=r<=i&&r>=s?i-r:0;i-=c,i&&i<e.size&&Jl(e.textBetween(i-1,i+1))&&(i+=c?1:-1),l=i+(l-s),s=i}else if(l<i){let c=r<=i&&r>=l?i-r:0;i-=c,i&&i<t.size&&Jl(t.textBetween(i-1,i+1))&&(i+=c?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}function Jl(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class _u{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new gy,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(tc),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=_l(this),$l(this),this.nodeViews=ec(this),this.docView=Ll(this.state.doc,Gl(this),Ti(this),this.dom,this),this.domObserver=new Uy(this,(r,o,i,s)=>$y(this,r,o,i,s)),this.domObserver.start(),by(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&us(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tc),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(Ku(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=ec(this);r0(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&us(this),this.editable=_l(this),$l(this);let c=Ti(this),d=Gl(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,d,c);(f||!e.selection.eq(o.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Dv(this);if(s){this.domObserver.stop();let p=f&&(Se||ye)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&n0(o.selection,e.selection);if(f){let m=ye?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Dy(this)),(i||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Ll(e.doc,d,c,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ny(this))?ct(this,p):(Bu(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&Ov(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof R){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Ml(this,n.getBoundingClientRect(),e)}else Ml(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new Yu(e.slice,e.move,o<0?void 0:R.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(o=n?n(l):l))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let l=i[s].props[e];if(l!=null&&(o=n?n(l):l))return o}}hasFocus(){if(Se){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Bv(this.dom),ct(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return jv(this,e)}coordsAtPos(e,n=1){return wu(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return Uv(this,n||this.state,e)}pasteHTML(e,n){return dr(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return dr(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return ta(this,e)}destroy(){this.docView&&(vy(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ti(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Iv())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Cy(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ie&&this.root.nodeType===11&&Nv(this.dom.ownerDocument)==this.dom&&Ky(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}_u.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Gl(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[he.node(0,t.state.doc.content.size,e)]}function $l(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:he.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function _l(t){return!t.someProp("editable",e=>e(t.state)===!1)}function n0(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function ec(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function r0(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function tc(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Tt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ho={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},o0=typeof navigator<"u"&&/Mac/.test(navigator.platform),i0=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ve=0;ve<10;ve++)Tt[48+ve]=Tt[96+ve]=String(ve);for(var ve=1;ve<=24;ve++)Tt[ve+111]="F"+ve;for(var ve=65;ve<=90;ve++)Tt[ve]=String.fromCharCode(ve+32),ho[ve]=String.fromCharCode(ve);for(var Di in Tt)ho.hasOwnProperty(Di)||(ho[Di]=Tt[Di]);function s0(t){var e=o0&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||i0&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ho:Tt)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const a0=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),l0=typeof navigator<"u"&&/Win/.test(navigator.platform);function c0(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l++){let c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))a0?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function d0(t){let e=Object.create(null);for(let n in t)e[c0(n)]=t[n];return e}function Oi(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function u0(t){return new ne({props:{handleKeyDown:aa(t)}})}function aa(t){let e=d0(t);return function(n,r){let o=s0(r),i,s=e[Oi(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Oi(o,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(l0&&r.ctrlKey&&r.altKey)&&(i=Tt[r.keyCode])&&i!=o){let l=e[Oi(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}var f0=Object.defineProperty,la=(t,e)=>{for(var n in e)f0(t,n,{get:e[n],enumerable:!0})};function ri(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var oi=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...d)=>{const u=l(...d)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!t,c=t||o.tr,d=()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),s.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...m)=>{const A=this.buildProps(c,e),g=h(...m)(A);return s.push(g),u}])),run:d};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...d)=>c(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:ri({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...d)=>c(...d)(s)]))}};return s}},ef={};la(ef,{blur:()=>h0,clearContent:()=>p0,clearNodes:()=>m0,command:()=>A0,createParagraphNear:()=>g0,cut:()=>b0,deleteCurrentNode:()=>v0,deleteNode:()=>y0,deleteRange:()=>C0,deleteSelection:()=>I0,enter:()=>k0,exitCode:()=>E0,extendMarkRange:()=>M0,first:()=>w0,focus:()=>x0,forEach:()=>S0,insertContent:()=>T0,insertContentAt:()=>O0,joinBackward:()=>z0,joinDown:()=>R0,joinForward:()=>P0,joinItemBackward:()=>V0,joinItemForward:()=>j0,joinTextblockBackward:()=>H0,joinTextblockForward:()=>Q0,joinUp:()=>B0,keyboardShortcut:()=>F0,lift:()=>U0,liftEmptyBlock:()=>q0,liftListItem:()=>K0,newlineInCode:()=>Z0,resetAttributes:()=>Y0,scrollIntoView:()=>X0,selectAll:()=>J0,selectNodeBackward:()=>G0,selectNodeForward:()=>$0,selectParentNode:()=>_0,selectTextblockEnd:()=>eC,selectTextblockStart:()=>tC,setContent:()=>nC,setMark:()=>IC,setMeta:()=>kC,setNode:()=>EC,setNodeSelection:()=>MC,setTextDirection:()=>wC,setTextSelection:()=>NC,sinkListItem:()=>xC,splitBlock:()=>SC,splitListItem:()=>TC,toggleList:()=>LC,toggleMark:()=>DC,toggleNode:()=>OC,toggleWrap:()=>BC,undoInputRule:()=>RC,unsetAllMarks:()=>zC,unsetMark:()=>PC,unsetTextDirection:()=>VC,updateAttributes:()=>jC,wrapIn:()=>HC,wrapInList:()=>QC});var h0=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),p0=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),m0=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(l,c)=>{if(l.type.isText)return;const{doc:d,mapping:u}=e,f=d.resolve(u.map(c)),h=d.resolve(u.map(c+l.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Nn(p);if(l.type.isTextblock){const{defaultType:A}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,A)}(m||m===0)&&e.lift(p,m)})}),!0},A0=t=>e=>t(e),g0=()=>({state:t,dispatch:e})=>mu(t,e),b0=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new P(r.doc.resolve(Math.max(s-1,0)))),!0},v0=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const l=o.before(i),c=o.after(i);t.delete(l,c).scrollIntoView()}return!0}return!1};function ue(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var y0=t=>({tr:e,state:n,dispatch:r})=>{const o=ue(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const c=i.before(s),d=i.after(s);e.delete(c,d).scrollIntoView()}return!0}return!1},C0=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},I0=()=>({state:t,dispatch:e})=>Zs(t,e),k0=()=>({commands:t})=>t.keyboardShortcut("Enter"),E0=()=>({state:t,dispatch:e})=>av(t,e);function ca(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function po(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:ca(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function tf(t,e,n={}){return t.find(r=>r.type===e&&po(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function nc(t,e,n={}){return!!tf(t,e,n)}function da(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!tf([...o.node.marks],e,n)))return;let s=o.index,l=t.start()+o.offset,c=s+1,d=l+o.node.nodeSize;for(;s>0&&nc([...t.parent.child(s-1).marks],e,n);)s-=1,l-=t.parent.child(s).nodeSize;for(;c<t.parent.childCount&&nc([...t.parent.child(c).marks],e,n);)d+=t.parent.child(c).nodeSize,c+=1;return{from:l,to:d}}function dt(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var M0=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=dt(t,r.schema),{doc:s,selection:l}=n,{$from:c,from:d,to:u}=l;if(o){const f=da(c,i,e);if(f&&f.from<=d&&f.to>=u){const h=P.create(s,f.from,f.to);n.setSelection(h)}}return!0},w0=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function nf(t){return t instanceof P}function Qt(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function rf(t,e=null){if(!e)return null;const n=j.atStart(t),r=j.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?P.create(t,Qt(0,o,i),Qt(t.content.size,o,i)):P.create(t,Qt(e,o,i),Qt(e,o,i))}function rc(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function mo(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function N0(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var x0=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(mo()||rc())&&r.dom.focus(),N0()&&!mo()&&!rc()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!nf(n.state.selection))return s(),!0;const l=rf(o.doc,t)||n.state.selection,c=n.state.selection.eq(l);return i&&(c||o.setSelection(l),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},S0=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),T0=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),of=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&of(r)}return t};function Sr(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return of(n)}function fr(t,e,n){if(t instanceof Mt||t instanceof w)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return w.fromArray(t.map(l=>e.nodeFromJSON(l)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),fr("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="";const c=new Wd({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:d=>(s=!0,l=typeof d=="string"?d:d.outerHTML,null)}]}})});if(n.slice?wt.fromSchema(c).parseSlice(Sr(t),n.parseOptions):wt.fromSchema(c).parse(Sr(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=wt.fromSchema(e);return n.slice?i.parseSlice(Sr(t),n.parseOptions).content:i.parse(Sr(t),n.parseOptions)}return fr("",e,n)}function L0(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof fe||o instanceof pe))return;const i=t.mapping.maps[r];let s=0;i.forEach((l,c,d,u)=>{s===0&&(s=u)}),t.setSelection(j.near(t.doc.resolve(s),n))}var D0=t=>!("type"in t),O0=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const c=g=>{i.emit("contentError",{editor:i,error:g,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{fr(e,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(g){c(g)}try{l=fr(e,i.schema,{parseOptions:d,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(g){return c(g),!1}let{from:u,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,p=!0;if((D0(l)?l:[l]).forEach(g=>{g.check(),h=h?g.isText&&g.marks.length===0:!1,p=p?g.isBlock:!1}),u===f&&p){const{parent:g}=r.doc.resolve(u);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(u-=1,f+=1)}let A;if(h){if(Array.isArray(e))A=e.map(g=>g.text||"").join("");else if(e instanceof w){let g="";e.forEach(b=>{b.text&&(g+=b.text)}),A=g}else typeof e=="object"&&e&&e.text?A=e.text:A=e;r.insertText(A,u,f)}else{A=l;const g=r.doc.resolve(u),b=g.node(),v=g.parentOffset===0,y=b.isText||b.isTextblock,C=b.content.size>0;v&&y&&C&&(u=Math.max(0,u-1)),r.replaceWith(u,f,A)}n.updateSelection&&L0(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:A}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:A})}return!0},B0=()=>({state:t,dispatch:e})=>ov(t,e),R0=()=>({state:t,dispatch:e})=>iv(t,e),z0=()=>({state:t,dispatch:e})=>lu(t,e),P0=()=>({state:t,dispatch:e})=>fu(t,e),V0=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Go(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},j0=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Go(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},H0=()=>({state:t,dispatch:e})=>nv(t,e),Q0=()=>({state:t,dispatch:e})=>rv(t,e);function sf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function W0(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l+=1){const c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))mo()||sf()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var F0=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=W0(t).split(/-(?!$)/),s=i.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction(()=>{n.someProp("handleKeyDown",d=>d(n,l))});return c==null||c.steps.forEach(d=>{const u=d.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Lt(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?ue(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);l.push({node:f,from:p,to:m})});const c=o-r,d=l.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>po(f.node.attrs,n,{strict:!1}));return i?!!d.length:d.reduce((f,h)=>f+h.to-h.from,0)>=c}var U0=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return Lt(n,o,e)?sv(n,r):!1},q0=()=>({state:t,dispatch:e})=>Au(t,e),K0=t=>({state:e,dispatch:n})=>{const r=ue(t,e.schema);return bv(r)(e,n)},Z0=()=>({state:t,dispatch:e})=>pu(t,e);function ii(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function oc(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var Y0=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=ii(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=ue(t,r.schema)),l==="mark"&&(s=dt(t,r.schema));let c=!1;return n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(u,f)=>{i&&i===u.type&&(c=!0,o&&n.setNodeMarkup(f,void 0,oc(u.attrs,e))),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&(c=!0,o&&n.addMark(f,f+u.nodeSize,s.create(oc(h.attrs,e))))})})}),c},X0=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),J0=()=>({tr:t,dispatch:e})=>{if(e){const n=new De(t.doc);t.setSelection(n)}return!0},G0=()=>({state:t,dispatch:e})=>du(t,e),$0=()=>({state:t,dispatch:e})=>hu(t,e),_0=()=>({state:t,dispatch:e})=>dv(t,e),eC=()=>({state:t,dispatch:e})=>hv(t,e),tC=()=>({state:t,dispatch:e})=>fv(t,e);function fs(t,e,n={},r={}){return fr(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var nC=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{const{doc:c}=i;if(r.preserveWhitespace!=="full"){const d=fs(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return s&&i.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function af(t,e){const n=dt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,c=>{s.push(...c.marks)});const l=s.find(c=>c.type.name===n.name);return l?{...l.attrs}:{}}function lf(t,e){const n=new qs(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function rC(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function oC(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function cf(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function si(t){return e=>cf(e.$from,t)}function B(t,e,n){return t.config[e]===void 0&&t.parent?B(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?B(t.parent,e,n):null}):t.config[e]}function ua(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=B(e,"addExtensions",n);return r?[e,...ua(r())]:e}).flat(10)}function fa(t,e){const n=rn.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function df(t){return typeof t=="function"}function Y(t,e=void 0,...n){return df(t)?e?t.bind(e)(...n):t(...n):t}function iC(t={}){return Object.keys(t).length===0&&t.constructor===Object}function kn(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function uf(t){const e=[],{nodeExtensions:n,markExtensions:r}=kn(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(d=>d.name!=="text").map(d=>d.name),l=r.map(d=>d.name),c=[...s,...l];return t.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage,extensions:o},f=B(d,"addGlobalAttributes",u);if(!f)return;f().forEach(p=>{let m;Array.isArray(p.types)?m=p.types:p.types==="*"?m=c:p.types==="nodes"?m=s:p.types==="marks"?m=l:m=[],m.forEach(A=>{Object.entries(p.attributes).forEach(([g,b])=>{e.push({type:A,name:g,attribute:{...i,...b}})})})})}),o.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage},f=B(d,"addAttributes",u);if(!f)return;const h=f();Object.entries(h).forEach(([p,m])=>{const A={...i,...m};typeof(A==null?void 0:A.default)=="function"&&(A.default=A.default()),A!=null&&A.isRequired&&(A==null?void 0:A.default)===void 0&&delete A.default,e.push({type:d.name,name:p,attribute:A})})}),e}function sC(t){const e=[];let n="",r=!1,o=!1,i=0;const s=t.length;for(let l=0;l<s;l+=1){const c=t[l];if(c==="'"&&!o){r=!r,n+=c;continue}if(c==='"'&&!r){o=!o,n+=c;continue}if(!r&&!o){if(c==="("){i+=1,n+=c;continue}if(c===")"&&i>0){i-=1,n+=c;continue}if(c===";"&&i===0){e.push(n),n="";continue}}n+=c}return n&&e.push(n),e}function ic(t){const e=[],n=sC(t||""),r=n.length;for(let o=0;o<r;o+=1){const i=n[o],s=i.indexOf(":");if(s===-1)continue;const l=i.slice(0,s).trim(),c=i.slice(s+1).trim();l&&c&&e.push([l,c])}return e}function te(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const l=i?String(i).split(" "):[],c=r[o]?r[o].split(" "):[],d=l.filter(u=>!c.includes(u));r[o]=[...c,...d].join(" ")}else if(o==="style"){const l=new Map([...ic(r[o]),...ic(i)]);r[o]=Array.from(l.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function hr(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>te(n,r),{})}function aC(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function sc(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(n):aC(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function ac(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&iC(n)?!1:n!=null))}function lc(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function lC(t,e){var n;const r=uf(t),{nodeExtensions:o,markExtensions:i}=kn(t),s=(n=o.find(d=>B(d,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(d=>{const u=r.filter(b=>b.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((b,v)=>{const y=B(v,"extendNodeSchema",f);return{...b,...y?y(d):{}}},{}),p=ac({...h,content:Y(B(d,"content",f)),marks:Y(B(d,"marks",f)),group:Y(B(d,"group",f)),inline:Y(B(d,"inline",f)),atom:Y(B(d,"atom",f)),selectable:Y(B(d,"selectable",f)),draggable:Y(B(d,"draggable",f)),code:Y(B(d,"code",f)),whitespace:Y(B(d,"whitespace",f)),linebreakReplacement:Y(B(d,"linebreakReplacement",f)),defining:Y(B(d,"defining",f)),isolating:Y(B(d,"isolating",f)),attrs:Object.fromEntries(u.map(lc))}),m=Y(B(d,"parseHTML",f));m&&(p.parseDOM=m.map(b=>sc(b,u)));const A=B(d,"renderHTML",f);A&&(p.toDOM=b=>A({node:b,HTMLAttributes:hr(b,u)}));const g=B(d,"renderText",f);return g&&(p.toText=g),[d.name,p]})),c=Object.fromEntries(i.map(d=>{const u=r.filter(g=>g.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((g,b)=>{const v=B(b,"extendMarkSchema",f);return{...g,...v?v(d):{}}},{}),p=ac({...h,inclusive:Y(B(d,"inclusive",f)),excludes:Y(B(d,"excludes",f)),group:Y(B(d,"group",f)),spanning:Y(B(d,"spanning",f)),code:Y(B(d,"code",f)),attrs:Object.fromEntries(u.map(lc))}),m=Y(B(d,"parseHTML",f));m&&(p.parseDOM=m.map(g=>sc(g,u)));const A=B(d,"renderHTML",f);return A&&(p.toDOM=g=>A({mark:g,HTMLAttributes:hr(g,u)})),[d.name,p]}));return new Wd({topNode:s,nodes:l,marks:c})}function cC(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Gn(t){return t.sort((n,r)=>{const o=B(n,"priority")||100,i=B(r,"priority")||100;return o>i?-1:o<i?1:0})}function ff(t){const e=Gn(ua(t)),n=cC(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function hf(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
21
|
+
`))),0,0),t.someProp("transformPasted",h=>{l=h(l,t,!0)}),l;let f=t.someProp("clipboardTextParser",h=>h(e,o,r,t));if(f)l=f;else{let h=o.marks(),{schema:p}=t.state,m=rn.fromSchema(p);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(A=>{let g=s.appendChild(document.createElement("p"));A&&g.appendChild(m.serializeNode(p.text(A,h)))})}}else t.someProp("transformPastedHTML",f=>{n=f(n,t)}),s=py(n),Cr&&my(s);let d=s&&s.querySelector("[data-pm-slice]"),u=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let f=+u[3];f>0;f--){let h=s.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;s=h}if(l||(l=(t.someProp("clipboardParser")||t.someProp("domParser")||wt.fromSchema(t.state.schema)).parseSlice(s,{preserveWhitespace:!!(c||u),context:o,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!uy.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)l=Ay(Fl(l,+u[1],+u[2]),u[4]);else if(l=T.maxOpen(fy(l.content,o),!0),l.openStart||l.openEnd){let f=0,h=0;for(let p=l.content.firstChild;f<l.openStart&&!p.type.spec.isolating;f++,p=p.firstChild);for(let p=l.content.lastChild;h<l.openEnd&&!p.type.spec.isolating;h++,p=p.lastChild);l=Fl(l,f,h)}return t.someProp("transformPasted",f=>{l=f(l,t,c)}),l}const uy=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function fy(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let o=e.node(n).contentMatchAt(e.index(n)),i,s=[];if(t.forEach(l=>{if(!s)return;let c=o.findWrapping(l.type),d;if(!c)return s=null;if(d=s.length&&i.length&&ju(c,i,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=Hu(s[s.length-1],i.length));let u=Vu(l,c);s.push(u),o=o.matchType(u.type),i=c}}),s)return w.from(s)}return t}function Vu(t,e,n=0){for(let r=e.length-1;r>=n;r--)t=e[r].create(null,w.from(t));return t}function ju(t,e,n,r,o){if(o<t.length&&o<e.length&&t[o]==e[o]){let i=ju(t,e,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==t.length-1?n.type:t[o+1]))return r.copy(r.content.append(w.from(Vu(n,t,o+1))))}}function Hu(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,Hu(t.lastChild,e-1)),r=t.contentMatchAt(t.childCount).fillBefore(w.empty,!0);return t.copy(n.append(r))}function ds(t,e,n,r,o,i){let s=e<0?t.firstChild:t.lastChild,l=s.content;return t.childCount>1&&(i=0),o<r-1&&(l=ds(l,e,n,r,o+1,i)),o>=n&&(l=e<0?s.contentMatchAt(0).fillBefore(l,i<=o).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(w.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,s.copy(l))}function Fl(t,e,n){return e<t.openStart&&(t=new T(ds(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new T(ds(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const Qu={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Ul=null;function Wu(){return Ul||(Ul=document.implementation.createHTMLDocument("title"))}let Si=null;function hy(t){let e=window.trustedTypes;return e?(Si||(Si=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:n=>n})),Si.createHTML(t)):t}function py(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=Wu().createElement("div"),r=/<([a-z][^>\s]+)/i.exec(t),o;if((o=r&&Qu[r[1].toLowerCase()])&&(t=o.map(i=>"<"+i+">").join("")+t+o.map(i=>"</"+i+">").reverse().join("")),n.innerHTML=hy(t),o)for(let i=0;i<o.length;i++)n=n.querySelector(o[i])||n;return n}function my(t){let e=t.querySelectorAll(ye?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let r=e[n];r.childNodes.length==1&&r.textContent==" "&&r.parentNode&&r.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),r)}}function Ay(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,r;try{r=JSON.parse(e)}catch{return t}let{content:o,openStart:i,openEnd:s}=t;for(let l=r.length-2;l>=0;l-=2){let c=n.nodes[r[l]];if(!c||c.hasRequiredAttrs())break;o=w.from(c.create(r[l+1],o)),i++,s++}return new T(o,i,s)}const we={},Ne={},gy={touchstart:!0,touchmove:!0};class by{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function vy(t){for(let e in we){let n=we[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=r=>{Cy(t,r)&&!na(t,r)&&(t.editable||!(r.type in Ne))&&n(t,r)},gy[e]?{passive:!0}:void 0)}Ie&&t.dom.addEventListener("input",()=>null),us(t)}function Et(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function yy(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function us(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=r=>na(t,r))})}function na(t,e){return t.someProp("handleDOMEvents",n=>{let r=n[e.type];return r?r(t,e)||e.defaultPrevented:!1})}function Cy(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function Iy(t,e){!na(t,e)&&we[e.type]&&(t.editable||!(e.type in Ne))&&we[e.type](t,e)}Ne.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!Uu(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(at&&ye&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),In&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let r=Date.now();t.input.lastIOSEnter=r,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==r&&(t.someProp("handleKeyDown",o=>o(t,Pt(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",r=>r(t,n))||dy(t,n)?n.preventDefault():Et(t,"key")};Ne.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ne.keypress=(t,e)=>{let n=e;if(Uu(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Pe&&n.metaKey)return;if(t.someProp("handleKeyPress",o=>o(t,n))){n.preventDefault();return}let r=t.state.selection;if(!(r instanceof P)||!r.$from.sameParent(r.$to)){let o=String.fromCharCode(n.charCode),i=()=>t.state.tr.insertText(o).scrollIntoView();!/[\r\n]/.test(o)&&!t.someProp("handleTextInput",s=>s(t,r.$from.pos,r.$to.pos,o,i))&&t.dispatch(i()),n.preventDefault()}};function ni(t){return{left:t.clientX,top:t.clientY}}function ky(t,e){let n=e.x-t.clientX,r=e.y-t.clientY;return n*n+r*r<100}function ra(t,e,n,r,o){if(r==-1)return!1;let i=t.state.doc.resolve(r);for(let s=i.depth+1;s>0;s--)if(t.someProp(e,l=>s>i.depth?l(t,n,i.nodeAfter,i.before(s),o,!0):l(t,n,i.node(s),i.before(s),o,!1)))return!0;return!1}function bn(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let r=t.state.tr.setSelection(e);r.setMeta("pointer",!0),t.dispatch(r)}function Ey(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),r=n.nodeAfter;return r&&r.isAtom&&R.isSelectable(r)?(bn(t,new R(n)),!0):!1}function My(t,e){if(e==-1)return!1;let n=t.state.selection,r,o;n instanceof R&&(r=n.node);let i=t.state.doc.resolve(e);for(let s=i.depth+1;s>0;s--){let l=s>i.depth?i.nodeAfter:i.node(s);if(R.isSelectable(l)){r&&n.$from.depth>0&&s>=n.$from.depth&&i.before(n.$from.depth+1)==n.$from.pos?o=i.before(n.$from.depth):o=i.before(s);break}}return o!=null?(bn(t,R.create(t.state.doc,o)),!0):!1}function wy(t,e,n,r,o){return ra(t,"handleClickOn",e,n,r)||t.someProp("handleClick",i=>i(t,e,r))||(o?My(t,n):Ey(t,n))}function Ny(t,e,n,r){return ra(t,"handleDoubleClickOn",e,n,r)||t.someProp("handleDoubleClick",o=>o(t,e,r))}function xy(t,e,n,r){return ra(t,"handleTripleClickOn",e,n,r)||t.someProp("handleTripleClick",o=>o(t,e,r))||Sy(t,n,r)}function Sy(t,e,n){if(n.button!=0)return!1;let r=t.state.doc;if(e==-1)return r.inlineContent?(bn(t,P.create(r,0,r.content.size)),!0):!1;let o=r.resolve(e);for(let i=o.depth+1;i>0;i--){let s=i>o.depth?o.nodeAfter:o.node(i),l=o.before(i);if(s.inlineContent)bn(t,P.create(r,l+1,l+1+s.content.size));else if(R.isSelectable(s))bn(t,R.create(r,l));else continue;return!0}}function oa(t){return co(t)}const Fu=Pe?"metaKey":"ctrlKey";we.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let r=oa(t),o=Date.now(),i="singleClick";o-t.input.lastClick.time<500&&ky(n,t.input.lastClick)&&!n[Fu]&&t.input.lastClick.button==n.button&&(t.input.lastClick.type=="singleClick"?i="doubleClick":t.input.lastClick.type=="doubleClick"&&(i="tripleClick")),t.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i,button:n.button};let s=t.posAtCoords(ni(n));s&&(i=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Ty(t,s,n,!!r)):(i=="doubleClick"?Ny:xy)(t,s.pos,s.inside,n)?n.preventDefault():Et(t,"pointer"))};class Ty{constructor(e,n,r,o){this.view=e,this.pos=n,this.event=r,this.flushed=o,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!r[Fu],this.allowDefault=r.shiftKey;let i,s;if(n.inside>-1)i=e.state.doc.nodeAt(n.inside),s=n.inside;else{let u=e.state.doc.resolve(n.pos);i=u.parent,s=u.depth?u.before():0}const l=o?null:r.target,c=l?e.docView.nearestDesc(l,!0):null;this.target=c&&c.nodeDOM.nodeType==1?c.nodeDOM:null;let{selection:d}=e.state;(r.button==0&&i.type.spec.draggable&&i.type.spec.selectable!==!1||d instanceof R&&d.from<=s&&d.to>s)&&(this.mightDrag={node:i,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&je&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Et(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>ct(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ni(e))),this.updateAllowDefault(e),this.allowDefault||!n?Et(this.view,"pointer"):wy(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ie&&this.mightDrag&&!this.mightDrag.node.isAtom||ye&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(bn(this.view,j.near(this.view.state.doc.resolve(n.pos))),e.preventDefault()):Et(this.view,"pointer")}move(e){this.updateAllowDefault(e),Et(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}we.touchstart=t=>{t.input.lastTouch=Date.now(),oa(t),Et(t,"pointer")};we.touchmove=t=>{t.input.lastTouch=Date.now(),Et(t,"pointer")};we.contextmenu=t=>oa(t);function Uu(t,e){return t.composing?!0:Ie&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const Ly=at?5e3:-1;Ne.compositionstart=Ne.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof P&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||ye&&Cu&&Dy(t)))t.markCursor=t.state.storedMarks||n.marks(),co(t,!0),t.markCursor=null;else if(co(t,!e.selection.empty),je&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=t.domSelectionRange();for(let o=r.focusNode,i=r.focusOffset;o&&o.nodeType==1&&i!=0;){let s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(s.nodeType==3){let l=t.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else o=s,i=-1}}t.input.composing=!0}qu(t,Ly)};function Dy(t){let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(!e||e.nodeType!=1||n>=e.childNodes.length)return!1;let r=e.childNodes[n];return r.nodeType==1&&r.contentEditable=="false"}Ne.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.badSafariComposition?t.domObserver.forceFlush():t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,qu(t,20))};function qu(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>co(t),e))}function Ku(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=By());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Oy(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=Mv(e.focusNode,e.focusOffset),r=wv(e.focusNode,e.focusOffset);if(n&&r&&n!=r){let o=r.pmViewDesc,i=t.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!o||!o.isText(r.nodeValue))return r;if(t.input.compositionNode==r){let s=n.pmViewDesc;if(!(!s||!s.isText(n.nodeValue)))return r}}return n||r}function By(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function co(t,e=!1){if(!(at&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),Ku(t),e||t.docView&&t.docView.dirty){let n=_s(t),r=t.state.selection;return n&&!n.eq(r)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function Ry(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(e),t.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const cr=Se&&Nt<15||In&&Tv<604;we.copy=Ne.cut=(t,e)=>{let n=e,r=t.state.selection,o=n.type=="cut";if(r.empty)return;let i=cr?null:n.clipboardData,s=r.content(),{dom:l,text:c}=ta(t,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",l.innerHTML),i.setData("text/plain",c)):Ry(t,l),o&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function zy(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function Py(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,r=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),r.parentNode&&r.parentNode.removeChild(r),n?dr(t,r.value,null,o,e):dr(t,r.textContent,r.innerHTML,o,e)},50)}function dr(t,e,n,r,o){let i=Pu(t,e,n,r,t.state.selection.$from);if(t.someProp("handlePaste",c=>c(t,o,i||T.empty)))return!0;if(!i)return!1;let s=zy(i),l=s?t.state.tr.replaceSelectionWith(s,r):t.state.tr.replaceSelection(i);return t.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function Zu(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ne.paste=(t,e)=>{let n=e;if(t.composing&&!at)return;let r=cr?null:n.clipboardData,o=t.input.shiftKey&&t.input.lastKeyCode!=45;r&&dr(t,Zu(r),r.getData("text/html"),o,n)?n.preventDefault():Py(t,n)};class Yu{constructor(e,n,r){this.slice=e,this.move=n,this.node=r}}const Vy=Pe?"altKey":"ctrlKey";function Xu(t,e){let n=t.someProp("dragCopies",r=>!r(e));return n??!e[Vy]}we.dragstart=(t,e)=>{let n=e,r=t.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=t.state.selection,i=o.empty?null:t.posAtCoords(ni(n)),s;if(!(i&&i.pos>=o.from&&i.pos<=(o instanceof R?o.to-1:o.to))){if(r&&r.mightDrag)s=R.create(t.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let f=t.docView.nearestDesc(n.target,!0);f&&f.node.type.spec.draggable&&f!=t.docView&&(s=R.create(t.state.doc,f.posBefore))}}let l=(s||t.state.selection).content(),{dom:c,text:d,slice:u}=ta(t,l);(!n.dataTransfer.files.length||!ye||yu>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(cr?"Text":"text/html",c.innerHTML),n.dataTransfer.effectAllowed="copyMove",cr||n.dataTransfer.setData("text/plain",d),t.dragging=new Yu(u,Xu(t,n),s)};we.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ne.dragover=Ne.dragenter=(t,e)=>e.preventDefault();Ne.drop=(t,e)=>{try{jy(t,e,t.dragging)}finally{t.dragging=null}};function jy(t,e,n){if(!e.dataTransfer)return;let r=t.posAtCoords(ni(e));if(!r)return;let o=t.state.doc.resolve(r.pos),i=n&&n.slice;i?t.someProp("transformPasted",p=>{i=p(i,t,!1)}):i=Pu(t,Zu(e.dataTransfer),cr?null:e.dataTransfer.getData("text/html"),!1,o);let s=!!(n&&Xu(t,e));if(t.someProp("handleDrop",p=>p(t,e,i||T.empty,s))){e.preventDefault();return}if(!i)return;e.preventDefault();let l=i?_d(t.state.doc,o.pos,i):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(s){let{node:p}=n;p?p.replace(c):c.deleteSelection()}let d=c.mapping.map(l),u=i.openStart==0&&i.openEnd==0&&i.content.childCount==1,f=c.doc;if(u?c.replaceRangeWith(d,d,i.content.firstChild):c.replaceRange(d,d,i),c.doc.eq(f))return;let h=c.doc.resolve(d);if(u&&R.isSelectable(i.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new R(h));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,A,g,b)=>p=b),c.setSelection(ea(t,h,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))}we.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&ct(t)},20))};we.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};we.beforeinput=(t,e)=>{if(ye&&at&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:r}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=r||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",i=>i(t,Pt(8,"Backspace")))))return;let{$cursor:o}=t.state.selection;o&&o.pos>0&&t.dispatch(t.state.tr.delete(o.pos-1,o.pos).scrollIntoView())},50)}};for(let t in Ne)we[t]=Ne[t];function ur(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class uo{constructor(e,n){this.toDOM=e,this.spec=n||qt,this.side=this.spec.side||0}map(e,n,r,o){let{pos:i,deleted:s}=e.mapResult(n.from+o,this.side<0?-1:1);return s?null:new he(i-r,i-r,this)}valid(){return!0}eq(e){return this==e||e instanceof uo&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&ur(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class St{constructor(e,n){this.attrs=e,this.spec=n||qt}map(e,n,r,o){let i=e.map(n.from+o,this.spec.inclusiveStart?-1:1)-r,s=e.map(n.to+o,this.spec.inclusiveEnd?1:-1)-r;return i>=s?null:new he(i,s,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof St&&ur(this.attrs,e.attrs)&&ur(this.spec,e.spec)}static is(e){return e.type instanceof St}destroy(){}}class ia{constructor(e,n){this.attrs=e,this.spec=n||qt}map(e,n,r,o){let i=e.mapResult(n.from+o,1);if(i.deleted)return null;let s=e.mapResult(n.to+o,-1);return s.deleted||s.pos<=i.pos?null:new he(i.pos-r,s.pos-r,this)}valid(e,n){let{index:r,offset:o}=e.content.findIndex(n.from),i;return o==n.from&&!(i=e.child(r)).isText&&o+i.nodeSize==n.to}eq(e){return this==e||e instanceof ia&&ur(this.attrs,e.attrs)&&ur(this.spec,e.spec)}destroy(){}}class he{constructor(e,n,r){this.from=e,this.to=n,this.type=r}copy(e,n){return new he(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,r){return this.type.map(e,this,n,r)}static widget(e,n,r){return new he(e,e,new uo(n,r))}static inline(e,n,r,o){return new he(e,n,new St(r,o))}static node(e,n,r,o){return new he(e,n,new ia(r,o))}get spec(){return this.type.spec}get inline(){return this.type instanceof St}get widget(){return this.type instanceof uo}}const pn=[],qt={};class G{constructor(e,n){this.local=e.length?e:pn,this.children=n.length?n:pn}static create(e,n){return n.length?fo(n,e,0,qt):Ce}find(e,n,r){let o=[];return this.findInner(e??0,n??1e9,o,0,r),o}findInner(e,n,r,o,i){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=n&&l.to>=e&&(!i||i(l.spec))&&r.push(l.copy(l.from+o,l.to+o))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<n&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,n-l,r,o+l,i)}}map(e,n,r){return this==Ce||e.maps.length==0?this:this.mapInner(e,n,0,0,r||qt)}mapInner(e,n,r,o,i){let s;for(let l=0;l<this.local.length;l++){let c=this.local[l].map(e,r,o);c&&c.type.valid(n,c)?(s||(s=[])).push(c):i.onRemove&&i.onRemove(this.local[l].spec)}return this.children.length?Hy(this.children,s||[],e,n,r,o,i):s?new G(s.sort(Kt),pn):Ce}add(e,n){return n.length?this==Ce?G.create(e,n):this.addInner(e,n,0):this}addInner(e,n,r){let o,i=0;e.forEach((l,c)=>{let d=c+r,u;if(u=Gu(n,l,d)){for(o||(o=this.children.slice());i<o.length&&o[i]<c;)i+=3;o[i]==c?o[i+2]=o[i+2].addInner(l,u,d+1):o.splice(i,0,c,c+l.nodeSize,fo(u,l,d+1,qt)),i+=3}});let s=Ju(i?$u(n):n,-r);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new G(s.length?this.local.concat(s).sort(Kt):this.local,o||this.children)}remove(e){return e.length==0||this==Ce?this:this.removeInner(e,0)}removeInner(e,n){let r=this.children,o=this.local;for(let i=0;i<r.length;i+=3){let s,l=r[i]+n,c=r[i+1]+n;for(let u=0,f;u<e.length;u++)(f=e[u])&&f.from>l&&f.to<c&&(e[u]=null,(s||(s=[])).push(f));if(!s)continue;r==this.children&&(r=this.children.slice());let d=r[i+2].removeInner(s,l+1);d!=Ce?r[i+2]=d:(r.splice(i,3),i-=3)}if(o.length){for(let i=0,s;i<e.length;i++)if(s=e[i])for(let l=0;l<o.length;l++)o[l].eq(s,n)&&(o==this.local&&(o=this.local.slice()),o.splice(l--,1))}return r==this.children&&o==this.local?this:o.length||r.length?new G(o,r):Ce}forChild(e,n){if(this==Ce)return this;if(n.isLeaf)return G.empty;let r,o;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(r=this.children[l+2]);break}let i=e+1,s=i+n.content.size;for(let l=0;l<this.local.length;l++){let c=this.local[l];if(c.from<s&&c.to>i&&c.type instanceof St){let d=Math.max(i,c.from)-i,u=Math.min(s,c.to)-i;d<u&&(o||(o=[])).push(c.copy(d,u))}}if(o){let l=new G(o.sort(Kt),pn);return r?new vt([l,r]):l}return r||Ce}eq(e){if(this==e)return!0;if(!(e instanceof G)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return sa(this.localsInner(e))}localsInner(e){if(this==Ce)return pn;if(e.inlineContent||!this.local.some(St.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof St||n.push(this.local[r]);return n}forEachSet(e){e(this)}}G.empty=new G([],[]);G.removeOverlap=sa;const Ce=G.empty;class vt{constructor(e){this.members=e}map(e,n){const r=this.members.map(o=>o.map(e,n,qt));return vt.from(r)}forChild(e,n){if(n.isLeaf)return G.empty;let r=[];for(let o=0;o<this.members.length;o++){let i=this.members[o].forChild(e,n);i!=Ce&&(i instanceof vt?r=r.concat(i.members):r.push(i))}return vt.from(r)}eq(e){if(!(e instanceof vt)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,r=!0;for(let o=0;o<this.members.length;o++){let i=this.members[o].localsInner(e);if(i.length)if(!n)n=i;else{r&&(n=n.slice(),r=!1);for(let s=0;s<i.length;s++)n.push(i[s])}}return n?sa(r?n:n.sort(Kt)):pn}static from(e){switch(e.length){case 0:return Ce;case 1:return e[0];default:return new vt(e.every(n=>n instanceof G)?e:e.reduce((n,r)=>n.concat(r instanceof G?r:r.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function Hy(t,e,n,r,o,i,s){let l=t.slice();for(let d=0,u=i;d<n.maps.length;d++){let f=0;n.maps[d].forEach((h,p,m,A)=>{let g=A-m-(p-h);for(let b=0;b<l.length;b+=3){let v=l[b+1];if(v<0||h>v+u-f)continue;let y=l[b]+u-f;p>=y?l[b+1]=h<=y?-2:-1:h>=u&&g&&(l[b]+=g,l[b+1]+=g)}f+=g}),u=n.maps[d].map(u,-1)}let c=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){c=!0,l[d+1]=-1;continue}let u=n.map(t[d]+i),f=u-o;if(f<0||f>=r.content.size){c=!0;continue}let h=n.map(t[d+1]+i,-1),p=h-o,{index:m,offset:A}=r.content.findIndex(f),g=r.maybeChild(m);if(g&&A==f&&A+g.nodeSize==p){let b=l[d+2].mapInner(n,g,u+1,t[d]+i+1,s);b!=Ce?(l[d]=f,l[d+1]=p,l[d+2]=b):(l[d+1]=-2,c=!0)}else c=!0}if(c){let d=Qy(l,t,e,n,o,i,s),u=fo(d,r,0,s);e=u.local;for(let f=0;f<l.length;f+=3)l[f+1]<0&&(l.splice(f,3),f-=3);for(let f=0,h=0;f<u.children.length;f+=3){let p=u.children[f];for(;h<l.length&&l[h]<p;)h+=3;l.splice(h,0,u.children[f],u.children[f+1],u.children[f+2])}}return new G(e.sort(Kt),l)}function Ju(t,e){if(!e||!t.length)return t;let n=[];for(let r=0;r<t.length;r++){let o=t[r];n.push(new he(o.from+e,o.to+e,o.type))}return n}function Qy(t,e,n,r,o,i,s){function l(c,d){for(let u=0;u<c.local.length;u++){let f=c.local[u].map(r,o,d);f?n.push(f):s.onRemove&&s.onRemove(c.local[u].spec)}for(let u=0;u<c.children.length;u+=3)l(c.children[u+2],c.children[u]+d+1)}for(let c=0;c<t.length;c+=3)t[c+1]==-1&&l(t[c+2],e[c]+i+1);return n}function Gu(t,e,n){if(e.isLeaf)return null;let r=n+e.nodeSize,o=null;for(let i=0,s;i<t.length;i++)(s=t[i])&&s.from>n&&s.to<r&&((o||(o=[])).push(s),t[i]=null);return o}function $u(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function fo(t,e,n,r){let o=[],i=!1;e.forEach((l,c)=>{let d=Gu(t,l,c+n);if(d){i=!0;let u=fo(d,l,n+c+1,r);u!=Ce&&o.push(c,c+l.nodeSize,u)}});let s=Ju(i?$u(t):t,-n).sort(Kt);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(r.onRemove&&r.onRemove(s[l].spec),s.splice(l--,1));return s.length||o.length?new G(s,o):Ce}function Kt(t,e){return t.from-e.from||t.to-e.to}function sa(t){let e=t;for(let n=0;n<e.length-1;n++){let r=e[n];if(r.from!=r.to)for(let o=n+1;o<e.length;o++){let i=e[o];if(i.from==r.from){i.to!=r.to&&(e==t&&(e=t.slice()),e[o]=i.copy(i.from,r.to),ql(e,o+1,i.copy(r.to,i.to)));continue}else{i.from<r.to&&(e==t&&(e=t.slice()),e[n]=r.copy(r.from,i.from),ql(e,o,r.copy(i.from,r.to)));break}}}return e}function ql(t,e,n){for(;e<t.length&&Kt(n,t[e])>0;)e++;t.splice(e,0,n)}function Ti(t){let e=[];return t.someProp("decorations",n=>{let r=n(t.state);r&&r!=Ce&&e.push(r)}),t.cursorWrapper&&e.push(G.create(t.state.doc,[t.cursorWrapper.deco])),vt.from(e)}const Wy={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},Fy=Se&&Nt<=11;class Uy{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class qy{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new Uy,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let o=0;o<r.length;o++)this.queue.push(r[o]);Se&&Nt<=11&&r.some(o=>o.type=="childList"&&o.removedNodes.length||o.type=="characterData"&&o.oldValue.length>o.target.nodeValue.length)?this.flushSoon():Ie&&e.composing&&r.some(o=>o.type=="childList"&&o.target.nodeName=="TR")?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),Fy&&(this.onCharData=r=>{this.queue.push({target:r.target,type:"characterData",oldValue:r.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,Wy)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Pl(this.view)){if(this.suppressingSelectionUpdates)return ct(this.view);if(Se&&Nt<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&$t(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,r;for(let i=e.focusNode;i;i=Cn(i))n.add(i);for(let i=e.anchorNode;i;i=Cn(i))if(n.has(i)){r=i;break}let o=r&&this.view.docView.nearestDesc(r);if(o&&o.ignoreMutation({type:"selection",target:r.nodeType==3?r.parentNode:r}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let r=e.domSelectionRange(),o=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Pl(e)&&!this.ignoreSelectionChange(r),i=-1,s=-1,l=!1,c=[];if(e.editable)for(let u=0;u<n.length;u++){let f=this.registerMutation(n[u],c);f&&(i=i<0?f.from:Math.min(f.from,i),s=s<0?f.to:Math.max(f.to,s),f.typeOver&&(l=!0))}if(c.some(u=>u.nodeName=="BR")&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46)){for(let u of c)if(u.nodeName=="BR"&&u.parentNode){let f=u.nextSibling;f&&f.nodeType==1&&f.contentEditable=="false"&&u.parentNode.removeChild(u)}}else if(je&&c.length){let u=c.filter(f=>f.nodeName=="BR");if(u.length==2){let[f,h]=u;f.parentNode&&f.parentNode.parentNode==h.parentNode?h.remove():f.remove()}else{let{focusNode:f}=this.currentSelection;for(let h of u){let p=h.parentNode;p&&p.nodeName=="LI"&&(!f||Yy(e,f)!=p)&&h.remove()}}}let d=null;i<0&&o&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&ei(r)&&(d=_s(e))&&d.eq(j.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ct(e),this.currentSelection.set(r),e.scrollToSelection()):(i>-1||o)&&(i>-1&&(e.docView.markDirty(i,s),Ky(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,Xy(e,c)),this.handleDOMChange(i,s,l,c),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(r)||ct(e),this.currentSelection.set(r))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let r=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(r==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!r||r.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let f=e.addedNodes[u];n.push(f),f.nodeType==3&&(this.lastChangedTextNode=f)}if(r.contentDOM&&r.contentDOM!=r.dom&&!r.contentDOM.contains(e.target))return{from:r.posBefore,to:r.posAfter};let o=e.previousSibling,i=e.nextSibling;if(Se&&Nt<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:f,nextSibling:h}=e.addedNodes[u];(!f||Array.prototype.indexOf.call(e.addedNodes,f)<0)&&(o=f),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(i=h)}let s=o&&o.parentNode==e.target?be(o)+1:0,l=r.localPosFromDOM(e.target,s,-1),c=i&&i.parentNode==e.target?be(i):e.target.childNodes.length,d=r.localPosFromDOM(e.target,c,1);return{from:l,to:d}}else return e.type=="attributes"?{from:r.posAtStart-r.border,to:r.posAtEnd+r.border}:(this.lastChangedTextNode=e.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Kl=new WeakMap,Zl=!1;function Ky(t){if(!Kl.has(t)&&(Kl.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=je,Zl)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),Zl=!0}}function Yl(t,e){let n=e.startContainer,r=e.startOffset,o=e.endContainer,i=e.endOffset,s=t.domAtPos(t.state.selection.anchor);return $t(s.node,s.offset,o,i)&&([n,r,o,i]=[o,i,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:i}}function Zy(t,e){if(e.getComposedRanges){let o=e.getComposedRanges(t.root)[0];if(o)return Yl(t,o)}let n;function r(o){o.preventDefault(),o.stopImmediatePropagation(),n=o.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",r,!0),n?Yl(t,n):null}function Yy(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let r=t.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function Xy(t,e){var n;let{focusNode:r,focusOffset:o}=t.domSelectionRange();for(let i of e)if(((n=i.parentNode)===null||n===void 0?void 0:n.nodeName)=="TR"){let s=i.nextSibling;for(;s&&s.nodeName!="TD"&&s.nodeName!="TH";)s=s.nextSibling;if(s){let l=s;for(;;){let c=l.firstChild;if(!c||c.nodeType!=1||c.contentEditable=="false"||/^(BR|IMG)$/.test(c.nodeName))break;l=c}l.insertBefore(i,l.firstChild),r==i&&t.domSelection().collapse(i,o)}else i.parentNode.removeChild(i)}}function Jy(t,e,n){let{node:r,fromOffset:o,toOffset:i,from:s,to:l}=t.docView.parseRange(e,n),c=t.domSelectionRange(),d,u=c.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(d=[{node:u,offset:c.anchorOffset}],ei(c)||d.push({node:c.focusNode,offset:c.focusOffset})),ye&&t.input.lastKeyCode===8)for(let g=i;g>o;g--){let b=r.childNodes[g-1],v=b.pmViewDesc;if(b.nodeName=="BR"&&!v){i=g;break}if(!v||v.size)break}let f=t.state.doc,h=t.someProp("domParser")||wt.fromSchema(t.state.schema),p=f.resolve(s),m=null,A=h.parse(r,{topNode:p.parent,topMatch:p.parent.contentMatchAt(p.index()),topOpen:!0,from:o,to:i,preserveWhitespace:p.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:Gy,context:p});if(d&&d[0].pos!=null){let g=d[0].pos,b=d[1]&&d[1].pos;b==null&&(b=g),m={anchor:g+s,head:b+s}}return{doc:A,sel:m,from:s,to:l}}function Gy(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ie&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||Ie&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const $y=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function _y(t,e,n,r,o){let i=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let S=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,O=_s(t,S);if(O&&!t.state.selection.eq(O)){if(ye&&at&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",U=>U(t,Pt(13,"Enter"))))return;let I=t.state.tr.setSelection(O);S=="pointer"?I.setMeta("pointer",!0):S=="key"&&I.scrollIntoView(),i&&I.setMeta("composition",i),t.dispatch(I)}return}let s=t.state.doc.resolve(e),l=s.sharedDepth(n);e=s.before(l+1),n=t.state.doc.resolve(n).after(l+1);let c=t.state.selection,d=Jy(t,e,n),u=t.state.doc,f=u.slice(d.from,d.to),h,p;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,p="end"):(h=t.state.selection.from,p="start"),t.input.lastKeyCode=null;let m=n0(f.content,d.doc.content,d.from,h,p);if(m&&t.input.domChangeCount++,(In&&t.input.lastIOSEnter>Date.now()-225||at)&&o.some(S=>S.nodeType==1&&!$y.test(S.nodeName))&&(!m||m.endA>=m.endB)&&t.someProp("handleKeyDown",S=>S(t,Pt(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!m)if(r&&c instanceof P&&!c.empty&&c.$head.sameParent(c.$anchor)&&!t.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(d.sel){let S=Xl(t,t.state.doc,d.sel);if(S&&!S.eq(t.state.selection)){let O=t.state.tr.setSelection(S);i&&O.setMeta("composition",i),t.dispatch(O)}}return}t.state.selection.from<t.state.selection.to&&m.start==m.endB&&t.state.selection instanceof P&&(m.start>t.state.selection.from&&m.start<=t.state.selection.from+2&&t.state.selection.from>=d.from?m.start=t.state.selection.from:m.endA<t.state.selection.to&&m.endA>=t.state.selection.to-2&&t.state.selection.to<=d.to&&(m.endB+=t.state.selection.to-m.endA,m.endA=t.state.selection.to)),Se&&Nt<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>d.from&&d.doc.textBetween(m.start-d.from-1,m.start-d.from+1)==" "&&(m.start--,m.endA--,m.endB--);let A=d.doc.resolveNoCache(m.start-d.from),g=d.doc.resolveNoCache(m.endB-d.from),b=u.resolve(m.start),v=A.sameParent(g)&&A.parent.inlineContent&&b.end()>=m.endA;if((In&&t.input.lastIOSEnter>Date.now()-225&&(!v||o.some(S=>S.nodeName=="DIV"||S.nodeName=="P"))||!v&&A.pos<d.doc.content.size&&(!A.sameParent(g)||!A.parent.inlineContent)&&A.pos<g.pos&&!/\S/.test(d.doc.textBetween(A.pos,g.pos,"","")))&&t.someProp("handleKeyDown",S=>S(t,Pt(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>m.start&&t0(u,m.start,m.endA,A,g)&&t.someProp("handleKeyDown",S=>S(t,Pt(8,"Backspace")))){at&&ye&&t.domObserver.suppressSelectionUpdates();return}ye&&m.endB==m.start&&(t.input.lastChromeDelete=Date.now()),at&&!v&&A.start()!=g.start()&&g.parentOffset==0&&A.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==m.endA&&(m.endB-=2,g=d.doc.resolveNoCache(m.endB-d.from),setTimeout(()=>{t.someProp("handleKeyDown",function(S){return S(t,Pt(13,"Enter"))})},20));let y=m.start,C=m.endA,k=S=>{let O=S||t.state.tr.replace(y,C,d.doc.slice(m.start-d.from,m.endB-d.from));if(d.sel){let I=Xl(t,O.doc,d.sel);I&&!(ye&&t.composing&&I.empty&&(m.start!=m.endB||t.input.lastChromeDelete<Date.now()-100)&&(I.head==y||I.head==O.mapping.map(C)-1)||Se&&I.empty&&I.head==y)&&O.setSelection(I)}return i&&O.setMeta("composition",i),O.scrollIntoView()},N;if(v)if(A.pos==g.pos){Se&&Nt<=11&&A.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ct(t),20));let S=k(t.state.tr.delete(y,C)),O=u.resolve(m.start).marksAcross(u.resolve(m.endA));O&&S.ensureMarks(O),t.dispatch(S)}else if(m.endA==m.endB&&(N=e0(A.parent.content.cut(A.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,m.endA-b.start())))){let S=k(t.state.tr);N.type=="add"?S.addMark(y,C,N.mark):S.removeMark(y,C,N.mark),t.dispatch(S)}else if(A.parent.child(A.index()).isText&&A.index()==g.index()-(g.textOffset?0:1)){let S=A.parent.textBetween(A.parentOffset,g.parentOffset),O=()=>k(t.state.tr.insertText(S,y,C));t.someProp("handleTextInput",I=>I(t,y,C,S,O))||t.dispatch(O())}else t.dispatch(k());else t.dispatch(k())}function Xl(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:ea(t,e.resolve(n.anchor),e.resolve(n.head))}function e0(t,e){let n=t.firstChild.marks,r=e.firstChild.marks,o=n,i=r,s,l,c;for(let u=0;u<r.length;u++)o=r[u].removeFromSet(o);for(let u=0;u<n.length;u++)i=n[u].removeFromSet(i);if(o.length==1&&i.length==0)l=o[0],s="add",c=u=>u.mark(l.addToSet(u.marks));else if(o.length==0&&i.length==1)l=i[0],s="remove",c=u=>u.mark(l.removeFromSet(u.marks));else return null;let d=[];for(let u=0;u<e.childCount;u++)d.push(c(e.child(u)));if(w.from(d).eq(t))return{mark:l,type:s}}function t0(t,e,n,r,o){if(n-e<=o.pos-r.pos||Li(r,!0,!1)<o.pos)return!1;let i=t.resolve(e);if(!r.parent.isTextblock){let l=i.nodeAfter;return l!=null&&n==e+l.nodeSize}if(i.parentOffset<i.parent.content.size||!i.parent.isTextblock)return!1;let s=t.resolve(Li(i,!0,!0));return!s.parent.isTextblock||s.pos>n||Li(s,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(s.parent.content)}function Li(t,e,n){let r=t.depth,o=e?t.end():t.pos;for(;r>0&&(e||t.indexAfter(r)==t.node(r).childCount);)r--,o++,e=!1;if(n){let i=t.node(r).maybeChild(t.indexAfter(r));for(;i&&!i.isLeaf;)i=i.firstChild,o++}return o}function n0(t,e,n,r,o){let i=t.findDiffStart(e,n);if(i==null)return null;let{a:s,b:l}=t.findDiffEnd(e,n+t.size,n+e.size);if(o=="end"){let c=Math.max(0,i-Math.min(s,l));r-=s+c-i}if(s<i&&t.size<e.size){let c=r<=i&&r>=s?i-r:0;i-=c,i&&i<e.size&&Jl(e.textBetween(i-1,i+1))&&(i+=c?1:-1),l=i+(l-s),s=i}else if(l<i){let c=r<=i&&r>=l?i-r:0;i-=c,i&&i<t.size&&Jl(t.textBetween(i-1,i+1))&&(i+=c?1:-1),s=i+(s-l),l=i}return{start:i,endA:s,endB:l}}function Jl(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class _u{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new by,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(tc),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=_l(this),$l(this),this.nodeViews=ec(this),this.docView=Ll(this.state.doc,Gl(this),Ti(this),this.dom,this),this.domObserver=new qy(this,(r,o,i,s)=>_y(this,r,o,i,s)),this.domObserver.start(),vy(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&us(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(tc),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in e)n[r]=e[r];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var r;let o=this.state,i=!1,s=!1;e.storedMarks&&this.composing&&(Ku(this),s=!0),this.state=e;let l=o.plugins!=e.plugins||this._props.plugins!=n.plugins;if(l||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=ec(this);o0(p,this.nodeViews)&&(this.nodeViews=p,i=!0)}(l||n.handleDOMEvents!=this._props.handleDOMEvents)&&us(this),this.editable=_l(this),$l(this);let c=Ti(this),d=Gl(this),u=o.plugins!=e.plugins&&!o.doc.eq(e.doc)?"reset":e.scrollToSelection>o.scrollToSelection?"to selection":"preserve",f=i||!this.docView.matchesNode(e.doc,d,c);(f||!e.selection.eq(o.selection))&&(s=!0);let h=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&Ov(this);if(s){this.domObserver.stop();let p=f&&(Se||ye)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&r0(o.selection,e.selection);if(f){let m=ye?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Oy(this)),(i||!this.docView.update(e.doc,d,c,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=Ll(e.doc,d,c,this.dom,this)),m&&(!this.trackWrites||!this.dom.contains(this.trackWrites))&&(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&ry(this))?ct(this,p):(Bu(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(o),!((r=this.dragging)===null||r===void 0)&&r.node&&!o.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,o),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&Bv(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof R){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&Ml(this,n.getBoundingClientRect(),e)}else Ml(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,e)}}updateDraggedNode(e,n){let r=e.node,o=-1;if(this.state.doc.nodeAt(r.from)==r.node)o=r.from;else{let i=r.from+(this.state.doc.content.size-n.doc.content.size);(i>0&&this.state.doc.nodeAt(i))==r.node&&(o=i)}this.dragging=new Yu(e.slice,e.move,o<0?void 0:R.create(this.state.doc,o))}someProp(e,n){let r=this._props&&this._props[e],o;if(r!=null&&(o=n?n(r):r))return o;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(o=n?n(l):l))return o}let i=this.state.plugins;if(i)for(let s=0;s<i.length;s++){let l=i[s].props[e];if(l!=null&&(o=n?n(l):l))return o}}hasFocus(){if(Se){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&Rv(this.dom),ct(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return Hv(this,e)}coordsAtPos(e,n=1){return wu(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,r=-1){let o=this.docView.posFromDOM(e,n,r);if(o==null)throw new RangeError("DOM position not inside the editor");return o}endOfTextblock(e,n){return qv(this,n||this.state,e)}pasteHTML(e,n){return dr(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return dr(this,e,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(e){return ta(this,e)}destroy(){this.docView&&(yy(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ti(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,kv())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Iy(this,e)}domSelectionRange(){let e=this.domSelection();return e?Ie&&this.root.nodeType===11&&xv(this.dom.ownerDocument)==this.dom&&Zy(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}_u.prototype.dispatch=function(t){let e=this._props.dispatchTransaction;e?e.call(this,t):this.updateState(this.state.apply(t))};function Gl(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let r in n)r=="class"?e.class+=" "+n[r]:r=="style"?e.style=(e.style?e.style+";":"")+n[r]:!e[r]&&r!="contenteditable"&&r!="nodeName"&&(e[r]=String(n[r]))}),e.translate||(e.translate="no"),[he.node(0,t.state.doc.content.size,e)]}function $l(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:he.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function _l(t){return!t.someProp("editable",e=>e(t.state)===!1)}function r0(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function ec(t){let e=Object.create(null);function n(r){for(let o in r)Object.prototype.hasOwnProperty.call(e,o)||(e[o]=r[o])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function o0(t,e){let n=0,r=0;for(let o in t){if(t[o]!=e[o])return!0;n++}for(let o in e)r++;return n!=r}function tc(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var Tt={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},ho={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},i0=typeof navigator<"u"&&/Mac/.test(navigator.platform),s0=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ve=0;ve<10;ve++)Tt[48+ve]=Tt[96+ve]=String(ve);for(var ve=1;ve<=24;ve++)Tt[ve+111]="F"+ve;for(var ve=65;ve<=90;ve++)Tt[ve]=String.fromCharCode(ve+32),ho[ve]=String.fromCharCode(ve);for(var Di in Tt)ho.hasOwnProperty(Di)||(ho[Di]=Tt[Di]);function a0(t){var e=i0&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||s0&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?ho:Tt)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const l0=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),c0=typeof navigator<"u"&&/Win/.test(navigator.platform);function d0(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l++){let c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))l0?s=!0:o=!0;else throw new Error("Unrecognized modifier name: "+c)}return r&&(n="Alt-"+n),o&&(n="Ctrl-"+n),s&&(n="Meta-"+n),i&&(n="Shift-"+n),n}function u0(t){let e=Object.create(null);for(let n in t)e[d0(n)]=t[n];return e}function Oi(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function f0(t){return new ne({props:{handleKeyDown:aa(t)}})}function aa(t){let e=u0(t);return function(n,r){let o=a0(r),i,s=e[Oi(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let l=e[Oi(o,r,!1)];if(l&&l(n.state,n.dispatch,n))return!0}if((r.altKey||r.metaKey||r.ctrlKey)&&!(c0&&r.ctrlKey&&r.altKey)&&(i=Tt[r.keyCode])&&i!=o){let l=e[Oi(i,r)];if(l&&l(n.state,n.dispatch,n))return!0}}return!1}}var h0=Object.defineProperty,la=(t,e)=>{for(var n in e)h0(t,n,{get:e[n],enumerable:!0})};function ri(t){const{state:e,transaction:n}=t;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...e,apply:e.apply.bind(e),applyTransaction:e.applyTransaction.bind(e),plugins:e.plugins,schema:e.schema,reconfigure:e.reconfigure.bind(e),toJSON:e.toJSON.bind(e),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}var oi=class{constructor(t){this.editor=t.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=t.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:t,editor:e,state:n}=this,{view:r}=e,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(t).map(([s,l])=>[s,(...d)=>{const u=l(...d)(i);return!o.getMeta("preventDispatch")&&!this.hasCustomState&&r.dispatch(o),u}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],l=!!t,c=t||o.tr,d=()=>(!l&&e&&!c.getMeta("preventDispatch")&&!this.hasCustomState&&i.dispatch(c),s.every(f=>f===!0)),u={...Object.fromEntries(Object.entries(n).map(([f,h])=>[f,(...m)=>{const A=this.buildProps(c,e),g=h(...m)(A);return s.push(g),u}])),run:d};return u}createCan(t){const{rawCommands:e,state:n}=this,r=!1,o=t||n.tr,i=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(e).map(([l,c])=>[l,(...d)=>c(...d)({...i,dispatch:void 0})])),chain:()=>this.createChain(o,r)}}buildProps(t,e=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s={tr:t,editor:r,view:i,state:ri({state:o,transaction:t}),dispatch:e?()=>{}:void 0,chain:()=>this.createChain(t,e),can:()=>this.createCan(t),get commands(){return Object.fromEntries(Object.entries(n).map(([l,c])=>[l,(...d)=>c(...d)(s)]))}};return s}},ef={};la(ef,{blur:()=>p0,clearContent:()=>m0,clearNodes:()=>A0,command:()=>g0,createParagraphNear:()=>b0,cut:()=>v0,deleteCurrentNode:()=>y0,deleteNode:()=>C0,deleteRange:()=>I0,deleteSelection:()=>k0,enter:()=>E0,exitCode:()=>M0,extendMarkRange:()=>w0,first:()=>N0,focus:()=>S0,forEach:()=>T0,insertContent:()=>L0,insertContentAt:()=>B0,joinBackward:()=>P0,joinDown:()=>z0,joinForward:()=>V0,joinItemBackward:()=>j0,joinItemForward:()=>H0,joinTextblockBackward:()=>Q0,joinTextblockForward:()=>W0,joinUp:()=>R0,keyboardShortcut:()=>U0,lift:()=>q0,liftEmptyBlock:()=>K0,liftListItem:()=>Z0,newlineInCode:()=>Y0,resetAttributes:()=>X0,scrollIntoView:()=>J0,selectAll:()=>G0,selectNodeBackward:()=>$0,selectNodeForward:()=>_0,selectParentNode:()=>eC,selectTextblockEnd:()=>tC,selectTextblockStart:()=>nC,setContent:()=>rC,setMark:()=>kC,setMeta:()=>EC,setNode:()=>MC,setNodeSelection:()=>wC,setTextDirection:()=>NC,setTextSelection:()=>xC,sinkListItem:()=>SC,splitBlock:()=>TC,splitListItem:()=>LC,toggleList:()=>DC,toggleMark:()=>OC,toggleNode:()=>BC,toggleWrap:()=>RC,undoInputRule:()=>zC,unsetAllMarks:()=>PC,unsetMark:()=>VC,unsetTextDirection:()=>jC,updateAttributes:()=>HC,wrapIn:()=>QC,wrapInList:()=>WC});var p0=()=>({editor:t,view:e})=>(requestAnimationFrame(()=>{var n;t.isDestroyed||(e.dom.blur(),(n=window==null?void 0:window.getSelection())==null||n.removeAllRanges())}),!0),m0=(t=!0)=>({commands:e})=>e.setContent("",{emitUpdate:t}),A0=()=>({state:t,tr:e,dispatch:n})=>{const{selection:r}=e,{ranges:o}=r;return n&&o.forEach(({$from:i,$to:s})=>{t.doc.nodesBetween(i.pos,s.pos,(l,c)=>{if(l.type.isText)return;const{doc:d,mapping:u}=e,f=d.resolve(u.map(c)),h=d.resolve(u.map(c+l.nodeSize)),p=f.blockRange(h);if(!p)return;const m=Nn(p);if(l.type.isTextblock){const{defaultType:A}=f.parent.contentMatchAt(f.index());e.setNodeMarkup(p.start,A)}(m||m===0)&&e.lift(p,m)})}),!0},g0=t=>e=>t(e),b0=()=>({state:t,dispatch:e})=>mu(t,e),v0=(t,e)=>({editor:n,tr:r})=>{const{state:o}=n,i=o.doc.slice(t.from,t.to);r.deleteRange(t.from,t.to);const s=r.mapping.map(e);return r.insert(s,i.content),r.setSelection(new P(r.doc.resolve(Math.max(s-1,0)))),!0},y0=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,r=n.$anchor.node();if(r.content.size>0)return!1;const o=t.selection.$anchor;for(let i=o.depth;i>0;i-=1)if(o.node(i).type===r.type){if(e){const l=o.before(i),c=o.after(i);t.delete(l,c).scrollIntoView()}return!0}return!1};function ue(t,e){if(typeof t=="string"){if(!e.nodes[t])throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);return e.nodes[t]}return t}var C0=t=>({tr:e,state:n,dispatch:r})=>{const o=ue(t,n.schema),i=e.selection.$anchor;for(let s=i.depth;s>0;s-=1)if(i.node(s).type===o){if(r){const c=i.before(s),d=i.after(s);e.delete(c,d).scrollIntoView()}return!0}return!1},I0=t=>({tr:e,dispatch:n})=>{const{from:r,to:o}=t;return n&&e.delete(r,o),!0},k0=()=>({state:t,dispatch:e})=>Zs(t,e),E0=()=>({commands:t})=>t.keyboardShortcut("Enter"),M0=()=>({state:t,dispatch:e})=>lv(t,e);function ca(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function po(t,e,n={strict:!0}){const r=Object.keys(e);return r.length?r.every(o=>n.strict?e[o]===t[o]:ca(e[o])?e[o].test(t[o]):e[o]===t[o]):!0}function tf(t,e,n={}){return t.find(r=>r.type===e&&po(Object.fromEntries(Object.keys(n).map(o=>[o,r.attrs[o]])),n))}function nc(t,e,n={}){return!!tf(t,e,n)}function da(t,e,n){var r;if(!t||!e)return;let o=t.parent.childAfter(t.parentOffset);if((!o.node||!o.node.marks.some(u=>u.type===e))&&(o=t.parent.childBefore(t.parentOffset)),!o.node||!o.node.marks.some(u=>u.type===e)||(n=n||((r=o.node.marks[0])==null?void 0:r.attrs),!tf([...o.node.marks],e,n)))return;let s=o.index,l=t.start()+o.offset,c=s+1,d=l+o.node.nodeSize;for(;s>0&&nc([...t.parent.child(s-1).marks],e,n);)s-=1,l-=t.parent.child(s).nodeSize;for(;c<t.parent.childCount&&nc([...t.parent.child(c).marks],e,n);)d+=t.parent.child(c).nodeSize,c+=1;return{from:l,to:d}}function dt(t,e){if(typeof t=="string"){if(!e.marks[t])throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);return e.marks[t]}return t}var w0=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const i=dt(t,r.schema),{doc:s,selection:l}=n,{$from:c,from:d,to:u}=l;if(o){const f=da(c,i,e);if(f&&f.from<=d&&f.to>=u){const h=P.create(s,f.from,f.to);n.setSelection(h)}}return!0},N0=t=>e=>{const n=typeof t=="function"?t(e):t;for(let r=0;r<n.length;r+=1)if(n[r](e))return!0;return!1};function nf(t){return t instanceof P}function Qt(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function rf(t,e=null){if(!e)return null;const n=j.atStart(t),r=j.atEnd(t);if(e==="start"||e===!0)return n;if(e==="end")return r;const o=n.from,i=r.to;return e==="all"?P.create(t,Qt(0,o,i),Qt(t.content.size,o,i)):P.create(t,Qt(e,o,i),Qt(e,o,i))}function rc(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function mo(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function x0(){return typeof navigator<"u"?/^((?!chrome|android).)*safari/i.test(navigator.userAgent):!1}var S0=(t=null,e={})=>({editor:n,view:r,tr:o,dispatch:i})=>{e={scrollIntoView:!0,...e};const s=()=>{(mo()||rc())&&r.dom.focus(),x0()&&!mo()&&!rc()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),e!=null&&e.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&t===null||t===!1)return!0}catch{return!1}if(i&&t===null&&!nf(n.state.selection))return s(),!0;const l=rf(o.doc,t)||n.state.selection,c=n.state.selection.eq(l);return i&&(c||o.setSelection(l),c&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},T0=(t,e)=>n=>t.every((r,o)=>e(r,{...n,index:o})),L0=(t,e)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},t,e),of=t=>{const e=t.childNodes;for(let n=e.length-1;n>=0;n-=1){const r=e[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?t.removeChild(r):r.nodeType===1&&of(r)}return t};function Sr(t){if(typeof window>"u")throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");const e=`<body>${t}</body>`,n=new window.DOMParser().parseFromString(e,"text/html").body;return of(n)}function fr(t,e,n){if(t instanceof Mt||t instanceof w)return t;n={slice:!0,parseOptions:{},...n};const r=typeof t=="object"&&t!==null,o=typeof t=="string";if(r)try{if(Array.isArray(t)&&t.length>0)return w.fromArray(t.map(l=>e.nodeFromJSON(l)));const s=e.nodeFromJSON(t);return n.errorOnInvalidContent&&s.check(),s}catch(i){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:i});return console.warn("[tiptap warn]: Invalid content.","Passed value:",t,"Error:",i),fr("",e,n)}if(o){if(n.errorOnInvalidContent){let s=!1,l="";const c=new Wd({topNode:e.spec.topNode,marks:e.spec.marks,nodes:e.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:d=>(s=!0,l=typeof d=="string"?d:d.outerHTML,null)}]}})});if(n.slice?wt.fromSchema(c).parseSlice(Sr(t),n.parseOptions):wt.fromSchema(c).parse(Sr(t),n.parseOptions),n.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const i=wt.fromSchema(e);return n.slice?i.parseSlice(Sr(t),n.parseOptions).content:i.parse(Sr(t),n.parseOptions)}return fr("",e,n)}function D0(t,e,n){const r=t.steps.length-1;if(r<e)return;const o=t.steps[r];if(!(o instanceof fe||o instanceof pe))return;const i=t.mapping.maps[r];let s=0;i.forEach((l,c,d,u)=>{s===0&&(s=u)}),t.setSelection(j.near(t.doc.resolve(s),n))}var O0=t=>!("type"in t),B0=(t,e,n)=>({tr:r,dispatch:o,editor:i})=>{var s;if(o){n={parseOptions:i.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let l;const c=g=>{i.emit("contentError",{editor:i,error:g,disableCollaboration:()=>{"collaboration"in i.storage&&typeof i.storage.collaboration=="object"&&i.storage.collaboration&&(i.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...n.parseOptions};if(!n.errorOnInvalidContent&&!i.options.enableContentCheck&&i.options.emitContentError)try{fr(e,i.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(g){c(g)}try{l=fr(e,i.schema,{parseOptions:d,errorOnInvalidContent:(s=n.errorOnInvalidContent)!=null?s:i.options.enableContentCheck})}catch(g){return c(g),!1}let{from:u,to:f}=typeof t=="number"?{from:t,to:t}:{from:t.from,to:t.to},h=!0,p=!0;if((O0(l)?l:[l]).forEach(g=>{g.check(),h=h?g.isText&&g.marks.length===0:!1,p=p?g.isBlock:!1}),u===f&&p){const{parent:g}=r.doc.resolve(u);g.isTextblock&&!g.type.spec.code&&!g.childCount&&(u-=1,f+=1)}let A;if(h){if(Array.isArray(e))A=e.map(g=>g.text||"").join("");else if(e instanceof w){let g="";e.forEach(b=>{b.text&&(g+=b.text)}),A=g}else typeof e=="object"&&e&&e.text?A=e.text:A=e;r.insertText(A,u,f)}else{A=l;const g=r.doc.resolve(u),b=g.node(),v=g.parentOffset===0,y=b.isText||b.isTextblock,C=b.content.size>0;v&&y&&C&&(u=Math.max(0,u-1)),r.replaceWith(u,f,A)}n.updateSelection&&D0(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:u,text:A}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:u,text:A})}return!0},R0=()=>({state:t,dispatch:e})=>iv(t,e),z0=()=>({state:t,dispatch:e})=>sv(t,e),P0=()=>({state:t,dispatch:e})=>lu(t,e),V0=()=>({state:t,dispatch:e})=>fu(t,e),j0=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Go(t.doc,t.selection.$from.pos,-1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},H0=()=>({state:t,dispatch:e,tr:n})=>{try{const r=Go(t.doc,t.selection.$from.pos,1);return r==null?!1:(n.join(r,2),e&&e(n),!0)}catch{return!1}},Q0=()=>({state:t,dispatch:e})=>rv(t,e),W0=()=>({state:t,dispatch:e})=>ov(t,e);function sf(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function F0(t){const e=t.split(/-(?!$)/);let n=e[e.length-1];n==="Space"&&(n=" ");let r,o,i,s;for(let l=0;l<e.length-1;l+=1){const c=e[l];if(/^(cmd|meta|m)$/i.test(c))s=!0;else if(/^a(lt)?$/i.test(c))r=!0;else if(/^(c|ctrl|control)$/i.test(c))o=!0;else if(/^s(hift)?$/i.test(c))i=!0;else if(/^mod$/i.test(c))mo()||sf()?s=!0:o=!0;else throw new Error(`Unrecognized modifier name: ${c}`)}return r&&(n=`Alt-${n}`),o&&(n=`Ctrl-${n}`),s&&(n=`Meta-${n}`),i&&(n=`Shift-${n}`),n}var U0=t=>({editor:e,view:n,tr:r,dispatch:o})=>{const i=F0(t).split(/-(?!$)/),s=i.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),c=e.captureTransaction(()=>{n.someProp("handleKeyDown",d=>d(n,l))});return c==null||c.steps.forEach(d=>{const u=d.map(r.mapping);u&&o&&r.maybeStep(u)}),!0};function Lt(t,e,n={}){const{from:r,to:o,empty:i}=t.selection,s=e?ue(e,t.schema):null,l=[];t.doc.nodesBetween(r,o,(f,h)=>{if(f.isText)return;const p=Math.max(r,h),m=Math.min(o,h+f.nodeSize);l.push({node:f,from:p,to:m})});const c=o-r,d=l.filter(f=>s?s.name===f.node.type.name:!0).filter(f=>po(f.node.attrs,n,{strict:!1}));return i?!!d.length:d.reduce((f,h)=>f+h.to-h.from,0)>=c}var q0=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return Lt(n,o,e)?av(n,r):!1},K0=()=>({state:t,dispatch:e})=>Au(t,e),Z0=t=>({state:e,dispatch:n})=>{const r=ue(t,e.schema);return vv(r)(e,n)},Y0=()=>({state:t,dispatch:e})=>pu(t,e);function ii(t,e){return e.nodes[t]?"node":e.marks[t]?"mark":null}function oc(t,e){const n=typeof e=="string"?[e]:e;return Object.keys(t).reduce((r,o)=>(n.includes(o)||(r[o]=t[o]),r),{})}var X0=(t,e)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=ii(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=ue(t,r.schema)),l==="mark"&&(s=dt(t,r.schema));let c=!1;return n.selection.ranges.forEach(d=>{r.doc.nodesBetween(d.$from.pos,d.$to.pos,(u,f)=>{i&&i===u.type&&(c=!0,o&&n.setNodeMarkup(f,void 0,oc(u.attrs,e))),s&&u.marks.length&&u.marks.forEach(h=>{s===h.type&&(c=!0,o&&n.addMark(f,f+u.nodeSize,s.create(oc(h.attrs,e))))})})}),c},J0=()=>({tr:t,dispatch:e})=>(e&&t.scrollIntoView(),!0),G0=()=>({tr:t,dispatch:e})=>{if(e){const n=new De(t.doc);t.setSelection(n)}return!0},$0=()=>({state:t,dispatch:e})=>du(t,e),_0=()=>({state:t,dispatch:e})=>hu(t,e),eC=()=>({state:t,dispatch:e})=>uv(t,e),tC=()=>({state:t,dispatch:e})=>pv(t,e),nC=()=>({state:t,dispatch:e})=>hv(t,e);function fs(t,e,n={},r={}){return fr(t,e,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var rC=(t,{errorOnInvalidContent:e,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:o,tr:i,dispatch:s,commands:l})=>{const{doc:c}=i;if(r.preserveWhitespace!=="full"){const d=fs(t,o.schema,r,{errorOnInvalidContent:e??o.options.enableContentCheck});return s&&i.replaceWith(0,c.content.size,d).setMeta("preventUpdate",!n),!0}return s&&i.setMeta("preventUpdate",!n),l.insertContentAt({from:0,to:c.content.size},t,{parseOptions:r,errorOnInvalidContent:e??o.options.enableContentCheck})};function af(t,e){const n=dt(e,t.schema),{from:r,to:o,empty:i}=t.selection,s=[];i?(t.storedMarks&&s.push(...t.storedMarks),s.push(...t.selection.$head.marks())):t.doc.nodesBetween(r,o,c=>{s.push(...c.marks)});const l=s.find(c=>c.type.name===n.name);return l?{...l.attrs}:{}}function lf(t,e){const n=new qs(t);return e.forEach(r=>{r.steps.forEach(o=>{n.step(o)})}),n}function oC(t){for(let e=0;e<t.edgeCount;e+=1){const{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function iC(t,e,n){const r=[];return t.nodesBetween(e.from,e.to,(o,i)=>{n(o)&&r.push({node:o,pos:i})}),r}function cf(t,e){for(let n=t.depth;n>0;n-=1){const r=t.node(n);if(e(r))return{pos:n>0?t.before(n):0,start:t.start(n),depth:n,node:r}}}function si(t){return e=>cf(e.$from,t)}function B(t,e,n){return t.config[e]===void 0&&t.parent?B(t.parent,e,n):typeof t.config[e]=="function"?t.config[e].bind({...n,parent:t.parent?B(t.parent,e,n):null}):t.config[e]}function ua(t){return t.map(e=>{const n={name:e.name,options:e.options,storage:e.storage},r=B(e,"addExtensions",n);return r?[e,...ua(r())]:e}).flat(10)}function fa(t,e){const n=rn.fromSchema(e).serializeFragment(t),o=document.implementation.createHTMLDocument().createElement("div");return o.appendChild(n),o.innerHTML}function df(t){return typeof t=="function"}function Y(t,e=void 0,...n){return df(t)?e?t.bind(e)(...n):t(...n):t}function sC(t={}){return Object.keys(t).length===0&&t.constructor===Object}function kn(t){const e=t.filter(o=>o.type==="extension"),n=t.filter(o=>o.type==="node"),r=t.filter(o=>o.type==="mark");return{baseExtensions:e,nodeExtensions:n,markExtensions:r}}function uf(t){const e=[],{nodeExtensions:n,markExtensions:r}=kn(t),o=[...n,...r],i={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},s=n.filter(d=>d.name!=="text").map(d=>d.name),l=r.map(d=>d.name),c=[...s,...l];return t.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage,extensions:o},f=B(d,"addGlobalAttributes",u);if(!f)return;f().forEach(p=>{let m;Array.isArray(p.types)?m=p.types:p.types==="*"?m=c:p.types==="nodes"?m=s:p.types==="marks"?m=l:m=[],m.forEach(A=>{Object.entries(p.attributes).forEach(([g,b])=>{e.push({type:A,name:g,attribute:{...i,...b}})})})})}),o.forEach(d=>{const u={name:d.name,options:d.options,storage:d.storage},f=B(d,"addAttributes",u);if(!f)return;const h=f();Object.entries(h).forEach(([p,m])=>{const A={...i,...m};typeof(A==null?void 0:A.default)=="function"&&(A.default=A.default()),A!=null&&A.isRequired&&(A==null?void 0:A.default)===void 0&&delete A.default,e.push({type:d.name,name:p,attribute:A})})}),e}function aC(t){const e=[];let n="",r=!1,o=!1,i=0;const s=t.length;for(let l=0;l<s;l+=1){const c=t[l];if(c==="'"&&!o){r=!r,n+=c;continue}if(c==='"'&&!r){o=!o,n+=c;continue}if(!r&&!o){if(c==="("){i+=1,n+=c;continue}if(c===")"&&i>0){i-=1,n+=c;continue}if(c===";"&&i===0){e.push(n),n="";continue}}n+=c}return n&&e.push(n),e}function ic(t){const e=[],n=aC(t||""),r=n.length;for(let o=0;o<r;o+=1){const i=n[o],s=i.indexOf(":");if(s===-1)continue;const l=i.slice(0,s).trim(),c=i.slice(s+1).trim();l&&c&&e.push([l,c])}return e}function te(...t){return t.filter(e=>!!e).reduce((e,n)=>{const r={...e};return Object.entries(n).forEach(([o,i])=>{if(!r[o]){r[o]=i;return}if(o==="class"){const l=i?String(i).split(" "):[],c=r[o]?r[o].split(" "):[],d=l.filter(u=>!c.includes(u));r[o]=[...c,...d].join(" ")}else if(o==="style"){const l=new Map([...ic(r[o]),...ic(i)]);r[o]=Array.from(l.entries()).map(([c,d])=>`${c}: ${d}`).join("; ")}else r[o]=i}),r},{})}function hr(t,e){return e.filter(n=>n.type===t.type.name).filter(n=>n.attribute.rendered).map(n=>n.attribute.renderHTML?n.attribute.renderHTML(t.attrs)||{}:{[n.name]:t.attrs[n.name]}).reduce((n,r)=>te(n,r),{})}function lC(t){return typeof t!="string"?t:t.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(t):t==="true"?!0:t==="false"?!1:t}function sc(t,e){return"style"in t?t:{...t,getAttrs:n=>{const r=t.getAttrs?t.getAttrs(n):t.attrs;if(r===!1)return!1;const o=e.reduce((i,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(n):lC(n.getAttribute(s.name));return l==null?i:{...i,[s.name]:l}},{});return{...r,...o}}}}function ac(t){return Object.fromEntries(Object.entries(t).filter(([e,n])=>e==="attrs"&&sC(n)?!1:n!=null))}function lc(t){var e,n;const r={};return!((e=t==null?void 0:t.attribute)!=null&&e.isRequired)&&"default"in((t==null?void 0:t.attribute)||{})&&(r.default=t.attribute.default),((n=t==null?void 0:t.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=t.attribute.validate),[t.name,r]}function cC(t,e){var n;const r=uf(t),{nodeExtensions:o,markExtensions:i}=kn(t),s=(n=o.find(d=>B(d,"topNode")))==null?void 0:n.name,l=Object.fromEntries(o.map(d=>{const u=r.filter(b=>b.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((b,v)=>{const y=B(v,"extendNodeSchema",f);return{...b,...y?y(d):{}}},{}),p=ac({...h,content:Y(B(d,"content",f)),marks:Y(B(d,"marks",f)),group:Y(B(d,"group",f)),inline:Y(B(d,"inline",f)),atom:Y(B(d,"atom",f)),selectable:Y(B(d,"selectable",f)),draggable:Y(B(d,"draggable",f)),code:Y(B(d,"code",f)),whitespace:Y(B(d,"whitespace",f)),linebreakReplacement:Y(B(d,"linebreakReplacement",f)),defining:Y(B(d,"defining",f)),isolating:Y(B(d,"isolating",f)),attrs:Object.fromEntries(u.map(lc))}),m=Y(B(d,"parseHTML",f));m&&(p.parseDOM=m.map(b=>sc(b,u)));const A=B(d,"renderHTML",f);A&&(p.toDOM=b=>A({node:b,HTMLAttributes:hr(b,u)}));const g=B(d,"renderText",f);return g&&(p.toText=g),[d.name,p]})),c=Object.fromEntries(i.map(d=>{const u=r.filter(g=>g.type===d.name),f={name:d.name,options:d.options,storage:d.storage,editor:e},h=t.reduce((g,b)=>{const v=B(b,"extendMarkSchema",f);return{...g,...v?v(d):{}}},{}),p=ac({...h,inclusive:Y(B(d,"inclusive",f)),excludes:Y(B(d,"excludes",f)),group:Y(B(d,"group",f)),spanning:Y(B(d,"spanning",f)),code:Y(B(d,"code",f)),attrs:Object.fromEntries(u.map(lc))}),m=Y(B(d,"parseHTML",f));m&&(p.parseDOM=m.map(g=>sc(g,u)));const A=B(d,"renderHTML",f);return A&&(p.toDOM=g=>A({mark:g,HTMLAttributes:hr(g,u)})),[d.name,p]}));return new Wd({topNode:s,nodes:l,marks:c})}function dC(t){const e=t.filter((n,r)=>t.indexOf(n)!==r);return Array.from(new Set(e))}function Gn(t){return t.sort((n,r)=>{const o=B(n,"priority")||100,i=B(r,"priority")||100;return o>i?-1:o<i?1:0})}function ff(t){const e=Gn(ua(t)),n=dC(e.map(r=>r.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(r=>`'${r}'`).join(", ")}]. This can lead to issues.`),e}function hf(t,e,n){const{from:r,to:o}=e,{blockSeparator:i=`
|
|
22
22
|
|
|
23
|
-
`,textSerializers:s={}}=n||{};let l="";return t.nodesBetween(r,o,(c,d,u,f)=>{var h;c.isBlock&&d>r&&(l+=i);const p=s==null?void 0:s[c.type.name];if(p)return u&&(l+=p({node:c,pos:d,parent:u,index:f,range:e})),!1;c.isText&&(l+=(h=c==null?void 0:c.text)==null?void 0:h.slice(Math.max(r,d)-d,o-d))}),l}function dC(t,e){const n={from:0,to:t.content.size};return hf(t,n,e)}function pf(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function uC(t,e){const n=ue(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});const s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function mf(t,e){const n=ii(typeof e=="string"?e:e.name,t.schema);return n==="node"?uC(t,e):n==="mark"?af(t,e):{}}function fC(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function hC(t){const e=fC(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Af(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((l,c)=>{s.push({from:l,to:c})});else{const{from:l,to:c}=n[i];if(l===void 0||c===void 0)return;s.push({from:l,to:c})}s.forEach(({from:l,to:c})=>{const d=e.slice(i).map(l,-1),u=e.slice(i).map(c),f=e.invert().map(d,-1),h=e.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:d,to:u}})})}),hC(r)}function ha(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=da(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var pC=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&s===null;){const l=o.node(i);(l==null?void 0:l.type.name)===e?s=l:i-=1}return[s,i]};function zn(t,e){return e.nodes[t]||e.marks[t]||null}function Ur(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var mC=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var c,d;const u=((d=(c=o.type.spec).toText)==null?void 0:d.call(c,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function hs(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?dt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>i?i.name===f.type.name:!0).find(f=>po(f.attrs,n,{strict:!1}));let s=0;const l=[];if(o.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;t.doc.nodesBetween(p,m,(A,g)=>{if(i&&A.inlineContent&&!A.type.allowsMarkType(i))return!1;if(!A.isText&&!A.marks.length)return;const b=Math.max(p,g),v=Math.min(m,g+A.nodeSize),y=v-b;s+=y,l.push(...A.marks.map(C=>({mark:C,from:b,to:v})))})}),s===0)return!1;const c=l.filter(f=>i?i.name===f.mark.type.name:!0).filter(f=>po(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),d=l.filter(f=>i?f.mark.type!==i&&f.mark.type.excludes(i):!0).reduce((f,h)=>f+h.to-h.from,0);return(c>0?c+d:c)>=s}function AC(t,e,n={}){if(!e)return Lt(t,null,n)||hs(t,null,n);const r=ii(e,t.schema);return r==="node"?Lt(t,e,n):r==="mark"?hs(t,e,n):!1}var gC=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const i=si(l=>l.type.name===e)(t.selection);if(!i)return!1;const s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},bC=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function cc(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function dc(t,e){const{nodeExtensions:n}=kn(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Y(B(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ai(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(ai(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function gf(t){return t instanceof R}var bf=class vf{constructor(e){this.position=e}static fromJSON(e){return new vf(e.position)}toJSON(){return{position:this.position}}};function vC(t,e){const n=e.mapping.mapResult(t.position);return{position:new bf(n.pos),mapResult:n}}function yC(t){return new bf(t)}function CC(t,e,n){var r;const{selection:o}=e;let i=null;if(nf(o)&&(i=o.$cursor),i){const l=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(d=>d.type.excludes(n)))}const{ranges:s}=o;return s.some(({$from:l,$to:c})=>{let d=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,c.pos,(u,f,h)=>{if(d)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(A=>A.type.excludes(n));d=p&&m}return!d}),d})}var IC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:l}=i,c=dt(t,r.schema);if(o)if(s){const d=af(r,c);n.addStoredMark(c.create({...d,...e}))}else l.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;r.doc.nodesBetween(u,f,(h,p)=>{const m=Math.max(p,u),A=Math.min(p+h.nodeSize,f);h.marks.find(b=>b.type===c)?h.marks.forEach(b=>{c===b.type&&n.addMark(m,A,c.create({...b.attrs,...e}))}):n.addMark(m,A,c.create(e))})});return CC(r,n,c)},kC=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),EC=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=ue(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>Il(i,{...s,...e})(n)?!0:l.clearNodes()).command(({state:l})=>Il(i,{...s,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},MC=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Qt(t,0,r.content.size),i=R.create(r,o);e.setSelection(i)}return!0},wC=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=r;let s,l;return typeof e=="number"?(s=e,l=e):e&&"from"in e&&"to"in e?(s=e.from,l=e.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(c,d)=>{c.isText||n.setNodeMarkup(d,void 0,{...c.attrs,dir:t})}),!0},NC=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=P.atStart(r).from,l=P.atEnd(r).to,c=Qt(o,s,l),d=Qt(i,s,l),u=P.create(r,c,d);e.setSelection(u)}return!0},xC=t=>({state:e,dispatch:n})=>{const r=ue(t,e.schema);return Cv(r)(e,n)};function uc(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}var SC=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:l,$to:c}=i,d=o.extensionManager.attributes,u=Ur(d,l.node().type.name,l.node().attrs);if(i instanceof R&&i.node.isBlock)return!l.parentOffset||!lt(s,l.pos)?!1:(r&&(t&&uc(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const f=c.parentOffset===c.parent.content.size,h=l.depth===0?void 0:rC(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=f&&h?[{type:h,attrs:u}]:void 0,m=lt(e.doc,e.mapping.map(l.pos),1,p);if(!p&&!m&<(e.doc,e.mapping.map(l.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:u}]:void 0),r){if(m&&(i instanceof P&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,p),h&&!f&&!l.parentOffset&&l.parent.type!==h)){const A=e.mapping.map(l.before()),g=e.doc.resolve(A);l.node(-1).canReplaceWith(g.index(),g.index()+1,h)&&e.setNodeMarkup(e.mapping.map(l.before()),h)}t&&uc(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},TC=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const l=ue(t,r.schema),{$from:c,$to:d}=r.selection,u=r.selection.node;if(u&&u.isBlock||c.depth<2||!c.sameParent(d))return!1;const f=c.node(-1);if(f.type!==l)return!1;const h=i.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==l||c.index(-2)!==c.node(-2).childCount-1)return!1;if(o){let b=w.empty;const v=c.index(-1)?1:c.index(-2)?2:3;for(let O=c.depth-v;O>=c.depth-3;O-=1)b=w.from(c.node(O).copy(b));const y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,C={...Ur(h,c.node().type.name,c.node().attrs),...e},k=((s=l.contentMatch.defaultType)==null?void 0:s.createAndFill(C))||void 0;b=b.append(w.from(l.createAndFill(null,k)||void 0));const N=c.before(c.depth-(v-1));n.replace(N,c.after(-y),new T(b,4-v,0));let S=-1;n.doc.nodesBetween(N,n.doc.content.size,(O,I)=>{if(S>-1)return!1;O.isTextblock&&O.content.size===0&&(S=I+1)}),S>-1&&n.setSelection(P.near(n.doc.resolve(S))),n.scrollIntoView()}return!0}const p=d.pos===c.end()?f.contentMatchAt(0).defaultType:null,m={...Ur(h,f.type.name,f.attrs),...e},A={...Ur(h,c.node().type.name,c.node().attrs),...e};n.delete(c.pos,d.pos);const g=p?[{type:l,attrs:m},{type:p,attrs:A}]:[{type:l,attrs:m}];if(!lt(n.doc,c.pos,2))return!1;if(o){const{selection:b,storedMarks:v}=r,{splittableMarks:y}=i.extensionManager,C=v||b.$to.parentOffset&&b.$from.marks();if(n.split(c.pos,2,g).scrollIntoView(),!C||!o)return!0;const k=C.filter(N=>y.includes(N.type.name));n.ensureMarks(k)}return!0},Bi=(t,e)=>{const n=si(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Dt(t.doc,n.pos)&&t.join(n.pos),!0},Ri=(t,e)=>{const n=si(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Dt(t.doc,r)&&t.join(r),!0},LC=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:c,commands:d,can:u})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,p=ue(t,s.schema),m=ue(e,s.schema),{selection:A,storedMarks:g}=s,{$from:b,$to:v}=A,y=b.blockRange(v),C=g||A.$to.parentOffset&&A.$from.marks();if(!y)return!1;const k=si(N=>dc(N.type.name,f))(A);if(y.depth>=1&&k&&y.depth-k.depth<=1){if(k.node.type===p)return d.liftListItem(m);if(dc(k.node.type.name,f)&&p.validContent(k.node.content)&&l)return c().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run()}return!n||!C||!l?c().command(()=>u().wrapInList(p,r)?!0:d.clearNodes()).wrapInList(p,r).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run():c().command(()=>{const N=u().wrapInList(p,r),S=C.filter(O=>h.includes(O.type.name));return i.ensureMarks(S),N?!0:d.clearNodes()}).wrapInList(p,r).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run()},DC=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=dt(t,r.schema);return hs(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},OC=(t,e,n={})=>({state:r,commands:o})=>{const i=ue(t,r.schema),s=ue(e,r.schema),l=Lt(r,i,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),l?o.setNode(s,c):o.setNode(i,{...c,...n})},BC=(t,e={})=>({state:n,commands:r})=>{const o=ue(t,n.schema);return Lt(n,o,e)?r.lift(o):r.wrapIn(o,e)},RC=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,l=i.transform;for(let c=l.steps.length-1;c>=0;c-=1)s.step(l.steps[c].invert(l.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},zC=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},PC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=n,c=dt(t,r.schema),{$from:d,empty:u,ranges:f}=l;if(!o)return!0;if(u&&s){let{from:h,to:p}=l;const m=(i=d.marks().find(g=>g.type===c))==null?void 0:i.attrs,A=da(d,c,m);A&&(h=A.from,p=A.to),n.removeMark(h,p,c)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,c)});return n.removeStoredMark(c),!0},VC=t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=n;let i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=o.from,s=o.to),r&&e.doc.nodesBetween(i,s,(l,c)=>{if(l.isText)return;const d={...l.attrs};delete d.dir,e.setNodeMarkup(c,void 0,d)}),!0},jC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=ii(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=ue(t,r.schema)),l==="mark"&&(s=dt(t,r.schema));let c=!1;return n.selection.ranges.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;let h,p,m,A;n.selection.empty?r.doc.nodesBetween(u,f,(g,b)=>{i&&i===g.type&&(c=!0,m=Math.max(b,u),A=Math.min(b+g.nodeSize,f),h=b,p=g)}):r.doc.nodesBetween(u,f,(g,b)=>{b<u&&i&&i===g.type&&(c=!0,m=Math.max(b,u),A=Math.min(b+g.nodeSize,f),h=b,p=g),b>=u&&b<=f&&(i&&i===g.type&&(c=!0,o&&n.setNodeMarkup(b,void 0,{...g.attrs,...e})),s&&g.marks.length&&g.marks.forEach(v=>{if(s===v.type&&(c=!0,o)){const y=Math.max(b,u),C=Math.min(b+g.nodeSize,f);n.addMark(y,C,s.create({...v.attrs,...e}))}}))}),p&&(h!==void 0&&o&&n.setNodeMarkup(h,void 0,{...p.attrs,...e}),s&&p.marks.length&&p.marks.forEach(g=>{s===g.type&&o&&n.addMark(m,A,s.create({...g.attrs,...e}))}))}),c},HC=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return pv(o,e)(n,r)},QC=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return mv(o,e)(n,r)},WC=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},li=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},FC=(t,e)=>{if(ca(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Tr(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=t,{view:c}=n;if(c.composing)return!1;const d=c.state.doc.resolve(r);if(d.parent.type.spec.code||(e=d.nodeBefore||d.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const f=mC(d)+i;return s.forEach(h=>{if(u)return;const p=FC(f,h.find);if(!p)return;const m=c.state.tr,A=ri({state:c.state,transaction:m}),g={from:r-(p[0].length-i.length),to:o},{commands:b,chain:v,can:y}=new oi({editor:n,state:A});h.handler({state:A,range:g,match:p,commands:b,chain:v,can:y})===null||!m.steps.length||(h.undoable&&m.setMeta(l,{transform:m,from:r,to:o,text:i}),c.dispatch(m),u=!0)}),u}function UC(t){const{editor:e,rules:n}=t,r=new ne({state:{init(){return null},apply(o,i,s){const l=o.getMeta(r);if(l)return l;const c=o.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:u}=c;typeof u=="string"?u=u:u=fa(w.from(u),s.schema);const{from:f}=c,h=f+u.length;Tr({editor:e,from:f,to:h,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return Tr({editor:e,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Tr({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Tr({editor:e,from:s.pos,to:s.pos,text:`
|
|
24
|
-
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function qC(t){return Object.prototype.toString.call(t).slice(8,-1)}function Lr(t){return qC(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function yf(t,e){const n={...t};return Lr(t)&&Lr(e)&&Object.keys(e).forEach(r=>{Lr(e[r])&&Lr(t[r])?n[r]=yf(t[r],e[r]):n[r]=e[r]}),n}var pa=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Y(B(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Y(B(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>yf(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},on=class Cf extends pa{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new Cf(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const c=s.find(d=>(d==null?void 0:d.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function KC(t){return typeof t=="number"}var ZC=class{constructor(t){this.find=t.find,this.handler=t.handler}},YC=(t,e,n)=>{if(ca(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function XC(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:c,chain:d,can:u}=new oi({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,o,(p,m)=>{var A,g,b,v,y;if((g=(A=p.type)==null?void 0:A.spec)!=null&&g.code||!(p.isText||p.isTextblock||p.isInline))return;const C=(y=(v=(b=p.content)==null?void 0:b.size)!=null?v:p.nodeSize)!=null?y:0,k=Math.max(r,m),N=Math.min(o,m+C);if(k>=N)return;const S=p.isText?p.text||"":p.textBetween(k-m,N-m,void 0,"");YC(S,i.find,s).forEach(I=>{if(I.index===void 0)return;const U=k+I.index+1,K=U+I[0].length,Q={from:n.tr.mapping.map(U),to:n.tr.mapping.map(K)},M=i.handler({state:n,range:Q,match:I,commands:c,chain:d,can:u,pasteEvent:s,dropEvent:l});f.push(M)})}),f.every(p=>p!==null)}var Dr=null,JC=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function GC(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const c=({state:u,from:f,to:h,rule:p,pasteEvt:m})=>{const A=u.tr,g=ri({state:u,transaction:A});if(!(!XC({editor:e,state:g,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:m,dropEvent:l})||!A.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,A}};return n.map(u=>new ne({view(f){const h=m=>{var A;r=(A=f.dom.parentElement)!=null&&A.contains(m.target)?f.dom.parentElement:null,r&&(Dr=e)},p=()=>{Dr&&(Dr=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(i=r===f.dom.parentElement,l=h,!i){const p=Dr;p!=null&&p.isEditable&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(f,h)=>{var p;const m=(p=h.clipboardData)==null?void 0:p.getData("text/html");return s=h,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,p)=>{const m=f[0],A=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i,b=m.getMeta("applyPasteRules"),v=!!b;if(!A&&!g&&!v)return;if(v){let{text:k}=b;typeof k=="string"?k=k:k=fa(w.from(k),p.schema);const{from:N}=b,S=N+k.length,O=JC(k);return c({rule:u,state:p,from:N,to:{b:S},pasteEvt:O})}const y=h.doc.content.findDiffStart(p.doc.content),C=h.doc.content.findDiffEnd(p.doc.content);if(!(!KC(y)||!C||y===C.b))return c({rule:u,state:p,from:y,to:C,pasteEvt:s})}}))}var ci=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=ff(t),this.schema=lC(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zn(e.name,this.schema)},r=B(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Gn([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:zn(r.name,this.schema)},i=[],s=B(r,"addKeyboardShortcuts",o);let l={};if(r.type==="mark"&&B(r,"exitable",o)&&(l.ArrowRight=()=>on.handleExit({editor:t,mark:r})),s){const h=Object.fromEntries(Object.entries(s()).map(([p,m])=>[p,()=>m({editor:t})]));l={...l,...h}}const c=u0(l);i.push(c);const d=B(r,"addInputRules",o);if(cc(r,t.options.enableInputRules)&&d){const h=d();if(h&&h.length){const p=UC({editor:t,rules:h}),m=Array.isArray(p)?p:[p];i.push(...m)}}const u=B(r,"addPasteRules",o);if(cc(r,t.options.enablePasteRules)&&u){const h=u();if(h&&h.length){const p=GC({editor:t,rules:h});i.push(...p)}}const f=B(r,"addProseMirrorPlugins",o);if(f){const h=f();i.push(...h)}return i})}get attributes(){return uf(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=kn(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addNodeView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ue(n.name,this.schema)},i=B(n,"addNodeView",o);if(!i)return[];const s=i();if(!s)return[];const l=(c,d,u,f,h)=>{const p=hr(c,r);return s({node:c,view:d,getPos:u,decorations:f,innerDecorations:h,editor:t,extension:n,HTMLAttributes:p})};return[n.name,l]}))}dispatchTransaction(t){const{editor:e}=this;return Gn([...this.extensions].reverse()).reduceRight((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:zn(o.name,this.schema)},s=B(o,"dispatchTransaction",i);return s?l=>{s.call(i,{transaction:l,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Gn([...this.extensions]).reduce((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:zn(o.name,this.schema)},s=B(o,"transformPastedHTML",i);return s?(l,c)=>{const d=r(l,c);return s.call(i,d)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=kn(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:dt(n.name,this.schema)},i=B(n,"addMarkView",o);if(!i)return[];const s=(l,c,d)=>{const u=hr(l,r);return i()({mark:l,view:c,inline:d,editor:t,extension:n,HTMLAttributes:u,updateAttributes:f=>{f1(l,t,f)}})};return[n.name,s]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zn(e.name,this.schema)};e.type==="mark"&&((n=Y(B(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const o=B(e,"onBeforeCreate",r),i=B(e,"onCreate",r),s=B(e,"onUpdate",r),l=B(e,"onSelectionUpdate",r),c=B(e,"onTransaction",r),d=B(e,"onFocus",r),u=B(e,"onBlur",r),f=B(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),d&&this.editor.on("focus",d),u&&this.editor.on("blur",u),f&&this.editor.on("destroy",f)})}};ci.resolve=ff;ci.sort=Gn;ci.flatten=ua;var $C={};la($C,{ClipboardTextSerializer:()=>kf,Commands:()=>Ef,Delete:()=>Mf,Drop:()=>wf,Editable:()=>Nf,FocusEvents:()=>Sf,Keymap:()=>Tf,Paste:()=>Lf,Tabindex:()=>Df,TextDirection:()=>Of,focusEventsPluginKey:()=>xf});var oe=class If extends pa{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new If(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},kf=oe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ne({key:new ce("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),l=Math.max(...i.map(u=>u.$to.pos)),c=pf(n);return hf(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),Ef=oe.create({name:"commands",addCommands(){return{...ef}}}),Mf=oe.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const i=()=>{var s,l,c,d;if((d=(c=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:c.call(l,t))!=null?d:t.getMeta("y-sync$"))return;const u=lf(t.before,[t,...e]);Af(u).forEach(p=>{u.mapping.mapResult(p.oldRange.from).deletedAfter&&u.mapping.mapResult(p.oldRange.to).deletedBefore&&u.before.nodesBetween(p.oldRange.from,p.oldRange.to,(m,A)=>{const g=A+m.nodeSize-2,b=p.oldRange.from<=A&&g<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:A,to:g,newFrom:u.mapping.map(A),newTo:u.mapping.map(g),deletedRange:p.oldRange,newRange:p.newRange,partial:!b,editor:this.editor,transaction:t,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((p,m)=>{var A,g;if(p instanceof Ue){const b=h.slice(m).map(p.from,-1),v=h.slice(m).map(p.to),y=h.invert().map(b,-1),C=h.invert().map(v),k=(A=u.doc.nodeAt(b-1))==null?void 0:A.marks.some(S=>S.eq(p.mark)),N=(g=u.doc.nodeAt(v))==null?void 0:g.marks.some(S=>S.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:y,to:C},newRange:{from:b,to:v},partial:!!(N||k),editor:this.editor,transaction:t,combinedTransform:u})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),wf=oe.create({name:"drop",addProseMirrorPlugins(){return[new ne({key:new ce("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Nf=oe.create({name:"editable",addProseMirrorPlugins(){return[new ne({key:new ce("editable"),props:{editable:()=>this.editor.options.editable}})]}}),xf=new ce("focusEvents"),Sf=oe.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ne({key:xf,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Tf=oe.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:c,doc:d}=l,{empty:u,$anchor:f}=c,{pos:h,parent:p}=f,m=f.parent.isTextblock&&h>0?l.doc.resolve(h-1):f,A=m.parent.type.spec.isolating,g=f.pos-f.parentOffset,b=A&&m.parent.childCount===1?g===f.pos:j.atStart(d).from===h;return!u||!p.type.isTextblock||p.textContent.length||!b||b&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return mo()||sf()?i:o},addProseMirrorPlugins(){return[new ne({key:new ce("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(A=>A.getMeta("composition")))return;const r=t.some(A=>A.docChanged)&&!e.doc.eq(n.doc),o=t.some(A=>A.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:l}=e.selection,c=j.atStart(e.doc).from,d=j.atEnd(e.doc).to;if(i||!(s===c&&l===d)||!ai(n.doc))return;const h=n.tr,p=ri({state:n,transaction:h}),{commands:m}=new oi({editor:this.editor,state:p});if(m.clearNodes(),!!h.steps.length)return h}})]}}),Lf=oe.create({name:"paste",addProseMirrorPlugins(){return[new ne({key:new ce("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Df=oe.create({name:"tabindex",addProseMirrorPlugins(){return[new ne({key:new ce("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Of=oe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=kn(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ne({key:new ce("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),_C=class Wn{constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Wn(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Wn(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Wn(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=n.isInline,l=this.pos+r+(i?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const c=this.resolvedPos.doc.resolve(l);if(!o&&!s&&c.depth<=this.depth)return;const d=new Wn(c,this.editor,o,o||s?n:null);o&&(d.actualDepth=this.depth+1),e.push(d)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let l=0;l<s.length;l+=1){const c=s[l];if(i[c]!==n[c])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(c=>n[c]===s.node.attrs[c])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},e1=`.ProseMirror {
|
|
23
|
+
`,textSerializers:s={}}=n||{};let l="";return t.nodesBetween(r,o,(c,d,u,f)=>{var h;c.isBlock&&d>r&&(l+=i);const p=s==null?void 0:s[c.type.name];if(p)return u&&(l+=p({node:c,pos:d,parent:u,index:f,range:e})),!1;c.isText&&(l+=(h=c==null?void 0:c.text)==null?void 0:h.slice(Math.max(r,d)-d,o-d))}),l}function uC(t,e){const n={from:0,to:t.content.size};return hf(t,n,e)}function pf(t){return Object.fromEntries(Object.entries(t.nodes).filter(([,e])=>e.spec.toText).map(([e,n])=>[e,n.spec.toText]))}function fC(t,e){const n=ue(e,t.schema),{from:r,to:o}=t.selection,i=[];t.doc.nodesBetween(r,o,l=>{i.push(l)});const s=i.reverse().find(l=>l.type.name===n.name);return s?{...s.attrs}:{}}function mf(t,e){const n=ii(typeof e=="string"?e:e.name,t.schema);return n==="node"?fC(t,e):n==="mark"?af(t,e):{}}function hC(t,e=JSON.stringify){const n={};return t.filter(r=>{const o=e(r);return Object.prototype.hasOwnProperty.call(n,o)?!1:n[o]=!0})}function pC(t){const e=hC(t);return e.length===1?e:e.filter((n,r)=>!e.filter((i,s)=>s!==r).some(i=>n.oldRange.from>=i.oldRange.from&&n.oldRange.to<=i.oldRange.to&&n.newRange.from>=i.newRange.from&&n.newRange.to<=i.newRange.to))}function Af(t){const{mapping:e,steps:n}=t,r=[];return e.maps.forEach((o,i)=>{const s=[];if(o.ranges.length)o.forEach((l,c)=>{s.push({from:l,to:c})});else{const{from:l,to:c}=n[i];if(l===void 0||c===void 0)return;s.push({from:l,to:c})}s.forEach(({from:l,to:c})=>{const d=e.slice(i).map(l,-1),u=e.slice(i).map(c),f=e.invert().map(d,-1),h=e.invert().map(u);r.push({oldRange:{from:f,to:h},newRange:{from:d,to:u}})})}),pC(r)}function ha(t,e,n){const r=[];return t===e?n.resolve(t).marks().forEach(o=>{const i=n.resolve(t),s=da(i,o.type);s&&r.push({mark:o,...s})}):n.nodesBetween(t,e,(o,i)=>{!o||(o==null?void 0:o.nodeSize)===void 0||r.push(...o.marks.map(s=>({from:i,to:i+o.nodeSize,mark:s})))}),r}var mC=(t,e,n,r=20)=>{const o=t.doc.resolve(n);let i=r,s=null;for(;i>0&&s===null;){const l=o.node(i);(l==null?void 0:l.type.name)===e?s=l:i-=1}return[s,i]};function zn(t,e){return e.nodes[t]||e.marks[t]||null}function Ur(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const o=t.find(i=>i.type===e&&i.name===r);return o?o.attribute.keepOnSplit:!1}))}var AC=(t,e=500)=>{let n="";const r=t.parentOffset;return t.parent.nodesBetween(Math.max(0,r-e),r,(o,i,s,l)=>{var c,d;const u=((d=(c=o.type.spec).toText)==null?void 0:d.call(c,{node:o,pos:i,parent:s,index:l}))||o.textContent||"%leaf%";n+=o.isAtom&&!o.isText?u:u.slice(0,Math.max(0,r-i))}),n};function hs(t,e,n={}){const{empty:r,ranges:o}=t.selection,i=e?dt(e,t.schema):null;if(r)return!!(t.storedMarks||t.selection.$from.marks()).filter(f=>i?i.name===f.type.name:!0).find(f=>po(f.attrs,n,{strict:!1}));let s=0;const l=[];if(o.forEach(({$from:f,$to:h})=>{const p=f.pos,m=h.pos;t.doc.nodesBetween(p,m,(A,g)=>{if(i&&A.inlineContent&&!A.type.allowsMarkType(i))return!1;if(!A.isText&&!A.marks.length)return;const b=Math.max(p,g),v=Math.min(m,g+A.nodeSize),y=v-b;s+=y,l.push(...A.marks.map(C=>({mark:C,from:b,to:v})))})}),s===0)return!1;const c=l.filter(f=>i?i.name===f.mark.type.name:!0).filter(f=>po(f.mark.attrs,n,{strict:!1})).reduce((f,h)=>f+h.to-h.from,0),d=l.filter(f=>i?f.mark.type!==i&&f.mark.type.excludes(i):!0).reduce((f,h)=>f+h.to-h.from,0);return(c>0?c+d:c)>=s}function gC(t,e,n={}){if(!e)return Lt(t,null,n)||hs(t,null,n);const r=ii(e,t.schema);return r==="node"?Lt(t,e,n):r==="mark"?hs(t,e,n):!1}var bC=(t,e)=>{const{$from:n,$to:r,$anchor:o}=t.selection;if(e){const i=si(l=>l.type.name===e)(t.selection);if(!i)return!1;const s=t.doc.resolve(i.pos+1);return o.pos+1===s.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},vC=t=>{const{$from:e,$to:n}=t.selection;return!(e.parentOffset>0||e.pos!==n.pos)};function cc(t,e){return Array.isArray(e)?e.some(n=>(typeof n=="string"?n:n.name)===t.name):e}function dc(t,e){const{nodeExtensions:n}=kn(e),r=n.find(s=>s.name===t);if(!r)return!1;const o={name:r.name,options:r.options,storage:r.storage},i=Y(B(r,"group",o));return typeof i!="string"?!1:i.split(" ").includes("list")}function ai(t,{checkChildren:e=!0,ignoreWhitespace:n=!1}={}){var r;if(n){if(t.type.name==="hardBreak")return!0;if(t.isText)return/^\s*$/m.test((r=t.text)!=null?r:"")}if(t.isText)return!t.text;if(t.isAtom||t.isLeaf)return!1;if(t.content.childCount===0)return!0;if(e){let o=!0;return t.content.forEach(i=>{o!==!1&&(ai(i,{ignoreWhitespace:n,checkChildren:e})||(o=!1))}),o}return!1}function gf(t){return t instanceof R}var bf=class vf{constructor(e){this.position=e}static fromJSON(e){return new vf(e.position)}toJSON(){return{position:this.position}}};function yC(t,e){const n=e.mapping.mapResult(t.position);return{position:new bf(n.pos),mapResult:n}}function CC(t){return new bf(t)}function IC(t,e,n){var r;const{selection:o}=e;let i=null;if(nf(o)&&(i=o.$cursor),i){const l=(r=t.storedMarks)!=null?r:i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(l)||!l.some(d=>d.type.excludes(n)))}const{ranges:s}=o;return s.some(({$from:l,$to:c})=>{let d=l.depth===0?t.doc.inlineContent&&t.doc.type.allowsMarkType(n):!1;return t.doc.nodesBetween(l.pos,c.pos,(u,f,h)=>{if(d)return!1;if(u.isInline){const p=!h||h.type.allowsMarkType(n),m=!!n.isInSet(u.marks)||!u.marks.some(A=>A.type.excludes(n));d=p&&m}return!d}),d})}var kC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:l}=i,c=dt(t,r.schema);if(o)if(s){const d=af(r,c);n.addStoredMark(c.create({...d,...e}))}else l.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;r.doc.nodesBetween(u,f,(h,p)=>{const m=Math.max(p,u),A=Math.min(p+h.nodeSize,f);h.marks.find(b=>b.type===c)?h.marks.forEach(b=>{c===b.type&&n.addMark(m,A,c.create({...b.attrs,...e}))}):n.addMark(m,A,c.create(e))})});return IC(r,n,c)},EC=(t,e)=>({tr:n})=>(n.setMeta(t,e),!0),MC=(t,e={})=>({state:n,dispatch:r,chain:o})=>{const i=ue(t,n.schema);let s;return n.selection.$anchor.sameParent(n.selection.$head)&&(s=n.selection.$anchor.parent.attrs),i.isTextblock?o().command(({commands:l})=>Il(i,{...s,...e})(n)?!0:l.clearNodes()).command(({state:l})=>Il(i,{...s,...e})(l,r)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},wC=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,o=Qt(t,0,r.content.size),i=R.create(r,o);e.setSelection(i)}return!0},NC=(t,e)=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=r;let s,l;return typeof e=="number"?(s=e,l=e):e&&"from"in e&&"to"in e?(s=e.from,l=e.to):(s=i.from,l=i.to),o&&n.doc.nodesBetween(s,l,(c,d)=>{c.isText||n.setNodeMarkup(d,void 0,{...c.attrs,dir:t})}),!0},xC=t=>({tr:e,dispatch:n})=>{if(n){const{doc:r}=e,{from:o,to:i}=typeof t=="number"?{from:t,to:t}:t,s=P.atStart(r).from,l=P.atEnd(r).to,c=Qt(o,s,l),d=Qt(i,s,l),u=P.create(r,c,d);e.setSelection(u)}return!0},SC=t=>({state:e,dispatch:n})=>{const r=ue(t,e.schema);return Iv(r)(e,n)};function uc(t,e){const n=t.storedMarks||t.selection.$to.parentOffset&&t.selection.$from.marks();if(n){const r=n.filter(o=>e==null?void 0:e.includes(o.type.name));t.tr.ensureMarks(r)}}var TC=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=e,{$from:l,$to:c}=i,d=o.extensionManager.attributes,u=Ur(d,l.node().type.name,l.node().attrs);if(i instanceof R&&i.node.isBlock)return!l.parentOffset||!lt(s,l.pos)?!1:(r&&(t&&uc(n,o.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const f=c.parentOffset===c.parent.content.size,h=l.depth===0?void 0:oC(l.node(-1).contentMatchAt(l.indexAfter(-1)));let p=f&&h?[{type:h,attrs:u}]:void 0,m=lt(e.doc,e.mapping.map(l.pos),1,p);if(!p&&!m&<(e.doc,e.mapping.map(l.pos),1,h?[{type:h}]:void 0)&&(m=!0,p=h?[{type:h,attrs:u}]:void 0),r){if(m&&(i instanceof P&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,p),h&&!f&&!l.parentOffset&&l.parent.type!==h)){const A=e.mapping.map(l.before()),g=e.doc.resolve(A);l.node(-1).canReplaceWith(g.index(),g.index()+1,h)&&e.setNodeMarkup(e.mapping.map(l.before()),h)}t&&uc(n,o.extensionManager.splittableMarks),e.scrollIntoView()}return m},LC=(t,e={})=>({tr:n,state:r,dispatch:o,editor:i})=>{var s;const l=ue(t,r.schema),{$from:c,$to:d}=r.selection,u=r.selection.node;if(u&&u.isBlock||c.depth<2||!c.sameParent(d))return!1;const f=c.node(-1);if(f.type!==l)return!1;const h=i.extensionManager.attributes;if(c.parent.content.size===0&&c.node(-1).childCount===c.indexAfter(-1)){if(c.depth===2||c.node(-3).type!==l||c.index(-2)!==c.node(-2).childCount-1)return!1;if(o){let b=w.empty;const v=c.index(-1)?1:c.index(-2)?2:3;for(let O=c.depth-v;O>=c.depth-3;O-=1)b=w.from(c.node(O).copy(b));const y=c.indexAfter(-1)<c.node(-2).childCount?1:c.indexAfter(-2)<c.node(-3).childCount?2:3,C={...Ur(h,c.node().type.name,c.node().attrs),...e},k=((s=l.contentMatch.defaultType)==null?void 0:s.createAndFill(C))||void 0;b=b.append(w.from(l.createAndFill(null,k)||void 0));const N=c.before(c.depth-(v-1));n.replace(N,c.after(-y),new T(b,4-v,0));let S=-1;n.doc.nodesBetween(N,n.doc.content.size,(O,I)=>{if(S>-1)return!1;O.isTextblock&&O.content.size===0&&(S=I+1)}),S>-1&&n.setSelection(P.near(n.doc.resolve(S))),n.scrollIntoView()}return!0}const p=d.pos===c.end()?f.contentMatchAt(0).defaultType:null,m={...Ur(h,f.type.name,f.attrs),...e},A={...Ur(h,c.node().type.name,c.node().attrs),...e};n.delete(c.pos,d.pos);const g=p?[{type:l,attrs:m},{type:p,attrs:A}]:[{type:l,attrs:m}];if(!lt(n.doc,c.pos,2))return!1;if(o){const{selection:b,storedMarks:v}=r,{splittableMarks:y}=i.extensionManager,C=v||b.$to.parentOffset&&b.$from.marks();if(n.split(c.pos,2,g).scrollIntoView(),!C||!o)return!0;const k=C.filter(N=>y.includes(N.type.name));n.ensureMarks(k)}return!0},Bi=(t,e)=>{const n=si(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Dt(t.doc,n.pos)&&t.join(n.pos),!0},Ri=(t,e)=>{const n=si(s=>s.type===e)(t.selection);if(!n)return!0;const r=t.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;const o=t.doc.nodeAt(r);return n.node.type===(o==null?void 0:o.type)&&Dt(t.doc,r)&&t.join(r),!0},DC=(t,e,n,r={})=>({editor:o,tr:i,state:s,dispatch:l,chain:c,commands:d,can:u})=>{const{extensions:f,splittableMarks:h}=o.extensionManager,p=ue(t,s.schema),m=ue(e,s.schema),{selection:A,storedMarks:g}=s,{$from:b,$to:v}=A,y=b.blockRange(v),C=g||A.$to.parentOffset&&A.$from.marks();if(!y)return!1;const k=si(N=>dc(N.type.name,f))(A);if(y.depth>=1&&k&&y.depth-k.depth<=1){if(k.node.type===p)return d.liftListItem(m);if(dc(k.node.type.name,f)&&p.validContent(k.node.content)&&l)return c().command(()=>(i.setNodeMarkup(k.pos,p),!0)).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run()}return!n||!C||!l?c().command(()=>u().wrapInList(p,r)?!0:d.clearNodes()).wrapInList(p,r).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run():c().command(()=>{const N=u().wrapInList(p,r),S=C.filter(O=>h.includes(O.type.name));return i.ensureMarks(S),N?!0:d.clearNodes()}).wrapInList(p,r).command(()=>Bi(i,p)).command(()=>Ri(i,p)).run()},OC=(t,e={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=dt(t,r.schema);return hs(r,s,e)?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,e)},BC=(t,e,n={})=>({state:r,commands:o})=>{const i=ue(t,r.schema),s=ue(e,r.schema),l=Lt(r,i,n);let c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),l?o.setNode(s,c):o.setNode(i,{...c,...n})},RC=(t,e={})=>({state:n,commands:r})=>{const o=ue(t,n.schema);return Lt(n,o,e)?r.lift(o):r.wrapIn(o,e)},zC=()=>({state:t,dispatch:e})=>{const n=t.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(t))){if(e){const s=t.tr,l=i.transform;for(let c=l.steps.length-1;c>=0;c-=1)s.step(l.steps[c].invert(l.docs[c]));if(i.text){const c=s.doc.resolve(i.from).marks();s.replaceWith(i.from,i.to,t.schema.text(i.text,c))}else s.delete(i.from,i.to)}return!0}}return!1},PC=()=>({tr:t,dispatch:e})=>{const{selection:n}=t,{empty:r,ranges:o}=n;return r||e&&o.forEach(i=>{t.removeMark(i.$from.pos,i.$to.pos)}),!0},VC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=n,c=dt(t,r.schema),{$from:d,empty:u,ranges:f}=l;if(!o)return!0;if(u&&s){let{from:h,to:p}=l;const m=(i=d.marks().find(g=>g.type===c))==null?void 0:i.attrs,A=da(d,c,m);A&&(h=A.from,p=A.to),n.removeMark(h,p,c)}else f.forEach(h=>{n.removeMark(h.$from.pos,h.$to.pos,c)});return n.removeStoredMark(c),!0},jC=t=>({tr:e,state:n,dispatch:r})=>{const{selection:o}=n;let i,s;return typeof t=="number"?(i=t,s=t):t&&"from"in t&&"to"in t?(i=t.from,s=t.to):(i=o.from,s=o.to),r&&e.doc.nodesBetween(i,s,(l,c)=>{if(l.isText)return;const d={...l.attrs};delete d.dir,e.setNodeMarkup(c,void 0,d)}),!0},HC=(t,e={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const l=ii(typeof t=="string"?t:t.name,r.schema);if(!l)return!1;l==="node"&&(i=ue(t,r.schema)),l==="mark"&&(s=dt(t,r.schema));let c=!1;return n.selection.ranges.forEach(d=>{const u=d.$from.pos,f=d.$to.pos;let h,p,m,A;n.selection.empty?r.doc.nodesBetween(u,f,(g,b)=>{i&&i===g.type&&(c=!0,m=Math.max(b,u),A=Math.min(b+g.nodeSize,f),h=b,p=g)}):r.doc.nodesBetween(u,f,(g,b)=>{b<u&&i&&i===g.type&&(c=!0,m=Math.max(b,u),A=Math.min(b+g.nodeSize,f),h=b,p=g),b>=u&&b<=f&&(i&&i===g.type&&(c=!0,o&&n.setNodeMarkup(b,void 0,{...g.attrs,...e})),s&&g.marks.length&&g.marks.forEach(v=>{if(s===v.type&&(c=!0,o)){const y=Math.max(b,u),C=Math.min(b+g.nodeSize,f);n.addMark(y,C,s.create({...v.attrs,...e}))}}))}),p&&(h!==void 0&&o&&n.setNodeMarkup(h,void 0,{...p.attrs,...e}),s&&p.marks.length&&p.marks.forEach(g=>{s===g.type&&o&&n.addMark(m,A,s.create({...g.attrs,...e}))}))}),c},QC=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return mv(o,e)(n,r)},WC=(t,e={})=>({state:n,dispatch:r})=>{const o=ue(t,n.schema);return Av(o,e)(n,r)},FC=class{constructor(){this.callbacks={}}on(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),this}emit(t,...e){const n=this.callbacks[t];return n&&n.forEach(r=>r.apply(this,e)),this}off(t,e){const n=this.callbacks[t];return n&&(e?this.callbacks[t]=n.filter(r=>r!==e):delete this.callbacks[t]),this}once(t,e){const n=(...r)=>{this.off(t,n),e.apply(this,r)};return this.on(t,n)}removeAllListeners(){this.callbacks={}}},li=class{constructor(t){var e;this.find=t.find,this.handler=t.handler,this.undoable=(e=t.undoable)!=null?e:!0}},UC=(t,e)=>{if(ca(e))return e.exec(t);const n=e(t);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=t,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function Tr(t){var e;const{editor:n,from:r,to:o,text:i,rules:s,plugin:l}=t,{view:c}=n;if(c.composing)return!1;const d=c.state.doc.resolve(r);if(d.parent.type.spec.code||(e=d.nodeBefore||d.nodeAfter)!=null&&e.marks.find(h=>h.type.spec.code))return!1;let u=!1;const f=AC(d)+i;return s.forEach(h=>{if(u)return;const p=UC(f,h.find);if(!p)return;const m=c.state.tr,A=ri({state:c.state,transaction:m}),g={from:r-(p[0].length-i.length),to:o},{commands:b,chain:v,can:y}=new oi({editor:n,state:A});h.handler({state:A,range:g,match:p,commands:b,chain:v,can:y})===null||!m.steps.length||(h.undoable&&m.setMeta(l,{transform:m,from:r,to:o,text:i}),c.dispatch(m),u=!0)}),u}function qC(t){const{editor:e,rules:n}=t,r=new ne({state:{init(){return null},apply(o,i,s){const l=o.getMeta(r);if(l)return l;const c=o.getMeta("applyInputRules");return!!c&&setTimeout(()=>{let{text:u}=c;typeof u=="string"?u=u:u=fa(w.from(u),s.schema);const{from:f}=c,h=f+u.length;Tr({editor:e,from:f,to:h,text:u,rules:n,plugin:r})}),o.selectionSet||o.docChanged?null:i}},props:{handleTextInput(o,i,s,l){return Tr({editor:e,from:i,to:s,text:l,rules:n,plugin:r})},handleDOMEvents:{compositionend:o=>(setTimeout(()=>{const{$cursor:i}=o.state.selection;i&&Tr({editor:e,from:i.pos,to:i.pos,text:"",rules:n,plugin:r})}),!1)},handleKeyDown(o,i){if(i.key!=="Enter")return!1;const{$cursor:s}=o.state.selection;return s?Tr({editor:e,from:s.pos,to:s.pos,text:`
|
|
24
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}function KC(t){return Object.prototype.toString.call(t).slice(8,-1)}function Lr(t){return KC(t)!=="Object"?!1:t.constructor===Object&&Object.getPrototypeOf(t)===Object.prototype}function yf(t,e){const n={...t};return Lr(t)&&Lr(e)&&Object.keys(e).forEach(r=>{Lr(e[r])&&Lr(t[r])?n[r]=yf(t[r],e[r]):n[r]=e[r]}),n}var pa=class{constructor(t={}){this.type="extendable",this.parent=null,this.child=null,this.name="",this.config={name:this.name},this.config={...this.config,...t},this.name=this.config.name}get options(){return{...Y(B(this,"addOptions",{name:this.name}))||{}}}get storage(){return{...Y(B(this,"addStorage",{name:this.name,options:this.options}))||{}}}configure(t={}){const e=this.extend({...this.config,addOptions:()=>yf(this.options,t)});return e.name=this.name,e.parent=this.parent,e}extend(t={}){const e=new this.constructor({...this.config,...t});return e.parent=this,this.child=e,e.name="name"in t?t.name:e.parent.name,e}},on=class Cf extends pa{constructor(){super(...arguments),this.type="mark"}static create(e={}){const n=typeof e=="function"?e():e;return new Cf(n)}static handleExit({editor:e,mark:n}){const{tr:r}=e.state,o=e.state.selection.$from;if(o.pos===o.end()){const s=o.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===n.name))return!1;const c=s.find(d=>(d==null?void 0:d.type.name)===n.name);return c&&r.removeStoredMark(c),r.insertText(" ",o.pos),e.view.dispatch(r),!0}return!1}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function ZC(t){return typeof t=="number"}var YC=class{constructor(t){this.find=t.find,this.handler=t.handler}},XC=(t,e,n)=>{if(ca(e))return[...t.matchAll(e)];const r=e(t,n);return r?r.map(o=>{const i=[o.text];return i.index=o.index,i.input=t,i.data=o.data,o.replaceWith&&(o.text.includes(o.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),i.push(o.replaceWith)),i}):[]};function JC(t){const{editor:e,state:n,from:r,to:o,rule:i,pasteEvent:s,dropEvent:l}=t,{commands:c,chain:d,can:u}=new oi({editor:e,state:n}),f=[];return n.doc.nodesBetween(r,o,(p,m)=>{var A,g,b,v,y;if((g=(A=p.type)==null?void 0:A.spec)!=null&&g.code||!(p.isText||p.isTextblock||p.isInline))return;const C=(y=(v=(b=p.content)==null?void 0:b.size)!=null?v:p.nodeSize)!=null?y:0,k=Math.max(r,m),N=Math.min(o,m+C);if(k>=N)return;const S=p.isText?p.text||"":p.textBetween(k-m,N-m,void 0,"");XC(S,i.find,s).forEach(I=>{if(I.index===void 0)return;const U=k+I.index+1,K=U+I[0].length,Q={from:n.tr.mapping.map(U),to:n.tr.mapping.map(K)},M=i.handler({state:n,range:Q,match:I,commands:c,chain:d,can:u,pasteEvent:s,dropEvent:l});f.push(M)})}),f.every(p=>p!==null)}var Dr=null,GC=t=>{var e;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=n.clipboardData)==null||e.setData("text/html",t),n};function $C(t){const{editor:e,rules:n}=t;let r=null,o=!1,i=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const c=({state:u,from:f,to:h,rule:p,pasteEvt:m})=>{const A=u.tr,g=ri({state:u,transaction:A});if(!(!JC({editor:e,state:g,from:Math.max(f-1,0),to:h.b-1,rule:p,pasteEvent:m,dropEvent:l})||!A.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,A}};return n.map(u=>new ne({view(f){const h=m=>{var A;r=(A=f.dom.parentElement)!=null&&A.contains(m.target)?f.dom.parentElement:null,r&&(Dr=e)},p=()=>{Dr&&(Dr=null)};return window.addEventListener("dragstart",h),window.addEventListener("dragend",p),{destroy(){window.removeEventListener("dragstart",h),window.removeEventListener("dragend",p)}}},props:{handleDOMEvents:{drop:(f,h)=>{if(i=r===f.dom.parentElement,l=h,!i){const p=Dr;p!=null&&p.isEditable&&setTimeout(()=>{const m=p.state.selection;m&&p.commands.deleteRange({from:m.from,to:m.to})},10)}return!1},paste:(f,h)=>{var p;const m=(p=h.clipboardData)==null?void 0:p.getData("text/html");return s=h,o=!!(m!=null&&m.includes("data-pm-slice")),!1}}},appendTransaction:(f,h,p)=>{const m=f[0],A=m.getMeta("uiEvent")==="paste"&&!o,g=m.getMeta("uiEvent")==="drop"&&!i,b=m.getMeta("applyPasteRules"),v=!!b;if(!A&&!g&&!v)return;if(v){let{text:k}=b;typeof k=="string"?k=k:k=fa(w.from(k),p.schema);const{from:N}=b,S=N+k.length,O=GC(k);return c({rule:u,state:p,from:N,to:{b:S},pasteEvt:O})}const y=h.doc.content.findDiffStart(p.doc.content),C=h.doc.content.findDiffEnd(p.doc.content);if(!(!ZC(y)||!C||y===C.b))return c({rule:u,state:p,from:y,to:C,pasteEvt:s})}}))}var ci=class{constructor(t,e){this.splittableMarks=[],this.editor=e,this.baseExtensions=t,this.extensions=ff(t),this.schema=cC(this.extensions,e),this.setupExtensions()}get commands(){return this.extensions.reduce((t,e)=>{const n={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zn(e.name,this.schema)},r=B(e,"addCommands",n);return r?{...t,...r()}:t},{})}get plugins(){const{editor:t}=this;return Gn([...this.extensions].reverse()).flatMap(r=>{const o={name:r.name,options:r.options,storage:this.editor.extensionStorage[r.name],editor:t,type:zn(r.name,this.schema)},i=[],s=B(r,"addKeyboardShortcuts",o);let l={};if(r.type==="mark"&&B(r,"exitable",o)&&(l.ArrowRight=()=>on.handleExit({editor:t,mark:r})),s){const h=Object.fromEntries(Object.entries(s()).map(([p,m])=>[p,()=>m({editor:t})]));l={...l,...h}}const c=f0(l);i.push(c);const d=B(r,"addInputRules",o);if(cc(r,t.options.enableInputRules)&&d){const h=d();if(h&&h.length){const p=qC({editor:t,rules:h}),m=Array.isArray(p)?p:[p];i.push(...m)}}const u=B(r,"addPasteRules",o);if(cc(r,t.options.enablePasteRules)&&u){const h=u();if(h&&h.length){const p=$C({editor:t,rules:h});i.push(...p)}}const f=B(r,"addProseMirrorPlugins",o);if(f){const h=f();i.push(...h)}return i})}get attributes(){return uf(this.extensions)}get nodeViews(){const{editor:t}=this,{nodeExtensions:e}=kn(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addNodeView")).map(n=>{const r=this.attributes.filter(c=>c.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:ue(n.name,this.schema)},i=B(n,"addNodeView",o);if(!i)return[];const s=i();if(!s)return[];const l=(c,d,u,f,h)=>{const p=hr(c,r);return s({node:c,view:d,getPos:u,decorations:f,innerDecorations:h,editor:t,extension:n,HTMLAttributes:p})};return[n.name,l]}))}dispatchTransaction(t){const{editor:e}=this;return Gn([...this.extensions].reverse()).reduceRight((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:zn(o.name,this.schema)},s=B(o,"dispatchTransaction",i);return s?l=>{s.call(i,{transaction:l,next:r})}:r},t)}transformPastedHTML(t){const{editor:e}=this;return Gn([...this.extensions]).reduce((r,o)=>{const i={name:o.name,options:o.options,storage:this.editor.extensionStorage[o.name],editor:e,type:zn(o.name,this.schema)},s=B(o,"transformPastedHTML",i);return s?(l,c)=>{const d=r(l,c);return s.call(i,d)}:r},t||(r=>r))}get markViews(){const{editor:t}=this,{markExtensions:e}=kn(this.extensions);return Object.fromEntries(e.filter(n=>!!B(n,"addMarkView")).map(n=>{const r=this.attributes.filter(l=>l.type===n.name),o={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:dt(n.name,this.schema)},i=B(n,"addMarkView",o);if(!i)return[];const s=(l,c,d)=>{const u=hr(l,r);return i()({mark:l,view:c,inline:d,editor:t,extension:n,HTMLAttributes:u,updateAttributes:f=>{h1(l,t,f)}})};return[n.name,s]}))}setupExtensions(){const t=this.extensions;this.editor.extensionStorage=Object.fromEntries(t.map(e=>[e.name,e.storage])),t.forEach(e=>{var n;const r={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:zn(e.name,this.schema)};e.type==="mark"&&((n=Y(B(e,"keepOnSplit",r)))==null||n)&&this.splittableMarks.push(e.name);const o=B(e,"onBeforeCreate",r),i=B(e,"onCreate",r),s=B(e,"onUpdate",r),l=B(e,"onSelectionUpdate",r),c=B(e,"onTransaction",r),d=B(e,"onFocus",r),u=B(e,"onBlur",r),f=B(e,"onDestroy",r);o&&this.editor.on("beforeCreate",o),i&&this.editor.on("create",i),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),c&&this.editor.on("transaction",c),d&&this.editor.on("focus",d),u&&this.editor.on("blur",u),f&&this.editor.on("destroy",f)})}};ci.resolve=ff;ci.sort=Gn;ci.flatten=ua;var _C={};la(_C,{ClipboardTextSerializer:()=>kf,Commands:()=>Ef,Delete:()=>Mf,Drop:()=>wf,Editable:()=>Nf,FocusEvents:()=>Sf,Keymap:()=>Tf,Paste:()=>Lf,Tabindex:()=>Df,TextDirection:()=>Of,focusEventsPluginKey:()=>xf});var oe=class If extends pa{constructor(){super(...arguments),this.type="extension"}static create(e={}){const n=typeof e=="function"?e():e;return new If(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}},kf=oe.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new ne({key:new ce("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:t}=this,{state:e,schema:n}=t,{doc:r,selection:o}=e,{ranges:i}=o,s=Math.min(...i.map(u=>u.$from.pos)),l=Math.max(...i.map(u=>u.$to.pos)),c=pf(n);return hf(r,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:c})}}})]}}),Ef=oe.create({name:"commands",addCommands(){return{...ef}}}),Mf=oe.create({name:"delete",onUpdate({transaction:t,appendedTransactions:e}){var n,r,o;const i=()=>{var s,l,c,d;if((d=(c=(l=(s=this.editor.options.coreExtensionOptions)==null?void 0:s.delete)==null?void 0:l.filterTransaction)==null?void 0:c.call(l,t))!=null?d:t.getMeta("y-sync$"))return;const u=lf(t.before,[t,...e]);Af(u).forEach(p=>{u.mapping.mapResult(p.oldRange.from).deletedAfter&&u.mapping.mapResult(p.oldRange.to).deletedBefore&&u.before.nodesBetween(p.oldRange.from,p.oldRange.to,(m,A)=>{const g=A+m.nodeSize-2,b=p.oldRange.from<=A&&g<=p.oldRange.to;this.editor.emit("delete",{type:"node",node:m,from:A,to:g,newFrom:u.mapping.map(A),newTo:u.mapping.map(g),deletedRange:p.oldRange,newRange:p.newRange,partial:!b,editor:this.editor,transaction:t,combinedTransform:u})})});const h=u.mapping;u.steps.forEach((p,m)=>{var A,g;if(p instanceof Ue){const b=h.slice(m).map(p.from,-1),v=h.slice(m).map(p.to),y=h.invert().map(b,-1),C=h.invert().map(v),k=(A=u.doc.nodeAt(b-1))==null?void 0:A.marks.some(S=>S.eq(p.mark)),N=(g=u.doc.nodeAt(v))==null?void 0:g.marks.some(S=>S.eq(p.mark));this.editor.emit("delete",{type:"mark",mark:p.mark,from:p.from,to:p.to,deletedRange:{from:y,to:C},newRange:{from:b,to:v},partial:!!(N||k),editor:this.editor,transaction:t,combinedTransform:u})}})};(o=(r=(n=this.editor.options.coreExtensionOptions)==null?void 0:n.delete)==null?void 0:r.async)==null||o?setTimeout(i,0):i()}}),wf=oe.create({name:"drop",addProseMirrorPlugins(){return[new ne({key:new ce("tiptapDrop"),props:{handleDrop:(t,e,n,r)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:n,moved:r})}}})]}}),Nf=oe.create({name:"editable",addProseMirrorPlugins(){return[new ne({key:new ce("editable"),props:{editable:()=>this.editor.options.editable}})]}}),xf=new ce("focusEvents"),Sf=oe.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:t}=this;return[new ne({key:xf,props:{handleDOMEvents:{focus:(e,n)=>{t.isFocused=!0;const r=t.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1},blur:(e,n)=>{t.isFocused=!1;const r=t.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return e.dispatch(r),!1}}}})]}}),Tf=oe.create({name:"keymap",addKeyboardShortcuts(){const t=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:c,doc:d}=l,{empty:u,$anchor:f}=c,{pos:h,parent:p}=f,m=f.parent.isTextblock&&h>0?l.doc.resolve(h-1):f,A=m.parent.type.spec.isolating,g=f.pos-f.parentOffset,b=A&&m.parent.childCount===1?g===f.pos:j.atStart(d).from===h;return!u||!p.type.isTextblock||p.textContent.length||!b||b&&f.parent.type.name==="paragraph"?!1:s.clearNodes()}),()=>s.deleteSelection(),()=>s.joinBackward(),()=>s.selectNodeBackward()]),e=()=>this.editor.commands.first(({commands:s})=>[()=>s.deleteSelection(),()=>s.deleteCurrentNode(),()=>s.joinForward(),()=>s.selectNodeForward()]),r={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:t,"Mod-Backspace":t,"Shift-Backspace":t,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},o={...r},i={...r,"Ctrl-h":t,"Alt-Backspace":t,"Ctrl-d":e,"Ctrl-Alt-Backspace":e,"Alt-Delete":e,"Alt-d":e,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return mo()||sf()?i:o},addProseMirrorPlugins(){return[new ne({key:new ce("clearDocument"),appendTransaction:(t,e,n)=>{if(t.some(A=>A.getMeta("composition")))return;const r=t.some(A=>A.docChanged)&&!e.doc.eq(n.doc),o=t.some(A=>A.getMeta("preventClearDocument"));if(!r||o)return;const{empty:i,from:s,to:l}=e.selection,c=j.atStart(e.doc).from,d=j.atEnd(e.doc).to;if(i||!(s===c&&l===d)||!ai(n.doc))return;const h=n.tr,p=ri({state:n,transaction:h}),{commands:m}=new oi({editor:this.editor,state:p});if(m.clearNodes(),!!h.steps.length)return h}})]}}),Lf=oe.create({name:"paste",addProseMirrorPlugins(){return[new ne({key:new ce("tiptapPaste"),props:{handlePaste:(t,e,n)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:n})}}})]}}),Df=oe.create({name:"tabindex",addProseMirrorPlugins(){return[new ne({key:new ce("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}}),Of=oe.create({name:"textDirection",addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];const{nodeExtensions:t}=kn(this.extensions);return[{types:t.filter(e=>e.name!=="text").map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{const n=e.getAttribute("dir");return n&&(n==="ltr"||n==="rtl"||n==="auto")?n:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new ne({key:new ce("textDirection"),props:{attributes:()=>{const t=this.options.direction;return t?{dir:t}:{}}}})]}}),e1=class Wn{constructor(e,n,r=!1,o=null){this.currentNode=null,this.actualDepth=null,this.isBlock=r,this.resolvedPos=e,this.editor=n,this.currentNode=o}get name(){return this.node.type.name}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return(e=this.actualDepth)!=null?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let n=this.from,r=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}n=this.from+1,r=this.to-1}this.editor.commands.insertContentAt({from:n,to:r},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(this.depth===0)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(e);return new Wn(n,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new Wn(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new Wn(e,this.editor)}get children(){const e=[];return this.node.content.forEach((n,r)=>{const o=n.isBlock&&!n.isTextblock,i=n.isAtom&&!n.isText,s=n.isInline,l=this.pos+r+(i?0:1);if(l<0||l>this.resolvedPos.doc.nodeSize-2)return;const c=this.resolvedPos.doc.resolve(l);if(!o&&!s&&c.depth<=this.depth)return;const d=new Wn(c,this.editor,o,o||s?n:null);o&&(d.actualDepth=this.depth+1),e.push(d)}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,n={}){let r=null,o=this.parent;for(;o&&!r;){if(o.node.type.name===e)if(Object.keys(n).length>0){const i=o.node.attrs,s=Object.keys(n);for(let l=0;l<s.length;l+=1){const c=s[l];if(i[c]!==n[c])break}}else r=o;o=o.parent}return r}querySelector(e,n={}){return this.querySelectorAll(e,n,!0)[0]||null}querySelectorAll(e,n={},r=!1){let o=[];if(!this.children||this.children.length===0)return o;const i=Object.keys(n);return this.children.forEach(s=>{r&&o.length>0||(s.node.type.name===e&&i.every(c=>n[c]===s.node.attrs[c])&&o.push(s),!(r&&o.length>0)&&(o=o.concat(s.querySelectorAll(e,n,r))))}),o}setAttribute(e){const{tr:n}=this.editor.state;n.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(n)}},t1=`.ProseMirror {
|
|
25
25
|
position: relative;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -91,15 +91,15 @@ img.ProseMirror-separator {
|
|
|
91
91
|
|
|
92
92
|
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
93
93
|
display: block;
|
|
94
|
-
}`;function
|
|
94
|
+
}`;function n1(t,e,n){const r=document.querySelector("style[data-tiptap-style]");if(r!==null)return r;const o=document.createElement("style");return e&&o.setAttribute("nonce",e),o.setAttribute("data-tiptap-style",""),o.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(o),o}var r1=class extends FC{constructor(e={}){super(),this.css=null,this.className="tiptap",this.editorView=null,this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.options={element:typeof document<"u"?document.createElement("div"):null,content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:o})=>{throw o},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:yC,createMappablePosition:CC},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("mount",this.options.onMount),this.on("unmount",this.options.onUnmount),this.on("contentError",this.options.onContentError),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),this.on("drop",({event:o,slice:i,moved:s})=>this.options.onDrop(o,i,s)),this.on("paste",({event:o,slice:i})=>this.options.onPaste(o,i)),this.on("delete",this.options.onDelete);const n=this.createDoc(),r=rf(n,this.options.autofocus);this.editorState=An.create({doc:n,schema:this.schema,selection:r||void 0}),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>"u")throw new Error("[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.");this.createView(e),this.emit("mount",{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){const e=this.editorView.dom;e!=null&&e.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove=="function"?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn("Failed to remove CSS element:",e)}this.css=null,this.emit("unmount",{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&typeof document<"u"&&(this.css=n1(t1,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.editorView||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,n=!0){this.setOptions({editable:e}),n&&this.emit("update",{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,n)=>{if(this.editorView)return this.editorView[n];if(n==="state")return this.editorState;if(n in e)return Reflect.get(e,n);throw new Error(`[tiptap error]: The editor view is not available. Cannot access view['${n}']. The editor may not be mounted yet.`)}})}get state(){return this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,n){const r=df(n)?n(e,[...this.state.plugins]):[...this.state.plugins,e],o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}unregisterPlugin(e){if(this.isDestroyed)return;const n=this.state.plugins;let r=n;if([].concat(e).forEach(i=>{const s=typeof i=="string"?`${i}$`:i.key;r=r.filter(l=>!l.key.startsWith(s))}),n.length===r.length)return;const o=this.state.reconfigure({plugins:r});return this.view.updateState(o),o}createExtensionManager(){var e,n;const o=[...this.options.enableCoreExtensions?[Nf,kf.configure({blockSeparator:(n=(e=this.options.coreExtensionOptions)==null?void 0:e.clipboardTextSerializer)==null?void 0:n.blockSeparator}),Ef,Sf,Tf,Df,wf,Lf,Mf,Of.configure({direction:this.options.textDirection})].filter(i=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[i.name]!==!1:!0):[],...this.options.extensions].filter(i=>["extension","node","mark"].includes(i==null?void 0:i.type));this.extensionManager=new ci(o,this)}createCommandManager(){this.commandManager=new oi({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=fs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(n){if(!(n instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(n.message))throw n;this.emit("contentError",{editor:this,error:n,disableCollaboration:()=>{"collaboration"in this.storage&&typeof this.storage.collaboration=="object"&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(r=>r.name!=="collaboration"),this.createExtensionManager()}}),e=fs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}return e}createView(e){const{editorProps:n,enableExtensionDispatchTransaction:r}=this.options,o=n.dispatchTransaction||this.dispatchTransaction.bind(this),i=r?this.extensionManager.dispatchTransaction(o):o,s=n.transformPastedHTML,l=this.extensionManager.transformPastedHTML(s);this.editorView=new _u(e,{...n,attributes:{role:"textbox",...n==null?void 0:n.attributes},dispatchTransaction:i,transformPastedHTML:l,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});const c=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(c),this.prependClass(),this.injectCSS();const d=this.view.dom;d.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const n=this.capturedTransaction;return this.capturedTransaction=null,n}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(u=>{var f;return(f=this.capturedTransaction)==null?void 0:f.step(u)});return}const{state:n,transactions:r}=this.state.applyTransaction(e),o=!this.state.selection.eq(n.selection),i=r.includes(e),s=this.state;if(this.emit("beforeTransaction",{editor:this,transaction:e,nextState:n}),!i)return;this.view.updateState(n),this.emit("transaction",{editor:this,transaction:e,appendedTransactions:r.slice(1)}),o&&this.emit("selectionUpdate",{editor:this,transaction:e});const l=r.findLast(u=>u.getMeta("focus")||u.getMeta("blur")),c=l==null?void 0:l.getMeta("focus"),d=l==null?void 0:l.getMeta("blur");c&&this.emit("focus",{editor:this,event:c.event,transaction:l}),d&&this.emit("blur",{editor:this,event:d.event,transaction:l}),!(e.getMeta("preventUpdate")||!r.some(u=>u.docChanged)||s.doc.eq(n.doc))&&this.emit("update",{editor:this,transaction:e,appendedTransactions:r.slice(1)})}getAttributes(e){return mf(this.state,e)}isActive(e,n){const r=typeof e=="string"?e:null,o=typeof e=="string"?n:e;return gC(this.state,r,o)}getJSON(){return this.state.doc.toJSON()}getHTML(){return fa(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:n=`
|
|
95
95
|
|
|
96
|
-
`,textSerializers:r={}}=e||{};return dC(this.state.doc,{blockSeparator:n,textSerializers:{...pf(this.schema),...r}})}get isEmpty(){return ai(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,n;return(n=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?n:!0}$node(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new _C(n,this)}get $doc(){return this.$pos(0)}};function En(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Y(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],l=r[0];if(s){const c=l.search(/\S/),d=n.from+l.indexOf(s),u=d+s.length;if(ha(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(A=>A===t.type&&A!==p.mark.type)).filter(p=>p.to>d).length)return null;u<n.to&&i.delete(u,n.to),d>n.from&&i.delete(n.from+c,d);const h=n.from+c+s.length;i.addMark(n.from+c,h,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Bf(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Y(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let l=n.to;const c=t.type.create(o);if(r[1]){const d=r[0].lastIndexOf(r[1]);let u=s+d;u>l?u=l:l=u+r[1].length;const f=r[0][r[0].length-1];i.insertText(f,s+r[0].length-1),i.replaceWith(u,l,c)}else if(r[0]){const d=t.type.isInline?s:s-1;i.insert(d,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function ps(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Y(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Mn(t){return new li({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=Y(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),d=c&&Us(c,t.type,i);if(!d)return null;if(s.wrap(c,d),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=t.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const A=m.filter(g=>p.includes(g.type.name));s.ensureMarks(A)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,i).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Dt(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)},undoable:t.undoable})}var r1=t=>"touches"in t,o1=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;const c=l.clientX-this.startX,d=l.clientY-this.startY;this.handleResize(c,d)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;const c=l.touches[0];if(!c)return;const d=c.clientX-this.startX,u=c.clientY-this.startY;this.handleResize(d,u)},this.handleMouseUp=()=>{if(!this.isResizing)return;const l=this.element.offsetWidth,c=this.element.offsetHeight;this.onCommit(l,c),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,o,i,s;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(o=t.options)!=null&&o.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(i=t.options)!=null&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(s=t.options)!=null&&s.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display="flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),o=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),o&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,r1(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:o}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,o,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,o=this.startHeight;const i=t.includes("right"),s=t.includes("left"),l=t.includes("bottom"),c=t.includes("top");return i?r=this.startWidth+e:s&&(r=this.startWidth-e),l?o=this.startHeight+n:c&&(o=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(o=this.startHeight+(l?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,o,t):{width:r,height:o}}applyConstraints(t,e,n){var r,o,i,s;if(!n){let d=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(d=Math.min(this.maxSize.width,d)),(o=this.maxSize)!=null&&o.height&&(u=Math.min(this.maxSize.height,u)),{width:d,height:u}}let l=t,c=e;return l<this.minSize.width&&(l=this.minSize.width,c=l/this.aspectRatio),c<this.minSize.height&&(c=this.minSize.height,l=c*this.aspectRatio),(i=this.maxSize)!=null&&i.width&&l>this.maxSize.width&&(l=this.maxSize.width,c=l/this.aspectRatio),(s=this.maxSize)!=null&&s.height&&c>this.maxSize.height&&(c=this.maxSize.height,l=c*this.aspectRatio),{width:l,height:c}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",o=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:o?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function i1(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof R){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){const i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}var s1={};la(s1,{createAtomBlockMarkdownSpec:()=>a1,createBlockMarkdownSpec:()=>l1,createInlineMarkdownSpec:()=>u1,parseAttributes:()=>ma,parseIndentedBlocks:()=>ms,renderNestedMarkdownContent:()=>ga,serializeAttributes:()=>Aa});function ma(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,d=>(n.push(d),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const d=o.map(u=>u.trim().slice(1));e.class=d.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,d,u])=>{var f;const h=parseInt(((f=u.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),p=n[h];p&&(e[d]=p.slice(1,-1))});const c=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return c&&c.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Aa(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function a1(t){const{nodeName:e,name:n,parseAttributes:r=ma,serializeAttributes:o=Aa,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=t,c=n||e,d=u=>{if(!l)return u;const f={};return l.forEach(h=>{h in u&&(f[h]=u[h])}),f};return{parseMarkdown:(u,f)=>{const h={...i,...u.attributes};return f.createNode(e,h,[])},markdownTokenizer:{name:e,level:"block",start(u){var f;const h=new RegExp(`^:::${c}(?:\\s|$)`,"m"),p=(f=u.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(u,f,h){const p=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),m=u.match(p);if(!m)return;const A=m[1]||"",g=r(A);if(!s.find(v=>!(v in g)))return{type:e,raw:m[0],attributes:g}}},renderMarkdown:u=>{const f=d(u.attrs||{}),h=o(f),p=h?` {${h}}`:"";return`:::${c}${p} :::`}}}function l1(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=ma,serializeAttributes:i=Aa,defaultAttributes:s={},content:l="block",allowedAttributes:c}=t,d=n||e,u=f=>{if(!c)return f;const h={};return c.forEach(p=>{p in f&&(h[p]=f[p])}),h};return{parseMarkdown:(f,h)=>{let p;if(r){const A=r(f);p=typeof A=="string"?[{type:"text",text:A}]:A}else l==="block"?p=h.parseChildren(f.tokens||[]):p=h.parseInline(f.tokens||[]);const m={...s,...f.attributes};return h.createNode(e,m,p)},markdownTokenizer:{name:e,level:"block",start(f){var h;const p=new RegExp(`^:::${d}`,"m"),m=(h=f.match(p))==null?void 0:h.index;return m!==void 0?m:-1},tokenize(f,h,p){var m;const A=new RegExp(`^:::${d}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=f.match(A);if(!g)return;const[b,v=""]=g,y=o(v);let C=1;const k=b.length;let N="";const S=/^:::([\w-]*)(\s.*)?/gm,O=f.slice(k);for(S.lastIndex=0;;){const I=S.exec(O);if(I===null)break;const U=I.index,K=I[1];if(!((m=I[2])!=null&&m.endsWith(":::"))){if(K)C+=1;else if(C-=1,C===0){const Q=O.slice(0,U);N=Q.trim();const M=f.slice(0,k+U+I[0].length);let E=[];if(N)if(l==="block")for(E=p.blockTokens(Q),E.forEach(L=>{L.text&&(!L.tokens||L.tokens.length===0)&&(L.tokens=p.inlineTokens(L.text))});E.length>0;){const L=E[E.length-1];if(L.type==="paragraph"&&(!L.text||L.text.trim()===""))E.pop();else break}else E=p.inlineTokens(N);return{type:e,raw:M,attributes:y,content:N,tokens:E}}}}}},renderMarkdown:(f,h)=>{const p=u(f.attrs||{}),m=i(p),A=m?` {${m}}`:"",g=h.renderChildren(f.content||[],`
|
|
96
|
+
`,textSerializers:r={}}=e||{};return uC(this.state.doc,{blockSeparator:n,textSerializers:{...pf(this.schema),...r}})}get isEmpty(){return ai(this.state.doc)}destroy(){this.emit("destroy"),this.unmount(),this.removeAllListeners()}get isDestroyed(){var e,n;return(n=(e=this.editorView)==null?void 0:e.isDestroyed)!=null?n:!0}$node(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelector(e,n))||null}$nodes(e,n){var r;return((r=this.$doc)==null?void 0:r.querySelectorAll(e,n))||null}$pos(e){const n=this.state.doc.resolve(e);return new e1(n,this)}get $doc(){return this.$pos(0)}};function En(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Y(t.getAttributes,void 0,r);if(o===!1||o===null)return null;const{tr:i}=e,s=r[r.length-1],l=r[0];if(s){const c=l.search(/\S/),d=n.from+l.indexOf(s),u=d+s.length;if(ha(n.from,n.to,e.doc).filter(p=>p.mark.type.excluded.find(A=>A===t.type&&A!==p.mark.type)).filter(p=>p.to>d).length)return null;u<n.to&&i.delete(u,n.to),d>n.from&&i.delete(n.from+c,d);const h=n.from+c+s.length;i.addMark(n.from+c,h,t.type.create(o||{})),i.removeStoredMark(t.type)}},undoable:t.undoable})}function Bf(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=Y(t.getAttributes,void 0,r)||{},{tr:i}=e,s=n.from;let l=n.to;const c=t.type.create(o);if(r[1]){const d=r[0].lastIndexOf(r[1]);let u=s+d;u>l?u=l:l=u+r[1].length;const f=r[0][r[0].length-1];i.insertText(f,s+r[0].length-1),i.replaceWith(u,l,c)}else if(r[0]){const d=t.type.isInline?s:s-1;i.insert(d,t.type.create(o)).delete(i.mapping.map(s),i.mapping.map(l))}i.scrollIntoView()},undoable:t.undoable})}function ps(t){return new li({find:t.find,handler:({state:e,range:n,match:r})=>{const o=e.doc.resolve(n.from),i=Y(t.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),t.type))return null;e.tr.delete(n.from,n.to).setBlockType(n.from,n.from,t.type,i)},undoable:t.undoable})}function Mn(t){return new li({find:t.find,handler:({state:e,range:n,match:r,chain:o})=>{const i=Y(t.getAttributes,void 0,r)||{},s=e.tr.delete(n.from,n.to),c=s.doc.resolve(n.from).blockRange(),d=c&&Us(c,t.type,i);if(!d)return null;if(s.wrap(c,d),t.keepMarks&&t.editor){const{selection:f,storedMarks:h}=e,{splittableMarks:p}=t.editor.extensionManager,m=h||f.$to.parentOffset&&f.$from.marks();if(m){const A=m.filter(g=>p.includes(g.type.name));s.ensureMarks(A)}}if(t.keepAttributes){const f=t.type.name==="bulletList"||t.type.name==="orderedList"?"listItem":"taskList";o().updateAttributes(f,i).run()}const u=s.doc.resolve(n.from-1).nodeBefore;u&&u.type===t.type&&Dt(s.doc,n.from-1)&&(!t.joinPredicate||t.joinPredicate(r,u))&&s.join(n.from-1)},undoable:t.undoable})}var o1=t=>"touches"in t,i1=class{constructor(t){this.directions=["bottom-left","bottom-right","top-left","top-right"],this.minSize={height:8,width:8},this.preserveAspectRatio=!1,this.classNames={container:"",wrapper:"",handle:"",resizing:""},this.initialWidth=0,this.initialHeight=0,this.aspectRatio=1,this.isResizing=!1,this.activeHandle=null,this.startX=0,this.startY=0,this.startWidth=0,this.startHeight=0,this.isShiftKeyPressed=!1,this.lastEditableState=void 0,this.handleMap=new Map,this.handleMouseMove=l=>{if(!this.isResizing||!this.activeHandle)return;const c=l.clientX-this.startX,d=l.clientY-this.startY;this.handleResize(c,d)},this.handleTouchMove=l=>{if(!this.isResizing||!this.activeHandle)return;const c=l.touches[0];if(!c)return;const d=c.clientX-this.startX,u=c.clientY-this.startY;this.handleResize(d,u)},this.handleMouseUp=()=>{if(!this.isResizing)return;const l=this.element.offsetWidth,c=this.element.offsetHeight;this.onCommit(l,c),this.isResizing=!1,this.activeHandle=null,this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)},this.handleKeyDown=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!0)},this.handleKeyUp=l=>{l.key==="Shift"&&(this.isShiftKeyPressed=!1)};var e,n,r,o,i,s;this.node=t.node,this.editor=t.editor,this.element=t.element,this.contentElement=t.contentElement,this.getPos=t.getPos,this.onResize=t.onResize,this.onCommit=t.onCommit,this.onUpdate=t.onUpdate,(e=t.options)!=null&&e.min&&(this.minSize={...this.minSize,...t.options.min}),(n=t.options)!=null&&n.max&&(this.maxSize=t.options.max),(r=t==null?void 0:t.options)!=null&&r.directions&&(this.directions=t.options.directions),(o=t.options)!=null&&o.preserveAspectRatio&&(this.preserveAspectRatio=t.options.preserveAspectRatio),(i=t.options)!=null&&i.className&&(this.classNames={container:t.options.className.container||"",wrapper:t.options.className.wrapper||"",handle:t.options.className.handle||"",resizing:t.options.className.resizing||""}),(s=t.options)!=null&&s.createCustomHandle&&(this.createCustomHandle=t.options.createCustomHandle),this.wrapper=this.createWrapper(),this.container=this.createContainer(),this.applyInitialSize(),this.attachHandles(),this.editor.on("update",this.handleEditorUpdate.bind(this))}get dom(){return this.container}get contentDOM(){var t;return(t=this.contentElement)!=null?t:null}handleEditorUpdate(){const t=this.editor.isEditable;t!==this.lastEditableState&&(this.lastEditableState=t,t?t&&this.handleMap.size===0&&this.attachHandles():this.removeHandles())}update(t,e,n){return t.type!==this.node.type?!1:(this.node=t,this.onUpdate?this.onUpdate(t,e,n):!0)}destroy(){this.isResizing&&(this.container.dataset.resizeState="false",this.classNames.resizing&&this.container.classList.remove(this.classNames.resizing),document.removeEventListener("mousemove",this.handleMouseMove),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp),this.isResizing=!1,this.activeHandle=null),this.editor.off("update",this.handleEditorUpdate.bind(this)),this.container.remove()}createContainer(){const t=document.createElement("div");return t.dataset.resizeContainer="",t.dataset.node=this.node.type.name,t.style.display="flex",this.classNames.container&&(t.className=this.classNames.container),t.appendChild(this.wrapper),t}createWrapper(){const t=document.createElement("div");return t.style.position="relative",t.style.display="block",t.dataset.resizeWrapper="",this.classNames.wrapper&&(t.className=this.classNames.wrapper),t.appendChild(this.element),t}createHandle(t){const e=document.createElement("div");return e.dataset.resizeHandle=t,e.style.position="absolute",this.classNames.handle&&(e.className=this.classNames.handle),e}positionHandle(t,e){const n=e.includes("top"),r=e.includes("bottom"),o=e.includes("left"),i=e.includes("right");n&&(t.style.top="0"),r&&(t.style.bottom="0"),o&&(t.style.left="0"),i&&(t.style.right="0"),(e==="top"||e==="bottom")&&(t.style.left="0",t.style.right="0"),(e==="left"||e==="right")&&(t.style.top="0",t.style.bottom="0")}attachHandles(){this.directions.forEach(t=>{let e;this.createCustomHandle?e=this.createCustomHandle(t):e=this.createHandle(t),e instanceof HTMLElement||(console.warn(`[ResizableNodeView] createCustomHandle("${t}") did not return an HTMLElement. Falling back to default handle.`),e=this.createHandle(t)),this.createCustomHandle||this.positionHandle(e,t),e.addEventListener("mousedown",n=>this.handleResizeStart(n,t)),e.addEventListener("touchstart",n=>this.handleResizeStart(n,t)),this.handleMap.set(t,e),this.wrapper.appendChild(e)})}removeHandles(){this.handleMap.forEach(t=>t.remove()),this.handleMap.clear()}applyInitialSize(){const t=this.node.attrs.width,e=this.node.attrs.height;t?(this.element.style.width=`${t}px`,this.initialWidth=t):this.initialWidth=this.element.offsetWidth,e?(this.element.style.height=`${e}px`,this.initialHeight=e):this.initialHeight=this.element.offsetHeight,this.initialWidth>0&&this.initialHeight>0&&(this.aspectRatio=this.initialWidth/this.initialHeight)}handleResizeStart(t,e){t.preventDefault(),t.stopPropagation(),this.isResizing=!0,this.activeHandle=e,o1(t)?(this.startX=t.touches[0].clientX,this.startY=t.touches[0].clientY):(this.startX=t.clientX,this.startY=t.clientY),this.startWidth=this.element.offsetWidth,this.startHeight=this.element.offsetHeight,this.startWidth>0&&this.startHeight>0&&(this.aspectRatio=this.startWidth/this.startHeight),this.getPos(),this.container.dataset.resizeState="true",this.classNames.resizing&&this.container.classList.add(this.classNames.resizing),document.addEventListener("mousemove",this.handleMouseMove),document.addEventListener("touchmove",this.handleTouchMove),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}handleResize(t,e){if(!this.activeHandle)return;const n=this.preserveAspectRatio||this.isShiftKeyPressed,{width:r,height:o}=this.calculateNewDimensions(this.activeHandle,t,e),i=this.applyConstraints(r,o,n);this.element.style.width=`${i.width}px`,this.element.style.height=`${i.height}px`,this.onResize&&this.onResize(i.width,i.height)}calculateNewDimensions(t,e,n){let r=this.startWidth,o=this.startHeight;const i=t.includes("right"),s=t.includes("left"),l=t.includes("bottom"),c=t.includes("top");return i?r=this.startWidth+e:s&&(r=this.startWidth-e),l?o=this.startHeight+n:c&&(o=this.startHeight-n),(t==="right"||t==="left")&&(r=this.startWidth+(i?e:-e)),(t==="top"||t==="bottom")&&(o=this.startHeight+(l?n:-n)),this.preserveAspectRatio||this.isShiftKeyPressed?this.applyAspectRatio(r,o,t):{width:r,height:o}}applyConstraints(t,e,n){var r,o,i,s;if(!n){let d=Math.max(this.minSize.width,t),u=Math.max(this.minSize.height,e);return(r=this.maxSize)!=null&&r.width&&(d=Math.min(this.maxSize.width,d)),(o=this.maxSize)!=null&&o.height&&(u=Math.min(this.maxSize.height,u)),{width:d,height:u}}let l=t,c=e;return l<this.minSize.width&&(l=this.minSize.width,c=l/this.aspectRatio),c<this.minSize.height&&(c=this.minSize.height,l=c*this.aspectRatio),(i=this.maxSize)!=null&&i.width&&l>this.maxSize.width&&(l=this.maxSize.width,c=l/this.aspectRatio),(s=this.maxSize)!=null&&s.height&&c>this.maxSize.height&&(c=this.maxSize.height,l=c*this.aspectRatio),{width:l,height:c}}applyAspectRatio(t,e,n){const r=n==="left"||n==="right",o=n==="top"||n==="bottom";return r?{width:t,height:t/this.aspectRatio}:o?{width:e*this.aspectRatio,height:e}:{width:t,height:t/this.aspectRatio}}};function s1(t,e){const{selection:n}=t,{$from:r}=n;if(n instanceof R){const i=r.index();return r.parent.canReplaceWith(i,i+1,e)}let o=r.depth;for(;o>=0;){const i=r.index(o);if(r.node(o).contentMatchAt(i).matchType(e))return!0;o-=1}return!1}var a1={};la(a1,{createAtomBlockMarkdownSpec:()=>l1,createBlockMarkdownSpec:()=>c1,createInlineMarkdownSpec:()=>f1,parseAttributes:()=>ma,parseIndentedBlocks:()=>ms,renderNestedMarkdownContent:()=>ga,serializeAttributes:()=>Aa});function ma(t){if(!(t!=null&&t.trim()))return{};const e={},n=[],r=t.replace(/["']([^"']*)["']/g,d=>(n.push(d),`__QUOTED_${n.length-1}__`)),o=r.match(/(?:^|\s)\.([a-zA-Z][\w-]*)/g);if(o){const d=o.map(u=>u.trim().slice(1));e.class=d.join(" ")}const i=r.match(/(?:^|\s)#([a-zA-Z][\w-]*)/);i&&(e.id=i[1]);const s=/([a-zA-Z][\w-]*)\s*=\s*(__QUOTED_\d+__)/g;Array.from(r.matchAll(s)).forEach(([,d,u])=>{var f;const h=parseInt(((f=u.match(/__QUOTED_(\d+)__/))==null?void 0:f[1])||"0",10),p=n[h];p&&(e[d]=p.slice(1,-1))});const c=r.replace(/(?:^|\s)\.([a-zA-Z][\w-]*)/g,"").replace(/(?:^|\s)#([a-zA-Z][\w-]*)/g,"").replace(/([a-zA-Z][\w-]*)\s*=\s*__QUOTED_\d+__/g,"").trim();return c&&c.split(/\s+/).filter(Boolean).forEach(u=>{u.match(/^[a-zA-Z][\w-]*$/)&&(e[u]=!0)}),e}function Aa(t){if(!t||Object.keys(t).length===0)return"";const e=[];return t.class&&String(t.class).split(/\s+/).filter(Boolean).forEach(r=>e.push(`.${r}`)),t.id&&e.push(`#${t.id}`),Object.entries(t).forEach(([n,r])=>{n==="class"||n==="id"||(r===!0?e.push(n):r!==!1&&r!=null&&e.push(`${n}="${String(r)}"`))}),e.join(" ")}function l1(t){const{nodeName:e,name:n,parseAttributes:r=ma,serializeAttributes:o=Aa,defaultAttributes:i={},requiredAttributes:s=[],allowedAttributes:l}=t,c=n||e,d=u=>{if(!l)return u;const f={};return l.forEach(h=>{h in u&&(f[h]=u[h])}),f};return{parseMarkdown:(u,f)=>{const h={...i,...u.attributes};return f.createNode(e,h,[])},markdownTokenizer:{name:e,level:"block",start(u){var f;const h=new RegExp(`^:::${c}(?:\\s|$)`,"m"),p=(f=u.match(h))==null?void 0:f.index;return p!==void 0?p:-1},tokenize(u,f,h){const p=new RegExp(`^:::${c}(?:\\s+\\{([^}]*)\\})?\\s*:::(?:\\n|$)`),m=u.match(p);if(!m)return;const A=m[1]||"",g=r(A);if(!s.find(v=>!(v in g)))return{type:e,raw:m[0],attributes:g}}},renderMarkdown:u=>{const f=d(u.attrs||{}),h=o(f),p=h?` {${h}}`:"";return`:::${c}${p} :::`}}}function c1(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=ma,serializeAttributes:i=Aa,defaultAttributes:s={},content:l="block",allowedAttributes:c}=t,d=n||e,u=f=>{if(!c)return f;const h={};return c.forEach(p=>{p in f&&(h[p]=f[p])}),h};return{parseMarkdown:(f,h)=>{let p;if(r){const A=r(f);p=typeof A=="string"?[{type:"text",text:A}]:A}else l==="block"?p=h.parseChildren(f.tokens||[]):p=h.parseInline(f.tokens||[]);const m={...s,...f.attributes};return h.createNode(e,m,p)},markdownTokenizer:{name:e,level:"block",start(f){var h;const p=new RegExp(`^:::${d}`,"m"),m=(h=f.match(p))==null?void 0:h.index;return m!==void 0?m:-1},tokenize(f,h,p){var m;const A=new RegExp(`^:::${d}(?:\\s+\\{([^}]*)\\})?\\s*\\n`),g=f.match(A);if(!g)return;const[b,v=""]=g,y=o(v);let C=1;const k=b.length;let N="";const S=/^:::([\w-]*)(\s.*)?/gm,O=f.slice(k);for(S.lastIndex=0;;){const I=S.exec(O);if(I===null)break;const U=I.index,K=I[1];if(!((m=I[2])!=null&&m.endsWith(":::"))){if(K)C+=1;else if(C-=1,C===0){const Q=O.slice(0,U);N=Q.trim();const M=f.slice(0,k+U+I[0].length);let E=[];if(N)if(l==="block")for(E=p.blockTokens(Q),E.forEach(L=>{L.text&&(!L.tokens||L.tokens.length===0)&&(L.tokens=p.inlineTokens(L.text))});E.length>0;){const L=E[E.length-1];if(L.type==="paragraph"&&(!L.text||L.text.trim()===""))E.pop();else break}else E=p.inlineTokens(N);return{type:e,raw:M,attributes:y,content:N,tokens:E}}}}}},renderMarkdown:(f,h)=>{const p=u(f.attrs||{}),m=i(p),A=m?` {${m}}`:"",g=h.renderChildren(f.content||[],`
|
|
97
97
|
|
|
98
98
|
`);return`:::${d}${A}
|
|
99
99
|
|
|
100
100
|
${g}
|
|
101
101
|
|
|
102
|
-
:::`}}}function
|
|
102
|
+
:::`}}}function d1(t){if(!t.trim())return{};const e={},n=/(\w+)=(?:"([^"]*)"|'([^']*)')/g;let r=n.exec(t);for(;r!==null;){const[,o,i,s]=r;e[o]=i||s,r=n.exec(t)}return e}function u1(t){return Object.entries(t).filter(([,e])=>e!=null).map(([e,n])=>`${e}="${n}"`).join(" ")}function f1(t){const{nodeName:e,name:n,getContent:r,parseAttributes:o=d1,serializeAttributes:i=u1,defaultAttributes:s={},selfClosing:l=!1,allowedAttributes:c}=t,d=n||e,u=h=>{if(!c)return h;const p={};return c.forEach(m=>{const A=typeof m=="string"?m:m.name,g=typeof m=="string"?void 0:m.skipIfDefault;if(A in h){const b=h[A];if(g!==void 0&&b===g)return;p[A]=b}}),p},f=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return{parseMarkdown:(h,p)=>{const m={...s,...h.attributes};if(l)return p.createNode(e,m);const A=r?r(h):h.content||"";return A?p.createNode(e,m,[p.createTextNode(A)]):p.createNode(e,m,[])},markdownTokenizer:{name:e,level:"inline",start(h){const p=l?new RegExp(`\\[${f}\\s*[^\\]]*\\]`):new RegExp(`\\[${f}\\s*[^\\]]*\\][\\s\\S]*?\\[\\/${f}\\]`),m=h.match(p),A=m==null?void 0:m.index;return A!==void 0?A:-1},tokenize(h,p,m){const A=l?new RegExp(`^\\[${f}\\s*([^\\]]*)\\]`):new RegExp(`^\\[${f}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${f}\\]`),g=h.match(A);if(!g)return;let b="",v="";if(l){const[,C]=g;v=C}else{const[,C,k]=g;v=C,b=k||""}const y=o(v.trim());return{type:e,raw:g[0],content:b.trim(),attributes:y}}},renderMarkdown:h=>{let p="";r?p=r(h):h.content&&h.content.length>0&&(p=h.content.filter(b=>b.type==="text").map(b=>b.text).join(""));const m=u(h.attrs||{}),A=i(m),g=A?` ${A}`:"";return l?`[${d}${g}]`:`[${d}${g}]${p}[/${d}]`}}}function ms(t,e,n){var r,o,i,s;const l=t.split(`
|
|
103
103
|
`),c=[];let d="",u=0;const f=e.baseIndentSize||2;for(;u<l.length;){const h=l[u],p=h.match(e.itemPattern);if(!p){if(c.length>0)break;if(h.trim()===""){u+=1,d=`${d}${h}
|
|
104
104
|
`;continue}else return}const m=e.extractItemData(p),{indentLevel:A,mainContent:g}=m;d=`${d}${h}
|
|
105
105
|
`;const b=[g];for(u+=1;u<l.length;){const k=l[u];if(k.trim()===""){const S=l.slice(u+1).findIndex(U=>U.trim()!=="");if(S===-1)break;if((((o=(r=l[u+1+S].match(/^(\s*)/))==null?void 0:r[1])==null?void 0:o.length)||0)>A){b.push(k),d=`${d}${k}
|
|
@@ -110,19 +110,19 @@ ${g}
|
|
|
110
110
|
`);c+=d.type==="paragraph"?`
|
|
111
111
|
|
|
112
112
|
${m}`:`
|
|
113
|
-
${m}`}}),c}function f1(t,e,n={}){const{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,c)=>{const d=i.mapping.map(c),u=i.mapping.map(c)+l.nodeSize;let f=null;if(l.marks.forEach(p=>{if(p!==s)return!1;f=p}),!f)return;let h=!1;if(Object.keys(n).forEach(p=>{n[p]!==f.attrs[p]&&(h=!0)}),h){const p=t.type.create({...t.attrs,...n});i.removeMark(d,u,t.type),i.addMark(d,u,p)}}),i.docChanged&&e.view.dispatch(i)}var Ae=class Rf extends pa{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new Rf(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function en(t){return new ZC({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=Y(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,l=r[r.length-1],c=r[0];let d=n.to;if(l){const u=c.search(/\S/),f=n.from+c.indexOf(l),h=f+l.length;if(ha(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===t.type&&g!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+u,f),d=n.from+u+l.length,s.addMark(n.from+u,d,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function fc(t){return a.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}var h1=class extends n1{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=fc(this.view.state),this.reactiveExtensionStorage=fc(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),a.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const n=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},p1=a.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=a.ref(),n=a.getCurrentInstance();return a.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&a.nextTick(()=>{var o;if(!e.value||!((o=r.view.dom)!=null&&o.parentNode))return;const i=a.unref(e.value);e.value.append(...r.view.dom.parentNode.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),a.onBeforeUnmount(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return a.h("div",{ref:t=>{this.rootEl=t}})}});a.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return a.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});a.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return a.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)==null?void 0:e.call(t))}});var m1=(t={})=>{const e=a.shallowRef();return a.onMounted(()=>{e.value=new h1(t)}),a.onBeforeUnmount(()=>{var n,r,o,i;const s=(r=(n=e.value)==null?void 0:n.view.dom)==null?void 0:r.parentNode,l=s==null?void 0:s.cloneNode(!0);(o=s==null?void 0:s.parentNode)==null||o.replaceChild(l,s),(i=e.value)==null||i.destroy()}),e};a.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return a.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}});const A1={class:"av-col av-gap-md","data-testid":"image-inputs-container"},g1={class:"av-row av-justify-end"},b1=a.defineComponent({__name:"ToolbarImagePopover",props:{imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},emits:["confirm"],setup(t,{emit:e}){const n=e,r=a.ref(""),o=a.ref("");return(i,s)=>{const l=q,c=xn,d=Zo;return a.openBlock(),a.createBlock(d,{padding:"var(--spacing-md)"},{trigger:a.withCtx(({toggle:u})=>[a.createVNode(l,{label:t.imageLabel,icon:a.unref(D).IMAGE_OUTLINE,"icon-only":"",variant:"FLAT","data-testid":"insert-image-button",onClick:u},null,8,["label","icon","onClick"])]),popover:a.withCtx(({close:u})=>[a.createElementVNode("div",A1,[a.createVNode(Ge,{modelValue:a.unref(r),"onUpdate:modelValue":s[0]||(s[0]=f=>a.isRef(r)?r.value=f:null),label:t.imageNameLabel,placeholder:t.imageNamePlaceholder},null,8,["modelValue","label","placeholder"]),a.createVNode(Ge,{modelValue:a.unref(o),"onUpdate:modelValue":s[1]||(s[1]=f=>a.isRef(o)?o.value=f:null),label:t.imageUrlLabel,placeholder:"https://example.com/image.jpg"},null,8,["modelValue","label"]),a.createElementVNode("div",g1,[a.createVNode(c,{"cancel-label":t.popoversCancelLabel,"confirm-label":t.popoversConfirmLabel,"confirm-disabled":!a.unref(r)||!a.unref(o),onCancel:u,onConfirm:()=>{n("confirm",{name:a.unref(r),url:a.unref(o)}),u()}},null,8,["cancel-label","confirm-label","confirm-disabled","onCancel","onConfirm"])])])]),_:1})}}}),v1={class:"av-col av-gap-md","data-testid":"link-inputs-container"},y1={class:"av-row av-justify-end"},C1=a.defineComponent({__name:"ToolbarLinkPopover",props:{initialName:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},emits:["confirm"],setup(t,{emit:e}){const n=e,r=a.ref(t.initialName??""),o=a.ref("");function i(){n("confirm",{name:r.value?r.value:o.value,url:o.value})}return a.watchEffect(()=>{typeof t.initialName=="string"&&(r.value=t.initialName)}),(s,l)=>{const c=q,d=xn,u=Zo;return a.openBlock(),a.createBlock(u,{padding:"var(--spacing-md)"},{trigger:a.withCtx(({toggle:f})=>[a.createVNode(c,{label:t.linkLabel,icon:a.unref(Un).LINK_ROUNDED,"icon-only":"",variant:"FLAT","data-testid":"insert-link-button",onClick:f},null,8,["label","icon","onClick"])]),popover:a.withCtx(({close:f})=>[a.createElementVNode("div",v1,[a.createVNode(Ge,{modelValue:a.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>a.isRef(r)?r.value=h:null),label:t.linkNameLabel,placeholder:t.linkNamePlaceholder},null,8,["modelValue","label","placeholder"]),a.createVNode(Ge,{modelValue:a.unref(o),"onUpdate:modelValue":l[1]||(l[1]=h=>a.isRef(o)?o.value=h:null),label:t.linkUrlLabel,placeholder:"https://example.com"},null,8,["modelValue","label"]),a.createElementVNode("div",y1,[a.createVNode(d,{"cancel-label":t.popoversCancelLabel,"confirm-label":t.popoversConfirmLabel,"confirm-disabled":!a.unref(o),onCancel:f,onConfirm:()=>{f(),i()}},null,8,["cancel-label","confirm-label","confirm-disabled","onCancel","onConfirm"])])])]),_:1})}}}),I1=a.defineComponent({__name:"ToolbarTableSettingsDropdown",props:{deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},tableSettingsLabel:{}},emits:["deleteTableSelected","addColumnBeforeSelected","addColumnAfterSelected","deleteColumnSelected","addRowBeforeSelected","addRowAfterSelected","deleteRowSelected"],setup(t,{emit:e}){const n=e,r=a.computed(()=>[{name:"deleteTable",icon:D.TABLE_REMOVE,label:t.deleteTableLabel,iconOnly:!0},{name:"addColumnBefore",icon:D.TABLE_COLUMN_PLUS_BEFORE,label:t.addColumnBeforeLabel,iconOnly:!0},{name:"addColumnAfter",icon:D.TABLE_COLUMN_PLUS_AFTER,label:t.addColumnAfterLabel,iconOnly:!0},{name:"deleteColumn",icon:D.TABLE_COLUMN_REMOVE,label:t.deleteColumnLabel,iconOnly:!0},{name:"addRowBefore",icon:D.TABLE_ROW_PLUS_BEFORE,label:t.addRowBeforeLabel,iconOnly:!0},{name:"addRowAfter",icon:D.TABLE_ROW_PLUS_AFTER,label:t.addRowAfterLabel,iconOnly:!0},{name:"deleteRow",icon:D.TABLE_ROW_REMOVE,label:t.deleteRowLabel,iconOnly:!0}]);function o(i){switch(i){case"deleteTable":n("deleteTableSelected");break;case"addColumnBefore":n("addColumnBeforeSelected");break;case"addColumnAfter":n("addColumnAfterSelected");break;case"deleteColumn":n("deleteColumnSelected");break;case"addRowBefore":n("addRowBeforeSelected");break;case"addRowAfter":n("addRowAfterSelected");break;case"deleteRow":n("deleteRowSelected");break}}return(i,s)=>{const l=Hs;return a.openBlock(),a.createBlock(l,{items:a.unref(r),"trigger-active":"","trigger-aria-label":t.tableSettingsLabel,"trigger-icon":a.unref(D).TABLE_SETTINGS,"trigger-small":!1,"item-small":!1,"trigger-variant":"FLAT",width:"max-content",onItemSelected:o},null,8,["items","trigger-aria-label","trigger-icon"])}}});function k1(t){return{undo:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().undo().run()},redo:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().redo().run()},toggleBold:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleBold().run()},toggleItalic:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleItalic().run()},toggleUnderline:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleUnderline().run()},setLink:({url:I,name:U})=>{var K;return(K=t.value)==null?void 0:K.chain().focus().extendMarkRange("link").setLink({href:I,title:I}).insertContent(U).unsetMark("link").run()},unsetLink:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().extendMarkRange("link").unsetLink().run()},setImage:({url:I,name:U})=>{var K;return(K=t.value)==null?void 0:K.chain().focus().setImage({src:I,alt:U,title:U}).run()},removeImage:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteSelection().run()},insertTable:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},deleteTable:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteTable().run()},addColumnBefore:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addColumnBefore().run()},addColumnAfter:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addColumnAfter().run()},deleteColumn:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteColumn().run()},addRowBefore:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addRowBefore().run()},addRowAfter:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addRowAfter().run()},deleteRow:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteRow().run()},setTextAlign:I=>{var U;return(U=t.value)==null?void 0:U.chain().focus().setTextAlign(I).run()},toggleBulletList:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleBulletList().run()},toggleOrderedList:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleOrderedList().run()},decreaseIndent:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().liftListItem("listItem").run()},increaseIndent:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().sinkListItem("listItem").run()},setParagraph:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().setParagraph().run()},setHeading:I=>{var U;return(U=t.value)==null?void 0:U.chain().focus().toggleHeading({level:I}).run()}}}const E1={role:"toolbar",class:"toolbar av-row av-wrap av-gap-xs av-px-md av-py-xs"},M1=a.defineComponent({__name:"RichTextToolbar",props:{editor:{},toolbarLabel:{},undoLabel:{},redoLabel:{},paragraphLabel:{},headingLabel:{},boldLabel:{},italicLabel:{},underlineLabel:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},unsetLinkLabel:{},imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},removeImageLabel:{},insertTableLabel:{},tableSettingsLabel:{},deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},alignLeftLabel:{},alignCenterLabel:{},alignRightLabel:{},alignJustifyLabel:{},bulletListLabel:{},orderedListLabel:{},decreaseIndentLabel:{},increaseIndentLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},setup(t){const e=t,{editor:n}=a.toRefs(e),{undo:r,redo:o,setParagraph:i,setHeading:s,toggleBold:l,toggleItalic:c,toggleUnderline:d,setLink:u,unsetLink:f,setImage:h,removeImage:p,insertTable:m,deleteTable:A,addColumnBefore:g,addColumnAfter:b,deleteColumn:v,addRowBefore:y,addRowAfter:C,deleteRow:k,setTextAlign:N,toggleBulletList:S,toggleOrderedList:O,decreaseIndent:I,increaseIndent:U}=k1(n),K=a.computed(()=>{if(!n.value)return"";const{from:M,to:E}=n.value.state.selection;return n.value.state.doc.textBetween(M,E)}),Q=a.computed(()=>[1,2,3].map(M=>({level:M,label:`${e.headingLabel} ${M}`,icon:D[`FORMAT_HEADING_${M}`]})));return(M,E)=>{var L,V,W,Z,H,_,re,Ke,ut,Qe,ft,Sn,sn,an,Ba,Ra,za,Pa,Va,ja,Ha,Qa;return a.openBlock(),a.createElementBlock("div",E1,[a.createVNode(q,{label:t.undoLabel,disabled:!((L=a.unref(n))!=null&&L.can().chain().focus().undo().run()),icon:a.unref(Un).UNDO,"icon-only":"",variant:(V=a.unref(n))!=null&&V.can().chain().focus().undo().run()?"FLAT":"DEFAULT","data-testid":"undo-button",onClick:a.unref(r)},null,8,["label","disabled","icon","variant","onClick"]),a.createVNode(q,{label:t.redoLabel,disabled:!((W=a.unref(n))!=null&&W.can().chain().focus().redo().run()),icon:a.unref(Un).REDO,"icon-only":"",variant:(Z=a.unref(n))!=null&&Z.can().chain().focus().redo().run()?"FLAT":"DEFAULT","data-testid":"redo-button",onClick:a.unref(o)},null,8,["label","disabled","icon","variant","onClick"]),E[8]||(E[8]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.paragraphLabel,"aria-pressed":(H=a.unref(n))==null?void 0:H.isActive("paragraph"),icon:a.unref(D).FORMAT_PARAGRAPH,"icon-only":"",variant:"FLAT","data-testid":"set-paragraph-button",onClick:E[0]||(E[0]=Be=>a.unref(i)())},null,8,["label","aria-pressed","icon"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q),Be=>{var ln;return a.openBlock(),a.createBlock(q,{key:Be.level,label:Be.label,"aria-pressed":(ln=a.unref(n))==null?void 0:ln.isActive("heading",{level:Be.level}),icon:Be.icon,"icon-only":"",variant:"FLAT","data-testid":`set-h${Be.level}-button`,onClick:fx=>a.unref(s)(Be.level)},null,8,["label","aria-pressed","icon","data-testid","onClick"])}),128)),E[9]||(E[9]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.boldLabel,"aria-pressed":(_=a.unref(n))==null?void 0:_.isActive("bold"),icon:a.unref(D).FORMAT_BOLD,"icon-only":"",variant:"FLAT","data-testid":"bold-button",onClick:a.unref(l)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.italicLabel,"aria-pressed":(re=a.unref(n))==null?void 0:re.isActive("italic"),icon:a.unref(D).FORMAT_ITALIC,"icon-only":"",variant:"FLAT","data-testid":"italic-button",onClick:a.unref(c)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.underlineLabel,"aria-pressed":(Ke=a.unref(n))==null?void 0:Ke.isActive("underline"),icon:a.unref(D).FORMAT_UNDERLINE,"icon-only":"",variant:"FLAT","data-testid":"underline-button",onClick:a.unref(d)},null,8,["label","aria-pressed","icon","onClick"]),E[10]||(E[10]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),(ut=a.unref(n))!=null&&ut.isActive("link")?(a.openBlock(),a.createBlock(q,{key:0,label:t.unsetLinkLabel,icon:a.unref(Un).LINK_OFF_ROUNDED,"icon-only":"",active:"",variant:"FLAT","data-testid":"unset-link-button",onClick:E[1]||(E[1]=Be=>a.unref(f)())},null,8,["label","icon"])):(a.openBlock(),a.createBlock(C1,{key:1,"initial-name":a.unref(K),"link-label":t.linkLabel,"link-name-label":t.linkNameLabel,"link-name-placeholder":t.linkNamePlaceholder,"link-url-label":t.linkUrlLabel,"popovers-cancel-label":t.popoversCancelLabel,"popovers-confirm-label":t.popoversConfirmLabel,onConfirm:E[2]||(E[2]=({url:Be,name:ln})=>a.unref(u)({url:Be,name:ln}))},null,8,["initial-name","link-label","link-name-label","link-name-placeholder","link-url-label","popovers-cancel-label","popovers-confirm-label"])),(Qe=a.unref(n))!=null&&Qe.isActive("image")?(a.openBlock(),a.createBlock(q,{key:2,label:t.removeImageLabel,"aria-pressed":(ft=a.unref(n))==null?void 0:ft.isActive("image"),icon:a.unref(D).IMAGE_REMOVE_OUTLINE,"icon-only":"",variant:"FLAT","data-testid":"remove-image-button",onClick:a.unref(p)},null,8,["label","aria-pressed","icon","onClick"])):(a.openBlock(),a.createBlock(b1,{key:3,"image-label":t.imageLabel,"image-name-label":t.imageNameLabel,"image-name-placeholder":t.imageNamePlaceholder,"image-url-label":t.imageUrlLabel,"popovers-cancel-label":t.popoversCancelLabel,"popovers-confirm-label":t.popoversConfirmLabel,onConfirm:E[3]||(E[3]=({url:Be,name:ln})=>a.unref(h)({url:Be,name:ln}))},null,8,["image-label","image-name-label","image-name-placeholder","image-url-label","popovers-cancel-label","popovers-confirm-label"])),(Sn=a.unref(n))!=null&&Sn.isActive("table")?(a.openBlock(),a.createBlock(I1,{key:4,"table-settings-label":t.tableSettingsLabel,"delete-table-label":t.deleteTableLabel,"add-column-before-label":t.addColumnBeforeLabel,"add-column-after-label":t.addColumnAfterLabel,"delete-column-label":t.deleteColumnLabel,"add-row-before-label":t.addRowBeforeLabel,"add-row-after-label":t.addRowAfterLabel,"delete-row-label":t.deleteRowLabel,onDeleteTableSelected:a.unref(A),onAddColumnBeforeSelected:a.unref(g),onAddColumnAfterSelected:a.unref(b),onDeleteColumnSelected:a.unref(v),onAddRowBeforeSelected:a.unref(y),onAddRowAfterSelected:a.unref(C),onDeleteRowSelected:a.unref(k)},null,8,["table-settings-label","delete-table-label","add-column-before-label","add-column-after-label","delete-column-label","add-row-before-label","add-row-after-label","delete-row-label","onDeleteTableSelected","onAddColumnBeforeSelected","onAddColumnAfterSelected","onDeleteColumnSelected","onAddRowBeforeSelected","onAddRowAfterSelected","onDeleteRowSelected"])):(a.openBlock(),a.createBlock(q,{key:5,label:t.insertTableLabel,icon:a.unref(D).TABLE_PLUS,"icon-only":"",variant:"FLAT","data-testid":"insert-table-button",onClick:a.unref(m)},null,8,["label","icon","onClick"])),E[11]||(E[11]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.alignLeftLabel,"aria-pressed":(sn=a.unref(n))==null?void 0:sn.isActive({textAlign:"left"}),icon:a.unref(D).FORMAT_ALIGN_LEFT,"icon-only":"",variant:"FLAT","data-testid":"align-left-button",onClick:E[4]||(E[4]=()=>a.unref(N)("left"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignCenterLabel,"aria-pressed":(an=a.unref(n))==null?void 0:an.isActive({textAlign:"center"}),icon:a.unref(D).FORMAT_ALIGN_CENTER,"icon-only":"",variant:"FLAT","data-testid":"align-center-button",onClick:E[5]||(E[5]=()=>a.unref(N)("center"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignRightLabel,"aria-pressed":(Ba=a.unref(n))==null?void 0:Ba.isActive({textAlign:"right"}),icon:a.unref(D).FORMAT_ALIGN_RIGHT,"icon-only":"",variant:"FLAT","data-testid":"align-right-button",onClick:E[6]||(E[6]=()=>a.unref(N)("right"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignJustifyLabel,"aria-pressed":(Ra=a.unref(n))==null?void 0:Ra.isActive({textAlign:"justify"}),icon:a.unref(D).FORMAT_ALIGN_JUSTIFY,"icon-only":"",variant:"FLAT","data-testid":"align-justify-button",onClick:E[7]||(E[7]=()=>a.unref(N)("justify"))},null,8,["label","aria-pressed","icon"]),E[12]||(E[12]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.bulletListLabel,"aria-pressed":(za=a.unref(n))==null?void 0:za.isActive("bulletList"),icon:a.unref(D).FORMAT_LIST_BULLETED,"icon-only":"",variant:"FLAT","data-testid":"bullet-list-button",onClick:a.unref(S)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.orderedListLabel,"aria-pressed":(Pa=a.unref(n))==null?void 0:Pa.isActive("orderedList"),icon:a.unref(D).FORMAT_LIST_NUMBERED,"icon-only":"",variant:"FLAT","data-testid":"ordered-list-button",onClick:a.unref(O)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.decreaseIndentLabel,disabled:!((Va=a.unref(n))!=null&&Va.can().chain().focus().liftListItem("listItem").run()),icon:a.unref(D).FORMAT_INDENT_DECREASE,"icon-only":"",variant:(ja=a.unref(n))!=null&&ja.can().chain().focus().liftListItem("listItem").run()?"FLAT":"DEFAULT","data-testid":"decrease-indent-button",onClick:a.unref(I)},null,8,["label","disabled","icon","variant","onClick"]),a.createVNode(q,{label:t.increaseIndentLabel,disabled:!((Ha=a.unref(n))!=null&&Ha.can().chain().focus().sinkListItem("listItem").run()),icon:a.unref(D).FORMAT_INDENT_INCREASE,"icon-only":"",variant:(Qa=a.unref(n))!=null&&Qa.can().chain().focus().sinkListItem("listItem").run()?"FLAT":"DEFAULT","data-testid":"increase-indent-button",onClick:a.unref(U)},null,8,["label","disabled","icon","variant","onClick"])])}}}),w1=z(M1,[["__scopeId","data-v-8e71928c"]]);function N1(t={}){return new ne({view(e){return new x1(e,t)}})}class x1{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let p=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(p){let m=p.getBoundingClientRect(),A=f?m.bottom:m.top;f&&h&&(A=(A+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*l;r={left:m.left,right:m.right,top:A-g,bottom:A+g}}}}if(!r){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*s;r={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let d,u;if(!c||c==document.body&&getComputedStyle(c).position=="static")d=-pageXOffset,u=-pageYOffset;else{let f=c.getBoundingClientRect(),h=f.width/c.offsetWidth,p=f.height/c.offsetHeight;d=f.left-c.scrollLeft*h,u=f.top-c.scrollTop*p}this.element.style.left=(r.left-d)/s+"px",this.element.style.top=(r.top-u)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=_d(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class se extends j{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return se.valid(r)?new se(r):j.near(r)}content(){return T.empty}eq(e){return e instanceof se&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new se(e.resolve(n.pos))}getBookmark(){return new ba(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!S1(e)||!T1(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&se.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)<l.childCount:e.index(s)>0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let c=e.doc.resolve(o);if(se.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!R.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(se.valid(l))return l}return null}}}se.prototype.visible=!1;se.findFrom=se.findGapCursorFrom;j.jsonID("gapcursor",se);class ba{constructor(e){this.pos=e}map(e){return new ba(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return se.valid(n)?new se(n):j.near(n)}}function zf(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function S1(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||zf(o.type))return!0;if(o.inlineContent)return!1}}return!0}function T1(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||zf(o.type))return!0;if(o.inlineContent)return!1}}return!0}function L1(){return new ne({props:{decorations:R1,createSelectionBetween(t,e,n){return e.pos==n.pos&&se.valid(n)?new se(n):null},handleClick:O1,handleKeyDown:D1,handleDOMEvents:{beforeinput:B1}}})}const D1=aa({ArrowLeft:Or("horiz",-1),ArrowRight:Or("horiz",1),ArrowUp:Or("vert",-1),ArrowDown:Or("vert",1)});function Or(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,c=s.empty;if(s instanceof P){if(!i.endOfTextblock(n)||l.depth==0)return!1;c=!1,l=r.doc.resolve(e>0?l.after():l.before())}let d=se.findGapCursorFrom(l,e,c);return d?(o&&o(r.tr.setSelection(new se(d))),!0):!1}}function O1(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!se.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&R.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new se(r))),!0)}function B1(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof se))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=w.empty;for(let s=r.length-1;s>=0;s--)o=w.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new T(o,0,0));return i.setSelection(P.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function R1(t){if(!(t.selection instanceof se))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",G.create(t.doc,[he.widget(t.selection.head,e,{key:"gapcursor"})])}var Ao=200,me=function(){};me.prototype.append=function(e){return e.length?(e=me.from(e),!this.length&&e||e.length<Ao&&this.leafAppend(e)||this.length<Ao&&e.leafPrepend(this)||this.appendInner(e)):this};me.prototype.prepend=function(e){return e.length?me.from(e).append(this):this};me.prototype.appendInner=function(e){return new z1(this,e)};me.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?me.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};me.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};me.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};me.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};me.from=function(e){return e instanceof me?e:e&&e.length?new Pf(e):me.empty};var Pf=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var c=i;c<s;c++)if(o(this.values[c],l+c)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,l){for(var c=i-1;c>=s;c--)if(o(this.values[c],l+c)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Ao)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Ao)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(me);me.empty=new Pf([]);var z1=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(i,l),s)===!1||i>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(o,l),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(me);const P1=500;class We{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,c,d=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,u.push(f);return}if(o){u.push(new Ye(f.map));let p=f.step.map(o.slice(i)),m;p&&s.maybeStep(p).doc&&(m=s.mapping.maps[s.mapping.maps.length-1],d.push(new Ye(m,void 0,void 0,d.length+u.length))),i--,m&&o.appendMap(m,i)}else s.maybeStep(f.step);if(f.selection)return l=o?f.selection.map(o.slice(i)):f.selection,c=new We(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,c=!o&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new Ye(e.mapping.maps[u],f,n),p;(p=c&&c.merge(h))&&(h=p,u?i.pop():l=l.slice(0,l.length-1)),i.push(h),n&&(s++,n=void 0),o||(c=h)}let d=s-r.depth;return d>j1&&(l=V1(l,d),s-=d),new We(l.append(i),s)}remapping(e,n){let r=new ar;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new We(this.items.append(e.map(n=>new Ye(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let c=n;this.items.forEach(h=>{let p=i.getMirror(--c);if(p==null)return;s=Math.min(s,p);let m=i.maps[p];if(h.step){let A=e.steps[p].invert(e.docs[p]),g=h.selection&&h.selection.map(i.slice(c+1,p));g&&l++,r.push(new Ye(m,A,g))}else r.push(new Ye(m))},o);let d=[];for(let h=n;h<s;h++)d.push(new Ye(i.maps[h]));let u=this.items.slice(0,o).append(d).append(r),f=new We(u,l);return f.emptyItemCount()>P1&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let c=s.step.map(n.slice(r)),d=c&&c.getMap();if(r--,d&&n.appendMap(d,r),c){let u=s.selection&&s.selection.map(n.slice(r));u&&i++;let f=new Ye(d.invert(),c,u),h,p=o.length-1;(h=o.length&&o[p].merge(f))?o[p]=h:o.push(f)}}else s.map&&r--},this.items.length,0),new We(me.from(o.reverse()),i)}}We.empty=new We(me.empty,0);function V1(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Ye{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ye(n.getMap().invert(),n,this.selection)}}}class gt{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const j1=20;function H1(t,e,n,r){let o=n.getMeta(Zt),i;if(o)return o.historyState;n.getMeta(F1)&&(t=new gt(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Zt))return s.getMeta(Zt).redo?new gt(t.done.addTransform(n,void 0,r,qr(e)),t.undone,hc(n.mapping.maps),t.prevTime,t.prevComposition):new gt(t.done,t.undone.addTransform(n,void 0,r,qr(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),c=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!Q1(n,t.prevRanges)),d=s?zi(t.prevRanges,n.mapping):hc(n.mapping.maps);return new gt(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,qr(e)),We.empty,d,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new gt(t.done.rebased(n,i),t.undone.rebased(n,i),zi(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new gt(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),zi(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function Q1(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function hc(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function zi(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function W1(t,e,n){let r=qr(e),o=Zt.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),c=new gt(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(s).setMeta(Zt,{redo:n,historyState:c})}let Pi=!1,pc=null;function qr(t){let e=t.plugins;if(pc!=e){Pi=!1,pc=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Pi=!0;break}}return Pi}const Zt=new ce("history"),F1=new ce("closeHistory");function U1(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ne({key:Zt,state:{init(){return new gt(We.empty,We.empty,null,0,-1)},apply(e,n,r){return H1(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?jf:r=="historyRedo"?Hf:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function Vf(t,e){return(n,r)=>{let o=Zt.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=W1(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const jf=Vf(!1,!0),Hf=Vf(!0,!0);var q1=oe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ne({key:new ce("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>o){const s=i-o,l=0,c=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,c);return t=!0,d}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,c=i-r,d=l-c,u=l;return e.deleteRange(d,u),!(this.storage.characters({node:e.doc})>r)}})]}}),K1=oe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[N1(this.options)]}});oe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ne({key:new ce("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,i=[];if(!n||!r)return G.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((c,d)=>{if(c.isText)return;if(!(o>=d&&o<=d+c.nodeSize-1))return!1;s+=1});let l=0;return t.descendants((c,d)=>{if(c.isText||!(o>=d&&o<=d+c.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(he.node(d,d+c.nodeSize,{class:this.options.className}))}),G.create(t,i)}}})]}});var Z1=oe.create({name:"gapCursor",addProseMirrorPlugins(){return[L1()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Y(B(t,"allowGapCursor",n)))!=null?e:null}}}),mc="placeholder";function Y1(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}oe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:mc,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${Y1(this.options.dataAttribute)}`:`data-${mc}`;return[new ne({key:new ce("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[];if(!r)return null;const s=this.editor.isEmpty;return e.descendants((l,c)=>{const d=o>=c&&o<=c+l.nodeSize,u=!l.isLeaf&&ai(l);if((d||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const h=he.node(c,c+l.nodeSize,{class:f.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:c,hasAnchor:d}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),G.create(e,i)}}})]}});oe.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ne({key:new ce("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||gf(n.selection)||t.view.dragging?null:G.create(n.doc,[he.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function Ac({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var X1=oe.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new ce(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new ne({key:e,appendTransaction:(o,i,s)=>{const{doc:l,tr:c,schema:d}=s,u=e.getState(s),f=l.content.size,h=d.nodes[n];if(u)return c.insert(f,h.create())},state:{init:(o,i)=>{const s=i.tr.doc.lastChild;return!Ac({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;const s=o.doc.lastChild;return!Ac({node:s,types:r})}}})]}}),J1=oe.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>jf(t,e),redo:()=>({state:t,dispatch:e})=>Hf(t,e)}},addProseMirrorPlugins(){return[U1(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),G1=q1,$1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,_1=Ae.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",te(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,o,i,s;const l=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",c=(o=(r=t.attrs)==null?void 0:r.alt)!=null?o:"",d=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"";return d?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:o,getPos:i,HTMLAttributes:s,editor:l})=>{const c=document.createElement("img");Object.entries(s).forEach(([f,h])=>{if(h!=null)switch(f){case"width":case"height":break;default:c.setAttribute(f,h);break}}),c.src=s.src;const d=new o1({element:c,editor:l,node:o,getPos:i,onResize:(f,h)=>{c.style.width=`${f}px`,c.style.height=`${h}px`},onCommit:(f,h)=>{const p=i();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:f,height:h}).run()},onUpdate:(f,h,p)=>f.type===o.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),u=d.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",c.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},d}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Bf({find:$1,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),eI=_1;const tI="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",nI="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",As="numeric",gs="ascii",bs="alpha",$n="asciinumeric",Fn="alphanumeric",vs="domain",Qf="emoji",rI="scheme",oI="slashscheme",Vi="whitespace";function iI(t,e){return t in e||(e[t]=[]),e[t]}function Wt(t,e,n){e[As]&&(e[$n]=!0,e[Fn]=!0),e[gs]&&(e[$n]=!0,e[bs]=!0),e[$n]&&(e[Fn]=!0),e[bs]&&(e[Fn]=!0),e[Fn]&&(e[vs]=!0),e[Qf]&&(e[vs]=!0);for(const r in e){const o=iI(r,n);o.indexOf(t)<0&&o.push(t)}}function sI(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function xe(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}xe.groups={};xe.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||xe.groups;let o;return e&&e.j?o=e:(o=new xe(e),n&&r&&Wt(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||xe.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,l=o.go(t);if(l?(s=new xe,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new xe,i){if(r)if(s.t&&typeof s.t=="string"){const c=Object.assign(sI(s.t,r),n);Wt(i,c,r)}else n&&Wt(i,n,r);s.t=i}return o.j[t]=s,s}};const F=(t,e,n,r,o)=>t.ta(e,n,r,o),ie=(t,e,n,r,o)=>t.tr(e,n,r,o),gc=(t,e,n,r,o)=>t.ts(e,n,r,o),x=(t,e,n,r,o)=>t.tt(e,n,r,o),ot="WORD",ys="UWORD",Wf="ASCIINUMERICAL",Ff="ALPHANUMERICAL",pr="LOCALHOST",Cs="TLD",Is="UTLD",Kr="SCHEME",mn="SLASH_SCHEME",va="NUM",ks="WS",ya="NL",_n="OPENBRACE",er="CLOSEBRACE",go="OPENBRACKET",bo="CLOSEBRACKET",vo="OPENPAREN",yo="CLOSEPAREN",Co="OPENANGLEBRACKET",Io="CLOSEANGLEBRACKET",ko="FULLWIDTHLEFTPAREN",Eo="FULLWIDTHRIGHTPAREN",Mo="LEFTCORNERBRACKET",wo="RIGHTCORNERBRACKET",No="LEFTWHITECORNERBRACKET",xo="RIGHTWHITECORNERBRACKET",So="FULLWIDTHLESSTHAN",To="FULLWIDTHGREATERTHAN",Lo="AMPERSAND",Do="APOSTROPHE",Oo="ASTERISK",bt="AT",Bo="BACKSLASH",Ro="BACKTICK",zo="CARET",yt="COLON",Ca="COMMA",Po="DOLLAR",Xe="DOT",Vo="EQUALS",Ia="EXCLAMATION",ze="HYPHEN",tr="PERCENT",jo="PIPE",Ho="PLUS",Qo="POUND",nr="QUERY",ka="QUOTE",Uf="FULLWIDTHMIDDLEDOT",Ea="SEMI",Je="SLASH",rr="TILDE",Wo="UNDERSCORE",qf="EMOJI",Fo="SYM";var Kf=Object.freeze({__proto__:null,ALPHANUMERICAL:Ff,AMPERSAND:Lo,APOSTROPHE:Do,ASCIINUMERICAL:Wf,ASTERISK:Oo,AT:bt,BACKSLASH:Bo,BACKTICK:Ro,CARET:zo,CLOSEANGLEBRACKET:Io,CLOSEBRACE:er,CLOSEBRACKET:bo,CLOSEPAREN:yo,COLON:yt,COMMA:Ca,DOLLAR:Po,DOT:Xe,EMOJI:qf,EQUALS:Vo,EXCLAMATION:Ia,FULLWIDTHGREATERTHAN:To,FULLWIDTHLEFTPAREN:ko,FULLWIDTHLESSTHAN:So,FULLWIDTHMIDDLEDOT:Uf,FULLWIDTHRIGHTPAREN:Eo,HYPHEN:ze,LEFTCORNERBRACKET:Mo,LEFTWHITECORNERBRACKET:No,LOCALHOST:pr,NL:ya,NUM:va,OPENANGLEBRACKET:Co,OPENBRACE:_n,OPENBRACKET:go,OPENPAREN:vo,PERCENT:tr,PIPE:jo,PLUS:Ho,POUND:Qo,QUERY:nr,QUOTE:ka,RIGHTCORNERBRACKET:wo,RIGHTWHITECORNERBRACKET:xo,SCHEME:Kr,SEMI:Ea,SLASH:Je,SLASH_SCHEME:mn,SYM:Fo,TILDE:rr,TLD:Cs,UNDERSCORE:Wo,UTLD:Is,UWORD:ys,WORD:ot,WS:ks});const nt=/[a-z]/,Pn=new RegExp("\\p{L}","u"),ji=new RegExp("\\p{Emoji}","u"),rt=/\d/,Hi=/\s/,bc="\r",Qi=`
|
|
114
|
-
`,
|
|
113
|
+
${m}`}}),c}function h1(t,e,n={}){const{state:r}=e,{doc:o,tr:i}=r,s=t;o.descendants((l,c)=>{const d=i.mapping.map(c),u=i.mapping.map(c)+l.nodeSize;let f=null;if(l.marks.forEach(p=>{if(p!==s)return!1;f=p}),!f)return;let h=!1;if(Object.keys(n).forEach(p=>{n[p]!==f.attrs[p]&&(h=!0)}),h){const p=t.type.create({...t.attrs,...n});i.removeMark(d,u,t.type),i.addMark(d,u,p)}}),i.docChanged&&e.view.dispatch(i)}var Ae=class Rf extends pa{constructor(){super(...arguments),this.type="node"}static create(e={}){const n=typeof e=="function"?e():e;return new Rf(n)}configure(e){return super.configure(e)}extend(e){const n=typeof e=="function"?e():e;return super.extend(n)}};function en(t){return new YC({find:t.find,handler:({state:e,range:n,match:r,pasteEvent:o})=>{const i=Y(t.getAttributes,void 0,r,o);if(i===!1||i===null)return null;const{tr:s}=e,l=r[r.length-1],c=r[0];let d=n.to;if(l){const u=c.search(/\S/),f=n.from+c.indexOf(l),h=f+l.length;if(ha(n.from,n.to,e.doc).filter(m=>m.mark.type.excluded.find(g=>g===t.type&&g!==m.mark.type)).filter(m=>m.to>f).length)return null;h<n.to&&s.delete(h,n.to),f>n.from&&s.delete(n.from+u,f),d=n.from+u+l.length,s.addMark(n.from+u,d,t.type.create(i||{})),s.removeStoredMark(t.type)}}})}function fc(t){return a.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}var p1=class extends r1{constructor(t={}){return super(t),this.contentComponent=null,this.appContext=null,this.reactiveState=fc(this.view.state),this.reactiveExtensionStorage=fc(this.extensionStorage),this.on("beforeTransaction",({nextState:e})=>{this.reactiveState.value=e,this.reactiveExtensionStorage.value=this.extensionStorage}),a.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(t,e){const n=super.registerPlugin(t,e);return this.reactiveState&&(this.reactiveState.value=n),n}unregisterPlugin(t){const e=super.unregisterPlugin(t);return this.reactiveState&&e&&(this.reactiveState.value=e),e}},m1=a.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=a.ref(),n=a.getCurrentInstance();return a.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&a.nextTick(()=>{var o;if(!e.value||!((o=r.view.dom)!=null&&o.parentNode))return;const i=a.unref(e.value);e.value.append(...r.view.dom.parentNode.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),a.onBeforeUnmount(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return a.h("div",{ref:t=>{this.rootEl=t}})}});a.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return a.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}});a.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return a.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)==null?void 0:e.call(t))}});var A1=(t={})=>{const e=a.shallowRef();return a.onMounted(()=>{e.value=new p1(t)}),a.onBeforeUnmount(()=>{var n,r,o,i;const s=(r=(n=e.value)==null?void 0:n.view.dom)==null?void 0:r.parentNode,l=s==null?void 0:s.cloneNode(!0);(o=s==null?void 0:s.parentNode)==null||o.replaceChild(l,s),(i=e.value)==null||i.destroy()}),e};a.defineComponent({name:"MarkViewContent",props:{as:{type:String,default:"span"}},render(){return a.h(this.as,{style:{whiteSpace:"inherit"},"data-mark-view-content":""})}});const g1={class:"av-col av-gap-md","data-testid":"image-inputs-container"},b1={class:"av-row av-justify-end"},v1=a.defineComponent({__name:"ToolbarImagePopover",props:{imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},emits:["confirm"],setup(t,{emit:e}){const n=e,r=a.ref(""),o=a.ref("");return(i,s)=>{const l=q,c=xn,d=Zo;return a.openBlock(),a.createBlock(d,{padding:"var(--spacing-md)"},{trigger:a.withCtx(({toggle:u})=>[a.createVNode(l,{label:t.imageLabel,icon:a.unref(D).IMAGE_OUTLINE,"icon-only":"",variant:"FLAT","data-testid":"insert-image-button",onClick:u},null,8,["label","icon","onClick"])]),popover:a.withCtx(({close:u})=>[a.createElementVNode("div",g1,[a.createVNode(Ge,{modelValue:a.unref(r),"onUpdate:modelValue":s[0]||(s[0]=f=>a.isRef(r)?r.value=f:null),label:t.imageNameLabel,placeholder:t.imageNamePlaceholder},null,8,["modelValue","label","placeholder"]),a.createVNode(Ge,{modelValue:a.unref(o),"onUpdate:modelValue":s[1]||(s[1]=f=>a.isRef(o)?o.value=f:null),label:t.imageUrlLabel,placeholder:"https://example.com/image.jpg"},null,8,["modelValue","label"]),a.createElementVNode("div",b1,[a.createVNode(c,{"cancel-label":t.popoversCancelLabel,"confirm-label":t.popoversConfirmLabel,"confirm-disabled":!a.unref(r)||!a.unref(o),onCancel:u,onConfirm:()=>{n("confirm",{name:a.unref(r),url:a.unref(o)}),u()}},null,8,["cancel-label","confirm-label","confirm-disabled","onCancel","onConfirm"])])])]),_:1})}}}),y1={class:"av-col av-gap-md","data-testid":"link-inputs-container"},C1={class:"av-row av-justify-end"},I1=a.defineComponent({__name:"ToolbarLinkPopover",props:{initialName:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},emits:["confirm"],setup(t,{emit:e}){const n=e,r=a.ref(t.initialName??""),o=a.ref("");function i(){n("confirm",{name:r.value?r.value:o.value,url:o.value})}return a.watchEffect(()=>{typeof t.initialName=="string"&&(r.value=t.initialName)}),(s,l)=>{const c=q,d=xn,u=Zo;return a.openBlock(),a.createBlock(u,{padding:"var(--spacing-md)"},{trigger:a.withCtx(({toggle:f})=>[a.createVNode(c,{label:t.linkLabel,icon:a.unref(Un).LINK_ROUNDED,"icon-only":"",variant:"FLAT","data-testid":"insert-link-button",onClick:f},null,8,["label","icon","onClick"])]),popover:a.withCtx(({close:f})=>[a.createElementVNode("div",y1,[a.createVNode(Ge,{modelValue:a.unref(r),"onUpdate:modelValue":l[0]||(l[0]=h=>a.isRef(r)?r.value=h:null),label:t.linkNameLabel,placeholder:t.linkNamePlaceholder},null,8,["modelValue","label","placeholder"]),a.createVNode(Ge,{modelValue:a.unref(o),"onUpdate:modelValue":l[1]||(l[1]=h=>a.isRef(o)?o.value=h:null),label:t.linkUrlLabel,placeholder:"https://example.com"},null,8,["modelValue","label"]),a.createElementVNode("div",C1,[a.createVNode(d,{"cancel-label":t.popoversCancelLabel,"confirm-label":t.popoversConfirmLabel,"confirm-disabled":!a.unref(o),onCancel:f,onConfirm:()=>{f(),i()}},null,8,["cancel-label","confirm-label","confirm-disabled","onCancel","onConfirm"])])])]),_:1})}}}),k1=a.defineComponent({__name:"ToolbarTableSettingsDropdown",props:{deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},tableSettingsLabel:{}},emits:["deleteTableSelected","addColumnBeforeSelected","addColumnAfterSelected","deleteColumnSelected","addRowBeforeSelected","addRowAfterSelected","deleteRowSelected"],setup(t,{emit:e}){const n=e,r=a.computed(()=>[{name:"deleteTable",icon:D.TABLE_REMOVE,label:t.deleteTableLabel,iconOnly:!0},{name:"addColumnBefore",icon:D.TABLE_COLUMN_PLUS_BEFORE,label:t.addColumnBeforeLabel,iconOnly:!0},{name:"addColumnAfter",icon:D.TABLE_COLUMN_PLUS_AFTER,label:t.addColumnAfterLabel,iconOnly:!0},{name:"deleteColumn",icon:D.TABLE_COLUMN_REMOVE,label:t.deleteColumnLabel,iconOnly:!0},{name:"addRowBefore",icon:D.TABLE_ROW_PLUS_BEFORE,label:t.addRowBeforeLabel,iconOnly:!0},{name:"addRowAfter",icon:D.TABLE_ROW_PLUS_AFTER,label:t.addRowAfterLabel,iconOnly:!0},{name:"deleteRow",icon:D.TABLE_ROW_REMOVE,label:t.deleteRowLabel,iconOnly:!0}]);function o(i){switch(i){case"deleteTable":n("deleteTableSelected");break;case"addColumnBefore":n("addColumnBeforeSelected");break;case"addColumnAfter":n("addColumnAfterSelected");break;case"deleteColumn":n("deleteColumnSelected");break;case"addRowBefore":n("addRowBeforeSelected");break;case"addRowAfter":n("addRowAfterSelected");break;case"deleteRow":n("deleteRowSelected");break}}return(i,s)=>{const l=Hs;return a.openBlock(),a.createBlock(l,{items:a.unref(r),"trigger-active":"","trigger-aria-label":t.tableSettingsLabel,"trigger-icon":a.unref(D).TABLE_SETTINGS,"trigger-small":!1,"item-small":!1,"trigger-variant":"FLAT",width:"max-content",onItemSelected:o},null,8,["items","trigger-aria-label","trigger-icon"])}}});function E1(t){return{undo:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().undo().run()},redo:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().redo().run()},toggleBold:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleBold().run()},toggleItalic:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleItalic().run()},toggleUnderline:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleUnderline().run()},setLink:({url:I,name:U})=>{var K;return(K=t.value)==null?void 0:K.chain().focus().extendMarkRange("link").setLink({href:I,title:I}).insertContent(U).unsetMark("link").run()},unsetLink:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().extendMarkRange("link").unsetLink().run()},setImage:({url:I,name:U})=>{var K;return(K=t.value)==null?void 0:K.chain().focus().setImage({src:I,alt:U,title:U}).run()},removeImage:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteSelection().run()},insertTable:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().insertTable({rows:3,cols:3,withHeaderRow:!0}).run()},deleteTable:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteTable().run()},addColumnBefore:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addColumnBefore().run()},addColumnAfter:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addColumnAfter().run()},deleteColumn:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteColumn().run()},addRowBefore:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addRowBefore().run()},addRowAfter:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().addRowAfter().run()},deleteRow:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().deleteRow().run()},setTextAlign:I=>{var U;return(U=t.value)==null?void 0:U.chain().focus().setTextAlign(I).run()},toggleBulletList:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleBulletList().run()},toggleOrderedList:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().toggleOrderedList().run()},decreaseIndent:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().liftListItem("listItem").run()},increaseIndent:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().sinkListItem("listItem").run()},setParagraph:()=>{var I;return(I=t.value)==null?void 0:I.chain().focus().setParagraph().run()},setHeading:I=>{var U;return(U=t.value)==null?void 0:U.chain().focus().toggleHeading({level:I}).run()}}}const M1={role:"toolbar",class:"toolbar av-row av-wrap av-gap-xs av-px-md av-py-xs"},w1=a.defineComponent({__name:"RichTextToolbar",props:{editor:{},toolbarLabel:{},undoLabel:{},redoLabel:{},paragraphLabel:{},headingLabel:{},boldLabel:{},italicLabel:{},underlineLabel:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},unsetLinkLabel:{},imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},removeImageLabel:{},insertTableLabel:{},tableSettingsLabel:{},deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},alignLeftLabel:{},alignCenterLabel:{},alignRightLabel:{},alignJustifyLabel:{},bulletListLabel:{},orderedListLabel:{},decreaseIndentLabel:{},increaseIndentLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},setup(t){const e=t,{editor:n}=a.toRefs(e),{undo:r,redo:o,setParagraph:i,setHeading:s,toggleBold:l,toggleItalic:c,toggleUnderline:d,setLink:u,unsetLink:f,setImage:h,removeImage:p,insertTable:m,deleteTable:A,addColumnBefore:g,addColumnAfter:b,deleteColumn:v,addRowBefore:y,addRowAfter:C,deleteRow:k,setTextAlign:N,toggleBulletList:S,toggleOrderedList:O,decreaseIndent:I,increaseIndent:U}=E1(n),K=a.computed(()=>{if(!n.value)return"";const{from:M,to:E}=n.value.state.selection;return n.value.state.doc.textBetween(M,E)}),Q=a.computed(()=>[1,2,3].map(M=>({level:M,label:`${e.headingLabel} ${M}`,icon:D[`FORMAT_HEADING_${M}`]})));return(M,E)=>{var L,V,W,Z,H,_,re,Ke,ut,Qe,ft,Sn,sn,an,Ba,Ra,za,Pa,Va,ja,Ha,Qa;return a.openBlock(),a.createElementBlock("div",M1,[a.createVNode(q,{label:t.undoLabel,disabled:!((L=a.unref(n))!=null&&L.can().chain().focus().undo().run()),icon:a.unref(Un).UNDO,"icon-only":"",variant:(V=a.unref(n))!=null&&V.can().chain().focus().undo().run()?"FLAT":"DEFAULT","data-testid":"undo-button",onClick:a.unref(r)},null,8,["label","disabled","icon","variant","onClick"]),a.createVNode(q,{label:t.redoLabel,disabled:!((W=a.unref(n))!=null&&W.can().chain().focus().redo().run()),icon:a.unref(Un).REDO,"icon-only":"",variant:(Z=a.unref(n))!=null&&Z.can().chain().focus().redo().run()?"FLAT":"DEFAULT","data-testid":"redo-button",onClick:a.unref(o)},null,8,["label","disabled","icon","variant","onClick"]),E[8]||(E[8]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.paragraphLabel,"aria-pressed":(H=a.unref(n))==null?void 0:H.isActive("paragraph"),icon:a.unref(D).FORMAT_PARAGRAPH,"icon-only":"",variant:"FLAT","data-testid":"set-paragraph-button",onClick:E[0]||(E[0]=Be=>a.unref(i)())},null,8,["label","aria-pressed","icon"]),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(Q),Be=>{var ln;return a.openBlock(),a.createBlock(q,{key:Be.level,label:Be.label,"aria-pressed":(ln=a.unref(n))==null?void 0:ln.isActive("heading",{level:Be.level}),icon:Be.icon,"icon-only":"",variant:"FLAT","data-testid":`set-h${Be.level}-button`,onClick:hx=>a.unref(s)(Be.level)},null,8,["label","aria-pressed","icon","data-testid","onClick"])}),128)),E[9]||(E[9]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.boldLabel,"aria-pressed":(_=a.unref(n))==null?void 0:_.isActive("bold"),icon:a.unref(D).FORMAT_BOLD,"icon-only":"",variant:"FLAT","data-testid":"bold-button",onClick:a.unref(l)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.italicLabel,"aria-pressed":(re=a.unref(n))==null?void 0:re.isActive("italic"),icon:a.unref(D).FORMAT_ITALIC,"icon-only":"",variant:"FLAT","data-testid":"italic-button",onClick:a.unref(c)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.underlineLabel,"aria-pressed":(Ke=a.unref(n))==null?void 0:Ke.isActive("underline"),icon:a.unref(D).FORMAT_UNDERLINE,"icon-only":"",variant:"FLAT","data-testid":"underline-button",onClick:a.unref(d)},null,8,["label","aria-pressed","icon","onClick"]),E[10]||(E[10]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),(ut=a.unref(n))!=null&&ut.isActive("link")?(a.openBlock(),a.createBlock(q,{key:0,label:t.unsetLinkLabel,icon:a.unref(Un).LINK_OFF_ROUNDED,"icon-only":"",active:"",variant:"FLAT","data-testid":"unset-link-button",onClick:E[1]||(E[1]=Be=>a.unref(f)())},null,8,["label","icon"])):(a.openBlock(),a.createBlock(I1,{key:1,"initial-name":a.unref(K),"link-label":t.linkLabel,"link-name-label":t.linkNameLabel,"link-name-placeholder":t.linkNamePlaceholder,"link-url-label":t.linkUrlLabel,"popovers-cancel-label":t.popoversCancelLabel,"popovers-confirm-label":t.popoversConfirmLabel,onConfirm:E[2]||(E[2]=({url:Be,name:ln})=>a.unref(u)({url:Be,name:ln}))},null,8,["initial-name","link-label","link-name-label","link-name-placeholder","link-url-label","popovers-cancel-label","popovers-confirm-label"])),(Qe=a.unref(n))!=null&&Qe.isActive("image")?(a.openBlock(),a.createBlock(q,{key:2,label:t.removeImageLabel,"aria-pressed":(ft=a.unref(n))==null?void 0:ft.isActive("image"),icon:a.unref(D).IMAGE_REMOVE_OUTLINE,"icon-only":"",variant:"FLAT","data-testid":"remove-image-button",onClick:a.unref(p)},null,8,["label","aria-pressed","icon","onClick"])):(a.openBlock(),a.createBlock(v1,{key:3,"image-label":t.imageLabel,"image-name-label":t.imageNameLabel,"image-name-placeholder":t.imageNamePlaceholder,"image-url-label":t.imageUrlLabel,"popovers-cancel-label":t.popoversCancelLabel,"popovers-confirm-label":t.popoversConfirmLabel,onConfirm:E[3]||(E[3]=({url:Be,name:ln})=>a.unref(h)({url:Be,name:ln}))},null,8,["image-label","image-name-label","image-name-placeholder","image-url-label","popovers-cancel-label","popovers-confirm-label"])),(Sn=a.unref(n))!=null&&Sn.isActive("table")?(a.openBlock(),a.createBlock(k1,{key:4,"table-settings-label":t.tableSettingsLabel,"delete-table-label":t.deleteTableLabel,"add-column-before-label":t.addColumnBeforeLabel,"add-column-after-label":t.addColumnAfterLabel,"delete-column-label":t.deleteColumnLabel,"add-row-before-label":t.addRowBeforeLabel,"add-row-after-label":t.addRowAfterLabel,"delete-row-label":t.deleteRowLabel,onDeleteTableSelected:a.unref(A),onAddColumnBeforeSelected:a.unref(g),onAddColumnAfterSelected:a.unref(b),onDeleteColumnSelected:a.unref(v),onAddRowBeforeSelected:a.unref(y),onAddRowAfterSelected:a.unref(C),onDeleteRowSelected:a.unref(k)},null,8,["table-settings-label","delete-table-label","add-column-before-label","add-column-after-label","delete-column-label","add-row-before-label","add-row-after-label","delete-row-label","onDeleteTableSelected","onAddColumnBeforeSelected","onAddColumnAfterSelected","onDeleteColumnSelected","onAddRowBeforeSelected","onAddRowAfterSelected","onDeleteRowSelected"])):(a.openBlock(),a.createBlock(q,{key:5,label:t.insertTableLabel,icon:a.unref(D).TABLE_PLUS,"icon-only":"",variant:"FLAT","data-testid":"insert-table-button",onClick:a.unref(m)},null,8,["label","icon","onClick"])),E[11]||(E[11]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.alignLeftLabel,"aria-pressed":(sn=a.unref(n))==null?void 0:sn.isActive({textAlign:"left"}),icon:a.unref(D).FORMAT_ALIGN_LEFT,"icon-only":"",variant:"FLAT","data-testid":"align-left-button",onClick:E[4]||(E[4]=()=>a.unref(N)("left"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignCenterLabel,"aria-pressed":(an=a.unref(n))==null?void 0:an.isActive({textAlign:"center"}),icon:a.unref(D).FORMAT_ALIGN_CENTER,"icon-only":"",variant:"FLAT","data-testid":"align-center-button",onClick:E[5]||(E[5]=()=>a.unref(N)("center"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignRightLabel,"aria-pressed":(Ba=a.unref(n))==null?void 0:Ba.isActive({textAlign:"right"}),icon:a.unref(D).FORMAT_ALIGN_RIGHT,"icon-only":"",variant:"FLAT","data-testid":"align-right-button",onClick:E[6]||(E[6]=()=>a.unref(N)("right"))},null,8,["label","aria-pressed","icon"]),a.createVNode(q,{label:t.alignJustifyLabel,"aria-pressed":(Ra=a.unref(n))==null?void 0:Ra.isActive({textAlign:"justify"}),icon:a.unref(D).FORMAT_ALIGN_JUSTIFY,"icon-only":"",variant:"FLAT","data-testid":"align-justify-button",onClick:E[7]||(E[7]=()=>a.unref(N)("justify"))},null,8,["label","aria-pressed","icon"]),E[12]||(E[12]=a.createElementVNode("div",{class:"vertical-separator av-my-xxs"},null,-1)),a.createVNode(q,{label:t.bulletListLabel,"aria-pressed":(za=a.unref(n))==null?void 0:za.isActive("bulletList"),icon:a.unref(D).FORMAT_LIST_BULLETED,"icon-only":"",variant:"FLAT","data-testid":"bullet-list-button",onClick:a.unref(S)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.orderedListLabel,"aria-pressed":(Pa=a.unref(n))==null?void 0:Pa.isActive("orderedList"),icon:a.unref(D).FORMAT_LIST_NUMBERED,"icon-only":"",variant:"FLAT","data-testid":"ordered-list-button",onClick:a.unref(O)},null,8,["label","aria-pressed","icon","onClick"]),a.createVNode(q,{label:t.decreaseIndentLabel,disabled:!((Va=a.unref(n))!=null&&Va.can().chain().focus().liftListItem("listItem").run()),icon:a.unref(D).FORMAT_INDENT_DECREASE,"icon-only":"",variant:(ja=a.unref(n))!=null&&ja.can().chain().focus().liftListItem("listItem").run()?"FLAT":"DEFAULT","data-testid":"decrease-indent-button",onClick:a.unref(I)},null,8,["label","disabled","icon","variant","onClick"]),a.createVNode(q,{label:t.increaseIndentLabel,disabled:!((Ha=a.unref(n))!=null&&Ha.can().chain().focus().sinkListItem("listItem").run()),icon:a.unref(D).FORMAT_INDENT_INCREASE,"icon-only":"",variant:(Qa=a.unref(n))!=null&&Qa.can().chain().focus().sinkListItem("listItem").run()?"FLAT":"DEFAULT","data-testid":"increase-indent-button",onClick:a.unref(U)},null,8,["label","disabled","icon","variant","onClick"])])}}}),N1=z(w1,[["__scopeId","data-v-8e71928c"]]);function x1(t={}){return new ne({view(e){return new S1(e,t)}})}class S1{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(o=>{let i=s=>{this[o](s)};return e.dom.addEventListener(o,i),{name:o,handler:i}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r,o=this.editorView.dom,i=o.getBoundingClientRect(),s=i.width/o.offsetWidth,l=i.height/o.offsetHeight;if(n){let f=e.nodeBefore,h=e.nodeAfter;if(f||h){let p=this.editorView.nodeDOM(this.cursorPos-(f?f.nodeSize:0));if(p){let m=p.getBoundingClientRect(),A=f?m.bottom:m.top;f&&h&&(A=(A+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let g=this.width/2*l;r={left:m.left,right:m.right,top:A-g,bottom:A+g}}}}if(!r){let f=this.editorView.coordsAtPos(this.cursorPos),h=this.width/2*s;r={left:f.left-h,right:f.left+h,top:f.top,bottom:f.bottom}}let c=this.editorView.dom.offsetParent;this.element||(this.element=c.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let d,u;if(!c||c==document.body&&getComputedStyle(c).position=="static")d=-pageXOffset,u=-pageYOffset;else{let f=c.getBoundingClientRect(),h=f.width/c.offsetWidth,p=f.height/c.offsetHeight;d=f.left-c.scrollLeft*h,u=f.top-c.scrollTop*p}this.element.style.left=(r.left-d)/s+"px",this.element.style.top=(r.top-u)/l+"px",this.element.style.width=(r.right-r.left)/s+"px",this.element.style.height=(r.bottom-r.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),o=r&&r.type.spec.disableDropCursor,i=typeof o=="function"?o(this.editorView,n,e):o;if(n&&!i){let s=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=_d(this.editorView.state.doc,s,this.editorView.dragging.slice);l!=null&&(s=l)}this.setCursor(s),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}class se extends j{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return se.valid(r)?new se(r):j.near(r)}content(){return T.empty}eq(e){return e instanceof se&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new se(e.resolve(n.pos))}getBookmark(){return new ba(this.anchor)}static valid(e){let n=e.parent;if(n.inlineContent||!T1(e)||!L1(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let o=n.contentMatchAt(e.index()).defaultType;return o&&o.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&se.valid(e))return e;let o=e.pos,i=null;for(let s=e.depth;;s--){let l=e.node(s);if(n>0?e.indexAfter(s)<l.childCount:e.index(s)>0){i=l.child(n>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;o+=n;let c=e.doc.resolve(o);if(se.valid(c))return c}for(;;){let s=n>0?i.firstChild:i.lastChild;if(!s){if(i.isAtom&&!i.isText&&!R.isSelectable(i)){e=e.doc.resolve(o+i.nodeSize*n),r=!1;continue e}break}i=s,o+=n;let l=e.doc.resolve(o);if(se.valid(l))return l}return null}}}se.prototype.visible=!1;se.findFrom=se.findGapCursorFrom;j.jsonID("gapcursor",se);class ba{constructor(e){this.pos=e}map(e){return new ba(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return se.valid(n)?new se(n):j.near(n)}}function zf(t){return t.isAtom||t.spec.isolating||t.spec.createGapCursor}function T1(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n-1);;o=o.lastChild){if(o.childCount==0&&!o.inlineContent||zf(o.type))return!0;if(o.inlineContent)return!1}}return!0}function L1(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let o=r.child(n);;o=o.firstChild){if(o.childCount==0&&!o.inlineContent||zf(o.type))return!0;if(o.inlineContent)return!1}}return!0}function D1(){return new ne({props:{decorations:z1,createSelectionBetween(t,e,n){return e.pos==n.pos&&se.valid(n)?new se(n):null},handleClick:B1,handleKeyDown:O1,handleDOMEvents:{beforeinput:R1}}})}const O1=aa({ArrowLeft:Or("horiz",-1),ArrowRight:Or("horiz",1),ArrowUp:Or("vert",-1),ArrowDown:Or("vert",1)});function Or(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,o,i){let s=r.selection,l=e>0?s.$to:s.$from,c=s.empty;if(s instanceof P){if(!i.endOfTextblock(n)||l.depth==0)return!1;c=!1,l=r.doc.resolve(e>0?l.after():l.before())}let d=se.findGapCursorFrom(l,e,c);return d?(o&&o(r.tr.setSelection(new se(d))),!0):!1}}function B1(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!se.valid(r))return!1;let o=t.posAtCoords({left:n.clientX,top:n.clientY});return o&&o.inside>-1&&R.isSelectable(t.state.doc.nodeAt(o.inside))?!1:(t.dispatch(t.state.tr.setSelection(new se(r))),!0)}function R1(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof se))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let o=w.empty;for(let s=r.length-1;s>=0;s--)o=w.from(r[s].createAndFill(null,o));let i=t.state.tr.replace(n.pos,n.pos,new T(o,0,0));return i.setSelection(P.near(i.doc.resolve(n.pos+1))),t.dispatch(i),!1}function z1(t){if(!(t.selection instanceof se))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",G.create(t.doc,[he.widget(t.selection.head,e,{key:"gapcursor"})])}var Ao=200,me=function(){};me.prototype.append=function(e){return e.length?(e=me.from(e),!this.length&&e||e.length<Ao&&this.leafAppend(e)||this.length<Ao&&e.leafPrepend(this)||this.appendInner(e)):this};me.prototype.prepend=function(e){return e.length?me.from(e).append(this):this};me.prototype.appendInner=function(e){return new P1(this,e)};me.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?me.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};me.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};me.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)};me.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var o=[];return this.forEach(function(i,s){return o.push(e(i,s))},n,r),o};me.from=function(e){return e instanceof me?e:e&&e.length?new Pf(e):me.empty};var Pf=(function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(o,i){return o==0&&i==this.length?this:new e(this.values.slice(o,i))},e.prototype.getInner=function(o){return this.values[o]},e.prototype.forEachInner=function(o,i,s,l){for(var c=i;c<s;c++)if(o(this.values[c],l+c)===!1)return!1},e.prototype.forEachInvertedInner=function(o,i,s,l){for(var c=i-1;c>=s;c--)if(o(this.values[c],l+c)===!1)return!1},e.prototype.leafAppend=function(o){if(this.length+o.length<=Ao)return new e(this.values.concat(o.flatten()))},e.prototype.leafPrepend=function(o){if(this.length+o.length<=Ao)return new e(o.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e})(me);me.empty=new Pf([]);var P1=(function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,o,i,s){var l=this.left.length;if(o<l&&this.left.forEachInner(r,o,Math.min(i,l),s)===!1||i>l&&this.right.forEachInner(r,Math.max(o-l,0),Math.min(this.length,i)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,o,i,s){var l=this.left.length;if(o>l&&this.right.forEachInvertedInner(r,o-l,Math.max(i,l)-l,s+l)===!1||i<l&&this.left.forEachInvertedInner(r,Math.min(o,l),i,s)===!1)return!1},e.prototype.sliceInner=function(r,o){if(r==0&&o==this.length)return this;var i=this.left.length;return o<=i?this.left.slice(r,o):r>=i?this.right.slice(r-i,o-i):this.left.slice(r,i).append(this.right.slice(0,o-i))},e.prototype.leafAppend=function(r){var o=this.right.leafAppend(r);if(o)return new e(this.left,o)},e.prototype.leafPrepend=function(r){var o=this.left.leafPrepend(r);if(o)return new e(o,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e})(me);const V1=500;class We{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let o,i;n&&(o=this.remapping(r,this.items.length),i=o.maps.length);let s=e.tr,l,c,d=[],u=[];return this.items.forEach((f,h)=>{if(!f.step){o||(o=this.remapping(r,h+1),i=o.maps.length),i--,u.push(f);return}if(o){u.push(new Ye(f.map));let p=f.step.map(o.slice(i)),m;p&&s.maybeStep(p).doc&&(m=s.mapping.maps[s.mapping.maps.length-1],d.push(new Ye(m,void 0,void 0,d.length+u.length))),i--,m&&o.appendMap(m,i)}else s.maybeStep(f.step);if(f.selection)return l=o?f.selection.map(o.slice(i)):f.selection,c=new We(this.items.slice(0,r).append(u.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:c,transform:s,selection:l}}addTransform(e,n,r,o){let i=[],s=this.eventCount,l=this.items,c=!o&&l.length?l.get(l.length-1):null;for(let u=0;u<e.steps.length;u++){let f=e.steps[u].invert(e.docs[u]),h=new Ye(e.mapping.maps[u],f,n),p;(p=c&&c.merge(h))&&(h=p,u?i.pop():l=l.slice(0,l.length-1)),i.push(h),n&&(s++,n=void 0),o||(c=h)}let d=s-r.depth;return d>H1&&(l=j1(l,d),s-=d),new We(l.append(i),s)}remapping(e,n){let r=new ar;return this.items.forEach((o,i)=>{let s=o.mirrorOffset!=null&&i-o.mirrorOffset>=e?r.maps.length-o.mirrorOffset:void 0;r.appendMap(o.map,s)},e,n),r}addMaps(e){return this.eventCount==0?this:new We(this.items.append(e.map(n=>new Ye(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],o=Math.max(0,this.items.length-n),i=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(h=>{h.selection&&l--},o);let c=n;this.items.forEach(h=>{let p=i.getMirror(--c);if(p==null)return;s=Math.min(s,p);let m=i.maps[p];if(h.step){let A=e.steps[p].invert(e.docs[p]),g=h.selection&&h.selection.map(i.slice(c+1,p));g&&l++,r.push(new Ye(m,A,g))}else r.push(new Ye(m))},o);let d=[];for(let h=n;h<s;h++)d.push(new Ye(i.maps[h]));let u=this.items.slice(0,o).append(d).append(r),f=new We(u,l);return f.emptyItemCount()>V1&&(f=f.compress(this.items.length-r.length)),f}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,o=[],i=0;return this.items.forEach((s,l)=>{if(l>=e)o.push(s),s.selection&&i++;else if(s.step){let c=s.step.map(n.slice(r)),d=c&&c.getMap();if(r--,d&&n.appendMap(d,r),c){let u=s.selection&&s.selection.map(n.slice(r));u&&i++;let f=new Ye(d.invert(),c,u),h,p=o.length-1;(h=o.length&&o[p].merge(f))?o[p]=h:o.push(f)}}else s.map&&r--},this.items.length,0),new We(me.from(o.reverse()),i)}}We.empty=new We(me.empty,0);function j1(t,e){let n;return t.forEach((r,o)=>{if(r.selection&&e--==0)return n=o,!1}),t.slice(n)}class Ye{constructor(e,n,r,o){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=o}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Ye(n.getMap().invert(),n,this.selection)}}}class gt{constructor(e,n,r,o,i){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=o,this.prevComposition=i}}const H1=20;function Q1(t,e,n,r){let o=n.getMeta(Zt),i;if(o)return o.historyState;n.getMeta(U1)&&(t=new gt(t.done,t.undone,null,0,-1));let s=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(s&&s.getMeta(Zt))return s.getMeta(Zt).redo?new gt(t.done.addTransform(n,void 0,r,qr(e)),t.undone,hc(n.mapping.maps),t.prevTime,t.prevComposition):new gt(t.done,t.undone.addTransform(n,void 0,r,qr(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),c=t.prevTime==0||!s&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!W1(n,t.prevRanges)),d=s?zi(t.prevRanges,n.mapping):hc(n.mapping.maps);return new gt(t.done.addTransform(n,c?e.selection.getBookmark():void 0,r,qr(e)),We.empty,d,n.time,l??t.prevComposition)}else return(i=n.getMeta("rebased"))?new gt(t.done.rebased(n,i),t.undone.rebased(n,i),zi(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new gt(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),zi(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function W1(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,o)=>{for(let i=0;i<e.length;i+=2)r<=e[i+1]&&o>=e[i]&&(n=!0)}),n}function hc(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,o,i,s)=>e.push(i,s));return e}function zi(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let o=e.map(t[r],1),i=e.map(t[r+1],-1);o<=i&&n.push(o,i)}return n}function F1(t,e,n){let r=qr(e),o=Zt.get(e).spec.config,i=(n?t.undone:t.done).popEvent(e,r);if(!i)return null;let s=i.selection.resolve(i.transform.doc),l=(n?t.done:t.undone).addTransform(i.transform,e.selection.getBookmark(),o,r),c=new gt(n?l:i.remaining,n?i.remaining:l,null,0,-1);return i.transform.setSelection(s).setMeta(Zt,{redo:n,historyState:c})}let Pi=!1,pc=null;function qr(t){let e=t.plugins;if(pc!=e){Pi=!1,pc=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Pi=!0;break}}return Pi}const Zt=new ce("history"),U1=new ce("closeHistory");function q1(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ne({key:Zt,state:{init(){return new gt(We.empty,We.empty,null,0,-1)},apply(e,n,r){return Q1(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,o=r=="historyUndo"?jf:r=="historyRedo"?Hf:null;return!o||!e.editable?!1:(n.preventDefault(),o(e.state,e.dispatch))}}}})}function Vf(t,e){return(n,r)=>{let o=Zt.getState(n);if(!o||(t?o.undone:o.done).eventCount==0)return!1;if(r){let i=F1(o,n,t);i&&r(e?i.scrollIntoView():i)}return!0}}const jf=Vf(!1,!0),Hf=Vf(!0,!0);var K1=oe.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ne({key:new ce("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const o=this.options.limit;if(o==null||o===0){t=!0;return}const i=this.storage.characters({node:r.doc});if(i>o){const s=i-o,l=0,c=s;console.warn(`[CharacterCount] Initial content exceeded limit of ${o} characters. Content was automatically trimmed.`);const d=r.tr.deleteRange(l,c);return t=!0,d}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const o=this.storage.characters({node:n.doc}),i=this.storage.characters({node:e.doc});if(i<=r||o>r&&i>r&&i<=o)return!0;if(o>r&&i>r&&i>o||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,c=i-r,d=l-c,u=l;return e.deleteRange(d,u),!(this.storage.characters({node:e.doc})>r)}})]}}),Z1=oe.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[x1(this.options)]}});oe.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ne({key:new ce("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=e,i=[];if(!n||!r)return G.create(t,[]);let s=0;this.options.mode==="deepest"&&t.descendants((c,d)=>{if(c.isText)return;if(!(o>=d&&o<=d+c.nodeSize-1))return!1;s+=1});let l=0;return t.descendants((c,d)=>{if(c.isText||!(o>=d&&o<=d+c.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&s-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";i.push(he.node(d,d+c.nodeSize,{class:this.options.className}))}),G.create(t,i)}}})]}});var Y1=oe.create({name:"gapCursor",addProseMirrorPlugins(){return[D1()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=Y(B(t,"allowGapCursor",n)))!=null?e:null}}}),mc="placeholder";function X1(t){return t.replace(/\s+/g,"-").replace(/[^a-zA-Z0-9-]/g,"").replace(/^[0-9-]+/,"").replace(/^-+/,"").toLowerCase()}oe.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",dataAttribute:mc,placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){const t=this.options.dataAttribute?`data-${X1(this.options.dataAttribute)}`:`data-${mc}`;return[new ne({key:new ce("placeholder"),props:{decorations:({doc:e,selection:n})=>{const r=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:o}=n,i=[];if(!r)return null;const s=this.editor.isEmpty;return e.descendants((l,c)=>{const d=o>=c&&o<=c+l.nodeSize,u=!l.isLeaf&&ai(l);if((d||!this.options.showOnlyCurrent)&&u){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const h=he.node(c,c+l.nodeSize,{class:f.join(" "),[t]:typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:c,hasAnchor:d}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),G.create(e,i)}}})]}});oe.create({name:"selection",addOptions(){return{className:"selection"}},addProseMirrorPlugins(){const{editor:t,options:e}=this;return[new ne({key:new ce("selection"),props:{decorations(n){return n.selection.empty||t.isFocused||!t.isEditable||gf(n.selection)||t.view.dragging?null:G.create(n.doc,[he.inline(n.selection.from,n.selection.to,{class:e.className})])}}})]}});function Ac({types:t,node:e}){return e&&Array.isArray(t)&&t.includes(e.type)||(e==null?void 0:e.type)===t}var J1=oe.create({name:"trailingNode",addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){var t;const e=new ce(this.name),n=this.options.node||((t=this.editor.schema.topNodeType.contentMatch.defaultType)==null?void 0:t.name)||"paragraph",r=Object.entries(this.editor.schema.nodes).map(([,o])=>o).filter(o=>(this.options.notAfter||[]).concat(n).includes(o.name));return[new ne({key:e,appendTransaction:(o,i,s)=>{const{doc:l,tr:c,schema:d}=s,u=e.getState(s),f=l.content.size,h=d.nodes[n];if(u)return c.insert(f,h.create())},state:{init:(o,i)=>{const s=i.tr.doc.lastChild;return!Ac({node:s,types:r})},apply:(o,i)=>{if(!o.docChanged||o.getMeta("__uniqueIDTransaction"))return i;const s=o.doc.lastChild;return!Ac({node:s,types:r})}}})]}}),G1=oe.create({name:"undoRedo",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>jf(t,e),redo:()=>({state:t,dispatch:e})=>Hf(t,e)}},addProseMirrorPlugins(){return[q1(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),$1=K1,_1=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,eI=Ae.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{},resize:!1}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",te(this.options.HTMLAttributes,t)]},parseMarkdown:(t,e)=>e.createNode("image",{src:t.href,title:t.title,alt:t.text}),renderMarkdown:t=>{var e,n,r,o,i,s;const l=(n=(e=t.attrs)==null?void 0:e.src)!=null?n:"",c=(o=(r=t.attrs)==null?void 0:r.alt)!=null?o:"",d=(s=(i=t.attrs)==null?void 0:i.title)!=null?s:"";return d?``:``},addNodeView(){if(!this.options.resize||!this.options.resize.enabled||typeof document>"u")return null;const{directions:t,minWidth:e,minHeight:n,alwaysPreserveAspectRatio:r}=this.options.resize;return({node:o,getPos:i,HTMLAttributes:s,editor:l})=>{const c=document.createElement("img");Object.entries(s).forEach(([f,h])=>{if(h!=null)switch(f){case"width":case"height":break;default:c.setAttribute(f,h);break}}),c.src=s.src;const d=new i1({element:c,editor:l,node:o,getPos:i,onResize:(f,h)=>{c.style.width=`${f}px`,c.style.height=`${h}px`},onCommit:(f,h)=>{const p=i();p!==void 0&&this.editor.chain().setNodeSelection(p).updateAttributes(this.name,{width:f,height:h}).run()},onUpdate:(f,h,p)=>f.type===o.type,options:{directions:t,min:{width:e,height:n},preserveAspectRatio:r===!0}}),u=d.dom;return u.style.visibility="hidden",u.style.pointerEvents="none",c.onload=()=>{u.style.visibility="",u.style.pointerEvents=""},d}},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[Bf({find:_1,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),tI=eI;const nI="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",rI="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",As="numeric",gs="ascii",bs="alpha",$n="asciinumeric",Fn="alphanumeric",vs="domain",Qf="emoji",oI="scheme",iI="slashscheme",Vi="whitespace";function sI(t,e){return t in e||(e[t]=[]),e[t]}function Wt(t,e,n){e[As]&&(e[$n]=!0,e[Fn]=!0),e[gs]&&(e[$n]=!0,e[bs]=!0),e[$n]&&(e[Fn]=!0),e[bs]&&(e[Fn]=!0),e[Fn]&&(e[vs]=!0),e[Qf]&&(e[vs]=!0);for(const r in e){const o=sI(r,n);o.indexOf(t)<0&&o.push(t)}}function aI(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function xe(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}xe.groups={};xe.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const o=e.jr[r][0],i=e.jr[r][1];if(i&&o.test(t))return i}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let o=0;o<t.length;o++)this.tt(t[o],e,n,r)},tr(t,e,n,r){r=r||xe.groups;let o;return e&&e.j?o=e:(o=new xe(e),n&&r&&Wt(e,n,r)),this.jr.push([t,o]),o},ts(t,e,n,r){let o=this;const i=t.length;if(!i)return o;for(let s=0;s<i-1;s++)o=o.tt(t[s]);return o.tt(t[i-1],e,n,r)},tt(t,e,n,r){r=r||xe.groups;const o=this;if(e&&e.j)return o.j[t]=e,e;const i=e;let s,l=o.go(t);if(l?(s=new xe,Object.assign(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new xe,i){if(r)if(s.t&&typeof s.t=="string"){const c=Object.assign(aI(s.t,r),n);Wt(i,c,r)}else n&&Wt(i,n,r);s.t=i}return o.j[t]=s,s}};const F=(t,e,n,r,o)=>t.ta(e,n,r,o),ie=(t,e,n,r,o)=>t.tr(e,n,r,o),gc=(t,e,n,r,o)=>t.ts(e,n,r,o),x=(t,e,n,r,o)=>t.tt(e,n,r,o),ot="WORD",ys="UWORD",Wf="ASCIINUMERICAL",Ff="ALPHANUMERICAL",pr="LOCALHOST",Cs="TLD",Is="UTLD",Kr="SCHEME",mn="SLASH_SCHEME",va="NUM",ks="WS",ya="NL",_n="OPENBRACE",er="CLOSEBRACE",go="OPENBRACKET",bo="CLOSEBRACKET",vo="OPENPAREN",yo="CLOSEPAREN",Co="OPENANGLEBRACKET",Io="CLOSEANGLEBRACKET",ko="FULLWIDTHLEFTPAREN",Eo="FULLWIDTHRIGHTPAREN",Mo="LEFTCORNERBRACKET",wo="RIGHTCORNERBRACKET",No="LEFTWHITECORNERBRACKET",xo="RIGHTWHITECORNERBRACKET",So="FULLWIDTHLESSTHAN",To="FULLWIDTHGREATERTHAN",Lo="AMPERSAND",Do="APOSTROPHE",Oo="ASTERISK",bt="AT",Bo="BACKSLASH",Ro="BACKTICK",zo="CARET",yt="COLON",Ca="COMMA",Po="DOLLAR",Xe="DOT",Vo="EQUALS",Ia="EXCLAMATION",ze="HYPHEN",tr="PERCENT",jo="PIPE",Ho="PLUS",Qo="POUND",nr="QUERY",ka="QUOTE",Uf="FULLWIDTHMIDDLEDOT",Ea="SEMI",Je="SLASH",rr="TILDE",Wo="UNDERSCORE",qf="EMOJI",Fo="SYM";var Kf=Object.freeze({__proto__:null,ALPHANUMERICAL:Ff,AMPERSAND:Lo,APOSTROPHE:Do,ASCIINUMERICAL:Wf,ASTERISK:Oo,AT:bt,BACKSLASH:Bo,BACKTICK:Ro,CARET:zo,CLOSEANGLEBRACKET:Io,CLOSEBRACE:er,CLOSEBRACKET:bo,CLOSEPAREN:yo,COLON:yt,COMMA:Ca,DOLLAR:Po,DOT:Xe,EMOJI:qf,EQUALS:Vo,EXCLAMATION:Ia,FULLWIDTHGREATERTHAN:To,FULLWIDTHLEFTPAREN:ko,FULLWIDTHLESSTHAN:So,FULLWIDTHMIDDLEDOT:Uf,FULLWIDTHRIGHTPAREN:Eo,HYPHEN:ze,LEFTCORNERBRACKET:Mo,LEFTWHITECORNERBRACKET:No,LOCALHOST:pr,NL:ya,NUM:va,OPENANGLEBRACKET:Co,OPENBRACE:_n,OPENBRACKET:go,OPENPAREN:vo,PERCENT:tr,PIPE:jo,PLUS:Ho,POUND:Qo,QUERY:nr,QUOTE:ka,RIGHTCORNERBRACKET:wo,RIGHTWHITECORNERBRACKET:xo,SCHEME:Kr,SEMI:Ea,SLASH:Je,SLASH_SCHEME:mn,SYM:Fo,TILDE:rr,TLD:Cs,UNDERSCORE:Wo,UTLD:Is,UWORD:ys,WORD:ot,WS:ks});const nt=/[a-z]/,Pn=new RegExp("\\p{L}","u"),ji=new RegExp("\\p{Emoji}","u"),rt=/\d/,Hi=/\s/,bc="\r",Qi=`
|
|
114
|
+
`,lI="️",cI="",Wi="";let Br=null,Rr=null;function dI(t=[]){const e={};xe.groups=e;const n=new xe;Br==null&&(Br=vc(nI)),Rr==null&&(Rr=vc(rI)),x(n,"'",Do),x(n,"{",_n),x(n,"}",er),x(n,"[",go),x(n,"]",bo),x(n,"(",vo),x(n,")",yo),x(n,"<",Co),x(n,">",Io),x(n,"(",ko),x(n,")",Eo),x(n,"「",Mo),x(n,"」",wo),x(n,"『",No),x(n,"』",xo),x(n,"<",So),x(n,">",To),x(n,"&",Lo),x(n,"*",Oo),x(n,"@",bt),x(n,"`",Ro),x(n,"^",zo),x(n,":",yt),x(n,",",Ca),x(n,"$",Po),x(n,".",Xe),x(n,"=",Vo),x(n,"!",Ia),x(n,"-",ze),x(n,"%",tr),x(n,"|",jo),x(n,"+",Ho),x(n,"#",Qo),x(n,"?",nr),x(n,'"',ka),x(n,"/",Je),x(n,";",Ea),x(n,"~",rr),x(n,"_",Wo),x(n,"\\",Bo),x(n,"・",Uf);const r=ie(n,rt,va,{[As]:!0});ie(r,rt,r);const o=ie(r,nt,Wf,{[$n]:!0}),i=ie(r,Pn,Ff,{[Fn]:!0}),s=ie(n,nt,ot,{[gs]:!0});ie(s,rt,o),ie(s,nt,s),ie(o,rt,o),ie(o,nt,o);const l=ie(n,Pn,ys,{[bs]:!0});ie(l,nt),ie(l,rt,i),ie(l,Pn,l),ie(i,rt,i),ie(i,nt),ie(i,Pn,i);const c=x(n,Qi,ya,{[Vi]:!0}),d=x(n,bc,ks,{[Vi]:!0}),u=ie(n,Hi,ks,{[Vi]:!0});x(n,Wi,u),x(d,Qi,c),x(d,Wi,u),ie(d,Hi,u),x(u,bc),x(u,Qi),ie(u,Hi,u),x(u,Wi,u);const f=ie(n,ji,qf,{[Qf]:!0});x(f,"#"),ie(f,ji,f),x(f,lI,f);const h=x(f,cI);x(h,"#"),ie(h,ji,f);const p=[[nt,s],[rt,o]],m=[[nt,null],[Pn,l],[rt,i]];for(let A=0;A<Br.length;A++)pt(n,Br[A],Cs,ot,p);for(let A=0;A<Rr.length;A++)pt(n,Rr[A],Is,ys,m);Wt(Cs,{tld:!0,ascii:!0},e),Wt(Is,{utld:!0,alpha:!0},e),pt(n,"file",Kr,ot,p),pt(n,"mailto",Kr,ot,p),pt(n,"http",mn,ot,p),pt(n,"https",mn,ot,p),pt(n,"ftp",mn,ot,p),pt(n,"ftps",mn,ot,p),Wt(Kr,{scheme:!0,ascii:!0},e),Wt(mn,{slashscheme:!0,ascii:!0},e),t=t.sort((A,g)=>A[0]>g[0]?1:-1);for(let A=0;A<t.length;A++){const g=t[A][0],v=t[A][1]?{[oI]:!0}:{[iI]:!0};g.indexOf("-")>=0?v[vs]=!0:nt.test(g)?rt.test(g)?v[$n]=!0:v[gs]=!0:v[As]=!0,gc(n,g,g,v)}return gc(n,"localhost",pr,{ascii:!0}),n.jd=new xe(Fo),{start:n,tokens:Object.assign({groups:e},Kf)}}function Zf(t,e){const n=uI(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,o=[];let i=0,s=0;for(;s<r;){let l=t,c=null,d=0,u=null,f=-1,h=-1;for(;s<r&&(c=l.go(n[s]));)l=c,l.accepts()?(f=0,h=0,u=l):f>=0&&(f+=n[s].length,h++),d+=n[s].length,i+=n[s].length,s++;i-=f,s-=h,d-=f,o.push({t:u.t,v:e.slice(i-d,i),s:i-d,e:i})}return o}function uI(t){const e=[],n=t.length;let r=0;for(;r<n;){let o=t.charCodeAt(r),i,s=o<55296||o>56319||r+1===n||(i=t.charCodeAt(r+1))<56320||i>57343?t[r]:t.slice(r,r+2);e.push(s),r+=s.length}return e}function pt(t,e,n,r,o){let i;const s=e.length;for(let l=0;l<s-1;l++){const c=e[l];t.j[c]?i=t.j[c]:(i=new xe(r),i.jr=o.slice(),t.j[c]=i),t=i}return i=new xe(n),i.jr=o.slice(),t.j[e[s-1]]=i,i}function vc(t){const e=[],n=[];let r=0,o="0123456789";for(;r<t.length;){let i=0;for(;o.indexOf(t[r+i])>=0;)i++;if(i>0){e.push(n.join(""));for(let s=parseInt(t.substring(r,r+i),10);s>0;s--)n.pop();r+=i}else n.push(t[r]),r++}return e}const mr={defaultProtocol:"http",events:null,format:yc,formatHref:yc,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Ma(t,e=null){let n=Object.assign({},mr);t&&(n=Object.assign(n,t instanceof Ma?t.o:t));const r=n.ignoreTags,o=[];for(let i=0;i<r.length;i++)o.push(r[i].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=o}Ma.prototype={o:mr,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let o=this.o[t];return o&&(typeof o=="object"?(o=n.t in o?o[n.t]:mr[t],typeof o=="function"&&r&&(o=o(e,n))):typeof o=="function"&&r&&(o=o(e,n.t,n)),o)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function yc(t){return t}function Yf(t,e){this.t="token",this.v=t,this.tk=e}Yf.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=mr.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),o=t.get("tagName",n,e),i=this.toFormattedString(t),s={},l=t.get("className",n,e),c=t.get("target",n,e),d=t.get("rel",n,e),u=t.getObj("attributes",n,e),f=t.getObj("events",n,e);return s.href=r,l&&(s.class=l),c&&(s.target=c),d&&(s.rel=d),u&&Object.assign(s,u),{tagName:o,attributes:s,content:i,eventListeners:f}}};function di(t,e){class n extends Yf{constructor(o,i){super(o,i),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const Cc=di("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ic=di("text"),fI=di("nl"),zr=di("url",{isLink:!0,toHref(t=mr.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==pr&&t[1].t===yt}}),Re=t=>new xe(t);function hI({groups:t}){const e=t.domain.concat([Lo,Oo,bt,Bo,Ro,zo,Po,Vo,ze,va,tr,jo,Ho,Qo,Je,Fo,rr,Wo]),n=[Do,yt,Ca,Xe,Ia,tr,nr,ka,Ea,Co,Io,_n,er,bo,go,vo,yo,ko,Eo,Mo,wo,No,xo,So,To],r=[Lo,Do,Oo,Bo,Ro,zo,Po,Vo,ze,_n,er,tr,jo,Ho,Qo,nr,Je,Fo,rr,Wo],o=Re(),i=x(o,rr);F(i,r,i),F(i,t.domain,i);const s=Re(),l=Re(),c=Re();F(o,t.domain,s),F(o,t.scheme,l),F(o,t.slashscheme,c),F(s,r,i),F(s,t.domain,s);const d=x(s,bt);x(i,bt,d),x(l,bt,d),x(c,bt,d);const u=x(i,Xe);F(u,r,i),F(u,t.domain,i);const f=Re();F(d,t.domain,f),F(f,t.domain,f);const h=x(f,Xe);F(h,t.domain,f);const p=Re(Cc);F(h,t.tld,p),F(h,t.utld,p),x(d,pr,p);const m=x(f,ze);x(m,ze,m),F(m,t.domain,f),F(p,t.domain,f),x(p,Xe,h),x(p,ze,m);const A=x(p,yt);F(A,t.numeric,Cc);const g=x(s,ze),b=x(s,Xe);x(g,ze,g),F(g,t.domain,s),F(b,r,i),F(b,t.domain,s);const v=Re(zr);F(b,t.tld,v),F(b,t.utld,v),F(v,t.domain,s),F(v,r,i),x(v,Xe,b),x(v,ze,g),x(v,bt,d);const y=x(v,yt),C=Re(zr);F(y,t.numeric,C);const k=Re(zr),N=Re();F(k,e,k),F(k,n,N),F(N,e,k),F(N,n,N),x(v,Je,k),x(C,Je,k);const S=x(l,yt),O=x(c,yt),I=x(O,Je),U=x(I,Je);F(l,t.domain,s),x(l,Xe,b),x(l,ze,g),F(c,t.domain,s),x(c,Xe,b),x(c,ze,g),F(S,t.domain,k),x(S,Je,k),x(S,nr,k),F(U,t.domain,k),F(U,e,k),x(U,Je,k);const K=[[_n,er],[go,bo],[vo,yo],[Co,Io],[ko,Eo],[Mo,wo],[No,xo],[So,To]];for(let Q=0;Q<K.length;Q++){const[M,E]=K[Q],L=x(k,M);x(N,M,L),x(L,E,k);const V=Re(zr);F(L,e,V);const W=Re();F(L,n),F(V,e,V),F(V,n,W),F(W,e,V),F(W,n,W),x(V,E,k),x(W,E,k)}return x(o,pr,v),x(o,ya,fI),{start:o,tokens:Kf}}function pI(t,e,n){let r=n.length,o=0,i=[],s=[];for(;o<r;){let l=t,c=null,d=null,u=0,f=null,h=-1;for(;o<r&&!(c=l.go(n[o].t));)s.push(n[o++]);for(;o<r&&(d=c||l.go(n[o].t));)c=null,l=d,l.accepts()?(h=0,f=l):h>=0&&h++,o++,u++;if(h<0)o-=u,o<r&&(s.push(n[o]),o++);else{s.length>0&&(i.push(Fi(Ic,e,s)),s=[]),o-=h,u-=h;const p=f.t,m=n.slice(o-u,o);i.push(Fi(p,e,m))}}return s.length>0&&i.push(Fi(Ic,e,s)),i}function Fi(t,e,n){const r=n[0].s,o=n[n.length-1].e,i=e.slice(r,o);return new t(i,n)}const mI=typeof console<"u"&&console&&console.warn||(()=>{}),AI="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",ee={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function gI(){return xe.groups={},ee.scanner=null,ee.parser=null,ee.tokenQueue=[],ee.pluginQueue=[],ee.customSchemes=[],ee.initialized=!1,ee}function kc(t,e=!1){if(ee.initialized&&mI(`linkifyjs: already initialized - will not register custom scheme "${t}" ${AI}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
115
115
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
116
116
|
2. Cannot start or end with "-"
|
|
117
|
-
3. "-" cannot repeat`);ee.customSchemes.push([t,e])}function gI(){ee.scanner=cI(ee.customSchemes);for(let t=0;t<ee.tokenQueue.length;t++)ee.tokenQueue[t][1]({scanner:ee.scanner});ee.parser=fI(ee.scanner.tokens);for(let t=0;t<ee.pluginQueue.length;t++)ee.pluginQueue[t][1]({scanner:ee.scanner,parser:ee.parser});return ee.initialized=!0,ee}function wa(t){return ee.initialized||gI(),hI(ee.parser.start,t,Zf(ee.scanner.start,t))}wa.scan=Zf;function Xf(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ma(n),o=wa(t),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var Na="[\0- -\u2029 ]",bI=new RegExp(Na),vI=new RegExp(`${Na}$`),yI=new RegExp(Na,"g");function CI(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function II(t){return new ne({key:new ce("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(d=>d.docChanged)&&!n.doc.eq(r.doc),i=e.some(d=>d.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=lf(n.doc,[...e]);if(Af(l).forEach(({newRange:d})=>{const u=oC(r.doc,d,p=>p.isTextblock);let f,h;if(u.length>1)f=u[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(u.length){const p=r.doc.textBetween(d.from,d.to," "," ");if(!vI.test(p))return;f=u[0],h=r.doc.textBetween(f.pos,d.to,void 0," ")}if(f&&h){const p=h.split(bI).filter(Boolean);if(p.length<=0)return!1;const m=p[p.length-1],A=f.pos+h.lastIndexOf(m);if(!m)return!1;const g=wa(m).map(b=>b.toObject(t.defaultProtocol));if(!CI(g))return!1;g.filter(b=>b.isLink).map(b=>({...b,from:A+b.start+1,to:A+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>t.validate(b.value)).filter(b=>t.shouldAutoLink(b.value)).forEach(b=>{ha(b.from,b.to,r.doc).some(v=>v.mark.type===t.type)||s.addMark(b.from,b.to,t.type.create({href:b.href}))})}}),!!s.steps.length)return s}})}function kI(t){return new ne({key:new ce("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const c=r.target;if(!c)return!1;const d=t.editor.view.dom;s=c.closest("a"),s&&!d.contains(s)&&(s=null)}if(!s)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const c=mf(e.state,t.type.name),d=(o=s.href)!=null?o:c.href,u=(i=s.target)!=null?i:c.target;d&&(window.open(d,u),l=!0)}return l}}})}function EI(t){return new ne({key:new ce("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let c="";r.content.forEach(u=>{c+=u.textContent});const d=Xf(c,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===c);return!c||!d||o!==void 0&&!o(d.value)?!1:t.editor.commands.setMark(t.type,{href:d.href})}}})}function Bt(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(yI,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Jf=on.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){kc(t);return}kc(t.scheme,t.optionalSlashes)})},onDestroy(){AI()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Bt(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const o=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Bt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Bt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",te(this.options.HTMLAttributes,t),0]:["a",te(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,o,i;const s=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",l=(i=(o=t.attrs)==null?void 0:o.title)!=null?i:"",c=e.renderChildren(t);return l?`[${c}](${s} "${l}")`:`[${c}](${s})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Bt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Bt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[en({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=Xf(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Bt(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(II({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Bt(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(kI({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(EI({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),MI=Jf;let Es,Ms;if(typeof WeakMap<"u"){let t=new WeakMap;Es=e=>t.get(e),Ms=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Es=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},Ms=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var ae=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let l=1;i<this.width&&this.map[e+l]==n;l++)i++;for(let l=1;s<this.height&&this.map[e+this.width*l]==n;l++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:l,top:c,bottom:d}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,c),right:Math.max(r,l),bottom:Math.max(i,d)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,!(o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const l=(t+1)*this.width;for(;s<l&&this.map[s]<o;)s++;return s==l?i-1:this.map[s]}o=i}}static get(t){return Es(t)||Ms(t,wI(t))}};function wI(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=NI(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let d=0,u=e*n;d<u;d++)r[d]=0;for(let d=0,u=0;d<n;d++){const f=t.child(d);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==f.childCount)break;const A=f.child(m),{colspan:g,rowspan:b,colwidth:v}=A.attrs;for(let y=0;y<b;y++){if(y+d>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:b-y});break}const C=o+y*e;for(let k=0;k<g;k++){r[C+k]==0?r[C+k]=u:(i||(i=[])).push({type:"collision",row:d,pos:u,n:g-k});const N=v&&v[k];if(N){const S=(C+k)%e*2,O=s[S];O==null||O!=N&&s[S+1]==1?(s[S]=N,s[S+1]=1):O==N&&s[S+1]++}}}o+=g,u+=A.nodeSize}const h=(d+1)*e;let p=0;for(;o<h;)r[o++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:d,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const l=new ae(e,n,r,i);let c=!1;for(let d=0;!c&&d<s.length;d+=2)s[d]!=null&&s[d+1]<n&&(c=!0);return c&&xI(l,s,t),l}function NI(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let s=0;s<r;s++){const l=t.child(s);for(let c=0;c<l.childCount;c++){const d=l.child(c);s+d.attrs.rowspan>r&&(i+=d.attrs.colspan)}}for(let s=0;s<o.childCount;s++){const l=o.child(s);i+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function xI(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let l=null;const c=s.attrs;for(let d=0;d<c.colspan;d++){const u=e[(o+d)%t.width*2];u!=null&&(!c.colwidth||c.colwidth[d]!=u)&&((l||(l=SI(c)))[d]=u)}l&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}function SI(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function ke(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}const Ct=new ce("selectingCells");function tn(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function TI(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function qe(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function ui(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=tn(e.$head)||LI(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function LI(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function ws(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function DI(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function xa(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Gf(t,e,n){const r=t.node(-1),o=ae.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return s==null?null:t.node(0).resolve(i+s)}function nn(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function $f(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function OI(t,e,n){const r=ke(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var $=class it extends j{constructor(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),l=e.node(0),c=o.cellsInRect(s).filter(u=>u!=n.pos-i);c.unshift(n.pos-i);const d=c.map(u=>{const f=r.nodeAt(u);if(!f)throw new RangeError(`No cell with offset ${u} found`);const h=i+u+1;return new ou(l.resolve(h),l.resolve(h+f.content.size))});super(d[0].$from,d[0].$to,d),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(ws(r)&&ws(o)&&xa(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?it.rowSelection(r,o):i&&this.isColSelection()?it.colSelection(r,o):new it(r,o)}return P.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=ae.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let c=o.top;c<o.bottom;c++){const d=[];for(let u=c*n.width+o.left,f=o.left;f<o.right;f++,u++){const h=n.map[u];if(i[h])continue;i[h]=!0;const p=n.findCell(h);let m=e.nodeAt(h);if(!m)throw new RangeError(`No cell with offset ${h} found`);const A=o.left-p.left,g=p.right-o.right;if(A>0||g>0){let b=m.attrs;if(A>0&&(b=nn(b,0,A)),g>0&&(b=nn(b,b.colspan-g,g)),p.left<o.left){if(m=m.type.createAndFill(b),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else m=m.type.create(b,m.content)}if(p.top<o.top||p.bottom>o.bottom){const b={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}d.push(m)}s.push(e.child(c).copy(w.from(d)))}const l=this.isColSelection()&&this.isRowSelection()?e:s;return new T(w.from(l),1,1)}replace(e,n=T.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:l,$to:c}=o[s],d=e.mapping.slice(r);e.replace(d.map(l.pos),d.map(c.pos),s?T.empty:n)}const i=j.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new T(w.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=ae.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let s=0;s<i.length;s++)e(n.nodeAt(i[s]),o+i[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),c=e.node(0);return s.top<=l.top?(s.top>0&&(e=c.resolve(i+o.map[s.left])),l.bottom<o.height&&(n=c.resolve(i+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=c.resolve(i+o.map[l.left])),s.bottom<o.height&&(e=c.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new it(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=ae.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(e){return e instanceof it&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),c=e.node(0);return s.left<=l.left?(s.left>0&&(e=c.resolve(i+o.map[s.top*o.width])),l.right<o.width&&(n=c.resolve(i+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=c.resolve(i+o.map[l.top*o.width])),s.right<o.width&&(e=c.resolve(i+o.map[o.width*(s.top+1)-1]))),new it(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new it(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new it(e.resolve(n),e.resolve(r))}getBookmark(){return new BI(this.$anchorCell.pos,this.$headCell.pos)}};$.prototype.visible=!1;j.jsonID("cell",$);var BI=class _f{constructor(e,n){this.anchor=e,this.head=n}map(e){return new _f(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&xa(n,r)?new $(n,r):j.near(r,1)}};function RI(t){if(!(t.selection instanceof $))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(he.node(r,r+n.nodeSize,{class:"selectedCell"}))}),G.create(t.doc,e)}function zI({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function PI({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function VI(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof R&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=$.create(o,r.from);else if(s=="row"){const l=o.resolve(r.from+1);i=$.rowSelection(l,l)}else if(!n){const l=ae.get(r.node),c=r.from+1,d=c+l.map[l.width*l.height-1];i=$.create(o,c+1,d)}}else r instanceof P&&zI(r)?i=P.create(o,r.from):r instanceof P&&PI(r)&&(i=P.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}const jI=new ce("fix-tables");function eh(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,l=0;s<i;s++){const c=e.child(s);for(let d=l,u=Math.min(o,s+3);d<u;d++)if(t.child(d)==c){l=d+1,n+=c.nodeSize;continue e}r(c,n),l<o&&t.child(l).sameMarkup(c)?eh(t.child(l),c,n+1,r):c.nodesBetween(0,c.content.size,r,n+1),n+=c.nodeSize}}function th(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=HI(t,o,i,n))};return e?e.doc!=t.doc&&eh(e.doc,t.doc,0,r):t.doc.descendants(r),n}function HI(t,e,n,r){const o=ae.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let c=0;c<o.height;c++)i.push(0);for(let c=0;c<o.problems.length;c++){const d=o.problems[c];if(d.type=="collision"){const u=e.nodeAt(d.pos);if(!u)continue;const f=u.attrs;for(let h=0;h<f.rowspan;h++)i[d.row+h]+=d.n;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,nn(f,f.colspan-d.n,d.n))}else if(d.type=="missing")i[d.row]+=d.n;else if(d.type=="overlong_rowspan"){const u=e.nodeAt(d.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-d.n})}else if(d.type=="colwidth mismatch"){const u=e.nodeAt(d.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,{...u.attrs,colwidth:d.colwidth})}else if(d.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let s,l;for(let c=0;c<i.length;c++)i[c]&&(s==null&&(s=c),l=c);for(let c=0,d=n+1;c<o.height;c++){const u=e.child(c),f=d+u.nodeSize,h=i[c];if(h>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<h;g++){const b=ke(t.schema)[p].createAndFill();b&&m.push(b)}const A=(c==0||s==c-1)&&l==c?d+1:f-1;r.insert(r.mapping.map(A),m)}d=f}return r.setMeta(jI,{fixTables:!0})}function et(t){const e=t.selection,n=ui(t),r=n.node(-1),o=n.start(-1),i=ae.get(r);return{...e instanceof $?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function nh(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;OI(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let s=0;s<e.height;s++){const l=s*e.width+o;if(o>0&&o<e.width&&e.map[l-1]==e.map[l]){const c=e.map[l],d=r.nodeAt(c);t.setNodeMarkup(t.mapping.map(n+c),null,$f(d.attrs,o-e.colCount(c))),s+=d.attrs.rowspan-1}else{const c=i==null?ke(r.type.schema).cell:r.nodeAt(e.map[l+i]).type,d=e.positionAt(s,o,r);t.insert(t.mapping.map(n+d),c.createAndFill())}}return t}function QI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(nh(t.tr,n,n.left))}return!0}function WI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(nh(t.tr,n,n.right))}return!0}function FI(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let s=0;s<e.height;){const l=s*e.width+o,c=e.map[l],d=n.nodeAt(c),u=d.attrs;if(o>0&&e.map[l-1]==c||o<e.width-1&&e.map[l+1]==c)t.setNodeMarkup(t.mapping.slice(i).map(r+c),null,nn(u,o-e.colCount(c)));else{const f=t.mapping.slice(i).map(r+c);t.delete(f,f+d.nodeSize)}s+=u.rowspan}}function UI(t,e){if(!qe(t))return!1;if(e){const n=et(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;FI(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=ae.get(i)}e(r)}return!0}function qI(t,e,n){var r;const o=ke(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))===null||r===void 0?void 0:r.type)!=o)return!1;return!0}function rh(t,{map:e,tableStart:n,table:r},o){let i=n;for(let d=0;d<o;d++)i+=r.child(d).nodeSize;const s=[];let l=o>0?-1:0;qI(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let d=0,u=e.width*o;d<e.width;d++,u++)if(o>0&&o<e.height&&e.map[u]==e.map[u-e.width]){const f=e.map[u],h=r.nodeAt(f).attrs;t.setNodeMarkup(n+f,null,{...h,rowspan:h.rowspan+1}),d+=h.colspan-1}else{var c;const f=l==null?ke(r.type.schema).cell:(c=r.nodeAt(e.map[u+l*e.width]))===null||c===void 0?void 0:c.type,h=f==null?void 0:f.createAndFill();h&&s.push(h)}return t.insert(i,ke(r.type.schema).row.create(null,s)),t}function KI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(rh(t.tr,n,n.top))}return!0}function ZI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(rh(t.tr,n,n.bottom))}return!0}function YI(t,{map:e,table:n,tableStart:r},o){let i=0;for(let d=0;d<o;d++)i+=n.child(d).nodeSize;const s=i+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(i+r,s+r);const c=new Set;for(let d=0,u=o*e.width;d<e.width;d++,u++){const f=e.map[u];if(!c.has(f)){if(c.add(f),o>0&&f==e.map[u-e.width]){const h=n.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h,rowspan:h.rowspan-1}),d+=h.colspan-1}else if(o<e.height&&f==e.map[u+e.width]){const h=n.nodeAt(f),p=h.attrs,m=h.type.create({...p,rowspan:h.attrs.rowspan-1},h.content),A=e.positionAt(o+1,d,n);t.insert(t.mapping.slice(l).map(r+A),m),d+=p.colspan-1}}}}function XI(t,e){if(!qe(t))return!1;if(e){const n=et(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;YI(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=ae.get(n.table)}e(r)}return!0}function Ec(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function JI({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,l=o+(r.right-r.left-1);for(let c=r.top;c<r.bottom;c++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[l]==n[l+1])return!0;i+=t,l+=t}for(let c=r.left;c<r.right;c++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function Mc(t,e){const n=t.selection;if(!(n instanceof $)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=et(t),{map:o}=r;if(JI(o,r))return!1;if(e){const i=t.tr,s={};let l=w.empty,c,d;for(let u=r.top;u<r.bottom;u++)for(let f=r.left;f<r.right;f++){const h=o.map[u*o.width+f],p=r.table.nodeAt(h);if(!(s[h]||!p))if(s[h]=!0,c==null)c=h,d=p;else{Ec(p)||(l=l.append(p.content));const m=i.mapping.map(h+r.tableStart);i.delete(m,m+p.nodeSize)}}if(c==null||d==null)return!0;if(i.setNodeMarkup(c+r.tableStart,null,{...$f(d.attrs,d.attrs.colspan,r.right-r.left-d.attrs.colspan),rowspan:r.bottom-r.top}),l.size>0){const u=c+1+d.content.size,f=Ec(d)?c+1:u;i.replaceWith(f+r.tableStart,u+r.tableStart,l)}i.setSelection(new $(i.doc.resolve(c+r.tableStart))),e(i)}return!0}function wc(t,e){const n=ke(t.schema);return GI(({node:r})=>n[r.type.spec.tableRole])(t,e)}function GI(t){return(e,n)=>{const r=e.selection;let o,i;if(r instanceof $){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=TI(r.$from),!o)return!1;i=(s=tn(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs;const c=[],d=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const u=et(e),f=e.tr;for(let p=0;p<u.right-u.left;p++)c.push(d?{...l,colwidth:d&&d[p]?[d[p]]:null}:l);let h;for(let p=u.top;p<u.bottom;p++){let m=u.map.positionAt(p,u.left,u.table);p==u.top&&(m+=o.nodeSize);for(let A=u.left,g=0;A<u.right;A++,g++)A==u.left&&p==u.top||f.insert(h=f.mapping.map(m+u.tableStart,1),t({node:o,row:p,col:A}).createAndFill(c[g]))}f.setNodeMarkup(i,t({node:o,row:u.top,col:u.left}),c[0]),r instanceof $&&f.setSelection(new $(f.doc.resolve(r.$anchorCell.pos),h?f.doc.resolve(h):void 0)),n(f)}return!0}}function $I(t,e){return function(n,r){if(!qe(n))return!1;const o=ui(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof $?n.selection.forEachCell((s,l)=>{s.attrs[t]!==e&&i.setNodeMarkup(l,null,{...s.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function _I(t){return function(e,n){if(!qe(e))return!1;if(n){const r=ke(e.schema),o=et(e),i=e.tr,s=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(c=>o.table.nodeAt(c));for(let c=0;c<s.length;c++)l[c].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[c],r.cell,l[c].attrs);if(i.steps.length===0)for(let c=0;c<s.length;c++)i.setNodeMarkup(o.tableStart+s[c],r.header_cell,l[c].attrs);n(i)}return!0}}function Nc(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Ar(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?_I(t):function(n,r){if(!qe(n))return!1;if(r){const o=ke(n.schema),i=et(n),s=n.tr,l=Nc("row",i,o),c=Nc("column",i,o),d=(t==="column"?l:t==="row"&&c)?1:0,u=t=="column"?{left:0,top:d,right:1,bottom:i.map.height}:t=="row"?{left:d,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?c?o.cell:o.header_cell:t=="row"?l?o.cell:o.header_cell:o.cell;i.map.cellsInRect(u).forEach(h=>{const p=h+i.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,f,m.attrs)}),r(s)}return!0}}Ar("row",{useDeprecatedLogic:!0});Ar("column",{useDeprecatedLogic:!0});const ek=Ar("cell",{useDeprecatedLogic:!0});function tk(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function xc(t){return function(e,n){if(!qe(e))return!1;const r=tk(ui(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(P.between(o,DI(o))).scrollIntoView())}return!0}}function nk(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Pr(t,e){const n=t.selection;if(!(n instanceof $))return!1;if(e){const r=t.tr,o=ke(t.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new T(o,0,0))}),r.docChanged&&e(r)}return!0}function rk(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let c=0;c<e.childCount;c++){let d=e.child(c).content;const u=c?0:Math.max(0,n-1),f=c<e.childCount-1?0:Math.max(0,r-1);(u||f)&&(d=Ns(ke(s).row,new T(d,u,f)).content),l.push(d)}else if(i=="cell"||i=="header_cell")l.push(n||r?Ns(ke(s).row,new T(e,n,r)).content:e);else return null;return ok(s,l)}function ok(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let s=i.childCount-1;s>=0;s--){const{rowspan:l,colspan:c}=i.child(s).attrs;for(let d=o;d<o+l;d++)n[d]=(n[d]||0)+c}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(w.empty),n[o]<r){const i=ke(t).cell.createAndFill(),s=[];for(let l=n[o];l<r;l++)s.push(i);e[o]=e[o].append(w.from(s))}return{height:e.length,width:r,rows:e}}function Ns(t,e){const n=t.createAndFill();return new qs(n).replace(0,n.content.size,e).doc}function ik({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let l=0;l<n.length;l++){const c=n[l],d=[];for(let u=i[l]||0,f=0;u<r;f++){let h=c.child(f%c.childCount);u+h.attrs.colspan>r&&(h=h.type.createChecked(nn(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),d.push(h),u+=h.attrs.colspan;for(let p=1;p<h.attrs.rowspan;p++)i[l+p]=(i[l+p]||0)+h.attrs.colspan}s.push(w.from(d))}n=s,t=r}if(e!=o){const i=[];for(let s=0,l=0;s<o;s++,l++){const c=[],d=n[l%e];for(let u=0;u<d.childCount;u++){let f=d.child(u);s+f.attrs.rowspan>o&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,o-f.attrs.rowspan)},f.content)),c.push(f)}i.push(w.from(c))}n=i,e=o}return{width:t,height:e,rows:n}}function sk(t,e,n,r,o,i,s){const l=t.doc.type.schema,c=ke(l);let d,u;if(o>e.width)for(let f=0,h=0;f<e.height;f++){const p=n.child(f);h+=p.nodeSize;const m=[];let A;p.lastChild==null||p.lastChild.type==c.cell?A=d||(d=c.cell.createAndFill()):A=u||(u=c.header_cell.createAndFill());for(let g=e.width;g<o;g++)m.push(A);t.insert(t.mapping.slice(s).map(h-1+r),m)}if(i>e.height){const f=[];for(let m=0,A=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const g=m>=e.width?!1:n.nodeAt(e.map[A+m]).type==c.header_cell;f.push(g?u||(u=c.header_cell.createAndFill()):d||(d=c.cell.createAndFill()))}const h=c.row.create(null,w.from(f)),p=[];for(let m=e.height;m<i;m++)p.push(h);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(d||u)}function Sc(t,e,n,r,o,i,s,l){if(s==0||s==e.height)return!1;let c=!1;for(let d=o;d<i;d++){const u=s*e.width+d,f=e.map[u];if(e.map[u-e.width]==f){c=!0;const h=n.nodeAt(f),{top:p,left:m}=e.findCell(f);t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h.attrs,rowspan:s-p}),t.insert(t.mapping.slice(l).map(e.positionAt(s,m,n)),h.type.createAndFill({...h.attrs,rowspan:p+h.attrs.rowspan-s})),d+=h.attrs.colspan-1}}return c}function Tc(t,e,n,r,o,i,s,l){if(s==0||s==e.width)return!1;let c=!1;for(let d=o;d<i;d++){const u=d*e.width+s,f=e.map[u];if(e.map[u-1]==f){c=!0;const h=n.nodeAt(f),p=e.colCount(f),m=t.mapping.slice(l).map(f+r);t.setNodeMarkup(m,null,nn(h.attrs,s-p,h.attrs.colspan-(s-p))),t.insert(m+h.nodeSize,h.type.createAndFill(nn(h.attrs,0,s-p))),d+=h.attrs.rowspan-1}}return c}function Lc(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let s=ae.get(i);const{top:l,left:c}=r,d=c+o.width,u=l+o.height,f=t.tr;let h=0;function p(){if(i=n?f.doc.nodeAt(n-1):f.doc,!i)throw new Error("No table found");s=ae.get(i),h=f.mapping.maps.length}sk(f,s,i,n,d,u,h)&&p(),Sc(f,s,i,n,c,d,l,h)&&p(),Sc(f,s,i,n,c,d,u,h)&&p(),Tc(f,s,i,n,l,u,c,h)&&p(),Tc(f,s,i,n,l,u,d,h)&&p();for(let m=l;m<u;m++){const A=s.positionAt(m,c,i),g=s.positionAt(m,d,i);f.replace(f.mapping.slice(h).map(A+n),f.mapping.slice(h).map(g+n),new T(o.rows[m-l],0,0))}p(),f.setSelection(new $(f.doc.resolve(n+s.positionAt(l,c,i)),f.doc.resolve(n+s.positionAt(u-1,d-1,i)))),e(f)}const ak=aa({ArrowLeft:Vr("horiz",-1),ArrowRight:Vr("horiz",1),ArrowUp:Vr("vert",-1),ArrowDown:Vr("vert",1),"Shift-ArrowLeft":jr("horiz",-1),"Shift-ArrowRight":jr("horiz",1),"Shift-ArrowUp":jr("vert",-1),"Shift-ArrowDown":jr("vert",1),Backspace:Pr,"Mod-Backspace":Pr,Delete:Pr,"Mod-Delete":Pr});function Zr(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Vr(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof $)return Zr(n,r,j.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=oh(o,t,e);if(s==null)return!1;if(t=="horiz")return Zr(n,r,j.near(n.doc.resolve(i.head+e),e));{const l=n.doc.resolve(s),c=Gf(l,t,e);let d;return c?d=j.near(c,1):e<0?d=j.near(n.doc.resolve(l.before(-1)),-1):d=j.near(n.doc.resolve(l.after(-1)),1),Zr(n,r,d)}}}function jr(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof $)s=i;else{const c=oh(o,t,e);if(c==null)return!1;s=new $(n.doc.resolve(c))}const l=Gf(s.$headCell,t,e);return l?Zr(n,r,new $(s.$anchorCell,l)):!1}}function lk(t,e){const n=t.state.doc,r=tn(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new $(r))),!0):!1}function ck(t,e,n){if(!qe(t.state))return!1;let r=rk(n);const o=t.state.selection;if(o instanceof $){r||(r={width:1,height:1,rows:[w.from(Ns(ke(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=ae.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=ik(r,l.right-l.left,l.bottom-l.top),Lc(t.state,t.dispatch,s,l,r),!0}else if(r){const i=ui(t.state),s=i.start(-1);return Lc(t.state,t.dispatch,s,ae.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function dk(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=Dc(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof $)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=tn(t.state.selection.$anchor))!=null&&((n=Ui(t,e))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(c,d){let u=Ui(t,d);const f=Ct.getState(t.state)==null;if(!u||!xa(c,u))if(f)u=c;else return;const h=new $(c,u);if(f||!t.state.selection.eq(h)){const p=t.state.tr.setSelection(h);f&&p.setMeta(Ct,c.pos),t.dispatch(p)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),Ct.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ct,-1))}function l(c){const d=c,u=Ct.getState(t.state);let f;if(u!=null)f=t.state.doc.resolve(u);else if(Dc(t,d.target)!=r&&(f=Ui(t,e),!f))return s();f&&i(f,d)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function oh(t,e,n){if(!(t.state.selection instanceof P))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?s:null}}return null}function Dc(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Ui(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:o}=n;return r>=0&&tn(t.state.doc.resolve(r))||tn(t.state.doc.resolve(o))}var uk=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xs(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,xs(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function xs(t,e,n,r,o,i){let s=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d){for(let f=0,h=0;f<d.childCount;f++){const{colspan:p,colwidth:m}=d.child(f).attrs;for(let A=0;A<p;A++,h++){const g=o==h?i:m&&m[A],b=g?g+"px":"";if(s+=g||r,g||(l=!1),c)c.style.width!=b&&(c.style.width=b),c=c.nextSibling;else{const v=document.createElement("col");v.style.width=b,e.appendChild(v)}}}for(;c;){var u;const f=c.nextSibling;(u=c.parentNode)===null||u===void 0||u.removeChild(c),c=f}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const Le=new ce("tableColumnResizing");function fk({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=uk,lastColumnResizable:o=!0}={}){const i=new ne({key:Le,state:{init(s,l){var c;const d=(c=i.spec)===null||c===void 0||(c=c.props)===null||c===void 0?void 0:c.nodeViews,u=ke(l.schema).table.name;return r&&d&&(d[u]=(f,h)=>new r(f,n,h)),new hk(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{const l=Le.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{pk(s,l,t,o)},mouseleave:s=>{mk(s)},mousedown:(s,l)=>{Ak(s,l,e,n)}},decorations:s=>{const l=Le.getState(s);if(l&&l.activeHandle>-1)return Ck(s,l.activeHandle)},nodeViews:{}}});return i}var hk=class Yr{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Le);if(r&&r.setHandle!=null)return new Yr(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Yr(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return ws(e.doc.resolve(o))||(o=-1),new Yr(o,n.dragging)}return n}};function pk(t,e,n,r){if(!t.editable)return;const o=Le.getState(t.state);if(o&&!o.dragging){const i=bk(e.target);let s=-1;if(i){const{left:l,right:c}=i.getBoundingClientRect();e.clientX-l<=n?s=Oc(t,e,"left",n):c-e.clientX<=n&&(s=Oc(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const l=t.state.doc.resolve(s),c=l.node(-1),d=ae.get(c),u=l.start(-1);if(d.colCount(l.pos-u)+l.nodeAfter.attrs.colspan-1==d.width-1)return}ih(t,s)}}}function mk(t){if(!t.editable)return;const e=Le.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&ih(t,-1)}function Ak(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=Le.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const l=t.state.doc.nodeAt(s.activeHandle),c=gk(t,s.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Le,{setDragging:{startX:e.clientX,startWidth:c}}));function d(f){i.removeEventListener("mouseup",d),i.removeEventListener("mousemove",u);const h=Le.getState(t.state);h!=null&&h.dragging&&(vk(t,h.activeHandle,Bc(h.dragging,f,n)),t.dispatch(t.state.tr.setMeta(Le,{setDragging:null})))}function u(f){if(!f.which)return d(f);const h=Le.getState(t.state);if(h&&h.dragging){const p=Bc(h.dragging,f,n);Rc(t,h.activeHandle,p,r)}}return Rc(t,s.activeHandle,c,r),i.addEventListener("mouseup",d),i.addEventListener("mousemove",u),e.preventDefault(),!0}function gk(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function bk(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Oc(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,l=tn(t.state.doc.resolve(s));if(!l)return-1;if(n=="right")return l.pos;const c=ae.get(l.node(-1)),d=l.start(-1),u=c.map.indexOf(l.pos-d);return u%c.width==0?-1:d+c.map[u-1]}function Bc(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ih(t,e){t.dispatch(t.state.tr.setMeta(Le,{setHandle:e}))}function vk(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=ae.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=t.state.tr;for(let d=0;d<i.height;d++){const u=d*i.width+l;if(d&&i.map[u]==i.map[u-i.width])continue;const f=i.map[u],h=o.nodeAt(f).attrs,p=h.colspan==1?0:l-i.colCount(f);if(h.colwidth&&h.colwidth[p]==n)continue;const m=h.colwidth?h.colwidth.slice():yk(h.colspan);m[p]=n,c.setNodeMarkup(s+f,null,{...h,colwidth:m})}c.docChanged&&t.dispatch(c)}function Rc(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),l=ae.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let c=t.domAtPos(o.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&xs(i,c.firstChild,c,r,l,n)}function yk(t){return Array(t).fill(0)}function Ck(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return G.empty;const i=ae.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let d=0;d<i.height;d++){const u=l+d*i.width;if((l==i.width-1||i.map[u]!=i.map[u+1])&&(d==0||i.map[u]!=i.map[u-i.width])){var c;const f=i.map[u],h=s+f+o.nodeAt(f).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((c=Le.getState(t))===null||c===void 0)&&c.dragging&&n.push(he.node(s+f,s+f+o.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),n.push(he.widget(h,p))}}return G.create(t.doc,n)}function Ik({allowTableNodeSelection:t=!1}={}){return new ne({key:Ct,state:{init(){return null},apply(e,n){const r=e.getMeta(Ct);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:RI,handleDOMEvents:{mousedown:dk},createSelectionBetween(e){return Ct.getState(e.state)!=null?e.state.selection:null},handleTripleClick:lk,handleKeyDown:ak,handlePaste:ck},appendTransaction(e,n,r){return VI(r,th(r,n),t)}})}var sh=Ae.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const r=t.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){const i=(e=t.closest("table"))==null?void 0:e.querySelectorAll("colgroup > col"),s=Array.from(((n=t.parentElement)==null?void 0:n.children)||[]).indexOf(t);if(s&&s>-1&&i&&i[s]){const l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",te(this.options.HTMLAttributes,t),0]}}),ah=Ae.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",te(this.options.HTMLAttributes,t),0]}}),lh=Ae.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",te(this.options.HTMLAttributes,t),0]}});function Ss(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function zc(t,e,n,r,o,i){var s;let l=0,c=!0,d=e.firstChild;const u=t.firstChild;if(u!==null)for(let h=0,p=0;h<u.childCount;h+=1){const{colspan:m,colwidth:A}=u.child(h).attrs;for(let g=0;g<m;g+=1,p+=1){const b=o===p?i:A&&A[g],v=b?`${b}px`:"";if(l+=b||r,b||(c=!1),d){if(d.style.width!==v){const[y,C]=Ss(r,b);d.style.setProperty(y,C)}d=d.nextSibling}else{const y=document.createElement("col"),[C,k]=Ss(r,b);y.style.setProperty(C,k),e.appendChild(y)}}}for(;d;){const h=d.nextSibling;(s=d.parentNode)==null||s.removeChild(d),d=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);c&&!f?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}var kk=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),zc(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,zc(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function Ek(t,e,n,r){let o=0,i=!0;const s=[],l=t.firstChild;if(!l)return{};for(let f=0,h=0;f<l.childCount;f+=1){const{colspan:p,colwidth:m}=l.child(f).attrs;for(let A=0;A<p;A+=1,h+=1){const g=n===h?r:m&&m[A];o+=g||e,g||(i=!1);const[b,v]=Ss(e,g);s.push(["col",{style:`${b}: ${v}`}])}}const c=i?`${o}px`:"",d=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:c,tableMinWidth:d}}function Pc(t,e){return t.createAndFill()}function Mk(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function wk(t,e,n,r,o){const i=Mk(t),s=[],l=[];for(let d=0;d<n;d+=1){const u=Pc(i.cell);if(u&&l.push(u),r){const f=Pc(i.header_cell);f&&s.push(f)}}const c=[];for(let d=0;d<e;d+=1)c.push(i.row.createChecked(null,r&&d===0?s:l));return i.table.createChecked(null,c)}function Nk(t){return t instanceof $}var Hr=({editor:t})=>{const{selection:e}=t.state;if(!Nk(e))return!1;let n=0;const r=cf(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},xk="";function Sk(t){return(t||"").replace(/\s+/g," ").trim()}function Tk(t,e,n={}){var r;const o=(r=n.cellLineSeparator)!=null?r:xk;if(!t||!t.content||t.content.length===0)return"";const i=[];t.content.forEach(m=>{const A=[];m.content&&m.content.forEach(g=>{let b="";g.content&&Array.isArray(g.content)&&g.content.length>1?b=g.content.map(k=>e.renderChildren(k)).join(o):b=g.content?e.renderChildren(g.content):"";const v=Sk(b),y=g.type==="tableHeader";A.push({text:v,isHeader:y})}),i.push(A)});const s=i.reduce((m,A)=>Math.max(m,A.length),0);if(s===0)return"";const l=new Array(s).fill(0);i.forEach(m=>{var A;for(let g=0;g<s;g+=1){const v=(((A=m[g])==null?void 0:A.text)||"").length;v>l[g]&&(l[g]=v),l[g]<3&&(l[g]=3)}});const c=(m,A)=>m+" ".repeat(Math.max(0,A-m.length)),d=i[0],u=d.some(m=>m.isHeader);let f=`
|
|
117
|
+
3. "-" cannot repeat`);ee.customSchemes.push([t,e])}function bI(){ee.scanner=dI(ee.customSchemes);for(let t=0;t<ee.tokenQueue.length;t++)ee.tokenQueue[t][1]({scanner:ee.scanner});ee.parser=hI(ee.scanner.tokens);for(let t=0;t<ee.pluginQueue.length;t++)ee.pluginQueue[t][1]({scanner:ee.scanner,parser:ee.parser});return ee.initialized=!0,ee}function wa(t){return ee.initialized||bI(),pI(ee.parser.start,t,Zf(ee.scanner.start,t))}wa.scan=Zf;function Xf(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Ma(n),o=wa(t),i=[];for(let s=0;s<o.length;s++){const l=o[s];l.isLink&&(!e||l.t===e)&&r.check(l)&&i.push(l.toFormattedObject(r))}return i}var Na="[\0- -\u2029 ]",vI=new RegExp(Na),yI=new RegExp(`${Na}$`),CI=new RegExp(Na,"g");function II(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function kI(t){return new ne({key:new ce("autolink"),appendTransaction:(e,n,r)=>{const o=e.some(d=>d.docChanged)&&!n.doc.eq(r.doc),i=e.some(d=>d.getMeta("preventAutolink"));if(!o||i)return;const{tr:s}=r,l=lf(n.doc,[...e]);if(Af(l).forEach(({newRange:d})=>{const u=iC(r.doc,d,p=>p.isTextblock);let f,h;if(u.length>1)f=u[0],h=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ");else if(u.length){const p=r.doc.textBetween(d.from,d.to," "," ");if(!yI.test(p))return;f=u[0],h=r.doc.textBetween(f.pos,d.to,void 0," ")}if(f&&h){const p=h.split(vI).filter(Boolean);if(p.length<=0)return!1;const m=p[p.length-1],A=f.pos+h.lastIndexOf(m);if(!m)return!1;const g=wa(m).map(b=>b.toObject(t.defaultProtocol));if(!II(g))return!1;g.filter(b=>b.isLink).map(b=>({...b,from:A+b.start+1,to:A+b.end+1})).filter(b=>r.schema.marks.code?!r.doc.rangeHasMark(b.from,b.to,r.schema.marks.code):!0).filter(b=>t.validate(b.value)).filter(b=>t.shouldAutoLink(b.value)).forEach(b=>{ha(b.from,b.to,r.doc).some(v=>v.mark.type===t.type)||s.addMark(b.from,b.to,t.type.create({href:b.href}))})}}),!!s.steps.length)return s}})}function EI(t){return new ne({key:new ce("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,i;if(r.button!==0||!e.editable)return!1;let s=null;if(r.target instanceof HTMLAnchorElement)s=r.target;else{const c=r.target;if(!c)return!1;const d=t.editor.view.dom;s=c.closest("a"),s&&!d.contains(s)&&(s=null)}if(!s)return!1;let l=!1;if(t.enableClickSelection&&(l=t.editor.commands.extendMarkRange(t.type.name)),t.openOnClick){const c=mf(e.state,t.type.name),d=(o=s.href)!=null?o:c.href,u=(i=s.target)!=null?i:c.target;d&&(window.open(d,u),l=!0)}return l}}})}function MI(t){return new ne({key:new ce("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{shouldAutoLink:o}=t,{state:i}=e,{selection:s}=i,{empty:l}=s;if(l)return!1;let c="";r.content.forEach(u=>{c+=u.textContent});const d=Xf(c,{defaultProtocol:t.defaultProtocol}).find(u=>u.isLink&&u.value===c);return!c||!d||o!==void 0&&!o(d.value)?!1:t.editor.commands.setMark(t.type,{href:d.href})}}})}function Bt(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const o=typeof r=="string"?r:r.scheme;o&&n.push(o)}),!t||t.replace(CI,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}var Jf=on.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(t=>{if(typeof t=="string"){kc(t);return}kc(t.scheme,t.optionalSlashes)})},onDestroy(){gI()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(t,e)=>!!Bt(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>{const e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),n=/^[a-z][a-z0-9+.-]*:/i.test(t);if(e||n&&!t.includes("@"))return!0;const o=(t.includes("@")?t.split("@").pop():t).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||!/\./.test(o))}}},addAttributes(){return{href:{default:null,parseHTML(t){return t.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class},title:{default:null}}},parseHTML(){return[{tag:"a[href]",getAttrs:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!Bt(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!Bt(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",te(this.options.HTMLAttributes,t),0]:["a",te(this.options.HTMLAttributes,{...t,href:""}),0]},markdownTokenName:"link",parseMarkdown:(t,e)=>e.applyMark("link",e.parseInline(t.tokens||[]),{href:t.href,title:t.title||null}),renderMarkdown:(t,e)=>{var n,r,o,i;const s=(r=(n=t.attrs)==null?void 0:n.href)!=null?r:"",l=(i=(o=t.attrs)==null?void 0:o.title)!=null?i:"",c=e.renderChildren(t);return l?`[${c}](${s} "${l}")`:`[${c}](${s})`},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!Bt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:r=>!!Bt(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[en({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,o=Xf(t).filter(i=>i.isLink&&this.options.isAllowedUri(i.value,{defaultValidate:s=>!!Bt(s,n),protocols:n,defaultProtocol:r}));o.length&&o.forEach(i=>{this.options.shouldAutoLink(i.value)&&e.push({text:i.value,data:{href:i.href},index:i.start})})}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)==null?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(kI({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:o=>!!Bt(o,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),t.push(EI({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick==="whenNotEditable"?!0:this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&t.push(MI({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),t}}),wI=Jf;let Es,Ms;if(typeof WeakMap<"u"){let t=new WeakMap;Es=e=>t.get(e),Ms=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Es=r=>{for(let o=0;o<t.length;o+=2)if(t[o]==r)return t[o+1]},Ms=(r,o)=>(n==10&&(n=0),t[n++]=r,t[n++]=o)}var ae=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,o=e/this.width|0;let i=r+1,s=o+1;for(let l=1;i<this.width&&this.map[e+l]==n;l++)i++;for(let l=1;s<this.height&&this.map[e+this.width*l]==n;l++)s++;return{left:r,top:o,right:i,bottom:s}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:o,top:i,bottom:s}=this.findCell(t);return e=="horiz"?(n<0?r==0:o==this.width)?null:this.map[i*this.width+(n<0?r-1:o)]:(n<0?i==0:s==this.height)?null:this.map[r+this.width*(n<0?i-1:s)]}rectBetween(t,e){const{left:n,right:r,top:o,bottom:i}=this.findCell(t),{left:s,right:l,top:c,bottom:d}=this.findCell(e);return{left:Math.min(n,s),top:Math.min(o,c),right:Math.max(r,l),bottom:Math.max(i,d)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let o=t.left;o<t.right;o++){const i=r*this.width+o,s=this.map[i];n[s]||(n[s]=!0,!(o==t.left&&o&&this.map[i-1]==s||r==t.top&&r&&this.map[i-this.width]==s)&&e.push(s))}return e}positionAt(t,e,n){for(let r=0,o=0;;r++){const i=o+n.child(r).nodeSize;if(r==t){let s=e+t*this.width;const l=(t+1)*this.width;for(;s<l&&this.map[s]<o;)s++;return s==l?i-1:this.map[s]}o=i}}static get(t){return Es(t)||Ms(t,NI(t))}};function NI(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=xI(t),n=t.childCount,r=[];let o=0,i=null;const s=[];for(let d=0,u=e*n;d<u;d++)r[d]=0;for(let d=0,u=0;d<n;d++){const f=t.child(d);u++;for(let m=0;;m++){for(;o<r.length&&r[o]!=0;)o++;if(m==f.childCount)break;const A=f.child(m),{colspan:g,rowspan:b,colwidth:v}=A.attrs;for(let y=0;y<b;y++){if(y+d>=n){(i||(i=[])).push({type:"overlong_rowspan",pos:u,n:b-y});break}const C=o+y*e;for(let k=0;k<g;k++){r[C+k]==0?r[C+k]=u:(i||(i=[])).push({type:"collision",row:d,pos:u,n:g-k});const N=v&&v[k];if(N){const S=(C+k)%e*2,O=s[S];O==null||O!=N&&s[S+1]==1?(s[S]=N,s[S+1]=1):O==N&&s[S+1]++}}}o+=g,u+=A.nodeSize}const h=(d+1)*e;let p=0;for(;o<h;)r[o++]==0&&p++;p&&(i||(i=[])).push({type:"missing",row:d,n:p}),u++}(e===0||n===0)&&(i||(i=[])).push({type:"zero_sized"});const l=new ae(e,n,r,i);let c=!1;for(let d=0;!c&&d<s.length;d+=2)s[d]!=null&&s[d+1]<n&&(c=!0);return c&&SI(l,s,t),l}function xI(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const o=t.child(r);let i=0;if(n)for(let s=0;s<r;s++){const l=t.child(s);for(let c=0;c<l.childCount;c++){const d=l.child(c);s+d.attrs.rowspan>r&&(i+=d.attrs.colspan)}}for(let s=0;s<o.childCount;s++){const l=o.child(s);i+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=i:e!=i&&(e=Math.max(e,i))}return e}function SI(t,e,n){t.problems||(t.problems=[]);const r={};for(let o=0;o<t.map.length;o++){const i=t.map[o];if(r[i])continue;r[i]=!0;const s=n.nodeAt(i);if(!s)throw new RangeError(`No cell with offset ${i} found`);let l=null;const c=s.attrs;for(let d=0;d<c.colspan;d++){const u=e[(o+d)%t.width*2];u!=null&&(!c.colwidth||c.colwidth[d]!=u)&&((l||(l=TI(c)))[d]=u)}l&&t.problems.unshift({type:"colwidth mismatch",pos:i,colwidth:l})}}function TI(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function ke(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],o=r.spec.tableRole;o&&(e[o]=r)}}return e}const Ct=new ce("selectingCells");function tn(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function LI(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function qe(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function ui(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=tn(e.$head)||DI(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function DI(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function ws(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function OI(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function xa(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function Gf(t,e,n){const r=t.node(-1),o=ae.get(r),i=t.start(-1),s=o.nextCell(t.pos-i,e,n);return s==null?null:t.node(0).resolve(i+s)}function nn(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(o=>o>0)||(r.colwidth=null)),r}function $f(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let o=0;o<n;o++)r.colwidth.splice(e,0,0)}return r}function BI(t,e,n){const r=ke(e.type.schema).header_cell;for(let o=0;o<t.height;o++)if(e.nodeAt(t.map[n+o*t.width]).type!=r)return!1;return!0}var $=class it extends j{constructor(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.rectBetween(e.pos-i,n.pos-i),l=e.node(0),c=o.cellsInRect(s).filter(u=>u!=n.pos-i);c.unshift(n.pos-i);const d=c.map(u=>{const f=r.nodeAt(u);if(!f)throw new RangeError(`No cell with offset ${u} found`);const h=i+u+1;return new ou(l.resolve(h),l.resolve(h+f.content.size))});super(d[0].$from,d[0].$to,d),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),o=e.resolve(n.map(this.$headCell.pos));if(ws(r)&&ws(o)&&xa(r,o)){const i=this.$anchorCell.node(-1)!=r.node(-1);return i&&this.isRowSelection()?it.rowSelection(r,o):i&&this.isColSelection()?it.colSelection(r,o):new it(r,o)}return P.between(r,o)}content(){const e=this.$anchorCell.node(-1),n=ae.get(e),r=this.$anchorCell.start(-1),o=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),i={},s=[];for(let c=o.top;c<o.bottom;c++){const d=[];for(let u=c*n.width+o.left,f=o.left;f<o.right;f++,u++){const h=n.map[u];if(i[h])continue;i[h]=!0;const p=n.findCell(h);let m=e.nodeAt(h);if(!m)throw new RangeError(`No cell with offset ${h} found`);const A=o.left-p.left,g=p.right-o.right;if(A>0||g>0){let b=m.attrs;if(A>0&&(b=nn(b,0,A)),g>0&&(b=nn(b,b.colspan-g,g)),p.left<o.left){if(m=m.type.createAndFill(b),!m)throw new RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else m=m.type.create(b,m.content)}if(p.top<o.top||p.bottom>o.bottom){const b={...m.attrs,rowspan:Math.min(p.bottom,o.bottom)-Math.max(p.top,o.top)};p.top<o.top?m=m.type.createAndFill(b):m=m.type.create(b,m.content)}d.push(m)}s.push(e.child(c).copy(w.from(d)))}const l=this.isColSelection()&&this.isRowSelection()?e:s;return new T(w.from(l),1,1)}replace(e,n=T.empty){const r=e.steps.length,o=this.ranges;for(let s=0;s<o.length;s++){const{$from:l,$to:c}=o[s],d=e.mapping.slice(r);e.replace(d.map(l.pos),d.map(c.pos),s?T.empty:n)}const i=j.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,n){this.replace(e,new T(w.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=ae.get(n),o=this.$anchorCell.start(-1),i=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-o,this.$headCell.pos-o));for(let s=0;s<i.length;s++)e(n.nodeAt(i[s]),o+i[s])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,o=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,o)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),c=e.node(0);return s.top<=l.top?(s.top>0&&(e=c.resolve(i+o.map[s.left])),l.bottom<o.height&&(n=c.resolve(i+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=c.resolve(i+o.map[l.left])),s.bottom<o.height&&(e=c.resolve(i+o.map[o.width*(o.height-1)+s.right-1]))),new it(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=ae.get(e),r=this.$anchorCell.start(-1),o=n.colCount(this.$anchorCell.pos-r),i=n.colCount(this.$headCell.pos-r);if(Math.min(o,i)>0)return!1;const s=o+this.$anchorCell.nodeAfter.attrs.colspan,l=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(s,l)==n.width}eq(e){return e instanceof it&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),o=ae.get(r),i=e.start(-1),s=o.findCell(e.pos-i),l=o.findCell(n.pos-i),c=e.node(0);return s.left<=l.left?(s.left>0&&(e=c.resolve(i+o.map[s.top*o.width])),l.right<o.width&&(n=c.resolve(i+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=c.resolve(i+o.map[l.top*o.width])),s.right<o.width&&(e=c.resolve(i+o.map[o.width*(s.top+1)-1]))),new it(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new it(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new it(e.resolve(n),e.resolve(r))}getBookmark(){return new RI(this.$anchorCell.pos,this.$headCell.pos)}};$.prototype.visible=!1;j.jsonID("cell",$);var RI=class _f{constructor(e,n){this.anchor=e,this.head=n}map(e){return new _f(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&xa(n,r)?new $(n,r):j.near(r,1)}};function zI(t){if(!(t.selection instanceof $))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(he.node(r,r+n.nodeSize,{class:"selectedCell"}))}),G.create(t.doc,e)}function PI({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,o=t.depth;for(;o>=0&&!(t.after(o+1)<t.end(o));o--,n++);for(let i=e.depth;i>=0&&!(e.before(i+1)>e.start(i));i--,r--);return n==r&&/row|table/.test(t.node(o).type.spec.tableRole)}function VI({$from:t,$to:e}){let n,r;for(let o=t.depth;o>0;o--){const i=t.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){n=i;break}}for(let o=e.depth;o>0;o--){const i=e.node(o);if(i.type.spec.tableRole==="cell"||i.type.spec.tableRole==="header_cell"){r=i;break}}return n!==r&&e.parentOffset===0}function jI(t,e,n){const r=(e||t).selection,o=(e||t).doc;let i,s;if(r instanceof R&&(s=r.node.type.spec.tableRole)){if(s=="cell"||s=="header_cell")i=$.create(o,r.from);else if(s=="row"){const l=o.resolve(r.from+1);i=$.rowSelection(l,l)}else if(!n){const l=ae.get(r.node),c=r.from+1,d=c+l.map[l.width*l.height-1];i=$.create(o,c+1,d)}}else r instanceof P&&PI(r)?i=P.create(o,r.from):r instanceof P&&VI(r)&&(i=P.create(o,r.$from.start(),r.$from.end()));return i&&(e||(e=t.tr)).setSelection(i),e}const HI=new ce("fix-tables");function eh(t,e,n,r){const o=t.childCount,i=e.childCount;e:for(let s=0,l=0;s<i;s++){const c=e.child(s);for(let d=l,u=Math.min(o,s+3);d<u;d++)if(t.child(d)==c){l=d+1,n+=c.nodeSize;continue e}r(c,n),l<o&&t.child(l).sameMarkup(c)?eh(t.child(l),c,n+1,r):c.nodesBetween(0,c.content.size,r,n+1),n+=c.nodeSize}}function th(t,e){let n;const r=(o,i)=>{o.type.spec.tableRole=="table"&&(n=QI(t,o,i,n))};return e?e.doc!=t.doc&&eh(e.doc,t.doc,0,r):t.doc.descendants(r),n}function QI(t,e,n,r){const o=ae.get(e);if(!o.problems)return r;r||(r=t.tr);const i=[];for(let c=0;c<o.height;c++)i.push(0);for(let c=0;c<o.problems.length;c++){const d=o.problems[c];if(d.type=="collision"){const u=e.nodeAt(d.pos);if(!u)continue;const f=u.attrs;for(let h=0;h<f.rowspan;h++)i[d.row+h]+=d.n;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,nn(f,f.colspan-d.n,d.n))}else if(d.type=="missing")i[d.row]+=d.n;else if(d.type=="overlong_rowspan"){const u=e.nodeAt(d.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-d.n})}else if(d.type=="colwidth mismatch"){const u=e.nodeAt(d.pos);if(!u)continue;r.setNodeMarkup(r.mapping.map(n+1+d.pos),null,{...u.attrs,colwidth:d.colwidth})}else if(d.type=="zero_sized"){const u=r.mapping.map(n);r.delete(u,u+e.nodeSize)}}let s,l;for(let c=0;c<i.length;c++)i[c]&&(s==null&&(s=c),l=c);for(let c=0,d=n+1;c<o.height;c++){const u=e.child(c),f=d+u.nodeSize,h=i[c];if(h>0){let p="cell";u.firstChild&&(p=u.firstChild.type.spec.tableRole);const m=[];for(let g=0;g<h;g++){const b=ke(t.schema)[p].createAndFill();b&&m.push(b)}const A=(c==0||s==c-1)&&l==c?d+1:f-1;r.insert(r.mapping.map(A),m)}d=f}return r.setMeta(HI,{fixTables:!0})}function et(t){const e=t.selection,n=ui(t),r=n.node(-1),o=n.start(-1),i=ae.get(r);return{...e instanceof $?i.rectBetween(e.$anchorCell.pos-o,e.$headCell.pos-o):i.findCell(n.pos-o),tableStart:o,map:i,table:r}}function nh(t,{map:e,tableStart:n,table:r},o){let i=o>0?-1:0;BI(e,r,o+i)&&(i=o==0||o==e.width?null:0);for(let s=0;s<e.height;s++){const l=s*e.width+o;if(o>0&&o<e.width&&e.map[l-1]==e.map[l]){const c=e.map[l],d=r.nodeAt(c);t.setNodeMarkup(t.mapping.map(n+c),null,$f(d.attrs,o-e.colCount(c))),s+=d.attrs.rowspan-1}else{const c=i==null?ke(r.type.schema).cell:r.nodeAt(e.map[l+i]).type,d=e.positionAt(s,o,r);t.insert(t.mapping.map(n+d),c.createAndFill())}}return t}function WI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(nh(t.tr,n,n.left))}return!0}function FI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(nh(t.tr,n,n.right))}return!0}function UI(t,{map:e,table:n,tableStart:r},o){const i=t.mapping.maps.length;for(let s=0;s<e.height;){const l=s*e.width+o,c=e.map[l],d=n.nodeAt(c),u=d.attrs;if(o>0&&e.map[l-1]==c||o<e.width-1&&e.map[l+1]==c)t.setNodeMarkup(t.mapping.slice(i).map(r+c),null,nn(u,o-e.colCount(c)));else{const f=t.mapping.slice(i).map(r+c);t.delete(f,f+d.nodeSize)}s+=u.rowspan}}function qI(t,e){if(!qe(t))return!1;if(e){const n=et(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let o=n.right-1;UI(r,n,o),o!=n.left;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=ae.get(i)}e(r)}return!0}function KI(t,e,n){var r;const o=ke(e.type.schema).header_cell;for(let i=0;i<t.width;i++)if(((r=e.nodeAt(t.map[i+n*t.width]))===null||r===void 0?void 0:r.type)!=o)return!1;return!0}function rh(t,{map:e,tableStart:n,table:r},o){let i=n;for(let d=0;d<o;d++)i+=r.child(d).nodeSize;const s=[];let l=o>0?-1:0;KI(e,r,o+l)&&(l=o==0||o==e.height?null:0);for(let d=0,u=e.width*o;d<e.width;d++,u++)if(o>0&&o<e.height&&e.map[u]==e.map[u-e.width]){const f=e.map[u],h=r.nodeAt(f).attrs;t.setNodeMarkup(n+f,null,{...h,rowspan:h.rowspan+1}),d+=h.colspan-1}else{var c;const f=l==null?ke(r.type.schema).cell:(c=r.nodeAt(e.map[u+l*e.width]))===null||c===void 0?void 0:c.type,h=f==null?void 0:f.createAndFill();h&&s.push(h)}return t.insert(i,ke(r.type.schema).row.create(null,s)),t}function ZI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(rh(t.tr,n,n.top))}return!0}function YI(t,e){if(!qe(t))return!1;if(e){const n=et(t);e(rh(t.tr,n,n.bottom))}return!0}function XI(t,{map:e,table:n,tableStart:r},o){let i=0;for(let d=0;d<o;d++)i+=n.child(d).nodeSize;const s=i+n.child(o).nodeSize,l=t.mapping.maps.length;t.delete(i+r,s+r);const c=new Set;for(let d=0,u=o*e.width;d<e.width;d++,u++){const f=e.map[u];if(!c.has(f)){if(c.add(f),o>0&&f==e.map[u-e.width]){const h=n.nodeAt(f).attrs;t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h,rowspan:h.rowspan-1}),d+=h.colspan-1}else if(o<e.height&&f==e.map[u+e.width]){const h=n.nodeAt(f),p=h.attrs,m=h.type.create({...p,rowspan:h.attrs.rowspan-1},h.content),A=e.positionAt(o+1,d,n);t.insert(t.mapping.slice(l).map(r+A),m),d+=p.colspan-1}}}}function JI(t,e){if(!qe(t))return!1;if(e){const n=et(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let o=n.bottom-1;XI(r,n,o),o!=n.top;o--){const i=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!i)throw new RangeError("No table found");n.table=i,n.map=ae.get(n.table)}e(r)}return!0}function Ec(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function GI({width:t,height:e,map:n},r){let o=r.top*t+r.left,i=o,s=(r.bottom-1)*t+r.left,l=o+(r.right-r.left-1);for(let c=r.top;c<r.bottom;c++){if(r.left>0&&n[i]==n[i-1]||r.right<t&&n[l]==n[l+1])return!0;i+=t,l+=t}for(let c=r.left;c<r.right;c++){if(r.top>0&&n[o]==n[o-t]||r.bottom<e&&n[s]==n[s+t])return!0;o++,s++}return!1}function Mc(t,e){const n=t.selection;if(!(n instanceof $)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=et(t),{map:o}=r;if(GI(o,r))return!1;if(e){const i=t.tr,s={};let l=w.empty,c,d;for(let u=r.top;u<r.bottom;u++)for(let f=r.left;f<r.right;f++){const h=o.map[u*o.width+f],p=r.table.nodeAt(h);if(!(s[h]||!p))if(s[h]=!0,c==null)c=h,d=p;else{Ec(p)||(l=l.append(p.content));const m=i.mapping.map(h+r.tableStart);i.delete(m,m+p.nodeSize)}}if(c==null||d==null)return!0;if(i.setNodeMarkup(c+r.tableStart,null,{...$f(d.attrs,d.attrs.colspan,r.right-r.left-d.attrs.colspan),rowspan:r.bottom-r.top}),l.size>0){const u=c+1+d.content.size,f=Ec(d)?c+1:u;i.replaceWith(f+r.tableStart,u+r.tableStart,l)}i.setSelection(new $(i.doc.resolve(c+r.tableStart))),e(i)}return!0}function wc(t,e){const n=ke(t.schema);return $I(({node:r})=>n[r.type.spec.tableRole])(t,e)}function $I(t){return(e,n)=>{const r=e.selection;let o,i;if(r instanceof $){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;o=r.$anchorCell.nodeAfter,i=r.$anchorCell.pos}else{var s;if(o=LI(r.$from),!o)return!1;i=(s=tn(r.$from))===null||s===void 0?void 0:s.pos}if(o==null||i==null||o.attrs.colspan==1&&o.attrs.rowspan==1)return!1;if(n){let l=o.attrs;const c=[],d=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const u=et(e),f=e.tr;for(let p=0;p<u.right-u.left;p++)c.push(d?{...l,colwidth:d&&d[p]?[d[p]]:null}:l);let h;for(let p=u.top;p<u.bottom;p++){let m=u.map.positionAt(p,u.left,u.table);p==u.top&&(m+=o.nodeSize);for(let A=u.left,g=0;A<u.right;A++,g++)A==u.left&&p==u.top||f.insert(h=f.mapping.map(m+u.tableStart,1),t({node:o,row:p,col:A}).createAndFill(c[g]))}f.setNodeMarkup(i,t({node:o,row:u.top,col:u.left}),c[0]),r instanceof $&&f.setSelection(new $(f.doc.resolve(r.$anchorCell.pos),h?f.doc.resolve(h):void 0)),n(f)}return!0}}function _I(t,e){return function(n,r){if(!qe(n))return!1;const o=ui(n);if(o.nodeAfter.attrs[t]===e)return!1;if(r){const i=n.tr;n.selection instanceof $?n.selection.forEachCell((s,l)=>{s.attrs[t]!==e&&i.setNodeMarkup(l,null,{...s.attrs,[t]:e})}):i.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[t]:e}),r(i)}return!0}}function ek(t){return function(e,n){if(!qe(e))return!1;if(n){const r=ke(e.schema),o=et(e),i=e.tr,s=o.map.cellsInRect(t=="column"?{left:o.left,top:0,right:o.right,bottom:o.map.height}:t=="row"?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=s.map(c=>o.table.nodeAt(c));for(let c=0;c<s.length;c++)l[c].type==r.header_cell&&i.setNodeMarkup(o.tableStart+s[c],r.cell,l[c].attrs);if(i.steps.length===0)for(let c=0;c<s.length;c++)i.setNodeMarkup(o.tableStart+s[c],r.header_cell,l[c].attrs);n(i)}return!0}}function Nc(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let o=0;o<r.length;o++){const i=e.table.nodeAt(r[o]);if(i&&i.type!==n.header_cell)return!1}return!0}function Ar(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?ek(t):function(n,r){if(!qe(n))return!1;if(r){const o=ke(n.schema),i=et(n),s=n.tr,l=Nc("row",i,o),c=Nc("column",i,o),d=(t==="column"?l:t==="row"&&c)?1:0,u=t=="column"?{left:0,top:d,right:1,bottom:i.map.height}:t=="row"?{left:d,top:0,right:i.map.width,bottom:1}:i,f=t=="column"?c?o.cell:o.header_cell:t=="row"?l?o.cell:o.header_cell:o.cell;i.map.cellsInRect(u).forEach(h=>{const p=h+i.tableStart,m=s.doc.nodeAt(p);m&&s.setNodeMarkup(p,f,m.attrs)}),r(s)}return!0}}Ar("row",{useDeprecatedLogic:!0});Ar("column",{useDeprecatedLogic:!0});const tk=Ar("cell",{useDeprecatedLogic:!0});function nk(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,o=t.before();r>=0;r--){const i=t.node(-1).child(r),s=i.lastChild;if(s)return o-1-s.nodeSize;o-=i.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),o=t.after();r<n.childCount;r++){const i=n.child(r);if(i.childCount)return o+1;o+=i.nodeSize}}return null}function xc(t){return function(e,n){if(!qe(e))return!1;const r=nk(ui(e),t);if(r==null)return!1;if(n){const o=e.doc.resolve(r);n(e.tr.setSelection(P.between(o,OI(o))).scrollIntoView())}return!0}}function rk(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function Pr(t,e){const n=t.selection;if(!(n instanceof $))return!1;if(e){const r=t.tr,o=ke(t.schema).cell.createAndFill().content;n.forEachCell((i,s)=>{i.content.eq(o)||r.replace(r.mapping.map(s+1),r.mapping.map(s+i.nodeSize-1),new T(o,0,0))}),r.docChanged&&e(r)}return!0}function ok(t){if(t.size===0)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const o=e.child(0),i=o.type.spec.tableRole,s=o.type.schema,l=[];if(i=="row")for(let c=0;c<e.childCount;c++){let d=e.child(c).content;const u=c?0:Math.max(0,n-1),f=c<e.childCount-1?0:Math.max(0,r-1);(u||f)&&(d=Ns(ke(s).row,new T(d,u,f)).content),l.push(d)}else if(i=="cell"||i=="header_cell")l.push(n||r?Ns(ke(s).row,new T(e,n,r)).content:e);else return null;return ik(s,l)}function ik(t,e){const n=[];for(let o=0;o<e.length;o++){const i=e[o];for(let s=i.childCount-1;s>=0;s--){const{rowspan:l,colspan:c}=i.child(s).attrs;for(let d=o;d<o+l;d++)n[d]=(n[d]||0)+c}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=e.length&&e.push(w.empty),n[o]<r){const i=ke(t).cell.createAndFill(),s=[];for(let l=n[o];l<r;l++)s.push(i);e[o]=e[o].append(w.from(s))}return{height:e.length,width:r,rows:e}}function Ns(t,e){const n=t.createAndFill();return new qs(n).replace(0,n.content.size,e).doc}function sk({width:t,height:e,rows:n},r,o){if(t!=r){const i=[],s=[];for(let l=0;l<n.length;l++){const c=n[l],d=[];for(let u=i[l]||0,f=0;u<r;f++){let h=c.child(f%c.childCount);u+h.attrs.colspan>r&&(h=h.type.createChecked(nn(h.attrs,h.attrs.colspan,u+h.attrs.colspan-r),h.content)),d.push(h),u+=h.attrs.colspan;for(let p=1;p<h.attrs.rowspan;p++)i[l+p]=(i[l+p]||0)+h.attrs.colspan}s.push(w.from(d))}n=s,t=r}if(e!=o){const i=[];for(let s=0,l=0;s<o;s++,l++){const c=[],d=n[l%e];for(let u=0;u<d.childCount;u++){let f=d.child(u);s+f.attrs.rowspan>o&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,o-f.attrs.rowspan)},f.content)),c.push(f)}i.push(w.from(c))}n=i,e=o}return{width:t,height:e,rows:n}}function ak(t,e,n,r,o,i,s){const l=t.doc.type.schema,c=ke(l);let d,u;if(o>e.width)for(let f=0,h=0;f<e.height;f++){const p=n.child(f);h+=p.nodeSize;const m=[];let A;p.lastChild==null||p.lastChild.type==c.cell?A=d||(d=c.cell.createAndFill()):A=u||(u=c.header_cell.createAndFill());for(let g=e.width;g<o;g++)m.push(A);t.insert(t.mapping.slice(s).map(h-1+r),m)}if(i>e.height){const f=[];for(let m=0,A=(e.height-1)*e.width;m<Math.max(e.width,o);m++){const g=m>=e.width?!1:n.nodeAt(e.map[A+m]).type==c.header_cell;f.push(g?u||(u=c.header_cell.createAndFill()):d||(d=c.cell.createAndFill()))}const h=c.row.create(null,w.from(f)),p=[];for(let m=e.height;m<i;m++)p.push(h);t.insert(t.mapping.slice(s).map(r+n.nodeSize-2),p)}return!!(d||u)}function Sc(t,e,n,r,o,i,s,l){if(s==0||s==e.height)return!1;let c=!1;for(let d=o;d<i;d++){const u=s*e.width+d,f=e.map[u];if(e.map[u-e.width]==f){c=!0;const h=n.nodeAt(f),{top:p,left:m}=e.findCell(f);t.setNodeMarkup(t.mapping.slice(l).map(f+r),null,{...h.attrs,rowspan:s-p}),t.insert(t.mapping.slice(l).map(e.positionAt(s,m,n)),h.type.createAndFill({...h.attrs,rowspan:p+h.attrs.rowspan-s})),d+=h.attrs.colspan-1}}return c}function Tc(t,e,n,r,o,i,s,l){if(s==0||s==e.width)return!1;let c=!1;for(let d=o;d<i;d++){const u=d*e.width+s,f=e.map[u];if(e.map[u-1]==f){c=!0;const h=n.nodeAt(f),p=e.colCount(f),m=t.mapping.slice(l).map(f+r);t.setNodeMarkup(m,null,nn(h.attrs,s-p,h.attrs.colspan-(s-p))),t.insert(m+h.nodeSize,h.type.createAndFill(nn(h.attrs,0,s-p))),d+=h.attrs.rowspan-1}}return c}function Lc(t,e,n,r,o){let i=n?t.doc.nodeAt(n-1):t.doc;if(!i)throw new Error("No table found");let s=ae.get(i);const{top:l,left:c}=r,d=c+o.width,u=l+o.height,f=t.tr;let h=0;function p(){if(i=n?f.doc.nodeAt(n-1):f.doc,!i)throw new Error("No table found");s=ae.get(i),h=f.mapping.maps.length}ak(f,s,i,n,d,u,h)&&p(),Sc(f,s,i,n,c,d,l,h)&&p(),Sc(f,s,i,n,c,d,u,h)&&p(),Tc(f,s,i,n,l,u,c,h)&&p(),Tc(f,s,i,n,l,u,d,h)&&p();for(let m=l;m<u;m++){const A=s.positionAt(m,c,i),g=s.positionAt(m,d,i);f.replace(f.mapping.slice(h).map(A+n),f.mapping.slice(h).map(g+n),new T(o.rows[m-l],0,0))}p(),f.setSelection(new $(f.doc.resolve(n+s.positionAt(l,c,i)),f.doc.resolve(n+s.positionAt(u-1,d-1,i)))),e(f)}const lk=aa({ArrowLeft:Vr("horiz",-1),ArrowRight:Vr("horiz",1),ArrowUp:Vr("vert",-1),ArrowDown:Vr("vert",1),"Shift-ArrowLeft":jr("horiz",-1),"Shift-ArrowRight":jr("horiz",1),"Shift-ArrowUp":jr("vert",-1),"Shift-ArrowDown":jr("vert",1),Backspace:Pr,"Mod-Backspace":Pr,Delete:Pr,"Mod-Delete":Pr});function Zr(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Vr(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;if(i instanceof $)return Zr(n,r,j.near(i.$headCell,e));if(t!="horiz"&&!i.empty)return!1;const s=oh(o,t,e);if(s==null)return!1;if(t=="horiz")return Zr(n,r,j.near(n.doc.resolve(i.head+e),e));{const l=n.doc.resolve(s),c=Gf(l,t,e);let d;return c?d=j.near(c,1):e<0?d=j.near(n.doc.resolve(l.before(-1)),-1):d=j.near(n.doc.resolve(l.after(-1)),1),Zr(n,r,d)}}}function jr(t,e){return(n,r,o)=>{if(!o)return!1;const i=n.selection;let s;if(i instanceof $)s=i;else{const c=oh(o,t,e);if(c==null)return!1;s=new $(n.doc.resolve(c))}const l=Gf(s.$headCell,t,e);return l?Zr(n,r,new $(s.$anchorCell,l)):!1}}function ck(t,e){const n=t.state.doc,r=tn(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new $(r))),!0):!1}function dk(t,e,n){if(!qe(t.state))return!1;let r=ok(n);const o=t.state.selection;if(o instanceof $){r||(r={width:1,height:1,rows:[w.from(Ns(ke(t.state.schema).cell,n))]});const i=o.$anchorCell.node(-1),s=o.$anchorCell.start(-1),l=ae.get(i).rectBetween(o.$anchorCell.pos-s,o.$headCell.pos-s);return r=sk(r,l.right-l.left,l.bottom-l.top),Lc(t.state,t.dispatch,s,l,r),!0}else if(r){const i=ui(t.state),s=i.start(-1);return Lc(t.state,t.dispatch,s,ae.get(i.node(-1)).findCell(i.pos-s),r),!0}else return!1}function uk(t,e){var n;if(e.button!=0||e.ctrlKey||e.metaKey)return;const r=Dc(t,e.target);let o;if(e.shiftKey&&t.state.selection instanceof $)i(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(o=tn(t.state.selection.$anchor))!=null&&((n=Ui(t,e))===null||n===void 0?void 0:n.pos)!=o.pos)i(o,e),e.preventDefault();else if(!r)return;function i(c,d){let u=Ui(t,d);const f=Ct.getState(t.state)==null;if(!u||!xa(c,u))if(f)u=c;else return;const h=new $(c,u);if(f||!t.state.selection.eq(h)){const p=t.state.tr.setSelection(h);f&&p.setMeta(Ct,c.pos),t.dispatch(p)}}function s(){t.root.removeEventListener("mouseup",s),t.root.removeEventListener("dragstart",s),t.root.removeEventListener("mousemove",l),Ct.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ct,-1))}function l(c){const d=c,u=Ct.getState(t.state);let f;if(u!=null)f=t.state.doc.resolve(u);else if(Dc(t,d.target)!=r&&(f=Ui(t,e),!f))return s();f&&i(f,d)}t.root.addEventListener("mouseup",s),t.root.addEventListener("dragstart",s),t.root.addEventListener("mousemove",l)}function oh(t,e,n){if(!(t.state.selection instanceof P))return null;const{$head:r}=t.state.selection;for(let o=r.depth-1;o>=0;o--){const i=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:i.childCount))return null;if(i.type.spec.tableRole=="cell"||i.type.spec.tableRole=="header_cell"){const s=r.before(o),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?s:null}}return null}function Dc(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Ui(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});if(!n)return null;let{inside:r,pos:o}=n;return r>=0&&tn(t.state.doc.resolve(r))||tn(t.state.doc.resolve(o))}var fk=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),xs(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,xs(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function xs(t,e,n,r,o,i){let s=0,l=!0,c=e.firstChild;const d=t.firstChild;if(d){for(let f=0,h=0;f<d.childCount;f++){const{colspan:p,colwidth:m}=d.child(f).attrs;for(let A=0;A<p;A++,h++){const g=o==h?i:m&&m[A],b=g?g+"px":"";if(s+=g||r,g||(l=!1),c)c.style.width!=b&&(c.style.width=b),c=c.nextSibling;else{const v=document.createElement("col");v.style.width=b,e.appendChild(v)}}}for(;c;){var u;const f=c.nextSibling;(u=c.parentNode)===null||u===void 0||u.removeChild(c),c=f}l?(n.style.width=s+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=s+"px")}}const Le=new ce("tableColumnResizing");function hk({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=fk,lastColumnResizable:o=!0}={}){const i=new ne({key:Le,state:{init(s,l){var c;const d=(c=i.spec)===null||c===void 0||(c=c.props)===null||c===void 0?void 0:c.nodeViews,u=ke(l.schema).table.name;return r&&d&&(d[u]=(f,h)=>new r(f,n,h)),new pk(-1,!1)},apply(s,l){return l.apply(s)}},props:{attributes:s=>{const l=Le.getState(s);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(s,l)=>{mk(s,l,t,o)},mouseleave:s=>{Ak(s)},mousedown:(s,l)=>{gk(s,l,e,n)}},decorations:s=>{const l=Le.getState(s);if(l&&l.activeHandle>-1)return Ik(s,l.activeHandle)},nodeViews:{}}});return i}var pk=class Yr{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Le);if(r&&r.setHandle!=null)return new Yr(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Yr(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let o=e.mapping.map(n.activeHandle,-1);return ws(e.doc.resolve(o))||(o=-1),new Yr(o,n.dragging)}return n}};function mk(t,e,n,r){if(!t.editable)return;const o=Le.getState(t.state);if(o&&!o.dragging){const i=vk(e.target);let s=-1;if(i){const{left:l,right:c}=i.getBoundingClientRect();e.clientX-l<=n?s=Oc(t,e,"left",n):c-e.clientX<=n&&(s=Oc(t,e,"right",n))}if(s!=o.activeHandle){if(!r&&s!==-1){const l=t.state.doc.resolve(s),c=l.node(-1),d=ae.get(c),u=l.start(-1);if(d.colCount(l.pos-u)+l.nodeAfter.attrs.colspan-1==d.width-1)return}ih(t,s)}}}function Ak(t){if(!t.editable)return;const e=Le.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&ih(t,-1)}function gk(t,e,n,r){var o;if(!t.editable)return!1;const i=(o=t.dom.ownerDocument.defaultView)!==null&&o!==void 0?o:window,s=Le.getState(t.state);if(!s||s.activeHandle==-1||s.dragging)return!1;const l=t.state.doc.nodeAt(s.activeHandle),c=bk(t,s.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Le,{setDragging:{startX:e.clientX,startWidth:c}}));function d(f){i.removeEventListener("mouseup",d),i.removeEventListener("mousemove",u);const h=Le.getState(t.state);h!=null&&h.dragging&&(yk(t,h.activeHandle,Bc(h.dragging,f,n)),t.dispatch(t.state.tr.setMeta(Le,{setDragging:null})))}function u(f){if(!f.which)return d(f);const h=Le.getState(t.state);if(h&&h.dragging){const p=Bc(h.dragging,f,n);Rc(t,h.activeHandle,p,r)}}return Rc(t,s.activeHandle,c,r),i.addEventListener("mouseup",d),i.addEventListener("mousemove",u),e.preventDefault(),!0}function bk(t,e,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const i=t.domAtPos(e);let s=i.node.childNodes[i.offset].offsetWidth,l=n;if(r)for(let c=0;c<n;c++)r[c]&&(s-=r[c],l--);return s/l}function vk(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function Oc(t,e,n,r){const o=n=="right"?-r:r,i=t.posAtCoords({left:e.clientX+o,top:e.clientY});if(!i)return-1;const{pos:s}=i,l=tn(t.state.doc.resolve(s));if(!l)return-1;if(n=="right")return l.pos;const c=ae.get(l.node(-1)),d=l.start(-1),u=c.map.indexOf(l.pos-d);return u%c.width==0?-1:d+c.map[u-1]}function Bc(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function ih(t,e){t.dispatch(t.state.tr.setMeta(Le,{setHandle:e}))}function yk(t,e,n){const r=t.state.doc.resolve(e),o=r.node(-1),i=ae.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1,c=t.state.tr;for(let d=0;d<i.height;d++){const u=d*i.width+l;if(d&&i.map[u]==i.map[u-i.width])continue;const f=i.map[u],h=o.nodeAt(f).attrs,p=h.colspan==1?0:l-i.colCount(f);if(h.colwidth&&h.colwidth[p]==n)continue;const m=h.colwidth?h.colwidth.slice():Ck(h.colspan);m[p]=n,c.setNodeMarkup(s+f,null,{...h,colwidth:m})}c.docChanged&&t.dispatch(c)}function Rc(t,e,n,r){const o=t.state.doc.resolve(e),i=o.node(-1),s=o.start(-1),l=ae.get(i).colCount(o.pos-s)+o.nodeAfter.attrs.colspan-1;let c=t.domAtPos(o.start(-1)).node;for(;c&&c.nodeName!="TABLE";)c=c.parentNode;c&&xs(i,c.firstChild,c,r,l,n)}function Ck(t){return Array(t).fill(0)}function Ik(t,e){const n=[],r=t.doc.resolve(e),o=r.node(-1);if(!o)return G.empty;const i=ae.get(o),s=r.start(-1),l=i.colCount(r.pos-s)+r.nodeAfter.attrs.colspan-1;for(let d=0;d<i.height;d++){const u=l+d*i.width;if((l==i.width-1||i.map[u]!=i.map[u+1])&&(d==0||i.map[u]!=i.map[u-i.width])){var c;const f=i.map[u],h=s+f+o.nodeAt(f).nodeSize-1,p=document.createElement("div");p.className="column-resize-handle",!((c=Le.getState(t))===null||c===void 0)&&c.dragging&&n.push(he.node(s+f,s+f+o.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),n.push(he.widget(h,p))}}return G.create(t.doc,n)}function kk({allowTableNodeSelection:t=!1}={}){return new ne({key:Ct,state:{init(){return null},apply(e,n){const r=e.getMeta(Ct);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:o,pos:i}=e.mapping.mapResult(n);return o?null:i}},props:{decorations:zI,handleDOMEvents:{mousedown:uk},createSelectionBetween(e){return Ct.getState(e.state)!=null?e.state.selection:null},handleTripleClick:ck,handleKeyDown:lk,handlePaste:dk},appendTransaction(e,n,r){return jI(r,th(r,n),t)}})}var sh=Ae.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{var e,n;const r=t.getAttribute("colwidth"),o=r?r.split(",").map(i=>parseInt(i,10)):null;if(!o){const i=(e=t.closest("table"))==null?void 0:e.querySelectorAll("colgroup > col"),s=Array.from(((n=t.parentElement)==null?void 0:n.children)||[]).indexOf(t);if(s&&s>-1&&i&&i[s]){const l=i[s].getAttribute("width");return l?[parseInt(l,10)]:null}}return o}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",te(this.options.HTMLAttributes,t),0]}}),ah=Ae.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",te(this.options.HTMLAttributes,t),0]}}),lh=Ae.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",te(this.options.HTMLAttributes,t),0]}});function Ss(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function zc(t,e,n,r,o,i){var s;let l=0,c=!0,d=e.firstChild;const u=t.firstChild;if(u!==null)for(let h=0,p=0;h<u.childCount;h+=1){const{colspan:m,colwidth:A}=u.child(h).attrs;for(let g=0;g<m;g+=1,p+=1){const b=o===p?i:A&&A[g],v=b?`${b}px`:"";if(l+=b||r,b||(c=!1),d){if(d.style.width!==v){const[y,C]=Ss(r,b);d.style.setProperty(y,C)}d=d.nextSibling}else{const y=document.createElement("col"),[C,k]=Ss(r,b);y.style.setProperty(C,k),e.appendChild(y)}}}for(;d;){const h=d.nextSibling;(s=d.parentNode)==null||s.removeChild(d),d=h}const f=t.attrs.style&&typeof t.attrs.style=="string"&&/\bwidth\s*:/i.test(t.attrs.style);c&&!f?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}var Ek=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),t.attrs.style&&(this.table.style.cssText=t.attrs.style),this.colgroup=this.table.appendChild(document.createElement("colgroup")),zc(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!==this.node.type?!1:(this.node=t,zc(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){const e=t.target,n=this.dom.contains(e),r=this.contentDOM.contains(e);return!!(n&&!r&&(t.type==="attributes"||t.type==="childList"||t.type==="characterData"))}};function Mk(t,e,n,r){let o=0,i=!0;const s=[],l=t.firstChild;if(!l)return{};for(let f=0,h=0;f<l.childCount;f+=1){const{colspan:p,colwidth:m}=l.child(f).attrs;for(let A=0;A<p;A+=1,h+=1){const g=n===h?r:m&&m[A];o+=g||e,g||(i=!1);const[b,v]=Ss(e,g);s.push(["col",{style:`${b}: ${v}`}])}}const c=i?`${o}px`:"",d=i?"":`${o}px`;return{colgroup:["colgroup",{},...s],tableWidth:c,tableMinWidth:d}}function Pc(t,e){return t.createAndFill()}function wk(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function Nk(t,e,n,r,o){const i=wk(t),s=[],l=[];for(let d=0;d<n;d+=1){const u=Pc(i.cell);if(u&&l.push(u),r){const f=Pc(i.header_cell);f&&s.push(f)}}const c=[];for(let d=0;d<e;d+=1)c.push(i.row.createChecked(null,r&&d===0?s:l));return i.table.createChecked(null,c)}function xk(t){return t instanceof $}var Hr=({editor:t})=>{const{selection:e}=t.state;if(!xk(e))return!1;let n=0;const r=cf(e.ranges[0].$from,i=>i.type.name==="table");return r==null||r.node.descendants(i=>{if(i.type.name==="table")return!1;["tableCell","tableHeader"].includes(i.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},Sk="";function Tk(t){return(t||"").replace(/\s+/g," ").trim()}function Lk(t,e,n={}){var r;const o=(r=n.cellLineSeparator)!=null?r:Sk;if(!t||!t.content||t.content.length===0)return"";const i=[];t.content.forEach(m=>{const A=[];m.content&&m.content.forEach(g=>{let b="";g.content&&Array.isArray(g.content)&&g.content.length>1?b=g.content.map(k=>e.renderChildren(k)).join(o):b=g.content?e.renderChildren(g.content):"";const v=Tk(b),y=g.type==="tableHeader";A.push({text:v,isHeader:y})}),i.push(A)});const s=i.reduce((m,A)=>Math.max(m,A.length),0);if(s===0)return"";const l=new Array(s).fill(0);i.forEach(m=>{var A;for(let g=0;g<s;g+=1){const v=(((A=m[g])==null?void 0:A.text)||"").length;v>l[g]&&(l[g]=v),l[g]<3&&(l[g]=3)}});const c=(m,A)=>m+" ".repeat(Math.max(0,A-m.length)),d=i[0],u=d.some(m=>m.isHeader);let f=`
|
|
118
118
|
`;const h=new Array(s).fill(0).map((m,A)=>u&&d[A]&&d[A].text||"");return f+=`| ${h.map((m,A)=>c(m,l[A])).join(" | ")} |
|
|
119
119
|
`,f+=`| ${l.map(m=>"-".repeat(Math.max(3,m))).join(" | ")} |
|
|
120
120
|
`,(u?i.slice(1):i).forEach(m=>{f+=`| ${new Array(s).fill(0).map((A,g)=>c(m[g]&&m[g].text||"",l[g])).join(" | ")} |
|
|
121
|
-
`}),f}var Lk
|
|
121
|
+
`}),f}var Dk=Lk,ch=Ae.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:Ek,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=Mk(t,this.options.cellMinWidth),i=e.style;function s(){return i||(r?`width: ${r}`:`min-width: ${o}`)}const l=["table",te(this.options.HTMLAttributes,e,{style:s()}),n,["tbody",0]];return this.options.renderWrapper?["div",{class:"tableWrapper"},l]:l},parseMarkdown:(t,e)=>{const n=[];if(t.header){const r=[];t.header.forEach(o=>{r.push(e.createNode("tableHeader",{},[{type:"paragraph",content:e.parseInline(o.tokens)}]))}),n.push(e.createNode("tableRow",{},r))}return t.rows&&t.rows.forEach(r=>{const o=[];r.forEach(i=>{o.push(e.createNode("tableCell",{},[{type:"paragraph",content:e.parseInline(i.tokens)}]))}),n.push(e.createNode("tableRow",{},o))}),e.createNode("table",void 0,n)},renderMarkdown:(t,e)=>Dk(t,e),addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:i})=>{const s=Nk(i.schema,t,e,n);if(o){const l=r.selection.from+1;r.replaceSelectionWith(s).scrollIntoView().setSelection(P.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>WI(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>FI(t,e),deleteColumn:()=>({state:t,dispatch:e})=>qI(t,e),addRowBefore:()=>({state:t,dispatch:e})=>ZI(t,e),addRowAfter:()=>({state:t,dispatch:e})=>YI(t,e),deleteRow:()=>({state:t,dispatch:e})=>JI(t,e),deleteTable:()=>({state:t,dispatch:e})=>rk(t,e),mergeCells:()=>({state:t,dispatch:e})=>Mc(t,e),splitCell:()=>({state:t,dispatch:e})=>wc(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>Ar("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>Ar("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>tk(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>Mc(t,e)?!0:wc(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>_I(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>xc(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>xc(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&th(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=$.create(e.doc,t.anchorCell,t.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Hr,"Mod-Backspace":Hr,Delete:Hr,"Mod-Delete":Hr}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[hk({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],kk({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:Y(B(t,"tableRole",e))}}});oe.create({name:"tableKit",addExtensions(){const t=[];return this.options.table!==!1&&t.push(ch.configure(this.options.table)),this.options.tableCell!==!1&&t.push(sh.configure(this.options.tableCell)),this.options.tableHeader!==!1&&t.push(ah.configure(this.options.tableHeader)),this.options.tableRow!==!1&&t.push(lh.configure(this.options.tableRow)),t}});var Ok=oe.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).some(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.resetAttributes(e,"textAlign")).some(e=>e),toggleTextAlign:t=>({editor:e,commands:n})=>this.options.alignments.includes(t)?e.isActive({textAlign:t})?n.unsetTextAlign():n.setTextAlign(t):!1}},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")}}}),Bk=Ok,Uo=(t,e)=>{if(t==="slot")return 0;if(t instanceof Function)return t(e);const{children:n,...r}=e??{};if(t==="svg")throw new Error("SVG elements are not supported in the JSX syntax, use the array syntax instead");return[t,r,n]},Rk=/^\s*>\s$/,zk=Ae.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return Uo("blockquote",{...te(this.options.HTMLAttributes,t),children:Uo("slot",{})})},parseMarkdown:(t,e)=>e.createNode("blockquote",void 0,e.parseChildren(t.tokens||[])),renderMarkdown:(t,e)=>{if(!t.content)return"";const n=">",r=[];return t.content.forEach(o=>{const l=e.renderChildren([o]).split(`
|
|
122
122
|
`).map(c=>c.trim()===""?n:`${n} ${c}`);r.push(l.join(`
|
|
123
123
|
`))}),r.join(`
|
|
124
124
|
${n}
|
|
125
|
-
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Mn({find:
|
|
125
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[Mn({find:Rk,type:this.type})]}}),Pk=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Vk=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,jk=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,Hk=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,Qk=on.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:t=>t.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:t=>t.type.name===this.name},{style:"font-weight",getAttrs:t=>/^(bold(er)?|[5-9]\d{2,})$/.test(t)&&null}]},renderHTML({HTMLAttributes:t}){return Uo("strong",{...te(this.options.HTMLAttributes,t),children:Uo("slot",{})})},markdownTokenName:"strong",parseMarkdown:(t,e)=>e.applyMark("bold",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`**${e.renderChildren(t)}**`,addCommands(){return{setBold:()=>({commands:t})=>t.setMark(this.name),toggleBold:()=>({commands:t})=>t.toggleMark(this.name),unsetBold:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[En({find:Pk,type:this.type}),En({find:jk,type:this.type})]},addPasteRules(){return[en({find:Vk,type:this.type}),en({find:Hk,type:this.type})]}}),Wk=/(^|[^`])`([^`]+)`(?!`)$/,Fk=/(^|[^`])`([^`]+)`(?!`)/g,Uk=on.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:t}){return["code",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"codespan",parseMarkdown:(t,e)=>e.applyMark("code",[{type:"text",text:t.text||""}]),renderMarkdown:(t,e)=>t.content?`\`${e.renderChildren(t.content)}\``:"",addCommands(){return{setCode:()=>({commands:t})=>t.setMark(this.name),toggleCode:()=>({commands:t})=>t.toggleMark(this.name),unsetCode:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[En({find:Wk,type:this.type})]},addPasteRules(){return[en({find:Fk,type:this.type})]}}),qi=4,qk=/^```([a-z]+)?[\s\n]$/,Kk=/^~~~([a-z]+)?[\s\n]$/,Zk=Ae.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:qi,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:t=>{var e;const{languageClassPrefix:n}=this.options;if(!n)return null;const i=[...((e=t.firstElementChild)==null?void 0:e.classList)||[]].filter(s=>s.startsWith(n)).map(s=>s.replace(n,""))[0];return i||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:t,HTMLAttributes:e}){return["pre",te(this.options.HTMLAttributes,e),["code",{class:t.attrs.language?this.options.languageClassPrefix+t.attrs.language:null},0]]},markdownTokenName:"code",parseMarkdown:(t,e)=>{var n,r;return((n=t.raw)==null?void 0:n.startsWith("```"))===!1&&((r=t.raw)==null?void 0:r.startsWith("~~~"))===!1&&t.codeBlockStyle!=="indented"?[]:e.createNode("codeBlock",{language:t.lang||null},t.text?[e.createTextNode(t.text)]:[])},renderMarkdown:(t,e)=>{var n;let r="";const o=((n=t.attrs)==null?void 0:n.language)||"";return t.content?r=[`\`\`\`${o}`,e.renderChildren(t.content),"```"].join(`
|
|
126
126
|
`):r=`\`\`\`${o}
|
|
127
127
|
|
|
128
128
|
\`\`\``,r},addCommands(){return{setCodeBlock:t=>({commands:e})=>e.setNode(this.name,t),toggleCodeBlock:t=>({commands:e})=>e.toggleNode(this.name,"paragraph",t)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:t,$anchor:e}=this.editor.state.selection,n=e.pos===1;return!t||e.parent.type.name!==this.name?!1:n||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:t})=>{var e;if(!this.options.enableTabIndentation)return!1;const n=(e=this.options.tabSize)!=null?e:qi,{state:r}=t,{selection:o}=r,{$from:i,empty:s}=o;if(i.parent.type!==this.type)return!1;const l=" ".repeat(n);return s?t.commands.insertContent(l):t.commands.command(({tr:c})=>{const{from:d,to:u}=o,p=r.doc.textBetween(d,u,`
|
|
@@ -138,20 +138,20 @@ ${n}
|
|
|
138
138
|
`).map(p=>{var m;const A=((m=p.match(/^ */))==null?void 0:m[0])||"",g=Math.min(A.length,n);return p.slice(g)}).join(`
|
|
139
139
|
`);return l.replaceWith(c,d,r.schema.text(h)),!0})},Enter:({editor:t})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=t,{selection:n}=e,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const i=r.parentOffset===r.parent.nodeSize-2,s=r.parent.textContent.endsWith(`
|
|
140
140
|
|
|
141
|
-
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:d})=>(d.setSelection(j.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[ps({find:
|
|
142
|
-
`));return s.replaceSelectionWith(this.type.create({language:i},c)),s.selection.$from.parent.type!==this.type&&s.setSelection(P.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),
|
|
141
|
+
`);return!i||!s?!1:t.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:t})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=t,{selection:n,doc:r}=e,{$from:o,empty:i}=n;if(!i||o.parent.type!==this.type||!(o.parentOffset===o.parent.nodeSize-2))return!1;const l=o.after();return l===void 0?!1:r.nodeAt(l)?t.commands.command(({tr:d})=>(d.setSelection(j.near(r.resolve(l))),!0)):t.commands.exitCode()}}},addInputRules(){return[ps({find:qk,type:this.type,getAttributes:t=>({language:t[1]})}),ps({find:Kk,type:this.type,getAttributes:t=>({language:t[1]})})]},addProseMirrorPlugins(){return[new ne({key:new ce("codeBlockVSCodeHandler"),props:{handlePaste:(t,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const n=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,i=o==null?void 0:o.mode;if(!n||!i)return!1;const{tr:s,schema:l}=t.state,c=l.text(n.replace(/\r\n?/g,`
|
|
142
|
+
`));return s.replaceSelectionWith(this.type.create({language:i},c)),s.selection.$from.parent.type!==this.type&&s.setSelection(P.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),t.dispatch(s),!0}}})]}}),Yk=Ae.create({name:"doc",topNode:!0,content:"block+",renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
143
143
|
|
|
144
|
-
`):""}),
|
|
144
|
+
`):""}),Xk=Ae.create({name:"hardBreak",markdownTokenName:"br",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",te(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
145
145
|
`},renderMarkdown:()=>`
|
|
146
|
-
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,c=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&s){const f=c.filter(h=>l.includes(h.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),
|
|
147
|
-
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(
|
|
148
|
-
`,f+=1;else if(p.match(
|
|
146
|
+
`,parseMarkdown:()=>({type:"hardBreak"}),addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:o,storedMarks:i}=n;if(o.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=r.extensionManager,c=i||o.$to.parentOffset&&o.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:u})=>{if(u&&c&&s){const f=c.filter(h=>l.includes(h.type.name));d.ensureMarks(f)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Jk=Ae.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,te(this.options.HTMLAttributes,e),0]},parseMarkdown:(t,e)=>e.createNode("heading",{level:t.depth||1},e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>{var n;const r=(n=t.attrs)!=null&&n.level?parseInt(t.attrs.level,10):1,o="#".repeat(r);return t.content?`${o} ${e.renderChildren(t.content)}`:""},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>ps({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),Gk=Ae.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{},nextNodeType:"paragraph"}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",te(this.options.HTMLAttributes,t)]},markdownTokenName:"hr",parseMarkdown:(t,e)=>e.createNode("horizontalRule"),renderMarkdown:()=>"---",addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{if(!s1(e,e.schema.nodes[this.name]))return!1;const{selection:n}=e,{$to:r}=n,o=t();return gf(n)?o.insertContentAt(r.pos,{type:this.name}):o.insertContent({type:this.name}),o.command(({state:i,tr:s,dispatch:l})=>{if(l){const{$to:c}=s.selection,d=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?s.setSelection(P.create(s.doc,c.pos+1)):c.nodeAfter.isBlock?s.setSelection(R.create(s.doc,c.pos)):s.setSelection(P.create(s.doc,c.pos));else{const u=i.schema.nodes[this.options.nextNodeType]||c.parent.type.contentMatch.defaultType,f=u==null?void 0:u.create();f&&(s.insert(d,f),s.setSelection(P.create(s.doc,d+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[Bf({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),$k=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,_k=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,eE=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,tE=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,nE=on.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",te(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[En({find:$k,type:this.type}),En({find:eE,type:this.type})]},addPasteRules(){return[en({find:_k,type:this.type}),en({find:tE,type:this.type})]}}),rE=Object.defineProperty,oE=(t,e)=>{for(var n in e)rE(t,n,{get:e[n],enumerable:!0})},iE="listItem",Vc="textStyle",jc=/^\s*([-+*])\s$/,dh=Ae.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>t.type!=="list"||t.ordered?[]:{type:"bulletList",content:t.items?e.parseChildren(t.items):[]},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
147
|
+
`):"",markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(iE,this.editor.getAttributes(Vc)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=Mn({find:jc,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Mn({find:jc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Vc),editor:this.editor})),[t]}}),uh=Ae.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"list_item",parseMarkdown:(t,e)=>{if(t.type!=="list_item")return[];let n=[];if(t.tokens&&t.tokens.length>0)if(t.tokens.some(o=>o.type==="paragraph"))n=e.parseChildren(t.tokens);else{const o=t.tokens[0];if(o&&o.type==="text"&&o.tokens&&o.tokens.length>0){if(n=[{type:"paragraph",content:e.parseInline(o.tokens)}],t.tokens.length>1){const s=t.tokens.slice(1),l=e.parseChildren(s);n.push(...l)}}else n=e.parseChildren(t.tokens)}return n.length===0&&(n=[{type:"paragraph",content:[]}]),{type:"listItem",content:n}},renderMarkdown:(t,e,n)=>ga(t,e,r=>{var o,i;return r.parentType==="bulletList"?"- ":r.parentType==="orderedList"?`${(((i=(o=r.meta)==null?void 0:o.parentAttrs)==null?void 0:i.start)||1)+r.index}. `:"- "},n),addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),sE={};oE(sE,{findListItemPos:()=>kr,getNextListDepth:()=>Sa,handleBackspace:()=>Ts,handleDelete:()=>Ls,hasListBefore:()=>fh,hasListItemAfter:()=>aE,hasListItemBefore:()=>hh,listItemHasSubList:()=>ph,nextListIsDeeper:()=>mh,nextListIsHigher:()=>Ah});var kr=(t,e)=>{const{$from:n}=e.selection,r=ue(t,e.schema);let o=null,i=n.depth,s=n.pos,l=null;for(;i>0&&l===null;)o=n.node(i),o.type===r?l=i:(i-=1,s-=1);return l===null?null:{$pos:e.doc.resolve(s),depth:l}},Sa=(t,e)=>{const n=kr(t,e);if(!n)return!1;const[,r]=mC(e,t,n.$pos.pos+4);return r},fh=(t,e,n)=>{const{$anchor:r}=t.selection,o=Math.max(0,r.pos-2),i=t.doc.resolve(o).node();return!(!i||!n.includes(i.type.name))},hh=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-2);return!(o.index()===0||((n=o.nodeBefore)==null?void 0:n.type.name)!==t)},ph=(t,e,n)=>{if(!n)return!1;const r=ue(t,e.schema);let o=!1;return n.descendants(i=>{i.type===r&&(o=!0)}),o},Ts=(t,e,n)=>{if(t.commands.undoInputRule())return!0;if(t.state.selection.from!==t.state.selection.to)return!1;if(!Lt(t.state,e)&&fh(t.state,e,n)){const{$anchor:l}=t.state.selection,c=t.state.doc.resolve(l.before()-1),d=[];c.node().descendants((h,p)=>{h.type.name===e&&d.push({node:h,pos:p})});const u=d.at(-1);if(!u)return!1;const f=t.state.doc.resolve(c.start()+u.pos+1);return t.chain().cut({from:l.start()-1,to:l.end()+1},f.end()).joinForward().run()}if(!Lt(t.state,e)||!vC(t.state))return!1;const r=kr(e,t.state);if(!r)return!1;const i=t.state.doc.resolve(r.$pos.pos-2).node(r.depth),s=ph(e,t.state,i);return hh(e,t.state)&&!s?t.commands.joinItemBackward():t.chain().liftListItem(e).run()},mh=(t,e)=>{const n=Sa(t,e),r=kr(t,e);return!r||!n?!1:n>r.depth},Ah=(t,e)=>{const n=Sa(t,e),r=kr(t,e);return!r||!n?!1:n<r.depth},Ls=(t,e)=>{if(!Lt(t.state,e)||!bC(t.state,e))return!1;const{selection:n}=t.state,{$from:r,$to:o}=n;return!n.empty&&r.sameParent(o)?!1:mh(e,t.state)?t.chain().focus(t.state.selection.from+4).lift(e).joinBackward().run():Ah(e,t.state)?t.chain().joinForward().joinBackward().run():t.commands.joinItemForward()},aE=(t,e)=>{var n;const{$anchor:r}=e.selection,o=e.doc.resolve(r.pos-r.parentOffset-2);return!(o.index()===o.parent.childCount-1||((n=o.nodeAfter)==null?void 0:n.type.name)!==t)},gh=oe.create({name:"listKeymap",addOptions(){return{listTypes:[{itemName:"listItem",wrapperNames:["bulletList","orderedList"]},{itemName:"taskItem",wrapperNames:["taskList"]}]}},addKeyboardShortcuts(){return{Delete:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Ls(t,n)&&(e=!0)}),e},"Mod-Delete":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n})=>{t.state.schema.nodes[n]!==void 0&&Ls(t,n)&&(e=!0)}),e},Backspace:({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Ts(t,n,r)&&(e=!0)}),e},"Mod-Backspace":({editor:t})=>{let e=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{t.state.schema.nodes[n]!==void 0&&Ts(t,n,r)&&(e=!0)}),e}}}}),Hc=/^(\s*)(\d+)\.\s+(.*)$/,lE=/^\s/;function cE(t){const e=[];let n=0,r=0;for(;n<t.length;){const o=t[n],i=o.match(Hc);if(!i)break;const[,s,l,c]=i,d=s.length;let u=c,f=n+1;const h=[o];for(;f<t.length;){const p=t[f];if(p.match(Hc))break;if(p.trim()==="")h.push(p),u+=`
|
|
148
|
+
`,f+=1;else if(p.match(lE))h.push(p),u+=`
|
|
149
149
|
${p.slice(d+2)}`,f+=1;else break}e.push({indent:d,number:parseInt(l,10),content:u.trim(),raw:h.join(`
|
|
150
150
|
`)}),r=f,n=f}return[e,r]}function bh(t,e,n){var r;const o=[];let i=0;for(;i<t.length;){const s=t[i];if(s.indent===e){const l=s.content.split(`
|
|
151
151
|
`),c=((r=l[0])==null?void 0:r.trim())||"",d=[];c&&d.push({type:"paragraph",raw:c,tokens:n.inlineTokens(c)});const u=l.slice(1).join(`
|
|
152
152
|
`).trim();if(u){const p=n.blockTokens(u);d.push(...p)}let f=i+1;const h=[];for(;f<t.length&&t[f].indent>e;)h.push(t[f]),f+=1;if(h.length>0){const p=Math.min(...h.map(A=>A.indent)),m=bh(h,p,n);d.push({type:"list",ordered:!0,start:h[0].number,items:m,raw:h.map(A=>A.raw).join(`
|
|
153
|
-
`)})}o.push({type:"list_item",raw:s.raw,tokens:d}),i=f}else i+=1}return o}function
|
|
153
|
+
`)})}o.push({type:"list_item",raw:s.raw,tokens:d}),i=f}else i+=1}return o}function dE(t,e){return t.map(n=>{if(n.type!=="list_item")return e.parseChildren([n])[0];const r=[];return n.tokens&&n.tokens.length>0&&n.tokens.forEach(o=>{if(o.type==="paragraph"||o.type==="list"||o.type==="blockquote"||o.type==="code")r.push(...e.parseChildren([o]));else if(o.type==="text"&&o.tokens){const i=e.parseChildren([o]);r.push({type:"paragraph",content:i})}else{const i=e.parseChildren([o]);i.length>0&&r.push(...i)}}),{type:"listItem",content:r}})}var uE="listItem",Qc="textStyle",Wc=/^(\d+)\.\s$/,vh=Ae.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:null,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",te(this.options.HTMLAttributes,n),0]:["ol",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"list",parseMarkdown:(t,e)=>{if(t.type!=="list"||!t.ordered)return[];const n=t.start||1,r=t.items?dE(t.items,e):[];return n!==1?{type:"orderedList",attrs:{start:n},content:r}:{type:"orderedList",content:r}},renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
154
154
|
`):"",markdownTokenizer:{name:"orderedList",level:"block",start:t=>{const e=t.match(/^(\s*)(\d+)\.\s+/),n=e==null?void 0:e.index;return n!==void 0?n:-1},tokenize:(t,e,n)=>{var r;const o=t.split(`
|
|
155
|
-
`),[i,s]=
|
|
156
|
-
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(
|
|
157
|
-
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=ms(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=ms(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});oe.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(dh.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(uh.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(gh.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(vh.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(fE.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(hE.configure(this.options.taskList)),t}});var Fc=" ",pE=" ",mE=Ae.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",te(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===Fc||r[0].text===pE)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?Fc:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),AE=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,gE=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,bE=on.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[En({find:AE,type:this.type})]},addPasteRules(){return[en({find:gE,type:this.type})]}}),vE=Ae.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),yE=on.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",te(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!o)return;const i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),CE=oe.create({name:"starterKit",addExtensions(){var t,e,n,r;const o=[];return this.options.bold!==!1&&o.push(Hk.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(Rk.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(dh.configure(this.options.bulletList)),this.options.code!==!1&&o.push(Fk.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(Kk.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(Zk.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(K1.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(Z1.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(Yk.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(Xk.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(J1.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(Jk.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(tE.configure(this.options.italic)),this.options.listItem!==!1&&o.push(uh.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(gh.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&o.push(Jf.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&o.push(vh.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(mE.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(bE.configure(this.options.strike)),this.options.text!==!1&&o.push(vE.configure(this.options.text)),this.options.underline!==!1&&o.push(yE.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(X1.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),IE=CE;const kE=eI.extend({renderHTML({HTMLAttributes:t}){return["div",{class:"image-resizer"},["img",t]]}});function EE({content:t,maxlength:e,onUpdate:n}){return m1({extensions:[IE.configure({link:!1}),G1.configure({limit:e}),Ok.configure({types:["heading","paragraph"]}),MI.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),ch.configure({resizable:!0}),lh,ah,sh,kE],content:t,onUpdate:({editor:r})=>n==null?void 0:n(r),editorProps:{attributes:{class:"av--mx-sm av-px-sm av-py-xxs"},handleClick:(r,o,i)=>{const{schema:s}=r.state,c=r.state.doc.resolve(o).marks().find(d=>d.type===s.marks.link);return c?((i.ctrlKey||i.metaKey)&&window.open(c.attrs.href,"_blank"),!0):!1},handleKeyDown:(r,o)=>e&&r.state.doc.textContent.length>=e&&(o.key==="Enter"||o.key==="Return")?(o.preventDefault(),!0):!1}})}const ME={class:"av-rich-text-editor av-col av-gap-xxs","data-testid":"av-rich-text-editor"},wE={class:"av-rich-text-editor-wrapper"},NE={class:"av-px-sm"},xE={key:0,class:"caption-light","data-testid":"maxlength-caption"},SE=a.defineComponent({__name:"AvRichTextEditor",props:a.mergeModels({maxlength:{},editorLabel:{},toolbarLabel:{},undoLabel:{},redoLabel:{},paragraphLabel:{},headingLabel:{},boldLabel:{},italicLabel:{},underlineLabel:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},unsetLinkLabel:{},imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},removeImageLabel:{},insertTableLabel:{},tableSettingsLabel:{},deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},alignLeftLabel:{},alignCenterLabel:{},alignRightLabel:{},alignJustifyLabel:{},bulletListLabel:{},orderedListLabel:{},decreaseIndentLabel:{},increaseIndentLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},{modelValue:{},modelModifiers:{},charCount:{},charCountModifiers:{}}),emits:["update:modelValue","update:charCount"],setup(t){const e=a.createPropsRestProxy(t,["editorLabel","maxlength"]),n=a.useModel(t,"modelValue"),r=a.useModel(t,"charCount"),o=EE({content:n.value,onUpdate:i=>{n.value=i.getHTML(),r.value=i.storage.characterCount.characters()},maxlength:t.maxlength});return a.watch(()=>o.value,i=>{i&&r.value===void 0&&(r.value=i.storage.characterCount.characters())},{immediate:!0}),a.watch(()=>n.value,i=>{o.value&&o.value.getHTML()!==i&&o.value.commands.setContent(i??"",{emitUpdate:!1})}),(i,s)=>(a.openBlock(),a.createElementBlock("div",ME,[a.createElementVNode("div",wE,[a.createVNode(w1,a.mergeProps(e,{editor:a.unref(o)}),null,16,["editor"]),a.createElementVNode("div",NE,[a.createVNode(a.unref(p1),{editor:a.unref(o),role:"textbox","aria-multiline":"true","aria-label":t.editorLabel},null,8,["editor","aria-label"])])]),a.renderSlot(i.$slots,"maxLengthCaption",{currentValue:r.value,maxlength:t.maxlength},()=>[t.maxlength?(a.openBlock(),a.createElementBlock("span",xE,a.toDisplayString(r.value)+" / "+a.toDisplayString(t.maxlength),1)):a.createCommentVNode("",!0)],!0)]))}}),TE=z(SE,[["__scopeId","data-v-c6a60da2"]]),LE={class:"av-search-bar av-row av-align-end",role:"search"},DE=a.defineComponent({__name:"AvSearchBar",props:{id:{},label:{default:"Recherche"},modelValue:{default:""},placeholder:{default:"Rechercher..."},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","search"],setup(t,{emit:e}){const n=e,r=t.id??`search-bar-${crypto.randomUUID()}`;return(o,i)=>{const s=Ge,l=q;return a.openBlock(),a.createElementBlock("div",LE,[a.createElementVNode("div",null,[a.createVNode(s,{id:a.unref(r),type:"search","no-radius":"",placeholder:t.placeholder,"model-value":t.modelValue,label:t.label,disabled:t.disabled,"aria-disabled":t.disabled,"label-visible":!1,"onUpdate:modelValue":i[0]||(i[0]=c=>n("update:modelValue",(c==null?void 0:c.toString())??"")),onKeydown:i[1]||(i[1]=a.withKeys(c=>n("search",t.modelValue),["enter"]))},null,8,["id","placeholder","model-value","label","disabled","aria-disabled"])]),a.createVNode(l,{variant:"FLAT",label:t.label,"no-radius":"","icon-only":"",icon:a.unref(D).MAGNIFY,disabled:t.disabled,"aria-disabled":t.disabled,onClick:i[2]||(i[2]=c=>n("search",t.modelValue))},null,8,["label","icon","disabled","aria-disabled"])])}}}),Ta=z(DE,[["__scopeId","data-v-6cec7e33"]]),OE=["role"],BE={key:0,class:"av-list-item__icon av-col av-align-center av-justify-center"},RE={class:"av-list-item__content av-col av-gap-xs"},zE={key:2},PE=a.defineComponent({__name:"AvListItem",props:{icon:{},color:{default:"var(--text1)"},iconSize:{default:1.3125},iconColor:{},title:{},description:{},hoverBackgroundColor:{default:"var(--dark-background-primary1)"},colorOnHover:{default:"var(--card)"},descriptionColor:{default:"var(--text2)"},clickable:{type:Boolean},disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},onClick:{type:Function},ariaLabel:{},ariaDescribedby:{},tag:{},href:{},target:{},rel:{},role:{default:"listitem"},type:{default:"main"}},setup(t){a.useCssVars(p=>({v4b338753:p.colorOnHover,v73b02292:p.hoverBackgroundColor,v9bcf582c:p.color,v0ce72c40:p.descriptionColor}));const e=a.useSlots(),n=a.computed(()=>t.href||t.target||t.rel?"a":t.onClick?"button":"div"),r=a.computed(()=>n.value==="a"),o=a.computed(()=>n.value==="button"),i=a.computed(()=>r.value||o.value),s=a.computed(()=>t.ariaLabel?t.ariaLabel:t.title&&t.description?`${t.title}, ${t.description}`:t.title||t.description||void 0),l=a.computed(()=>i.value?"av-list-item--clickable":""),c=a.computed(()=>t.disabled&&o.value?"av-list-item--disabled":""),d=a.computed(()=>t.selected?"av-list-item--selected":""),u=a.computed(()=>`av-list-${t.type}item`);function f(p){var m;!i.value||t.disabled||(m=t.onClick)==null||m.call(t,p)}function h(p){var m;if(!(!i.value||t.disabled)&&(p.key==="Enter"||p.key===" ")){p.preventDefault();const A=new MouseEvent("click",{bubbles:!0,cancelable:!0});(m=t.onClick)==null||m.call(t,A)}}return(p,m)=>(a.openBlock(),a.createElementBlock("div",{role:t.role,class:a.normalizeClass(a.unref(u))},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(n)),{"aria-label":a.unref(i)?a.unref(s):void 0,"aria-describedby":t.ariaDescribedby,"aria-disabled":t.disabled&&a.unref(o)?"true":void 0,tabindex:a.unref(i)&&!t.disabled?0:void 0,class:a.normalizeClass(["av-list-item av-row av-align-center av-gap-xs av-w-full",[a.unref(l),a.unref(c),a.unref(d)]]),disabled:t.disabled&&a.unref(o)?!0:void 0,href:a.unref(r)?t.href:void 0,target:a.unref(r)?t.target:void 0,rel:a.unref(r)?t.rel:void 0,onClick:f,onKeydown:h},{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createElementBlock("div",BE,[a.createVNode(le,{name:t.icon,color:t.iconColor??t.color,size:t.iconSize},null,8,["name","color","size"])])):a.createCommentVNode("",!0),a.createElementVNode("div",RE,[t.title?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["av-list-item__title",t.type==="main"?"b2-bold":"b2-regular"])},a.toDisplayString(t.title),3)):a.createCommentVNode("",!0),t.description?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["av-list-item__description",t.type==="main"?"b1-bold":"b1-regular"])},a.toDisplayString(t.description),3)):a.createCommentVNode("",!0),e.default?(a.openBlock(),a.createElementBlock("div",zE,[a.renderSlot(p.$slots,"default",{},void 0,!0)])):a.createCommentVNode("",!0)])]),_:3},40,["aria-label","aria-describedby","aria-disabled","tabindex","class","disabled","href","target","rel"]))],10,OE))}}),gr=z(PE,[["__scopeId","data-v-02e7f4ab"]]),yh=a.defineComponent({__name:"AvCheckboxListItem",props:a.mergeModels({id:{},listId:{},label:{},icon:{},disabled:{type:Boolean},ariaLabel:{},ariaDescribedby:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue");function n(){return document.querySelectorAll(`[id^='${t.listId}-'][id$='-checkbox']`)}function r(l){l.preventDefault();const c=n(),d=document.activeElement,u=Array.from(c).indexOf(d);if(u!==-1){const f=(u+1)%c.length;c[f].focus()}}function o(l){l.preventDefault();const c=n(),d=document.activeElement,u=Array.from(c).indexOf(d);if(u!==-1){const f=(u-1+c.length)%c.length;c[f].focus()}}const i=a.ref(null);function s(){var c;const l=i.value;if(l){const d=l instanceof HTMLElement?l:l.$el;(c=d==null?void 0:d.scrollIntoView)==null||c.call(d,{block:"nearest"})}}return(l,c)=>{const d=gr;return a.openBlock(),a.createBlock(d,{ref_key:"listItemRef",ref:i,"aria-label":t.ariaLabel,"aria-describedby":t.ariaDescribedby,"data-testid":"av-checkbox-list-item"},{default:a.withCtx(()=>[a.createVNode(bd,{id:`${t.listId}-${t.id}-checkbox`,modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>e.value=u),value:t.id,name:`${t.listId}-${t.id}-checkbox`,label:t.label,icon:t.icon,disabled:t.disabled,onKeydown:[a.withKeys(r,["down"]),a.withKeys(r,["right"]),a.withKeys(o,["up"]),a.withKeys(o,["left"])],onFocus:s},{label:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),_:3},8,["id","modelValue","value","name","label","icon","disabled"])]),_:3},8,["aria-label","aria-describedby"])}}}),VE=["role","aria-label","aria-labelledby","aria-describedby"],jE=a.defineComponent({__name:"AvList",props:{backgroundColor:{default:"transparent"},borderColor:{default:"var(--stroke)"},borderRadius:{default:"0"},bordered:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},size:{default:"small"},padding:{default:"0"},ariaLabel:{},ariaLabelledby:{},ariaDescribedby:{},role:{default:"list"}},setup(t){a.useCssVars(o=>({befe11a4:o.backgroundColor,v6be6fbb6:o.borderRadius,v2530b52c:o.padding,fcd2c920:o.borderColor}));const e=a.computed(()=>`av-list--${t.size}`),n=a.computed(()=>t.bordered?"av-list--bordered":""),r=a.computed(()=>t.divided?"av-list--divided":"");return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-list av-col av-gap-xxxs",[a.unref(e),a.unref(n),a.unref(r)]]),role:t.role,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-describedby":t.ariaDescribedby},[a.renderSlot(o.$slots,"default",{},void 0,!0)],10,VE))}}),br=z(jE,[["__scopeId","data-v-2d433bb3"]]),HE={class:"av-tag-picker av-row av-gap-xs"},QE=a.defineComponent({__name:"AvTagPicker",props:{multiple:{type:Boolean},selected:{},handleSelectChange:{},options:{},label:{},labelColor:{default:"var(--text2)"},labelTypographyClass:{default:"b2-regular"}},setup(t){a.useCssVars(A=>({v507b02e0:a.unref(r)}));const e=t,{label:n,labelColor:r,labelTypographyClass:o,selected:i,multiple:s,handleSelectChange:l}=e,c=a.computed(()=>_c(e.options));function d(A){return A?Array.isArray(A)?A:[A]:[]}const u=a.ref(d(i));function f(A){return u.value.some(g=>g.value===A.value)}function h(A){s?(f(A)?u.value=u.value.filter(b=>b.value!==A.value):u.value.push(A),l([...u.value])):(u.value=[A],l(A))}function p(A){return f(A)?D.CHECK:void 0}function m(A){return f(A)&&!s}return a.watch(()=>e.selected,A=>{u.value=d(A)},{immediate:!0}),(A,g)=>(a.openBlock(),a.createElementBlock("div",HE,[a.unref(n)?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["av-tag-picker__label av-row av-align-center",[a.unref(o)]])},a.toDisplayString(a.unref(n)),3)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(c),b=>(a.openBlock(),a.createElementBlock("div",{key:b.value,class:"tag-wrapper av-row av-flex-fill"},[a.createVNode(Xc,{class:a.normalizeClass(["av-row av-align-center av-justify-center av-flex-fill av-py-xxs av-px-xs av-radius-md av-no-before av-no-after av-border-width-sm av-border-style-solid",{"av-tag--selected":f(b),"av-tag--disabled":m(b)}]),label:b.label,icon:p(b),disabled:m(b),selectable:"",selected:f(b),onSelect:()=>h(b)},null,8,["class","label","icon","disabled","selected","onSelect"])]))),128))]))}}),Ch=z(QE,[["__scopeId","data-v-a6241e22"]]);var La=(t=>(t[t.FOUR=4]="FOUR",t[t.EIGHT=8]="EIGHT",t[t.TWELVE=12]="TWELVE",t))(La||{});const WE=[4,8,12],FE={class:"pagination-size-picker-container av-row"},UE=a.defineComponent({__name:"AvPageSizePicker",props:{label:{},pageSizeSelected:{},handleSelectChange:{type:Function}},setup(t){const e=a.computed(()=>Object.values(La).filter(r=>typeof r=="number").map(r=>({label:r.toString(),value:r.toString()}))),n=a.computed(()=>({label:t.pageSizeSelected.toString(),value:t.pageSizeSelected.toString()}));return(r,o)=>(a.openBlock(),a.createElementBlock("div",FE,[a.createVNode(Ch,{options:a.unref(e),selected:a.unref(n),"handle-select-change":t.handleSelectChange,multiple:!1,label:t.label,"label-typography-class":"b2-regular","label-color":"var(--text2)"},null,8,["options","selected","handle-select-change","label"])]))}}),Ih=a.defineComponent({__name:"AvRadioButton",props:{value:{type:[String,Number,Boolean]},label:{},description:{},disabled:{type:Boolean}},setup(t){return(e,n)=>a.renderSlot(e.$slots,"default")}}),qE=["name","value","checked","disabled"],KE=a.defineComponent({__name:"RadioButton",props:{value:{type:[String,Number,Boolean]},modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},name:{default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,r=`av-radio-button-${crypto.randomUUID()}`;return(o,i)=>{const s=Bs;return a.openBlock(),a.createBlock(s,{inline:t.inline,disabled:t.disabled},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["av-radio-group av-row av-align-center av-gap-xs",{"av-radio-group--sm":t.small}])},[a.createElementVNode("input",a.mergeProps({id:r,type:"radio",name:t.name,value:t.value,checked:t.modelValue===t.value,disabled:t.disabled},o.$attrs,{onClick:i[0]||(i[0]=l=>n("update:modelValue",t.value))}),null,16,qE),a.createElementVNode("label",{for:r,class:"av-label av-p-none"},[a.renderSlot(o.$slots,"default",{},void 0,!0)])],2)]),_:3},8,["inline","disabled"])}}}),ZE=z(KE,[["__scopeId","data-v-40eab3c4"]]),YE=a.defineComponent({__name:"AvRadioButtonSet",props:{id:{},name:{},legend:{default:""},modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},errorMessage:{},validMessage:{},hint:{default:""}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=n,o=a.computed(()=>t.id??`radio-button-set-${crypto.randomUUID()}`),i=a.computed(()=>t.errorMessage||t.validMessage);function s(p){p!==t.modelValue&&r("update:modelValue",p)}const l=a.computed(()=>i.value?`messages-${o.value}`:void 0),c=a.useSlots();function d(p){return p!=null&&typeof p=="object"&&"type"in p&&p.type===Ih}function u(p){return p?p.flatMap(m=>!m||typeof m!="object"||!("type"in m)?[]:m.type===a.Fragment&&Array.isArray(m.children)?u(m.children):d(m)?[m]:[]):[]}const f=a.computed(()=>{var p;return u((p=c.default)==null?void 0:p.call(c))}),h=a.ref(t.modelValue);return a.watch(()=>t.modelValue,p=>{h.value=p}),a.watch(h,p=>{p&&r("update:modelValue",p)}),e({selected:h}),(p,m)=>{const A=Os;return a.openBlock(),a.createBlock(A,{id:a.unref(o),legend:t.legend,hint:t.hint,required:t.required,disabled:t.disabled,"aria-labelledby":a.unref(o),"aria-describedby":a.unref(l),role:t.errorMessage||t.validMessage?"group":void 0,"error-message":t.errorMessage,"success-message":t.validMessage,inline:t.inline},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(f),(g,b)=>{var v,y;return a.openBlock(),a.createBlock(ZE,{key:b,modelValue:a.unref(h),"onUpdate:modelValue":[m[0]||(m[0]=C=>a.isRef(h)?h.value=C:null),m[1]||(m[1]=C=>s(C))],value:(v=g.props)==null?void 0:v.value,disabled:((y=g.props)==null?void 0:y.disabled)??t.disabled,small:t.small,inline:t.inline,name:t.name},{default:a.withCtx(()=>{var C;return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent((C=g.children)==null?void 0:C.default)))]}),_:2},1032,["modelValue","value","disabled","small","inline","name"])}),128))]),_:1},8,["id","legend","hint","required","disabled","aria-labelledby","aria-describedby","role","error-message","success-message","inline"])}}});var Vt=(t=>(t.LOADING="loading",t.NO_OPTIONS="no-options",t.HAS_OPTIONS="has-options",t))(Vt||{});const kh=Symbol("AvAutocompleteContext");function Da(){const t=a.inject(kh);if(!t)throw new Error("useAutocompleteContext must be used within AvAutocomplete component");return t}var XE=typeof global=="object"&&global&&global.Object===Object&&global,JE=typeof self=="object"&&self&&self.Object===Object&&self,Eh=XE||JE||Function("return this")(),qo=Eh.Symbol,Mh=Object.prototype,GE=Mh.hasOwnProperty,$E=Mh.toString,Vn=qo?qo.toStringTag:void 0;function _E(t){var e=GE.call(t,Vn),n=t[Vn];try{t[Vn]=void 0;var r=!0}catch{}var o=$E.call(t);return r&&(e?t[Vn]=n:delete t[Vn]),o}var eM=Object.prototype,tM=eM.toString;function nM(t){return tM.call(t)}var rM="[object Null]",oM="[object Undefined]",Uc=qo?qo.toStringTag:void 0;function iM(t){return t==null?t===void 0?oM:rM:Uc&&Uc in Object(t)?_E(t):nM(t)}function sM(t){return t!=null&&typeof t=="object"}var aM="[object Symbol]";function lM(t){return typeof t=="symbol"||sM(t)&&iM(t)==aM}var cM=/\s/;function dM(t){for(var e=t.length;e--&&cM.test(t.charAt(e)););return e}var uM=/^\s+/;function fM(t){return t&&t.slice(0,dM(t)+1).replace(uM,"")}function Ds(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var qc=NaN,hM=/^[-+]0x[0-9a-f]+$/i,pM=/^0b[01]+$/i,mM=/^0o[0-7]+$/i,AM=parseInt;function Kc(t){if(typeof t=="number")return t;if(lM(t))return qc;if(Ds(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ds(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=fM(t);var n=pM.test(t);return n||mM.test(t)?AM(t.slice(2),n?2:8):hM.test(t)?qc:+t}var Ki=function(){return Eh.Date.now()},gM="Expected a function",bM=Math.max,vM=Math.min;function wh(t,e,n){var r,o,i,s,l,c,d=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(gM);e=Kc(e)||0,Ds(n)&&(u=!!n.leading,f="maxWait"in n,i=f?bM(Kc(n.maxWait)||0,e):i,h="trailing"in n?!!n.trailing:h);function p(N){var S=r,O=o;return r=o=void 0,d=N,s=t.apply(O,S),s}function m(N){return d=N,l=setTimeout(b,e),u?p(N):s}function A(N){var S=N-c,O=N-d,I=e-S;return f?vM(I,i-O):I}function g(N){var S=N-c,O=N-d;return c===void 0||S>=e||S<0||f&&O>=i}function b(){var N=Ki();if(g(N))return v(N);l=setTimeout(b,A(N))}function v(N){return l=void 0,h&&r?p(N):(r=o=void 0,s)}function y(){l!==void 0&&clearTimeout(l),d=0,r=c=o=l=void 0}function C(){return l===void 0?s:v(Ki())}function k(){var N=Ki(),S=g(N);if(r=arguments,o=this,c=N,S){if(l===void 0)return m(c);if(f)return clearTimeout(l),l=setTimeout(b,e),p(c)}return l===void 0&&(l=setTimeout(b,e)),s}return k.cancel=y,k.flush=C,k}const yM={key:0,class:"av-row av-align-center av-justify-center av-gap-xs av-p-md av-text-text2","data-testid":"av-autocomplete-dropdown__loading"},CM={key:1,class:"av-autocomplete-dropdown__empty av-p-md"},IM={key:1,class:"av-autocomplete-dropdown__empty-text av-text-text2"},kM=a.defineComponent({__name:"AvAutocompleteDropdown",emits:["loadMore"],setup(t,{expose:e,emit:n}){const r=n,o=a.useSlots(),{selectedItems:i,searchQuery:s,isOpen:l,props:c,getOptionId:d,getDisplayLabel:u}=Da(),f=a.ref(),h=a.ref(),p=a.computed(()=>{if(!c.options)return[];if(c.serverSideFiltering)return c.maxResults?c.options.slice(0,c.maxResults):c.options;const y=s.value.toLowerCase().trim();if(!y){const k=c.options;return c.maxResults?k.slice(0,c.maxResults):k}let C;return c.filterOptions?C=c.filterOptions(c.options,y):C=c.options.filter(k=>u(k).toLowerCase().includes(y)),c.maxResults?C.slice(0,c.maxResults):C}),m=a.computed(()=>c.loading?Vt.LOADING:l.value&&c.options&&c.options.length>0&&p.value.length>0?Vt.HAS_OPTIONS:Vt.NO_OPTIONS);function A(y){return i.value.some(C=>d(C)===d(y))}function g(y){if(!c.multiSelect){i.value=[y],l.value=!1,s.value="";return}const C=i.value,k=d(y);C.some(S=>d(S)===k)?i.value=C.filter(S=>d(S)!==k):i.value=[...C,y]}const{arrivedState:b}=Kp(h,{throttle:100}),v=wh(()=>{r("loadMore")},c.loadMoreThrottleDelay);return a.watch(()=>b.bottom,y=>{c.enableLoadMore&&y&&l.value&&v()}),a.onUnmounted(()=>{v.cancel()}),e({dropdownRef:f}),(y,C)=>a.unref(l)?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:f,class:a.normalizeClass(["av-autocomplete-dropdown av-mt-xxxs av-radius-lg",a.unref(c).dropdownClass]),style:a.normalizeStyle({width:a.unref(c).dropdownWidth,maxHeight:a.unref(c).maxDropdownHeight})},[a.unref(m)===a.unref(Vt).LOADING?(a.openBlock(),a.createElementBlock("div",yM,[a.createVNode(le,{name:a.unref(D).LOADING,size:1.5,animation:"spin"},null,8,["name"]),C[0]||(C[0]=a.createElementVNode("span",{class:"av-autocomplete-dropdown__loading-text av-text-text2"},"Loading...",-1))])):a.unref(m)===a.unref(Vt).NO_OPTIONS?(a.openBlock(),a.createElementBlock("div",CM,[o.empty?a.renderSlot(y.$slots,"empty",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock("div",IM," No results found "))])):(a.openBlock(),a.createBlock(br,a.mergeProps({key:2,ref_key:"listRef",ref:h},a.unref(c).listOptions,{class:["av-autocomplete-dropdown__options",a.unref(c).scrollbarClass]}),{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(p),k=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:a.unref(d)(k)},[o.item?a.renderSlot(y.$slots,"item",{key:0,option:k,isSelected:A(k),toggle:()=>g(k)},void 0,!0):(a.openBlock(),a.createBlock(gr,{key:1,title:a.unref(u)(k),icon:A(k)?a.unref(D).CHECK:void 0,selected:A(k),"hover-background-color":"var(--light-background-neutral)","color-on-hover":"var(--base)",onClick:()=>g(k)},null,8,["title","icon","selected","onClick"]))],64))),128))]),_:3},16,["class"]))],6)):a.createCommentVNode("",!0)}}),EM=z(kM,[["__scopeId","data-v-f8f9ad11"]]),MM={class:"av-autocomplete-input"},wM=a.defineComponent({__name:"AvAutocompleteInput",emits:["search","clear"],setup(t,{expose:e,emit:n}){const r=n,o=a.useSlots(),{selectedItems:i,searchQuery:s,isOpen:l,props:c,inputId:d,handleBlur:u,getDisplayLabel:f}=Da(),h=a.ref(),p=a.computed(()=>{if(!c.multiSelect&&i.value.length>0)return f(i.value[0]);if(c.multiSelect){if(!c.displaySelectionInInput)return s.value;if(i.value.length>0)return c.showSelectedSection?c.selectedItemsCountLabel:i.value.map(f).join(", ")}return s.value}),m=a.computed(()=>{var y;return((y=c.inputOptions)==null?void 0:y.placeholder)||"Search..."}),A=wh(y=>{s.value=y,r("search",y)},c.debounceDelay);function g(y){s.value=String(y||""),A(s.value)}function b(){l.value=!0}function v(){i.value=[],s.value="",r("clear")}return a.onUnmounted(()=>{A.cancel()}),e({inputRef:h,searchQuery:a.computed(()=>s.value)}),(y,C)=>(a.openBlock(),a.createElementBlock("div",MM,[a.createVNode(Ge,a.mergeProps({id:a.unref(d),ref_key:"inputRef",ref:h,"model-value":a.unref(p),placeholder:a.unref(m)},a.unref(c).inputOptions,{"onUpdate:modelValue":g,onFocus:b,onBlur:a.unref(u),onClick:b}),a.createSlots({_:2},[o.requiredTip?{name:"requiredTip",fn:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.requiredTip)))]),key:"0"}:void 0,a.unref(i).length>0?{name:"suffix",fn:a.withCtx(()=>[a.createVNode(q,{label:"Clear selected items",icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"","icon-scale":1.25,variant:"DEFAULT",theme:"SECONDARY",small:"",onClick:v},null,8,["icon"])]),key:"1"}:void 0]),1040,["id","model-value","placeholder","onBlur"])]))}}),NM=z(wM,[["__scopeId","data-v-5b57a510"]]),xM={key:0,class:"av-autocomplete-selected-tags av-row av-wrap av-gap-xs av-mt-xs"},SM=a.defineComponent({__name:"AvAutocompleteSelectedTags",setup(t){const e=a.useSlots(),{selectedItems:n,props:r,getOptionId:o,getDisplayLabel:i}=Da();function s(l){const c=n.value,d=o(l);n.value=c.filter(u=>o(u)!==d)}return(l,c)=>a.unref(r).multiSelect&&a.unref(n).length>0&&a.unref(r).showSelectedSection?(a.openBlock(),a.createElementBlock("div",xM,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),d=>(a.openBlock(),a.createElementBlock("div",{key:a.unref(o)(d),class:"av-autocomplete-selected-tags__item"},[e.selectedItem?a.renderSlot(l.$slots,"selectedItem",{key:0,option:d,remove:()=>s(d)},void 0,!0):(a.openBlock(),a.createBlock(q,{key:1,label:a.unref(i)(d),icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-right":"",size:"sm",variant:"OUTLINED",theme:"SECONDARY",onClick:()=>s(d)},null,8,["label","icon","onClick"]))]))),128))])):a.createCommentVNode("",!0)}}),TM=z(SM,[["__scopeId","data-v-19df692b"]]),LM={class:"av-autocomplete av-col av-gap-xxs"},DM=a.defineComponent({__name:"AvAutocomplete",props:a.mergeModels({id:{},inputOptions:{default:()=>({})},options:{},multiSelect:{type:Boolean,default:!1},getOptionLabel:{},getOptionKey:{},filterOptions:{},dropdownWidth:{default:"100%"},maxDropdownHeight:{default:"20rem"},listOptions:{default:()=>({size:"small",ariaLabel:"Available options list"})},scrollbarClass:{default:"av-autocomplete__scrollbar--default"},dropdownClass:{default:"av-autocomplete__dropdown--default"},loading:{type:Boolean,default:!1},debounceDelay:{default:300},maxResults:{},enableLoadMore:{type:Boolean,default:!1},showSelectedSection:{type:Boolean,default:!1},displaySelectionInInput:{type:Boolean,default:!0},blurCloseDelay:{default:150},loadMoreThrottleDelay:{default:200},serverSideFiltering:{type:Boolean,default:!1},selectedItemsCountLabel:{default:"element(s) selected"}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:a.mergeModels(["search","loadMore","clear"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=e,o=a.useSlots(),i=a.useModel(t,"modelValue"),s=a.ref(!1),l=a.ref(""),c=a.ref(),d=a.ref(),u=a.ref(),f=a.computed(()=>n.id||`av-autocomplete-${crypto.randomUUID()}`);function h(v){l.value=v,r("search",v)}function p(v){var y,C;(C=(y=u.value)==null?void 0:y.dropdownRef)!=null&&C.contains(v.relatedTarget)||setTimeout(()=>{s.value=!1},n.blurCloseDelay)}function m(v){return n.getOptionKey?n.getOptionKey(v):v.value}function A(v){return n.getOptionLabel?n.getOptionLabel(v):v.label}const g={selectedItems:i,searchQuery:l,isOpen:s,props:n,inputId:f,handleBlur:p,getOptionId:m,getDisplayLabel:A};a.provide(kh,g);function b(v){var k,N,S,O,I;const y=v.target,C=(k=d.value)==null?void 0:k.inputRef;!((N=C==null?void 0:C.contains)!=null&&N.call(C,y))&&!((S=c.value)!=null&&S.contains(y))&&!((I=(O=u.value)==null?void 0:O.dropdownRef)!=null&&I.contains(y))&&(s.value=!1)}return a.onMounted(()=>{document.addEventListener("click",b)}),a.onUnmounted(()=>{document.removeEventListener("click",b)}),(v,y)=>(a.openBlock(),a.createElementBlock("div",LM,[a.createElementVNode("div",{ref_key:"wrapperRef",ref:c,class:"av-autocomplete__wrapper"},[a.createVNode(NM,{ref_key:"inputRef",ref:d,onSearch:h,onClear:y[0]||(y[0]=C=>r("clear"))},a.createSlots({_:2},[o.requiredTip?{name:"requiredTip",fn:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.requiredTip)))]),key:"0"}:void 0]),1536),a.createVNode(EM,{ref_key:"dropdownRef",ref:u,onLoadMore:y[1]||(y[1]=C=>r("loadMore"))},a.createSlots({_:2},[o.item?{name:"item",fn:a.withCtx(({option:C,isSelected:k,toggle:N})=>[a.renderSlot(v.$slots,"item",{option:C,isSelected:k,toggle:N},void 0,!0)]),key:"0"}:void 0,o.empty?{name:"empty",fn:a.withCtx(()=>[a.renderSlot(v.$slots,"empty",{},void 0,!0)]),key:"1"}:void 0]),1536)],512),a.createVNode(TM,null,a.createSlots({_:2},[o.selectedItem?{name:"selectedItem",fn:a.withCtx(({option:C,remove:k})=>[a.renderSlot(v.$slots,"selectedItem",{option:C,remove:k},void 0,!0)]),key:"0"}:void 0]),1024)]))}}),OM=z(DM,[["__scopeId","data-v-4a146ea2"]]),BM=["id"],RM=["id"],zM={key:0,class:"av-btns-group"},PM={key:1},VM={key:2},jM="label",HM=a.defineComponent({__name:"MultiselectCollapse",props:a.mergeModels({isVisible:{type:Boolean},selected:{},options:{},hint:{default:"Utilisez la tabulation (ou les touches flèches) pour naviguer dans la liste des suggestions"},id:{},selectAll:{type:Boolean,default:!1},search:{type:Boolean,default:!1},selectAllLabel:{default:()=>["Tout sélectionner","Tout désélectionner"]},noResultLabel:{default:"Pas de résultat"},maxHeight:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:a.mergeModels(["close"],["update:modelValue"]),setup(t,{emit:e}){a.useCssVars(A=>({ef3bd9be:A.maxHeight}));const n=e;function r(A,g){return`${g}-${A.value}`}const o=a.ref(null),i=a.ref(null);let s=!1;const l=a.useModel(t,"modelValue"),c=a.ref(0),d=a.ref("");function u(A){if(s){s=!1;return}const g=A.target,b=o.value&&o.value.$el?o.value.$el:null,v=i.value;b&&b.contains(g)||v&&v.contains(g)||n("close")}function f(){document.removeEventListener("click",u)}a.watch(()=>t.isVisible,A=>{A?a.nextTick(()=>{s=!0,document.addEventListener("click",u)}):f()});const h=a.computed(()=>t.options.filter(A=>typeof A=="object"&&A!==null?`${A[jM]}`.toLowerCase().includes(d.value.toLowerCase()):`${A}`.toLowerCase().includes(d.value.toLowerCase()))),p=a.computed(()=>t.selected.length<h.value.length?!1:h.value.every(A=>t.selected.includes(A)));function m(){const A=new Set(l.value||[]);p.value?h.value.forEach(g=>{A.delete(g.value)}):h.value.forEach(g=>{A.add(g.value)}),l.value=Array.from(A)}return a.onUnmounted(()=>{f()}),(A,g)=>{const b=q,v=Ge,y=yh,C=br;return t.isVisible?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${t.id}-collapse`,ref_key:"collapse",ref:i,style:a.normalizeStyle({"--width-host":`${a.unref(c)}px`}),class:"av-multiselect__collapse","data-testid":"av-multiselect__collapse"},[a.createElementVNode("p",{id:`${t.id}-text-hint`,class:"av-sr-only"},a.toDisplayString(t.hint),9,RM),t.selectAll?(a.openBlock(),a.createElementBlock("ul",zM,[a.createElementVNode("li",null,[a.createVNode(b,{name:"select-all",size:"sm",disabled:a.unref(h).length===0,label:t.selectAllLabel[a.unref(p)?1:0],icon:a.unref(p)?a.unref(D).CLOSE_CIRCLE_OUTLINE:a.unref(D).CHECK_CIRCLE_OUTLINE,onClick:m},null,8,["disabled","label","icon"])])])):a.createCommentVNode("",!0),t.search?(a.openBlock(),a.createElementBlock("div",PM,[a.createVNode(v,{modelValue:a.unref(d),"onUpdate:modelValue":g[0]||(g[0]=k=>a.isRef(d)?d.value=k:null),"aria-describedby":`${t.id}-text-hint`,"aria-controls":`${t.id}-checkboxes`,"prefix-icon":a.unref(D).MAGNIFY,"aria-live":"polite",placeholder:"Rechercher",type:"search"},null,8,["modelValue","aria-describedby","aria-controls","prefix-icon"])])):a.createCommentVNode("",!0),a.createVNode(C,{"background-color":"var(--dialog)",bordered:"","border-color":"var(--stroke)","border-radius":"var(--radius-lg)",size:"xsmall",class:"multiselect-collapse-options-list"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(h),k=>(a.openBlock(),a.createBlock(y,{id:k.value.toString(),key:`${r(k,t.id)}-fieldset`,modelValue:l.value,"onUpdate:modelValue":g[1]||(g[1]=N=>l.value=N),"list-id":"multiselect-collapse-options-list","aria-label":k.label,label:k.label,icon:k.icon},null,8,["id","modelValue","aria-label","label","icon"]))),128))]),_:1}),a.unref(h).length===0?(a.openBlock(),a.createElementBlock("div",VM,a.toDisplayString(t.noResultLabel),1)):a.createCommentVNode("",!0)],12,BM)):a.createCommentVNode("",!0)}}}),QM=z(HM,[["__scopeId","data-v-a4a72bfa"]]),WM=["title"],FM=["for"],UM={class:"b2-light"},qM={key:0,class:"required"},KM={key:1,class:"av-hint-text"},ZM=a.defineComponent({__name:"AvMultiselect",props:a.mergeModels({disabled:{type:Boolean},id:{},hint:{default:""},collapseHint:{default:"Utilisez la tabulation (ou les touches flèches) pour naviguer dans la liste des suggestions"},label:{},labelVisible:{type:Boolean,default:!0},labelClass:{default:""},options:{default:()=>[]},successMessage:{default:""},errorMessage:{default:""},placeholder:{},dense:{type:Boolean},selectedText:{},selectAll:{type:Boolean,default:!1},selectAllLabel:{default:()=>["Tout sélectionner","Tout désélectionner"]},search:{type:Boolean,default:!1},width:{},height:{},collapseMaxHeight:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){a.useCssVars(b=>({v2df2483e:b.width,v1e05a66c:b.height}));const e=a.useModel(t,"modelValue"),n=a.computed(()=>t.id??`multi-select-${crypto.randomUUID()}`),r=a.ref(null),o=a.computed(()=>t.errorMessage||t.successMessage),i=a.computed(()=>t.errorMessage?"error":"success"),s=a.computed(()=>e.value.map(b=>b.value)),l=a.computed(()=>e.value.length===0?t.placeholder:t.selectedText),c=a.ref(!1);function d(b){b.key==="Escape"&&f()}function u(){c.value=!0,document.addEventListener("keydown",d)}function f(){c.value=!1,p()}async function h(){c.value?f():u()}function p(){document.removeEventListener("keydown",d)}function m(b){var y;const v=((y=t.options)==null?void 0:y.filter(C=>b.includes(C.value)))??[];e.value=v}a.onUnmounted(()=>{p()});const A=a.computed(()=>["av-label",{invisible:!t.labelVisible},t.labelClass]),g=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));return(b,v)=>{const y=q,C=wn;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["av-select-group",{[`av-select-group--${a.unref(i)}`]:a.unref(o)}]),title:a.unref(l)},[a.createElementVNode("label",{class:a.normalizeClass(a.unref(A)),for:a.unref(n)},[a.createElementVNode("span",UM,a.toDisplayString(t.label),1),"required"in b.$attrs&&b.$attrs.required!==!1?(a.openBlock(),a.createElementBlock("span",qM)):a.createCommentVNode("",!0),t.hint?(a.openBlock(),a.createElementBlock("span",KM,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],10,FM),a.createVNode(y,a.mergeProps({id:a.unref(n),ref_key:"host",ref:r,type:"button",variant:"OUTLINED"},b.$attrs,{label:a.unref(l),class:["av-multiselect",{"av-multiselect--is-open":a.unref(c),"av-multiselect--dense":t.dense,"av-multiselect--unselected":e.value.length===0,"av-multiselect--selected":e.value.length>0}],disabled:t.disabled,"aria-expanded":a.unref(c),"aria-controls":`${a.unref(n)}-collapse`,small:t.dense,style:a.unref(g),onClick:h}),null,16,["id","label","disabled","aria-expanded","aria-controls","class","small","style"]),a.createVNode(QM,{id:a.unref(n),modelValue:a.unref(s),"onUpdate:modelValue":[v[0]||(v[0]=k=>a.isRef(s)?s.value=k:null),m],hint:t.collapseHint,"is-visible":a.unref(c),"select-all":t.selectAll,"select-all-label":t.selectAllLabel,search:t.search,options:t.options,selected:e.value,"max-height":t.collapseMaxHeight,onClose:f},null,8,["id","modelValue","hint","is-visible","select-all","select-all-label","search","options","selected","max-height"])],10,WM),a.createVNode(C,{"message-id":`multiselect-${a.unref(i)}-desc-${a.unref(i)}`,type:a.unref(i),message:a.unref(o)},null,8,["message-id","type","message"])],64)}}}),YM=z(ZM,[["__scopeId","data-v-f8a90d5f"]]),XM={key:0,class:"av-select-prefix av-align-center av-col av-text-text2"},JM=["for"],GM={key:0,class:"required"},$M={key:1,class:"av-hint-text"},_M=["id","value","name","disabled","aria-disabled","required","aria-required","aria-describedby","title"],ew={disabled:"",value:"",hidden:""},tw=["label","data-testid"],nw=["value","disabled","aria-disabled"],rw=["value","disabled","aria-disabled"],ow=a.defineComponent({__name:"AvSelect",props:a.mergeModels({required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{},name:{default:""},hint:{default:""},label:{default:""},options:{default:()=>[]},successMessage:{default:""},errorMessage:{default:""},placeholder:{},dense:{type:Boolean,default:!1},prefixIcon:{}},{selectedItem:{default:()=>({itemId:""})},selectedItemModifiers:{}}),emits:["update:selectedItem"],setup(t){const e=a.useModel(t,"selectedItem"),n=a.computed(()=>String(e.value.itemId??"")),r=t.id??`select-${crypto.randomUUID()}`,o=a.computed(()=>{if(!n.value)return t.placeholder;const h=d(n.value);return h?h.label:t.placeholder}),i=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`})),s=a.computed(()=>t.errorMessage||t.successMessage),l=a.computed(()=>t.errorMessage?"error":"success");function c(h){return Array.isArray(h.children)}function d(h){for(const p of t.options){if(c(p)&&p.children){const m=p.children.find(A=>String(A.id)===h);if(m)return m}if(String(p.id)===h)return p}}function u(h){for(const p of t.options){if(c(p)&&p.children){const m=p.children.find(A=>String(A.id)===h);if(m)return{itemId:m.id,parentId:p.id}}if(String(p.id)===h)return{itemId:p.id}}return{itemId:h}}function f(h){const p=h.target.value;e.value=u(p)}return(h,p)=>{const m=wn;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"av-select--dense":t.dense})},[a.createElementVNode("div",{class:a.normalizeClass(["av-select-group",{[`av-select-group--${a.unref(l)}`]:a.unref(s)}])},[a.createElementVNode("div",{class:a.normalizeClass(["av-select-control",{"av-select-control--disabled":t.disabled}])},[t.prefixIcon?(a.openBlock(),a.createElementBlock("div",XM,[a.createVNode(le,{name:t.prefixIcon,size:1.2},null,8,["name"])])):a.createCommentVNode("",!0),a.createElementVNode("label",{class:"av-label b2-light",for:a.unref(r)},[a.createElementVNode("span",null,a.toDisplayString(t.label),1),t.required?(a.openBlock(),a.createElementBlock("span",GM," *")):a.createCommentVNode("",!0),t.hint?(a.openBlock(),a.createElementBlock("span",$M,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],8,JM),a.createElementVNode("select",a.mergeProps({id:a.unref(r),value:a.unref(n),class:[{[`av-select--${a.unref(l)}`]:a.unref(s),"av-select--with-prefix av-pl-xl":t.prefixIcon,"av-py-xxs":t.dense,"av-py-xs":!t.dense},"av-select b2-light av-w-full av-pr-xl av-pl-sm av-text-text2 av-radius-lg"],name:t.name||a.unref(r),disabled:t.disabled,"aria-disabled":t.disabled,required:t.required,"aria-required":t.required,"aria-describedby":a.unref(s)?`${a.unref(r)}-${a.unref(l)}`:void 0,title:a.unref(o)},h.$attrs,{style:a.unref(i),onChange:f}),[a.createElementVNode("option",ew,a.toDisplayString(t.placeholder),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.options,(A,g)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:g},[c(A)&&A.children?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[A.children.length>0?(a.openBlock(),a.createElementBlock("optgroup",{key:0,label:A.label,"data-testid":`select-optgroup-${A.id}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(A.children,(b,v)=>(a.openBlock(),a.createElementBlock("option",{key:`${g}-${v}`,value:b.id,disabled:b.disabled,"aria-disabled":b.disabled},a.toDisplayString(b.label),9,nw))),128))],8,tw)):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock("option",{key:1,value:A.id,disabled:A.disabled,"aria-disabled":A.disabled},a.toDisplayString(A.label),9,rw))],64))),128))],16,_M)],2),a.createVNode(m,{"message-id":`${a.unref(r)}-${a.unref(l)}`,message:a.unref(s),type:a.unref(l)},null,8,["message-id","message","type"])],2)],2)}}}),iw=z(ow,[["__scopeId","data-v-574bbbf6"]]),sw=a.defineComponent({__name:"AvTab",props:{title:{},icon:{}},setup(t){return(e,n)=>a.renderSlot(e.$slots,"default")}}),aw=["id","aria-labelledby","tabindex"],lw=a.defineComponent({__name:"TabContent",props:{panelId:{},tabId:{},isVisible:{type:Boolean}},setup(t){return(e,n)=>a.withDirectives((a.openBlock(),a.createElementBlock("div",{id:t.panelId,class:a.normalizeClass(["av-tab-content",{"av-tab-content--selected":t.isVisible}]),role:"tabpanel","aria-labelledby":t.tabId,tabindex:t.isVisible?0:-1},[a.renderSlot(e.$slots,"default",{},void 0,!0)],10,aw)),[[a.vShow,t.isVisible]])}}),cw=z(lw,[["__scopeId","data-v-3bab28a1"]]),dw=["id","tabindex","aria-selected","aria-controls"],uw=a.defineComponent({inheritAttrs:!1,__name:"TabItem",props:{panelId:{},tabId:{},isSelected:{type:Boolean},title:{},icon:{},compact:{type:Boolean,default:!1}},emits:["click","next","previous","first","last"],setup(t,{emit:e}){const n=e,r=a.useTemplateRef("button"),o=a.computed(()=>t.isSelected?"s2-bold":"s2-regular"),i={ArrowRight:"next",ArrowLeft:"previous",Home:"first",End:"last"};function s(l){const c=l==null?void 0:l.key,d=i[c];if(d)switch(d){case"next":n("next");break;case"previous":n("previous");break;case"first":n("first");break;case"last":n("last");break}}return a.watch(()=>t.isSelected,()=>{var l;t.isSelected&&((l=r.value)==null||l.focus())}),(l,c)=>{const d=le;return a.openBlock(),a.createElementBlock("li",{class:a.normalizeClass(["av-tab-item av-py-xs",{"av-tab-item--compact av-no-before":t.compact,"av-flex-fill av-w-full":!t.compact}]),role:"presentation"},[a.createElementVNode("button",a.mergeProps(l.$attrs,{id:t.tabId,ref:"button",class:["av-tab-item__tab av-row av-gap-xs av-align-center av-justify-center av-text-text2 av-w-full",{"av-tab-item--compact__tab av-radius-none av-m-none av-py-xs av-px-2xl":t.compact,"av-radius-lg":!t.compact}],tabindex:t.isSelected?0:-1,role:"tab",type:"button","aria-selected":t.isSelected,"aria-controls":t.panelId,onClick:c[0]||(c[0]=a.withModifiers(u=>n("click",t.tabId),["prevent"])),onKeydown:c[1]||(c[1]=u=>s(u))}),[t.icon?(a.openBlock(),a.createBlock(d,{key:0,name:t.icon,size:2},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(a.unref(o))},a.toDisplayString(t.title),3)],16,dw)],2)}}}),fw=z(uw,[["__scopeId","data-v-0ad74b1b"]]);function hw(t,e,n){const r=a.ref({"--tabs-height":"100px"});function o(){if(n.value<0||!t.value||!t.value.offsetHeight)return;const i=t.value.offsetHeight,s=e.value[n.value];if(!s||!s.offsetHeight)return;const l=s.offsetHeight;r.value["--tabs-height"]=`${i+l}px`}return{tabsStyle:r,updateTabsStyle:o}}const pw=["aria-label"],mw=a.defineComponent({__name:"AvTabs",props:a.mergeModels({ariaLabel:{},compact:{type:Boolean,default:!1}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.useSlots(),n=a.computed(()=>{var g;return((g=e.default)==null?void 0:g.call(e))||[]}),r=a.useModel(t,"modelValue"),o=a.ref(null),i=a.ref(null),s=a.reactive({}),{tabsStyle:l,updateTabsStyle:c}=hw(i,a.computed(()=>{var g;return Array.from(((g=o.value)==null?void 0:g.querySelectorAll(".av-tab-content"))||[])}),r);function d(g){if(s[g])return s[g];const b=`tab-${crypto.randomUUID()}`;return s[g]=b,b}function u(g){const b=n.value.length;r.value=(r.value+g+b)%b}function f(){u(-1)}function h(){u(1)}function p(){r.value=0}function m(){r.value=n.value.length-1}const A=a.ref(null);return a.onMounted(()=>{var g;window.ResizeObserver&&(A.value=new window.ResizeObserver(()=>{c()})),(g=o.value)==null||g.querySelectorAll(".av-tab-content").forEach(b=>{var v;b&&((v=A.value)==null||v.observe(b))})}),a.onUnmounted(()=>{var g,b;(g=o.value)==null||g.querySelectorAll(".av-tab-content").forEach(v=>{var y;v&&((y=A.value)==null||y.unobserve(v))}),(b=A.value)==null||b.disconnect()}),(g,b)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"$el",ref:o,class:a.normalizeClass(["av-tabs",{"av-tabs--compact":t.compact}]),style:a.normalizeStyle(a.unref(l))},[a.createElementVNode("ul",{ref_key:"tablist",ref:i,class:a.normalizeClass(["av-tabs__list av-row av-px-xs av-py-none av-align-center av-gap-sm av-list-reset av-radius-lg",{"av-tabs__list--compact":t.compact,"av-w-full":!t.compact}]),role:"tablist","aria-label":t.ariaLabel??"Liste d’onglets"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),(v,y)=>{var C,k,N;return a.openBlock(),a.createBlock(fw,{key:y,"tab-id":d(y),"panel-id":`${d(y)}-panel`,title:(C=v.props)==null?void 0:C.title,icon:(k=v.props)==null?void 0:k.icon,"data-testid":(N=v.props)==null?void 0:N["data-testid"],compact:t.compact,"is-selected":r.value===y,onClick:S=>r.value=y,onNext:h,onPrevious:f,onFirst:p,onLast:m},null,8,["tab-id","panel-id","title","icon","data-testid","compact","is-selected","onClick"])}),128))],10,pw),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),(v,y)=>(a.openBlock(),a.createBlock(cw,{key:y,"panel-id":`${d(y)}-panel`,"tab-id":d(y),"is-visible":r.value===y},{default:a.withCtx(()=>[r.value===y?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(v.children.default),{key:0})):a.createCommentVNode("",!0)]),_:2},1032,["panel-id","tab-id","is-visible"]))),128))],6))}}),Aw=z(mw,[["__scopeId","data-v-28c0db9a"]]),gw="data:image/svg+xml,%3csvg%20width='35'%20height='20'%20viewBox='0%200%2035%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.6'%20y='3'%20width='34'%20height='14'%20rx='7'%20fill='%23D4D4EC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M24.5%2020C30.0228%2020%2034.5%2015.5228%2034.5%2010C34.5%204.47715%2030.0228%200%2024.5%200C18.9772%200%2014.5%204.47715%2014.5%2010C14.5%2015.5228%2018.9772%2020%2024.5%2020Z'%20fill='%23000091'/%3e%3c/svg%3e",bw="data:image/svg+xml,%3csvg%20width='34'%20height='20'%20viewBox='0%200%2034%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20y='3'%20width='34'%20height='14'%20rx='7'%20fill='%2314171A'%20fill-opacity='0.36'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%2020C15.5228%2020%2020%2015.5228%2020%2010C20%204.47715%2015.5228%200%2010%200C4.47715%200%200%204.47715%200%2010C0%2015.5228%204.47715%2020%2010%2020Z'%20fill='%23F6F6F6'/%3e%3cpath%20d='M10%200.5C15.2467%200.5%2019.5%204.75329%2019.5%2010C19.5%2015.2467%2015.2467%2019.5%2010%2019.5C4.75329%2019.5%200.5%2015.2467%200.5%2010C0.5%204.75329%204.75329%200.5%2010%200.5Z'%20stroke='%2314171A'%20stroke-opacity='0.36'/%3e%3c/svg%3e",vw=["id","for"],yw={width:"34",height:"14"},Cw=["href"],Iw={key:0,class:"caption-bold no-select"},kw={key:1,class:"caption-regular no-select"},Ew={class:"caption-regular"},Mw=["id","disabled","aria-disabled","checked","data-testid","aria-describedby","name"],ww=a.defineComponent({__name:"AvToggle",props:{modelValue:{type:Boolean},description:{},id:{},disabled:{type:Boolean},activeText:{default:"On"},inactiveText:{default:"Off"},name:{}},emits:["update:modelValue"],setup(t){const e=a.computed(()=>t.id??`toggle-${crypto.randomUUID()}`),n=a.computed(()=>`${e.value}-label`);return(r,o)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("label",{id:a.unref(n),for:a.unref(e),class:a.normalizeClass(["av-toggle av-row av-justify-center av-gap-xs av-align-start",{"av-toggle--disabled":t.disabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["toggle av-row av-justify-center av-align-center av-gap-xxs",{"toggle--disabled":t.disabled}])},[(a.openBlock(),a.createElementBlock("svg",yw,[a.createElementVNode("image",{href:t.modelValue?a.unref(gw):a.unref(bw),width:"34",height:"14"},null,8,Cw)])),t.modelValue?(a.openBlock(),a.createElementBlock("span",Iw,a.toDisplayString(t.activeText),1)):(a.openBlock(),a.createElementBlock("span",kw,a.toDisplayString(t.inactiveText),1))],2),a.createElementVNode("span",Ew,a.toDisplayString(t.description),1)],10,vw),a.createElementVNode("input",{id:a.unref(e),style:{display:"none"},disabled:t.disabled,"aria-disabled":t.disabled,type:"checkbox",checked:t.modelValue,"data-testid":a.unref(e),"aria-describedby":a.unref(n),name:t.name,onInput:o[0]||(o[0]=i=>r.$emit("update:modelValue",i.target.checked))},null,40,Mw)],64))}}),Nw=z(ww,[["__scopeId","data-v-49a101c1"]]),xn=a.defineComponent({inheritAttrs:!1,__name:"AvCancelConfirmButtons",props:{cancelLabel:{},cancelIcon:{default:()=>D.CLOSE_CIRCLE_OUTLINE},cancelDisabled:{type:Boolean},cancelIsLoading:{type:Boolean},confirmLabel:{},confirmIcon:{default:()=>D.CHECK_CIRCLE_OUTLINE},confirmDisabled:{type:Boolean},confirmIsLoading:{type:Boolean},iconOnly:{type:Boolean,default:!1},form:{}},emits:["cancel","confirm"],setup(t,{emit:e}){const n=e,r=a.useAttrs();return(o,i)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({class:"av-cancel-confirm-buttons-container av-row av-gap-sm"},a.unref(r)),[t.cancelLabel?(a.openBlock(),a.createBlock(a.unref(q),{key:0,icon:t.cancelIcon,label:t.cancelLabel,title:t.cancelLabel,variant:"OUTLINED","is-loading":t.cancelIsLoading,disabled:t.cancelDisabled,"icon-only":t.iconOnly,small:"","data-testid":"cancel-button",onClick:i[0]||(i[0]=s=>n("cancel"))},null,8,["icon","label","title","is-loading","disabled","icon-only"])):a.createCommentVNode("",!0),t.confirmLabel?(a.openBlock(),a.createBlock(a.unref(q),{key:1,icon:t.confirmIcon,label:t.confirmLabel,title:t.confirmLabel,variant:"FLAT","is-loading":t.confirmIsLoading,disabled:t.confirmDisabled,type:t.form?"submit":void 0,form:t.form,"icon-only":t.iconOnly,small:"","data-testid":"confirm-button",onClick:i[1]||(i[1]=s=>n("confirm"))},null,8,["icon","label","title","is-loading","disabled","type","form","icon-only"])):a.createCommentVNode("",!0)],16))}}),xw={class:"av-row av-justify-end"},Sw={class:"av-header__menu-drawer"},Tw={class:"av-header__menu-drawer-links av-col"},Lw=a.defineComponent({__name:"HeaderMenuDrawer",props:{showDrawer:{type:Boolean},quickLinks:{},languageSelectorRef:{},quickLinksAriaLabel:{},closeLabel:{}},emits:["languageSelect","close","quickLinkClick"],setup(t){return(e,n)=>{const r=xn,o=Qs,i=Vs,s=Ps;return a.openBlock(),a.createBlock(s,{show:t.showDrawer,padding:"var(--spacing-sm)",width:"75%","data-testid":"header-menu-drawer",onEscapePressed:n[3]||(n[3]=l=>e.$emit("close"))},{default:a.withCtx(()=>[a.createElementVNode("div",xw,[a.createVNode(r,{"cancel-label":t.closeLabel,"cancel-icon":a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"",onCancel:n[0]||(n[0]=l=>e.$emit("close"))},null,8,["cancel-label","cancel-icon"])]),a.createElementVNode("div",Sw,[a.createElementVNode("div",Tw,[t.languageSelectorRef?(a.openBlock(),a.createBlock(o,a.mergeProps({key:0},t.languageSelectorRef,{onSelect:n[1]||(n[1]=l=>e.$emit("languageSelect",l))}),null,16)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"before-quick-links",{},void 0,!0),a.createVNode(i,{role:"navigation",links:t.quickLinks,"nav-aria-label":t.quickLinksAriaLabel,"data-testid":"header-menu-drawer-links",onLinkClick:n[2]||(n[2]=l=>e.$emit("quickLinkClick"))},null,8,["links","nav-aria-label"]),a.renderSlot(e.$slots,"after-quick-links",{},void 0,!0)]),a.renderSlot(e.$slots,"mainnav",{},void 0,!0)])]),_:3},8,["show"])}}}),Dw=z(Lw,[["__scopeId","data-v-61c30f71"]]),Ow={class:"av-row av-justify-end"},Bw=a.defineComponent({__name:"HeaderSearchDrawer",props:{showDrawer:{type:Boolean},searchLabel:{},modelValue:{},placeholder:{},closeLabel:{}},emits:["update:modelValue","search","close"],setup(t){return(e,n)=>{const r=xn,o=Ta,i=Ps;return a.openBlock(),a.createBlock(i,{show:t.showDrawer,padding:"var(--spacing-sm)",width:"75%","data-testid":"header-search-drawer",onEscapePressed:n[3]||(n[3]=s=>e.$emit("close"))},{default:a.withCtx(()=>[a.createElementVNode("div",Ow,[a.createVNode(r,{"cancel-label":t.closeLabel,"cancel-icon":a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"",onCancel:n[0]||(n[0]=s=>e.$emit("close"))},null,8,["cancel-label","cancel-icon"])]),a.createVNode(o,{"model-value":t.modelValue,label:t.searchLabel,placeholder:t.placeholder,"onUpdate:modelValue":n[1]||(n[1]=s=>e.$emit("update:modelValue",s)),onSearch:n[2]||(n[2]=s=>e.$emit("search",s))},null,8,["model-value","label","placeholder"])]),_:1},8,["show"])}}}),Rw={class:"av-header__tools av-hidden av-unhidden--lg av-align-end--lg av-col--lg av-pl-sm--lg av-pr-md--lg"},zw={class:"av-header__tools-links av-row--lg av-justify-end--lg av-align-center--lg av-gap-xs--lg av-pb-sm--lg"},Pw={key:0,class:"av-header__search"},Vw=a.defineComponent({__name:"HeaderToolbar",props:{modelValue:{},placeholder:{},quickLinks:{},languageSelectorRef:{},searchLabel:{},quickLinksAriaLabel:{},showSearch:{type:Boolean}},emits:["languageSelect","update:modelValue","search"],setup(t,{emit:e}){const n=e;return(r,o)=>{var i;return a.openBlock(),a.createElementBlock("div",Rw,[a.createElementVNode("div",zw,[a.renderSlot(r.$slots,"before-quick-links",{},void 0,!0),(i=t.quickLinks)!=null&&i.length?(a.openBlock(),a.createBlock(Vs,{key:0,links:t.quickLinks,"nav-aria-label":t.quickLinksAriaLabel},null,8,["links","nav-aria-label"])):a.createCommentVNode("",!0),a.renderSlot(r.$slots,"after-quick-links",{},void 0,!0),t.languageSelectorRef?(a.openBlock(),a.createBlock(Qs,a.mergeProps({key:1},t.languageSelectorRef,{onSelect:o[0]||(o[0]=s=>n("languageSelect",s))}),null,16)):a.createCommentVNode("",!0)]),t.showSearch?(a.openBlock(),a.createElementBlock("div",Pw,[a.createVNode(Ta,{label:t.searchLabel,"model-value":t.modelValue,placeholder:t.placeholder,"onUpdate:modelValue":o[1]||(o[1]=s=>n("update:modelValue",s)),onSearch:o[2]||(o[2]=s=>n("search",s))},null,8,["label","model-value","placeholder"])])):a.createCommentVNode("",!0)])}}}),jw=z(Vw,[["__scopeId","data-v-6cb8a173"]]),Oa=Symbol("header"),Hw={role:"banner",class:"av-header"},Qw={class:"av-header__body"},Ww={class:"av-container"},Fw={class:"av-row av-justify-start av-align-center av-py-sm"},Uw={class:"av-header__menu av-hidden av-unhidden--lg av-mt-sm"},qw={key:0,class:"av-container av-header__mainnav"},Kw=a.defineComponent({__name:"AvHeader",props:{homeTo:{default:"/"},modelValue:{default:""},placeholder:{default:"Rechercher..."},quickLinks:{default:()=>[]},languageSelector:{default:()=>{}},searchLabel:{default:"Recherche"},quickLinksAriaLabel:{default:"Menu secondaire"},showSearch:{type:Boolean,default:!1},showSearchLabel:{default:"Recherche"},menuLabel:{default:"Menu"},closeDrawerLabel:{default:"Fermer"},homeLabel:{}},emits:["languageSelect","update:modelValue","search"],setup(t,{emit:e}){const n=e,r=a.useSlots(),o=a.toRef(()=>t.languageSelector),i=a.ref("closed");function s(){i.value="closed"}function l(f){f.key==="Escape"&&s()}a.onMounted(()=>{document.addEventListener("keydown",l)}),a.onUnmounted(()=>{document.removeEventListener("keydown",l)});function c(){i.value="menu"}function d(){i.value="search"}const u=a.computed(()=>!!r.mainnav);return a.provide(Oa,()=>s),(f,h)=>(a.openBlock(),a.createElementBlock("header",Hw,[a.createElementVNode("div",Qw,[a.createElementVNode("div",Ww,[a.createElementVNode("div",Fw,[a.createVNode(xp,{"home-to":t.homeTo,title:t.homeLabel,"show-search-button":t.showSearch,"show-search-label":t.showSearchLabel,"show-menu-button":a.unref(u)||t.quickLinks.length>0,"show-menu-label":t.menuLabel,onShowSearchDrawer:d,onShowMenuDrawer:c},{roleContext:a.withCtx(()=>[a.renderSlot(f.$slots,"roleContext",{},void 0,!0)]),_:3},8,["home-to","title","show-search-button","show-search-label","show-menu-button","show-menu-label"]),a.createVNode(jw,{"model-value":t.modelValue,placeholder:t.placeholder,"quick-links":t.quickLinks,"language-selector-ref":a.unref(o),"search-label":t.searchLabel,"quick-links-aria-label":t.quickLinksAriaLabel,"show-search":t.showSearch,"onUpdate:modelValue":h[0]||(h[0]=p=>n("update:modelValue",p)),onSearch:h[1]||(h[1]=p=>n("search",p)),onLanguageSelect:h[2]||(h[2]=p=>n("languageSelect",p))},{"before-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"before-quick-links",{},void 0,!0)]),"after-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"after-quick-links",{},void 0,!0)]),_:3},8,["model-value","placeholder","quick-links","language-selector-ref","search-label","quick-links-aria-label","show-search"])]),a.renderSlot(f.$slots,"default",{},void 0,!0)])]),a.createElementVNode("div",Uw,[a.unref(i)==="closed"?(a.openBlock(),a.createElementBlock("div",qw,[a.renderSlot(f.$slots,"mainnav",{},void 0,!0)])):a.createCommentVNode("",!0)]),a.createVNode(Bw,{"show-drawer":a.unref(i)==="search","search-label":t.searchLabel,"close-label":t.closeDrawerLabel,"model-value":t.modelValue,placeholder:t.placeholder,"data-testid":"header-search-drawer",onClose:s,"onUpdate:modelValue":h[3]||(h[3]=p=>n("update:modelValue",p)),onSearch:h[4]||(h[4]=p=>n("search",p))},null,8,["show-drawer","search-label","close-label","model-value","placeholder"]),a.createVNode(Dw,{"show-drawer":a.unref(i)==="menu","quick-links":t.quickLinks,"language-selector-ref":a.unref(o),"close-label":t.closeDrawerLabel,"quick-links-aria-label":t.quickLinksAriaLabel,"data-testid":"header-menu-drawer",onClose:s,onQuickLinkClick:s,onLanguageSelect:h[5]||(h[5]=p=>n("languageSelect",p))},{"before-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"before-quick-links",{},void 0,!0)]),"after-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"after-quick-links",{},void 0,!0)]),mainnav:a.withCtx(()=>[a.renderSlot(f.$slots,"mainnav",{},void 0,!0)]),_:3},8,["show-drawer","quick-links","language-selector-ref","close-label","quick-links-aria-label"])]))}}),Zw=z(Kw,[["__scopeId","data-v-25c5666c"]]),Yw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 106.703 44.429"};function Xw(t,e){return a.openBlock(),a.createElementBlock("svg",Yw,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"M33.63 110.595q-.883.002-1.403.293a1.95 1.95 0 0 0-.781.783 3.1 3.1 0 0 0-.34 1.087q-.08.597-.08 1.21.001.499.091 1.086.09.589.374 1.098.283.506.792.85.51.339 1.347.339t1.347-.34q.51-.341.78-.85.271-.508.363-1.096.09-.588.09-1.087 0-.498-.09-1.087a3.4 3.4 0 0 0-.363-1.097 2.3 2.3 0 0 0-.78-.85q-.51-.339-1.347-.339m-5.296 3.394q0-1.425.294-2.547c.196-.744.51-1.38.94-1.898a4.2 4.2 0 0 1 1.64-1.2q.997-.422 2.422-.42 1.493.046 2.67.678.498.274.985.702.487.43.86 1.076.373.645.61 1.528.24.882.24 2.06 0 1.175-.216 2.06a6.2 6.2 0 0 1-.565 1.517 4.37 4.37 0 0 1-1.71 1.74q-1.086.613-2.49.634a4.6 4.6 0 0 1-1.357-.292 4.3 4.3 0 0 1-1.155-.724q-.588-.502-.973-1.45l.498.657v5.386h-2.693zM45.625 110.595q-.837 0-1.347.339-.51.338-.78.85a3.4 3.4 0 0 0-.363 1.097 7 7 0 0 0-.09 1.087q0 .499.09 1.086.09.589.362 1.098.273.506.781.85.51.339 1.347.339t1.347-.34q.51-.341.78-.85.271-.508.363-1.096.09-.588.09-1.087 0-.498-.09-1.087a3.4 3.4 0 0 0-.363-1.097 2.3 2.3 0 0 0-.78-.85q-.51-.339-1.347-.339m-5.364 3.373q0-1.178.227-2.06.225-.883.6-1.528.372-.646.859-1.076.487-.427.984-.702c.785-.42 1.683-.649 2.694-.677.996.028 1.885.257 2.67.677q.499.274.985.702.488.43.86 1.076.374.645.611 1.528c.159.589.239 1.273.239 2.06q0 1.175-.239 2.06a6.2 6.2 0 0 1-.61 1.517q-.375.632-.86 1.051a5.7 5.7 0 0 1-.985.688q-1.178.615-2.671.635-1.516-.02-2.694-.635-.497-.27-.984-.688a4.2 4.2 0 0 1-.86-1.05 5.9 5.9 0 0 1-.6-1.518q-.225-.884-.226-2.06M52.347 111.57q0-1.18.497-1.846c.333-.444.695-.783 1.087-1.009a3.9 3.9 0 0 1 1.584-.497h3.17v2.737h-2.128q-.453 0-.736.159-.283.158-.442.342-.18.222-.249.498v7.74h-2.783zM62.78 110.913v5.045q.07.275.25.497.158.184.442.342.282.159.735.159h1.72v2.738h-2.761a3.9 3.9 0 0 1-1.584-.498q-.59-.337-1.076-1.009-.487-.665-.486-1.845v-11.2h2.76v3.076h2.604v2.695zM72.558 110.595q-.838 0-1.347.339-.51.338-.78.85a3.4 3.4 0 0 0-.363 1.097 7 7 0 0 0-.09 1.087q0 .499.09 1.086.09.589.362 1.098.271.506.781.85.51.339 1.347.339t1.347-.34q.51-.341.792-.85t.373-1.096.09-1.087q0-.613-.079-1.21a3.2 3.2 0 0 0-.339-1.087 1.96 1.96 0 0 0-.781-.783q-.52-.292-1.403-.293m5.296 9.099h-2.693v-1.584l.498-.657q-.385.948-.974 1.45a4.3 4.3 0 0 1-1.154.723q-.656.25-1.358.293-1.404-.02-2.49-.635a4.8 4.8 0 0 1-.917-.688 4.4 4.4 0 0 1-.791-1.05 6.2 6.2 0 0 1-.566-1.518q-.215-.885-.215-2.06 0-1.179.226-2.06.226-.883.6-1.528.374-.646.86-1.076.487-.427.984-.702c.784-.42 1.683-.649 2.694-.677.95 0 1.758.137 2.421.42a4.2 4.2 0 0 1 1.642 1.2q.645.779.939 1.897.293 1.123.294 2.547zM82.086 108.218v11.476h-2.761v-11.476zm-2.761-2.558q0-.497.01-.744c.008-.166.053-.29.137-.364q.123-.112.408-.123a22 22 0 0 1 1.651 0q.284.012.408.123c.082.074.128.198.136.364q.01.247.01.744 0 .498-.01.748-.012.248-.136.363-.125.112-.408.124-.282.01-.826.01-.543 0-.825-.01-.285-.012-.408-.124-.126-.115-.136-.363-.01-.25-.011-.748M86.409 104.415v15.279h-2.761v-15.28z",style:{fill:"#ed184e","fill-opacity":"1","fill-rule":"nonzero",stroke:"none","stroke-width":".0352778"},transform:"translate(20.294 -79.068)"},null,-1),a.createElementVNode("path",{d:"M-7.05 88.543v-2.07c-.042-2.414-.677-3.176-2.877-3.176-2.75 0-2.623 2.117-2.623 4.273v.973zm-11.001-.635c-.254-5.627 2.623-8.84 8.04-8.84 7.658 0 8.462 3.975 8.462 10.491v3.218H-12.55v3.467c.042 3.133 1.226 3.726 2.876 3.726 2.032 0 2.624-1.482 2.54-4.488h5.5c.212 5.334-1.989 8.718-7.616 8.718-6.347 0-8.928-3.003-8.801-10.026zM6.498 95.606v1.68c0 1.364.443 2.567 2.22 2.567 1.3 0 1.87-1.17 1.87-2.377 0-1.997-1.649-2.76-3.108-3.648-1.712-.98-3.17-1.902-4.217-3.108-1.015-1.203-1.618-2.664-1.618-4.756 0-4.473 2.696-6.755 7.01-6.755 4.851 0 7.324 3.235 7.07 7.708H10.59c-.064-1.397 0-3.299-1.84-3.426-1.142-.095-1.808.54-1.934 1.584-.159 1.43.57 2.16 1.68 2.918 2.094 1.333 3.902 2.159 5.201 3.362 1.3 1.206 2.062 2.79 2.062 5.676 0 4.569-2.537 7.105-7.167 7.105-5.107 0-7.263-2.854-7.263-5.994v-2.536zM18.202 79.78h5.58v17.95c0 1.143.35 2.123 1.936 2.123 1.459 0 1.902-1.266 1.902-2.282V79.78h5.582v17.218c0 4.03-1.808 7.137-7.516 7.137-4.725 0-7.484-2.25-7.484-7.137zM41.959 90.025c1.046-.032 2.251.095 3.139-.603.57-.635.697-1.588.697-2.41 0-.92-.095-2.318-1.046-2.759-.539-.19-1.3-.19-2.188-.19h-.602Zm-5.582 13.54V79.78h6.628c2.156 0 5.265.19 6.818 1.965 1.3 1.46 1.554 3.235 1.554 5.172 0 2.568-.602 5.454-3.14 6.625-1.934.953-4.185.667-6.278.762v9.26zM-.829 110.698c6.226-2.653 13.474-2.755 18.015-.755 4.673 1.965 5.629 4.963 5.558 4.861.038-.032-2.698-.748-6.348-.176-3.67.472-8.091 2.317-13.293 4.483-1.086.448-3.113 1.306-4.954 1.61-1.847.398-3.718.387-5.407.21a17.95 17.95 0 0 1-8.026-2.934c-3.85-2.632-4.992-5.51-5.01-5.475-.015-.018 2.773.769 6.675 1.02 1.938.126 4.122.056 6.191-.396 1.034-.23 2.059-.476 3.046-.903 1.04-.37 1.78-.8 3.553-1.545",style:{fill:"#3871c1","fill-opacity":"1","fill-rule":"nonzero",stroke:"none","stroke-width":".0352778"},transform:"translate(20.294 -79.068)"},null,-1)])])}const Jw={render:Xw},Gw={class:"svg-wrapper av-p-xxxs"},$w=a.defineComponent({__name:"EsupLogo",props:{width:{},height:{},color:{}},setup(t){a.useCssVars(n=>({v1854cb30:n.color}));const e=a.computed(()=>({...t.width&&{width:t.width},...t.height&&{height:t.height}}));return(n,r)=>(a.openBlock(),a.createElementBlock("div",Gw,[a.createVNode(a.unref(Jw),a.mergeProps(a.unref(e),{class:"logo",role:"img","aria-label":"Logo Esup Portail"}),null,16)]))}}),_w=z($w,[["__scopeId","data-v-b032c39a"]]),eN=["aria-label"],tN=["id"],nN={key:0,class:"av-breadcrumb__list av-list-reset"},rN=["aria-current"],oN=a.defineComponent({__name:"AvBreadcrumb",props:{id:{},links:{},navigationLabel:{default:"Fil d'Ariane"},showBreadcrumbLabel:{default:"Voir le fil d'Ariane"}},setup(t){const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o}=Ko(),{isAboveMd:i}=js(),s=t.id??`breadcrumb-${crypto.randomUUID()}`,l=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_RIGHT})`})),c=a.ref(i.value);return a.watch(c,(d,u)=>{d!==u&&o(d)}),a.watch(i,d=>{c.value=d}),a.onMounted(()=>{o(c.value)}),(d,u)=>{const f=q,h=a.resolveComponent("RouterLink");return t.links&&t.links.length?(a.openBlock(),a.createElementBlock("nav",{key:0,role:"navigation","aria-label":t.navigationLabel,class:"av-breadcrumb"},[a.unref(c)?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,"aria-expanded":a.unref(c),"aria-controls":a.unref(s),class:"av-breadcrumb__button",label:t.showBreadcrumbLabel,small:"","no-sentence-case":"",onClick:u[0]||(u[0]=p=>c.value=!a.unref(c))},null,8,["aria-expanded","aria-controls","label"])),a.createElementVNode("div",{id:a.unref(s),ref_key:"collapse",ref:e,class:a.normalizeClass(["av-collapse",{"av-collapse--expanded":a.unref(r),"av-collapsing":a.unref(n)}])},[a.unref(c)?(a.openBlock(),a.createElementBlock("ol",nN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(p,m)=>(a.openBlock(),a.createElementBlock("li",{key:m,class:"av-breadcrumb__item",style:a.normalizeStyle(a.unref(l))},[p.to?(a.openBlock(),a.createBlock(h,{key:0,"aria-current":m===t.links.length-1?"page":void 0,class:"b2-regular av-breadcrumb__link av-p-none",to:p.to},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.text),1)]),_:2},1032,["aria-current","to"])):(a.openBlock(),a.createElementBlock("a",{key:1,"aria-current":m===t.links.length-1?"page":void 0,class:"b2-regular av-breadcrumb__link av-p-none"},a.toDisplayString(p.text),9,rN))],4))),128))])):a.createCommentVNode("",!0)],10,tN)],8,eN)):a.createCommentVNode("",!0)}}}),iN=z(oN,[["__scopeId","data-v-524dc659"]]),sN=["id","aria-current"],aN=a.defineComponent({__name:"NavigationItem",props:{id:{},active:{type:Boolean}},setup(t){const e=a.computed(()=>t.id??`nav-item-${crypto.randomUUID()}`);return(n,r)=>(a.openBlock(),a.createElementBlock("li",{id:a.unref(e),class:a.normalizeClass(["av-nav__item",{"av-nav__item--active":t.active}]),"aria-current":t.active?"page":void 0},[a.renderSlot(n.$slots,"default",{},void 0,!0)],10,sN))}}),lN=z(aN,[["__scopeId","data-v-94f974c7"]]),cN=["id","aria-current"],dN=a.defineComponent({__name:"NavigationMenuItem",props:{id:{},active:{type:Boolean}},setup(t){const e=a.computed(()=>t.id??`nav-menu-item-${crypto.randomUUID()}`);return(n,r)=>(a.openBlock(),a.createElementBlock("li",{id:a.unref(e),class:"av-menu__item","aria-current":t.active?"page":void 0},[a.renderSlot(n.$slots,"default",{},void 0,!0)],8,cN))}}),uN=z(dN,[["__scopeId","data-v-fe85d2ff"]]),fN=["href"],hN={class:"b1-regular"},pN={class:"b1-regular"},mN=a.defineComponent({__name:"NavigationMenuLink",props:{id:{},activeId:{},to:{default:"#"},text:{default:""},icon:{},onClick:{type:Function,default:()=>{}}},emits:["toggleId"],setup(t){const e=t.id??`menu-link-${crypto.randomUUID()}`,n=a.computed(()=>typeof t.to=="string"&&t.to.startsWith("http")),r=a.hasInjectionContext()?a.inject(Oa):void 0,o=r==null?void 0:r();return(i,s)=>{const l=le,c=a.resolveComponent("RouterLink");return a.unref(n)?(a.openBlock(),a.createElementBlock("a",{key:0,class:a.normalizeClass(["av-nav__link av-row av-justify-start av-gap-xs",{"av-nav__link--active":t.activeId===a.unref(e)}]),"data-testid":"nav-external-link",href:t.to,onClick:s[0]||(s[0]=d=>{i.$emit("toggleId",a.unref(e)),t.onClick(d)})},[a.createElementVNode("span",hN,a.toDisplayString(t.text),1)],10,fN)):(a.openBlock(),a.createBlock(c,{key:1,class:"av-nav__link av-row av-justify-start av-gap-xs","data-testid":"nav-router-link",to:t.to,onClick:s[1]||(s[1]=d=>{var u;(u=a.unref(o))==null||u(),i.$emit("toggleId",a.unref(e)),t.onClick(d)})},{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createBlock(l,{key:0,name:t.icon,size:1.5},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",pN,a.toDisplayString(t.text),1)]),_:1},8,["to"]))}}}),Nh=z(mN,[["__scopeId","data-v-0827070a"]]),AN=["aria-expanded","aria-current","aria-controls"],gN=["id"],bN={class:"av-menu__list"},vN=a.defineComponent({__name:"NavigationMenu",props:{id:{},title:{},links:{},expandedId:{},active:{type:Boolean}},emits:["toggleId"],setup(t){const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o,onTransitionEnd:i}=Ko(),s=a.computed(()=>t.id??`menu-${crypto.randomUUID()}`),l=a.computed(()=>s.value===t.expandedId),c=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));return a.watch(l,(d,u)=>{d!==u&&o(d)}),a.onMounted(()=>{l.value&&o(!0)}),(d,u)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{class:"av-nav__btn","aria-expanded":a.unref(l),"aria-current":t.active||void 0,"aria-controls":a.unref(s),style:a.normalizeStyle(a.unref(c)),onClick:u[0]||(u[0]=f=>d.$emit("toggleId",a.unref(s)))},[a.createElementVNode("span",null,a.toDisplayString(t.title),1)],12,AN),a.createElementVNode("div",{id:a.unref(s),ref_key:"collapse",ref:e,class:a.normalizeClass(["av-collapse av-menu",{"av-collapse--expanded":a.unref(r),"av-collapsing":a.unref(n)}]),"data-testid":"navigation-menu",onTransitionend:u[2]||(u[2]=f=>a.unref(i)(a.unref(l)))},[a.createElementVNode("ul",bN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(f,h)=>(a.openBlock(),a.createBlock(uN,{key:h},{default:a.withCtx(()=>[a.createVNode(Nh,a.mergeProps({ref_for:!0},f,{onToggleId:u[1]||(u[1]=p=>d.$emit("toggleId",t.expandedId))}),null,16)]),_:2},1024))),128))])],42,gN)],64))}}),yN=z(vN,[["__scopeId","data-v-2a650c01"]]),CN={style:{position:"relative"},class:"my-nav-wrapper"},IN=["id","aria-label"],kN={class:"av-nav__list"},EN=a.defineComponent({__name:"AvNavigation",props:{id:{},label:{default:"Menu principal"},navItems:{}},setup(t){const e=t.id??`nav-${crypto.randomUUID()}`,n=a.ref(void 0);function r(l){if(l===n.value){n.value=void 0;return}n.value=l}function o(l){if(l!==document.getElementById(e)){if(!(l!=null&&l.parentNode)){r(n.value);return}o(l.parentNode)}}function i(l){o(l.target)}function s(l){l.key==="Escape"&&r(n.value)}return a.onMounted(()=>{document.addEventListener("click",i),document.addEventListener("keydown",s)}),a.onUnmounted(()=>{document.removeEventListener("click",i),document.removeEventListener("keydown",s)}),(l,c)=>(a.openBlock(),a.createElementBlock("div",CN,[a.createElementVNode("nav",{id:a.unref(e),class:"av-nav",role:"navigation","aria-label":t.label},[a.createElementVNode("ul",kN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.navItems,(d,u)=>(a.openBlock(),a.createBlock(lN,{key:u},{default:a.withCtx(()=>[d.to&&d.text?(a.openBlock(),a.createBlock(Nh,a.mergeProps({key:0,ref_for:!0},d,{"active-id":a.unref(n),onToggleId:c[0]||(c[0]=f=>r(f))}),null,16,["active-id"])):d.title&&d.links?(a.openBlock(),a.createBlock(yN,a.mergeProps({key:1,ref_for:!0},d,{"expanded-id":a.unref(n),onToggleId:c[1]||(c[1]=f=>r(f))}),null,16,["expanded-id"])):a.createCommentVNode("",!0)]),_:2},1024))),128))])],8,IN)]))}}),MN=["aria-label"],wN={class:"av-pagination__list av-row av-row-wrap av-align-center av-gap-sm av-list-reset"},NN={key:0},xN={class:"b2-regular"},SN=["href","title","aria-disabled"],TN={class:"av-sr-only"},LN=["href","title","aria-disabled"],DN={key:0,class:"caption-regular av-hidden av-unhidden-md"},ON=["href","title","aria-current","data-testid","onClick"],BN={key:0},RN={key:1},zN=["href","title","aria-disabled"],PN={key:0,class:"caption-regular av-hidden av-unhidden-md"},VN=["href","title","aria-disabled"],jN={class:"av-sr-only"},HN=a.defineComponent({__name:"AvPagination",props:{compact:{type:Boolean,default:!1},pages:{},currentPage:{default:0},firstPageLabel:{},lastPageLabel:{},nextPageLabel:{},prevPageLabel:{},compactCurrentPageLabel:{},truncLimit:{default:2},ariaLabel:{}},emits:["update:current-page"],setup(t,{emit:e}){const n=e,r=a.computed(()=>Math.min(t.pages.length-1-t.truncLimit,Math.max(t.currentPage-(t.truncLimit-t.truncLimit%2)/2,0))),o=a.computed(()=>Math.min(t.pages.length-1,r.value+t.truncLimit)),i=a.computed(()=>t.pages.length>t.truncLimit?t.pages.slice(r.value,o.value+1):t.pages),s=a.computed(()=>t.pages.length>0),l=m=>n("update:current-page",m),c=m=>l(m),d=()=>c(0),u=()=>c(Math.max(0,t.currentPage-1)),f=()=>c(Math.min(t.pages.length-1,t.currentPage+1)),h=()=>c(t.pages.length-1),p=m=>t.pages.indexOf(m)===t.currentPage;return(m,A)=>{var g,b,v,y;return a.unref(s)?(a.openBlock(),a.createElementBlock("nav",{key:0,role:"navigation",class:"av-pagination av-nav","aria-label":t.ariaLabel},[a.createElementVNode("ul",wN,[t.compact&&t.compactCurrentPageLabel?(a.openBlock(),a.createElementBlock("li",NN,[a.createElementVNode("span",xN,a.toDisplayString(t.compactCurrentPageLabel),1)])):a.createCommentVNode("",!0),a.createElementVNode("li",null,[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:0,href:(g=t.pages[0])==null?void 0:g.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.firstPageLabel,"aria-disabled":t.currentPage===0?!0:void 0,"data-testid":"first-page-link",onClick:A[0]||(A[0]=a.withModifiers(C=>d(),["prevent"]))},[a.createVNode(le,{name:a.unref(D).PAGE_FIRST,size:1.5},null,8,["name"]),a.createElementVNode("span",TN,a.toDisplayString(t.firstPageLabel),1)],8,SN))]),a.createElementVNode("li",null,[a.createElementVNode("a",{href:(b=t.pages[Math.max(t.currentPage-1,0)])==null?void 0:b.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.prevPageLabel,"aria-disabled":t.currentPage===0?!0:void 0,"data-testid":"previous-page-link",onClick:A[1]||(A[1]=a.withModifiers(C=>u(),["prevent"]))},[a.createVNode(le,{name:a.unref(D).NAVIGATE_BEFORE,size:1.5},null,8,["name"]),t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",DN,a.toDisplayString(t.prevPageLabel),1))],8,LN)]),t.compact?a.createCommentVNode("",!0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(a.unref(i),(C,k)=>(a.openBlock(),a.createElementBlock("li",{key:k},[a.createElementVNode("a",{href:C==null?void 0:C.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:C.title,"aria-current":p(C)?"page":void 0,"data-testid":`page-link-${t.pages.indexOf(C)}`,onClick:a.withModifiers(N=>c(t.pages.indexOf(C)),["prevent"])},[a.unref(i).indexOf(C)===0&&a.unref(r)>0?(a.openBlock(),a.createElementBlock("span",BN,"...")):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(C.label)+" ",1),a.unref(i).indexOf(C)===a.unref(i).length-1&&a.unref(o)<t.pages.length-1?(a.openBlock(),a.createElementBlock("span",RN,"...")):a.createCommentVNode("",!0)],8,ON)]))),128)),a.createElementVNode("li",null,[a.createElementVNode("a",{href:(v=t.pages[Math.min(t.currentPage+1,t.pages.length-1)])==null?void 0:v.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.nextPageLabel,"aria-disabled":t.currentPage===t.pages.length-1?!0:void 0,"data-testid":"next-page-link",onClick:A[2]||(A[2]=a.withModifiers(C=>f(),["prevent"]))},[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",PN,a.toDisplayString(t.nextPageLabel),1)),a.createVNode(le,{name:a.unref(D).NAVIGATE_NEXT,size:1.5},null,8,["name"])],8,zN)]),a.createElementVNode("li",null,[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:0,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",href:(y=t.pages[t.pages.length-1])==null?void 0:y.href,title:t.lastPageLabel,"aria-disabled":t.currentPage===t.pages.length-1?!0:void 0,"data-testid":"last-page-link",onClick:A[3]||(A[3]=a.withModifiers(C=>h(),["prevent"]))},[a.createElementVNode("span",jN,a.toDisplayString(t.lastPageLabel),1),a.createVNode(le,{name:a.unref(D).PAGE_LAST,size:1.5},null,8,["name"])],8,VN))])])],8,MN)):a.createCommentVNode("",!0)}}}),QN=z(HN,[["__scopeId","data-v-29cf5812"]]);function WN(t){return Array.from({length:t.value},(e,n)=>{const r=n+1;return{title:`${r}`,label:`${r}`,href:`#page-${r}`}})}const FN=["id","aria-label"],UN={key:0,class:"av-side-menu__header av-row av-align-center av-justify-end"},qN={class:"av-side-menu__content av-row av-flex-fill av-py-sm"},KN=a.defineComponent({__name:"AvSideMenu",props:a.mergeModels({id:{},collapsible:{type:Boolean,default:!0},collapsed:{type:Boolean,default:!1},width:{default:"16rem"},collapsedWidth:{default:"5rem"},padding:{default:"0"}},{collapsed:{type:Boolean,default:!1},collapsedModifiers:{}}),emits:a.mergeModels(["update:collapsed"],["update:collapsed"]),setup(t){a.useCssVars(u=>({v6ee2b670:a.unref(c),b759a0e4:u.padding}));const e=t,n=a.useModel(t,"collapsed"),{width:r,collapsedWidth:o}=a.toRefs(e),i=e.id??crypto.randomUUID(),s=a.computed(()=>`${i} navigation`),l=a.computed({get:()=>e.collapsible?n.value:!1,set:u=>{e.collapsible&&(n.value=u)}}),c=a.computed(()=>e.collapsible&&l.value?o.value:r.value);function d(){e.collapsible&&(l.value=!l.value)}return(u,f)=>(a.openBlock(),a.createElementBlock("nav",{id:a.unref(i),class:a.normalizeClass(["av-side-menu av-col av-h-full",{"av-side-menu--collapsed":a.unref(l)}]),"aria-label":a.unref(s)},[e.collapsible?(a.openBlock(),a.createElementBlock("div",UN,[a.createVNode(q,{"aria-expanded":!a.unref(l),"aria-controls":a.unref(i),icon:a.unref(l)?a.unref(D).CHEVRON_DOUBLE_RIGHT:a.unref(D).CHEVRON_DOUBLE_LEFT,class:"av-side-menu__collapse-button av-p-xs av-m-xs av-gap-none",label:a.unref(l)?"Expand button":"Collapse button","icon-only":"",onClick:d},null,8,["aria-expanded","aria-controls","icon","label"])])):a.createCommentVNode("",!0),a.createElementVNode("div",qN,[a.renderSlot(u.$slots,"default",{},void 0,!0)])],10,FN))}}),xh=z(KN,[["__scopeId","data-v-b7b171a0"]]),ZN={key:0,class:"av-pl-sm"},YN=a.defineComponent({__name:"AvSideNavigation",props:a.mergeModels({items:{},selectedItem:{},isSideMenuCollapsed:{type:Boolean},width:{default:"fit-content"},collapsedWidth:{default:"3.5rem"},selectedItemColor:{}},{selectedItem:{default:()=>({itemId:""})},selectedItemModifiers:{},isSideMenuCollapsed:{type:Boolean,default:!1},isSideMenuCollapsedModifiers:{}}),emits:["update:selectedItem","update:isSideMenuCollapsed"],setup(t){const e=a.useModel(t,"selectedItem"),n=a.useModel(t,"isSideMenuCollapsed"),r=a.ref(t.items.filter(c=>c.expanded).map(c=>c.id));function o(c,d){e.value=d?{itemId:c,parentId:d}:{itemId:c}}function i(c,d){return e.value.parentId?e.value.parentId===c.id&&e.value.itemId===d.id:e.value.itemId===d.id}function s(c){return e.value.itemId===c.id||(c.children?c.children.some(d=>i(c,d)):!1)}function l(c){r.value.includes(c)?r.value=r.value.filter(d=>d!==c):r.value.push(c)}return a.watchEffect(()=>{const c=e.value.parentId??e.value.itemId;c&&!r.value.includes(c)&&r.value.push(c)}),(c,d)=>(a.openBlock(),a.createBlock(xh,{collapsed:n.value,"onUpdate:collapsed":d[0]||(d[0]=u=>n.value=u),width:t.width,"collapsed-width":t.collapsedWidth,color:t.selectedItemColor},{default:a.withCtx(()=>[a.createVNode(a.unref(br),{size:"small",role:"menu"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,u=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:u.id},[a.createVNode(a.unref(gr),{title:n.value?void 0:u.label,icon:u.icon,"icon-size":1.8,selected:s(u),"hover-background-color":t.selectedItemColor,role:"menuitem",class:a.normalizeClass(["av-side-navigation__menu-item",{"av-side-navigation__menu-item--collapsed":n.value}]),"data-testid":a.unref(r).includes(u.id)?`expanded-menu-${u.id}`:`collapsed-menu-${u.id}`,onClick:f=>u.children?l(u.id):o(u.id)},null,8,["title","icon","selected","hover-background-color","class","data-testid","onClick"]),u.children&&u.children.length>0?a.withDirectives((a.openBlock(),a.createElementBlock("div",ZN,[a.createVNode(a.unref(br),{size:"small",role:"menu"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.children,f=>(a.openBlock(),a.createBlock(a.unref(gr),{key:f.id,title:n.value?void 0:f.label,icon:f.icon,"icon-size":1.8,selected:i(u,f),"hover-background-color":t.selectedItemColor,role:"menuitem",type:"sub",class:a.normalizeClass(["av-side-navigation__menu-item",{"av-side-navigation__menu-item--collapsed":n.value}]),"data-testid":`menu-${u.id}-${f.id}`,onClick:h=>o(f.id,u.id)},null,8,["title","icon","selected","hover-background-color","class","data-testid","onClick"]))),128))]),_:2},1024)],512)),[[a.vShow,a.unref(r).includes(u.id)]]):a.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["collapsed","width","collapsed-width","color"]))}}),XN=z(YN,[["__scopeId","data-v-39e27b63"]]),JN={role:"list",class:"av-stepper av-col"},GN={class:"main-container av-row av-align-center av-flex-fill"},$N=["aria-current"],_N=["aria-current"],ex={class:"b1-regular"},tx={class:"main-labels-container av-row av-align-start av-justify-between av-pt-xs"},nx=a.defineComponent({__name:"AvStepper",props:{steps:{},currentStep:{},width:{default:"100%"}},setup(t){return a.useCssVars(e=>({v6c9f7699:e.width})),(e,n)=>(a.openBlock(),a.createElementBlock("div",JN,[a.createElementVNode("div",GN,[a.createElementVNode("div",{role:"listitem",class:"step step--active av-radius-full","aria-current":t.currentStep===0?"step":void 0},[...n[0]||(n[0]=[a.createElementVNode("span",{class:"b1-regular"},"1",-1)])],8,$N),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.steps.slice(1),(r,o)=>(a.openBlock(),a.createElementBlock("div",{key:o,class:"av-row av-align-center av-flex-fill"},[a.createElementVNode("div",{class:a.normalizeClass(["separator av-row av-flex-fill",{"separator--active":o+1<=t.currentStep}])},null,2),a.createElementVNode("div",{role:"listitem",class:a.normalizeClass(["step av-col av-align-center av-justify-center av-radius-full",{"step--active":o+1<=t.currentStep}]),"aria-current":o+1===t.currentStep?"step":void 0},[a.createElementVNode("span",ex,a.toDisplayString(o+2),1)],10,_N)]))),128))]),a.createElementVNode("div",tx,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.steps,(r,o)=>(a.openBlock(),a.createElementBlock("div",{key:o,class:"label-container av-col av-align-center av-justify-center"},[a.createElementVNode("span",{class:a.normalizeClass(["label av-col av-align-center",{"b1-bold av-text-text1":o<=t.currentStep,"b1-light av-text-text1":o>t.currentStep}])},a.toDisplayString(r),3)]))),128))])]))}}),rx=z(nx,[["__scopeId","data-v-3c219b87"]]),ox=["id","aria-labelledby","role","open"],ix={class:"av-container av-container--md av-container--lg av-container-fluid av-w-full"},sx={class:"av-modal__body av-pt-sm av-pt-none--md"},ax={class:"av-modal__content av-mb-4xl av-px-lg av-pt-sm--md"},lx=["id"],cx={class:"av-modal__footer av-row av-justify-end av-p-sm av--mt-2xl"},dx=a.defineComponent({inheritAttrs:!1,__name:"AvModal",props:{id:{},opened:{type:Boolean,default:!1},isAlert:{type:Boolean,default:!1},closeButtonLabel:{},closeButtonIcon:{default:()=>D.CLOSE_CIRCLE_OUTLINE},closeButtonDisabled:{type:Boolean,default:!1},confirmButtonLabel:{},confirmButtonIcon:{default:()=>D.CHECK_CIRCLE_OUTLINE},confirmButtonDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean}},emits:["close","confirm"],setup(t,{emit:e}){const n=e,r=a.useSlots(),o=a.useAttrs(),i=t.id??`modal-${crypto.randomUUID()}`,s=a.computed(()=>t.isAlert?"alertdialog":"dialog"),l=a.ref(null),c=a.ref();a.watch(()=>t.opened,u=>{var f,h,p;u?((f=c.value)==null||f.showModal(),(h=l.value)==null||h.focus()):(p=c.value)==null||p.close(),d(u)});function d(u){typeof window<"u"&&document.body.classList.toggle("modal-open",u)}return a.onMounted(()=>{d(t.opened)}),a.onBeforeUnmount(()=>{d(!1)}),(u,f)=>{const h=xn;return a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[t.opened?(a.openBlock(),a.createBlock(a.unref(md),{key:0},{default:a.withCtx(()=>[a.createElementVNode("dialog",a.mergeProps({id:a.unref(i),ref_key:"modal",ref:c},a.unref(o),{"aria-modal":"true","aria-labelledby":`${a.unref(i)}-header`,role:a.unref(s),class:["av-modal av-col av-h-full av-w-full av-align-stretch av-justify-end av-justify-around--md av-p-none av-m-none",{"av-modal--opened av-w-full av-h-full":t.opened}],open:t.opened,onKeydown:f[2]||(f[2]=a.withKeys(p=>n("close"),["esc"]))}),[a.createElementVNode("div",ix,[a.createElementVNode("div",sx,[a.createElementVNode("div",ax,[r.header?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${a.unref(i)}-header`,class:"header av-row av-align-center av-pb-md"},[a.renderSlot(u.$slots,"header",{},void 0,!0)],8,lx)):a.createCommentVNode("",!0),a.renderSlot(u.$slots,"default",{},void 0,!0)]),a.createElementVNode("div",cx,[a.createVNode(h,{ref_key:"closeBtn",ref:l,"cancel-label":t.closeButtonLabel,"cancel-icon":t.closeButtonIcon,"cancel-disabled":t.closeButtonDisabled,"cancel-is-loading":t.isLoading,"confirm-label":t.confirmButtonLabel,"confirm-icon":t.confirmButtonIcon,"confirm-disabled":t.confirmButtonDisabled,"confirm-is-loading":t.isLoading,onCancel:f[0]||(f[0]=()=>n("close")),onConfirm:f[1]||(f[1]=()=>n("confirm"))},null,8,["cancel-label","cancel-icon","cancel-disabled","cancel-is-loading","confirm-label","confirm-icon","confirm-disabled","confirm-is-loading"]),a.renderSlot(u.$slots,"footer",{},void 0,!0)])])])],16,ox)]),_:3})):a.createCommentVNode("",!0)])}}}),ux=z(dx,[["__scopeId","data-v-21bb36c5"]]);exports.AV_BREAKPOINTS=Ad;exports.AvAccordion=Xm;exports.AvAccordionsGroup=Gm;exports.AvAlert=ed;exports.AvAutocomplete=OM;exports.AvBadge=Lh;exports.AvBreadcrumb=iN;exports.AvButton=q;exports.AvCancelConfirmButtons=xn;exports.AvCard=cp;exports.AvCheckbox=bd;exports.AvCheckboxListItem=yh;exports.AvCheckboxesGroup=lA;exports.AvDrawer=Ps;exports.AvDropdown=Hs;exports.AvFieldset=Os;exports.AvFieldsetElement=Bs;exports.AvFileUpload=CA;exports.AvHeader=Zw;exports.AvHeaderMenuLinks=Vs;exports.AvIcon=le;exports.AvIconText=Jc;exports.AvInput=Ge;exports.AvLanguageSelector=Qs;exports.AvList=br;exports.AvListItem=gr;exports.AvLogo=td;exports.AvModal=ux;exports.AvMultiselect=YM;exports.AvNavigation=EN;exports.AvNotice=tp;exports.AvPageSizePicker=UE;exports.AvPagination=QN;exports.AvPeriodInput=ab;exports.AvPopover=Zo;exports.AvRadioButton=Ih;exports.AvRadioButtonSet=YE;exports.AvRichButton=nA;exports.AvRichTextEditor=TE;exports.AvSearchBar=Ta;exports.AvSelect=iw;exports.AvSideMenu=xh;exports.AvSideNavigation=XN;exports.AvStepper=rx;exports.AvTab=sw;exports.AvTabs=Aw;exports.AvTag=Xc;exports.AvTagPicker=Ch;exports.AvToaster=vp;exports.AvToggle=Nw;exports.CUIDA_ICONS=Bh;exports.DropdownState=Vt;exports.EOS_ICONS=Rh;exports.EsupLogo=_w;exports.FLUENT_ICONS=zh;exports.ICONS_DATA_URL=Fe;exports.IX_ICONS=Ph;exports.MDI_ICONS=D;exports.MS_ICONS=Un;exports.PH_ICONS=Vh;exports.PageSizes=La;exports.RI_ICONS=jh;exports.formatTextToHtml=Gc;exports.getPaginationPages=WN;exports.isValidEmail=np;exports.pageSizeValues=WE;exports.registerNavigationLinkKey=Oa;exports.removeDuplicates=_c;exports.toSentenceCase=$c;exports.useAvBreakpoints=js;exports.useCollapsable=Ko;exports.useFocusTrap=gd;exports.useGlobalBackgroundColor=zm;
|
|
155
|
+
`),[i,s]=cE(o);if(i.length===0)return;const l=bh(i,0,n);return l.length===0?void 0:{type:"list",ordered:!0,start:((r=i[0])==null?void 0:r.number)||1,items:l,raw:o.slice(0,s).join(`
|
|
156
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(uE,this.editor.getAttributes(Qc)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=Mn({find:Wc,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=Mn({find:Wc,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Qc)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),fE=/^\s*(\[([( |x])?\])\s$/,hE=Ae.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList",a11y:void 0}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",te(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},parseMarkdown:(t,e)=>{const n=[];if(t.tokens&&t.tokens.length>0?n.push(e.createNode("paragraph",{},e.parseInline(t.tokens))):t.text?n.push(e.createNode("paragraph",{},[e.createNode("text",{text:t.text})])):n.push(e.createNode("paragraph",{},[])),t.nestedTokens&&t.nestedTokens.length>0){const r=e.parseChildren(t.nestedTokens);n.push(...r)}return e.createNode("taskItem",{checked:t.checked||!1},n)},renderMarkdown:(t,e)=>{var n;const o=`- [${(n=t.attrs)!=null&&n.checked?"x":" "}] `;return ga(t,e,o)},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const o=document.createElement("li"),i=document.createElement("label"),s=document.createElement("span"),l=document.createElement("input"),c=document.createElement("div"),d=f=>{var h,p;l.ariaLabel=((p=(h=this.options.a11y)==null?void 0:h.checkboxLabel)==null?void 0:p.call(h,f,l.checked))||`Task item checkbox for ${f.textContent||"empty task item"}`};d(t),i.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",f=>f.preventDefault()),l.addEventListener("change",f=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:h}=f.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const m=n();if(typeof m!="number")return!1;const A=p.doc.nodeAt(m);return p.setNodeMarkup(m,void 0,{...A==null?void 0:A.attrs,checked:h}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,h)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([f,h])=>{o.setAttribute(f,h)}),o.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,i.append(l,s),o.append(i,c),Object.entries(e).forEach(([f,h])=>{o.setAttribute(f,h)});let u=new Set(Object.keys(e));return{dom:o,contentDOM:c,update:f=>{if(f.type!==this.type)return!1;o.dataset.checked=f.attrs.checked,l.checked=f.attrs.checked,d(f);const h=r.extensionManager.attributes,p=hr(f,h),m=new Set(Object.keys(p)),A=this.options.HTMLAttributes;return u.forEach(g=>{m.has(g)||(g in A?o.setAttribute(g,A[g]):o.removeAttribute(g))}),Object.entries(p).forEach(([g,b])=>{b==null?g in A?o.setAttribute(g,A[g]):o.removeAttribute(g):o.setAttribute(g,b)}),u=m,!0}}}},addInputRules(){return[Mn({find:fE,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),pE=Ae.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",te(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},parseMarkdown:(t,e)=>e.createNode("taskList",{},e.parseChildren(t.items||[])),renderMarkdown:(t,e)=>t.content?e.renderChildren(t.content,`
|
|
157
|
+
`):"",markdownTokenizer:{name:"taskList",level:"block",start(t){var e;const n=(e=t.match(/^\s*[-+*]\s+\[([ xX])\]\s+/))==null?void 0:e.index;return n!==void 0?n:-1},tokenize(t,e,n){const r=i=>{const s=ms(i,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:l=>({indentLevel:l[1].length,mainContent:l[4],checked:l[3].toLowerCase()==="x"}),createToken:(l,c)=>({type:"taskItem",raw:"",mainContent:l.mainContent,indentLevel:l.indentLevel,checked:l.checked,text:l.mainContent,tokens:n.inlineTokens(l.mainContent),nestedTokens:c}),customNestedParser:r},n);return s?[{type:"taskList",raw:s.raw,items:s.items}]:n.blockTokens(i)},o=ms(t,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:i=>({indentLevel:i[1].length,mainContent:i[4],checked:i[3].toLowerCase()==="x"}),createToken:(i,s)=>({type:"taskItem",raw:"",mainContent:i.mainContent,indentLevel:i.indentLevel,checked:i.checked,text:i.mainContent,tokens:n.inlineTokens(i.mainContent),nestedTokens:s}),customNestedParser:r},n);if(o)return{type:"taskList",raw:o.raw,items:o.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});oe.create({name:"listKit",addExtensions(){const t=[];return this.options.bulletList!==!1&&t.push(dh.configure(this.options.bulletList)),this.options.listItem!==!1&&t.push(uh.configure(this.options.listItem)),this.options.listKeymap!==!1&&t.push(gh.configure(this.options.listKeymap)),this.options.orderedList!==!1&&t.push(vh.configure(this.options.orderedList)),this.options.taskItem!==!1&&t.push(hE.configure(this.options.taskItem)),this.options.taskList!==!1&&t.push(pE.configure(this.options.taskList)),t}});var Fc=" ",mE=" ",AE=Ae.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",te(this.options.HTMLAttributes,t),0]},parseMarkdown:(t,e)=>{const n=t.tokens||[];if(n.length===1&&n[0].type==="image")return e.parseChildren([n[0]]);const r=e.parseInline(n);return r.length===1&&r[0].type==="text"&&(r[0].text===Fc||r[0].text===mE)?e.createNode("paragraph",void 0,[]):e.createNode("paragraph",void 0,r)},renderMarkdown:(t,e)=>{if(!t)return"";const n=Array.isArray(t.content)?t.content:[];return n.length===0?Fc:e.renderChildren(n)},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),gE=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,bE=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,vE=on.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["s",te(this.options.HTMLAttributes,t),0]},markdownTokenName:"del",parseMarkdown:(t,e)=>e.applyMark("strike",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`~~${e.renderChildren(t)}~~`,addCommands(){return{setStrike:()=>({commands:t})=>t.setMark(this.name),toggleStrike:()=>({commands:t})=>t.toggleMark(this.name),unsetStrike:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[En({find:gE,type:this.type})]},addPasteRules(){return[en({find:bE,type:this.type})]}}),yE=Ae.create({name:"text",group:"inline",parseMarkdown:t=>({type:"text",text:t.text||""}),renderMarkdown:t=>t.text||""}),CE=on.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:t=>t.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:t}){return["u",te(this.options.HTMLAttributes,t),0]},parseMarkdown(t,e){return e.applyMark(this.name||"underline",e.parseInline(t.tokens||[]))},renderMarkdown(t,e){return`++${e.renderChildren(t)}++`},markdownTokenizer:{name:"underline",level:"inline",start(t){return t.indexOf("++")},tokenize(t,e,n){const o=/^(\+\+)([\s\S]+?)(\+\+)/.exec(t);if(!o)return;const i=o[2].trim();return{type:"underline",raw:o[0],text:i,tokens:n.inlineTokens(i)}}},addCommands(){return{setUnderline:()=>({commands:t})=>t.setMark(this.name),toggleUnderline:()=>({commands:t})=>t.toggleMark(this.name),unsetUnderline:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),IE=oe.create({name:"starterKit",addExtensions(){var t,e,n,r;const o=[];return this.options.bold!==!1&&o.push(Qk.configure(this.options.bold)),this.options.blockquote!==!1&&o.push(zk.configure(this.options.blockquote)),this.options.bulletList!==!1&&o.push(dh.configure(this.options.bulletList)),this.options.code!==!1&&o.push(Uk.configure(this.options.code)),this.options.codeBlock!==!1&&o.push(Zk.configure(this.options.codeBlock)),this.options.document!==!1&&o.push(Yk.configure(this.options.document)),this.options.dropcursor!==!1&&o.push(Z1.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&o.push(Y1.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&o.push(Xk.configure(this.options.hardBreak)),this.options.heading!==!1&&o.push(Jk.configure(this.options.heading)),this.options.undoRedo!==!1&&o.push(G1.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&o.push(Gk.configure(this.options.horizontalRule)),this.options.italic!==!1&&o.push(nE.configure(this.options.italic)),this.options.listItem!==!1&&o.push(uh.configure(this.options.listItem)),this.options.listKeymap!==!1&&o.push(gh.configure((t=this.options)==null?void 0:t.listKeymap)),this.options.link!==!1&&o.push(Jf.configure((e=this.options)==null?void 0:e.link)),this.options.orderedList!==!1&&o.push(vh.configure(this.options.orderedList)),this.options.paragraph!==!1&&o.push(AE.configure(this.options.paragraph)),this.options.strike!==!1&&o.push(vE.configure(this.options.strike)),this.options.text!==!1&&o.push(yE.configure(this.options.text)),this.options.underline!==!1&&o.push(CE.configure((n=this.options)==null?void 0:n.underline)),this.options.trailingNode!==!1&&o.push(J1.configure((r=this.options)==null?void 0:r.trailingNode)),o}}),kE=IE;const EE=tI.extend({renderHTML({HTMLAttributes:t}){return["div",{class:"image-resizer"},["img",t]]}});function ME({content:t,maxlength:e,onUpdate:n}){return A1({extensions:[kE.configure({link:!1}),$1.configure({limit:e}),Bk.configure({types:["heading","paragraph"]}),wI.configure({openOnClick:!1,HTMLAttributes:{rel:"noopener noreferrer",target:"_blank"}}),ch.configure({resizable:!0}),lh,ah,sh,EE],content:t,onUpdate:({editor:r})=>n==null?void 0:n(r),editorProps:{attributes:{class:"av--mx-sm av-px-sm av-py-xxs"},handleClick:(r,o,i)=>{const{schema:s}=r.state,c=r.state.doc.resolve(o).marks().find(d=>d.type===s.marks.link);return c?((i.ctrlKey||i.metaKey)&&window.open(c.attrs.href,"_blank"),!0):!1},handleKeyDown:(r,o)=>e&&r.state.doc.textContent.length>=e&&(o.key==="Enter"||o.key==="Return")?(o.preventDefault(),!0):!1}})}const wE={class:"av-rich-text-editor av-col av-gap-xxs","data-testid":"av-rich-text-editor"},NE={class:"av-rich-text-editor-wrapper"},xE={class:"av-px-sm"},SE={key:0,class:"caption-light","data-testid":"maxlength-caption"},TE=a.defineComponent({__name:"AvRichTextEditor",props:a.mergeModels({maxlength:{},editorLabel:{},toolbarLabel:{},undoLabel:{},redoLabel:{},paragraphLabel:{},headingLabel:{},boldLabel:{},italicLabel:{},underlineLabel:{},linkLabel:{},linkNameLabel:{},linkNamePlaceholder:{},linkUrlLabel:{},unsetLinkLabel:{},imageLabel:{},imageNameLabel:{},imageNamePlaceholder:{},imageUrlLabel:{},removeImageLabel:{},insertTableLabel:{},tableSettingsLabel:{},deleteTableLabel:{},addColumnBeforeLabel:{},addColumnAfterLabel:{},deleteColumnLabel:{},addRowBeforeLabel:{},addRowAfterLabel:{},deleteRowLabel:{},alignLeftLabel:{},alignCenterLabel:{},alignRightLabel:{},alignJustifyLabel:{},bulletListLabel:{},orderedListLabel:{},decreaseIndentLabel:{},increaseIndentLabel:{},popoversCancelLabel:{},popoversConfirmLabel:{}},{modelValue:{},modelModifiers:{},charCount:{},charCountModifiers:{}}),emits:["update:modelValue","update:charCount"],setup(t){const e=a.createPropsRestProxy(t,["editorLabel","maxlength"]),n=a.useModel(t,"modelValue"),r=a.useModel(t,"charCount"),o=ME({content:n.value,onUpdate:i=>{n.value=i.getHTML(),r.value=i.storage.characterCount.characters()},maxlength:t.maxlength});return a.watch(()=>o.value,i=>{i&&r.value===void 0&&(r.value=i.storage.characterCount.characters())},{immediate:!0}),a.watch(()=>n.value,i=>{o.value&&o.value.getHTML()!==i&&o.value.commands.setContent(i??"",{emitUpdate:!1})}),(i,s)=>(a.openBlock(),a.createElementBlock("div",wE,[a.createElementVNode("div",NE,[a.createVNode(N1,a.mergeProps(e,{editor:a.unref(o)}),null,16,["editor"]),a.createElementVNode("div",xE,[a.createVNode(a.unref(m1),{editor:a.unref(o),role:"textbox","aria-multiline":"true","aria-label":t.editorLabel},null,8,["editor","aria-label"])])]),a.renderSlot(i.$slots,"maxLengthCaption",{currentValue:r.value,maxlength:t.maxlength},()=>[t.maxlength?(a.openBlock(),a.createElementBlock("span",SE,a.toDisplayString(r.value)+" / "+a.toDisplayString(t.maxlength),1)):a.createCommentVNode("",!0)],!0)]))}}),LE=z(TE,[["__scopeId","data-v-c6a60da2"]]),DE={class:"av-search-bar av-row av-align-end",role:"search"},OE=a.defineComponent({__name:"AvSearchBar",props:{id:{},label:{default:"Recherche"},modelValue:{default:""},placeholder:{default:"Rechercher..."},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","search"],setup(t,{emit:e}){const n=e,r=t.id??`search-bar-${crypto.randomUUID()}`;return(o,i)=>{const s=Ge,l=q;return a.openBlock(),a.createElementBlock("div",DE,[a.createElementVNode("div",null,[a.createVNode(s,{id:a.unref(r),type:"search","no-radius":"",placeholder:t.placeholder,"model-value":t.modelValue,label:t.label,disabled:t.disabled,"aria-disabled":t.disabled,"label-visible":!1,"onUpdate:modelValue":i[0]||(i[0]=c=>n("update:modelValue",(c==null?void 0:c.toString())??"")),onKeydown:i[1]||(i[1]=a.withKeys(c=>n("search",t.modelValue),["enter"]))},null,8,["id","placeholder","model-value","label","disabled","aria-disabled"])]),a.createVNode(l,{variant:"FLAT",label:t.label,"no-radius":"","icon-only":"",icon:a.unref(D).MAGNIFY,disabled:t.disabled,"aria-disabled":t.disabled,onClick:i[2]||(i[2]=c=>n("search",t.modelValue))},null,8,["label","icon","disabled","aria-disabled"])])}}}),Ta=z(OE,[["__scopeId","data-v-6cec7e33"]]),BE=["role"],RE={key:0,class:"av-list-item__icon av-col av-align-center av-justify-center"},zE={class:"av-list-item__content av-col av-gap-xs"},PE={key:2},VE=a.defineComponent({__name:"AvListItem",props:{icon:{},color:{default:"var(--text1)"},iconSize:{default:1.3125},iconColor:{},title:{},description:{},hoverBackgroundColor:{default:"var(--dark-background-primary1)"},colorOnHover:{default:"var(--card)"},descriptionColor:{default:"var(--text2)"},clickable:{type:Boolean},disabled:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},onClick:{type:Function},ariaLabel:{},ariaDescribedby:{},tag:{},href:{},target:{},rel:{},role:{default:"listitem"},type:{default:"main"}},setup(t){a.useCssVars(p=>({v4b338753:p.colorOnHover,v73b02292:p.hoverBackgroundColor,v9bcf582c:p.color,v0ce72c40:p.descriptionColor}));const e=a.useSlots(),n=a.computed(()=>t.href||t.target||t.rel?"a":t.onClick?"button":"div"),r=a.computed(()=>n.value==="a"),o=a.computed(()=>n.value==="button"),i=a.computed(()=>r.value||o.value),s=a.computed(()=>t.ariaLabel?t.ariaLabel:t.title&&t.description?`${t.title}, ${t.description}`:t.title||t.description||void 0),l=a.computed(()=>i.value?"av-list-item--clickable":""),c=a.computed(()=>t.disabled&&o.value?"av-list-item--disabled":""),d=a.computed(()=>t.selected?"av-list-item--selected":""),u=a.computed(()=>`av-list-${t.type}item`);function f(p){var m;!i.value||t.disabled||(m=t.onClick)==null||m.call(t,p)}function h(p){var m;if(!(!i.value||t.disabled)&&(p.key==="Enter"||p.key===" ")){p.preventDefault();const A=new MouseEvent("click",{bubbles:!0,cancelable:!0});(m=t.onClick)==null||m.call(t,A)}}return(p,m)=>(a.openBlock(),a.createElementBlock("div",{role:t.role,class:a.normalizeClass(a.unref(u))},[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(n)),{"aria-label":a.unref(i)?a.unref(s):void 0,"aria-describedby":t.ariaDescribedby,"aria-disabled":t.disabled&&a.unref(o)?"true":void 0,tabindex:a.unref(i)&&!t.disabled?0:void 0,class:a.normalizeClass(["av-list-item av-row av-align-center av-gap-xs av-w-full",[a.unref(l),a.unref(c),a.unref(d)]]),disabled:t.disabled&&a.unref(o)?!0:void 0,href:a.unref(r)?t.href:void 0,target:a.unref(r)?t.target:void 0,rel:a.unref(r)?t.rel:void 0,onClick:f,onKeydown:h},{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createElementBlock("div",RE,[a.createVNode(le,{name:t.icon,color:t.iconColor??t.color,size:t.iconSize},null,8,["name","color","size"])])):a.createCommentVNode("",!0),a.createElementVNode("div",zE,[t.title?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["av-list-item__title",t.type==="main"?"b2-bold":"b2-regular"])},a.toDisplayString(t.title),3)):a.createCommentVNode("",!0),t.description?(a.openBlock(),a.createElementBlock("span",{key:1,class:a.normalizeClass(["av-list-item__description",t.type==="main"?"b1-bold":"b1-regular"])},a.toDisplayString(t.description),3)):a.createCommentVNode("",!0),e.default?(a.openBlock(),a.createElementBlock("div",PE,[a.renderSlot(p.$slots,"default",{},void 0,!0)])):a.createCommentVNode("",!0)])]),_:3},40,["aria-label","aria-describedby","aria-disabled","tabindex","class","disabled","href","target","rel"]))],10,BE))}}),gr=z(VE,[["__scopeId","data-v-02e7f4ab"]]),yh=a.defineComponent({__name:"AvCheckboxListItem",props:a.mergeModels({id:{},listId:{},label:{},icon:{},disabled:{type:Boolean},ariaLabel:{},ariaDescribedby:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.useModel(t,"modelValue");function n(){return document.querySelectorAll(`[id^='${t.listId}-'][id$='-checkbox']`)}function r(l){l.preventDefault();const c=n(),d=document.activeElement,u=Array.from(c).indexOf(d);if(u!==-1){const f=(u+1)%c.length;c[f].focus()}}function o(l){l.preventDefault();const c=n(),d=document.activeElement,u=Array.from(c).indexOf(d);if(u!==-1){const f=(u-1+c.length)%c.length;c[f].focus()}}const i=a.ref(null);function s(){var c;const l=i.value;if(l){const d=l instanceof HTMLElement?l:l.$el;(c=d==null?void 0:d.scrollIntoView)==null||c.call(d,{block:"nearest"})}}return(l,c)=>{const d=gr;return a.openBlock(),a.createBlock(d,{ref_key:"listItemRef",ref:i,"aria-label":t.ariaLabel,"aria-describedby":t.ariaDescribedby,"data-testid":"av-checkbox-list-item"},{default:a.withCtx(()=>[a.createVNode(bd,{id:`${t.listId}-${t.id}-checkbox`,modelValue:e.value,"onUpdate:modelValue":c[0]||(c[0]=u=>e.value=u),value:t.id,name:`${t.listId}-${t.id}-checkbox`,label:t.label,icon:t.icon,disabled:t.disabled,onKeydown:[a.withKeys(r,["down"]),a.withKeys(r,["right"]),a.withKeys(o,["up"]),a.withKeys(o,["left"])],onFocus:s},{label:a.withCtx(()=>[a.renderSlot(l.$slots,"default")]),_:3},8,["id","modelValue","value","name","label","icon","disabled"])]),_:3},8,["aria-label","aria-describedby"])}}}),jE=["role","aria-label","aria-labelledby","aria-describedby"],HE=a.defineComponent({__name:"AvList",props:{backgroundColor:{default:"transparent"},borderColor:{default:"var(--stroke)"},borderRadius:{default:"0"},bordered:{type:Boolean,default:!1},divided:{type:Boolean,default:!1},size:{default:"small"},padding:{default:"0"},ariaLabel:{},ariaLabelledby:{},ariaDescribedby:{},role:{default:"list"}},setup(t){a.useCssVars(o=>({befe11a4:o.backgroundColor,v6be6fbb6:o.borderRadius,v2530b52c:o.padding,fcd2c920:o.borderColor}));const e=a.computed(()=>`av-list--${t.size}`),n=a.computed(()=>t.bordered?"av-list--bordered":""),r=a.computed(()=>t.divided?"av-list--divided":"");return(o,i)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["av-list av-col av-gap-xxxs",[a.unref(e),a.unref(n),a.unref(r)]]),role:t.role,"aria-label":t.ariaLabel,"aria-labelledby":t.ariaLabelledby,"aria-describedby":t.ariaDescribedby},[a.renderSlot(o.$slots,"default",{},void 0,!0)],10,jE))}}),br=z(HE,[["__scopeId","data-v-2d433bb3"]]),QE={class:"av-tag-picker av-row av-gap-xs"},WE=a.defineComponent({__name:"AvTagPicker",props:{multiple:{type:Boolean},selected:{},handleSelectChange:{},options:{},label:{},labelColor:{default:"var(--text2)"},labelTypographyClass:{default:"b2-regular"}},setup(t){a.useCssVars(A=>({v507b02e0:a.unref(r)}));const e=t,{label:n,labelColor:r,labelTypographyClass:o,selected:i,multiple:s,handleSelectChange:l}=e,c=a.computed(()=>_c(e.options));function d(A){return A?Array.isArray(A)?A:[A]:[]}const u=a.ref(d(i));function f(A){return u.value.some(g=>g.value===A.value)}function h(A){s?(f(A)?u.value=u.value.filter(b=>b.value!==A.value):u.value.push(A),l([...u.value])):(u.value=[A],l(A))}function p(A){return f(A)?D.CHECK:void 0}function m(A){return f(A)&&!s}return a.watch(()=>e.selected,A=>{u.value=d(A)},{immediate:!0}),(A,g)=>(a.openBlock(),a.createElementBlock("div",QE,[a.unref(n)?(a.openBlock(),a.createElementBlock("span",{key:0,class:a.normalizeClass(["av-tag-picker__label av-row av-align-center",[a.unref(o)]])},a.toDisplayString(a.unref(n)),3)):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(c),b=>(a.openBlock(),a.createElementBlock("div",{key:b.value,class:"tag-wrapper av-row av-flex-fill"},[a.createVNode(Xc,{class:a.normalizeClass(["av-row av-align-center av-justify-center av-flex-fill av-py-xxs av-px-xs av-radius-md av-no-before av-no-after av-border-width-sm av-border-style-solid",{"av-tag--selected":f(b),"av-tag--disabled":m(b)}]),label:b.label,icon:p(b),disabled:m(b),selectable:"",selected:f(b),onSelect:()=>h(b)},null,8,["class","label","icon","disabled","selected","onSelect"])]))),128))]))}}),Ch=z(WE,[["__scopeId","data-v-a6241e22"]]);var La=(t=>(t[t.FOUR=4]="FOUR",t[t.EIGHT=8]="EIGHT",t[t.TWELVE=12]="TWELVE",t))(La||{});const FE=[4,8,12],UE={class:"pagination-size-picker-container av-row"},qE=a.defineComponent({__name:"AvPageSizePicker",props:{label:{},pageSizeSelected:{},handleSelectChange:{type:Function}},setup(t){const e=a.computed(()=>Object.values(La).filter(r=>typeof r=="number").map(r=>({label:r.toString(),value:r.toString()}))),n=a.computed(()=>({label:t.pageSizeSelected.toString(),value:t.pageSizeSelected.toString()}));return(r,o)=>(a.openBlock(),a.createElementBlock("div",UE,[a.createVNode(Ch,{options:a.unref(e),selected:a.unref(n),"handle-select-change":t.handleSelectChange,multiple:!1,label:t.label,"label-typography-class":"b2-regular","label-color":"var(--text2)"},null,8,["options","selected","handle-select-change","label"])]))}}),Ih=a.defineComponent({__name:"AvRadioButton",props:{value:{type:[String,Number,Boolean]},label:{},description:{},disabled:{type:Boolean}},setup(t){return(e,n)=>a.renderSlot(e.$slots,"default")}}),KE=["name","value","checked","disabled"],ZE=a.defineComponent({__name:"RadioButton",props:{value:{type:[String,Number,Boolean]},modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},name:{default:""}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,r=`av-radio-button-${crypto.randomUUID()}`;return(o,i)=>{const s=Bs;return a.openBlock(),a.createBlock(s,{inline:t.inline,disabled:t.disabled},{default:a.withCtx(()=>[a.createElementVNode("div",{class:a.normalizeClass(["av-radio-group av-row av-align-center av-gap-xs",{"av-radio-group--sm":t.small}])},[a.createElementVNode("input",a.mergeProps({id:r,type:"radio",name:t.name,value:t.value,checked:t.modelValue===t.value,disabled:t.disabled},o.$attrs,{onClick:i[0]||(i[0]=l=>n("update:modelValue",t.value))}),null,16,KE),a.createElementVNode("label",{for:r,class:"av-label av-p-none"},[a.renderSlot(o.$slots,"default",{},void 0,!0)])],2)]),_:3},8,["inline","disabled"])}}}),YE=z(ZE,[["__scopeId","data-v-40eab3c4"]]),XE=a.defineComponent({__name:"AvRadioButtonSet",props:{id:{},name:{},legend:{default:""},modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},small:{type:Boolean,default:!1},inline:{type:Boolean,default:!1},errorMessage:{},validMessage:{},hint:{default:""}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=n,o=a.computed(()=>t.id??`radio-button-set-${crypto.randomUUID()}`),i=a.computed(()=>t.errorMessage||t.validMessage);function s(p){p!==t.modelValue&&r("update:modelValue",p)}const l=a.computed(()=>i.value?`messages-${o.value}`:void 0),c=a.useSlots();function d(p){return p!=null&&typeof p=="object"&&"type"in p&&p.type===Ih}function u(p){return p?p.flatMap(m=>!m||typeof m!="object"||!("type"in m)?[]:m.type===a.Fragment&&Array.isArray(m.children)?u(m.children):d(m)?[m]:[]):[]}const f=a.computed(()=>{var p;return u((p=c.default)==null?void 0:p.call(c))}),h=a.ref(t.modelValue);return a.watch(()=>t.modelValue,p=>{h.value=p}),a.watch(h,p=>{p&&r("update:modelValue",p)}),e({selected:h}),(p,m)=>{const A=Os;return a.openBlock(),a.createBlock(A,{id:a.unref(o),legend:t.legend,hint:t.hint,required:t.required,disabled:t.disabled,"aria-labelledby":a.unref(o),"aria-describedby":a.unref(l),role:t.errorMessage||t.validMessage?"group":void 0,"error-message":t.errorMessage,"success-message":t.validMessage,inline:t.inline},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(f),(g,b)=>{var v,y;return a.openBlock(),a.createBlock(YE,{key:b,modelValue:a.unref(h),"onUpdate:modelValue":[m[0]||(m[0]=C=>a.isRef(h)?h.value=C:null),m[1]||(m[1]=C=>s(C))],value:(v=g.props)==null?void 0:v.value,disabled:((y=g.props)==null?void 0:y.disabled)??t.disabled,small:t.small,inline:t.inline,name:t.name},{default:a.withCtx(()=>{var C;return[(a.openBlock(),a.createBlock(a.resolveDynamicComponent((C=g.children)==null?void 0:C.default)))]}),_:2},1032,["modelValue","value","disabled","small","inline","name"])}),128))]),_:1},8,["id","legend","hint","required","disabled","aria-labelledby","aria-describedby","role","error-message","success-message","inline"])}}});var Vt=(t=>(t.LOADING="loading",t.NO_OPTIONS="no-options",t.HAS_OPTIONS="has-options",t))(Vt||{});const kh=Symbol("AvAutocompleteContext");function Da(){const t=a.inject(kh);if(!t)throw new Error("useAutocompleteContext must be used within AvAutocomplete component");return t}var JE=typeof global=="object"&&global&&global.Object===Object&&global,GE=typeof self=="object"&&self&&self.Object===Object&&self,Eh=JE||GE||Function("return this")(),qo=Eh.Symbol,Mh=Object.prototype,$E=Mh.hasOwnProperty,_E=Mh.toString,Vn=qo?qo.toStringTag:void 0;function eM(t){var e=$E.call(t,Vn),n=t[Vn];try{t[Vn]=void 0;var r=!0}catch{}var o=_E.call(t);return r&&(e?t[Vn]=n:delete t[Vn]),o}var tM=Object.prototype,nM=tM.toString;function rM(t){return nM.call(t)}var oM="[object Null]",iM="[object Undefined]",Uc=qo?qo.toStringTag:void 0;function sM(t){return t==null?t===void 0?iM:oM:Uc&&Uc in Object(t)?eM(t):rM(t)}function aM(t){return t!=null&&typeof t=="object"}var lM="[object Symbol]";function cM(t){return typeof t=="symbol"||aM(t)&&sM(t)==lM}var dM=/\s/;function uM(t){for(var e=t.length;e--&&dM.test(t.charAt(e)););return e}var fM=/^\s+/;function hM(t){return t&&t.slice(0,uM(t)+1).replace(fM,"")}function Ds(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var qc=NaN,pM=/^[-+]0x[0-9a-f]+$/i,mM=/^0b[01]+$/i,AM=/^0o[0-7]+$/i,gM=parseInt;function Kc(t){if(typeof t=="number")return t;if(cM(t))return qc;if(Ds(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Ds(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=hM(t);var n=mM.test(t);return n||AM.test(t)?gM(t.slice(2),n?2:8):pM.test(t)?qc:+t}var Ki=function(){return Eh.Date.now()},bM="Expected a function",vM=Math.max,yM=Math.min;function wh(t,e,n){var r,o,i,s,l,c,d=0,u=!1,f=!1,h=!0;if(typeof t!="function")throw new TypeError(bM);e=Kc(e)||0,Ds(n)&&(u=!!n.leading,f="maxWait"in n,i=f?vM(Kc(n.maxWait)||0,e):i,h="trailing"in n?!!n.trailing:h);function p(N){var S=r,O=o;return r=o=void 0,d=N,s=t.apply(O,S),s}function m(N){return d=N,l=setTimeout(b,e),u?p(N):s}function A(N){var S=N-c,O=N-d,I=e-S;return f?yM(I,i-O):I}function g(N){var S=N-c,O=N-d;return c===void 0||S>=e||S<0||f&&O>=i}function b(){var N=Ki();if(g(N))return v(N);l=setTimeout(b,A(N))}function v(N){return l=void 0,h&&r?p(N):(r=o=void 0,s)}function y(){l!==void 0&&clearTimeout(l),d=0,r=c=o=l=void 0}function C(){return l===void 0?s:v(Ki())}function k(){var N=Ki(),S=g(N);if(r=arguments,o=this,c=N,S){if(l===void 0)return m(c);if(f)return clearTimeout(l),l=setTimeout(b,e),p(c)}return l===void 0&&(l=setTimeout(b,e)),s}return k.cancel=y,k.flush=C,k}const CM={key:0,class:"av-row av-align-center av-justify-center av-gap-xs av-p-md av-text-text2","data-testid":"av-autocomplete-dropdown__loading"},IM={key:1,class:"av-autocomplete-dropdown__empty av-p-md"},kM={key:1,class:"av-autocomplete-dropdown__empty-text av-text-text2"},EM=a.defineComponent({__name:"AvAutocompleteDropdown",emits:["loadMore"],setup(t,{expose:e,emit:n}){const r=n,o=a.useSlots(),{selectedItems:i,searchQuery:s,isOpen:l,props:c,getOptionId:d,getDisplayLabel:u}=Da(),f=a.ref(),h=a.ref(),p=a.computed(()=>{if(!c.options)return[];if(c.serverSideFiltering)return c.maxResults?c.options.slice(0,c.maxResults):c.options;const y=s.value.toLowerCase().trim();if(!y){const k=c.options;return c.maxResults?k.slice(0,c.maxResults):k}let C;return c.filterOptions?C=c.filterOptions(c.options,y):C=c.options.filter(k=>u(k).toLowerCase().includes(y)),c.maxResults?C.slice(0,c.maxResults):C}),m=a.computed(()=>c.loading?Vt.LOADING:l.value&&c.options&&c.options.length>0&&p.value.length>0?Vt.HAS_OPTIONS:Vt.NO_OPTIONS);function A(y){return i.value.some(C=>d(C)===d(y))}function g(y){if(!c.multiSelect){i.value=[y],l.value=!1,s.value="";return}const C=i.value,k=d(y);C.some(S=>d(S)===k)?i.value=C.filter(S=>d(S)!==k):i.value=[...C,y]}const{arrivedState:b}=Zp(h,{throttle:100}),v=wh(()=>{r("loadMore")},c.loadMoreThrottleDelay);return a.watch(()=>b.bottom,y=>{c.enableLoadMore&&y&&l.value&&v()}),a.onUnmounted(()=>{v.cancel()}),e({dropdownRef:f}),(y,C)=>a.unref(l)?(a.openBlock(),a.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:f,class:a.normalizeClass(["av-autocomplete-dropdown av-mt-xxxs av-radius-lg",a.unref(c).dropdownClass]),style:a.normalizeStyle({width:a.unref(c).dropdownWidth,maxHeight:a.unref(c).maxDropdownHeight})},[a.unref(m)===a.unref(Vt).LOADING?(a.openBlock(),a.createElementBlock("div",CM,[a.createVNode(le,{name:a.unref(D).LOADING,size:1.5,animation:"spin"},null,8,["name"]),C[0]||(C[0]=a.createElementVNode("span",{class:"av-autocomplete-dropdown__loading-text av-text-text2"},"Loading...",-1))])):a.unref(m)===a.unref(Vt).NO_OPTIONS?(a.openBlock(),a.createElementBlock("div",IM,[o.empty?a.renderSlot(y.$slots,"empty",{key:0},void 0,!0):(a.openBlock(),a.createElementBlock("div",kM," No results found "))])):(a.openBlock(),a.createBlock(br,a.mergeProps({key:2,ref_key:"listRef",ref:h},a.unref(c).listOptions,{class:["av-autocomplete-dropdown__options",a.unref(c).scrollbarClass]}),{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(p),k=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:a.unref(d)(k)},[o.item?a.renderSlot(y.$slots,"item",{key:0,option:k,isSelected:A(k),toggle:()=>g(k)},void 0,!0):(a.openBlock(),a.createBlock(gr,{key:1,title:a.unref(u)(k),icon:A(k)?a.unref(D).CHECK:void 0,selected:A(k),"hover-background-color":"var(--light-background-neutral)","color-on-hover":"var(--base)",onClick:()=>g(k)},null,8,["title","icon","selected","onClick"]))],64))),128))]),_:3},16,["class"]))],6)):a.createCommentVNode("",!0)}}),MM=z(EM,[["__scopeId","data-v-f8f9ad11"]]),wM={class:"av-autocomplete-input"},NM=a.defineComponent({__name:"AvAutocompleteInput",emits:["search","clear"],setup(t,{expose:e,emit:n}){const r=n,o=a.useSlots(),{selectedItems:i,searchQuery:s,isOpen:l,props:c,inputId:d,handleBlur:u,getDisplayLabel:f}=Da(),h=a.ref(),p=a.computed(()=>{if(!c.multiSelect&&i.value.length>0)return f(i.value[0]);if(c.multiSelect){if(!c.displaySelectionInInput)return s.value;if(i.value.length>0)return c.showSelectedSection?c.selectedItemsCountLabel:i.value.map(f).join(", ")}return s.value}),m=a.computed(()=>{var y;return((y=c.inputOptions)==null?void 0:y.placeholder)||"Search..."}),A=wh(y=>{s.value=y,r("search",y)},c.debounceDelay);function g(y){s.value=String(y||""),A(s.value)}function b(){l.value=!0}function v(){i.value=[],s.value="",r("clear")}return a.onUnmounted(()=>{A.cancel()}),e({inputRef:h,searchQuery:a.computed(()=>s.value)}),(y,C)=>(a.openBlock(),a.createElementBlock("div",wM,[a.createVNode(Ge,a.mergeProps({id:a.unref(d),ref_key:"inputRef",ref:h,"model-value":a.unref(p),placeholder:a.unref(m)},a.unref(c).inputOptions,{"onUpdate:modelValue":g,onFocus:b,onBlur:a.unref(u),onClick:b}),a.createSlots({_:2},[o.requiredTip?{name:"requiredTip",fn:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.requiredTip)))]),key:"0"}:void 0,a.unref(i).length>0?{name:"suffix",fn:a.withCtx(()=>[a.createVNode(q,{label:"Clear selected items",icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"","icon-scale":1.25,variant:"DEFAULT",theme:"SECONDARY",small:"",onClick:v},null,8,["icon"])]),key:"1"}:void 0]),1040,["id","model-value","placeholder","onBlur"])]))}}),xM=z(NM,[["__scopeId","data-v-5b57a510"]]),SM={key:0,class:"av-autocomplete-selected-tags av-row av-wrap av-gap-xs av-mt-xs"},TM=a.defineComponent({__name:"AvAutocompleteSelectedTags",setup(t){const e=a.useSlots(),{selectedItems:n,props:r,getOptionId:o,getDisplayLabel:i}=Da();function s(l){const c=n.value,d=o(l);n.value=c.filter(u=>o(u)!==d)}return(l,c)=>a.unref(r).multiSelect&&a.unref(n).length>0&&a.unref(r).showSelectedSection?(a.openBlock(),a.createElementBlock("div",SM,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),d=>(a.openBlock(),a.createElementBlock("div",{key:a.unref(o)(d),class:"av-autocomplete-selected-tags__item"},[e.selectedItem?a.renderSlot(l.$slots,"selectedItem",{key:0,option:d,remove:()=>s(d)},void 0,!0):(a.openBlock(),a.createBlock(q,{key:1,label:a.unref(i)(d),icon:a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-right":"",size:"sm",variant:"OUTLINED",theme:"SECONDARY",onClick:()=>s(d)},null,8,["label","icon","onClick"]))]))),128))])):a.createCommentVNode("",!0)}}),LM=z(TM,[["__scopeId","data-v-19df692b"]]),DM={class:"av-autocomplete av-col av-gap-xxs"},OM=a.defineComponent({__name:"AvAutocomplete",props:a.mergeModels({id:{},inputOptions:{default:()=>({})},options:{},multiSelect:{type:Boolean,default:!1},getOptionLabel:{},getOptionKey:{},filterOptions:{},dropdownWidth:{default:"100%"},maxDropdownHeight:{default:"20rem"},listOptions:{default:()=>({size:"small",ariaLabel:"Available options list"})},scrollbarClass:{default:"av-autocomplete__scrollbar--default"},dropdownClass:{default:"av-autocomplete__dropdown--default"},loading:{type:Boolean,default:!1},debounceDelay:{default:300},maxResults:{},enableLoadMore:{type:Boolean,default:!1},showSelectedSection:{type:Boolean,default:!1},displaySelectionInInput:{type:Boolean,default:!0},blurCloseDelay:{default:150},loadMoreThrottleDelay:{default:200},serverSideFiltering:{type:Boolean,default:!1},selectedItemsCountLabel:{default:"element(s) selected"}},{modelValue:{default:()=>[]},modelModifiers:{}}),emits:a.mergeModels(["search","loadMore","clear"],["update:modelValue"]),setup(t,{emit:e}){const n=t,r=e,o=a.useSlots(),i=a.useModel(t,"modelValue"),s=a.ref(!1),l=a.ref(""),c=a.ref(),d=a.ref(),u=a.ref(),f=a.computed(()=>n.id||`av-autocomplete-${crypto.randomUUID()}`);function h(v){l.value=v,r("search",v)}function p(v){var y,C;(C=(y=u.value)==null?void 0:y.dropdownRef)!=null&&C.contains(v.relatedTarget)||setTimeout(()=>{s.value=!1},n.blurCloseDelay)}function m(v){return n.getOptionKey?n.getOptionKey(v):v.value}function A(v){return n.getOptionLabel?n.getOptionLabel(v):v.label}const g={selectedItems:i,searchQuery:l,isOpen:s,props:n,inputId:f,handleBlur:p,getOptionId:m,getDisplayLabel:A};a.provide(kh,g);function b(v){var k,N,S,O,I;const y=v.target,C=(k=d.value)==null?void 0:k.inputRef;!((N=C==null?void 0:C.contains)!=null&&N.call(C,y))&&!((S=c.value)!=null&&S.contains(y))&&!((I=(O=u.value)==null?void 0:O.dropdownRef)!=null&&I.contains(y))&&(s.value=!1)}return a.onMounted(()=>{document.addEventListener("click",b)}),a.onUnmounted(()=>{document.removeEventListener("click",b)}),(v,y)=>(a.openBlock(),a.createElementBlock("div",DM,[a.createElementVNode("div",{ref_key:"wrapperRef",ref:c,class:"av-autocomplete__wrapper"},[a.createVNode(xM,{ref_key:"inputRef",ref:d,onSearch:h,onClear:y[0]||(y[0]=C=>r("clear"))},a.createSlots({_:2},[o.requiredTip?{name:"requiredTip",fn:a.withCtx(()=>[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o.requiredTip)))]),key:"0"}:void 0]),1536),a.createVNode(MM,{ref_key:"dropdownRef",ref:u,onLoadMore:y[1]||(y[1]=C=>r("loadMore"))},a.createSlots({_:2},[o.item?{name:"item",fn:a.withCtx(({option:C,isSelected:k,toggle:N})=>[a.renderSlot(v.$slots,"item",{option:C,isSelected:k,toggle:N},void 0,!0)]),key:"0"}:void 0,o.empty?{name:"empty",fn:a.withCtx(()=>[a.renderSlot(v.$slots,"empty",{},void 0,!0)]),key:"1"}:void 0]),1536)],512),a.createVNode(LM,null,a.createSlots({_:2},[o.selectedItem?{name:"selectedItem",fn:a.withCtx(({option:C,remove:k})=>[a.renderSlot(v.$slots,"selectedItem",{option:C,remove:k},void 0,!0)]),key:"0"}:void 0]),1024)]))}}),BM=z(OM,[["__scopeId","data-v-4a146ea2"]]),RM=["id"],zM=["id"],PM={key:0,class:"av-btns-group"},VM={key:1},jM={key:2},HM="label",QM=a.defineComponent({__name:"MultiselectCollapse",props:a.mergeModels({isVisible:{type:Boolean},selected:{},options:{},hint:{default:"Utilisez la tabulation (ou les touches flèches) pour naviguer dans la liste des suggestions"},id:{},selectAll:{type:Boolean,default:!1},search:{type:Boolean,default:!1},selectAllLabel:{default:()=>["Tout sélectionner","Tout désélectionner"]},noResultLabel:{default:"Pas de résultat"},maxHeight:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:a.mergeModels(["close"],["update:modelValue"]),setup(t,{emit:e}){a.useCssVars(A=>({ef3bd9be:A.maxHeight}));const n=e;function r(A,g){return`${g}-${A.value}`}const o=a.ref(null),i=a.ref(null);let s=!1;const l=a.useModel(t,"modelValue"),c=a.ref(0),d=a.ref("");function u(A){if(s){s=!1;return}const g=A.target,b=o.value&&o.value.$el?o.value.$el:null,v=i.value;b&&b.contains(g)||v&&v.contains(g)||n("close")}function f(){document.removeEventListener("click",u)}a.watch(()=>t.isVisible,A=>{A?a.nextTick(()=>{s=!0,document.addEventListener("click",u)}):f()});const h=a.computed(()=>t.options.filter(A=>typeof A=="object"&&A!==null?`${A[HM]}`.toLowerCase().includes(d.value.toLowerCase()):`${A}`.toLowerCase().includes(d.value.toLowerCase()))),p=a.computed(()=>t.selected.length<h.value.length?!1:h.value.every(A=>t.selected.includes(A)));function m(){const A=new Set(l.value||[]);p.value?h.value.forEach(g=>{A.delete(g.value)}):h.value.forEach(g=>{A.add(g.value)}),l.value=Array.from(A)}return a.onUnmounted(()=>{f()}),(A,g)=>{const b=q,v=Ge,y=yh,C=br;return t.isVisible?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${t.id}-collapse`,ref_key:"collapse",ref:i,style:a.normalizeStyle({"--width-host":`${a.unref(c)}px`}),class:"av-multiselect__collapse","data-testid":"av-multiselect__collapse"},[a.createElementVNode("p",{id:`${t.id}-text-hint`,class:"av-sr-only"},a.toDisplayString(t.hint),9,zM),t.selectAll?(a.openBlock(),a.createElementBlock("ul",PM,[a.createElementVNode("li",null,[a.createVNode(b,{name:"select-all",size:"sm",disabled:a.unref(h).length===0,label:t.selectAllLabel[a.unref(p)?1:0],icon:a.unref(p)?a.unref(D).CLOSE_CIRCLE_OUTLINE:a.unref(D).CHECK_CIRCLE_OUTLINE,onClick:m},null,8,["disabled","label","icon"])])])):a.createCommentVNode("",!0),t.search?(a.openBlock(),a.createElementBlock("div",VM,[a.createVNode(v,{modelValue:a.unref(d),"onUpdate:modelValue":g[0]||(g[0]=k=>a.isRef(d)?d.value=k:null),"aria-describedby":`${t.id}-text-hint`,"aria-controls":`${t.id}-checkboxes`,"prefix-icon":a.unref(D).MAGNIFY,"aria-live":"polite",placeholder:"Rechercher",type:"search"},null,8,["modelValue","aria-describedby","aria-controls","prefix-icon"])])):a.createCommentVNode("",!0),a.createVNode(C,{"background-color":"var(--dialog)",bordered:"","border-color":"var(--stroke)","border-radius":"var(--radius-lg)",size:"xsmall",class:"multiselect-collapse-options-list"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(h),k=>(a.openBlock(),a.createBlock(y,{id:k.value.toString(),key:`${r(k,t.id)}-fieldset`,modelValue:l.value,"onUpdate:modelValue":g[1]||(g[1]=N=>l.value=N),"list-id":"multiselect-collapse-options-list","aria-label":k.label,label:k.label,icon:k.icon},null,8,["id","modelValue","aria-label","label","icon"]))),128))]),_:1}),a.unref(h).length===0?(a.openBlock(),a.createElementBlock("div",jM,a.toDisplayString(t.noResultLabel),1)):a.createCommentVNode("",!0)],12,RM)):a.createCommentVNode("",!0)}}}),WM=z(QM,[["__scopeId","data-v-a4a72bfa"]]),FM=["title"],UM=["for"],qM={class:"b2-light"},KM={key:0,class:"required"},ZM={key:1,class:"av-hint-text"},YM=a.defineComponent({__name:"AvMultiselect",props:a.mergeModels({disabled:{type:Boolean},id:{},hint:{default:""},collapseHint:{default:"Utilisez la tabulation (ou les touches flèches) pour naviguer dans la liste des suggestions"},label:{},labelVisible:{type:Boolean,default:!0},labelClass:{default:""},options:{default:()=>[]},successMessage:{default:""},errorMessage:{default:""},placeholder:{},dense:{type:Boolean},selectedText:{},selectAll:{type:Boolean,default:!1},selectAllLabel:{default:()=>["Tout sélectionner","Tout désélectionner"]},search:{type:Boolean,default:!1},width:{},height:{},collapseMaxHeight:{}},{modelValue:{default:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(t){a.useCssVars(b=>({v2df2483e:b.width,v1e05a66c:b.height}));const e=a.useModel(t,"modelValue"),n=a.computed(()=>t.id??`multi-select-${crypto.randomUUID()}`),r=a.ref(null),o=a.computed(()=>t.errorMessage||t.successMessage),i=a.computed(()=>t.errorMessage?"error":"success"),s=a.computed(()=>e.value.map(b=>b.value)),l=a.computed(()=>e.value.length===0?t.placeholder:t.selectedText),c=a.ref(!1);function d(b){b.key==="Escape"&&f()}function u(){c.value=!0,document.addEventListener("keydown",d)}function f(){c.value=!1,p()}async function h(){c.value?f():u()}function p(){document.removeEventListener("keydown",d)}function m(b){var y;const v=((y=t.options)==null?void 0:y.filter(C=>b.includes(C.value)))??[];e.value=v}a.onUnmounted(()=>{p()});const A=a.computed(()=>["av-label",{invisible:!t.labelVisible},t.labelClass]),g=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));return(b,v)=>{const y=q,C=wn;return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",{class:a.normalizeClass(["av-select-group",{[`av-select-group--${a.unref(i)}`]:a.unref(o)}]),title:a.unref(l)},[a.createElementVNode("label",{class:a.normalizeClass(a.unref(A)),for:a.unref(n)},[a.createElementVNode("span",qM,a.toDisplayString(t.label),1),"required"in b.$attrs&&b.$attrs.required!==!1?(a.openBlock(),a.createElementBlock("span",KM)):a.createCommentVNode("",!0),t.hint?(a.openBlock(),a.createElementBlock("span",ZM,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],10,UM),a.createVNode(y,a.mergeProps({id:a.unref(n),ref_key:"host",ref:r,type:"button",variant:"OUTLINED"},b.$attrs,{label:a.unref(l),class:["av-multiselect",{"av-multiselect--is-open":a.unref(c),"av-multiselect--dense":t.dense,"av-multiselect--unselected":e.value.length===0,"av-multiselect--selected":e.value.length>0}],disabled:t.disabled,"aria-expanded":a.unref(c),"aria-controls":`${a.unref(n)}-collapse`,small:t.dense,style:a.unref(g),onClick:h}),null,16,["id","label","disabled","aria-expanded","aria-controls","class","small","style"]),a.createVNode(WM,{id:a.unref(n),modelValue:a.unref(s),"onUpdate:modelValue":[v[0]||(v[0]=k=>a.isRef(s)?s.value=k:null),m],hint:t.collapseHint,"is-visible":a.unref(c),"select-all":t.selectAll,"select-all-label":t.selectAllLabel,search:t.search,options:t.options,selected:e.value,"max-height":t.collapseMaxHeight,onClose:f},null,8,["id","modelValue","hint","is-visible","select-all","select-all-label","search","options","selected","max-height"])],10,FM),a.createVNode(C,{"message-id":`multiselect-${a.unref(i)}-desc-${a.unref(i)}`,type:a.unref(i),message:a.unref(o)},null,8,["message-id","type","message"])],64)}}}),XM=z(YM,[["__scopeId","data-v-f8a90d5f"]]),JM={key:0,class:"av-select-prefix av-align-center av-col av-text-text2"},GM=["for"],$M={key:0,class:"required"},_M={key:1,class:"av-hint-text"},ew=["id","value","name","disabled","aria-disabled","required","aria-required","aria-describedby","title"],tw={disabled:"",value:"",hidden:""},nw=["label","data-testid"],rw=["value","disabled","aria-disabled"],ow=["value","disabled","aria-disabled"],iw=a.defineComponent({__name:"AvSelect",props:a.mergeModels({required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},id:{},name:{default:""},hint:{default:""},label:{default:""},options:{default:()=>[]},successMessage:{default:""},errorMessage:{default:""},placeholder:{},dense:{type:Boolean,default:!1},prefixIcon:{}},{selectedItem:{default:()=>({itemId:""})},selectedItemModifiers:{}}),emits:["update:selectedItem"],setup(t){const e=a.useModel(t,"selectedItem"),n=a.computed(()=>String(e.value.itemId??"")),r=t.id??`select-${crypto.randomUUID()}`,o=a.computed(()=>{if(!n.value)return t.placeholder;const h=d(n.value);return h?h.label:t.placeholder}),i=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`})),s=a.computed(()=>t.errorMessage||t.successMessage),l=a.computed(()=>t.errorMessage?"error":"success");function c(h){return Array.isArray(h.children)}function d(h){for(const p of t.options){if(c(p)&&p.children){const m=p.children.find(A=>String(A.id)===h);if(m)return m}if(String(p.id)===h)return p}}function u(h){for(const p of t.options){if(c(p)&&p.children){const m=p.children.find(A=>String(A.id)===h);if(m)return{itemId:m.id,parentId:p.id}}if(String(p.id)===h)return{itemId:p.id}}return{itemId:h}}function f(h){const p=h.target.value;e.value=u(p)}return(h,p)=>{const m=wn;return a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass({"av-select--dense":t.dense})},[a.createElementVNode("div",{class:a.normalizeClass(["av-select-group",{[`av-select-group--${a.unref(l)}`]:a.unref(s)}])},[a.createElementVNode("div",{class:a.normalizeClass(["av-select-control",{"av-select-control--disabled":t.disabled}])},[t.prefixIcon?(a.openBlock(),a.createElementBlock("div",JM,[a.createVNode(le,{name:t.prefixIcon,size:1.2},null,8,["name"])])):a.createCommentVNode("",!0),a.createElementVNode("label",{class:"av-label b2-light",for:a.unref(r)},[a.createElementVNode("span",null,a.toDisplayString(t.label),1),t.required?(a.openBlock(),a.createElementBlock("span",$M," *")):a.createCommentVNode("",!0),t.hint?(a.openBlock(),a.createElementBlock("span",_M,a.toDisplayString(t.hint),1)):a.createCommentVNode("",!0)],8,GM),a.createElementVNode("select",a.mergeProps({id:a.unref(r),value:a.unref(n),class:[{[`av-select--${a.unref(l)}`]:a.unref(s),"av-select--with-prefix av-pl-xl":t.prefixIcon,"av-py-xxs":t.dense,"av-py-xs":!t.dense},"av-select b2-light av-w-full av-pr-xl av-pl-sm av-text-text2 av-radius-lg"],name:t.name||a.unref(r),disabled:t.disabled,"aria-disabled":t.disabled,required:t.required,"aria-required":t.required,"aria-describedby":a.unref(s)?`${a.unref(r)}-${a.unref(l)}`:void 0,title:a.unref(o)},h.$attrs,{style:a.unref(i),onChange:f}),[a.createElementVNode("option",tw,a.toDisplayString(t.placeholder),1),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.options,(A,g)=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:g},[c(A)&&A.children?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[A.children.length>0?(a.openBlock(),a.createElementBlock("optgroup",{key:0,label:A.label,"data-testid":`select-optgroup-${A.id}`},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(A.children,(b,v)=>(a.openBlock(),a.createElementBlock("option",{key:`${g}-${v}`,value:b.id,disabled:b.disabled,"aria-disabled":b.disabled},a.toDisplayString(b.label),9,rw))),128))],8,nw)):a.createCommentVNode("",!0)],64)):(a.openBlock(),a.createElementBlock("option",{key:1,value:A.id,disabled:A.disabled,"aria-disabled":A.disabled},a.toDisplayString(A.label),9,ow))],64))),128))],16,ew)],2),a.createVNode(m,{"message-id":`${a.unref(r)}-${a.unref(l)}`,message:a.unref(s),type:a.unref(l)},null,8,["message-id","message","type"])],2)],2)}}}),sw=z(iw,[["__scopeId","data-v-574bbbf6"]]),aw=a.defineComponent({__name:"AvTab",props:{title:{},icon:{}},setup(t){return(e,n)=>a.renderSlot(e.$slots,"default")}}),lw=["id","aria-labelledby","tabindex"],cw=a.defineComponent({__name:"TabContent",props:{panelId:{},tabId:{},isVisible:{type:Boolean}},setup(t){return(e,n)=>a.withDirectives((a.openBlock(),a.createElementBlock("div",{id:t.panelId,class:a.normalizeClass(["av-tab-content",{"av-tab-content--selected":t.isVisible}]),role:"tabpanel","aria-labelledby":t.tabId,tabindex:t.isVisible?0:-1},[a.renderSlot(e.$slots,"default",{},void 0,!0)],10,lw)),[[a.vShow,t.isVisible]])}}),dw=z(cw,[["__scopeId","data-v-3bab28a1"]]),uw=["id","tabindex","aria-selected","aria-controls"],fw=a.defineComponent({inheritAttrs:!1,__name:"TabItem",props:{panelId:{},tabId:{},isSelected:{type:Boolean},title:{},icon:{},compact:{type:Boolean,default:!1}},emits:["click","next","previous","first","last"],setup(t,{emit:e}){const n=e,r=a.useTemplateRef("button"),o=a.computed(()=>t.isSelected?"s2-bold":"s2-regular"),i={ArrowRight:"next",ArrowLeft:"previous",Home:"first",End:"last"};function s(l){const c=l==null?void 0:l.key,d=i[c];if(d)switch(d){case"next":n("next");break;case"previous":n("previous");break;case"first":n("first");break;case"last":n("last");break}}return a.watch(()=>t.isSelected,()=>{var l;t.isSelected&&((l=r.value)==null||l.focus())}),(l,c)=>{const d=le;return a.openBlock(),a.createElementBlock("li",{class:a.normalizeClass(["av-tab-item av-py-xs",{"av-tab-item--compact av-no-before":t.compact,"av-flex-fill av-w-full":!t.compact}]),role:"presentation"},[a.createElementVNode("button",a.mergeProps(l.$attrs,{id:t.tabId,ref:"button",class:["av-tab-item__tab av-row av-gap-xs av-align-center av-justify-center av-text-text2 av-w-full",{"av-tab-item--compact__tab av-radius-none av-m-none av-py-xs av-px-2xl":t.compact,"av-radius-lg":!t.compact}],tabindex:t.isSelected?0:-1,role:"tab",type:"button","aria-selected":t.isSelected,"aria-controls":t.panelId,onClick:c[0]||(c[0]=a.withModifiers(u=>n("click",t.tabId),["prevent"])),onKeydown:c[1]||(c[1]=u=>s(u))}),[t.icon?(a.openBlock(),a.createBlock(d,{key:0,name:t.icon,size:2},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",{class:a.normalizeClass(a.unref(o))},a.toDisplayString(t.title),3)],16,uw)],2)}}}),hw=z(fw,[["__scopeId","data-v-0ad74b1b"]]);function pw(t,e,n){const r=a.ref({"--tabs-height":"100px"});function o(){if(n.value<0||!t.value||!t.value.offsetHeight)return;const i=t.value.offsetHeight,s=e.value[n.value];if(!s||!s.offsetHeight)return;const l=s.offsetHeight;r.value["--tabs-height"]=`${i+l}px`}return{tabsStyle:r,updateTabsStyle:o}}const mw=["aria-label"],Aw=a.defineComponent({__name:"AvTabs",props:a.mergeModels({ariaLabel:{},compact:{type:Boolean,default:!1}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=a.useSlots(),n=a.computed(()=>{var g;return((g=e.default)==null?void 0:g.call(e))||[]}),r=a.useModel(t,"modelValue"),o=a.ref(null),i=a.ref(null),s=a.reactive({}),{tabsStyle:l,updateTabsStyle:c}=pw(i,a.computed(()=>{var g;return Array.from(((g=o.value)==null?void 0:g.querySelectorAll(".av-tab-content"))||[])}),r);function d(g){if(s[g])return s[g];const b=`tab-${crypto.randomUUID()}`;return s[g]=b,b}function u(g){const b=n.value.length;r.value=(r.value+g+b)%b}function f(){u(-1)}function h(){u(1)}function p(){r.value=0}function m(){r.value=n.value.length-1}const A=a.ref(null);return a.onMounted(()=>{var g;window.ResizeObserver&&(A.value=new window.ResizeObserver(()=>{c()})),(g=o.value)==null||g.querySelectorAll(".av-tab-content").forEach(b=>{var v;b&&((v=A.value)==null||v.observe(b))})}),a.onUnmounted(()=>{var g,b;(g=o.value)==null||g.querySelectorAll(".av-tab-content").forEach(v=>{var y;v&&((y=A.value)==null||y.unobserve(v))}),(b=A.value)==null||b.disconnect()}),(g,b)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"$el",ref:o,class:a.normalizeClass(["av-tabs",{"av-tabs--compact":t.compact}]),style:a.normalizeStyle(a.unref(l))},[a.createElementVNode("ul",{ref_key:"tablist",ref:i,class:a.normalizeClass(["av-tabs__list av-row av-px-xs av-py-none av-align-center av-gap-sm av-list-reset av-radius-lg",{"av-tabs__list--compact":t.compact,"av-w-full":!t.compact}]),role:"tablist","aria-label":t.ariaLabel??"Liste d’onglets"},[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),(v,y)=>{var C,k,N;return a.openBlock(),a.createBlock(hw,{key:y,"tab-id":d(y),"panel-id":`${d(y)}-panel`,title:(C=v.props)==null?void 0:C.title,icon:(k=v.props)==null?void 0:k.icon,"data-testid":(N=v.props)==null?void 0:N["data-testid"],compact:t.compact,"is-selected":r.value===y,onClick:S=>r.value=y,onNext:h,onPrevious:f,onFirst:p,onLast:m},null,8,["tab-id","panel-id","title","icon","data-testid","compact","is-selected","onClick"])}),128))],10,mw),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(n),(v,y)=>(a.openBlock(),a.createBlock(dw,{key:y,"panel-id":`${d(y)}-panel`,"tab-id":d(y),"is-visible":r.value===y},{default:a.withCtx(()=>[r.value===y?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(v.children.default),{key:0})):a.createCommentVNode("",!0)]),_:2},1032,["panel-id","tab-id","is-visible"]))),128))],6))}}),gw=z(Aw,[["__scopeId","data-v-28c0db9a"]]),bw="data:image/svg+xml,%3csvg%20width='35'%20height='20'%20viewBox='0%200%2035%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20opacity='0.6'%20y='3'%20width='34'%20height='14'%20rx='7'%20fill='%23D4D4EC'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M24.5%2020C30.0228%2020%2034.5%2015.5228%2034.5%2010C34.5%204.47715%2030.0228%200%2024.5%200C18.9772%200%2014.5%204.47715%2014.5%2010C14.5%2015.5228%2018.9772%2020%2024.5%2020Z'%20fill='%23000091'/%3e%3c/svg%3e",vw="data:image/svg+xml,%3csvg%20width='34'%20height='20'%20viewBox='0%200%2034%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20y='3'%20width='34'%20height='14'%20rx='7'%20fill='%2314171A'%20fill-opacity='0.36'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M10%2020C15.5228%2020%2020%2015.5228%2020%2010C20%204.47715%2015.5228%200%2010%200C4.47715%200%200%204.47715%200%2010C0%2015.5228%204.47715%2020%2010%2020Z'%20fill='%23F6F6F6'/%3e%3cpath%20d='M10%200.5C15.2467%200.5%2019.5%204.75329%2019.5%2010C19.5%2015.2467%2015.2467%2019.5%2010%2019.5C4.75329%2019.5%200.5%2015.2467%200.5%2010C0.5%204.75329%204.75329%200.5%2010%200.5Z'%20stroke='%2314171A'%20stroke-opacity='0.36'/%3e%3c/svg%3e",yw=["id","for"],Cw={width:"34",height:"14"},Iw=["href"],kw={key:0,class:"caption-bold no-select"},Ew={key:1,class:"caption-regular no-select"},Mw={class:"caption-regular"},ww=["id","disabled","aria-disabled","checked","data-testid","aria-describedby","name"],Nw=a.defineComponent({__name:"AvToggle",props:{modelValue:{type:Boolean},description:{},id:{},disabled:{type:Boolean},activeText:{default:"On"},inactiveText:{default:"Off"},name:{}},emits:["update:modelValue"],setup(t){const e=a.computed(()=>t.id??`toggle-${crypto.randomUUID()}`),n=a.computed(()=>`${e.value}-label`);return(r,o)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("label",{id:a.unref(n),for:a.unref(e),class:a.normalizeClass(["av-toggle av-row av-justify-center av-gap-xs av-align-start",{"av-toggle--disabled":t.disabled}])},[a.createElementVNode("div",{class:a.normalizeClass(["toggle av-row av-justify-center av-align-center av-gap-xxs",{"toggle--disabled":t.disabled}])},[(a.openBlock(),a.createElementBlock("svg",Cw,[a.createElementVNode("image",{href:t.modelValue?a.unref(bw):a.unref(vw),width:"34",height:"14"},null,8,Iw)])),t.modelValue?(a.openBlock(),a.createElementBlock("span",kw,a.toDisplayString(t.activeText),1)):(a.openBlock(),a.createElementBlock("span",Ew,a.toDisplayString(t.inactiveText),1))],2),a.createElementVNode("span",Mw,a.toDisplayString(t.description),1)],10,yw),a.createElementVNode("input",{id:a.unref(e),style:{display:"none"},disabled:t.disabled,"aria-disabled":t.disabled,type:"checkbox",checked:t.modelValue,"data-testid":a.unref(e),"aria-describedby":a.unref(n),name:t.name,onInput:o[0]||(o[0]=i=>r.$emit("update:modelValue",i.target.checked))},null,40,ww)],64))}}),xw=z(Nw,[["__scopeId","data-v-49a101c1"]]),xn=a.defineComponent({inheritAttrs:!1,__name:"AvCancelConfirmButtons",props:{cancelLabel:{},cancelIcon:{default:()=>D.CLOSE_CIRCLE_OUTLINE},cancelDisabled:{type:Boolean},cancelIsLoading:{type:Boolean},confirmLabel:{},confirmIcon:{default:()=>D.CHECK_CIRCLE_OUTLINE},confirmDisabled:{type:Boolean},confirmIsLoading:{type:Boolean},iconOnly:{type:Boolean,default:!1},form:{}},emits:["cancel","confirm"],setup(t,{emit:e}){const n=e,r=a.useAttrs();return(o,i)=>(a.openBlock(),a.createElementBlock("div",a.mergeProps({class:"av-cancel-confirm-buttons-container av-row av-gap-sm"},a.unref(r)),[t.cancelLabel?(a.openBlock(),a.createBlock(a.unref(q),{key:0,icon:t.cancelIcon,label:t.cancelLabel,title:t.cancelLabel,variant:"OUTLINED","is-loading":t.cancelIsLoading,disabled:t.cancelDisabled,"icon-only":t.iconOnly,small:"","data-testid":"cancel-button",onClick:i[0]||(i[0]=s=>n("cancel"))},null,8,["icon","label","title","is-loading","disabled","icon-only"])):a.createCommentVNode("",!0),t.confirmLabel?(a.openBlock(),a.createBlock(a.unref(q),{key:1,icon:t.confirmIcon,label:t.confirmLabel,title:t.confirmLabel,variant:"FLAT","is-loading":t.confirmIsLoading,disabled:t.confirmDisabled,type:t.form?"submit":void 0,form:t.form,"icon-only":t.iconOnly,small:"","data-testid":"confirm-button",onClick:i[1]||(i[1]=s=>n("confirm"))},null,8,["icon","label","title","is-loading","disabled","type","form","icon-only"])):a.createCommentVNode("",!0)],16))}}),Sw={class:"av-row av-justify-end"},Tw={class:"av-header__menu-drawer"},Lw={class:"av-header__menu-drawer-links av-col"},Dw=a.defineComponent({__name:"HeaderMenuDrawer",props:{showDrawer:{type:Boolean},quickLinks:{},languageSelectorRef:{},quickLinksAriaLabel:{},closeLabel:{}},emits:["languageSelect","close","quickLinkClick"],setup(t){return(e,n)=>{const r=xn,o=Qs,i=Vs,s=Ps;return a.openBlock(),a.createBlock(s,{show:t.showDrawer,padding:"var(--spacing-sm)",width:"75%","data-testid":"header-menu-drawer",onEscapePressed:n[3]||(n[3]=l=>e.$emit("close"))},{default:a.withCtx(()=>[a.createElementVNode("div",Sw,[a.createVNode(r,{"cancel-label":t.closeLabel,"cancel-icon":a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"",onCancel:n[0]||(n[0]=l=>e.$emit("close"))},null,8,["cancel-label","cancel-icon"])]),a.createElementVNode("div",Tw,[a.createElementVNode("div",Lw,[t.languageSelectorRef?(a.openBlock(),a.createBlock(o,a.mergeProps({key:0},t.languageSelectorRef,{onSelect:n[1]||(n[1]=l=>e.$emit("languageSelect",l))}),null,16)):a.createCommentVNode("",!0),a.renderSlot(e.$slots,"before-quick-links",{},void 0,!0),a.createVNode(i,{role:"navigation",links:t.quickLinks,"nav-aria-label":t.quickLinksAriaLabel,"data-testid":"header-menu-drawer-links",onLinkClick:n[2]||(n[2]=l=>e.$emit("quickLinkClick"))},null,8,["links","nav-aria-label"]),a.renderSlot(e.$slots,"after-quick-links",{},void 0,!0)]),a.renderSlot(e.$slots,"mainnav",{},void 0,!0)])]),_:3},8,["show"])}}}),Ow=z(Dw,[["__scopeId","data-v-61c30f71"]]),Bw={class:"av-row av-justify-end"},Rw=a.defineComponent({__name:"HeaderSearchDrawer",props:{showDrawer:{type:Boolean},searchLabel:{},modelValue:{},placeholder:{},closeLabel:{}},emits:["update:modelValue","search","close"],setup(t){return(e,n)=>{const r=xn,o=Ta,i=Ps;return a.openBlock(),a.createBlock(i,{show:t.showDrawer,padding:"var(--spacing-sm)",width:"75%","data-testid":"header-search-drawer",onEscapePressed:n[3]||(n[3]=s=>e.$emit("close"))},{default:a.withCtx(()=>[a.createElementVNode("div",Bw,[a.createVNode(r,{"cancel-label":t.closeLabel,"cancel-icon":a.unref(D).CLOSE_CIRCLE_OUTLINE,"icon-only":"",onCancel:n[0]||(n[0]=s=>e.$emit("close"))},null,8,["cancel-label","cancel-icon"])]),a.createVNode(o,{"model-value":t.modelValue,label:t.searchLabel,placeholder:t.placeholder,"onUpdate:modelValue":n[1]||(n[1]=s=>e.$emit("update:modelValue",s)),onSearch:n[2]||(n[2]=s=>e.$emit("search",s))},null,8,["model-value","label","placeholder"])]),_:1},8,["show"])}}}),zw={class:"av-header__tools av-hidden av-unhidden--lg av-align-end--lg av-col--lg av-pl-sm--lg av-pr-md--lg"},Pw={class:"av-header__tools-links av-row--lg av-justify-end--lg av-align-center--lg av-gap-xs--lg av-pb-sm--lg"},Vw={key:0,class:"av-header__search"},jw=a.defineComponent({__name:"HeaderToolbar",props:{modelValue:{},placeholder:{},quickLinks:{},languageSelectorRef:{},searchLabel:{},quickLinksAriaLabel:{},showSearch:{type:Boolean}},emits:["languageSelect","update:modelValue","search"],setup(t,{emit:e}){const n=e;return(r,o)=>{var i;return a.openBlock(),a.createElementBlock("div",zw,[a.createElementVNode("div",Pw,[a.renderSlot(r.$slots,"before-quick-links",{},void 0,!0),(i=t.quickLinks)!=null&&i.length?(a.openBlock(),a.createBlock(Vs,{key:0,links:t.quickLinks,"nav-aria-label":t.quickLinksAriaLabel},null,8,["links","nav-aria-label"])):a.createCommentVNode("",!0),a.renderSlot(r.$slots,"after-quick-links",{},void 0,!0),t.languageSelectorRef?(a.openBlock(),a.createBlock(Qs,a.mergeProps({key:1},t.languageSelectorRef,{onSelect:o[0]||(o[0]=s=>n("languageSelect",s))}),null,16)):a.createCommentVNode("",!0)]),t.showSearch?(a.openBlock(),a.createElementBlock("div",Vw,[a.createVNode(Ta,{label:t.searchLabel,"model-value":t.modelValue,placeholder:t.placeholder,"onUpdate:modelValue":o[1]||(o[1]=s=>n("update:modelValue",s)),onSearch:o[2]||(o[2]=s=>n("search",s))},null,8,["label","model-value","placeholder"])])):a.createCommentVNode("",!0)])}}}),Hw=z(jw,[["__scopeId","data-v-6cb8a173"]]),Oa=Symbol("header"),Qw={role:"banner",class:"av-header"},Ww={class:"av-header__body"},Fw={class:"av-container"},Uw={class:"av-row av-justify-start av-align-center av-py-sm"},qw={class:"av-header__menu av-hidden av-unhidden--lg av-mt-sm"},Kw={key:0,class:"av-container av-header__mainnav"},Zw=a.defineComponent({__name:"AvHeader",props:{homeTo:{default:"/"},modelValue:{default:""},placeholder:{default:"Rechercher..."},quickLinks:{default:()=>[]},languageSelector:{default:()=>{}},searchLabel:{default:"Recherche"},quickLinksAriaLabel:{default:"Menu secondaire"},showSearch:{type:Boolean,default:!1},showSearchLabel:{default:"Recherche"},menuLabel:{default:"Menu"},closeDrawerLabel:{default:"Fermer"},homeLabel:{}},emits:["languageSelect","update:modelValue","search"],setup(t,{emit:e}){const n=e,r=a.useSlots(),o=a.toRef(()=>t.languageSelector),i=a.ref("closed");function s(){i.value="closed"}function l(f){f.key==="Escape"&&s()}a.onMounted(()=>{document.addEventListener("keydown",l)}),a.onUnmounted(()=>{document.removeEventListener("keydown",l)});function c(){i.value="menu"}function d(){i.value="search"}const u=a.computed(()=>!!r.mainnav);return a.provide(Oa,()=>s),(f,h)=>(a.openBlock(),a.createElementBlock("header",Qw,[a.createElementVNode("div",Ww,[a.createElementVNode("div",Fw,[a.createElementVNode("div",Uw,[a.createVNode(Sp,{"home-to":t.homeTo,title:t.homeLabel,"show-search-button":t.showSearch,"show-search-label":t.showSearchLabel,"show-menu-button":a.unref(u)||t.quickLinks.length>0,"show-menu-label":t.menuLabel,onShowSearchDrawer:d,onShowMenuDrawer:c},{roleContext:a.withCtx(()=>[a.renderSlot(f.$slots,"roleContext",{},void 0,!0)]),_:3},8,["home-to","title","show-search-button","show-search-label","show-menu-button","show-menu-label"]),a.createVNode(Hw,{"model-value":t.modelValue,placeholder:t.placeholder,"quick-links":t.quickLinks,"language-selector-ref":a.unref(o),"search-label":t.searchLabel,"quick-links-aria-label":t.quickLinksAriaLabel,"show-search":t.showSearch,"onUpdate:modelValue":h[0]||(h[0]=p=>n("update:modelValue",p)),onSearch:h[1]||(h[1]=p=>n("search",p)),onLanguageSelect:h[2]||(h[2]=p=>n("languageSelect",p))},{"before-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"before-quick-links",{},void 0,!0)]),"after-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"after-quick-links",{},void 0,!0)]),_:3},8,["model-value","placeholder","quick-links","language-selector-ref","search-label","quick-links-aria-label","show-search"])]),a.renderSlot(f.$slots,"default",{},void 0,!0)])]),a.createElementVNode("div",qw,[a.unref(i)==="closed"?(a.openBlock(),a.createElementBlock("div",Kw,[a.renderSlot(f.$slots,"mainnav",{},void 0,!0)])):a.createCommentVNode("",!0)]),a.createVNode(Rw,{"show-drawer":a.unref(i)==="search","search-label":t.searchLabel,"close-label":t.closeDrawerLabel,"model-value":t.modelValue,placeholder:t.placeholder,"data-testid":"header-search-drawer",onClose:s,"onUpdate:modelValue":h[3]||(h[3]=p=>n("update:modelValue",p)),onSearch:h[4]||(h[4]=p=>n("search",p))},null,8,["show-drawer","search-label","close-label","model-value","placeholder"]),a.createVNode(Ow,{"show-drawer":a.unref(i)==="menu","quick-links":t.quickLinks,"language-selector-ref":a.unref(o),"close-label":t.closeDrawerLabel,"quick-links-aria-label":t.quickLinksAriaLabel,"data-testid":"header-menu-drawer",onClose:s,onQuickLinkClick:s,onLanguageSelect:h[5]||(h[5]=p=>n("languageSelect",p))},{"before-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"before-quick-links",{},void 0,!0)]),"after-quick-links":a.withCtx(()=>[a.renderSlot(f.$slots,"after-quick-links",{},void 0,!0)]),mainnav:a.withCtx(()=>[a.renderSlot(f.$slots,"mainnav",{},void 0,!0)]),_:3},8,["show-drawer","quick-links","language-selector-ref","close-label","quick-links-aria-label"])]))}}),Yw=z(Zw,[["__scopeId","data-v-25c5666c"]]),Xw={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 106.703 44.429"};function Jw(t,e){return a.openBlock(),a.createElementBlock("svg",Xw,[...e[0]||(e[0]=[a.createElementVNode("path",{d:"M33.63 110.595q-.883.002-1.403.293a1.95 1.95 0 0 0-.781.783 3.1 3.1 0 0 0-.34 1.087q-.08.597-.08 1.21.001.499.091 1.086.09.589.374 1.098.283.506.792.85.51.339 1.347.339t1.347-.34q.51-.341.78-.85.271-.508.363-1.096.09-.588.09-1.087 0-.498-.09-1.087a3.4 3.4 0 0 0-.363-1.097 2.3 2.3 0 0 0-.78-.85q-.51-.339-1.347-.339m-5.296 3.394q0-1.425.294-2.547c.196-.744.51-1.38.94-1.898a4.2 4.2 0 0 1 1.64-1.2q.997-.422 2.422-.42 1.493.046 2.67.678.498.274.985.702.487.43.86 1.076.373.645.61 1.528.24.882.24 2.06 0 1.175-.216 2.06a6.2 6.2 0 0 1-.565 1.517 4.37 4.37 0 0 1-1.71 1.74q-1.086.613-2.49.634a4.6 4.6 0 0 1-1.357-.292 4.3 4.3 0 0 1-1.155-.724q-.588-.502-.973-1.45l.498.657v5.386h-2.693zM45.625 110.595q-.837 0-1.347.339-.51.338-.78.85a3.4 3.4 0 0 0-.363 1.097 7 7 0 0 0-.09 1.087q0 .499.09 1.086.09.589.362 1.098.273.506.781.85.51.339 1.347.339t1.347-.34q.51-.341.78-.85.271-.508.363-1.096.09-.588.09-1.087 0-.498-.09-1.087a3.4 3.4 0 0 0-.363-1.097 2.3 2.3 0 0 0-.78-.85q-.51-.339-1.347-.339m-5.364 3.373q0-1.178.227-2.06.225-.883.6-1.528.372-.646.859-1.076.487-.427.984-.702c.785-.42 1.683-.649 2.694-.677.996.028 1.885.257 2.67.677q.499.274.985.702.488.43.86 1.076.374.645.611 1.528c.159.589.239 1.273.239 2.06q0 1.175-.239 2.06a6.2 6.2 0 0 1-.61 1.517q-.375.632-.86 1.051a5.7 5.7 0 0 1-.985.688q-1.178.615-2.671.635-1.516-.02-2.694-.635-.497-.27-.984-.688a4.2 4.2 0 0 1-.86-1.05 5.9 5.9 0 0 1-.6-1.518q-.225-.884-.226-2.06M52.347 111.57q0-1.18.497-1.846c.333-.444.695-.783 1.087-1.009a3.9 3.9 0 0 1 1.584-.497h3.17v2.737h-2.128q-.453 0-.736.159-.283.158-.442.342-.18.222-.249.498v7.74h-2.783zM62.78 110.913v5.045q.07.275.25.497.158.184.442.342.282.159.735.159h1.72v2.738h-2.761a3.9 3.9 0 0 1-1.584-.498q-.59-.337-1.076-1.009-.487-.665-.486-1.845v-11.2h2.76v3.076h2.604v2.695zM72.558 110.595q-.838 0-1.347.339-.51.338-.78.85a3.4 3.4 0 0 0-.363 1.097 7 7 0 0 0-.09 1.087q0 .499.09 1.086.09.589.362 1.098.271.506.781.85.51.339 1.347.339t1.347-.34q.51-.341.792-.85t.373-1.096.09-1.087q0-.613-.079-1.21a3.2 3.2 0 0 0-.339-1.087 1.96 1.96 0 0 0-.781-.783q-.52-.292-1.403-.293m5.296 9.099h-2.693v-1.584l.498-.657q-.385.948-.974 1.45a4.3 4.3 0 0 1-1.154.723q-.656.25-1.358.293-1.404-.02-2.49-.635a4.8 4.8 0 0 1-.917-.688 4.4 4.4 0 0 1-.791-1.05 6.2 6.2 0 0 1-.566-1.518q-.215-.885-.215-2.06 0-1.179.226-2.06.226-.883.6-1.528.374-.646.86-1.076.487-.427.984-.702c.784-.42 1.683-.649 2.694-.677.95 0 1.758.137 2.421.42a4.2 4.2 0 0 1 1.642 1.2q.645.779.939 1.897.293 1.123.294 2.547zM82.086 108.218v11.476h-2.761v-11.476zm-2.761-2.558q0-.497.01-.744c.008-.166.053-.29.137-.364q.123-.112.408-.123a22 22 0 0 1 1.651 0q.284.012.408.123c.082.074.128.198.136.364q.01.247.01.744 0 .498-.01.748-.012.248-.136.363-.125.112-.408.124-.282.01-.826.01-.543 0-.825-.01-.285-.012-.408-.124-.126-.115-.136-.363-.01-.25-.011-.748M86.409 104.415v15.279h-2.761v-15.28z",style:{fill:"#ed184e","fill-opacity":"1","fill-rule":"nonzero",stroke:"none","stroke-width":".0352778"},transform:"translate(20.294 -79.068)"},null,-1),a.createElementVNode("path",{d:"M-7.05 88.543v-2.07c-.042-2.414-.677-3.176-2.877-3.176-2.75 0-2.623 2.117-2.623 4.273v.973zm-11.001-.635c-.254-5.627 2.623-8.84 8.04-8.84 7.658 0 8.462 3.975 8.462 10.491v3.218H-12.55v3.467c.042 3.133 1.226 3.726 2.876 3.726 2.032 0 2.624-1.482 2.54-4.488h5.5c.212 5.334-1.989 8.718-7.616 8.718-6.347 0-8.928-3.003-8.801-10.026zM6.498 95.606v1.68c0 1.364.443 2.567 2.22 2.567 1.3 0 1.87-1.17 1.87-2.377 0-1.997-1.649-2.76-3.108-3.648-1.712-.98-3.17-1.902-4.217-3.108-1.015-1.203-1.618-2.664-1.618-4.756 0-4.473 2.696-6.755 7.01-6.755 4.851 0 7.324 3.235 7.07 7.708H10.59c-.064-1.397 0-3.299-1.84-3.426-1.142-.095-1.808.54-1.934 1.584-.159 1.43.57 2.16 1.68 2.918 2.094 1.333 3.902 2.159 5.201 3.362 1.3 1.206 2.062 2.79 2.062 5.676 0 4.569-2.537 7.105-7.167 7.105-5.107 0-7.263-2.854-7.263-5.994v-2.536zM18.202 79.78h5.58v17.95c0 1.143.35 2.123 1.936 2.123 1.459 0 1.902-1.266 1.902-2.282V79.78h5.582v17.218c0 4.03-1.808 7.137-7.516 7.137-4.725 0-7.484-2.25-7.484-7.137zM41.959 90.025c1.046-.032 2.251.095 3.139-.603.57-.635.697-1.588.697-2.41 0-.92-.095-2.318-1.046-2.759-.539-.19-1.3-.19-2.188-.19h-.602Zm-5.582 13.54V79.78h6.628c2.156 0 5.265.19 6.818 1.965 1.3 1.46 1.554 3.235 1.554 5.172 0 2.568-.602 5.454-3.14 6.625-1.934.953-4.185.667-6.278.762v9.26zM-.829 110.698c6.226-2.653 13.474-2.755 18.015-.755 4.673 1.965 5.629 4.963 5.558 4.861.038-.032-2.698-.748-6.348-.176-3.67.472-8.091 2.317-13.293 4.483-1.086.448-3.113 1.306-4.954 1.61-1.847.398-3.718.387-5.407.21a17.95 17.95 0 0 1-8.026-2.934c-3.85-2.632-4.992-5.51-5.01-5.475-.015-.018 2.773.769 6.675 1.02 1.938.126 4.122.056 6.191-.396 1.034-.23 2.059-.476 3.046-.903 1.04-.37 1.78-.8 3.553-1.545",style:{fill:"#3871c1","fill-opacity":"1","fill-rule":"nonzero",stroke:"none","stroke-width":".0352778"},transform:"translate(20.294 -79.068)"},null,-1)])])}const Gw={render:Jw},$w={class:"svg-wrapper av-p-xxxs"},_w=a.defineComponent({__name:"EsupLogo",props:{width:{},height:{},color:{}},setup(t){a.useCssVars(n=>({v1854cb30:n.color}));const e=a.computed(()=>({...t.width&&{width:t.width},...t.height&&{height:t.height}}));return(n,r)=>(a.openBlock(),a.createElementBlock("div",$w,[a.createVNode(a.unref(Gw),a.mergeProps(a.unref(e),{class:"logo",role:"img","aria-label":"Logo Esup Portail"}),null,16)]))}}),eN=z(_w,[["__scopeId","data-v-b032c39a"]]),tN=["aria-label"],nN=["id"],rN={key:0,class:"av-breadcrumb__list av-list-reset"},oN=["aria-current"],iN=a.defineComponent({__name:"AvBreadcrumb",props:{id:{},links:{},navigationLabel:{default:"Fil d'Ariane"},showBreadcrumbLabel:{default:"Voir le fil d'Ariane"}},setup(t){const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o}=Ko(),{isAboveMd:i}=js(),s=t.id??`breadcrumb-${crypto.randomUUID()}`,l=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_RIGHT})`})),c=a.ref(i.value);return a.watch(c,(d,u)=>{d!==u&&o(d)}),a.watch(i,d=>{c.value=d}),a.onMounted(()=>{o(c.value)}),(d,u)=>{const f=q,h=a.resolveComponent("RouterLink");return t.links&&t.links.length?(a.openBlock(),a.createElementBlock("nav",{key:0,role:"navigation","aria-label":t.navigationLabel,class:"av-breadcrumb"},[a.unref(c)?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(f,{key:0,"aria-expanded":a.unref(c),"aria-controls":a.unref(s),class:"av-breadcrumb__button",label:t.showBreadcrumbLabel,small:"","no-sentence-case":"",onClick:u[0]||(u[0]=p=>c.value=!a.unref(c))},null,8,["aria-expanded","aria-controls","label"])),a.createElementVNode("div",{id:a.unref(s),ref_key:"collapse",ref:e,class:a.normalizeClass(["av-collapse",{"av-collapse--expanded":a.unref(r),"av-collapsing":a.unref(n)}])},[a.unref(c)?(a.openBlock(),a.createElementBlock("ol",rN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(p,m)=>(a.openBlock(),a.createElementBlock("li",{key:m,class:"av-breadcrumb__item",style:a.normalizeStyle(a.unref(l))},[p.to?(a.openBlock(),a.createBlock(h,{key:0,"aria-current":m===t.links.length-1?"page":void 0,class:"b2-regular av-breadcrumb__link av-p-none",to:p.to},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.text),1)]),_:2},1032,["aria-current","to"])):(a.openBlock(),a.createElementBlock("a",{key:1,"aria-current":m===t.links.length-1?"page":void 0,class:"b2-regular av-breadcrumb__link av-p-none"},a.toDisplayString(p.text),9,oN))],4))),128))])):a.createCommentVNode("",!0)],10,nN)],8,tN)):a.createCommentVNode("",!0)}}}),sN=z(iN,[["__scopeId","data-v-524dc659"]]),aN=["id","aria-current"],lN=a.defineComponent({__name:"NavigationItem",props:{id:{},active:{type:Boolean}},setup(t){const e=a.computed(()=>t.id??`nav-item-${crypto.randomUUID()}`);return(n,r)=>(a.openBlock(),a.createElementBlock("li",{id:a.unref(e),class:a.normalizeClass(["av-nav__item",{"av-nav__item--active":t.active}]),"aria-current":t.active?"page":void 0},[a.renderSlot(n.$slots,"default",{},void 0,!0)],10,aN))}}),cN=z(lN,[["__scopeId","data-v-94f974c7"]]),dN=["id","aria-current"],uN=a.defineComponent({__name:"NavigationMenuItem",props:{id:{},active:{type:Boolean}},setup(t){const e=a.computed(()=>t.id??`nav-menu-item-${crypto.randomUUID()}`);return(n,r)=>(a.openBlock(),a.createElementBlock("li",{id:a.unref(e),class:"av-menu__item","aria-current":t.active?"page":void 0},[a.renderSlot(n.$slots,"default",{},void 0,!0)],8,dN))}}),fN=z(uN,[["__scopeId","data-v-fe85d2ff"]]),hN=["href"],pN={class:"b1-regular"},mN={class:"b1-regular"},AN=a.defineComponent({__name:"NavigationMenuLink",props:{id:{},activeId:{},to:{default:"#"},text:{default:""},icon:{},onClick:{type:Function,default:()=>{}}},emits:["toggleId"],setup(t){const e=t.id??`menu-link-${crypto.randomUUID()}`,n=a.computed(()=>typeof t.to=="string"&&t.to.startsWith("http")),r=a.hasInjectionContext()?a.inject(Oa):void 0,o=r==null?void 0:r();return(i,s)=>{const l=le,c=a.resolveComponent("RouterLink");return a.unref(n)?(a.openBlock(),a.createElementBlock("a",{key:0,class:a.normalizeClass(["av-nav__link av-row av-justify-start av-gap-xs",{"av-nav__link--active":t.activeId===a.unref(e)}]),"data-testid":"nav-external-link",href:t.to,onClick:s[0]||(s[0]=d=>{i.$emit("toggleId",a.unref(e)),t.onClick(d)})},[a.createElementVNode("span",pN,a.toDisplayString(t.text),1)],10,hN)):(a.openBlock(),a.createBlock(c,{key:1,class:"av-nav__link av-row av-justify-start av-gap-xs","data-testid":"nav-router-link",to:t.to,onClick:s[1]||(s[1]=d=>{var u;(u=a.unref(o))==null||u(),i.$emit("toggleId",a.unref(e)),t.onClick(d)})},{default:a.withCtx(()=>[t.icon?(a.openBlock(),a.createBlock(l,{key:0,name:t.icon,size:1.5},null,8,["name"])):a.createCommentVNode("",!0),a.createElementVNode("span",mN,a.toDisplayString(t.text),1)]),_:1},8,["to"]))}}}),Nh=z(AN,[["__scopeId","data-v-0827070a"]]),gN=["aria-expanded","aria-current","aria-controls"],bN=["id"],vN={class:"av-menu__list"},yN=a.defineComponent({__name:"NavigationMenu",props:{id:{},title:{},links:{},expandedId:{},active:{type:Boolean}},emits:["toggleId"],setup(t){const{collapse:e,collapsing:n,cssExpanded:r,doExpand:o,onTransitionEnd:i}=Ko(),s=a.computed(()=>t.id??`menu-${crypto.randomUUID()}`),l=a.computed(()=>s.value===t.expandedId),c=a.computed(()=>({"--icon-path":`url(${Fe.MDI_KEYBOARD_ARROW_DOWN})`}));return a.watch(l,(d,u)=>{d!==u&&o(d)}),a.onMounted(()=>{l.value&&o(!0)}),(d,u)=>(a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{class:"av-nav__btn","aria-expanded":a.unref(l),"aria-current":t.active||void 0,"aria-controls":a.unref(s),style:a.normalizeStyle(a.unref(c)),onClick:u[0]||(u[0]=f=>d.$emit("toggleId",a.unref(s)))},[a.createElementVNode("span",null,a.toDisplayString(t.title),1)],12,gN),a.createElementVNode("div",{id:a.unref(s),ref_key:"collapse",ref:e,class:a.normalizeClass(["av-collapse av-menu",{"av-collapse--expanded":a.unref(r),"av-collapsing":a.unref(n)}]),"data-testid":"navigation-menu",onTransitionend:u[2]||(u[2]=f=>a.unref(i)(a.unref(l)))},[a.createElementVNode("ul",vN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.links,(f,h)=>(a.openBlock(),a.createBlock(fN,{key:h},{default:a.withCtx(()=>[a.createVNode(Nh,a.mergeProps({ref_for:!0},f,{onToggleId:u[1]||(u[1]=p=>d.$emit("toggleId",t.expandedId))}),null,16)]),_:2},1024))),128))])],42,bN)],64))}}),CN=z(yN,[["__scopeId","data-v-2a650c01"]]),IN={style:{position:"relative"},class:"my-nav-wrapper"},kN=["id","aria-label"],EN={class:"av-nav__list"},MN=a.defineComponent({__name:"AvNavigation",props:{id:{},label:{default:"Menu principal"},navItems:{}},setup(t){const e=t.id??`nav-${crypto.randomUUID()}`,n=a.ref(void 0);function r(l){if(l===n.value){n.value=void 0;return}n.value=l}function o(l){if(l!==document.getElementById(e)){if(!(l!=null&&l.parentNode)){r(n.value);return}o(l.parentNode)}}function i(l){o(l.target)}function s(l){l.key==="Escape"&&r(n.value)}return a.onMounted(()=>{document.addEventListener("click",i),document.addEventListener("keydown",s)}),a.onUnmounted(()=>{document.removeEventListener("click",i),document.removeEventListener("keydown",s)}),(l,c)=>(a.openBlock(),a.createElementBlock("div",IN,[a.createElementVNode("nav",{id:a.unref(e),class:"av-nav",role:"navigation","aria-label":t.label},[a.createElementVNode("ul",EN,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.navItems,(d,u)=>(a.openBlock(),a.createBlock(cN,{key:u},{default:a.withCtx(()=>[d.to&&d.text?(a.openBlock(),a.createBlock(Nh,a.mergeProps({key:0,ref_for:!0},d,{"active-id":a.unref(n),onToggleId:c[0]||(c[0]=f=>r(f))}),null,16,["active-id"])):d.title&&d.links?(a.openBlock(),a.createBlock(CN,a.mergeProps({key:1,ref_for:!0},d,{"expanded-id":a.unref(n),onToggleId:c[1]||(c[1]=f=>r(f))}),null,16,["expanded-id"])):a.createCommentVNode("",!0)]),_:2},1024))),128))])],8,kN)]))}}),wN=["aria-label"],NN={class:"av-pagination__list av-row av-row-wrap av-align-center av-gap-sm av-list-reset"},xN={key:0},SN={class:"b2-regular"},TN=["href","title","aria-disabled"],LN={class:"av-sr-only"},DN=["href","title","aria-disabled"],ON={key:0,class:"caption-regular av-hidden av-unhidden-md"},BN=["href","title","aria-current","data-testid","onClick"],RN={key:0},zN={key:1},PN=["href","title","aria-disabled"],VN={key:0,class:"caption-regular av-hidden av-unhidden-md"},jN=["href","title","aria-disabled"],HN={class:"av-sr-only"},QN=a.defineComponent({__name:"AvPagination",props:{compact:{type:Boolean,default:!1},pages:{},currentPage:{default:0},firstPageLabel:{},lastPageLabel:{},nextPageLabel:{},prevPageLabel:{},compactCurrentPageLabel:{},truncLimit:{default:2},ariaLabel:{}},emits:["update:current-page"],setup(t,{emit:e}){const n=e,r=a.computed(()=>Math.min(t.pages.length-1-t.truncLimit,Math.max(t.currentPage-(t.truncLimit-t.truncLimit%2)/2,0))),o=a.computed(()=>Math.min(t.pages.length-1,r.value+t.truncLimit)),i=a.computed(()=>t.pages.length>t.truncLimit?t.pages.slice(r.value,o.value+1):t.pages),s=a.computed(()=>t.pages.length>0),l=m=>n("update:current-page",m),c=m=>l(m),d=()=>c(0),u=()=>c(Math.max(0,t.currentPage-1)),f=()=>c(Math.min(t.pages.length-1,t.currentPage+1)),h=()=>c(t.pages.length-1),p=m=>t.pages.indexOf(m)===t.currentPage;return(m,A)=>{var g,b,v,y;return a.unref(s)?(a.openBlock(),a.createElementBlock("nav",{key:0,role:"navigation",class:"av-pagination av-nav","aria-label":t.ariaLabel},[a.createElementVNode("ul",NN,[t.compact&&t.compactCurrentPageLabel?(a.openBlock(),a.createElementBlock("li",xN,[a.createElementVNode("span",SN,a.toDisplayString(t.compactCurrentPageLabel),1)])):a.createCommentVNode("",!0),a.createElementVNode("li",null,[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:0,href:(g=t.pages[0])==null?void 0:g.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.firstPageLabel,"aria-disabled":t.currentPage===0?!0:void 0,"data-testid":"first-page-link",onClick:A[0]||(A[0]=a.withModifiers(C=>d(),["prevent"]))},[a.createVNode(le,{name:a.unref(D).PAGE_FIRST,size:1.5},null,8,["name"]),a.createElementVNode("span",LN,a.toDisplayString(t.firstPageLabel),1)],8,TN))]),a.createElementVNode("li",null,[a.createElementVNode("a",{href:(b=t.pages[Math.max(t.currentPage-1,0)])==null?void 0:b.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.prevPageLabel,"aria-disabled":t.currentPage===0?!0:void 0,"data-testid":"previous-page-link",onClick:A[1]||(A[1]=a.withModifiers(C=>u(),["prevent"]))},[a.createVNode(le,{name:a.unref(D).NAVIGATE_BEFORE,size:1.5},null,8,["name"]),t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",ON,a.toDisplayString(t.prevPageLabel),1))],8,DN)]),t.compact?a.createCommentVNode("",!0):(a.openBlock(!0),a.createElementBlock(a.Fragment,{key:1},a.renderList(a.unref(i),(C,k)=>(a.openBlock(),a.createElementBlock("li",{key:k},[a.createElementVNode("a",{href:C==null?void 0:C.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:C.title,"aria-current":p(C)?"page":void 0,"data-testid":`page-link-${t.pages.indexOf(C)}`,onClick:a.withModifiers(N=>c(t.pages.indexOf(C)),["prevent"])},[a.unref(i).indexOf(C)===0&&a.unref(r)>0?(a.openBlock(),a.createElementBlock("span",RN,"...")):a.createCommentVNode("",!0),a.createTextVNode(" "+a.toDisplayString(C.label)+" ",1),a.unref(i).indexOf(C)===a.unref(i).length-1&&a.unref(o)<t.pages.length-1?(a.openBlock(),a.createElementBlock("span",zN,"...")):a.createCommentVNode("",!0)],8,BN)]))),128)),a.createElementVNode("li",null,[a.createElementVNode("a",{href:(v=t.pages[Math.min(t.currentPage+1,t.pages.length-1)])==null?void 0:v.href,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",title:t.nextPageLabel,"aria-disabled":t.currentPage===t.pages.length-1?!0:void 0,"data-testid":"next-page-link",onClick:A[2]||(A[2]=a.withModifiers(C=>f(),["prevent"]))},[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("span",VN,a.toDisplayString(t.nextPageLabel),1)),a.createVNode(le,{name:a.unref(D).NAVIGATE_NEXT,size:1.5},null,8,["name"])],8,PN)]),a.createElementVNode("li",null,[t.compact?a.createCommentVNode("",!0):(a.openBlock(),a.createElementBlock("a",{key:0,class:"av-pagination__link av-row av-align-center av-justify-center av-py-xxs av-px-xs av-radius-lg av-gap-xxs",href:(y=t.pages[t.pages.length-1])==null?void 0:y.href,title:t.lastPageLabel,"aria-disabled":t.currentPage===t.pages.length-1?!0:void 0,"data-testid":"last-page-link",onClick:A[3]||(A[3]=a.withModifiers(C=>h(),["prevent"]))},[a.createElementVNode("span",HN,a.toDisplayString(t.lastPageLabel),1),a.createVNode(le,{name:a.unref(D).PAGE_LAST,size:1.5},null,8,["name"])],8,jN))])])],8,wN)):a.createCommentVNode("",!0)}}}),WN=z(QN,[["__scopeId","data-v-29cf5812"]]);function FN(t){return Array.from({length:t.value},(e,n)=>{const r=n+1;return{title:`${r}`,label:`${r}`,href:`#page-${r}`}})}const UN=["id","aria-label"],qN={key:0,class:"av-side-menu__header av-row av-align-center av-justify-end"},KN={class:"av-side-menu__content av-row av-flex-fill av-py-sm"},ZN=a.defineComponent({__name:"AvSideMenu",props:a.mergeModels({id:{},collapsible:{type:Boolean,default:!0},collapsed:{type:Boolean,default:!1},width:{default:"16rem"},collapsedWidth:{default:"5rem"},padding:{default:"0"}},{collapsed:{type:Boolean,default:!1},collapsedModifiers:{}}),emits:a.mergeModels(["update:collapsed"],["update:collapsed"]),setup(t){a.useCssVars(u=>({v6ee2b670:a.unref(c),b759a0e4:u.padding}));const e=t,n=a.useModel(t,"collapsed"),{width:r,collapsedWidth:o}=a.toRefs(e),i=e.id??crypto.randomUUID(),s=a.computed(()=>`${i} navigation`),l=a.computed({get:()=>e.collapsible?n.value:!1,set:u=>{e.collapsible&&(n.value=u)}}),c=a.computed(()=>e.collapsible&&l.value?o.value:r.value);function d(){e.collapsible&&(l.value=!l.value)}return(u,f)=>(a.openBlock(),a.createElementBlock("nav",{id:a.unref(i),class:a.normalizeClass(["av-side-menu av-col av-h-full",{"av-side-menu--collapsed":a.unref(l)}]),"aria-label":a.unref(s)},[e.collapsible?(a.openBlock(),a.createElementBlock("div",qN,[a.createVNode(q,{"aria-expanded":!a.unref(l),"aria-controls":a.unref(i),icon:a.unref(l)?a.unref(D).CHEVRON_DOUBLE_RIGHT:a.unref(D).CHEVRON_DOUBLE_LEFT,class:"av-side-menu__collapse-button av-p-xs av-m-xs av-gap-none",label:a.unref(l)?"Expand button":"Collapse button","icon-only":"",onClick:d},null,8,["aria-expanded","aria-controls","icon","label"])])):a.createCommentVNode("",!0),a.createElementVNode("div",KN,[a.renderSlot(u.$slots,"default",{},void 0,!0)])],10,UN))}}),xh=z(ZN,[["__scopeId","data-v-b7b171a0"]]),YN={key:0,class:"av-pl-sm"},XN=a.defineComponent({__name:"AvSideNavigation",props:a.mergeModels({items:{},selectedItem:{},isSideMenuCollapsed:{type:Boolean},width:{default:"fit-content"},collapsedWidth:{default:"3.5rem"},selectedItemColor:{}},{selectedItem:{default:()=>({itemId:""})},selectedItemModifiers:{},isSideMenuCollapsed:{type:Boolean,default:!1},isSideMenuCollapsedModifiers:{}}),emits:["update:selectedItem","update:isSideMenuCollapsed"],setup(t){const e=a.useModel(t,"selectedItem"),n=a.useModel(t,"isSideMenuCollapsed"),r=a.ref(t.items.filter(c=>c.expanded).map(c=>c.id));function o(c,d){e.value=d?{itemId:c,parentId:d}:{itemId:c}}function i(c,d){return e.value.parentId?e.value.parentId===c.id&&e.value.itemId===d.id:e.value.itemId===d.id}function s(c){return e.value.itemId===c.id||(c.children?c.children.some(d=>i(c,d)):!1)}function l(c){r.value.includes(c)?r.value=r.value.filter(d=>d!==c):r.value.push(c)}return a.watchEffect(()=>{const c=e.value.parentId??e.value.itemId;c&&!r.value.includes(c)&&r.value.push(c)}),(c,d)=>(a.openBlock(),a.createBlock(xh,{collapsed:n.value,"onUpdate:collapsed":d[0]||(d[0]=u=>n.value=u),width:t.width,"collapsed-width":t.collapsedWidth,color:t.selectedItemColor},{default:a.withCtx(()=>[a.createVNode(a.unref(br),{size:"small",role:"menu"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.items,u=>(a.openBlock(),a.createElementBlock(a.Fragment,{key:u.id},[a.createVNode(a.unref(gr),{title:n.value?void 0:u.label,icon:u.icon,"icon-size":1.8,selected:s(u),"hover-background-color":t.selectedItemColor,role:"menuitem",class:a.normalizeClass(["av-side-navigation__menu-item",{"av-side-navigation__menu-item--collapsed":n.value}]),"data-testid":a.unref(r).includes(u.id)?`expanded-menu-${u.id}`:`collapsed-menu-${u.id}`,onClick:f=>u.children?l(u.id):o(u.id)},null,8,["title","icon","selected","hover-background-color","class","data-testid","onClick"]),u.children&&u.children.length>0?a.withDirectives((a.openBlock(),a.createElementBlock("div",YN,[a.createVNode(a.unref(br),{size:"small",role:"menu"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.children,f=>(a.openBlock(),a.createBlock(a.unref(gr),{key:f.id,title:n.value?void 0:f.label,icon:f.icon,"icon-size":1.8,selected:i(u,f),"hover-background-color":t.selectedItemColor,role:"menuitem",type:"sub",class:a.normalizeClass(["av-side-navigation__menu-item",{"av-side-navigation__menu-item--collapsed":n.value}]),"data-testid":`menu-${u.id}-${f.id}`,onClick:h=>o(f.id,u.id)},null,8,["title","icon","selected","hover-background-color","class","data-testid","onClick"]))),128))]),_:2},1024)],512)),[[a.vShow,a.unref(r).includes(u.id)]]):a.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["collapsed","width","collapsed-width","color"]))}}),JN=z(XN,[["__scopeId","data-v-39e27b63"]]),GN={role:"list",class:"av-stepper av-col"},$N={class:"main-container av-row av-align-center av-flex-fill"},_N=["aria-current"],ex=["aria-current"],tx={class:"b1-regular"},nx={class:"main-labels-container av-row av-align-start av-justify-between av-pt-xs"},rx=a.defineComponent({__name:"AvStepper",props:{steps:{},currentStep:{},width:{default:"100%"}},setup(t){return a.useCssVars(e=>({v6c9f7699:e.width})),(e,n)=>(a.openBlock(),a.createElementBlock("div",GN,[a.createElementVNode("div",$N,[a.createElementVNode("div",{role:"listitem",class:"step step--active av-radius-full","aria-current":t.currentStep===0?"step":void 0},[...n[0]||(n[0]=[a.createElementVNode("span",{class:"b1-regular"},"1",-1)])],8,_N),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.steps.slice(1),(r,o)=>(a.openBlock(),a.createElementBlock("div",{key:o,class:"av-row av-align-center av-flex-fill"},[a.createElementVNode("div",{class:a.normalizeClass(["separator av-row av-flex-fill",{"separator--active":o+1<=t.currentStep}])},null,2),a.createElementVNode("div",{role:"listitem",class:a.normalizeClass(["step av-col av-align-center av-justify-center av-radius-full",{"step--active":o+1<=t.currentStep}]),"aria-current":o+1===t.currentStep?"step":void 0},[a.createElementVNode("span",tx,a.toDisplayString(o+2),1)],10,ex)]))),128))]),a.createElementVNode("div",nx,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t.steps,(r,o)=>(a.openBlock(),a.createElementBlock("div",{key:o,class:"label-container av-col av-align-center av-justify-center"},[a.createElementVNode("span",{class:a.normalizeClass(["label av-col av-align-center",{"b1-bold av-text-text1":o<=t.currentStep,"b1-light av-text-text1":o>t.currentStep}])},a.toDisplayString(r),3)]))),128))])]))}}),ox=z(rx,[["__scopeId","data-v-3c219b87"]]),ix=["id","aria-labelledby","role","open"],sx={class:"av-container av-container--md av-container--lg av-container-fluid av-w-full"},ax={class:"av-modal__body av-pt-sm av-pt-none--md"},lx={class:"av-modal__content av-mb-4xl av-px-lg av-pt-sm--md"},cx=["id"],dx={class:"av-modal__footer av-row av-justify-end av-p-sm av--mt-2xl"},ux=a.defineComponent({inheritAttrs:!1,__name:"AvModal",props:{id:{},opened:{type:Boolean,default:!1},isAlert:{type:Boolean,default:!1},closeButtonLabel:{},closeButtonIcon:{default:()=>D.CLOSE_CIRCLE_OUTLINE},closeButtonDisabled:{type:Boolean,default:!1},confirmButtonLabel:{},confirmButtonIcon:{default:()=>D.CHECK_CIRCLE_OUTLINE},confirmButtonDisabled:{type:Boolean,default:!1},isLoading:{type:Boolean}},emits:["close","confirm"],setup(t,{emit:e}){const n=e,r=a.useSlots(),o=a.useAttrs(),i=t.id??`modal-${crypto.randomUUID()}`,s=a.computed(()=>t.isAlert?"alertdialog":"dialog"),l=a.ref(null),c=a.ref();a.watch(()=>t.opened,u=>{var f,h,p;u?((f=c.value)==null||f.showModal(),(h=l.value)==null||h.focus()):(p=c.value)==null||p.close(),d(u)});function d(u){typeof window<"u"&&document.body.classList.toggle("modal-open",u)}return a.onMounted(()=>{d(t.opened)}),a.onBeforeUnmount(()=>{d(!1)}),(u,f)=>{const h=xn;return a.openBlock(),a.createBlock(a.Teleport,{to:"body"},[t.opened?(a.openBlock(),a.createBlock(a.unref(md),{key:0},{default:a.withCtx(()=>[a.createElementVNode("dialog",a.mergeProps({id:a.unref(i),ref_key:"modal",ref:c},a.unref(o),{"aria-modal":"true","aria-labelledby":`${a.unref(i)}-header`,role:a.unref(s),class:["av-modal av-col av-h-full av-w-full av-align-stretch av-justify-end av-justify-around--md av-p-none av-m-none",{"av-modal--opened av-w-full av-h-full":t.opened}],open:t.opened,onKeydown:f[2]||(f[2]=a.withKeys(p=>n("close"),["esc"]))}),[a.createElementVNode("div",sx,[a.createElementVNode("div",ax,[a.createElementVNode("div",lx,[r.header?(a.openBlock(),a.createElementBlock("div",{key:0,id:`${a.unref(i)}-header`,class:"header av-row av-align-center av-pb-md"},[a.renderSlot(u.$slots,"header",{},void 0,!0)],8,cx)):a.createCommentVNode("",!0),a.renderSlot(u.$slots,"default",{},void 0,!0)]),a.createElementVNode("div",dx,[a.createVNode(h,{ref_key:"closeBtn",ref:l,"cancel-label":t.closeButtonLabel,"cancel-icon":t.closeButtonIcon,"cancel-disabled":t.closeButtonDisabled,"cancel-is-loading":t.isLoading,"confirm-label":t.confirmButtonLabel,"confirm-icon":t.confirmButtonIcon,"confirm-disabled":t.confirmButtonDisabled,"confirm-is-loading":t.isLoading,onCancel:f[0]||(f[0]=()=>n("close")),onConfirm:f[1]||(f[1]=()=>n("confirm"))},null,8,["cancel-label","cancel-icon","cancel-disabled","cancel-is-loading","confirm-label","confirm-icon","confirm-disabled","confirm-is-loading"]),a.renderSlot(u.$slots,"footer",{},void 0,!0)])])])],16,ix)]),_:3})):a.createCommentVNode("",!0)])}}}),fx=z(ux,[["__scopeId","data-v-21bb36c5"]]);exports.AV_BREAKPOINTS=Ad;exports.AvAccordion=Jm;exports.AvAccordionsGroup=$m;exports.AvAlert=ed;exports.AvAutocomplete=BM;exports.AvBadge=Lh;exports.AvBreadcrumb=sN;exports.AvButton=q;exports.AvCancelConfirmButtons=xn;exports.AvCard=dp;exports.AvCheckbox=bd;exports.AvCheckboxListItem=yh;exports.AvCheckboxesGroup=cA;exports.AvDrawer=Ps;exports.AvDropdown=Hs;exports.AvFieldset=Os;exports.AvFieldsetElement=Bs;exports.AvFileUpload=IA;exports.AvHeader=Yw;exports.AvHeaderMenuLinks=Vs;exports.AvIcon=le;exports.AvIconText=Jc;exports.AvInput=Ge;exports.AvLanguageSelector=Qs;exports.AvList=br;exports.AvListItem=gr;exports.AvLogo=td;exports.AvModal=fx;exports.AvMultiselect=XM;exports.AvNavigation=MN;exports.AvNotice=tp;exports.AvPageSizePicker=qE;exports.AvPagination=WN;exports.AvPeriodInput=lb;exports.AvPopover=Zo;exports.AvRadioButton=Ih;exports.AvRadioButtonSet=XE;exports.AvRichButton=rA;exports.AvRichTextEditor=LE;exports.AvSearchBar=Ta;exports.AvSelect=sw;exports.AvSideMenu=xh;exports.AvSideNavigation=JN;exports.AvStepper=ox;exports.AvTab=aw;exports.AvTabs=gw;exports.AvTag=Xc;exports.AvTagPicker=Ch;exports.AvToaster=yp;exports.AvToggle=xw;exports.CUIDA_ICONS=Bh;exports.DropdownState=Vt;exports.EOS_ICONS=Rh;exports.EsupLogo=eN;exports.FLUENT_ICONS=zh;exports.ICONS_DATA_URL=Fe;exports.IX_ICONS=Ph;exports.MDI_ICONS=D;exports.MS_ICONS=Un;exports.PH_ICONS=Vh;exports.PageSizes=La;exports.RI_ICONS=jh;exports.formatTextToHtml=Gc;exports.getPaginationPages=FN;exports.isValidEmail=np;exports.isValidLink=rp;exports.pageSizeValues=FE;exports.registerNavigationLinkKey=Oa;exports.removeDuplicates=_c;exports.toSentenceCase=$c;exports.useAvBreakpoints=js;exports.useCollapsable=Ko;exports.useFocusTrap=gd;exports.useGlobalBackgroundColor=Pm;
|