@myissue/vue-website-page-builder 3.4.27 → 3.4.29

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.
@@ -4,19 +4,19 @@
4
4
  `)):""}saveDomComponentsToLocalStorage(){this.updateLocalStorageItemName();const e=document.querySelector("#pagebuilder");if(!e)return;const t=e.querySelector("[hovered]");t&&t.removeAttribute("hovered");const o=[];e.querySelectorAll("section[data-componentid]").forEach(l=>{const p=this.cloneAndRemoveSelectionAttributes(l);p.removeAttribute("data-componentid"),o.push({html_code:p.outerHTML,title:p.getAttribute("data-component-title")||"Untitled Component"})});const n={classes:e.className||"",style:e.getAttribute("style")||e.style.cssText||""},a={components:o,pageBuilderContentSavedAt:new Date().toISOString(),pageSettings:n},s=this.getHistoryBaseKey();if(s){const l=localStorage.getItem(s);if(l||localStorage.setItem(s,JSON.stringify(a)),l){const p=JSON.parse(l),d=p.components||[],c=a.components||[],m=c.length!==d.length||c.some((u,g)=>{const f=d[g];return!f||f.html_code!==u.html_code}),b=p.pageSettings&&p.pageSettings.classes!==a.pageSettings.classes||p.pageSettings&&p.pageSettings.style!==a.pageSettings.style;if(m||b){localStorage.setItem(s,JSON.stringify(a));let u=oo.getHistory(s);const g=u[u.length-1];if(g){const f=JSON.stringify(g.components),x=JSON.stringify(a.components),y=JSON.stringify(g.pageSettings),w=JSON.stringify(a.pageSettings);if(f===x&&y===w)return}this.pageBuilderStateStore.getHistoryIndex<u.length-1&&(u=u.slice(0,this.pageBuilderStateStore.getHistoryIndex+1)),u.push(a),u.length>10&&(u=u.slice(u.length-10)),localStorage.setItem(s+"-history",JSON.stringify(u)),this.pageBuilderStateStore.setHistoryIndex(u.length-1),this.pageBuilderStateStore.setHistoryLength(u.length);return}}}}async removeCurrentComponentsFromLocalStorage(){this.updateLocalStorageItemName(),await i.nextTick();const e=this.getLocalStorageItemName.value;e&&localStorage.removeItem(e)}async handleFormSubmission(){await this.removeCurrentComponentsFromLocalStorage(),this.deleteAllComponentsFromDOM(),this.pageBuilderStateStore.setComponents([])}parseStyleString(e){return e.split(";").map(t=>t.trim()).filter(Boolean).reduce((t,o)=>{const[n,a]=o.split(":").map(s=>s.trim());return n&&a&&(t[n]=a),t},{})}deleteOldPageBuilderLocalStorage(){const e=this.pageBuilderStateStore.getPageBuilderConfig;if((e&&e.updateOrCreate&&e.updateOrCreate.formType)==="update"){let o=0;const n=[],a=new Date(Date.now()-14*24*60*60*1e3);for(let s=0;s<localStorage.length;s++){const l=localStorage.key(s);if(l&&l.startsWith("page-builder-update-resource-"))try{const p=localStorage.getItem(l);if(!p)continue;const c=JSON.parse(p).pageBuilderContentSavedAt;c&&new Date(c)<a&&(o++,n.push({Number:o,Key:l,SavedAt:c}),localStorage.removeItem(l))}catch{}}n.length>0&&(console.info(`Deleted ${n.length} localStorage item(s) older than ${a} days:`),console.table(n))}}startEditing(){this.hasStartedEditing=!0}async resumeEditingFromDraft(){this.updateLocalStorageItemName();const e=this.getSavedPageHtml();e&&(await ge(400),this.pageBuilderStateStore.setIsLoadingResumeEditing(!0),await this.mountComponentsToDOM(e),this.pageBuilderStateStore.setIsLoadingResumeEditing(!1)),await i.nextTick(),await this.addListenersToEditableElements(),this.pageBuilderStateStore.setIsLoadingResumeEditing(!1)}async restoreOriginalContent(){if(this.updateLocalStorageItemName(),this.pageBuilderStateStore.setIsRestoring(!0),await ge(400),Array.isArray(this.originalComponents)){await this.clearClassesFromPage(),await this.clearInlineStylesFromPage();const e=this.renderComponentsToHtml(this.originalComponents);await this.mountComponentsToDOM(e),this.removeCurrentComponentsFromLocalStorage()}await i.nextTick(),await this.addListenersToEditableElements(),this.pageBuilderStateStore.setIsRestoring(!1)}async returnLatestComponents(){return this.syncDomToStoreOnly(),await i.nextTick(),await this.addListenersToEditableElements(),this.pageBuilderStateStore.getComponents}getStorageItemNameForResource(){return this.getLocalStorageItemName.value}getSavedPageHtml(){if(!this.getLocalStorageItemName.value)return!1;const e=this.getLocalStorageItemName.value;if(!e)return!1;const t=localStorage.getItem(e);if(!t)return!1;const o=JSON.parse(t);if(o&&Array.isArray(o.components)){const n=o.pageSettings&&o.pageSettings.classes||"",a=o.pageSettings&&o.pageSettings.style||"",s=o.components.map(l=>{const c=new DOMParser().parseFromString(l.html_code,"text/html").querySelector("section");return c?(c.removeAttribute("data-componentid"),c.outerHTML):l.html_code}).join(`
5
5
  `);return`<div id="pagebuilder" class="${n}" style="${a}">
6
6
  ${s}
7
- </div>`}return!1}async applySelectedImage(e){this.pageBuilderStateStore.setApplyImageToSelection(e),this.getElement.value&&this.getApplyImageToSelection.value&&this.getApplyImageToSelection.value.src&&(await i.nextTick(),this.pageBuilderStateStore.setBasePrimaryImage(`${this.getApplyImageToSelection.value.src}`),await this.handleAutoSave())}setBasePrimaryImageFromSelectedElement(){if(!this.getElement.value)return;const e=document.createElement("div");e.innerHTML=this.getElement.value.outerHTML;const t=e.getElementsByTagName("img"),o=e.getElementsByTagName("div");if(t.length===1&&o.length===0){this.pageBuilderStateStore.setBasePrimaryImage(t[0].src);return}this.pageBuilderStateStore.setBasePrimaryImage(null)}addHyperlinkToElement(e,t,o){if(!this.getElement.value||!(this.getElement.value instanceof HTMLElement)||typeof this.getElement.value.closest!="function")return;const n=this.getElement.value.closest("a"),a=this.getElement.value.querySelector("a");this.pageBuilderStateStore.setHyperlinkError(null);const s=/^https?:\/\//,l=i.ref(!0);if(e===!0&&t!==null&&(l.value=s.test(t)),l.value===!1){this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyperlinkError("URL is not valid");return}if(e===!0&&typeof t=="string"){if(a!==null&&t.length!==0){a.href=t,o===!0&&(a.target="_blank"),o===!1&&a.removeAttribute("target"),a.textContent=this.getElement.value.textContent,this.pageBuilderStateStore.setHyperlinkMessage("Succesfully updated element hyperlink"),this.pageBuilderStateStore.setElementContainsHyperlink(!0);return}if(a===null&&t.length!==0&&n===null){const p=document.createElement("a");p.href=t,o===!0&&(p.target="_blank"),p.textContent=this.getElement.value.textContent,this.getElement.value.textContent="",this.getElement.value.appendChild(p),this.pageBuilderStateStore.setHyperlinkMessage("Successfully added hyperlink to element"),this.pageBuilderStateStore.setElementContainsHyperlink(!0);return}}if(e===!1&&t==="removeHyperlink"){const p=this.getElement.value.textContent||"",d=document.createTextNode(p);this.getElement.value.textContent="",this.getElement.value.appendChild(d),this.pageBuilderStateStore.setHyberlinkEnable(!1),this.pageBuilderStateStore.setElementContainsHyperlink(!1)}}checkForHyperlink(){if(!this.getElement.value)return;const e=this.getElement.value.querySelector("a");if(e!==null){this.pageBuilderStateStore.setHyberlinkEnable(!0),this.pageBuilderStateStore.setElementContainsHyperlink(!0),this.pageBuilderStateStore.setHyperlinkInput(e.href),this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyperlinkError(null),e.target==="_blank"&&this.pageBuilderStateStore.setOpenHyperlinkInNewTab(!0),e.target!=="_blank"&&this.pageBuilderStateStore.setOpenHyperlinkInNewTab(!1);return}this.pageBuilderStateStore.setElementContainsHyperlink(!1),this.pageBuilderStateStore.setHyperlinkInput(""),this.pageBuilderStateStore.setHyperlinkError(null),this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyberlinkEnable(!1)}handleHyperlink(e,t,o){var s;if(this.pageBuilderStateStore.setHyperlinkAbility(!0),!this.getElement.value||!(this.getElement.value instanceof HTMLElement)||typeof this.getElement.value.closest!="function")return;this.getElement.value.closest("a")!==null&&this.pageBuilderStateStore.setHyperlinkAbility(!1);const a=(s=this.getElement.value)==null?void 0:s.tagName.toUpperCase();if(a!=="P"&&a!=="H1"&&a!=="H2"&&a!=="H3"&&a!=="H4"&&a!=="H5"&&a!=="H6"&&this.pageBuilderStateStore.setHyperlinkAbility(!1),e===void 0){this.checkForHyperlink();return}this.addHyperlinkToElement(e,t||null,o||!1)}async addTheme(e){e&&(this.validateMountingHTML(e),await this.mountComponentsToDOM(e)),await this.handleAutoSave()}async addComponent(e){try{const t=this.cloneCompObjForDOMInsertion({html_code:e.html_code,id:e.id,title:e.title});this.pageBuilderStateStore.setPushComponents({component:t,componentArrayAddMethod:this.getComponentArrayAddMethod.value?this.getComponentArrayAddMethod.value:"push"});const o=document.querySelector("#page-builder-wrapper");o&&this.getComponentArrayAddMethod.value==="push"&&o.scrollTo({top:o.scrollHeight+50,behavior:"smooth"}),await i.nextTick(),await this.addListenersToEditableElements(),await this.handleAutoSave()}catch(t){console.error("Error adding component:",t)}}addTailwindPrefixToClasses(e,t="pbx-"){return e.split(/\s+/).map(o=>{if(!o||o.startsWith(t))return o;const n=o.split(":"),a=n.pop();return a.startsWith(t)?o:[...n,t+a].join(":")}).join(" ")}convertStyleObjectToString(e){return e?typeof e=="string"?e:Object.entries(e).map(([t,o])=>`${t.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`).join(" "):""}parsePageBuilderHTML(e){const o=new DOMParser().parseFromString(e,"text/html");o.querySelectorAll("[class]").forEach(d=>{const c=d.getAttribute("class")||"",m=this.addTailwindPrefixToClasses(c);d.setAttribute("class",m)});const n=o.querySelector("#pagebuilder");let a={classes:"",style:{}};if(n){const d=n.getAttribute("style")||"";a={classes:n.className||"",style:this.parseStyleString(d)}}let s=o.querySelectorAll("section");n&&(s=n.querySelectorAll("section"));const l=Array.from(s).filter(d=>!d.parentElement||d.parentElement.tagName.toLowerCase()!=="section");let p=[];if(l.length>0&&(p=l.map(d=>({id:null,html_code:d.outerHTML.trim(),title:d.getAttribute("data-component-title")||"Untitled Component"}))),l.length===0){const d=n||o.body,c=Array.from(d.children);if(c.length>0&&(p=c.map(m=>{const b=o.createElement("section");return b.setAttribute("data-component-title","Untitled Component"),b.innerHTML=m.outerHTML.trim(),{id:null,html_code:b.outerHTML.trim(),title:"Untitled Component"}})),c.length===0){const m=o.createElement("section");m.setAttribute("data-component-title","Untitled Component"),m.innerHTML=d.innerHTML.trim(),p=[{id:null,html_code:m.outerHTML.trim(),title:"Untitled Component"}]}}return{components:p,pageSettings:a}}async applyModifiedHTML(e){if(!e||typeof e=="string"&&e.length===0)return"No HTML content was provided. Please ensure a valid HTML string is passed.";if(/<section[\s>]/i.test(e))return"Error: The <section> tag cannot be used as it is already included inside this component.";const t=document.createElement("div");t.innerHTML=e.trim();const o=t.firstElementChild;if(!o)return"Could not parse element from HTML string.";const n=this.pageBuilderStateStore.getElement;return n&&n.parentElement&&(n.replaceWith(o),this.pageBuilderStateStore.setElement(o)),await this.addListenersToEditableElements(),await i.nextTick(),null}validateMountingHTML(e,t){const o=e.trim(),n=e.match(/<section\b[^>]*>/gi)||[],a=e.match(/<\/section>/gi)||[];if(!e||e.trim().length===0){const p="No HTML content was provided. Please ensure a valid HTML string is passed.";return t&&t.logError&&console.error(p),p}if(n.length!==a.length){const p="Uneven <section> tags detected in the provided HTML. Each component must be wrapped in its own properly paired <section>...</section>. Ensure that all <section> tags have a matching closing </section> tag.";return t&&t.logError&&console.error(p),p}const s=document.createElement("div");if(s.innerHTML=o,s.querySelector("section section")){const p="Nested <section> tags are not allowed. Please ensure that no <section> is placed inside another <section>.";return t&&t.logError&&console.error(p),p}if(o.startsWith("[")||o.startsWith("{")){const p="Brackets [] or curly braces {} are not valid HTML. They are used for data formats like JSON.";return t&&t.logError&&console.error(p),p}return null}async applyModifiedComponents(e){const t=e.trim();if((e.match(/<section\b[^>]*>/gi)||[]).length===0)return"No <section> tags found. Each component must be wrapped in a <section> tag.";const n=this.validateMountingHTML(t);return n||(await this.mountComponentsToDOM(t),await this.addListenersToEditableElements(),await i.nextTick(),null)}async mountComponentsToDOM(e,t,o){var s,l;const n=e.trim();if(!this.validateMountingHTML(n,{logError:!0}))try{const d=new DOMParser().parseFromString(e,"text/html"),c=d.querySelector("#pagebuilder"),m=document.querySelector("#pagebuilder");let b=null;t&&(b=((s=this.pageBuilderStateStore.getPageBuilderConfig)==null?void 0:s.pageSettings)||null),!o&&!b&&c&&(b={classes:c.className||"",style:c.getAttribute("style")||""}),b||(b=((l=this.pageBuilderStateStore.getPageBuilderConfig)==null?void 0:l.pageSettings)||null),!o&&b&&m&&(m.removeAttribute("class"),m.removeAttribute("style"),m.className=b.classes||"",m.setAttribute("style",this.convertStyleObjectToString(b.style))),o&&m&&(m.removeAttribute("class"),m.removeAttribute("style"),m.className=o.classes||"",m.setAttribute("style",this.convertStyleObjectToString(o.style)));const u=d.querySelectorAll("section"),g=[];u.forEach(f=>{f.querySelectorAll("[class]").forEach(v=>{v.setAttribute("class",this.addTailwindPrefixToClasses(v.getAttribute("class")||"","pbx-"))});const x=f;x.hasAttribute("data-componentid")||x.setAttribute("data-componentid",Wl());const y=x.getAttribute("data-componentid"),w=x.getAttribute("data-component-title")||"Untitled Component";x.setAttribute("data-component-title",w),g.push({html_code:x.outerHTML,id:y,title:w})}),this.pageBuilderStateStore.setComponents(g),await this.clearHtmlSelection(),await i.nextTick(),await this.addListenersToEditableElements()}catch(p){console.error("Error parsing HTML components:",p),this.deleteAllComponentsFromDOM(),await this.clearHtmlSelection(),await i.nextTick(),await this.addListenersToEditableElements()}}updateLocalStorageItemName(){const e=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate.formType,t=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate.formName,o=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.resourceData;if(e==="create"){if(t&&t.length>0){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-create-resource-${this.sanitizeForLocalStorage(t)}`);return}this.pageBuilderStateStore.setLocalStorageItemName("page-builder-create-resource");return}if(e==="update"){if(typeof t=="string"&&t.length>0){if(o&&o!=null&&!o.title&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(o.title)}`);return}if(o&&o!=null&&!o.title&&typeof o.title!="string"&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(o.title)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}}if(!t||typeof t=="string"&&t.length===0){if(o&&o!=null&&!o.title&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName("page-builder-update-resource");return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(o.title)}`);return}if(o&&o!=null&&!o.title&&typeof o.title!="string"&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(String(o.id))}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(o.title)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}}}}async initializeElementStyles(){await i.nextTick(),this.setBasePrimaryImageFromSelectedElement(),this.handleHyperlink(void 0,null,!1),this.handleOpacity(void 0),this.handleBackgroundOpacity(void 0),this.handleBackgroundColor(void 0),this.handleTextColor(void 0),this.handleBorderStyle(void 0),this.handleBorderWidth(void 0),this.handleBorderColor(void 0),this.handleBorderRadiusGlobal(void 0),this.handleBorderRadiusTopLeft(void 0),this.handleBorderRadiusTopRight(void 0),this.handleBorderRadiusBottomleft(void 0),this.handleBorderRadiusBottomRight(void 0),this.handleFontSizeBase(void 0),this.handleFontSizeDesktop(void 0),this.handleFontSizeTablet(void 0),this.handleFontSizeMobile(void 0),this.handleFontWeight(void 0),this.handleFontFamily(void 0),this.handleFontStyle(void 0),this.handleVerticalPadding(void 0),this.handleHorizontalPadding(void 0),this.handleVerticalMargin(void 0),this.handleHorizontalMargin(void 0),await this.syncCurrentClasses(),await this.syncCurrentStyles()}}let _n=null;function Yw(r){_n||(_n=r)}function ie(){if(!_n)throw new Error("PageBuilder has not been initialized. Please call app.use(pageBuilder) in your main application file.");return _n}const Xw=(r,e,t)=>{const o=r[e];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((n,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==t?". Note that variables only represent file names one level deep.":""))))})},va=i.ref({});async function Gl(r){try{const e=await Xw(Object.assign({"../locales/ar.json":()=>Promise.resolve().then(()=>uD),"../locales/de.json":()=>Promise.resolve().then(()=>gD),"../locales/en.json":()=>Promise.resolve().then(()=>xD),"../locales/es.json":()=>Promise.resolve().then(()=>fD),"../locales/fr.json":()=>Promise.resolve().then(()=>hD),"../locales/hi.json":()=>Promise.resolve().then(()=>yD),"../locales/ja.json":()=>Promise.resolve().then(()=>wD),"../locales/pt.json":()=>Promise.resolve().then(()=>vD),"../locales/ru.json":()=>Promise.resolve().then(()=>kD),"../locales/zh-Hans.json":()=>Promise.resolve().then(()=>SD)}),`../locales/${r}.json`,3);va.value=e.default}catch(e){console.error(`Could not load translations for language: ${r}`,e),r!=="en"&&await Gl("en")}}function pe(){function r(e){return va.value[e]||e}return{translate:r,loadTranslations:Gl,currentTranslations:i.readonly(va)}}const Qw={class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-myPrimaryGap"},Zw={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},$w=["disabled"],ev=["disabled"],tv={__name:"ComponentTopMenu",setup(r){const{translate:e}=pe(),t=ie(),o=i.ref(!1),n=i.ref(""),a=i.ref(1),s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=i.ref(null),m=i.ref(null),b=i.ref(null),u=i.ref(null),g=i.computed(()=>t.canMoveUp()),f=i.computed(()=>t.canMoveDown()),x=function(){o.value=!0,n.value="delete",a.value=2,s.value=e("Remove Component?"),l.value=e("Are you sure you want to remove this Component?"),p.value=e("Close"),d.value=null,c.value=e("Delete"),m.value=function(){o.value=!1},u.value=async function(){await t.deleteComponentFromDOM(),o.value=!1}};return(y,w)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(Zt,{showDynamicModalBuilder:o.value,type:n.value,gridColumnAmount:a.value,title:s.value,description:l.value,firstButtonText:p.value,secondButtonText:d.value,thirdButtonText:c.value,onFirstModalButtonFunctionDynamicModalBuilder:m.value,onSecondModalButtonFunctionDynamicModalBuilder:b.value,onThirdModalButtonFunctionDynamicModalBuilder:u.value},{default:i.withCtx(()=>w[3]||(w[3]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[3]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",Qw,[i.createElementVNode("div",Zw,[i.createElementVNode("div",{onClick:w[0]||(w[0]=v=>x()),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},w[4]||(w[4]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ",-1)]))]),i.createElementVNode("button",{type:"button",onClick:w[1]||(w[1]=v=>i.unref(t).reorderComponent(-1)),disabled:!g.value,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black",[g.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},w[5]||(w[5]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_up ",-1)]),10,$w),i.createElementVNode("button",{type:"button",onClick:w[2]||(w[2]=v=>i.unref(t).reorderComponent(1)),disabled:!f.value,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black",[f.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},w[6]||(w[6]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_down ",-1)]),10,ev)])],64))}};function Se(r){this.content=r}Se.prototype={constructor:Se,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var o=t&&t!=r?this.remove(t):this,n=o.find(r),a=o.content.slice();return n==-1?a.push(t||r,e):(a[n+1]=e,t&&(a[n]=t)),new Se(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Se(t)},addToStart:function(r,e){return new Se([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Se(t)},addBefore:function(r,e,t){var o=this.remove(e),n=o.content.slice(),a=o.find(r);return n.splice(a==-1?n.length:a,0,e,t),new Se(n)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Se.from(r),r.size?new Se(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Se.from(r),r.size?new Se(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Se.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}},Se.from=function(r){if(r instanceof Se)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Se(e)};function Kl(r,e,t){for(let o=0;;o++){if(o==r.childCount||o==e.childCount)return r.childCount==e.childCount?null:t;let n=r.child(o),a=e.child(o);if(n==a){t+=n.nodeSize;continue}if(!n.sameMarkup(a))return t;if(n.isText&&n.text!=a.text){for(let s=0;n.text[s]==a.text[s];s++)t++;return t}if(n.content.size||a.content.size){let s=Kl(n.content,a.content,t+1);if(s!=null)return s}t+=n.nodeSize}}function Jl(r,e,t,o){for(let n=r.childCount,a=e.childCount;;){if(n==0||a==0)return n==a?null:{a:t,b:o};let s=r.child(--n),l=e.child(--a),p=s.nodeSize;if(s==l){t-=p,o-=p;continue}if(!s.sameMarkup(l))return{a:t,b:o};if(s.isText&&s.text!=l.text){let d=0,c=Math.min(s.text.length,l.text.length);for(;d<c&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,t--,o--;return{a:t,b:o}}if(s.content.size||l.content.size){let d=Jl(s.content,l.content,t-1,o-1);if(d)return d}t-=p,o-=p}}class N{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let o=0;o<e.length;o++)this.size+=e[o].nodeSize}nodesBetween(e,t,o,n=0,a){for(let s=0,l=0;l<t;s++){let p=this.content[s],d=l+p.nodeSize;if(d>e&&o(p,n+l,a||null,s)!==!1&&p.content.size){let c=l+1;p.nodesBetween(Math.max(0,e-c),Math.min(p.content.size,t-c),o,n+c)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,o,n){let a="",s=!0;return this.nodesBetween(e,t,(l,p)=>{let d=l.isText?l.text.slice(Math.max(e,p)-p,t-p):l.isLeaf?n?typeof n=="function"?n(l):n:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&o&&(s?s=!1:a+=o),a+=d},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,o=e.firstChild,n=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(o)&&(n[n.length-1]=t.withText(t.text+o.text),a=1);a<e.content.length;a++)n.push(e.content[a]);return new N(n,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let o=[],n=0;if(t>e)for(let a=0,s=0;s<t;a++){let l=this.content[a],p=s+l.nodeSize;p>e&&((s<e||p>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),o.push(l),n+=l.nodeSize),s=p}return new N(o,n)}cutByIndex(e,t){return e==t?N.empty:e==0&&t==this.content.length?this:new N(this.content.slice(e,t))}replaceChild(e,t){let o=this.content[e];if(o==t)return this;let n=this.content.slice(),a=this.size+t.nodeSize-o.nodeSize;return n[e]=t,new N(n,a)}addToStart(e){return new N([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new N(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,o=0;t<this.content.length;t++){let n=this.content[t];e(n,o,t),o+=n.nodeSize}}findDiffStart(e,t=0){return Kl(this,e,t)}findDiffEnd(e,t=this.size,o=e.size){return Jl(this,e,t,o)}findIndex(e,t=-1){if(e==0)return Rn(0,e);if(e==this.size)return Rn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let o=0,n=0;;o++){let a=this.child(o),s=n+a.nodeSize;if(s>=e)return s==e||t>0?Rn(o+1,s):Rn(o,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return N.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return N.empty;let t,o=0;for(let n=0;n<e.length;n++){let a=e[n];o+=a.nodeSize,n&&a.isText&&e[n-1].sameMarkup(a)?(t||(t=e.slice(0,n)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new N(t||e,o)}static from(e){if(!e)return N.empty;if(e instanceof N)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new N([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}N.empty=new N([],0);const ka={index:0,offset:0};function Rn(r,e){return ka.index=r,ka.offset=e,ka}function Hn(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let o=0;o<r.length;o++)if(!Hn(r[o],e[o]))return!1}else{for(let o in r)if(!(o in e)||!Hn(r[o],e[o]))return!1;for(let o in e)if(!(o in r))return!1}return!0}let te=class Rl{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,o=!1;for(let n=0;n<e.length;n++){let a=e[n];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,n));else{if(a.type.excludes(this.type))return e;!o&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),o=!0),t&&t.push(a)}}return t||(t=e.slice()),o||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let o=e.marks[t.type];if(!o)throw new RangeError(`There is no mark type ${t.type} in this schema`);let n=o.create(t.attrs);return o.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++)if(!e[o].eq(t[o]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Rl.none;if(e instanceof Rl)return[e];let t=e.slice();return t.sort((o,n)=>o.type.rank-n.type.rank),t}};te.none=[];class zn extends Error{}class O{constructor(e,t,o){this.content=e,this.openStart=t,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let o=Xl(this.content,e+this.openStart,t);return o&&new O(o,this.openStart,this.openEnd)}removeBetween(e,t){return new O(Yl(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return O.empty;let o=t.openStart||0,n=t.openEnd||0;if(typeof o!="number"||typeof n!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new O(N.fromJSON(e,t.content),o,n)}static maxOpen(e,t=!0){let o=0,n=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)o++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)n++;return new O(e,o,n)}}O.empty=new O(N.empty,0,0);function Yl(r,e,t){let{index:o,offset:n}=r.findIndex(e),a=r.maybeChild(o),{index:s,offset:l}=r.findIndex(t);if(n==e||a.isText){if(l!=t&&!r.child(s).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(o!=s)throw new RangeError("Removing non-flat range");return r.replaceChild(o,a.copy(Yl(a.content,e-n-1,t-n-1)))}function Xl(r,e,t,o){let{index:n,offset:a}=r.findIndex(e),s=r.maybeChild(n);if(a==e||s.isText)return r.cut(0,e).append(t).append(r.cut(e));let l=Xl(s.content,e-a-1,t);return l&&r.replaceChild(n,s.copy(l))}function rv(r,e,t){if(t.openStart>r.depth)throw new zn("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new zn("Inconsistent open depths");return Ql(r,e,t,0)}function Ql(r,e,t,o){let n=r.index(o),a=r.node(o);if(n==e.index(o)&&o<r.depth-t.openStart){let s=Ql(r,e,t,o+1);return a.copy(a.content.replaceChild(n,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==o&&e.depth==o){let s=r.parent,l=s.content;return Nr(s,l.cut(0,r.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=ov(t,r);return Nr(a,$l(r,s,l,e,o))}else return Nr(a,Fn(r,e,o))}function Zl(r,e){if(!e.type.compatibleContent(r.type))throw new zn("Cannot join "+e.type.name+" onto "+r.type.name)}function Sa(r,e,t){let o=r.node(t);return Zl(o,e.node(t)),o}function Br(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Io(r,e,t,o){let n=(e||r).node(t),a=0,s=e?e.index(t):n.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Br(r.nodeAfter,o),a++));for(let l=a;l<s;l++)Br(n.child(l),o);e&&e.depth==t&&e.textOffset&&Br(e.nodeBefore,o)}function Nr(r,e){return r.type.checkContent(e),r.copy(e)}function $l(r,e,t,o,n){let a=r.depth>n&&Sa(r,e,n+1),s=o.depth>n&&Sa(t,o,n+1),l=[];return Io(null,r,n,l),a&&s&&e.index(n)==t.index(n)?(Zl(a,s),Br(Nr(a,$l(r,e,t,o,n+1)),l)):(a&&Br(Nr(a,Fn(r,e,n+1)),l),Io(e,t,n,l),s&&Br(Nr(s,Fn(t,o,n+1)),l)),Io(o,null,n,l),new N(l)}function Fn(r,e,t){let o=[];if(Io(null,r,t,o),r.depth>t){let n=Sa(r,e,t+1);Br(Nr(n,Fn(r,e,t+1)),o)}return Io(e,null,t,o),new N(o)}function ov(r,e){let t=e.depth-r.openStart,n=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)n=e.node(a).copy(N.from(n));return{start:n.resolveNoCache(r.openStart+t),end:n.resolveNoCache(n.content.size-r.openEnd-t)}}class _o{constructor(e,t,o){this.pos=e,this.path=t,this.parentOffset=o,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let o=this.pos-this.path[this.path.length-1],n=e.child(t);return o?e.child(t).cut(o):n}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let o=this.path[t*3],n=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)n+=o.child(a).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return te.none;if(this.textOffset)return e.child(t).marks;let o=e.maybeChild(t-1),n=e.maybeChild(t);if(!o){let l=o;o=n,n=l}let a=o.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!n||!a[s].isInSet(n.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let o=t.marks,n=e.parent.maybeChild(e.index());for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!n||!o[a].isInSet(n.marks))&&(o=o[a--].removeFromSet(o));return o}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);o>=0;o--)if(e.pos<=this.end(o)&&(!t||t(this.node(o))))return new jn(this,e,o);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let o=[],n=0,a=t;for(let s=e;;){let{index:l,offset:p}=s.content.findIndex(a),d=a-p;if(o.push(s,l,n+p),!d||(s=s.child(l),s.isText))break;a=d-1,n+=p+1}return new _o(t,o,a)}static resolveCached(e,t){let o=ep.get(e);if(o)for(let a=0;a<o.elts.length;a++){let s=o.elts[a];if(s.pos==t)return s}else ep.set(e,o=new nv);let n=o.elts[o.i]=_o.resolve(e,t);return o.i=(o.i+1)%iv,n}}class nv{constructor(){this.elts=[],this.i=0}}const iv=12,ep=new WeakMap;class jn{constructor(e,t,o){this.$from=e,this.$to=t,this.depth=o}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 av=Object.create(null);let tr=class Hl{constructor(e,t,o,n=te.none){this.type=e,this.attrs=t,this.marks=n,this.content=o||N.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,t,o,n=0){this.content.nodesBetween(e,t,o,n,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,o,n){return this.content.textBetween(e,t,o,n)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,o){return this.type==e&&Hn(this.attrs,t||e.defaultAttrs||av)&&te.sameSet(this.marks,o||te.none)}copy(e=null){return e==this.content?this:new Hl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,o=!1){if(e==t)return O.empty;let n=this.resolve(e),a=this.resolve(t),s=o?0:n.sharedDepth(t),l=n.start(s),d=n.node(s).content.cut(n.pos-l,a.pos-l);return new O(d,n.depth-s,a.depth-s)}replace(e,t,o){return rv(this.resolve(e),this.resolve(t),o)}nodeAt(e){for(let t=this;;){let{index:o,offset:n}=t.content.findIndex(e);if(t=t.maybeChild(o),!t)return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:o}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:o}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:o}=this.content.findIndex(e);if(o<e)return{node:this.content.child(t),index:t,offset:o};let n=this.content.child(t-1);return{node:n,index:t-1,offset:o-n.nodeSize}}resolve(e){return _o.resolveCached(this,e)}resolveNoCache(e){return _o.resolve(this,e)}rangeHasMark(e,t,o){let n=!1;return t>e&&this.nodesBetween(e,t,a=>(o.isInSet(a.marks)&&(n=!0),!n)),n}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()+")"),tp(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,o=N.empty,n=0,a=o.childCount){let s=this.contentMatchAt(e).matchFragment(o,n,a),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let p=n;p<a;p++)if(!this.type.allowsMarks(o.child(p).marks))return!1;return!0}canReplaceWith(e,t,o,n){if(n&&!this.type.allowsMarks(n))return!1;let a=this.contentMatchAt(e).matchType(o),s=a&&a.matchFragment(this.content,t);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=te.none;for(let t=0;t<this.marks.length;t++){let o=this.marks[t];o.type.checkAttrs(o.attrs),e=o.addToSet(e)}if(!te.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let o;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,o)}let n=N.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,n,o);return a.type.checkAttrs(a.attrs),a}};tr.prototype.text=void 0;class qn extends tr{constructor(e,t,o,n){if(super(e,t,null,n),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):tp(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function tp(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Pr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let o=new sv(e,t);if(o.next==null)return Pr.empty;let n=rp(o);o.next&&o.err("Unexpected trailing text");let a=uv(bv(n));return gv(a,o),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,o=e.childCount){let n=this;for(let a=t;n&&a<o;a++)n=n.matchType(e.child(a).type);return n}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let o=0;o<e.next.length;o++)if(this.next[t].type==e.next[o].type)return!0;return!1}fillBefore(e,t=!1,o=0){let n=[this];function a(s,l){let p=s.matchFragment(e,o);if(p&&(!t||p.validEnd))return N.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:c,next:m}=s.next[d];if(!(c.isText||c.hasRequiredAttrs())&&n.indexOf(m)==-1){n.push(m);let b=a(m,l.concat(c));if(b)return b}}return null}return a(this,[])}findWrapping(e){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==e)return this.wrapCache[o+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let n=o.shift(),a=n.match;if(a.matchType(e)){let s=[];for(let l=n;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:l,next:p}=a.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!n.type||p.validEnd)&&(o.push({match:l.contentMatch,type:l,via:n}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(o){e.push(o);for(let n=0;n<o.next.length;n++)e.indexOf(o.next[n].next)==-1&&t(o.next[n].next)}return t(this),e.map((o,n)=>{let a=n+(o.validEnd?"*":" ")+" ";for(let s=0;s<o.next.length;s++)a+=(s?", ":"")+o.next[s].type.name+"->"+e.indexOf(o.next[s].next);return a}).join(`
8
- `)}}Pr.empty=new Pr(!0);class sv{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function rp(r){let e=[];do e.push(lv(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function lv(r){let e=[];do e.push(pv(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function pv(r){let e=mv(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=dv(r,e);else break;return e}function op(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function dv(r,e){let t=op(r),o=t;return r.eat(",")&&(r.next!="}"?o=op(r):o=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:o,expr:e}}function cv(r,e){let t=r.nodeTypes,o=t[e];if(o)return[o];let n=[];for(let a in t){let s=t[a];s.isInGroup(e)&&n.push(s)}return n.length==0&&r.err("No node type or group '"+e+"' found"),n}function mv(r){if(r.eat("(")){let e=rp(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=cv(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function bv(r){let e=[[]];return n(a(r,0),t()),e;function t(){return e.push([])-1}function o(s,l,p){let d={term:p,to:l};return e[s].push(d),d}function n(s,l){s.forEach(p=>p.to=l)}function a(s,l){if(s.type=="choice")return s.exprs.reduce((p,d)=>p.concat(a(d,l)),[]);if(s.type=="seq")for(let p=0;;p++){let d=a(s.exprs[p],l);if(p==s.exprs.length-1)return d;n(d,l=t())}else if(s.type=="star"){let p=t();return o(l,p),n(a(s.expr,p),p),[o(p)]}else if(s.type=="plus"){let p=t();return n(a(s.expr,l),p),n(a(s.expr,p),p),[o(p)]}else{if(s.type=="opt")return[o(l)].concat(a(s.expr,l));if(s.type=="range"){let p=l;for(let d=0;d<s.min;d++){let c=t();n(a(s.expr,p),c),p=c}if(s.max==-1)n(a(s.expr,p),p);else for(let d=s.min;d<s.max;d++){let c=t();o(p,c),n(a(s.expr,p),c),p=c}return[o(p)]}else{if(s.type=="name")return[o(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function np(r,e){return e-r}function ip(r,e){let t=[];return o(e),t.sort(np);function o(n){let a=r[n];if(a.length==1&&!a[0].term)return o(a[0].to);t.push(n);for(let s=0;s<a.length;s++){let{term:l,to:p}=a[s];!l&&t.indexOf(p)==-1&&o(p)}}}function uv(r){let e=Object.create(null);return t(ip(r,0));function t(o){let n=[];o.forEach(s=>{r[s].forEach(({term:l,to:p})=>{if(!l)return;let d;for(let c=0;c<n.length;c++)n[c][0]==l&&(d=n[c][1]);ip(r,p).forEach(c=>{d||n.push([l,d=[]]),d.indexOf(c)==-1&&d.push(c)})})});let a=e[o.join(",")]=new Pr(o.indexOf(r.length-1)>-1);for(let s=0;s<n.length;s++){let l=n[s][1].sort(np);a.next.push({type:n[s][0],next:e[l.join(",")]||t(l)})}return a}}function gv(r,e){for(let t=0,o=[r];t<o.length;t++){let n=o[t],a=!n.validEnd,s=[];for(let l=0;l<n.next.length;l++){let{type:p,next:d}=n.next[l];s.push(p.name),a&&!(p.isText||p.hasRequiredAttrs())&&(a=!1),o.indexOf(d)==-1&&o.push(d)}a&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function ap(r){let e=Object.create(null);for(let t in r){let o=r[t];if(!o.hasDefault)return null;e[t]=o.default}return e}function sp(r,e){let t=Object.create(null);for(let o in r){let n=e&&e[o];if(n===void 0){let a=r[o];if(a.hasDefault)n=a.default;else throw new RangeError("No value supplied for attribute "+o)}t[o]=n}return t}function lp(r,e,t,o){for(let n in e)if(!(n in r))throw new RangeError(`Unsupported attribute ${n} for ${t} of type ${n}`);for(let n in r){let a=r[n];a.validate&&a.validate(e[n])}}function pp(r,e){let t=Object.create(null);if(e)for(let o in e)t[o]=new fv(r,o,e[o]);return t}let dp=class Nw{constructor(e,t,o){this.name=e,this.schema=t,this.spec=o,this.markSet=null,this.groups=o.group?o.group.split(" "):[],this.attrs=pp(e,o.attrs),this.defaultAttrs=ap(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(o.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Pr.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:sp(this.attrs,e)}create(e=null,t,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new tr(this,this.computeAttrs(e),N.from(t),te.setFrom(o))}createChecked(e=null,t,o){return t=N.from(t),this.checkContent(t),new tr(this,this.computeAttrs(e),t,te.setFrom(o))}createAndFill(e=null,t,o){if(e=this.computeAttrs(e),t=N.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let n=this.contentMatch.matchFragment(t),a=n&&n.fillBefore(N.empty,!0);return a?new tr(this,e,t.append(a),te.setFrom(o)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let o=0;o<e.childCount;o++)if(!this.allowsMarks(e.child(o).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){lp(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let o=0;o<e.length;o++)this.allowsMarkType(e[o].type)?t&&t.push(e[o]):t||(t=e.slice(0,o));return t?t.length?t:te.none:e}static compile(e,t){let o=Object.create(null);e.forEach((a,s)=>o[a]=new Nw(a,t,s));let n=t.spec.topNode||"doc";if(!o[n])throw new RangeError("Schema is missing its top node type ('"+n+"')");if(!o.text)throw new RangeError("Every schema needs a 'text' type");for(let a in o.text.attrs)throw new RangeError("The text node type should not have attributes");return o}};function xv(r,e,t){let o=t.split("|");return n=>{let a=n===null?"null":typeof n;if(o.indexOf(a)<0)throw new RangeError(`Expected value of type ${o} for attribute ${e} on type ${r}, got ${a}`)}}class fv{constructor(e,t,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?xv(e,t,o.validate):o.validate}get isRequired(){return!this.hasDefault}}class Wn{constructor(e,t,o,n){this.name=e,this.rank=t,this.schema=o,this.spec=n,this.attrs=pp(e,n.attrs),this.excluded=null;let a=ap(this.attrs);this.instance=a?new te(this,a):null}create(e=null){return!e&&this.instance?this.instance:new te(this,sp(this.attrs,e))}static compile(e,t){let o=Object.create(null),n=0;return e.forEach((a,s)=>o[a]=new Wn(a,n++,t,s)),o}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){lp(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class cp{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Se.from(e.nodes),t.marks=Se.from(e.marks||{}),this.nodes=dp.compile(this.spec.nodes,this),this.marks=Wn.compile(this.spec.marks,this);let o=Object.create(null);for(let n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");let a=this.nodes[n],s=a.spec.content||"",l=a.spec.marks;if(a.contentMatch=o[s]||(o[s]=Pr.parse(s,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=l=="_"?null:l?mp(this,l.split(" ")):l==""||!a.inlineContent?[]:null}for(let n in this.marks){let a=this.marks[n],s=a.spec.excludes;a.excluded=s==null?[a]:s==""?[]:mp(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,o,n){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof dp){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,o,n)}text(e,t){let o=this.nodes.text;return new qn(o,o.defaultAttrs,e,te.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return tr.fromJSON(this,e)}markFromJSON(e){return te.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function mp(r,e){let t=[];for(let o=0;o<e.length;o++){let n=e[o],a=r.marks[n],s=a;if(a)t.push(a);else for(let l in r.marks){let p=r.marks[l];(n=="_"||p.spec.group&&p.spec.group.split(" ").indexOf(n)>-1)&&t.push(s=p)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[o]+"'")}return t}function hv(r){return r.tag!=null}function yv(r){return r.style!=null}let Ro=class zl{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let o=this.matchedStyles=[];t.forEach(n=>{if(hv(n))this.tags.push(n);else if(yv(n)){let a=/[^=]*/.exec(n.style)[0];o.indexOf(a)<0&&o.push(a),this.styles.push(n)}}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let a=e.nodes[n.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let o=new xp(this,t,!1);return o.addAll(e,te.none,t.from,t.to),o.finish()}parseSlice(e,t={}){let o=new xp(this,t,!0);return o.addAll(e,te.none,t.from,t.to),O.maxOpen(o.finish())}matchTag(e,t,o){for(let n=o?this.tags.indexOf(o)+1:0;n<this.tags.length;n++){let a=this.tags[n];if(kv(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let s=a.getAttrs(e);if(s===!1)continue;a.attrs=s||void 0}return a}}}matchStyle(e,t,o,n){for(let a=n?this.styles.indexOf(n)+1:0;a<this.styles.length;a++){let s=this.styles[a],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!o.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let p=s.getAttrs(t);if(p===!1)continue;s.attrs=p||void 0}return s}}}static schemaRules(e){let t=[];function o(n){let a=n.priority==null?50:n.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<a)break}t.splice(s,0,n)}for(let n in e.marks){let a=e.marks[n].spec.parseDOM;a&&a.forEach(s=>{o(s=fp(s)),s.mark||s.ignore||s.clearMark||(s.mark=n)})}for(let n in e.nodes){let a=e.nodes[n].spec.parseDOM;a&&a.forEach(s=>{o(s=fp(s)),s.node||s.ignore||s.mark||(s.node=n)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zl(e,zl.schemaRules(e)))}};const bp={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},wv={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},up={ol:!0,ul:!0},Ho=1,Ca=2,zo=4;function gp(r,e,t){return e!=null?(e?Ho:0)|(e==="full"?Ca:0):r&&r.whitespace=="pre"?Ho|Ca:t&~zo}class Un{constructor(e,t,o,n,a,s){this.type=e,this.attrs=t,this.marks=o,this.solid=n,this.options=s,this.content=[],this.activeMarks=te.none,this.match=a||(s&zo?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(N.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let o=this.type.contentMatch,n;return(n=o.findWrapping(e.type))?(this.match=o,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ho)){let o=this.content[this.content.length-1],n;if(o&&o.isText&&(n=/[ \t\r\n\u000c]+$/.exec(o.text))){let a=o;o.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-n[0].length))}}let t=N.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!bp.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class xp{constructor(e,t,o){this.parser=e,this.options=t,this.isOpen=o,this.open=0,this.localPreserveWS=!1;let n=t.topNode,a,s=gp(null,t.preserveWhitespace,0)|(o?zo:0);n?a=new Un(n.type,n.attrs,te.none,!0,t.topMatch||n.type.contentMatch,s):o?a=new Un(null,null,te.none,!0,null,s):a=new Un(e.schema.topNodeType,null,te.none,!0,null,s),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let o=e.nodeValue,n=this.top,a=n.options&Ca?"full":this.localPreserveWS||(n.options&Ho)>0;if(a==="full"||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(o)){if(a)a!=="full"?o=o.replace(/\r?\n|\r/g," "):o=o.replace(/\r\n?/g,`
9
- `);else if(o=o.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(o)&&this.open==this.nodes.length-1){let s=n.content[n.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(o=o.slice(1))}o&&this.insertNode(this.parser.schema.text(o),t,!/\S/.test(o)),this.findInText(e)}else this.findInside(e)}addElement(e,t,o){let n=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;up.hasOwnProperty(s)&&this.parser.normalizeLists&&vv(e);let p=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,o));e:if(p?p.ignore:wv.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!p||p.skip||p.closeParent){p&&p.closeParent?this.open=Math.max(0,this.open-1):p&&p.skip.nodeType&&(e=p.skip);let d,c=this.needsBlock;if(bp.hasOwnProperty(s))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),d=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let m=p&&p.skip?t:this.readStyles(e,t);m&&this.addAll(e,m),d&&this.sync(a),this.needsBlock=c}else{let d=this.readStyles(e,t);d&&this.addElementByRule(e,p,d,p.consuming===!1?l:void 0)}this.localPreserveWS=n}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
- `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let o=e.style;if(o&&o.length)for(let n=0;n<this.parser.matchedStyles.length;n++){let a=this.parser.matchedStyles[n],s=o.getPropertyValue(a);if(s)for(let l=void 0;;){let p=this.parser.matchStyle(a,s,this,l);if(!p)break;if(p.ignore)return null;if(p.clearMark?t=t.filter(d=>!p.clearMark(d)):t=t.concat(this.parser.schema.marks[p.mark].create(p.attrs)),p.consuming===!1)l=p;else break}}return t}addElementByRule(e,t,o,n){let a,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),o,e.nodeName=="BR")||this.leafFallback(e,o);else{let p=this.enter(s,t.attrs||null,o,t.preserveWhitespace);p&&(a=!0,o=p)}else{let p=this.parser.schema.marks[t.mark];o=o.concat(p.create(t.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(n)this.addElement(e,o,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(p=>this.insertNode(p,o,!1));else{let p=e;typeof t.contentElement=="string"?p=e.querySelector(t.contentElement):typeof t.contentElement=="function"?p=t.contentElement(e):t.contentElement&&(p=t.contentElement),this.findAround(e,p,!0),this.addAll(p,o),this.findAround(e,p,!1)}a&&this.sync(l)&&this.open--}addAll(e,t,o,n){let a=o||0;for(let s=o?e.childNodes[o]:e.firstChild,l=n==null?null:e.childNodes[n];s!=l;s=s.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(s,t);this.findAtPoint(e,a)}findPlace(e,t,o){let n,a;for(let s=this.open,l=0;s>=0;s--){let p=this.nodes[s],d=p.findWrapping(e);if(d&&(!n||n.length>d.length+l)&&(n=d,a=p,!d.length))break;if(p.solid){if(o)break;l+=2}}if(!n)return null;this.sync(a);for(let s=0;s<n.length;s++)t=this.enterInner(n[s],null,t,!1);return t}insertNode(e,t,o){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let n=this.findPlace(e,t,o);if(n){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let s=te.none;for(let l of n.concat(e.marks))(a.type?a.type.allowsMarkType(l.type):hp(l.type,e.type))&&(s=l.addToSet(s));return a.content.push(e.mark(s)),!0}return!1}enter(e,t,o,n){let a=this.findPlace(e.create(t),o,!1);return a&&(a=this.enterInner(e,t,o,!0,n)),a}enterInner(e,t,o,n=!1,a){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=gp(e,a,s.options);s.options&zo&&s.content.length==0&&(l|=zo);let p=te.none;return o=o.filter(d=>(s.type?s.type.allowsMarkType(d.type):hp(d.type,e))?(p=d.addToSet(p),!1):!0),this.nodes.push(new Un(e,t,p,n,null,l)),this.open++,o}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ho)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let o=this.nodes[t].content;for(let n=o.length-1;n>=0;n--)e+=o[n].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==e&&this.find[o].offset==t&&(this.find[o].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,o){if(e!=t&&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)&&t.compareDocumentPosition(this.find[n].node)&(o?2:4)&&(this.find[n].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),o=this.options.context,n=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),a=-(o?o.depth+1:0)+(n?0:1),s=(l,p)=>{for(;l>=0;l--){let d=t[l];if(d==""){if(l==t.length-1||l==0)continue;for(;p>=a;p--)if(s(l-1,p))return!0;return!1}else{let c=p>0||p==0&&n?this.nodes[p].type:o&&p>=a?o.node(p-a).type:null;if(!c||c.name!=d&&!c.isInGroup(d))return!1;p--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(o&&o.isTextblock&&o.defaultAttrs)return o}for(let t in this.parser.schema.nodes){let o=this.parser.schema.nodes[t];if(o.isTextblock&&o.defaultAttrs)return o}}}function vv(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let o=e.nodeType==1?e.nodeName.toLowerCase():null;o&&up.hasOwnProperty(o)&&t?(t.appendChild(e),e=t):o=="li"?t=e:o&&(t=null)}}function kv(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function fp(r){let e={};for(let t in r)e[t]=r[t];return e}function hp(r,e){let t=e.schema.nodes;for(let o in t){let n=t[o];if(!n.allowsMarkType(r))continue;let a=[],s=l=>{a.push(l);for(let p=0;p<l.edgeCount;p++){let{type:d,next:c}=l.edge(p);if(d==e||a.indexOf(c)<0&&s(c))return!0}};if(s(n.contentMatch))return!0}}class Dr{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},o){o||(o=Ea(t).createDocumentFragment());let n=o,a=[];return e.forEach(s=>{if(a.length||s.marks.length){let l=0,p=0;for(;l<a.length&&p<s.marks.length;){let d=s.marks[p];if(!this.marks[d.type.name]){p++;continue}if(!d.eq(a[l][0])||d.type.spec.spanning===!1)break;l++,p++}for(;l<a.length;)n=a.pop()[1];for(;p<s.marks.length;){let d=s.marks[p++],c=this.serializeMark(d,s.isInline,t);c&&(a.push([d,n]),n.appendChild(c.dom),n=c.contentDOM||c.dom)}}n.appendChild(this.serializeNodeInner(s,t))}),o}serializeNodeInner(e,t){let{dom:o,contentDOM:n}=Gn(Ea(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return o}serializeNode(e,t={}){let o=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let a=this.serializeMark(e.marks[n],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(o),o=a.dom)}return o}serializeMark(e,t,o={}){let n=this.marks[e.type.name];return n&&Gn(Ea(o),n(e,t),null,e.attrs)}static renderSpec(e,t,o=null,n){return Gn(e,t,o,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Dr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=yp(e.nodes);return t.text||(t.text=o=>o.text),t}static marksFromSchema(e){return yp(e.marks)}}function yp(r){let e={};for(let t in r){let o=r[t].spec.toDOM;o&&(e[t]=o)}return e}function Ea(r){return r.document||window.document}const wp=new WeakMap;function Sv(r){let e=wp.get(r);return e===void 0&&wp.set(r,e=Cv(r)),e}function Cv(r){let e=null;function t(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")e||(e=[]),e.push(o);else for(let n=0;n<o.length;n++)t(o[n]);else for(let n in o)t(o[n])}return t(r),e}function Gn(r,e,t,o){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let n=e[0],a;if(typeof n!="string")throw new RangeError("Invalid array passed to renderSpec");if(o&&(a=Sv(o))&&a.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=n.indexOf(" ");s>0&&(t=n.slice(0,s),n=n.slice(s+1));let l,p=t?r.createElementNS(t,n):r.createElement(n),d=e[1],c=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){c=2;for(let m in d)if(d[m]!=null){let b=m.indexOf(" ");b>0?p.setAttributeNS(m.slice(0,b),m.slice(b+1),d[m]):p.setAttribute(m,d[m])}}for(let m=c;m<e.length;m++){let b=e[m];if(b===0){if(m<e.length-1||m>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:p,contentDOM:p}}else{let{dom:u,contentDOM:g}=Gn(r,b,t,o);if(p.appendChild(u),g){if(l)throw new RangeError("Multiple content holes");l=g}}}return{dom:p,contentDOM:l}}const vp=65535,kp=Math.pow(2,16);function Ev(r,e){return r+e*kp}function Sp(r){return r&vp}function Tv(r){return(r-(r&vp))/kp}const Cp=1,Ep=2,Kn=4,Tp=8;class Ta{constructor(e,t,o){this.pos=e,this.delInfo=t,this.recover=o}get deleted(){return(this.delInfo&Tp)>0}get deletedBefore(){return(this.delInfo&(Cp|Kn))>0}get deletedAfter(){return(this.delInfo&(Ep|Kn))>0}get deletedAcross(){return(this.delInfo&Kn)>0}}class Xe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Xe.empty)return Xe.empty}recover(e){let t=0,o=Sp(e);if(!this.inverted)for(let n=0;n<o;n++)t+=this.ranges[n*3+2]-this.ranges[n*3+1];return this.ranges[o*3]+t+Tv(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,o){let n=0,a=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let p=this.ranges[l]-(this.inverted?n:0);if(p>e)break;let d=this.ranges[l+a],c=this.ranges[l+s],m=p+d;if(e<=m){let b=d?e==p?-1:e==m?1:t:t,u=p+n+(b<0?0:c);if(o)return u;let g=e==(t<0?p:m)?null:Ev(l/3,e-p),f=e==p?Ep:e==m?Cp:Kn;return(t<0?e!=p:e!=m)&&(f|=Tp),new Ta(u,f,g)}n+=c-d}return o?e+n:new Ta(e+n,0,null)}touches(e,t){let o=0,n=Sp(t),a=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let p=this.ranges[l]-(this.inverted?o:0);if(p>e)break;let d=this.ranges[l+a],c=p+d;if(e<=c&&l==n*3)return!0;o+=this.ranges[l+s]-d}return!1}forEach(e){let t=this.inverted?2:1,o=this.inverted?1:2;for(let n=0,a=0;n<this.ranges.length;n+=3){let s=this.ranges[n],l=s-(this.inverted?a:0),p=s+(this.inverted?0:a),d=this.ranges[n+t],c=this.ranges[n+o];e(l,l+d,p,p+c),a+=c-d}}invert(){return new Xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Xe.empty:new Xe(e<0?[0,-e,0]:[0,0,e])}}Xe.empty=new Xe([]);class Fo{constructor(e,t,o=0,n=e?e.length:0){this.mirror=t,this.from=o,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Fo(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,o=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],n!=null&&n<t?o+n:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,o=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),n!=null&&n>t?o-n-1:void 0)}}invert(){let e=new Fo;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let o=this.from;o<this.to;o++)e=this._maps[o].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,o){let n=0;for(let a=this.from;a<this.to;a++){let s=this._maps[a],l=s.mapResult(e,t);if(l.recover!=null){let p=this.getMirror(a);if(p!=null&&p>a&&p<this.to){a=p,e=this._maps[p].recover(l.recover);continue}}n|=l.delInfo,e=l.pos}return o?e:new Ta(e,n,null)}}const Ma=Object.create(null);class Pe{getMap(){return Xe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=Ma[t.stepType];if(!o)throw new RangeError(`No step type ${t.stepType} defined`);return o.fromJSON(e,t)}static jsonID(e,t){if(e in Ma)throw new RangeError("Duplicate use of step JSON ID "+e);return Ma[e]=t,t.prototype.jsonID=e,t}}class ce{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ce(e,null)}static fail(e){return new ce(null,e)}static fromReplace(e,t,o,n){try{return ce.ok(e.replace(t,o,n))}catch(a){if(a instanceof zn)return ce.fail(a.message);throw a}}}function Ba(r,e,t){let o=[];for(let n=0;n<r.childCount;n++){let a=r.child(n);a.content.size&&(a=a.copy(Ba(a.content,e,a))),a.isInline&&(a=e(a,t,n)),o.push(a)}return N.fromArray(o)}class rr extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=e.resolve(this.from),n=o.node(o.sharedDepth(this.to)),a=new O(Ba(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),n),t.openStart,t.openEnd);return ce.fromReplace(e,this.from,this.to,a)}invert(){return new Et(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new rr(t.pos,o.pos,this.mark)}merge(e){return e instanceof rr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new rr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new rr(t.from,t.to,e.markFromJSON(t.mark))}}Pe.jsonID("addMark",rr);class Et extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=new O(Ba(t.content,n=>n.mark(this.mark.removeFromSet(n.marks)),e),t.openStart,t.openEnd);return ce.fromReplace(e,this.from,this.to,o)}invert(){return new rr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new Et(t.pos,o.pos,this.mark)}merge(e){return e instanceof Et&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Et(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Et(t.from,t.to,e.markFromJSON(t.mark))}}Pe.jsonID("removeMark",Et);class or extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let o=this.mark.addToSet(t.marks);if(o.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(o))return new or(this.pos,t.marks[n]);return new or(this.pos,this.mark)}}return new Lr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new or(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new or(t.pos,e.markFromJSON(t.mark))}}Pe.jsonID("addNodeMark",or);class Lr extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new or(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Lr(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Lr(t.pos,e.markFromJSON(t.mark))}}Pe.jsonID("removeNodeMark",Lr);class xe extends Pe{constructor(e,t,o,n=!1){super(),this.from=e,this.to=t,this.slice=o,this.structure=n}apply(e){return this.structure&&Na(e,this.from,this.to)?ce.fail("Structure replace would overwrite content"):ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new xe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deletedAcross&&o.deletedAcross?null:new xe(t.pos,Math.max(t.pos,o.pos),this.slice,this.structure)}merge(e){if(!(e instanceof xe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?O.empty:new O(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new xe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?O.empty:new O(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new xe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new xe(t.from,t.to,O.fromJSON(e,t.slice),!!t.structure)}}Pe.jsonID("replace",xe);class fe extends Pe{constructor(e,t,o,n,a,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=o,this.gapTo=n,this.slice=a,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Na(e,this.from,this.gapFrom)||Na(e,this.gapTo,this.to)))return ce.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ce.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,t.content);return o?ce.fromReplace(e,this.from,this.to,o):ce.fail("Content does not fit in gap")}getMap(){return new Xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new fe(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?o.pos:e.map(this.gapTo,1);return t.deletedAcross&&o.deletedAcross||n<t.pos||a>o.pos?null:new fe(t.pos,o.pos,n,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new fe(t.from,t.to,t.gapFrom,t.gapTo,O.fromJSON(e,t.slice),t.insert,!!t.structure)}}Pe.jsonID("replaceAround",fe);function Na(r,e,t){let o=r.resolve(e),n=t-e,a=o.depth;for(;n>0&&a>0&&o.indexAfter(a)==o.node(a).childCount;)a--,n--;if(n>0){let s=o.node(a).maybeChild(o.indexAfter(a));for(;n>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,n--}}return!1}function Mv(r,e,t,o){let n=[],a=[],s,l;r.doc.nodesBetween(e,t,(p,d,c)=>{if(!p.isInline)return;let m=p.marks;if(!o.isInSet(m)&&c.type.allowsMarkType(o.type)){let b=Math.max(d,e),u=Math.min(d+p.nodeSize,t),g=o.addToSet(m);for(let f=0;f<m.length;f++)m[f].isInSet(g)||(s&&s.to==b&&s.mark.eq(m[f])?s.to=u:n.push(s=new Et(b,u,m[f])));l&&l.to==b?l.to=u:a.push(l=new rr(b,u,o))}}),n.forEach(p=>r.step(p)),a.forEach(p=>r.step(p))}function Bv(r,e,t,o){let n=[],a=0;r.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;a++;let p=null;if(o instanceof Wn){let d=s.marks,c;for(;c=o.isInSet(d);)(p||(p=[])).push(c),d=c.removeFromSet(d)}else o?o.isInSet(s.marks)&&(p=[o]):p=s.marks;if(p&&p.length){let d=Math.min(l+s.nodeSize,t);for(let c=0;c<p.length;c++){let m=p[c],b;for(let u=0;u<n.length;u++){let g=n[u];g.step==a-1&&m.eq(n[u].style)&&(b=g)}b?(b.to=d,b.step=a):n.push({style:m,from:Math.max(l,e),to:d,step:a})}}}),n.forEach(s=>r.step(new Et(s.from,s.to,s.style)))}function Pa(r,e,t,o=t.contentMatch,n=!0){let a=r.doc.nodeAt(e),s=[],l=e+1;for(let p=0;p<a.childCount;p++){let d=a.child(p),c=l+d.nodeSize,m=o.matchType(d.type);if(!m)s.push(new xe(l,c,O.empty));else{o=m;for(let b=0;b<d.marks.length;b++)t.allowsMarkType(d.marks[b].type)||r.step(new Et(l,c,d.marks[b]));if(n&&d.isText&&t.whitespace!="pre"){let b,u=/\r?\n|\r/g,g;for(;b=u.exec(d.text);)g||(g=new O(N.from(t.schema.text(" ",t.allowedMarks(d.marks))),0,0)),s.push(new xe(l+b.index,l+b.index+b[0].length,g))}}l=c}if(!o.validEnd){let p=o.fillBefore(N.empty,!0);r.replace(l,l,new O(p,0,0))}for(let p=s.length-1;p>=0;p--)r.step(s[p])}function Nv(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function ao(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let o=r.depth;;--o){let n=r.$from.node(o),a=r.$from.index(o),s=r.$to.indexAfter(o);if(o<r.depth&&n.canReplace(a,s,t))return o;if(o==0||n.type.spec.isolating||!Nv(n,a,s))break}return null}function Pv(r,e,t){let{$from:o,$to:n,depth:a}=e,s=o.before(a+1),l=n.after(a+1),p=s,d=l,c=N.empty,m=0;for(let g=a,f=!1;g>t;g--)f||o.index(g)>0?(f=!0,c=N.from(o.node(g).copy(c)),m++):p--;let b=N.empty,u=0;for(let g=a,f=!1;g>t;g--)f||n.after(g+1)<n.end(g)?(f=!0,b=N.from(n.node(g).copy(b)),u++):d++;r.step(new fe(p,d,s,l,new O(c.append(b),m,u),c.size-m,!0))}function Da(r,e,t=null,o=r){let n=Dv(r,e),a=n&&Lv(o,e);return a?n.map(Mp).concat({type:e,attrs:t}).concat(a.map(Mp)):null}function Mp(r){return{type:r,attrs:null}}function Dv(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.contentMatchAt(o).findWrapping(e);if(!a)return null;let s=a.length?a[0]:e;return t.canReplaceWith(o,n,s)?a:null}function Lv(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.child(o),s=e.contentMatch.findWrapping(a.type);if(!s)return null;let p=(s.length?s[s.length-1]:e).contentMatch;for(let d=o;p&&d<n;d++)p=p.matchType(t.child(d).type);return!p||!p.validEnd?null:s}function Av(r,e,t){let o=N.empty;for(let s=t.length-1;s>=0;s--){if(o.size){let l=t[s].type.contentMatch.matchFragment(o);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=N.from(t[s].type.create(t[s].attrs,o))}let n=e.start,a=e.end;r.step(new fe(n,a,n,a,new O(o,0,0),t.length,!0))}function Ov(r,e,t,o,n){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(s,l)=>{let p=typeof n=="function"?n(s):n;if(s.isTextblock&&!s.hasMarkup(o,p)&&Vv(r.doc,r.mapping.slice(a).map(l),o)){let d=null;if(o.schema.linebreakReplacement){let u=o.whitespace=="pre",g=!!o.contentMatch.matchType(o.schema.linebreakReplacement);u&&!g?d=!1:!u&&g&&(d=!0)}d===!1&&Np(r,s,l,a),Pa(r,r.mapping.slice(a).map(l,1),o,void 0,d===null);let c=r.mapping.slice(a),m=c.map(l,1),b=c.map(l+s.nodeSize,1);return r.step(new fe(m,b,m+1,b-1,new O(N.from(o.create(p,null,s.marks)),0,0),1,!0)),d===!0&&Bp(r,s,l,a),!1}})}function Bp(r,e,t,o){e.forEach((n,a)=>{if(n.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(n.text);){let p=r.mapping.slice(o).map(t+1+a+s.index);r.replaceWith(p,p+1,e.type.schema.linebreakReplacement.create())}}})}function Np(r,e,t,o){e.forEach((n,a)=>{if(n.type==n.type.schema.linebreakReplacement){let s=r.mapping.slice(o).map(t+1+a);r.replaceWith(s,s+1,e.type.schema.text(`
11
- `))}})}function Vv(r,e,t){let o=r.resolve(e),n=o.index();return o.parent.canReplaceWith(n,n+1,t)}function Iv(r,e,t,o,n){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let s=t.create(o,null,n||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,s);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new fe(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new O(N.from(s),0,0),1,!0))}function It(r,e,t=1,o){let n=r.resolve(e),a=n.depth-t,s=o&&o[o.length-1]||n.parent;if(a<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!s.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(let d=n.depth-1,c=t-2;d>a;d--,c--){let m=n.node(d),b=n.index(d);if(m.type.spec.isolating)return!1;let u=m.content.cutByIndex(b,m.childCount),g=o&&o[c+1];g&&(u=u.replaceChild(0,g.type.create(g.attrs)));let f=o&&o[c]||m;if(!m.canReplace(b+1,m.childCount)||!f.type.validContent(u))return!1}let l=n.indexAfter(a),p=o&&o[0];return n.node(a).canReplaceWith(l,l,p?p.type:n.node(a+1).type)}function _v(r,e,t=1,o){let n=r.doc.resolve(e),a=N.empty,s=N.empty;for(let l=n.depth,p=n.depth-t,d=t-1;l>p;l--,d--){a=N.from(n.node(l).copy(a));let c=o&&o[d];s=N.from(c?c.type.create(c.attrs,s):n.node(l).copy(s))}r.step(new xe(e,e,new O(a.append(s),t,t),!0))}function nr(r,e){let t=r.resolve(e),o=t.index();return Pp(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(o,o+1)}function Rv(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:o}=r.type.schema;for(let n=0;n<e.childCount;n++){let a=e.child(n),s=a.type==o?r.type.schema.nodes.text:a.type;if(t=t.matchType(s),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function Pp(r,e){return!!(r&&e&&!r.isLeaf&&Rv(r,e))}function Jn(r,e,t=-1){let o=r.resolve(e);for(let n=o.depth;;n--){let a,s,l=o.index(n);if(n==o.depth?(a=o.nodeBefore,s=o.nodeAfter):t>0?(a=o.node(n+1),l++,s=o.node(n).maybeChild(l)):(a=o.node(n).maybeChild(l-1),s=o.node(n+1)),a&&!a.isTextblock&&Pp(a,s)&&o.node(n).canReplace(l,l+1))return e;if(n==0)break;e=t<0?o.before(n):o.after(n)}}function Hv(r,e,t){let o=null,{linebreakReplacement:n}=r.doc.type.schema,a=r.doc.resolve(e-t),s=a.node().type;if(n&&s.inlineContent){let c=s.whitespace=="pre",m=!!s.contentMatch.matchType(n);c&&!m?o=!1:!c&&m&&(o=!0)}let l=r.steps.length;if(o===!1){let c=r.doc.resolve(e+t);Np(r,c.node(),c.before(),l)}s.inlineContent&&Pa(r,e+t-1,s,a.node().contentMatchAt(a.index()),o==null);let p=r.mapping.slice(l),d=p.map(e-t);if(r.step(new xe(d,p.map(e+t,-1),O.empty,!0)),o===!0){let c=r.doc.resolve(d);Bp(r,c.node(),c.before(),r.steps.length)}return r}function zv(r,e,t){let o=r.resolve(e);if(o.parent.canReplaceWith(o.index(),o.index(),t))return e;if(o.parentOffset==0)for(let n=o.depth-1;n>=0;n--){let a=o.index(n);if(o.node(n).canReplaceWith(a,a,t))return o.before(n+1);if(a>0)return null}if(o.parentOffset==o.parent.content.size)for(let n=o.depth-1;n>=0;n--){let a=o.indexAfter(n);if(o.node(n).canReplaceWith(a,a,t))return o.after(n+1);if(a<o.node(n).childCount)return null}return null}function Dp(r,e,t){let o=r.resolve(e);if(!t.content.size)return e;let n=t.content;for(let a=0;a<t.openStart;a++)n=n.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let s=o.depth;s>=0;s--){let l=s==o.depth?0:o.pos<=(o.start(s+1)+o.end(s+1))/2?-1:1,p=o.index(s)+(l>0?1:0),d=o.node(s),c=!1;if(a==1)c=d.canReplace(p,p,n);else{let m=d.contentMatchAt(p).findWrapping(n.firstChild.type);c=m&&d.canReplaceWith(p,p,m[0])}if(c)return l==0?o.pos:l<0?o.before(s+1):o.after(s+1)}return null}function Yn(r,e,t=e,o=O.empty){if(e==t&&!o.size)return null;let n=r.resolve(e),a=r.resolve(t);return Lp(n,a,o)?new xe(e,t,o):new Fv(n,a,o).fit()}function Lp(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class Fv{constructor(e,t,o){this.$from=e,this.$to=t,this.unplaced=o,this.frontier=[],this.placed=N.empty;for(let n=0;n<=e.depth;n++){let a=e.node(n);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(n))})}for(let n=e.depth;n>0;n--)this.placed=N.from(e.node(n).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(),t=this.placed.size-this.depth-this.$from.depth,o=this.$from,n=this.close(e<0?this.$to:o.doc.resolve(e));if(!n)return null;let a=this.placed,s=o.depth,l=n.depth;for(;s&&l&&a.childCount==1;)a=a.firstChild.content,s--,l--;let p=new O(a,s,l);return e>-1?new fe(o.pos,e,this.$to.pos,this.$to.end(),p,t):p.size||o.pos!=this.$to.pos?new xe(o.pos,n.pos,p):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,o=0,n=this.unplaced.openEnd;o<e;o++){let a=t.firstChild;if(t.childCount>1&&(n=0),a.type.spec.isolating&&n<=o){e=o;break}t=a.content}for(let t=1;t<=2;t++)for(let o=t==1?e:this.unplaced.openStart;o>=0;o--){let n,a=null;o?(a=La(this.unplaced.content,o-1).firstChild,n=a.content):n=this.unplaced.content;let s=n.firstChild;for(let l=this.depth;l>=0;l--){let{type:p,match:d}=this.frontier[l],c,m=null;if(t==1&&(s?d.matchType(s.type)||(m=d.fillBefore(N.from(s),!1)):a&&p.compatibleContent(a.type)))return{sliceDepth:o,frontierDepth:l,parent:a,inject:m};if(t==2&&s&&(c=d.findWrapping(s.type)))return{sliceDepth:o,frontierDepth:l,parent:a,wrap:c};if(a&&d.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:o}=this.unplaced,n=La(e,t);return!n.childCount||n.firstChild.isLeaf?!1:(this.unplaced=new O(e,t+1,Math.max(o,n.size+t>=e.size-o?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:o}=this.unplaced,n=La(e,t);if(n.childCount<=1&&t>0){let a=e.size-t<=t+n.size;this.unplaced=new O(jo(e,t-1,1),t-1,a?t-1:o)}else this.unplaced=new O(jo(e,t,1),t,o)}placeNodes({sliceDepth:e,frontierDepth:t,parent:o,inject:n,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let f=0;f<a.length;f++)this.openFrontierNode(a[f]);let s=this.unplaced,l=o?o.content:s.content,p=s.openStart-e,d=0,c=[],{match:m,type:b}=this.frontier[t];if(n){for(let f=0;f<n.childCount;f++)c.push(n.child(f));m=m.matchFragment(n)}let u=l.size+e-(s.content.size-s.openEnd);for(;d<l.childCount;){let f=l.child(d),x=m.matchType(f.type);if(!x)break;d++,(d>1||p==0||f.content.size)&&(m=x,c.push(Ap(f.mark(b.allowedMarks(f.marks)),d==1?p:0,d==l.childCount?u:-1)))}let g=d==l.childCount;g||(u=-1),this.placed=qo(this.placed,t,N.from(c)),this.frontier[t].match=m,g&&u<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,x=l;f<u;f++){let y=x.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),x=y.content}this.unplaced=g?e==0?O.empty:new O(jo(s.content,e-1,1),e-1,u<0?s.openEnd:e-1):new O(jo(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Aa(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:o}=this.$to,n=this.$to.after(o);for(;o>1&&n==this.$to.end(--o);)++n;return n}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:o,type:n}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Aa(e,t,n,o,a);if(s){for(let l=t-1;l>=0;l--){let{match:p,type:d}=this.frontier[l],c=Aa(e,l,d,p,!0);if(!c||c.childCount)continue e}return{depth:t,fit:s,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=qo(this.placed,t.depth,t.fit)),e=t.move;for(let o=t.depth+1;o<=e.depth;o++){let n=e.node(o),a=n.type.contentMatch.fillBefore(n.content,!0,e.index(o));this.openFrontierNode(n.type,n.attrs,a)}return e}openFrontierNode(e,t=null,o){let n=this.frontier[this.depth];n.match=n.match.matchType(e),this.placed=qo(this.placed,this.depth,N.from(e.create(t,o))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(N.empty,!0);t.childCount&&(this.placed=qo(this.placed,this.frontier.length,t))}}function jo(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(jo(r.firstChild.content,e-1,t)))}function qo(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(qo(r.lastChild.content,e-1,t)))}function La(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function Ap(r,e,t){if(e<=0)return r;let o=r.content;return e>1&&(o=o.replaceChild(0,Ap(o.firstChild,e-1,o.childCount==1?t-1:0))),e>0&&(o=r.type.contentMatch.fillBefore(o).append(o),t<=0&&(o=o.append(r.type.contentMatch.matchFragment(o).fillBefore(N.empty,!0)))),r.copy(o)}function Aa(r,e,t,o,n){let a=r.node(e),s=n?r.indexAfter(e):r.index(e);if(s==a.childCount&&!t.compatibleContent(a.type))return null;let l=o.fillBefore(a.content,!0,s);return l&&!jv(t,a.content,s)?l:null}function jv(r,e,t){for(let o=t;o<e.childCount;o++)if(!r.allowsMarks(e.child(o).marks))return!0;return!1}function qv(r){return r.spec.defining||r.spec.definingForContent}function Wv(r,e,t,o){if(!o.size)return r.deleteRange(e,t);let n=r.doc.resolve(e),a=r.doc.resolve(t);if(Lp(n,a,o))return r.step(new xe(e,t,o));let s=Vp(n,r.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(n.depth+1);s.unshift(l);for(let b=n.depth,u=n.pos-1;b>0;b--,u--){let g=n.node(b).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(b)>-1?l=b:n.before(b)==u&&s.splice(1,0,-b)}let p=s.indexOf(l),d=[],c=o.openStart;for(let b=o.content,u=0;;u++){let g=b.firstChild;if(d.push(g),u==o.openStart)break;b=g.content}for(let b=c-1;b>=0;b--){let u=d[b],g=qv(u.type);if(g&&!u.sameMarkup(n.node(Math.abs(l)-1)))c=b;else if(g||!u.type.isTextblock)break}for(let b=o.openStart;b>=0;b--){let u=(b+c+1)%(o.openStart+1),g=d[u];if(g)for(let f=0;f<s.length;f++){let x=s[(f+p)%s.length],y=!0;x<0&&(y=!1,x=-x);let w=n.node(x-1),v=n.index(x-1);if(w.canReplaceWith(v,v,g.type,g.marks))return r.replace(n.before(x),y?a.after(x):t,new O(Op(o.content,0,o.openStart,u),u,o.openEnd))}}let m=r.steps.length;for(let b=s.length-1;b>=0&&(r.replace(e,t,o),!(r.steps.length>m));b--){let u=s[b];u<0||(e=n.before(u),t=a.after(u))}}function Op(r,e,t,o,n){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(Op(a.content,e+1,t,o,a)))}if(e>o){let a=n.contentMatchAt(0),s=a.fillBefore(r).append(r);r=s.append(a.matchFragment(s).fillBefore(N.empty,!0))}return r}function Uv(r,e,t,o){if(!o.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let n=zv(r.doc,e,o.type);n!=null&&(e=t=n)}r.replaceRange(e,t,new O(N.from(o),0,0))}function Gv(r,e,t){let o=r.doc.resolve(e),n=r.doc.resolve(t),a=Vp(o,n);for(let s=0;s<a.length;s++){let l=a[s],p=s==a.length-1;if(p&&l==0||o.node(l).type.contentMatch.validEnd)return r.delete(o.start(l),n.end(l));if(l>0&&(p||o.node(l-1).canReplace(o.index(l-1),n.indexAfter(l-1))))return r.delete(o.before(l),n.after(l))}for(let s=1;s<=o.depth&&s<=n.depth;s++)if(e-o.start(s)==o.depth-s&&t>o.end(s)&&n.end(s)-t!=n.depth-s&&o.start(s-1)==n.start(s-1)&&o.node(s-1).canReplace(o.index(s-1),n.index(s-1)))return r.delete(o.before(s),t);r.delete(e,t)}function Vp(r,e){let t=[],o=Math.min(r.depth,e.depth);for(let n=o;n>=0;n--){let a=r.start(n);if(a<r.pos-(r.depth-n)||e.end(n)>e.pos+(e.depth-n)||r.node(n).type.spec.isolating||e.node(n).type.spec.isolating)break;(a==e.start(n)||n==r.depth&&n==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&n&&e.start(n-1)==a-1)&&t.push(n)}return t}class so extends Pe{constructor(e,t,o){super(),this.pos=e,this.attr=t,this.value=o}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at attribute step's position");let o=Object.create(null);for(let a in t.attrs)o[a]=t.attrs[a];o[this.attr]=this.value;let n=t.type.create(o,null,t.marks);return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(n),0,t.isLeaf?0:1))}getMap(){return Xe.empty}invert(e){return new so(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new so(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new so(t.pos,t.attr,t.value)}}Pe.jsonID("attr",so);class Wo extends Pe{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let o=e.type.create(t,e.content,e.marks);return ce.ok(o)}getMap(){return Xe.empty}invert(e){return new Wo(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Wo(t.attr,t.value)}}Pe.jsonID("docAttr",Wo);let lo=class extends Error{};lo=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t},lo.prototype=Object.create(Error.prototype),lo.prototype.constructor=lo,lo.prototype.name="TransformError";class Ip{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Fo}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new lo(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,o=O.empty){let n=Yn(this.doc,e,t,o);return n&&this.step(n),this}replaceWith(e,t,o){return this.replace(e,t,new O(N.from(o),0,0))}delete(e,t){return this.replace(e,t,O.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,o){return Wv(this,e,t,o),this}replaceRangeWith(e,t,o){return Uv(this,e,t,o),this}deleteRange(e,t){return Gv(this,e,t),this}lift(e,t){return Pv(this,e,t),this}join(e,t=1){return Hv(this,e,t),this}wrap(e,t){return Av(this,e,t),this}setBlockType(e,t=e,o,n=null){return Ov(this,e,t,o,n),this}setNodeMarkup(e,t,o=null,n){return Iv(this,e,t,o,n),this}setNodeAttribute(e,t,o){return this.step(new so(e,t,o)),this}setDocAttribute(e,t){return this.step(new Wo(e,t)),this}addNodeMark(e,t){return this.step(new or(e,t)),this}removeNodeMark(e,t){let o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at position "+e);if(t instanceof te)t.isInSet(o.marks)&&this.step(new Lr(e,t));else{let n=o.marks,a,s=[];for(;a=t.isInSet(n);)s.push(new Lr(e,a)),n=a.removeFromSet(n);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(e,t=1,o){return _v(this,e,t,o),this}addMark(e,t,o){return Mv(this,e,t,o),this}removeMark(e,t,o){return Bv(this,e,t,o),this}clearIncompatible(e,t,o){return Pa(this,e,t,o),this}}const Oa=Object.create(null);class W{constructor(e,t,o){this.$anchor=e,this.$head=t,this.ranges=o||[new Kv(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=O.empty){let o=t.content.lastChild,n=null;for(let l=0;l<t.openEnd;l++)n=o,o=o.lastChild;let a=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:p,$to:d}=s[l],c=e.mapping.slice(a);e.replaceRange(c.map(p.pos),c.map(d.pos),l?O.empty:t),l==0&&Hp(e,a,(o?o.isInline:n&&n.isTextblock)?-1:1)}}replaceWith(e,t){let o=e.steps.length,n=this.ranges;for(let a=0;a<n.length;a++){let{$from:s,$to:l}=n[a],p=e.mapping.slice(o),d=p.map(s.pos),c=p.map(l.pos);a?e.deleteRange(d,c):(e.replaceRangeWith(d,c,t),Hp(e,o,t.isInline?-1:1))}}static findFrom(e,t,o=!1){let n=e.parent.inlineContent?new j(e):po(e.node(0),e.parent,e.pos,e.index(),t,o);if(n)return n;for(let a=e.depth-1;a>=0;a--){let s=t<0?po(e.node(0),e.node(a),e.before(a+1),e.index(a),t,o):po(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,o);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Qe(e.node(0))}static atStart(e){return po(e,e,0,0,1)||new Qe(e)}static atEnd(e){return po(e,e,e.content.size,e.childCount,-1)||new Qe(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let o=Oa[t.type];if(!o)throw new RangeError(`No selection type ${t.type} defined`);return o.fromJSON(e,t)}static jsonID(e,t){if(e in Oa)throw new RangeError("Duplicate use of selection JSON ID "+e);return Oa[e]=t,t.prototype.jsonID=e,t}getBookmark(){return j.between(this.$anchor,this.$head).getBookmark()}}W.prototype.visible=!0;class Kv{constructor(e,t){this.$from=e,this.$to=t}}let _p=!1;function Rp(r){!_p&&!r.parent.inlineContent&&(_p=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class j extends W{constructor(e,t=e){Rp(e),Rp(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let o=e.resolve(t.map(this.head));if(!o.parent.inlineContent)return W.near(o);let n=e.resolve(t.map(this.anchor));return new j(n.parent.inlineContent?n:o,o)}replace(e,t=O.empty){if(super.replace(e,t),t==O.empty){let o=this.$from.marksAcross(this.$to);o&&e.ensureMarks(o)}}eq(e){return e instanceof j&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Xn(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new j(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,o=t){let n=e.resolve(t);return new this(n,o==t?n:e.resolve(o))}static between(e,t,o){let n=e.pos-t.pos;if((!o||n)&&(o=n>=0?1:-1),!t.parent.inlineContent){let a=W.findFrom(t,o,!0)||W.findFrom(t,-o,!0);if(a)t=a.$head;else return W.near(t,o)}return e.parent.inlineContent||(n==0?e=t:(e=(W.findFrom(e,-o,!0)||W.findFrom(e,o,!0)).$anchor,e.pos<t.pos!=n<0&&(e=t))),new j(e,t)}}W.jsonID("text",j);class Xn{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Xn(e.map(this.anchor),e.map(this.head))}resolve(e){return j.between(e.resolve(this.anchor),e.resolve(this.head))}}class H extends W{constructor(e){let t=e.nodeAfter,o=e.node(0).resolve(e.pos+t.nodeSize);super(e,o),this.node=t}map(e,t){let{deleted:o,pos:n}=t.mapResult(this.anchor),a=e.resolve(n);return o?W.near(a):new H(a)}content(){return new O(N.from(this.node),0,0)}eq(e){return e instanceof H&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Va(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new H(e.resolve(t.anchor))}static create(e,t){return new H(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}H.prototype.visible=!1,W.jsonID("node",H);class Va{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:o}=e.mapResult(this.anchor);return t?new Xn(o,o):new Va(o)}resolve(e){let t=e.resolve(this.anchor),o=t.nodeAfter;return o&&H.isSelectable(o)?new H(t):W.near(t)}}class Qe extends W{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=O.empty){if(t==O.empty){e.delete(0,e.doc.content.size);let o=W.atStart(e.doc);o.eq(e.selection)||e.setSelection(o)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Qe(e)}map(e){return new Qe(e)}eq(e){return e instanceof Qe}getBookmark(){return Jv}}W.jsonID("all",Qe);const Jv={map(){return this},resolve(r){return new Qe(r)}};function po(r,e,t,o,n,a=!1){if(e.inlineContent)return j.create(r,t);for(let s=o-(n>0?0:1);n>0?s<e.childCount:s>=0;s+=n){let l=e.child(s);if(l.isAtom){if(!a&&H.isSelectable(l))return H.create(r,t-(n<0?l.nodeSize:0))}else{let p=po(r,l,t+n,n<0?l.childCount:0,n,a);if(p)return p}t+=l.nodeSize*n}return null}function Hp(r,e,t){let o=r.steps.length-1;if(o<e)return;let n=r.steps[o];if(!(n instanceof xe||n instanceof fe))return;let a=r.mapping.maps[o],s;a.forEach((l,p,d,c)=>{s==null&&(s=c)}),r.setSelection(W.near(r.doc.resolve(s),t))}const zp=1,Qn=2,Fp=4;class Yv extends Ip{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|zp)&~Qn,this.storedMarks=null,this}get selectionSet(){return(this.updated&zp)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Qn,this}ensureMarks(e){return te.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&Qn)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Qn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let o=this.selection;return t&&(e=e.mark(this.storedMarks||(o.empty?o.$from.marks():o.$from.marksAcross(o.$to)||te.none))),o.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,o){let n=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(n.text(e),!0):this.deleteSelection();{if(o==null&&(o=t),o=o??t,!e)return this.deleteRange(t,o);let a=this.storedMarks;if(!a){let s=this.doc.resolve(t);a=o==t?s.marks():s.marksAcross(this.doc.resolve(o))}return this.replaceRangeWith(t,o,n.text(e,a)),this.selection.empty||this.setSelection(W.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=Fp,this}get scrolledIntoView(){return(this.updated&Fp)>0}}function jp(r,e){return!e||!r?r:r.bind(e)}class Uo{constructor(e,t,o){this.name=e,this.init=jp(t.init,o),this.apply=jp(t.apply,o)}}const Xv=[new Uo("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new Uo("selection",{init(r,e){return r.selection||W.atStart(e.doc)},apply(r){return r.selection}}),new Uo("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,o){return o.selection.$cursor?r.storedMarks:null}}),new Uo("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}})];class Ia{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Xv.slice(),t&&t.forEach(o=>{if(this.pluginsByKey[o.key])throw new RangeError("Adding different instances of a keyed plugin ("+o.key+")");this.plugins.push(o),this.pluginsByKey[o.key]=o,o.spec.state&&this.fields.push(new Uo(o.key,o.spec.state,o))})}}class co{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let o=0;o<this.config.plugins.length;o++)if(o!=t){let n=this.config.plugins[o];if(n.spec.filterTransaction&&!n.spec.filterTransaction.call(n,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],o=this.applyInner(e),n=null;for(;;){let a=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let p=n?n[s].n:0,d=n?n[s].state:this,c=p<t.length&&l.spec.appendTransaction.call(l,p?t.slice(p):t,d,o);if(c&&o.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!n){n=[];for(let m=0;m<this.config.plugins.length;m++)n.push(m<s?{state:o,n:t.length}:{state:this,n:0})}t.push(c),o=o.applyInner(c),a=!0}n&&(n[s]={state:o,n:t.length})}}if(!a)return{state:o,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new co(this.config),o=this.config.fields;for(let n=0;n<o.length;n++){let a=o[n];t[a.name]=a.apply(e,this[a.name],this,t)}return t}get tr(){return new Yv(this)}static create(e){let t=new Ia(e.doc?e.doc.type.schema:e.schema,e.plugins),o=new co(t);for(let n=0;n<t.fields.length;n++)o[t.fields[n].name]=t.fields[n].init(e,o);return o}reconfigure(e){let t=new Ia(this.schema,e.plugins),o=t.fields,n=new co(t);for(let a=0;a<o.length;a++){let s=o[a].name;n[s]=this.hasOwnProperty(s)?this[s]:o[a].init(e,n)}return n}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(o=>o.toJSON())),e&&typeof e=="object")for(let o in e){if(o=="doc"||o=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let n=e[o],a=n.spec.state;a&&a.toJSON&&(t[o]=a.toJSON.call(n,this[n.key]))}return t}static fromJSON(e,t,o){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let n=new Ia(e.schema,e.plugins),a=new co(n);return n.fields.forEach(s=>{if(s.name=="doc")a.doc=tr.fromJSON(e.schema,t.doc);else if(s.name=="selection")a.selection=W.fromJSON(a.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(a.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(o)for(let l in o){let p=o[l],d=p.spec.state;if(p.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){a[s.name]=d.fromJSON.call(p,e,t[l],a);return}}a[s.name]=s.init(e,a)}}),a}}function qp(r,e,t){for(let o in r){let n=r[o];n instanceof Function?n=n.bind(e):o=="handleDOMEvents"&&(n=qp(n,e,{})),t[o]=n}return t}class me{constructor(e){this.spec=e,this.props={},e.props&&qp(e.props,this,this.props),this.key=e.key?e.key.key:Wp("plugin")}getState(e){return e[this.key]}}const _a=Object.create(null);function Wp(r){return r in _a?r+"$"+ ++_a[r]:(_a[r]=0,r+"$")}class Ie{constructor(e="key"){this.key=Wp(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ce=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},mo=function(r){let e=r.assignedSlot||r.parentNode;return e&&e.nodeType==11?e.host:e};let Ra=null;const _t=function(r,e,t){let o=Ra||(Ra=document.createRange());return o.setEnd(r,t??r.nodeValue.length),o.setStart(r,e||0),o},Qv=function(){Ra=null},Ar=function(r,e,t,o){return t&&(Up(r,e,t,o,-1)||Up(r,e,t,o,1))},Zv=/^(img|br|input|textarea|hr)$/i;function Up(r,e,t,o,n){for(var a;;){if(r==t&&e==o)return!0;if(e==(n<0?0:tt(r))){let s=r.parentNode;if(!s||s.nodeType!=1||Go(r)||Zv.test(r.nodeName)||r.contentEditable=="false")return!1;e=Ce(r)+(n<0?0:1),r=s}else if(r.nodeType==1){let s=r.childNodes[e+(n<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((a=s.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=n;else return!1;else r=s,e=n<0?tt(r):0}else return!1}}function tt(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function $v(r,e){for(;;){if(r.nodeType==3&&e)return r;if(r.nodeType==1&&e>0){if(r.contentEditable=="false")return null;r=r.childNodes[e-1],e=tt(r)}else if(r.parentNode&&!Go(r))e=Ce(r),r=r.parentNode;else return null}}function e2(r,e){for(;;){if(r.nodeType==3&&e<r.nodeValue.length)return r;if(r.nodeType==1&&e<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[e],e=0}else if(r.parentNode&&!Go(r))e=Ce(r)+1,r=r.parentNode;else return null}}function t2(r,e,t){for(let o=e==0,n=e==tt(r);o||n;){if(r==t)return!0;let a=Ce(r);if(r=r.parentNode,!r)return!1;o=o&&a==0,n=n&&a==tt(r)}}function Go(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}const Zn=function(r){return r.focusNode&&Ar(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Or(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function r2(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function o2(r,e,t){if(r.caretPositionFromPoint)try{let o=r.caretPositionFromPoint(e,t);if(o)return{node:o.offsetNode,offset:Math.min(tt(o.offsetNode),o.offset)}}catch{}if(r.caretRangeFromPoint){let o=r.caretRangeFromPoint(e,t);if(o)return{node:o.startContainer,offset:Math.min(tt(o.startContainer),o.startOffset)}}}const Tt=typeof navigator<"u"?navigator:null,Gp=typeof document<"u"?document:null,ir=Tt&&Tt.userAgent||"",Ha=/Edge\/(\d+)/.exec(ir),Kp=/MSIE \d/.exec(ir),za=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ir),je=!!(Kp||za||Ha),ar=Kp?document.documentMode:za?+za[1]:Ha?+Ha[1]:0,bt=!je&&/gecko\/(\d+)/i.test(ir);bt&&+(/Firefox\/(\d+)/.exec(ir)||[0,0])[1];const Fa=!je&&/Chrome\/(\d+)/.exec(ir),De=!!Fa,Jp=Fa?+Fa[1]:0,_e=!je&&!!Tt&&/Apple Computer/.test(Tt.vendor),bo=_e&&(/Mobile\/\w+/.test(ir)||!!Tt&&Tt.maxTouchPoints>2),rt=bo||(Tt?/Mac/.test(Tt.platform):!1),n2=Tt?/Win/.test(Tt.platform):!1,Rt=/Android \d/.test(ir),Ko=!!Gp&&"webkitFontSmoothing"in Gp.documentElement.style,i2=Ko?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function a2(r){let e=r.defaultView&&r.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function Ht(r,e){return typeof r=="number"?r:r[e]}function s2(r){let e=r.getBoundingClientRect(),t=e.width/r.offsetWidth||1,o=e.height/r.offsetHeight||1;return{left:e.left,right:e.left+r.clientWidth*t,top:e.top,bottom:e.top+r.clientHeight*o}}function Yp(r,e,t){let o=r.someProp("scrollThreshold")||0,n=r.someProp("scrollMargin")||5,a=r.dom.ownerDocument;for(let s=t||r.dom;s;){if(s.nodeType!=1){s=mo(s);continue}let l=s,p=l==a.body,d=p?a2(a):s2(l),c=0,m=0;if(e.top<d.top+Ht(o,"top")?m=-(d.top-e.top+Ht(n,"top")):e.bottom>d.bottom-Ht(o,"bottom")&&(m=e.bottom-e.top>d.bottom-d.top?e.top+Ht(n,"top")-d.top:e.bottom-d.bottom+Ht(n,"bottom")),e.left<d.left+Ht(o,"left")?c=-(d.left-e.left+Ht(n,"left")):e.right>d.right-Ht(o,"right")&&(c=e.right-d.right+Ht(n,"right")),c||m)if(p)a.defaultView.scrollBy(c,m);else{let u=l.scrollLeft,g=l.scrollTop;m&&(l.scrollTop+=m),c&&(l.scrollLeft+=c);let f=l.scrollLeft-u,x=l.scrollTop-g;e={left:e.left-f,top:e.top-x,right:e.right-f,bottom:e.bottom-x}}let b=p?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(b))break;s=b=="absolute"?s.offsetParent:mo(s)}}function l2(r){let e=r.dom.getBoundingClientRect(),t=Math.max(0,e.top),o,n;for(let a=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=r.root.elementFromPoint(a,s);if(!l||l==r.dom||!r.dom.contains(l))continue;let p=l.getBoundingClientRect();if(p.top>=t-20){o=l,n=p.top;break}}return{refDOM:o,refTop:n,stack:Xp(r.dom)}}function Xp(r){let e=[],t=r.ownerDocument;for(let o=r;o&&(e.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),r!=t);o=mo(o));return e}function p2({refDOM:r,refTop:e,stack:t}){let o=r?r.getBoundingClientRect().top:0;Qp(t,o==0?0:o-e)}function Qp(r,e){for(let t=0;t<r.length;t++){let{dom:o,top:n,left:a}=r[t];o.scrollTop!=n+e&&(o.scrollTop=n+e),o.scrollLeft!=a&&(o.scrollLeft=a)}}let uo=null;function d2(r){if(r.setActive)return r.setActive();if(uo)return r.focus(uo);let e=Xp(r);r.focus(uo==null?{get preventScroll(){return uo={preventScroll:!0},!0}}:void 0),uo||(uo=!1,Qp(e,0))}function Zp(r,e){let t,o=2e8,n,a=0,s=e.top,l=e.top,p,d;for(let c=r.firstChild,m=0;c;c=c.nextSibling,m++){let b;if(c.nodeType==1)b=c.getClientRects();else if(c.nodeType==3)b=_t(c).getClientRects();else continue;for(let u=0;u<b.length;u++){let g=b[u];if(g.top<=s&&g.bottom>=l){s=Math.max(g.bottom,s),l=Math.min(g.top,l);let f=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(f<o){t=c,o=f,n=f&&t.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,c.nodeType==1&&f&&(a=m+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!p&&g.left<=e.left&&g.right>=e.left&&(p=c,d={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!t&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(a=m+1)}}return!t&&p&&(t=p,n=d,o=0),t&&t.nodeType==3?c2(t,n):!t||o&&t.nodeType==1?{node:r,offset:a}:Zp(t,n)}function c2(r,e){let t=r.nodeValue.length,o=document.createRange();for(let n=0;n<t;n++){o.setEnd(r,n+1),o.setStart(r,n);let a=sr(o,1);if(a.top!=a.bottom&&ja(e,a))return{node:r,offset:n+(e.left>=(a.left+a.right)/2?1:0)}}return{node:r,offset:0}}function ja(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function m2(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function b2(r,e,t){let{node:o,offset:n}=Zp(e,t),a=-1;if(o.nodeType==1&&!o.firstChild){let s=o.getBoundingClientRect();a=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return r.docView.posFromDOM(o,n,a)}function u2(r,e,t,o){let n=-1;for(let a=e,s=!1;a!=r.dom;){let l=r.docView.nearestDesc(a,!0),p;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((p=l.dom.getBoundingClientRect()).width||p.height)&&(l.node.isBlock&&l.parent&&(!s&&p.left>o.left||p.top>o.top?n=l.posBefore:(!s&&p.right<o.left||p.bottom<o.top)&&(n=l.posAfter),s=!0),!l.contentDOM&&n<0&&!l.node.isText))return(l.node.isBlock?o.top<(p.top+p.bottom)/2:o.left<(p.left+p.right)/2)?l.posBefore:l.posAfter;a=l.dom.parentNode}return n>-1?n:r.docView.posFromDOM(e,t,-1)}function $p(r,e,t){let o=r.childNodes.length;if(o&&t.top<t.bottom)for(let n=Math.max(0,Math.min(o-1,Math.floor(o*(e.top-t.top)/(t.bottom-t.top))-2)),a=n;;){let s=r.childNodes[a];if(s.nodeType==1){let l=s.getClientRects();for(let p=0;p<l.length;p++){let d=l[p];if(ja(e,d))return $p(s,e,d)}}if((a=(a+1)%o)==n)break}return r}function g2(r,e){let t=r.dom.ownerDocument,o,n=0,a=o2(t,e.left,e.top);a&&({node:o,offset:n}=a);let s=(r.root.elementFromPoint?r.root:t).elementFromPoint(e.left,e.top),l;if(!s||!r.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=r.dom.getBoundingClientRect();if(!ja(e,d)||(s=$p(r.dom,e,d),!s))return null}if(_e)for(let d=s;o&&d;d=mo(d))d.draggable&&(o=void 0);if(s=m2(s,e),o){if(bt&&o.nodeType==1&&(n=Math.min(n,o.childNodes.length),n<o.childNodes.length)){let c=o.childNodes[n],m;c.nodeName=="IMG"&&(m=c.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&n++}let d;Ko&&n&&o.nodeType==1&&(d=o.childNodes[n-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&n--,o==r.dom&&n==o.childNodes.length-1&&o.lastChild.nodeType==1&&e.top>o.lastChild.getBoundingClientRect().bottom?l=r.state.doc.content.size:(n==0||o.nodeType!=1||o.childNodes[n-1].nodeName!="BR")&&(l=u2(r,o,n,e))}l==null&&(l=b2(r,s,e));let p=r.docView.nearestDesc(s,!0);return{pos:l,inside:p?p.posAtStart-p.border:-1}}function ed(r){return r.top<r.bottom||r.left<r.right}function sr(r,e){let t=r.getClientRects();if(t.length){let o=t[e<0?0:t.length-1];if(ed(o))return o}return Array.prototype.find.call(t,ed)||r.getBoundingClientRect()}const x2=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function td(r,e,t){let{node:o,offset:n,atom:a}=r.docView.domFromPos(e,t<0?-1:1),s=Ko||bt;if(o.nodeType==3)if(s&&(x2.test(o.nodeValue)||(t<0?!n:n==o.nodeValue.length))){let p=sr(_t(o,n,n),t);if(bt&&n&&/\s/.test(o.nodeValue[n-1])&&n<o.nodeValue.length){let d=sr(_t(o,n-1,n-1),-1);if(d.top==p.top){let c=sr(_t(o,n,n+1),-1);if(c.top!=p.top)return Jo(c,c.left<d.left)}}return p}else{let p=n,d=n,c=t<0?1:-1;return t<0&&!n?(d++,c=-1):t>=0&&n==o.nodeValue.length?(p--,c=1):t<0?p--:d++,Jo(sr(_t(o,p,d),c),c<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&n&&(t<0||n==tt(o))){let p=o.childNodes[n-1];if(p.nodeType==1)return qa(p.getBoundingClientRect(),!1)}if(a==null&&n<tt(o)){let p=o.childNodes[n];if(p.nodeType==1)return qa(p.getBoundingClientRect(),!0)}return qa(o.getBoundingClientRect(),t>=0)}if(a==null&&n&&(t<0||n==tt(o))){let p=o.childNodes[n-1],d=p.nodeType==3?_t(p,tt(p)-(s?0:1)):p.nodeType==1&&(p.nodeName!="BR"||!p.nextSibling)?p:null;if(d)return Jo(sr(d,1),!1)}if(a==null&&n<tt(o)){let p=o.childNodes[n];for(;p.pmViewDesc&&p.pmViewDesc.ignoreForCoords;)p=p.nextSibling;let d=p?p.nodeType==3?_t(p,0,s?0:1):p.nodeType==1?p:null:null;if(d)return Jo(sr(d,-1),!0)}return Jo(sr(o.nodeType==3?_t(o):o,-t),t>=0)}function Jo(r,e){if(r.width==0)return r;let t=e?r.left:r.right;return{top:r.top,bottom:r.bottom,left:t,right:t}}function qa(r,e){if(r.height==0)return r;let t=e?r.top:r.bottom;return{top:t,bottom:t,left:r.left,right:r.right}}function rd(r,e,t){let o=r.state,n=r.root.activeElement;o!=e&&r.updateState(e),n!=r.dom&&r.focus();try{return t()}finally{o!=e&&r.updateState(o),n!=r.dom&&n&&n.focus()}}function f2(r,e,t){let o=e.selection,n=t=="up"?o.$from:o.$to;return rd(r,e,()=>{let{node:a}=r.docView.domFromPos(n.pos,t=="up"?-1:1);for(;;){let l=r.docView.nearestDesc(a,!0);if(!l)break;if(l.node.isBlock){a=l.contentDOM||l.dom;break}a=l.dom.parentNode}let s=td(r,n.pos,1);for(let l=a.firstChild;l;l=l.nextSibling){let p;if(l.nodeType==1)p=l.getClientRects();else if(l.nodeType==3)p=_t(l,0,l.nodeValue.length).getClientRects();else continue;for(let d=0;d<p.length;d++){let c=p[d];if(c.bottom>c.top+1&&(t=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const h2=/[\u0590-\u08ac]/;function y2(r,e,t){let{$head:o}=e.selection;if(!o.parent.isTextblock)return!1;let n=o.parentOffset,a=!n,s=n==o.parent.content.size,l=r.domSelection();return l?!h2.test(o.parent.textContent)||!l.modify?t=="left"||t=="backward"?a:s:rd(r,e,()=>{let{focusNode:p,focusOffset:d,anchorNode:c,anchorOffset:m}=r.domSelectionRange(),b=l.caretBidiLevel;l.modify("move",t,"character");let u=o.depth?r.docView.domAfterPos(o.before()):r.dom,{focusNode:g,focusOffset:f}=r.domSelectionRange(),x=g&&!u.contains(g.nodeType==1?g:g.parentNode)||p==g&&d==f;try{l.collapse(c,m),p&&(p!=c||d!=m)&&l.extend&&l.extend(p,d)}catch{}return b!=null&&(l.caretBidiLevel=b),x}):o.pos==o.start()||o.pos==o.end()}let od=null,nd=null,id=!1;function w2(r,e,t){return od==e&&nd==t?id:(od=e,nd=t,id=t=="up"||t=="down"?f2(r,e,t):y2(r,e,t))}const ot=0,ad=1,Vr=2,Mt=3;class Yo{constructor(e,t,o,n){this.parent=e,this.children=t,this.dom=o,this.contentDOM=n,this.dirty=ot,o.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,o){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,o=this.posAtStart;;t++){let n=this.children[t];if(n==e)return o;o+=n.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,o){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(o<0){let a,s;if(e==this.contentDOM)a=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.previousSibling}for(;a&&!((s=a.pmViewDesc)&&s.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(s)+s.size:this.posAtStart}else{let a,s;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&!((s=a.pmViewDesc)&&s.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(s):this.posAtEnd}let n;if(e==this.dom&&this.contentDOM)n=t>Ce(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))n=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let a=e;;a=a.parentNode){if(a==this.dom){n=!1;break}if(a.previousSibling)break}if(n==null&&t==e.childNodes.length)for(let a=e;;a=a.parentNode){if(a==this.dom){n=!0;break}if(a.nextSibling)break}}return n??o>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let o=!0,n=e;n;n=n.parentNode){let a=this.getDesc(n),s;if(a&&(!t||a.node))if(o&&(s=a.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))o=!1;else return a}}getDesc(e){let t=e.pmViewDesc;for(let o=t;o;o=o.parent)if(o==this)return t}posFromDOM(e,t,o){for(let n=e;n;n=n.parentNode){let a=this.getDesc(n);if(a)return a.localPosFromDOM(e,t,o)}return-1}descAt(e){for(let t=0,o=0;t<this.children.length;t++){let n=this.children[t],a=o+n.size;if(o==e&&a!=o){for(;!n.border&&n.children.length;)for(let s=0;s<n.children.length;s++){let l=n.children[s];if(l.size){n=l;break}}return n}if(e<a)return n.descAt(e-o-n.border);o=a}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let o=0,n=0;for(let a=0;o<this.children.length;o++){let s=this.children[o],l=a+s.size;if(l>e||s instanceof pd){n=e-a;break}a=l}if(n)return this.children[o].domFromPos(n-this.children[o].border,t);for(let a;o&&!(a=this.children[o-1]).size&&a instanceof sd&&a.side>=0;o--);if(t<=0){let a,s=!0;for(;a=o?this.children[o-1]:null,!(!a||a.dom.parentNode==this.contentDOM);o--,s=!1);return a&&t&&s&&!a.border&&!a.domAtom?a.domFromPos(a.size,t):{node:this.contentDOM,offset:a?Ce(a.dom)+1:0}}else{let a,s=!0;for(;a=o<this.children.length?this.children[o]:null,!(!a||a.dom.parentNode==this.contentDOM);o++,s=!1);return a&&s&&!a.border&&!a.domAtom?a.domFromPos(0,t):{node:this.contentDOM,offset:a?Ce(a.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,o=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let n=-1,a=-1;for(let s=o,l=0;;l++){let p=this.children[l],d=s+p.size;if(n==-1&&e<=d){let c=s+p.border;if(e>=c&&t<=d-p.border&&p.node&&p.contentDOM&&this.contentDOM.contains(p.contentDOM))return p.parseRange(e,t,c);e=s;for(let m=l;m>0;m--){let b=this.children[m-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){n=Ce(b.dom)+1;break}e-=b.size}n==-1&&(n=0)}if(n>-1&&(d>t||l==this.children.length-1)){t=d;for(let c=l+1;c<this.children.length;c++){let m=this.children[c];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){a=Ce(m.dom);break}t+=m.size}a==-1&&(a=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:t,fromOffset:n,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:o}=this.domFromPos(e,0);if(t.nodeType!=1||o==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[o]}setSelection(e,t,o,n=!1){let a=Math.min(e,t),s=Math.max(e,t);for(let u=0,g=0;u<this.children.length;u++){let f=this.children[u],x=g+f.size;if(a>g&&s<x)return f.setSelection(e-g-f.border,t-g-f.border,o,n);g=x}let l=this.domFromPos(e,e?-1:1),p=t==e?l:this.domFromPos(t,t?-1:1),d=o.root.getSelection(),c=o.domSelectionRange(),m=!1;if((bt||_e)&&e==t){let{node:u,offset:g}=l;if(u.nodeType==3){if(m=!!(g&&u.nodeValue[g-1]==`
12
- `),m&&g==u.nodeValue.length)for(let f=u,x;f;f=f.parentNode){if(x=f.nextSibling){x.nodeName=="BR"&&(l=p={node:x.parentNode,offset:Ce(x)+1});break}let y=f.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let f=u.childNodes[g-1];m=f&&(f.nodeName=="BR"||f.contentEditable=="false")}}if(bt&&c.focusNode&&c.focusNode!=p.node&&c.focusNode.nodeType==1){let u=c.focusNode.childNodes[c.focusOffset];u&&u.contentEditable=="false"&&(n=!0)}if(!(n||m&&_e)&&Ar(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Ar(p.node,p.offset,c.focusNode,c.focusOffset))return;let b=!1;if((d.extend||e==t)&&!m){d.collapse(l.node,l.offset);try{e!=t&&d.extend(p.node,p.offset),b=!0}catch{}}if(!b){if(e>t){let g=l;l=p,p=g}let u=document.createRange();u.setEnd(p.node,p.offset),u.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(u)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let o=0,n=0;n<this.children.length;n++){let a=this.children[n],s=o+a.size;if(o==s?e<=s&&t>=o:e<s&&t>o){let l=o+a.border,p=s-a.border;if(e>=l&&t<=p){this.dirty=e==o||t==s?Vr:ad,e==l&&t==p&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=Mt:a.markDirty(e-l,t-l);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Vr:Mt}o=s}this.dirty=Vr}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let o=e==1?Vr:ad;t.dirty<o&&(t.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class sd extends Yo{constructor(e,t,o,n){let a,s=t.type.toDOM;if(typeof s=="function"&&(s=s(o,()=>{if(!a)return n;if(a.parent)return a.parent.posBeforeChild(a)})),!t.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=t,this.widget=t,a=this}matchesWidget(e){return this.dirty==ot&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 v2 extends Yo{constructor(e,t,o,n){super(e,[],t,null),this.textDOM=o,this.text=n}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ir extends Yo{constructor(e,t,o,n,a){super(e,[],o,n),this.mark=t,this.spec=a}static create(e,t,o,n){let a=n.nodeViews[t.type.name],s=a&&a(t,n,o);return(!s||!s.dom)&&(s=Dr.renderSpec(document,t.type.spec.toDOM(t,o),null,t.attrs)),new Ir(e,t,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Mt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Mt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=ot){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=ot}}slice(e,t,o){let n=Ir.create(this.parent,this.mark,!0,o),a=this.children,s=this.size;t<s&&(a=Ua(a,t,s,o)),e>0&&(a=Ua(a,0,e,o));for(let l=0;l<a.length;l++)a[l].parent=n;return n.children=a,n}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class lr extends Yo{constructor(e,t,o,n,a,s,l,p,d){super(e,[],a,s),this.node=t,this.outerDeco=o,this.innerDeco=n,this.nodeDOM=l}static create(e,t,o,n,a,s){let l=a.nodeViews[t.type.name],p,d=l&&l(t,a,()=>{if(!p)return s;if(p.parent)return p.parent.posBeforeChild(p)},o,n),c=d&&d.dom,m=d&&d.contentDOM;if(t.isText){if(!c)c=document.createTextNode(t.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:m}=Dr.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!m&&!t.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let b=c;return c=md(c,o,t),d?p=new k2(e,t,o,n,c,m||null,b,d,a,s+1):t.isText?new $n(e,t,o,n,c,b,a):new lr(e,t,o,n,c,m||null,b,a,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 t=this.children.length-1;t>=0;t--){let o=this.children[t];if(this.dom.contains(o.dom.parentNode)){e.contentElement=o.dom.parentNode;break}}e.contentElement||(e.getContent=()=>N.empty)}return e}matchesNode(e,t,o){return this.dirty==ot&&e.eq(this.node)&&ei(t,this.outerDeco)&&o.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let o=this.node.inlineContent,n=t,a=e.composing?this.localCompositionInfo(e,t):null,s=a&&a.pos>-1?a:null,l=a&&a.pos<0,p=new C2(this,s&&s.node,e);M2(this.node,this.innerDeco,(d,c,m)=>{d.spec.marks?p.syncToMarks(d.spec.marks,o,e):d.type.side>=0&&!m&&p.syncToMarks(c==this.node.childCount?te.none:this.node.child(c).marks,o,e),p.placeWidget(d,e,n)},(d,c,m,b)=>{p.syncToMarks(d.marks,o,e);let u;p.findNodeMatch(d,c,m,b)||l&&e.state.selection.from>n&&e.state.selection.to<n+d.nodeSize&&(u=p.findIndexWithChild(a.node))>-1&&p.updateNodeAt(d,c,m,u,e)||p.updateNextNode(d,c,m,e,b,n)||p.addNode(d,c,m,e,n),n+=d.nodeSize}),p.syncToMarks([],o,e),this.node.isTextblock&&p.addTextblockHacks(),p.destroyRest(),(p.changed||this.dirty==Vr)&&(s&&this.protectLocalComposition(e,s),dd(this.contentDOM,this.children,e),bo&&B2(this.dom))}localCompositionInfo(e,t){let{from:o,to:n}=e.state.selection;if(!(e.state.selection instanceof j)||o<t||n>t+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let s=a.nodeValue,l=N2(this.node.content,s,o-t,n-t);return l<0?null:{node:a,pos:l,text:s}}else return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:o,text:n}){if(this.getDesc(t))return;let a=t;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let s=new v2(this,a,t,n);e.input.compositionNodes.push(s),this.children=Ua(this.children,o,o+n.length,e,s)}update(e,t,o,n){return this.dirty==Mt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,o,n),!0)}updateInner(e,t,o,n){this.updateOuterDeco(t),this.node=e,this.innerDeco=o,this.contentDOM&&this.updateChildren(n,this.posAtStart),this.dirty=ot}updateOuterDeco(e){if(ei(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=cd(this.dom,this.nodeDOM,Wa(this.outerDeco,this.node,t),Wa(e,this.node,t)),this.dom!=o&&(o.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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function ld(r,e,t,o,n){md(o,e,r);let a=new lr(void 0,r,e,t,o,o,o,n,0);return a.contentDOM&&a.updateChildren(n,0),a}class $n extends lr{constructor(e,t,o,n,a,s,l){super(e,t,o,n,a,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,t,o,n){return this.dirty==Mt||this.dirty!=ot&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=ot||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,n.trackWrites==this.nodeDOM&&(n.trackWrites=null)),this.node=e,this.dirty=ot,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,o){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,o)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,o){let n=this.node.cut(e,t),a=document.createTextNode(n.text);return new $n(this.parent,n,this.outerDeco,this.innerDeco,a,a,o)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Mt)}get domAtom(){return!1}isText(e){return this.node.text==e}}class pd extends Yo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ot&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class k2 extends lr{constructor(e,t,o,n,a,s,l,p,d,c){super(e,t,o,n,a,s,l,d,c),this.spec=p}update(e,t,o,n){if(this.dirty==Mt)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let a=this.spec.update(e,t,o);return a&&this.updateInner(e,t,o,n),a}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,o,n)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,o,n){this.spec.setSelection?this.spec.setSelection(e,t,o.root):super.setSelection(e,t,o,n)}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 dd(r,e,t){let o=r.firstChild,n=!1;for(let a=0;a<e.length;a++){let s=e[a],l=s.dom;if(l.parentNode==r){for(;l!=o;)o=bd(o),n=!0;o=o.nextSibling}else n=!0,r.insertBefore(l,o);if(s instanceof Ir){let p=o?o.previousSibling:r.lastChild;dd(s.contentDOM,s.children,t),o=p?p.nextSibling:r.firstChild}}for(;o;)o=bd(o),n=!0;n&&t.trackWrites==r&&(t.trackWrites=null)}const Xo=function(r){r&&(this.nodeName=r)};Xo.prototype=Object.create(null);const _r=[new Xo];function Wa(r,e,t){if(r.length==0)return _r;let o=t?_r[0]:new Xo,n=[o];for(let a=0;a<r.length;a++){let s=r[a].type.attrs;if(s){s.nodeName&&n.push(o=new Xo(s.nodeName));for(let l in s){let p=s[l];p!=null&&(t&&n.length==1&&n.push(o=new Xo(e.isInline?"span":"div")),l=="class"?o.class=(o.class?o.class+" ":"")+p:l=="style"?o.style=(o.style?o.style+";":"")+p:l!="nodeName"&&(o[l]=p))}}}return n}function cd(r,e,t,o){if(t==_r&&o==_r)return e;let n=e;for(let a=0;a<o.length;a++){let s=o[a],l=t[a];if(a){let p;l&&l.nodeName==s.nodeName&&n!=r&&(p=n.parentNode)&&p.nodeName.toLowerCase()==s.nodeName||(p=document.createElement(s.nodeName),p.pmIsDeco=!0,p.appendChild(n),l=_r[0]),n=p}S2(n,l||_r[0],s)}return n}function S2(r,e,t){for(let o in e)o!="class"&&o!="style"&&o!="nodeName"&&!(o in t)&&r.removeAttribute(o);for(let o in t)o!="class"&&o!="style"&&o!="nodeName"&&t[o]!=e[o]&&r.setAttribute(o,t[o]);if(e.class!=t.class){let o=e.class?e.class.split(" ").filter(Boolean):[],n=t.class?t.class.split(" ").filter(Boolean):[];for(let a=0;a<o.length;a++)n.indexOf(o[a])==-1&&r.classList.remove(o[a]);for(let a=0;a<n.length;a++)o.indexOf(n[a])==-1&&r.classList.add(n[a]);r.classList.length==0&&r.removeAttribute("class")}if(e.style!=t.style){if(e.style){let o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,n;for(;n=o.exec(e.style);)r.style.removeProperty(n[1])}t.style&&(r.style.cssText+=t.style)}}function md(r,e,t){return cd(r,r,_r,Wa(e,t,r.nodeType!=1))}function ei(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].type.eq(e[t].type))return!1;return!0}function bd(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class C2{constructor(e,t,o){this.lock=t,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=E2(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let o=e;o<t;o++)this.top.children[o].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,o){let n=0,a=this.stack.length>>1,s=Math.min(a,e.length);for(;n<s&&(n==a-1?this.top:this.stack[n+1<<1]).matchesMark(e[n])&&e[n].type.spec.spanning!==!1;)n++;for(;n<a;)this.destroyRest(),this.top.dirty=ot,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let p=this.index;p<Math.min(this.index+3,this.top.children.length);p++){let d=this.top.children[p];if(d.matchesMark(e[a])&&!this.isLocked(d.dom)){l=p;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let p=Ir.create(this.top,e[a],t,o);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,o,n){let a=-1,s;if(n>=this.preMatch.index&&(s=this.preMatch.matches[n-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,o))a=this.top.children.indexOf(s,this.index);else for(let l=this.index,p=Math.min(this.top.children.length,l+5);l<p;l++){let d=this.top.children[l];if(d.matchesNode(e,t,o)&&!this.preMatch.matched.has(d)){a=l;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,o,n,a){let s=this.top.children[n];return s.dirty==Mt&&s.dom==s.contentDOM&&(s.dirty=Vr),s.update(e,t,o,a)?(this.destroyBetween(this.index,n),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let o=e.pmViewDesc;if(o){for(let n=this.index;n<this.top.children.length;n++)if(this.top.children[n]==o)return n}return-1}e=t}}updateNextNode(e,t,o,n,a,s){for(let l=this.index;l<this.top.children.length;l++){let p=this.top.children[l];if(p instanceof lr){let d=this.preMatch.matched.get(p);if(d!=null&&d!=a)return!1;let c=p.dom,m,b=this.isLocked(c)&&!(e.isText&&p.node&&p.node.isText&&p.nodeDOM.nodeValue==e.text&&p.dirty!=Mt&&ei(t,p.outerDeco));if(!b&&p.update(e,t,o,n))return this.destroyBetween(this.index,l),p.dom!=c&&(this.changed=!0),this.index++,!0;if(!b&&(m=this.recreateWrapper(p,e,t,o,n,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Vr,m.updateChildren(n,s+1),m.dirty=ot),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,o,n,a,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!ei(o,e.outerDeco)||!n.eq(e.innerDeco))return null;let l=lr.create(this.top,t,o,n,a,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let p of l.children)p.parent=l}return e.destroy(),l}addNode(e,t,o,n,a){let s=lr.create(this.top,e,t,o,n,a);s.contentDOM&&s.updateChildren(n,a+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,o){let n=this.index<this.top.children.length?this.top.children[this.index]:null;if(n&&n.matchesWidget(e)&&(e==n.widget||!n.widget.type.toDOM.parentNode))this.index++;else{let a=new sd(this.top,e,t,o);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Ir;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof $n)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_e||De)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let o=document.createElement(e);e=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),e=="BR"&&(o.className="ProseMirror-trailingBreak");let n=new pd(this.top,[],o,null);t!=this.top?t.children.push(n):t.children.splice(this.index++,0,n),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function E2(r,e){let t=e,o=t.children.length,n=r.childCount,a=new Map,s=[];e:for(;n>0;){let l;for(;;)if(o){let d=t.children[o-1];if(d instanceof Ir)t=d,o=d.children.length;else{l=d,o--;break}}else{if(t==e)break e;o=t.parent.children.indexOf(t),t=t.parent}let p=l.node;if(p){if(p!=r.child(n-1))break;--n,a.set(l,n),s.push(l)}}return{index:n,matched:a,matches:s.reverse()}}function T2(r,e){return r.type.side-e.type.side}function M2(r,e,t,o){let n=e.locals(r),a=0;if(n.length==0){for(let d=0;d<r.childCount;d++){let c=r.child(d);o(c,n,e.forChild(a,c),d),a+=c.nodeSize}return}let s=0,l=[],p=null;for(let d=0;;){let c,m;for(;s<n.length&&n[s].to==a;){let x=n[s++];x.widget&&(c?(m||(m=[c])).push(x):c=x)}if(c)if(m){m.sort(T2);for(let x=0;x<m.length;x++)t(m[x],d,!!p)}else t(c,d,!!p);let b,u;if(p)u=-1,b=p,p=null;else if(d<r.childCount)u=d,b=r.child(d++);else break;for(let x=0;x<l.length;x++)l[x].to<=a&&l.splice(x--,1);for(;s<n.length&&n[s].from<=a&&n[s].to>a;)l.push(n[s++]);let g=a+b.nodeSize;if(b.isText){let x=g;s<n.length&&n[s].from<x&&(x=n[s].from);for(let y=0;y<l.length;y++)l[y].to<x&&(x=l[y].to);x<g&&(p=b.cut(x-a),b=b.cut(0,x-a),g=x,u=-1)}else for(;s<n.length&&n[s].to<g;)s++;let f=b.isInline&&!b.isLeaf?l.filter(x=>!x.inline):l.slice();o(b,f,e.forChild(a,b),u),a=g}}function B2(r){if(r.nodeName=="UL"||r.nodeName=="OL"){let e=r.style.cssText;r.style.cssText=e+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=e}}function N2(r,e,t,o){for(let n=0,a=0;n<r.childCount&&a<=o;){let s=r.child(n++),l=a;if(a+=s.nodeSize,!s.isText)continue;let p=s.text;for(;n<r.childCount;){let d=r.child(n++);if(a+=d.nodeSize,!d.isText)break;p+=d.text}if(a>=t){if(a>=o&&p.slice(o-e.length-l,o-l)==e)return o-e.length;let d=l<o?p.lastIndexOf(e,o-l-1):-1;if(d>=0&&d+e.length+l>=t)return l+d;if(t==o&&p.length>=o+e.length-l&&p.slice(o-l,o-l+e.length)==e)return o}}return-1}function Ua(r,e,t,o,n){let a=[];for(let s=0,l=0;s<r.length;s++){let p=r[s],d=l,c=l+=p.size;d>=t||c<=e?a.push(p):(d<e&&a.push(p.slice(0,e-d,o)),n&&(a.push(n),n=void 0),c>t&&a.push(p.slice(t-d,p.size,o)))}return a}function Ga(r,e=null){let t=r.domSelectionRange(),o=r.state.doc;if(!t.focusNode)return null;let n=r.docView.nearestDesc(t.focusNode),a=n&&n.size==0,s=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=o.resolve(s),p,d;if(Zn(t)){for(p=s;n&&!n.node;)n=n.parent;let m=n.node;if(n&&m.isAtom&&H.isSelectable(m)&&n.parent&&!(m.isInline&&t2(t.focusNode,t.focusOffset,n.dom))){let b=n.posBefore;d=new H(s==b?l:o.resolve(b))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let m=s,b=s;for(let u=0;u<t.rangeCount;u++){let g=t.getRangeAt(u);m=Math.min(m,r.docView.posFromDOM(g.startContainer,g.startOffset,1)),b=Math.max(b,r.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(m<0)return null;[p,s]=b==r.state.selection.anchor?[b,m]:[m,b],l=o.resolve(s)}else p=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(p<0)return null}let c=o.resolve(p);if(!d){let m=e=="pointer"||r.state.selection.head<l.pos&&!a?1:-1;d=Ja(r,c,l,m)}return d}function ud(r){return r.editable?r.hasFocus():vd(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function zt(r,e=!1){let t=r.state.selection;if(hd(r,t),!!ud(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&De){let o=r.domSelectionRange(),n=r.domObserver.currentSelection;if(o.anchorNode&&n.anchorNode&&Ar(o.anchorNode,o.anchorOffset,n.anchorNode,n.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)D2(r);else{let{anchor:o,head:n}=t,a,s;gd&&!(t instanceof j)&&(t.$from.parent.inlineContent||(a=xd(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=xd(r,t.to))),r.docView.setSelection(o,n,r,e),gd&&(a&&fd(a),s&&fd(s)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&P2(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}const gd=_e||De&&Jp<63;function xd(r,e){let{node:t,offset:o}=r.docView.domFromPos(e,0),n=o<t.childNodes.length?t.childNodes[o]:null,a=o?t.childNodes[o-1]:null;if(_e&&n&&n.contentEditable=="false")return Ka(n);if((!n||n.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(n)return Ka(n);if(a)return Ka(a)}}function Ka(r){return r.contentEditable="true",_e&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function fd(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function P2(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),o=t.anchorNode,n=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=o||t.anchorOffset!=n)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!ud(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function D2(r){let e=r.domSelection(),t=document.createRange();if(!e)return;let o=r.cursorWrapper.dom,n=o.nodeName=="IMG";n?t.setStart(o.parentNode,Ce(o)+1):t.setStart(o,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!n&&!r.state.selection.visible&&je&&ar<=11&&(o.disabled=!0,o.disabled=!1)}function hd(r,e){if(e instanceof H){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&(yd(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else yd(r)}function yd(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function Ja(r,e,t,o){return r.someProp("createSelectionBetween",n=>n(r,e,t))||j.between(e,t,o)}function wd(r){return r.editable&&!r.hasFocus()?!1:vd(r)}function vd(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function L2(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return Ar(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ya(r,e){let{$anchor:t,$head:o}=r.selection,n=e>0?t.max(o):t.min(o),a=n.parent.inlineContent?n.depth?r.doc.resolve(e>0?n.after():n.before()):null:n;return a&&W.findFrom(a,e)}function pr(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function kd(r,e,t){let o=r.state.selection;if(o instanceof j)if(t.indexOf("s")>-1){let{$head:n}=o,a=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let s=r.state.doc.resolve(n.pos+a.nodeSize*(e<0?-1:1));return pr(r,new j(o.$anchor,s))}else if(o.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let n=Ya(r.state,e);return n&&n instanceof H?pr(r,n):!1}else if(!(rt&&t.indexOf("m")>-1)){let n=o.$head,a=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter,s;if(!a||a.isText)return!1;let l=e<0?n.pos-a.nodeSize:n.pos;return a.isAtom||(s=r.docView.descAt(l))&&!s.contentDOM?H.isSelectable(a)?pr(r,new H(e<0?r.state.doc.resolve(n.pos-a.nodeSize):n)):Ko?pr(r,new j(r.state.doc.resolve(e<0?l:l+a.nodeSize))):!1:!1}}else return!1;else{if(o instanceof H&&o.node.isInline)return pr(r,new j(e>0?o.$to:o.$from));{let n=Ya(r.state,e);return n?pr(r,n):!1}}}function ti(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Qo(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function go(r,e){return e<0?A2(r):O2(r)}function A2(r){let e=r.domSelectionRange(),t=e.focusNode,o=e.focusOffset;if(!t)return;let n,a,s=!1;for(bt&&t.nodeType==1&&o<ti(t)&&Qo(t.childNodes[o],-1)&&(s=!0);;)if(o>0){if(t.nodeType!=1)break;{let l=t.childNodes[o-1];if(Qo(l,-1))n=t,a=--o;else if(l.nodeType==3)t=l,o=t.nodeValue.length;else break}}else{if(Sd(t))break;{let l=t.previousSibling;for(;l&&Qo(l,-1);)n=t.parentNode,a=Ce(l),l=l.previousSibling;if(l)t=l,o=ti(t);else{if(t=t.parentNode,t==r.dom)break;o=0}}}s?Xa(r,t,o):n&&Xa(r,n,a)}function O2(r){let e=r.domSelectionRange(),t=e.focusNode,o=e.focusOffset;if(!t)return;let n=ti(t),a,s;for(;;)if(o<n){if(t.nodeType!=1)break;let l=t.childNodes[o];if(Qo(l,1))a=t,s=++o;else break}else{if(Sd(t))break;{let l=t.nextSibling;for(;l&&Qo(l,1);)a=l.parentNode,s=Ce(l)+1,l=l.nextSibling;if(l)t=l,o=0,n=ti(t);else{if(t=t.parentNode,t==r.dom)break;o=n=0}}}a&&Xa(r,a,s)}function Sd(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function V2(r,e){for(;r&&e==r.childNodes.length&&!Go(r);)e=Ce(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function I2(r,e){for(;r&&!e&&!Go(r);)e=Ce(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function Xa(r,e,t){if(e.nodeType!=3){let a,s;(s=V2(e,t))?(e=s,t=0):(a=I2(e,t))&&(e=a,t=a.nodeValue.length)}let o=r.domSelection();if(!o)return;if(Zn(o)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),o.removeAllRanges(),o.addRange(a)}else o.extend&&o.extend(e,t);r.domObserver.setCurSelection();let{state:n}=r;setTimeout(()=>{r.state==n&&zt(r)},50)}function Cd(r,e){let t=r.state.doc.resolve(e);if(!(De||n2)&&t.parent.inlineContent){let n=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),s=(a.top+a.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(a.left-n.left)>1)return a.left<n.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),s=(a.top+a.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(a.left-n.left)>1)return a.left>n.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function Ed(r,e,t){let o=r.state.selection;if(o instanceof j&&!o.empty||t.indexOf("s")>-1||rt&&t.indexOf("m")>-1)return!1;let{$from:n,$to:a}=o;if(!n.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let s=Ya(r.state,e);if(s&&s instanceof H)return pr(r,s)}if(!n.parent.inlineContent){let s=e<0?n:a,l=o instanceof Qe?W.near(s,e):W.findFrom(s,e);return l?pr(r,l):!1}return!1}function Td(r,e){if(!(r.state.selection instanceof j))return!0;let{$head:t,$anchor:o,empty:n}=r.state.selection;if(!t.sameParent(o))return!0;if(!n)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let s=r.state.tr;return e<0?s.delete(t.pos-a.nodeSize,t.pos):s.delete(t.pos,t.pos+a.nodeSize),r.dispatch(s),!0}return!1}function Md(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function _2(r){if(!_e||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let o=e.firstChild;Md(r,o,"true"),setTimeout(()=>Md(r,o,"false"),20)}return!1}function R2(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function H2(r,e){let t=e.keyCode,o=R2(e);if(t==8||rt&&t==72&&o=="c")return Td(r,-1)||go(r,-1);if(t==46&&!e.shiftKey||rt&&t==68&&o=="c")return Td(r,1)||go(r,1);if(t==13||t==27)return!0;if(t==37||rt&&t==66&&o=="c"){let n=t==37?Cd(r,r.state.selection.from)=="ltr"?-1:1:-1;return kd(r,n,o)||go(r,n)}else if(t==39||rt&&t==70&&o=="c"){let n=t==39?Cd(r,r.state.selection.from)=="ltr"?1:-1:1;return kd(r,n,o)||go(r,n)}else{if(t==38||rt&&t==80&&o=="c")return Ed(r,-1,o)||go(r,-1);if(t==40||rt&&t==78&&o=="c")return _2(r)||Ed(r,1,o)||go(r,1);if(o==(rt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Qa(r,e){r.someProp("transformCopied",u=>{e=u(e,r)});let t=[],{content:o,openStart:n,openEnd:a}=e;for(;n>1&&a>1&&o.childCount==1&&o.firstChild.childCount==1;){n--,a--;let u=o.firstChild;t.push(u.type.name,u.attrs!=u.type.defaultAttrs?u.attrs:null),o=u.content}let s=r.someProp("clipboardSerializer")||Dr.fromSchema(r.state.schema),l=Vd(),p=l.createElement("div");p.appendChild(s.serializeFragment(o,{document:l}));let d=p.firstChild,c,m=0;for(;d&&d.nodeType==1&&(c=Ad[d.nodeName.toLowerCase()]);){for(let u=c.length-1;u>=0;u--){let g=l.createElement(c[u]);for(;p.firstChild;)g.appendChild(p.firstChild);p.appendChild(g),m++}d=p.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${n} ${a}${m?` -${m}`:""} ${JSON.stringify(t)}`);let b=r.someProp("clipboardTextSerializer",u=>u(e,r))||e.content.textBetween(0,e.content.size,`
13
-
14
- `);return{dom:p,text:b,slice:e}}function Bd(r,e,t,o,n){let a=n.parent.type.spec.code,s,l;if(!t&&!e)return null;let p=e&&(o||a||!t);if(p){if(r.someProp("transformPastedText",b=>{e=b(e,a||o,r)}),a)return e?new O(N.from(r.state.schema.text(e.replace(/\r\n?/g,`
15
- `))),0,0):O.empty;let m=r.someProp("clipboardTextParser",b=>b(e,n,o,r));if(m)l=m;else{let b=n.marks(),{schema:u}=r.state,g=Dr.fromSchema(u);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(f=>{let x=s.appendChild(document.createElement("p"));f&&x.appendChild(g.serializeNode(u.text(f,b)))})}}else r.someProp("transformPastedHTML",m=>{t=m(t,r)}),s=q2(t),Ko&&W2(s);let d=s&&s.querySelector("[data-pm-slice]"),c=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let m=+c[3];m>0;m--){let b=s.firstChild;for(;b&&b.nodeType!=1;)b=b.nextSibling;if(!b)break;s=b}if(l||(l=(r.someProp("clipboardParser")||r.someProp("domParser")||Ro.fromSchema(r.state.schema)).parseSlice(s,{preserveWhitespace:!!(p||c),context:n,ruleFromNode(b){return b.nodeName=="BR"&&!b.nextSibling&&b.parentNode&&!z2.test(b.parentNode.nodeName)?{ignore:!0}:null}})),c)l=U2(Ld(l,+c[1],+c[2]),c[4]);else if(l=O.maxOpen(F2(l.content,n),!0),l.openStart||l.openEnd){let m=0,b=0;for(let u=l.content.firstChild;m<l.openStart&&!u.type.spec.isolating;m++,u=u.firstChild);for(let u=l.content.lastChild;b<l.openEnd&&!u.type.spec.isolating;b++,u=u.lastChild);l=Ld(l,m,b)}return r.someProp("transformPasted",m=>{l=m(l,r)}),l}const z2=/^(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 F2(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.index(t)),a,s=[];if(r.forEach(l=>{if(!s)return;let p=n.findWrapping(l.type),d;if(!p)return s=null;if(d=s.length&&a.length&&Pd(p,a,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=Dd(s[s.length-1],a.length));let c=Nd(l,p);s.push(c),n=n.matchType(c.type),a=p}}),s)return N.from(s)}return r}function Nd(r,e,t=0){for(let o=e.length-1;o>=t;o--)r=e[o].create(null,N.from(r));return r}function Pd(r,e,t,o,n){if(n<r.length&&n<e.length&&r[n]==e[n]){let a=Pd(r,e,t,o.lastChild,n+1);if(a)return o.copy(o.content.replaceChild(o.childCount-1,a));if(o.contentMatchAt(o.childCount).matchType(n==r.length-1?t.type:r[n+1]))return o.copy(o.content.append(N.from(Nd(t,r,n+1))))}}function Dd(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,Dd(r.lastChild,e-1)),o=r.contentMatchAt(r.childCount).fillBefore(N.empty,!0);return r.copy(t.append(o))}function Za(r,e,t,o,n,a){let s=e<0?r.firstChild:r.lastChild,l=s.content;return r.childCount>1&&(a=0),n<o-1&&(l=Za(l,e,t,o,n+1,a)),n>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,a<=n).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,s.copy(l))}function Ld(r,e,t){return e<r.openStart&&(r=new O(Za(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new O(Za(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const Ad={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 Od=null;function Vd(){return Od||(Od=document.implementation.createHTMLDocument("title"))}let $a=null;function j2(r){let e=window.trustedTypes;return e?($a||($a=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),$a.createHTML(r)):r}function q2(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=Vd().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(r),n;if((n=o&&Ad[o[1].toLowerCase()])&&(r=n.map(a=>"<"+a+">").join("")+r+n.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=j2(r),n)for(let a=0;a<n.length;a++)t=t.querySelector(n[a])||t;return t}function W2(r){let e=r.querySelectorAll(De?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let o=e[t];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),o)}}function U2(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,o;try{o=JSON.parse(e)}catch{return r}let{content:n,openStart:a,openEnd:s}=r;for(let l=o.length-2;l>=0;l-=2){let p=t.nodes[o[l]];if(!p||p.hasRequiredAttrs())break;n=N.from(p.create(o[l+1],n)),a++,s++}return new O(n,a,s)}const Re={},He={},G2={touchstart:!0,touchmove:!0};class K2{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.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function J2(r){for(let e in Re){let t=Re[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=o=>{X2(r,o)&&!ts(r,o)&&(r.editable||!(o.type in He))&&t(r,o)},G2[e]?{passive:!0}:void 0)}_e&&r.dom.addEventListener("input",()=>null),es(r)}function dr(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function Y2(r){r.domObserver.stop();for(let e in r.input.eventHandlers)r.dom.removeEventListener(e,r.input.eventHandlers[e]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}function es(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=o=>ts(r,o))})}function ts(r,e){return r.someProp("handleDOMEvents",t=>{let o=t[e.type];return o?o(r,e)||e.defaultPrevented:!1})}function X2(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=r.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function Q2(r,e){!ts(r,e)&&Re[e.type]&&(r.editable||!(e.type in He))&&Re[e.type](r,e)}He.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!_d(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(Rt&&De&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),bo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let o=Date.now();r.input.lastIOSEnter=o,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==o&&(r.someProp("handleKeyDown",n=>n(r,Or(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",o=>o(r,t))||H2(r,t)?t.preventDefault():dr(r,"key")},He.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)},He.keypress=(r,e)=>{let t=e;if(_d(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||rt&&t.metaKey)return;if(r.someProp("handleKeyPress",n=>n(r,t))){t.preventDefault();return}let o=r.state.selection;if(!(o instanceof j)||!o.$from.sameParent(o.$to)){let n=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(n).scrollIntoView();!/[\r\n]/.test(n)&&!r.someProp("handleTextInput",s=>s(r,o.$from.pos,o.$to.pos,n,a))&&r.dispatch(a()),t.preventDefault()}};function ri(r){return{left:r.clientX,top:r.clientY}}function Z2(r,e){let t=e.x-r.clientX,o=e.y-r.clientY;return t*t+o*o<100}function rs(r,e,t,o,n){if(o==-1)return!1;let a=r.state.doc.resolve(o);for(let s=a.depth+1;s>0;s--)if(r.someProp(e,l=>s>a.depth?l(r,t,a.nodeAfter,a.before(s),n,!0):l(r,t,a.node(s),a.before(s),n,!1)))return!0;return!1}function xo(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let o=r.state.tr.setSelection(e);o.setMeta("pointer",!0),r.dispatch(o)}function $2(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),o=t.nodeAfter;return o&&o.isAtom&&H.isSelectable(o)?(xo(r,new H(t)),!0):!1}function e1(r,e){if(e==-1)return!1;let t=r.state.selection,o,n;t instanceof H&&(o=t.node);let a=r.state.doc.resolve(e);for(let s=a.depth+1;s>0;s--){let l=s>a.depth?a.nodeAfter:a.node(s);if(H.isSelectable(l)){o&&t.$from.depth>0&&s>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?n=a.before(t.$from.depth):n=a.before(s);break}}return n!=null?(xo(r,H.create(r.state.doc,n)),!0):!1}function t1(r,e,t,o,n){return rs(r,"handleClickOn",e,t,o)||r.someProp("handleClick",a=>a(r,e,o))||(n?e1(r,t):$2(r,t))}function r1(r,e,t,o){return rs(r,"handleDoubleClickOn",e,t,o)||r.someProp("handleDoubleClick",n=>n(r,e,o))}function o1(r,e,t,o){return rs(r,"handleTripleClickOn",e,t,o)||r.someProp("handleTripleClick",n=>n(r,e,o))||n1(r,t,o)}function n1(r,e,t){if(t.button!=0)return!1;let o=r.state.doc;if(e==-1)return o.inlineContent?(xo(r,j.create(o,0,o.content.size)),!0):!1;let n=o.resolve(e);for(let a=n.depth+1;a>0;a--){let s=a>n.depth?n.nodeAfter:n.node(a),l=n.before(a);if(s.inlineContent)xo(r,j.create(o,l+1,l+1+s.content.size));else if(H.isSelectable(s))xo(r,H.create(o,l));else continue;return!0}}function ns(r){return oi(r)}const Id=rt?"metaKey":"ctrlKey";Re.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let o=ns(r),n=Date.now(),a="singleClick";n-r.input.lastClick.time<500&&Z2(t,r.input.lastClick)&&!t[Id]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:n,x:t.clientX,y:t.clientY,type:a,button:t.button};let s=r.posAtCoords(ri(t));s&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new i1(r,s,t,!!o)):(a=="doubleClick"?r1:o1)(r,s.pos,s.inside,t)?t.preventDefault():dr(r,"pointer"))};class i1{constructor(e,t,o,n){this.view=e,this.pos=t,this.event=o,this.flushed=n,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!o[Id],this.allowDefault=o.shiftKey;let a,s;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),s=t.inside;else{let c=e.state.doc.resolve(t.pos);a=c.parent,s=c.depth?c.before():0}const l=n?null:o.target,p=l?e.docView.nearestDesc(l,!0):null;this.target=p&&p.dom.nodeType==1?p.dom:null;let{selection:d}=e.state;(o.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||d instanceof H&&d.from<=s&&d.to>s)&&(this.mightDrag={node:a,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&bt&&!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)),dr(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(()=>zt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ri(e))),this.updateAllowDefault(e),this.allowDefault||!t?dr(this.view,"pointer"):t1(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_e&&this.mightDrag&&!this.mightDrag.node.isAtom||De&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(xo(this.view,W.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):dr(this.view,"pointer")}move(e){this.updateAllowDefault(e),dr(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)}}Re.touchstart=r=>{r.input.lastTouch=Date.now(),ns(r),dr(r,"pointer")},Re.touchmove=r=>{r.input.lastTouch=Date.now(),dr(r,"pointer")},Re.contextmenu=r=>ns(r);function _d(r,e){return r.composing?!0:_e&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const a1=Rt?5e3:-1;He.compositionstart=He.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof j&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))r.markCursor=r.state.storedMarks||t.marks(),oi(r,!0),r.markCursor=null;else if(oi(r,!e.selection.empty),bt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let o=r.domSelectionRange();for(let n=o.focusNode,a=o.focusOffset;n&&n.nodeType==1&&a!=0;){let s=a<0?n.lastChild:n.childNodes[a-1];if(!s)break;if(s.nodeType==3){let l=r.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else n=s,a=-1}}r.input.composing=!0}Rd(r,a1)},He.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,Rd(r,20))};function Rd(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>oi(r),e))}function Hd(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=l1());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function s1(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=$v(e.focusNode,e.focusOffset),o=e2(e.focusNode,e.focusOffset);if(t&&o&&t!=o){let n=o.pmViewDesc,a=r.domObserver.lastChangedTextNode;if(t==a||o==a)return a;if(!n||!n.isText(o.nodeValue))return o;if(r.input.compositionNode==o){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return o}}return t||o}function l1(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function oi(r,e=!1){if(!(Rt&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),Hd(r),e||r.docView&&r.docView.dirty){let t=Ga(r),o=r.state.selection;return t&&!t.eq(o)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!o.$from.node(o.$from.sharedDepth(o.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function p1(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),n=document.createRange();n.selectNodeContents(e),r.dom.blur(),o.removeAllRanges(),o.addRange(n),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}const Zo=je&&ar<15||bo&&i2<604;Re.copy=He.cut=(r,e)=>{let t=e,o=r.state.selection,n=t.type=="cut";if(o.empty)return;let a=Zo?null:t.clipboardData,s=o.content(),{dom:l,text:p}=Qa(r,s);a?(t.preventDefault(),a.clearData(),a.setData("text/html",l.innerHTML),a.setData("text/plain",p)):p1(r,l),n&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function d1(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function c1(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,o=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let n=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),o.parentNode&&o.parentNode.removeChild(o),t?$o(r,o.value,null,n,e):$o(r,o.textContent,o.innerHTML,n,e)},50)}function $o(r,e,t,o,n){let a=Bd(r,e,t,o,r.state.selection.$from);if(r.someProp("handlePaste",p=>p(r,n,a||O.empty)))return!0;if(!a)return!1;let s=d1(a),l=s?r.state.tr.replaceSelectionWith(s,o):r.state.tr.replaceSelection(a);return r.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function zd(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}He.paste=(r,e)=>{let t=e;if(r.composing&&!Rt)return;let o=Zo?null:t.clipboardData,n=r.input.shiftKey&&r.input.lastKeyCode!=45;o&&$o(r,zd(o),o.getData("text/html"),n,t)?t.preventDefault():c1(r,t)};class Fd{constructor(e,t,o){this.slice=e,this.move=t,this.node=o}}const m1=rt?"altKey":"ctrlKey";function jd(r,e){let t=r.someProp("dragCopies",o=>!o(e));return t??!e[m1]}Re.dragstart=(r,e)=>{let t=e,o=r.input.mouseDown;if(o&&o.done(),!t.dataTransfer)return;let n=r.state.selection,a=n.empty?null:r.posAtCoords(ri(t)),s;if(!(a&&a.pos>=n.from&&a.pos<=(n instanceof H?n.to-1:n.to))){if(o&&o.mightDrag)s=H.create(r.state.doc,o.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let m=r.docView.nearestDesc(t.target,!0);m&&m.node.type.spec.draggable&&m!=r.docView&&(s=H.create(r.state.doc,m.posBefore))}}let l=(s||r.state.selection).content(),{dom:p,text:d,slice:c}=Qa(r,l);(!t.dataTransfer.files.length||!De||Jp>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Zo?"Text":"text/html",p.innerHTML),t.dataTransfer.effectAllowed="copyMove",Zo||t.dataTransfer.setData("text/plain",d),r.dragging=new Fd(c,jd(r,t),s)},Re.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)},He.dragover=He.dragenter=(r,e)=>e.preventDefault(),He.drop=(r,e)=>{let t=e,o=r.dragging;if(r.dragging=null,!t.dataTransfer)return;let n=r.posAtCoords(ri(t));if(!n)return;let a=r.state.doc.resolve(n.pos),s=o&&o.slice;s?r.someProp("transformPasted",g=>{s=g(s,r)}):s=Bd(r,zd(t.dataTransfer),Zo?null:t.dataTransfer.getData("text/html"),!1,a);let l=!!(o&&jd(r,t));if(r.someProp("handleDrop",g=>g(r,t,s||O.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let p=s?Dp(r.state.doc,a.pos,s):a.pos;p==null&&(p=a.pos);let d=r.state.tr;if(l){let{node:g}=o;g?g.replace(d):d.deleteSelection()}let c=d.mapping.map(p),m=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,b=d.doc;if(m?d.replaceRangeWith(c,c,s.content.firstChild):d.replaceRange(c,c,s),d.doc.eq(b))return;let u=d.doc.resolve(c);if(m&&H.isSelectable(s.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(s.content.firstChild))d.setSelection(new H(u));else{let g=d.mapping.map(p);d.mapping.maps[d.mapping.maps.length-1].forEach((f,x,y,w)=>g=w),d.setSelection(Ja(r,u,d.doc.resolve(g)))}r.focus(),r.dispatch(d.setMeta("uiEvent","drop"))},Re.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&zt(r)},20))},Re.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)},Re.beforeinput=(r,e)=>{if(De&&Rt&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:o}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=o||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,Or(8,"Backspace")))))return;let{$cursor:n}=r.state.selection;n&&n.pos>0&&r.dispatch(r.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let r in He)Re[r]=He[r];function en(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}class ni{constructor(e,t){this.toDOM=e,this.spec=t||Rr,this.side=this.spec.side||0}map(e,t,o,n){let{pos:a,deleted:s}=e.mapResult(t.from+n,this.side<0?-1:1);return s?null:new nt(a-o,a-o,this)}valid(){return!0}eq(e){return this==e||e instanceof ni&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&en(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class cr{constructor(e,t){this.attrs=e,this.spec=t||Rr}map(e,t,o,n){let a=e.map(t.from+n,this.spec.inclusiveStart?-1:1)-o,s=e.map(t.to+n,this.spec.inclusiveEnd?1:-1)-o;return a>=s?null:new nt(a,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof cr&&en(this.attrs,e.attrs)&&en(this.spec,e.spec)}static is(e){return e.type instanceof cr}destroy(){}}class is{constructor(e,t){this.attrs=e,this.spec=t||Rr}map(e,t,o,n){let a=e.mapResult(t.from+n,1);if(a.deleted)return null;let s=e.mapResult(t.to+n,-1);return s.deleted||s.pos<=a.pos?null:new nt(a.pos-o,s.pos-o,this)}valid(e,t){let{index:o,offset:n}=e.content.findIndex(t.from),a;return n==t.from&&!(a=e.child(o)).isText&&n+a.nodeSize==t.to}eq(e){return this==e||e instanceof is&&en(this.attrs,e.attrs)&&en(this.spec,e.spec)}destroy(){}}class nt{constructor(e,t,o){this.from=e,this.to=t,this.type=o}copy(e,t){return new nt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,o){return this.type.map(e,this,t,o)}static widget(e,t,o){return new nt(e,e,new ni(t,o))}static inline(e,t,o,n){return new nt(e,t,new cr(o,n))}static node(e,t,o,n){return new nt(e,t,new is(o,n))}get spec(){return this.type.spec}get inline(){return this.type instanceof cr}get widget(){return this.type instanceof ni}}const fo=[],Rr={};class be{constructor(e,t){this.local=e.length?e:fo,this.children=t.length?t:fo}static create(e,t){return t.length?ii(t,e,0,Rr):Le}find(e,t,o){let n=[];return this.findInner(e??0,t??1e9,n,0,o),n}findInner(e,t,o,n,a){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!a||a(l.spec))&&o.push(l.copy(l.from+n,l.to+n))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,o,n+l,a)}}map(e,t,o){return this==Le||e.maps.length==0?this:this.mapInner(e,t,0,0,o||Rr)}mapInner(e,t,o,n,a){let s;for(let l=0;l<this.local.length;l++){let p=this.local[l].map(e,o,n);p&&p.type.valid(t,p)?(s||(s=[])).push(p):a.onRemove&&a.onRemove(this.local[l].spec)}return this.children.length?b1(this.children,s||[],e,t,o,n,a):s?new be(s.sort(Hr),fo):Le}add(e,t){return t.length?this==Le?be.create(e,t):this.addInner(e,t,0):this}addInner(e,t,o){let n,a=0;e.forEach((l,p)=>{let d=p+o,c;if(c=Wd(t,l,d)){for(n||(n=this.children.slice());a<n.length&&n[a]<p;)a+=3;n[a]==p?n[a+2]=n[a+2].addInner(l,c,d+1):n.splice(a,0,p,p+l.nodeSize,ii(c,l,d+1,Rr)),a+=3}});let s=qd(a?Ud(t):t,-o);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new be(s.length?this.local.concat(s).sort(Hr):this.local,n||this.children)}remove(e){return e.length==0||this==Le?this:this.removeInner(e,0)}removeInner(e,t){let o=this.children,n=this.local;for(let a=0;a<o.length;a+=3){let s,l=o[a]+t,p=o[a+1]+t;for(let c=0,m;c<e.length;c++)(m=e[c])&&m.from>l&&m.to<p&&(e[c]=null,(s||(s=[])).push(m));if(!s)continue;o==this.children&&(o=this.children.slice());let d=o[a+2].removeInner(s,l+1);d!=Le?o[a+2]=d:(o.splice(a,3),a-=3)}if(n.length){for(let a=0,s;a<e.length;a++)if(s=e[a])for(let l=0;l<n.length;l++)n[l].eq(s,t)&&(n==this.local&&(n=this.local.slice()),n.splice(l--,1))}return o==this.children&&n==this.local?this:n.length||o.length?new be(n,o):Le}forChild(e,t){if(this==Le)return this;if(t.isLeaf)return be.empty;let o,n;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(o=this.children[l+2]);break}let a=e+1,s=a+t.content.size;for(let l=0;l<this.local.length;l++){let p=this.local[l];if(p.from<s&&p.to>a&&p.type instanceof cr){let d=Math.max(a,p.from)-a,c=Math.min(s,p.to)-a;d<c&&(n||(n=[])).push(p.copy(d,c))}}if(n){let l=new be(n.sort(Hr),fo);return o?new mr([l,o]):l}return o||Le}eq(e){if(this==e)return!0;if(!(e instanceof be)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return as(this.localsInner(e))}localsInner(e){if(this==Le)return fo;if(e.inlineContent||!this.local.some(cr.is))return this.local;let t=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof cr||t.push(this.local[o]);return t}forEachSet(e){e(this)}}be.empty=new be([],[]),be.removeOverlap=as;const Le=be.empty;class mr{constructor(e){this.members=e}map(e,t){const o=this.members.map(n=>n.map(e,t,Rr));return mr.from(o)}forChild(e,t){if(t.isLeaf)return be.empty;let o=[];for(let n=0;n<this.members.length;n++){let a=this.members[n].forChild(e,t);a!=Le&&(a instanceof mr?o=o.concat(a.members):o.push(a))}return mr.from(o)}eq(e){if(!(e instanceof mr)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,o=!0;for(let n=0;n<this.members.length;n++){let a=this.members[n].localsInner(e);if(a.length)if(!t)t=a;else{o&&(t=t.slice(),o=!1);for(let s=0;s<a.length;s++)t.push(a[s])}}return t?as(o?t:t.sort(Hr)):fo}static from(e){switch(e.length){case 0:return Le;case 1:return e[0];default:return new mr(e.every(t=>t instanceof be)?e:e.reduce((t,o)=>t.concat(o instanceof be?o:o.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function b1(r,e,t,o,n,a,s){let l=r.slice();for(let d=0,c=a;d<t.maps.length;d++){let m=0;t.maps[d].forEach((b,u,g,f)=>{let x=f-g-(u-b);for(let y=0;y<l.length;y+=3){let w=l[y+1];if(w<0||b>w+c-m)continue;let v=l[y]+c-m;u>=v?l[y+1]=b<=v?-2:-1:b>=c&&x&&(l[y]+=x,l[y+1]+=x)}m+=x}),c=t.maps[d].map(c,-1)}let p=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){p=!0,l[d+1]=-1;continue}let c=t.map(r[d]+a),m=c-n;if(m<0||m>=o.content.size){p=!0;continue}let b=t.map(r[d+1]+a,-1),u=b-n,{index:g,offset:f}=o.content.findIndex(m),x=o.maybeChild(g);if(x&&f==m&&f+x.nodeSize==u){let y=l[d+2].mapInner(t,x,c+1,r[d]+a+1,s);y!=Le?(l[d]=m,l[d+1]=u,l[d+2]=y):(l[d+1]=-2,p=!0)}else p=!0}if(p){let d=u1(l,r,e,t,n,a,s),c=ii(d,o,0,s);e=c.local;for(let m=0;m<l.length;m+=3)l[m+1]<0&&(l.splice(m,3),m-=3);for(let m=0,b=0;m<c.children.length;m+=3){let u=c.children[m];for(;b<l.length&&l[b]<u;)b+=3;l.splice(b,0,c.children[m],c.children[m+1],c.children[m+2])}}return new be(e.sort(Hr),l)}function qd(r,e){if(!e||!r.length)return r;let t=[];for(let o=0;o<r.length;o++){let n=r[o];t.push(new nt(n.from+e,n.to+e,n.type))}return t}function u1(r,e,t,o,n,a,s){function l(p,d){for(let c=0;c<p.local.length;c++){let m=p.local[c].map(o,n,d);m?t.push(m):s.onRemove&&s.onRemove(p.local[c].spec)}for(let c=0;c<p.children.length;c+=3)l(p.children[c+2],p.children[c]+d+1)}for(let p=0;p<r.length;p+=3)r[p+1]==-1&&l(r[p+2],e[p]+a+1);return t}function Wd(r,e,t){if(e.isLeaf)return null;let o=t+e.nodeSize,n=null;for(let a=0,s;a<r.length;a++)(s=r[a])&&s.from>t&&s.to<o&&((n||(n=[])).push(s),r[a]=null);return n}function Ud(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function ii(r,e,t,o){let n=[],a=!1;e.forEach((l,p)=>{let d=Wd(r,l,p+t);if(d){a=!0;let c=ii(d,l,t+p+1,o);c!=Le&&n.push(p,p+l.nodeSize,c)}});let s=qd(a?Ud(r):r,-t).sort(Hr);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(o.onRemove&&o.onRemove(s[l].spec),s.splice(l--,1));return s.length||n.length?new be(s,n):Le}function Hr(r,e){return r.from-e.from||r.to-e.to}function as(r){let e=r;for(let t=0;t<e.length-1;t++){let o=e[t];if(o.from!=o.to)for(let n=t+1;n<e.length;n++){let a=e[n];if(a.from==o.from){a.to!=o.to&&(e==r&&(e=r.slice()),e[n]=a.copy(a.from,o.to),Gd(e,n+1,a.copy(o.to,a.to)));continue}else{a.from<o.to&&(e==r&&(e=r.slice()),e[t]=o.copy(o.from,a.from),Gd(e,n,o.copy(a.from,o.to)));break}}}return e}function Gd(r,e,t){for(;e<r.length&&Hr(t,r[e])>0;)e++;r.splice(e,0,t)}function ss(r){let e=[];return r.someProp("decorations",t=>{let o=t(r.state);o&&o!=Le&&e.push(o)}),r.cursorWrapper&&e.push(be.create(r.state.doc,[r.cursorWrapper.deco])),mr.from(e)}const g1={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},x1=je&&ar<=11;class f1{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 h1{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new f1,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(o=>{for(let n=0;n<o.length;n++)this.queue.push(o[n]);je&&ar<=11&&o.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),x1&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.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,g1)),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 t=0;t<e.length;t++)this.queue.push(e[t]);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(wd(this.view)){if(this.suppressingSelectionUpdates)return zt(this.view);if(je&&ar<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ar(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 t=new Set,o;for(let a=e.focusNode;a;a=mo(a))t.add(a);for(let a=e.anchorNode;a;a=mo(a))if(t.has(a)){o=a;break}let n=o&&this.view.docView.nearestDesc(o);if(n&&n.ignoreMutation({type:"selection",target:o.nodeType==3?o.parentNode:o}))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 t=this.pendingRecords();t.length&&(this.queue=[]);let o=e.domSelectionRange(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&wd(e)&&!this.ignoreSelectionChange(o),a=-1,s=-1,l=!1,p=[];if(e.editable)for(let c=0;c<t.length;c++){let m=this.registerMutation(t[c],p);m&&(a=a<0?m.from:Math.min(m.from,a),s=s<0?m.to:Math.max(m.to,s),m.typeOver&&(l=!0))}if(bt&&p.length){let c=p.filter(m=>m.nodeName=="BR");if(c.length==2){let[m,b]=c;m.parentNode&&m.parentNode.parentNode==b.parentNode?b.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let b of c){let u=b.parentNode;u&&u.nodeName=="LI"&&(!m||v1(e,m)!=u)&&b.remove()}}}let d=null;a<0&&n&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Zn(o)&&(d=Ga(e))&&d.eq(W.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,zt(e),this.currentSelection.set(o),e.scrollToSelection()):(a>-1||n)&&(a>-1&&(e.docView.markDirty(a,s),y1(e)),this.handleDOMChange(a,s,l,p),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(o)||zt(e),this.currentSelection.set(o))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let o=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(o==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!o||o.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let m=e.addedNodes[c];t.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(e.target))return{from:o.posBefore,to:o.posAfter};let n=e.previousSibling,a=e.nextSibling;if(je&&ar<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:m,nextSibling:b}=e.addedNodes[c];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(n=m),(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)&&(a=b)}let s=n&&n.parentNode==e.target?Ce(n)+1:0,l=o.localPosFromDOM(e.target,s,-1),p=a&&a.parentNode==e.target?Ce(a):e.target.childNodes.length,d=o.localPosFromDOM(e.target,p,1);return{from:l,to:d}}else return e.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=e.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Kd=new WeakMap,Jd=!1;function y1(r){if(!Kd.has(r)&&(Kd.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=bt,Jd)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."),Jd=!0}}function Yd(r,e){let t=e.startContainer,o=e.startOffset,n=e.endContainer,a=e.endOffset,s=r.domAtPos(r.state.selection.anchor);return Ar(s.node,s.offset,n,a)&&([t,o,n,a]=[n,a,t,o]),{anchorNode:t,anchorOffset:o,focusNode:n,focusOffset:a}}function w1(r,e){if(e.getComposedRanges){let n=e.getComposedRanges(r.root)[0];if(n)return Yd(r,n)}let t;function o(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",o,!0),t?Yd(r,t):null}function v1(r,e){for(let t=e.parentNode;t&&t!=r.dom;t=t.parentNode){let o=r.docView.nearestDesc(t,!0);if(o&&o.node.isBlock)return t}return null}function k1(r,e,t){let{node:o,fromOffset:n,toOffset:a,from:s,to:l}=r.docView.parseRange(e,t),p=r.domSelectionRange(),d,c=p.anchorNode;if(c&&r.dom.contains(c.nodeType==1?c:c.parentNode)&&(d=[{node:c,offset:p.anchorOffset}],Zn(p)||d.push({node:p.focusNode,offset:p.focusOffset})),De&&r.input.lastKeyCode===8)for(let x=a;x>n;x--){let y=o.childNodes[x-1],w=y.pmViewDesc;if(y.nodeName=="BR"&&!w){a=x;break}if(!w||w.size)break}let m=r.state.doc,b=r.someProp("domParser")||Ro.fromSchema(r.state.schema),u=m.resolve(s),g=null,f=b.parse(o,{topNode:u.parent,topMatch:u.parent.contentMatchAt(u.index()),topOpen:!0,from:n,to:a,preserveWhitespace:u.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:S1,context:u});if(d&&d[0].pos!=null){let x=d[0].pos,y=d[1]&&d[1].pos;y==null&&(y=x),g={anchor:x+s,head:y+s}}return{doc:f,sel:g,from:s,to:l}}function S1(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if(_e&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(r.parentNode.lastChild==r||_e&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if(r.nodeName=="IMG"&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}const C1=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function E1(r,e,t,o,n){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let L=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,V=Ga(r,L);if(V&&!r.state.selection.eq(V)){if(De&&Rt&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",B=>B(r,Or(13,"Enter"))))return;let M=r.state.tr.setSelection(V);L=="pointer"?M.setMeta("pointer",!0):L=="key"&&M.scrollIntoView(),a&&M.setMeta("composition",a),r.dispatch(M)}return}let s=r.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=r.state.doc.resolve(t).after(l+1);let p=r.state.selection,d=k1(r,e,t),c=r.state.doc,m=c.slice(d.from,d.to),b,u;r.input.lastKeyCode===8&&Date.now()-100<r.input.lastKeyCodeTime?(b=r.state.selection.to,u="end"):(b=r.state.selection.from,u="start"),r.input.lastKeyCode=null;let g=B1(m.content,d.doc.content,d.from,b,u);if(g&&r.input.domChangeCount++,(bo&&r.input.lastIOSEnter>Date.now()-225||Rt)&&n.some(L=>L.nodeType==1&&!C1.test(L.nodeName))&&(!g||g.endA>=g.endB)&&r.someProp("handleKeyDown",L=>L(r,Or(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!g)if(o&&p instanceof j&&!p.empty&&p.$head.sameParent(p.$anchor)&&!r.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))g={start:p.from,endA:p.to,endB:p.to};else{if(d.sel){let L=Xd(r,r.state.doc,d.sel);if(L&&!L.eq(r.state.selection)){let V=r.state.tr.setSelection(L);a&&V.setMeta("composition",a),r.dispatch(V)}}return}r.state.selection.from<r.state.selection.to&&g.start==g.endB&&r.state.selection instanceof j&&(g.start>r.state.selection.from&&g.start<=r.state.selection.from+2&&r.state.selection.from>=d.from?g.start=r.state.selection.from:g.endA<r.state.selection.to&&g.endA>=r.state.selection.to-2&&r.state.selection.to<=d.to&&(g.endB+=r.state.selection.to-g.endA,g.endA=r.state.selection.to)),je&&ar<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>d.from&&d.doc.textBetween(g.start-d.from-1,g.start-d.from+1)=="  "&&(g.start--,g.endA--,g.endB--);let f=d.doc.resolveNoCache(g.start-d.from),x=d.doc.resolveNoCache(g.endB-d.from),y=c.resolve(g.start),w=f.sameParent(x)&&f.parent.inlineContent&&y.end()>=g.endA,v;if((bo&&r.input.lastIOSEnter>Date.now()-225&&(!w||n.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!w&&f.pos<d.doc.content.size&&(!f.sameParent(x)||!f.parent.inlineContent)&&!/\S/.test(d.doc.textBetween(f.pos,x.pos,"",""))&&(v=W.findFrom(d.doc.resolve(f.pos+1),1,!0))&&v.head>f.pos)&&r.someProp("handleKeyDown",L=>L(r,Or(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>g.start&&M1(c,g.start,g.endA,f,x)&&r.someProp("handleKeyDown",L=>L(r,Or(8,"Backspace")))){Rt&&De&&r.domObserver.suppressSelectionUpdates();return}De&&g.endB==g.start&&(r.input.lastChromeDelete=Date.now()),Rt&&!w&&f.start()!=x.start()&&x.parentOffset==0&&f.depth==x.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==g.endA&&(g.endB-=2,x=d.doc.resolveNoCache(g.endB-d.from),setTimeout(()=>{r.someProp("handleKeyDown",function(L){return L(r,Or(13,"Enter"))})},20));let h=g.start,S=g.endA,k=L=>{let V=L||r.state.tr.replace(h,S,d.doc.slice(g.start-d.from,g.endB-d.from));if(d.sel){let M=Xd(r,V.doc,d.sel);M&&!(De&&r.composing&&M.empty&&(g.start!=g.endB||r.input.lastChromeDelete<Date.now()-100)&&(M.head==h||M.head==V.mapping.map(S)-1)||je&&M.empty&&M.head==h)&&V.setSelection(M)}return a&&V.setMeta("composition",a),V.scrollIntoView()},C;if(w){if(f.pos==x.pos){je&&ar<=11&&f.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>zt(r),20));let L=k(r.state.tr.delete(h,S)),V=c.resolve(g.start).marksAcross(c.resolve(g.endA));V&&L.ensureMarks(V),r.dispatch(L)}else if(g.endA==g.endB&&(C=T1(f.parent.content.cut(f.parentOffset,x.parentOffset),y.parent.content.cut(y.parentOffset,g.endA-y.start())))){let L=k(r.state.tr);C.type=="add"?L.addMark(h,S,C.mark):L.removeMark(h,S,C.mark),r.dispatch(L)}else if(f.parent.child(f.index()).isText&&f.index()==x.index()-(x.textOffset?0:1)){let L=f.parent.textBetween(f.parentOffset,x.parentOffset),V=()=>k(r.state.tr.insertText(L,h,S));r.someProp("handleTextInput",M=>M(r,h,S,L,V))||r.dispatch(V())}}else r.dispatch(k())}function Xd(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ja(r,e.resolve(t.anchor),e.resolve(t.head))}function T1(r,e){let t=r.firstChild.marks,o=e.firstChild.marks,n=t,a=o,s,l,p;for(let c=0;c<o.length;c++)n=o[c].removeFromSet(n);for(let c=0;c<t.length;c++)a=t[c].removeFromSet(a);if(n.length==1&&a.length==0)l=n[0],s="add",p=c=>c.mark(l.addToSet(c.marks));else if(n.length==0&&a.length==1)l=a[0],s="remove",p=c=>c.mark(l.removeFromSet(c.marks));else return null;let d=[];for(let c=0;c<e.childCount;c++)d.push(p(e.child(c)));if(N.from(d).eq(r))return{mark:l,type:s}}function M1(r,e,t,o,n){if(t-e<=n.pos-o.pos||ls(o,!0,!1)<n.pos)return!1;let a=r.resolve(e);if(!o.parent.isTextblock){let l=a.nodeAfter;return l!=null&&t==e+l.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let s=r.resolve(ls(a,!0,!0));return!s.parent.isTextblock||s.pos>t||ls(s,!0,!1)<t?!1:o.parent.content.cut(o.parentOffset).eq(s.parent.content)}function ls(r,e,t){let o=r.depth,n=e?r.end():r.pos;for(;o>0&&(e||r.indexAfter(o)==r.node(o).childCount);)o--,n++,e=!1;if(t){let a=r.node(o).maybeChild(r.indexAfter(o));for(;a&&!a.isLeaf;)a=a.firstChild,n++}return n}function B1(r,e,t,o,n){let a=r.findDiffStart(e,t);if(a==null)return null;let{a:s,b:l}=r.findDiffEnd(e,t+r.size,t+e.size);if(n=="end"){let p=Math.max(0,a-Math.min(s,l));o-=s+p-a}if(s<a&&r.size<e.size){let p=o<=a&&o>=s?a-o:0;a-=p,a&&a<e.size&&Qd(e.textBetween(a-1,a+1))&&(a+=p?1:-1),l=a+(l-s),s=a}else if(l<a){let p=o<=a&&o>=l?a-o:0;a-=p,a&&a<r.size&&Qd(r.textBetween(a-1,a+1))&&(a+=p?1:-1),s=a+(s-l),l=a}return{start:a,endA:s,endB:l}}function Qd(r){if(r.length!=2)return!1;let e=r.charCodeAt(0),t=r.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class Zd{constructor(e,t){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 K2,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(oc),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=tc(this),ec(this),this.nodeViews=rc(this),this.docView=ld(this.state.doc,$d(this),ss(this),this.dom,this),this.domObserver=new h1(this,(o,n,a,s)=>E1(this,o,n,a,s)),this.domObserver.start(),J2(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&es(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(oc),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let o in this._props)t[o]=this._props[o];t.state=this.state;for(let o in e)t[o]=e[o];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var o;let n=this.state,a=!1,s=!1;e.storedMarks&&this.composing&&(Hd(this),s=!0),this.state=e;let l=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let u=rc(this);P1(u,this.nodeViews)&&(this.nodeViews=u,a=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&es(this),this.editable=tc(this),ec(this);let p=ss(this),d=$d(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",m=a||!this.docView.matchesNode(e.doc,d,p);(m||!e.selection.eq(n.selection))&&(s=!0);let b=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&l2(this);if(s){this.domObserver.stop();let u=m&&(je||De)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&N1(n.selection,e.selection);if(m){let g=De?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=s1(this)),(a||!this.docView.update(e.doc,d,p,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=ld(e.doc,d,p,this.dom,this)),g&&!this.trackWrites&&(u=!0)}u||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&L2(this))?zt(this,u):(hd(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),!((o=this.dragging)===null||o===void 0)&&o.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():b&&p2(b)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof H){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Yp(this,t.getBoundingClientRect(),e)}else Yp(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 t=0;t<this.directPlugins.length;t++){let o=this.directPlugins[t];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let o=this.state.plugins[t];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let o=this.pluginViews[t];o.update&&o.update(this,e)}}updateDraggedNode(e,t){let o=e.node,n=-1;if(this.state.doc.nodeAt(o.from)==o.node)n=o.from;else{let a=o.from+(this.state.doc.content.size-t.doc.content.size);(a>0&&this.state.doc.nodeAt(a))==o.node&&(n=a)}this.dragging=new Fd(e.slice,e.move,n<0?void 0:H.create(this.state.doc,n))}someProp(e,t){let o=this._props&&this._props[e],n;if(o!=null&&(n=t?t(o):o))return n;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(n=t?t(l):l))return n}let a=this.state.plugins;if(a)for(let s=0;s<a.length;s++){let l=a[s].props[e];if(l!=null&&(n=t?t(l):l))return n}}hasFocus(){if(je){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&&d2(this.dom),zt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return g2(this,e)}coordsAtPos(e,t=1){return td(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,o=-1){let n=this.docView.posFromDOM(e,t,o);if(n==null)throw new RangeError("DOM position not inside the editor");return n}endOfTextblock(e,t){return w2(this,t||this.state,e)}pasteHTML(e,t){return $o(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return $o(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Qa(this,e)}destroy(){this.docView&&(Y2(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ss(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Qv())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return Q2(this,e)}domSelectionRange(){let e=this.domSelection();return e?_e&&this.root.nodeType===11&&r2(this.dom.ownerDocument)==this.dom&&w1(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Zd.prototype.dispatch=function(r){let e=this._props.dispatchTransaction;e?e.call(this,r):this.updateState(this.state.apply(r))};function $d(r){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(r.editable),r.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(r.state)),t)for(let o in t)o=="class"?e.class+=" "+t[o]:o=="style"?e.style=(e.style?e.style+";":"")+t[o]:!e[o]&&o!="contenteditable"&&o!="nodeName"&&(e[o]=String(t[o]))}),e.translate||(e.translate="no"),[nt.node(0,r.state.doc.content.size,e)]}function ec(r){if(r.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),r.cursorWrapper={dom:e,deco:nt.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function tc(r){return!r.someProp("editable",e=>e(r.state)===!1)}function N1(r,e){let t=Math.min(r.$anchor.sharedDepth(r.head),e.$anchor.sharedDepth(e.head));return r.$anchor.start(t)!=e.$anchor.start(t)}function rc(r){let e=Object.create(null);function t(o){for(let n in o)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=o[n])}return r.someProp("nodeViews",t),r.someProp("markViews",t),e}function P1(r,e){let t=0,o=0;for(let n in r){if(r[n]!=e[n])return!0;t++}for(let n in e)o++;return t!=o}function oc(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var br={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:"'"},ai={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},D1=typeof navigator<"u"&&/Mac/.test(navigator.platform),L1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ee=0;Ee<10;Ee++)br[48+Ee]=br[96+Ee]=String(Ee);for(var Ee=1;Ee<=24;Ee++)br[Ee+111]="F"+Ee;for(var Ee=65;Ee<=90;Ee++)br[Ee]=String.fromCharCode(Ee+32),ai[Ee]=String.fromCharCode(Ee);for(var ps in br)ai.hasOwnProperty(ps)||(ai[ps]=br[ps]);function A1(r){var e=D1&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||L1&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?ai:br)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const O1=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),V1=typeof navigator<"u"&&/Win/.test(navigator.platform);function I1(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let o,n,a,s;for(let l=0;l<e.length-1;l++){let p=e[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))o=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))a=!0;else if(/^mod$/i.test(p))O1?s=!0:n=!0;else throw new Error("Unrecognized modifier name: "+p)}return o&&(t="Alt-"+t),n&&(t="Ctrl-"+t),s&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function _1(r){let e=Object.create(null);for(let t in r)e[I1(t)]=r[t];return e}function ds(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function R1(r){return new me({props:{handleKeyDown:nc(r)}})}function nc(r){let e=_1(r);return function(t,o){let n=A1(o),a,s=e[ds(n,o)];if(s&&s(t.state,t.dispatch,t))return!0;if(n.length==1&&n!=" "){if(o.shiftKey){let l=e[ds(n,o,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((o.altKey||o.metaKey||o.ctrlKey)&&!(V1&&o.ctrlKey&&o.altKey)&&(a=br[o.keyCode])&&a!=n){let l=e[ds(a,o)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const cs=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function ic(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const ac=(r,e,t)=>{let o=ic(r,t);if(!o)return!1;let n=ms(o);if(!n){let s=o.blockRange(),l=s&&ao(s);return l==null?!1:(e&&e(r.tr.lift(s,l).scrollIntoView()),!0)}let a=n.nodeBefore;if(gc(r,n,e,-1))return!0;if(o.parent.content.size==0&&(ho(a,"end")||H.isSelectable(a)))for(let s=o.depth;;s--){let l=Yn(r.doc,o.before(s),o.after(s),O.empty);if(l&&l.slice.size<l.to-l.from){if(e){let p=r.tr.step(l);p.setSelection(ho(a,"end")?W.findFrom(p.doc.resolve(p.mapping.map(n.pos,-1)),-1):H.create(p.doc,n.pos-a.nodeSize)),e(p.scrollIntoView())}return!0}if(s==1||o.node(s-1).childCount>1)break}return a.isAtom&&n.depth==o.depth-1?(e&&e(r.tr.delete(n.pos-a.nodeSize,n.pos).scrollIntoView()),!0):!1},H1=(r,e,t)=>{let o=ic(r,t);if(!o)return!1;let n=ms(o);return n?sc(r,n,e):!1},z1=(r,e,t)=>{let o=pc(r,t);if(!o)return!1;let n=bs(o);return n?sc(r,n,e):!1};function sc(r,e,t){let o=e.nodeBefore,n=o,a=e.pos-1;for(;!n.isTextblock;a--){if(n.type.spec.isolating)return!1;let c=n.lastChild;if(!c)return!1;n=c}let s=e.nodeAfter,l=s,p=e.pos+1;for(;!l.isTextblock;p++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let d=Yn(r.doc,a,p,O.empty);if(!d||d.from!=a||d instanceof xe&&d.slice.size>=p-a)return!1;if(t){let c=r.tr.step(d);c.setSelection(j.create(c.doc,a)),t(c.scrollIntoView())}return!0}function ho(r,e,t=!1){for(let o=r;o;o=e=="start"?o.firstChild:o.lastChild){if(o.isTextblock)return!0;if(t&&o.childCount!=1)return!1}return!1}const lc=(r,e,t)=>{let{$head:o,empty:n}=r.selection,a=o;if(!n)return!1;if(o.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):o.parentOffset>0)return!1;a=ms(o)}let s=a&&a.nodeBefore;return!s||!H.isSelectable(s)?!1:(e&&e(r.tr.setSelection(H.create(r.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)};function ms(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function pc(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const dc=(r,e,t)=>{let o=pc(r,t);if(!o)return!1;let n=bs(o);if(!n)return!1;let a=n.nodeAfter;if(gc(r,n,e,1))return!0;if(o.parent.content.size==0&&(ho(a,"start")||H.isSelectable(a))){let s=Yn(r.doc,o.before(),o.after(),O.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(ho(a,"start")?W.findFrom(l.doc.resolve(l.mapping.map(n.pos)),1):H.create(l.doc,l.mapping.map(n.pos))),e(l.scrollIntoView())}return!0}}return a.isAtom&&n.depth==o.depth-1?(e&&e(r.tr.delete(n.pos,n.pos+a.nodeSize).scrollIntoView()),!0):!1},cc=(r,e,t)=>{let{$head:o,empty:n}=r.selection,a=o;if(!n)return!1;if(o.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):o.parentOffset<o.parent.content.size)return!1;a=bs(o)}let s=a&&a.nodeAfter;return!s||!H.isSelectable(s)?!1:(e&&e(r.tr.setSelection(H.create(r.doc,a.pos)).scrollIntoView()),!0)};function bs(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}const F1=(r,e)=>{let t=r.selection,o=t instanceof H,n;if(o){if(t.node.isTextblock||!nr(r.doc,t.from))return!1;n=t.from}else if(n=Jn(r.doc,t.from,-1),n==null)return!1;if(e){let a=r.tr.join(n);o&&a.setSelection(H.create(a.doc,n-r.doc.resolve(n).nodeBefore.nodeSize)),e(a.scrollIntoView())}return!0},j1=(r,e)=>{let t=r.selection,o;if(t instanceof H){if(t.node.isTextblock||!nr(r.doc,t.to))return!1;o=t.to}else if(o=Jn(r.doc,t.to,1),o==null)return!1;return e&&e(r.tr.join(o).scrollIntoView()),!0},q1=(r,e)=>{let{$from:t,$to:o}=r.selection,n=t.blockRange(o),a=n&&ao(n);return a==null?!1:(e&&e(r.tr.lift(n,a).scrollIntoView()),!0)},mc=(r,e)=>{let{$head:t,$anchor:o}=r.selection;return!t.parent.type.spec.code||!t.sameParent(o)?!1:(e&&e(r.tr.insertText(`
16
- `).scrollIntoView()),!0)};function us(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const W1=(r,e)=>{let{$head:t,$anchor:o}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(o))return!1;let n=t.node(-1),a=t.indexAfter(-1),s=us(n.contentMatchAt(a));if(!s||!n.canReplaceWith(a,a,s))return!1;if(e){let l=t.after(),p=r.tr.replaceWith(l,l,s.createAndFill());p.setSelection(W.near(p.doc.resolve(l),1)),e(p.scrollIntoView())}return!0},bc=(r,e)=>{let t=r.selection,{$from:o,$to:n}=t;if(t instanceof Qe||o.parent.inlineContent||n.parent.inlineContent)return!1;let a=us(n.parent.contentMatchAt(n.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let s=(!o.parentOffset&&n.index()<n.parent.childCount?o:n).pos,l=r.tr.insert(s,a.createAndFill());l.setSelection(j.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},uc=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(It(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let o=t.blockRange(),n=o&&ao(o);return n==null?!1:(e&&e(r.tr.lift(o,n).scrollIntoView()),!0)};function U1(r){return(e,t)=>{let{$from:o,$to:n}=e.selection;if(e.selection instanceof H&&e.selection.node.isBlock)return!o.parentOffset||!It(e.doc,o.pos)?!1:(t&&t(e.tr.split(o.pos).scrollIntoView()),!0);if(!o.depth)return!1;let a=[],s,l,p=!1,d=!1;for(let u=o.depth;;u--)if(o.node(u).isBlock){p=o.end(u)==o.pos+(o.depth-u),d=o.start(u)==o.pos-(o.depth-u),l=us(o.node(u-1).contentMatchAt(o.indexAfter(u-1))),a.unshift(p&&l?{type:l}:null),s=u;break}else{if(u==1)return!1;a.unshift(null)}let c=e.tr;(e.selection instanceof j||e.selection instanceof Qe)&&c.deleteSelection();let m=c.mapping.map(o.pos),b=It(c.doc,m,a.length,a);if(b||(a[0]=l?{type:l}:null,b=It(c.doc,m,a.length,a)),!b)return!1;if(c.split(m,a.length,a),!p&&d&&o.node(s).type!=l){let u=c.mapping.map(o.before(s)),g=c.doc.resolve(u);l&&o.node(s-1).canReplaceWith(g.index(),g.index()+1,l)&&c.setNodeMarkup(c.mapping.map(o.before(s)),l)}return t&&t(c.scrollIntoView()),!0}}const G1=U1(),K1=(r,e)=>{let{$from:t,to:o}=r.selection,n,a=t.sharedDepth(o);return a==0?!1:(n=t.before(a),e&&e(r.tr.setSelection(H.create(r.doc,n))),!0)};function J1(r,e,t){let o=e.nodeBefore,n=e.nodeAfter,a=e.index();return!o||!n||!o.type.compatibleContent(n.type)?!1:!o.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(n.isTextblock||nr(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function gc(r,e,t,o){let n=e.nodeBefore,a=e.nodeAfter,s,l,p=n.type.spec.isolating||a.type.spec.isolating;if(!p&&J1(r,e,t))return!0;let d=!p&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=n.contentMatchAt(n.childCount)).findWrapping(a.type))&&l.matchType(s[0]||a.type).validEnd){if(t){let u=e.pos+a.nodeSize,g=N.empty;for(let y=s.length-1;y>=0;y--)g=N.from(s[y].create(null,g));g=N.from(n.copy(g));let f=r.tr.step(new fe(e.pos-1,u,e.pos,u,new O(g,1,0),s.length,!0)),x=f.doc.resolve(u+2*s.length);x.nodeAfter&&x.nodeAfter.type==n.type&&nr(f.doc,x.pos)&&f.join(x.pos),t(f.scrollIntoView())}return!0}let c=a.type.spec.isolating||o>0&&p?null:W.findFrom(e,1),m=c&&c.$from.blockRange(c.$to),b=m&&ao(m);if(b!=null&&b>=e.depth)return t&&t(r.tr.lift(m,b).scrollIntoView()),!0;if(d&&ho(a,"start",!0)&&ho(n,"end")){let u=n,g=[];for(;g.push(u),!u.isTextblock;)u=u.lastChild;let f=a,x=1;for(;!f.isTextblock;f=f.firstChild)x++;if(u.canReplace(u.childCount,u.childCount,f.content)){if(t){let y=N.empty;for(let v=g.length-1;v>=0;v--)y=N.from(g[v].copy(y));let w=r.tr.step(new fe(e.pos-g.length,e.pos+a.nodeSize,e.pos+x,e.pos+a.nodeSize-x,new O(y,g.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function xc(r){return function(e,t){let o=e.selection,n=r<0?o.$from:o.$to,a=n.depth;for(;n.node(a).isInline;){if(!a)return!1;a--}return n.node(a).isTextblock?(t&&t(e.tr.setSelection(j.create(e.doc,r<0?n.start(a):n.end(a)))),!0):!1}}const Y1=xc(-1),X1=xc(1);function Q1(r,e=null){return function(t,o){let{$from:n,$to:a}=t.selection,s=n.blockRange(a),l=s&&Da(s,r,e);return l?(o&&o(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function fc(r,e=null){return function(t,o){let n=!1;for(let a=0;a<t.selection.ranges.length&&!n;a++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[a];t.doc.nodesBetween(s,l,(p,d)=>{if(n)return!1;if(!(!p.isTextblock||p.hasMarkup(r,e)))if(p.type==r)n=!0;else{let c=t.doc.resolve(d),m=c.index();n=c.parent.canReplaceWith(m,m+1,r)}})}if(!n)return!1;if(o){let a=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:p}}=t.selection.ranges[s];a.setBlockType(l,p,r,e)}o(a.scrollIntoView())}return!0}}function gs(...r){return function(e,t,o){for(let n=0;n<r.length;n++)if(r[n](e,t,o))return!0;return!1}}gs(cs,ac,lc),gs(cs,dc,cc),gs(mc,bc,uc,G1),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function Z1(r,e=null){return function(t,o){let{$from:n,$to:a}=t.selection,s=n.blockRange(a);if(!s)return!1;let l=o?t.tr:null;return $1(l,s,r,e)?(o&&o(l.scrollIntoView()),!0):!1}}function $1(r,e,t,o=null){let n=!1,a=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let p=s.resolve(e.start-2);a=new jn(p,p,e.depth),e.endIndex<e.parent.childCount&&(e=new jn(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),n=!0}let l=Da(a,t,o,e);return l?(r&&e5(r,e,l,n,t),!0):!1}function e5(r,e,t,o,n){let a=N.empty;for(let c=t.length-1;c>=0;c--)a=N.from(t[c].type.create(t[c].attrs,a));r.step(new fe(e.start-(o?2:0),e.end,e.start,e.end,new O(a,0,0),t.length,!0));let s=0;for(let c=0;c<t.length;c++)t[c].type==n&&(s=c+1);let l=t.length-s,p=e.start+t.length-(o?2:0),d=e.parent;for(let c=e.startIndex,m=e.endIndex,b=!0;c<m;c++,b=!1)!b&&It(r.doc,p,l)&&(r.split(p,l),p+=2*l),p+=d.child(c).nodeSize;return r}function t5(r){return function(e,t){let{$from:o,$to:n}=e.selection,a=o.blockRange(n,s=>s.childCount>0&&s.firstChild.type==r);return a?t?o.node(a.depth-1).type==r?r5(e,t,r,a):o5(e,t,a):!0:!1}}function r5(r,e,t,o){let n=r.tr,a=o.end,s=o.$to.end(o.depth);a<s&&(n.step(new fe(a-1,s,a,s,new O(N.from(t.create(null,o.parent.copy())),1,0),1,!0)),o=new jn(n.doc.resolve(o.$from.pos),n.doc.resolve(s),o.depth));const l=ao(o);if(l==null)return!1;n.lift(o,l);let p=n.doc.resolve(n.mapping.map(a,-1)-1);return nr(n.doc,p.pos)&&p.nodeBefore.type==p.nodeAfter.type&&n.join(p.pos),e(n.scrollIntoView()),!0}function o5(r,e,t){let o=r.tr,n=t.parent;for(let u=t.end,g=t.endIndex-1,f=t.startIndex;g>f;g--)u-=n.child(g).nodeSize,o.delete(u-1,u+1);let a=o.doc.resolve(t.start),s=a.nodeAfter;if(o.mapping.map(t.end)!=t.start+a.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,p=t.endIndex==n.childCount,d=a.node(-1),c=a.index(-1);if(!d.canReplace(c+(l?0:1),c+1,s.content.append(p?N.empty:N.from(n))))return!1;let m=a.pos,b=m+s.nodeSize;return o.step(new fe(m-(l?1:0),b+(p?1:0),m+1,b-1,new O((l?N.empty:N.from(n.copy(N.empty))).append(p?N.empty:N.from(n.copy(N.empty))),l?0:1,p?0:1),l?0:1)),e(o.scrollIntoView()),!0}function n5(r){return function(e,t){let{$from:o,$to:n}=e.selection,a=o.blockRange(n,d=>d.childCount>0&&d.firstChild.type==r);if(!a)return!1;let s=a.startIndex;if(s==0)return!1;let l=a.parent,p=l.child(s-1);if(p.type!=r)return!1;if(t){let d=p.lastChild&&p.lastChild.type==l.type,c=N.from(d?r.create():null),m=new O(N.from(r.create(null,N.from(l.type.create(null,c)))),d?3:1,0),b=a.start,u=a.end;t(e.tr.step(new fe(b-(d?3:1),u,b,u,m,1,!0)).scrollIntoView())}return!0}}function si(r){const{state:e,transaction:t}=r;let{selection:o}=t,{doc:n}=t,{storedMarks:a}=t;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 a},get selection(){return o},get doc(){return n},get tr(){return o=t.selection,n=t.doc,a=t.storedMarks,t}}}class li{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:o}=this,{view:n}=t,{tr:a}=o,s=this.buildProps(a);return Object.fromEntries(Object.entries(e).map(([l,p])=>[l,(...c)=>{const m=p(...c)(s);return!a.getMeta("preventDispatch")&&!this.hasCustomState&&n.dispatch(a),m}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:o,editor:n,state:a}=this,{view:s}=n,l=[],p=!!e,d=e||a.tr,c=()=>(!p&&t&&!d.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(d),l.every(b=>b===!0)),m={...Object.fromEntries(Object.entries(o).map(([b,u])=>[b,(...f)=>{const x=this.buildProps(d,t),y=u(...f)(x);return l.push(y),m}])),run:c};return m}createCan(e){const{rawCommands:t,state:o}=this,n=!1,a=e||o.tr,s=this.buildProps(a,n);return{...Object.fromEntries(Object.entries(t).map(([p,d])=>[p,(...c)=>d(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(a,n)}}buildProps(e,t=!0){const{rawCommands:o,editor:n,state:a}=this,{view:s}=n,l={tr:e,editor:n,view:s,state:si({state:a,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(o).map(([p,d])=>[p,(...c)=>d(...c)(l)]))}};return l}}class i5{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const o=this.callbacks[e];return o&&o.forEach(n=>n.apply(this,t)),this}off(e,t){const o=this.callbacks[e];return o&&(t?this.callbacks[e]=o.filter(n=>n!==t):delete this.callbacks[e]),this}once(e,t){const o=(...n)=>{this.off(e,o),t.apply(this,n)};return this.on(e,o)}removeAllListeners(){this.callbacks={}}}function _(r,e,t){return r.config[e]===void 0&&r.parent?_(r.parent,e,t):typeof r.config[e]=="function"?r.config[e].bind({...t,parent:r.parent?_(r.parent,e,t):null}):r.config[e]}function pi(r){const e=r.filter(n=>n.type==="extension"),t=r.filter(n=>n.type==="node"),o=r.filter(n=>n.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:o}}function hc(r){const e=[],{nodeExtensions:t,markExtensions:o}=pi(r),n=[...t,...o],a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return r.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage,extensions:n},p=_(s,"addGlobalAttributes",l);if(!p)return;p().forEach(c=>{c.types.forEach(m=>{Object.entries(c.attributes).forEach(([b,u])=>{e.push({type:m,name:b,attribute:{...a,...u}})})})})}),n.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},p=_(s,"addAttributes",l);if(!p)return;const d=p();Object.entries(d).forEach(([c,m])=>{const b={...a,...m};typeof(b==null?void 0:b.default)=="function"&&(b.default=b.default()),b!=null&&b.isRequired&&(b==null?void 0:b.default)===void 0&&delete b.default,e.push({type:s.name,name:c,attribute:b})})}),e}function he(r,e){if(typeof r=="string"){if(!e.nodes[r])throw Error(`There is no node type named '${r}'. Maybe you forgot to add the extension?`);return e.nodes[r]}return r}function Te(...r){return r.filter(e=>!!e).reduce((e,t)=>{const o={...e};return Object.entries(t).forEach(([n,a])=>{if(!o[n]){o[n]=a;return}if(n==="class"){const l=a?String(a).split(" "):[],p=o[n]?o[n].split(" "):[],d=l.filter(c=>!p.includes(c));o[n]=[...p,...d].join(" ")}else if(n==="style"){const l=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],p=o[n]?o[n].split(";").map(c=>c.trim()).filter(Boolean):[],d=new Map;p.forEach(c=>{const[m,b]=c.split(":").map(u=>u.trim());d.set(m,b)}),l.forEach(c=>{const[m,b]=c.split(":").map(u=>u.trim());d.set(m,b)}),o[n]=Array.from(d.entries()).map(([c,m])=>`${c}: ${m}`).join("; ")}else o[n]=a}),o},{})}function xs(r,e){return e.filter(t=>t.type===r.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(r.attrs)||{}:{[t.name]:r.attrs[t.name]}).reduce((t,o)=>Te(t,o),{})}function yc(r){return typeof r=="function"}function K(r,e=void 0,...t){return yc(r)?e?r.bind(e)(...t):r(...t):r}function a5(r={}){return Object.keys(r).length===0&&r.constructor===Object}function s5(r){return typeof r!="string"?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):r==="true"?!0:r==="false"?!1:r}function wc(r,e){return"style"in r?r:{...r,getAttrs:t=>{const o=r.getAttrs?r.getAttrs(t):r.attrs;if(o===!1)return!1;const n=e.reduce((a,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(t):s5(t.getAttribute(s.name));return l==null?a:{...a,[s.name]:l}},{});return{...o,...n}}}}function vc(r){return Object.fromEntries(Object.entries(r).filter(([e,t])=>e==="attrs"&&a5(t)?!1:t!=null))}function l5(r,e){var t;const o=hc(r),{nodeExtensions:n,markExtensions:a}=pi(r),s=(t=n.find(d=>_(d,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(n.map(d=>{const c=o.filter(y=>y.type===d.name),m={name:d.name,options:d.options,storage:d.storage,editor:e},b=r.reduce((y,w)=>{const v=_(w,"extendNodeSchema",m);return{...y,...v?v(d):{}}},{}),u=vc({...b,content:K(_(d,"content",m)),marks:K(_(d,"marks",m)),group:K(_(d,"group",m)),inline:K(_(d,"inline",m)),atom:K(_(d,"atom",m)),selectable:K(_(d,"selectable",m)),draggable:K(_(d,"draggable",m)),code:K(_(d,"code",m)),whitespace:K(_(d,"whitespace",m)),linebreakReplacement:K(_(d,"linebreakReplacement",m)),defining:K(_(d,"defining",m)),isolating:K(_(d,"isolating",m)),attrs:Object.fromEntries(c.map(y=>{var w;return[y.name,{default:(w=y==null?void 0:y.attribute)===null||w===void 0?void 0:w.default}]}))}),g=K(_(d,"parseHTML",m));g&&(u.parseDOM=g.map(y=>wc(y,c)));const f=_(d,"renderHTML",m);f&&(u.toDOM=y=>f({node:y,HTMLAttributes:xs(y,c)}));const x=_(d,"renderText",m);return x&&(u.toText=x),[d.name,u]})),p=Object.fromEntries(a.map(d=>{const c=o.filter(x=>x.type===d.name),m={name:d.name,options:d.options,storage:d.storage,editor:e},b=r.reduce((x,y)=>{const w=_(y,"extendMarkSchema",m);return{...x,...w?w(d):{}}},{}),u=vc({...b,inclusive:K(_(d,"inclusive",m)),excludes:K(_(d,"excludes",m)),group:K(_(d,"group",m)),spanning:K(_(d,"spanning",m)),code:K(_(d,"code",m)),attrs:Object.fromEntries(c.map(x=>{var y;return[x.name,{default:(y=x==null?void 0:x.attribute)===null||y===void 0?void 0:y.default}]}))}),g=K(_(d,"parseHTML",m));g&&(u.parseDOM=g.map(x=>wc(x,c)));const f=_(d,"renderHTML",m);return f&&(u.toDOM=x=>f({mark:x,HTMLAttributes:xs(x,c)})),[d.name,u]}));return new cp({topNode:s,nodes:l,marks:p})}function fs(r,e){return e.nodes[r]||e.marks[r]||null}function kc(r,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===r.name):e}function hs(r,e){const t=Dr.fromSchema(e).serializeFragment(r),n=document.implementation.createHTMLDocument().createElement("div");return n.appendChild(t),n.innerHTML}const p5=(r,e=500)=>{let t="";const o=r.parentOffset;return r.parent.nodesBetween(Math.max(0,o-e),o,(n,a,s,l)=>{var p,d;const c=((d=(p=n.type.spec).toText)===null||d===void 0?void 0:d.call(p,{node:n,pos:a,parent:s,index:l}))||n.textContent||"%leaf%";t+=n.isAtom&&!n.isText?c:c.slice(0,Math.max(0,o-a))}),t};function ys(r){return Object.prototype.toString.call(r)==="[object RegExp]"}class di{constructor(e){this.find=e.find,this.handler=e.handler}}const d5=(r,e)=>{if(ys(e))return e.exec(r);const t=e(r);if(!t)return null;const o=[t.text];return o.index=t.index,o.input=r,o.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),o.push(t.replaceWith)),o};function ci(r){var e;const{editor:t,from:o,to:n,text:a,rules:s,plugin:l}=r,{view:p}=t;if(p.composing)return!1;const d=p.state.doc.resolve(o);if(d.parent.type.spec.code||!((e=d.nodeBefore||d.nodeAfter)===null||e===void 0)&&e.marks.find(b=>b.type.spec.code))return!1;let c=!1;const m=p5(d)+a;return s.forEach(b=>{if(c)return;const u=d5(m,b.find);if(!u)return;const g=p.state.tr,f=si({state:p.state,transaction:g}),x={from:o-(u[0].length-a.length),to:n},{commands:y,chain:w,can:v}=new li({editor:t,state:f});b.handler({state:f,range:x,match:u,commands:y,chain:w,can:v})===null||!g.steps.length||(g.setMeta(l,{transform:g,from:o,to:n,text:a}),p.dispatch(g),c=!0)}),c}function c5(r){const{editor:e,rules:t}=r,o=new me({state:{init(){return null},apply(n,a,s){const l=n.getMeta(o);if(l)return l;const p=n.getMeta("applyInputRules");return!!p&&setTimeout(()=>{let{text:c}=p;typeof c=="string"?c=c:c=hs(N.from(c),s.schema);const{from:m}=p,b=m+c.length;ci({editor:e,from:m,to:b,text:c,rules:t,plugin:o})}),n.selectionSet||n.docChanged?null:a}},props:{handleTextInput(n,a,s,l){return ci({editor:e,from:a,to:s,text:l,rules:t,plugin:o})},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:a}=n.state.selection;a&&ci({editor:e,from:a.pos,to:a.pos,text:"",rules:t,plugin:o})}),!1)},handleKeyDown(n,a){if(a.key!=="Enter")return!1;const{$cursor:s}=n.state.selection;return s?ci({editor:e,from:s.pos,to:s.pos,text:`
17
- `,rules:t,plugin:o}):!1}},isInputRules:!0});return o}function m5(r){return Object.prototype.toString.call(r).slice(8,-1)}function mi(r){return m5(r)!=="Object"?!1:r.constructor===Object&&Object.getPrototypeOf(r)===Object.prototype}function bi(r,e){const t={...r};return mi(r)&&mi(e)&&Object.keys(e).forEach(o=>{mi(e[o])&&mi(r[o])?t[o]=bi(r[o],e[o]):t[o]=e[o]}),t}class Ft{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=K(_(this,"addOptions",{name:this.name}))),this.storage=K(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ft(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Ft(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=K(_(t,"addOptions",{name:t.name})),t.storage=K(_(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:o}=e.state,n=e.state.selection.$from;if(n.pos===n.end()){const s=n.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===t.name))return!1;const p=s.find(d=>(d==null?void 0:d.type.name)===t.name);return p&&o.removeStoredMark(p),o.insertText(" ",n.pos),e.view.dispatch(o),!0}return!1}}function b5(r){return typeof r=="number"}class u5{constructor(e){this.find=e.find,this.handler=e.handler}}const g5=(r,e,t)=>{if(ys(e))return[...r.matchAll(e)];const o=e(r,t);return o?o.map(n=>{const a=[n.text];return a.index=n.index,a.input=r,a.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),a.push(n.replaceWith)),a}):[]};function x5(r){const{editor:e,state:t,from:o,to:n,rule:a,pasteEvent:s,dropEvent:l}=r,{commands:p,chain:d,can:c}=new li({editor:e,state:t}),m=[];return t.doc.nodesBetween(o,n,(u,g)=>{if(!u.isTextblock||u.type.spec.code)return;const f=Math.max(o,g),x=Math.min(n,g+u.content.size),y=u.textBetween(f-g,x-g,void 0,"");g5(y,a.find,s).forEach(v=>{if(v.index===void 0)return;const h=f+v.index+1,S=h+v[0].length,k={from:t.tr.mapping.map(h),to:t.tr.mapping.map(S)},C=a.handler({state:t,range:k,match:v,commands:p,chain:d,can:c,pasteEvent:s,dropEvent:l});m.push(C)})}),m.every(u=>u!==null)}let ui=null;const f5=r=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",r),t};function h5(r){const{editor:e,rules:t}=r;let o=null,n=!1,a=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const p=({state:c,from:m,to:b,rule:u,pasteEvt:g})=>{const f=c.tr,x=si({state:c,transaction:f});if(!(!x5({editor:e,state:x,from:Math.max(m-1,0),to:b.b-1,rule:u,pasteEvent:g,dropEvent:l})||!f.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,f}};return t.map(c=>new me({view(m){const b=g=>{var f;o=!((f=m.dom.parentElement)===null||f===void 0)&&f.contains(g.target)?m.dom.parentElement:null,o&&(ui=e)},u=()=>{ui&&(ui=null)};return window.addEventListener("dragstart",b),window.addEventListener("dragend",u),{destroy(){window.removeEventListener("dragstart",b),window.removeEventListener("dragend",u)}}},props:{handleDOMEvents:{drop:(m,b)=>{if(a=o===m.dom.parentElement,l=b,!a){const u=ui;u!=null&&u.isEditable&&setTimeout(()=>{const g=u.state.selection;g&&u.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(m,b)=>{var u;const g=(u=b.clipboardData)===null||u===void 0?void 0:u.getData("text/html");return s=b,n=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(m,b,u)=>{const g=m[0],f=g.getMeta("uiEvent")==="paste"&&!n,x=g.getMeta("uiEvent")==="drop"&&!a,y=g.getMeta("applyPasteRules"),w=!!y;if(!f&&!x&&!w)return;if(w){let{text:S}=y;typeof S=="string"?S=S:S=hs(N.from(S),u.schema);const{from:k}=y,C=k+S.length,L=f5(S);return p({rule:c,state:u,from:k,to:{b:C},pasteEvt:L})}const v=b.doc.content.findDiffStart(u.doc.content),h=b.doc.content.findDiffEnd(u.doc.content);if(!(!b5(v)||!h||v===h.b))return p({rule:c,state:u,from:v,to:h,pasteEvt:s})}}))}function y5(r){const e=r.filter((t,o)=>r.indexOf(t)!==o);return Array.from(new Set(e))}class yo{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=yo.resolve(e),this.schema=l5(this.extensions,t),this.setupExtensions()}static resolve(e){const t=yo.sort(yo.flatten(e)),o=y5(t.map(n=>n.name));return o.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${o.map(n=>`'${n}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const o={name:t.name,options:t.options,storage:t.storage},n=_(t,"addExtensions",o);return n?[t,...this.flatten(n())]:t}).flat(10)}static sort(e){return e.sort((o,n)=>{const a=_(o,"priority")||100,s=_(n,"priority")||100;return a>s?-1:a<s?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const o={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:fs(t.name,this.schema)},n=_(t,"addCommands",o);return n?{...e,...n()}:e},{})}get plugins(){const{editor:e}=this,t=yo.sort([...this.extensions].reverse()),o=[],n=[],a=t.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:fs(s.name,this.schema)},p=[],d=_(s,"addKeyboardShortcuts",l);let c={};if(s.type==="mark"&&_(s,"exitable",l)&&(c.ArrowRight=()=>Ft.handleExit({editor:e,mark:s})),d){const f=Object.fromEntries(Object.entries(d()).map(([x,y])=>[x,()=>y({editor:e})]));c={...c,...f}}const m=R1(c);p.push(m);const b=_(s,"addInputRules",l);kc(s,e.options.enableInputRules)&&b&&o.push(...b());const u=_(s,"addPasteRules",l);kc(s,e.options.enablePasteRules)&&u&&n.push(...u());const g=_(s,"addProseMirrorPlugins",l);if(g){const f=g();p.push(...f)}return p}).flat();return[c5({editor:e,rules:o}),...h5({editor:e,rules:n}),...a]}get attributes(){return hc(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=pi(this.extensions);return Object.fromEntries(t.filter(o=>!!_(o,"addNodeView")).map(o=>{const n=this.attributes.filter(p=>p.type===o.name),a={name:o.name,options:o.options,storage:o.storage,editor:e,type:he(o.name,this.schema)},s=_(o,"addNodeView",a);if(!s)return[];const l=(p,d,c,m,b)=>{const u=xs(p,n);return s()({node:p,view:d,getPos:c,decorations:m,innerDecorations:b,editor:e,extension:o,HTMLAttributes:u})};return[o.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const o={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:fs(e.name,this.schema)};e.type==="mark"&&(!((t=K(_(e,"keepOnSplit",o)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const n=_(e,"onBeforeCreate",o),a=_(e,"onCreate",o),s=_(e,"onUpdate",o),l=_(e,"onSelectionUpdate",o),p=_(e,"onTransaction",o),d=_(e,"onFocus",o),c=_(e,"onBlur",o),m=_(e,"onDestroy",o);n&&this.editor.on("beforeCreate",n),a&&this.editor.on("create",a),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),p&&this.editor.on("transaction",p),d&&this.editor.on("focus",d),c&&this.editor.on("blur",c),m&&this.editor.on("destroy",m)})}}class Me{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=K(_(this,"addOptions",{name:this.name}))),this.storage=K(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Me(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Me({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=K(_(t,"addOptions",{name:t.name})),t.storage=K(_(t,"addStorage",{name:t.name,options:t.options})),t}}function Sc(r,e,t){const{from:o,to:n}=e,{blockSeparator:a=`
18
-
19
- `,textSerializers:s={}}=t||{};let l="";return r.nodesBetween(o,n,(p,d,c,m)=>{var b;p.isBlock&&d>o&&(l+=a);const u=s==null?void 0:s[p.type.name];if(u)return c&&(l+=u({node:p,pos:d,parent:c,index:m,range:e})),!1;p.isText&&(l+=(b=p==null?void 0:p.text)===null||b===void 0?void 0:b.slice(Math.max(o,d)-d,n-d))}),l}function ws(r){return Object.fromEntries(Object.entries(r.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const w5=Me.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new me({key:new Ie("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:r}=this,{state:e,schema:t}=r,{doc:o,selection:n}=e,{ranges:a}=n,s=Math.min(...a.map(c=>c.$from.pos)),l=Math.max(...a.map(c=>c.$to.pos)),p=ws(t);return Sc(o,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:p})}}})]}}),v5=()=>({editor:r,view:e})=>(requestAnimationFrame(()=>{var t;r.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),k5=(r=!1)=>({commands:e})=>e.setContent("",r),S5=()=>({state:r,tr:e,dispatch:t})=>{const{selection:o}=e,{ranges:n}=o;return t&&n.forEach(({$from:a,$to:s})=>{r.doc.nodesBetween(a.pos,s.pos,(l,p)=>{if(l.type.isText)return;const{doc:d,mapping:c}=e,m=d.resolve(c.map(p)),b=d.resolve(c.map(p+l.nodeSize)),u=m.blockRange(b);if(!u)return;const g=ao(u);if(l.type.isTextblock){const{defaultType:f}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(u.start,f)}(g||g===0)&&e.lift(u,g)})}),!0},C5=r=>e=>r(e),E5=()=>({state:r,dispatch:e})=>bc(r,e),T5=(r,e)=>({editor:t,tr:o})=>{const{state:n}=t,a=n.doc.slice(r.from,r.to);o.deleteRange(r.from,r.to);const s=o.mapping.map(e);return o.insert(s,a.content),o.setSelection(new j(o.doc.resolve(Math.max(s-1,0)))),!0},M5=()=>({tr:r,dispatch:e})=>{const{selection:t}=r,o=t.$anchor.node();if(o.content.size>0)return!1;const n=r.selection.$anchor;for(let a=n.depth;a>0;a-=1)if(n.node(a).type===o.type){if(e){const l=n.before(a),p=n.after(a);r.delete(l,p).scrollIntoView()}return!0}return!1},B5=r=>({tr:e,state:t,dispatch:o})=>{const n=he(r,t.schema),a=e.selection.$anchor;for(let s=a.depth;s>0;s-=1)if(a.node(s).type===n){if(o){const p=a.before(s),d=a.after(s);e.delete(p,d).scrollIntoView()}return!0}return!1},N5=r=>({tr:e,dispatch:t})=>{const{from:o,to:n}=r;return t&&e.delete(o,n),!0},P5=()=>({state:r,dispatch:e})=>cs(r,e),D5=()=>({commands:r})=>r.keyboardShortcut("Enter"),L5=()=>({state:r,dispatch:e})=>W1(r,e);function gi(r,e,t={strict:!0}){const o=Object.keys(e);return o.length?o.every(n=>t.strict?e[n]===r[n]:ys(e[n])?e[n].test(r[n]):e[n]===r[n]):!0}function Cc(r,e,t={}){return r.find(o=>o.type===e&&gi(Object.fromEntries(Object.keys(t).map(n=>[n,o.attrs[n]])),t))}function Ec(r,e,t={}){return!!Cc(r,e,t)}function vs(r,e,t){var o;if(!r||!e)return;let n=r.parent.childAfter(r.parentOffset);if((!n.node||!n.node.marks.some(c=>c.type===e))&&(n=r.parent.childBefore(r.parentOffset)),!n.node||!n.node.marks.some(c=>c.type===e)||(t=t||((o=n.node.marks[0])===null||o===void 0?void 0:o.attrs),!Cc([...n.node.marks],e,t)))return;let s=n.index,l=r.start()+n.offset,p=s+1,d=l+n.node.nodeSize;for(;s>0&&Ec([...r.parent.child(s-1).marks],e,t);)s-=1,l-=r.parent.child(s).nodeSize;for(;p<r.parent.childCount&&Ec([...r.parent.child(p).marks],e,t);)d+=r.parent.child(p).nodeSize,p+=1;return{from:l,to:d}}function ur(r,e){if(typeof r=="string"){if(!e.marks[r])throw Error(`There is no mark type named '${r}'. Maybe you forgot to add the extension?`);return e.marks[r]}return r}const A5=(r,e={})=>({tr:t,state:o,dispatch:n})=>{const a=ur(r,o.schema),{doc:s,selection:l}=t,{$from:p,from:d,to:c}=l;if(n){const m=vs(p,a,e);if(m&&m.from<=d&&m.to>=c){const b=j.create(s,m.from,m.to);t.setSelection(b)}}return!0},O5=r=>e=>{const t=typeof r=="function"?r(e):r;for(let o=0;o<t.length;o+=1)if(t[o](e))return!0;return!1};function ks(r){return r instanceof j}function jt(r=0,e=0,t=0){return Math.min(Math.max(r,e),t)}function Tc(r,e=null){if(!e)return null;const t=W.atStart(r),o=W.atEnd(r);if(e==="start"||e===!0)return t;if(e==="end")return o;const n=t.from,a=o.to;return e==="all"?j.create(r,jt(0,n,a),jt(r.content.size,n,a)):j.create(r,jt(e,n,a),jt(e,n,a))}function V5(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Ss(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const I5=(r=null,e={})=>({editor:t,view:o,tr:n,dispatch:a})=>{e={scrollIntoView:!0,...e};const s=()=>{(Ss()||V5())&&o.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(o.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(o.hasFocus()&&r===null||r===!1)return!0;if(a&&r===null&&!ks(t.state.selection))return s(),!0;const l=Tc(n.doc,r)||t.state.selection,p=t.state.selection.eq(l);return a&&(p||n.setSelection(l),p&&n.storedMarks&&n.setStoredMarks(n.storedMarks),s()),!0},_5=(r,e)=>t=>r.every((o,n)=>e(o,{...t,index:n})),R5=(r,e)=>({tr:t,commands:o})=>o.insertContentAt({from:t.selection.from,to:t.selection.to},r,e),Mc=r=>{const e=r.childNodes;for(let t=e.length-1;t>=0;t-=1){const o=e[t];o.nodeType===3&&o.nodeValue&&/^(\n\s\s|\n)$/.test(o.nodeValue)?r.removeChild(o):o.nodeType===1&&Mc(o)}return r};function xi(r){const e=`<body>${r}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return Mc(t)}function tn(r,e,t){if(r instanceof tr||r instanceof N)return r;t={slice:!0,parseOptions:{},...t};const o=typeof r=="object"&&r!==null,n=typeof r=="string";if(o)try{if(Array.isArray(r)&&r.length>0)return N.fromArray(r.map(l=>e.nodeFromJSON(l)));const s=e.nodeFromJSON(r);return t.errorOnInvalidContent&&s.check(),s}catch(a){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return console.warn("[tiptap warn]: Invalid content.","Passed value:",r,"Error:",a),tn("",e,t)}if(n){if(t.errorOnInvalidContent){let s=!1,l="";const p=new cp({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(t.slice?Ro.fromSchema(p).parseSlice(xi(r),t.parseOptions):Ro.fromSchema(p).parse(xi(r),t.parseOptions),t.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const a=Ro.fromSchema(e);return t.slice?a.parseSlice(xi(r),t.parseOptions).content:a.parse(xi(r),t.parseOptions)}return tn("",e,t)}function H5(r,e,t){const o=r.steps.length-1;if(o<e)return;const n=r.steps[o];if(!(n instanceof xe||n instanceof fe))return;const a=r.mapping.maps[o];let s=0;a.forEach((l,p,d,c)=>{s===0&&(s=c)}),r.setSelection(W.near(r.doc.resolve(s),t))}const z5=r=>!("type"in r),F5=(r,e,t)=>({tr:o,dispatch:n,editor:a})=>{var s;if(n){t={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l;const p=x=>{a.emit("contentError",{editor:a,error:x,disableCollaboration:()=>{a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{tn(e,a.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(x){p(x)}try{l=tn(e,a.schema,{parseOptions:d,errorOnInvalidContent:(s=t.errorOnInvalidContent)!==null&&s!==void 0?s:a.options.enableContentCheck})}catch(x){return p(x),!1}let{from:c,to:m}=typeof r=="number"?{from:r,to:r}:{from:r.from,to:r.to},b=!0,u=!0;if((z5(l)?l:[l]).forEach(x=>{x.check(),b=b?x.isText&&x.marks.length===0:!1,u=u?x.isBlock:!1}),c===m&&u){const{parent:x}=o.doc.resolve(c);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(c-=1,m+=1)}let f;if(b){if(Array.isArray(e))f=e.map(x=>x.text||"").join("");else if(e instanceof N){let x="";e.forEach(y=>{y.text&&(x+=y.text)}),f=x}else typeof e=="object"&&e&&e.text?f=e.text:f=e;o.insertText(f,c,m)}else f=l,o.replaceWith(c,m,f);t.updateSelection&&H5(o,o.steps.length-1,-1),t.applyInputRules&&o.setMeta("applyInputRules",{from:c,text:f}),t.applyPasteRules&&o.setMeta("applyPasteRules",{from:c,text:f})}return!0},j5=()=>({state:r,dispatch:e})=>F1(r,e),q5=()=>({state:r,dispatch:e})=>j1(r,e),W5=()=>({state:r,dispatch:e})=>ac(r,e),U5=()=>({state:r,dispatch:e})=>dc(r,e),G5=()=>({state:r,dispatch:e,tr:t})=>{try{const o=Jn(r.doc,r.selection.$from.pos,-1);return o==null?!1:(t.join(o,2),e&&e(t),!0)}catch{return!1}},K5=()=>({state:r,dispatch:e,tr:t})=>{try{const o=Jn(r.doc,r.selection.$from.pos,1);return o==null?!1:(t.join(o,2),e&&e(t),!0)}catch{return!1}},J5=()=>({state:r,dispatch:e})=>H1(r,e),Y5=()=>({state:r,dispatch:e})=>z1(r,e);function Bc(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function X5(r){const e=r.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let o,n,a,s;for(let l=0;l<e.length-1;l+=1){const p=e[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))o=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))a=!0;else if(/^mod$/i.test(p))Ss()||Bc()?s=!0:n=!0;else throw new Error(`Unrecognized modifier name: ${p}`)}return o&&(t=`Alt-${t}`),n&&(t=`Ctrl-${t}`),s&&(t=`Meta-${t}`),a&&(t=`Shift-${t}`),t}const Q5=r=>({editor:e,view:t,tr:o,dispatch:n})=>{const a=X5(r).split(/-(?!$)/),s=a.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),p=e.captureTransaction(()=>{t.someProp("handleKeyDown",d=>d(t,l))});return p==null||p.steps.forEach(d=>{const c=d.map(o.mapping);c&&n&&o.maybeStep(c)}),!0};function rn(r,e,t={}){const{from:o,to:n,empty:a}=r.selection,s=e?he(e,r.schema):null,l=[];r.doc.nodesBetween(o,n,(m,b)=>{if(m.isText)return;const u=Math.max(o,b),g=Math.min(n,b+m.nodeSize);l.push({node:m,from:u,to:g})});const p=n-o,d=l.filter(m=>s?s.name===m.node.type.name:!0).filter(m=>gi(m.node.attrs,t,{strict:!1}));return a?!!d.length:d.reduce((m,b)=>m+b.to-b.from,0)>=p}const Z5=(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return rn(t,n,e)?q1(t,o):!1},$5=()=>({state:r,dispatch:e})=>uc(r,e),e3=r=>({state:e,dispatch:t})=>{const o=he(r,e.schema);return t5(o)(e,t)},t3=()=>({state:r,dispatch:e})=>mc(r,e);function fi(r,e){return e.nodes[r]?"node":e.marks[r]?"mark":null}function Nc(r,e){const t=typeof e=="string"?[e]:e;return Object.keys(r).reduce((o,n)=>(t.includes(n)||(o[n]=r[n]),o),{})}const r3=(r,e)=>({tr:t,state:o,dispatch:n})=>{let a=null,s=null;const l=fi(typeof r=="string"?r:r.name,o.schema);return l?(l==="node"&&(a=he(r,o.schema)),l==="mark"&&(s=ur(r,o.schema)),n&&t.selection.ranges.forEach(p=>{o.doc.nodesBetween(p.$from.pos,p.$to.pos,(d,c)=>{a&&a===d.type&&t.setNodeMarkup(c,void 0,Nc(d.attrs,e)),s&&d.marks.length&&d.marks.forEach(m=>{s===m.type&&t.addMark(c,c+d.nodeSize,s.create(Nc(m.attrs,e)))})})}),!0):!1},o3=()=>({tr:r,dispatch:e})=>(e&&r.scrollIntoView(),!0),n3=()=>({tr:r,dispatch:e})=>{if(e){const t=new Qe(r.doc);r.setSelection(t)}return!0},i3=()=>({state:r,dispatch:e})=>lc(r,e),a3=()=>({state:r,dispatch:e})=>cc(r,e),s3=()=>({state:r,dispatch:e})=>K1(r,e),l3=()=>({state:r,dispatch:e})=>X1(r,e),p3=()=>({state:r,dispatch:e})=>Y1(r,e);function Cs(r,e,t={},o={}){return tn(r,e,{slice:!1,parseOptions:t,errorOnInvalidContent:o.errorOnInvalidContent})}const d3=(r,e=!1,t={},o={})=>({editor:n,tr:a,dispatch:s,commands:l})=>{var p,d;const{doc:c}=a;if(t.preserveWhitespace!=="full"){const m=Cs(r,n.schema,t,{errorOnInvalidContent:(p=o.errorOnInvalidContent)!==null&&p!==void 0?p:n.options.enableContentCheck});return s&&a.replaceWith(0,c.content.size,m).setMeta("preventUpdate",!e),!0}return s&&a.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},r,{parseOptions:t,errorOnInvalidContent:(d=o.errorOnInvalidContent)!==null&&d!==void 0?d:n.options.enableContentCheck})};function Pc(r,e){const t=ur(e,r.schema),{from:o,to:n,empty:a}=r.selection,s=[];a?(r.storedMarks&&s.push(...r.storedMarks),s.push(...r.selection.$head.marks())):r.doc.nodesBetween(o,n,p=>{s.push(...p.marks)});const l=s.find(p=>p.type.name===t.name);return l?{...l.attrs}:{}}function c3(r,e){const t=new Ip(r);return e.forEach(o=>{o.steps.forEach(n=>{t.step(n)})}),t}function m3(r){for(let e=0;e<r.edgeCount;e+=1){const{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function b3(r,e,t){const o=[];return r.nodesBetween(e.from,e.to,(n,a)=>{t(n)&&o.push({node:n,pos:a})}),o}function u3(r,e){for(let t=r.depth;t>0;t-=1){const o=r.node(t);if(e(o))return{pos:t>0?r.before(t):0,start:r.start(t),depth:t,node:o}}}function Es(r){return e=>u3(e.$from,r)}function Dc(r,e){const t={from:0,to:r.content.size};return Sc(r,t,e)}function g3(r,e){const t=he(e,r.schema),{from:o,to:n}=r.selection,a=[];r.doc.nodesBetween(o,n,l=>{a.push(l)});const s=a.reverse().find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function Lc(r,e){const t=fi(typeof e=="string"?e:e.name,r.schema);return t==="node"?g3(r,e):t==="mark"?Pc(r,e):{}}function x3(r,e=JSON.stringify){const t={};return r.filter(o=>{const n=e(o);return Object.prototype.hasOwnProperty.call(t,n)?!1:t[n]=!0})}function f3(r){const e=x3(r);return e.length===1?e:e.filter((t,o)=>!e.filter((a,s)=>s!==o).some(a=>t.oldRange.from>=a.oldRange.from&&t.oldRange.to<=a.oldRange.to&&t.newRange.from>=a.newRange.from&&t.newRange.to<=a.newRange.to))}function h3(r){const{mapping:e,steps:t}=r,o=[];return e.maps.forEach((n,a)=>{const s=[];if(n.ranges.length)n.forEach((l,p)=>{s.push({from:l,to:p})});else{const{from:l,to:p}=t[a];if(l===void 0||p===void 0)return;s.push({from:l,to:p})}s.forEach(({from:l,to:p})=>{const d=e.slice(a).map(l,-1),c=e.slice(a).map(p),m=e.invert().map(d,-1),b=e.invert().map(c);o.push({oldRange:{from:m,to:b},newRange:{from:d,to:c}})})}),f3(o)}function Ts(r,e,t){const o=[];return r===e?t.resolve(r).marks().forEach(n=>{const a=t.resolve(r),s=vs(a,n.type);s&&o.push({mark:n,...s})}):t.nodesBetween(r,e,(n,a)=>{!n||(n==null?void 0:n.nodeSize)===void 0||o.push(...n.marks.map(s=>({from:a,to:a+n.nodeSize,mark:s})))}),o}function hi(r,e,t){return Object.fromEntries(Object.entries(t).filter(([o])=>{const n=r.find(a=>a.type===e&&a.name===o);return n?n.attribute.keepOnSplit:!1}))}function Ms(r,e,t={}){const{empty:o,ranges:n}=r.selection,a=e?ur(e,r.schema):null;if(o)return!!(r.storedMarks||r.selection.$from.marks()).filter(m=>a?a.name===m.type.name:!0).find(m=>gi(m.attrs,t,{strict:!1}));let s=0;const l=[];if(n.forEach(({$from:m,$to:b})=>{const u=m.pos,g=b.pos;r.doc.nodesBetween(u,g,(f,x)=>{if(!f.isText&&!f.marks.length)return;const y=Math.max(u,x),w=Math.min(g,x+f.nodeSize),v=w-y;s+=v,l.push(...f.marks.map(h=>({mark:h,from:y,to:w})))})}),s===0)return!1;const p=l.filter(m=>a?a.name===m.mark.type.name:!0).filter(m=>gi(m.mark.attrs,t,{strict:!1})).reduce((m,b)=>m+b.to-b.from,0),d=l.filter(m=>a?m.mark.type!==a&&m.mark.type.excludes(a):!0).reduce((m,b)=>m+b.to-b.from,0);return(p>0?p+d:p)>=s}function y3(r,e,t={}){if(!e)return rn(r,null,t)||Ms(r,null,t);const o=fi(e,r.schema);return o==="node"?rn(r,e,t):o==="mark"?Ms(r,e,t):!1}function Ac(r,e){const{nodeExtensions:t}=pi(e),o=t.find(s=>s.name===r);if(!o)return!1;const n={name:o.name,options:o.options,storage:o.storage},a=K(_(o,"group",n));return typeof a!="string"?!1:a.split(" ").includes("list")}function Bs(r,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var o;if(t){if(r.type.name==="hardBreak")return!0;if(r.isText)return/^\s*$/m.test((o=r.text)!==null&&o!==void 0?o:"")}if(r.isText)return!r.text;if(r.isAtom||r.isLeaf)return!1;if(r.content.childCount===0)return!0;if(e){let n=!0;return r.content.forEach(a=>{n!==!1&&(Bs(a,{ignoreWhitespace:t,checkChildren:e})||(n=!1))}),n}return!1}function Oc(r){return r instanceof H}function Vc(r,e,t){const n=r.state.doc.content.size,a=jt(e,0,n),s=jt(t,0,n),l=r.coordsAtPos(a),p=r.coordsAtPos(s,-1),d=Math.min(l.top,p.top),c=Math.max(l.bottom,p.bottom),m=Math.min(l.left,p.left),b=Math.max(l.right,p.right),u=b-m,g=c-d,y={top:d,bottom:c,left:m,right:b,width:u,height:g,x:m,y:d};return{...y,toJSON:()=>y}}function w3(r,e,t){var o;const{selection:n}=e;let a=null;if(ks(n)&&(a=n.$cursor),a){const l=(o=r.storedMarks)!==null&&o!==void 0?o:a.marks();return!!t.isInSet(l)||!l.some(p=>p.type.excludes(t))}const{ranges:s}=n;return s.some(({$from:l,$to:p})=>{let d=l.depth===0?r.doc.inlineContent&&r.doc.type.allowsMarkType(t):!1;return r.doc.nodesBetween(l.pos,p.pos,(c,m,b)=>{if(d)return!1;if(c.isInline){const u=!b||b.type.allowsMarkType(t),g=!!t.isInSet(c.marks)||!c.marks.some(f=>f.type.excludes(t));d=u&&g}return!d}),d})}const v3=(r,e={})=>({tr:t,state:o,dispatch:n})=>{const{selection:a}=t,{empty:s,ranges:l}=a,p=ur(r,o.schema);if(n)if(s){const d=Pc(o,p);t.addStoredMark(p.create({...d,...e}))}else l.forEach(d=>{const c=d.$from.pos,m=d.$to.pos;o.doc.nodesBetween(c,m,(b,u)=>{const g=Math.max(u,c),f=Math.min(u+b.nodeSize,m);b.marks.find(y=>y.type===p)?b.marks.forEach(y=>{p===y.type&&t.addMark(g,f,p.create({...y.attrs,...e}))}):t.addMark(g,f,p.create(e))})});return w3(o,t,p)},k3=(r,e)=>({tr:t})=>(t.setMeta(r,e),!0),S3=(r,e={})=>({state:t,dispatch:o,chain:n})=>{const a=he(r,t.schema);let s;return t.selection.$anchor.sameParent(t.selection.$head)&&(s=t.selection.$anchor.parent.attrs),a.isTextblock?n().command(({commands:l})=>fc(a,{...s,...e})(t)?!0:l.clearNodes()).command(({state:l})=>fc(a,{...s,...e})(l,o)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},C3=r=>({tr:e,dispatch:t})=>{if(t){const{doc:o}=e,n=jt(r,0,o.content.size),a=H.create(o,n);e.setSelection(a)}return!0},E3=r=>({tr:e,dispatch:t})=>{if(t){const{doc:o}=e,{from:n,to:a}=typeof r=="number"?{from:r,to:r}:r,s=j.atStart(o).from,l=j.atEnd(o).to,p=jt(n,s,l),d=jt(a,s,l),c=j.create(o,p,d);e.setSelection(c)}return!0},T3=r=>({state:e,dispatch:t})=>{const o=he(r,e.schema);return n5(o)(e,t)};function Ic(r,e){const t=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();if(t){const o=t.filter(n=>e==null?void 0:e.includes(n.type.name));r.tr.ensureMarks(o)}}const M3=({keepMarks:r=!0}={})=>({tr:e,state:t,dispatch:o,editor:n})=>{const{selection:a,doc:s}=e,{$from:l,$to:p}=a,d=n.extensionManager.attributes,c=hi(d,l.node().type.name,l.node().attrs);if(a instanceof H&&a.node.isBlock)return!l.parentOffset||!It(s,l.pos)?!1:(o&&(r&&Ic(t,n.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const m=p.parentOffset===p.parent.content.size,b=l.depth===0?void 0:m3(l.node(-1).contentMatchAt(l.indexAfter(-1)));let u=m&&b?[{type:b,attrs:c}]:void 0,g=It(e.doc,e.mapping.map(l.pos),1,u);if(!u&&!g&&It(e.doc,e.mapping.map(l.pos),1,b?[{type:b}]:void 0)&&(g=!0,u=b?[{type:b,attrs:c}]:void 0),o){if(g&&(a instanceof j&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,u),b&&!m&&!l.parentOffset&&l.parent.type!==b)){const f=e.mapping.map(l.before()),x=e.doc.resolve(f);l.node(-1).canReplaceWith(x.index(),x.index()+1,b)&&e.setNodeMarkup(e.mapping.map(l.before()),b)}r&&Ic(t,n.extensionManager.splittableMarks),e.scrollIntoView()}return g},B3=(r,e={})=>({tr:t,state:o,dispatch:n,editor:a})=>{var s;const l=he(r,o.schema),{$from:p,$to:d}=o.selection,c=o.selection.node;if(c&&c.isBlock||p.depth<2||!p.sameParent(d))return!1;const m=p.node(-1);if(m.type!==l)return!1;const b=a.extensionManager.attributes;if(p.parent.content.size===0&&p.node(-1).childCount===p.indexAfter(-1)){if(p.depth===2||p.node(-3).type!==l||p.index(-2)!==p.node(-2).childCount-1)return!1;if(n){let y=N.empty;const w=p.index(-1)?1:p.index(-2)?2:3;for(let L=p.depth-w;L>=p.depth-3;L-=1)y=N.from(p.node(L).copy(y));const v=p.indexAfter(-1)<p.node(-2).childCount?1:p.indexAfter(-2)<p.node(-3).childCount?2:3,h={...hi(b,p.node().type.name,p.node().attrs),...e},S=((s=l.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(h))||void 0;y=y.append(N.from(l.createAndFill(null,S)||void 0));const k=p.before(p.depth-(w-1));t.replace(k,p.after(-v),new O(y,4-w,0));let C=-1;t.doc.nodesBetween(k,t.doc.content.size,(L,V)=>{if(C>-1)return!1;L.isTextblock&&L.content.size===0&&(C=V+1)}),C>-1&&t.setSelection(j.near(t.doc.resolve(C))),t.scrollIntoView()}return!0}const u=d.pos===p.end()?m.contentMatchAt(0).defaultType:null,g={...hi(b,m.type.name,m.attrs),...e},f={...hi(b,p.node().type.name,p.node().attrs),...e};t.delete(p.pos,d.pos);const x=u?[{type:l,attrs:g},{type:u,attrs:f}]:[{type:l,attrs:g}];if(!It(t.doc,p.pos,2))return!1;if(n){const{selection:y,storedMarks:w}=o,{splittableMarks:v}=a.extensionManager,h=w||y.$to.parentOffset&&y.$from.marks();if(t.split(p.pos,2,x).scrollIntoView(),!h||!n)return!0;const S=h.filter(k=>v.includes(k.type.name));t.ensureMarks(S)}return!0},Ns=(r,e)=>{const t=Es(s=>s.type===e)(r.selection);if(!t)return!0;const o=r.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(o===void 0)return!0;const n=r.doc.nodeAt(o);return t.node.type===(n==null?void 0:n.type)&&nr(r.doc,t.pos)&&r.join(t.pos),!0},Ps=(r,e)=>{const t=Es(s=>s.type===e)(r.selection);if(!t)return!0;const o=r.doc.resolve(t.start).after(t.depth);if(o===void 0)return!0;const n=r.doc.nodeAt(o);return t.node.type===(n==null?void 0:n.type)&&nr(r.doc,o)&&r.join(o),!0};var N3=Object.freeze({__proto__:null,blur:v5,clearContent:k5,clearNodes:S5,command:C5,createParagraphNear:E5,cut:T5,deleteCurrentNode:M5,deleteNode:B5,deleteRange:N5,deleteSelection:P5,enter:D5,exitCode:L5,extendMarkRange:A5,first:O5,focus:I5,forEach:_5,insertContent:R5,insertContentAt:F5,joinBackward:W5,joinDown:q5,joinForward:U5,joinItemBackward:G5,joinItemForward:K5,joinTextblockBackward:J5,joinTextblockForward:Y5,joinUp:j5,keyboardShortcut:Q5,lift:Z5,liftEmptyBlock:$5,liftListItem:e3,newlineInCode:t3,resetAttributes:r3,scrollIntoView:o3,selectAll:n3,selectNodeBackward:i3,selectNodeForward:a3,selectParentNode:s3,selectTextblockEnd:l3,selectTextblockStart:p3,setContent:d3,setMark:v3,setMeta:k3,setNode:S3,setNodeSelection:C3,setTextSelection:E3,sinkListItem:T3,splitBlock:M3,splitListItem:B3,toggleList:(r,e,t,o={})=>({editor:n,tr:a,state:s,dispatch:l,chain:p,commands:d,can:c})=>{const{extensions:m,splittableMarks:b}=n.extensionManager,u=he(r,s.schema),g=he(e,s.schema),{selection:f,storedMarks:x}=s,{$from:y,$to:w}=f,v=y.blockRange(w),h=x||f.$to.parentOffset&&f.$from.marks();if(!v)return!1;const S=Es(k=>Ac(k.type.name,m))(f);if(v.depth>=1&&S&&v.depth-S.depth<=1){if(S.node.type===u)return d.liftListItem(g);if(Ac(S.node.type.name,m)&&u.validContent(S.node.content)&&l)return p().command(()=>(a.setNodeMarkup(S.pos,u),!0)).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run()}return!t||!h||!l?p().command(()=>c().wrapInList(u,o)?!0:d.clearNodes()).wrapInList(u,o).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run():p().command(()=>{const k=c().wrapInList(u,o),C=h.filter(L=>b.includes(L.type.name));return a.ensureMarks(C),k?!0:d.clearNodes()}).wrapInList(u,o).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run()},toggleMark:(r,e={},t={})=>({state:o,commands:n})=>{const{extendEmptyMarkRange:a=!1}=t,s=ur(r,o.schema);return Ms(o,s,e)?n.unsetMark(s,{extendEmptyMarkRange:a}):n.setMark(s,e)},toggleNode:(r,e,t={})=>({state:o,commands:n})=>{const a=he(r,o.schema),s=he(e,o.schema),l=rn(o,a,t);let p;return o.selection.$anchor.sameParent(o.selection.$head)&&(p=o.selection.$anchor.parent.attrs),l?n.setNode(s,p):n.setNode(a,{...p,...t})},toggleWrap:(r,e={})=>({state:t,commands:o})=>{const n=he(r,t.schema);return rn(t,n,e)?o.lift(n):o.wrapIn(n,e)},undoInputRule:()=>({state:r,dispatch:e})=>{const t=r.plugins;for(let o=0;o<t.length;o+=1){const n=t[o];let a;if(n.spec.isInputRules&&(a=n.getState(r))){if(e){const s=r.tr,l=a.transform;for(let p=l.steps.length-1;p>=0;p-=1)s.step(l.steps[p].invert(l.docs[p]));if(a.text){const p=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,r.schema.text(a.text,p))}else s.delete(a.from,a.to)}return!0}}return!1},unsetAllMarks:()=>({tr:r,dispatch:e})=>{const{selection:t}=r,{empty:o,ranges:n}=t;return o||e&&n.forEach(a=>{r.removeMark(a.$from.pos,a.$to.pos)}),!0},unsetMark:(r,e={})=>({tr:t,state:o,dispatch:n})=>{var a;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,p=ur(r,o.schema),{$from:d,empty:c,ranges:m}=l;if(!n)return!0;if(c&&s){let{from:b,to:u}=l;const g=(a=d.marks().find(x=>x.type===p))===null||a===void 0?void 0:a.attrs,f=vs(d,p,g);f&&(b=f.from,u=f.to),t.removeMark(b,u,p)}else m.forEach(b=>{t.removeMark(b.$from.pos,b.$to.pos,p)});return t.removeStoredMark(p),!0},updateAttributes:(r,e={})=>({tr:t,state:o,dispatch:n})=>{let a=null,s=null;const l=fi(typeof r=="string"?r:r.name,o.schema);return l?(l==="node"&&(a=he(r,o.schema)),l==="mark"&&(s=ur(r,o.schema)),n&&t.selection.ranges.forEach(p=>{const d=p.$from.pos,c=p.$to.pos;let m,b,u,g;t.selection.empty?o.doc.nodesBetween(d,c,(f,x)=>{a&&a===f.type&&(u=Math.max(x,d),g=Math.min(x+f.nodeSize,c),m=x,b=f)}):o.doc.nodesBetween(d,c,(f,x)=>{x<d&&a&&a===f.type&&(u=Math.max(x,d),g=Math.min(x+f.nodeSize,c),m=x,b=f),x>=d&&x<=c&&(a&&a===f.type&&t.setNodeMarkup(x,void 0,{...f.attrs,...e}),s&&f.marks.length&&f.marks.forEach(y=>{if(s===y.type){const w=Math.max(x,d),v=Math.min(x+f.nodeSize,c);t.addMark(w,v,s.create({...y.attrs,...e}))}}))}),b&&(m!==void 0&&t.setNodeMarkup(m,void 0,{...b.attrs,...e}),s&&b.marks.length&&b.marks.forEach(f=>{s===f.type&&t.addMark(u,g,s.create({...f.attrs,...e}))}))}),!0):!1},wrapIn:(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return Q1(n,e)(t,o)},wrapInList:(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return Z1(n,e)(t,o)}});const P3=Me.create({name:"commands",addCommands(){return{...N3}}}),D3=Me.create({name:"drop",addProseMirrorPlugins(){return[new me({key:new Ie("tiptapDrop"),props:{handleDrop:(r,e,t,o)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:o})}}})]}}),L3=Me.create({name:"editable",addProseMirrorPlugins(){return[new me({key:new Ie("editable"),props:{editable:()=>this.editor.options.editable}})]}}),A3=new Ie("focusEvents"),O3=Me.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:r}=this;return[new me({key:A3,props:{handleDOMEvents:{focus:(e,t)=>{r.isFocused=!0;const o=r.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(o),!1},blur:(e,t)=>{r.isFocused=!1;const o=r.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(o),!1}}}})]}}),V3=Me.create({name:"keymap",addKeyboardShortcuts(){const r=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:p,doc:d}=l,{empty:c,$anchor:m}=p,{pos:b,parent:u}=m,g=m.parent.isTextblock&&b>0?l.doc.resolve(b-1):m,f=g.parent.type.spec.isolating,x=m.pos-m.parentOffset,y=f&&g.parent.childCount===1?x===m.pos:W.atStart(d).from===b;return!c||!u.type.isTextblock||u.textContent.length||!y||y&&m.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()]),o={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:r,"Mod-Backspace":r,"Shift-Backspace":r,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},n={...o},a={...o,"Ctrl-h":r,"Alt-Backspace":r,"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 Ss()||Bc()?a:n},addProseMirrorPlugins(){return[new me({key:new Ie("clearDocument"),appendTransaction:(r,e,t)=>{if(r.some(f=>f.getMeta("composition")))return;const o=r.some(f=>f.docChanged)&&!e.doc.eq(t.doc),n=r.some(f=>f.getMeta("preventClearDocument"));if(!o||n)return;const{empty:a,from:s,to:l}=e.selection,p=W.atStart(e.doc).from,d=W.atEnd(e.doc).to;if(a||!(s===p&&l===d)||!Bs(t.doc))return;const b=t.tr,u=si({state:t,transaction:b}),{commands:g}=new li({editor:this.editor,state:u});if(g.clearNodes(),!!b.steps.length)return b}})]}}),I3=Me.create({name:"paste",addProseMirrorPlugins(){return[new me({key:new Ie("tiptapPaste"),props:{handlePaste:(r,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),_3=Me.create({name:"tabindex",addProseMirrorPlugins(){return[new me({key:new Ie("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class zr{get name(){return this.node.type.name}constructor(e,t,o=!1,n=null){this.currentNode=null,this.actualDepth=null,this.isBlock=o,this.resolvedPos=e,this.editor=t,this.currentNode=n}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!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,o=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}t=this.from+1,o=this.to-1}this.editor.commands.insertContentAt({from:t,to:o},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),t=this.resolvedPos.doc.resolve(e);return new zr(t,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 zr(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 zr(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,o)=>{const n=t.isBlock&&!t.isTextblock,a=t.isAtom&&!t.isText,s=this.pos+o+(a?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(s);if(!n&&l.depth<=this.depth)return;const p=new zr(l,this.editor,n,n?t:null);n&&(p.actualDepth=this.depth+1),e.push(new zr(l,this.editor,n,n?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let o=null,n=this.parent;for(;n&&!o;){if(n.node.type.name===e)if(Object.keys(t).length>0){const a=n.node.attrs,s=Object.keys(t);for(let l=0;l<s.length;l+=1){const p=s[l];if(a[p]!==t[p])break}}else o=n;n=n.parent}return o}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},o=!1){let n=[];if(!this.children||this.children.length===0)return n;const a=Object.keys(t);return this.children.forEach(s=>{o&&n.length>0||(s.node.type.name===e&&a.every(p=>t[p]===s.node.attrs[p])&&n.push(s),!(o&&n.length>0)&&(n=n.concat(s.querySelectorAll(e,t,o))))}),n}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const R3=`.ProseMirror {
7
+ </div>`}return!1}async applySelectedImage(e){this.pageBuilderStateStore.setApplyImageToSelection(e),this.getElement.value&&this.getApplyImageToSelection.value&&this.getApplyImageToSelection.value.src&&(await i.nextTick(),this.pageBuilderStateStore.setBasePrimaryImage(`${this.getApplyImageToSelection.value.src}`),await this.handleAutoSave())}setBasePrimaryImageFromSelectedElement(){if(!this.getElement.value)return;const e=document.createElement("div");e.innerHTML=this.getElement.value.outerHTML;const t=e.getElementsByTagName("img"),o=e.getElementsByTagName("div");if(t.length===1&&o.length===0){this.pageBuilderStateStore.setBasePrimaryImage(t[0].src);return}this.pageBuilderStateStore.setBasePrimaryImage(null)}addHyperlinkToElement(e,t,o){if(!this.getElement.value||!(this.getElement.value instanceof HTMLElement)||typeof this.getElement.value.closest!="function")return;const n=this.getElement.value.closest("a"),a=this.getElement.value.querySelector("a");this.pageBuilderStateStore.setHyperlinkError(null);const s=/^https?:\/\//,l=i.ref(!0);if(e===!0&&t!==null&&(l.value=s.test(t)),l.value===!1){this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyperlinkError("URL is not valid");return}if(e===!0&&typeof t=="string"){if(a!==null&&t.length!==0){a.href=t,o===!0&&(a.target="_blank"),o===!1&&a.removeAttribute("target"),a.textContent=this.getElement.value.textContent,this.pageBuilderStateStore.setHyperlinkMessage("Succesfully updated element hyperlink"),this.pageBuilderStateStore.setElementContainsHyperlink(!0);return}if(a===null&&t.length!==0&&n===null){const p=document.createElement("a");p.href=t,o===!0&&(p.target="_blank"),p.textContent=this.getElement.value.textContent,this.getElement.value.textContent="",this.getElement.value.appendChild(p),this.pageBuilderStateStore.setHyperlinkMessage("Successfully added hyperlink to element"),this.pageBuilderStateStore.setElementContainsHyperlink(!0);return}}if(e===!1&&t==="removeHyperlink"){const p=this.getElement.value.textContent||"",d=document.createTextNode(p);this.getElement.value.textContent="",this.getElement.value.appendChild(d),this.pageBuilderStateStore.setHyberlinkEnable(!1),this.pageBuilderStateStore.setElementContainsHyperlink(!1)}}checkForHyperlink(){if(!this.getElement.value)return;const e=this.getElement.value.querySelector("a");if(e!==null){this.pageBuilderStateStore.setHyberlinkEnable(!0),this.pageBuilderStateStore.setElementContainsHyperlink(!0),this.pageBuilderStateStore.setHyperlinkInput(e.href),this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyperlinkError(null),e.target==="_blank"&&this.pageBuilderStateStore.setOpenHyperlinkInNewTab(!0),e.target!=="_blank"&&this.pageBuilderStateStore.setOpenHyperlinkInNewTab(!1);return}this.pageBuilderStateStore.setElementContainsHyperlink(!1),this.pageBuilderStateStore.setHyperlinkInput(""),this.pageBuilderStateStore.setHyperlinkError(null),this.pageBuilderStateStore.setHyperlinkMessage(null),this.pageBuilderStateStore.setHyberlinkEnable(!1)}handleHyperlink(e,t,o){var s;if(this.pageBuilderStateStore.setHyperlinkAbility(!0),!this.getElement.value||!(this.getElement.value instanceof HTMLElement)||typeof this.getElement.value.closest!="function")return;this.getElement.value.closest("a")!==null&&this.pageBuilderStateStore.setHyperlinkAbility(!1);const a=(s=this.getElement.value)==null?void 0:s.tagName.toUpperCase();if(a!=="P"&&a!=="H1"&&a!=="H2"&&a!=="H3"&&a!=="H4"&&a!=="H5"&&a!=="H6"&&this.pageBuilderStateStore.setHyperlinkAbility(!1),e===void 0){this.checkForHyperlink();return}this.addHyperlinkToElement(e,t||null,o||!1)}async addTheme(e){e&&(this.validateMountingHTML(e),await this.mountComponentsToDOM(e)),await this.handleAutoSave()}async addComponent(e){try{const t=this.cloneCompObjForDOMInsertion({html_code:e.html_code,id:e.id,title:e.title});this.pageBuilderStateStore.setPushComponents({component:t,componentArrayAddMethod:this.getComponentArrayAddMethod.value?this.getComponentArrayAddMethod.value:"push"});const o=document.querySelector("#page-builder-wrapper");o&&this.getComponentArrayAddMethod.value==="push"&&o.scrollTo({top:o.scrollHeight+50,behavior:"smooth"}),await i.nextTick(),await this.addListenersToEditableElements(),await this.handleAutoSave()}catch(t){console.error("Error adding component:",t)}}addTailwindPrefixToClasses(e,t="pbx-"){return e.split(/\s+/).map(o=>{if(!o||o.startsWith(t))return o;const n=o.split(":"),a=n.pop();return a.startsWith(t)?o:[...n,t+a].join(":")}).join(" ")}convertStyleObjectToString(e){return e?typeof e=="string"?e:Object.entries(e).map(([t,o])=>`${t.replace(/([A-Z])/g,"-$1").toLowerCase()}: ${o};`).join(" "):""}parsePageBuilderHTML(e){const o=new DOMParser().parseFromString(e,"text/html");o.querySelectorAll("[class]").forEach(d=>{const c=d.getAttribute("class")||"",m=this.addTailwindPrefixToClasses(c);d.setAttribute("class",m)});const n=o.querySelector("#pagebuilder");let a={classes:"",style:{}};if(n){const d=n.getAttribute("style")||"";a={classes:n.className||"",style:this.parseStyleString(d)}}let s=o.querySelectorAll("section");n&&(s=n.querySelectorAll("section"));const l=Array.from(s).filter(d=>!d.parentElement||d.parentElement.tagName.toLowerCase()!=="section");let p=[];if(l.length>0&&(p=l.map(d=>({id:null,html_code:d.outerHTML.trim(),title:d.getAttribute("data-component-title")||"Untitled Component"}))),l.length===0){const d=n||o.body,c=Array.from(d.children);if(c.length>0&&(p=c.map(m=>{const b=o.createElement("section");return b.setAttribute("data-component-title","Untitled Component"),b.innerHTML=m.outerHTML.trim(),{id:null,html_code:b.outerHTML.trim(),title:"Untitled Component"}})),c.length===0){const m=o.createElement("section");m.setAttribute("data-component-title","Untitled Component"),m.innerHTML=d.innerHTML.trim(),p=[{id:null,html_code:m.outerHTML.trim(),title:"Untitled Component"}]}}return{components:p,pageSettings:a}}async applyModifiedHTML(e){if(!e||typeof e=="string"&&e.length===0)return"No HTML content was provided. Please ensure a valid HTML string is passed.";if(/<section[\s>]/i.test(e))return"Error: The <section> tag cannot be used as it is already included inside this component.";const t=document.createElement("div");t.innerHTML=e.trim();const o=t.firstElementChild;if(!o)return"Could not parse element from HTML string.";const n=this.pageBuilderStateStore.getElement;return n&&n.parentElement&&(n.replaceWith(o),this.pageBuilderStateStore.setElement(o)),await this.addListenersToEditableElements(),await i.nextTick(),null}validateMountingHTML(e,t){const o=e.trim(),n=e.match(/<section\b[^>]*>/gi)||[],a=e.match(/<\/section>/gi)||[];if(!e||e.trim().length===0){const p="No HTML content was provided. Please ensure a valid HTML string is passed.";return t&&t.logError&&console.error(p),p}if(n.length!==a.length){const p="Uneven <section> tags detected in the provided HTML. Each component must be wrapped in its own properly paired <section>...</section>. Ensure that all <section> tags have a matching closing </section> tag.";return t&&t.logError&&console.error(p),p}const s=document.createElement("div");if(s.innerHTML=o,s.querySelector("section section")){const p="Nested <section> tags are not allowed. Please ensure that no <section> is placed inside another <section>.";return t&&t.logError&&console.error(p),p}if(o.startsWith("[")||o.startsWith("{")){const p="Brackets [] or curly braces {} are not valid HTML. They are used for data formats like JSON.";return t&&t.logError&&console.error(p),p}return null}async applyModifiedComponents(e){const t=e.trim();if((e.match(/<section\b[^>]*>/gi)||[]).length===0)return"No <section> tags found. Each component must be wrapped in a <section> tag.";const n=this.validateMountingHTML(t);return n||(await this.mountComponentsToDOM(t),await this.addListenersToEditableElements(),await i.nextTick(),null)}async mountComponentsToDOM(e,t,o){var s,l;const n=e.trim();if(!this.validateMountingHTML(n,{logError:!0}))try{const d=new DOMParser().parseFromString(e,"text/html"),c=d.querySelector("#pagebuilder"),m=document.querySelector("#pagebuilder");let b=null;t&&(b=((s=this.pageBuilderStateStore.getPageBuilderConfig)==null?void 0:s.pageSettings)||null),!o&&!b&&c&&(b={classes:c.className||"",style:c.getAttribute("style")||""}),b||(b=((l=this.pageBuilderStateStore.getPageBuilderConfig)==null?void 0:l.pageSettings)||null),!o&&b&&m&&(m.removeAttribute("class"),m.removeAttribute("style"),m.className=b.classes||"",m.setAttribute("style",this.convertStyleObjectToString(b.style))),o&&m&&(m.removeAttribute("class"),m.removeAttribute("style"),m.className=o.classes||"",m.setAttribute("style",this.convertStyleObjectToString(o.style)));const u=d.querySelectorAll("section"),g=[];u.forEach(f=>{f.querySelectorAll("[class]").forEach(v=>{v.setAttribute("class",this.addTailwindPrefixToClasses(v.getAttribute("class")||"","pbx-"))});const x=f;x.hasAttribute("data-componentid")||x.setAttribute("data-componentid",Wl());const y=x.getAttribute("data-componentid"),w=x.getAttribute("data-component-title")||"Untitled Component";x.setAttribute("data-component-title",w),g.push({html_code:x.outerHTML,id:y,title:w})}),this.pageBuilderStateStore.setComponents(g),await this.clearHtmlSelection(),await i.nextTick(),await this.addListenersToEditableElements()}catch(p){console.error("Error parsing HTML components:",p),this.deleteAllComponentsFromDOM(),await this.clearHtmlSelection(),await i.nextTick(),await this.addListenersToEditableElements()}}updateLocalStorageItemName(){const e=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate.formType,t=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate&&this.pageBuilderStateStore.getPageBuilderConfig.updateOrCreate.formName,o=this.pageBuilderStateStore.getPageBuilderConfig&&this.pageBuilderStateStore.getPageBuilderConfig.resourceData;if(e==="create"){if(t&&t.length>0){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-create-resource-${this.sanitizeForLocalStorage(t)}`);return}this.pageBuilderStateStore.setLocalStorageItemName("page-builder-create-resource");return}if(e==="update"){if(typeof t=="string"&&t.length>0){if(o&&o!=null&&!o.title&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(o.title)}`);return}if(o&&o!=null&&!o.title&&typeof o.title!="string"&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(t)}-${this.sanitizeForLocalStorage(o.title)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}}if(!t||typeof t=="string"&&t.length===0){if(o&&o!=null&&!o.title&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName("page-builder-update-resource");return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(!o.id||typeof o.id=="string")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(o.title)}`);return}if(o&&o!=null&&!o.title&&typeof o.title!="string"&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(String(o.id))}`);return}if(o&&o!=null&&o.title&&typeof o.title=="string"&&o.title.length>0&&(o.id||typeof o.id=="number")){this.pageBuilderStateStore.setLocalStorageItemName(`page-builder-update-resource-${this.sanitizeForLocalStorage(o.title)}-${this.sanitizeForLocalStorage(String(o.id))}`);return}}}}async initializeElementStyles(){await i.nextTick(),this.setBasePrimaryImageFromSelectedElement(),this.handleHyperlink(void 0,null,!1),this.handleOpacity(void 0),this.handleBackgroundOpacity(void 0),this.handleBackgroundColor(void 0),this.handleTextColor(void 0),this.handleBorderStyle(void 0),this.handleBorderWidth(void 0),this.handleBorderColor(void 0),this.handleBorderRadiusGlobal(void 0),this.handleBorderRadiusTopLeft(void 0),this.handleBorderRadiusTopRight(void 0),this.handleBorderRadiusBottomleft(void 0),this.handleBorderRadiusBottomRight(void 0),this.handleFontSizeBase(void 0),this.handleFontSizeDesktop(void 0),this.handleFontSizeTablet(void 0),this.handleFontSizeMobile(void 0),this.handleFontWeight(void 0),this.handleFontFamily(void 0),this.handleFontStyle(void 0),this.handleVerticalPadding(void 0),this.handleHorizontalPadding(void 0),this.handleVerticalMargin(void 0),this.handleHorizontalMargin(void 0),await this.syncCurrentClasses(),await this.syncCurrentStyles()}}let _n=null;function Yw(r){_n||(_n=r)}function ie(){if(!_n)throw new Error("PageBuilder has not been initialized. Please call app.use(pageBuilder) in your main application file.");return _n}const Gl="حفظ",Kl="خيارات",Jl="الصورة الرمزية",Yl="نشر",Xl="إغلاق",Ql="مكون",Zl="أنماط",$l="الطباعة",ep="اختر",tp="الحشو",rp="الهامش",op="عالمي",np="محدد",ip="الحدود",ap="شفاف",sp="إضافة",lp="خاصية",pp="قيمة",dp="تحرير",cp="حذف",mp="معاينة",bp="جوال",up="غامق",gp="قائمة",xp="بحث",fp="أفقي",hp="عمودي",yp="مربع الشكل",wp="صور",vp="السابق",kp="التالي",Sp="معلومات",Cp="نص",Ep="رابط",Tp="أنواع",Mp="مصفوفة",Bp="المحتوى",Np="عنصر",Pp="مكون",Dp="الكل",Lp="صورة",Xw=Object.freeze(Object.defineProperty({__proto__:null,Add:sp,All:Dp,Bold:up,Border:ip,Close:Xl,Component:Pp,Content:Bp,Delete:cp,Editing:dp,Element:Np,Global:op,Image:Lp,Images:wp,Information:Sp,Landscape:fp,Link:Ep,List:gp,Margin:rp,Mobile:bp,Next:kp,Options:Kl,Padding:tp,Portrait:hp,Prev:vp,Preview:mp,Publish:Yl,Save:Gl,Search:xp,Select:ep,Specific:np,Squarish:yp,Styles:Zl,Text:Cp,Transparent:ap,Types:Tp,Typographies:$l,array:Mp,avatar:Jl,component:Ql,default:{"Reset Page":"إعادة تعيين الصفحة","Global Page Styles":"أنماط الصفحة العامة","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"جرب منشئ الصفحات القوي Click & Drop - المصمم للمطورين والمبدعين الذين يريدون التحكم الكامل دون عناء. قم بتخصيص التخطيطات والخطوط والألوان. قم بتحرير المحتوى بصريًا في الوقت الفعلي. أضف الوسائط، قم بتضمين مقاطع فيديو YouTube، أو قم بتصدير كل شيء كـ HTML نظيف. مع التحرير المتجاوب، الحفظ التلقائي المحلي، دعم Tailwind، وحتى تكامل Unsplash، إنه كل ما تحتاجه - ملفوف في منشئ واحد سلس. قم ببناء صفحات مذهلة في دقائق.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"منشئ صفحات مصمم للنمو. قم ببناء صفحات موقعك الإلكتروني باستخدام مكونات جاهزة قابلة للتخصيص بالكامل ومتجاوبة دائمًا، مصممة لتلبية كل احتياجاتك. منشئ صفحات قوي للتجار والعلامات التجارية والوكالات المتنامية.","Everything you need. Break free from design limitations":"كل ما تحتاجه. تحرر من قيود التصميم","Bring your vision to life and create impressive pages using a click & drop Page Builder":"حقق رؤيتك واصنع صفحات رائعة باستخدام منشئ الصفحات السحب والإفلات","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"منشئ الويب لصفحات مذهلة. يمكن المستخدمين من تصميم ونشر صفحات حديثة على أي نطاق. قم ببناء صفحات متجاوبة مثل القوائم، الوظائف أو منشورات المدونات وأدر المحتوى بسهولة باستخدام منشئ الصفحات السحب والإفلات المجاني. تم تطويره باستخدام TypeScript، Vue 3، Composition API، Pinia، CSS، Tailwind CSS و HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"قم بتنزيل أو تثبيت منشئ الصفحات المجاني Vue 3 القوي والمرن وسهل الاستخدام عبر",Save:Gl,"Add new Components":"إضافة مكونات جديدة",Options:Kl,"Config Overview":"نظرة عامة على التكوين","HTML Overview":"نظرة عامة على HTML","Delete Layout":"حذف التخطيط",avatar:Jl,Publish:Yl,"Add Components to Page":"إضافة مكونات إلى الصفحة",Close:Xl,"Helper Components":"مكونات المساعدة","Click to add":"انقر للإضافة",component:Ql,"Layout Components":"مكونات التخطيط","Click to add component":"انقر لإضافة مكون","Remove all Components":"إزالة جميع المكونات","Are you sure you want to remove all Components?":"هل أنت متأكد أنك تريد إزالة جميع المكونات؟",Styles:Zl,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"قم بتطبيق الأنماط التي تؤثر على الصفحة بأكملها. تتضمن هذه الإعدادات عائلة الخطوط العامة، ولون النص، ولون الخلفية، والأنماط العامة الأخرى التي تنطبق على جميع الأقسام.","Update Page Styles":"تحديث أنماط الصفحة","Download HTML":"تنزيل HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"قم بتصدير الصفحة بأكملها كملف HTML مستقل. يتضمن ذلك جميع الأقسام والمحتوى والأنماط المطبقة، مما يجعلها جاهزة للاستخدام أو التكامل في مكان آخر.","Download HTML file":"تنزيل ملف HTML",Typographies:$l,"Font Appearance":"مظهر الخط","Font Size":"حجم الخط",Select:ep,"Font tablet size":"حجم الخط للجهاز اللوحي","Font small screens":"حجم الخط للشاشات الصغيرة","Font weight":"وزن الخط","Font family":"عائلة الخط","Font Style":"نمط الخط","Opacity & Transparency":"الشفافية والعتامة",Padding:tp,"Vertical Padding":"الحشو العمودي","Horizontal Padding":"الحشو الأفقي",Margin:rp,"Vertical Margin":"الهامش العمودي","Horizontal Margin":"الهامش الأفقي","Border Radius":"نصف القطر الحدودي",Global:op,Specific:np,"Border Radius top left":"نصف القطر الحدودي العلوي الأيسر","Border Radius top right":"نصف القطر الحدودي العلوي الأيمن","Border Radius bottom left":"نصف القطر الحدودي السفلي الأيسر","Border Radius bottom right":"نصف القطر الحدودي السفلي الأيمن","Border Style, Width & Color":"نمط الحدود والعرض واللون",Border:ip,"Border Style":"نمط الحدود","Border Width":"عرض الحدود","Border Color":"لون الحدود",Transparent:ap,"Generated CSS":"CSS المُنشأ","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"هذا هو CSS الذي يطبقه المنشئ. أضف CSS الخاص بك واضغط Enter لتطبيقه على العنصر المحدد.","Add your CSS.":"أضف CSS الخاص بك.","The pbx- prefix is added automatically.":"يتم إضافة البادئة pbx- تلقائيًا.","Type class":"اكتب الفئة",Add:sp,"Inline Styles":"أنماط مضمنة","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"هذه هي الأنماط المضمنة التي يطبقها المنشئ. أضف أنماطك الخاصة واضغط على Enter لتطبيقها على العنصر المحدد.","Add your own style.":"أضف نمطك الخاص.",property:lp,value:pp,Editing:dp,"Loading...":"جار التحميل...","Background Color":"لون الخلفية","Text Color":"لون النص","Default black":"أسود افتراضي","Remove Component?":"إزالة المكون؟","Are you sure you want to remove this Component?":"هل أنت متأكد أنك تريد إزالة هذا المكون؟",Delete:cp,"Add to the bottom":"أضف إلى الأسفل",Preview:mp,Mobile:bp,"Demo Content":"معاينة","Demo Description":"تعرف على منشئ الصفحات الخفيف والمجاني Vue Click & Drop. قم بإنشاء وتعزيز التجارب الرقمية بسهولة باستخدام Vue. ليس كل شيء قوي يجب أن يكون معقدًا. يوفر هذا المنشئ البسيط والخفيف واجهة أنيقة وبديهية تركز على البساطة والسرعة. قم ببناء صفحات متجاوبة بالكامل مثل القوائم، لوحات الوظائف، أو منشورات المدونة - وأدر محتواك بسهولة باستخدام منشئ الصفحات المجاني Click & Drop.","Demo Description Two":"منشئ صفحات مصمم للنمو. قم ببناء صفحات موقعك الإلكتروني باستخدام مكونات جاهزة قابلة للتخصيص بالكامل ومتجاوبة دائمًا، مصممة لتلبية كل احتياجاتك. منشئ صفحات قوي للتجار والعلامات التجارية والوكالات المتنامية.","Demo Description Three":"منشئ مواقع الويب الذي يعشقه المصممون. يمكنك بسهولة تصميم وتخطيطات المعاينة والضبط لكل حجم شاشة. نظيف. سريع. بديهي. ليس كل شيء قوي يجب أن يبدو معقدًا.","Demo Description Four":"تأكد من أن موقعك يبدو رائعًا على جميع الأجهزة. قم بتحرير محتوى النص مباشرة وفي الوقت الفعلي. اختر الخطوط المثالية التي تناسب أسلوبك. جرب بثقة مع القدرة على التراجع عن التغييرات. أنماط مسبوقة. لا يوجد خطر من تعارض الأنماط بين المنشئ وتطبيقك.","Demo Title":"منشئ الويب لصفحات مذهلة","Demo Title Two":"فقط انشره مع Vue","Demo Title Three":"تحرير متجاوب","Edit text and links":"تحرير النصوص والروابط","Enter URL":"أدخل عنوان URL","Line break":"فاصل سطر",Bold:up,"Header 2":"عنوان 2","Header 3":"عنوان 3",List:gp,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"أضف عنوان URL صالحًا لتحويل النص المحدد إلى ارتباط تشعبي قابل للنقر يوجه المستخدمين إلى عنوان الويب المحدد.","Select image":"اختر صورة","Manage Content":"إدارة المحتوى","Media Library":"مكتبة الوسائط","Reset changes":"إعادة التغييرات","Do you want to reset this page?":"هل تريد إعادة تعيين هذه الصفحة؟","Are you sure you want to reset this page? This will overwrite your current changes.":"هل أنت متأكد أنك تريد إعادة تعيين هذه الصفحة؟ سيؤدي هذا إلى الكتابة فوق التغييرات الحالية.",Search:xp,"Search...":"ابحث...",Landscape:fp,Portrait:hp,Squarish:yp,"Total pages":"إجمالي الصفحات",Images:wp,"First page":"الصفحة الأولى",Prev:vp,Next:kp,"By:":"بواسطة:","We did not find any images. Make a new search.":"لم نجد أي صور. قم ببحث جديد.","No results on current page. Navigate to First Page.":"لا توجد نتائج في الصفحة الحالية. انتقل إلى الصفحة الأولى.",Information:Sp,"From:":"من:"," Select image":" اختر صورة","Layouts and visual.":"التخطيطات والمرئيات.","Start customizing by editing this default text directly in the editor.":"ابدأ التخصيص عن طريق تحرير هذا النص الافتراضي مباشرة في المحرر.","Single Image":"صورة واحدة","Two Vertical Images":"صورتان عموديتان","Two Square Images":"صورتان مربعتان","Three Square Images":"ثلاث صور مربعة","Six Square Images Grid":"شبكة من ست صور مربعة","Three Vertical Images":"ثلاث صور عمودية","Three Square Images With Text":"ثلاث صور مربعة مع نص","Two Square Images With Text":"صورتان مربعتان مع نص",Text:Cp,"Header H2":"رأس H2","Header H3":"رأس H3","YouTube Video":"فيديو يوتيوب","Break Divider":"فاصل",Link:Ep,"Selected HTML":"HTML المحدد","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"نظرة عامة على العنصر المحدد والمكون والمكونات. يوفر هذا القسم تحديثات في الوقت الفعلي بناءً على اختيار HTML الخاص بك.",Types:Tp,"Element type:":"نوع العنصر:","Component type:":"نوع المكون:","Components:":"المكونات:",array:Mp,Content:Bp,Element:Np,Component:Pp,"Components added":"تمت إضافة المكونات","No Element selected":"لم يتم تحديد عنصر","Selected HTML:":"HTML المحدد:","Element src:":"مصدر العنصر:","Element classes:":"فئات العنصر:","No Component selected":"لم يتم تحديد مكون","ID:":"المعرف:","Title:":"العنوان:","HTML Code:":"كود HTML:","No Components added yet":"لم تتم إضافة مكونات بعد",All:Dp,Image:Lp,"Image & Text":"صورة ونص","Four Square Images With Text":"أربع صور مربعة مع نص","Four Square Images":"أربع صور مربعة","Continue Your Work?":"أترغب في متابعة عملك؟","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"لاحظنا وجود بعض التغييرات التي لم تُحفظ في المرة السابقة. هل ترغب في المتابعة من حيث توقفت، أم استخدام الإصدار المُحمّل حاليًا من قاعدة البيانات؟","Use Saved Version":"استخدام النسخة المحفوظة","Continue Where I Left Off":"المتابعة من حيث توقفت","HTML Editor":"محرر HTML","Gain full control over components by editing the raw HTML.":"احصل على التحكم الكامل في المكونات عن طريق تحرير HTML الخام.","Large Screens Only":"الشاشات الكبيرة فقط"},property:lp,value:pp},Symbol.toStringTag,{value:"Module"})),Ap="Speichern",Op="Optionen",Vp="Avatar",Ip="Veröffentlichen",_p="Schließen",Rp="Komponente",Hp="Stile",zp="Typografien",Fp="Auswählen",jp="Abstand",qp="Rand",Wp="Global",Up="Spezifisch",Gp="Rand",Kp="Transparent",Jp="Hinzufügen",Yp="Eigenschaft",Xp="Wert",Qp="schließen",Zp="Bearbeiten",$p="Löschen",ed="Vorschau",td="Mobil",rd="Fett",od="Liste",nd="Suche",id="Querformat",ad="Hochformat",sd="Quadratisch",ld="Bilder",pd="Zurück",dd="Weiter",cd="Informationen",md="Text",bd="Link",ud="Typen",gd="Array",xd="Inhalt",fd="Element",hd="Komponente",yd="Alle",wd="Bild",Qw=Object.freeze(Object.defineProperty({__proto__:null,Add:Jp,All:yd,Bold:rd,Border:Gp,Close:_p,Component:hd,Content:xd,Delete:$p,Editing:Zp,Element:fd,Global:Wp,Image:wd,Images:ld,Information:cd,Landscape:id,Link:bd,List:od,Margin:qp,Mobile:td,Next:dd,Options:Op,Padding:jp,Portrait:ad,Prev:pd,Preview:ed,Publish:Ip,Save:Ap,Search:nd,Select:Fp,Specific:Up,Squarish:sd,Styles:Hp,Text:md,Transparent:Kp,Types:ud,Typographies:zp,array:gd,avatar:Vp,close:Qp,component:Rp,default:{"Reset Page":"Seite zurücksetzen","Global Page Styles":"Globale Seitenstile","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Probieren Sie den leistungsstarken Click & Drop Page Builder aus – entwickelt für Entwickler und Kreative, die volle Kontrolle ohne Aufwand wünschen. Passen Sie Layouts, Schriftarten und Farben an. Bearbeiten Sie Inhalte visuell in Echtzeit. Fügen Sie Medien hinzu, betten Sie YouTube-Videos ein oder exportieren Sie alles als sauberes HTML. Mit responsiver Bearbeitung, lokalem automatischen Speichern, Tailwind-Unterstützung und sogar Unsplash-Integration ist es alles, was Sie brauchen – verpackt in einem nahtlosen Builder. Erstellen Sie beeindruckende Seiten in Minuten.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Ein Seiten-Builder, der für Wachstum entwickelt wurde. Erstellen Sie Ihre Website-Seiten mit vorgefertigten Komponenten, die vollständig anpassbar und immer reaktionsschnell sind, um alle Anforderungen zu erfüllen. Ein leistungsstarker Seiten-Builder für wachsende Händler, Marken und Agenturen.","Everything you need. Break free from design limitations":"Alles, was Sie brauchen. Befreien Sie sich von Designbeschränkungen","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Verwirklichen Sie Ihre Vision und erstellen Sie beeindruckende Seiten mit einem Click & Drop Page Builder","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Der Web-Builder für atemberaubende Seiten. Ermöglichen Sie Benutzern, moderne Seiten in jeder Größenordnung zu entwerfen und zu veröffentlichen. Erstellen Sie responsive Seiten wie Listen, Jobs oder Blog-Posts und verwalten Sie Inhalte einfach mit dem kostenlosen Click & Drop Page Builder. Entwickelt mit TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS und HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Laden Sie den leistungsstarken, flexiblen und benutzerfreundlichen kostenlosen Vue 3 Page Builder herunter oder installieren Sie ihn über",Save:Ap,"Add new Components":"Neue Komponenten hinzufügen",Options:Op,"Config Overview":"Konfigurationsübersicht","HTML Overview":"HTML-Übersicht","Delete Layout":"Layout löschen",avatar:Vp,Publish:Ip,"Add Components to Page":"Komponenten zur Seite hinzufügen",Close:_p,"Helper Components":"Hilfskomponenten","Click to add":"Klicken, um hinzuzufügen",component:Rp,"Layout Components":"Layout-Komponenten","Click to add component":"Klicken, um Komponente hinzuzufügen","Remove all Components":"Alle Komponenten entfernen","Are you sure you want to remove all Components?":"Sind Sie sicher, dass Sie alle Komponenten entfernen möchten?",Styles:Hp,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Wenden Sie Stile an, die die gesamte Seite betreffen. Diese Einstellungen umfassen globale Schriftfamilie, Textfarbe, Hintergrundfarbe und andere universelle Stile, die auf alle Abschnitte angewendet werden.","Update Page Styles":"Seitenstile aktualisieren","Download HTML":"HTML herunterladen","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportieren Sie die gesamte Seite als eigenständige HTML-Datei. Dies umfasst alle Abschnitte, Inhalte und angewendeten Stile, sodass sie bereit für die Verwendung oder Integration an anderer Stelle ist.","Download HTML file":"HTML-Datei herunterladen",Typographies:zp,"Font Appearance":"Schriftbild","Font Size":"Schriftgröße",Select:Fp,"Font size":"Schriftgröße","Font tablet size":"Schriftgröße für Tablets","Font small screens":"Schriftgröße für kleine Bildschirme","Font weight":"Schriftgewicht","Font family":"Schriftfamilie","Font Style":"Schriftstil","Opacity & Transparency":"Deckkraft & Transparenz",Padding:jp,"Vertical Padding":"Vertikaler Abstand","Horizontal Padding":"Horizontaler Abstand",Margin:qp,"Vertical Margin":"Vertikaler Rand","Horizontal Margin":"Horizontaler Rand","Border Radius":"Randradius",Global:Wp,Specific:Up,"Border Radius top left":"Randradius oben links","Border Radius top right":"Randradius oben rechts","Border Radius bottom left":"Randradius unten links","Border Radius bottom right":"Randradius unten rechts","Border Style, Width & Color":"Randstil, Breite & Farbe",Border:Gp,"Border Style":"Randstil","Border Width":"Randbreite","Border Color":"Randfarbe",Transparent:Kp,"Generated CSS":"Generiertes CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Dies ist das vom Builder angewendete CSS. Fügen Sie Ihr eigenes CSS hinzu und drücken Sie Enter, um es auf das ausgewählte Element anzuwenden.","Add your CSS.":"Fügen Sie Ihr CSS hinzu.","The pbx- prefix is added automatically.":"Das pbx- Präfix wird automatisch hinzugefügt.","Type class":"Klasse eingeben",Add:Jp,"Inline Styles":"Inline-Stile","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Dies sind die vom Builder angewendeten Inline-Stile. Fügen Sie Ihre eigenen Stile hinzu und drücken Sie die Eingabetaste, um sie auf das ausgewählte Element anzuwenden.","Add your own style.":"Fügen Sie Ihren eigenen Stil hinzu.",property:Yp,value:Xp,close:Qp,Editing:Zp,"Loading...":"Wird geladen...","Background Color":"Hintergrundfarbe","Text Color":"Textfarbe","Default black":"Standard Schwarz","Remove Component?":"Komponente entfernen?","Are you sure you want to remove this Component?":"Sind Sie sicher, dass Sie diese Komponente entfernen möchten?",Delete:$p,"Add to the bottom":"Zum Ende hinzufügen",Preview:ed,Mobile:td,"Demo Content":"Demo-Inhalt","Demo Description":"Entdecken Sie den leichten und kostenlosen Vue Click & Drop Page Builder. Erstellen und verbessern Sie digitale Erlebnisse mühelos mit Vue. Nicht alles, was leistungsstark ist, muss komplex sein. Dieser minimalistische und leichte Page Builder bietet eine elegante, intuitive Oberfläche, die auf Einfachheit und Geschwindigkeit ausgelegt ist. Erstellen Sie vollständig responsive Seiten wie Listen, Jobbörsen oder Blogbeiträge – und verwalten Sie Ihre Inhalte mühelos mit dem kostenlosen Click & Drop Page Builder.","Demo Description Two":"Ein Seiten-Builder, der für Wachstum entwickelt wurde. Erstellen Sie Ihre Website-Seiten mit vorgefertigten Komponenten, die vollständig anpassbar und immer reaktionsschnell sind, um alle Anforderungen zu erfüllen. Ein leistungsstarker Seiten-Builder für wachsende Händler, Marken und Agenturen.","Demo Description Three":"Der Website-Builder, den Designer lieben. Entwerfen, prüfen und passen Sie Layouts für jede Bildschirmgröße einfach an. Sauber. Schnell. Intuitiv. Nicht alles, was leistungsstark ist, muss kompliziert aussehen.","Demo Description Four":"Stellen Sie sicher, dass Ihre Website auf allen Geräten gut aussieht. Bearbeiten Sie Textinhalte live und in Echtzeit. Wählen Sie die perfekten Schriftarten, die zu Ihrem Stil passen. Experimentieren Sie selbstbewusst mit der Möglichkeit, Änderungen rückgängig zu machen. Stile mit Präfix. Kein Risiko von Stilkonflikten zwischen dem Builder und Ihrer App.","Demo Title":"Der Web-Builder für atemberaubende Seiten","Demo Title Two":"Veröffentlichen Sie es einfach mit Vue","Demo Title Three":"Responsive Bearbeitung","Edit text and links":"Text und Links bearbeiten","Enter URL":"URL eingeben","Line break":"Zeilenumbruch",Bold:rd,"Header 2":"Überschrift 2","Header 3":"Überschrift 3",List:od,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Fügen Sie eine gültige URL hinzu, um den ausgewählten Text in einen anklickbaren Hyperlink zu verwandeln, der Benutzer zur angegebenen Webadresse führt.","Select image":"Bild auswählen","Manage Content":"Inhalte verwalten","Media Library":"Medienbibliothek","Reset changes":"Änderungen zurücksetzen","Do you want to reset this page?":"Möchten Sie diese Seite zurücksetzen?","Are you sure you want to reset this page? This will overwrite your current changes.":"Sind Sie sicher, dass Sie diese Seite zurücksetzen möchten? Dadurch werden Ihre aktuellen Änderungen überschrieben.",Search:nd,"Search...":"Suchen...",Landscape:id,Portrait:ad,Squarish:sd,"Total pages":"Gesamtseiten",Images:ld,"First page":"Erste Seite",Prev:pd,Next:dd,"By:":"Von:","We did not find any images. Make a new search.":"Wir haben keine Bilder gefunden. Machen Sie eine neue Suche.","No results on current page. Navigate to First Page.":"Keine Ergebnisse auf der aktuellen Seite. Zur ersten Seite navigieren.",Information:cd,"From:":"Von:"," Select image":" Bild auswählen","Layouts and visual.":"Layouts und visuell.","Start customizing by editing this default text directly in the editor.":"Beginnen Sie mit der Anpassung, indem Sie diesen Standardtext direkt im Editor bearbeiten.","Single Image":"Einzelnes Bild","Two Vertical Images":"Zwei vertikale Bilder","Two Square Images":"Zwei quadratische Bilder","Three Square Images":"Drei quadratische Bilder","Six Square Images Grid":"Sechs quadratische Bilder im Raster","Three Square Images With Text":"Drei quadratische Bilder mit Text","Three Vertical Images":"Zwei quadratische Bilder mit Text",Text:md,"Header H2":"Überschrift H2","Header H3":"Überschrift H3","YouTube Video":"YouTube-Video","Break Divider":"Trennlinie",Link:bd,"Selected HTML":"Ausgewähltes HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Übersicht über ausgewähltes Element, Komponente und Komponenten. Dieser Abschnitt bietet Echtzeit-Updates basierend auf Ihrer HTML-Auswahl.",Types:ud,"Element type:":"Elementtyp:","Component type:":"Komponententyp:","Components:":"Komponenten:",array:gd,Content:xd,Element:fd,Component:hd,"Components added":"Komponenten hinzugefügt","No Element selected":"Kein Element ausgewählt","Selected HTML:":"Ausgewähltes HTML:","Element src:":"Elementquelle:","Element classes:":"Elementklassen:","No Component selected":"Keine Komponente ausgewählt","ID:":"ID:","Title:":"Titel:","HTML Code:":"HTML-Code:","No Components added yet":"Noch keine Komponenten hinzugefügt",All:yd,Image:wd,"Image & Text":"Bild & Text","Four Square Images With Text":"Vier quadratische Bilder mit Text","Four Square Images":"Vier quadratische Bilder","Continue Your Work?":"Möchten Sie Ihre Arbeit fortsetzen?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Wir haben festgestellt, dass Sie beim letzten Mal einige Änderungen nicht gespeichert haben. Möchten Sie dort weitermachen, wo Sie aufgehört haben, oder die aktuell aus der Datenbank geladene Version verwenden?","Use Saved Version":"Gespeicherte Version verwenden","Continue Where I Left Off":"Dort weitermachen, wo ich aufgehört habe","HTML Editor":"HTML-Editor","Gain full control over components by editing the raw HTML.":"Erhalten Sie die vollständige Kontrolle über Komponenten, indem Sie das reine HTML bearbeiten.","Large Screens Only":"Nur große Bildschirme"},property:Yp,value:Xp},Symbol.toStringTag,{value:"Module"})),vd="Save",kd="Options",Sd="avatar",Cd="Publish",Ed="component",Td="Styles",Md="Typographies",Bd="Select",Nd="Padding",Pd="Margin",Dd="Global",Ld="Specific",Ad="Border",Od="Transparent",Vd="Add",Id="property",_d="value",Rd="Close",Hd="Editing",zd="Delete",Fd="Preview",jd="Mobile",qd="Bold",Wd="Link",Ud="List",Gd="Search",Kd="Landscape",Jd="Portrait",Yd="Squarish",Xd="Images",Qd="Prev",Zd="Next",$d="Information",ec="Text",tc="Types",rc="array",oc="Content",nc="Element",ic="Component",ac="All",sc="Image",Zw=Object.freeze(Object.defineProperty({__proto__:null,Add:Vd,All:ac,Bold:qd,Border:Ad,Close:Rd,Component:ic,Content:oc,Delete:zd,Editing:Hd,Element:nc,Global:Dd,Image:sc,Images:Xd,Information:$d,Landscape:Kd,Link:Wd,List:Ud,Margin:Pd,Mobile:jd,Next:Zd,Options:kd,Padding:Nd,Portrait:Jd,Prev:Qd,Preview:Fd,Publish:Cd,Save:vd,Search:Gd,Select:Bd,Specific:Ld,Squarish:Yd,Styles:Td,Text:ec,Transparent:Od,Types:tc,Typographies:Md,array:rc,avatar:Sd,component:Ed,default:{"Reset Page":"Reset Page","Global Page Styles":"Global Page Styles","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.","Everything you need. Break free from design limitations":"Everything you need. Break free from design limitations","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Bring your vision to life and create impressive pages using a click & drop Page Builder","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via",Save:vd,"Add new Components":"Add new Components",Options:kd,"Config Overview":"Config Overview","HTML Overview":"HTML Overview","Delete Layout":"Delete Layout",avatar:Sd,Publish:Cd,"Add Components to Page":"Add Components to Page","Helper Components":"Helper Components","Click to add":"Click to add",component:Ed,"Layout Components":"Layout Components","Click to add component":"Click to add component","Remove all Components":"Remove all Components","Are you sure you want to remove all Components?":"Are you sure you want to remove all Components?",Styles:Td,Typographies:Md,"Font Appearance":"Font Appearance","Font Size":"Font Size",Select:Bd,"Font size":"Font size","Font tablet size":"Font tablet size","Font small screens":"Font small screens","Font weight":"Font weight","Font family":"Font family","Font Style":"Font Style","Opacity & Transparency":"Opacity & Transparency",Padding:Nd,"Vertical Padding":"Vertical Padding","Horizontal Padding":"Horizontal Padding",Margin:Pd,"Vertical Margin":"Vertical Margin","Horizontal Margin":"Horizontal Margin","Border Radius":"Border Radius",Global:Dd,Specific:Ld,"Border Radius top left":"Border Radius top left","Border Radius top right":"Border Radius top right","Border Radius bottom left":"Border Radius bottom left","Border Radius bottom right":"Border Radius bottom right","Border Style, Width & Color":"Border Style, Width & Color",Border:Ad,"Border Style":"Border Style","Border Width":"Border Width","Border Color":"Border Color",Transparent:Od,"Generated CSS":"Generated CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.","Add your CSS.":"Add your CSS.","The pbx- prefix is added automatically.":"The pbx- prefix is added automatically.","Type class":"Type class",Add:Vd,"Inline Styles":"Inline Styles","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.","Add your own style.":"Add your own style.",property:Id,value:_d,Close:Rd,Editing:Hd,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.","Update Page Styles":"Update Page Styles","Download HTML":"Download HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.","Download HTML file":"Download HTML file","Loading...":"Loading...","Background Color":"Background Color","Text Color":"Text Color","Default black":"Default black","Remove Component?":"Remove Component?","Are you sure you want to remove this Component?":"Are you sure you want to remove this Component?",Delete:zd,"Add to the bottom":"Add to the bottom",Preview:Fd,Mobile:jd,"Demo Content":"Demo Content","Demo Title":"The web builder for stunning pages","Demo Title Two":"Just publish it with Vue","Demo Title Three":"Responsive Editing","Demo Description":"Introducing the Lightweight & Free Vue Click & Drop Page Builder Create and enhance digital experiences effortlessly with Vue. Not everything powerful needs to be complex. This minimalist and lightweight page builder offers an elegant, intuitive interface focused on simplicity and speed. Build fully responsive pages such as listings, job boards, or blog posts—and manage your content with ease using the free Click & Drop Page Builder.","Demo Description Two":"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.","Demo Description Three":"The website builder loved by designers. Easily design, preview, and adjust layouts for every screen size. Clean. Fast. Intuitive. Not everything powerful has to look complicated.","Demo Description Four":"Ensure your site looks great on all devices. Edit text content live and in real-time. Choose the perfect fonts to match your style. Experiment confidently with the ability to revert changes. Styles Prefixed. No risk of style conflicts between the builder and your app.","Edit text and links":"Edit text and links","Enter URL":"Enter URL","Line break":"Line break",Bold:qd,Link:Wd,"Header 2":"Header 2","Header 3":"Header 3",List:Ud,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.","Select image":"Select image","Manage Content":"Manage Content","Media Library":"Media Library","Reset changes":"Reset changes","Do you want to reset this page?":"Do you want to reset this page?","Are you sure you want to reset this page? This will overwrite your current changes.":"Are you sure you want to reset this page? This will overwrite your current changes.",Search:Gd,"Search...":"Search...",Landscape:Kd,Portrait:Jd,Squarish:Yd,"Total pages":"Total pages",Images:Xd,"First page":"First page",Prev:Qd,Next:Zd,"By:":"By:","We did not find any images. Make a new search.":"We did not find any images. Make a new search.","No results on current page. Navigate to First Page.":"No results on current page. Navigate to First Page.",Information:$d,"From:":"From:"," Select image":" Select image","Layouts and visual.":"Layouts and visual.","Start customizing by editing this default text directly in the editor.":"Start customizing by editing this default text directly in the editor.","Single Image":"Single Image","Two Vertical Images":"Two Vertical Images","Two Square Images":"Two Square Images","Two Square Images With Text":"Two Square Images With Text","Three Square Images":"Three Square Images","Six Square Images Grid":"Six Square Images Grid","Four Square Images With Text":"Four Square Images With Text","Three Square Images With Text":"Three Square Images With Text","Three Vertical Images":"Three Vertical Images",Text:ec,"Header H2":"Header H2","Header H3":"Header H3","YouTube Video":"YouTube Video","Break Divider":"Break Divider","Selected HTML":"Selected HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.",Types:tc,"Element type:":"Element type:","Component type:":"Component type:","Components:":"Components:",array:rc,Content:oc,Element:nc,Component:ic,"Components added":"Components added","No Element selected":"No Element selected","Selected HTML:":"Selected HTML:","Element src:":"Element src:","Element classes:":"Element classes:","No Component selected":"No Component selected","ID:":"ID:","Title:":"Title:","HTML Code:":"HTML Code:","No Components added yet":"No Components added yet",All:ac,Image:sc,"Image & Text":"Image & Text","Four Square Images":"Four Square Images","Continue Your Work?":"Continue Your Work?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?","Use Saved Version":"Use Saved Version","Continue Where I Left Off":"Continue Where I Left Off","HTML Editor":"HTML Editor","Gain full control over components by editing the raw HTML.":"Gain full control over components by editing the raw HTML.","Large Screens Only":"Large Screens Only"},property:Id,value:_d},Symbol.toStringTag,{value:"Module"})),lc="Guardar",pc="Opciones",dc="avatar",cc="Publicar",mc="Cerrar",bc="componente",uc="Estilos",gc="Tipografías",xc="Seleccionar",fc="Relleno",hc="Margen",yc="Global",wc="Específico",vc="Borde",kc="Transparente",Sc="Agregar",Cc="propiedad",Ec="valor",Tc="Editando",Mc="Eliminar",Bc="Vista previa",Nc="Móvil",Pc="Negrita",Dc="Lista",Lc="Buscar",Ac="Horizontal",Oc="Vertical",Vc="Cuadrado",Ic="Imágenes",_c="Anterior",Rc="Siguiente",Hc="Información",zc="Texto",Fc="Enlace",jc="Tipos",qc="matriz",Wc="Contenido",Uc="Elemento",Gc="Componente",Kc="Todos",Jc="Imagen",$w=Object.freeze(Object.defineProperty({__proto__:null,Add:Sc,All:Kc,Bold:Pc,Border:vc,Close:mc,Component:Gc,Content:Wc,Delete:Mc,Editing:Tc,Element:Uc,Global:yc,Image:Jc,Images:Ic,Information:Hc,Landscape:Ac,Link:Fc,List:Dc,Margin:hc,Mobile:Nc,Next:Rc,Options:pc,Padding:fc,Portrait:Oc,Prev:_c,Preview:Bc,Publish:cc,Save:lc,Search:Lc,Select:xc,Specific:wc,Squarish:Vc,Styles:uc,Text:zc,Transparent:kc,Types:jc,Typographies:gc,array:qc,avatar:dc,component:bc,default:{"Reset Page":"Restablecer página","Global Page Styles":"Estilos de página globales","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Pruebe el poderoso Click & Drop Page Builder, diseñado para desarrolladores y creadores que desean un control total sin complicaciones. Personalice diseños, fuentes y colores. Edite contenido visualmente en tiempo real. Agregue medios, incruste videos de YouTube o exporte todo como HTML limpio. Con edición receptiva, guardado automático local, soporte de Tailwind e incluso integración con Unsplash, es todo lo que necesita, envuelto en un constructor perfecto. Cree páginas impresionantes en minutos.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Un constructor de páginas diseñado para el crecimiento. Cree las páginas de su sitio web con componentes listos para usar que son totalmente personalizables y siempre receptivos, diseñados para satisfacer todas las necesidades. Un poderoso constructor de páginas para comerciantes, marcas y agencias en crecimiento.","Everything you need. Break free from design limitations":"Todo lo que necesitas. Libérate de las limitaciones de diseño","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Haz realidad tu visión y crea páginas impresionantes usando un constructor de páginas de arrastrar y soltar","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"El constructor web para páginas impresionantes. Permita a los usuarios diseñar y publicar páginas modernas a cualquier escala. Cree páginas receptivas como listados, trabajos o publicaciones de blog y gestione el contenido fácilmente utilizando el Page Builder gratuito de arrastrar y soltar. Desarrollado con TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS y HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Descargue o instale nuestro potente, flexible y fácil de usar constructor de páginas Vue 3 gratuito a través de",Save:lc,"Add new Components":"Agregar nuevos componentes",Options:pc,"Config Overview":"Resumen de configuración","HTML Overview":"Resumen de HTML","Delete Layout":"Eliminar diseño",avatar:dc,Publish:cc,"Add Components to Page":"Agregar componentes a la página",Close:mc,"Helper Components":"Componentes de ayuda","Click to add":"Haga clic para agregar",component:bc,"Layout Components":"Componentes de diseño","Click to add component":"Haga clic para agregar componente","Remove all Components":"Eliminar todos los componentes","Are you sure you want to remove all Components?":"¿Está seguro de que desea eliminar todos los componentes?",Styles:uc,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Aplicar estilos que afectan a toda la página. Estas configuraciones incluyen familia de fuentes global, color de texto, color de fondo y otros estilos universales que se aplican a todas las secciones.","Update Page Styles":"Actualizar estilos de página","Download HTML":"Descargar HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportar toda la página como un archivo HTML independiente. Esto incluye todas las secciones, contenido y estilos aplicados, haciéndolo listo para usar o integrar en otro lugar.","Download HTML file":"Descargar archivo HTML",Typographies:gc,"Font Appearance":"Apariencia de fuente","Font Size":"Tamaño de fuente",Select:xc,"Font size":"Tamaño de fuente","Font tablet size":"Tamaño de fuente para tabletas","Font small screens":"Tamaño de fuente para pantallas pequeñas","Font weight":"Peso de fuente","Font family":"Familia de fuente","Font Style":"Estilo de fuente","Opacity & Transparency":"Opacidad y Transparencia",Padding:fc,"Vertical Padding":"Relleno Vertical","Horizontal Padding":"Relleno Horizontal",Margin:hc,"Vertical Margin":"Margen Vertical","Horizontal Margin":"Margen Horizontal","Border Radius":"Radio del borde",Global:yc,Specific:wc,"Border Radius top left":"Radio del borde superior izquierdo","Border Radius top right":"Radio del borde superior derecho","Border Radius bottom left":"Radio del borde inferior izquierdo","Border Radius bottom right":"Radio del borde inferior derecho","Border Style, Width & Color":"Estilo, ancho y color del borde",Border:vc,"Border Style":"Estilo del borde","Border Width":"Ancho del borde","Border Color":"Color del borde",Transparent:kc,"Generated CSS":"CSS Generado","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Este es el CSS aplicado por el constructor. Agregue su propio CSS y presione Enter para aplicarlo al elemento seleccionado.","Add your CSS.":"Agregue su CSS.","The pbx- prefix is added automatically.":"El prefijo pbx- se agrega automáticamente.","Type class":"Escriba clase",Add:Sc,"Inline Styles":"Estilos en línea","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Estos son los estilos en línea aplicados por el constructor. Agregue sus propios estilos y presione Enter para aplicarlos al elemento seleccionado.","Add your own style.":"Agregue su propio estilo.",property:Cc,value:Ec,Editing:Tc,"Loading...":"Cargando...","Background Color":"Color de fondo","Text Color":"Color de texto","Default black":"Negro predeterminado","Remove Component?":"¿Eliminar componente?","Are you sure you want to remove this Component?":"¿Estás seguro de que deseas eliminar este componente?",Delete:Mc,"Add to the bottom":"Agregar al final",Preview:Bc,Mobile:Nc,"Demo Content":"Contenido de demostración","Demo Description":"Descubra el constructor de páginas ligero y gratuito Vue Click & Drop. Cree y mejore experiencias digitales sin esfuerzo con Vue. No todo lo poderoso tiene que ser complejo. Este constructor de páginas minimalista y ligero ofrece una interfaz elegante e intuitiva centrada en la simplicidad y la velocidad. Cree páginas completamente receptivas como listados, tableros de trabajo o publicaciones de blog, y gestione su contenido fácilmente con el constructor de páginas gratuito Click & Drop.","Demo Description Two":"Un constructor de páginas diseñado para el crecimiento. Cree las páginas de su sitio web con componentes listos para usar que son totalmente personalizables y siempre receptivos, diseñados para satisfacer todas las necesidades. Un poderoso constructor de páginas para comerciantes, marcas и agencias en crecimiento.","Demo Description Three":"El constructor de sitios web amado por los diseñadores. Diseñe, obtenga una vista previa y ajuste fácilmente los diseños para cada tamaño de pantalla. Limpio. Rápido. Intuitivo. No todo lo poderoso tiene que parecer complicado.","Demo Description Four":"Asegúrese de que su sitio se vea genial en todos los dispositivos. Edite el contenido de texto en vivo y en tiempo real. Elija las fuentes perfectas que coincidan con su estilo. Experimente con confianza con la capacidad de revertir los cambios. Estilos con prefijo. No hay riesgo de conflictos de estilo entre el constructor y su aplicación.","Demo Title":"El constructor web para páginas impresionantes","Demo Title Two":"Simplemente publícalo con Vue","Demo Title Three":"Edición receptiva","Edit text and links":"Editar texto y enlaces","Enter URL":"Introducir URL","Line break":"Salto de línea",Bold:Pc,"Header 2":"Encabezado 2","Header 3":"Encabezado 3",List:Dc,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Agregue una URL válida para transformar el texto seleccionado en un hipervínculo clicable que dirija a los usuarios a la dirección web especificada.","Select image":"Seleccionar imagen","Manage Content":"Gestionar contenido","Media Library":"Biblioteca de medios","Reset changes":"Restablecer cambios","Do you want to reset this page?":"¿Quieres restablecer esta página?","Are you sure you want to reset this page? This will overwrite your current changes.":"¿Estás seguro de que deseas restablecer esta página? Esto sobrescribirá tus cambios actuales.",Search:Lc,"Search...":"Buscar...",Landscape:Ac,Portrait:Oc,Squarish:Vc,"Total pages":"Páginas totales",Images:Ic,"First page":"Primera página",Prev:_c,Next:Rc,"By:":"Por:","We did not find any images. Make a new search.":"No encontramos imágenes. Realiza una nueva búsqueda.","No results on current page. Navigate to First Page.":"No hay resultados en la página actual. Navega a la primera página.",Information:Hc,"From:":"De:"," Select image":" Seleccionar imagen","Layouts and visual.":"Diseños y visuales.","Start customizing by editing this default text directly in the editor.":"Comience a personalizar editando este texto predeterminado directamente en el editor.","Single Image":"Imagen única","Two Vertical Images":"Dos imágenes verticales","Two Square Images":"Dos imágenes cuadradas","Three Square Images":"Tres imágenes cuadradas","Six Square Images Grid":"Cuadrícula de seis imágenes cuadradas","Three Square Images With Text":"Tres imágenes cuadradas con texto","Two Square Images With Text":"Dos imágenes cuadradas con texto","Three Vertical Images":"Dos imágenes cuadradas con texto",Text:zc,"Header H2":"Encabezado H2","Header H3":"Encabezado H3","YouTube Video":"Video de YouTube","Break Divider":"Divisor",Link:Fc,"Selected HTML":"HTML seleccionado","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Descripción general del elemento seleccionado, componente y componentes. Esta sección proporciona actualizaciones en tiempo real basadas en su selección de HTML.",Types:jc,"Element type:":"Tipo de elemento:","Component type:":"Tipo de componente:","Components:":"Componentes:",array:qc,Content:Wc,Element:Uc,Component:Gc,"Components added":"Componentes añadidos","No Element selected":"Ningún elemento seleccionado","Selected HTML:":"HTML seleccionado:","Element src:":"Fuente del elemento:","Element classes:":"Clases de elemento:","No Component selected":"Ningún componente seleccionado","ID:":"ID:","Title:":"Título:","HTML Code:":"Código HTML:","No Components added yet":"Aún no se han añadido componentes",All:Kc,Image:Jc,"Image & Text":"Imagen y texto","Four Square Images With Text":"Cuatro imágenes cuadradas con texto","Four Square Images":"Cuatro imágenes cuadradas","Continue Your Work?":"¿Desea continuar su trabajo?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Notamos que tiene algunos cambios que no se guardaron la última vez. ¿Le gustaría continuar donde lo dejó o usar la versión que está cargada actualmente desde la base de datos?","Use Saved Version":"Usar la versión guardada","Continue Where I Left Off":"Continuar donde lo dejé","HTML Editor":"Editor HTML","Gain full control over components by editing the raw HTML.":"Obtenga control total sobre los componentes editando el HTML sin formato.","Large Screens Only":"Solo pantallas grandes"},property:Cc,value:Ec},Symbol.toStringTag,{value:"Module"})),Yc="Enregistrer",Xc="Options",Qc="avatar",Zc="Publier",$c="Fermer",em="composant",tm="Styles",rm="Typographies",om="Sélectionner",nm="Marge intérieure",im="Marge",am="Global",sm="Spécifique",lm="Bordure",pm="Transparent",dm="Ajouter",cm="propriété",mm="valeur",bm="Édition",um="Supprimer",gm="Aperçu",xm="Mobile",fm="Gras",hm="Liste",ym="Rechercher",wm="Paysage",vm="Portrait",km="Carré",Sm="Images",Cm="Précédent",Em="Suivant",Tm="Information",Mm="Texte",Bm="Lien",Nm="Types",Pm="tableau",Dm="Contenu",Lm="Élément",Am="Composant",Om="Tous",Vm="Image",ev=Object.freeze(Object.defineProperty({__proto__:null,Add:dm,All:Om,Bold:fm,Border:lm,Close:$c,Component:Am,Content:Dm,Delete:um,Editing:bm,Element:Lm,Global:am,Image:Vm,Images:Sm,Information:Tm,Landscape:wm,Link:Bm,List:hm,Margin:im,Mobile:xm,Next:Em,Options:Xc,Padding:nm,Portrait:vm,Prev:Cm,Preview:gm,Publish:Zc,Save:Yc,Search:ym,Select:om,Specific:sm,Squarish:km,Styles:tm,Text:Mm,Transparent:pm,Types:Nm,Typographies:rm,array:Pm,avatar:Qc,component:em,default:{"Reset Page":"Réinitialiser la page","Global Page Styles":"Styles de page globaux","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Essayez le puissant Click & Drop Page Builder, conçu pour les développeurs et les créateurs qui souhaitent un contrôle total sans tracas. Personnalisez les mises en page, les polices et les couleurs. Modifiez le contenu visuellement en temps réel. Ajoutez des médias, intégrez des vidéos YouTube ou exportez tout en HTML propre. Avec l'édition réactive, la sauvegarde automatique locale, la prise en charge de Tailwind et même l'intégration Unsplash, c'est tout ce dont vous avez besoin, enveloppé dans un seul constructeur transparent. Créez des pages impressionnantes en quelques minutes.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Un constructeur de pages conçu pour la croissance. Créez les pages de votre site Web avec des composants prêts à l'emploi qui sont entièrement personnalisables et toujours réactifs, conçus pour répondre à tous les besoins. Un puissant constructeur de pages pour les commerçants, les marques et les agences en pleine croissance.","Everything you need. Break free from design limitations":"Tout ce dont vous avez besoin. Libérez-vous des limitations de conception","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Donnez vie à votre vision et créez des pages impressionnantes à l'aide d'un constructeur de pages par glisser-déposer","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Le constructeur web pour des pages époustouflantes. Permettez aux utilisateurs de concevoir et de publier des pages modernes à n'importe quelle échelle. Créez des pages réactives comme des listes, des emplois ou des articles de blog et gérez facilement le contenu en utilisant le Page Builder gratuit de glisser-déposer. Développé avec TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS et HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Téléchargez ou installez notre puissant, flexible et facile à utiliser constructeur de pages Vue 3 gratuit via",Save:Yc,"Add new Components":"Ajouter de nouveaux composants",Options:Xc,"Config Overview":"Aperçu de la configuration","HTML Overview":"Aperçu HTML","Delete Layout":"Supprimer la mise en page",avatar:Qc,Publish:Zc,"Add Components to Page":"Ajouter des composants à la page",Close:$c,"Helper Components":"Composants d'aide","Click to add":"Cliquez pour ajouter",component:em,"Layout Components":"Composants de mise en page","Click to add component":"Cliquez pour ajouter un composant","Remove all Components":"Supprimer tous les composants","Are you sure you want to remove all Components?":"Êtes-vous sûr de vouloir supprimer tous les composants ?",Styles:tm,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Appliquez des styles qui affectent toute la page. Ces paramètres incluent la famille de polices globale, la couleur du texte, la couleur de fond et d'autres styles universels qui s'appliquent à toutes les sections.","Update Page Styles":"Mettre à jour les styles de page","Download HTML":"Télécharger HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportez toute la page en tant que fichier HTML autonome. Cela inclut toutes les sections, le contenu et les styles appliqués, ce qui le rend prêt à être utilisé ou intégré ailleurs.","Download HTML file":"Télécharger le fichier HTML",Typographies:rm,"Font Appearance":"Apparence de la police","Font Size":"Taille de la police",Select:om,"Font size":"Taille de la police","Font tablet size":"Taille de la police pour tablette","Font small screens":"Taille de la police pour petits écrans","Font weight":"Poids de la police","Font family":"Famille de police","Font Style":"Style de police","Opacity & Transparency":"Opacité et Transparence",Padding:nm,"Vertical Padding":"Marge intérieure verticale","Horizontal Padding":"Marge intérieure horizontale",Margin:im,"Vertical Margin":"Marge verticale","Horizontal Margin":"Marge horizontale","Border Radius":"Rayon de bordure",Global:am,Specific:sm,"Border Radius top left":"Rayon de bordure en haut à gauche","Border Radius top right":"Rayon de bordure en haut à droite","Border Radius bottom left":"Rayon de bordure en bas à gauche","Border Radius bottom right":"Rayon de bordure en bas à droite","Border Style, Width & Color":"Style, largeur et couleur de la bordure",Border:lm,"Border Style":"Style de bordure","Border Width":"Largeur de bordure","Border Color":"Couleur de bordure",Transparent:pm,"Generated CSS":"CSS Généré","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Ceci est le CSS appliqué par le constructeur. Ajoutez votre propre CSS et appuyez sur Entrée pour l'appliquer à l'élément sélectionné.","Add your CSS.":"Ajoutez votre CSS.","The pbx- prefix is added automatically.":"Le préfixe pbx- est ajouté automatiquement.","Type class":"Tapez la classe",Add:dm,"Inline Styles":"Styles en ligne","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Ce sont les styles en ligne appliqués par le constructeur. Ajoutez vos propres styles et appuyez sur Entrée pour les appliquer à l'élément sélectionné.","Add your own style.":"Ajoutez votre propre style.",property:cm,value:mm,Editing:bm,"Loading...":"Chargement...","Background Color":"Couleur de fond","Text Color":"Couleur du texte","Default black":"Noir par défaut","Remove Component?":"Supprimer le composant ?","Are you sure you want to remove this Component?":"Êtes-vous sûr de vouloir supprimer ce composant ?",Delete:um,"Add to the bottom":"Ajouter en bas",Preview:gm,Mobile:xm,"Demo Content":"Contenu de démonstration","Demo Description":"Découvrez le constructeur de pages léger et gratuit Vue Click & Drop. Créez et améliorez des expériences numériques sans effort avec Vue. Tout ce qui est puissant n'a pas besoin d'être complexe. Ce constructeur de pages minimaliste et léger offre une interface élégante et intuitive axée sur la simplicité et la rapidité. Créez des pages entièrement réactives telles que des listes, des tableaux d'offres d'emploi ou des articles de blog, et gérez votre contenu facilement avec le constructeur de pages gratuit Click & Drop.","Demo Description Two":"Un constructeur de pages conçu pour la croissance. Créez les pages de votre site Web avec des composants prêts à l'emploi qui sont entièrement personnalisables et toujours réactifs, conçus pour répondre à tous les besoins. Un puissant constructeur de pages pour les commerçants, les marques et les agences en pleine croissance.","Demo Description Three":"Le constructeur de sites Web adoré des designers. Concevez, prévisualisez et ajustez facilement les mises en page pour chaque taille d'écran. Propre. Rapide. Intuitif. Tout ce qui est puissant n'a pas à paraître compliqué.","Demo Description Four":"Assurez-vous que votre site est superbe sur tous les appareils. Modifiez le contenu textuel en direct et en temps réel. Choisissez les polices parfaites pour correspondre à votre style. Expérimentez en toute confiance avec la possibilité d'annuler les modifications. Styles préfixés. Aucun risque de conflits de style entre le constructeur et votre application.","Demo Title":"Le constructeur de sites Web pour des pages époustouflantes","Demo Title Two":"Publiez-le simplement avec Vue","Demo Title Three":"Édition réactive","Edit text and links":"Modifier le texte et les liens","Enter URL":"Entrer l'URL","Line break":"Saut de ligne",Bold:fm,"Header 2":"Titre 2","Header 3":"Titre 3",List:hm,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Ajoutez une URL valide pour transformer le texte sélectionné en un lien hypertexte cliquable qui dirige les utilisateurs vers l'adresse Web spécifiée.","Select image":"Sélectionner une image","Manage Content":"Gérer le contenu","Media Library":"Bibliothèque multimédia","Reset changes":"Réinitialiser les modifications","Do you want to reset this page?":"Voulez-vous réinitialiser cette page ?","Are you sure you want to reset this page? This will overwrite your current changes.":"Êtes-vous sûr de vouloir réinitialiser cette page ? Cela écrasera vos modifications actuelles.",Search:ym,"Search...":"Rechercher...",Landscape:wm,Portrait:vm,Squarish:km,"Total pages":"Pages totales",Images:Sm,"First page":"Première page",Prev:Cm,Next:Em,"By:":"Par:","We did not find any images. Make a new search.":"Nous n'avons trouvé aucune image. Faites une nouvelle recherche.","No results on current page. Navigate to First Page.":"Aucun résultat sur la page actuelle. Naviguez vers la première page.",Information:Tm,"From:":"De:"," Select image":" Sélectionner une image","Layouts and visual.":"Mises en page et visuel.","Start customizing by editing this default text directly in the editor.":"Commencez à personnaliser en modifiant ce texte par défaut directement dans l'éditeur.","Single Image":"Image unique","Two Vertical Images":"Deux images verticales","Two Square Images":"Deux images carrées","Three Square Images":"Trois images carrées","Six Square Images Grid":"Grille de six images carrées","Three Square Images With Text":"Trois images carrées avec texte","Two Square Images With Text":"Deux images carrées avec texte","Three Vertical Images":"Deux images carrées avec texte",Text:Mm,"Header H2":"En-tête H2","Header H3":"En-tête H3","YouTube Video":"Vidéo YouTube","Break Divider":"Séparateur",Link:Bm,"Selected HTML":"HTML sélectionné","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Aperçu de l'élément sélectionné, du composant et des composants. Cette section fournit des mises à jour en temps réel en fonction de votre sélection HTML.",Types:Nm,"Element type:":"Type d'élément:","Component type:":"Type de composant:","Components:":"Composants:",array:Pm,Content:Dm,Element:Lm,Component:Am,"Components added":"Composants ajoutés","No Element selected":"Aucun élément sélectionné","Selected HTML:":"HTML sélectionné:","Element src:":"Source de l'élément:","Element classes:":"Classes d'élément:","No Component selected":"Aucun composant sélectionné","ID:":"ID:","Title:":"Titre:","HTML Code:":"Code HTML:","No Components added yet":"Aucun composant ajouté pour le moment",All:Om,Image:Vm,"Image & Text":"Image et texte","Four Square Images With Text":"Quatre images carrées avec texte","Four Square Images":"Quatre images carrées","Continue Your Work?":"Continuer votre travail ?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Nous avons remarqué que vous avez des modifications qui n'ont pas été enregistrées la dernière fois. Souhaitez-vous reprendre là où vous vous êtes arrêté, ou utiliser la version actuellement chargée depuis la base de données ?","Use Saved Version":"Utiliser la version enregistrée","Continue Where I Left Off":"Continuer là où je me suis arrêté","HTML Editor":"Éditeur HTML","Gain full control over components by editing the raw HTML.":"Obtenez un contrôle total sur les composants en modifiant le code HTML brut.","Large Screens Only":"Grands écrans uniquement"},property:cm,value:mm},Symbol.toStringTag,{value:"Module"})),Im="सहेजें",_m="विकल्प",Rm="अवतार",Hm="प्रकाशित करें",zm="बंद करें",Fm="घटक",jm="शैलियाँ",qm="टाइपोग्राफ़ी",Wm="चुनें",Um="पैडिंग",Gm="मार्जिन",Km="वैश्विक",Jm="विशिष्ट",Ym="बॉर्डर",Xm="पारदर्शी",Qm="जोड़ें",Zm="गुण",$m="मूल्य",eb="संपादन",tb="हटाएं",rb="पूर्वावलोकन",ob="मोबाइल",nb="बोल्ड",ib="सूची",ab="खोजें",sb="लैंडस्केप",lb="पोर्ट्रेट",pb="चौकोर",db="छवियां",cb="पिछला",mb="अगला",bb="जानकारी",ub="पाठ",gb="लिंक",xb="प्रकार",fb="सरणी",hb="सामग्री",yb="तत्व",wb="घटक",vb="सभी",kb="छवि",tv=Object.freeze(Object.defineProperty({__proto__:null,Add:Qm,All:vb,Bold:nb,Border:Ym,Close:zm,Component:wb,Content:hb,Delete:tb,Editing:eb,Element:yb,Global:Km,Image:kb,Images:db,Information:bb,Landscape:sb,Link:gb,List:ib,Margin:Gm,Mobile:ob,Next:mb,Options:_m,Padding:Um,Portrait:lb,Prev:cb,Preview:rb,Publish:Hm,Save:Im,Search:ab,Select:Wm,Specific:Jm,Squarish:pb,Styles:jm,Text:ub,Transparent:Xm,Types:xb,Typographies:qm,array:fb,avatar:Rm,component:Fm,default:{"Reset Page":"पृष्ठ रीसेट करें","Global Page Styles":"वैश्विक पृष्ठ शैलियाँ","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"पावरफुल Click & Drop Page Builder आज़माएं—डेवलपर्स और क्रिएटर्स के लिए डिज़ाइन किया गया जो बिना किसी परेशानी के पूर्ण नियंत्रण चाहते हैं। लेआउट, फोंट और रंगों को कस्टमाइज़ करें। सामग्री को वास्तविक समय में विज़ुअली संपादित करें। मीडिया जोड़ें, YouTube वीडियो एम्बेड करें, या सब कुछ साफ HTML के रूप में निर्यात करें। उत्तरदायी संपादन, स्थानीय ऑटो-सेव, टेलविंड समर्थन, और यहां तक कि Unsplash एकीकरण के साथ, यह सब कुछ है जिसकी आपको आवश्यकता है—एक सहज बिल्डर में लपेटा गया। मिनटों में शानदार पेज बनाएं।","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"विकास के लिए डिज़ाइन किया गया एक पेज बिल्डर। रेडीमेड घटकों के साथ अपनी वेबसाइट पेज बनाएं जो पूरी तरह से अनुकूलन योग्य और हमेशा उत्तरदायी हैं, हर आवश्यकता को पूरा करने के लिए डिज़ाइन किया गया है। बढ़ते व्यापारियों, ब्रांडों और एजेंसियों के लिए एक शक्तिशाली पेज बिल्डर।","Everything you need. Break free from design limitations":"आपको जो कुछ भी चाहिए। डिज़ाइन सीमाओं से मुक्त हों","Bring your vision to life and create impressive pages using a click & drop Page Builder":"अपनी दृष्टि को साकार करें और एक क्लिक और ड्रॉप पेज बिल्डर का उपयोग करके प्रभावशाली पृष्ठ बनाएं","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"शानदार पृष्ठों के लिए वेब बिल्डर। उपयोगकर्ताओं को किसी भी पैमाने पर आधुनिक पृष्ठों को डिज़ाइन और प्रकाशित करने में सक्षम बनाएं। लिस्टिंग, नौकरियों या ब्लॉग पोस्ट जैसे उत्तरदायी पृष्ठ बनाएं और मुफ्त क्लिक और ड्रॉप पेज बिल्डर का उपयोग करके सामग्री को आसानी से प्रबंधित करें। TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS और HTML के साथ विकसित।","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"हमारे शक्तिशाली, लचीले और उपयोग में आसान मुफ्त Vue 3 पेज बिल्डर को डाउनलोड या इंस्टॉल करें",Save:Im,"Add new Components":"नए घटक जोड़ें",Options:_m,"Config Overview":"कॉन्फ़िगरेशन अवलोकन","HTML Overview":"HTML अवलोकन","Delete Layout":"लेआउट हटाएं",avatar:Rm,Publish:Hm,"Add Components to Page":"पृष्ठ में घटक जोड़ें",Close:zm,"Helper Components":"सहायक घटक","Click to add":"जोड़ने के लिए क्लिक करें",component:Fm,"Layout Components":"लेआउट घटक","Click to add component":"घटक जोड़ने के लिए क्लिक करें","Remove all Components":"सभी घटकों को हटाएं","Are you sure you want to remove all Components?":"क्या आप वाकई सभी घटकों को हटाना चाहते हैं?",Styles:jm,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"ऐसे शैलियाँ लागू करें जो पूरे पृष्ठ को प्रभावित करती हैं। इन सेटिंग्स में वैश्विक फ़ॉन्ट परिवार, पाठ का रंग, पृष्ठभूमि का रंग और अन्य सार्वभौमिक शैलियाँ शामिल हैं जो सभी अनुभागों पर लागू होती हैं।","Update Page Styles":"पृष्ठ शैलियाँ अपडेट करें","Download HTML":"HTML डाउनलोड करें","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"पूरे पृष्ठ को एक स्टैंडअलोन HTML फ़ाइल के रूप में निर्यात करें। इसमें सभी अनुभाग, सामग्री और लागू शैलियाँ शामिल हैं, जिससे यह उपयोग या अन्यत्र एकीकरण के लिए तैयार हो जाता है।","Download HTML file":"HTML फ़ाइल डाउनलोड करें",Typographies:qm,"Font Appearance":"फ़ॉन्ट उपस्थिति","Font Size":"फ़ॉन्ट आकार",Select:Wm,"Font size":"फ़ॉन्ट आकार","Font tablet size":"टैबलेट के लिए फ़ॉन्ट आकार","Font small screens":"छोटी स्क्रीन के लिए फ़ॉन्ट आकार","Font weight":"फ़ॉन्ट वजन","Font family":"फ़ॉन्ट परिवार","Font Style":"फ़ॉन्ट शैली","Opacity & Transparency":"अस्पष्टता और पारदर्शिता",Padding:Um,"Vertical Padding":"वर्टिकल पैडिंग","Horizontal Padding":"हॉरिजॉन्टल पैडिंग",Margin:Gm,"Vertical Margin":"वर्टिकल मार्जिन","Horizontal Margin":"हॉरिजॉन्टल मार्जिन","Border Radius":"बॉर्डर रेडियस",Global:Km,Specific:Jm,"Border Radius top left":"बॉर्डर रेडियस ऊपर बायां","Border Radius top right":"बॉर्डर रेडियस ऊपर दायां","Border Radius bottom left":"बॉर्डर रेडियस नीचे बायां","Border Radius bottom right":"बॉर्डर रेडियस नीचे दायां","Border Style, Width & Color":"बॉर्डर शैली, चौड़ाई और रंग",Border:Ym,"Border Style":"बॉर्डर शैली","Border Width":"बॉर्डर चौड़ाई","Border Color":"बॉर्डर रंग",Transparent:Xm,"Generated CSS":"जनरेट किया गया CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"यह वह CSS है जिसे बिल्डर द्वारा लागू किया गया है। अपना CSS जोड़ें और इसे चयनित तत्व पर लागू करने के लिए Enter दबाएं।","Add your CSS.":"अपना CSS जोड़ें।","The pbx- prefix is added automatically.":"pbx- उपसर्ग स्वचालित रूप से जोड़ा जाता है।","Type class":"क्लास टाइप करें",Add:Qm,"Inline Styles":"इनलाइन शैलियाँ","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"ये बिल्डर द्वारा लागू की गई इनलाइन शैलियाँ हैं। अपनी खुद की शैलियाँ जोड़ें और चयनित तत्व पर लागू करने के लिए Enter दबाएं।","Add your own style.":"अपनी खुद की शैली जोड़ें।",property:Zm,value:$m,Editing:eb,"Loading...":"लोड हो रहा है...","Background Color":"पृष्ठभूमि का रंग","Text Color":"पाठ का रंग","Default black":"डिफ़ॉल्ट काला","Remove Component?":"घटक हटाएं?","Are you sure you want to remove this Component?":"क्या आप वाकई इस घटक को हटाना चाहते हैं?",Delete:tb,"Add to the bottom":"नीचे जोड़ें",Preview:rb,Mobile:ob,"Demo Content":"डेमो सामग्री","Demo Description":"लाइटवेट और मुफ्त Vue Click & Drop पेज बिल्डर का परिचय। Vue के साथ डिजिटल अनुभवों को आसानी से बनाएं और बढ़ाएं। हर शक्तिशाली चीज़ को जटिल होने की आवश्यकता नहीं है। यह न्यूनतम और हल्का पेज बिल्डर एक सुरुचिपूर्ण, सहज इंटरफ़ेस प्रदान करता है जो सादगी और गति पर केंद्रित है। पूरी तरह से उत्तरदायी पृष्ठ बनाएं जैसे लिस्टिंग, जॉब बोर्ड, या ब्लॉग पोस्ट - और अपने सामग्री को आसानी से प्रबंधित करें मुफ्त Click & Drop पेज बिल्डर का उपयोग करके।","Demo Description Two":"विकास के लिए डिज़ाइन किया गया एक पेज बिल्डर। रेडीमेड घटकों के साथ अपनी वेबसाइट पेज बनाएं जो पूरी तरह से अनुकूलन योग्य और हमेशा उत्तरदायी हैं, हर आवश्यकता को पूरा करने के लिए डिज़ाइन किया गया है। बढ़ते व्यापारियों, ब्रांडों और एजेंसियों के लिए एक शक्तिशाली पेज बिल्डर।","Demo Description Three":"डिजाइनरों द्वारा पसंद किया जाने वाला वेबसाइट बिल्डर। हर स्क्रीन आकार के लिए आसानी से लेआउट डिजाइन, पूर्वावलोकन और समायोजित करें। स्वच्छ। तेज। सहज। हर शक्तिशाली चीज को जटिल दिखने की जरूरत नहीं है।","Demo Description Four":"सुनिश्चित करें कि आपकी साइट सभी उपकरणों पर बहुत अच्छी लगती है। पाठ्य सामग्री को लाइव और वास्तविक समय में संपादित करें। अपनी शैली से मेल खाने वाले सही फोंट चुनें। परिवर्तनों को वापस करने की क्षमता के साथ आत्मविश्वास से प्रयोग करें। शैलियाँ उपसर्ग। बिल्डर और आपके ऐप के बीच शैली संघर्ष का कोई खतरा नहीं है।","Demo Title":"शानदार पृष्ठों के लिए वेब बिल्डर","Demo Title Two":"बस इसे Vue के साथ प्रकाशित करें","Demo Title Three":"उत्तरदायी संपादन","Edit text and links":"पाठ और लिंक संपादित करें","Enter URL":"URL दर्ज करें","Line break":"लाइन ब्रेक",Bold:nb,"Header 2":"हेडर 2","Header 3":"हेडर 3",List:ib,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"चयनित पाठ को एक क्लिक करने योग्य हाइपरलिंक में बदलने के लिए एक मान्य URL जोड़ें जो उपयोगकर्ताओं को निर्दिष्ट वेब पते पर निर्देशित करता है।","Select image":"छवि चुनें","Manage Content":"सामग्री प्रबंधित करें","Media Library":"मीडिया लाइब्रेरी","Reset changes":"परिवर्तन रीसेट करें","Do you want to reset this page?":"क्या आप इस पृष्ठ को रीसेट करना चाहते हैं?","Are you sure you want to reset this page? This will overwrite your current changes.":"क्या आप वाकई इस पृष्ठ को रीसेट करना चाहते हैं? यह आपके वर्तमान परिवर्तनों को अधिलेखित कर देगा।",Search:ab,"Search...":"खोजें...",Landscape:sb,Portrait:lb,Squarish:pb,"Total pages":"कुल पृष्ठ",Images:db,"First page":"पहला पृष्ठ",Prev:cb,Next:mb,"By:":"द्वारा:","We did not find any images. Make a new search.":"हमें कोई छवि नहीं मिली। एक नई खोज करें।","No results on current page. Navigate to First Page.":"वर्तमान पृष्ठ पर कोई परिणाम नहीं। पहले पृष्ठ पर जाएं।",Information:bb,"From:":"से:"," Select image":" छवि चुनें","Layouts and visual.":"लेआउट और दृश्य।","Start customizing by editing this default text directly in the editor.":"संपादक में इस डिफ़ॉल्ट पाठ को संपादित करके अनुकूलन शुरू करें।","Single Image":"एकल छवि","Two Vertical Images":"दो लंबवत छवियां","Two Square Images":"दो वर्ग छवियां","Three Square Images":"तीन वर्ग छवियां","Six Square Images Grid":"छह वर्ग छवियों की ग्रिड","Three Square Images With Text":"तीन वर्ग छवियां और पाठ","Three Vertical Images":"दो वर्ग छवियां और पाठ",Text:ub,"Header H2":"हेडर H2","Header H3":"हेडर H3","YouTube Video":"यूट्यूब वीडियो","Break Divider":"विभाजक",Link:gb,"Two Square Images With Text":"दो वर्ग छवियां और पाठ","Selected HTML":"चयनित HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"चयनित तत्व, घटक और घटकों का अवलोकन। यह अनुभाग आपके HTML चयन के आधार पर वास्तविक समय अपडेट प्रदान करता है।",Types:xb,"Element type:":"तत्व प्रकार:","Component type:":"घटक प्रकार:","Components:":"घटक:",array:fb,Content:hb,Element:yb,Component:wb,"Components added":"घटक जोड़े गए","No Element selected":"कोई तत्व चयनित नहीं","Selected HTML:":"चयनित HTML:","Element src:":"तत्व स्रोत:","Element classes:":"तत्व वर्ग:","No Component selected":"कोई घटक चयनित नहीं","ID:":"आईडी:","Title:":"शीर्षक:","HTML Code:":"HTML कोड:","No Components added yet":"अभी तक कोई घटक नहीं जोड़ा गया",All:vb,Image:kb,"Image & Text":"छवि और पाठ","Four Square Images With Text":"चार वर्गाकार चित्र पाठ के साथ","Four Square Images":"चार वर्गाकार छवियाँ","Continue Your Work?":"अपना काम जारी रखें?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"हमने देखा कि आपके पास कुछ बदलाव हैं जो पिछली बार सहेजे नहीं गए थे। क्या आप वहीं से शुरू करना चाहेंगे जहां आपने छोड़ा था, या डेटाबेस से वर्तमान में लोड किए गए संस्करण का उपयोग करना चाहेंगे?","Use Saved Version":"सहेजा गया संस्करण उपयोग करें","Continue Where I Left Off":"वहीं से शुरु करो जहाँ मैने छोड़ा था","HTML Editor":"HTML संपादक","Gain full control over components by editing the raw HTML.":"कच्चे HTML को संपादित करके घटकों पर पूर्ण नियंत्रण प्राप्त करें।","Large Screens Only":"केवल बड़ी स्क्रीन"},property:Zm,value:$m},Symbol.toStringTag,{value:"Module"})),Sb="保存",Cb="オプション",Eb="アバター",Tb="公開する",Mb="閉じる",Bb="コンポーネント",Nb="スタイル",Pb="タイポグラフィ",Db="選択",Lb="パディング",Ab="マージン",Ob="グローバル",Vb="特定",Ib="ボーダー",_b="透明",Rb="追加",Hb="プロパティ",zb="値",Fb="編集",jb="削除",qb="プレビュー",Wb="モバイル",Ub="太字",Gb="リンク",Kb="リスト",Jb="検索",Yb="横向き",Xb="縦向き",Qb="正方形",Zb="画像",$b="前へ",eu="次へ",tu="情報",ru="テキスト",ou="タイプ",nu="配列",iu="コンテンツ",au="要素",su="コンポーネント",lu="すべて",pu="画像",rv=Object.freeze(Object.defineProperty({__proto__:null,Add:Rb,All:lu,Bold:Ub,Border:Ib,Close:Mb,Component:su,Content:iu,Delete:jb,Editing:Fb,Element:au,Global:Ob,Image:pu,Images:Zb,Information:tu,Landscape:Yb,Link:Gb,List:Kb,Margin:Ab,Mobile:Wb,Next:eu,Options:Cb,Padding:Lb,Portrait:Xb,Prev:$b,Preview:qb,Publish:Tb,Save:Sb,Search:Jb,Select:Db,Specific:Vb,Squarish:Qb,Styles:Nb,Text:ru,Transparent:_b,Types:ou,Typographies:Pb,array:nu,avatar:Eb,component:Bb,default:{"Reset Page":"ページをリセット","Global Page Styles":"グローバルページスタイル","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"強力なClick & Drop Page Builderを試してみてください。開発者やクリエイター向けに設計されており、手間をかけずに完全なコントロールを実現します。レイアウト、フォント、色をカスタマイズします。リアルタイムで視覚的にコンテンツを編集します。メディアを追加し、YouTube動画を埋め込み、すべてをクリーンなHTMLとしてエクスポートします。レスポンシブ編集、ローカル自動保存、Tailwindサポート、さらにはUnsplash統合を備えた、必要なすべてが1つのシームレスなビルダーにまとめられています。数分で素晴らしいページを作成します。","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"成長のために設計されたページビルダー。完全にカスタマイズ可能で常に応答性があり、あらゆるニーズに対応するように設計された既製のコンポーネントを使用して、ウェブサイトのページを作成します。成長中の商人、ブランド、代理店のための強力なページビルダー。","Everything you need. Break free from design limitations":"必要なものはすべて揃っています。デザインの制約から解放されましょう","Bring your vision to life and create impressive pages using a click & drop Page Builder":"クリック&ドロップページビルダーを使用して、ビジョンを実現し、印象的なページを作成しましょう","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"素晴らしいページのためのウェブビルダー。ユーザーがあらゆる規模でモダンなページを設計および公開できるようにします。リスト、求人、またはブログ投稿のようなレスポンシブページを作成し、無料のクリック&ドロップページビルダーを使用してコンテンツを簡単に管理します。TypeScript、Vue 3、Composition API、Pinia、CSS、Tailwind CSS、およびHTMLで開発されました。","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"強力で柔軟性があり、使いやすい無料の Vue 3 ページビルダーをダウンロードまたはインストールしてください",Save:Sb,"Add new Components":"新しいコンポーネントを追加",Options:Cb,"Config Overview":"設定概要","HTML Overview":"HTML概要","Delete Layout":"レイアウトを削除",avatar:Eb,Publish:Tb,"Add Components to Page":"ページにコンポーネントを追加",Close:Mb,"Helper Components":"ヘルパーコンポーネント","Click to add":"追加するにはクリック",component:Bb,"Layout Components":"レイアウトコンポーネント","Click to add component":"コンポーネントを追加するにはクリック","Remove all Components":"すべてのコンポーネントを削除","Are you sure you want to remove all Components?":"すべてのコンポーネントを削除してもよろしいですか?",Styles:Nb,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"ページ全体に適用されるスタイルを適用します。これらの設定には、グローバルフォントファミリー、テキストカラー、背景色、その他すべてのセクションに適用されるユニバーサルスタイルが含まれます。","Update Page Styles":"ページスタイルを更新","Download HTML":"HTMLをダウンロード","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"ページ全体をスタンドアロンのHTMLファイルとしてエクスポートします。これには、すべてのセクション、コンテンツ、および適用されたスタイルが含まれ、他の場所での使用または統合の準備が整います。","Download HTML file":"HTMLファイルをダウンロード",Typographies:Pb,"Font Appearance":"フォントの外観","Font Size":"フォントサイズ",Select:Db,"Font size":"フォントサイズ","Font tablet size":"タブレット用フォントサイズ","Font small screens":"小さい画面用フォントサイズ","Font weight":"フォントの太さ","Font family":"フォントファミリー","Font Style":"フォントスタイル","Opacity & Transparency":"不透明度と透明度",Padding:Lb,"Vertical Padding":"垂直パディング","Horizontal Padding":"水平パディング",Margin:Ab,"Vertical Margin":"垂直マージン","Horizontal Margin":"水平マージン","Border Radius":"ボーダー半径",Global:Ob,Specific:Vb,"Border Radius top left":"ボーダー半径 左上","Border Radius top right":"ボーダー半径 右上","Border Radius bottom left":"ボーダー半径 左下","Border Radius bottom right":"ボーダー半径 右下","Border Style, Width & Color":"ボーダースタイル、幅、色",Border:Ib,"Border Style":"ボーダースタイル","Border Width":"ボーダー幅","Border Color":"ボーダー色",Transparent:_b,"Generated CSS":"生成されたCSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"これはビルダーによって適用されたCSSです。独自のCSSを追加し、Enterキーを押して選択した要素に適用します。","Add your CSS.":"CSSを追加してください。","The pbx- prefix is added automatically.":"pbx-プレフィックスは自動的に追加されます。","Type class":"クラスを入力",Add:Rb,"Inline Styles":"インラインスタイル","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"これらはビルダーによって適用されるインラインスタイルです。独自のスタイルを追加し、Enterキーを押して選択した要素に適用します。","Add your own style.":"独自のスタイルを追加します。",property:Hb,value:zb,Editing:Fb,"Loading...":"読み込み中...","Background Color":"背景色","Text Color":"テキストの色","Default black":"デフォルトの黒","Remove Component?":"コンポーネントを削除しますか?","Are you sure you want to remove this Component?":"このコンポーネントを削除してもよろしいですか?",Delete:jb,"Add to the bottom":"一番下に追加",Preview:qb,Mobile:Wb,"Demo Content":"デモコンテンツ","Demo Description":"軽量で無料のVue Click & Dropページビルダーをご紹介します。Vueを使用してデジタル体験を簡単に作成および強化します。強力なものすべてが複雑である必要はありません。このミニマリストで軽量なページビルダーは、シンプルさとスピードに焦点を当てたエレガントで直感的なインターフェイスを提供します。リスト、求人ボード、またはブログ投稿など、完全にレスポンシブなページを作成し、無料のClick & Dropページビルダーを使用してコンテンツを簡単に管理します。","Demo Description Two":"成長のために設計されたページビルダー。完全にカスタマイズ可能で常に応答性があり、あらゆるニーズに対応するように設計された既製のコンポーネントを使用して、ウェブサイトのページを作成します。成長中の商人、ブランド、代理店のための強力なページビルダー。","Demo Description Three":"デザイナーに愛されるウェブサイトビルダー。あらゆる画面サイズに合わせてレイアウトを簡単にデザイン、プレビュー、調整できます。シンプルで使いやすく、高速で、直感的です。パワフルなデザインは必ずしも複雑に見えなくても構いません。","Demo Description Four":"すべてのデバイスでサイトが見栄えよく表示されるようにします。テキストコンテンツをライブおよびリアルタイムで編集します。あなたのスタイルに合った完璧なフォントを選択してください。変更を元に戻す機能で自信を持って実験してください。プレフィックス付きのスタイル。ビルダーとアプリの間でスタイルの競合のリスクはありません。","Demo Title":"素晴らしいページのためのウェブビルダー","Demo Title Two":"Vueで公開するだけ","Demo Title Three":"レスポンシブ編集","Edit text and links":"テキストとリンクを編集","Enter URL":"URLを入力","Line break":"改行",Bold:Ub,Link:Gb,"Header 2":"ヘッダー2","Header 3":"ヘッダー3",List:Kb,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"選択したテキストをクリック可能なハイパーリンクに変換するために有効なURLを追加してください。","Select image":"画像を選択","Manage Content":"コンテンツを管理する","Media Library":"メディアライブラリ","Reset changes":"変更をリセット","Do you want to reset this page?":"このページをリセットしますか?","Are you sure you want to reset this page? This will overwrite your current changes.":"このページをリセットしてもよろしいですか?これにより、現在の変更が上書きされます。",Search:Jb,"Search...":"検索...",Landscape:Yb,Portrait:Xb,Squarish:Qb,"Total pages":"総ページ数",Images:Zb,"First page":"最初のページ",Prev:$b,Next:eu,"By:":"作成者:","We did not find any images. Make a new search.":"画像が見つかりませんでした。新しい検索をしてください。","No results on current page. Navigate to First Page.":"現在のページに結果がありません。最初のページに移動してください。",Information:tu,"From:":"提供元:"," Select image":" 画像を選択","Layouts and visual.":"レイアウトとビジュアル。","Start customizing by editing this default text directly in the editor.":"エディターでこのデフォルトテキストを直接編集してカスタマイズを開始します。","Single Image":"単一画像","Two Vertical Images":"縦長の画像2枚","Two Square Images":"正方形の画像2枚","Three Square Images":"正方形の画像3枚","Six Square Images Grid":"正方形の画像6枚のグリッド","Three Square Images With Text":"テキスト付き正方形の画像3枚","Three Vertical Images":"テキスト付き正方形の画像2枚",Text:ru,"Header H2":"ヘッダー H2","Header H3":"ヘッダー H3","YouTube Video":"YouTube ビデオ","Break Divider":"区切り","Two Square Images With Text":"テキスト付き正方形の画像2枚","Selected HTML":"選択されたHTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"選択された要素、コンポーネント、およびコンポーネントの概要。このセクションは、HTML選択に基づいてリアルタイムの更新を提供します。",Types:ou,"Element type:":"要素タイプ:","Component type:":"コンポーネントタイプ:","Components:":"コンポーネント:",array:nu,Content:iu,Element:au,Component:su,"Components added":"追加されたコンポーネント","No Element selected":"選択された要素はありません","Selected HTML:":"選択されたHTML:","Element src:":"要素ソース:","Element classes:":"要素クラス:","No Component selected":"選択されたコンポーネントはありません","ID:":"ID:","Title:":"タイトル:","HTML Code:":"HTMLコード:","No Components added yet":"まだコンポーネントが追加されていません",All:lu,Image:pu,"Image & Text":"画像とテキスト","Four Square Images With Text":"テキスト付きの4つの正方形の画像","Four Square Images":"4つの正方形の画像","Continue Your Work?":"作業を続行しますか?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"前回保存されなかった変更がいくつかあるようです。中断したところから再開しますか、それともデータベースから現在読み込まれているバージョンを使用しますか","Use Saved Version":"保存されたバージョンを使用","Continue Where I Left Off":"中断したところから続行","HTML Editor":"HTMLエディター","Gain full control over components by editing the raw HTML.":"生の HTML を編集することで、コンポーネントを完全に制御できます。","Large Screens Only":"大型スクリーンのみ"},property:Hb,value:zb},Symbol.toStringTag,{value:"Module"})),du="Salvar",cu="Opções",mu="avatar",bu="Publicar",uu="Fechar",gu="componente",xu="Estilos",fu="Tipografias",hu="Selecionar",yu="Preenchimento",wu="Margem",vu="Global",ku="Específico",Su="Borda",Cu="Transparente",Eu="Adicionar",Tu="propriedade",Mu="valor",Bu="Editando",Nu="Excluir",Pu="Pré-visualização",Du="Celular",Lu="Negrito",Au="Lista",Ou="Pesquisar",Vu="Paisagem",Iu="Retrato",_u="Quadrado",Ru="Imagens",Hu="Anterior",zu="Próximo",Fu="Informação",ju="Texto",qu="Link",Wu="Tipos",Uu="array",Gu="Conteúdo",Ku="Elemento",Ju="Componente",Yu="Todos",Xu="Imagem",ov=Object.freeze(Object.defineProperty({__proto__:null,Add:Eu,All:Yu,Bold:Lu,Border:Su,Close:uu,Component:Ju,Content:Gu,Delete:Nu,Editing:Bu,Element:Ku,Global:vu,Image:Xu,Images:Ru,Information:Fu,Landscape:Vu,Link:qu,List:Au,Margin:wu,Mobile:Du,Next:zu,Options:cu,Padding:yu,Portrait:Iu,Prev:Hu,Preview:Pu,Publish:bu,Save:du,Search:Ou,Select:hu,Specific:ku,Squarish:_u,Styles:xu,Text:ju,Transparent:Cu,Types:Wu,Typographies:fu,array:Uu,avatar:mu,component:gu,default:{"Reset Page":"Redefinir página","Global Page Styles":"Estilos de página globais","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Experimente o poderoso Click & Drop Page Builder – projetado para desenvolvedores e criadores que desejam controle total sem complicações. Personalize layouts, fontes e cores. Edite conteúdo visualmente em tempo real. Adicione mídia, incorpore vídeos do YouTube ou exporte tudo como HTML limpo. Com edição responsiva, salvamento automático local, suporte ao Tailwind e até integração com o Unsplash, é tudo o que você precisa – envolvido em um único construtor perfeito. Crie páginas impressionantes em minutos.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Um construtor de páginas projetado para o crescimento. Crie as páginas do seu site com componentes prontos que são totalmente personalizáveis e sempre responsivos, projetados para atender a todas as necessidades. Um poderoso construtor de páginas para comerciantes, marcas e agências em crescimento.","Everything you need. Break free from design limitations":"Tudo o que você precisa. Liberte-se das limitações de design","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Dê vida à sua visão e crie páginas impressionantes usando um construtor de páginas de arrastar e soltar","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"O construtor da web para páginas impressionantes. Permita que os usuários projetem e publiquem páginas modernas em qualquer escala. Crie páginas responsivas como listas, empregos ou postagens de blog e gerencie o conteúdo facilmente usando o Page Builder gratuito de arrastar e soltar. Desenvolvido com TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS e HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Baixe ou instale nosso poderoso, flexível e fácil de usar construtor de páginas Vue 3 gratuito via",Save:du,"Add new Components":"Adicionar novos componentes",Options:cu,"Config Overview":"Visão geral da configuração","HTML Overview":"Visão geral do HTML","Delete Layout":"Excluir layout",avatar:mu,Publish:bu,"Add Components to Page":"Adicionar componentes à página",Close:uu,"Helper Components":"Componentes de ajuda","Click to add":"Clique para adicionar",component:gu,"Layout Components":"Componentes de layout","Click to add component":"Clique para adicionar componente","Remove all Components":"Remover todos os componentes","Are you sure you want to remove all Components?":"Tem certeza de que deseja remover todos os componentes?",Styles:xu,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Aplicar estilos que afetam toda a página. Essas configurações incluem família de fontes global, cor do texto, cor de fundo e outros estilos universais que se aplicam a todas as seções.","Update Page Styles":"Atualizar estilos da página","Download HTML":"Baixar HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exporte toda a página como um arquivo HTML independente. Isso inclui todas as seções, conteúdo e estilos aplicados, tornando-o pronto para uso ou integração em outro lugar.","Download HTML file":"Baixar arquivo HTML",Typographies:fu,"Font Appearance":"Aparência da fonte","Font Size":"Tamanho da fonte",Select:hu,"Font size":"Tamanho da fonte","Font tablet size":"Tamanho da fonte para tablets","Font small screens":"Tamanho da fonte para telas pequenas","Font weight":"Peso da fonte","Font family":"Família da fonte","Font Style":"Estilo da fonte","Opacity & Transparency":"Opacidade e Transparência",Padding:yu,"Vertical Padding":"Preenchimento Vertical","Horizontal Padding":"Preenchimento Horizontal",Margin:wu,"Vertical Margin":"Margem Vertical","Horizontal Margin":"Margem Horizontal","Border Radius":"Raio da borda",Global:vu,Specific:ku,"Border Radius top left":"Raio da borda superior esquerda","Border Radius top right":"Raio da borda superior direita","Border Radius bottom left":"Raio da borda inferior esquerda","Border Radius bottom right":"Raio da borda inferior direita","Border Style, Width & Color":"Estilo, largura e cor da borda",Border:Su,"Border Style":"Estilo da borda","Border Width":"Largura da borda","Border Color":"Cor da borda",Transparent:Cu,"Generated CSS":"CSS Gerado","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Este é o CSS aplicado pelo construtor. Adicione seu próprio CSS e pressione Enter para aplicá-lo ao elemento selecionado.","Add your CSS.":"Adicione seu CSS.","The pbx- prefix is added automatically.":"O prefixo pbx- é adicionado automaticamente.","Type class":"Digite a classe",Add:Eu,"Inline Styles":"Estilos Inline","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Estes são os estilos inline aplicados pelo construtor. Adicione seus próprios estilos e pressione Enter para aplicá-los ao elemento selecionado.","Add your own style.":"Adicione seu próprio estilo.",property:Tu,value:Mu,Editing:Bu,"Loading...":"Carregando...","Background Color":"Cor de fundo","Text Color":"Cor do texto","Default black":"Preto padrão","Remove Component?":"Remover componente?","Are you sure you want to remove this Component?":"Tem certeza de que deseja remover este componente?",Delete:Nu,"Add to the bottom":"Adicionar ao final",Preview:Pu,Mobile:Du,"Demo Content":"Conteúdo de demonstração","Demo Description":"Apresentando o construtor de páginas leve e gratuito Vue Click & Drop. Crie e melhore experiências digitais sem esforço com Vue. Nem tudo que é poderoso precisa ser complexo. Este construtor de páginas minimalista e leve oferece uma interface elegante e intuitiva focada na simplicidade e velocidade. Crie páginas totalmente responsivas, como listas, quadros de empregos ou postagens de blog, e gerencie seu conteúdo com facilidade usando o construtor de páginas gratuito Click & Drop.","Demo Description Two":"Um construtor de páginas projetado para o crescimento. Crie as páginas do seu site com componentes prontos que são totalmente personalizáveis e sempre responsivos, projetados para atender a todas as necessidades. Um poderoso construtor de páginas para comerciantes, marcas e agências em crescimento.","Demo Description Three":"O construtor de sites amado pelos designers. Projete, visualize e ajuste facilmente layouts para cada tamanho de tela. Limpo. Rápido. Intuitivo. Nem tudo que é poderoso precisa parecer complicado.","Demo Description Four":"Garanta que seu site tenha uma ótima aparência em todos os dispositivos. Edite o conteúdo do texto ao vivo e em tempo real. Escolha as fontes perfeitas para combinar com seu estilo. Experimente com confiança com a capacidade de reverter as alterações. Estilos prefixados. Nenhum risco de conflitos de estilo entre o construtor e seu aplicativo.","Demo Title":"O construtor de sites para páginas impressionantes","Demo Title Two":"Basta publicá-lo com Vue","Demo Title Three":"Edição responsiva","Edit text and links":"Editar texto e links","Enter URL":"Inserir URL","Line break":"Quebra de linha",Bold:Lu,"Header 2":"Cabeçalho 2","Header 3":"Cabeçalho 3",List:Au,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Adicione um URL válido para transformar o texto selecionado em um hyperlink clicável que direciona os usuários para o endereço da web especificado.","Select image":"Selecionar imagem","Manage Content":"Gerenciar conteúdo","Media Library":"Biblioteca de mídia","Reset changes":"Redefinir alterações","Do you want to reset this page?":"Você quer redefinir esta página?","Are you sure you want to reset this page? This will overwrite your current changes.":"Tem certeza de que deseja redefinir esta página? Isso substituirá suas alterações atuais.",Search:Ou,"Search...":"Pesquisar...",Landscape:Vu,Portrait:Iu,Squarish:_u,"Total pages":"Total de páginas",Images:Ru,"First page":"Primeira página",Prev:Hu,Next:zu,"By:":"Por:","We did not find any images. Make a new search.":"Não encontramos nenhuma imagem. Faça uma nova pesquisa.","No results on current page. Navigate to First Page.":"Nenhum resultado na página atual. Navegue para a primeira página.",Information:Fu,"From:":"De:"," Select image":" Selecionar imagem","Layouts and visual.":"Layouts e visuais.","Start customizing by editing this default text directly in the editor.":"Comece a personalizar editando este texto padrão diretamente no editor.","Single Image":"Imagem única","Two Vertical Images":"Duas imagens verticais","Two Square Images":"Duas imagens quadradas","Three Square Images":"Três imagens quadradas","Six Square Images Grid":"Grade de seis imagens quadradas","Three Square Images With Text":"Três imagens quadradas com texto","Three Vertical Images":"Duas imagens quadradas com texto",Text:ju,"Header H2":"Cabeçalho H2","Header H3":"Cabeçalho H3","YouTube Video":"Vídeo do YouTube","Break Divider":"Divisor",Link:qu,"Two Square Images With Text":"Duas imagens quadradas com texto","Selected HTML":"HTML selecionado","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Visão geral do elemento selecionado, componente e componentes. Esta seção fornece atualizações em tempo real com base na sua seleção de HTML.",Types:Wu,"Element type:":"Tipo de elemento:","Component type:":"Tipo de componente:","Components:":"Componentes:",array:Uu,Content:Gu,Element:Ku,Component:Ju,"Components added":"Componentes adicionados","No Element selected":"Nenhum elemento selecionado","Selected HTML:":"HTML selecionado:","Element src:":"Fonte do elemento:","Element classes:":"Classes de elemento:","No Component selected":"Nenhum componente selecionado","ID:":"ID:","Title:":"Título:","HTML Code:":"Código HTML:","No Components added yet":"Nenhum componente adicionado ainda",All:Yu,Image:Xu,"Image & Text":"Imagem e Texto","Four Square Images With Text":"Quatro imagens quadradas com texto","Four Square Images":"Quatro imagens quadradas","Continue Your Work?":"Continuar seu trabalho?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Percebemos que você tem algumas alterações que não foram salvas da última vez. Gostaria de continuar de onde parou ou usar a versão que está carregada atualmente no banco de dados?","Use Saved Version":"Usar a versão salva","Continue Where I Left Off":"Continuar de onde parei","HTML Editor":"Editor HTML","Gain full control over components by editing the raw HTML.":"Obtenha controlo total sobre os componentes editando o HTML em bruto.","Large Screens Only":"Somente telas grandes"},property:Tu,value:Mu},Symbol.toStringTag,{value:"Module"})),Qu="Сохранить",Zu="Опции",$u="аватар",eg="Опубликовать",tg="Закрыть",rg="компонент",og="Стили",ng="Типографии",ig="Выбрать",ag="Отступ",sg="Поле",lg="Глобальный",pg="Специфический",dg="Граница",cg="Прозрачный",mg="Добавить",bg="свойство",ug="значение",gg="Редактирование",xg="Удалить",fg="Предварительный просмотр",hg="Мобильный",yg="Жирный",wg="Ссылка",vg="Список",kg="Поиск",Sg="Альбомный",Cg="Портретный",Eg="Квадратный",Tg="Изображения",Mg="Назад",Bg="Вперед",Ng="Информация",Pg="Текст",Dg="Типы",Lg="массив",Ag="Содержание",Og="Элемент",Vg="Компонент",Ig="Все",_g="Изображение",nv=Object.freeze(Object.defineProperty({__proto__:null,Add:mg,All:Ig,Bold:yg,Border:dg,Close:tg,Component:Vg,Content:Ag,Delete:xg,Editing:gg,Element:Og,Global:lg,Image:_g,Images:Tg,Information:Ng,Landscape:Sg,Link:wg,List:vg,Margin:sg,Mobile:hg,Next:Bg,Options:Zu,Padding:ag,Portrait:Cg,Prev:Mg,Preview:fg,Publish:eg,Save:Qu,Search:kg,Select:ig,Specific:pg,Squarish:Eg,Styles:og,Text:Pg,Transparent:cg,Types:Dg,Typographies:ng,array:Lg,avatar:$u,component:rg,default:{"Reset Page":"Сбросить страницу","Global Page Styles":"Глобальные стили страницы","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Попробуйте мощный Click & Drop Page Builder — разработанный для разработчиков и создателей, которые хотят полного контроля без лишних хлопот. Настраивайте макеты, шрифты и цвета. Редактируйте контент визуально в реальном времени. Добавляйте медиа, встраивайте видео с YouTube или экспортируйте все в виде чистого HTML. С адаптивным редактированием, локальным автосохранением, поддержкой Tailwind и даже интеграцией Unsplash, это все, что вам нужно — в одном бесшовном конструкторе. Создавайте потрясающие страницы за считанные минуты.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Конструктор страниц, созданный для роста. Создавайте страницы вашего сайта с готовыми компонентами, которые полностью настраиваются и всегда адаптивны, разработаны для удовлетворения любых потребностей. Мощный конструктор страниц для растущих торговцев, брендов и агентств.","Everything you need. Break free from design limitations":"Все, что вам нужно. Освободитесь от ограничений дизайна","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Воплотите свою мечту в жизнь и создавайте впечатляющие страницы с помощью конструктора страниц с функцией перетаскивания","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Веб-конструктор для потрясающих страниц. Позвольте пользователям разрабатывать и публиковать современные страницы любого масштаба. Создавайте адаптивные страницы, такие как списки, вакансии или блоги, и легко управляйте контентом с помощью бесплатного конструктора страниц Click & Drop. Разработано с использованием TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS и HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Скачайте или установите наш мощный, гибкий и удобный бесплатный Vue 3 Page Builder через",Save:Qu,"Add new Components":"Добавить новые компоненты",Options:Zu,"Config Overview":"Обзор конфигурации","HTML Overview":"Обзор HTML","Delete Layout":"Удалить макет",avatar:$u,Publish:eg,"Add Components to Page":"Добавить компоненты на страницу",Close:tg,"Helper Components":"Вспомогательные компоненты","Click to add":"Нажмите, чтобы добавить",component:rg,"Layout Components":"Компоненты макета","Click to add component":"Нажмите, чтобы добавить компонент","Remove all Components":"Удалить все компоненты","Are you sure you want to remove all Components?":"Вы уверены, что хотите удалить все компоненты?",Styles:og,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Примените стили, которые влияют на всю страницу. Эти настройки включают глобальный шрифт, цвет текста, цвет фона и другие универсальные стили, которые применяются ко всем разделам.","Update Page Styles":"Обновить стили страницы","Download HTML":"Скачать HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Экспортируйте всю страницу как автономный HTML-файл. Это включает все разделы, содержимое и примененные стили, делая его готовым к использованию или интеграции в другом месте.","Download HTML file":"Скачать HTML файл",Typographies:ng,"Font Appearance":"Внешний вид шрифта","Font Size":"Размер шрифта",Select:ig,"Font size":"Размер шрифта","Font tablet size":"Размер шрифта для планшетов","Font small screens":"Размер шрифта для маленьких экранов","Font weight":"Толщина шрифта","Font family":"Семейство шрифтов","Font Style":"Стиль шрифта","Opacity & Transparency":"Непрозрачность и Прозрачность",Padding:ag,"Vertical Padding":"Вертикальный отступ","Horizontal Padding":"Горизонтальный отступ",Margin:sg,"Vertical Margin":"Вертикальное поле","Horizontal Margin":"Горизонтальное поле","Border Radius":"Радиус границы",Global:lg,Specific:pg,"Border Radius top left":"Радиус границы сверху слева","Border Radius top right":"Радиус границы сверху справа","Border Radius bottom left":"Радиус границы снизу слева","Border Radius bottom right":"Радиус границы снизу справа","Border Style, Width & Color":"Стиль, ширина и цвет границы",Border:dg,"Border Style":"Стиль границы","Border Width":"Ширина границы","Border Color":"Цвет границы",Transparent:cg,"Generated CSS":"Сгенерированный CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Это CSS, применяемый конструктором. Добавьте свой CSS и нажмите Enter, чтобы применить его к выбранному элементу.","Add your CSS.":"Добавьте свой CSS.","The pbx- prefix is added automatically.":"Префикс pbx- добавляется автоматически.","Type class":"Введите класс",Add:mg,"Inline Styles":"Встроенные стили","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Это встроенные стили, применяемые конструктором. Добавьте свои стили и нажмите Enter, чтобы применить их к выбранному элементу.","Add your own style.":"Добавьте свой стиль.",property:bg,value:ug,Editing:gg,"Loading...":"Загрузка...","Background Color":"Цвет фона","Text Color":"Цвет текста","Default black":"Черный по умолчанию","Remove Component?":"Удалить компонент?","Are you sure you want to remove this Component?":"Вы уверены, что хотите удалить этот компонент?",Delete:xg,"Add to the bottom":"Добавить в конец",Preview:fg,Mobile:hg,"Demo Content":"Демонстрационный контент","Demo Description":"Представляем легкий и бесплатный Vue Click & Drop Page Builder. Создавайте и улучшайте цифровые впечатления с помощью Vue. Не все мощное должно быть сложным. Этот минималистичный и легкий конструктор страниц предлагает элегантный, интуитивно понятный интерфейс, ориентированный на простоту и скорость. Создавайте полностью адаптивные страницы, такие как списки, доски объявлений или блоги, и легко управляйте своим контентом с помощью бесплатного Click & Drop Page Builder.","Demo Description Two":"Конструктор страниц, созданный для роста. Создавайте страницы вашего сайта с готовыми компонентами, которые полностью настраиваются и всегда адаптивны, разработаны для удовлетворения любых потребностей. Мощный конструктор страниц для растущих торговцев, брендов и агентств.","Demo Description Three":"Конструктор сайтов, любимый дизайнерами. Легко проектируйте, просматривайте и настраивайте макеты для каждого размера экрана. Чистый. Быстрый. Интуитивно понятный. Не все мощное должно выглядеть сложным.","Demo Description Four":"Убедитесь, что ваш сайт отлично выглядит на всех устройствах. Редактируйте текстовый контент вживую и в режиме реального времени. Выбирайте идеальные шрифты, соответствующие вашему стилю. Уверенно экспериментируйте с возможностью отмены изменений. Стили с префиксами. Нет риска конфликтов стилей между конструктором и вашим приложением.","Demo Title":"Веб-конструктор для потрясающих страниц","Demo Title Two":"Просто опубликуйте это с помощью Vue","Demo Title Three":"Адаптивное редактирование","Edit text and links":"Редактировать текст и ссылки","Enter URL":"Введите URL","Line break":"Разрыв строки",Bold:yg,Link:wg,"Header 2":"Заголовок 2","Header 3":"Заголовок 3",List:vg,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Добавьте действительный URL, чтобы преобразовать выделенный текст в кликабельную гиперссылку, которая направляет пользователей на указанный веб-адрес.","Select image":"Выбрать изображение","Manage Content":"Управление контентом","Media Library":"Медиатека","Reset changes":"Сбросить изменения","Do you want to reset this page?":"Вы хотите сбросить эту страницу?","Are you sure you want to reset this page? This will overwrite your current changes.":"Вы уверены, что хотите сбросить эту страницу? Это перезапишет ваши текущие изменения.",Search:kg,"Search...":"Поиск...",Landscape:Sg,Portrait:Cg,Squarish:Eg,"Total pages":"Всего страниц",Images:Tg,"First page":"Первая страница",Prev:Mg,Next:Bg,"By:":"Автор:","We did not find any images. Make a new search.":"Мы не нашли изображений. Выполните новый поиск.","No results on current page. Navigate to First Page.":"На текущей странице нет результатов. Перейдите на первую страницу.",Information:Ng,"From:":"От:"," Select image":" Выбрать изображение","Layouts and visual.":"Макеты и визуализация.","Start customizing by editing this default text directly in the editor.":"Начните настройку, отредактировав этот текст по умолчанию прямо в редакторе.","Single Image":"Одиночное изображение","Two Vertical Images":"Два вертикальных изображения","Two Square Images":"Два квадратных изображения","Three Square Images":"Три квадратных изображения","Six Square Images Grid":"Сетка из шести квадратных изображений","Three Square Images With Text":"Три квадратных изображения с текстом","Three Vertical Images":"Два квадратных изображения с текстом",Text:Pg,"Header H2":"Заголовок H2","Header H3":"Заголовок H3","YouTube Video":"Видео YouTube","Break Divider":"Разделитель","Two Square Images With Text":"Два квадратных изображения с текстом","Selected HTML":"Выбранный HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Обзор выбранного элемента, компонента и компонентов. Этот раздел предоставляет обновления в реальном времени на основе вашего выбора HTML.",Types:Dg,"Element type:":"Тип элемента:","Component type:":"Тип компонента:","Components:":"Компоненты:",array:Lg,Content:Ag,Element:Og,Component:Vg,"Components added":"Добавленные компоненты","No Element selected":"Элемент не выбран","Selected HTML:":"Выбранный HTML:","Element src:":"Источник элемента:","Element classes:":"Классы элемента:","No Component selected":"Компонент не выбран","ID:":"ID:","Title:":"Заголовок:","HTML Code:":"HTML-код:","No Components added yet":"Компоненты еще не добавлены",All:Ig,Image:_g,"Image & Text":"Изображение и текст","Four Square Images With Text":"Четыре квадратных изображения с текстом","Four Square Images":"Четыре квадратных изображения","Continue Your Work?":"Продолжить работу?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Мы заметили, что у вас есть несохраненные изменения с прошлого раза. Хотите продолжить с того места, где остановились, или использовать версию, загруженную из базы данных?","Use Saved Version":"Использовать сохраненную версию","Continue Where I Left Off":"Продолжить с того места, где я остановился","HTML Editor":"HTML-редактор","Gain full control over components by editing the raw HTML.":"Получите полный контроль над компонентами, редактируя необработанный HTML-код.","Large Screens Only":"Только большие экраны"},property:bg,value:ug},Symbol.toStringTag,{value:"Module"})),Rg="保存",Hg="选项",zg="头像",Fg="发布",jg="组件",qg="样式",Wg="排版",Ug="选择",Gg="内边距",Kg="边距",Jg="全局",Yg="具体",Xg="边框",Qg="透明",Zg="添加",$g="属性",ex="值",tx="关闭",rx="编辑",ox="删除",nx="预览",ix="移动",ax="加粗",sx="列表",lx="搜索",px="横向",dx="纵向",cx="方形",mx="图片",bx="上一页",ux="下一页",gx="信息",xx="文本",fx="链接",hx="类型",yx="数组",wx="内容",vx="元素",kx="组件",Sx="全部",Cx="图片",iv=Object.assign({"../locales/ar.json":Xw,"../locales/de.json":Qw,"../locales/en.json":Zw,"../locales/es.json":$w,"../locales/fr.json":ev,"../locales/hi.json":tv,"../locales/ja.json":rv,"../locales/pt.json":ov,"../locales/ru.json":nv,"../locales/zh-Hans.json":Object.freeze(Object.defineProperty({__proto__:null,Add:Zg,All:Sx,Bold:ax,Border:Xg,Close:tx,Component:kx,Content:wx,Delete:ox,Editing:rx,Element:vx,Global:Jg,Image:Cx,Images:mx,Information:gx,Landscape:px,Link:fx,List:sx,Margin:Kg,Mobile:ix,Next:ux,Options:Hg,Padding:Gg,Portrait:dx,Prev:bx,Preview:nx,Publish:Fg,Save:Rg,Search:lx,Select:Ug,Specific:Yg,Squarish:cx,Styles:qg,Text:xx,Transparent:Qg,Types:hx,Typographies:Wg,array:yx,avatar:zg,component:jg,default:{"Reset Page":"重置页面","Global Page Styles":"全局页面样式","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"试试强大的Click & Drop Page Builder——专为希望完全控制而无需麻烦的开发者和创作者设计。自定义布局、字体和颜色。实时可视化编辑内容。添加媒体、嵌入YouTube视频或将所有内容导出为干净的HTML。凭借响应式编辑、本地自动保存、Tailwind支持,甚至Unsplash集成,它是您所需的一切——集成在一个无缝的构建器中。几分钟内构建令人惊叹的页面。","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"为增长而设计的页面构建器。使用完全可定制且始终响应的现成组件构建您的网站页面,旨在满足所有需求。为不断发展的商家、品牌和代理商提供强大的页面构建器。","Everything you need. Break free from design limitations":"您需要的一切。突破设计限制","Bring your vision to life and create impressive pages using a click & drop Page Builder":"实现您的愿景,并使用点击和拖放页面构建器创建令人印象深刻的页面","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"令人惊叹页面的网页构建器。使用户能够设计和发布任何规模的现代页面。创建响应式页面,例如列表、工作或博客文章,并使用免费的点击和拖放页面构建器轻松管理内容。使用 TypeScript、Vue 3、Composition API、Pinia、CSS、Tailwind CSS 和 HTML 开发。","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"通过下载或安装我们强大、灵活且易于使用的免费 Vue 3 页面构建器",Save:Rg,"Add new Components":"添加新组件",Options:Hg,"Config Overview":"配置概览","HTML Overview":"HTML概览","Delete Layout":"删除布局",avatar:zg,Publish:Fg,"Add Components to Page":"将组件添加到页面","Helper Components":"辅助组件","Click to add":"点击添加",component:jg,"Layout Components":"布局组件","Click to add component":"点击添加组件","Remove all Components":"删除所有组件","Are you sure you want to remove all Components?":"您确定要删除所有组件吗?",Styles:qg,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"应用影响整个页面的样式。这些设置包括全局字体系列、文本颜色、背景颜色和适用于所有部分的其他通用样式。","Update Page Styles":"更新页面样式","Download HTML":"下载HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"将整个页面导出为独立的HTML文件。这包括所有部分、内容和应用的样式,使其可以随时使用或集成到其他地方。","Download HTML file":"下载HTML文件",Typographies:Wg,"Font Appearance":"字体外观","Font Size":"字体大小",Select:Ug,"Font size":"字体大小","Font tablet size":"平板字体大小","Font small screens":"小屏幕字体大小","Font weight":"字体粗细","Font family":"字体家族","Font Style":"字体样式","Opacity & Transparency":"不透明度和透明度",Padding:Gg,"Vertical Padding":"垂直内边距","Horizontal Padding":"水平内边距",Margin:Kg,"Vertical Margin":"垂直边距","Horizontal Margin":"水平边距","Border Radius":"边框半径",Global:Jg,Specific:Yg,"Border Radius top left":"边框半径 左上","Border Radius top right":"边框半径 右上","Border Radius bottom left":"边框半径 左下","Border Radius bottom right":"边框半径 右下","Border Style, Width & Color":"边框样式、宽度和颜色",Border:Xg,"Border Style":"边框样式","Border Width":"边框宽度","Border Color":"边框颜色",Transparent:Qg,"Generated CSS":"生成的CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"这是构建器应用的CSS。添加您自己的CSS并按Enter将其应用于选定的元素。","Add your CSS.":"添加您的CSS。","The pbx- prefix is added automatically.":"pbx-前缀会自动添加。","Type class":"输入类",Add:Zg,"Inline Styles":"内联样式","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"这些是构建器应用的内联样式。添加您自己的样式,然后按 Enter 将其应用于选定的元素。","Add your own style.":"添加您自己的样式。",property:$g,value:ex,Close:tx,Editing:rx,"Loading...":"加载中...","Background Color":"背景颜色","Text Color":"文字颜色","Default black":"默认黑色","Remove Component?":"删除组件?","Are you sure you want to remove this Component?":"您确定要删除此组件吗?",Delete:ox,"Add to the bottom":"添加到底部",Preview:nx,Mobile:ix,"Demo Content":"演示内容","Demo Description":"介绍轻量级和免费的Vue Click & Drop页面构建器。使用Vue轻松创建和增强数字体验。并非所有强大的东西都需要复杂。这款简约轻便的页面构建器提供了一个优雅直观的界面,专注于简单性和速度。创建完全响应式的页面,例如列表、职位板或博客文章,并使用免费的Click & Drop页面构建器轻松管理您的内容。","Demo Title":"令人惊叹的页面的网页构建器","Demo Description Two":"为增长而设计的页面构建器。使用完全可定制且始终响应的现成组件构建您的网站页面,旨在满足所有需求。为不断发展的商家、品牌和代理商提供强大的页面构建器。","Demo Description Three":"设计师喜爱的网站构建器。轻松设计、预览和调整每个屏幕尺寸的布局。干净。快速。直观。并非所有强大的东西都必须看起来很复杂。","Demo Description Four":"确保您的网站在所有设备上看起来都很棒。实时编辑文本内容。选择与您的风格相匹配的完美字体。自信地进行实验,并能够轻松复更改。样式前缀。构建器和您的应用程序之间没有样式冲突的风险。","Demo Title Two":"只需使用Vue发布即可","Demo Title Three":"响应式编辑","Edit text and links":"编辑文本和链接","Enter URL":"输入URL","Line break":"换行",Bold:ax,"Header 2":"标题2","Header 3":"标题3",List:sx,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"添加一个有效的URL,将选定的文本转换为可点击的超链接,指向指定的网页地址。","Select image":"选择图片","Manage Content":"管理内容","Media Library":"媒体库","Reset changes":"重置更改","Do you want to reset this page?":"您想重置此页面吗?","Are you sure you want to reset this page? This will overwrite your current changes.":"您确定要重置此页面吗?这将覆盖您当前的更改。",Search:lx,"Search...":"搜索...",Landscape:px,Portrait:dx,Squarish:cx,"Total pages":"总页数",Images:mx,"First page":"第一页",Prev:bx,Next:ux,"By:":"作者:","We did not find any images. Make a new search.":"我们没有找到任何图片。请重新搜索。","No results on current page. Navigate to First Page.":"当前页面没有结果。导航到第一页。",Information:gx,"From:":"来自:"," Select image":" 选择图片","Layouts and visual.":"布局和视觉。","Start customizing by editing this default text directly in the editor.":"通过直接在编辑器中编辑此默认文本开始自定义。","Single Image":"单张图片","Two Vertical Images":"两张竖直图片","Two Square Images":"两张方形图片","Three Square Images":"三张方形图片","Six Square Images Grid":"六张方形图片网格","Three Vertical Images":"三张竖直图片","Three Square Images With Text":"三张方形图片和文字","Two Square Images With Text":"两张方形图片和文字",Text:xx,"Header H2":"标题 H2","Header H3":"标题 H3","YouTube Video":"YouTube 视频","Break Divider":"分隔线",Link:fx,"Selected HTML":"选定的HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"所选元素、组件和组件的概述。本节根据您的HTML选择提供实时更新。",Types:hx,"Element type:":"元素类型:","Component type:":"组件类型:","Components:":"组件:",array:yx,Content:wx,Element:vx,Component:kx,"Components added":"添加的组件","No Element selected":"未选择元素","Selected HTML:":"选定的HTML:","Element src:":"元素来源:","Element classes:":"元素类:","No Component selected":"未选择组件","ID:":"ID:","Title:":"标题:","HTML Code:":"HTML代码:","No Components added yet":"尚未添加组件",All:Sx,Image:Cx,"Image & Text":"图片和文字","Four Square Images With Text":"四张带文字的方形图片","Four Square Images":"四张方形图片","Continue Your Work?":"继续您的工作?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"我们注意到您上次有一些更改没有保存。您是想从上次离开的地方继续,还是使用当前从数据库加载的版本?","Use Saved Version":"使用保存的版本","Continue Where I Left Off":"从我离开的地方继续","HTML Editor":"HTML 编辑器","Gain full control over components by editing the raw HTML.":"通过编辑原始 HTML 获得对组件的完全控制。","Large Screens Only":"仅限大屏幕"},property:$g,value:ex},Symbol.toStringTag,{value:"Module"}))}),va=i.ref({});async function Ex(r){try{const e=`../locales/${r}.json`,t=iv[e];if(t&&typeof t=="object"&&"default"in t)va.value=t.default;else throw new Error("Locale not found")}catch(e){console.error(`Could not load translations for language: ${r}`,e),r!=="en"&&await Ex("en")}}function pe(){function r(e){return va.value[e]||e}return{translate:r,loadTranslations:Ex,currentTranslations:i.readonly(va)}}const av={class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-myPrimaryGap"},sv={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},lv=["disabled"],pv=["disabled"],dv={__name:"ComponentTopMenu",setup(r){const{translate:e}=pe(),t=ie(),o=i.ref(!1),n=i.ref(""),a=i.ref(1),s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=i.ref(null),m=i.ref(null),b=i.ref(null),u=i.ref(null),g=i.computed(()=>t.canMoveUp()),f=i.computed(()=>t.canMoveDown()),x=function(){o.value=!0,n.value="delete",a.value=2,s.value=e("Remove Component?"),l.value=e("Are you sure you want to remove this Component?"),p.value=e("Close"),d.value=null,c.value=e("Delete"),m.value=function(){o.value=!1},u.value=async function(){await t.deleteComponentFromDOM(),o.value=!1}};return(y,w)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(Zt,{showDynamicModalBuilder:o.value,type:n.value,gridColumnAmount:a.value,title:s.value,description:l.value,firstButtonText:p.value,secondButtonText:d.value,thirdButtonText:c.value,onFirstModalButtonFunctionDynamicModalBuilder:m.value,onSecondModalButtonFunctionDynamicModalBuilder:b.value,onThirdModalButtonFunctionDynamicModalBuilder:u.value},{default:i.withCtx(()=>w[3]||(w[3]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[3]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",av,[i.createElementVNode("div",sv,[i.createElementVNode("div",{onClick:w[0]||(w[0]=v=>x()),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},w[4]||(w[4]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ",-1)]))]),i.createElementVNode("button",{type:"button",onClick:w[1]||(w[1]=v=>i.unref(t).reorderComponent(-1)),disabled:!g.value,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black",[g.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},w[5]||(w[5]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_up ",-1)]),10,lv),i.createElementVNode("button",{type:"button",onClick:w[2]||(w[2]=v=>i.unref(t).reorderComponent(1)),disabled:!f.value,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black",[f.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},w[6]||(w[6]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_down ",-1)]),10,pv)])],64))}};function Se(r){this.content=r}Se.prototype={constructor:Se,find:function(r){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===r)return e;return-1},get:function(r){var e=this.find(r);return e==-1?void 0:this.content[e+1]},update:function(r,e,t){var o=t&&t!=r?this.remove(t):this,n=o.find(r),a=o.content.slice();return n==-1?a.push(t||r,e):(a[n+1]=e,t&&(a[n]=t)),new Se(a)},remove:function(r){var e=this.find(r);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new Se(t)},addToStart:function(r,e){return new Se([r,e].concat(this.remove(r).content))},addToEnd:function(r,e){var t=this.remove(r).content.slice();return t.push(r,e),new Se(t)},addBefore:function(r,e,t){var o=this.remove(e),n=o.content.slice(),a=o.find(r);return n.splice(a==-1?n.length:a,0,e,t),new Se(n)},forEach:function(r){for(var e=0;e<this.content.length;e+=2)r(this.content[e],this.content[e+1])},prepend:function(r){return r=Se.from(r),r.size?new Se(r.content.concat(this.subtract(r).content)):this},append:function(r){return r=Se.from(r),r.size?new Se(this.subtract(r).content.concat(r.content)):this},subtract:function(r){var e=this;r=Se.from(r);for(var t=0;t<r.content.length;t+=2)e=e.remove(r.content[t]);return e},toObject:function(){var r={};return this.forEach(function(e,t){r[e]=t}),r},get size(){return this.content.length>>1}},Se.from=function(r){if(r instanceof Se)return r;var e=[];if(r)for(var t in r)e.push(t,r[t]);return new Se(e)};function Tx(r,e,t){for(let o=0;;o++){if(o==r.childCount||o==e.childCount)return r.childCount==e.childCount?null:t;let n=r.child(o),a=e.child(o);if(n==a){t+=n.nodeSize;continue}if(!n.sameMarkup(a))return t;if(n.isText&&n.text!=a.text){for(let s=0;n.text[s]==a.text[s];s++)t++;return t}if(n.content.size||a.content.size){let s=Tx(n.content,a.content,t+1);if(s!=null)return s}t+=n.nodeSize}}function Mx(r,e,t,o){for(let n=r.childCount,a=e.childCount;;){if(n==0||a==0)return n==a?null:{a:t,b:o};let s=r.child(--n),l=e.child(--a),p=s.nodeSize;if(s==l){t-=p,o-=p;continue}if(!s.sameMarkup(l))return{a:t,b:o};if(s.isText&&s.text!=l.text){let d=0,c=Math.min(s.text.length,l.text.length);for(;d<c&&s.text[s.text.length-d-1]==l.text[l.text.length-d-1];)d++,t--,o--;return{a:t,b:o}}if(s.content.size||l.content.size){let d=Mx(s.content,l.content,t-1,o-1);if(d)return d}t-=p,o-=p}}class N{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let o=0;o<e.length;o++)this.size+=e[o].nodeSize}nodesBetween(e,t,o,n=0,a){for(let s=0,l=0;l<t;s++){let p=this.content[s],d=l+p.nodeSize;if(d>e&&o(p,n+l,a||null,s)!==!1&&p.content.size){let c=l+1;p.nodesBetween(Math.max(0,e-c),Math.min(p.content.size,t-c),o,n+c)}l=d}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,o,n){let a="",s=!0;return this.nodesBetween(e,t,(l,p)=>{let d=l.isText?l.text.slice(Math.max(e,p)-p,t-p):l.isLeaf?n?typeof n=="function"?n(l):n:l.type.spec.leafText?l.type.spec.leafText(l):"":"";l.isBlock&&(l.isLeaf&&d||l.isTextblock)&&o&&(s?s=!1:a+=o),a+=d},0),a}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,o=e.firstChild,n=this.content.slice(),a=0;for(t.isText&&t.sameMarkup(o)&&(n[n.length-1]=t.withText(t.text+o.text),a=1);a<e.content.length;a++)n.push(e.content[a]);return new N(n,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let o=[],n=0;if(t>e)for(let a=0,s=0;s<t;a++){let l=this.content[a],p=s+l.nodeSize;p>e&&((s<e||p>t)&&(l.isText?l=l.cut(Math.max(0,e-s),Math.min(l.text.length,t-s)):l=l.cut(Math.max(0,e-s-1),Math.min(l.content.size,t-s-1))),o.push(l),n+=l.nodeSize),s=p}return new N(o,n)}cutByIndex(e,t){return e==t?N.empty:e==0&&t==this.content.length?this:new N(this.content.slice(e,t))}replaceChild(e,t){let o=this.content[e];if(o==t)return this;let n=this.content.slice(),a=this.size+t.nodeSize-o.nodeSize;return n[e]=t,new N(n,a)}addToStart(e){return new N([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new N(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,o=0;t<this.content.length;t++){let n=this.content[t];e(n,o,t),o+=n.nodeSize}}findDiffStart(e,t=0){return Tx(this,e,t)}findDiffEnd(e,t=this.size,o=e.size){return Mx(this,e,t,o)}findIndex(e,t=-1){if(e==0)return Rn(0,e);if(e==this.size)return Rn(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let o=0,n=0;;o++){let a=this.child(o),s=n+a.nodeSize;if(s>=e)return s==e||t>0?Rn(o+1,s):Rn(o,n);n=s}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return N.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new N(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return N.empty;let t,o=0;for(let n=0;n<e.length;n++){let a=e[n];o+=a.nodeSize,n&&a.isText&&e[n-1].sameMarkup(a)?(t||(t=e.slice(0,n)),t[t.length-1]=a.withText(t[t.length-1].text+a.text)):t&&t.push(a)}return new N(t||e,o)}static from(e){if(!e)return N.empty;if(e instanceof N)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new N([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}N.empty=new N([],0);const ka={index:0,offset:0};function Rn(r,e){return ka.index=r,ka.offset=e,ka}function Hn(r,e){if(r===e)return!0;if(!(r&&typeof r=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(r);if(Array.isArray(e)!=t)return!1;if(t){if(r.length!=e.length)return!1;for(let o=0;o<r.length;o++)if(!Hn(r[o],e[o]))return!1}else{for(let o in r)if(!(o in e)||!Hn(r[o],e[o]))return!1;for(let o in e)if(!(o in r))return!1}return!0}let te=class Rl{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,o=!1;for(let n=0;n<e.length;n++){let a=e[n];if(this.eq(a))return e;if(this.type.excludes(a.type))t||(t=e.slice(0,n));else{if(a.type.excludes(this.type))return e;!o&&a.type.rank>this.type.rank&&(t||(t=e.slice(0,n)),t.push(this),o=!0),t&&t.push(a)}}return t||(t=e.slice()),o||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hn(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let o=e.marks[t.type];if(!o)throw new RangeError(`There is no mark type ${t.type} in this schema`);let n=o.create(t.attrs);return o.checkAttrs(n.attrs),n}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let o=0;o<e.length;o++)if(!e[o].eq(t[o]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Rl.none;if(e instanceof Rl)return[e];let t=e.slice();return t.sort((o,n)=>o.type.rank-n.type.rank),t}};te.none=[];class zn extends Error{}class O{constructor(e,t,o){this.content=e,this.openStart=t,this.openEnd=o}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let o=Nx(this.content,e+this.openStart,t);return o&&new O(o,this.openStart,this.openEnd)}removeBetween(e,t){return new O(Bx(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return O.empty;let o=t.openStart||0,n=t.openEnd||0;if(typeof o!="number"||typeof n!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new O(N.fromJSON(e,t.content),o,n)}static maxOpen(e,t=!0){let o=0,n=0;for(let a=e.firstChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.firstChild)o++;for(let a=e.lastChild;a&&!a.isLeaf&&(t||!a.type.spec.isolating);a=a.lastChild)n++;return new O(e,o,n)}}O.empty=new O(N.empty,0,0);function Bx(r,e,t){let{index:o,offset:n}=r.findIndex(e),a=r.maybeChild(o),{index:s,offset:l}=r.findIndex(t);if(n==e||a.isText){if(l!=t&&!r.child(s).isText)throw new RangeError("Removing non-flat range");return r.cut(0,e).append(r.cut(t))}if(o!=s)throw new RangeError("Removing non-flat range");return r.replaceChild(o,a.copy(Bx(a.content,e-n-1,t-n-1)))}function Nx(r,e,t,o){let{index:n,offset:a}=r.findIndex(e),s=r.maybeChild(n);if(a==e||s.isText)return r.cut(0,e).append(t).append(r.cut(e));let l=Nx(s.content,e-a-1,t);return l&&r.replaceChild(n,s.copy(l))}function cv(r,e,t){if(t.openStart>r.depth)throw new zn("Inserted content deeper than insertion position");if(r.depth-t.openStart!=e.depth-t.openEnd)throw new zn("Inconsistent open depths");return Px(r,e,t,0)}function Px(r,e,t,o){let n=r.index(o),a=r.node(o);if(n==e.index(o)&&o<r.depth-t.openStart){let s=Px(r,e,t,o+1);return a.copy(a.content.replaceChild(n,s))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&r.depth==o&&e.depth==o){let s=r.parent,l=s.content;return Nr(s,l.cut(0,r.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:s,end:l}=mv(t,r);return Nr(a,Lx(r,s,l,e,o))}else return Nr(a,Fn(r,e,o))}function Dx(r,e){if(!e.type.compatibleContent(r.type))throw new zn("Cannot join "+e.type.name+" onto "+r.type.name)}function Sa(r,e,t){let o=r.node(t);return Dx(o,e.node(t)),o}function Br(r,e){let t=e.length-1;t>=0&&r.isText&&r.sameMarkup(e[t])?e[t]=r.withText(e[t].text+r.text):e.push(r)}function Io(r,e,t,o){let n=(e||r).node(t),a=0,s=e?e.index(t):n.childCount;r&&(a=r.index(t),r.depth>t?a++:r.textOffset&&(Br(r.nodeAfter,o),a++));for(let l=a;l<s;l++)Br(n.child(l),o);e&&e.depth==t&&e.textOffset&&Br(e.nodeBefore,o)}function Nr(r,e){return r.type.checkContent(e),r.copy(e)}function Lx(r,e,t,o,n){let a=r.depth>n&&Sa(r,e,n+1),s=o.depth>n&&Sa(t,o,n+1),l=[];return Io(null,r,n,l),a&&s&&e.index(n)==t.index(n)?(Dx(a,s),Br(Nr(a,Lx(r,e,t,o,n+1)),l)):(a&&Br(Nr(a,Fn(r,e,n+1)),l),Io(e,t,n,l),s&&Br(Nr(s,Fn(t,o,n+1)),l)),Io(o,null,n,l),new N(l)}function Fn(r,e,t){let o=[];if(Io(null,r,t,o),r.depth>t){let n=Sa(r,e,t+1);Br(Nr(n,Fn(r,e,t+1)),o)}return Io(e,null,t,o),new N(o)}function mv(r,e){let t=e.depth-r.openStart,n=e.node(t).copy(r.content);for(let a=t-1;a>=0;a--)n=e.node(a).copy(N.from(n));return{start:n.resolveNoCache(r.openStart+t),end:n.resolveNoCache(n.content.size-r.openEnd-t)}}class _o{constructor(e,t,o){this.pos=e,this.path=t,this.parentOffset=o,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let o=this.pos-this.path[this.path.length-1],n=e.child(t);return o?e.child(t).cut(o):n}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let o=this.path[t*3],n=t==0?0:this.path[t*3-1]+1;for(let a=0;a<e;a++)n+=o.child(a).nodeSize;return n}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return te.none;if(this.textOffset)return e.child(t).marks;let o=e.maybeChild(t-1),n=e.maybeChild(t);if(!o){let l=o;o=n,n=l}let a=o.marks;for(var s=0;s<a.length;s++)a[s].type.spec.inclusive===!1&&(!n||!a[s].isInSet(n.marks))&&(a=a[s--].removeFromSet(a));return a}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let o=t.marks,n=e.parent.maybeChild(e.index());for(var a=0;a<o.length;a++)o[a].type.spec.inclusive===!1&&(!n||!o[a].isInSet(n.marks))&&(o=o[a--].removeFromSet(o));return o}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let o=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);o>=0;o--)if(e.pos<=this.end(o)&&(!t||t(this.node(o))))return new jn(this,e,o);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let o=[],n=0,a=t;for(let s=e;;){let{index:l,offset:p}=s.content.findIndex(a),d=a-p;if(o.push(s,l,n+p),!d||(s=s.child(l),s.isText))break;a=d-1,n+=p+1}return new _o(t,o,a)}static resolveCached(e,t){let o=Ax.get(e);if(o)for(let a=0;a<o.elts.length;a++){let s=o.elts[a];if(s.pos==t)return s}else Ax.set(e,o=new bv);let n=o.elts[o.i]=_o.resolve(e,t);return o.i=(o.i+1)%uv,n}}class bv{constructor(){this.elts=[],this.i=0}}const uv=12,Ax=new WeakMap;class jn{constructor(e,t,o){this.$from=e,this.$to=t,this.depth=o}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 gv=Object.create(null);let tr=class Hl{constructor(e,t,o,n=te.none){this.type=e,this.attrs=t,this.marks=n,this.content=o||N.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,t,o,n=0){this.content.nodesBetween(e,t,o,n,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,o,n){return this.content.textBetween(e,t,o,n)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,o){return this.type==e&&Hn(this.attrs,t||e.defaultAttrs||gv)&&te.sameSet(this.marks,o||te.none)}copy(e=null){return e==this.content?this:new Hl(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new Hl(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,o=!1){if(e==t)return O.empty;let n=this.resolve(e),a=this.resolve(t),s=o?0:n.sharedDepth(t),l=n.start(s),d=n.node(s).content.cut(n.pos-l,a.pos-l);return new O(d,n.depth-s,a.depth-s)}replace(e,t,o){return cv(this.resolve(e),this.resolve(t),o)}nodeAt(e){for(let t=this;;){let{index:o,offset:n}=t.content.findIndex(e);if(t=t.maybeChild(o),!t)return null;if(n==e||t.isText)return t;e-=n+1}}childAfter(e){let{index:t,offset:o}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:o}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:o}=this.content.findIndex(e);if(o<e)return{node:this.content.child(t),index:t,offset:o};let n=this.content.child(t-1);return{node:n,index:t-1,offset:o-n.nodeSize}}resolve(e){return _o.resolveCached(this,e)}resolveNoCache(e){return _o.resolve(this,e)}rangeHasMark(e,t,o){let n=!1;return t>e&&this.nodesBetween(e,t,a=>(o.isInSet(a.marks)&&(n=!0),!n)),n}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()+")"),Ox(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,o=N.empty,n=0,a=o.childCount){let s=this.contentMatchAt(e).matchFragment(o,n,a),l=s&&s.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let p=n;p<a;p++)if(!this.type.allowsMarks(o.child(p).marks))return!1;return!0}canReplaceWith(e,t,o,n){if(n&&!this.type.allowsMarks(n))return!1;let a=this.contentMatchAt(e).matchType(o),s=a&&a.matchFragment(this.content,t);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=te.none;for(let t=0;t<this.marks.length;t++){let o=this.marks[t];o.type.checkAttrs(o.attrs),e=o.addToSet(e)}if(!te.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let o;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");o=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,o)}let n=N.fromJSON(e,t.content),a=e.nodeType(t.type).create(t.attrs,n,o);return a.type.checkAttrs(a.attrs),a}};tr.prototype.text=void 0;class qn extends tr{constructor(e,t,o,n){if(super(e,t,null,n),!o)throw new RangeError("Empty text nodes are not allowed");this.text=o}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Ox(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new qn(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new qn(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function Ox(r,e){for(let t=r.length-1;t>=0;t--)e=r[t].type.name+"("+e+")";return e}class Pr{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let o=new xv(e,t);if(o.next==null)return Pr.empty;let n=Vx(o);o.next&&o.err("Unexpected trailing text");let a=Sv(kv(n));return Cv(a,o),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,o=e.childCount){let n=this;for(let a=t;n&&a<o;a++)n=n.matchType(e.child(a).type);return n}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let o=0;o<e.next.length;o++)if(this.next[t].type==e.next[o].type)return!0;return!1}fillBefore(e,t=!1,o=0){let n=[this];function a(s,l){let p=s.matchFragment(e,o);if(p&&(!t||p.validEnd))return N.from(l.map(d=>d.createAndFill()));for(let d=0;d<s.next.length;d++){let{type:c,next:m}=s.next[d];if(!(c.isText||c.hasRequiredAttrs())&&n.indexOf(m)==-1){n.push(m);let b=a(m,l.concat(c));if(b)return b}}return null}return a(this,[])}findWrapping(e){for(let o=0;o<this.wrapCache.length;o+=2)if(this.wrapCache[o]==e)return this.wrapCache[o+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),o=[{match:this,type:null,via:null}];for(;o.length;){let n=o.shift(),a=n.match;if(a.matchType(e)){let s=[];for(let l=n;l.type;l=l.via)s.push(l.type);return s.reverse()}for(let s=0;s<a.next.length;s++){let{type:l,next:p}=a.next[s];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!n.type||p.validEnd)&&(o.push({match:l.contentMatch,type:l,via:n}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(o){e.push(o);for(let n=0;n<o.next.length;n++)e.indexOf(o.next[n].next)==-1&&t(o.next[n].next)}return t(this),e.map((o,n)=>{let a=n+(o.validEnd?"*":" ")+" ";for(let s=0;s<o.next.length;s++)a+=(s?", ":"")+o.next[s].type.name+"->"+e.indexOf(o.next[s].next);return a}).join(`
8
+ `)}}Pr.empty=new Pr(!0);class xv{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function Vx(r){let e=[];do e.push(fv(r));while(r.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function fv(r){let e=[];do e.push(hv(r));while(r.next&&r.next!=")"&&r.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function hv(r){let e=vv(r);for(;;)if(r.eat("+"))e={type:"plus",expr:e};else if(r.eat("*"))e={type:"star",expr:e};else if(r.eat("?"))e={type:"opt",expr:e};else if(r.eat("{"))e=yv(r,e);else break;return e}function Ix(r){/\D/.test(r.next)&&r.err("Expected number, got '"+r.next+"'");let e=Number(r.next);return r.pos++,e}function yv(r,e){let t=Ix(r),o=t;return r.eat(",")&&(r.next!="}"?o=Ix(r):o=-1),r.eat("}")||r.err("Unclosed braced range"),{type:"range",min:t,max:o,expr:e}}function wv(r,e){let t=r.nodeTypes,o=t[e];if(o)return[o];let n=[];for(let a in t){let s=t[a];s.isInGroup(e)&&n.push(s)}return n.length==0&&r.err("No node type or group '"+e+"' found"),n}function vv(r){if(r.eat("(")){let e=Vx(r);return r.eat(")")||r.err("Missing closing paren"),e}else if(/\W/.test(r.next))r.err("Unexpected token '"+r.next+"'");else{let e=wv(r,r.next).map(t=>(r.inline==null?r.inline=t.isInline:r.inline!=t.isInline&&r.err("Mixing inline and block content"),{type:"name",value:t}));return r.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function kv(r){let e=[[]];return n(a(r,0),t()),e;function t(){return e.push([])-1}function o(s,l,p){let d={term:p,to:l};return e[s].push(d),d}function n(s,l){s.forEach(p=>p.to=l)}function a(s,l){if(s.type=="choice")return s.exprs.reduce((p,d)=>p.concat(a(d,l)),[]);if(s.type=="seq")for(let p=0;;p++){let d=a(s.exprs[p],l);if(p==s.exprs.length-1)return d;n(d,l=t())}else if(s.type=="star"){let p=t();return o(l,p),n(a(s.expr,p),p),[o(p)]}else if(s.type=="plus"){let p=t();return n(a(s.expr,l),p),n(a(s.expr,p),p),[o(p)]}else{if(s.type=="opt")return[o(l)].concat(a(s.expr,l));if(s.type=="range"){let p=l;for(let d=0;d<s.min;d++){let c=t();n(a(s.expr,p),c),p=c}if(s.max==-1)n(a(s.expr,p),p);else for(let d=s.min;d<s.max;d++){let c=t();o(p,c),n(a(s.expr,p),c),p=c}return[o(p)]}else{if(s.type=="name")return[o(l,void 0,s.value)];throw new Error("Unknown expr type")}}}}function _x(r,e){return e-r}function Rx(r,e){let t=[];return o(e),t.sort(_x);function o(n){let a=r[n];if(a.length==1&&!a[0].term)return o(a[0].to);t.push(n);for(let s=0;s<a.length;s++){let{term:l,to:p}=a[s];!l&&t.indexOf(p)==-1&&o(p)}}}function Sv(r){let e=Object.create(null);return t(Rx(r,0));function t(o){let n=[];o.forEach(s=>{r[s].forEach(({term:l,to:p})=>{if(!l)return;let d;for(let c=0;c<n.length;c++)n[c][0]==l&&(d=n[c][1]);Rx(r,p).forEach(c=>{d||n.push([l,d=[]]),d.indexOf(c)==-1&&d.push(c)})})});let a=e[o.join(",")]=new Pr(o.indexOf(r.length-1)>-1);for(let s=0;s<n.length;s++){let l=n[s][1].sort(_x);a.next.push({type:n[s][0],next:e[l.join(",")]||t(l)})}return a}}function Cv(r,e){for(let t=0,o=[r];t<o.length;t++){let n=o[t],a=!n.validEnd,s=[];for(let l=0;l<n.next.length;l++){let{type:p,next:d}=n.next[l];s.push(p.name),a&&!(p.isText||p.hasRequiredAttrs())&&(a=!1),o.indexOf(d)==-1&&o.push(d)}a&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function Hx(r){let e=Object.create(null);for(let t in r){let o=r[t];if(!o.hasDefault)return null;e[t]=o.default}return e}function zx(r,e){let t=Object.create(null);for(let o in r){let n=e&&e[o];if(n===void 0){let a=r[o];if(a.hasDefault)n=a.default;else throw new RangeError("No value supplied for attribute "+o)}t[o]=n}return t}function Fx(r,e,t,o){for(let n in e)if(!(n in r))throw new RangeError(`Unsupported attribute ${n} for ${t} of type ${n}`);for(let n in r){let a=r[n];a.validate&&a.validate(e[n])}}function jx(r,e){let t=Object.create(null);if(e)for(let o in e)t[o]=new Tv(r,o,e[o]);return t}let qx=class Nw{constructor(e,t,o){this.name=e,this.schema=t,this.spec=o,this.markSet=null,this.groups=o.group?o.group.split(" "):[],this.attrs=jx(e,o.attrs),this.defaultAttrs=Hx(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(o.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==Pr.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:zx(this.attrs,e)}create(e=null,t,o){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new tr(this,this.computeAttrs(e),N.from(t),te.setFrom(o))}createChecked(e=null,t,o){return t=N.from(t),this.checkContent(t),new tr(this,this.computeAttrs(e),t,te.setFrom(o))}createAndFill(e=null,t,o){if(e=this.computeAttrs(e),t=N.from(t),t.size){let s=this.contentMatch.fillBefore(t);if(!s)return null;t=s.append(t)}let n=this.contentMatch.matchFragment(t),a=n&&n.fillBefore(N.empty,!0);return a?new tr(this,e,t.append(a),te.setFrom(o)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let o=0;o<e.childCount;o++)if(!this.allowsMarks(e.child(o).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){Fx(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 t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let o=0;o<e.length;o++)this.allowsMarkType(e[o].type)?t&&t.push(e[o]):t||(t=e.slice(0,o));return t?t.length?t:te.none:e}static compile(e,t){let o=Object.create(null);e.forEach((a,s)=>o[a]=new Nw(a,t,s));let n=t.spec.topNode||"doc";if(!o[n])throw new RangeError("Schema is missing its top node type ('"+n+"')");if(!o.text)throw new RangeError("Every schema needs a 'text' type");for(let a in o.text.attrs)throw new RangeError("The text node type should not have attributes");return o}};function Ev(r,e,t){let o=t.split("|");return n=>{let a=n===null?"null":typeof n;if(o.indexOf(a)<0)throw new RangeError(`Expected value of type ${o} for attribute ${e} on type ${r}, got ${a}`)}}class Tv{constructor(e,t,o){this.hasDefault=Object.prototype.hasOwnProperty.call(o,"default"),this.default=o.default,this.validate=typeof o.validate=="string"?Ev(e,t,o.validate):o.validate}get isRequired(){return!this.hasDefault}}class Wn{constructor(e,t,o,n){this.name=e,this.rank=t,this.schema=o,this.spec=n,this.attrs=jx(e,n.attrs),this.excluded=null;let a=Hx(this.attrs);this.instance=a?new te(this,a):null}create(e=null){return!e&&this.instance?this.instance:new te(this,zx(this.attrs,e))}static compile(e,t){let o=Object.create(null),n=0;return e.forEach((a,s)=>o[a]=new Wn(a,n++,t,s)),o}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){Fx(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class Wx{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=Se.from(e.nodes),t.marks=Se.from(e.marks||{}),this.nodes=qx.compile(this.spec.nodes,this),this.marks=Wn.compile(this.spec.marks,this);let o=Object.create(null);for(let n in this.nodes){if(n in this.marks)throw new RangeError(n+" can not be both a node and a mark");let a=this.nodes[n],s=a.spec.content||"",l=a.spec.marks;if(a.contentMatch=o[s]||(o[s]=Pr.parse(s,this.nodes)),a.inlineContent=a.contentMatch.inlineContent,a.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!a.isInline||!a.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=a}a.markSet=l=="_"?null:l?Ux(this,l.split(" ")):l==""||!a.inlineContent?[]:null}for(let n in this.marks){let a=this.marks[n],s=a.spec.excludes;a.excluded=s==null?[a]:s==""?[]:Ux(this,s.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,o,n){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof qx){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,o,n)}text(e,t){let o=this.nodes.text;return new qn(o,o.defaultAttrs,e,te.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return tr.fromJSON(this,e)}markFromJSON(e){return te.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Ux(r,e){let t=[];for(let o=0;o<e.length;o++){let n=e[o],a=r.marks[n],s=a;if(a)t.push(a);else for(let l in r.marks){let p=r.marks[l];(n=="_"||p.spec.group&&p.spec.group.split(" ").indexOf(n)>-1)&&t.push(s=p)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[o]+"'")}return t}function Mv(r){return r.tag!=null}function Bv(r){return r.style!=null}let Ro=class zl{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let o=this.matchedStyles=[];t.forEach(n=>{if(Mv(n))this.tags.push(n);else if(Bv(n)){let a=/[^=]*/.exec(n.style)[0];o.indexOf(a)<0&&o.push(a),this.styles.push(n)}}),this.normalizeLists=!this.tags.some(n=>{if(!/^(ul|ol)\b/.test(n.tag)||!n.node)return!1;let a=e.nodes[n.node];return a.contentMatch.matchType(a)})}parse(e,t={}){let o=new Yx(this,t,!1);return o.addAll(e,te.none,t.from,t.to),o.finish()}parseSlice(e,t={}){let o=new Yx(this,t,!0);return o.addAll(e,te.none,t.from,t.to),O.maxOpen(o.finish())}matchTag(e,t,o){for(let n=o?this.tags.indexOf(o)+1:0;n<this.tags.length;n++){let a=this.tags[n];if(Dv(e,a.tag)&&(a.namespace===void 0||e.namespaceURI==a.namespace)&&(!a.context||t.matchesContext(a.context))){if(a.getAttrs){let s=a.getAttrs(e);if(s===!1)continue;a.attrs=s||void 0}return a}}}matchStyle(e,t,o,n){for(let a=n?this.styles.indexOf(n)+1:0;a<this.styles.length;a++){let s=this.styles[a],l=s.style;if(!(l.indexOf(e)!=0||s.context&&!o.matchesContext(s.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(s.getAttrs){let p=s.getAttrs(t);if(p===!1)continue;s.attrs=p||void 0}return s}}}static schemaRules(e){let t=[];function o(n){let a=n.priority==null?50:n.priority,s=0;for(;s<t.length;s++){let l=t[s];if((l.priority==null?50:l.priority)<a)break}t.splice(s,0,n)}for(let n in e.marks){let a=e.marks[n].spec.parseDOM;a&&a.forEach(s=>{o(s=Xx(s)),s.mark||s.ignore||s.clearMark||(s.mark=n)})}for(let n in e.nodes){let a=e.nodes[n].spec.parseDOM;a&&a.forEach(s=>{o(s=Xx(s)),s.node||s.ignore||s.mark||(s.node=n)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new zl(e,zl.schemaRules(e)))}};const Gx={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},Nv={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Kx={ol:!0,ul:!0},Ho=1,Ca=2,zo=4;function Jx(r,e,t){return e!=null?(e?Ho:0)|(e==="full"?Ca:0):r&&r.whitespace=="pre"?Ho|Ca:t&~zo}class Un{constructor(e,t,o,n,a,s){this.type=e,this.attrs=t,this.marks=o,this.solid=n,this.options=s,this.content=[],this.activeMarks=te.none,this.match=a||(s&zo?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(N.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let o=this.type.contentMatch,n;return(n=o.findWrapping(e.type))?(this.match=o,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Ho)){let o=this.content[this.content.length-1],n;if(o&&o.isText&&(n=/[ \t\r\n\u000c]+$/.exec(o.text))){let a=o;o.text.length==n[0].length?this.content.pop():this.content[this.content.length-1]=a.withText(a.text.slice(0,a.text.length-n[0].length))}}let t=N.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(N.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Gx.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Yx{constructor(e,t,o){this.parser=e,this.options=t,this.isOpen=o,this.open=0,this.localPreserveWS=!1;let n=t.topNode,a,s=Jx(null,t.preserveWhitespace,0)|(o?zo:0);n?a=new Un(n.type,n.attrs,te.none,!0,t.topMatch||n.type.contentMatch,s):o?a=new Un(null,null,te.none,!0,null,s):a=new Un(e.schema.topNodeType,null,te.none,!0,null,s),this.nodes=[a],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let o=e.nodeValue,n=this.top,a=n.options&Ca?"full":this.localPreserveWS||(n.options&Ho)>0;if(a==="full"||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(o)){if(a)a!=="full"?o=o.replace(/\r?\n|\r/g," "):o=o.replace(/\r\n?/g,`
9
+ `);else if(o=o.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(o)&&this.open==this.nodes.length-1){let s=n.content[n.content.length-1],l=e.previousSibling;(!s||l&&l.nodeName=="BR"||s.isText&&/[ \t\r\n\u000c]$/.test(s.text))&&(o=o.slice(1))}o&&this.insertNode(this.parser.schema.text(o),t,!/\S/.test(o)),this.findInText(e)}else this.findInside(e)}addElement(e,t,o){let n=this.localPreserveWS,a=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),l;Kx.hasOwnProperty(s)&&this.parser.normalizeLists&&Pv(e);let p=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(l=this.parser.matchTag(e,this,o));e:if(p?p.ignore:Nv.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,t);else if(!p||p.skip||p.closeParent){p&&p.closeParent?this.open=Math.max(0,this.open-1):p&&p.skip.nodeType&&(e=p.skip);let d,c=this.needsBlock;if(Gx.hasOwnProperty(s))a.content.length&&a.content[0].isInline&&this.open&&(this.open--,a=this.top),d=!0,a.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break e}let m=p&&p.skip?t:this.readStyles(e,t);m&&this.addAll(e,m),d&&this.sync(a),this.needsBlock=c}else{let d=this.readStyles(e,t);d&&this.addElementByRule(e,p,d,p.consuming===!1?l:void 0)}this.localPreserveWS=n}leafFallback(e,t){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
10
+ `),t)}ignoreFallback(e,t){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),t,!0)}readStyles(e,t){let o=e.style;if(o&&o.length)for(let n=0;n<this.parser.matchedStyles.length;n++){let a=this.parser.matchedStyles[n],s=o.getPropertyValue(a);if(s)for(let l=void 0;;){let p=this.parser.matchStyle(a,s,this,l);if(!p)break;if(p.ignore)return null;if(p.clearMark?t=t.filter(d=>!p.clearMark(d)):t=t.concat(this.parser.schema.marks[p.mark].create(p.attrs)),p.consuming===!1)l=p;else break}}return t}addElementByRule(e,t,o,n){let a,s;if(t.node)if(s=this.parser.schema.nodes[t.node],s.isLeaf)this.insertNode(s.create(t.attrs),o,e.nodeName=="BR")||this.leafFallback(e,o);else{let p=this.enter(s,t.attrs||null,o,t.preserveWhitespace);p&&(a=!0,o=p)}else{let p=this.parser.schema.marks[t.mark];o=o.concat(p.create(t.attrs))}let l=this.top;if(s&&s.isLeaf)this.findInside(e);else if(n)this.addElement(e,o,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(p=>this.insertNode(p,o,!1));else{let p=e;typeof t.contentElement=="string"?p=e.querySelector(t.contentElement):typeof t.contentElement=="function"?p=t.contentElement(e):t.contentElement&&(p=t.contentElement),this.findAround(e,p,!0),this.addAll(p,o),this.findAround(e,p,!1)}a&&this.sync(l)&&this.open--}addAll(e,t,o,n){let a=o||0;for(let s=o?e.childNodes[o]:e.firstChild,l=n==null?null:e.childNodes[n];s!=l;s=s.nextSibling,++a)this.findAtPoint(e,a),this.addDOM(s,t);this.findAtPoint(e,a)}findPlace(e,t,o){let n,a;for(let s=this.open,l=0;s>=0;s--){let p=this.nodes[s],d=p.findWrapping(e);if(d&&(!n||n.length>d.length+l)&&(n=d,a=p,!d.length))break;if(p.solid){if(o)break;l+=2}}if(!n)return null;this.sync(a);for(let s=0;s<n.length;s++)t=this.enterInner(n[s],null,t,!1);return t}insertNode(e,t,o){if(e.isInline&&this.needsBlock&&!this.top.type){let a=this.textblockFromContext();a&&(t=this.enterInner(a,null,t))}let n=this.findPlace(e,t,o);if(n){this.closeExtra();let a=this.top;a.match&&(a.match=a.match.matchType(e.type));let s=te.none;for(let l of n.concat(e.marks))(a.type?a.type.allowsMarkType(l.type):Qx(l.type,e.type))&&(s=l.addToSet(s));return a.content.push(e.mark(s)),!0}return!1}enter(e,t,o,n){let a=this.findPlace(e.create(t),o,!1);return a&&(a=this.enterInner(e,t,o,!0,n)),a}enterInner(e,t,o,n=!1,a){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let l=Jx(e,a,s.options);s.options&zo&&s.content.length==0&&(l|=zo);let p=te.none;return o=o.filter(d=>(s.type?s.type.allowsMarkType(d.type):Qx(d.type,e))?(p=d.addToSet(p),!1):!0),this.nodes.push(new Un(e,t,p,n,null,l)),this.open++,o}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--){if(this.nodes[t]==e)return this.open=t,!0;this.localPreserveWS&&(this.nodes[t].options|=Ho)}return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let o=this.nodes[t].content;for(let n=o.length-1;n>=0;n--)e+=o[n].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let o=0;o<this.find.length;o++)this.find[o].node==e&&this.find[o].offset==t&&(this.find[o].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,o){if(e!=t&&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)&&t.compareDocumentPosition(this.find[n].node)&(o?2:4)&&(this.find[n].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),o=this.options.context,n=!this.isOpen&&(!o||o.parent.type==this.nodes[0].type),a=-(o?o.depth+1:0)+(n?0:1),s=(l,p)=>{for(;l>=0;l--){let d=t[l];if(d==""){if(l==t.length-1||l==0)continue;for(;p>=a;p--)if(s(l-1,p))return!0;return!1}else{let c=p>0||p==0&&n?this.nodes[p].type:o&&p>=a?o.node(p-a).type:null;if(!c||c.name!=d&&!c.isInGroup(d))return!1;p--}}return!0};return s(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let o=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(o&&o.isTextblock&&o.defaultAttrs)return o}for(let t in this.parser.schema.nodes){let o=this.parser.schema.nodes[t];if(o.isTextblock&&o.defaultAttrs)return o}}}function Pv(r){for(let e=r.firstChild,t=null;e;e=e.nextSibling){let o=e.nodeType==1?e.nodeName.toLowerCase():null;o&&Kx.hasOwnProperty(o)&&t?(t.appendChild(e),e=t):o=="li"?t=e:o&&(t=null)}}function Dv(r,e){return(r.matches||r.msMatchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector).call(r,e)}function Xx(r){let e={};for(let t in r)e[t]=r[t];return e}function Qx(r,e){let t=e.schema.nodes;for(let o in t){let n=t[o];if(!n.allowsMarkType(r))continue;let a=[],s=l=>{a.push(l);for(let p=0;p<l.edgeCount;p++){let{type:d,next:c}=l.edge(p);if(d==e||a.indexOf(c)<0&&s(c))return!0}};if(s(n.contentMatch))return!0}}class Dr{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},o){o||(o=Ea(t).createDocumentFragment());let n=o,a=[];return e.forEach(s=>{if(a.length||s.marks.length){let l=0,p=0;for(;l<a.length&&p<s.marks.length;){let d=s.marks[p];if(!this.marks[d.type.name]){p++;continue}if(!d.eq(a[l][0])||d.type.spec.spanning===!1)break;l++,p++}for(;l<a.length;)n=a.pop()[1];for(;p<s.marks.length;){let d=s.marks[p++],c=this.serializeMark(d,s.isInline,t);c&&(a.push([d,n]),n.appendChild(c.dom),n=c.contentDOM||c.dom)}}n.appendChild(this.serializeNodeInner(s,t))}),o}serializeNodeInner(e,t){let{dom:o,contentDOM:n}=Gn(Ea(t),this.nodes[e.type.name](e),null,e.attrs);if(n){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,n)}return o}serializeNode(e,t={}){let o=this.serializeNodeInner(e,t);for(let n=e.marks.length-1;n>=0;n--){let a=this.serializeMark(e.marks[n],e.isInline,t);a&&((a.contentDOM||a.dom).appendChild(o),o=a.dom)}return o}serializeMark(e,t,o={}){let n=this.marks[e.type.name];return n&&Gn(Ea(o),n(e,t),null,e.attrs)}static renderSpec(e,t,o=null,n){return Gn(e,t,o,n)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Dr(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Zx(e.nodes);return t.text||(t.text=o=>o.text),t}static marksFromSchema(e){return Zx(e.marks)}}function Zx(r){let e={};for(let t in r){let o=r[t].spec.toDOM;o&&(e[t]=o)}return e}function Ea(r){return r.document||window.document}const $x=new WeakMap;function Lv(r){let e=$x.get(r);return e===void 0&&$x.set(r,e=Av(r)),e}function Av(r){let e=null;function t(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")e||(e=[]),e.push(o);else for(let n=0;n<o.length;n++)t(o[n]);else for(let n in o)t(o[n])}return t(r),e}function Gn(r,e,t,o){if(typeof e=="string")return{dom:r.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let n=e[0],a;if(typeof n!="string")throw new RangeError("Invalid array passed to renderSpec");if(o&&(a=Lv(o))&&a.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=n.indexOf(" ");s>0&&(t=n.slice(0,s),n=n.slice(s+1));let l,p=t?r.createElementNS(t,n):r.createElement(n),d=e[1],c=1;if(d&&typeof d=="object"&&d.nodeType==null&&!Array.isArray(d)){c=2;for(let m in d)if(d[m]!=null){let b=m.indexOf(" ");b>0?p.setAttributeNS(m.slice(0,b),m.slice(b+1),d[m]):p.setAttribute(m,d[m])}}for(let m=c;m<e.length;m++){let b=e[m];if(b===0){if(m<e.length-1||m>c)throw new RangeError("Content hole must be the only child of its parent node");return{dom:p,contentDOM:p}}else{let{dom:u,contentDOM:g}=Gn(r,b,t,o);if(p.appendChild(u),g){if(l)throw new RangeError("Multiple content holes");l=g}}}return{dom:p,contentDOM:l}}const ef=65535,tf=Math.pow(2,16);function Ov(r,e){return r+e*tf}function rf(r){return r&ef}function Vv(r){return(r-(r&ef))/tf}const of=1,nf=2,Kn=4,af=8;class Ta{constructor(e,t,o){this.pos=e,this.delInfo=t,this.recover=o}get deleted(){return(this.delInfo&af)>0}get deletedBefore(){return(this.delInfo&(of|Kn))>0}get deletedAfter(){return(this.delInfo&(nf|Kn))>0}get deletedAcross(){return(this.delInfo&Kn)>0}}class Xe{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Xe.empty)return Xe.empty}recover(e){let t=0,o=rf(e);if(!this.inverted)for(let n=0;n<o;n++)t+=this.ranges[n*3+2]-this.ranges[n*3+1];return this.ranges[o*3]+t+Vv(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,o){let n=0,a=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let p=this.ranges[l]-(this.inverted?n:0);if(p>e)break;let d=this.ranges[l+a],c=this.ranges[l+s],m=p+d;if(e<=m){let b=d?e==p?-1:e==m?1:t:t,u=p+n+(b<0?0:c);if(o)return u;let g=e==(t<0?p:m)?null:Ov(l/3,e-p),f=e==p?nf:e==m?of:Kn;return(t<0?e!=p:e!=m)&&(f|=af),new Ta(u,f,g)}n+=c-d}return o?e+n:new Ta(e+n,0,null)}touches(e,t){let o=0,n=rf(t),a=this.inverted?2:1,s=this.inverted?1:2;for(let l=0;l<this.ranges.length;l+=3){let p=this.ranges[l]-(this.inverted?o:0);if(p>e)break;let d=this.ranges[l+a],c=p+d;if(e<=c&&l==n*3)return!0;o+=this.ranges[l+s]-d}return!1}forEach(e){let t=this.inverted?2:1,o=this.inverted?1:2;for(let n=0,a=0;n<this.ranges.length;n+=3){let s=this.ranges[n],l=s-(this.inverted?a:0),p=s+(this.inverted?0:a),d=this.ranges[n+t],c=this.ranges[n+o];e(l,l+d,p,p+c),a+=c-d}}invert(){return new Xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Xe.empty:new Xe(e<0?[0,-e,0]:[0,0,e])}}Xe.empty=new Xe([]);class Fo{constructor(e,t,o=0,n=e?e.length:0){this.mirror=t,this.from=o,this.to=n,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(e=0,t=this.maps.length){return new Fo(this._maps,this.mirror,e,t)}appendMap(e,t){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,o=this._maps.length;t<e._maps.length;t++){let n=e.getMirror(t);this.appendMap(e._maps[t],n!=null&&n<t?o+n:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,o=this._maps.length+e._maps.length;t>=0;t--){let n=e.getMirror(t);this.appendMap(e._maps[t].invert(),n!=null&&n>t?o-n-1:void 0)}}invert(){let e=new Fo;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let o=this.from;o<this.to;o++)e=this._maps[o].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,o){let n=0;for(let a=this.from;a<this.to;a++){let s=this._maps[a],l=s.mapResult(e,t);if(l.recover!=null){let p=this.getMirror(a);if(p!=null&&p>a&&p<this.to){a=p,e=this._maps[p].recover(l.recover);continue}}n|=l.delInfo,e=l.pos}return o?e:new Ta(e,n,null)}}const Ma=Object.create(null);class Pe{getMap(){return Xe.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let o=Ma[t.stepType];if(!o)throw new RangeError(`No step type ${t.stepType} defined`);return o.fromJSON(e,t)}static jsonID(e,t){if(e in Ma)throw new RangeError("Duplicate use of step JSON ID "+e);return Ma[e]=t,t.prototype.jsonID=e,t}}class ce{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new ce(e,null)}static fail(e){return new ce(null,e)}static fromReplace(e,t,o,n){try{return ce.ok(e.replace(t,o,n))}catch(a){if(a instanceof zn)return ce.fail(a.message);throw a}}}function Ba(r,e,t){let o=[];for(let n=0;n<r.childCount;n++){let a=r.child(n);a.content.size&&(a=a.copy(Ba(a.content,e,a))),a.isInline&&(a=e(a,t,n)),o.push(a)}return N.fromArray(o)}class rr extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=e.resolve(this.from),n=o.node(o.sharedDepth(this.to)),a=new O(Ba(t.content,(s,l)=>!s.isAtom||!l.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),n),t.openStart,t.openEnd);return ce.fromReplace(e,this.from,this.to,a)}invert(){return new Et(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new rr(t.pos,o.pos,this.mark)}merge(e){return e instanceof rr&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new rr(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new rr(t.from,t.to,e.markFromJSON(t.mark))}}Pe.jsonID("addMark",rr);class Et extends Pe{constructor(e,t,o){super(),this.from=e,this.to=t,this.mark=o}apply(e){let t=e.slice(this.from,this.to),o=new O(Ba(t.content,n=>n.mark(this.mark.removeFromSet(n.marks)),e),t.openStart,t.openEnd);return ce.fromReplace(e,this.from,this.to,o)}invert(){return new rr(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deleted&&o.deleted||t.pos>=o.pos?null:new Et(t.pos,o.pos,this.mark)}merge(e){return e instanceof Et&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Et(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Et(t.from,t.to,e.markFromJSON(t.mark))}}Pe.jsonID("removeMark",Et);class or extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let o=this.mark.addToSet(t.marks);if(o.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(o))return new or(this.pos,t.marks[n]);return new or(this.pos,this.mark)}}return new Lr(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new or(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new or(t.pos,e.markFromJSON(t.mark))}}Pe.jsonID("addNodeMark",or);class Lr extends Pe{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at mark step's position");let o=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(o),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new or(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new Lr(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Lr(t.pos,e.markFromJSON(t.mark))}}Pe.jsonID("removeNodeMark",Lr);class xe extends Pe{constructor(e,t,o,n=!1){super(),this.from=e,this.to=t,this.slice=o,this.structure=n}apply(e){return this.structure&&Na(e,this.from,this.to)?ce.fail("Structure replace would overwrite content"):ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Xe([this.from,this.to-this.from,this.slice.size])}invert(e){return new xe(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1);return t.deletedAcross&&o.deletedAcross?null:new xe(t.pos,Math.max(t.pos,o.pos),this.slice,this.structure)}merge(e){if(!(e instanceof xe)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let t=this.slice.size+e.slice.size==0?O.empty:new O(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new xe(this.from,this.to+(e.to-e.from),t,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let t=this.slice.size+e.slice.size==0?O.empty:new O(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new xe(e.from,this.to,t,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new xe(t.from,t.to,O.fromJSON(e,t.slice),!!t.structure)}}Pe.jsonID("replace",xe);class fe extends Pe{constructor(e,t,o,n,a,s,l=!1){super(),this.from=e,this.to=t,this.gapFrom=o,this.gapTo=n,this.slice=a,this.insert=s,this.structure=l}apply(e){if(this.structure&&(Na(e,this.from,this.gapFrom)||Na(e,this.gapTo,this.to)))return ce.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return ce.fail("Gap is not a flat range");let o=this.slice.insertAt(this.insert,t.content);return o?ce.fromReplace(e,this.from,this.to,o):ce.fail("Content does not fit in gap")}getMap(){return new Xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new fe(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),o=e.mapResult(this.to,-1),n=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),a=this.to==this.gapTo?o.pos:e.map(this.gapTo,1);return t.deletedAcross&&o.deletedAcross||n<t.pos||a>o.pos?null:new fe(t.pos,o.pos,n,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if(typeof t.from!="number"||typeof t.to!="number"||typeof t.gapFrom!="number"||typeof t.gapTo!="number"||typeof t.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new fe(t.from,t.to,t.gapFrom,t.gapTo,O.fromJSON(e,t.slice),t.insert,!!t.structure)}}Pe.jsonID("replaceAround",fe);function Na(r,e,t){let o=r.resolve(e),n=t-e,a=o.depth;for(;n>0&&a>0&&o.indexAfter(a)==o.node(a).childCount;)a--,n--;if(n>0){let s=o.node(a).maybeChild(o.indexAfter(a));for(;n>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,n--}}return!1}function Iv(r,e,t,o){let n=[],a=[],s,l;r.doc.nodesBetween(e,t,(p,d,c)=>{if(!p.isInline)return;let m=p.marks;if(!o.isInSet(m)&&c.type.allowsMarkType(o.type)){let b=Math.max(d,e),u=Math.min(d+p.nodeSize,t),g=o.addToSet(m);for(let f=0;f<m.length;f++)m[f].isInSet(g)||(s&&s.to==b&&s.mark.eq(m[f])?s.to=u:n.push(s=new Et(b,u,m[f])));l&&l.to==b?l.to=u:a.push(l=new rr(b,u,o))}}),n.forEach(p=>r.step(p)),a.forEach(p=>r.step(p))}function _v(r,e,t,o){let n=[],a=0;r.doc.nodesBetween(e,t,(s,l)=>{if(!s.isInline)return;a++;let p=null;if(o instanceof Wn){let d=s.marks,c;for(;c=o.isInSet(d);)(p||(p=[])).push(c),d=c.removeFromSet(d)}else o?o.isInSet(s.marks)&&(p=[o]):p=s.marks;if(p&&p.length){let d=Math.min(l+s.nodeSize,t);for(let c=0;c<p.length;c++){let m=p[c],b;for(let u=0;u<n.length;u++){let g=n[u];g.step==a-1&&m.eq(n[u].style)&&(b=g)}b?(b.to=d,b.step=a):n.push({style:m,from:Math.max(l,e),to:d,step:a})}}}),n.forEach(s=>r.step(new Et(s.from,s.to,s.style)))}function Pa(r,e,t,o=t.contentMatch,n=!0){let a=r.doc.nodeAt(e),s=[],l=e+1;for(let p=0;p<a.childCount;p++){let d=a.child(p),c=l+d.nodeSize,m=o.matchType(d.type);if(!m)s.push(new xe(l,c,O.empty));else{o=m;for(let b=0;b<d.marks.length;b++)t.allowsMarkType(d.marks[b].type)||r.step(new Et(l,c,d.marks[b]));if(n&&d.isText&&t.whitespace!="pre"){let b,u=/\r?\n|\r/g,g;for(;b=u.exec(d.text);)g||(g=new O(N.from(t.schema.text(" ",t.allowedMarks(d.marks))),0,0)),s.push(new xe(l+b.index,l+b.index+b[0].length,g))}}l=c}if(!o.validEnd){let p=o.fillBefore(N.empty,!0);r.replace(l,l,new O(p,0,0))}for(let p=s.length-1;p>=0;p--)r.step(s[p])}function Rv(r,e,t){return(e==0||r.canReplace(e,r.childCount))&&(t==r.childCount||r.canReplace(0,t))}function ao(r){let t=r.parent.content.cutByIndex(r.startIndex,r.endIndex);for(let o=r.depth;;--o){let n=r.$from.node(o),a=r.$from.index(o),s=r.$to.indexAfter(o);if(o<r.depth&&n.canReplace(a,s,t))return o;if(o==0||n.type.spec.isolating||!Rv(n,a,s))break}return null}function Hv(r,e,t){let{$from:o,$to:n,depth:a}=e,s=o.before(a+1),l=n.after(a+1),p=s,d=l,c=N.empty,m=0;for(let g=a,f=!1;g>t;g--)f||o.index(g)>0?(f=!0,c=N.from(o.node(g).copy(c)),m++):p--;let b=N.empty,u=0;for(let g=a,f=!1;g>t;g--)f||n.after(g+1)<n.end(g)?(f=!0,b=N.from(n.node(g).copy(b)),u++):d++;r.step(new fe(p,d,s,l,new O(c.append(b),m,u),c.size-m,!0))}function Da(r,e,t=null,o=r){let n=zv(r,e),a=n&&Fv(o,e);return a?n.map(sf).concat({type:e,attrs:t}).concat(a.map(sf)):null}function sf(r){return{type:r,attrs:null}}function zv(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.contentMatchAt(o).findWrapping(e);if(!a)return null;let s=a.length?a[0]:e;return t.canReplaceWith(o,n,s)?a:null}function Fv(r,e){let{parent:t,startIndex:o,endIndex:n}=r,a=t.child(o),s=e.contentMatch.findWrapping(a.type);if(!s)return null;let p=(s.length?s[s.length-1]:e).contentMatch;for(let d=o;p&&d<n;d++)p=p.matchType(t.child(d).type);return!p||!p.validEnd?null:s}function jv(r,e,t){let o=N.empty;for(let s=t.length-1;s>=0;s--){if(o.size){let l=t[s].type.contentMatch.matchFragment(o);if(!l||!l.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}o=N.from(t[s].type.create(t[s].attrs,o))}let n=e.start,a=e.end;r.step(new fe(n,a,n,a,new O(o,0,0),t.length,!0))}function qv(r,e,t,o,n){if(!o.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=r.steps.length;r.doc.nodesBetween(e,t,(s,l)=>{let p=typeof n=="function"?n(s):n;if(s.isTextblock&&!s.hasMarkup(o,p)&&Wv(r.doc,r.mapping.slice(a).map(l),o)){let d=null;if(o.schema.linebreakReplacement){let u=o.whitespace=="pre",g=!!o.contentMatch.matchType(o.schema.linebreakReplacement);u&&!g?d=!1:!u&&g&&(d=!0)}d===!1&&pf(r,s,l,a),Pa(r,r.mapping.slice(a).map(l,1),o,void 0,d===null);let c=r.mapping.slice(a),m=c.map(l,1),b=c.map(l+s.nodeSize,1);return r.step(new fe(m,b,m+1,b-1,new O(N.from(o.create(p,null,s.marks)),0,0),1,!0)),d===!0&&lf(r,s,l,a),!1}})}function lf(r,e,t,o){e.forEach((n,a)=>{if(n.isText){let s,l=/\r?\n|\r/g;for(;s=l.exec(n.text);){let p=r.mapping.slice(o).map(t+1+a+s.index);r.replaceWith(p,p+1,e.type.schema.linebreakReplacement.create())}}})}function pf(r,e,t,o){e.forEach((n,a)=>{if(n.type==n.type.schema.linebreakReplacement){let s=r.mapping.slice(o).map(t+1+a);r.replaceWith(s,s+1,e.type.schema.text(`
11
+ `))}})}function Wv(r,e,t){let o=r.resolve(e),n=o.index();return o.parent.canReplaceWith(n,n+1,t)}function Uv(r,e,t,o,n){let a=r.doc.nodeAt(e);if(!a)throw new RangeError("No node at given position");t||(t=a.type);let s=t.create(o,null,n||a.marks);if(a.isLeaf)return r.replaceWith(e,e+a.nodeSize,s);if(!t.validContent(a.content))throw new RangeError("Invalid content for node type "+t.name);r.step(new fe(e,e+a.nodeSize,e+1,e+a.nodeSize-1,new O(N.from(s),0,0),1,!0))}function It(r,e,t=1,o){let n=r.resolve(e),a=n.depth-t,s=o&&o[o.length-1]||n.parent;if(a<0||n.parent.type.spec.isolating||!n.parent.canReplace(n.index(),n.parent.childCount)||!s.type.validContent(n.parent.content.cutByIndex(n.index(),n.parent.childCount)))return!1;for(let d=n.depth-1,c=t-2;d>a;d--,c--){let m=n.node(d),b=n.index(d);if(m.type.spec.isolating)return!1;let u=m.content.cutByIndex(b,m.childCount),g=o&&o[c+1];g&&(u=u.replaceChild(0,g.type.create(g.attrs)));let f=o&&o[c]||m;if(!m.canReplace(b+1,m.childCount)||!f.type.validContent(u))return!1}let l=n.indexAfter(a),p=o&&o[0];return n.node(a).canReplaceWith(l,l,p?p.type:n.node(a+1).type)}function Gv(r,e,t=1,o){let n=r.doc.resolve(e),a=N.empty,s=N.empty;for(let l=n.depth,p=n.depth-t,d=t-1;l>p;l--,d--){a=N.from(n.node(l).copy(a));let c=o&&o[d];s=N.from(c?c.type.create(c.attrs,s):n.node(l).copy(s))}r.step(new xe(e,e,new O(a.append(s),t,t),!0))}function nr(r,e){let t=r.resolve(e),o=t.index();return df(t.nodeBefore,t.nodeAfter)&&t.parent.canReplace(o,o+1)}function Kv(r,e){e.content.size||r.type.compatibleContent(e.type);let t=r.contentMatchAt(r.childCount),{linebreakReplacement:o}=r.type.schema;for(let n=0;n<e.childCount;n++){let a=e.child(n),s=a.type==o?r.type.schema.nodes.text:a.type;if(t=t.matchType(s),!t||!r.type.allowsMarks(a.marks))return!1}return t.validEnd}function df(r,e){return!!(r&&e&&!r.isLeaf&&Kv(r,e))}function Jn(r,e,t=-1){let o=r.resolve(e);for(let n=o.depth;;n--){let a,s,l=o.index(n);if(n==o.depth?(a=o.nodeBefore,s=o.nodeAfter):t>0?(a=o.node(n+1),l++,s=o.node(n).maybeChild(l)):(a=o.node(n).maybeChild(l-1),s=o.node(n+1)),a&&!a.isTextblock&&df(a,s)&&o.node(n).canReplace(l,l+1))return e;if(n==0)break;e=t<0?o.before(n):o.after(n)}}function Jv(r,e,t){let o=null,{linebreakReplacement:n}=r.doc.type.schema,a=r.doc.resolve(e-t),s=a.node().type;if(n&&s.inlineContent){let c=s.whitespace=="pre",m=!!s.contentMatch.matchType(n);c&&!m?o=!1:!c&&m&&(o=!0)}let l=r.steps.length;if(o===!1){let c=r.doc.resolve(e+t);pf(r,c.node(),c.before(),l)}s.inlineContent&&Pa(r,e+t-1,s,a.node().contentMatchAt(a.index()),o==null);let p=r.mapping.slice(l),d=p.map(e-t);if(r.step(new xe(d,p.map(e+t,-1),O.empty,!0)),o===!0){let c=r.doc.resolve(d);lf(r,c.node(),c.before(),r.steps.length)}return r}function Yv(r,e,t){let o=r.resolve(e);if(o.parent.canReplaceWith(o.index(),o.index(),t))return e;if(o.parentOffset==0)for(let n=o.depth-1;n>=0;n--){let a=o.index(n);if(o.node(n).canReplaceWith(a,a,t))return o.before(n+1);if(a>0)return null}if(o.parentOffset==o.parent.content.size)for(let n=o.depth-1;n>=0;n--){let a=o.indexAfter(n);if(o.node(n).canReplaceWith(a,a,t))return o.after(n+1);if(a<o.node(n).childCount)return null}return null}function cf(r,e,t){let o=r.resolve(e);if(!t.content.size)return e;let n=t.content;for(let a=0;a<t.openStart;a++)n=n.firstChild.content;for(let a=1;a<=(t.openStart==0&&t.size?2:1);a++)for(let s=o.depth;s>=0;s--){let l=s==o.depth?0:o.pos<=(o.start(s+1)+o.end(s+1))/2?-1:1,p=o.index(s)+(l>0?1:0),d=o.node(s),c=!1;if(a==1)c=d.canReplace(p,p,n);else{let m=d.contentMatchAt(p).findWrapping(n.firstChild.type);c=m&&d.canReplaceWith(p,p,m[0])}if(c)return l==0?o.pos:l<0?o.before(s+1):o.after(s+1)}return null}function Yn(r,e,t=e,o=O.empty){if(e==t&&!o.size)return null;let n=r.resolve(e),a=r.resolve(t);return mf(n,a,o)?new xe(e,t,o):new Xv(n,a,o).fit()}function mf(r,e,t){return!t.openStart&&!t.openEnd&&r.start()==e.start()&&r.parent.canReplace(r.index(),e.index(),t.content)}class Xv{constructor(e,t,o){this.$from=e,this.$to=t,this.unplaced=o,this.frontier=[],this.placed=N.empty;for(let n=0;n<=e.depth;n++){let a=e.node(n);this.frontier.push({type:a.type,match:a.contentMatchAt(e.indexAfter(n))})}for(let n=e.depth;n>0;n--)this.placed=N.from(e.node(n).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(),t=this.placed.size-this.depth-this.$from.depth,o=this.$from,n=this.close(e<0?this.$to:o.doc.resolve(e));if(!n)return null;let a=this.placed,s=o.depth,l=n.depth;for(;s&&l&&a.childCount==1;)a=a.firstChild.content,s--,l--;let p=new O(a,s,l);return e>-1?new fe(o.pos,e,this.$to.pos,this.$to.end(),p,t):p.size||o.pos!=this.$to.pos?new xe(o.pos,n.pos,p):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,o=0,n=this.unplaced.openEnd;o<e;o++){let a=t.firstChild;if(t.childCount>1&&(n=0),a.type.spec.isolating&&n<=o){e=o;break}t=a.content}for(let t=1;t<=2;t++)for(let o=t==1?e:this.unplaced.openStart;o>=0;o--){let n,a=null;o?(a=La(this.unplaced.content,o-1).firstChild,n=a.content):n=this.unplaced.content;let s=n.firstChild;for(let l=this.depth;l>=0;l--){let{type:p,match:d}=this.frontier[l],c,m=null;if(t==1&&(s?d.matchType(s.type)||(m=d.fillBefore(N.from(s),!1)):a&&p.compatibleContent(a.type)))return{sliceDepth:o,frontierDepth:l,parent:a,inject:m};if(t==2&&s&&(c=d.findWrapping(s.type)))return{sliceDepth:o,frontierDepth:l,parent:a,wrap:c};if(a&&d.matchType(a.type))break}}}openMore(){let{content:e,openStart:t,openEnd:o}=this.unplaced,n=La(e,t);return!n.childCount||n.firstChild.isLeaf?!1:(this.unplaced=new O(e,t+1,Math.max(o,n.size+t>=e.size-o?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:o}=this.unplaced,n=La(e,t);if(n.childCount<=1&&t>0){let a=e.size-t<=t+n.size;this.unplaced=new O(jo(e,t-1,1),t-1,a?t-1:o)}else this.unplaced=new O(jo(e,t,1),t,o)}placeNodes({sliceDepth:e,frontierDepth:t,parent:o,inject:n,wrap:a}){for(;this.depth>t;)this.closeFrontierNode();if(a)for(let f=0;f<a.length;f++)this.openFrontierNode(a[f]);let s=this.unplaced,l=o?o.content:s.content,p=s.openStart-e,d=0,c=[],{match:m,type:b}=this.frontier[t];if(n){for(let f=0;f<n.childCount;f++)c.push(n.child(f));m=m.matchFragment(n)}let u=l.size+e-(s.content.size-s.openEnd);for(;d<l.childCount;){let f=l.child(d),x=m.matchType(f.type);if(!x)break;d++,(d>1||p==0||f.content.size)&&(m=x,c.push(bf(f.mark(b.allowedMarks(f.marks)),d==1?p:0,d==l.childCount?u:-1)))}let g=d==l.childCount;g||(u=-1),this.placed=qo(this.placed,t,N.from(c)),this.frontier[t].match=m,g&&u<0&&o&&o.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let f=0,x=l;f<u;f++){let y=x.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),x=y.content}this.unplaced=g?e==0?O.empty:new O(jo(s.content,e-1,1),e-1,u<0?s.openEnd:e-1):new O(jo(s.content,e,d),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Aa(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:o}=this.$to,n=this.$to.after(o);for(;o>1&&n==this.$to.end(--o);)++n;return n}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:o,type:n}=this.frontier[t],a=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),s=Aa(e,t,n,o,a);if(s){for(let l=t-1;l>=0;l--){let{match:p,type:d}=this.frontier[l],c=Aa(e,l,d,p,!0);if(!c||c.childCount)continue e}return{depth:t,fit:s,move:a?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=qo(this.placed,t.depth,t.fit)),e=t.move;for(let o=t.depth+1;o<=e.depth;o++){let n=e.node(o),a=n.type.contentMatch.fillBefore(n.content,!0,e.index(o));this.openFrontierNode(n.type,n.attrs,a)}return e}openFrontierNode(e,t=null,o){let n=this.frontier[this.depth];n.match=n.match.matchType(e),this.placed=qo(this.placed,this.depth,N.from(e.create(t,o))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(N.empty,!0);t.childCount&&(this.placed=qo(this.placed,this.frontier.length,t))}}function jo(r,e,t){return e==0?r.cutByIndex(t,r.childCount):r.replaceChild(0,r.firstChild.copy(jo(r.firstChild.content,e-1,t)))}function qo(r,e,t){return e==0?r.append(t):r.replaceChild(r.childCount-1,r.lastChild.copy(qo(r.lastChild.content,e-1,t)))}function La(r,e){for(let t=0;t<e;t++)r=r.firstChild.content;return r}function bf(r,e,t){if(e<=0)return r;let o=r.content;return e>1&&(o=o.replaceChild(0,bf(o.firstChild,e-1,o.childCount==1?t-1:0))),e>0&&(o=r.type.contentMatch.fillBefore(o).append(o),t<=0&&(o=o.append(r.type.contentMatch.matchFragment(o).fillBefore(N.empty,!0)))),r.copy(o)}function Aa(r,e,t,o,n){let a=r.node(e),s=n?r.indexAfter(e):r.index(e);if(s==a.childCount&&!t.compatibleContent(a.type))return null;let l=o.fillBefore(a.content,!0,s);return l&&!Qv(t,a.content,s)?l:null}function Qv(r,e,t){for(let o=t;o<e.childCount;o++)if(!r.allowsMarks(e.child(o).marks))return!0;return!1}function Zv(r){return r.spec.defining||r.spec.definingForContent}function $v(r,e,t,o){if(!o.size)return r.deleteRange(e,t);let n=r.doc.resolve(e),a=r.doc.resolve(t);if(mf(n,a,o))return r.step(new xe(e,t,o));let s=gf(n,r.doc.resolve(t));s[s.length-1]==0&&s.pop();let l=-(n.depth+1);s.unshift(l);for(let b=n.depth,u=n.pos-1;b>0;b--,u--){let g=n.node(b).type.spec;if(g.defining||g.definingAsContext||g.isolating)break;s.indexOf(b)>-1?l=b:n.before(b)==u&&s.splice(1,0,-b)}let p=s.indexOf(l),d=[],c=o.openStart;for(let b=o.content,u=0;;u++){let g=b.firstChild;if(d.push(g),u==o.openStart)break;b=g.content}for(let b=c-1;b>=0;b--){let u=d[b],g=Zv(u.type);if(g&&!u.sameMarkup(n.node(Math.abs(l)-1)))c=b;else if(g||!u.type.isTextblock)break}for(let b=o.openStart;b>=0;b--){let u=(b+c+1)%(o.openStart+1),g=d[u];if(g)for(let f=0;f<s.length;f++){let x=s[(f+p)%s.length],y=!0;x<0&&(y=!1,x=-x);let w=n.node(x-1),v=n.index(x-1);if(w.canReplaceWith(v,v,g.type,g.marks))return r.replace(n.before(x),y?a.after(x):t,new O(uf(o.content,0,o.openStart,u),u,o.openEnd))}}let m=r.steps.length;for(let b=s.length-1;b>=0&&(r.replace(e,t,o),!(r.steps.length>m));b--){let u=s[b];u<0||(e=n.before(u),t=a.after(u))}}function uf(r,e,t,o,n){if(e<t){let a=r.firstChild;r=r.replaceChild(0,a.copy(uf(a.content,e+1,t,o,a)))}if(e>o){let a=n.contentMatchAt(0),s=a.fillBefore(r).append(r);r=s.append(a.matchFragment(s).fillBefore(N.empty,!0))}return r}function e2(r,e,t,o){if(!o.isInline&&e==t&&r.doc.resolve(e).parent.content.size){let n=Yv(r.doc,e,o.type);n!=null&&(e=t=n)}r.replaceRange(e,t,new O(N.from(o),0,0))}function t2(r,e,t){let o=r.doc.resolve(e),n=r.doc.resolve(t),a=gf(o,n);for(let s=0;s<a.length;s++){let l=a[s],p=s==a.length-1;if(p&&l==0||o.node(l).type.contentMatch.validEnd)return r.delete(o.start(l),n.end(l));if(l>0&&(p||o.node(l-1).canReplace(o.index(l-1),n.indexAfter(l-1))))return r.delete(o.before(l),n.after(l))}for(let s=1;s<=o.depth&&s<=n.depth;s++)if(e-o.start(s)==o.depth-s&&t>o.end(s)&&n.end(s)-t!=n.depth-s&&o.start(s-1)==n.start(s-1)&&o.node(s-1).canReplace(o.index(s-1),n.index(s-1)))return r.delete(o.before(s),t);r.delete(e,t)}function gf(r,e){let t=[],o=Math.min(r.depth,e.depth);for(let n=o;n>=0;n--){let a=r.start(n);if(a<r.pos-(r.depth-n)||e.end(n)>e.pos+(e.depth-n)||r.node(n).type.spec.isolating||e.node(n).type.spec.isolating)break;(a==e.start(n)||n==r.depth&&n==e.depth&&r.parent.inlineContent&&e.parent.inlineContent&&n&&e.start(n-1)==a-1)&&t.push(n)}return t}class so extends Pe{constructor(e,t,o){super(),this.pos=e,this.attr=t,this.value=o}apply(e){let t=e.nodeAt(this.pos);if(!t)return ce.fail("No node at attribute step's position");let o=Object.create(null);for(let a in t.attrs)o[a]=t.attrs[a];o[this.attr]=this.value;let n=t.type.create(o,null,t.marks);return ce.fromReplace(e,this.pos,this.pos+1,new O(N.from(n),0,t.isLeaf?0:1))}getMap(){return Xe.empty}invert(e){return new so(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new so(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.pos!="number"||typeof t.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new so(t.pos,t.attr,t.value)}}Pe.jsonID("attr",so);class Wo extends Pe{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let o=e.type.create(t,e.content,e.marks);return ce.ok(o)}getMap(){return Xe.empty}invert(e){return new Wo(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if(typeof t.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Wo(t.attr,t.value)}}Pe.jsonID("docAttr",Wo);let lo=class extends Error{};lo=function r(e){let t=Error.call(this,e);return t.__proto__=r.prototype,t},lo.prototype=Object.create(Error.prototype),lo.prototype.constructor=lo,lo.prototype.name="TransformError";class xf{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Fo}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new lo(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,o=O.empty){let n=Yn(this.doc,e,t,o);return n&&this.step(n),this}replaceWith(e,t,o){return this.replace(e,t,new O(N.from(o),0,0))}delete(e,t){return this.replace(e,t,O.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,o){return $v(this,e,t,o),this}replaceRangeWith(e,t,o){return e2(this,e,t,o),this}deleteRange(e,t){return t2(this,e,t),this}lift(e,t){return Hv(this,e,t),this}join(e,t=1){return Jv(this,e,t),this}wrap(e,t){return jv(this,e,t),this}setBlockType(e,t=e,o,n=null){return qv(this,e,t,o,n),this}setNodeMarkup(e,t,o=null,n){return Uv(this,e,t,o,n),this}setNodeAttribute(e,t,o){return this.step(new so(e,t,o)),this}setDocAttribute(e,t){return this.step(new Wo(e,t)),this}addNodeMark(e,t){return this.step(new or(e,t)),this}removeNodeMark(e,t){let o=this.doc.nodeAt(e);if(!o)throw new RangeError("No node at position "+e);if(t instanceof te)t.isInSet(o.marks)&&this.step(new Lr(e,t));else{let n=o.marks,a,s=[];for(;a=t.isInSet(n);)s.push(new Lr(e,a)),n=a.removeFromSet(n);for(let l=s.length-1;l>=0;l--)this.step(s[l])}return this}split(e,t=1,o){return Gv(this,e,t,o),this}addMark(e,t,o){return Iv(this,e,t,o),this}removeMark(e,t,o){return _v(this,e,t,o),this}clearIncompatible(e,t,o){return Pa(this,e,t,o),this}}const Oa=Object.create(null);class q{constructor(e,t,o){this.$anchor=e,this.$head=t,this.ranges=o||[new r2(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=O.empty){let o=t.content.lastChild,n=null;for(let l=0;l<t.openEnd;l++)n=o,o=o.lastChild;let a=e.steps.length,s=this.ranges;for(let l=0;l<s.length;l++){let{$from:p,$to:d}=s[l],c=e.mapping.slice(a);e.replaceRange(c.map(p.pos),c.map(d.pos),l?O.empty:t),l==0&&yf(e,a,(o?o.isInline:n&&n.isTextblock)?-1:1)}}replaceWith(e,t){let o=e.steps.length,n=this.ranges;for(let a=0;a<n.length;a++){let{$from:s,$to:l}=n[a],p=e.mapping.slice(o),d=p.map(s.pos),c=p.map(l.pos);a?e.deleteRange(d,c):(e.replaceRangeWith(d,c,t),yf(e,o,t.isInline?-1:1))}}static findFrom(e,t,o=!1){let n=e.parent.inlineContent?new j(e):po(e.node(0),e.parent,e.pos,e.index(),t,o);if(n)return n;for(let a=e.depth-1;a>=0;a--){let s=t<0?po(e.node(0),e.node(a),e.before(a+1),e.index(a),t,o):po(e.node(0),e.node(a),e.after(a+1),e.index(a)+1,t,o);if(s)return s}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Qe(e.node(0))}static atStart(e){return po(e,e,0,0,1)||new Qe(e)}static atEnd(e){return po(e,e,e.content.size,e.childCount,-1)||new Qe(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let o=Oa[t.type];if(!o)throw new RangeError(`No selection type ${t.type} defined`);return o.fromJSON(e,t)}static jsonID(e,t){if(e in Oa)throw new RangeError("Duplicate use of selection JSON ID "+e);return Oa[e]=t,t.prototype.jsonID=e,t}getBookmark(){return j.between(this.$anchor,this.$head).getBookmark()}}q.prototype.visible=!0;class r2{constructor(e,t){this.$from=e,this.$to=t}}let ff=!1;function hf(r){!ff&&!r.parent.inlineContent&&(ff=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+r.parent.type.name+")"))}class j extends q{constructor(e,t=e){hf(e),hf(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let o=e.resolve(t.map(this.head));if(!o.parent.inlineContent)return q.near(o);let n=e.resolve(t.map(this.anchor));return new j(n.parent.inlineContent?n:o,o)}replace(e,t=O.empty){if(super.replace(e,t),t==O.empty){let o=this.$from.marksAcross(this.$to);o&&e.ensureMarks(o)}}eq(e){return e instanceof j&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Xn(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if(typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new j(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,o=t){let n=e.resolve(t);return new this(n,o==t?n:e.resolve(o))}static between(e,t,o){let n=e.pos-t.pos;if((!o||n)&&(o=n>=0?1:-1),!t.parent.inlineContent){let a=q.findFrom(t,o,!0)||q.findFrom(t,-o,!0);if(a)t=a.$head;else return q.near(t,o)}return e.parent.inlineContent||(n==0?e=t:(e=(q.findFrom(e,-o,!0)||q.findFrom(e,o,!0)).$anchor,e.pos<t.pos!=n<0&&(e=t))),new j(e,t)}}q.jsonID("text",j);class Xn{constructor(e,t){this.anchor=e,this.head=t}map(e){return new Xn(e.map(this.anchor),e.map(this.head))}resolve(e){return j.between(e.resolve(this.anchor),e.resolve(this.head))}}class H extends q{constructor(e){let t=e.nodeAfter,o=e.node(0).resolve(e.pos+t.nodeSize);super(e,o),this.node=t}map(e,t){let{deleted:o,pos:n}=t.mapResult(this.anchor),a=e.resolve(n);return o?q.near(a):new H(a)}content(){return new O(N.from(this.node),0,0)}eq(e){return e instanceof H&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Va(this.anchor)}static fromJSON(e,t){if(typeof t.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new H(e.resolve(t.anchor))}static create(e,t){return new H(e.resolve(t))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}H.prototype.visible=!1,q.jsonID("node",H);class Va{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:o}=e.mapResult(this.anchor);return t?new Xn(o,o):new Va(o)}resolve(e){let t=e.resolve(this.anchor),o=t.nodeAfter;return o&&H.isSelectable(o)?new H(t):q.near(t)}}class Qe extends q{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=O.empty){if(t==O.empty){e.delete(0,e.doc.content.size);let o=q.atStart(e.doc);o.eq(e.selection)||e.setSelection(o)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Qe(e)}map(e){return new Qe(e)}eq(e){return e instanceof Qe}getBookmark(){return o2}}q.jsonID("all",Qe);const o2={map(){return this},resolve(r){return new Qe(r)}};function po(r,e,t,o,n,a=!1){if(e.inlineContent)return j.create(r,t);for(let s=o-(n>0?0:1);n>0?s<e.childCount:s>=0;s+=n){let l=e.child(s);if(l.isAtom){if(!a&&H.isSelectable(l))return H.create(r,t-(n<0?l.nodeSize:0))}else{let p=po(r,l,t+n,n<0?l.childCount:0,n,a);if(p)return p}t+=l.nodeSize*n}return null}function yf(r,e,t){let o=r.steps.length-1;if(o<e)return;let n=r.steps[o];if(!(n instanceof xe||n instanceof fe))return;let a=r.mapping.maps[o],s;a.forEach((l,p,d,c)=>{s==null&&(s=c)}),r.setSelection(q.near(r.doc.resolve(s),t))}const wf=1,Qn=2,vf=4;class n2 extends xf{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|wf)&~Qn,this.storedMarks=null,this}get selectionSet(){return(this.updated&wf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Qn,this}ensureMarks(e){return te.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&Qn)>0}addStep(e,t){super.addStep(e,t),this.updated=this.updated&~Qn,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let o=this.selection;return t&&(e=e.mark(this.storedMarks||(o.empty?o.$from.marks():o.$from.marksAcross(o.$to)||te.none))),o.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,o){let n=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(n.text(e),!0):this.deleteSelection();{if(o==null&&(o=t),o=o??t,!e)return this.deleteRange(t,o);let a=this.storedMarks;if(!a){let s=this.doc.resolve(t);a=o==t?s.marks():s.marksAcross(this.doc.resolve(o))}return this.replaceRangeWith(t,o,n.text(e,a)),this.selection.empty||this.setSelection(q.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e=="string"?e:e.key]=t,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=vf,this}get scrolledIntoView(){return(this.updated&vf)>0}}function kf(r,e){return!e||!r?r:r.bind(e)}class Uo{constructor(e,t,o){this.name=e,this.init=kf(t.init,o),this.apply=kf(t.apply,o)}}const i2=[new Uo("doc",{init(r){return r.doc||r.schema.topNodeType.createAndFill()},apply(r){return r.doc}}),new Uo("selection",{init(r,e){return r.selection||q.atStart(e.doc)},apply(r){return r.selection}}),new Uo("storedMarks",{init(r){return r.storedMarks||null},apply(r,e,t,o){return o.selection.$cursor?r.storedMarks:null}}),new Uo("scrollToSelection",{init(){return 0},apply(r,e){return r.scrolledIntoView?e+1:e}})];class Ia{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=i2.slice(),t&&t.forEach(o=>{if(this.pluginsByKey[o.key])throw new RangeError("Adding different instances of a keyed plugin ("+o.key+")");this.plugins.push(o),this.pluginsByKey[o.key]=o,o.spec.state&&this.fields.push(new Uo(o.key,o.spec.state,o))})}}class co{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let o=0;o<this.config.plugins.length;o++)if(o!=t){let n=this.config.plugins[o];if(n.spec.filterTransaction&&!n.spec.filterTransaction.call(n,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],o=this.applyInner(e),n=null;for(;;){let a=!1;for(let s=0;s<this.config.plugins.length;s++){let l=this.config.plugins[s];if(l.spec.appendTransaction){let p=n?n[s].n:0,d=n?n[s].state:this,c=p<t.length&&l.spec.appendTransaction.call(l,p?t.slice(p):t,d,o);if(c&&o.filterTransaction(c,s)){if(c.setMeta("appendedTransaction",e),!n){n=[];for(let m=0;m<this.config.plugins.length;m++)n.push(m<s?{state:o,n:t.length}:{state:this,n:0})}t.push(c),o=o.applyInner(c),a=!0}n&&(n[s]={state:o,n:t.length})}}if(!a)return{state:o,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new co(this.config),o=this.config.fields;for(let n=0;n<o.length;n++){let a=o[n];t[a.name]=a.apply(e,this[a.name],this,t)}return t}get tr(){return new n2(this)}static create(e){let t=new Ia(e.doc?e.doc.type.schema:e.schema,e.plugins),o=new co(t);for(let n=0;n<t.fields.length;n++)o[t.fields[n].name]=t.fields[n].init(e,o);return o}reconfigure(e){let t=new Ia(this.schema,e.plugins),o=t.fields,n=new co(t);for(let a=0;a<o.length;a++){let s=o[a].name;n[s]=this.hasOwnProperty(s)?this[s]:o[a].init(e,n)}return n}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(o=>o.toJSON())),e&&typeof e=="object")for(let o in e){if(o=="doc"||o=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let n=e[o],a=n.spec.state;a&&a.toJSON&&(t[o]=a.toJSON.call(n,this[n.key]))}return t}static fromJSON(e,t,o){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let n=new Ia(e.schema,e.plugins),a=new co(n);return n.fields.forEach(s=>{if(s.name=="doc")a.doc=tr.fromJSON(e.schema,t.doc);else if(s.name=="selection")a.selection=q.fromJSON(a.doc,t.selection);else if(s.name=="storedMarks")t.storedMarks&&(a.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(o)for(let l in o){let p=o[l],d=p.spec.state;if(p.key==s.name&&d&&d.fromJSON&&Object.prototype.hasOwnProperty.call(t,l)){a[s.name]=d.fromJSON.call(p,e,t[l],a);return}}a[s.name]=s.init(e,a)}}),a}}function Sf(r,e,t){for(let o in r){let n=r[o];n instanceof Function?n=n.bind(e):o=="handleDOMEvents"&&(n=Sf(n,e,{})),t[o]=n}return t}class me{constructor(e){this.spec=e,this.props={},e.props&&Sf(e.props,this,this.props),this.key=e.key?e.key.key:Cf("plugin")}getState(e){return e[this.key]}}const _a=Object.create(null);function Cf(r){return r in _a?r+"$"+ ++_a[r]:(_a[r]=0,r+"$")}class Ie{constructor(e="key"){this.key=Cf(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Ce=function(r){for(var e=0;;e++)if(r=r.previousSibling,!r)return e},mo=function(r){let e=r.assignedSlot||r.parentNode;return e&&e.nodeType==11?e.host:e};let Ra=null;const _t=function(r,e,t){let o=Ra||(Ra=document.createRange());return o.setEnd(r,t??r.nodeValue.length),o.setStart(r,e||0),o},a2=function(){Ra=null},Ar=function(r,e,t,o){return t&&(Ef(r,e,t,o,-1)||Ef(r,e,t,o,1))},s2=/^(img|br|input|textarea|hr)$/i;function Ef(r,e,t,o,n){for(var a;;){if(r==t&&e==o)return!0;if(e==(n<0?0:tt(r))){let s=r.parentNode;if(!s||s.nodeType!=1||Go(r)||s2.test(r.nodeName)||r.contentEditable=="false")return!1;e=Ce(r)+(n<0?0:1),r=s}else if(r.nodeType==1){let s=r.childNodes[e+(n<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false")if(!((a=s.pmViewDesc)===null||a===void 0)&&a.ignoreForSelection)e+=n;else return!1;else r=s,e=n<0?tt(r):0}else return!1}}function tt(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function l2(r,e){for(;;){if(r.nodeType==3&&e)return r;if(r.nodeType==1&&e>0){if(r.contentEditable=="false")return null;r=r.childNodes[e-1],e=tt(r)}else if(r.parentNode&&!Go(r))e=Ce(r),r=r.parentNode;else return null}}function p2(r,e){for(;;){if(r.nodeType==3&&e<r.nodeValue.length)return r;if(r.nodeType==1&&e<r.childNodes.length){if(r.contentEditable=="false")return null;r=r.childNodes[e],e=0}else if(r.parentNode&&!Go(r))e=Ce(r)+1,r=r.parentNode;else return null}}function d2(r,e,t){for(let o=e==0,n=e==tt(r);o||n;){if(r==t)return!0;let a=Ce(r);if(r=r.parentNode,!r)return!1;o=o&&a==0,n=n&&a==tt(r)}}function Go(r){let e;for(let t=r;t&&!(e=t.pmViewDesc);t=t.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==r||e.contentDOM==r)}const Zn=function(r){return r.focusNode&&Ar(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)};function Or(r,e){let t=document.createEvent("Event");return t.initEvent("keydown",!0,!0),t.keyCode=r,t.key=t.code=e,t}function c2(r){let e=r.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function m2(r,e,t){if(r.caretPositionFromPoint)try{let o=r.caretPositionFromPoint(e,t);if(o)return{node:o.offsetNode,offset:Math.min(tt(o.offsetNode),o.offset)}}catch{}if(r.caretRangeFromPoint){let o=r.caretRangeFromPoint(e,t);if(o)return{node:o.startContainer,offset:Math.min(tt(o.startContainer),o.startOffset)}}}const Tt=typeof navigator<"u"?navigator:null,Tf=typeof document<"u"?document:null,ir=Tt&&Tt.userAgent||"",Ha=/Edge\/(\d+)/.exec(ir),Mf=/MSIE \d/.exec(ir),za=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ir),je=!!(Mf||za||Ha),ar=Mf?document.documentMode:za?+za[1]:Ha?+Ha[1]:0,bt=!je&&/gecko\/(\d+)/i.test(ir);bt&&+(/Firefox\/(\d+)/.exec(ir)||[0,0])[1];const Fa=!je&&/Chrome\/(\d+)/.exec(ir),De=!!Fa,Bf=Fa?+Fa[1]:0,_e=!je&&!!Tt&&/Apple Computer/.test(Tt.vendor),bo=_e&&(/Mobile\/\w+/.test(ir)||!!Tt&&Tt.maxTouchPoints>2),rt=bo||(Tt?/Mac/.test(Tt.platform):!1),b2=Tt?/Win/.test(Tt.platform):!1,Rt=/Android \d/.test(ir),Ko=!!Tf&&"webkitFontSmoothing"in Tf.documentElement.style,u2=Ko?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function g2(r){let e=r.defaultView&&r.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:r.documentElement.clientWidth,top:0,bottom:r.documentElement.clientHeight}}function Ht(r,e){return typeof r=="number"?r:r[e]}function x2(r){let e=r.getBoundingClientRect(),t=e.width/r.offsetWidth||1,o=e.height/r.offsetHeight||1;return{left:e.left,right:e.left+r.clientWidth*t,top:e.top,bottom:e.top+r.clientHeight*o}}function Nf(r,e,t){let o=r.someProp("scrollThreshold")||0,n=r.someProp("scrollMargin")||5,a=r.dom.ownerDocument;for(let s=t||r.dom;s;){if(s.nodeType!=1){s=mo(s);continue}let l=s,p=l==a.body,d=p?g2(a):x2(l),c=0,m=0;if(e.top<d.top+Ht(o,"top")?m=-(d.top-e.top+Ht(n,"top")):e.bottom>d.bottom-Ht(o,"bottom")&&(m=e.bottom-e.top>d.bottom-d.top?e.top+Ht(n,"top")-d.top:e.bottom-d.bottom+Ht(n,"bottom")),e.left<d.left+Ht(o,"left")?c=-(d.left-e.left+Ht(n,"left")):e.right>d.right-Ht(o,"right")&&(c=e.right-d.right+Ht(n,"right")),c||m)if(p)a.defaultView.scrollBy(c,m);else{let u=l.scrollLeft,g=l.scrollTop;m&&(l.scrollTop+=m),c&&(l.scrollLeft+=c);let f=l.scrollLeft-u,x=l.scrollTop-g;e={left:e.left-f,top:e.top-x,right:e.right-f,bottom:e.bottom-x}}let b=p?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(b))break;s=b=="absolute"?s.offsetParent:mo(s)}}function f2(r){let e=r.dom.getBoundingClientRect(),t=Math.max(0,e.top),o,n;for(let a=(e.left+e.right)/2,s=t+1;s<Math.min(innerHeight,e.bottom);s+=5){let l=r.root.elementFromPoint(a,s);if(!l||l==r.dom||!r.dom.contains(l))continue;let p=l.getBoundingClientRect();if(p.top>=t-20){o=l,n=p.top;break}}return{refDOM:o,refTop:n,stack:Pf(r.dom)}}function Pf(r){let e=[],t=r.ownerDocument;for(let o=r;o&&(e.push({dom:o,top:o.scrollTop,left:o.scrollLeft}),r!=t);o=mo(o));return e}function h2({refDOM:r,refTop:e,stack:t}){let o=r?r.getBoundingClientRect().top:0;Df(t,o==0?0:o-e)}function Df(r,e){for(let t=0;t<r.length;t++){let{dom:o,top:n,left:a}=r[t];o.scrollTop!=n+e&&(o.scrollTop=n+e),o.scrollLeft!=a&&(o.scrollLeft=a)}}let uo=null;function y2(r){if(r.setActive)return r.setActive();if(uo)return r.focus(uo);let e=Pf(r);r.focus(uo==null?{get preventScroll(){return uo={preventScroll:!0},!0}}:void 0),uo||(uo=!1,Df(e,0))}function Lf(r,e){let t,o=2e8,n,a=0,s=e.top,l=e.top,p,d;for(let c=r.firstChild,m=0;c;c=c.nextSibling,m++){let b;if(c.nodeType==1)b=c.getClientRects();else if(c.nodeType==3)b=_t(c).getClientRects();else continue;for(let u=0;u<b.length;u++){let g=b[u];if(g.top<=s&&g.bottom>=l){s=Math.max(g.bottom,s),l=Math.min(g.top,l);let f=g.left>e.left?g.left-e.left:g.right<e.left?e.left-g.right:0;if(f<o){t=c,o=f,n=f&&t.nodeType==3?{left:g.right<e.left?g.right:g.left,top:e.top}:e,c.nodeType==1&&f&&(a=m+(e.left>=(g.left+g.right)/2?1:0));continue}}else g.top>e.top&&!p&&g.left<=e.left&&g.right>=e.left&&(p=c,d={left:Math.max(g.left,Math.min(g.right,e.left)),top:g.top});!t&&(e.left>=g.right&&e.top>=g.top||e.left>=g.left&&e.top>=g.bottom)&&(a=m+1)}}return!t&&p&&(t=p,n=d,o=0),t&&t.nodeType==3?w2(t,n):!t||o&&t.nodeType==1?{node:r,offset:a}:Lf(t,n)}function w2(r,e){let t=r.nodeValue.length,o=document.createRange();for(let n=0;n<t;n++){o.setEnd(r,n+1),o.setStart(r,n);let a=sr(o,1);if(a.top!=a.bottom&&ja(e,a))return{node:r,offset:n+(e.left>=(a.left+a.right)/2?1:0)}}return{node:r,offset:0}}function ja(r,e){return r.left>=e.left-1&&r.left<=e.right+1&&r.top>=e.top-1&&r.top<=e.bottom+1}function v2(r,e){let t=r.parentNode;return t&&/^li$/i.test(t.nodeName)&&e.left<r.getBoundingClientRect().left?t:r}function k2(r,e,t){let{node:o,offset:n}=Lf(e,t),a=-1;if(o.nodeType==1&&!o.firstChild){let s=o.getBoundingClientRect();a=s.left!=s.right&&t.left>(s.left+s.right)/2?1:-1}return r.docView.posFromDOM(o,n,a)}function S2(r,e,t,o){let n=-1;for(let a=e,s=!1;a!=r.dom;){let l=r.docView.nearestDesc(a,!0),p;if(!l)return null;if(l.dom.nodeType==1&&(l.node.isBlock&&l.parent||!l.contentDOM)&&((p=l.dom.getBoundingClientRect()).width||p.height)&&(l.node.isBlock&&l.parent&&(!s&&p.left>o.left||p.top>o.top?n=l.posBefore:(!s&&p.right<o.left||p.bottom<o.top)&&(n=l.posAfter),s=!0),!l.contentDOM&&n<0&&!l.node.isText))return(l.node.isBlock?o.top<(p.top+p.bottom)/2:o.left<(p.left+p.right)/2)?l.posBefore:l.posAfter;a=l.dom.parentNode}return n>-1?n:r.docView.posFromDOM(e,t,-1)}function Af(r,e,t){let o=r.childNodes.length;if(o&&t.top<t.bottom)for(let n=Math.max(0,Math.min(o-1,Math.floor(o*(e.top-t.top)/(t.bottom-t.top))-2)),a=n;;){let s=r.childNodes[a];if(s.nodeType==1){let l=s.getClientRects();for(let p=0;p<l.length;p++){let d=l[p];if(ja(e,d))return Af(s,e,d)}}if((a=(a+1)%o)==n)break}return r}function C2(r,e){let t=r.dom.ownerDocument,o,n=0,a=m2(t,e.left,e.top);a&&({node:o,offset:n}=a);let s=(r.root.elementFromPoint?r.root:t).elementFromPoint(e.left,e.top),l;if(!s||!r.dom.contains(s.nodeType!=1?s.parentNode:s)){let d=r.dom.getBoundingClientRect();if(!ja(e,d)||(s=Af(r.dom,e,d),!s))return null}if(_e)for(let d=s;o&&d;d=mo(d))d.draggable&&(o=void 0);if(s=v2(s,e),o){if(bt&&o.nodeType==1&&(n=Math.min(n,o.childNodes.length),n<o.childNodes.length)){let c=o.childNodes[n],m;c.nodeName=="IMG"&&(m=c.getBoundingClientRect()).right<=e.left&&m.bottom>e.top&&n++}let d;Ko&&n&&o.nodeType==1&&(d=o.childNodes[n-1]).nodeType==1&&d.contentEditable=="false"&&d.getBoundingClientRect().top>=e.top&&n--,o==r.dom&&n==o.childNodes.length-1&&o.lastChild.nodeType==1&&e.top>o.lastChild.getBoundingClientRect().bottom?l=r.state.doc.content.size:(n==0||o.nodeType!=1||o.childNodes[n-1].nodeName!="BR")&&(l=S2(r,o,n,e))}l==null&&(l=k2(r,s,e));let p=r.docView.nearestDesc(s,!0);return{pos:l,inside:p?p.posAtStart-p.border:-1}}function Of(r){return r.top<r.bottom||r.left<r.right}function sr(r,e){let t=r.getClientRects();if(t.length){let o=t[e<0?0:t.length-1];if(Of(o))return o}return Array.prototype.find.call(t,Of)||r.getBoundingClientRect()}const E2=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Vf(r,e,t){let{node:o,offset:n,atom:a}=r.docView.domFromPos(e,t<0?-1:1),s=Ko||bt;if(o.nodeType==3)if(s&&(E2.test(o.nodeValue)||(t<0?!n:n==o.nodeValue.length))){let p=sr(_t(o,n,n),t);if(bt&&n&&/\s/.test(o.nodeValue[n-1])&&n<o.nodeValue.length){let d=sr(_t(o,n-1,n-1),-1);if(d.top==p.top){let c=sr(_t(o,n,n+1),-1);if(c.top!=p.top)return Jo(c,c.left<d.left)}}return p}else{let p=n,d=n,c=t<0?1:-1;return t<0&&!n?(d++,c=-1):t>=0&&n==o.nodeValue.length?(p--,c=1):t<0?p--:d++,Jo(sr(_t(o,p,d),c),c<0)}if(!r.state.doc.resolve(e-(a||0)).parent.inlineContent){if(a==null&&n&&(t<0||n==tt(o))){let p=o.childNodes[n-1];if(p.nodeType==1)return qa(p.getBoundingClientRect(),!1)}if(a==null&&n<tt(o)){let p=o.childNodes[n];if(p.nodeType==1)return qa(p.getBoundingClientRect(),!0)}return qa(o.getBoundingClientRect(),t>=0)}if(a==null&&n&&(t<0||n==tt(o))){let p=o.childNodes[n-1],d=p.nodeType==3?_t(p,tt(p)-(s?0:1)):p.nodeType==1&&(p.nodeName!="BR"||!p.nextSibling)?p:null;if(d)return Jo(sr(d,1),!1)}if(a==null&&n<tt(o)){let p=o.childNodes[n];for(;p.pmViewDesc&&p.pmViewDesc.ignoreForCoords;)p=p.nextSibling;let d=p?p.nodeType==3?_t(p,0,s?0:1):p.nodeType==1?p:null:null;if(d)return Jo(sr(d,-1),!0)}return Jo(sr(o.nodeType==3?_t(o):o,-t),t>=0)}function Jo(r,e){if(r.width==0)return r;let t=e?r.left:r.right;return{top:r.top,bottom:r.bottom,left:t,right:t}}function qa(r,e){if(r.height==0)return r;let t=e?r.top:r.bottom;return{top:t,bottom:t,left:r.left,right:r.right}}function If(r,e,t){let o=r.state,n=r.root.activeElement;o!=e&&r.updateState(e),n!=r.dom&&r.focus();try{return t()}finally{o!=e&&r.updateState(o),n!=r.dom&&n&&n.focus()}}function T2(r,e,t){let o=e.selection,n=t=="up"?o.$from:o.$to;return If(r,e,()=>{let{node:a}=r.docView.domFromPos(n.pos,t=="up"?-1:1);for(;;){let l=r.docView.nearestDesc(a,!0);if(!l)break;if(l.node.isBlock){a=l.contentDOM||l.dom;break}a=l.dom.parentNode}let s=Vf(r,n.pos,1);for(let l=a.firstChild;l;l=l.nextSibling){let p;if(l.nodeType==1)p=l.getClientRects();else if(l.nodeType==3)p=_t(l,0,l.nodeValue.length).getClientRects();else continue;for(let d=0;d<p.length;d++){let c=p[d];if(c.bottom>c.top+1&&(t=="up"?s.top-c.top>(c.bottom-s.top)*2:c.bottom-s.bottom>(s.bottom-c.top)*2))return!1}}return!0})}const M2=/[\u0590-\u08ac]/;function B2(r,e,t){let{$head:o}=e.selection;if(!o.parent.isTextblock)return!1;let n=o.parentOffset,a=!n,s=n==o.parent.content.size,l=r.domSelection();return l?!M2.test(o.parent.textContent)||!l.modify?t=="left"||t=="backward"?a:s:If(r,e,()=>{let{focusNode:p,focusOffset:d,anchorNode:c,anchorOffset:m}=r.domSelectionRange(),b=l.caretBidiLevel;l.modify("move",t,"character");let u=o.depth?r.docView.domAfterPos(o.before()):r.dom,{focusNode:g,focusOffset:f}=r.domSelectionRange(),x=g&&!u.contains(g.nodeType==1?g:g.parentNode)||p==g&&d==f;try{l.collapse(c,m),p&&(p!=c||d!=m)&&l.extend&&l.extend(p,d)}catch{}return b!=null&&(l.caretBidiLevel=b),x}):o.pos==o.start()||o.pos==o.end()}let _f=null,Rf=null,Hf=!1;function N2(r,e,t){return _f==e&&Rf==t?Hf:(_f=e,Rf=t,Hf=t=="up"||t=="down"?T2(r,e,t):B2(r,e,t))}const ot=0,zf=1,Vr=2,Mt=3;class Yo{constructor(e,t,o,n){this.parent=e,this.children=t,this.dom=o,this.contentDOM=n,this.dirty=ot,o.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,o){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,o=this.posAtStart;;t++){let n=this.children[t];if(n==e)return o;o+=n.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,o){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(o<0){let a,s;if(e==this.contentDOM)a=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.previousSibling}for(;a&&!((s=a.pmViewDesc)&&s.parent==this);)a=a.previousSibling;return a?this.posBeforeChild(s)+s.size:this.posAtStart}else{let a,s;if(e==this.contentDOM)a=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;a=e.nextSibling}for(;a&&!((s=a.pmViewDesc)&&s.parent==this);)a=a.nextSibling;return a?this.posBeforeChild(s):this.posAtEnd}let n;if(e==this.dom&&this.contentDOM)n=t>Ce(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))n=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(t==0)for(let a=e;;a=a.parentNode){if(a==this.dom){n=!1;break}if(a.previousSibling)break}if(n==null&&t==e.childNodes.length)for(let a=e;;a=a.parentNode){if(a==this.dom){n=!0;break}if(a.nextSibling)break}}return n??o>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let o=!0,n=e;n;n=n.parentNode){let a=this.getDesc(n),s;if(a&&(!t||a.node))if(o&&(s=a.nodeDOM)&&!(s.nodeType==1?s.contains(e.nodeType==1?e:e.parentNode):s==e))o=!1;else return a}}getDesc(e){let t=e.pmViewDesc;for(let o=t;o;o=o.parent)if(o==this)return t}posFromDOM(e,t,o){for(let n=e;n;n=n.parentNode){let a=this.getDesc(n);if(a)return a.localPosFromDOM(e,t,o)}return-1}descAt(e){for(let t=0,o=0;t<this.children.length;t++){let n=this.children[t],a=o+n.size;if(o==e&&a!=o){for(;!n.border&&n.children.length;)for(let s=0;s<n.children.length;s++){let l=n.children[s];if(l.size){n=l;break}}return n}if(e<a)return n.descAt(e-o-n.border);o=a}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let o=0,n=0;for(let a=0;o<this.children.length;o++){let s=this.children[o],l=a+s.size;if(l>e||s instanceof qf){n=e-a;break}a=l}if(n)return this.children[o].domFromPos(n-this.children[o].border,t);for(let a;o&&!(a=this.children[o-1]).size&&a instanceof Ff&&a.side>=0;o--);if(t<=0){let a,s=!0;for(;a=o?this.children[o-1]:null,!(!a||a.dom.parentNode==this.contentDOM);o--,s=!1);return a&&t&&s&&!a.border&&!a.domAtom?a.domFromPos(a.size,t):{node:this.contentDOM,offset:a?Ce(a.dom)+1:0}}else{let a,s=!0;for(;a=o<this.children.length?this.children[o]:null,!(!a||a.dom.parentNode==this.contentDOM);o++,s=!1);return a&&s&&!a.border&&!a.domAtom?a.domFromPos(0,t):{node:this.contentDOM,offset:a?Ce(a.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,o=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let n=-1,a=-1;for(let s=o,l=0;;l++){let p=this.children[l],d=s+p.size;if(n==-1&&e<=d){let c=s+p.border;if(e>=c&&t<=d-p.border&&p.node&&p.contentDOM&&this.contentDOM.contains(p.contentDOM))return p.parseRange(e,t,c);e=s;for(let m=l;m>0;m--){let b=this.children[m-1];if(b.size&&b.dom.parentNode==this.contentDOM&&!b.emptyChildAt(1)){n=Ce(b.dom)+1;break}e-=b.size}n==-1&&(n=0)}if(n>-1&&(d>t||l==this.children.length-1)){t=d;for(let c=l+1;c<this.children.length;c++){let m=this.children[c];if(m.size&&m.dom.parentNode==this.contentDOM&&!m.emptyChildAt(-1)){a=Ce(m.dom);break}t+=m.size}a==-1&&(a=this.contentDOM.childNodes.length);break}s=d}return{node:this.contentDOM,from:e,to:t,fromOffset:n,toOffset:a}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:o}=this.domFromPos(e,0);if(t.nodeType!=1||o==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[o]}setSelection(e,t,o,n=!1){let a=Math.min(e,t),s=Math.max(e,t);for(let u=0,g=0;u<this.children.length;u++){let f=this.children[u],x=g+f.size;if(a>g&&s<x)return f.setSelection(e-g-f.border,t-g-f.border,o,n);g=x}let l=this.domFromPos(e,e?-1:1),p=t==e?l:this.domFromPos(t,t?-1:1),d=o.root.getSelection(),c=o.domSelectionRange(),m=!1;if((bt||_e)&&e==t){let{node:u,offset:g}=l;if(u.nodeType==3){if(m=!!(g&&u.nodeValue[g-1]==`
12
+ `),m&&g==u.nodeValue.length)for(let f=u,x;f;f=f.parentNode){if(x=f.nextSibling){x.nodeName=="BR"&&(l=p={node:x.parentNode,offset:Ce(x)+1});break}let y=f.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let f=u.childNodes[g-1];m=f&&(f.nodeName=="BR"||f.contentEditable=="false")}}if(bt&&c.focusNode&&c.focusNode!=p.node&&c.focusNode.nodeType==1){let u=c.focusNode.childNodes[c.focusOffset];u&&u.contentEditable=="false"&&(n=!0)}if(!(n||m&&_e)&&Ar(l.node,l.offset,c.anchorNode,c.anchorOffset)&&Ar(p.node,p.offset,c.focusNode,c.focusOffset))return;let b=!1;if((d.extend||e==t)&&!m){d.collapse(l.node,l.offset);try{e!=t&&d.extend(p.node,p.offset),b=!0}catch{}}if(!b){if(e>t){let g=l;l=p,p=g}let u=document.createRange();u.setEnd(p.node,p.offset),u.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(u)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let o=0,n=0;n<this.children.length;n++){let a=this.children[n],s=o+a.size;if(o==s?e<=s&&t>=o:e<s&&t>o){let l=o+a.border,p=s-a.border;if(e>=l&&t<=p){this.dirty=e==o||t==s?Vr:zf,e==l&&t==p&&(a.contentLost||a.dom.parentNode!=this.contentDOM)?a.dirty=Mt:a.markDirty(e-l,t-l);return}else a.dirty=a.dom==a.contentDOM&&a.dom.parentNode==this.contentDOM&&!a.children.length?Vr:Mt}o=s}this.dirty=Vr}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let o=e==1?Vr:zf;t.dirty<o&&(t.dirty=o)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}}class Ff extends Yo{constructor(e,t,o,n){let a,s=t.type.toDOM;if(typeof s=="function"&&(s=s(o,()=>{if(!a)return n;if(a.parent)return a.parent.posBeforeChild(a)})),!t.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=t,this.widget=t,a=this}matchesWidget(e){return this.dirty==ot&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(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 P2 extends Yo{constructor(e,t,o,n){super(e,[],t,null),this.textDOM=o,this.text=n}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class Ir extends Yo{constructor(e,t,o,n,a){super(e,[],o,n),this.mark=t,this.spec=a}static create(e,t,o,n){let a=n.nodeViews[t.type.name],s=a&&a(t,n,o);return(!s||!s.dom)&&(s=Dr.renderSpec(document,t.type.spec.toDOM(t,o),null,t.attrs)),new Ir(e,t,s.dom,s.contentDOM||s.dom,s)}parseRule(){return this.dirty&Mt||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Mt&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=ot){let o=this.parent;for(;!o.node;)o=o.parent;o.dirty<this.dirty&&(o.dirty=this.dirty),this.dirty=ot}}slice(e,t,o){let n=Ir.create(this.parent,this.mark,!0,o),a=this.children,s=this.size;t<s&&(a=Ua(a,t,s,o)),e>0&&(a=Ua(a,0,e,o));for(let l=0;l<a.length;l++)a[l].parent=n;return n.children=a,n}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class lr extends Yo{constructor(e,t,o,n,a,s,l,p,d){super(e,[],a,s),this.node=t,this.outerDeco=o,this.innerDeco=n,this.nodeDOM=l}static create(e,t,o,n,a,s){let l=a.nodeViews[t.type.name],p,d=l&&l(t,a,()=>{if(!p)return s;if(p.parent)return p.parent.posBeforeChild(p)},o,n),c=d&&d.dom,m=d&&d.contentDOM;if(t.isText){if(!c)c=document.createTextNode(t.text);else if(c.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else c||({dom:c,contentDOM:m}=Dr.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs));!m&&!t.isText&&c.nodeName!="BR"&&(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let b=c;return c=Gf(c,o,t),d?p=new D2(e,t,o,n,c,m||null,b,d,a,s+1):t.isText?new $n(e,t,o,n,c,b,a):new lr(e,t,o,n,c,m||null,b,a,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 t=this.children.length-1;t>=0;t--){let o=this.children[t];if(this.dom.contains(o.dom.parentNode)){e.contentElement=o.dom.parentNode;break}}e.contentElement||(e.getContent=()=>N.empty)}return e}matchesNode(e,t,o){return this.dirty==ot&&e.eq(this.node)&&ei(t,this.outerDeco)&&o.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let o=this.node.inlineContent,n=t,a=e.composing?this.localCompositionInfo(e,t):null,s=a&&a.pos>-1?a:null,l=a&&a.pos<0,p=new A2(this,s&&s.node,e);I2(this.node,this.innerDeco,(d,c,m)=>{d.spec.marks?p.syncToMarks(d.spec.marks,o,e):d.type.side>=0&&!m&&p.syncToMarks(c==this.node.childCount?te.none:this.node.child(c).marks,o,e),p.placeWidget(d,e,n)},(d,c,m,b)=>{p.syncToMarks(d.marks,o,e);let u;p.findNodeMatch(d,c,m,b)||l&&e.state.selection.from>n&&e.state.selection.to<n+d.nodeSize&&(u=p.findIndexWithChild(a.node))>-1&&p.updateNodeAt(d,c,m,u,e)||p.updateNextNode(d,c,m,e,b,n)||p.addNode(d,c,m,e,n),n+=d.nodeSize}),p.syncToMarks([],o,e),this.node.isTextblock&&p.addTextblockHacks(),p.destroyRest(),(p.changed||this.dirty==Vr)&&(s&&this.protectLocalComposition(e,s),Wf(this.contentDOM,this.children,e),bo&&_2(this.dom))}localCompositionInfo(e,t){let{from:o,to:n}=e.state.selection;if(!(e.state.selection instanceof j)||o<t||n>t+this.node.content.size)return null;let a=e.input.compositionNode;if(!a||!this.dom.contains(a.parentNode))return null;if(this.node.inlineContent){let s=a.nodeValue,l=R2(this.node.content,s,o-t,n-t);return l<0?null:{node:a,pos:l,text:s}}else return{node:a,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:o,text:n}){if(this.getDesc(t))return;let a=t;for(;a.parentNode!=this.contentDOM;a=a.parentNode){for(;a.previousSibling;)a.parentNode.removeChild(a.previousSibling);for(;a.nextSibling;)a.parentNode.removeChild(a.nextSibling);a.pmViewDesc&&(a.pmViewDesc=void 0)}let s=new P2(this,a,t,n);e.input.compositionNodes.push(s),this.children=Ua(this.children,o,o+n.length,e,s)}update(e,t,o,n){return this.dirty==Mt||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,o,n),!0)}updateInner(e,t,o,n){this.updateOuterDeco(t),this.node=e,this.innerDeco=o,this.contentDOM&&this.updateChildren(n,this.posAtStart),this.dirty=ot}updateOuterDeco(e){if(ei(e,this.outerDeco))return;let t=this.nodeDOM.nodeType!=1,o=this.dom;this.dom=Uf(this.dom,this.nodeDOM,Wa(this.outerDeco,this.node,t),Wa(e,this.node,t)),this.dom!=o&&(o.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.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function jf(r,e,t,o,n){Gf(o,e,r);let a=new lr(void 0,r,e,t,o,o,o,n,0);return a.contentDOM&&a.updateChildren(n,0),a}class $n extends lr{constructor(e,t,o,n,a,s,l){super(e,t,o,n,a,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,t,o,n){return this.dirty==Mt||this.dirty!=ot&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=ot||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,n.trackWrites==this.nodeDOM&&(n.trackWrites=null)),this.node=e,this.dirty=ot,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,o){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,o)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,t,o){let n=this.node.cut(e,t),a=document.createTextNode(n.text);return new $n(this.parent,n,this.outerDeco,this.innerDeco,a,a,o)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Mt)}get domAtom(){return!1}isText(e){return this.node.text==e}}class qf extends Yo{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ot&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class D2 extends lr{constructor(e,t,o,n,a,s,l,p,d,c){super(e,t,o,n,a,s,l,d,c),this.spec=p}update(e,t,o,n){if(this.dirty==Mt)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let a=this.spec.update(e,t,o);return a&&this.updateInner(e,t,o,n),a}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,o,n)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,o,n){this.spec.setSelection?this.spec.setSelection(e,t,o.root):super.setSelection(e,t,o,n)}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 Wf(r,e,t){let o=r.firstChild,n=!1;for(let a=0;a<e.length;a++){let s=e[a],l=s.dom;if(l.parentNode==r){for(;l!=o;)o=Kf(o),n=!0;o=o.nextSibling}else n=!0,r.insertBefore(l,o);if(s instanceof Ir){let p=o?o.previousSibling:r.lastChild;Wf(s.contentDOM,s.children,t),o=p?p.nextSibling:r.firstChild}}for(;o;)o=Kf(o),n=!0;n&&t.trackWrites==r&&(t.trackWrites=null)}const Xo=function(r){r&&(this.nodeName=r)};Xo.prototype=Object.create(null);const _r=[new Xo];function Wa(r,e,t){if(r.length==0)return _r;let o=t?_r[0]:new Xo,n=[o];for(let a=0;a<r.length;a++){let s=r[a].type.attrs;if(s){s.nodeName&&n.push(o=new Xo(s.nodeName));for(let l in s){let p=s[l];p!=null&&(t&&n.length==1&&n.push(o=new Xo(e.isInline?"span":"div")),l=="class"?o.class=(o.class?o.class+" ":"")+p:l=="style"?o.style=(o.style?o.style+";":"")+p:l!="nodeName"&&(o[l]=p))}}}return n}function Uf(r,e,t,o){if(t==_r&&o==_r)return e;let n=e;for(let a=0;a<o.length;a++){let s=o[a],l=t[a];if(a){let p;l&&l.nodeName==s.nodeName&&n!=r&&(p=n.parentNode)&&p.nodeName.toLowerCase()==s.nodeName||(p=document.createElement(s.nodeName),p.pmIsDeco=!0,p.appendChild(n),l=_r[0]),n=p}L2(n,l||_r[0],s)}return n}function L2(r,e,t){for(let o in e)o!="class"&&o!="style"&&o!="nodeName"&&!(o in t)&&r.removeAttribute(o);for(let o in t)o!="class"&&o!="style"&&o!="nodeName"&&t[o]!=e[o]&&r.setAttribute(o,t[o]);if(e.class!=t.class){let o=e.class?e.class.split(" ").filter(Boolean):[],n=t.class?t.class.split(" ").filter(Boolean):[];for(let a=0;a<o.length;a++)n.indexOf(o[a])==-1&&r.classList.remove(o[a]);for(let a=0;a<n.length;a++)o.indexOf(n[a])==-1&&r.classList.add(n[a]);r.classList.length==0&&r.removeAttribute("class")}if(e.style!=t.style){if(e.style){let o=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,n;for(;n=o.exec(e.style);)r.style.removeProperty(n[1])}t.style&&(r.style.cssText+=t.style)}}function Gf(r,e,t){return Uf(r,r,_r,Wa(e,t,r.nodeType!=1))}function ei(r,e){if(r.length!=e.length)return!1;for(let t=0;t<r.length;t++)if(!r[t].type.eq(e[t].type))return!1;return!0}function Kf(r){let e=r.nextSibling;return r.parentNode.removeChild(r),e}class A2{constructor(e,t,o){this.lock=t,this.view=o,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=O2(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let o=e;o<t;o++)this.top.children[o].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,o){let n=0,a=this.stack.length>>1,s=Math.min(a,e.length);for(;n<s&&(n==a-1?this.top:this.stack[n+1<<1]).matchesMark(e[n])&&e[n].type.spec.spanning!==!1;)n++;for(;n<a;)this.destroyRest(),this.top.dirty=ot,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let l=-1;for(let p=this.index;p<Math.min(this.index+3,this.top.children.length);p++){let d=this.top.children[p];if(d.matchesMark(e[a])&&!this.isLocked(d.dom)){l=p;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let p=Ir.create(this.top,e[a],t,o);this.top.children.splice(this.index,0,p),this.top=p,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,o,n){let a=-1,s;if(n>=this.preMatch.index&&(s=this.preMatch.matches[n-this.preMatch.index]).parent==this.top&&s.matchesNode(e,t,o))a=this.top.children.indexOf(s,this.index);else for(let l=this.index,p=Math.min(this.top.children.length,l+5);l<p;l++){let d=this.top.children[l];if(d.matchesNode(e,t,o)&&!this.preMatch.matched.has(d)){a=l;break}}return a<0?!1:(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,o,n,a){let s=this.top.children[n];return s.dirty==Mt&&s.dom==s.contentDOM&&(s.dirty=Vr),s.update(e,t,o,a)?(this.destroyBetween(this.index,n),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let o=e.pmViewDesc;if(o){for(let n=this.index;n<this.top.children.length;n++)if(this.top.children[n]==o)return n}return-1}e=t}}updateNextNode(e,t,o,n,a,s){for(let l=this.index;l<this.top.children.length;l++){let p=this.top.children[l];if(p instanceof lr){let d=this.preMatch.matched.get(p);if(d!=null&&d!=a)return!1;let c=p.dom,m,b=this.isLocked(c)&&!(e.isText&&p.node&&p.node.isText&&p.nodeDOM.nodeValue==e.text&&p.dirty!=Mt&&ei(t,p.outerDeco));if(!b&&p.update(e,t,o,n))return this.destroyBetween(this.index,l),p.dom!=c&&(this.changed=!0),this.index++,!0;if(!b&&(m=this.recreateWrapper(p,e,t,o,n,s)))return this.destroyBetween(this.index,l),this.top.children[this.index]=m,m.contentDOM&&(m.dirty=Vr,m.updateChildren(n,s+1),m.dirty=ot),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,o,n,a,s){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!ei(o,e.outerDeco)||!n.eq(e.innerDeco))return null;let l=lr.create(this.top,t,o,n,a,s);if(l.contentDOM){l.children=e.children,e.children=[];for(let p of l.children)p.parent=l}return e.destroy(),l}addNode(e,t,o,n,a){let s=lr.create(this.top,e,t,o,n,a);s.contentDOM&&s.updateChildren(n,a+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(e,t,o){let n=this.index<this.top.children.length?this.top.children[this.index]:null;if(n&&n.matchesWidget(e)&&(e==n.widget||!n.widget.type.toDOM.parentNode))this.index++;else{let a=new Ff(this.top,e,t,o);this.top.children.splice(this.index++,0,a),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Ir;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof $n)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((_e||De)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let o=document.createElement(e);e=="IMG"&&(o.className="ProseMirror-separator",o.alt=""),e=="BR"&&(o.className="ProseMirror-trailingBreak");let n=new qf(this.top,[],o,null);t!=this.top?t.children.push(n):t.children.splice(this.index++,0,n),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function O2(r,e){let t=e,o=t.children.length,n=r.childCount,a=new Map,s=[];e:for(;n>0;){let l;for(;;)if(o){let d=t.children[o-1];if(d instanceof Ir)t=d,o=d.children.length;else{l=d,o--;break}}else{if(t==e)break e;o=t.parent.children.indexOf(t),t=t.parent}let p=l.node;if(p){if(p!=r.child(n-1))break;--n,a.set(l,n),s.push(l)}}return{index:n,matched:a,matches:s.reverse()}}function V2(r,e){return r.type.side-e.type.side}function I2(r,e,t,o){let n=e.locals(r),a=0;if(n.length==0){for(let d=0;d<r.childCount;d++){let c=r.child(d);o(c,n,e.forChild(a,c),d),a+=c.nodeSize}return}let s=0,l=[],p=null;for(let d=0;;){let c,m;for(;s<n.length&&n[s].to==a;){let x=n[s++];x.widget&&(c?(m||(m=[c])).push(x):c=x)}if(c)if(m){m.sort(V2);for(let x=0;x<m.length;x++)t(m[x],d,!!p)}else t(c,d,!!p);let b,u;if(p)u=-1,b=p,p=null;else if(d<r.childCount)u=d,b=r.child(d++);else break;for(let x=0;x<l.length;x++)l[x].to<=a&&l.splice(x--,1);for(;s<n.length&&n[s].from<=a&&n[s].to>a;)l.push(n[s++]);let g=a+b.nodeSize;if(b.isText){let x=g;s<n.length&&n[s].from<x&&(x=n[s].from);for(let y=0;y<l.length;y++)l[y].to<x&&(x=l[y].to);x<g&&(p=b.cut(x-a),b=b.cut(0,x-a),g=x,u=-1)}else for(;s<n.length&&n[s].to<g;)s++;let f=b.isInline&&!b.isLeaf?l.filter(x=>!x.inline):l.slice();o(b,f,e.forChild(a,b),u),a=g}}function _2(r){if(r.nodeName=="UL"||r.nodeName=="OL"){let e=r.style.cssText;r.style.cssText=e+"; list-style: square !important",window.getComputedStyle(r).listStyle,r.style.cssText=e}}function R2(r,e,t,o){for(let n=0,a=0;n<r.childCount&&a<=o;){let s=r.child(n++),l=a;if(a+=s.nodeSize,!s.isText)continue;let p=s.text;for(;n<r.childCount;){let d=r.child(n++);if(a+=d.nodeSize,!d.isText)break;p+=d.text}if(a>=t){if(a>=o&&p.slice(o-e.length-l,o-l)==e)return o-e.length;let d=l<o?p.lastIndexOf(e,o-l-1):-1;if(d>=0&&d+e.length+l>=t)return l+d;if(t==o&&p.length>=o+e.length-l&&p.slice(o-l,o-l+e.length)==e)return o}}return-1}function Ua(r,e,t,o,n){let a=[];for(let s=0,l=0;s<r.length;s++){let p=r[s],d=l,c=l+=p.size;d>=t||c<=e?a.push(p):(d<e&&a.push(p.slice(0,e-d,o)),n&&(a.push(n),n=void 0),c>t&&a.push(p.slice(t-d,p.size,o)))}return a}function Ga(r,e=null){let t=r.domSelectionRange(),o=r.state.doc;if(!t.focusNode)return null;let n=r.docView.nearestDesc(t.focusNode),a=n&&n.size==0,s=r.docView.posFromDOM(t.focusNode,t.focusOffset,1);if(s<0)return null;let l=o.resolve(s),p,d;if(Zn(t)){for(p=s;n&&!n.node;)n=n.parent;let m=n.node;if(n&&m.isAtom&&H.isSelectable(m)&&n.parent&&!(m.isInline&&d2(t.focusNode,t.focusOffset,n.dom))){let b=n.posBefore;d=new H(s==b?l:o.resolve(b))}}else{if(t instanceof r.dom.ownerDocument.defaultView.Selection&&t.rangeCount>1){let m=s,b=s;for(let u=0;u<t.rangeCount;u++){let g=t.getRangeAt(u);m=Math.min(m,r.docView.posFromDOM(g.startContainer,g.startOffset,1)),b=Math.max(b,r.docView.posFromDOM(g.endContainer,g.endOffset,-1))}if(m<0)return null;[p,s]=b==r.state.selection.anchor?[b,m]:[m,b],l=o.resolve(s)}else p=r.docView.posFromDOM(t.anchorNode,t.anchorOffset,1);if(p<0)return null}let c=o.resolve(p);if(!d){let m=e=="pointer"||r.state.selection.head<l.pos&&!a?1:-1;d=Ja(r,c,l,m)}return d}function Jf(r){return r.editable?r.hasFocus():th(r)&&document.activeElement&&document.activeElement.contains(r.dom)}function zt(r,e=!1){let t=r.state.selection;if(Zf(r,t),!!Jf(r)){if(!e&&r.input.mouseDown&&r.input.mouseDown.allowDefault&&De){let o=r.domSelectionRange(),n=r.domObserver.currentSelection;if(o.anchorNode&&n.anchorNode&&Ar(o.anchorNode,o.anchorOffset,n.anchorNode,n.anchorOffset)){r.input.mouseDown.delayedSelectionSync=!0,r.domObserver.setCurSelection();return}}if(r.domObserver.disconnectSelection(),r.cursorWrapper)z2(r);else{let{anchor:o,head:n}=t,a,s;Yf&&!(t instanceof j)&&(t.$from.parent.inlineContent||(a=Xf(r,t.from)),!t.empty&&!t.$from.parent.inlineContent&&(s=Xf(r,t.to))),r.docView.setSelection(o,n,r,e),Yf&&(a&&Qf(a),s&&Qf(s)),t.visible?r.dom.classList.remove("ProseMirror-hideselection"):(r.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&H2(r))}r.domObserver.setCurSelection(),r.domObserver.connectSelection()}}const Yf=_e||De&&Bf<63;function Xf(r,e){let{node:t,offset:o}=r.docView.domFromPos(e,0),n=o<t.childNodes.length?t.childNodes[o]:null,a=o?t.childNodes[o-1]:null;if(_e&&n&&n.contentEditable=="false")return Ka(n);if((!n||n.contentEditable=="false")&&(!a||a.contentEditable=="false")){if(n)return Ka(n);if(a)return Ka(a)}}function Ka(r){return r.contentEditable="true",_e&&r.draggable&&(r.draggable=!1,r.wasDraggable=!0),r}function Qf(r){r.contentEditable="false",r.wasDraggable&&(r.draggable=!0,r.wasDraggable=null)}function H2(r){let e=r.dom.ownerDocument;e.removeEventListener("selectionchange",r.input.hideSelectionGuard);let t=r.domSelectionRange(),o=t.anchorNode,n=t.anchorOffset;e.addEventListener("selectionchange",r.input.hideSelectionGuard=()=>{(t.anchorNode!=o||t.anchorOffset!=n)&&(e.removeEventListener("selectionchange",r.input.hideSelectionGuard),setTimeout(()=>{(!Jf(r)||r.state.selection.visible)&&r.dom.classList.remove("ProseMirror-hideselection")},20))})}function z2(r){let e=r.domSelection(),t=document.createRange();if(!e)return;let o=r.cursorWrapper.dom,n=o.nodeName=="IMG";n?t.setStart(o.parentNode,Ce(o)+1):t.setStart(o,0),t.collapse(!0),e.removeAllRanges(),e.addRange(t),!n&&!r.state.selection.visible&&je&&ar<=11&&(o.disabled=!0,o.disabled=!1)}function Zf(r,e){if(e instanceof H){let t=r.docView.descAt(e.from);t!=r.lastSelectedViewDesc&&($f(r),t&&t.selectNode(),r.lastSelectedViewDesc=t)}else $f(r)}function $f(r){r.lastSelectedViewDesc&&(r.lastSelectedViewDesc.parent&&r.lastSelectedViewDesc.deselectNode(),r.lastSelectedViewDesc=void 0)}function Ja(r,e,t,o){return r.someProp("createSelectionBetween",n=>n(r,e,t))||j.between(e,t,o)}function eh(r){return r.editable&&!r.hasFocus()?!1:th(r)}function th(r){let e=r.domSelectionRange();if(!e.anchorNode)return!1;try{return r.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(r.editable||r.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function F2(r){let e=r.docView.domFromPos(r.state.selection.anchor,0),t=r.domSelectionRange();return Ar(e.node,e.offset,t.anchorNode,t.anchorOffset)}function Ya(r,e){let{$anchor:t,$head:o}=r.selection,n=e>0?t.max(o):t.min(o),a=n.parent.inlineContent?n.depth?r.doc.resolve(e>0?n.after():n.before()):null:n;return a&&q.findFrom(a,e)}function pr(r,e){return r.dispatch(r.state.tr.setSelection(e).scrollIntoView()),!0}function rh(r,e,t){let o=r.state.selection;if(o instanceof j)if(t.indexOf("s")>-1){let{$head:n}=o,a=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter;if(!a||a.isText||!a.isLeaf)return!1;let s=r.state.doc.resolve(n.pos+a.nodeSize*(e<0?-1:1));return pr(r,new j(o.$anchor,s))}else if(o.empty){if(r.endOfTextblock(e>0?"forward":"backward")){let n=Ya(r.state,e);return n&&n instanceof H?pr(r,n):!1}else if(!(rt&&t.indexOf("m")>-1)){let n=o.$head,a=n.textOffset?null:e<0?n.nodeBefore:n.nodeAfter,s;if(!a||a.isText)return!1;let l=e<0?n.pos-a.nodeSize:n.pos;return a.isAtom||(s=r.docView.descAt(l))&&!s.contentDOM?H.isSelectable(a)?pr(r,new H(e<0?r.state.doc.resolve(n.pos-a.nodeSize):n)):Ko?pr(r,new j(r.state.doc.resolve(e<0?l:l+a.nodeSize))):!1:!1}}else return!1;else{if(o instanceof H&&o.node.isInline)return pr(r,new j(e>0?o.$to:o.$from));{let n=Ya(r.state,e);return n?pr(r,n):!1}}}function ti(r){return r.nodeType==3?r.nodeValue.length:r.childNodes.length}function Qo(r,e){let t=r.pmViewDesc;return t&&t.size==0&&(e<0||r.nextSibling||r.nodeName!="BR")}function go(r,e){return e<0?j2(r):q2(r)}function j2(r){let e=r.domSelectionRange(),t=e.focusNode,o=e.focusOffset;if(!t)return;let n,a,s=!1;for(bt&&t.nodeType==1&&o<ti(t)&&Qo(t.childNodes[o],-1)&&(s=!0);;)if(o>0){if(t.nodeType!=1)break;{let l=t.childNodes[o-1];if(Qo(l,-1))n=t,a=--o;else if(l.nodeType==3)t=l,o=t.nodeValue.length;else break}}else{if(oh(t))break;{let l=t.previousSibling;for(;l&&Qo(l,-1);)n=t.parentNode,a=Ce(l),l=l.previousSibling;if(l)t=l,o=ti(t);else{if(t=t.parentNode,t==r.dom)break;o=0}}}s?Xa(r,t,o):n&&Xa(r,n,a)}function q2(r){let e=r.domSelectionRange(),t=e.focusNode,o=e.focusOffset;if(!t)return;let n=ti(t),a,s;for(;;)if(o<n){if(t.nodeType!=1)break;let l=t.childNodes[o];if(Qo(l,1))a=t,s=++o;else break}else{if(oh(t))break;{let l=t.nextSibling;for(;l&&Qo(l,1);)a=l.parentNode,s=Ce(l)+1,l=l.nextSibling;if(l)t=l,o=0,n=ti(t);else{if(t=t.parentNode,t==r.dom)break;o=n=0}}}a&&Xa(r,a,s)}function oh(r){let e=r.pmViewDesc;return e&&e.node&&e.node.isBlock}function W2(r,e){for(;r&&e==r.childNodes.length&&!Go(r);)e=Ce(r)+1,r=r.parentNode;for(;r&&e<r.childNodes.length;){let t=r.childNodes[e];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=0}}function U2(r,e){for(;r&&!e&&!Go(r);)e=Ce(r),r=r.parentNode;for(;r&&e;){let t=r.childNodes[e-1];if(t.nodeType==3)return t;if(t.nodeType==1&&t.contentEditable=="false")break;r=t,e=r.childNodes.length}}function Xa(r,e,t){if(e.nodeType!=3){let a,s;(s=W2(e,t))?(e=s,t=0):(a=U2(e,t))&&(e=a,t=a.nodeValue.length)}let o=r.domSelection();if(!o)return;if(Zn(o)){let a=document.createRange();a.setEnd(e,t),a.setStart(e,t),o.removeAllRanges(),o.addRange(a)}else o.extend&&o.extend(e,t);r.domObserver.setCurSelection();let{state:n}=r;setTimeout(()=>{r.state==n&&zt(r)},50)}function nh(r,e){let t=r.state.doc.resolve(e);if(!(De||b2)&&t.parent.inlineContent){let n=r.coordsAtPos(e);if(e>t.start()){let a=r.coordsAtPos(e-1),s=(a.top+a.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(a.left-n.left)>1)return a.left<n.left?"ltr":"rtl"}if(e<t.end()){let a=r.coordsAtPos(e+1),s=(a.top+a.bottom)/2;if(s>n.top&&s<n.bottom&&Math.abs(a.left-n.left)>1)return a.left>n.left?"ltr":"rtl"}}return getComputedStyle(r.dom).direction=="rtl"?"rtl":"ltr"}function ih(r,e,t){let o=r.state.selection;if(o instanceof j&&!o.empty||t.indexOf("s")>-1||rt&&t.indexOf("m")>-1)return!1;let{$from:n,$to:a}=o;if(!n.parent.inlineContent||r.endOfTextblock(e<0?"up":"down")){let s=Ya(r.state,e);if(s&&s instanceof H)return pr(r,s)}if(!n.parent.inlineContent){let s=e<0?n:a,l=o instanceof Qe?q.near(s,e):q.findFrom(s,e);return l?pr(r,l):!1}return!1}function ah(r,e){if(!(r.state.selection instanceof j))return!0;let{$head:t,$anchor:o,empty:n}=r.state.selection;if(!t.sameParent(o))return!0;if(!n)return!1;if(r.endOfTextblock(e>0?"forward":"backward"))return!0;let a=!t.textOffset&&(e<0?t.nodeBefore:t.nodeAfter);if(a&&!a.isText){let s=r.state.tr;return e<0?s.delete(t.pos-a.nodeSize,t.pos):s.delete(t.pos,t.pos+a.nodeSize),r.dispatch(s),!0}return!1}function sh(r,e,t){r.domObserver.stop(),e.contentEditable=t,r.domObserver.start()}function G2(r){if(!_e||r.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:t}=r.domSelectionRange();if(e&&e.nodeType==1&&t==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let o=e.firstChild;sh(r,o,"true"),setTimeout(()=>sh(r,o,"false"),20)}return!1}function K2(r){let e="";return r.ctrlKey&&(e+="c"),r.metaKey&&(e+="m"),r.altKey&&(e+="a"),r.shiftKey&&(e+="s"),e}function J2(r,e){let t=e.keyCode,o=K2(e);if(t==8||rt&&t==72&&o=="c")return ah(r,-1)||go(r,-1);if(t==46&&!e.shiftKey||rt&&t==68&&o=="c")return ah(r,1)||go(r,1);if(t==13||t==27)return!0;if(t==37||rt&&t==66&&o=="c"){let n=t==37?nh(r,r.state.selection.from)=="ltr"?-1:1:-1;return rh(r,n,o)||go(r,n)}else if(t==39||rt&&t==70&&o=="c"){let n=t==39?nh(r,r.state.selection.from)=="ltr"?1:-1:1;return rh(r,n,o)||go(r,n)}else{if(t==38||rt&&t==80&&o=="c")return ih(r,-1,o)||go(r,-1);if(t==40||rt&&t==78&&o=="c")return G2(r)||ih(r,1,o)||go(r,1);if(o==(rt?"m":"c")&&(t==66||t==73||t==89||t==90))return!0}return!1}function Qa(r,e){r.someProp("transformCopied",u=>{e=u(e,r)});let t=[],{content:o,openStart:n,openEnd:a}=e;for(;n>1&&a>1&&o.childCount==1&&o.firstChild.childCount==1;){n--,a--;let u=o.firstChild;t.push(u.type.name,u.attrs!=u.type.defaultAttrs?u.attrs:null),o=u.content}let s=r.someProp("clipboardSerializer")||Dr.fromSchema(r.state.schema),l=gh(),p=l.createElement("div");p.appendChild(s.serializeFragment(o,{document:l}));let d=p.firstChild,c,m=0;for(;d&&d.nodeType==1&&(c=bh[d.nodeName.toLowerCase()]);){for(let u=c.length-1;u>=0;u--){let g=l.createElement(c[u]);for(;p.firstChild;)g.appendChild(p.firstChild);p.appendChild(g),m++}d=p.firstChild}d&&d.nodeType==1&&d.setAttribute("data-pm-slice",`${n} ${a}${m?` -${m}`:""} ${JSON.stringify(t)}`);let b=r.someProp("clipboardTextSerializer",u=>u(e,r))||e.content.textBetween(0,e.content.size,`
13
+
14
+ `);return{dom:p,text:b,slice:e}}function lh(r,e,t,o,n){let a=n.parent.type.spec.code,s,l;if(!t&&!e)return null;let p=e&&(o||a||!t);if(p){if(r.someProp("transformPastedText",b=>{e=b(e,a||o,r)}),a)return e?new O(N.from(r.state.schema.text(e.replace(/\r\n?/g,`
15
+ `))),0,0):O.empty;let m=r.someProp("clipboardTextParser",b=>b(e,n,o,r));if(m)l=m;else{let b=n.marks(),{schema:u}=r.state,g=Dr.fromSchema(u);s=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(f=>{let x=s.appendChild(document.createElement("p"));f&&x.appendChild(g.serializeNode(u.text(f,b)))})}}else r.someProp("transformPastedHTML",m=>{t=m(t,r)}),s=Z2(t),Ko&&$2(s);let d=s&&s.querySelector("[data-pm-slice]"),c=d&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(d.getAttribute("data-pm-slice")||"");if(c&&c[3])for(let m=+c[3];m>0;m--){let b=s.firstChild;for(;b&&b.nodeType!=1;)b=b.nextSibling;if(!b)break;s=b}if(l||(l=(r.someProp("clipboardParser")||r.someProp("domParser")||Ro.fromSchema(r.state.schema)).parseSlice(s,{preserveWhitespace:!!(p||c),context:n,ruleFromNode(b){return b.nodeName=="BR"&&!b.nextSibling&&b.parentNode&&!Y2.test(b.parentNode.nodeName)?{ignore:!0}:null}})),c)l=e1(mh(l,+c[1],+c[2]),c[4]);else if(l=O.maxOpen(X2(l.content,n),!0),l.openStart||l.openEnd){let m=0,b=0;for(let u=l.content.firstChild;m<l.openStart&&!u.type.spec.isolating;m++,u=u.firstChild);for(let u=l.content.lastChild;b<l.openEnd&&!u.type.spec.isolating;b++,u=u.lastChild);l=mh(l,m,b)}return r.someProp("transformPasted",m=>{l=m(l,r)}),l}const Y2=/^(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 X2(r,e){if(r.childCount<2)return r;for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.index(t)),a,s=[];if(r.forEach(l=>{if(!s)return;let p=n.findWrapping(l.type),d;if(!p)return s=null;if(d=s.length&&a.length&&dh(p,a,l,s[s.length-1],0))s[s.length-1]=d;else{s.length&&(s[s.length-1]=ch(s[s.length-1],a.length));let c=ph(l,p);s.push(c),n=n.matchType(c.type),a=p}}),s)return N.from(s)}return r}function ph(r,e,t=0){for(let o=e.length-1;o>=t;o--)r=e[o].create(null,N.from(r));return r}function dh(r,e,t,o,n){if(n<r.length&&n<e.length&&r[n]==e[n]){let a=dh(r,e,t,o.lastChild,n+1);if(a)return o.copy(o.content.replaceChild(o.childCount-1,a));if(o.contentMatchAt(o.childCount).matchType(n==r.length-1?t.type:r[n+1]))return o.copy(o.content.append(N.from(ph(t,r,n+1))))}}function ch(r,e){if(e==0)return r;let t=r.content.replaceChild(r.childCount-1,ch(r.lastChild,e-1)),o=r.contentMatchAt(r.childCount).fillBefore(N.empty,!0);return r.copy(t.append(o))}function Za(r,e,t,o,n,a){let s=e<0?r.firstChild:r.lastChild,l=s.content;return r.childCount>1&&(a=0),n<o-1&&(l=Za(l,e,t,o,n+1,a)),n>=t&&(l=e<0?s.contentMatchAt(0).fillBefore(l,a<=n).append(l):l.append(s.contentMatchAt(s.childCount).fillBefore(N.empty,!0))),r.replaceChild(e<0?0:r.childCount-1,s.copy(l))}function mh(r,e,t){return e<r.openStart&&(r=new O(Za(r.content,-1,e,r.openStart,0,r.openEnd),e,r.openEnd)),t<r.openEnd&&(r=new O(Za(r.content,1,t,r.openEnd,0,0),r.openStart,t)),r}const bh={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 uh=null;function gh(){return uh||(uh=document.implementation.createHTMLDocument("title"))}let $a=null;function Q2(r){let e=window.trustedTypes;return e?($a||($a=e.defaultPolicy||e.createPolicy("ProseMirrorClipboard",{createHTML:t=>t})),$a.createHTML(r)):r}function Z2(r){let e=/^(\s*<meta [^>]*>)*/.exec(r);e&&(r=r.slice(e[0].length));let t=gh().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(r),n;if((n=o&&bh[o[1].toLowerCase()])&&(r=n.map(a=>"<"+a+">").join("")+r+n.map(a=>"</"+a+">").reverse().join("")),t.innerHTML=Q2(r),n)for(let a=0;a<n.length;a++)t=t.querySelector(n[a])||t;return t}function $2(r){let e=r.querySelectorAll(De?"span:not([class]):not([style])":"span.Apple-converted-space");for(let t=0;t<e.length;t++){let o=e[t];o.childNodes.length==1&&o.textContent==" "&&o.parentNode&&o.parentNode.replaceChild(r.ownerDocument.createTextNode(" "),o)}}function e1(r,e){if(!r.size)return r;let t=r.content.firstChild.type.schema,o;try{o=JSON.parse(e)}catch{return r}let{content:n,openStart:a,openEnd:s}=r;for(let l=o.length-2;l>=0;l-=2){let p=t.nodes[o[l]];if(!p||p.hasRequiredAttrs())break;n=N.from(p.create(o[l+1],n)),a++,s++}return new O(n,a,s)}const Re={},He={},t1={touchstart:!0,touchmove:!0};class r1{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.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function o1(r){for(let e in Re){let t=Re[e];r.dom.addEventListener(e,r.input.eventHandlers[e]=o=>{i1(r,o)&&!ts(r,o)&&(r.editable||!(o.type in He))&&t(r,o)},t1[e]?{passive:!0}:void 0)}_e&&r.dom.addEventListener("input",()=>null),es(r)}function dr(r,e){r.input.lastSelectionOrigin=e,r.input.lastSelectionTime=Date.now()}function n1(r){r.domObserver.stop();for(let e in r.input.eventHandlers)r.dom.removeEventListener(e,r.input.eventHandlers[e]);clearTimeout(r.input.composingTimeout),clearTimeout(r.input.lastIOSEnterFallbackTimeout)}function es(r){r.someProp("handleDOMEvents",e=>{for(let t in e)r.input.eventHandlers[t]||r.dom.addEventListener(t,r.input.eventHandlers[t]=o=>ts(r,o))})}function ts(r,e){return r.someProp("handleDOMEvents",t=>{let o=t[e.type];return o?o(r,e)||e.defaultPrevented:!1})}function i1(r,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target;t!=r.dom;t=t.parentNode)if(!t||t.nodeType==11||t.pmViewDesc&&t.pmViewDesc.stopEvent(e))return!1;return!0}function a1(r,e){!ts(r,e)&&Re[e.type]&&(r.editable||!(e.type in He))&&Re[e.type](r,e)}He.keydown=(r,e)=>{let t=e;if(r.input.shiftKey=t.keyCode==16||t.shiftKey,!fh(r,t)&&(r.input.lastKeyCode=t.keyCode,r.input.lastKeyCodeTime=Date.now(),!(Rt&&De&&t.keyCode==13)))if(t.keyCode!=229&&r.domObserver.forceFlush(),bo&&t.keyCode==13&&!t.ctrlKey&&!t.altKey&&!t.metaKey){let o=Date.now();r.input.lastIOSEnter=o,r.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{r.input.lastIOSEnter==o&&(r.someProp("handleKeyDown",n=>n(r,Or(13,"Enter"))),r.input.lastIOSEnter=0)},200)}else r.someProp("handleKeyDown",o=>o(r,t))||J2(r,t)?t.preventDefault():dr(r,"key")},He.keyup=(r,e)=>{e.keyCode==16&&(r.input.shiftKey=!1)},He.keypress=(r,e)=>{let t=e;if(fh(r,t)||!t.charCode||t.ctrlKey&&!t.altKey||rt&&t.metaKey)return;if(r.someProp("handleKeyPress",n=>n(r,t))){t.preventDefault();return}let o=r.state.selection;if(!(o instanceof j)||!o.$from.sameParent(o.$to)){let n=String.fromCharCode(t.charCode),a=()=>r.state.tr.insertText(n).scrollIntoView();!/[\r\n]/.test(n)&&!r.someProp("handleTextInput",s=>s(r,o.$from.pos,o.$to.pos,n,a))&&r.dispatch(a()),t.preventDefault()}};function ri(r){return{left:r.clientX,top:r.clientY}}function s1(r,e){let t=e.x-r.clientX,o=e.y-r.clientY;return t*t+o*o<100}function rs(r,e,t,o,n){if(o==-1)return!1;let a=r.state.doc.resolve(o);for(let s=a.depth+1;s>0;s--)if(r.someProp(e,l=>s>a.depth?l(r,t,a.nodeAfter,a.before(s),n,!0):l(r,t,a.node(s),a.before(s),n,!1)))return!0;return!1}function xo(r,e,t){if(r.focused||r.focus(),r.state.selection.eq(e))return;let o=r.state.tr.setSelection(e);o.setMeta("pointer",!0),r.dispatch(o)}function l1(r,e){if(e==-1)return!1;let t=r.state.doc.resolve(e),o=t.nodeAfter;return o&&o.isAtom&&H.isSelectable(o)?(xo(r,new H(t)),!0):!1}function p1(r,e){if(e==-1)return!1;let t=r.state.selection,o,n;t instanceof H&&(o=t.node);let a=r.state.doc.resolve(e);for(let s=a.depth+1;s>0;s--){let l=s>a.depth?a.nodeAfter:a.node(s);if(H.isSelectable(l)){o&&t.$from.depth>0&&s>=t.$from.depth&&a.before(t.$from.depth+1)==t.$from.pos?n=a.before(t.$from.depth):n=a.before(s);break}}return n!=null?(xo(r,H.create(r.state.doc,n)),!0):!1}function d1(r,e,t,o,n){return rs(r,"handleClickOn",e,t,o)||r.someProp("handleClick",a=>a(r,e,o))||(n?p1(r,t):l1(r,t))}function c1(r,e,t,o){return rs(r,"handleDoubleClickOn",e,t,o)||r.someProp("handleDoubleClick",n=>n(r,e,o))}function m1(r,e,t,o){return rs(r,"handleTripleClickOn",e,t,o)||r.someProp("handleTripleClick",n=>n(r,e,o))||b1(r,t,o)}function b1(r,e,t){if(t.button!=0)return!1;let o=r.state.doc;if(e==-1)return o.inlineContent?(xo(r,j.create(o,0,o.content.size)),!0):!1;let n=o.resolve(e);for(let a=n.depth+1;a>0;a--){let s=a>n.depth?n.nodeAfter:n.node(a),l=n.before(a);if(s.inlineContent)xo(r,j.create(o,l+1,l+1+s.content.size));else if(H.isSelectable(s))xo(r,H.create(o,l));else continue;return!0}}function ns(r){return oi(r)}const xh=rt?"metaKey":"ctrlKey";Re.mousedown=(r,e)=>{let t=e;r.input.shiftKey=t.shiftKey;let o=ns(r),n=Date.now(),a="singleClick";n-r.input.lastClick.time<500&&s1(t,r.input.lastClick)&&!t[xh]&&r.input.lastClick.button==t.button&&(r.input.lastClick.type=="singleClick"?a="doubleClick":r.input.lastClick.type=="doubleClick"&&(a="tripleClick")),r.input.lastClick={time:n,x:t.clientX,y:t.clientY,type:a,button:t.button};let s=r.posAtCoords(ri(t));s&&(a=="singleClick"?(r.input.mouseDown&&r.input.mouseDown.done(),r.input.mouseDown=new u1(r,s,t,!!o)):(a=="doubleClick"?c1:m1)(r,s.pos,s.inside,t)?t.preventDefault():dr(r,"pointer"))};class u1{constructor(e,t,o,n){this.view=e,this.pos=t,this.event=o,this.flushed=n,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!o[xh],this.allowDefault=o.shiftKey;let a,s;if(t.inside>-1)a=e.state.doc.nodeAt(t.inside),s=t.inside;else{let c=e.state.doc.resolve(t.pos);a=c.parent,s=c.depth?c.before():0}const l=n?null:o.target,p=l?e.docView.nearestDesc(l,!0):null;this.target=p&&p.dom.nodeType==1?p.dom:null;let{selection:d}=e.state;(o.button==0&&a.type.spec.draggable&&a.type.spec.selectable!==!1||d instanceof H&&d.from<=s&&d.to>s)&&(this.mightDrag={node:a,pos:s,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&bt&&!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)),dr(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(()=>zt(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(ri(e))),this.updateAllowDefault(e),this.allowDefault||!t?dr(this.view,"pointer"):d1(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||_e&&this.mightDrag&&!this.mightDrag.node.isAtom||De&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(xo(this.view,q.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):dr(this.view,"pointer")}move(e){this.updateAllowDefault(e),dr(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)}}Re.touchstart=r=>{r.input.lastTouch=Date.now(),ns(r),dr(r,"pointer")},Re.touchmove=r=>{r.input.lastTouch=Date.now(),dr(r,"pointer")},Re.contextmenu=r=>ns(r);function fh(r,e){return r.composing?!0:_e&&Math.abs(e.timeStamp-r.input.compositionEndedAt)<500?(r.input.compositionEndedAt=-2e8,!0):!1}const g1=Rt?5e3:-1;He.compositionstart=He.compositionupdate=r=>{if(!r.composing){r.domObserver.flush();let{state:e}=r,t=e.selection.$to;if(e.selection instanceof j&&(e.storedMarks||!t.textOffset&&t.parentOffset&&t.nodeBefore.marks.some(o=>o.type.spec.inclusive===!1)))r.markCursor=r.state.storedMarks||t.marks(),oi(r,!0),r.markCursor=null;else if(oi(r,!e.selection.empty),bt&&e.selection.empty&&t.parentOffset&&!t.textOffset&&t.nodeBefore.marks.length){let o=r.domSelectionRange();for(let n=o.focusNode,a=o.focusOffset;n&&n.nodeType==1&&a!=0;){let s=a<0?n.lastChild:n.childNodes[a-1];if(!s)break;if(s.nodeType==3){let l=r.domSelection();l&&l.collapse(s,s.nodeValue.length);break}else n=s,a=-1}}r.input.composing=!0}hh(r,g1)},He.compositionend=(r,e)=>{r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=e.timeStamp,r.input.compositionPendingChanges=r.domObserver.pendingRecords().length?r.input.compositionID:0,r.input.compositionNode=null,r.input.compositionPendingChanges&&Promise.resolve().then(()=>r.domObserver.flush()),r.input.compositionID++,hh(r,20))};function hh(r,e){clearTimeout(r.input.composingTimeout),e>-1&&(r.input.composingTimeout=setTimeout(()=>oi(r),e))}function yh(r){for(r.composing&&(r.input.composing=!1,r.input.compositionEndedAt=f1());r.input.compositionNodes.length>0;)r.input.compositionNodes.pop().markParentsDirty()}function x1(r){let e=r.domSelectionRange();if(!e.focusNode)return null;let t=l2(e.focusNode,e.focusOffset),o=p2(e.focusNode,e.focusOffset);if(t&&o&&t!=o){let n=o.pmViewDesc,a=r.domObserver.lastChangedTextNode;if(t==a||o==a)return a;if(!n||!n.isText(o.nodeValue))return o;if(r.input.compositionNode==o){let s=t.pmViewDesc;if(!(!s||!s.isText(t.nodeValue)))return o}}return t||o}function f1(){let r=document.createEvent("Event");return r.initEvent("event",!0,!0),r.timeStamp}function oi(r,e=!1){if(!(Rt&&r.domObserver.flushingSoon>=0)){if(r.domObserver.forceFlush(),yh(r),e||r.docView&&r.docView.dirty){let t=Ga(r),o=r.state.selection;return t&&!t.eq(o)?r.dispatch(r.state.tr.setSelection(t)):(r.markCursor||e)&&!o.$from.node(o.$from.sharedDepth(o.to)).inlineContent?r.dispatch(r.state.tr.deleteSelection()):r.updateState(r.state),!0}return!1}}function h1(r,e){if(!r.dom.parentNode)return;let t=r.dom.parentNode.appendChild(document.createElement("div"));t.appendChild(e),t.style.cssText="position: fixed; left: -10000px; top: 10px";let o=getSelection(),n=document.createRange();n.selectNodeContents(e),r.dom.blur(),o.removeAllRanges(),o.addRange(n),setTimeout(()=>{t.parentNode&&t.parentNode.removeChild(t),r.focus()},50)}const Zo=je&&ar<15||bo&&u2<604;Re.copy=He.cut=(r,e)=>{let t=e,o=r.state.selection,n=t.type=="cut";if(o.empty)return;let a=Zo?null:t.clipboardData,s=o.content(),{dom:l,text:p}=Qa(r,s);a?(t.preventDefault(),a.clearData(),a.setData("text/html",l.innerHTML),a.setData("text/plain",p)):h1(r,l),n&&r.dispatch(r.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function y1(r){return r.openStart==0&&r.openEnd==0&&r.content.childCount==1?r.content.firstChild:null}function w1(r,e){if(!r.dom.parentNode)return;let t=r.input.shiftKey||r.state.selection.$from.parent.type.spec.code,o=r.dom.parentNode.appendChild(document.createElement(t?"textarea":"div"));t||(o.contentEditable="true"),o.style.cssText="position: fixed; left: -10000px; top: 10px",o.focus();let n=r.input.shiftKey&&r.input.lastKeyCode!=45;setTimeout(()=>{r.focus(),o.parentNode&&o.parentNode.removeChild(o),t?$o(r,o.value,null,n,e):$o(r,o.textContent,o.innerHTML,n,e)},50)}function $o(r,e,t,o,n){let a=lh(r,e,t,o,r.state.selection.$from);if(r.someProp("handlePaste",p=>p(r,n,a||O.empty)))return!0;if(!a)return!1;let s=y1(a),l=s?r.state.tr.replaceSelectionWith(s,o):r.state.tr.replaceSelection(a);return r.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function wh(r){let e=r.getData("text/plain")||r.getData("Text");if(e)return e;let t=r.getData("text/uri-list");return t?t.replace(/\r?\n/g," "):""}He.paste=(r,e)=>{let t=e;if(r.composing&&!Rt)return;let o=Zo?null:t.clipboardData,n=r.input.shiftKey&&r.input.lastKeyCode!=45;o&&$o(r,wh(o),o.getData("text/html"),n,t)?t.preventDefault():w1(r,t)};class vh{constructor(e,t,o){this.slice=e,this.move=t,this.node=o}}const v1=rt?"altKey":"ctrlKey";function kh(r,e){let t=r.someProp("dragCopies",o=>!o(e));return t??!e[v1]}Re.dragstart=(r,e)=>{let t=e,o=r.input.mouseDown;if(o&&o.done(),!t.dataTransfer)return;let n=r.state.selection,a=n.empty?null:r.posAtCoords(ri(t)),s;if(!(a&&a.pos>=n.from&&a.pos<=(n instanceof H?n.to-1:n.to))){if(o&&o.mightDrag)s=H.create(r.state.doc,o.mightDrag.pos);else if(t.target&&t.target.nodeType==1){let m=r.docView.nearestDesc(t.target,!0);m&&m.node.type.spec.draggable&&m!=r.docView&&(s=H.create(r.state.doc,m.posBefore))}}let l=(s||r.state.selection).content(),{dom:p,text:d,slice:c}=Qa(r,l);(!t.dataTransfer.files.length||!De||Bf>120)&&t.dataTransfer.clearData(),t.dataTransfer.setData(Zo?"Text":"text/html",p.innerHTML),t.dataTransfer.effectAllowed="copyMove",Zo||t.dataTransfer.setData("text/plain",d),r.dragging=new vh(c,kh(r,t),s)},Re.dragend=r=>{let e=r.dragging;window.setTimeout(()=>{r.dragging==e&&(r.dragging=null)},50)},He.dragover=He.dragenter=(r,e)=>e.preventDefault(),He.drop=(r,e)=>{let t=e,o=r.dragging;if(r.dragging=null,!t.dataTransfer)return;let n=r.posAtCoords(ri(t));if(!n)return;let a=r.state.doc.resolve(n.pos),s=o&&o.slice;s?r.someProp("transformPasted",g=>{s=g(s,r)}):s=lh(r,wh(t.dataTransfer),Zo?null:t.dataTransfer.getData("text/html"),!1,a);let l=!!(o&&kh(r,t));if(r.someProp("handleDrop",g=>g(r,t,s||O.empty,l))){t.preventDefault();return}if(!s)return;t.preventDefault();let p=s?cf(r.state.doc,a.pos,s):a.pos;p==null&&(p=a.pos);let d=r.state.tr;if(l){let{node:g}=o;g?g.replace(d):d.deleteSelection()}let c=d.mapping.map(p),m=s.openStart==0&&s.openEnd==0&&s.content.childCount==1,b=d.doc;if(m?d.replaceRangeWith(c,c,s.content.firstChild):d.replaceRange(c,c,s),d.doc.eq(b))return;let u=d.doc.resolve(c);if(m&&H.isSelectable(s.content.firstChild)&&u.nodeAfter&&u.nodeAfter.sameMarkup(s.content.firstChild))d.setSelection(new H(u));else{let g=d.mapping.map(p);d.mapping.maps[d.mapping.maps.length-1].forEach((f,x,y,w)=>g=w),d.setSelection(Ja(r,u,d.doc.resolve(g)))}r.focus(),r.dispatch(d.setMeta("uiEvent","drop"))},Re.focus=r=>{r.input.lastFocus=Date.now(),r.focused||(r.domObserver.stop(),r.dom.classList.add("ProseMirror-focused"),r.domObserver.start(),r.focused=!0,setTimeout(()=>{r.docView&&r.hasFocus()&&!r.domObserver.currentSelection.eq(r.domSelectionRange())&&zt(r)},20))},Re.blur=(r,e)=>{let t=e;r.focused&&(r.domObserver.stop(),r.dom.classList.remove("ProseMirror-focused"),r.domObserver.start(),t.relatedTarget&&r.dom.contains(t.relatedTarget)&&r.domObserver.currentSelection.clear(),r.focused=!1)},Re.beforeinput=(r,e)=>{if(De&&Rt&&e.inputType=="deleteContentBackward"){r.domObserver.flushSoon();let{domChangeCount:o}=r.input;setTimeout(()=>{if(r.input.domChangeCount!=o||(r.dom.blur(),r.focus(),r.someProp("handleKeyDown",a=>a(r,Or(8,"Backspace")))))return;let{$cursor:n}=r.state.selection;n&&n.pos>0&&r.dispatch(r.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let r in He)Re[r]=He[r];function en(r,e){if(r==e)return!0;for(let t in r)if(r[t]!==e[t])return!1;for(let t in e)if(!(t in r))return!1;return!0}class ni{constructor(e,t){this.toDOM=e,this.spec=t||Rr,this.side=this.spec.side||0}map(e,t,o,n){let{pos:a,deleted:s}=e.mapResult(t.from+n,this.side<0?-1:1);return s?null:new nt(a-o,a-o,this)}valid(){return!0}eq(e){return this==e||e instanceof ni&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&en(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class cr{constructor(e,t){this.attrs=e,this.spec=t||Rr}map(e,t,o,n){let a=e.map(t.from+n,this.spec.inclusiveStart?-1:1)-o,s=e.map(t.to+n,this.spec.inclusiveEnd?1:-1)-o;return a>=s?null:new nt(a,s,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof cr&&en(this.attrs,e.attrs)&&en(this.spec,e.spec)}static is(e){return e.type instanceof cr}destroy(){}}class is{constructor(e,t){this.attrs=e,this.spec=t||Rr}map(e,t,o,n){let a=e.mapResult(t.from+n,1);if(a.deleted)return null;let s=e.mapResult(t.to+n,-1);return s.deleted||s.pos<=a.pos?null:new nt(a.pos-o,s.pos-o,this)}valid(e,t){let{index:o,offset:n}=e.content.findIndex(t.from),a;return n==t.from&&!(a=e.child(o)).isText&&n+a.nodeSize==t.to}eq(e){return this==e||e instanceof is&&en(this.attrs,e.attrs)&&en(this.spec,e.spec)}destroy(){}}class nt{constructor(e,t,o){this.from=e,this.to=t,this.type=o}copy(e,t){return new nt(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,o){return this.type.map(e,this,t,o)}static widget(e,t,o){return new nt(e,e,new ni(t,o))}static inline(e,t,o,n){return new nt(e,t,new cr(o,n))}static node(e,t,o,n){return new nt(e,t,new is(o,n))}get spec(){return this.type.spec}get inline(){return this.type instanceof cr}get widget(){return this.type instanceof ni}}const fo=[],Rr={};class be{constructor(e,t){this.local=e.length?e:fo,this.children=t.length?t:fo}static create(e,t){return t.length?ii(t,e,0,Rr):Le}find(e,t,o){let n=[];return this.findInner(e??0,t??1e9,n,0,o),n}findInner(e,t,o,n,a){for(let s=0;s<this.local.length;s++){let l=this.local[s];l.from<=t&&l.to>=e&&(!a||a(l.spec))&&o.push(l.copy(l.from+n,l.to+n))}for(let s=0;s<this.children.length;s+=3)if(this.children[s]<t&&this.children[s+1]>e){let l=this.children[s]+1;this.children[s+2].findInner(e-l,t-l,o,n+l,a)}}map(e,t,o){return this==Le||e.maps.length==0?this:this.mapInner(e,t,0,0,o||Rr)}mapInner(e,t,o,n,a){let s;for(let l=0;l<this.local.length;l++){let p=this.local[l].map(e,o,n);p&&p.type.valid(t,p)?(s||(s=[])).push(p):a.onRemove&&a.onRemove(this.local[l].spec)}return this.children.length?k1(this.children,s||[],e,t,o,n,a):s?new be(s.sort(Hr),fo):Le}add(e,t){return t.length?this==Le?be.create(e,t):this.addInner(e,t,0):this}addInner(e,t,o){let n,a=0;e.forEach((l,p)=>{let d=p+o,c;if(c=Ch(t,l,d)){for(n||(n=this.children.slice());a<n.length&&n[a]<p;)a+=3;n[a]==p?n[a+2]=n[a+2].addInner(l,c,d+1):n.splice(a,0,p,p+l.nodeSize,ii(c,l,d+1,Rr)),a+=3}});let s=Sh(a?Eh(t):t,-o);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||s.splice(l--,1);return new be(s.length?this.local.concat(s).sort(Hr):this.local,n||this.children)}remove(e){return e.length==0||this==Le?this:this.removeInner(e,0)}removeInner(e,t){let o=this.children,n=this.local;for(let a=0;a<o.length;a+=3){let s,l=o[a]+t,p=o[a+1]+t;for(let c=0,m;c<e.length;c++)(m=e[c])&&m.from>l&&m.to<p&&(e[c]=null,(s||(s=[])).push(m));if(!s)continue;o==this.children&&(o=this.children.slice());let d=o[a+2].removeInner(s,l+1);d!=Le?o[a+2]=d:(o.splice(a,3),a-=3)}if(n.length){for(let a=0,s;a<e.length;a++)if(s=e[a])for(let l=0;l<n.length;l++)n[l].eq(s,t)&&(n==this.local&&(n=this.local.slice()),n.splice(l--,1))}return o==this.children&&n==this.local?this:n.length||o.length?new be(n,o):Le}forChild(e,t){if(this==Le)return this;if(t.isLeaf)return be.empty;let o,n;for(let l=0;l<this.children.length;l+=3)if(this.children[l]>=e){this.children[l]==e&&(o=this.children[l+2]);break}let a=e+1,s=a+t.content.size;for(let l=0;l<this.local.length;l++){let p=this.local[l];if(p.from<s&&p.to>a&&p.type instanceof cr){let d=Math.max(a,p.from)-a,c=Math.min(s,p.to)-a;d<c&&(n||(n=[])).push(p.copy(d,c))}}if(n){let l=new be(n.sort(Hr),fo);return o?new mr([l,o]):l}return o||Le}eq(e){if(this==e)return!0;if(!(e instanceof be)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return as(this.localsInner(e))}localsInner(e){if(this==Le)return fo;if(e.inlineContent||!this.local.some(cr.is))return this.local;let t=[];for(let o=0;o<this.local.length;o++)this.local[o].type instanceof cr||t.push(this.local[o]);return t}forEachSet(e){e(this)}}be.empty=new be([],[]),be.removeOverlap=as;const Le=be.empty;class mr{constructor(e){this.members=e}map(e,t){const o=this.members.map(n=>n.map(e,t,Rr));return mr.from(o)}forChild(e,t){if(t.isLeaf)return be.empty;let o=[];for(let n=0;n<this.members.length;n++){let a=this.members[n].forChild(e,t);a!=Le&&(a instanceof mr?o=o.concat(a.members):o.push(a))}return mr.from(o)}eq(e){if(!(e instanceof mr)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,o=!0;for(let n=0;n<this.members.length;n++){let a=this.members[n].localsInner(e);if(a.length)if(!t)t=a;else{o&&(t=t.slice(),o=!1);for(let s=0;s<a.length;s++)t.push(a[s])}}return t?as(o?t:t.sort(Hr)):fo}static from(e){switch(e.length){case 0:return Le;case 1:return e[0];default:return new mr(e.every(t=>t instanceof be)?e:e.reduce((t,o)=>t.concat(o instanceof be?o:o.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}}function k1(r,e,t,o,n,a,s){let l=r.slice();for(let d=0,c=a;d<t.maps.length;d++){let m=0;t.maps[d].forEach((b,u,g,f)=>{let x=f-g-(u-b);for(let y=0;y<l.length;y+=3){let w=l[y+1];if(w<0||b>w+c-m)continue;let v=l[y]+c-m;u>=v?l[y+1]=b<=v?-2:-1:b>=c&&x&&(l[y]+=x,l[y+1]+=x)}m+=x}),c=t.maps[d].map(c,-1)}let p=!1;for(let d=0;d<l.length;d+=3)if(l[d+1]<0){if(l[d+1]==-2){p=!0,l[d+1]=-1;continue}let c=t.map(r[d]+a),m=c-n;if(m<0||m>=o.content.size){p=!0;continue}let b=t.map(r[d+1]+a,-1),u=b-n,{index:g,offset:f}=o.content.findIndex(m),x=o.maybeChild(g);if(x&&f==m&&f+x.nodeSize==u){let y=l[d+2].mapInner(t,x,c+1,r[d]+a+1,s);y!=Le?(l[d]=m,l[d+1]=u,l[d+2]=y):(l[d+1]=-2,p=!0)}else p=!0}if(p){let d=S1(l,r,e,t,n,a,s),c=ii(d,o,0,s);e=c.local;for(let m=0;m<l.length;m+=3)l[m+1]<0&&(l.splice(m,3),m-=3);for(let m=0,b=0;m<c.children.length;m+=3){let u=c.children[m];for(;b<l.length&&l[b]<u;)b+=3;l.splice(b,0,c.children[m],c.children[m+1],c.children[m+2])}}return new be(e.sort(Hr),l)}function Sh(r,e){if(!e||!r.length)return r;let t=[];for(let o=0;o<r.length;o++){let n=r[o];t.push(new nt(n.from+e,n.to+e,n.type))}return t}function S1(r,e,t,o,n,a,s){function l(p,d){for(let c=0;c<p.local.length;c++){let m=p.local[c].map(o,n,d);m?t.push(m):s.onRemove&&s.onRemove(p.local[c].spec)}for(let c=0;c<p.children.length;c+=3)l(p.children[c+2],p.children[c]+d+1)}for(let p=0;p<r.length;p+=3)r[p+1]==-1&&l(r[p+2],e[p]+a+1);return t}function Ch(r,e,t){if(e.isLeaf)return null;let o=t+e.nodeSize,n=null;for(let a=0,s;a<r.length;a++)(s=r[a])&&s.from>t&&s.to<o&&((n||(n=[])).push(s),r[a]=null);return n}function Eh(r){let e=[];for(let t=0;t<r.length;t++)r[t]!=null&&e.push(r[t]);return e}function ii(r,e,t,o){let n=[],a=!1;e.forEach((l,p)=>{let d=Ch(r,l,p+t);if(d){a=!0;let c=ii(d,l,t+p+1,o);c!=Le&&n.push(p,p+l.nodeSize,c)}});let s=Sh(a?Eh(r):r,-t).sort(Hr);for(let l=0;l<s.length;l++)s[l].type.valid(e,s[l])||(o.onRemove&&o.onRemove(s[l].spec),s.splice(l--,1));return s.length||n.length?new be(s,n):Le}function Hr(r,e){return r.from-e.from||r.to-e.to}function as(r){let e=r;for(let t=0;t<e.length-1;t++){let o=e[t];if(o.from!=o.to)for(let n=t+1;n<e.length;n++){let a=e[n];if(a.from==o.from){a.to!=o.to&&(e==r&&(e=r.slice()),e[n]=a.copy(a.from,o.to),Th(e,n+1,a.copy(o.to,a.to)));continue}else{a.from<o.to&&(e==r&&(e=r.slice()),e[t]=o.copy(o.from,a.from),Th(e,n,o.copy(a.from,o.to)));break}}}return e}function Th(r,e,t){for(;e<r.length&&Hr(t,r[e])>0;)e++;r.splice(e,0,t)}function ss(r){let e=[];return r.someProp("decorations",t=>{let o=t(r.state);o&&o!=Le&&e.push(o)}),r.cursorWrapper&&e.push(be.create(r.state.doc,[r.cursorWrapper.deco])),mr.from(e)}const C1={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},E1=je&&ar<=11;class T1{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 M1{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new T1,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(o=>{for(let n=0;n<o.length;n++)this.queue.push(o[n]);je&&ar<=11&&o.some(n=>n.type=="childList"&&n.removedNodes.length||n.type=="characterData"&&n.oldValue.length>n.target.nodeValue.length)?this.flushSoon():this.flush()}),E1&&(this.onCharData=o=>{this.queue.push({target:o.target,type:"characterData",oldValue:o.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,C1)),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 t=0;t<e.length;t++)this.queue.push(e[t]);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(eh(this.view)){if(this.suppressingSelectionUpdates)return zt(this.view);if(je&&ar<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Ar(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 t=new Set,o;for(let a=e.focusNode;a;a=mo(a))t.add(a);for(let a=e.anchorNode;a;a=mo(a))if(t.has(a)){o=a;break}let n=o&&this.view.docView.nearestDesc(o);if(n&&n.ignoreMutation({type:"selection",target:o.nodeType==3?o.parentNode:o}))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 t=this.pendingRecords();t.length&&(this.queue=[]);let o=e.domSelectionRange(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(o)&&eh(e)&&!this.ignoreSelectionChange(o),a=-1,s=-1,l=!1,p=[];if(e.editable)for(let c=0;c<t.length;c++){let m=this.registerMutation(t[c],p);m&&(a=a<0?m.from:Math.min(m.from,a),s=s<0?m.to:Math.max(m.to,s),m.typeOver&&(l=!0))}if(bt&&p.length){let c=p.filter(m=>m.nodeName=="BR");if(c.length==2){let[m,b]=c;m.parentNode&&m.parentNode.parentNode==b.parentNode?b.remove():m.remove()}else{let{focusNode:m}=this.currentSelection;for(let b of c){let u=b.parentNode;u&&u.nodeName=="LI"&&(!m||P1(e,m)!=u)&&b.remove()}}}let d=null;a<0&&n&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Zn(o)&&(d=Ga(e))&&d.eq(q.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,zt(e),this.currentSelection.set(o),e.scrollToSelection()):(a>-1||n)&&(a>-1&&(e.docView.markDirty(a,s),B1(e)),this.handleDOMChange(a,s,l,p),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(o)||zt(e),this.currentSelection.set(o))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let o=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(o==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!o||o.ignoreMutation(e))return null;if(e.type=="childList"){for(let c=0;c<e.addedNodes.length;c++){let m=e.addedNodes[c];t.push(m),m.nodeType==3&&(this.lastChangedTextNode=m)}if(o.contentDOM&&o.contentDOM!=o.dom&&!o.contentDOM.contains(e.target))return{from:o.posBefore,to:o.posAfter};let n=e.previousSibling,a=e.nextSibling;if(je&&ar<=11&&e.addedNodes.length)for(let c=0;c<e.addedNodes.length;c++){let{previousSibling:m,nextSibling:b}=e.addedNodes[c];(!m||Array.prototype.indexOf.call(e.addedNodes,m)<0)&&(n=m),(!b||Array.prototype.indexOf.call(e.addedNodes,b)<0)&&(a=b)}let s=n&&n.parentNode==e.target?Ce(n)+1:0,l=o.localPosFromDOM(e.target,s,-1),p=a&&a.parentNode==e.target?Ce(a):e.target.childNodes.length,d=o.localPosFromDOM(e.target,p,1);return{from:l,to:d}}else return e.type=="attributes"?{from:o.posAtStart-o.border,to:o.posAtEnd+o.border}:(this.lastChangedTextNode=e.target,{from:o.posAtStart,to:o.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let Mh=new WeakMap,Bh=!1;function B1(r){if(!Mh.has(r)&&(Mh.set(r,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(r.dom).whiteSpace)!==-1)){if(r.requiresGeckoHackNode=bt,Bh)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."),Bh=!0}}function Nh(r,e){let t=e.startContainer,o=e.startOffset,n=e.endContainer,a=e.endOffset,s=r.domAtPos(r.state.selection.anchor);return Ar(s.node,s.offset,n,a)&&([t,o,n,a]=[n,a,t,o]),{anchorNode:t,anchorOffset:o,focusNode:n,focusOffset:a}}function N1(r,e){if(e.getComposedRanges){let n=e.getComposedRanges(r.root)[0];if(n)return Nh(r,n)}let t;function o(n){n.preventDefault(),n.stopImmediatePropagation(),t=n.getTargetRanges()[0]}return r.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),r.dom.removeEventListener("beforeinput",o,!0),t?Nh(r,t):null}function P1(r,e){for(let t=e.parentNode;t&&t!=r.dom;t=t.parentNode){let o=r.docView.nearestDesc(t,!0);if(o&&o.node.isBlock)return t}return null}function D1(r,e,t){let{node:o,fromOffset:n,toOffset:a,from:s,to:l}=r.docView.parseRange(e,t),p=r.domSelectionRange(),d,c=p.anchorNode;if(c&&r.dom.contains(c.nodeType==1?c:c.parentNode)&&(d=[{node:c,offset:p.anchorOffset}],Zn(p)||d.push({node:p.focusNode,offset:p.focusOffset})),De&&r.input.lastKeyCode===8)for(let x=a;x>n;x--){let y=o.childNodes[x-1],w=y.pmViewDesc;if(y.nodeName=="BR"&&!w){a=x;break}if(!w||w.size)break}let m=r.state.doc,b=r.someProp("domParser")||Ro.fromSchema(r.state.schema),u=m.resolve(s),g=null,f=b.parse(o,{topNode:u.parent,topMatch:u.parent.contentMatchAt(u.index()),topOpen:!0,from:n,to:a,preserveWhitespace:u.parent.type.whitespace=="pre"?"full":!0,findPositions:d,ruleFromNode:L1,context:u});if(d&&d[0].pos!=null){let x=d[0].pos,y=d[1]&&d[1].pos;y==null&&(y=x),g={anchor:x+s,head:y+s}}return{doc:f,sel:g,from:s,to:l}}function L1(r){let e=r.pmViewDesc;if(e)return e.parseRule();if(r.nodeName=="BR"&&r.parentNode){if(_e&&/^(ul|ol)$/i.test(r.parentNode.nodeName)){let t=document.createElement("div");return t.appendChild(document.createElement("li")),{skip:t}}else if(r.parentNode.lastChild==r||_e&&/^(tr|table)$/i.test(r.parentNode.nodeName))return{ignore:!0}}else if(r.nodeName=="IMG"&&r.getAttribute("mark-placeholder"))return{ignore:!0};return null}const A1=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function O1(r,e,t,o,n){let a=r.input.compositionPendingChanges||(r.composing?r.input.compositionID:0);if(r.input.compositionPendingChanges=0,e<0){let L=r.input.lastSelectionTime>Date.now()-50?r.input.lastSelectionOrigin:null,V=Ga(r,L);if(V&&!r.state.selection.eq(V)){if(De&&Rt&&r.input.lastKeyCode===13&&Date.now()-100<r.input.lastKeyCodeTime&&r.someProp("handleKeyDown",B=>B(r,Or(13,"Enter"))))return;let M=r.state.tr.setSelection(V);L=="pointer"?M.setMeta("pointer",!0):L=="key"&&M.scrollIntoView(),a&&M.setMeta("composition",a),r.dispatch(M)}return}let s=r.state.doc.resolve(e),l=s.sharedDepth(t);e=s.before(l+1),t=r.state.doc.resolve(t).after(l+1);let p=r.state.selection,d=D1(r,e,t),c=r.state.doc,m=c.slice(d.from,d.to),b,u;r.input.lastKeyCode===8&&Date.now()-100<r.input.lastKeyCodeTime?(b=r.state.selection.to,u="end"):(b=r.state.selection.from,u="start"),r.input.lastKeyCode=null;let g=_1(m.content,d.doc.content,d.from,b,u);if(g&&r.input.domChangeCount++,(bo&&r.input.lastIOSEnter>Date.now()-225||Rt)&&n.some(L=>L.nodeType==1&&!A1.test(L.nodeName))&&(!g||g.endA>=g.endB)&&r.someProp("handleKeyDown",L=>L(r,Or(13,"Enter")))){r.input.lastIOSEnter=0;return}if(!g)if(o&&p instanceof j&&!p.empty&&p.$head.sameParent(p.$anchor)&&!r.composing&&!(d.sel&&d.sel.anchor!=d.sel.head))g={start:p.from,endA:p.to,endB:p.to};else{if(d.sel){let L=Ph(r,r.state.doc,d.sel);if(L&&!L.eq(r.state.selection)){let V=r.state.tr.setSelection(L);a&&V.setMeta("composition",a),r.dispatch(V)}}return}r.state.selection.from<r.state.selection.to&&g.start==g.endB&&r.state.selection instanceof j&&(g.start>r.state.selection.from&&g.start<=r.state.selection.from+2&&r.state.selection.from>=d.from?g.start=r.state.selection.from:g.endA<r.state.selection.to&&g.endA>=r.state.selection.to-2&&r.state.selection.to<=d.to&&(g.endB+=r.state.selection.to-g.endA,g.endA=r.state.selection.to)),je&&ar<=11&&g.endB==g.start+1&&g.endA==g.start&&g.start>d.from&&d.doc.textBetween(g.start-d.from-1,g.start-d.from+1)=="  "&&(g.start--,g.endA--,g.endB--);let f=d.doc.resolveNoCache(g.start-d.from),x=d.doc.resolveNoCache(g.endB-d.from),y=c.resolve(g.start),w=f.sameParent(x)&&f.parent.inlineContent&&y.end()>=g.endA,v;if((bo&&r.input.lastIOSEnter>Date.now()-225&&(!w||n.some(L=>L.nodeName=="DIV"||L.nodeName=="P"))||!w&&f.pos<d.doc.content.size&&(!f.sameParent(x)||!f.parent.inlineContent)&&!/\S/.test(d.doc.textBetween(f.pos,x.pos,"",""))&&(v=q.findFrom(d.doc.resolve(f.pos+1),1,!0))&&v.head>f.pos)&&r.someProp("handleKeyDown",L=>L(r,Or(13,"Enter")))){r.input.lastIOSEnter=0;return}if(r.state.selection.anchor>g.start&&I1(c,g.start,g.endA,f,x)&&r.someProp("handleKeyDown",L=>L(r,Or(8,"Backspace")))){Rt&&De&&r.domObserver.suppressSelectionUpdates();return}De&&g.endB==g.start&&(r.input.lastChromeDelete=Date.now()),Rt&&!w&&f.start()!=x.start()&&x.parentOffset==0&&f.depth==x.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==g.endA&&(g.endB-=2,x=d.doc.resolveNoCache(g.endB-d.from),setTimeout(()=>{r.someProp("handleKeyDown",function(L){return L(r,Or(13,"Enter"))})},20));let h=g.start,S=g.endA,k=L=>{let V=L||r.state.tr.replace(h,S,d.doc.slice(g.start-d.from,g.endB-d.from));if(d.sel){let M=Ph(r,V.doc,d.sel);M&&!(De&&r.composing&&M.empty&&(g.start!=g.endB||r.input.lastChromeDelete<Date.now()-100)&&(M.head==h||M.head==V.mapping.map(S)-1)||je&&M.empty&&M.head==h)&&V.setSelection(M)}return a&&V.setMeta("composition",a),V.scrollIntoView()},C;if(w){if(f.pos==x.pos){je&&ar<=11&&f.parentOffset==0&&(r.domObserver.suppressSelectionUpdates(),setTimeout(()=>zt(r),20));let L=k(r.state.tr.delete(h,S)),V=c.resolve(g.start).marksAcross(c.resolve(g.endA));V&&L.ensureMarks(V),r.dispatch(L)}else if(g.endA==g.endB&&(C=V1(f.parent.content.cut(f.parentOffset,x.parentOffset),y.parent.content.cut(y.parentOffset,g.endA-y.start())))){let L=k(r.state.tr);C.type=="add"?L.addMark(h,S,C.mark):L.removeMark(h,S,C.mark),r.dispatch(L)}else if(f.parent.child(f.index()).isText&&f.index()==x.index()-(x.textOffset?0:1)){let L=f.parent.textBetween(f.parentOffset,x.parentOffset),V=()=>k(r.state.tr.insertText(L,h,S));r.someProp("handleTextInput",M=>M(r,h,S,L,V))||r.dispatch(V())}}else r.dispatch(k())}function Ph(r,e,t){return Math.max(t.anchor,t.head)>e.content.size?null:Ja(r,e.resolve(t.anchor),e.resolve(t.head))}function V1(r,e){let t=r.firstChild.marks,o=e.firstChild.marks,n=t,a=o,s,l,p;for(let c=0;c<o.length;c++)n=o[c].removeFromSet(n);for(let c=0;c<t.length;c++)a=t[c].removeFromSet(a);if(n.length==1&&a.length==0)l=n[0],s="add",p=c=>c.mark(l.addToSet(c.marks));else if(n.length==0&&a.length==1)l=a[0],s="remove",p=c=>c.mark(l.removeFromSet(c.marks));else return null;let d=[];for(let c=0;c<e.childCount;c++)d.push(p(e.child(c)));if(N.from(d).eq(r))return{mark:l,type:s}}function I1(r,e,t,o,n){if(t-e<=n.pos-o.pos||ls(o,!0,!1)<n.pos)return!1;let a=r.resolve(e);if(!o.parent.isTextblock){let l=a.nodeAfter;return l!=null&&t==e+l.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let s=r.resolve(ls(a,!0,!0));return!s.parent.isTextblock||s.pos>t||ls(s,!0,!1)<t?!1:o.parent.content.cut(o.parentOffset).eq(s.parent.content)}function ls(r,e,t){let o=r.depth,n=e?r.end():r.pos;for(;o>0&&(e||r.indexAfter(o)==r.node(o).childCount);)o--,n++,e=!1;if(t){let a=r.node(o).maybeChild(r.indexAfter(o));for(;a&&!a.isLeaf;)a=a.firstChild,n++}return n}function _1(r,e,t,o,n){let a=r.findDiffStart(e,t);if(a==null)return null;let{a:s,b:l}=r.findDiffEnd(e,t+r.size,t+e.size);if(n=="end"){let p=Math.max(0,a-Math.min(s,l));o-=s+p-a}if(s<a&&r.size<e.size){let p=o<=a&&o>=s?a-o:0;a-=p,a&&a<e.size&&Dh(e.textBetween(a-1,a+1))&&(a+=p?1:-1),l=a+(l-s),s=a}else if(l<a){let p=o<=a&&o>=l?a-o:0;a-=p,a&&a<r.size&&Dh(r.textBetween(a-1,a+1))&&(a+=p?1:-1),s=a+(s-l),l=a}return{start:a,endA:s,endB:l}}function Dh(r){if(r.length!=2)return!1;let e=r.charCodeAt(0),t=r.charCodeAt(1);return e>=56320&&e<=57343&&t>=55296&&t<=56319}class Lh{constructor(e,t){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 r1,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(_h),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=Vh(this),Oh(this),this.nodeViews=Ih(this),this.docView=jf(this.state.doc,Ah(this),ss(this),this.dom,this),this.domObserver=new M1(this,(o,n,a,s)=>O1(this,o,n,a,s)),this.domObserver.start(),o1(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 t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&es(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(_h),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let o in this._props)t[o]=this._props[o];t.state=this.state;for(let o in e)t[o]=e[o];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var o;let n=this.state,a=!1,s=!1;e.storedMarks&&this.composing&&(yh(this),s=!0),this.state=e;let l=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(l||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let u=Ih(this);H1(u,this.nodeViews)&&(this.nodeViews=u,a=!0)}(l||t.handleDOMEvents!=this._props.handleDOMEvents)&&es(this),this.editable=Vh(this),Oh(this);let p=ss(this),d=Ah(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?"reset":e.scrollToSelection>n.scrollToSelection?"to selection":"preserve",m=a||!this.docView.matchesNode(e.doc,d,p);(m||!e.selection.eq(n.selection))&&(s=!0);let b=c=="preserve"&&s&&this.dom.style.overflowAnchor==null&&f2(this);if(s){this.domObserver.stop();let u=m&&(je||De)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&R1(n.selection,e.selection);if(m){let g=De?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=x1(this)),(a||!this.docView.update(e.doc,d,p,this))&&(this.docView.updateOuterDeco(d),this.docView.destroy(),this.docView=jf(e.doc,d,p,this.dom,this)),g&&!this.trackWrites&&(u=!0)}u||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&F2(this))?zt(this,u):(Zf(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),!((o=this.dragging)===null||o===void 0)&&o.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c=="reset"?this.dom.scrollTop=0:c=="to selection"?this.scrollToSelection():b&&h2(b)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!(!e||!this.dom.contains(e.nodeType==1?e:e.parentNode))){if(!this.someProp("handleScrollToSelection",t=>t(this)))if(this.state.selection instanceof H){let t=this.docView.domAfterPos(this.state.selection.from);t.nodeType==1&&Nf(this,t.getBoundingClientRect(),e)}else Nf(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 t=0;t<this.directPlugins.length;t++){let o=this.directPlugins[t];o.spec.view&&this.pluginViews.push(o.spec.view(this))}for(let t=0;t<this.state.plugins.length;t++){let o=this.state.plugins[t];o.spec.view&&this.pluginViews.push(o.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let o=this.pluginViews[t];o.update&&o.update(this,e)}}updateDraggedNode(e,t){let o=e.node,n=-1;if(this.state.doc.nodeAt(o.from)==o.node)n=o.from;else{let a=o.from+(this.state.doc.content.size-t.doc.content.size);(a>0&&this.state.doc.nodeAt(a))==o.node&&(n=a)}this.dragging=new vh(e.slice,e.move,n<0?void 0:H.create(this.state.doc,n))}someProp(e,t){let o=this._props&&this._props[e],n;if(o!=null&&(n=t?t(o):o))return n;for(let s=0;s<this.directPlugins.length;s++){let l=this.directPlugins[s].props[e];if(l!=null&&(n=t?t(l):l))return n}let a=this.state.plugins;if(a)for(let s=0;s<a.length;s++){let l=a[s].props[e];if(l!=null&&(n=t?t(l):l))return n}}hasFocus(){if(je){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&&y2(this.dom),zt(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let t=this.dom.parentNode;t;t=t.parentNode)if(t.nodeType==9||t.nodeType==11&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t}return e||document}updateRoot(){this._root=null}posAtCoords(e){return C2(this,e)}coordsAtPos(e,t=1){return Vf(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,o=-1){let n=this.docView.posFromDOM(e,t,o);if(n==null)throw new RangeError("DOM position not inside the editor");return n}endOfTextblock(e,t){return N2(this,t||this.state,e)}pasteHTML(e,t){return $o(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return $o(this,e,null,!0,t||new ClipboardEvent("paste"))}serializeForClipboard(e){return Qa(this,e)}destroy(){this.docView&&(n1(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],ss(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,a2())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return a1(this,e)}domSelectionRange(){let e=this.domSelection();return e?_e&&this.root.nodeType===11&&c2(this.dom.ownerDocument)==this.dom&&N1(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}Lh.prototype.dispatch=function(r){let e=this._props.dispatchTransaction;e?e.call(this,r):this.updateState(this.state.apply(r))};function Ah(r){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(r.editable),r.someProp("attributes",t=>{if(typeof t=="function"&&(t=t(r.state)),t)for(let o in t)o=="class"?e.class+=" "+t[o]:o=="style"?e.style=(e.style?e.style+";":"")+t[o]:!e[o]&&o!="contenteditable"&&o!="nodeName"&&(e[o]=String(t[o]))}),e.translate||(e.translate="no"),[nt.node(0,r.state.doc.content.size,e)]}function Oh(r){if(r.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),r.cursorWrapper={dom:e,deco:nt.widget(r.state.selection.from,e,{raw:!0,marks:r.markCursor})}}else r.cursorWrapper=null}function Vh(r){return!r.someProp("editable",e=>e(r.state)===!1)}function R1(r,e){let t=Math.min(r.$anchor.sharedDepth(r.head),e.$anchor.sharedDepth(e.head));return r.$anchor.start(t)!=e.$anchor.start(t)}function Ih(r){let e=Object.create(null);function t(o){for(let n in o)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=o[n])}return r.someProp("nodeViews",t),r.someProp("markViews",t),e}function H1(r,e){let t=0,o=0;for(let n in r){if(r[n]!=e[n])return!0;t++}for(let n in e)o++;return t!=o}function _h(r){if(r.spec.state||r.spec.filterTransaction||r.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var br={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:"'"},ai={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},z1=typeof navigator<"u"&&/Mac/.test(navigator.platform),F1=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Ee=0;Ee<10;Ee++)br[48+Ee]=br[96+Ee]=String(Ee);for(var Ee=1;Ee<=24;Ee++)br[Ee+111]="F"+Ee;for(var Ee=65;Ee<=90;Ee++)br[Ee]=String.fromCharCode(Ee+32),ai[Ee]=String.fromCharCode(Ee);for(var ps in br)ai.hasOwnProperty(ps)||(ai[ps]=br[ps]);function j1(r){var e=z1&&r.metaKey&&r.shiftKey&&!r.ctrlKey&&!r.altKey||F1&&r.shiftKey&&r.key&&r.key.length==1||r.key=="Unidentified",t=!e&&r.key||(r.shiftKey?ai:br)[r.keyCode]||r.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}const q1=typeof navigator<"u"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),W1=typeof navigator<"u"&&/Win/.test(navigator.platform);function U1(r){let e=r.split(/-(?!$)/),t=e[e.length-1];t=="Space"&&(t=" ");let o,n,a,s;for(let l=0;l<e.length-1;l++){let p=e[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))o=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))a=!0;else if(/^mod$/i.test(p))q1?s=!0:n=!0;else throw new Error("Unrecognized modifier name: "+p)}return o&&(t="Alt-"+t),n&&(t="Ctrl-"+t),s&&(t="Meta-"+t),a&&(t="Shift-"+t),t}function G1(r){let e=Object.create(null);for(let t in r)e[U1(t)]=r[t];return e}function ds(r,e,t=!0){return e.altKey&&(r="Alt-"+r),e.ctrlKey&&(r="Ctrl-"+r),e.metaKey&&(r="Meta-"+r),t&&e.shiftKey&&(r="Shift-"+r),r}function K1(r){return new me({props:{handleKeyDown:Rh(r)}})}function Rh(r){let e=G1(r);return function(t,o){let n=j1(o),a,s=e[ds(n,o)];if(s&&s(t.state,t.dispatch,t))return!0;if(n.length==1&&n!=" "){if(o.shiftKey){let l=e[ds(n,o,!1)];if(l&&l(t.state,t.dispatch,t))return!0}if((o.altKey||o.metaKey||o.ctrlKey)&&!(W1&&o.ctrlKey&&o.altKey)&&(a=br[o.keyCode])&&a!=n){let l=e[ds(a,o)];if(l&&l(t.state,t.dispatch,t))return!0}}return!1}}const cs=(r,e)=>r.selection.empty?!1:(e&&e(r.tr.deleteSelection().scrollIntoView()),!0);function Hh(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("backward",r):t.parentOffset>0)?null:t}const zh=(r,e,t)=>{let o=Hh(r,t);if(!o)return!1;let n=ms(o);if(!n){let s=o.blockRange(),l=s&&ao(s);return l==null?!1:(e&&e(r.tr.lift(s,l).scrollIntoView()),!0)}let a=n.nodeBefore;if(Yh(r,n,e,-1))return!0;if(o.parent.content.size==0&&(ho(a,"end")||H.isSelectable(a)))for(let s=o.depth;;s--){let l=Yn(r.doc,o.before(s),o.after(s),O.empty);if(l&&l.slice.size<l.to-l.from){if(e){let p=r.tr.step(l);p.setSelection(ho(a,"end")?q.findFrom(p.doc.resolve(p.mapping.map(n.pos,-1)),-1):H.create(p.doc,n.pos-a.nodeSize)),e(p.scrollIntoView())}return!0}if(s==1||o.node(s-1).childCount>1)break}return a.isAtom&&n.depth==o.depth-1?(e&&e(r.tr.delete(n.pos-a.nodeSize,n.pos).scrollIntoView()),!0):!1},J1=(r,e,t)=>{let o=Hh(r,t);if(!o)return!1;let n=ms(o);return n?Fh(r,n,e):!1},Y1=(r,e,t)=>{let o=qh(r,t);if(!o)return!1;let n=bs(o);return n?Fh(r,n,e):!1};function Fh(r,e,t){let o=e.nodeBefore,n=o,a=e.pos-1;for(;!n.isTextblock;a--){if(n.type.spec.isolating)return!1;let c=n.lastChild;if(!c)return!1;n=c}let s=e.nodeAfter,l=s,p=e.pos+1;for(;!l.isTextblock;p++){if(l.type.spec.isolating)return!1;let c=l.firstChild;if(!c)return!1;l=c}let d=Yn(r.doc,a,p,O.empty);if(!d||d.from!=a||d instanceof xe&&d.slice.size>=p-a)return!1;if(t){let c=r.tr.step(d);c.setSelection(j.create(c.doc,a)),t(c.scrollIntoView())}return!0}function ho(r,e,t=!1){for(let o=r;o;o=e=="start"?o.firstChild:o.lastChild){if(o.isTextblock)return!0;if(t&&o.childCount!=1)return!1}return!1}const jh=(r,e,t)=>{let{$head:o,empty:n}=r.selection,a=o;if(!n)return!1;if(o.parent.isTextblock){if(t?!t.endOfTextblock("backward",r):o.parentOffset>0)return!1;a=ms(o)}let s=a&&a.nodeBefore;return!s||!H.isSelectable(s)?!1:(e&&e(r.tr.setSelection(H.create(r.doc,a.pos-s.nodeSize)).scrollIntoView()),!0)};function ms(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){if(r.index(e)>0)return r.doc.resolve(r.before(e+1));if(r.node(e).type.spec.isolating)break}return null}function qh(r,e){let{$cursor:t}=r.selection;return!t||(e?!e.endOfTextblock("forward",r):t.parentOffset<t.parent.content.size)?null:t}const Wh=(r,e,t)=>{let o=qh(r,t);if(!o)return!1;let n=bs(o);if(!n)return!1;let a=n.nodeAfter;if(Yh(r,n,e,1))return!0;if(o.parent.content.size==0&&(ho(a,"start")||H.isSelectable(a))){let s=Yn(r.doc,o.before(),o.after(),O.empty);if(s&&s.slice.size<s.to-s.from){if(e){let l=r.tr.step(s);l.setSelection(ho(a,"start")?q.findFrom(l.doc.resolve(l.mapping.map(n.pos)),1):H.create(l.doc,l.mapping.map(n.pos))),e(l.scrollIntoView())}return!0}}return a.isAtom&&n.depth==o.depth-1?(e&&e(r.tr.delete(n.pos,n.pos+a.nodeSize).scrollIntoView()),!0):!1},Uh=(r,e,t)=>{let{$head:o,empty:n}=r.selection,a=o;if(!n)return!1;if(o.parent.isTextblock){if(t?!t.endOfTextblock("forward",r):o.parentOffset<o.parent.content.size)return!1;a=bs(o)}let s=a&&a.nodeAfter;return!s||!H.isSelectable(s)?!1:(e&&e(r.tr.setSelection(H.create(r.doc,a.pos)).scrollIntoView()),!0)};function bs(r){if(!r.parent.type.spec.isolating)for(let e=r.depth-1;e>=0;e--){let t=r.node(e);if(r.index(e)+1<t.childCount)return r.doc.resolve(r.after(e+1));if(t.type.spec.isolating)break}return null}const X1=(r,e)=>{let t=r.selection,o=t instanceof H,n;if(o){if(t.node.isTextblock||!nr(r.doc,t.from))return!1;n=t.from}else if(n=Jn(r.doc,t.from,-1),n==null)return!1;if(e){let a=r.tr.join(n);o&&a.setSelection(H.create(a.doc,n-r.doc.resolve(n).nodeBefore.nodeSize)),e(a.scrollIntoView())}return!0},Q1=(r,e)=>{let t=r.selection,o;if(t instanceof H){if(t.node.isTextblock||!nr(r.doc,t.to))return!1;o=t.to}else if(o=Jn(r.doc,t.to,1),o==null)return!1;return e&&e(r.tr.join(o).scrollIntoView()),!0},Z1=(r,e)=>{let{$from:t,$to:o}=r.selection,n=t.blockRange(o),a=n&&ao(n);return a==null?!1:(e&&e(r.tr.lift(n,a).scrollIntoView()),!0)},Gh=(r,e)=>{let{$head:t,$anchor:o}=r.selection;return!t.parent.type.spec.code||!t.sameParent(o)?!1:(e&&e(r.tr.insertText(`
16
+ `).scrollIntoView()),!0)};function us(r){for(let e=0;e<r.edgeCount;e++){let{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}const $1=(r,e)=>{let{$head:t,$anchor:o}=r.selection;if(!t.parent.type.spec.code||!t.sameParent(o))return!1;let n=t.node(-1),a=t.indexAfter(-1),s=us(n.contentMatchAt(a));if(!s||!n.canReplaceWith(a,a,s))return!1;if(e){let l=t.after(),p=r.tr.replaceWith(l,l,s.createAndFill());p.setSelection(q.near(p.doc.resolve(l),1)),e(p.scrollIntoView())}return!0},Kh=(r,e)=>{let t=r.selection,{$from:o,$to:n}=t;if(t instanceof Qe||o.parent.inlineContent||n.parent.inlineContent)return!1;let a=us(n.parent.contentMatchAt(n.indexAfter()));if(!a||!a.isTextblock)return!1;if(e){let s=(!o.parentOffset&&n.index()<n.parent.childCount?o:n).pos,l=r.tr.insert(s,a.createAndFill());l.setSelection(j.create(l.doc,s+1)),e(l.scrollIntoView())}return!0},Jh=(r,e)=>{let{$cursor:t}=r.selection;if(!t||t.parent.content.size)return!1;if(t.depth>1&&t.after()!=t.end(-1)){let a=t.before();if(It(r.doc,a))return e&&e(r.tr.split(a).scrollIntoView()),!0}let o=t.blockRange(),n=o&&ao(o);return n==null?!1:(e&&e(r.tr.lift(o,n).scrollIntoView()),!0)};function e5(r){return(e,t)=>{let{$from:o,$to:n}=e.selection;if(e.selection instanceof H&&e.selection.node.isBlock)return!o.parentOffset||!It(e.doc,o.pos)?!1:(t&&t(e.tr.split(o.pos).scrollIntoView()),!0);if(!o.depth)return!1;let a=[],s,l,p=!1,d=!1;for(let u=o.depth;;u--)if(o.node(u).isBlock){p=o.end(u)==o.pos+(o.depth-u),d=o.start(u)==o.pos-(o.depth-u),l=us(o.node(u-1).contentMatchAt(o.indexAfter(u-1))),a.unshift(p&&l?{type:l}:null),s=u;break}else{if(u==1)return!1;a.unshift(null)}let c=e.tr;(e.selection instanceof j||e.selection instanceof Qe)&&c.deleteSelection();let m=c.mapping.map(o.pos),b=It(c.doc,m,a.length,a);if(b||(a[0]=l?{type:l}:null,b=It(c.doc,m,a.length,a)),!b)return!1;if(c.split(m,a.length,a),!p&&d&&o.node(s).type!=l){let u=c.mapping.map(o.before(s)),g=c.doc.resolve(u);l&&o.node(s-1).canReplaceWith(g.index(),g.index()+1,l)&&c.setNodeMarkup(c.mapping.map(o.before(s)),l)}return t&&t(c.scrollIntoView()),!0}}const t5=e5(),r5=(r,e)=>{let{$from:t,to:o}=r.selection,n,a=t.sharedDepth(o);return a==0?!1:(n=t.before(a),e&&e(r.tr.setSelection(H.create(r.doc,n))),!0)};function o5(r,e,t){let o=e.nodeBefore,n=e.nodeAfter,a=e.index();return!o||!n||!o.type.compatibleContent(n.type)?!1:!o.content.size&&e.parent.canReplace(a-1,a)?(t&&t(r.tr.delete(e.pos-o.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(a,a+1)||!(n.isTextblock||nr(r.doc,e.pos))?!1:(t&&t(r.tr.join(e.pos).scrollIntoView()),!0)}function Yh(r,e,t,o){let n=e.nodeBefore,a=e.nodeAfter,s,l,p=n.type.spec.isolating||a.type.spec.isolating;if(!p&&o5(r,e,t))return!0;let d=!p&&e.parent.canReplace(e.index(),e.index()+1);if(d&&(s=(l=n.contentMatchAt(n.childCount)).findWrapping(a.type))&&l.matchType(s[0]||a.type).validEnd){if(t){let u=e.pos+a.nodeSize,g=N.empty;for(let y=s.length-1;y>=0;y--)g=N.from(s[y].create(null,g));g=N.from(n.copy(g));let f=r.tr.step(new fe(e.pos-1,u,e.pos,u,new O(g,1,0),s.length,!0)),x=f.doc.resolve(u+2*s.length);x.nodeAfter&&x.nodeAfter.type==n.type&&nr(f.doc,x.pos)&&f.join(x.pos),t(f.scrollIntoView())}return!0}let c=a.type.spec.isolating||o>0&&p?null:q.findFrom(e,1),m=c&&c.$from.blockRange(c.$to),b=m&&ao(m);if(b!=null&&b>=e.depth)return t&&t(r.tr.lift(m,b).scrollIntoView()),!0;if(d&&ho(a,"start",!0)&&ho(n,"end")){let u=n,g=[];for(;g.push(u),!u.isTextblock;)u=u.lastChild;let f=a,x=1;for(;!f.isTextblock;f=f.firstChild)x++;if(u.canReplace(u.childCount,u.childCount,f.content)){if(t){let y=N.empty;for(let v=g.length-1;v>=0;v--)y=N.from(g[v].copy(y));let w=r.tr.step(new fe(e.pos-g.length,e.pos+a.nodeSize,e.pos+x,e.pos+a.nodeSize-x,new O(y,g.length,0),0,!0));t(w.scrollIntoView())}return!0}}return!1}function Xh(r){return function(e,t){let o=e.selection,n=r<0?o.$from:o.$to,a=n.depth;for(;n.node(a).isInline;){if(!a)return!1;a--}return n.node(a).isTextblock?(t&&t(e.tr.setSelection(j.create(e.doc,r<0?n.start(a):n.end(a)))),!0):!1}}const n5=Xh(-1),i5=Xh(1);function a5(r,e=null){return function(t,o){let{$from:n,$to:a}=t.selection,s=n.blockRange(a),l=s&&Da(s,r,e);return l?(o&&o(t.tr.wrap(s,l).scrollIntoView()),!0):!1}}function Qh(r,e=null){return function(t,o){let n=!1;for(let a=0;a<t.selection.ranges.length&&!n;a++){let{$from:{pos:s},$to:{pos:l}}=t.selection.ranges[a];t.doc.nodesBetween(s,l,(p,d)=>{if(n)return!1;if(!(!p.isTextblock||p.hasMarkup(r,e)))if(p.type==r)n=!0;else{let c=t.doc.resolve(d),m=c.index();n=c.parent.canReplaceWith(m,m+1,r)}})}if(!n)return!1;if(o){let a=t.tr;for(let s=0;s<t.selection.ranges.length;s++){let{$from:{pos:l},$to:{pos:p}}=t.selection.ranges[s];a.setBlockType(l,p,r,e)}o(a.scrollIntoView())}return!0}}function gs(...r){return function(e,t,o){for(let n=0;n<r.length;n++)if(r[n](e,t,o))return!0;return!1}}gs(cs,zh,jh),gs(cs,Wh,Uh),gs(Gh,Kh,Jh,t5),typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform&&os.platform()=="darwin";function s5(r,e=null){return function(t,o){let{$from:n,$to:a}=t.selection,s=n.blockRange(a);if(!s)return!1;let l=o?t.tr:null;return l5(l,s,r,e)?(o&&o(l.scrollIntoView()),!0):!1}}function l5(r,e,t,o=null){let n=!1,a=e,s=e.$from.doc;if(e.depth>=2&&e.$from.node(e.depth-1).type.compatibleContent(t)&&e.startIndex==0){if(e.$from.index(e.depth-1)==0)return!1;let p=s.resolve(e.start-2);a=new jn(p,p,e.depth),e.endIndex<e.parent.childCount&&(e=new jn(e.$from,s.resolve(e.$to.end(e.depth)),e.depth)),n=!0}let l=Da(a,t,o,e);return l?(r&&p5(r,e,l,n,t),!0):!1}function p5(r,e,t,o,n){let a=N.empty;for(let c=t.length-1;c>=0;c--)a=N.from(t[c].type.create(t[c].attrs,a));r.step(new fe(e.start-(o?2:0),e.end,e.start,e.end,new O(a,0,0),t.length,!0));let s=0;for(let c=0;c<t.length;c++)t[c].type==n&&(s=c+1);let l=t.length-s,p=e.start+t.length-(o?2:0),d=e.parent;for(let c=e.startIndex,m=e.endIndex,b=!0;c<m;c++,b=!1)!b&&It(r.doc,p,l)&&(r.split(p,l),p+=2*l),p+=d.child(c).nodeSize;return r}function d5(r){return function(e,t){let{$from:o,$to:n}=e.selection,a=o.blockRange(n,s=>s.childCount>0&&s.firstChild.type==r);return a?t?o.node(a.depth-1).type==r?c5(e,t,r,a):m5(e,t,a):!0:!1}}function c5(r,e,t,o){let n=r.tr,a=o.end,s=o.$to.end(o.depth);a<s&&(n.step(new fe(a-1,s,a,s,new O(N.from(t.create(null,o.parent.copy())),1,0),1,!0)),o=new jn(n.doc.resolve(o.$from.pos),n.doc.resolve(s),o.depth));const l=ao(o);if(l==null)return!1;n.lift(o,l);let p=n.doc.resolve(n.mapping.map(a,-1)-1);return nr(n.doc,p.pos)&&p.nodeBefore.type==p.nodeAfter.type&&n.join(p.pos),e(n.scrollIntoView()),!0}function m5(r,e,t){let o=r.tr,n=t.parent;for(let u=t.end,g=t.endIndex-1,f=t.startIndex;g>f;g--)u-=n.child(g).nodeSize,o.delete(u-1,u+1);let a=o.doc.resolve(t.start),s=a.nodeAfter;if(o.mapping.map(t.end)!=t.start+a.nodeAfter.nodeSize)return!1;let l=t.startIndex==0,p=t.endIndex==n.childCount,d=a.node(-1),c=a.index(-1);if(!d.canReplace(c+(l?0:1),c+1,s.content.append(p?N.empty:N.from(n))))return!1;let m=a.pos,b=m+s.nodeSize;return o.step(new fe(m-(l?1:0),b+(p?1:0),m+1,b-1,new O((l?N.empty:N.from(n.copy(N.empty))).append(p?N.empty:N.from(n.copy(N.empty))),l?0:1,p?0:1),l?0:1)),e(o.scrollIntoView()),!0}function b5(r){return function(e,t){let{$from:o,$to:n}=e.selection,a=o.blockRange(n,d=>d.childCount>0&&d.firstChild.type==r);if(!a)return!1;let s=a.startIndex;if(s==0)return!1;let l=a.parent,p=l.child(s-1);if(p.type!=r)return!1;if(t){let d=p.lastChild&&p.lastChild.type==l.type,c=N.from(d?r.create():null),m=new O(N.from(r.create(null,N.from(l.type.create(null,c)))),d?3:1,0),b=a.start,u=a.end;t(e.tr.step(new fe(b-(d?3:1),u,b,u,m,1,!0)).scrollIntoView())}return!0}}function si(r){const{state:e,transaction:t}=r;let{selection:o}=t,{doc:n}=t,{storedMarks:a}=t;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 a},get selection(){return o},get doc(){return n},get tr(){return o=t.selection,n=t.doc,a=t.storedMarks,t}}}class li{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:o}=this,{view:n}=t,{tr:a}=o,s=this.buildProps(a);return Object.fromEntries(Object.entries(e).map(([l,p])=>[l,(...c)=>{const m=p(...c)(s);return!a.getMeta("preventDispatch")&&!this.hasCustomState&&n.dispatch(a),m}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:o,editor:n,state:a}=this,{view:s}=n,l=[],p=!!e,d=e||a.tr,c=()=>(!p&&t&&!d.getMeta("preventDispatch")&&!this.hasCustomState&&s.dispatch(d),l.every(b=>b===!0)),m={...Object.fromEntries(Object.entries(o).map(([b,u])=>[b,(...f)=>{const x=this.buildProps(d,t),y=u(...f)(x);return l.push(y),m}])),run:c};return m}createCan(e){const{rawCommands:t,state:o}=this,n=!1,a=e||o.tr,s=this.buildProps(a,n);return{...Object.fromEntries(Object.entries(t).map(([p,d])=>[p,(...c)=>d(...c)({...s,dispatch:void 0})])),chain:()=>this.createChain(a,n)}}buildProps(e,t=!0){const{rawCommands:o,editor:n,state:a}=this,{view:s}=n,l={tr:e,editor:n,view:s,state:si({state:a,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(o).map(([p,d])=>[p,(...c)=>d(...c)(l)]))}};return l}}class u5{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const o=this.callbacks[e];return o&&o.forEach(n=>n.apply(this,t)),this}off(e,t){const o=this.callbacks[e];return o&&(t?this.callbacks[e]=o.filter(n=>n!==t):delete this.callbacks[e]),this}once(e,t){const o=(...n)=>{this.off(e,o),t.apply(this,n)};return this.on(e,o)}removeAllListeners(){this.callbacks={}}}function _(r,e,t){return r.config[e]===void 0&&r.parent?_(r.parent,e,t):typeof r.config[e]=="function"?r.config[e].bind({...t,parent:r.parent?_(r.parent,e,t):null}):r.config[e]}function pi(r){const e=r.filter(n=>n.type==="extension"),t=r.filter(n=>n.type==="node"),o=r.filter(n=>n.type==="mark");return{baseExtensions:e,nodeExtensions:t,markExtensions:o}}function Zh(r){const e=[],{nodeExtensions:t,markExtensions:o}=pi(r),n=[...t,...o],a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return r.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage,extensions:n},p=_(s,"addGlobalAttributes",l);if(!p)return;p().forEach(c=>{c.types.forEach(m=>{Object.entries(c.attributes).forEach(([b,u])=>{e.push({type:m,name:b,attribute:{...a,...u}})})})})}),n.forEach(s=>{const l={name:s.name,options:s.options,storage:s.storage},p=_(s,"addAttributes",l);if(!p)return;const d=p();Object.entries(d).forEach(([c,m])=>{const b={...a,...m};typeof(b==null?void 0:b.default)=="function"&&(b.default=b.default()),b!=null&&b.isRequired&&(b==null?void 0:b.default)===void 0&&delete b.default,e.push({type:s.name,name:c,attribute:b})})}),e}function he(r,e){if(typeof r=="string"){if(!e.nodes[r])throw Error(`There is no node type named '${r}'. Maybe you forgot to add the extension?`);return e.nodes[r]}return r}function Te(...r){return r.filter(e=>!!e).reduce((e,t)=>{const o={...e};return Object.entries(t).forEach(([n,a])=>{if(!o[n]){o[n]=a;return}if(n==="class"){const l=a?String(a).split(" "):[],p=o[n]?o[n].split(" "):[],d=l.filter(c=>!p.includes(c));o[n]=[...p,...d].join(" ")}else if(n==="style"){const l=a?a.split(";").map(c=>c.trim()).filter(Boolean):[],p=o[n]?o[n].split(";").map(c=>c.trim()).filter(Boolean):[],d=new Map;p.forEach(c=>{const[m,b]=c.split(":").map(u=>u.trim());d.set(m,b)}),l.forEach(c=>{const[m,b]=c.split(":").map(u=>u.trim());d.set(m,b)}),o[n]=Array.from(d.entries()).map(([c,m])=>`${c}: ${m}`).join("; ")}else o[n]=a}),o},{})}function xs(r,e){return e.filter(t=>t.type===r.type.name).filter(t=>t.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(r.attrs)||{}:{[t.name]:r.attrs[t.name]}).reduce((t,o)=>Te(t,o),{})}function $h(r){return typeof r=="function"}function G(r,e=void 0,...t){return $h(r)?e?r.bind(e)(...t):r(...t):r}function g5(r={}){return Object.keys(r).length===0&&r.constructor===Object}function x5(r){return typeof r!="string"?r:r.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(r):r==="true"?!0:r==="false"?!1:r}function ey(r,e){return"style"in r?r:{...r,getAttrs:t=>{const o=r.getAttrs?r.getAttrs(t):r.attrs;if(o===!1)return!1;const n=e.reduce((a,s)=>{const l=s.attribute.parseHTML?s.attribute.parseHTML(t):x5(t.getAttribute(s.name));return l==null?a:{...a,[s.name]:l}},{});return{...o,...n}}}}function ty(r){return Object.fromEntries(Object.entries(r).filter(([e,t])=>e==="attrs"&&g5(t)?!1:t!=null))}function f5(r,e){var t;const o=Zh(r),{nodeExtensions:n,markExtensions:a}=pi(r),s=(t=n.find(d=>_(d,"topNode")))===null||t===void 0?void 0:t.name,l=Object.fromEntries(n.map(d=>{const c=o.filter(y=>y.type===d.name),m={name:d.name,options:d.options,storage:d.storage,editor:e},b=r.reduce((y,w)=>{const v=_(w,"extendNodeSchema",m);return{...y,...v?v(d):{}}},{}),u=ty({...b,content:G(_(d,"content",m)),marks:G(_(d,"marks",m)),group:G(_(d,"group",m)),inline:G(_(d,"inline",m)),atom:G(_(d,"atom",m)),selectable:G(_(d,"selectable",m)),draggable:G(_(d,"draggable",m)),code:G(_(d,"code",m)),whitespace:G(_(d,"whitespace",m)),linebreakReplacement:G(_(d,"linebreakReplacement",m)),defining:G(_(d,"defining",m)),isolating:G(_(d,"isolating",m)),attrs:Object.fromEntries(c.map(y=>{var w;return[y.name,{default:(w=y==null?void 0:y.attribute)===null||w===void 0?void 0:w.default}]}))}),g=G(_(d,"parseHTML",m));g&&(u.parseDOM=g.map(y=>ey(y,c)));const f=_(d,"renderHTML",m);f&&(u.toDOM=y=>f({node:y,HTMLAttributes:xs(y,c)}));const x=_(d,"renderText",m);return x&&(u.toText=x),[d.name,u]})),p=Object.fromEntries(a.map(d=>{const c=o.filter(x=>x.type===d.name),m={name:d.name,options:d.options,storage:d.storage,editor:e},b=r.reduce((x,y)=>{const w=_(y,"extendMarkSchema",m);return{...x,...w?w(d):{}}},{}),u=ty({...b,inclusive:G(_(d,"inclusive",m)),excludes:G(_(d,"excludes",m)),group:G(_(d,"group",m)),spanning:G(_(d,"spanning",m)),code:G(_(d,"code",m)),attrs:Object.fromEntries(c.map(x=>{var y;return[x.name,{default:(y=x==null?void 0:x.attribute)===null||y===void 0?void 0:y.default}]}))}),g=G(_(d,"parseHTML",m));g&&(u.parseDOM=g.map(x=>ey(x,c)));const f=_(d,"renderHTML",m);return f&&(u.toDOM=x=>f({mark:x,HTMLAttributes:xs(x,c)})),[d.name,u]}));return new Wx({topNode:s,nodes:l,marks:p})}function fs(r,e){return e.nodes[r]||e.marks[r]||null}function ry(r,e){return Array.isArray(e)?e.some(t=>(typeof t=="string"?t:t.name)===r.name):e}function hs(r,e){const t=Dr.fromSchema(e).serializeFragment(r),n=document.implementation.createHTMLDocument().createElement("div");return n.appendChild(t),n.innerHTML}const h5=(r,e=500)=>{let t="";const o=r.parentOffset;return r.parent.nodesBetween(Math.max(0,o-e),o,(n,a,s,l)=>{var p,d;const c=((d=(p=n.type.spec).toText)===null||d===void 0?void 0:d.call(p,{node:n,pos:a,parent:s,index:l}))||n.textContent||"%leaf%";t+=n.isAtom&&!n.isText?c:c.slice(0,Math.max(0,o-a))}),t};function ys(r){return Object.prototype.toString.call(r)==="[object RegExp]"}class di{constructor(e){this.find=e.find,this.handler=e.handler}}const y5=(r,e)=>{if(ys(e))return e.exec(r);const t=e(r);if(!t)return null;const o=[t.text];return o.index=t.index,o.input=r,o.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),o.push(t.replaceWith)),o};function ci(r){var e;const{editor:t,from:o,to:n,text:a,rules:s,plugin:l}=r,{view:p}=t;if(p.composing)return!1;const d=p.state.doc.resolve(o);if(d.parent.type.spec.code||!((e=d.nodeBefore||d.nodeAfter)===null||e===void 0)&&e.marks.find(b=>b.type.spec.code))return!1;let c=!1;const m=h5(d)+a;return s.forEach(b=>{if(c)return;const u=y5(m,b.find);if(!u)return;const g=p.state.tr,f=si({state:p.state,transaction:g}),x={from:o-(u[0].length-a.length),to:n},{commands:y,chain:w,can:v}=new li({editor:t,state:f});b.handler({state:f,range:x,match:u,commands:y,chain:w,can:v})===null||!g.steps.length||(g.setMeta(l,{transform:g,from:o,to:n,text:a}),p.dispatch(g),c=!0)}),c}function w5(r){const{editor:e,rules:t}=r,o=new me({state:{init(){return null},apply(n,a,s){const l=n.getMeta(o);if(l)return l;const p=n.getMeta("applyInputRules");return!!p&&setTimeout(()=>{let{text:c}=p;typeof c=="string"?c=c:c=hs(N.from(c),s.schema);const{from:m}=p,b=m+c.length;ci({editor:e,from:m,to:b,text:c,rules:t,plugin:o})}),n.selectionSet||n.docChanged?null:a}},props:{handleTextInput(n,a,s,l){return ci({editor:e,from:a,to:s,text:l,rules:t,plugin:o})},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:a}=n.state.selection;a&&ci({editor:e,from:a.pos,to:a.pos,text:"",rules:t,plugin:o})}),!1)},handleKeyDown(n,a){if(a.key!=="Enter")return!1;const{$cursor:s}=n.state.selection;return s?ci({editor:e,from:s.pos,to:s.pos,text:`
17
+ `,rules:t,plugin:o}):!1}},isInputRules:!0});return o}function v5(r){return Object.prototype.toString.call(r).slice(8,-1)}function mi(r){return v5(r)!=="Object"?!1:r.constructor===Object&&Object.getPrototypeOf(r)===Object.prototype}function bi(r,e){const t={...r};return mi(r)&&mi(e)&&Object.keys(e).forEach(o=>{mi(e[o])&&mi(r[o])?t[o]=bi(r[o],e[o]):t[o]=e[o]}),t}class Ft{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=G(_(this,"addOptions",{name:this.name}))),this.storage=G(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ft(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Ft(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=G(_(t,"addOptions",{name:t.name})),t.storage=G(_(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:o}=e.state,n=e.state.selection.$from;if(n.pos===n.end()){const s=n.marks();if(!!!s.find(d=>(d==null?void 0:d.type.name)===t.name))return!1;const p=s.find(d=>(d==null?void 0:d.type.name)===t.name);return p&&o.removeStoredMark(p),o.insertText(" ",n.pos),e.view.dispatch(o),!0}return!1}}function k5(r){return typeof r=="number"}class S5{constructor(e){this.find=e.find,this.handler=e.handler}}const C5=(r,e,t)=>{if(ys(e))return[...r.matchAll(e)];const o=e(r,t);return o?o.map(n=>{const a=[n.text];return a.index=n.index,a.input=r,a.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),a.push(n.replaceWith)),a}):[]};function E5(r){const{editor:e,state:t,from:o,to:n,rule:a,pasteEvent:s,dropEvent:l}=r,{commands:p,chain:d,can:c}=new li({editor:e,state:t}),m=[];return t.doc.nodesBetween(o,n,(u,g)=>{if(!u.isTextblock||u.type.spec.code)return;const f=Math.max(o,g),x=Math.min(n,g+u.content.size),y=u.textBetween(f-g,x-g,void 0,"");C5(y,a.find,s).forEach(v=>{if(v.index===void 0)return;const h=f+v.index+1,S=h+v[0].length,k={from:t.tr.mapping.map(h),to:t.tr.mapping.map(S)},C=a.handler({state:t,range:k,match:v,commands:p,chain:d,can:c,pasteEvent:s,dropEvent:l});m.push(C)})}),m.every(u=>u!==null)}let ui=null;const T5=r=>{var e;const t=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return(e=t.clipboardData)===null||e===void 0||e.setData("text/html",r),t};function M5(r){const{editor:e,rules:t}=r;let o=null,n=!1,a=!1,s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,l;try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}const p=({state:c,from:m,to:b,rule:u,pasteEvt:g})=>{const f=c.tr,x=si({state:c,transaction:f});if(!(!E5({editor:e,state:x,from:Math.max(m-1,0),to:b.b-1,rule:u,pasteEvent:g,dropEvent:l})||!f.steps.length)){try{l=typeof DragEvent<"u"?new DragEvent("drop"):null}catch{l=null}return s=typeof ClipboardEvent<"u"?new ClipboardEvent("paste"):null,f}};return t.map(c=>new me({view(m){const b=g=>{var f;o=!((f=m.dom.parentElement)===null||f===void 0)&&f.contains(g.target)?m.dom.parentElement:null,o&&(ui=e)},u=()=>{ui&&(ui=null)};return window.addEventListener("dragstart",b),window.addEventListener("dragend",u),{destroy(){window.removeEventListener("dragstart",b),window.removeEventListener("dragend",u)}}},props:{handleDOMEvents:{drop:(m,b)=>{if(a=o===m.dom.parentElement,l=b,!a){const u=ui;u!=null&&u.isEditable&&setTimeout(()=>{const g=u.state.selection;g&&u.commands.deleteRange({from:g.from,to:g.to})},10)}return!1},paste:(m,b)=>{var u;const g=(u=b.clipboardData)===null||u===void 0?void 0:u.getData("text/html");return s=b,n=!!(g!=null&&g.includes("data-pm-slice")),!1}}},appendTransaction:(m,b,u)=>{const g=m[0],f=g.getMeta("uiEvent")==="paste"&&!n,x=g.getMeta("uiEvent")==="drop"&&!a,y=g.getMeta("applyPasteRules"),w=!!y;if(!f&&!x&&!w)return;if(w){let{text:S}=y;typeof S=="string"?S=S:S=hs(N.from(S),u.schema);const{from:k}=y,C=k+S.length,L=T5(S);return p({rule:c,state:u,from:k,to:{b:C},pasteEvt:L})}const v=b.doc.content.findDiffStart(u.doc.content),h=b.doc.content.findDiffEnd(u.doc.content);if(!(!k5(v)||!h||v===h.b))return p({rule:c,state:u,from:v,to:h,pasteEvt:s})}}))}function B5(r){const e=r.filter((t,o)=>r.indexOf(t)!==o);return Array.from(new Set(e))}class yo{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=yo.resolve(e),this.schema=f5(this.extensions,t),this.setupExtensions()}static resolve(e){const t=yo.sort(yo.flatten(e)),o=B5(t.map(n=>n.name));return o.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${o.map(n=>`'${n}'`).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map(t=>{const o={name:t.name,options:t.options,storage:t.storage},n=_(t,"addExtensions",o);return n?[t,...this.flatten(n())]:t}).flat(10)}static sort(e){return e.sort((o,n)=>{const a=_(o,"priority")||100,s=_(n,"priority")||100;return a>s?-1:a<s?1:0})}get commands(){return this.extensions.reduce((e,t)=>{const o={name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:fs(t.name,this.schema)},n=_(t,"addCommands",o);return n?{...e,...n()}:e},{})}get plugins(){const{editor:e}=this,t=yo.sort([...this.extensions].reverse()),o=[],n=[],a=t.map(s=>{const l={name:s.name,options:s.options,storage:s.storage,editor:e,type:fs(s.name,this.schema)},p=[],d=_(s,"addKeyboardShortcuts",l);let c={};if(s.type==="mark"&&_(s,"exitable",l)&&(c.ArrowRight=()=>Ft.handleExit({editor:e,mark:s})),d){const f=Object.fromEntries(Object.entries(d()).map(([x,y])=>[x,()=>y({editor:e})]));c={...c,...f}}const m=K1(c);p.push(m);const b=_(s,"addInputRules",l);ry(s,e.options.enableInputRules)&&b&&o.push(...b());const u=_(s,"addPasteRules",l);ry(s,e.options.enablePasteRules)&&u&&n.push(...u());const g=_(s,"addProseMirrorPlugins",l);if(g){const f=g();p.push(...f)}return p}).flat();return[w5({editor:e,rules:o}),...M5({editor:e,rules:n}),...a]}get attributes(){return Zh(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=pi(this.extensions);return Object.fromEntries(t.filter(o=>!!_(o,"addNodeView")).map(o=>{const n=this.attributes.filter(p=>p.type===o.name),a={name:o.name,options:o.options,storage:o.storage,editor:e,type:he(o.name,this.schema)},s=_(o,"addNodeView",a);if(!s)return[];const l=(p,d,c,m,b)=>{const u=xs(p,n);return s()({node:p,view:d,getPos:c,decorations:m,innerDecorations:b,editor:e,extension:o,HTMLAttributes:u})};return[o.name,l]}))}setupExtensions(){this.extensions.forEach(e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const o={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:fs(e.name,this.schema)};e.type==="mark"&&(!((t=G(_(e,"keepOnSplit",o)))!==null&&t!==void 0)||t)&&this.splittableMarks.push(e.name);const n=_(e,"onBeforeCreate",o),a=_(e,"onCreate",o),s=_(e,"onUpdate",o),l=_(e,"onSelectionUpdate",o),p=_(e,"onTransaction",o),d=_(e,"onFocus",o),c=_(e,"onBlur",o),m=_(e,"onDestroy",o);n&&this.editor.on("beforeCreate",n),a&&this.editor.on("create",a),s&&this.editor.on("update",s),l&&this.editor.on("selectionUpdate",l),p&&this.editor.on("transaction",p),d&&this.editor.on("focus",d),c&&this.editor.on("blur",c),m&&this.editor.on("destroy",m)})}}class Me{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=G(_(this,"addOptions",{name:this.name}))),this.storage=G(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Me(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Me({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=G(_(t,"addOptions",{name:t.name})),t.storage=G(_(t,"addStorage",{name:t.name,options:t.options})),t}}function oy(r,e,t){const{from:o,to:n}=e,{blockSeparator:a=`
18
+
19
+ `,textSerializers:s={}}=t||{};let l="";return r.nodesBetween(o,n,(p,d,c,m)=>{var b;p.isBlock&&d>o&&(l+=a);const u=s==null?void 0:s[p.type.name];if(u)return c&&(l+=u({node:p,pos:d,parent:c,index:m,range:e})),!1;p.isText&&(l+=(b=p==null?void 0:p.text)===null||b===void 0?void 0:b.slice(Math.max(o,d)-d,n-d))}),l}function ws(r){return Object.fromEntries(Object.entries(r.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}const N5=Me.create({name:"clipboardTextSerializer",addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new me({key:new Ie("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:r}=this,{state:e,schema:t}=r,{doc:o,selection:n}=e,{ranges:a}=n,s=Math.min(...a.map(c=>c.$from.pos)),l=Math.max(...a.map(c=>c.$to.pos)),p=ws(t);return oy(o,{from:s,to:l},{...this.options.blockSeparator!==void 0?{blockSeparator:this.options.blockSeparator}:{},textSerializers:p})}}})]}}),P5=()=>({editor:r,view:e})=>(requestAnimationFrame(()=>{var t;r.isDestroyed||(e.dom.blur(),(t=window==null?void 0:window.getSelection())===null||t===void 0||t.removeAllRanges())}),!0),D5=(r=!1)=>({commands:e})=>e.setContent("",r),L5=()=>({state:r,tr:e,dispatch:t})=>{const{selection:o}=e,{ranges:n}=o;return t&&n.forEach(({$from:a,$to:s})=>{r.doc.nodesBetween(a.pos,s.pos,(l,p)=>{if(l.type.isText)return;const{doc:d,mapping:c}=e,m=d.resolve(c.map(p)),b=d.resolve(c.map(p+l.nodeSize)),u=m.blockRange(b);if(!u)return;const g=ao(u);if(l.type.isTextblock){const{defaultType:f}=m.parent.contentMatchAt(m.index());e.setNodeMarkup(u.start,f)}(g||g===0)&&e.lift(u,g)})}),!0},A5=r=>e=>r(e),O5=()=>({state:r,dispatch:e})=>Kh(r,e),V5=(r,e)=>({editor:t,tr:o})=>{const{state:n}=t,a=n.doc.slice(r.from,r.to);o.deleteRange(r.from,r.to);const s=o.mapping.map(e);return o.insert(s,a.content),o.setSelection(new j(o.doc.resolve(Math.max(s-1,0)))),!0},I5=()=>({tr:r,dispatch:e})=>{const{selection:t}=r,o=t.$anchor.node();if(o.content.size>0)return!1;const n=r.selection.$anchor;for(let a=n.depth;a>0;a-=1)if(n.node(a).type===o.type){if(e){const l=n.before(a),p=n.after(a);r.delete(l,p).scrollIntoView()}return!0}return!1},_5=r=>({tr:e,state:t,dispatch:o})=>{const n=he(r,t.schema),a=e.selection.$anchor;for(let s=a.depth;s>0;s-=1)if(a.node(s).type===n){if(o){const p=a.before(s),d=a.after(s);e.delete(p,d).scrollIntoView()}return!0}return!1},R5=r=>({tr:e,dispatch:t})=>{const{from:o,to:n}=r;return t&&e.delete(o,n),!0},H5=()=>({state:r,dispatch:e})=>cs(r,e),z5=()=>({commands:r})=>r.keyboardShortcut("Enter"),F5=()=>({state:r,dispatch:e})=>$1(r,e);function gi(r,e,t={strict:!0}){const o=Object.keys(e);return o.length?o.every(n=>t.strict?e[n]===r[n]:ys(e[n])?e[n].test(r[n]):e[n]===r[n]):!0}function ny(r,e,t={}){return r.find(o=>o.type===e&&gi(Object.fromEntries(Object.keys(t).map(n=>[n,o.attrs[n]])),t))}function iy(r,e,t={}){return!!ny(r,e,t)}function vs(r,e,t){var o;if(!r||!e)return;let n=r.parent.childAfter(r.parentOffset);if((!n.node||!n.node.marks.some(c=>c.type===e))&&(n=r.parent.childBefore(r.parentOffset)),!n.node||!n.node.marks.some(c=>c.type===e)||(t=t||((o=n.node.marks[0])===null||o===void 0?void 0:o.attrs),!ny([...n.node.marks],e,t)))return;let s=n.index,l=r.start()+n.offset,p=s+1,d=l+n.node.nodeSize;for(;s>0&&iy([...r.parent.child(s-1).marks],e,t);)s-=1,l-=r.parent.child(s).nodeSize;for(;p<r.parent.childCount&&iy([...r.parent.child(p).marks],e,t);)d+=r.parent.child(p).nodeSize,p+=1;return{from:l,to:d}}function ur(r,e){if(typeof r=="string"){if(!e.marks[r])throw Error(`There is no mark type named '${r}'. Maybe you forgot to add the extension?`);return e.marks[r]}return r}const j5=(r,e={})=>({tr:t,state:o,dispatch:n})=>{const a=ur(r,o.schema),{doc:s,selection:l}=t,{$from:p,from:d,to:c}=l;if(n){const m=vs(p,a,e);if(m&&m.from<=d&&m.to>=c){const b=j.create(s,m.from,m.to);t.setSelection(b)}}return!0},q5=r=>e=>{const t=typeof r=="function"?r(e):r;for(let o=0;o<t.length;o+=1)if(t[o](e))return!0;return!1};function ks(r){return r instanceof j}function jt(r=0,e=0,t=0){return Math.min(Math.max(r,e),t)}function ay(r,e=null){if(!e)return null;const t=q.atStart(r),o=q.atEnd(r);if(e==="start"||e===!0)return t;if(e==="end")return o;const n=t.from,a=o.to;return e==="all"?j.create(r,jt(0,n,a),jt(r.content.size,n,a)):j.create(r,jt(e,n,a),jt(e,n,a))}function W5(){return navigator.platform==="Android"||/android/i.test(navigator.userAgent)}function Ss(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const U5=(r=null,e={})=>({editor:t,view:o,tr:n,dispatch:a})=>{e={scrollIntoView:!0,...e};const s=()=>{(Ss()||W5())&&o.dom.focus(),requestAnimationFrame(()=>{t.isDestroyed||(o.focus(),e!=null&&e.scrollIntoView&&t.commands.scrollIntoView())})};if(o.hasFocus()&&r===null||r===!1)return!0;if(a&&r===null&&!ks(t.state.selection))return s(),!0;const l=ay(n.doc,r)||t.state.selection,p=t.state.selection.eq(l);return a&&(p||n.setSelection(l),p&&n.storedMarks&&n.setStoredMarks(n.storedMarks),s()),!0},G5=(r,e)=>t=>r.every((o,n)=>e(o,{...t,index:n})),K5=(r,e)=>({tr:t,commands:o})=>o.insertContentAt({from:t.selection.from,to:t.selection.to},r,e),sy=r=>{const e=r.childNodes;for(let t=e.length-1;t>=0;t-=1){const o=e[t];o.nodeType===3&&o.nodeValue&&/^(\n\s\s|\n)$/.test(o.nodeValue)?r.removeChild(o):o.nodeType===1&&sy(o)}return r};function xi(r){const e=`<body>${r}</body>`,t=new window.DOMParser().parseFromString(e,"text/html").body;return sy(t)}function tn(r,e,t){if(r instanceof tr||r instanceof N)return r;t={slice:!0,parseOptions:{},...t};const o=typeof r=="object"&&r!==null,n=typeof r=="string";if(o)try{if(Array.isArray(r)&&r.length>0)return N.fromArray(r.map(l=>e.nodeFromJSON(l)));const s=e.nodeFromJSON(r);return t.errorOnInvalidContent&&s.check(),s}catch(a){if(t.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:a});return console.warn("[tiptap warn]: Invalid content.","Passed value:",r,"Error:",a),tn("",e,t)}if(n){if(t.errorOnInvalidContent){let s=!1,l="";const p=new Wx({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(t.slice?Ro.fromSchema(p).parseSlice(xi(r),t.parseOptions):Ro.fromSchema(p).parse(xi(r),t.parseOptions),t.errorOnInvalidContent&&s)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${l}`)})}const a=Ro.fromSchema(e);return t.slice?a.parseSlice(xi(r),t.parseOptions).content:a.parse(xi(r),t.parseOptions)}return tn("",e,t)}function J5(r,e,t){const o=r.steps.length-1;if(o<e)return;const n=r.steps[o];if(!(n instanceof xe||n instanceof fe))return;const a=r.mapping.maps[o];let s=0;a.forEach((l,p,d,c)=>{s===0&&(s=c)}),r.setSelection(q.near(r.doc.resolve(s),t))}const Y5=r=>!("type"in r),X5=(r,e,t)=>({tr:o,dispatch:n,editor:a})=>{var s;if(n){t={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...t};let l;const p=x=>{a.emit("contentError",{editor:a,error:x,disableCollaboration:()=>{a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},d={preserveWhitespace:"full",...t.parseOptions};if(!t.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{tn(e,a.schema,{parseOptions:d,errorOnInvalidContent:!0})}catch(x){p(x)}try{l=tn(e,a.schema,{parseOptions:d,errorOnInvalidContent:(s=t.errorOnInvalidContent)!==null&&s!==void 0?s:a.options.enableContentCheck})}catch(x){return p(x),!1}let{from:c,to:m}=typeof r=="number"?{from:r,to:r}:{from:r.from,to:r.to},b=!0,u=!0;if((Y5(l)?l:[l]).forEach(x=>{x.check(),b=b?x.isText&&x.marks.length===0:!1,u=u?x.isBlock:!1}),c===m&&u){const{parent:x}=o.doc.resolve(c);x.isTextblock&&!x.type.spec.code&&!x.childCount&&(c-=1,m+=1)}let f;if(b){if(Array.isArray(e))f=e.map(x=>x.text||"").join("");else if(e instanceof N){let x="";e.forEach(y=>{y.text&&(x+=y.text)}),f=x}else typeof e=="object"&&e&&e.text?f=e.text:f=e;o.insertText(f,c,m)}else f=l,o.replaceWith(c,m,f);t.updateSelection&&J5(o,o.steps.length-1,-1),t.applyInputRules&&o.setMeta("applyInputRules",{from:c,text:f}),t.applyPasteRules&&o.setMeta("applyPasteRules",{from:c,text:f})}return!0},Q5=()=>({state:r,dispatch:e})=>X1(r,e),Z5=()=>({state:r,dispatch:e})=>Q1(r,e),$5=()=>({state:r,dispatch:e})=>zh(r,e),e3=()=>({state:r,dispatch:e})=>Wh(r,e),t3=()=>({state:r,dispatch:e,tr:t})=>{try{const o=Jn(r.doc,r.selection.$from.pos,-1);return o==null?!1:(t.join(o,2),e&&e(t),!0)}catch{return!1}},r3=()=>({state:r,dispatch:e,tr:t})=>{try{const o=Jn(r.doc,r.selection.$from.pos,1);return o==null?!1:(t.join(o,2),e&&e(t),!0)}catch{return!1}},o3=()=>({state:r,dispatch:e})=>J1(r,e),n3=()=>({state:r,dispatch:e})=>Y1(r,e);function ly(){return typeof navigator<"u"?/Mac/.test(navigator.platform):!1}function i3(r){const e=r.split(/-(?!$)/);let t=e[e.length-1];t==="Space"&&(t=" ");let o,n,a,s;for(let l=0;l<e.length-1;l+=1){const p=e[l];if(/^(cmd|meta|m)$/i.test(p))s=!0;else if(/^a(lt)?$/i.test(p))o=!0;else if(/^(c|ctrl|control)$/i.test(p))n=!0;else if(/^s(hift)?$/i.test(p))a=!0;else if(/^mod$/i.test(p))Ss()||ly()?s=!0:n=!0;else throw new Error(`Unrecognized modifier name: ${p}`)}return o&&(t=`Alt-${t}`),n&&(t=`Ctrl-${t}`),s&&(t=`Meta-${t}`),a&&(t=`Shift-${t}`),t}const a3=r=>({editor:e,view:t,tr:o,dispatch:n})=>{const a=i3(r).split(/-(?!$)/),s=a.find(d=>!["Alt","Ctrl","Meta","Shift"].includes(d)),l=new KeyboardEvent("keydown",{key:s==="Space"?" ":s,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),p=e.captureTransaction(()=>{t.someProp("handleKeyDown",d=>d(t,l))});return p==null||p.steps.forEach(d=>{const c=d.map(o.mapping);c&&n&&o.maybeStep(c)}),!0};function rn(r,e,t={}){const{from:o,to:n,empty:a}=r.selection,s=e?he(e,r.schema):null,l=[];r.doc.nodesBetween(o,n,(m,b)=>{if(m.isText)return;const u=Math.max(o,b),g=Math.min(n,b+m.nodeSize);l.push({node:m,from:u,to:g})});const p=n-o,d=l.filter(m=>s?s.name===m.node.type.name:!0).filter(m=>gi(m.node.attrs,t,{strict:!1}));return a?!!d.length:d.reduce((m,b)=>m+b.to-b.from,0)>=p}const s3=(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return rn(t,n,e)?Z1(t,o):!1},l3=()=>({state:r,dispatch:e})=>Jh(r,e),p3=r=>({state:e,dispatch:t})=>{const o=he(r,e.schema);return d5(o)(e,t)},d3=()=>({state:r,dispatch:e})=>Gh(r,e);function fi(r,e){return e.nodes[r]?"node":e.marks[r]?"mark":null}function py(r,e){const t=typeof e=="string"?[e]:e;return Object.keys(r).reduce((o,n)=>(t.includes(n)||(o[n]=r[n]),o),{})}const c3=(r,e)=>({tr:t,state:o,dispatch:n})=>{let a=null,s=null;const l=fi(typeof r=="string"?r:r.name,o.schema);return l?(l==="node"&&(a=he(r,o.schema)),l==="mark"&&(s=ur(r,o.schema)),n&&t.selection.ranges.forEach(p=>{o.doc.nodesBetween(p.$from.pos,p.$to.pos,(d,c)=>{a&&a===d.type&&t.setNodeMarkup(c,void 0,py(d.attrs,e)),s&&d.marks.length&&d.marks.forEach(m=>{s===m.type&&t.addMark(c,c+d.nodeSize,s.create(py(m.attrs,e)))})})}),!0):!1},m3=()=>({tr:r,dispatch:e})=>(e&&r.scrollIntoView(),!0),b3=()=>({tr:r,dispatch:e})=>{if(e){const t=new Qe(r.doc);r.setSelection(t)}return!0},u3=()=>({state:r,dispatch:e})=>jh(r,e),g3=()=>({state:r,dispatch:e})=>Uh(r,e),x3=()=>({state:r,dispatch:e})=>r5(r,e),f3=()=>({state:r,dispatch:e})=>i5(r,e),h3=()=>({state:r,dispatch:e})=>n5(r,e);function Cs(r,e,t={},o={}){return tn(r,e,{slice:!1,parseOptions:t,errorOnInvalidContent:o.errorOnInvalidContent})}const y3=(r,e=!1,t={},o={})=>({editor:n,tr:a,dispatch:s,commands:l})=>{var p,d;const{doc:c}=a;if(t.preserveWhitespace!=="full"){const m=Cs(r,n.schema,t,{errorOnInvalidContent:(p=o.errorOnInvalidContent)!==null&&p!==void 0?p:n.options.enableContentCheck});return s&&a.replaceWith(0,c.content.size,m).setMeta("preventUpdate",!e),!0}return s&&a.setMeta("preventUpdate",!e),l.insertContentAt({from:0,to:c.content.size},r,{parseOptions:t,errorOnInvalidContent:(d=o.errorOnInvalidContent)!==null&&d!==void 0?d:n.options.enableContentCheck})};function dy(r,e){const t=ur(e,r.schema),{from:o,to:n,empty:a}=r.selection,s=[];a?(r.storedMarks&&s.push(...r.storedMarks),s.push(...r.selection.$head.marks())):r.doc.nodesBetween(o,n,p=>{s.push(...p.marks)});const l=s.find(p=>p.type.name===t.name);return l?{...l.attrs}:{}}function w3(r,e){const t=new xf(r);return e.forEach(o=>{o.steps.forEach(n=>{t.step(n)})}),t}function v3(r){for(let e=0;e<r.edgeCount;e+=1){const{type:t}=r.edge(e);if(t.isTextblock&&!t.hasRequiredAttrs())return t}return null}function k3(r,e,t){const o=[];return r.nodesBetween(e.from,e.to,(n,a)=>{t(n)&&o.push({node:n,pos:a})}),o}function S3(r,e){for(let t=r.depth;t>0;t-=1){const o=r.node(t);if(e(o))return{pos:t>0?r.before(t):0,start:r.start(t),depth:t,node:o}}}function Es(r){return e=>S3(e.$from,r)}function cy(r,e){const t={from:0,to:r.content.size};return oy(r,t,e)}function C3(r,e){const t=he(e,r.schema),{from:o,to:n}=r.selection,a=[];r.doc.nodesBetween(o,n,l=>{a.push(l)});const s=a.reverse().find(l=>l.type.name===t.name);return s?{...s.attrs}:{}}function my(r,e){const t=fi(typeof e=="string"?e:e.name,r.schema);return t==="node"?C3(r,e):t==="mark"?dy(r,e):{}}function E3(r,e=JSON.stringify){const t={};return r.filter(o=>{const n=e(o);return Object.prototype.hasOwnProperty.call(t,n)?!1:t[n]=!0})}function T3(r){const e=E3(r);return e.length===1?e:e.filter((t,o)=>!e.filter((a,s)=>s!==o).some(a=>t.oldRange.from>=a.oldRange.from&&t.oldRange.to<=a.oldRange.to&&t.newRange.from>=a.newRange.from&&t.newRange.to<=a.newRange.to))}function M3(r){const{mapping:e,steps:t}=r,o=[];return e.maps.forEach((n,a)=>{const s=[];if(n.ranges.length)n.forEach((l,p)=>{s.push({from:l,to:p})});else{const{from:l,to:p}=t[a];if(l===void 0||p===void 0)return;s.push({from:l,to:p})}s.forEach(({from:l,to:p})=>{const d=e.slice(a).map(l,-1),c=e.slice(a).map(p),m=e.invert().map(d,-1),b=e.invert().map(c);o.push({oldRange:{from:m,to:b},newRange:{from:d,to:c}})})}),T3(o)}function Ts(r,e,t){const o=[];return r===e?t.resolve(r).marks().forEach(n=>{const a=t.resolve(r),s=vs(a,n.type);s&&o.push({mark:n,...s})}):t.nodesBetween(r,e,(n,a)=>{!n||(n==null?void 0:n.nodeSize)===void 0||o.push(...n.marks.map(s=>({from:a,to:a+n.nodeSize,mark:s})))}),o}function hi(r,e,t){return Object.fromEntries(Object.entries(t).filter(([o])=>{const n=r.find(a=>a.type===e&&a.name===o);return n?n.attribute.keepOnSplit:!1}))}function Ms(r,e,t={}){const{empty:o,ranges:n}=r.selection,a=e?ur(e,r.schema):null;if(o)return!!(r.storedMarks||r.selection.$from.marks()).filter(m=>a?a.name===m.type.name:!0).find(m=>gi(m.attrs,t,{strict:!1}));let s=0;const l=[];if(n.forEach(({$from:m,$to:b})=>{const u=m.pos,g=b.pos;r.doc.nodesBetween(u,g,(f,x)=>{if(!f.isText&&!f.marks.length)return;const y=Math.max(u,x),w=Math.min(g,x+f.nodeSize),v=w-y;s+=v,l.push(...f.marks.map(h=>({mark:h,from:y,to:w})))})}),s===0)return!1;const p=l.filter(m=>a?a.name===m.mark.type.name:!0).filter(m=>gi(m.mark.attrs,t,{strict:!1})).reduce((m,b)=>m+b.to-b.from,0),d=l.filter(m=>a?m.mark.type!==a&&m.mark.type.excludes(a):!0).reduce((m,b)=>m+b.to-b.from,0);return(p>0?p+d:p)>=s}function B3(r,e,t={}){if(!e)return rn(r,null,t)||Ms(r,null,t);const o=fi(e,r.schema);return o==="node"?rn(r,e,t):o==="mark"?Ms(r,e,t):!1}function by(r,e){const{nodeExtensions:t}=pi(e),o=t.find(s=>s.name===r);if(!o)return!1;const n={name:o.name,options:o.options,storage:o.storage},a=G(_(o,"group",n));return typeof a!="string"?!1:a.split(" ").includes("list")}function Bs(r,{checkChildren:e=!0,ignoreWhitespace:t=!1}={}){var o;if(t){if(r.type.name==="hardBreak")return!0;if(r.isText)return/^\s*$/m.test((o=r.text)!==null&&o!==void 0?o:"")}if(r.isText)return!r.text;if(r.isAtom||r.isLeaf)return!1;if(r.content.childCount===0)return!0;if(e){let n=!0;return r.content.forEach(a=>{n!==!1&&(Bs(a,{ignoreWhitespace:t,checkChildren:e})||(n=!1))}),n}return!1}function uy(r){return r instanceof H}function gy(r,e,t){const n=r.state.doc.content.size,a=jt(e,0,n),s=jt(t,0,n),l=r.coordsAtPos(a),p=r.coordsAtPos(s,-1),d=Math.min(l.top,p.top),c=Math.max(l.bottom,p.bottom),m=Math.min(l.left,p.left),b=Math.max(l.right,p.right),u=b-m,g=c-d,y={top:d,bottom:c,left:m,right:b,width:u,height:g,x:m,y:d};return{...y,toJSON:()=>y}}function N3(r,e,t){var o;const{selection:n}=e;let a=null;if(ks(n)&&(a=n.$cursor),a){const l=(o=r.storedMarks)!==null&&o!==void 0?o:a.marks();return!!t.isInSet(l)||!l.some(p=>p.type.excludes(t))}const{ranges:s}=n;return s.some(({$from:l,$to:p})=>{let d=l.depth===0?r.doc.inlineContent&&r.doc.type.allowsMarkType(t):!1;return r.doc.nodesBetween(l.pos,p.pos,(c,m,b)=>{if(d)return!1;if(c.isInline){const u=!b||b.type.allowsMarkType(t),g=!!t.isInSet(c.marks)||!c.marks.some(f=>f.type.excludes(t));d=u&&g}return!d}),d})}const P3=(r,e={})=>({tr:t,state:o,dispatch:n})=>{const{selection:a}=t,{empty:s,ranges:l}=a,p=ur(r,o.schema);if(n)if(s){const d=dy(o,p);t.addStoredMark(p.create({...d,...e}))}else l.forEach(d=>{const c=d.$from.pos,m=d.$to.pos;o.doc.nodesBetween(c,m,(b,u)=>{const g=Math.max(u,c),f=Math.min(u+b.nodeSize,m);b.marks.find(y=>y.type===p)?b.marks.forEach(y=>{p===y.type&&t.addMark(g,f,p.create({...y.attrs,...e}))}):t.addMark(g,f,p.create(e))})});return N3(o,t,p)},D3=(r,e)=>({tr:t})=>(t.setMeta(r,e),!0),L3=(r,e={})=>({state:t,dispatch:o,chain:n})=>{const a=he(r,t.schema);let s;return t.selection.$anchor.sameParent(t.selection.$head)&&(s=t.selection.$anchor.parent.attrs),a.isTextblock?n().command(({commands:l})=>Qh(a,{...s,...e})(t)?!0:l.clearNodes()).command(({state:l})=>Qh(a,{...s,...e})(l,o)).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},A3=r=>({tr:e,dispatch:t})=>{if(t){const{doc:o}=e,n=jt(r,0,o.content.size),a=H.create(o,n);e.setSelection(a)}return!0},O3=r=>({tr:e,dispatch:t})=>{if(t){const{doc:o}=e,{from:n,to:a}=typeof r=="number"?{from:r,to:r}:r,s=j.atStart(o).from,l=j.atEnd(o).to,p=jt(n,s,l),d=jt(a,s,l),c=j.create(o,p,d);e.setSelection(c)}return!0},V3=r=>({state:e,dispatch:t})=>{const o=he(r,e.schema);return b5(o)(e,t)};function xy(r,e){const t=r.storedMarks||r.selection.$to.parentOffset&&r.selection.$from.marks();if(t){const o=t.filter(n=>e==null?void 0:e.includes(n.type.name));r.tr.ensureMarks(o)}}const I3=({keepMarks:r=!0}={})=>({tr:e,state:t,dispatch:o,editor:n})=>{const{selection:a,doc:s}=e,{$from:l,$to:p}=a,d=n.extensionManager.attributes,c=hi(d,l.node().type.name,l.node().attrs);if(a instanceof H&&a.node.isBlock)return!l.parentOffset||!It(s,l.pos)?!1:(o&&(r&&xy(t,n.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;const m=p.parentOffset===p.parent.content.size,b=l.depth===0?void 0:v3(l.node(-1).contentMatchAt(l.indexAfter(-1)));let u=m&&b?[{type:b,attrs:c}]:void 0,g=It(e.doc,e.mapping.map(l.pos),1,u);if(!u&&!g&&It(e.doc,e.mapping.map(l.pos),1,b?[{type:b}]:void 0)&&(g=!0,u=b?[{type:b,attrs:c}]:void 0),o){if(g&&(a instanceof j&&e.deleteSelection(),e.split(e.mapping.map(l.pos),1,u),b&&!m&&!l.parentOffset&&l.parent.type!==b)){const f=e.mapping.map(l.before()),x=e.doc.resolve(f);l.node(-1).canReplaceWith(x.index(),x.index()+1,b)&&e.setNodeMarkup(e.mapping.map(l.before()),b)}r&&xy(t,n.extensionManager.splittableMarks),e.scrollIntoView()}return g},_3=(r,e={})=>({tr:t,state:o,dispatch:n,editor:a})=>{var s;const l=he(r,o.schema),{$from:p,$to:d}=o.selection,c=o.selection.node;if(c&&c.isBlock||p.depth<2||!p.sameParent(d))return!1;const m=p.node(-1);if(m.type!==l)return!1;const b=a.extensionManager.attributes;if(p.parent.content.size===0&&p.node(-1).childCount===p.indexAfter(-1)){if(p.depth===2||p.node(-3).type!==l||p.index(-2)!==p.node(-2).childCount-1)return!1;if(n){let y=N.empty;const w=p.index(-1)?1:p.index(-2)?2:3;for(let L=p.depth-w;L>=p.depth-3;L-=1)y=N.from(p.node(L).copy(y));const v=p.indexAfter(-1)<p.node(-2).childCount?1:p.indexAfter(-2)<p.node(-3).childCount?2:3,h={...hi(b,p.node().type.name,p.node().attrs),...e},S=((s=l.contentMatch.defaultType)===null||s===void 0?void 0:s.createAndFill(h))||void 0;y=y.append(N.from(l.createAndFill(null,S)||void 0));const k=p.before(p.depth-(w-1));t.replace(k,p.after(-v),new O(y,4-w,0));let C=-1;t.doc.nodesBetween(k,t.doc.content.size,(L,V)=>{if(C>-1)return!1;L.isTextblock&&L.content.size===0&&(C=V+1)}),C>-1&&t.setSelection(j.near(t.doc.resolve(C))),t.scrollIntoView()}return!0}const u=d.pos===p.end()?m.contentMatchAt(0).defaultType:null,g={...hi(b,m.type.name,m.attrs),...e},f={...hi(b,p.node().type.name,p.node().attrs),...e};t.delete(p.pos,d.pos);const x=u?[{type:l,attrs:g},{type:u,attrs:f}]:[{type:l,attrs:g}];if(!It(t.doc,p.pos,2))return!1;if(n){const{selection:y,storedMarks:w}=o,{splittableMarks:v}=a.extensionManager,h=w||y.$to.parentOffset&&y.$from.marks();if(t.split(p.pos,2,x).scrollIntoView(),!h||!n)return!0;const S=h.filter(k=>v.includes(k.type.name));t.ensureMarks(S)}return!0},Ns=(r,e)=>{const t=Es(s=>s.type===e)(r.selection);if(!t)return!0;const o=r.doc.resolve(Math.max(0,t.pos-1)).before(t.depth);if(o===void 0)return!0;const n=r.doc.nodeAt(o);return t.node.type===(n==null?void 0:n.type)&&nr(r.doc,t.pos)&&r.join(t.pos),!0},Ps=(r,e)=>{const t=Es(s=>s.type===e)(r.selection);if(!t)return!0;const o=r.doc.resolve(t.start).after(t.depth);if(o===void 0)return!0;const n=r.doc.nodeAt(o);return t.node.type===(n==null?void 0:n.type)&&nr(r.doc,o)&&r.join(o),!0};var R3=Object.freeze({__proto__:null,blur:P5,clearContent:D5,clearNodes:L5,command:A5,createParagraphNear:O5,cut:V5,deleteCurrentNode:I5,deleteNode:_5,deleteRange:R5,deleteSelection:H5,enter:z5,exitCode:F5,extendMarkRange:j5,first:q5,focus:U5,forEach:G5,insertContent:K5,insertContentAt:X5,joinBackward:$5,joinDown:Z5,joinForward:e3,joinItemBackward:t3,joinItemForward:r3,joinTextblockBackward:o3,joinTextblockForward:n3,joinUp:Q5,keyboardShortcut:a3,lift:s3,liftEmptyBlock:l3,liftListItem:p3,newlineInCode:d3,resetAttributes:c3,scrollIntoView:m3,selectAll:b3,selectNodeBackward:u3,selectNodeForward:g3,selectParentNode:x3,selectTextblockEnd:f3,selectTextblockStart:h3,setContent:y3,setMark:P3,setMeta:D3,setNode:L3,setNodeSelection:A3,setTextSelection:O3,sinkListItem:V3,splitBlock:I3,splitListItem:_3,toggleList:(r,e,t,o={})=>({editor:n,tr:a,state:s,dispatch:l,chain:p,commands:d,can:c})=>{const{extensions:m,splittableMarks:b}=n.extensionManager,u=he(r,s.schema),g=he(e,s.schema),{selection:f,storedMarks:x}=s,{$from:y,$to:w}=f,v=y.blockRange(w),h=x||f.$to.parentOffset&&f.$from.marks();if(!v)return!1;const S=Es(k=>by(k.type.name,m))(f);if(v.depth>=1&&S&&v.depth-S.depth<=1){if(S.node.type===u)return d.liftListItem(g);if(by(S.node.type.name,m)&&u.validContent(S.node.content)&&l)return p().command(()=>(a.setNodeMarkup(S.pos,u),!0)).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run()}return!t||!h||!l?p().command(()=>c().wrapInList(u,o)?!0:d.clearNodes()).wrapInList(u,o).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run():p().command(()=>{const k=c().wrapInList(u,o),C=h.filter(L=>b.includes(L.type.name));return a.ensureMarks(C),k?!0:d.clearNodes()}).wrapInList(u,o).command(()=>Ns(a,u)).command(()=>Ps(a,u)).run()},toggleMark:(r,e={},t={})=>({state:o,commands:n})=>{const{extendEmptyMarkRange:a=!1}=t,s=ur(r,o.schema);return Ms(o,s,e)?n.unsetMark(s,{extendEmptyMarkRange:a}):n.setMark(s,e)},toggleNode:(r,e,t={})=>({state:o,commands:n})=>{const a=he(r,o.schema),s=he(e,o.schema),l=rn(o,a,t);let p;return o.selection.$anchor.sameParent(o.selection.$head)&&(p=o.selection.$anchor.parent.attrs),l?n.setNode(s,p):n.setNode(a,{...p,...t})},toggleWrap:(r,e={})=>({state:t,commands:o})=>{const n=he(r,t.schema);return rn(t,n,e)?o.lift(n):o.wrapIn(n,e)},undoInputRule:()=>({state:r,dispatch:e})=>{const t=r.plugins;for(let o=0;o<t.length;o+=1){const n=t[o];let a;if(n.spec.isInputRules&&(a=n.getState(r))){if(e){const s=r.tr,l=a.transform;for(let p=l.steps.length-1;p>=0;p-=1)s.step(l.steps[p].invert(l.docs[p]));if(a.text){const p=s.doc.resolve(a.from).marks();s.replaceWith(a.from,a.to,r.schema.text(a.text,p))}else s.delete(a.from,a.to)}return!0}}return!1},unsetAllMarks:()=>({tr:r,dispatch:e})=>{const{selection:t}=r,{empty:o,ranges:n}=t;return o||e&&n.forEach(a=>{r.removeMark(a.$from.pos,a.$to.pos)}),!0},unsetMark:(r,e={})=>({tr:t,state:o,dispatch:n})=>{var a;const{extendEmptyMarkRange:s=!1}=e,{selection:l}=t,p=ur(r,o.schema),{$from:d,empty:c,ranges:m}=l;if(!n)return!0;if(c&&s){let{from:b,to:u}=l;const g=(a=d.marks().find(x=>x.type===p))===null||a===void 0?void 0:a.attrs,f=vs(d,p,g);f&&(b=f.from,u=f.to),t.removeMark(b,u,p)}else m.forEach(b=>{t.removeMark(b.$from.pos,b.$to.pos,p)});return t.removeStoredMark(p),!0},updateAttributes:(r,e={})=>({tr:t,state:o,dispatch:n})=>{let a=null,s=null;const l=fi(typeof r=="string"?r:r.name,o.schema);return l?(l==="node"&&(a=he(r,o.schema)),l==="mark"&&(s=ur(r,o.schema)),n&&t.selection.ranges.forEach(p=>{const d=p.$from.pos,c=p.$to.pos;let m,b,u,g;t.selection.empty?o.doc.nodesBetween(d,c,(f,x)=>{a&&a===f.type&&(u=Math.max(x,d),g=Math.min(x+f.nodeSize,c),m=x,b=f)}):o.doc.nodesBetween(d,c,(f,x)=>{x<d&&a&&a===f.type&&(u=Math.max(x,d),g=Math.min(x+f.nodeSize,c),m=x,b=f),x>=d&&x<=c&&(a&&a===f.type&&t.setNodeMarkup(x,void 0,{...f.attrs,...e}),s&&f.marks.length&&f.marks.forEach(y=>{if(s===y.type){const w=Math.max(x,d),v=Math.min(x+f.nodeSize,c);t.addMark(w,v,s.create({...y.attrs,...e}))}}))}),b&&(m!==void 0&&t.setNodeMarkup(m,void 0,{...b.attrs,...e}),s&&b.marks.length&&b.marks.forEach(f=>{s===f.type&&t.addMark(u,g,s.create({...f.attrs,...e}))}))}),!0):!1},wrapIn:(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return a5(n,e)(t,o)},wrapInList:(r,e={})=>({state:t,dispatch:o})=>{const n=he(r,t.schema);return s5(n,e)(t,o)}});const H3=Me.create({name:"commands",addCommands(){return{...R3}}}),z3=Me.create({name:"drop",addProseMirrorPlugins(){return[new me({key:new Ie("tiptapDrop"),props:{handleDrop:(r,e,t,o)=>{this.editor.emit("drop",{editor:this.editor,event:e,slice:t,moved:o})}}})]}}),F3=Me.create({name:"editable",addProseMirrorPlugins(){return[new me({key:new Ie("editable"),props:{editable:()=>this.editor.options.editable}})]}}),j3=new Ie("focusEvents"),q3=Me.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:r}=this;return[new me({key:j3,props:{handleDOMEvents:{focus:(e,t)=>{r.isFocused=!0;const o=r.state.tr.setMeta("focus",{event:t}).setMeta("addToHistory",!1);return e.dispatch(o),!1},blur:(e,t)=>{r.isFocused=!1;const o=r.state.tr.setMeta("blur",{event:t}).setMeta("addToHistory",!1);return e.dispatch(o),!1}}}})]}}),W3=Me.create({name:"keymap",addKeyboardShortcuts(){const r=()=>this.editor.commands.first(({commands:s})=>[()=>s.undoInputRule(),()=>s.command(({tr:l})=>{const{selection:p,doc:d}=l,{empty:c,$anchor:m}=p,{pos:b,parent:u}=m,g=m.parent.isTextblock&&b>0?l.doc.resolve(b-1):m,f=g.parent.type.spec.isolating,x=m.pos-m.parentOffset,y=f&&g.parent.childCount===1?x===m.pos:q.atStart(d).from===b;return!c||!u.type.isTextblock||u.textContent.length||!y||y&&m.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()]),o={Enter:()=>this.editor.commands.first(({commands:s})=>[()=>s.newlineInCode(),()=>s.createParagraphNear(),()=>s.liftEmptyBlock(),()=>s.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:r,"Mod-Backspace":r,"Shift-Backspace":r,Delete:e,"Mod-Delete":e,"Mod-a":()=>this.editor.commands.selectAll()},n={...o},a={...o,"Ctrl-h":r,"Alt-Backspace":r,"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 Ss()||ly()?a:n},addProseMirrorPlugins(){return[new me({key:new Ie("clearDocument"),appendTransaction:(r,e,t)=>{if(r.some(f=>f.getMeta("composition")))return;const o=r.some(f=>f.docChanged)&&!e.doc.eq(t.doc),n=r.some(f=>f.getMeta("preventClearDocument"));if(!o||n)return;const{empty:a,from:s,to:l}=e.selection,p=q.atStart(e.doc).from,d=q.atEnd(e.doc).to;if(a||!(s===p&&l===d)||!Bs(t.doc))return;const b=t.tr,u=si({state:t,transaction:b}),{commands:g}=new li({editor:this.editor,state:u});if(g.clearNodes(),!!b.steps.length)return b}})]}}),U3=Me.create({name:"paste",addProseMirrorPlugins(){return[new me({key:new Ie("tiptapPaste"),props:{handlePaste:(r,e,t)=>{this.editor.emit("paste",{editor:this.editor,event:e,slice:t})}}})]}}),G3=Me.create({name:"tabindex",addProseMirrorPlugins(){return[new me({key:new Ie("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class zr{get name(){return this.node.type.name}constructor(e,t,o=!1,n=null){this.currentNode=null,this.actualDepth=null,this.isBlock=o,this.resolvedPos=e,this.editor=t,this.currentNode=n}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!==void 0?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,o=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}t=this.from+1,o=this.to-1}this.editor.commands.insertContentAt({from:t,to:o},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),t=this.resolvedPos.doc.resolve(e);return new zr(t,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 zr(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 zr(e,this.editor)}get children(){const e=[];return this.node.content.forEach((t,o)=>{const n=t.isBlock&&!t.isTextblock,a=t.isAtom&&!t.isText,s=this.pos+o+(a?0:1);if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;const l=this.resolvedPos.doc.resolve(s);if(!n&&l.depth<=this.depth)return;const p=new zr(l,this.editor,n,n?t:null);n&&(p.actualDepth=this.depth+1),e.push(new zr(l,this.editor,n,n?t:null))}),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let o=null,n=this.parent;for(;n&&!o;){if(n.node.type.name===e)if(Object.keys(t).length>0){const a=n.node.attrs,s=Object.keys(t);for(let l=0;l<s.length;l+=1){const p=s[l];if(a[p]!==t[p])break}}else o=n;n=n.parent}return o}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},o=!1){let n=[];if(!this.children||this.children.length===0)return n;const a=Object.keys(t);return this.children.forEach(s=>{o&&n.length>0||(s.node.type.name===e&&a.every(p=>t[p]===s.node.attrs[p])&&n.push(s),!(o&&n.length>0)&&(n=n.concat(s.querySelectorAll(e,t,o))))}),n}setAttribute(e){const{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}}const K3=`.ProseMirror {
20
20
  position: relative;
21
21
  }
22
22
 
@@ -90,50 +90,50 @@ img.ProseMirror-separator {
90
90
 
91
91
  .tippy-box[data-animation=fade][data-state=hidden] {
92
92
  opacity: 0
93
- }`;function H3(r,e,t){const o=document.querySelector("style[data-tiptap-style]");if(o!==null)return o;const n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.setAttribute("data-tiptap-style",""),n.innerHTML=r,document.getElementsByTagName("head")[0].appendChild(n),n}let z3=class extends i5{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),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:t,slice:o,moved:n})=>this.options.onDrop(t,o,n)),this.on("paste",({event:t,slice:o})=>this.options.onPaste(t,o)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}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&&document&&(this.css=H3(R3,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const o=yc(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],n=this.state.reconfigure({plugins:o});return this.view.updateState(n),n}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let o=t;if([].concat(e).forEach(a=>{const s=typeof a=="string"?`${a}$`:a.key;o=o.filter(l=>!l.key.startsWith(s))}),t.length===o.length)return;const n=this.state.reconfigure({plugins:o});return this.view.updateState(n),n}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[L3,w5.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),P3,O3,V3,_3,D3,I3].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a==null?void 0:a.type));this.extensionManager=new yo(n,this)}createCommandManager(){this.commandManager=new li({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=Cs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=Cs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const o=Tc(t,this.options.autofocus);this.view=new Zd(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:co.create({doc:t,selection:o||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(s)});return}const t=this.state.apply(e),o=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),o&&this.emit("selectionUpdate",{editor:this,transaction:e});const n=e.getMeta("focus"),a=e.getMeta("blur");n&&this.emit("focus",{editor:this,event:n.event,transaction:e}),a&&this.emit("blur",{editor:this,event:a.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return Lc(this.state,e)}isActive(e,t){const o=typeof e=="string"?e:null,n=typeof e=="string"?t:e;return y3(this.state,o,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return hs(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
93
+ }`;function J3(r,e,t){const o=document.querySelector("style[data-tiptap-style]");if(o!==null)return o;const n=document.createElement("style");return e&&n.setAttribute("nonce",e),n.setAttribute("data-tiptap-style",""),n.innerHTML=r,document.getElementsByTagName("head")[0].appendChild(n),n}let Y3=class extends u5{constructor(e={}){super(),this.isFocused=!1,this.isInitialized=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:t})=>{throw t},onPaste:()=>null,onDrop:()=>null},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),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:t,slice:o,moved:n})=>this.options.onDrop(t,o,n)),this.on("paste",({event:t,slice:o})=>this.options.onPaste(t,o)),window.setTimeout(()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}),this.isInitialized=!0)},0)}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&&document&&(this.css=J3(K3,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},!(!this.view||!this.state||this.isDestroyed)&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const o=$h(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],n=this.state.reconfigure({plugins:o});return this.view.updateState(n),n}unregisterPlugin(e){if(this.isDestroyed)return;const t=this.state.plugins;let o=t;if([].concat(e).forEach(a=>{const s=typeof a=="string"?`${a}$`:a.key;o=o.filter(l=>!l.key.startsWith(s))}),t.length===o.length)return;const n=this.state.reconfigure({plugins:o});return this.view.updateState(n),n}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[F3,N5.configure({blockSeparator:(t=(e=this.options.coreExtensionOptions)===null||e===void 0?void 0:e.clipboardTextSerializer)===null||t===void 0?void 0:t.blockSeparator}),H3,q3,W3,G3,z3,U3].filter(a=>typeof this.options.enableCoreExtensions=="object"?this.options.enableCoreExtensions[a.name]!==!1:!0):[],...this.options.extensions].filter(a=>["extension","node","mark"].includes(a==null?void 0:a.type));this.extensionManager=new yo(n,this)}createCommandManager(){this.commandManager=new li({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){var e;let t;try{t=Cs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(s){if(!(s instanceof Error)||!["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(s.message))throw s;this.emit("contentError",{editor:this,error:s,disableCollaboration:()=>{this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(l=>l.name!=="collaboration"),this.createExtensionManager()}}),t=Cs(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const o=ay(t,this.options.autofocus);this.view=new Lh(this.options.element,{...this.options.editorProps,attributes:{role:"textbox",...(e=this.options.editorProps)===null||e===void 0?void 0:e.attributes},dispatchTransaction:this.dispatchTransaction.bind(this),state:co.create({doc:t,selection:o||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();const a=this.view.dom;a.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(s=>{var l;return(l=this.capturedTransaction)===null||l===void 0?void 0:l.step(s)});return}const t=this.state.apply(e),o=!this.state.selection.eq(t.selection);this.emit("beforeTransaction",{editor:this,transaction:e,nextState:t}),this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),o&&this.emit("selectionUpdate",{editor:this,transaction:e});const n=e.getMeta("focus"),a=e.getMeta("blur");n&&this.emit("focus",{editor:this,event:n.event,transaction:e}),a&&this.emit("blur",{editor:this,event:a.event,transaction:e}),!(!e.docChanged||e.getMeta("preventUpdate"))&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return my(this.state,e)}isActive(e,t){const o=typeof e=="string"?e:null,n=typeof e=="string"?t:e;return B3(this.state,o,n)}getJSON(){return this.state.doc.toJSON()}getHTML(){return hs(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t=`
94
94
 
95
- `,textSerializers:o={}}=e||{};return Dc(this.state.doc,{blockSeparator:t,textSerializers:{...ws(this.schema),...o}})}get isEmpty(){return Bs(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var o;return((o=this.$doc)===null||o===void 0?void 0:o.querySelector(e,t))||null}$nodes(e,t){var o;return((o=this.$doc)===null||o===void 0?void 0:o.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new zr(t,this)}get $doc(){return this.$pos(0)}};function wo(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=K(r.getAttributes,void 0,o);if(n===!1||n===null)return null;const{tr:a}=e,s=o[o.length-1],l=o[0];if(s){const p=l.search(/\S/),d=t.from+l.indexOf(s),c=d+s.length;if(Ts(t.from,t.to,e.doc).filter(u=>u.mark.type.excluded.find(f=>f===r.type&&f!==u.mark.type)).filter(u=>u.to>d).length)return null;c<t.to&&a.delete(c,t.to),d>t.from&&a.delete(t.from+p,d);const b=t.from+p+s.length;a.addMark(t.from+p,b,r.type.create(n||{})),a.removeStoredMark(r.type)}}})}function F3(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=K(r.getAttributes,void 0,o)||{},{tr:a}=e,s=t.from;let l=t.to;const p=r.type.create(n);if(o[1]){const d=o[0].lastIndexOf(o[1]);let c=s+d;c>l?c=l:l=c+o[1].length;const m=o[0][o[0].length-1];a.insertText(m,s+o[0].length-1),a.replaceWith(c,l,p)}else if(o[0]){const d=r.type.isInline?s:s-1;a.insert(d,r.type.create(n)).delete(a.mapping.map(s),a.mapping.map(l))}a.scrollIntoView()}})}function Ds(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=e.doc.resolve(t.from),a=K(r.getAttributes,void 0,o)||{};if(!n.node(-1).canReplaceWith(n.index(-1),n.indexAfter(-1),r.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,r.type,a)}})}function on(r){return new di({find:r.find,handler:({state:e,range:t,match:o,chain:n})=>{const a=K(r.getAttributes,void 0,o)||{},s=e.tr.delete(t.from,t.to),p=s.doc.resolve(t.from).blockRange(),d=p&&Da(p,r.type,a);if(!d)return null;if(s.wrap(p,d),r.keepMarks&&r.editor){const{selection:m,storedMarks:b}=e,{splittableMarks:u}=r.editor.extensionManager,g=b||m.$to.parentOffset&&m.$from.marks();if(g){const f=g.filter(x=>u.includes(x.type.name));s.ensureMarks(f)}}if(r.keepAttributes){const m=r.type.name==="bulletList"||r.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(m,a).run()}const c=s.doc.resolve(t.from-1).nodeBefore;c&&c.type===r.type&&nr(s.doc,t.from-1)&&(!r.joinPredicate||r.joinPredicate(o,c))&&s.join(t.from-1)}})}let ut=class Fl{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=K(_(this,"addOptions",{name:this.name}))),this.storage=K(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Fl(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Fl(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=K(_(t,"addOptions",{name:t.name})),t.storage=K(_(t,"addStorage",{name:t.name,options:t.options})),t}};function Fr(r){return new u5({find:r.find,handler:({state:e,range:t,match:o,pasteEvent:n})=>{const a=K(r.getAttributes,void 0,o,n);if(a===!1||a===null)return null;const{tr:s}=e,l=o[o.length-1],p=o[0];let d=t.to;if(l){const c=p.search(/\S/),m=t.from+p.indexOf(l),b=m+l.length;if(Ts(t.from,t.to,e.doc).filter(g=>g.mark.type.excluded.find(x=>x===r.type&&x!==g.mark.type)).filter(g=>g.to>m).length)return null;b<t.to&&s.delete(b,t.to),m>t.from&&s.delete(t.from+c,m),d=t.from+c+l.length,s.addMark(t.from+c,d,r.type.create(a||{})),s.removeStoredMark(r.type)}}})}function j3(r,e){const{selection:t}=r,{$from:o}=t;if(t instanceof H){const a=o.index();return o.parent.canReplaceWith(a,a+1,e)}let n=o.depth;for(;n>=0;){const a=o.index(n);if(o.node(n).contentMatchAt(a).matchType(e))return!0;n-=1}return!1}var qe="top",it="bottom",at="right",We="left",Ls="auto",nn=[qe,it,at,We],vo="start",an="end",q3="clippingParents",_c="viewport",sn="popper",W3="reference",Rc=nn.reduce(function(r,e){return r.concat([e+"-"+vo,e+"-"+an])},[]),Hc=[].concat(nn,[Ls]).reduce(function(r,e){return r.concat([e,e+"-"+vo,e+"-"+an])},[]),U3="beforeRead",G3="read",K3="afterRead",J3="beforeMain",Y3="main",X3="afterMain",Q3="beforeWrite",Z3="write",$3="afterWrite",ek=[U3,G3,K3,J3,Y3,X3,Q3,Z3,$3];function Bt(r){return r?(r.nodeName||"").toLowerCase():null}function Ze(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function jr(r){var e=Ze(r).Element;return r instanceof e||r instanceof Element}function st(r){var e=Ze(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function As(r){if(typeof ShadowRoot>"u")return!1;var e=Ze(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function tk(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var o=e.styles[t]||{},n=e.attributes[t]||{},a=e.elements[t];!st(a)||!Bt(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(s){var l=n[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function rk(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(o){var n=e.elements[o],a=e.attributes[o]||{},s=Object.keys(e.styles.hasOwnProperty(o)?e.styles[o]:t[o]),l=s.reduce(function(p,d){return p[d]="",p},{});!st(n)||!Bt(n)||(Object.assign(n.style,l),Object.keys(a).forEach(function(p){n.removeAttribute(p)}))})}}const zc={name:"applyStyles",enabled:!0,phase:"write",fn:tk,effect:rk,requires:["computeStyles"]};function Nt(r){return r.split("-")[0]}var qr=Math.max,yi=Math.min,ko=Math.round;function Os(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Fc(){return!/^((?!chrome|android).)*safari/i.test(Os())}function So(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var o=r.getBoundingClientRect(),n=1,a=1;e&&st(r)&&(n=r.offsetWidth>0&&ko(o.width)/r.offsetWidth||1,a=r.offsetHeight>0&&ko(o.height)/r.offsetHeight||1);var s=jr(r)?Ze(r):window,l=s.visualViewport,p=!Fc()&&t,d=(o.left+(p&&l?l.offsetLeft:0))/n,c=(o.top+(p&&l?l.offsetTop:0))/a,m=o.width/n,b=o.height/a;return{width:m,height:b,top:c,right:d+m,bottom:c+b,left:d,x:d,y:c}}function Vs(r){var e=So(r),t=r.offsetWidth,o=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:o}}function jc(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&As(t)){var o=e;do{if(o&&r.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function qt(r){return Ze(r).getComputedStyle(r)}function ok(r){return["table","td","th"].indexOf(Bt(r))>=0}function gr(r){return((jr(r)?r.ownerDocument:r.document)||window.document).documentElement}function wi(r){return Bt(r)==="html"?r:r.assignedSlot||r.parentNode||(As(r)?r.host:null)||gr(r)}function qc(r){return!st(r)||qt(r).position==="fixed"?null:r.offsetParent}function nk(r){var e=/firefox/i.test(Os()),t=/Trident/i.test(Os());if(t&&st(r)){var o=qt(r);if(o.position==="fixed")return null}var n=wi(r);for(As(n)&&(n=n.host);st(n)&&["html","body"].indexOf(Bt(n))<0;){var a=qt(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ln(r){for(var e=Ze(r),t=qc(r);t&&ok(t)&&qt(t).position==="static";)t=qc(t);return t&&(Bt(t)==="html"||Bt(t)==="body"&&qt(t).position==="static")?e:t||nk(r)||e}function Is(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function pn(r,e,t){return qr(r,yi(e,t))}function ik(r,e,t){var o=pn(r,e,t);return o>t?t:o}function Wc(){return{top:0,right:0,bottom:0,left:0}}function Uc(r){return Object.assign({},Wc(),r)}function Gc(r,e){return e.reduce(function(t,o){return t[o]=r,t},{})}var ak=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Uc(typeof e!="number"?e:Gc(e,nn))};function sk(r){var e,t=r.state,o=r.name,n=r.options,a=t.elements.arrow,s=t.modifiersData.popperOffsets,l=Nt(t.placement),p=Is(l),d=[We,at].indexOf(l)>=0,c=d?"height":"width";if(!(!a||!s)){var m=ak(n.padding,t),b=Vs(a),u=p==="y"?qe:We,g=p==="y"?it:at,f=t.rects.reference[c]+t.rects.reference[p]-s[p]-t.rects.popper[c],x=s[p]-t.rects.reference[p],y=ln(a),w=y?p==="y"?y.clientHeight||0:y.clientWidth||0:0,v=f/2-x/2,h=m[u],S=w-b[c]-m[g],k=w/2-b[c]/2+v,C=pn(h,k,S),L=p;t.modifiersData[o]=(e={},e[L]=C,e.centerOffset=C-k,e)}}function lk(r){var e=r.state,t=r.options,o=t.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||jc(e.elements.popper,n)&&(e.elements.arrow=n))}const pk={name:"arrow",enabled:!0,phase:"main",fn:sk,effect:lk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Co(r){return r.split("-")[1]}var dk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ck(r,e){var t=r.x,o=r.y,n=e.devicePixelRatio||1;return{x:ko(t*n)/n||0,y:ko(o*n)/n||0}}function Kc(r){var e,t=r.popper,o=r.popperRect,n=r.placement,a=r.variation,s=r.offsets,l=r.position,p=r.gpuAcceleration,d=r.adaptive,c=r.roundOffsets,m=r.isFixed,b=s.x,u=b===void 0?0:b,g=s.y,f=g===void 0?0:g,x=typeof c=="function"?c({x:u,y:f}):{x:u,y:f};u=x.x,f=x.y;var y=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),v=We,h=qe,S=window;if(d){var k=ln(t),C="clientHeight",L="clientWidth";if(k===Ze(t)&&(k=gr(t),qt(k).position!=="static"&&l==="absolute"&&(C="scrollHeight",L="scrollWidth")),k=k,n===qe||(n===We||n===at)&&a===an){h=it;var V=m&&k===S&&S.visualViewport?S.visualViewport.height:k[C];f-=V-o.height,f*=p?1:-1}if(n===We||(n===qe||n===it)&&a===an){v=at;var M=m&&k===S&&S.visualViewport?S.visualViewport.width:k[L];u-=M-o.width,u*=p?1:-1}}var B=Object.assign({position:l},d&&dk),D=c===!0?ck({x:u,y:f},Ze(t)):{x:u,y:f};if(u=D.x,f=D.y,p){var F;return Object.assign({},B,(F={},F[h]=w?"0":"",F[v]=y?"0":"",F.transform=(S.devicePixelRatio||1)<=1?"translate("+u+"px, "+f+"px)":"translate3d("+u+"px, "+f+"px, 0)",F))}return Object.assign({},B,(e={},e[h]=w?f+"px":"",e[v]=y?u+"px":"",e.transform="",e))}function mk(r){var e=r.state,t=r.options,o=t.gpuAcceleration,n=o===void 0?!0:o,a=t.adaptive,s=a===void 0?!0:a,l=t.roundOffsets,p=l===void 0?!0:l,d={placement:Nt(e.placement),variation:Co(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Kc(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:p})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Kc(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const bk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:mk,data:{}};var vi={passive:!0};function uk(r){var e=r.state,t=r.instance,o=r.options,n=o.scroll,a=n===void 0?!0:n,s=o.resize,l=s===void 0?!0:s,p=Ze(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&d.forEach(function(c){c.addEventListener("scroll",t.update,vi)}),l&&p.addEventListener("resize",t.update,vi),function(){a&&d.forEach(function(c){c.removeEventListener("scroll",t.update,vi)}),l&&p.removeEventListener("resize",t.update,vi)}}const gk={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:uk,data:{}};var xk={left:"right",right:"left",bottom:"top",top:"bottom"};function ki(r){return r.replace(/left|right|bottom|top/g,function(e){return xk[e]})}var fk={start:"end",end:"start"};function Jc(r){return r.replace(/start|end/g,function(e){return fk[e]})}function _s(r){var e=Ze(r),t=e.pageXOffset,o=e.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Rs(r){return So(gr(r)).left+_s(r).scrollLeft}function hk(r,e){var t=Ze(r),o=gr(r),n=t.visualViewport,a=o.clientWidth,s=o.clientHeight,l=0,p=0;if(n){a=n.width,s=n.height;var d=Fc();(d||!d&&e==="fixed")&&(l=n.offsetLeft,p=n.offsetTop)}return{width:a,height:s,x:l+Rs(r),y:p}}function yk(r){var e,t=gr(r),o=_s(r),n=(e=r.ownerDocument)==null?void 0:e.body,a=qr(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),s=qr(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-o.scrollLeft+Rs(r),p=-o.scrollTop;return qt(n||t).direction==="rtl"&&(l+=qr(t.clientWidth,n?n.clientWidth:0)-a),{width:a,height:s,x:l,y:p}}function Hs(r){var e=qt(r),t=e.overflow,o=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+o)}function Yc(r){return["html","body","#document"].indexOf(Bt(r))>=0?r.ownerDocument.body:st(r)&&Hs(r)?r:Yc(wi(r))}function dn(r,e){var t;e===void 0&&(e=[]);var o=Yc(r),n=o===((t=r.ownerDocument)==null?void 0:t.body),a=Ze(o),s=n?[a].concat(a.visualViewport||[],Hs(o)?o:[]):o,l=e.concat(s);return n?l:l.concat(dn(wi(s)))}function zs(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function wk(r,e){var t=So(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Xc(r,e,t){return e===_c?zs(hk(r,t)):jr(e)?wk(e,t):zs(yk(gr(r)))}function vk(r){var e=dn(wi(r)),t=["absolute","fixed"].indexOf(qt(r).position)>=0,o=t&&st(r)?ln(r):r;return jr(o)?e.filter(function(n){return jr(n)&&jc(n,o)&&Bt(n)!=="body"}):[]}function kk(r,e,t,o){var n=e==="clippingParents"?vk(r):[].concat(e),a=[].concat(n,[t]),s=a[0],l=a.reduce(function(p,d){var c=Xc(r,d,o);return p.top=qr(c.top,p.top),p.right=yi(c.right,p.right),p.bottom=yi(c.bottom,p.bottom),p.left=qr(c.left,p.left),p},Xc(r,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Qc(r){var e=r.reference,t=r.element,o=r.placement,n=o?Nt(o):null,a=o?Co(o):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,p;switch(n){case qe:p={x:s,y:e.y-t.height};break;case it:p={x:s,y:e.y+e.height};break;case at:p={x:e.x+e.width,y:l};break;case We:p={x:e.x-t.width,y:l};break;default:p={x:e.x,y:e.y}}var d=n?Is(n):null;if(d!=null){var c=d==="y"?"height":"width";switch(a){case vo:p[d]=p[d]-(e[c]/2-t[c]/2);break;case an:p[d]=p[d]+(e[c]/2-t[c]/2);break}}return p}function cn(r,e){e===void 0&&(e={});var t=e,o=t.placement,n=o===void 0?r.placement:o,a=t.strategy,s=a===void 0?r.strategy:a,l=t.boundary,p=l===void 0?q3:l,d=t.rootBoundary,c=d===void 0?_c:d,m=t.elementContext,b=m===void 0?sn:m,u=t.altBoundary,g=u===void 0?!1:u,f=t.padding,x=f===void 0?0:f,y=Uc(typeof x!="number"?x:Gc(x,nn)),w=b===sn?W3:sn,v=r.rects.popper,h=r.elements[g?w:b],S=kk(jr(h)?h:h.contextElement||gr(r.elements.popper),p,c,s),k=So(r.elements.reference),C=Qc({reference:k,element:v,placement:n}),L=zs(Object.assign({},v,C)),V=b===sn?L:k,M={top:S.top-V.top+y.top,bottom:V.bottom-S.bottom+y.bottom,left:S.left-V.left+y.left,right:V.right-S.right+y.right},B=r.modifiersData.offset;if(b===sn&&B){var D=B[n];Object.keys(M).forEach(function(F){var q=[at,it].indexOf(F)>=0?1:-1,Y=[qe,it].indexOf(F)>=0?"y":"x";M[F]+=D[Y]*q})}return M}function Sk(r,e){e===void 0&&(e={});var t=e,o=t.placement,n=t.boundary,a=t.rootBoundary,s=t.padding,l=t.flipVariations,p=t.allowedAutoPlacements,d=p===void 0?Hc:p,c=Co(o),m=c?l?Rc:Rc.filter(function(g){return Co(g)===c}):nn,b=m.filter(function(g){return d.indexOf(g)>=0});b.length===0&&(b=m);var u=b.reduce(function(g,f){return g[f]=cn(r,{placement:f,boundary:n,rootBoundary:a,padding:s})[Nt(f)],g},{});return Object.keys(u).sort(function(g,f){return u[g]-u[f]})}function Ck(r){if(Nt(r)===Ls)return[];var e=ki(r);return[Jc(r),e,Jc(e)]}function Ek(r){var e=r.state,t=r.options,o=r.name;if(!e.modifiersData[o]._skip){for(var n=t.mainAxis,a=n===void 0?!0:n,s=t.altAxis,l=s===void 0?!0:s,p=t.fallbackPlacements,d=t.padding,c=t.boundary,m=t.rootBoundary,b=t.altBoundary,u=t.flipVariations,g=u===void 0?!0:u,f=t.allowedAutoPlacements,x=e.options.placement,y=Nt(x),w=y===x,v=p||(w||!g?[ki(x)]:Ck(x)),h=[x].concat(v).reduce(function(Je,Oe){return Je.concat(Nt(Oe)===Ls?Sk(e,{placement:Oe,boundary:c,rootBoundary:m,padding:d,flipVariations:g,allowedAutoPlacements:f}):Oe)},[]),S=e.rects.reference,k=e.rects.popper,C=new Map,L=!0,V=h[0],M=0;M<h.length;M++){var B=h[M],D=Nt(B),F=Co(B)===vo,q=[qe,it].indexOf(D)>=0,Y=q?"width":"height",Z=cn(e,{placement:B,boundary:c,rootBoundary:m,altBoundary:b,padding:d}),$=q?F?at:We:F?it:qe;S[Y]>k[Y]&&($=ki($));var ee=ki($),G=[];if(a&&G.push(Z[D]<=0),l&&G.push(Z[$]<=0,Z[ee]<=0),G.every(function(Je){return Je})){V=B,L=!1;break}C.set(B,G)}if(L)for(var Ge=g?3:1,Ke=function(Oe){var Ve=h.find(function(yt){var Be=C.get(yt);if(Be)return Be.slice(0,Oe).every(function(wt){return wt})});if(Ve)return V=Ve,"break"},Fe=Ge;Fe>0;Fe--){var ct=Ke(Fe);if(ct==="break")break}e.placement!==V&&(e.modifiersData[o]._skip=!0,e.placement=V,e.reset=!0)}}const Tk={name:"flip",enabled:!0,phase:"main",fn:Ek,requiresIfExists:["offset"],data:{_skip:!1}};function Zc(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function $c(r){return[qe,at,it,We].some(function(e){return r[e]>=0})}function Mk(r){var e=r.state,t=r.name,o=e.rects.reference,n=e.rects.popper,a=e.modifiersData.preventOverflow,s=cn(e,{elementContext:"reference"}),l=cn(e,{altBoundary:!0}),p=Zc(s,o),d=Zc(l,n,a),c=$c(p),m=$c(d);e.modifiersData[t]={referenceClippingOffsets:p,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":m})}const Bk={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Mk};function Nk(r,e,t){var o=Nt(r),n=[We,qe].indexOf(o)>=0?-1:1,a=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,s=a[0],l=a[1];return s=s||0,l=(l||0)*n,[We,at].indexOf(o)>=0?{x:l,y:s}:{x:s,y:l}}function Pk(r){var e=r.state,t=r.options,o=r.name,n=t.offset,a=n===void 0?[0,0]:n,s=Hc.reduce(function(c,m){return c[m]=Nk(m,e.rects,a),c},{}),l=s[e.placement],p=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=p,e.modifiersData.popperOffsets.y+=d),e.modifiersData[o]=s}const Dk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Pk};function Lk(r){var e=r.state,t=r.name;e.modifiersData[t]=Qc({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Ak={name:"popperOffsets",enabled:!0,phase:"read",fn:Lk,data:{}};function Ok(r){return r==="x"?"y":"x"}function Vk(r){var e=r.state,t=r.options,o=r.name,n=t.mainAxis,a=n===void 0?!0:n,s=t.altAxis,l=s===void 0?!1:s,p=t.boundary,d=t.rootBoundary,c=t.altBoundary,m=t.padding,b=t.tether,u=b===void 0?!0:b,g=t.tetherOffset,f=g===void 0?0:g,x=cn(e,{boundary:p,rootBoundary:d,padding:m,altBoundary:c}),y=Nt(e.placement),w=Co(e.placement),v=!w,h=Is(y),S=Ok(h),k=e.modifiersData.popperOffsets,C=e.rects.reference,L=e.rects.popper,V=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,M=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(k){if(a){var F,q=h==="y"?qe:We,Y=h==="y"?it:at,Z=h==="y"?"height":"width",$=k[h],ee=$+x[q],G=$-x[Y],Ge=u?-L[Z]/2:0,Ke=w===vo?C[Z]:L[Z],Fe=w===vo?-L[Z]:-C[Z],ct=e.elements.arrow,Je=u&&ct?Vs(ct):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Wc(),Ve=Oe[q],yt=Oe[Y],Be=pn(0,C[Z],Je[Z]),wt=v?C[Z]/2-Ge-Be-Ve-M.mainAxis:Ke-Be-Ve-M.mainAxis,et=v?-C[Z]/2+Ge+Be+yt+M.mainAxis:Fe+Be+yt+M.mainAxis,Ye=e.elements.arrow&&ln(e.elements.arrow),Xt=Ye?h==="y"?Ye.clientTop||0:Ye.clientLeft||0:0,ue=(F=B==null?void 0:B[h])!=null?F:0,I=$+wt-ue-Xt,Ne=$+et-ue,kr=pn(u?yi(ee,I):ee,$,u?qr(G,Ne):G);k[h]=kr,D[h]=kr-$}if(l){var Sr,Qr=h==="x"?qe:We,Zr=h==="x"?it:at,vt=k[S],Vt=S==="y"?"height":"width",Cr=vt+x[Qr],mt=vt-x[Zr],Er=[qe,We].indexOf(y)!==-1,$r=(Sr=B==null?void 0:B[S])!=null?Sr:0,eo=Er?Cr:vt-C[Vt]-L[Vt]-$r+M.altAxis,to=Er?vt+C[Vt]+L[Vt]-$r-M.altAxis:mt,ro=u&&Er?ik(eo,vt,to):pn(u?eo:Cr,vt,u?to:mt);k[S]=ro,D[S]=ro-vt}e.modifiersData[o]=D}}const Ik={name:"preventOverflow",enabled:!0,phase:"main",fn:Vk,requiresIfExists:["offset"]};function _k(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function Rk(r){return r===Ze(r)||!st(r)?_s(r):_k(r)}function Hk(r){var e=r.getBoundingClientRect(),t=ko(e.width)/r.offsetWidth||1,o=ko(e.height)/r.offsetHeight||1;return t!==1||o!==1}function zk(r,e,t){t===void 0&&(t=!1);var o=st(e),n=st(e)&&Hk(e),a=gr(e),s=So(r,n,t),l={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!t)&&((Bt(e)!=="body"||Hs(a))&&(l=Rk(e)),st(e)?(p=So(e,!0),p.x+=e.clientLeft,p.y+=e.clientTop):a&&(p.x=Rs(a))),{x:s.left+l.scrollLeft-p.x,y:s.top+l.scrollTop-p.y,width:s.width,height:s.height}}function Fk(r){var e=new Map,t=new Set,o=[];r.forEach(function(a){e.set(a.name,a)});function n(a){t.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var p=e.get(l);p&&n(p)}}),o.push(a)}return r.forEach(function(a){t.has(a.name)||n(a)}),o}function jk(r){var e=Fk(r);return ek.reduce(function(t,o){return t.concat(e.filter(function(n){return n.phase===o}))},[])}function qk(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function Wk(r){var e=r.reduce(function(t,o){var n=t[o.name];return t[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,t},{});return Object.keys(e).map(function(t){return e[t]})}var em={placement:"bottom",modifiers:[],strategy:"absolute"};function tm(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function Uk(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,o=t===void 0?[]:t,n=e.defaultOptions,a=n===void 0?em:n;return function(l,p,d){d===void 0&&(d=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},em,a),modifiersData:{},elements:{reference:l,popper:p},attributes:{},styles:{}},m=[],b=!1,u={state:c,setOptions:function(y){var w=typeof y=="function"?y(c.options):y;f(),c.options=Object.assign({},a,c.options,w),c.scrollParents={reference:jr(l)?dn(l):l.contextElement?dn(l.contextElement):[],popper:dn(p)};var v=jk(Wk([].concat(o,c.options.modifiers)));return c.orderedModifiers=v.filter(function(h){return h.enabled}),g(),u.update()},forceUpdate:function(){if(!b){var y=c.elements,w=y.reference,v=y.popper;if(tm(w,v)){c.rects={reference:zk(w,ln(v),c.options.strategy==="fixed"),popper:Vs(v)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var h=0;h<c.orderedModifiers.length;h++){if(c.reset===!0){c.reset=!1,h=-1;continue}var S=c.orderedModifiers[h],k=S.fn,C=S.options,L=C===void 0?{}:C,V=S.name;typeof k=="function"&&(c=k({state:c,options:L,name:V,instance:u})||c)}}}},update:qk(function(){return new Promise(function(x){u.forceUpdate(),x(c)})}),destroy:function(){f(),b=!0}};if(!tm(l,p))return u;u.setOptions(d).then(function(x){!b&&d.onFirstUpdate&&d.onFirstUpdate(x)});function g(){c.orderedModifiers.forEach(function(x){var y=x.name,w=x.options,v=w===void 0?{}:w,h=x.effect;if(typeof h=="function"){var S=h({state:c,name:y,instance:u,options:v}),k=function(){};m.push(S||k)}})}function f(){m.forEach(function(x){return x()}),m=[]}return u}}var Gk=[gk,Ak,bk,zc,Dk,Tk,Ik,pk,Bk],Kk=Uk({defaultModifiers:Gk}),Jk="tippy-box",rm="tippy-content",Yk="tippy-backdrop",om="tippy-arrow",nm="tippy-svg-arrow",Wr={passive:!0,capture:!0},im=function(){return document.body};function Xk(r,e){return{}.hasOwnProperty.call(r,e)}function Fs(r,e,t){if(Array.isArray(r)){var o=r[e];return o??(Array.isArray(t)?t[e]:t)}return r}function js(r,e){var t={}.toString.call(r);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function am(r,e){return typeof r=="function"?r.apply(void 0,e):r}function sm(r,e){if(e===0)return r;var t;return function(o){clearTimeout(t),t=setTimeout(function(){r(o)},e)}}function Qk(r,e){var t=Object.assign({},r);return e.forEach(function(o){delete t[o]}),t}function Zk(r){return r.split(/\s+/).filter(Boolean)}function Eo(r){return[].concat(r)}function lm(r,e){r.indexOf(e)===-1&&r.push(e)}function $k(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function eS(r){return r.split("-")[0]}function Si(r){return[].slice.call(r)}function pm(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function mn(){return document.createElement("div")}function bn(r){return["Element","Fragment"].some(function(e){return js(r,e)})}function tS(r){return js(r,"NodeList")}function rS(r){return js(r,"MouseEvent")}function oS(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function nS(r){return bn(r)?[r]:tS(r)?Si(r):Array.isArray(r)?r:Si(document.querySelectorAll(r))}function qs(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function dm(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function iS(r){var e,t=Eo(r),o=t[0];return o!=null&&(e=o.ownerDocument)!=null&&e.body?o.ownerDocument:document}function aS(r,e){var t=e.clientX,o=e.clientY;return r.every(function(n){var a=n.popperRect,s=n.popperState,l=n.props,p=l.interactiveBorder,d=eS(s.placement),c=s.modifiersData.offset;if(!c)return!0;var m=d==="bottom"?c.top.y:0,b=d==="top"?c.bottom.y:0,u=d==="right"?c.left.x:0,g=d==="left"?c.right.x:0,f=a.top-o+m>p,x=o-a.bottom-b>p,y=a.left-t+u>p,w=t-a.right-g>p;return f||x||y||w})}function Ws(r,e,t){var o=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(n){r[o](n,t)})}function cm(r,e){for(var t=e;t;){var o;if(r.contains(t))return!0;t=t.getRootNode==null||(o=t.getRootNode())==null?void 0:o.host}return!1}var Pt={isTouch:!1},mm=0;function sS(){Pt.isTouch||(Pt.isTouch=!0,window.performance&&document.addEventListener("mousemove",bm))}function bm(){var r=performance.now();r-mm<20&&(Pt.isTouch=!1,document.removeEventListener("mousemove",bm)),mm=r}function lS(){var r=document.activeElement;if(oS(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function pS(){document.addEventListener("touchstart",sS,Wr),window.addEventListener("blur",lS)}var dS=typeof window<"u"&&typeof document<"u",cS=dS?!!window.msCrypto:!1;function To(r){var e=r==="destroy"?"n already-":" ";return[r+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function um(r){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return r.replace(e," ").replace(t,"").trim()}function mS(r){return um(`
95
+ `,textSerializers:o={}}=e||{};return cy(this.state.doc,{blockSeparator:t,textSerializers:{...ws(this.schema),...o}})}get isEmpty(){return Bs(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){if(this.emit("destroy"),this.view){const e=this.view.dom;e&&e.editor&&delete e.editor,this.view.destroy()}this.removeAllListeners()}get isDestroyed(){var e;return!(!((e=this.view)===null||e===void 0)&&e.docView)}$node(e,t){var o;return((o=this.$doc)===null||o===void 0?void 0:o.querySelector(e,t))||null}$nodes(e,t){var o;return((o=this.$doc)===null||o===void 0?void 0:o.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new zr(t,this)}get $doc(){return this.$pos(0)}};function wo(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=G(r.getAttributes,void 0,o);if(n===!1||n===null)return null;const{tr:a}=e,s=o[o.length-1],l=o[0];if(s){const p=l.search(/\S/),d=t.from+l.indexOf(s),c=d+s.length;if(Ts(t.from,t.to,e.doc).filter(u=>u.mark.type.excluded.find(f=>f===r.type&&f!==u.mark.type)).filter(u=>u.to>d).length)return null;c<t.to&&a.delete(c,t.to),d>t.from&&a.delete(t.from+p,d);const b=t.from+p+s.length;a.addMark(t.from+p,b,r.type.create(n||{})),a.removeStoredMark(r.type)}}})}function X3(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=G(r.getAttributes,void 0,o)||{},{tr:a}=e,s=t.from;let l=t.to;const p=r.type.create(n);if(o[1]){const d=o[0].lastIndexOf(o[1]);let c=s+d;c>l?c=l:l=c+o[1].length;const m=o[0][o[0].length-1];a.insertText(m,s+o[0].length-1),a.replaceWith(c,l,p)}else if(o[0]){const d=r.type.isInline?s:s-1;a.insert(d,r.type.create(n)).delete(a.mapping.map(s),a.mapping.map(l))}a.scrollIntoView()}})}function Ds(r){return new di({find:r.find,handler:({state:e,range:t,match:o})=>{const n=e.doc.resolve(t.from),a=G(r.getAttributes,void 0,o)||{};if(!n.node(-1).canReplaceWith(n.index(-1),n.indexAfter(-1),r.type))return null;e.tr.delete(t.from,t.to).setBlockType(t.from,t.from,r.type,a)}})}function on(r){return new di({find:r.find,handler:({state:e,range:t,match:o,chain:n})=>{const a=G(r.getAttributes,void 0,o)||{},s=e.tr.delete(t.from,t.to),p=s.doc.resolve(t.from).blockRange(),d=p&&Da(p,r.type,a);if(!d)return null;if(s.wrap(p,d),r.keepMarks&&r.editor){const{selection:m,storedMarks:b}=e,{splittableMarks:u}=r.editor.extensionManager,g=b||m.$to.parentOffset&&m.$from.marks();if(g){const f=g.filter(x=>u.includes(x.type.name));s.ensureMarks(f)}}if(r.keepAttributes){const m=r.type.name==="bulletList"||r.type.name==="orderedList"?"listItem":"taskList";n().updateAttributes(m,a).run()}const c=s.doc.resolve(t.from-1).nodeBefore;c&&c.type===r.type&&nr(s.doc,t.from-1)&&(!r.joinPredicate||r.joinPredicate(o,c))&&s.join(t.from-1)}})}let ut=class Fl{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=G(_(this,"addOptions",{name:this.name}))),this.storage=G(_(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Fl(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>bi(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new Fl(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=G(_(t,"addOptions",{name:t.name})),t.storage=G(_(t,"addStorage",{name:t.name,options:t.options})),t}};function Fr(r){return new S5({find:r.find,handler:({state:e,range:t,match:o,pasteEvent:n})=>{const a=G(r.getAttributes,void 0,o,n);if(a===!1||a===null)return null;const{tr:s}=e,l=o[o.length-1],p=o[0];let d=t.to;if(l){const c=p.search(/\S/),m=t.from+p.indexOf(l),b=m+l.length;if(Ts(t.from,t.to,e.doc).filter(g=>g.mark.type.excluded.find(x=>x===r.type&&x!==g.mark.type)).filter(g=>g.to>m).length)return null;b<t.to&&s.delete(b,t.to),m>t.from&&s.delete(t.from+c,m),d=t.from+c+l.length,s.addMark(t.from+c,d,r.type.create(a||{})),s.removeStoredMark(r.type)}}})}function Q3(r,e){const{selection:t}=r,{$from:o}=t;if(t instanceof H){const a=o.index();return o.parent.canReplaceWith(a,a+1,e)}let n=o.depth;for(;n>=0;){const a=o.index(n);if(o.node(n).contentMatchAt(a).matchType(e))return!0;n-=1}return!1}var qe="top",it="bottom",at="right",We="left",Ls="auto",nn=[qe,it,at,We],vo="start",an="end",Z3="clippingParents",fy="viewport",sn="popper",$3="reference",hy=nn.reduce(function(r,e){return r.concat([e+"-"+vo,e+"-"+an])},[]),yy=[].concat(nn,[Ls]).reduce(function(r,e){return r.concat([e,e+"-"+vo,e+"-"+an])},[]),ek="beforeRead",tk="read",rk="afterRead",ok="beforeMain",nk="main",ik="afterMain",ak="beforeWrite",sk="write",lk="afterWrite",pk=[ek,tk,rk,ok,nk,ik,ak,sk,lk];function Bt(r){return r?(r.nodeName||"").toLowerCase():null}function Ze(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function jr(r){var e=Ze(r).Element;return r instanceof e||r instanceof Element}function st(r){var e=Ze(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function As(r){if(typeof ShadowRoot>"u")return!1;var e=Ze(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function dk(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var o=e.styles[t]||{},n=e.attributes[t]||{},a=e.elements[t];!st(a)||!Bt(a)||(Object.assign(a.style,o),Object.keys(n).forEach(function(s){var l=n[s];l===!1?a.removeAttribute(s):a.setAttribute(s,l===!0?"":l)}))})}function ck(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(o){var n=e.elements[o],a=e.attributes[o]||{},s=Object.keys(e.styles.hasOwnProperty(o)?e.styles[o]:t[o]),l=s.reduce(function(p,d){return p[d]="",p},{});!st(n)||!Bt(n)||(Object.assign(n.style,l),Object.keys(a).forEach(function(p){n.removeAttribute(p)}))})}}const wy={name:"applyStyles",enabled:!0,phase:"write",fn:dk,effect:ck,requires:["computeStyles"]};function Nt(r){return r.split("-")[0]}var qr=Math.max,yi=Math.min,ko=Math.round;function Os(){var r=navigator.userAgentData;return r!=null&&r.brands&&Array.isArray(r.brands)?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function vy(){return!/^((?!chrome|android).)*safari/i.test(Os())}function So(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var o=r.getBoundingClientRect(),n=1,a=1;e&&st(r)&&(n=r.offsetWidth>0&&ko(o.width)/r.offsetWidth||1,a=r.offsetHeight>0&&ko(o.height)/r.offsetHeight||1);var s=jr(r)?Ze(r):window,l=s.visualViewport,p=!vy()&&t,d=(o.left+(p&&l?l.offsetLeft:0))/n,c=(o.top+(p&&l?l.offsetTop:0))/a,m=o.width/n,b=o.height/a;return{width:m,height:b,top:c,right:d+m,bottom:c+b,left:d,x:d,y:c}}function Vs(r){var e=So(r),t=r.offsetWidth,o=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-o)<=1&&(o=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:o}}function ky(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&As(t)){var o=e;do{if(o&&r.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function qt(r){return Ze(r).getComputedStyle(r)}function mk(r){return["table","td","th"].indexOf(Bt(r))>=0}function gr(r){return((jr(r)?r.ownerDocument:r.document)||window.document).documentElement}function wi(r){return Bt(r)==="html"?r:r.assignedSlot||r.parentNode||(As(r)?r.host:null)||gr(r)}function Sy(r){return!st(r)||qt(r).position==="fixed"?null:r.offsetParent}function bk(r){var e=/firefox/i.test(Os()),t=/Trident/i.test(Os());if(t&&st(r)){var o=qt(r);if(o.position==="fixed")return null}var n=wi(r);for(As(n)&&(n=n.host);st(n)&&["html","body"].indexOf(Bt(n))<0;){var a=qt(n);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return n;n=n.parentNode}return null}function ln(r){for(var e=Ze(r),t=Sy(r);t&&mk(t)&&qt(t).position==="static";)t=Sy(t);return t&&(Bt(t)==="html"||Bt(t)==="body"&&qt(t).position==="static")?e:t||bk(r)||e}function Is(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function pn(r,e,t){return qr(r,yi(e,t))}function uk(r,e,t){var o=pn(r,e,t);return o>t?t:o}function Cy(){return{top:0,right:0,bottom:0,left:0}}function Ey(r){return Object.assign({},Cy(),r)}function Ty(r,e){return e.reduce(function(t,o){return t[o]=r,t},{})}var gk=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ey(typeof e!="number"?e:Ty(e,nn))};function xk(r){var e,t=r.state,o=r.name,n=r.options,a=t.elements.arrow,s=t.modifiersData.popperOffsets,l=Nt(t.placement),p=Is(l),d=[We,at].indexOf(l)>=0,c=d?"height":"width";if(!(!a||!s)){var m=gk(n.padding,t),b=Vs(a),u=p==="y"?qe:We,g=p==="y"?it:at,f=t.rects.reference[c]+t.rects.reference[p]-s[p]-t.rects.popper[c],x=s[p]-t.rects.reference[p],y=ln(a),w=y?p==="y"?y.clientHeight||0:y.clientWidth||0:0,v=f/2-x/2,h=m[u],S=w-b[c]-m[g],k=w/2-b[c]/2+v,C=pn(h,k,S),L=p;t.modifiersData[o]=(e={},e[L]=C,e.centerOffset=C-k,e)}}function fk(r){var e=r.state,t=r.options,o=t.element,n=o===void 0?"[data-popper-arrow]":o;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||ky(e.elements.popper,n)&&(e.elements.arrow=n))}const hk={name:"arrow",enabled:!0,phase:"main",fn:xk,effect:fk,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Co(r){return r.split("-")[1]}var yk={top:"auto",right:"auto",bottom:"auto",left:"auto"};function wk(r,e){var t=r.x,o=r.y,n=e.devicePixelRatio||1;return{x:ko(t*n)/n||0,y:ko(o*n)/n||0}}function My(r){var e,t=r.popper,o=r.popperRect,n=r.placement,a=r.variation,s=r.offsets,l=r.position,p=r.gpuAcceleration,d=r.adaptive,c=r.roundOffsets,m=r.isFixed,b=s.x,u=b===void 0?0:b,g=s.y,f=g===void 0?0:g,x=typeof c=="function"?c({x:u,y:f}):{x:u,y:f};u=x.x,f=x.y;var y=s.hasOwnProperty("x"),w=s.hasOwnProperty("y"),v=We,h=qe,S=window;if(d){var k=ln(t),C="clientHeight",L="clientWidth";if(k===Ze(t)&&(k=gr(t),qt(k).position!=="static"&&l==="absolute"&&(C="scrollHeight",L="scrollWidth")),k=k,n===qe||(n===We||n===at)&&a===an){h=it;var V=m&&k===S&&S.visualViewport?S.visualViewport.height:k[C];f-=V-o.height,f*=p?1:-1}if(n===We||(n===qe||n===it)&&a===an){v=at;var M=m&&k===S&&S.visualViewport?S.visualViewport.width:k[L];u-=M-o.width,u*=p?1:-1}}var B=Object.assign({position:l},d&&yk),D=c===!0?wk({x:u,y:f},Ze(t)):{x:u,y:f};if(u=D.x,f=D.y,p){var z;return Object.assign({},B,(z={},z[h]=w?"0":"",z[v]=y?"0":"",z.transform=(S.devicePixelRatio||1)<=1?"translate("+u+"px, "+f+"px)":"translate3d("+u+"px, "+f+"px, 0)",z))}return Object.assign({},B,(e={},e[h]=w?f+"px":"",e[v]=y?u+"px":"",e.transform="",e))}function vk(r){var e=r.state,t=r.options,o=t.gpuAcceleration,n=o===void 0?!0:o,a=t.adaptive,s=a===void 0?!0:a,l=t.roundOffsets,p=l===void 0?!0:l,d={placement:Nt(e.placement),variation:Co(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,My(Object.assign({},d,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s,roundOffsets:p})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,My(Object.assign({},d,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:p})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const kk={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vk,data:{}};var vi={passive:!0};function Sk(r){var e=r.state,t=r.instance,o=r.options,n=o.scroll,a=n===void 0?!0:n,s=o.resize,l=s===void 0?!0:s,p=Ze(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&d.forEach(function(c){c.addEventListener("scroll",t.update,vi)}),l&&p.addEventListener("resize",t.update,vi),function(){a&&d.forEach(function(c){c.removeEventListener("scroll",t.update,vi)}),l&&p.removeEventListener("resize",t.update,vi)}}const Ck={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Sk,data:{}};var Ek={left:"right",right:"left",bottom:"top",top:"bottom"};function ki(r){return r.replace(/left|right|bottom|top/g,function(e){return Ek[e]})}var Tk={start:"end",end:"start"};function By(r){return r.replace(/start|end/g,function(e){return Tk[e]})}function _s(r){var e=Ze(r),t=e.pageXOffset,o=e.pageYOffset;return{scrollLeft:t,scrollTop:o}}function Rs(r){return So(gr(r)).left+_s(r).scrollLeft}function Mk(r,e){var t=Ze(r),o=gr(r),n=t.visualViewport,a=o.clientWidth,s=o.clientHeight,l=0,p=0;if(n){a=n.width,s=n.height;var d=vy();(d||!d&&e==="fixed")&&(l=n.offsetLeft,p=n.offsetTop)}return{width:a,height:s,x:l+Rs(r),y:p}}function Bk(r){var e,t=gr(r),o=_s(r),n=(e=r.ownerDocument)==null?void 0:e.body,a=qr(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),s=qr(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),l=-o.scrollLeft+Rs(r),p=-o.scrollTop;return qt(n||t).direction==="rtl"&&(l+=qr(t.clientWidth,n?n.clientWidth:0)-a),{width:a,height:s,x:l,y:p}}function Hs(r){var e=qt(r),t=e.overflow,o=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+o)}function Ny(r){return["html","body","#document"].indexOf(Bt(r))>=0?r.ownerDocument.body:st(r)&&Hs(r)?r:Ny(wi(r))}function dn(r,e){var t;e===void 0&&(e=[]);var o=Ny(r),n=o===((t=r.ownerDocument)==null?void 0:t.body),a=Ze(o),s=n?[a].concat(a.visualViewport||[],Hs(o)?o:[]):o,l=e.concat(s);return n?l:l.concat(dn(wi(s)))}function zs(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Nk(r,e){var t=So(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function Py(r,e,t){return e===fy?zs(Mk(r,t)):jr(e)?Nk(e,t):zs(Bk(gr(r)))}function Pk(r){var e=dn(wi(r)),t=["absolute","fixed"].indexOf(qt(r).position)>=0,o=t&&st(r)?ln(r):r;return jr(o)?e.filter(function(n){return jr(n)&&ky(n,o)&&Bt(n)!=="body"}):[]}function Dk(r,e,t,o){var n=e==="clippingParents"?Pk(r):[].concat(e),a=[].concat(n,[t]),s=a[0],l=a.reduce(function(p,d){var c=Py(r,d,o);return p.top=qr(c.top,p.top),p.right=yi(c.right,p.right),p.bottom=yi(c.bottom,p.bottom),p.left=qr(c.left,p.left),p},Py(r,s,o));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function Dy(r){var e=r.reference,t=r.element,o=r.placement,n=o?Nt(o):null,a=o?Co(o):null,s=e.x+e.width/2-t.width/2,l=e.y+e.height/2-t.height/2,p;switch(n){case qe:p={x:s,y:e.y-t.height};break;case it:p={x:s,y:e.y+e.height};break;case at:p={x:e.x+e.width,y:l};break;case We:p={x:e.x-t.width,y:l};break;default:p={x:e.x,y:e.y}}var d=n?Is(n):null;if(d!=null){var c=d==="y"?"height":"width";switch(a){case vo:p[d]=p[d]-(e[c]/2-t[c]/2);break;case an:p[d]=p[d]+(e[c]/2-t[c]/2);break}}return p}function cn(r,e){e===void 0&&(e={});var t=e,o=t.placement,n=o===void 0?r.placement:o,a=t.strategy,s=a===void 0?r.strategy:a,l=t.boundary,p=l===void 0?Z3:l,d=t.rootBoundary,c=d===void 0?fy:d,m=t.elementContext,b=m===void 0?sn:m,u=t.altBoundary,g=u===void 0?!1:u,f=t.padding,x=f===void 0?0:f,y=Ey(typeof x!="number"?x:Ty(x,nn)),w=b===sn?$3:sn,v=r.rects.popper,h=r.elements[g?w:b],S=Dk(jr(h)?h:h.contextElement||gr(r.elements.popper),p,c,s),k=So(r.elements.reference),C=Dy({reference:k,element:v,placement:n}),L=zs(Object.assign({},v,C)),V=b===sn?L:k,M={top:S.top-V.top+y.top,bottom:V.bottom-S.bottom+y.bottom,left:S.left-V.left+y.left,right:V.right-S.right+y.right},B=r.modifiersData.offset;if(b===sn&&B){var D=B[n];Object.keys(M).forEach(function(z){var J=[at,it].indexOf(z)>=0?1:-1,Y=[qe,it].indexOf(z)>=0?"y":"x";M[z]+=D[Y]*J})}return M}function Lk(r,e){e===void 0&&(e={});var t=e,o=t.placement,n=t.boundary,a=t.rootBoundary,s=t.padding,l=t.flipVariations,p=t.allowedAutoPlacements,d=p===void 0?yy:p,c=Co(o),m=c?l?hy:hy.filter(function(g){return Co(g)===c}):nn,b=m.filter(function(g){return d.indexOf(g)>=0});b.length===0&&(b=m);var u=b.reduce(function(g,f){return g[f]=cn(r,{placement:f,boundary:n,rootBoundary:a,padding:s})[Nt(f)],g},{});return Object.keys(u).sort(function(g,f){return u[g]-u[f]})}function Ak(r){if(Nt(r)===Ls)return[];var e=ki(r);return[By(r),e,By(e)]}function Ok(r){var e=r.state,t=r.options,o=r.name;if(!e.modifiersData[o]._skip){for(var n=t.mainAxis,a=n===void 0?!0:n,s=t.altAxis,l=s===void 0?!0:s,p=t.fallbackPlacements,d=t.padding,c=t.boundary,m=t.rootBoundary,b=t.altBoundary,u=t.flipVariations,g=u===void 0?!0:u,f=t.allowedAutoPlacements,x=e.options.placement,y=Nt(x),w=y===x,v=p||(w||!g?[ki(x)]:Ak(x)),h=[x].concat(v).reduce(function(Je,Oe){return Je.concat(Nt(Oe)===Ls?Lk(e,{placement:Oe,boundary:c,rootBoundary:m,padding:d,flipVariations:g,allowedAutoPlacements:f}):Oe)},[]),S=e.rects.reference,k=e.rects.popper,C=new Map,L=!0,V=h[0],M=0;M<h.length;M++){var B=h[M],D=Nt(B),z=Co(B)===vo,J=[qe,it].indexOf(D)>=0,Y=J?"width":"height",Z=cn(e,{placement:B,boundary:c,rootBoundary:m,altBoundary:b,padding:d}),$=J?z?at:We:z?it:qe;S[Y]>k[Y]&&($=ki($));var ee=ki($),U=[];if(a&&U.push(Z[D]<=0),l&&U.push(Z[$]<=0,Z[ee]<=0),U.every(function(Je){return Je})){V=B,L=!1;break}C.set(B,U)}if(L)for(var Ge=g?3:1,Ke=function(Oe){var Ve=h.find(function(yt){var Be=C.get(yt);if(Be)return Be.slice(0,Oe).every(function(wt){return wt})});if(Ve)return V=Ve,"break"},Fe=Ge;Fe>0;Fe--){var ct=Ke(Fe);if(ct==="break")break}e.placement!==V&&(e.modifiersData[o]._skip=!0,e.placement=V,e.reset=!0)}}const Vk={name:"flip",enabled:!0,phase:"main",fn:Ok,requiresIfExists:["offset"],data:{_skip:!1}};function Ly(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function Ay(r){return[qe,at,it,We].some(function(e){return r[e]>=0})}function Ik(r){var e=r.state,t=r.name,o=e.rects.reference,n=e.rects.popper,a=e.modifiersData.preventOverflow,s=cn(e,{elementContext:"reference"}),l=cn(e,{altBoundary:!0}),p=Ly(s,o),d=Ly(l,n,a),c=Ay(p),m=Ay(d);e.modifiersData[t]={referenceClippingOffsets:p,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":m})}const _k={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Ik};function Rk(r,e,t){var o=Nt(r),n=[We,qe].indexOf(o)>=0?-1:1,a=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,s=a[0],l=a[1];return s=s||0,l=(l||0)*n,[We,at].indexOf(o)>=0?{x:l,y:s}:{x:s,y:l}}function Hk(r){var e=r.state,t=r.options,o=r.name,n=t.offset,a=n===void 0?[0,0]:n,s=yy.reduce(function(c,m){return c[m]=Rk(m,e.rects,a),c},{}),l=s[e.placement],p=l.x,d=l.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=p,e.modifiersData.popperOffsets.y+=d),e.modifiersData[o]=s}const zk={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hk};function Fk(r){var e=r.state,t=r.name;e.modifiersData[t]=Dy({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const jk={name:"popperOffsets",enabled:!0,phase:"read",fn:Fk,data:{}};function qk(r){return r==="x"?"y":"x"}function Wk(r){var e=r.state,t=r.options,o=r.name,n=t.mainAxis,a=n===void 0?!0:n,s=t.altAxis,l=s===void 0?!1:s,p=t.boundary,d=t.rootBoundary,c=t.altBoundary,m=t.padding,b=t.tether,u=b===void 0?!0:b,g=t.tetherOffset,f=g===void 0?0:g,x=cn(e,{boundary:p,rootBoundary:d,padding:m,altBoundary:c}),y=Nt(e.placement),w=Co(e.placement),v=!w,h=Is(y),S=qk(h),k=e.modifiersData.popperOffsets,C=e.rects.reference,L=e.rects.popper,V=typeof f=="function"?f(Object.assign({},e.rects,{placement:e.placement})):f,M=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(k){if(a){var z,J=h==="y"?qe:We,Y=h==="y"?it:at,Z=h==="y"?"height":"width",$=k[h],ee=$+x[J],U=$-x[Y],Ge=u?-L[Z]/2:0,Ke=w===vo?C[Z]:L[Z],Fe=w===vo?-L[Z]:-C[Z],ct=e.elements.arrow,Je=u&&ct?Vs(ct):{width:0,height:0},Oe=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Cy(),Ve=Oe[J],yt=Oe[Y],Be=pn(0,C[Z],Je[Z]),wt=v?C[Z]/2-Ge-Be-Ve-M.mainAxis:Ke-Be-Ve-M.mainAxis,et=v?-C[Z]/2+Ge+Be+yt+M.mainAxis:Fe+Be+yt+M.mainAxis,Ye=e.elements.arrow&&ln(e.elements.arrow),Xt=Ye?h==="y"?Ye.clientTop||0:Ye.clientLeft||0:0,ue=(z=B==null?void 0:B[h])!=null?z:0,I=$+wt-ue-Xt,Ne=$+et-ue,kr=pn(u?yi(ee,I):ee,$,u?qr(U,Ne):U);k[h]=kr,D[h]=kr-$}if(l){var Sr,Qr=h==="x"?qe:We,Zr=h==="x"?it:at,vt=k[S],Vt=S==="y"?"height":"width",Cr=vt+x[Qr],mt=vt-x[Zr],Er=[qe,We].indexOf(y)!==-1,$r=(Sr=B==null?void 0:B[S])!=null?Sr:0,eo=Er?Cr:vt-C[Vt]-L[Vt]-$r+M.altAxis,to=Er?vt+C[Vt]+L[Vt]-$r-M.altAxis:mt,ro=u&&Er?uk(eo,vt,to):pn(u?eo:Cr,vt,u?to:mt);k[S]=ro,D[S]=ro-vt}e.modifiersData[o]=D}}const Uk={name:"preventOverflow",enabled:!0,phase:"main",fn:Wk,requiresIfExists:["offset"]};function Gk(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function Kk(r){return r===Ze(r)||!st(r)?_s(r):Gk(r)}function Jk(r){var e=r.getBoundingClientRect(),t=ko(e.width)/r.offsetWidth||1,o=ko(e.height)/r.offsetHeight||1;return t!==1||o!==1}function Yk(r,e,t){t===void 0&&(t=!1);var o=st(e),n=st(e)&&Jk(e),a=gr(e),s=So(r,n,t),l={scrollLeft:0,scrollTop:0},p={x:0,y:0};return(o||!o&&!t)&&((Bt(e)!=="body"||Hs(a))&&(l=Kk(e)),st(e)?(p=So(e,!0),p.x+=e.clientLeft,p.y+=e.clientTop):a&&(p.x=Rs(a))),{x:s.left+l.scrollLeft-p.x,y:s.top+l.scrollTop-p.y,width:s.width,height:s.height}}function Xk(r){var e=new Map,t=new Set,o=[];r.forEach(function(a){e.set(a.name,a)});function n(a){t.add(a.name);var s=[].concat(a.requires||[],a.requiresIfExists||[]);s.forEach(function(l){if(!t.has(l)){var p=e.get(l);p&&n(p)}}),o.push(a)}return r.forEach(function(a){t.has(a.name)||n(a)}),o}function Qk(r){var e=Xk(r);return pk.reduce(function(t,o){return t.concat(e.filter(function(n){return n.phase===o}))},[])}function Zk(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function $k(r){var e=r.reduce(function(t,o){var n=t[o.name];return t[o.name]=n?Object.assign({},n,o,{options:Object.assign({},n.options,o.options),data:Object.assign({},n.data,o.data)}):o,t},{});return Object.keys(e).map(function(t){return e[t]})}var Oy={placement:"bottom",modifiers:[],strategy:"absolute"};function Vy(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(o){return!(o&&typeof o.getBoundingClientRect=="function")})}function eS(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,o=t===void 0?[]:t,n=e.defaultOptions,a=n===void 0?Oy:n;return function(l,p,d){d===void 0&&(d=a);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},Oy,a),modifiersData:{},elements:{reference:l,popper:p},attributes:{},styles:{}},m=[],b=!1,u={state:c,setOptions:function(y){var w=typeof y=="function"?y(c.options):y;f(),c.options=Object.assign({},a,c.options,w),c.scrollParents={reference:jr(l)?dn(l):l.contextElement?dn(l.contextElement):[],popper:dn(p)};var v=Qk($k([].concat(o,c.options.modifiers)));return c.orderedModifiers=v.filter(function(h){return h.enabled}),g(),u.update()},forceUpdate:function(){if(!b){var y=c.elements,w=y.reference,v=y.popper;if(Vy(w,v)){c.rects={reference:Yk(w,ln(v),c.options.strategy==="fixed"),popper:Vs(v)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(M){return c.modifiersData[M.name]=Object.assign({},M.data)});for(var h=0;h<c.orderedModifiers.length;h++){if(c.reset===!0){c.reset=!1,h=-1;continue}var S=c.orderedModifiers[h],k=S.fn,C=S.options,L=C===void 0?{}:C,V=S.name;typeof k=="function"&&(c=k({state:c,options:L,name:V,instance:u})||c)}}}},update:Zk(function(){return new Promise(function(x){u.forceUpdate(),x(c)})}),destroy:function(){f(),b=!0}};if(!Vy(l,p))return u;u.setOptions(d).then(function(x){!b&&d.onFirstUpdate&&d.onFirstUpdate(x)});function g(){c.orderedModifiers.forEach(function(x){var y=x.name,w=x.options,v=w===void 0?{}:w,h=x.effect;if(typeof h=="function"){var S=h({state:c,name:y,instance:u,options:v}),k=function(){};m.push(S||k)}})}function f(){m.forEach(function(x){return x()}),m=[]}return u}}var tS=[Ck,jk,kk,wy,zk,Vk,Uk,hk,_k],rS=eS({defaultModifiers:tS}),oS="tippy-box",Iy="tippy-content",nS="tippy-backdrop",_y="tippy-arrow",Ry="tippy-svg-arrow",Wr={passive:!0,capture:!0},Hy=function(){return document.body};function iS(r,e){return{}.hasOwnProperty.call(r,e)}function Fs(r,e,t){if(Array.isArray(r)){var o=r[e];return o??(Array.isArray(t)?t[e]:t)}return r}function js(r,e){var t={}.toString.call(r);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function zy(r,e){return typeof r=="function"?r.apply(void 0,e):r}function Fy(r,e){if(e===0)return r;var t;return function(o){clearTimeout(t),t=setTimeout(function(){r(o)},e)}}function aS(r,e){var t=Object.assign({},r);return e.forEach(function(o){delete t[o]}),t}function sS(r){return r.split(/\s+/).filter(Boolean)}function Eo(r){return[].concat(r)}function jy(r,e){r.indexOf(e)===-1&&r.push(e)}function lS(r){return r.filter(function(e,t){return r.indexOf(e)===t})}function pS(r){return r.split("-")[0]}function Si(r){return[].slice.call(r)}function qy(r){return Object.keys(r).reduce(function(e,t){return r[t]!==void 0&&(e[t]=r[t]),e},{})}function mn(){return document.createElement("div")}function bn(r){return["Element","Fragment"].some(function(e){return js(r,e)})}function dS(r){return js(r,"NodeList")}function cS(r){return js(r,"MouseEvent")}function mS(r){return!!(r&&r._tippy&&r._tippy.reference===r)}function bS(r){return bn(r)?[r]:dS(r)?Si(r):Array.isArray(r)?r:Si(document.querySelectorAll(r))}function qs(r,e){r.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function Wy(r,e){r.forEach(function(t){t&&t.setAttribute("data-state",e)})}function uS(r){var e,t=Eo(r),o=t[0];return o!=null&&(e=o.ownerDocument)!=null&&e.body?o.ownerDocument:document}function gS(r,e){var t=e.clientX,o=e.clientY;return r.every(function(n){var a=n.popperRect,s=n.popperState,l=n.props,p=l.interactiveBorder,d=pS(s.placement),c=s.modifiersData.offset;if(!c)return!0;var m=d==="bottom"?c.top.y:0,b=d==="top"?c.bottom.y:0,u=d==="right"?c.left.x:0,g=d==="left"?c.right.x:0,f=a.top-o+m>p,x=o-a.bottom-b>p,y=a.left-t+u>p,w=t-a.right-g>p;return f||x||y||w})}function Ws(r,e,t){var o=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(n){r[o](n,t)})}function Uy(r,e){for(var t=e;t;){var o;if(r.contains(t))return!0;t=t.getRootNode==null||(o=t.getRootNode())==null?void 0:o.host}return!1}var Pt={isTouch:!1},Gy=0;function xS(){Pt.isTouch||(Pt.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ky))}function Ky(){var r=performance.now();r-Gy<20&&(Pt.isTouch=!1,document.removeEventListener("mousemove",Ky)),Gy=r}function fS(){var r=document.activeElement;if(mS(r)){var e=r._tippy;r.blur&&!e.state.isVisible&&r.blur()}}function hS(){document.addEventListener("touchstart",xS,Wr),window.addEventListener("blur",fS)}var yS=typeof window<"u"&&typeof document<"u",wS=yS?!!window.msCrypto:!1;function To(r){var e=r==="destroy"?"n already-":" ";return[r+"() was called on a"+e+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Jy(r){var e=/[ \t]{2,}/g,t=/^[ \t]*/gm;return r.replace(e," ").replace(t,"").trim()}function vS(r){return Jy(`
96
96
  %ctippy.js
97
97
 
98
- %c`+um(r)+`
98
+ %c`+Jy(r)+`
99
99
 
100
100
  %c👷‍ This is a development-only message. It will be removed in production.
101
- `)}function gm(r){return[mS(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var un;process.env.NODE_ENV!=="production"&&bS();function bS(){un=new Set}function Wt(r,e){if(r&&!un.has(e)){var t;un.add(e),(t=console).warn.apply(t,gm(e))}}function Us(r,e){if(r&&!un.has(e)){var t;un.add(e),(t=console).error.apply(t,gm(e))}}function uS(r){var e=!r,t=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;Us(e,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Us(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var xm={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},gS={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},$e=Object.assign({appendTo:im,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},xm,gS),xS=Object.keys($e),fS=function(e){process.env.NODE_ENV!=="production"&&ym(e,[]);var t=Object.keys(e);t.forEach(function(o){$e[o]=e[o]})};function fm(r){var e=r.plugins||[],t=e.reduce(function(o,n){var a=n.name,s=n.defaultValue;if(a){var l;o[a]=r[a]!==void 0?r[a]:(l=$e[a])!=null?l:s}return o},{});return Object.assign({},r,t)}function hS(r,e){var t=e?Object.keys(fm(Object.assign({},$e,{plugins:e}))):xS,o=t.reduce(function(n,a){var s=(r.getAttribute("data-tippy-"+a)||"").trim();if(!s)return n;if(a==="content")n[a]=s;else try{n[a]=JSON.parse(s)}catch{n[a]=s}return n},{});return o}function hm(r,e){var t=Object.assign({},e,{content:am(e.content,[r])},e.ignoreAttributes?{}:hS(r,e.plugins));return t.aria=Object.assign({},$e.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function ym(r,e){r===void 0&&(r={}),e===void 0&&(e=[]);var t=Object.keys(r);t.forEach(function(o){var n=Qk($e,Object.keys(xm)),a=!Xk(n,o);a&&(a=e.filter(function(s){return s.name===o}).length===0),Wt(a,["`"+o+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
101
+ `)}function Yy(r){return[vS(r),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var un;process.env.NODE_ENV!=="production"&&kS();function kS(){un=new Set}function Wt(r,e){if(r&&!un.has(e)){var t;un.add(e),(t=console).warn.apply(t,Yy(e))}}function Us(r,e){if(r&&!un.has(e)){var t;un.add(e),(t=console).error.apply(t,Yy(e))}}function SS(r){var e=!r,t=Object.prototype.toString.call(r)==="[object Object]"&&!r.addEventListener;Us(e,["tippy() was passed","`"+String(r)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),Us(t,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var Xy={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},CS={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},$e=Object.assign({appendTo:Hy,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},Xy,CS),ES=Object.keys($e),TS=function(e){process.env.NODE_ENV!=="production"&&$y(e,[]);var t=Object.keys(e);t.forEach(function(o){$e[o]=e[o]})};function Qy(r){var e=r.plugins||[],t=e.reduce(function(o,n){var a=n.name,s=n.defaultValue;if(a){var l;o[a]=r[a]!==void 0?r[a]:(l=$e[a])!=null?l:s}return o},{});return Object.assign({},r,t)}function MS(r,e){var t=e?Object.keys(Qy(Object.assign({},$e,{plugins:e}))):ES,o=t.reduce(function(n,a){var s=(r.getAttribute("data-tippy-"+a)||"").trim();if(!s)return n;if(a==="content")n[a]=s;else try{n[a]=JSON.parse(s)}catch{n[a]=s}return n},{});return o}function Zy(r,e){var t=Object.assign({},e,{content:zy(e.content,[r])},e.ignoreAttributes?{}:MS(r,e.plugins));return t.aria=Object.assign({},$e.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}function $y(r,e){r===void 0&&(r={}),e===void 0&&(e=[]);var t=Object.keys(r);t.forEach(function(o){var n=aS($e,Object.keys(Xy)),a=!iS(n,o);a&&(a=e.filter(function(s){return s.name===o}).length===0),Wt(a,["`"+o+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
102
102
 
103
103
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
104
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var yS=function(){return"innerHTML"};function Gs(r,e){r[yS()]=e}function wm(r){var e=mn();return r===!0?e.className=om:(e.className=nm,bn(r)?e.appendChild(r):Gs(e,r)),e}function vm(r,e){bn(e.content)?(Gs(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Gs(r,e.content):r.textContent=e.content)}function Ks(r){var e=r.firstElementChild,t=Si(e.children);return{box:e,content:t.find(function(o){return o.classList.contains(rm)}),arrow:t.find(function(o){return o.classList.contains(om)||o.classList.contains(nm)}),backdrop:t.find(function(o){return o.classList.contains(Yk)})}}function km(r){var e=mn(),t=mn();t.className=Jk,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var o=mn();o.className=rm,o.setAttribute("data-state","hidden"),vm(o,r.props),e.appendChild(t),t.appendChild(o),n(r.props,r.props);function n(a,s){var l=Ks(e),p=l.box,d=l.content,c=l.arrow;s.theme?p.setAttribute("data-theme",s.theme):p.removeAttribute("data-theme"),typeof s.animation=="string"?p.setAttribute("data-animation",s.animation):p.removeAttribute("data-animation"),s.inertia?p.setAttribute("data-inertia",""):p.removeAttribute("data-inertia"),p.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?p.setAttribute("role",s.role):p.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&vm(d,r.props),s.arrow?c?a.arrow!==s.arrow&&(p.removeChild(c),p.appendChild(wm(s.arrow))):p.appendChild(wm(s.arrow)):c&&p.removeChild(c)}return{popper:e,onUpdate:n}}km.$$tippy=!0;var wS=1,Ci=[],Js=[];function vS(r,e){var t=hm(r,Object.assign({},$e,fm(pm(e)))),o,n,a,s=!1,l=!1,p=!1,d=!1,c,m,b,u=[],g=sm(I,t.interactiveDebounce),f,x=wS++,y=null,w=$k(t.plugins),v={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},h={id:x,reference:r,popper:mn(),popperInstance:y,props:t,state:v,plugins:w,clearDelayTimeouts:eo,setProps:to,setContent:ro,show:ga,hide:xa,hideWithInteractivity:fa,enable:Er,disable:$r,unmount:Il,destroy:Ln};if(!t.render)return process.env.NODE_ENV!=="production"&&Us(!0,"render() function has not been supplied."),h;var S=t.render(h),k=S.popper,C=S.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+h.id,h.popper=k,r._tippy=h,k._tippy=h;var L=w.map(function(E){return E.fn(h)}),V=r.hasAttribute("aria-expanded");return Ye(),Ge(),$(),ee("onCreate",[h]),t.showOnCreate&&Cr(),k.addEventListener("mouseenter",function(){h.props.interactive&&h.state.isVisible&&h.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){h.props.interactive&&h.props.trigger.indexOf("mouseenter")>=0&&q().addEventListener("mousemove",g)}),h;function M(){var E=h.props.touch;return Array.isArray(E)?E:[E,0]}function B(){return M()[0]==="hold"}function D(){var E;return!!((E=h.props.render)!=null&&E.$$tippy)}function F(){return f||r}function q(){var E=F().parentNode;return E?iS(E):document}function Y(){return Ks(k)}function Z(E){return h.state.isMounted&&!h.state.isVisible||Pt.isTouch||c&&c.type==="focus"?0:Fs(h.props.delay,E?0:1,$e.delay)}function $(E){E===void 0&&(E=!1),k.style.pointerEvents=h.props.interactive&&!E?"":"none",k.style.zIndex=""+h.props.zIndex}function ee(E,R,z){if(z===void 0&&(z=!0),L.forEach(function(A){A[E]&&A[E].apply(A,R)}),z){var X;(X=h.props)[E].apply(X,R)}}function G(){var E=h.props.aria;if(E.content){var R="aria-"+E.content,z=k.id,X=Eo(h.props.triggerTarget||r);X.forEach(function(A){var T=A.getAttribute(R);if(h.state.isVisible)A.setAttribute(R,T?T+" "+z:z);else{var Q=T&&T.replace(z,"").trim();Q?A.setAttribute(R,Q):A.removeAttribute(R)}})}}function Ge(){if(!(V||!h.props.aria.expanded)){var E=Eo(h.props.triggerTarget||r);E.forEach(function(R){h.props.interactive?R.setAttribute("aria-expanded",h.state.isVisible&&R===F()?"true":"false"):R.removeAttribute("aria-expanded")})}}function Ke(){q().removeEventListener("mousemove",g),Ci=Ci.filter(function(E){return E!==g})}function Fe(E){if(!(Pt.isTouch&&(p||E.type==="mousedown"))){var R=E.composedPath&&E.composedPath()[0]||E.target;if(!(h.props.interactive&&cm(k,R))){if(Eo(h.props.triggerTarget||r).some(function(z){return cm(z,R)})){if(Pt.isTouch||h.state.isVisible&&h.props.trigger.indexOf("click")>=0)return}else ee("onClickOutside",[h,E]);h.props.hideOnClick===!0&&(h.clearDelayTimeouts(),h.hide(),l=!0,setTimeout(function(){l=!1}),h.state.isMounted||Ve())}}}function ct(){p=!0}function Je(){p=!1}function Oe(){var E=q();E.addEventListener("mousedown",Fe,!0),E.addEventListener("touchend",Fe,Wr),E.addEventListener("touchstart",Je,Wr),E.addEventListener("touchmove",ct,Wr)}function Ve(){var E=q();E.removeEventListener("mousedown",Fe,!0),E.removeEventListener("touchend",Fe,Wr),E.removeEventListener("touchstart",Je,Wr),E.removeEventListener("touchmove",ct,Wr)}function yt(E,R){wt(E,function(){!h.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&R()})}function Be(E,R){wt(E,R)}function wt(E,R){var z=Y().box;function X(A){A.target===z&&(Ws(z,"remove",X),R())}if(E===0)return R();Ws(z,"remove",m),Ws(z,"add",X),m=X}function et(E,R,z){z===void 0&&(z=!1);var X=Eo(h.props.triggerTarget||r);X.forEach(function(A){A.addEventListener(E,R,z),u.push({node:A,eventType:E,handler:R,options:z})})}function Ye(){B()&&(et("touchstart",ue,{passive:!0}),et("touchend",Ne,{passive:!0})),Zk(h.props.trigger).forEach(function(E){if(E!=="manual")switch(et(E,ue),E){case"mouseenter":et("mouseleave",Ne);break;case"focus":et(cS?"focusout":"blur",kr);break;case"focusin":et("focusout",kr);break}})}function Xt(){u.forEach(function(E){var R=E.node,z=E.eventType,X=E.handler,A=E.options;R.removeEventListener(z,X,A)}),u=[]}function ue(E){var R,z=!1;if(!(!h.state.isEnabled||Sr(E)||l)){var X=((R=c)==null?void 0:R.type)==="focus";c=E,f=E.currentTarget,Ge(),!h.state.isVisible&&rS(E)&&Ci.forEach(function(A){return A(E)}),E.type==="click"&&(h.props.trigger.indexOf("mouseenter")<0||s)&&h.props.hideOnClick!==!1&&h.state.isVisible?z=!0:Cr(E),E.type==="click"&&(s=!z),z&&!X&&mt(E)}}function I(E){var R=E.target,z=F().contains(R)||k.contains(R);if(!(E.type==="mousemove"&&z)){var X=Vt().concat(k).map(function(A){var T,Q=A._tippy,kt=(T=Q.popperInstance)==null?void 0:T.state;return kt?{popperRect:A.getBoundingClientRect(),popperState:kt,props:t}:null}).filter(Boolean);aS(X,E)&&(Ke(),mt(E))}}function Ne(E){var R=Sr(E)||h.props.trigger.indexOf("click")>=0&&s;if(!R){if(h.props.interactive){h.hideWithInteractivity(E);return}mt(E)}}function kr(E){h.props.trigger.indexOf("focusin")<0&&E.target!==F()||h.props.interactive&&E.relatedTarget&&k.contains(E.relatedTarget)||mt(E)}function Sr(E){return Pt.isTouch?B()!==E.type.indexOf("touch")>=0:!1}function Qr(){Zr();var E=h.props,R=E.popperOptions,z=E.placement,X=E.offset,A=E.getReferenceClientRect,T=E.moveTransition,Q=D()?Ks(k).arrow:null,kt=A?{getBoundingClientRect:A,contextElement:A.contextElement||F()}:r,An={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Oo){var Tr=Oo.state;if(D()){var CD=Y(),_l=CD.box;["placement","reference-hidden","escaped"].forEach(function(ya){ya==="placement"?_l.setAttribute("data-placement",Tr.placement):Tr.attributes.popper["data-popper-"+ya]?_l.setAttribute("data-"+ya,""):_l.removeAttribute("data-"+ya)}),Tr.attributes.popper={}}}},Qt=[{name:"offset",options:{offset:X}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!T}},An];D()&&Q&&Qt.push({name:"arrow",options:{element:Q,padding:3}}),Qt.push.apply(Qt,(R==null?void 0:R.modifiers)||[]),h.popperInstance=Kk(kt,k,Object.assign({},R,{placement:z,onFirstUpdate:b,modifiers:Qt}))}function Zr(){h.popperInstance&&(h.popperInstance.destroy(),h.popperInstance=null)}function vt(){var E=h.props.appendTo,R,z=F();h.props.interactive&&E===im||E==="parent"?R=z.parentNode:R=am(E,[z]),R.contains(k)||R.appendChild(k),h.state.isMounted=!0,Qr(),process.env.NODE_ENV!=="production"&&Wt(h.props.interactive&&E===$e.appendTo&&z.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
104
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var BS=function(){return"innerHTML"};function Gs(r,e){r[BS()]=e}function e0(r){var e=mn();return r===!0?e.className=_y:(e.className=Ry,bn(r)?e.appendChild(r):Gs(e,r)),e}function t0(r,e){bn(e.content)?(Gs(r,""),r.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Gs(r,e.content):r.textContent=e.content)}function Ks(r){var e=r.firstElementChild,t=Si(e.children);return{box:e,content:t.find(function(o){return o.classList.contains(Iy)}),arrow:t.find(function(o){return o.classList.contains(_y)||o.classList.contains(Ry)}),backdrop:t.find(function(o){return o.classList.contains(nS)})}}function r0(r){var e=mn(),t=mn();t.className=oS,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var o=mn();o.className=Iy,o.setAttribute("data-state","hidden"),t0(o,r.props),e.appendChild(t),t.appendChild(o),n(r.props,r.props);function n(a,s){var l=Ks(e),p=l.box,d=l.content,c=l.arrow;s.theme?p.setAttribute("data-theme",s.theme):p.removeAttribute("data-theme"),typeof s.animation=="string"?p.setAttribute("data-animation",s.animation):p.removeAttribute("data-animation"),s.inertia?p.setAttribute("data-inertia",""):p.removeAttribute("data-inertia"),p.style.maxWidth=typeof s.maxWidth=="number"?s.maxWidth+"px":s.maxWidth,s.role?p.setAttribute("role",s.role):p.removeAttribute("role"),(a.content!==s.content||a.allowHTML!==s.allowHTML)&&t0(d,r.props),s.arrow?c?a.arrow!==s.arrow&&(p.removeChild(c),p.appendChild(e0(s.arrow))):p.appendChild(e0(s.arrow)):c&&p.removeChild(c)}return{popper:e,onUpdate:n}}r0.$$tippy=!0;var NS=1,Ci=[],Js=[];function PS(r,e){var t=Zy(r,Object.assign({},$e,Qy(qy(e)))),o,n,a,s=!1,l=!1,p=!1,d=!1,c,m,b,u=[],g=Fy(I,t.interactiveDebounce),f,x=NS++,y=null,w=lS(t.plugins),v={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},h={id:x,reference:r,popper:mn(),popperInstance:y,props:t,state:v,plugins:w,clearDelayTimeouts:eo,setProps:to,setContent:ro,show:ga,hide:xa,hideWithInteractivity:fa,enable:Er,disable:$r,unmount:Il,destroy:Ln};if(!t.render)return process.env.NODE_ENV!=="production"&&Us(!0,"render() function has not been supplied."),h;var S=t.render(h),k=S.popper,C=S.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+h.id,h.popper=k,r._tippy=h,k._tippy=h;var L=w.map(function(E){return E.fn(h)}),V=r.hasAttribute("aria-expanded");return Ye(),Ge(),$(),ee("onCreate",[h]),t.showOnCreate&&Cr(),k.addEventListener("mouseenter",function(){h.props.interactive&&h.state.isVisible&&h.clearDelayTimeouts()}),k.addEventListener("mouseleave",function(){h.props.interactive&&h.props.trigger.indexOf("mouseenter")>=0&&J().addEventListener("mousemove",g)}),h;function M(){var E=h.props.touch;return Array.isArray(E)?E:[E,0]}function B(){return M()[0]==="hold"}function D(){var E;return!!((E=h.props.render)!=null&&E.$$tippy)}function z(){return f||r}function J(){var E=z().parentNode;return E?uS(E):document}function Y(){return Ks(k)}function Z(E){return h.state.isMounted&&!h.state.isVisible||Pt.isTouch||c&&c.type==="focus"?0:Fs(h.props.delay,E?0:1,$e.delay)}function $(E){E===void 0&&(E=!1),k.style.pointerEvents=h.props.interactive&&!E?"":"none",k.style.zIndex=""+h.props.zIndex}function ee(E,R,F){if(F===void 0&&(F=!0),L.forEach(function(A){A[E]&&A[E].apply(A,R)}),F){var X;(X=h.props)[E].apply(X,R)}}function U(){var E=h.props.aria;if(E.content){var R="aria-"+E.content,F=k.id,X=Eo(h.props.triggerTarget||r);X.forEach(function(A){var T=A.getAttribute(R);if(h.state.isVisible)A.setAttribute(R,T?T+" "+F:F);else{var Q=T&&T.replace(F,"").trim();Q?A.setAttribute(R,Q):A.removeAttribute(R)}})}}function Ge(){if(!(V||!h.props.aria.expanded)){var E=Eo(h.props.triggerTarget||r);E.forEach(function(R){h.props.interactive?R.setAttribute("aria-expanded",h.state.isVisible&&R===z()?"true":"false"):R.removeAttribute("aria-expanded")})}}function Ke(){J().removeEventListener("mousemove",g),Ci=Ci.filter(function(E){return E!==g})}function Fe(E){if(!(Pt.isTouch&&(p||E.type==="mousedown"))){var R=E.composedPath&&E.composedPath()[0]||E.target;if(!(h.props.interactive&&Uy(k,R))){if(Eo(h.props.triggerTarget||r).some(function(F){return Uy(F,R)})){if(Pt.isTouch||h.state.isVisible&&h.props.trigger.indexOf("click")>=0)return}else ee("onClickOutside",[h,E]);h.props.hideOnClick===!0&&(h.clearDelayTimeouts(),h.hide(),l=!0,setTimeout(function(){l=!1}),h.state.isMounted||Ve())}}}function ct(){p=!0}function Je(){p=!1}function Oe(){var E=J();E.addEventListener("mousedown",Fe,!0),E.addEventListener("touchend",Fe,Wr),E.addEventListener("touchstart",Je,Wr),E.addEventListener("touchmove",ct,Wr)}function Ve(){var E=J();E.removeEventListener("mousedown",Fe,!0),E.removeEventListener("touchend",Fe,Wr),E.removeEventListener("touchstart",Je,Wr),E.removeEventListener("touchmove",ct,Wr)}function yt(E,R){wt(E,function(){!h.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&R()})}function Be(E,R){wt(E,R)}function wt(E,R){var F=Y().box;function X(A){A.target===F&&(Ws(F,"remove",X),R())}if(E===0)return R();Ws(F,"remove",m),Ws(F,"add",X),m=X}function et(E,R,F){F===void 0&&(F=!1);var X=Eo(h.props.triggerTarget||r);X.forEach(function(A){A.addEventListener(E,R,F),u.push({node:A,eventType:E,handler:R,options:F})})}function Ye(){B()&&(et("touchstart",ue,{passive:!0}),et("touchend",Ne,{passive:!0})),sS(h.props.trigger).forEach(function(E){if(E!=="manual")switch(et(E,ue),E){case"mouseenter":et("mouseleave",Ne);break;case"focus":et(wS?"focusout":"blur",kr);break;case"focusin":et("focusout",kr);break}})}function Xt(){u.forEach(function(E){var R=E.node,F=E.eventType,X=E.handler,A=E.options;R.removeEventListener(F,X,A)}),u=[]}function ue(E){var R,F=!1;if(!(!h.state.isEnabled||Sr(E)||l)){var X=((R=c)==null?void 0:R.type)==="focus";c=E,f=E.currentTarget,Ge(),!h.state.isVisible&&cS(E)&&Ci.forEach(function(A){return A(E)}),E.type==="click"&&(h.props.trigger.indexOf("mouseenter")<0||s)&&h.props.hideOnClick!==!1&&h.state.isVisible?F=!0:Cr(E),E.type==="click"&&(s=!F),F&&!X&&mt(E)}}function I(E){var R=E.target,F=z().contains(R)||k.contains(R);if(!(E.type==="mousemove"&&F)){var X=Vt().concat(k).map(function(A){var T,Q=A._tippy,kt=(T=Q.popperInstance)==null?void 0:T.state;return kt?{popperRect:A.getBoundingClientRect(),popperState:kt,props:t}:null}).filter(Boolean);gS(X,E)&&(Ke(),mt(E))}}function Ne(E){var R=Sr(E)||h.props.trigger.indexOf("click")>=0&&s;if(!R){if(h.props.interactive){h.hideWithInteractivity(E);return}mt(E)}}function kr(E){h.props.trigger.indexOf("focusin")<0&&E.target!==z()||h.props.interactive&&E.relatedTarget&&k.contains(E.relatedTarget)||mt(E)}function Sr(E){return Pt.isTouch?B()!==E.type.indexOf("touch")>=0:!1}function Qr(){Zr();var E=h.props,R=E.popperOptions,F=E.placement,X=E.offset,A=E.getReferenceClientRect,T=E.moveTransition,Q=D()?Ks(k).arrow:null,kt=A?{getBoundingClientRect:A,contextElement:A.contextElement||z()}:r,An={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(Oo){var Tr=Oo.state;if(D()){var CD=Y(),_l=CD.box;["placement","reference-hidden","escaped"].forEach(function(ya){ya==="placement"?_l.setAttribute("data-placement",Tr.placement):Tr.attributes.popper["data-popper-"+ya]?_l.setAttribute("data-"+ya,""):_l.removeAttribute("data-"+ya)}),Tr.attributes.popper={}}}},Qt=[{name:"offset",options:{offset:X}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!T}},An];D()&&Q&&Qt.push({name:"arrow",options:{element:Q,padding:3}}),Qt.push.apply(Qt,(R==null?void 0:R.modifiers)||[]),h.popperInstance=rS(kt,k,Object.assign({},R,{placement:F,onFirstUpdate:b,modifiers:Qt}))}function Zr(){h.popperInstance&&(h.popperInstance.destroy(),h.popperInstance=null)}function vt(){var E=h.props.appendTo,R,F=z();h.props.interactive&&E===Hy||E==="parent"?R=F.parentNode:R=zy(E,[F]),R.contains(k)||R.appendChild(k),h.state.isMounted=!0,Qr(),process.env.NODE_ENV!=="production"&&Wt(h.props.interactive&&E===$e.appendTo&&F.nextElementSibling!==k,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
105
105
 
106
106
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
107
107
 
108
108
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
109
109
 
110
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Vt(){return Si(k.querySelectorAll("[data-tippy-root]"))}function Cr(E){h.clearDelayTimeouts(),E&&ee("onTrigger",[h,E]),Oe();var R=Z(!0),z=M(),X=z[0],A=z[1];Pt.isTouch&&X==="hold"&&A&&(R=A),R?o=setTimeout(function(){h.show()},R):h.show()}function mt(E){if(h.clearDelayTimeouts(),ee("onUntrigger",[h,E]),!h.state.isVisible){Ve();return}if(!(h.props.trigger.indexOf("mouseenter")>=0&&h.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(E.type)>=0&&s)){var R=Z(!1);R?n=setTimeout(function(){h.state.isVisible&&h.hide()},R):a=requestAnimationFrame(function(){h.hide()})}}function Er(){h.state.isEnabled=!0}function $r(){h.hide(),h.state.isEnabled=!1}function eo(){clearTimeout(o),clearTimeout(n),cancelAnimationFrame(a)}function to(E){if(process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("setProps")),!h.state.isDestroyed){ee("onBeforeUpdate",[h,E]),Xt();var R=h.props,z=hm(r,Object.assign({},R,pm(E),{ignoreAttributes:!0}));h.props=z,Ye(),R.interactiveDebounce!==z.interactiveDebounce&&(Ke(),g=sm(I,z.interactiveDebounce)),R.triggerTarget&&!z.triggerTarget?Eo(R.triggerTarget).forEach(function(X){X.removeAttribute("aria-expanded")}):z.triggerTarget&&r.removeAttribute("aria-expanded"),Ge(),$(),C&&C(R,z),h.popperInstance&&(Qr(),Vt().forEach(function(X){requestAnimationFrame(X._tippy.popperInstance.forceUpdate)})),ee("onAfterUpdate",[h,E])}}function ro(E){h.setProps({content:E})}function ga(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("show"));var E=h.state.isVisible,R=h.state.isDestroyed,z=!h.state.isEnabled,X=Pt.isTouch&&!h.props.touch,A=Fs(h.props.duration,0,$e.duration);if(!(E||R||z||X)&&!F().hasAttribute("disabled")&&(ee("onShow",[h],!1),h.props.onShow(h)!==!1)){if(h.state.isVisible=!0,D()&&(k.style.visibility="visible"),$(),Oe(),h.state.isMounted||(k.style.transition="none"),D()){var T=Y(),Q=T.box,kt=T.content;qs([Q,kt],0)}b=function(){var Qt;if(!(!h.state.isVisible||d)){if(d=!0,k.offsetHeight,k.style.transition=h.props.moveTransition,D()&&h.props.animation){var ha=Y(),Oo=ha.box,Tr=ha.content;qs([Oo,Tr],A),dm([Oo,Tr],"visible")}G(),Ge(),lm(Js,h),(Qt=h.popperInstance)==null||Qt.forceUpdate(),ee("onMount",[h]),h.props.animation&&D()&&Be(A,function(){h.state.isShown=!0,ee("onShown",[h])})}},vt()}}function xa(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("hide"));var E=!h.state.isVisible,R=h.state.isDestroyed,z=!h.state.isEnabled,X=Fs(h.props.duration,1,$e.duration);if(!(E||R||z)&&(ee("onHide",[h],!1),h.props.onHide(h)!==!1)){if(h.state.isVisible=!1,h.state.isShown=!1,d=!1,s=!1,D()&&(k.style.visibility="hidden"),Ke(),Ve(),$(!0),D()){var A=Y(),T=A.box,Q=A.content;h.props.animation&&(qs([T,Q],X),dm([T,Q],"hidden"))}G(),Ge(),h.props.animation?D()&&yt(X,h.unmount):h.unmount()}}function fa(E){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("hideWithInteractivity")),q().addEventListener("mousemove",g),lm(Ci,g),g(E)}function Il(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("unmount")),h.state.isVisible&&h.hide(),h.state.isMounted&&(Zr(),Vt().forEach(function(E){E._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Js=Js.filter(function(E){return E!==h}),h.state.isMounted=!1,ee("onHidden",[h]))}function Ln(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("destroy")),!h.state.isDestroyed&&(h.clearDelayTimeouts(),h.unmount(),Xt(),delete r._tippy,h.state.isDestroyed=!0,ee("onDestroy",[h]))}}function Mo(r,e){e===void 0&&(e={});var t=$e.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(uS(r),ym(e,t)),pS();var o=Object.assign({},e,{plugins:t}),n=nS(r);if(process.env.NODE_ENV!=="production"){var a=bn(o.content),s=n.length>1;Wt(a&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
110
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Vt(){return Si(k.querySelectorAll("[data-tippy-root]"))}function Cr(E){h.clearDelayTimeouts(),E&&ee("onTrigger",[h,E]),Oe();var R=Z(!0),F=M(),X=F[0],A=F[1];Pt.isTouch&&X==="hold"&&A&&(R=A),R?o=setTimeout(function(){h.show()},R):h.show()}function mt(E){if(h.clearDelayTimeouts(),ee("onUntrigger",[h,E]),!h.state.isVisible){Ve();return}if(!(h.props.trigger.indexOf("mouseenter")>=0&&h.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(E.type)>=0&&s)){var R=Z(!1);R?n=setTimeout(function(){h.state.isVisible&&h.hide()},R):a=requestAnimationFrame(function(){h.hide()})}}function Er(){h.state.isEnabled=!0}function $r(){h.hide(),h.state.isEnabled=!1}function eo(){clearTimeout(o),clearTimeout(n),cancelAnimationFrame(a)}function to(E){if(process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("setProps")),!h.state.isDestroyed){ee("onBeforeUpdate",[h,E]),Xt();var R=h.props,F=Zy(r,Object.assign({},R,qy(E),{ignoreAttributes:!0}));h.props=F,Ye(),R.interactiveDebounce!==F.interactiveDebounce&&(Ke(),g=Fy(I,F.interactiveDebounce)),R.triggerTarget&&!F.triggerTarget?Eo(R.triggerTarget).forEach(function(X){X.removeAttribute("aria-expanded")}):F.triggerTarget&&r.removeAttribute("aria-expanded"),Ge(),$(),C&&C(R,F),h.popperInstance&&(Qr(),Vt().forEach(function(X){requestAnimationFrame(X._tippy.popperInstance.forceUpdate)})),ee("onAfterUpdate",[h,E])}}function ro(E){h.setProps({content:E})}function ga(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("show"));var E=h.state.isVisible,R=h.state.isDestroyed,F=!h.state.isEnabled,X=Pt.isTouch&&!h.props.touch,A=Fs(h.props.duration,0,$e.duration);if(!(E||R||F||X)&&!z().hasAttribute("disabled")&&(ee("onShow",[h],!1),h.props.onShow(h)!==!1)){if(h.state.isVisible=!0,D()&&(k.style.visibility="visible"),$(),Oe(),h.state.isMounted||(k.style.transition="none"),D()){var T=Y(),Q=T.box,kt=T.content;qs([Q,kt],0)}b=function(){var Qt;if(!(!h.state.isVisible||d)){if(d=!0,k.offsetHeight,k.style.transition=h.props.moveTransition,D()&&h.props.animation){var ha=Y(),Oo=ha.box,Tr=ha.content;qs([Oo,Tr],A),Wy([Oo,Tr],"visible")}U(),Ge(),jy(Js,h),(Qt=h.popperInstance)==null||Qt.forceUpdate(),ee("onMount",[h]),h.props.animation&&D()&&Be(A,function(){h.state.isShown=!0,ee("onShown",[h])})}},vt()}}function xa(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("hide"));var E=!h.state.isVisible,R=h.state.isDestroyed,F=!h.state.isEnabled,X=Fs(h.props.duration,1,$e.duration);if(!(E||R||F)&&(ee("onHide",[h],!1),h.props.onHide(h)!==!1)){if(h.state.isVisible=!1,h.state.isShown=!1,d=!1,s=!1,D()&&(k.style.visibility="hidden"),Ke(),Ve(),$(!0),D()){var A=Y(),T=A.box,Q=A.content;h.props.animation&&(qs([T,Q],X),Wy([T,Q],"hidden"))}U(),Ge(),h.props.animation?D()&&yt(X,h.unmount):h.unmount()}}function fa(E){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("hideWithInteractivity")),J().addEventListener("mousemove",g),jy(Ci,g),g(E)}function Il(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("unmount")),h.state.isVisible&&h.hide(),h.state.isMounted&&(Zr(),Vt().forEach(function(E){E._tippy.unmount()}),k.parentNode&&k.parentNode.removeChild(k),Js=Js.filter(function(E){return E!==h}),h.state.isMounted=!1,ee("onHidden",[h]))}function Ln(){process.env.NODE_ENV!=="production"&&Wt(h.state.isDestroyed,To("destroy")),!h.state.isDestroyed&&(h.clearDelayTimeouts(),h.unmount(),Xt(),delete r._tippy,h.state.isDestroyed=!0,ee("onDestroy",[h]))}}function Mo(r,e){e===void 0&&(e={});var t=$e.plugins.concat(e.plugins||[]);process.env.NODE_ENV!=="production"&&(SS(r),$y(e,t)),hS();var o=Object.assign({},e,{plugins:t}),n=bS(r);if(process.env.NODE_ENV!=="production"){var a=bn(o.content),s=n.length>1;Wt(a&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
111
111
 
112
112
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
113
113
 
114
114
  `,`1) content: element.innerHTML
115
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=n.reduce(function(p,d){var c=d&&vS(d,o);return c&&p.push(c),p},[]);return bn(r)?l[0]:l}Mo.defaultProps=$e,Mo.setDefaultProps=fS,Mo.currentInput=Pt,Object.assign({},zc,{effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow)}}),Mo.setDefaultProps({render:km});class kS{constructor({editor:e,element:t,view:o,tippyOptions:n={},updateDelay:a=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:l,state:p,from:d,to:c})=>{const{doc:m,selection:b}=p,{empty:u}=b,g=!m.textBetween(d,c).length&&ks(p.selection),f=this.element.contains(document.activeElement);return!(!(l.hasFocus()||f)||u||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var p;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((p=this.element.parentNode)===null||p===void 0)&&p.contains(l.relatedTarget))||(l==null?void 0:l.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,p)=>{const d=!(p!=null&&p.selection.eq(l.state.selection)),c=!(p!=null&&p.doc.eq(l.state.doc));!d&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,d,c,p)},this.updateDelay))},this.updateHandler=(l,p,d,c)=>{var m,b,u;const{state:g,composing:f}=l,{selection:x}=g;if(f||!p&&!d)return;this.createTooltip();const{ranges:w}=x,v=Math.min(...w.map(k=>k.$from.pos)),h=Math.max(...w.map(k=>k.$to.pos));if(!((m=this.shouldShow)===null||m===void 0?void 0:m.call(this,{editor:this.editor,element:this.element,view:l,state:g,oldState:c,from:v,to:h}))){this.hide();return}(b=this.tippy)===null||b===void 0||b.setProps({getReferenceClientRect:((u=this.tippyOptions)===null||u===void 0?void 0:u.getReferenceClientRect)||(()=>{if(Oc(g.selection)){let k=l.nodeDOM(v);if(k){const C=k.dataset.nodeViewWrapper?k:k.querySelector("[data-node-view-wrapper]");if(C&&(k=C.firstChild),k)return k.getBoundingClientRect()}}return Vc(l,v,h)})}),this.show()},this.editor=e,this.element=t,this.view=o,this.updateDelay=a,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=n,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.element.tabIndex=0,!(this.tippy||!t)&&(this.tippy=Mo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:o}=e,n=o.selection.from!==o.selection.to;if(this.updateDelay>0&&n){this.handleDebouncedUpdate(e,t);return}const a=!(t!=null&&t.selection.eq(e.state.selection)),s=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,a,s,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Sm=r=>new me({key:typeof r.pluginKey=="string"?new Ie(r.pluginKey):r.pluginKey,view:e=>new kS({view:e,...r})});Me.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Sm({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class SS{getTextContent(e){return Dc(e,{textSerializers:ws(this.editor.schema)})}constructor({editor:e,element:t,view:o,tippyOptions:n={},shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:s,state:l})=>{const{selection:p}=l,{$anchor:d,empty:c}=p,m=d.depth===1,b=d.parent.isTextblock&&!d.parent.type.spec.code&&!d.parent.textContent&&d.parent.childCount===0&&!this.getTextContent(d.parent);return!(!s.hasFocus()||!c||!m||!b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(s.relatedTarget))||(s==null?void 0:s.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=o,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=n,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.element.tabIndex=0,!(this.tippy||!t)&&(this.tippy=Mo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var o,n,a;const{state:s}=e,{doc:l,selection:p}=s,{from:d,to:c}=p;if(t&&t.doc.eq(l)&&t.selection.eq(p))return;if(this.createTooltip(),!((o=this.shouldShow)===null||o===void 0?void 0:o.call(this,{editor:this.editor,view:e,state:s,oldState:t}))){this.hide();return}(n=this.tippy)===null||n===void 0||n.setProps({getReferenceClientRect:((a=this.tippyOptions)===null||a===void 0?void 0:a.getReferenceClientRect)||(()=>Vc(e,d,c))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Cm=r=>new me({key:typeof r.pluginKey=="string"?new Ie(r.pluginKey):r.pluginKey,view:e=>new SS({view:e,...r})});Me.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Cm({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),i.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const t=i.ref(null);return i.onMounted(()=>{const{updateDelay:o,editor:n,pluginKey:a,shouldShow:s,tippyOptions:l}=r;n.registerPlugin(Sm({updateDelay:o,editor:n,element:t.value,pluginKey:a,shouldShow:s,tippyOptions:l}))}),i.onBeforeUnmount(()=>{const{pluginKey:o,editor:n}=r;n.unregisterPlugin(o)}),()=>{var o;return i.h("div",{ref:t},(o=e.default)===null||o===void 0?void 0:o.call(e))}}});function Em(r){return i.customRef((e,t)=>({get(){return e(),r},set(o){r=o,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class CS extends z3{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=Em(this.view.state),this.reactiveExtensionStorage=Em(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),i.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const o=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=o),o}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}}i.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(r){const e=i.ref(),t=i.getCurrentInstance();return i.watchEffect(()=>{const o=r.editor;o&&o.options.element&&e.value&&i.nextTick(()=>{if(!e.value||!o.options.element.firstChild)return;const n=i.unref(e.value);e.value.append(...o.options.element.childNodes),o.contentComponent=t.ctx._,t&&(o.appContext={...t.appContext,provides:t.provides}),o.setOptions({element:n}),o.createNodeViews()})}),i.onBeforeUnmount(()=>{const o=r.editor;o&&(o.contentComponent=null,o.appContext=null)}),{rootEl:e}},render(){return i.h("div",{ref:r=>{this.rootEl=r}})}}),i.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const t=i.ref(null);return i.onMounted(()=>{const{pluginKey:o,editor:n,tippyOptions:a,shouldShow:s}=r;n.registerPlugin(Cm({pluginKey:o,editor:n,element:t.value,tippyOptions:a,shouldShow:s}))}),i.onBeforeUnmount(()=>{const{pluginKey:o,editor:n}=r;n.unregisterPlugin(o)}),()=>{var o;return i.h("div",{ref:t},(o=e.default)===null||o===void 0?void 0:o.call(e))}}}),i.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return i.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),i.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,e;return i.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(r=this.$slots).default)===null||e===void 0?void 0:e.call(r))}});const ES=(r={})=>{const e=i.shallowRef();return i.onMounted(()=>{e.value=new CS(r)}),i.onBeforeUnmount(()=>{var t,o,n;const a=(t=e.value)===null||t===void 0?void 0:t.options.element,s=a==null?void 0:a.cloneNode(!0);(o=a==null?void 0:a.parentNode)===null||o===void 0||o.replaceChild(s,a),(n=e.value)===null||n===void 0||n.destroy()}),e},TS=/^\s*>\s$/,MS=ut.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:r}){return["blockquote",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setBlockquote:()=>({commands:r})=>r.wrapIn(this.name),toggleBlockquote:()=>({commands:r})=>r.toggleWrap(this.name),unsetBlockquote:()=>({commands:r})=>r.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[on({find:TS,type:this.type})]}}),BS=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,NS=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,PS=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,DS=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,LS=Ft.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:r=>r.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:r=>r.type.name===this.name},{style:"font-weight",getAttrs:r=>/^(bold(er)?|[5-9]\d{2,})$/.test(r)&&null}]},renderHTML({HTMLAttributes:r}){return["strong",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setBold:()=>({commands:r})=>r.setMark(this.name),toggleBold:()=>({commands:r})=>r.toggleMark(this.name),unsetBold:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[wo({find:BS,type:this.type}),wo({find:PS,type:this.type})]},addPasteRules(){return[Fr({find:NS,type:this.type}),Fr({find:DS,type:this.type})]}}),AS="listItem",Tm="textStyle",Mm=/^\s*([-+*])\s$/,OS=ut.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:r}){return["ul",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleBulletList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(AS,this.editor.getAttributes(Tm)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let r=on({find:Mm,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(r=on({find:Mm,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(Tm),editor:this.editor})),[r]}}),VS=/(^|[^`])`([^`]+)`(?!`)/,IS=/(^|[^`])`([^`]+)`(?!`)/g,_S=Ft.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:r}){return["code",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setCode:()=>({commands:r})=>r.setMark(this.name),toggleCode:()=>({commands:r})=>r.toggleMark(this.name),unsetCode:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[wo({find:VS,type:this.type})]},addPasteRules(){return[Fr({find:IS,type:this.type})]}}),RS=/^```([a-z]+)?[\s\n]$/,HS=/^~~~([a-z]+)?[\s\n]$/,zS=ut.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:r=>{var e;const{languageClassPrefix:t}=this.options,a=[...((e=r.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:r,HTMLAttributes:e}){return["pre",Te(this.options.HTMLAttributes,e),["code",{class:r.attrs.language?this.options.languageClassPrefix+r.attrs.language:null},0]]},addCommands(){return{setCodeBlock:r=>({commands:e})=>e.setNode(this.name,r),toggleCodeBlock:r=>({commands:e})=>e.toggleNode(this.name,"paragraph",r)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:r,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!r||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:r})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=r,{selection:t}=e,{$from:o,empty:n}=t;if(!n||o.parent.type!==this.type)return!1;const a=o.parentOffset===o.parent.nodeSize-2,s=o.parent.textContent.endsWith(`
115
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var l=n.reduce(function(p,d){var c=d&&PS(d,o);return c&&p.push(c),p},[]);return bn(r)?l[0]:l}Mo.defaultProps=$e,Mo.setDefaultProps=TS,Mo.currentInput=Pt,Object.assign({},wy,{effect:function(e){var t=e.state,o={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,o.popper),t.styles=o,t.elements.arrow&&Object.assign(t.elements.arrow.style,o.arrow)}}),Mo.setDefaultProps({render:r0});class DS{constructor({editor:e,element:t,view:o,tippyOptions:n={},updateDelay:a=250,shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:l,state:p,from:d,to:c})=>{const{doc:m,selection:b}=p,{empty:u}=b,g=!m.textBetween(d,c).length&&ks(p.selection),f=this.element.contains(document.activeElement);return!(!(l.hasFocus()||f)||u||g||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var p;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((p=this.element.parentNode)===null||p===void 0)&&p.contains(l.relatedTarget))||(l==null?void 0:l.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,p)=>{const d=!(p!=null&&p.selection.eq(l.state.selection)),c=!(p!=null&&p.doc.eq(l.state.doc));!d&&!c||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,d,c,p)},this.updateDelay))},this.updateHandler=(l,p,d,c)=>{var m,b,u;const{state:g,composing:f}=l,{selection:x}=g;if(f||!p&&!d)return;this.createTooltip();const{ranges:w}=x,v=Math.min(...w.map(k=>k.$from.pos)),h=Math.max(...w.map(k=>k.$to.pos));if(!((m=this.shouldShow)===null||m===void 0?void 0:m.call(this,{editor:this.editor,element:this.element,view:l,state:g,oldState:c,from:v,to:h}))){this.hide();return}(b=this.tippy)===null||b===void 0||b.setProps({getReferenceClientRect:((u=this.tippyOptions)===null||u===void 0?void 0:u.getReferenceClientRect)||(()=>{if(uy(g.selection)){let k=l.nodeDOM(v);if(k){const C=k.dataset.nodeViewWrapper?k:k.querySelector("[data-node-view-wrapper]");if(C&&(k=C.firstChild),k)return k.getBoundingClientRect()}}return gy(l,v,h)})}),this.show()},this.editor=e,this.element=t,this.view=o,this.updateDelay=a,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=n,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.element.tabIndex=0,!(this.tippy||!t)&&(this.tippy=Mo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:o}=e,n=o.selection.from!==o.selection.to;if(this.updateDelay>0&&n){this.handleDebouncedUpdate(e,t);return}const a=!(t!=null&&t.selection.eq(e.state.selection)),s=!(t!=null&&t.doc.eq(e.state.doc));this.updateHandler(e,a,s,t)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const o0=r=>new me({key:typeof r.pluginKey=="string"?new Ie(r.pluginKey):r.pluginKey,view:e=>new DS({view:e,...r})});Me.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[o0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class LS{getTextContent(e){return cy(e,{textSerializers:ws(this.editor.schema)})}constructor({editor:e,element:t,view:o,tippyOptions:n={},shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:s,state:l})=>{const{selection:p}=l,{$anchor:d,empty:c}=p,m=d.depth===1,b=d.parent.isTextblock&&!d.parent.type.spec.code&&!d.parent.textContent&&d.parent.childCount===0&&!this.getTextContent(d.parent);return!(!s.hasFocus()||!c||!m||!b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:s})=>{var l;if(this.preventHide){this.preventHide=!1;return}s!=null&&s.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(s.relatedTarget))||(s==null?void 0:s.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=s=>{this.blurHandler({event:s})},this.editor=e,this.element=t,this.view=o,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=n,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;this.element.tabIndex=0,!(this.tippy||!t)&&(this.tippy=Mo(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var o,n,a;const{state:s}=e,{doc:l,selection:p}=s,{from:d,to:c}=p;if(t&&t.doc.eq(l)&&t.selection.eq(p))return;if(this.createTooltip(),!((o=this.shouldShow)===null||o===void 0?void 0:o.call(this,{editor:this.editor,view:e,state:s,oldState:t}))){this.hide();return}(n=this.tippy)===null||n===void 0||n.setProps({getReferenceClientRect:((a=this.tippyOptions)===null||a===void 0?void 0:a.getReferenceClientRect)||(()=>gy(e,d,c))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,t;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(t=this.tippy)===null||t===void 0||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const n0=r=>new me({key:typeof r.pluginKey=="string"?new Ie(r.pluginKey):r.pluginKey,view:e=>new LS({view:e,...r})});Me.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[n0({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}}),i.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const t=i.ref(null);return i.onMounted(()=>{const{updateDelay:o,editor:n,pluginKey:a,shouldShow:s,tippyOptions:l}=r;n.registerPlugin(o0({updateDelay:o,editor:n,element:t.value,pluginKey:a,shouldShow:s,tippyOptions:l}))}),i.onBeforeUnmount(()=>{const{pluginKey:o,editor:n}=r;n.unregisterPlugin(o)}),()=>{var o;return i.h("div",{ref:t},(o=e.default)===null||o===void 0?void 0:o.call(e))}}});function i0(r){return i.customRef((e,t)=>({get(){return e(),r},set(o){r=o,requestAnimationFrame(()=>{requestAnimationFrame(()=>{t()})})}}))}class AS extends Y3{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=i0(this.view.state),this.reactiveExtensionStorage=i0(this.extensionStorage),this.on("beforeTransaction",({nextState:t})=>{this.reactiveState.value=t,this.reactiveExtensionStorage.value=this.extensionStorage}),i.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){const o=super.registerPlugin(e,t);return this.reactiveState&&(this.reactiveState.value=o),o}unregisterPlugin(e){const t=super.unregisterPlugin(e);return this.reactiveState&&t&&(this.reactiveState.value=t),t}}const OS=i.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(r){const e=i.ref(),t=i.getCurrentInstance();return i.watchEffect(()=>{const o=r.editor;o&&o.options.element&&e.value&&i.nextTick(()=>{if(!e.value||!o.options.element.firstChild)return;const n=i.unref(e.value);e.value.append(...o.options.element.childNodes),o.contentComponent=t.ctx._,t&&(o.appContext={...t.appContext,provides:t.provides}),o.setOptions({element:n}),o.createNodeViews()})}),i.onBeforeUnmount(()=>{const o=r.editor;o&&(o.contentComponent=null,o.appContext=null)}),{rootEl:e}},render(){return i.h("div",{ref:r=>{this.rootEl=r}})}});i.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(r,{slots:e}){const t=i.ref(null);return i.onMounted(()=>{const{pluginKey:o,editor:n,tippyOptions:a,shouldShow:s}=r;n.registerPlugin(n0({pluginKey:o,editor:n,element:t.value,tippyOptions:a,shouldShow:s}))}),i.onBeforeUnmount(()=>{const{pluginKey:o,editor:n}=r;n.unregisterPlugin(o)}),()=>{var o;return i.h("div",{ref:t},(o=e.default)===null||o===void 0?void 0:o.call(e))}}}),i.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return i.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),i.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var r,e;return i.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(r=this.$slots).default)===null||e===void 0?void 0:e.call(r))}});const VS=(r={})=>{const e=i.shallowRef();return i.onMounted(()=>{e.value=new AS(r)}),i.onBeforeUnmount(()=>{var t,o,n;const a=(t=e.value)===null||t===void 0?void 0:t.options.element,s=a==null?void 0:a.cloneNode(!0);(o=a==null?void 0:a.parentNode)===null||o===void 0||o.replaceChild(s,a),(n=e.value)===null||n===void 0||n.destroy()}),e},IS=/^\s*>\s$/,_S=ut.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:r}){return["blockquote",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setBlockquote:()=>({commands:r})=>r.wrapIn(this.name),toggleBlockquote:()=>({commands:r})=>r.toggleWrap(this.name),unsetBlockquote:()=>({commands:r})=>r.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[on({find:IS,type:this.type})]}}),RS=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,HS=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,zS=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,FS=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,jS=Ft.create({name:"bold",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"strong"},{tag:"b",getAttrs:r=>r.style.fontWeight!=="normal"&&null},{style:"font-weight=400",clearMark:r=>r.type.name===this.name},{style:"font-weight",getAttrs:r=>/^(bold(er)?|[5-9]\d{2,})$/.test(r)&&null}]},renderHTML({HTMLAttributes:r}){return["strong",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setBold:()=>({commands:r})=>r.setMark(this.name),toggleBold:()=>({commands:r})=>r.toggleMark(this.name),unsetBold:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[wo({find:RS,type:this.type}),wo({find:zS,type:this.type})]},addPasteRules(){return[Fr({find:HS,type:this.type}),Fr({find:FS,type:this.type})]}}),qS="listItem",a0="textStyle",s0=/^\s*([-+*])\s$/,WS=ut.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:r}){return["ul",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleBulletList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(qS,this.editor.getAttributes(a0)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let r=on({find:s0,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(r=on({find:s0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(a0),editor:this.editor})),[r]}}),US=/(^|[^`])`([^`]+)`(?!`)/,GS=/(^|[^`])`([^`]+)`(?!`)/g,KS=Ft.create({name:"code",addOptions(){return{HTMLAttributes:{}}},excludes:"_",code:!0,exitable:!0,parseHTML(){return[{tag:"code"}]},renderHTML({HTMLAttributes:r}){return["code",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setCode:()=>({commands:r})=>r.setMark(this.name),toggleCode:()=>({commands:r})=>r.toggleMark(this.name),unsetCode:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[wo({find:US,type:this.type})]},addPasteRules(){return[Fr({find:GS,type:this.type})]}}),JS=/^```([a-z]+)?[\s\n]$/,YS=/^~~~([a-z]+)?[\s\n]$/,XS=ut.create({name:"codeBlock",addOptions(){return{languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,defaultLanguage:null,HTMLAttributes:{}}},content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:r=>{var e;const{languageClassPrefix:t}=this.options,a=[...((e=r.firstElementChild)===null||e===void 0?void 0:e.classList)||[]].filter(s=>s.startsWith(t)).map(s=>s.replace(t,""))[0];return a||null},rendered:!1}}},parseHTML(){return[{tag:"pre",preserveWhitespace:"full"}]},renderHTML({node:r,HTMLAttributes:e}){return["pre",Te(this.options.HTMLAttributes,e),["code",{class:r.attrs.language?this.options.languageClassPrefix+r.attrs.language:null},0]]},addCommands(){return{setCodeBlock:r=>({commands:e})=>e.setNode(this.name,r),toggleCodeBlock:r=>({commands:e})=>e.toggleNode(this.name,"paragraph",r)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:r,$anchor:e}=this.editor.state.selection,t=e.pos===1;return!r||e.parent.type.name!==this.name?!1:t||!e.parent.textContent.length?this.editor.commands.clearNodes():!1},Enter:({editor:r})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:e}=r,{selection:t}=e,{$from:o,empty:n}=t;if(!n||o.parent.type!==this.type)return!1;const a=o.parentOffset===o.parent.nodeSize-2,s=o.parent.textContent.endsWith(`
116
116
 
117
- `);return!a||!s?!1:r.chain().command(({tr:l})=>(l.delete(o.pos-2,o.pos),!0)).exitCode().run()},ArrowDown:({editor:r})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=r,{selection:t,doc:o}=e,{$from:n,empty:a}=t;if(!a||n.parent.type!==this.type||!(n.parentOffset===n.parent.nodeSize-2))return!1;const l=n.after();return l===void 0?!1:o.nodeAt(l)?r.commands.command(({tr:d})=>(d.setSelection(W.near(o.resolve(l))),!0)):r.commands.exitCode()}}},addInputRules(){return[Ds({find:RS,type:this.type,getAttributes:r=>({language:r[1]})}),Ds({find:HS,type:this.type,getAttributes:r=>({language:r[1]})})]},addProseMirrorPlugins(){return[new me({key:new Ie("codeBlockVSCodeHandler"),props:{handlePaste:(r,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),o=e.clipboardData.getData("vscode-editor-data"),n=o?JSON.parse(o):void 0,a=n==null?void 0:n.mode;if(!t||!a)return!1;const{tr:s,schema:l}=r.state,p=l.text(t.replace(/\r\n?/g,`
118
- `));return s.replaceSelectionWith(this.type.create({language:a},p)),s.selection.$from.parent.type!==this.type&&s.setSelection(j.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),r.dispatch(s),!0}}})]}}),FS=ut.create({name:"doc",topNode:!0,content:"block+"});function jS(r={}){return new me({view(e){return new qS(e,r)}})}class qS{constructor(e,t){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=t.width)!==null&&o!==void 0?o:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(n=>{let a=s=>{this[n](s)};return e.dom.addEventListener(n,a),{name:n,handler:a}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.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),t=!e.parent.inlineContent,o,n=this.editorView.dom,a=n.getBoundingClientRect(),s=a.width/n.offsetWidth,l=a.height/n.offsetHeight;if(t){let m=e.nodeBefore,b=e.nodeAfter;if(m||b){let u=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(u){let g=u.getBoundingClientRect(),f=m?g.bottom:g.top;m&&b&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*l;o={left:g.left,right:g.right,top:f-x,bottom:f+x}}}}if(!o){let m=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*s;o={left:m.left-b,right:m.left+b,top:m.top,bottom:m.bottom}}let p=this.editorView.dom.offsetParent;this.element||(this.element=p.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",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let d,c;if(!p||p==document.body&&getComputedStyle(p).position=="static")d=-pageXOffset,c=-pageYOffset;else{let m=p.getBoundingClientRect(),b=m.width/p.offsetWidth,u=m.height/p.offsetHeight;d=m.left-p.scrollLeft*b,c=m.top-p.scrollTop*u}this.element.style.left=(o.left-d)/s+"px",this.element.style.top=(o.top-c)/l+"px",this.element.style.width=(o.right-o.left)/s+"px",this.element.style.height=(o.bottom-o.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),n=o&&o.type.spec.disableDropCursor,a=typeof n=="function"?n(this.editorView,t,e):n;if(t&&!a){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=Dp(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)}}const WS=Me.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[jS(this.options)]}});class ae extends W{constructor(e){super(e,e)}map(e,t){let o=e.resolve(t.map(this.head));return ae.valid(o)?new ae(o):W.near(o)}content(){return O.empty}eq(e){return e instanceof ae&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ae(e.resolve(t.pos))}getBookmark(){return new Ys(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!US(e)||!GS(e))return!1;let o=t.type.spec.allowGapCursor;if(o!=null)return o;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t,o=!1){e:for(;;){if(!o&&ae.valid(e))return e;let n=e.pos,a=null;for(let s=e.depth;;s--){let l=e.node(s);if(t>0?e.indexAfter(s)<l.childCount:e.index(s)>0){a=l.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;n+=t;let p=e.doc.resolve(n);if(ae.valid(p))return p}for(;;){let s=t>0?a.firstChild:a.lastChild;if(!s){if(a.isAtom&&!a.isText&&!H.isSelectable(a)){e=e.doc.resolve(n+a.nodeSize*t),o=!1;continue e}break}a=s,n+=t;let l=e.doc.resolve(n);if(ae.valid(l))return l}return null}}}ae.prototype.visible=!1,ae.findFrom=ae.findGapCursorFrom,W.jsonID("gapcursor",ae);class Ys{constructor(e){this.pos=e}map(e){return new Ys(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ae.valid(t)?new ae(t):W.near(t)}}function US(r){for(let e=r.depth;e>=0;e--){let t=r.index(e),o=r.node(e);if(t==0){if(o.type.spec.isolating)return!0;continue}for(let n=o.child(t-1);;n=n.lastChild){if(n.childCount==0&&!n.inlineContent||n.isAtom||n.type.spec.isolating)return!0;if(n.inlineContent)return!1}}return!0}function GS(r){for(let e=r.depth;e>=0;e--){let t=r.indexAfter(e),o=r.node(e);if(t==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let n=o.child(t);;n=n.firstChild){if(n.childCount==0&&!n.inlineContent||n.isAtom||n.type.spec.isolating)return!0;if(n.inlineContent)return!1}}return!0}function KS(){return new me({props:{decorations:QS,createSelectionBetween(r,e,t){return e.pos==t.pos&&ae.valid(t)?new ae(t):null},handleClick:YS,handleKeyDown:JS,handleDOMEvents:{beforeinput:XS}}})}const JS=nc({ArrowLeft:Ei("horiz",-1),ArrowRight:Ei("horiz",1),ArrowUp:Ei("vert",-1),ArrowDown:Ei("vert",1)});function Ei(r,e){const t=r=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,n,a){let s=o.selection,l=e>0?s.$to:s.$from,p=s.empty;if(s instanceof j){if(!a.endOfTextblock(t)||l.depth==0)return!1;p=!1,l=o.doc.resolve(e>0?l.after():l.before())}let d=ae.findGapCursorFrom(l,e,p);return d?(n&&n(o.tr.setSelection(new ae(d))),!0):!1}}function YS(r,e,t){if(!r||!r.editable)return!1;let o=r.state.doc.resolve(e);if(!ae.valid(o))return!1;let n=r.posAtCoords({left:t.clientX,top:t.clientY});return n&&n.inside>-1&&H.isSelectable(r.state.doc.nodeAt(n.inside))?!1:(r.dispatch(r.state.tr.setSelection(new ae(o))),!0)}function XS(r,e){if(e.inputType!="insertCompositionText"||!(r.state.selection instanceof ae))return!1;let{$from:t}=r.state.selection,o=t.parent.contentMatchAt(t.index()).findWrapping(r.state.schema.nodes.text);if(!o)return!1;let n=N.empty;for(let s=o.length-1;s>=0;s--)n=N.from(o[s].createAndFill(null,n));let a=r.state.tr.replace(t.pos,t.pos,new O(n,0,0));return a.setSelection(j.near(a.doc.resolve(t.pos+1))),r.dispatch(a),!1}function QS(r){if(!(r.selection instanceof ae))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",be.create(r.doc,[nt.widget(r.selection.head,e,{key:"gapcursor"})])}const ZS=Me.create({name:"gapCursor",addProseMirrorPlugins(){return[KS()]},extendNodeSchema(r){var e;const t={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:(e=K(_(r,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),$S=ut.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:r}){return["br",Te(this.options.HTMLAttributes,r)]},renderText(){return`
119
- `},addCommands(){return{setHardBreak:()=>({commands:r,chain:e,state:t,editor:o})=>r.first([()=>r.exitCode(),()=>r.command(()=>{const{selection:n,storedMarks:a}=t;if(n.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=o.extensionManager,p=a||n.$to.parentOffset&&n.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:c})=>{if(c&&p&&s){const m=p.filter(b=>l.includes(b.type.name));d.ensureMarks(m)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),e4=ut.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(r=>({tag:`h${r}`,attrs:{level:r}}))},renderHTML({node:r,HTMLAttributes:e}){return[`h${this.options.levels.includes(r.attrs.level)?r.attrs.level:this.options.levels[0]}`,Te(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.setNode(this.name,r):!1,toggleHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.toggleNode(this.name,"paragraph",r):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((r,e)=>({...r,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(r=>Ds({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${r}})\\s$`),type:this.type,getAttributes:{level:r}}))}});var Ti=200,ye=function(){};ye.prototype.append=function(e){return e.length?(e=ye.from(e),!this.length&&e||e.length<Ti&&this.leafAppend(e)||this.length<Ti&&e.leafPrepend(this)||this.appendInner(e)):this},ye.prototype.prepend=function(e){return e.length?ye.from(e).append(this):this},ye.prototype.appendInner=function(e){return new t4(this,e)},ye.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?ye.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},ye.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},ye.prototype.forEach=function(e,t,o){t===void 0&&(t=0),o===void 0&&(o=this.length),t<=o?this.forEachInner(e,t,o,0):this.forEachInvertedInner(e,t,o,0)},ye.prototype.map=function(e,t,o){t===void 0&&(t=0),o===void 0&&(o=this.length);var n=[];return this.forEach(function(a,s){return n.push(e(a,s))},t,o),n},ye.from=function(e){return e instanceof ye?e:e&&e.length?new Bm(e):ye.empty};var Bm=function(r){function e(o){r.call(this),this.values=o}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(n,a){return n==0&&a==this.length?this:new e(this.values.slice(n,a))},e.prototype.getInner=function(n){return this.values[n]},e.prototype.forEachInner=function(n,a,s,l){for(var p=a;p<s;p++)if(n(this.values[p],l+p)===!1)return!1},e.prototype.forEachInvertedInner=function(n,a,s,l){for(var p=a-1;p>=s;p--)if(n(this.values[p],l+p)===!1)return!1},e.prototype.leafAppend=function(n){if(this.length+n.length<=Ti)return new e(this.values.concat(n.flatten()))},e.prototype.leafPrepend=function(n){if(this.length+n.length<=Ti)return new e(n.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(ye);ye.empty=new Bm([]);var t4=function(r){function e(t,o){r.call(this),this.left=t,this.right=o,this.length=t.length+o.length,this.depth=Math.max(t.depth,o.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(o){return o<this.left.length?this.left.get(o):this.right.get(o-this.left.length)},e.prototype.forEachInner=function(o,n,a,s){var l=this.left.length;if(n<l&&this.left.forEachInner(o,n,Math.min(a,l),s)===!1||a>l&&this.right.forEachInner(o,Math.max(n-l,0),Math.min(this.length,a)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,n,a,s){var l=this.left.length;if(n>l&&this.right.forEachInvertedInner(o,n-l,Math.max(a,l)-l,s+l)===!1||a<l&&this.left.forEachInvertedInner(o,Math.min(n,l),a,s)===!1)return!1},e.prototype.sliceInner=function(o,n){if(o==0&&n==this.length)return this;var a=this.left.length;return n<=a?this.left.slice(o,n):o>=a?this.right.slice(o-a,n-a):this.left.slice(o,a).append(this.right.slice(0,n-a))},e.prototype.leafAppend=function(o){var n=this.right.leafAppend(o);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(o){var n=this.left.leafPrepend(o);if(n)return new e(n,this.right)},e.prototype.appendInner=function(o){return this.left.depth>=Math.max(this.right.depth,o.depth)+1?new e(this.left,new e(this.right,o)):new e(this,o)},e}(ye);const r4=500;class gt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let n,a;t&&(n=this.remapping(o,this.items.length),a=n.maps.length);let s=e.tr,l,p,d=[],c=[];return this.items.forEach((m,b)=>{if(!m.step){n||(n=this.remapping(o,b+1),a=n.maps.length),a--,c.push(m);return}if(n){c.push(new Dt(m.map));let u=m.step.map(n.slice(a)),g;u&&s.maybeStep(u).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],d.push(new Dt(g,void 0,void 0,d.length+c.length))),a--,g&&n.appendMap(g,a)}else s.maybeStep(m.step);if(m.selection)return l=n?m.selection.map(n.slice(a)):m.selection,p=new gt(this.items.slice(0,o).append(c.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:s,selection:l}}addTransform(e,t,o,n){let a=[],s=this.eventCount,l=this.items,p=!n&&l.length?l.get(l.length-1):null;for(let c=0;c<e.steps.length;c++){let m=e.steps[c].invert(e.docs[c]),b=new Dt(e.mapping.maps[c],m,t),u;(u=p&&p.merge(b))&&(b=u,c?a.pop():l=l.slice(0,l.length-1)),a.push(b),t&&(s++,t=void 0),n||(p=b)}let d=s-o.depth;return d>n4&&(l=o4(l,d),s-=d),new gt(l.append(a),s)}remapping(e,t){let o=new Fo;return this.items.forEach((n,a)=>{let s=n.mirrorOffset!=null&&a-n.mirrorOffset>=e?o.maps.length-n.mirrorOffset:void 0;o.appendMap(n.map,s)},e,t),o}addMaps(e){return this.eventCount==0?this:new gt(this.items.append(e.map(t=>new Dt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let o=[],n=Math.max(0,this.items.length-t),a=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(b=>{b.selection&&l--},n);let p=t;this.items.forEach(b=>{let u=a.getMirror(--p);if(u==null)return;s=Math.min(s,u);let g=a.maps[u];if(b.step){let f=e.steps[u].invert(e.docs[u]),x=b.selection&&b.selection.map(a.slice(p+1,u));x&&l++,o.push(new Dt(g,f,x))}else o.push(new Dt(g))},n);let d=[];for(let b=t;b<s;b++)d.push(new Dt(a.maps[b]));let c=this.items.slice(0,n).append(d).append(o),m=new gt(c,l);return m.emptyItemCount()>r4&&(m=m.compress(this.items.length-o.length)),m}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),o=t.maps.length,n=[],a=0;return this.items.forEach((s,l)=>{if(l>=e)n.push(s),s.selection&&a++;else if(s.step){let p=s.step.map(t.slice(o)),d=p&&p.getMap();if(o--,d&&t.appendMap(d,o),p){let c=s.selection&&s.selection.map(t.slice(o));c&&a++;let m=new Dt(d.invert(),p,c),b,u=n.length-1;(b=n.length&&n[u].merge(m))?n[u]=b:n.push(m)}}else s.map&&o--},this.items.length,0),new gt(ye.from(n.reverse()),a)}}gt.empty=new gt(ye.empty,0);function o4(r,e){let t;return r.forEach((o,n)=>{if(o.selection&&e--==0)return t=n,!1}),r.slice(t)}class Dt{constructor(e,t,o,n){this.map=e,this.step=t,this.selection=o,this.mirrorOffset=n}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Dt(t.getMap().invert(),t,this.selection)}}}class xr{constructor(e,t,o,n,a){this.done=e,this.undone=t,this.prevRanges=o,this.prevTime=n,this.prevComposition=a}}const n4=20;function i4(r,e,t,o){let n=t.getMeta(Ur),a;if(n)return n.historyState;t.getMeta(l4)&&(r=new xr(r.done,r.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(s&&s.getMeta(Ur))return s.getMeta(Ur).redo?new xr(r.done.addTransform(t,void 0,o,Mi(e)),r.undone,Nm(t.mapping.maps),r.prevTime,r.prevComposition):new xr(r.done,r.undone.addTransform(t,void 0,o,Mi(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),p=r.prevTime==0||!s&&r.prevComposition!=l&&(r.prevTime<(t.time||0)-o.newGroupDelay||!a4(t,r.prevRanges)),d=s?Xs(r.prevRanges,t.mapping):Nm(t.mapping.maps);return new xr(r.done.addTransform(t,p?e.selection.getBookmark():void 0,o,Mi(e)),gt.empty,d,t.time,l??r.prevComposition)}else return(a=t.getMeta("rebased"))?new xr(r.done.rebased(t,a),r.undone.rebased(t,a),Xs(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new xr(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),Xs(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function a4(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((o,n)=>{for(let a=0;a<e.length;a+=2)o<=e[a+1]&&n>=e[a]&&(t=!0)}),t}function Nm(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((o,n,a,s)=>e.push(a,s));return e}function Xs(r,e){if(!r)return null;let t=[];for(let o=0;o<r.length;o+=2){let n=e.map(r[o],1),a=e.map(r[o+1],-1);n<=a&&t.push(n,a)}return t}function s4(r,e,t){let o=Mi(e),n=Ur.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,o);if(!a)return null;let s=a.selection.resolve(a.transform.doc),l=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),n,o),p=new xr(t?l:a.remaining,t?a.remaining:l,null,0,-1);return a.transform.setSelection(s).setMeta(Ur,{redo:t,historyState:p})}let Qs=!1,Pm=null;function Mi(r){let e=r.plugins;if(Pm!=e){Qs=!1,Pm=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Qs=!0;break}}return Qs}const Ur=new Ie("history"),l4=new Ie("closeHistory");function p4(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new me({key:Ur,state:{init(){return new xr(gt.empty,gt.empty,null,0,-1)},apply(e,t,o){return i4(t,o,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let o=t.inputType,n=o=="historyUndo"?Lm:o=="historyRedo"?Am:null;return n?(t.preventDefault(),n(e.state,e.dispatch)):!1}}}})}function Dm(r,e){return(t,o)=>{let n=Ur.getState(t);if(!n||(r?n.undone:n.done).eventCount==0)return!1;if(o){let a=s4(n,t,r);a&&o(e?a.scrollIntoView():a)}return!0}}const Lm=Dm(!1,!0),Am=Dm(!0,!0),d4=Me.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:r,dispatch:e})=>Lm(r,e),redo:()=>({state:r,dispatch:e})=>Am(r,e)}},addProseMirrorPlugins(){return[p4(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()}}}),c4=ut.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:r}){return["hr",Te(this.options.HTMLAttributes,r)]},addCommands(){return{setHorizontalRule:()=>({chain:r,state:e})=>{if(!j3(e,e.schema.nodes[this.name]))return!1;const{selection:t}=e,{$from:o,$to:n}=t,a=r();return o.parentOffset===0?a.insertContentAt({from:Math.max(o.pos-1,0),to:n.pos},{type:this.name}):Oc(t)?a.insertContentAt(n.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:s,dispatch:l})=>{var p;if(l){const{$to:d}=s.selection,c=d.end();if(d.nodeAfter)d.nodeAfter.isTextblock?s.setSelection(j.create(s.doc,d.pos+1)):d.nodeAfter.isBlock?s.setSelection(H.create(s.doc,d.pos)):s.setSelection(j.create(s.doc,d.pos));else{const m=(p=d.parent.type.contentMatch.defaultType)===null||p===void 0?void 0:p.create();m&&(s.insert(c,m),s.setSelection(j.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[F3({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),m4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,b4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,u4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,g4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,x4=Ft.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:r=>r.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:r=>r.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:r}){return["em",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setItalic:()=>({commands:r})=>r.setMark(this.name),toggleItalic:()=>({commands:r})=>r.toggleMark(this.name),unsetItalic:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[wo({find:m4,type:this.type}),wo({find:u4,type:this.type})]},addPasteRules(){return[Fr({find:b4,type:this.type}),Fr({find:g4,type:this.type})]}}),f4=ut.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:r}){return["li",Te(this.options.HTMLAttributes,r),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),h4="listItem",Om="textStyle",Vm=/^(\d+)\.\s$/,y4=ut.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:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:null,parseHTML:r=>r.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:r}){const{start:e,...t}=r;return e===1?["ol",Te(this.options.HTMLAttributes,t),0]:["ol",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(h4,this.editor.getAttributes(Om)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=on({find:Vm,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=on({find:Vm,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(Om)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[r]}}),w4=ut.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),v4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,k4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,S4=Ft.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["s",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[wo({find:v4,type:this.type})]},addPasteRules(){return[Fr({find:k4,type:this.type})]}}),C4=ut.create({name:"text",group:"inline"}),E4=Me.create({name:"starterKit",addExtensions(){const r=[];return this.options.bold!==!1&&r.push(LS.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(MS.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(OS.configure(this.options.bulletList)),this.options.code!==!1&&r.push(_S.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(zS.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(FS.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(WS.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(ZS.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push($S.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(e4.configure(this.options.heading)),this.options.history!==!1&&r.push(d4.configure(this.options.history)),this.options.horizontalRule!==!1&&r.push(c4.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(x4.configure(this.options.italic)),this.options.listItem!==!1&&r.push(f4.configure(this.options.listItem)),this.options.orderedList!==!1&&r.push(y4.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push(w4.configure(this.options.paragraph)),this.options.strike!==!1&&r.push(S4.configure(this.options.strike)),this.options.text!==!1&&r.push(C4.configure(this.options.text)),r}}),T4="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",M4="ελ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",Bo=(r,e)=>{for(const t in e)r[t]=e[t];return r},Zs="numeric",$s="ascii",el="alpha",gn="asciinumeric",xn="alphanumeric",tl="domain",Im="emoji",B4="scheme",N4="slashscheme",rl="whitespace";function P4(r,e){return r in e||(e[r]=[]),e[r]}function Gr(r,e,t){e[Zs]&&(e[gn]=!0,e[xn]=!0),e[$s]&&(e[gn]=!0,e[el]=!0),e[gn]&&(e[xn]=!0),e[el]&&(e[xn]=!0),e[xn]&&(e[tl]=!0),e[Im]&&(e[tl]=!0);for(const o in e){const n=P4(o,t);n.indexOf(r)<0&&n.push(r)}}function D4(r,e){const t={};for(const o in e)e[o].indexOf(r)>=0&&(t[o]=!0);return t}function Ue(r=null){this.j={},this.jr=[],this.jd=null,this.t=r}Ue.groups={},Ue.prototype={accepts(){return!!this.t},go(r){const e=this,t=e.j[r];if(t)return t;for(let o=0;o<e.jr.length;o++){const n=e.jr[o][0],a=e.jr[o][1];if(a&&n.test(r))return a}return e.jd},has(r,e=!1){return e?r in this.j:!!this.go(r)},ta(r,e,t,o){for(let n=0;n<r.length;n++)this.tt(r[n],e,t,o)},tr(r,e,t,o){o=o||Ue.groups;let n;return e&&e.j?n=e:(n=new Ue(e),t&&o&&Gr(e,t,o)),this.jr.push([r,n]),n},ts(r,e,t,o){let n=this;const a=r.length;if(!a)return n;for(let s=0;s<a-1;s++)n=n.tt(r[s]);return n.tt(r[a-1],e,t,o)},tt(r,e,t,o){o=o||Ue.groups;const n=this;if(e&&e.j)return n.j[r]=e,e;const a=e;let s,l=n.go(r);if(l?(s=new Ue,Bo(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new Ue,a){if(o)if(s.t&&typeof s.t=="string"){const p=Bo(D4(s.t,o),t);Gr(a,p,o)}else t&&Gr(a,t,o);s.t=a}return n.j[r]=s,s}};const U=(r,e,t,o,n)=>r.ta(e,t,o,n),se=(r,e,t,o,n)=>r.tr(e,t,o,n),_m=(r,e,t,o,n)=>r.ts(e,t,o,n),P=(r,e,t,o,n)=>r.tt(e,t,o,n),Ut="WORD",ol="UWORD",Rm="ASCIINUMERICAL",Hm="ALPHANUMERICAL",fn="LOCALHOST",nl="TLD",il="UTLD",Bi="SCHEME",No="SLASH_SCHEME",al="NUM",sl="WS",ll="NL",hn="OPENBRACE",yn="CLOSEBRACE",Ni="OPENBRACKET",Pi="CLOSEBRACKET",Di="OPENPAREN",Li="CLOSEPAREN",Ai="OPENANGLEBRACKET",Oi="CLOSEANGLEBRACKET",Vi="FULLWIDTHLEFTPAREN",Ii="FULLWIDTHRIGHTPAREN",_i="LEFTCORNERBRACKET",Ri="RIGHTCORNERBRACKET",Hi="LEFTWHITECORNERBRACKET",zi="RIGHTWHITECORNERBRACKET",Fi="FULLWIDTHLESSTHAN",ji="FULLWIDTHGREATERTHAN",qi="AMPERSAND",Wi="APOSTROPHE",Ui="ASTERISK",fr="AT",Gi="BACKSLASH",Ki="BACKTICK",Ji="CARET",hr="COLON",pl="COMMA",Yi="DOLLAR",Lt="DOT",Xi="EQUALS",dl="EXCLAMATION",lt="HYPHEN",wn="PERCENT",Qi="PIPE",Zi="PLUS",$i="POUND",vn="QUERY",cl="QUOTE",zm="FULLWIDTHMIDDLEDOT",ml="SEMI",At="SLASH",kn="TILDE",ea="UNDERSCORE",Fm="EMOJI",ta="SYM";var jm=Object.freeze({__proto__:null,ALPHANUMERICAL:Hm,AMPERSAND:qi,APOSTROPHE:Wi,ASCIINUMERICAL:Rm,ASTERISK:Ui,AT:fr,BACKSLASH:Gi,BACKTICK:Ki,CARET:Ji,CLOSEANGLEBRACKET:Oi,CLOSEBRACE:yn,CLOSEBRACKET:Pi,CLOSEPAREN:Li,COLON:hr,COMMA:pl,DOLLAR:Yi,DOT:Lt,EMOJI:Fm,EQUALS:Xi,EXCLAMATION:dl,FULLWIDTHGREATERTHAN:ji,FULLWIDTHLEFTPAREN:Vi,FULLWIDTHLESSTHAN:Fi,FULLWIDTHMIDDLEDOT:zm,FULLWIDTHRIGHTPAREN:Ii,HYPHEN:lt,LEFTCORNERBRACKET:_i,LEFTWHITECORNERBRACKET:Hi,LOCALHOST:fn,NL:ll,NUM:al,OPENANGLEBRACKET:Ai,OPENBRACE:hn,OPENBRACKET:Ni,OPENPAREN:Di,PERCENT:wn,PIPE:Qi,PLUS:Zi,POUND:$i,QUERY:vn,QUOTE:cl,RIGHTCORNERBRACKET:Ri,RIGHTWHITECORNERBRACKET:zi,SCHEME:Bi,SEMI:ml,SLASH:At,SLASH_SCHEME:No,SYM:ta,TILDE:kn,TLD:nl,UNDERSCORE:ea,UTLD:il,UWORD:ol,WORD:Ut,WS:sl});const Gt=/[a-z]/,Sn=new RegExp("\\p{L}","u"),bl=new RegExp("\\p{Emoji}","u"),Kt=/\d/,ul=/\s/,qm="\r",gl=`
120
- `,L4="️",A4="‍",xl="";let ra=null,oa=null;function O4(r=[]){const e={};Ue.groups=e;const t=new Ue;ra==null&&(ra=Um(T4)),oa==null&&(oa=Um(M4)),P(t,"'",Wi),P(t,"{",hn),P(t,"}",yn),P(t,"[",Ni),P(t,"]",Pi),P(t,"(",Di),P(t,")",Li),P(t,"<",Ai),P(t,">",Oi),P(t,"(",Vi),P(t,")",Ii),P(t,"「",_i),P(t,"」",Ri),P(t,"『",Hi),P(t,"』",zi),P(t,"<",Fi),P(t,">",ji),P(t,"&",qi),P(t,"*",Ui),P(t,"@",fr),P(t,"`",Ki),P(t,"^",Ji),P(t,":",hr),P(t,",",pl),P(t,"$",Yi),P(t,".",Lt),P(t,"=",Xi),P(t,"!",dl),P(t,"-",lt),P(t,"%",wn),P(t,"|",Qi),P(t,"+",Zi),P(t,"#",$i),P(t,"?",vn),P(t,'"',cl),P(t,"/",At),P(t,";",ml),P(t,"~",kn),P(t,"_",ea),P(t,"\\",Gi),P(t,"・",zm);const o=se(t,Kt,al,{[Zs]:!0});se(o,Kt,o);const n=se(o,Gt,Rm,{[gn]:!0}),a=se(o,Sn,Hm,{[xn]:!0}),s=se(t,Gt,Ut,{[$s]:!0});se(s,Kt,n),se(s,Gt,s),se(n,Kt,n),se(n,Gt,n);const l=se(t,Sn,ol,{[el]:!0});se(l,Gt),se(l,Kt,a),se(l,Sn,l),se(a,Kt,a),se(a,Gt),se(a,Sn,a);const p=P(t,gl,ll,{[rl]:!0}),d=P(t,qm,sl,{[rl]:!0}),c=se(t,ul,sl,{[rl]:!0});P(t,xl,c),P(d,gl,p),P(d,xl,c),se(d,ul,c),P(c,qm),P(c,gl),se(c,ul,c),P(c,xl,c);const m=se(t,bl,Fm,{[Im]:!0});P(m,"#"),se(m,bl,m),P(m,L4,m);const b=P(m,A4);P(b,"#"),se(b,bl,m);const u=[[Gt,s],[Kt,n]],g=[[Gt,null],[Sn,l],[Kt,a]];for(let f=0;f<ra.length;f++)yr(t,ra[f],nl,Ut,u);for(let f=0;f<oa.length;f++)yr(t,oa[f],il,ol,g);Gr(nl,{tld:!0,ascii:!0},e),Gr(il,{utld:!0,alpha:!0},e),yr(t,"file",Bi,Ut,u),yr(t,"mailto",Bi,Ut,u),yr(t,"http",No,Ut,u),yr(t,"https",No,Ut,u),yr(t,"ftp",No,Ut,u),yr(t,"ftps",No,Ut,u),Gr(Bi,{scheme:!0,ascii:!0},e),Gr(No,{slashscheme:!0,ascii:!0},e),r=r.sort((f,x)=>f[0]>x[0]?1:-1);for(let f=0;f<r.length;f++){const x=r[f][0],w=r[f][1]?{[B4]:!0}:{[N4]:!0};x.indexOf("-")>=0?w[tl]=!0:Gt.test(x)?Kt.test(x)?w[gn]=!0:w[$s]=!0:w[Zs]=!0,_m(t,x,x,w)}return _m(t,"localhost",fn,{ascii:!0}),t.jd=new Ue(ta),{start:t,tokens:Bo({groups:e},jm)}}function Wm(r,e){const t=V4(e.replace(/[A-Z]/g,l=>l.toLowerCase())),o=t.length,n=[];let a=0,s=0;for(;s<o;){let l=r,p=null,d=0,c=null,m=-1,b=-1;for(;s<o&&(p=l.go(t[s]));)l=p,l.accepts()?(m=0,b=0,c=l):m>=0&&(m+=t[s].length,b++),d+=t[s].length,a+=t[s].length,s++;a-=m,s-=b,d-=m,n.push({t:c.t,v:e.slice(a-d,a),s:a-d,e:a})}return n}function V4(r){const e=[],t=r.length;let o=0;for(;o<t;){let n=r.charCodeAt(o),a,s=n<55296||n>56319||o+1===t||(a=r.charCodeAt(o+1))<56320||a>57343?r[o]:r.slice(o,o+2);e.push(s),o+=s.length}return e}function yr(r,e,t,o,n){let a;const s=e.length;for(let l=0;l<s-1;l++){const p=e[l];r.j[p]?a=r.j[p]:(a=new Ue(o),a.jr=n.slice(),r.j[p]=a),r=a}return a=new Ue(t),a.jr=n.slice(),r.j[e[s-1]]=a,a}function Um(r){const e=[],t=[];let o=0,n="0123456789";for(;o<r.length;){let a=0;for(;n.indexOf(r[o+a])>=0;)a++;if(a>0){e.push(t.join(""));for(let s=parseInt(r.substring(o,o+a),10);s>0;s--)t.pop();o+=a}else t.push(r[o]),o++}return e}const Cn={defaultProtocol:"http",events:null,format:Gm,formatHref:Gm,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function fl(r,e=null){let t=Bo({},Cn);r&&(t=Bo(t,r instanceof fl?r.o:r));const o=t.ignoreTags,n=[];for(let a=0;a<o.length;a++)n.push(o[a].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=n}fl.prototype={o:Cn,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,e,t){const o=e!=null;let n=this.o[r];return n&&(typeof n=="object"?(n=t.t in n?n[t.t]:Cn[r],typeof n=="function"&&o&&(n=n(e,t))):typeof n=="function"&&o&&(n=n(e,t.t,t)),n)},getObj(r,e,t){let o=this.o[r];return typeof o=="function"&&e!=null&&(o=o(e,t.t,t)),o},render(r){const e=r.render(this);return(this.get("render",null,r)||this.defaultRender)(e,r.t,r)}};function Gm(r){return r}function Km(r,e){this.t="token",this.v=r,this.tk=e}Km.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){const e=this.toString(),t=r.get("truncate",e,this),o=r.get("format",e,this);return t&&o.length>t?o.substring(0,t)+"…":o},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r=Cn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){const e=this,t=this.toHref(r.get("defaultProtocol")),o=r.get("formatHref",t,this),n=r.get("tagName",t,e),a=this.toFormattedString(r),s={},l=r.get("className",t,e),p=r.get("target",t,e),d=r.get("rel",t,e),c=r.getObj("attributes",t,e),m=r.getObj("events",t,e);return s.href=o,l&&(s.class=l),p&&(s.target=p),d&&(s.rel=d),c&&Bo(s,c),{tagName:n,attributes:s,content:a,eventListeners:m}}};function na(r,e){class t extends Km{constructor(n,a){super(n,a),this.t=r}}for(const o in e)t.prototype[o]=e[o];return t.t=r,t}const Jm=na("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),Ym=na("text"),I4=na("nl"),ia=na("url",{isLink:!0,toHref(r=Cn.defaultProtocol){return this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){const r=this.tk;return r.length>=2&&r[0].t!==fn&&r[1].t===hr}}),pt=r=>new Ue(r);function _4({groups:r}){const e=r.domain.concat([qi,Ui,fr,Gi,Ki,Ji,Yi,Xi,lt,al,wn,Qi,Zi,$i,At,ta,kn,ea]),t=[Wi,hr,pl,Lt,dl,wn,vn,cl,ml,Ai,Oi,hn,yn,Pi,Ni,Di,Li,Vi,Ii,_i,Ri,Hi,zi,Fi,ji],o=[qi,Wi,Ui,Gi,Ki,Ji,Yi,Xi,lt,hn,yn,wn,Qi,Zi,$i,vn,At,ta,kn,ea],n=pt(),a=P(n,kn);U(a,o,a),U(a,r.domain,a);const s=pt(),l=pt(),p=pt();U(n,r.domain,s),U(n,r.scheme,l),U(n,r.slashscheme,p),U(s,o,a),U(s,r.domain,s);const d=P(s,fr);P(a,fr,d),P(l,fr,d),P(p,fr,d);const c=P(a,Lt);U(c,o,a),U(c,r.domain,a);const m=pt();U(d,r.domain,m),U(m,r.domain,m);const b=P(m,Lt);U(b,r.domain,m);const u=pt(Jm);U(b,r.tld,u),U(b,r.utld,u),P(d,fn,u);const g=P(m,lt);P(g,lt,g),U(g,r.domain,m),U(u,r.domain,m),P(u,Lt,b),P(u,lt,g);const f=P(u,hr);U(f,r.numeric,Jm);const x=P(s,lt),y=P(s,Lt);P(x,lt,x),U(x,r.domain,s),U(y,o,a),U(y,r.domain,s);const w=pt(ia);U(y,r.tld,w),U(y,r.utld,w),U(w,r.domain,s),U(w,o,a),P(w,Lt,y),P(w,lt,x),P(w,fr,d);const v=P(w,hr),h=pt(ia);U(v,r.numeric,h);const S=pt(ia),k=pt();U(S,e,S),U(S,t,k),U(k,e,S),U(k,t,k),P(w,At,S),P(h,At,S);const C=P(l,hr),L=P(p,hr),V=P(L,At),M=P(V,At);U(l,r.domain,s),P(l,Lt,y),P(l,lt,x),U(p,r.domain,s),P(p,Lt,y),P(p,lt,x),U(C,r.domain,S),P(C,At,S),P(C,vn,S),U(M,r.domain,S),U(M,e,S),P(M,At,S);const B=[[hn,yn],[Ni,Pi],[Di,Li],[Ai,Oi],[Vi,Ii],[_i,Ri],[Hi,zi],[Fi,ji]];for(let D=0;D<B.length;D++){const[F,q]=B[D],Y=P(S,F);P(k,F,Y),P(Y,q,S);const Z=pt(ia);U(Y,e,Z);const $=pt();U(Y,t),U(Z,e,Z),U(Z,t,$),U($,e,Z),U($,t,$),P(Z,q,S),P($,q,S)}return P(n,fn,w),P(n,ll,I4),{start:n,tokens:jm}}function R4(r,e,t){let o=t.length,n=0,a=[],s=[];for(;n<o;){let l=r,p=null,d=null,c=0,m=null,b=-1;for(;n<o&&!(p=l.go(t[n].t));)s.push(t[n++]);for(;n<o&&(d=p||l.go(t[n].t));)p=null,l=d,l.accepts()?(b=0,m=l):b>=0&&b++,n++,c++;if(b<0)n-=c,n<o&&(s.push(t[n]),n++);else{s.length>0&&(a.push(hl(Ym,e,s)),s=[]),n-=b,c-=b;const u=m.t,g=t.slice(n-c,n);a.push(hl(u,e,g))}}return s.length>0&&a.push(hl(Ym,e,s)),a}function hl(r,e,t){const o=t[0].s,n=t[t.length-1].e,a=e.slice(o,n);return new r(a,t)}const H4=typeof console<"u"&&console&&console.warn||(()=>{}),z4="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",oe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function F4(){return Ue.groups={},oe.scanner=null,oe.parser=null,oe.tokenQueue=[],oe.pluginQueue=[],oe.customSchemes=[],oe.initialized=!1,oe}function Xm(r,e=!1){if(oe.initialized&&H4(`linkifyjs: already initialized - will not register custom scheme "${r}" ${z4}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(r))throw new Error(`linkifyjs: incorrect scheme format.
117
+ `);return!a||!s?!1:r.chain().command(({tr:l})=>(l.delete(o.pos-2,o.pos),!0)).exitCode().run()},ArrowDown:({editor:r})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=r,{selection:t,doc:o}=e,{$from:n,empty:a}=t;if(!a||n.parent.type!==this.type||!(n.parentOffset===n.parent.nodeSize-2))return!1;const l=n.after();return l===void 0?!1:o.nodeAt(l)?r.commands.command(({tr:d})=>(d.setSelection(q.near(o.resolve(l))),!0)):r.commands.exitCode()}}},addInputRules(){return[Ds({find:JS,type:this.type,getAttributes:r=>({language:r[1]})}),Ds({find:YS,type:this.type,getAttributes:r=>({language:r[1]})})]},addProseMirrorPlugins(){return[new me({key:new Ie("codeBlockVSCodeHandler"),props:{handlePaste:(r,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),o=e.clipboardData.getData("vscode-editor-data"),n=o?JSON.parse(o):void 0,a=n==null?void 0:n.mode;if(!t||!a)return!1;const{tr:s,schema:l}=r.state,p=l.text(t.replace(/\r\n?/g,`
118
+ `));return s.replaceSelectionWith(this.type.create({language:a},p)),s.selection.$from.parent.type!==this.type&&s.setSelection(j.near(s.doc.resolve(Math.max(0,s.selection.from-2)))),s.setMeta("paste",!0),r.dispatch(s),!0}}})]}}),QS=ut.create({name:"doc",topNode:!0,content:"block+"});function ZS(r={}){return new me({view(e){return new $S(e,r)}})}class $S{constructor(e,t){var o;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(o=t.width)!==null&&o!==void 0?o:1,this.color=t.color===!1?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map(n=>{let a=s=>{this[n](s)};return e.dom.addEventListener(n,a),{name:n,handler:a}})}destroy(){this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){this.cursorPos!=null&&t.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),t=!e.parent.inlineContent,o,n=this.editorView.dom,a=n.getBoundingClientRect(),s=a.width/n.offsetWidth,l=a.height/n.offsetHeight;if(t){let m=e.nodeBefore,b=e.nodeAfter;if(m||b){let u=this.editorView.nodeDOM(this.cursorPos-(m?m.nodeSize:0));if(u){let g=u.getBoundingClientRect(),f=m?g.bottom:g.top;m&&b&&(f=(f+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let x=this.width/2*l;o={left:g.left,right:g.right,top:f-x,bottom:f+x}}}}if(!o){let m=this.editorView.coordsAtPos(this.cursorPos),b=this.width/2*s;o={left:m.left-b,right:m.left+b,top:m.top,bottom:m.bottom}}let p=this.editorView.dom.offsetParent;this.element||(this.element=p.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",t),this.element.classList.toggle("prosemirror-dropcursor-inline",!t);let d,c;if(!p||p==document.body&&getComputedStyle(p).position=="static")d=-pageXOffset,c=-pageYOffset;else{let m=p.getBoundingClientRect(),b=m.width/p.offsetWidth,u=m.height/p.offsetHeight;d=m.left-p.scrollLeft*b,c=m.top-p.scrollTop*u}this.element.style.left=(o.left-d)/s+"px",this.element.style.top=(o.top-c)/l+"px",this.element.style.width=(o.right-o.left)/s+"px",this.element.style.height=(o.bottom-o.top)/l+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),o=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),n=o&&o.type.spec.disableDropCursor,a=typeof n=="function"?n(this.editorView,t,e):n;if(t&&!a){let s=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=cf(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)}}const e4=Me.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[ZS(this.options)]}});class ae extends q{constructor(e){super(e,e)}map(e,t){let o=e.resolve(t.map(this.head));return ae.valid(o)?new ae(o):q.near(o)}content(){return O.empty}eq(e){return e instanceof ae&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if(typeof t.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new ae(e.resolve(t.pos))}getBookmark(){return new Ys(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!t4(e)||!r4(e))return!1;let o=t.type.spec.allowGapCursor;if(o!=null)return o;let n=t.contentMatchAt(e.index()).defaultType;return n&&n.isTextblock}static findGapCursorFrom(e,t,o=!1){e:for(;;){if(!o&&ae.valid(e))return e;let n=e.pos,a=null;for(let s=e.depth;;s--){let l=e.node(s);if(t>0?e.indexAfter(s)<l.childCount:e.index(s)>0){a=l.child(t>0?e.indexAfter(s):e.index(s)-1);break}else if(s==0)return null;n+=t;let p=e.doc.resolve(n);if(ae.valid(p))return p}for(;;){let s=t>0?a.firstChild:a.lastChild;if(!s){if(a.isAtom&&!a.isText&&!H.isSelectable(a)){e=e.doc.resolve(n+a.nodeSize*t),o=!1;continue e}break}a=s,n+=t;let l=e.doc.resolve(n);if(ae.valid(l))return l}return null}}}ae.prototype.visible=!1,ae.findFrom=ae.findGapCursorFrom,q.jsonID("gapcursor",ae);class Ys{constructor(e){this.pos=e}map(e){return new Ys(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return ae.valid(t)?new ae(t):q.near(t)}}function t4(r){for(let e=r.depth;e>=0;e--){let t=r.index(e),o=r.node(e);if(t==0){if(o.type.spec.isolating)return!0;continue}for(let n=o.child(t-1);;n=n.lastChild){if(n.childCount==0&&!n.inlineContent||n.isAtom||n.type.spec.isolating)return!0;if(n.inlineContent)return!1}}return!0}function r4(r){for(let e=r.depth;e>=0;e--){let t=r.indexAfter(e),o=r.node(e);if(t==o.childCount){if(o.type.spec.isolating)return!0;continue}for(let n=o.child(t);;n=n.firstChild){if(n.childCount==0&&!n.inlineContent||n.isAtom||n.type.spec.isolating)return!0;if(n.inlineContent)return!1}}return!0}function o4(){return new me({props:{decorations:s4,createSelectionBetween(r,e,t){return e.pos==t.pos&&ae.valid(t)?new ae(t):null},handleClick:i4,handleKeyDown:n4,handleDOMEvents:{beforeinput:a4}}})}const n4=Rh({ArrowLeft:Ei("horiz",-1),ArrowRight:Ei("horiz",1),ArrowUp:Ei("vert",-1),ArrowDown:Ei("vert",1)});function Ei(r,e){const t=r=="vert"?e>0?"down":"up":e>0?"right":"left";return function(o,n,a){let s=o.selection,l=e>0?s.$to:s.$from,p=s.empty;if(s instanceof j){if(!a.endOfTextblock(t)||l.depth==0)return!1;p=!1,l=o.doc.resolve(e>0?l.after():l.before())}let d=ae.findGapCursorFrom(l,e,p);return d?(n&&n(o.tr.setSelection(new ae(d))),!0):!1}}function i4(r,e,t){if(!r||!r.editable)return!1;let o=r.state.doc.resolve(e);if(!ae.valid(o))return!1;let n=r.posAtCoords({left:t.clientX,top:t.clientY});return n&&n.inside>-1&&H.isSelectable(r.state.doc.nodeAt(n.inside))?!1:(r.dispatch(r.state.tr.setSelection(new ae(o))),!0)}function a4(r,e){if(e.inputType!="insertCompositionText"||!(r.state.selection instanceof ae))return!1;let{$from:t}=r.state.selection,o=t.parent.contentMatchAt(t.index()).findWrapping(r.state.schema.nodes.text);if(!o)return!1;let n=N.empty;for(let s=o.length-1;s>=0;s--)n=N.from(o[s].createAndFill(null,n));let a=r.state.tr.replace(t.pos,t.pos,new O(n,0,0));return a.setSelection(j.near(a.doc.resolve(t.pos+1))),r.dispatch(a),!1}function s4(r){if(!(r.selection instanceof ae))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",be.create(r.doc,[nt.widget(r.selection.head,e,{key:"gapcursor"})])}const l4=Me.create({name:"gapCursor",addProseMirrorPlugins(){return[o4()]},extendNodeSchema(r){var e;const t={name:r.name,options:r.options,storage:r.storage};return{allowGapCursor:(e=G(_(r,"allowGapCursor",t)))!==null&&e!==void 0?e:null}}}),p4=ut.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:r}){return["br",Te(this.options.HTMLAttributes,r)]},renderText(){return`
119
+ `},addCommands(){return{setHardBreak:()=>({commands:r,chain:e,state:t,editor:o})=>r.first([()=>r.exitCode(),()=>r.command(()=>{const{selection:n,storedMarks:a}=t;if(n.$from.parent.type.spec.isolating)return!1;const{keepMarks:s}=this.options,{splittableMarks:l}=o.extensionManager,p=a||n.$to.parentOffset&&n.$from.marks();return e().insertContent({type:this.name}).command(({tr:d,dispatch:c})=>{if(c&&p&&s){const m=p.filter(b=>l.includes(b.type.name));d.ensureMarks(m)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),d4=ut.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(r=>({tag:`h${r}`,attrs:{level:r}}))},renderHTML({node:r,HTMLAttributes:e}){return[`h${this.options.levels.includes(r.attrs.level)?r.attrs.level:this.options.levels[0]}`,Te(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.setNode(this.name,r):!1,toggleHeading:r=>({commands:e})=>this.options.levels.includes(r.level)?e.toggleNode(this.name,"paragraph",r):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((r,e)=>({...r,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(r=>Ds({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${r}})\\s$`),type:this.type,getAttributes:{level:r}}))}});var Ti=200,ye=function(){};ye.prototype.append=function(e){return e.length?(e=ye.from(e),!this.length&&e||e.length<Ti&&this.leafAppend(e)||this.length<Ti&&e.leafPrepend(this)||this.appendInner(e)):this},ye.prototype.prepend=function(e){return e.length?ye.from(e).append(this):this},ye.prototype.appendInner=function(e){return new c4(this,e)},ye.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?ye.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},ye.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},ye.prototype.forEach=function(e,t,o){t===void 0&&(t=0),o===void 0&&(o=this.length),t<=o?this.forEachInner(e,t,o,0):this.forEachInvertedInner(e,t,o,0)},ye.prototype.map=function(e,t,o){t===void 0&&(t=0),o===void 0&&(o=this.length);var n=[];return this.forEach(function(a,s){return n.push(e(a,s))},t,o),n},ye.from=function(e){return e instanceof ye?e:e&&e.length?new l0(e):ye.empty};var l0=function(r){function e(o){r.call(this),this.values=o}r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e;var t={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(n,a){return n==0&&a==this.length?this:new e(this.values.slice(n,a))},e.prototype.getInner=function(n){return this.values[n]},e.prototype.forEachInner=function(n,a,s,l){for(var p=a;p<s;p++)if(n(this.values[p],l+p)===!1)return!1},e.prototype.forEachInvertedInner=function(n,a,s,l){for(var p=a-1;p>=s;p--)if(n(this.values[p],l+p)===!1)return!1},e.prototype.leafAppend=function(n){if(this.length+n.length<=Ti)return new e(this.values.concat(n.flatten()))},e.prototype.leafPrepend=function(n){if(this.length+n.length<=Ti)return new e(n.flatten().concat(this.values))},t.length.get=function(){return this.values.length},t.depth.get=function(){return 0},Object.defineProperties(e.prototype,t),e}(ye);ye.empty=new l0([]);var c4=function(r){function e(t,o){r.call(this),this.left=t,this.right=o,this.length=t.length+o.length,this.depth=Math.max(t.depth,o.depth)+1}return r&&(e.__proto__=r),e.prototype=Object.create(r&&r.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(o){return o<this.left.length?this.left.get(o):this.right.get(o-this.left.length)},e.prototype.forEachInner=function(o,n,a,s){var l=this.left.length;if(n<l&&this.left.forEachInner(o,n,Math.min(a,l),s)===!1||a>l&&this.right.forEachInner(o,Math.max(n-l,0),Math.min(this.length,a)-l,s+l)===!1)return!1},e.prototype.forEachInvertedInner=function(o,n,a,s){var l=this.left.length;if(n>l&&this.right.forEachInvertedInner(o,n-l,Math.max(a,l)-l,s+l)===!1||a<l&&this.left.forEachInvertedInner(o,Math.min(n,l),a,s)===!1)return!1},e.prototype.sliceInner=function(o,n){if(o==0&&n==this.length)return this;var a=this.left.length;return n<=a?this.left.slice(o,n):o>=a?this.right.slice(o-a,n-a):this.left.slice(o,a).append(this.right.slice(0,n-a))},e.prototype.leafAppend=function(o){var n=this.right.leafAppend(o);if(n)return new e(this.left,n)},e.prototype.leafPrepend=function(o){var n=this.left.leafPrepend(o);if(n)return new e(n,this.right)},e.prototype.appendInner=function(o){return this.left.depth>=Math.max(this.right.depth,o.depth)+1?new e(this.left,new e(this.right,o)):new e(this,o)},e}(ye);const m4=500;class gt{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(this.eventCount==0)return null;let o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}let n,a;t&&(n=this.remapping(o,this.items.length),a=n.maps.length);let s=e.tr,l,p,d=[],c=[];return this.items.forEach((m,b)=>{if(!m.step){n||(n=this.remapping(o,b+1),a=n.maps.length),a--,c.push(m);return}if(n){c.push(new Dt(m.map));let u=m.step.map(n.slice(a)),g;u&&s.maybeStep(u).doc&&(g=s.mapping.maps[s.mapping.maps.length-1],d.push(new Dt(g,void 0,void 0,d.length+c.length))),a--,g&&n.appendMap(g,a)}else s.maybeStep(m.step);if(m.selection)return l=n?m.selection.map(n.slice(a)):m.selection,p=new gt(this.items.slice(0,o).append(c.reverse().concat(d)),this.eventCount-1),!1},this.items.length,0),{remaining:p,transform:s,selection:l}}addTransform(e,t,o,n){let a=[],s=this.eventCount,l=this.items,p=!n&&l.length?l.get(l.length-1):null;for(let c=0;c<e.steps.length;c++){let m=e.steps[c].invert(e.docs[c]),b=new Dt(e.mapping.maps[c],m,t),u;(u=p&&p.merge(b))&&(b=u,c?a.pop():l=l.slice(0,l.length-1)),a.push(b),t&&(s++,t=void 0),n||(p=b)}let d=s-o.depth;return d>u4&&(l=b4(l,d),s-=d),new gt(l.append(a),s)}remapping(e,t){let o=new Fo;return this.items.forEach((n,a)=>{let s=n.mirrorOffset!=null&&a-n.mirrorOffset>=e?o.maps.length-n.mirrorOffset:void 0;o.appendMap(n.map,s)},e,t),o}addMaps(e){return this.eventCount==0?this:new gt(this.items.append(e.map(t=>new Dt(t))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let o=[],n=Math.max(0,this.items.length-t),a=e.mapping,s=e.steps.length,l=this.eventCount;this.items.forEach(b=>{b.selection&&l--},n);let p=t;this.items.forEach(b=>{let u=a.getMirror(--p);if(u==null)return;s=Math.min(s,u);let g=a.maps[u];if(b.step){let f=e.steps[u].invert(e.docs[u]),x=b.selection&&b.selection.map(a.slice(p+1,u));x&&l++,o.push(new Dt(g,f,x))}else o.push(new Dt(g))},n);let d=[];for(let b=t;b<s;b++)d.push(new Dt(a.maps[b]));let c=this.items.slice(0,n).append(d).append(o),m=new gt(c,l);return m.emptyItemCount()>m4&&(m=m.compress(this.items.length-o.length)),m}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(e=this.items.length){let t=this.remapping(0,e),o=t.maps.length,n=[],a=0;return this.items.forEach((s,l)=>{if(l>=e)n.push(s),s.selection&&a++;else if(s.step){let p=s.step.map(t.slice(o)),d=p&&p.getMap();if(o--,d&&t.appendMap(d,o),p){let c=s.selection&&s.selection.map(t.slice(o));c&&a++;let m=new Dt(d.invert(),p,c),b,u=n.length-1;(b=n.length&&n[u].merge(m))?n[u]=b:n.push(m)}}else s.map&&o--},this.items.length,0),new gt(ye.from(n.reverse()),a)}}gt.empty=new gt(ye.empty,0);function b4(r,e){let t;return r.forEach((o,n)=>{if(o.selection&&e--==0)return t=n,!1}),r.slice(t)}class Dt{constructor(e,t,o,n){this.map=e,this.step=t,this.selection=o,this.mirrorOffset=n}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Dt(t.getMap().invert(),t,this.selection)}}}class xr{constructor(e,t,o,n,a){this.done=e,this.undone=t,this.prevRanges=o,this.prevTime=n,this.prevComposition=a}}const u4=20;function g4(r,e,t,o){let n=t.getMeta(Ur),a;if(n)return n.historyState;t.getMeta(h4)&&(r=new xr(r.done,r.undone,null,0,-1));let s=t.getMeta("appendedTransaction");if(t.steps.length==0)return r;if(s&&s.getMeta(Ur))return s.getMeta(Ur).redo?new xr(r.done.addTransform(t,void 0,o,Mi(e)),r.undone,p0(t.mapping.maps),r.prevTime,r.prevComposition):new xr(r.done,r.undone.addTransform(t,void 0,o,Mi(e)),null,r.prevTime,r.prevComposition);if(t.getMeta("addToHistory")!==!1&&!(s&&s.getMeta("addToHistory")===!1)){let l=t.getMeta("composition"),p=r.prevTime==0||!s&&r.prevComposition!=l&&(r.prevTime<(t.time||0)-o.newGroupDelay||!x4(t,r.prevRanges)),d=s?Xs(r.prevRanges,t.mapping):p0(t.mapping.maps);return new xr(r.done.addTransform(t,p?e.selection.getBookmark():void 0,o,Mi(e)),gt.empty,d,t.time,l??r.prevComposition)}else return(a=t.getMeta("rebased"))?new xr(r.done.rebased(t,a),r.undone.rebased(t,a),Xs(r.prevRanges,t.mapping),r.prevTime,r.prevComposition):new xr(r.done.addMaps(t.mapping.maps),r.undone.addMaps(t.mapping.maps),Xs(r.prevRanges,t.mapping),r.prevTime,r.prevComposition)}function x4(r,e){if(!e)return!1;if(!r.docChanged)return!0;let t=!1;return r.mapping.maps[0].forEach((o,n)=>{for(let a=0;a<e.length;a+=2)o<=e[a+1]&&n>=e[a]&&(t=!0)}),t}function p0(r){let e=[];for(let t=r.length-1;t>=0&&e.length==0;t--)r[t].forEach((o,n,a,s)=>e.push(a,s));return e}function Xs(r,e){if(!r)return null;let t=[];for(let o=0;o<r.length;o+=2){let n=e.map(r[o],1),a=e.map(r[o+1],-1);n<=a&&t.push(n,a)}return t}function f4(r,e,t){let o=Mi(e),n=Ur.get(e).spec.config,a=(t?r.undone:r.done).popEvent(e,o);if(!a)return null;let s=a.selection.resolve(a.transform.doc),l=(t?r.done:r.undone).addTransform(a.transform,e.selection.getBookmark(),n,o),p=new xr(t?l:a.remaining,t?a.remaining:l,null,0,-1);return a.transform.setSelection(s).setMeta(Ur,{redo:t,historyState:p})}let Qs=!1,d0=null;function Mi(r){let e=r.plugins;if(d0!=e){Qs=!1,d0=e;for(let t=0;t<e.length;t++)if(e[t].spec.historyPreserveItems){Qs=!0;break}}return Qs}const Ur=new Ie("history"),h4=new Ie("closeHistory");function y4(r={}){return r={depth:r.depth||100,newGroupDelay:r.newGroupDelay||500},new me({key:Ur,state:{init(){return new xr(gt.empty,gt.empty,null,0,-1)},apply(e,t,o){return g4(t,o,e,r)}},config:r,props:{handleDOMEvents:{beforeinput(e,t){let o=t.inputType,n=o=="historyUndo"?m0:o=="historyRedo"?b0:null;return n?(t.preventDefault(),n(e.state,e.dispatch)):!1}}}})}function c0(r,e){return(t,o)=>{let n=Ur.getState(t);if(!n||(r?n.undone:n.done).eventCount==0)return!1;if(o){let a=f4(n,t,r);a&&o(e?a.scrollIntoView():a)}return!0}}const m0=c0(!1,!0),b0=c0(!0,!0),w4=Me.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:r,dispatch:e})=>m0(r,e),redo:()=>({state:r,dispatch:e})=>b0(r,e)}},addProseMirrorPlugins(){return[y4(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()}}}),v4=ut.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:r}){return["hr",Te(this.options.HTMLAttributes,r)]},addCommands(){return{setHorizontalRule:()=>({chain:r,state:e})=>{if(!Q3(e,e.schema.nodes[this.name]))return!1;const{selection:t}=e,{$from:o,$to:n}=t,a=r();return o.parentOffset===0?a.insertContentAt({from:Math.max(o.pos-1,0),to:n.pos},{type:this.name}):uy(t)?a.insertContentAt(n.pos,{type:this.name}):a.insertContent({type:this.name}),a.command(({tr:s,dispatch:l})=>{var p;if(l){const{$to:d}=s.selection,c=d.end();if(d.nodeAfter)d.nodeAfter.isTextblock?s.setSelection(j.create(s.doc,d.pos+1)):d.nodeAfter.isBlock?s.setSelection(H.create(s.doc,d.pos)):s.setSelection(j.create(s.doc,d.pos));else{const m=(p=d.parent.type.contentMatch.defaultType)===null||p===void 0?void 0:p.create();m&&(s.insert(c,m),s.setSelection(j.create(s.doc,c+1)))}s.scrollIntoView()}return!0}).run()}}},addInputRules(){return[X3({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),k4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,S4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,C4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,E4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,T4=Ft.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:r=>r.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:r=>r.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:r}){return["em",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setItalic:()=>({commands:r})=>r.setMark(this.name),toggleItalic:()=>({commands:r})=>r.toggleMark(this.name),unsetItalic:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[wo({find:k4,type:this.type}),wo({find:C4,type:this.type})]},addPasteRules(){return[Fr({find:S4,type:this.type}),Fr({find:E4,type:this.type})]}}),M4=ut.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:r}){return["li",Te(this.options.HTMLAttributes,r),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),B4="listItem",u0="textStyle",g0=/^(\d+)\.\s$/,N4=ut.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:r=>r.hasAttribute("start")?parseInt(r.getAttribute("start")||"",10):1},type:{default:null,parseHTML:r=>r.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:r}){const{start:e,...t}=r;return e===1?["ol",Te(this.options.HTMLAttributes,t),0]:["ol",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{toggleOrderedList:()=>({commands:r,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(B4,this.editor.getAttributes(u0)).run():r.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let r=on({find:g0,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(r=on({find:g0,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(u0)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[r]}}),P4=ut.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:r}){return["p",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setParagraph:()=>({commands:r})=>r.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),D4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,L4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,A4=Ft.create({name:"strike",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:r=>r.includes("line-through")?{}:!1}]},renderHTML({HTMLAttributes:r}){return["s",Te(this.options.HTMLAttributes,r),0]},addCommands(){return{setStrike:()=>({commands:r})=>r.setMark(this.name),toggleStrike:()=>({commands:r})=>r.toggleMark(this.name),unsetStrike:()=>({commands:r})=>r.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[wo({find:D4,type:this.type})]},addPasteRules(){return[Fr({find:L4,type:this.type})]}}),O4=ut.create({name:"text",group:"inline"}),V4=Me.create({name:"starterKit",addExtensions(){const r=[];return this.options.bold!==!1&&r.push(jS.configure(this.options.bold)),this.options.blockquote!==!1&&r.push(_S.configure(this.options.blockquote)),this.options.bulletList!==!1&&r.push(WS.configure(this.options.bulletList)),this.options.code!==!1&&r.push(KS.configure(this.options.code)),this.options.codeBlock!==!1&&r.push(XS.configure(this.options.codeBlock)),this.options.document!==!1&&r.push(QS.configure(this.options.document)),this.options.dropcursor!==!1&&r.push(e4.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&r.push(l4.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&r.push(p4.configure(this.options.hardBreak)),this.options.heading!==!1&&r.push(d4.configure(this.options.heading)),this.options.history!==!1&&r.push(w4.configure(this.options.history)),this.options.horizontalRule!==!1&&r.push(v4.configure(this.options.horizontalRule)),this.options.italic!==!1&&r.push(T4.configure(this.options.italic)),this.options.listItem!==!1&&r.push(M4.configure(this.options.listItem)),this.options.orderedList!==!1&&r.push(N4.configure(this.options.orderedList)),this.options.paragraph!==!1&&r.push(P4.configure(this.options.paragraph)),this.options.strike!==!1&&r.push(A4.configure(this.options.strike)),this.options.text!==!1&&r.push(O4.configure(this.options.text)),r}}),I4="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",_4="ελ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",Bo=(r,e)=>{for(const t in e)r[t]=e[t];return r},Zs="numeric",$s="ascii",el="alpha",gn="asciinumeric",xn="alphanumeric",tl="domain",x0="emoji",R4="scheme",H4="slashscheme",rl="whitespace";function z4(r,e){return r in e||(e[r]=[]),e[r]}function Gr(r,e,t){e[Zs]&&(e[gn]=!0,e[xn]=!0),e[$s]&&(e[gn]=!0,e[el]=!0),e[gn]&&(e[xn]=!0),e[el]&&(e[xn]=!0),e[xn]&&(e[tl]=!0),e[x0]&&(e[tl]=!0);for(const o in e){const n=z4(o,t);n.indexOf(r)<0&&n.push(r)}}function F4(r,e){const t={};for(const o in e)e[o].indexOf(r)>=0&&(t[o]=!0);return t}function Ue(r=null){this.j={},this.jr=[],this.jd=null,this.t=r}Ue.groups={},Ue.prototype={accepts(){return!!this.t},go(r){const e=this,t=e.j[r];if(t)return t;for(let o=0;o<e.jr.length;o++){const n=e.jr[o][0],a=e.jr[o][1];if(a&&n.test(r))return a}return e.jd},has(r,e=!1){return e?r in this.j:!!this.go(r)},ta(r,e,t,o){for(let n=0;n<r.length;n++)this.tt(r[n],e,t,o)},tr(r,e,t,o){o=o||Ue.groups;let n;return e&&e.j?n=e:(n=new Ue(e),t&&o&&Gr(e,t,o)),this.jr.push([r,n]),n},ts(r,e,t,o){let n=this;const a=r.length;if(!a)return n;for(let s=0;s<a-1;s++)n=n.tt(r[s]);return n.tt(r[a-1],e,t,o)},tt(r,e,t,o){o=o||Ue.groups;const n=this;if(e&&e.j)return n.j[r]=e,e;const a=e;let s,l=n.go(r);if(l?(s=new Ue,Bo(s.j,l.j),s.jr.push.apply(s.jr,l.jr),s.jd=l.jd,s.t=l.t):s=new Ue,a){if(o)if(s.t&&typeof s.t=="string"){const p=Bo(F4(s.t,o),t);Gr(a,p,o)}else t&&Gr(a,t,o);s.t=a}return n.j[r]=s,s}};const W=(r,e,t,o,n)=>r.ta(e,t,o,n),se=(r,e,t,o,n)=>r.tr(e,t,o,n),f0=(r,e,t,o,n)=>r.ts(e,t,o,n),P=(r,e,t,o,n)=>r.tt(e,t,o,n),Ut="WORD",ol="UWORD",h0="ASCIINUMERICAL",y0="ALPHANUMERICAL",fn="LOCALHOST",nl="TLD",il="UTLD",Bi="SCHEME",No="SLASH_SCHEME",al="NUM",sl="WS",ll="NL",hn="OPENBRACE",yn="CLOSEBRACE",Ni="OPENBRACKET",Pi="CLOSEBRACKET",Di="OPENPAREN",Li="CLOSEPAREN",Ai="OPENANGLEBRACKET",Oi="CLOSEANGLEBRACKET",Vi="FULLWIDTHLEFTPAREN",Ii="FULLWIDTHRIGHTPAREN",_i="LEFTCORNERBRACKET",Ri="RIGHTCORNERBRACKET",Hi="LEFTWHITECORNERBRACKET",zi="RIGHTWHITECORNERBRACKET",Fi="FULLWIDTHLESSTHAN",ji="FULLWIDTHGREATERTHAN",qi="AMPERSAND",Wi="APOSTROPHE",Ui="ASTERISK",fr="AT",Gi="BACKSLASH",Ki="BACKTICK",Ji="CARET",hr="COLON",pl="COMMA",Yi="DOLLAR",Lt="DOT",Xi="EQUALS",dl="EXCLAMATION",lt="HYPHEN",wn="PERCENT",Qi="PIPE",Zi="PLUS",$i="POUND",vn="QUERY",cl="QUOTE",w0="FULLWIDTHMIDDLEDOT",ml="SEMI",At="SLASH",kn="TILDE",ea="UNDERSCORE",v0="EMOJI",ta="SYM";var k0=Object.freeze({__proto__:null,ALPHANUMERICAL:y0,AMPERSAND:qi,APOSTROPHE:Wi,ASCIINUMERICAL:h0,ASTERISK:Ui,AT:fr,BACKSLASH:Gi,BACKTICK:Ki,CARET:Ji,CLOSEANGLEBRACKET:Oi,CLOSEBRACE:yn,CLOSEBRACKET:Pi,CLOSEPAREN:Li,COLON:hr,COMMA:pl,DOLLAR:Yi,DOT:Lt,EMOJI:v0,EQUALS:Xi,EXCLAMATION:dl,FULLWIDTHGREATERTHAN:ji,FULLWIDTHLEFTPAREN:Vi,FULLWIDTHLESSTHAN:Fi,FULLWIDTHMIDDLEDOT:w0,FULLWIDTHRIGHTPAREN:Ii,HYPHEN:lt,LEFTCORNERBRACKET:_i,LEFTWHITECORNERBRACKET:Hi,LOCALHOST:fn,NL:ll,NUM:al,OPENANGLEBRACKET:Ai,OPENBRACE:hn,OPENBRACKET:Ni,OPENPAREN:Di,PERCENT:wn,PIPE:Qi,PLUS:Zi,POUND:$i,QUERY:vn,QUOTE:cl,RIGHTCORNERBRACKET:Ri,RIGHTWHITECORNERBRACKET:zi,SCHEME:Bi,SEMI:ml,SLASH:At,SLASH_SCHEME:No,SYM:ta,TILDE:kn,TLD:nl,UNDERSCORE:ea,UTLD:il,UWORD:ol,WORD:Ut,WS:sl});const Gt=/[a-z]/,Sn=new RegExp("\\p{L}","u"),bl=new RegExp("\\p{Emoji}","u"),Kt=/\d/,ul=/\s/,S0="\r",gl=`
120
+ `,j4="️",q4="‍",xl="";let ra=null,oa=null;function W4(r=[]){const e={};Ue.groups=e;const t=new Ue;ra==null&&(ra=E0(I4)),oa==null&&(oa=E0(_4)),P(t,"'",Wi),P(t,"{",hn),P(t,"}",yn),P(t,"[",Ni),P(t,"]",Pi),P(t,"(",Di),P(t,")",Li),P(t,"<",Ai),P(t,">",Oi),P(t,"(",Vi),P(t,")",Ii),P(t,"「",_i),P(t,"」",Ri),P(t,"『",Hi),P(t,"』",zi),P(t,"<",Fi),P(t,">",ji),P(t,"&",qi),P(t,"*",Ui),P(t,"@",fr),P(t,"`",Ki),P(t,"^",Ji),P(t,":",hr),P(t,",",pl),P(t,"$",Yi),P(t,".",Lt),P(t,"=",Xi),P(t,"!",dl),P(t,"-",lt),P(t,"%",wn),P(t,"|",Qi),P(t,"+",Zi),P(t,"#",$i),P(t,"?",vn),P(t,'"',cl),P(t,"/",At),P(t,";",ml),P(t,"~",kn),P(t,"_",ea),P(t,"\\",Gi),P(t,"・",w0);const o=se(t,Kt,al,{[Zs]:!0});se(o,Kt,o);const n=se(o,Gt,h0,{[gn]:!0}),a=se(o,Sn,y0,{[xn]:!0}),s=se(t,Gt,Ut,{[$s]:!0});se(s,Kt,n),se(s,Gt,s),se(n,Kt,n),se(n,Gt,n);const l=se(t,Sn,ol,{[el]:!0});se(l,Gt),se(l,Kt,a),se(l,Sn,l),se(a,Kt,a),se(a,Gt),se(a,Sn,a);const p=P(t,gl,ll,{[rl]:!0}),d=P(t,S0,sl,{[rl]:!0}),c=se(t,ul,sl,{[rl]:!0});P(t,xl,c),P(d,gl,p),P(d,xl,c),se(d,ul,c),P(c,S0),P(c,gl),se(c,ul,c),P(c,xl,c);const m=se(t,bl,v0,{[x0]:!0});P(m,"#"),se(m,bl,m),P(m,j4,m);const b=P(m,q4);P(b,"#"),se(b,bl,m);const u=[[Gt,s],[Kt,n]],g=[[Gt,null],[Sn,l],[Kt,a]];for(let f=0;f<ra.length;f++)yr(t,ra[f],nl,Ut,u);for(let f=0;f<oa.length;f++)yr(t,oa[f],il,ol,g);Gr(nl,{tld:!0,ascii:!0},e),Gr(il,{utld:!0,alpha:!0},e),yr(t,"file",Bi,Ut,u),yr(t,"mailto",Bi,Ut,u),yr(t,"http",No,Ut,u),yr(t,"https",No,Ut,u),yr(t,"ftp",No,Ut,u),yr(t,"ftps",No,Ut,u),Gr(Bi,{scheme:!0,ascii:!0},e),Gr(No,{slashscheme:!0,ascii:!0},e),r=r.sort((f,x)=>f[0]>x[0]?1:-1);for(let f=0;f<r.length;f++){const x=r[f][0],w=r[f][1]?{[R4]:!0}:{[H4]:!0};x.indexOf("-")>=0?w[tl]=!0:Gt.test(x)?Kt.test(x)?w[gn]=!0:w[$s]=!0:w[Zs]=!0,f0(t,x,x,w)}return f0(t,"localhost",fn,{ascii:!0}),t.jd=new Ue(ta),{start:t,tokens:Bo({groups:e},k0)}}function C0(r,e){const t=U4(e.replace(/[A-Z]/g,l=>l.toLowerCase())),o=t.length,n=[];let a=0,s=0;for(;s<o;){let l=r,p=null,d=0,c=null,m=-1,b=-1;for(;s<o&&(p=l.go(t[s]));)l=p,l.accepts()?(m=0,b=0,c=l):m>=0&&(m+=t[s].length,b++),d+=t[s].length,a+=t[s].length,s++;a-=m,s-=b,d-=m,n.push({t:c.t,v:e.slice(a-d,a),s:a-d,e:a})}return n}function U4(r){const e=[],t=r.length;let o=0;for(;o<t;){let n=r.charCodeAt(o),a,s=n<55296||n>56319||o+1===t||(a=r.charCodeAt(o+1))<56320||a>57343?r[o]:r.slice(o,o+2);e.push(s),o+=s.length}return e}function yr(r,e,t,o,n){let a;const s=e.length;for(let l=0;l<s-1;l++){const p=e[l];r.j[p]?a=r.j[p]:(a=new Ue(o),a.jr=n.slice(),r.j[p]=a),r=a}return a=new Ue(t),a.jr=n.slice(),r.j[e[s-1]]=a,a}function E0(r){const e=[],t=[];let o=0,n="0123456789";for(;o<r.length;){let a=0;for(;n.indexOf(r[o+a])>=0;)a++;if(a>0){e.push(t.join(""));for(let s=parseInt(r.substring(o,o+a),10);s>0;s--)t.pop();o+=a}else t.push(r[o]),o++}return e}const Cn={defaultProtocol:"http",events:null,format:T0,formatHref:T0,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function fl(r,e=null){let t=Bo({},Cn);r&&(t=Bo(t,r instanceof fl?r.o:r));const o=t.ignoreTags,n=[];for(let a=0;a<o.length;a++)n.push(o[a].toUpperCase());this.o=t,e&&(this.defaultRender=e),this.ignoreTags=n}fl.prototype={o:Cn,ignoreTags:[],defaultRender(r){return r},check(r){return this.get("validate",r.toString(),r)},get(r,e,t){const o=e!=null;let n=this.o[r];return n&&(typeof n=="object"?(n=t.t in n?n[t.t]:Cn[r],typeof n=="function"&&o&&(n=n(e,t))):typeof n=="function"&&o&&(n=n(e,t.t,t)),n)},getObj(r,e,t){let o=this.o[r];return typeof o=="function"&&e!=null&&(o=o(e,t.t,t)),o},render(r){const e=r.render(this);return(this.get("render",null,r)||this.defaultRender)(e,r.t,r)}};function T0(r){return r}function M0(r,e){this.t="token",this.v=r,this.tk=e}M0.prototype={isLink:!1,toString(){return this.v},toHref(r){return this.toString()},toFormattedString(r){const e=this.toString(),t=r.get("truncate",e,this),o=r.get("format",e,this);return t&&o.length>t?o.substring(0,t)+"…":o},toFormattedHref(r){return r.get("formatHref",this.toHref(r.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(r=Cn.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(r),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(r){return{type:this.t,value:this.toFormattedString(r),isLink:this.isLink,href:this.toFormattedHref(r),start:this.startIndex(),end:this.endIndex()}},validate(r){return r.get("validate",this.toString(),this)},render(r){const e=this,t=this.toHref(r.get("defaultProtocol")),o=r.get("formatHref",t,this),n=r.get("tagName",t,e),a=this.toFormattedString(r),s={},l=r.get("className",t,e),p=r.get("target",t,e),d=r.get("rel",t,e),c=r.getObj("attributes",t,e),m=r.getObj("events",t,e);return s.href=o,l&&(s.class=l),p&&(s.target=p),d&&(s.rel=d),c&&Bo(s,c),{tagName:n,attributes:s,content:a,eventListeners:m}}};function na(r,e){class t extends M0{constructor(n,a){super(n,a),this.t=r}}for(const o in e)t.prototype[o]=e[o];return t.t=r,t}const B0=na("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),N0=na("text"),G4=na("nl"),ia=na("url",{isLink:!0,toHref(r=Cn.defaultProtocol){return this.hasProtocol()?this.v:`${r}://${this.v}`},hasProtocol(){const r=this.tk;return r.length>=2&&r[0].t!==fn&&r[1].t===hr}}),pt=r=>new Ue(r);function K4({groups:r}){const e=r.domain.concat([qi,Ui,fr,Gi,Ki,Ji,Yi,Xi,lt,al,wn,Qi,Zi,$i,At,ta,kn,ea]),t=[Wi,hr,pl,Lt,dl,wn,vn,cl,ml,Ai,Oi,hn,yn,Pi,Ni,Di,Li,Vi,Ii,_i,Ri,Hi,zi,Fi,ji],o=[qi,Wi,Ui,Gi,Ki,Ji,Yi,Xi,lt,hn,yn,wn,Qi,Zi,$i,vn,At,ta,kn,ea],n=pt(),a=P(n,kn);W(a,o,a),W(a,r.domain,a);const s=pt(),l=pt(),p=pt();W(n,r.domain,s),W(n,r.scheme,l),W(n,r.slashscheme,p),W(s,o,a),W(s,r.domain,s);const d=P(s,fr);P(a,fr,d),P(l,fr,d),P(p,fr,d);const c=P(a,Lt);W(c,o,a),W(c,r.domain,a);const m=pt();W(d,r.domain,m),W(m,r.domain,m);const b=P(m,Lt);W(b,r.domain,m);const u=pt(B0);W(b,r.tld,u),W(b,r.utld,u),P(d,fn,u);const g=P(m,lt);P(g,lt,g),W(g,r.domain,m),W(u,r.domain,m),P(u,Lt,b),P(u,lt,g);const f=P(u,hr);W(f,r.numeric,B0);const x=P(s,lt),y=P(s,Lt);P(x,lt,x),W(x,r.domain,s),W(y,o,a),W(y,r.domain,s);const w=pt(ia);W(y,r.tld,w),W(y,r.utld,w),W(w,r.domain,s),W(w,o,a),P(w,Lt,y),P(w,lt,x),P(w,fr,d);const v=P(w,hr),h=pt(ia);W(v,r.numeric,h);const S=pt(ia),k=pt();W(S,e,S),W(S,t,k),W(k,e,S),W(k,t,k),P(w,At,S),P(h,At,S);const C=P(l,hr),L=P(p,hr),V=P(L,At),M=P(V,At);W(l,r.domain,s),P(l,Lt,y),P(l,lt,x),W(p,r.domain,s),P(p,Lt,y),P(p,lt,x),W(C,r.domain,S),P(C,At,S),P(C,vn,S),W(M,r.domain,S),W(M,e,S),P(M,At,S);const B=[[hn,yn],[Ni,Pi],[Di,Li],[Ai,Oi],[Vi,Ii],[_i,Ri],[Hi,zi],[Fi,ji]];for(let D=0;D<B.length;D++){const[z,J]=B[D],Y=P(S,z);P(k,z,Y),P(Y,J,S);const Z=pt(ia);W(Y,e,Z);const $=pt();W(Y,t),W(Z,e,Z),W(Z,t,$),W($,e,Z),W($,t,$),P(Z,J,S),P($,J,S)}return P(n,fn,w),P(n,ll,G4),{start:n,tokens:k0}}function J4(r,e,t){let o=t.length,n=0,a=[],s=[];for(;n<o;){let l=r,p=null,d=null,c=0,m=null,b=-1;for(;n<o&&!(p=l.go(t[n].t));)s.push(t[n++]);for(;n<o&&(d=p||l.go(t[n].t));)p=null,l=d,l.accepts()?(b=0,m=l):b>=0&&b++,n++,c++;if(b<0)n-=c,n<o&&(s.push(t[n]),n++);else{s.length>0&&(a.push(hl(N0,e,s)),s=[]),n-=b,c-=b;const u=m.t,g=t.slice(n-c,n);a.push(hl(u,e,g))}}return s.length>0&&a.push(hl(N0,e,s)),a}function hl(r,e,t){const o=t[0].s,n=t[t.length-1].e,a=e.slice(o,n);return new r(a,t)}const Y4=typeof console<"u"&&console&&console.warn||(()=>{}),X4="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",oe={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function Q4(){return Ue.groups={},oe.scanner=null,oe.parser=null,oe.tokenQueue=[],oe.pluginQueue=[],oe.customSchemes=[],oe.initialized=!1,oe}function P0(r,e=!1){if(oe.initialized&&Y4(`linkifyjs: already initialized - will not register custom scheme "${r}" ${X4}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(r))throw new Error(`linkifyjs: incorrect scheme format.
121
121
  1. Must only contain digits, lowercase ASCII letters or "-"
122
122
  2. Cannot start or end with "-"
123
- 3. "-" cannot repeat`);oe.customSchemes.push([r,e])}function j4(){oe.scanner=O4(oe.customSchemes);for(let r=0;r<oe.tokenQueue.length;r++)oe.tokenQueue[r][1]({scanner:oe.scanner});oe.parser=_4(oe.scanner.tokens);for(let r=0;r<oe.pluginQueue.length;r++)oe.pluginQueue[r][1]({scanner:oe.scanner,parser:oe.parser});return oe.initialized=!0,oe}function yl(r){return oe.initialized||j4(),R4(oe.parser.start,r,Wm(oe.scanner.start,r))}yl.scan=Wm;function Qm(r,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const o=new fl(t),n=yl(r),a=[];for(let s=0;s<n.length;s++){const l=n[s];l.isLink&&(!e||l.t===e)&&o.check(l)&&a.push(l.toFormattedObject(o))}return a}const wl="[\0-   ᠎ -\u2029  ]",q4=new RegExp(wl),W4=new RegExp(`${wl}$`),U4=new RegExp(wl,"g");function G4(r){return r.length===1?r[0].isLink:r.length===3&&r[1].isLink?["()","[]"].includes(r[0].value+r[2].value):!1}function K4(r){return new me({key:new Ie("autolink"),appendTransaction:(e,t,o)=>{const n=e.some(d=>d.docChanged)&&!t.doc.eq(o.doc),a=e.some(d=>d.getMeta("preventAutolink"));if(!n||a)return;const{tr:s}=o,l=c3(t.doc,[...e]);if(h3(l).forEach(({newRange:d})=>{const c=b3(o.doc,d,u=>u.isTextblock);let m,b;if(c.length>1)m=c[0],b=o.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(c.length){const u=o.doc.textBetween(d.from,d.to," "," ");if(!W4.test(u))return;m=c[0],b=o.doc.textBetween(m.pos,d.to,void 0," ")}if(m&&b){const u=b.split(q4).filter(Boolean);if(u.length<=0)return!1;const g=u[u.length-1],f=m.pos+b.lastIndexOf(g);if(!g)return!1;const x=yl(g).map(y=>y.toObject(r.defaultProtocol));if(!G4(x))return!1;x.filter(y=>y.isLink).map(y=>({...y,from:f+y.start+1,to:f+y.end+1})).filter(y=>o.schema.marks.code?!o.doc.rangeHasMark(y.from,y.to,o.schema.marks.code):!0).filter(y=>r.validate(y.value)).filter(y=>r.shouldAutoLink(y.value)).forEach(y=>{Ts(y.from,y.to,o.doc).some(w=>w.mark.type===r.type)||s.addMark(y.from,y.to,r.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function J4(r){return new me({key:new Ie("handleClickLink"),props:{handleClick:(e,t,o)=>{var n,a;if(o.button!==0||!e.editable)return!1;let s=o.target;const l=[];for(;s.nodeName!=="DIV";)l.push(s),s=s.parentNode;if(!l.find(b=>b.nodeName==="A"))return!1;const p=Lc(e.state,r.type.name),d=o.target,c=(n=d==null?void 0:d.href)!==null&&n!==void 0?n:p.href,m=(a=d==null?void 0:d.target)!==null&&a!==void 0?a:p.target;return d&&c?(window.open(c,m),!0):!1}}})}function Y4(r){return new me({key:new Ie("handlePasteLink"),props:{handlePaste:(e,t,o)=>{const{state:n}=e,{selection:a}=n,{empty:s}=a;if(s)return!1;let l="";o.content.forEach(d=>{l+=d.textContent});const p=Qm(l,{defaultProtocol:r.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!p?!1:r.editor.commands.setMark(r.type,{href:p.href})}}})}function Kr(r,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(o=>{const n=typeof o=="string"?o:o.scheme;n&&t.push(n)}),!r||r.replace(U4,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const X4=Ft.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(r=>{if(typeof r=="string"){Xm(r);return}Xm(r.scheme,r.optionalSlashes)})},onDestroy(){F4()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(r,e)=>!!Kr(r,e.protocols),validate:r=>!!r,shouldAutoLink:r=>!!r}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{const e=r.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Kr(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:e=>!!Kr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Te(this.options.HTMLAttributes,r),0]:["a",Te(this.options.HTMLAttributes,{...r,href:""}),0]},addCommands(){return{setLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:o=>!!Kr(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,r).setMeta("preventAutolink",!0).run():!1},toggleLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:o=>!!Kr(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Fr({find:r=>{const e=[];if(r){const{protocols:t,defaultProtocol:o}=this.options,n=Qm(r).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:s=>!!Kr(s,t),protocols:t,defaultProtocol:o}));n.length&&n.forEach(a=>e.push({text:a.value,data:{href:a.href},index:a.start}))}return e},type:this.type,getAttributes:r=>{var e;return{href:(e=r.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const r=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&r.push(K4({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:o=>this.options.isAllowedUri(o,{defaultValidate:n=>!!Kr(n,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&r.push(J4({type:this.type})),this.options.linkOnPaste&&r.push(Y4({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r}});function aa(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function vl(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function Q4(){return Zm().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Zm(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const Z4=typeof Proxy=="function",$4="devtools-plugin:setup",eC="plugin:settings:set";let Po,kl;function tC(){var r;return Po!==void 0||(typeof window<"u"&&window.performance?(Po=!0,kl=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Po=!0,kl=globalThis.perf_hooks.performance):Po=!1),Po}function rC(){return tC()?kl.now():Date.now()}class oC{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const o={};if(e.settings)for(const s in e.settings){const l=e.settings[s];o[s]=l.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let a=Object.assign({},o);try{const s=localStorage.getItem(n),l=JSON.parse(s);Object.assign(a,l)}catch{}this.fallbacks={getSettings(){return a},setSettings(s){try{localStorage.setItem(n,JSON.stringify(s))}catch{}a=s},now(){return rC()}},t&&t.on(eC,(s,l)=>{s===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(s,l)=>this.target?this.target.on[l]:(...p)=>{this.onQueue.push({method:l,args:p})}}),this.proxiedTarget=new Proxy({},{get:(s,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...p)=>(this.targetQueue.push({method:l,args:p,resolve:()=>{}}),this.fallbacks[l](...p)):(...p)=>new Promise(d=>{this.targetQueue.push({method:l,args:p,resolve:d})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function $m(r,e){const t=r,o=Zm(),n=Q4(),a=Z4&&t.enableEarlyProxy;if(n&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))n.emit($4,r,e);else{const s=a?new oC(t,n):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:s}),s&&e(s.proxiedTarget)}}/*!
123
+ 3. "-" cannot repeat`);oe.customSchemes.push([r,e])}function Z4(){oe.scanner=W4(oe.customSchemes);for(let r=0;r<oe.tokenQueue.length;r++)oe.tokenQueue[r][1]({scanner:oe.scanner});oe.parser=K4(oe.scanner.tokens);for(let r=0;r<oe.pluginQueue.length;r++)oe.pluginQueue[r][1]({scanner:oe.scanner,parser:oe.parser});return oe.initialized=!0,oe}function yl(r){return oe.initialized||Z4(),J4(oe.parser.start,r,C0(oe.scanner.start,r))}yl.scan=C0;function D0(r,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const o=new fl(t),n=yl(r),a=[];for(let s=0;s<n.length;s++){const l=n[s];l.isLink&&(!e||l.t===e)&&o.check(l)&&a.push(l.toFormattedObject(o))}return a}const wl="[\0-   ᠎ -\u2029  ]",$4=new RegExp(wl),eC=new RegExp(`${wl}$`),tC=new RegExp(wl,"g");function rC(r){return r.length===1?r[0].isLink:r.length===3&&r[1].isLink?["()","[]"].includes(r[0].value+r[2].value):!1}function oC(r){return new me({key:new Ie("autolink"),appendTransaction:(e,t,o)=>{const n=e.some(d=>d.docChanged)&&!t.doc.eq(o.doc),a=e.some(d=>d.getMeta("preventAutolink"));if(!n||a)return;const{tr:s}=o,l=w3(t.doc,[...e]);if(M3(l).forEach(({newRange:d})=>{const c=k3(o.doc,d,u=>u.isTextblock);let m,b;if(c.length>1)m=c[0],b=o.doc.textBetween(m.pos,m.pos+m.node.nodeSize,void 0," ");else if(c.length){const u=o.doc.textBetween(d.from,d.to," "," ");if(!eC.test(u))return;m=c[0],b=o.doc.textBetween(m.pos,d.to,void 0," ")}if(m&&b){const u=b.split($4).filter(Boolean);if(u.length<=0)return!1;const g=u[u.length-1],f=m.pos+b.lastIndexOf(g);if(!g)return!1;const x=yl(g).map(y=>y.toObject(r.defaultProtocol));if(!rC(x))return!1;x.filter(y=>y.isLink).map(y=>({...y,from:f+y.start+1,to:f+y.end+1})).filter(y=>o.schema.marks.code?!o.doc.rangeHasMark(y.from,y.to,o.schema.marks.code):!0).filter(y=>r.validate(y.value)).filter(y=>r.shouldAutoLink(y.value)).forEach(y=>{Ts(y.from,y.to,o.doc).some(w=>w.mark.type===r.type)||s.addMark(y.from,y.to,r.type.create({href:y.href}))})}}),!!s.steps.length)return s}})}function nC(r){return new me({key:new Ie("handleClickLink"),props:{handleClick:(e,t,o)=>{var n,a;if(o.button!==0||!e.editable)return!1;let s=o.target;const l=[];for(;s.nodeName!=="DIV";)l.push(s),s=s.parentNode;if(!l.find(b=>b.nodeName==="A"))return!1;const p=my(e.state,r.type.name),d=o.target,c=(n=d==null?void 0:d.href)!==null&&n!==void 0?n:p.href,m=(a=d==null?void 0:d.target)!==null&&a!==void 0?a:p.target;return d&&c?(window.open(c,m),!0):!1}}})}function iC(r){return new me({key:new Ie("handlePasteLink"),props:{handlePaste:(e,t,o)=>{const{state:n}=e,{selection:a}=n,{empty:s}=a;if(s)return!1;let l="";o.content.forEach(d=>{l+=d.textContent});const p=D0(l,{defaultProtocol:r.defaultProtocol}).find(d=>d.isLink&&d.value===l);return!l||!p?!1:r.editor.commands.setMark(r.type,{href:p.href})}}})}function Kr(r,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(o=>{const n=typeof o=="string"?o:o.scheme;n&&t.push(n)}),!r||r.replace(tC,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const aC=Ft.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(r=>{if(typeof r=="string"){P0(r);return}P0(r.scheme,r.optionalSlashes)})},onDestroy(){Q4()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(r,e)=>!!Kr(r,e.protocols),validate:r=>!!r,shouldAutoLink:r=>!!r}},addAttributes(){return{href:{default:null,parseHTML(r){return r.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:r=>{const e=r.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!Kr(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:r}){return this.options.isAllowedUri(r.href,{defaultValidate:e=>!!Kr(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Te(this.options.HTMLAttributes,r),0]:["a",Te(this.options.HTMLAttributes,{...r,href:""}),0]},addCommands(){return{setLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:o=>!!Kr(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,r).setMeta("preventAutolink",!0).run():!1},toggleLink:r=>({chain:e})=>{const{href:t}=r;return this.options.isAllowedUri(t,{defaultValidate:o=>!!Kr(o,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,r,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:r})=>r().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Fr({find:r=>{const e=[];if(r){const{protocols:t,defaultProtocol:o}=this.options,n=D0(r).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:s=>!!Kr(s,t),protocols:t,defaultProtocol:o}));n.length&&n.forEach(a=>e.push({text:a.value,data:{href:a.href},index:a.start}))}return e},type:this.type,getAttributes:r=>{var e;return{href:(e=r.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const r=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&r.push(oC({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:o=>this.options.isAllowedUri(o,{defaultValidate:n=>!!Kr(n,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&r.push(nC({type:this.type})),this.options.linkOnPaste&&r.push(iC({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),r}});function aa(r,e,t){return Array.isArray(r)?(r.length=Math.max(r.length,e),r.splice(e,1,t),t):(r[e]=t,t)}function vl(r,e){if(Array.isArray(r)){r.splice(e,1);return}delete r[e]}function sC(){return L0().__VUE_DEVTOOLS_GLOBAL_HOOK__}function L0(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const lC=typeof Proxy=="function",pC="devtools-plugin:setup",dC="plugin:settings:set";let Po,kl;function cC(){var r;return Po!==void 0||(typeof window<"u"&&window.performance?(Po=!0,kl=window.performance):typeof globalThis<"u"&&(!((r=globalThis.perf_hooks)===null||r===void 0)&&r.performance)?(Po=!0,kl=globalThis.perf_hooks.performance):Po=!1),Po}function mC(){return cC()?kl.now():Date.now()}class bC{constructor(e,t){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=t;const o={};if(e.settings)for(const s in e.settings){const l=e.settings[s];o[s]=l.defaultValue}const n=`__vue-devtools-plugin-settings__${e.id}`;let a=Object.assign({},o);try{const s=localStorage.getItem(n),l=JSON.parse(s);Object.assign(a,l)}catch{}this.fallbacks={getSettings(){return a},setSettings(s){try{localStorage.setItem(n,JSON.stringify(s))}catch{}a=s},now(){return mC()}},t&&t.on(dC,(s,l)=>{s===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(s,l)=>this.target?this.target.on[l]:(...p)=>{this.onQueue.push({method:l,args:p})}}),this.proxiedTarget=new Proxy({},{get:(s,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...p)=>(this.targetQueue.push({method:l,args:p,resolve:()=>{}}),this.fallbacks[l](...p)):(...p)=>new Promise(d=>{this.targetQueue.push({method:l,args:p,resolve:d})})})}async setRealTarget(e){this.target=e;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function A0(r,e){const t=r,o=L0(),n=sC(),a=lC&&t.enableEarlyProxy;if(n&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))n.emit(pC,r,e);else{const s=a?new bC(t,n):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:t,setupFn:e,proxy:s}),s&&e(s.proxiedTarget)}}/*!
124
124
  * pinia v2.3.1
125
125
  * (c) 2025 Eduardo San Martin Morote
126
126
  * @license MIT
127
- */let En;const Tn=r=>En=r,eb=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Jr(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Ot;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Ot||(Ot={}));const wr=typeof window<"u",tb=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function nC(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function Sl(r,e,t){const o=new XMLHttpRequest;o.open("GET",r),o.responseType="blob",o.onload=function(){nb(o.response,e,t)},o.onerror=function(){console.error("could not download file")},o.send()}function rb(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function sa(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const la=typeof navigator=="object"?navigator:{userAgent:""},ob=/Macintosh/.test(la.userAgent)&&/AppleWebKit/.test(la.userAgent)&&!/Safari/.test(la.userAgent),nb=wr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!ob?iC:"msSaveOrOpenBlob"in la?aC:sC:()=>{};function iC(r,e="download",t){const o=document.createElement("a");o.download=e,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?rb(o.href)?Sl(r,e,t):(o.target="_blank",sa(o)):sa(o)):(o.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){sa(o)},0))}function aC(r,e="download",t){if(typeof r=="string")if(rb(r))Sl(r,e,t);else{const o=document.createElement("a");o.href=r,o.target="_blank",setTimeout(function(){sa(o)})}else navigator.msSaveOrOpenBlob(nC(r,t),e)}function sC(r,e,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof r=="string")return Sl(r,e,t);const n=r.type==="application/octet-stream",a=/constructor/i.test(String(tb.HTMLElement))||"safari"in tb,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||n&&a||ob)&&typeof FileReader<"u"){const l=new FileReader;l.onloadend=function(){let p=l.result;if(typeof p!="string")throw o=null,new Error("Wrong reader.result type");p=s?p:p.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=p:location.assign(p),o=null},l.readAsDataURL(r)}else{const l=URL.createObjectURL(r);o?o.location.assign(l):location.href=l,o=null,setTimeout(function(){URL.revokeObjectURL(l)},4e4)}}function we(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Cl(r){return"_a"in r&&"install"in r}function ib(){if(!("clipboard"in navigator))return we("Your browser doesn't support the Clipboard API","error"),!0}function ab(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(we('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function lC(r){if(!ib())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),we("Global state copied to clipboard.")}catch(e){if(ab(e))return;we("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function pC(r){if(!ib())try{sb(r,JSON.parse(await navigator.clipboard.readText())),we("Global state pasted from clipboard.")}catch(e){if(ab(e))return;we("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function dC(r){try{nb(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){we("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let Jt;function cC(){Jt||(Jt=document.createElement("input"),Jt.type="file",Jt.accept=".json");function r(){return new Promise((e,t)=>{Jt.onchange=async()=>{const o=Jt.files;if(!o)return e(null);const n=o.item(0);return e(n?{text:await n.text(),file:n}:null)},Jt.oncancel=()=>e(null),Jt.onerror=t,Jt.click()})}return r}async function mC(r){try{const t=await cC()();if(!t)return;const{text:o,file:n}=t;sb(r,JSON.parse(o)),we(`Global state imported from "${n.name}".`)}catch(e){we("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function sb(r,e){for(const t in e){const o=r.state.value[t];o?Object.assign(o,e[t]):r.state.value[t]=e[t]}}function xt(r){return{_custom:{display:r}}}const lb="🍍 Pinia (root)",pa="_root";function bC(r){return Cl(r)?{id:pa,label:lb}:{id:r.$id,label:r.$id}}function uC(r){if(Cl(r)){const t=Array.from(r._s.keys()),o=r._s;return{state:t.map(a=>({editable:!0,key:a,value:r.state.value[a]})),getters:t.filter(a=>o.get(a)._getters).map(a=>{const s=o.get(a);return{editable:!1,key:a,value:s._getters.reduce((l,p)=>(l[p]=s[p],l),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function gC(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:xt(r.type),key:xt(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function xC(r){switch(r){case Ot.direct:return"mutation";case Ot.patchFunction:return"$patch";case Ot.patchObject:return"$patch";default:return"unknown"}}let Do=!0;const da=[],Yr="pinia:mutations",Ae="pinia",{assign:fC}=Object,ca=r=>"🍍 "+r;function hC(r,e){$m({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:da,app:r},t=>{typeof t.now!="function"&&we("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:Yr,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Ae,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{lC(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await pC(e),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{dC(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await mC(e),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const n=e._s.get(o);n?typeof n.$reset!="function"?we(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(n.$reset(),we(`Store "${o}" reset.`)):we(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((o,n)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const s=o.componentInstance.proxy._pStores;Object.values(s).forEach(l=>{o.instanceData.state.push({type:ca(l.$id),key:"state",editable:!0,value:l._isOptionsAPI?{_custom:{value:i.toRaw(l.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>l.$reset()}]}}:Object.keys(l.$state).reduce((p,d)=>(p[d]=l.$state[d],p),{})}),l._getters&&l._getters.length&&o.instanceData.state.push({type:ca(l.$id),key:"getters",editable:!1,value:l._getters.reduce((p,d)=>{try{p[d]=l[d]}catch(c){p[d]=c}return p},{})})})}}),t.on.getInspectorTree(o=>{if(o.app===r&&o.inspectorId===Ae){let n=[e];n=n.concat(Array.from(e._s.values())),o.rootNodes=(o.filter?n.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):lb.toLowerCase().includes(o.filter.toLowerCase())):n).map(bC)}}),globalThis.$pinia=e,t.on.getInspectorState(o=>{if(o.app===r&&o.inspectorId===Ae){const n=o.nodeId===pa?e:e._s.get(o.nodeId);if(!n)return;n&&(o.nodeId!==pa&&(globalThis.$store=i.toRaw(n)),o.state=uC(n))}}),t.on.editInspectorState((o,n)=>{if(o.app===r&&o.inspectorId===Ae){const a=o.nodeId===pa?e:e._s.get(o.nodeId);if(!a)return we(`store "${o.nodeId}" not found`,"error");const{path:s}=o;Cl(a)?s.unshift("state"):(s.length!==1||!a._customProperties.has(s[0])||s[0]in a.$state)&&s.unshift("$state"),Do=!1,o.set(a,s,o.state.value),Do=!0}}),t.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const n=o.type.replace(/^🍍\s*/,""),a=e._s.get(n);if(!a)return we(`store "${n}" not found`,"error");const{path:s}=o;if(s[0]!=="state")return we(`Invalid path for store "${n}":
127
+ */let En;const Tn=r=>En=r,O0=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function Jr(r){return r&&typeof r=="object"&&Object.prototype.toString.call(r)==="[object Object]"&&typeof r.toJSON!="function"}var Ot;(function(r){r.direct="direct",r.patchObject="patch object",r.patchFunction="patch function"})(Ot||(Ot={}));const wr=typeof window<"u",V0=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null};function uC(r,{autoBom:e=!1}={}){return e&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(r.type)?new Blob(["\uFEFF",r],{type:r.type}):r}function Sl(r,e,t){const o=new XMLHttpRequest;o.open("GET",r),o.responseType="blob",o.onload=function(){R0(o.response,e,t)},o.onerror=function(){console.error("could not download file")},o.send()}function I0(r){const e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function sa(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{const t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}const la=typeof navigator=="object"?navigator:{userAgent:""},_0=/Macintosh/.test(la.userAgent)&&/AppleWebKit/.test(la.userAgent)&&!/Safari/.test(la.userAgent),R0=wr?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!_0?gC:"msSaveOrOpenBlob"in la?xC:fC:()=>{};function gC(r,e="download",t){const o=document.createElement("a");o.download=e,o.rel="noopener",typeof r=="string"?(o.href=r,o.origin!==location.origin?I0(o.href)?Sl(r,e,t):(o.target="_blank",sa(o)):sa(o)):(o.href=URL.createObjectURL(r),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){sa(o)},0))}function xC(r,e="download",t){if(typeof r=="string")if(I0(r))Sl(r,e,t);else{const o=document.createElement("a");o.href=r,o.target="_blank",setTimeout(function(){sa(o)})}else navigator.msSaveOrOpenBlob(uC(r,t),e)}function fC(r,e,t,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof r=="string")return Sl(r,e,t);const n=r.type==="application/octet-stream",a=/constructor/i.test(String(V0.HTMLElement))||"safari"in V0,s=/CriOS\/[\d]+/.test(navigator.userAgent);if((s||n&&a||_0)&&typeof FileReader<"u"){const l=new FileReader;l.onloadend=function(){let p=l.result;if(typeof p!="string")throw o=null,new Error("Wrong reader.result type");p=s?p:p.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=p:location.assign(p),o=null},l.readAsDataURL(r)}else{const l=URL.createObjectURL(r);o?o.location.assign(l):location.href=l,o=null,setTimeout(function(){URL.revokeObjectURL(l)},4e4)}}function we(r,e){const t="🍍 "+r;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(t,e):e==="error"?console.error(t):e==="warn"?console.warn(t):console.log(t)}function Cl(r){return"_a"in r&&"install"in r}function H0(){if(!("clipboard"in navigator))return we("Your browser doesn't support the Clipboard API","error"),!0}function z0(r){return r instanceof Error&&r.message.toLowerCase().includes("document is not focused")?(we('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function hC(r){if(!H0())try{await navigator.clipboard.writeText(JSON.stringify(r.state.value)),we("Global state copied to clipboard.")}catch(e){if(z0(e))return;we("Failed to serialize the state. Check the console for more details.","error"),console.error(e)}}async function yC(r){if(!H0())try{F0(r,JSON.parse(await navigator.clipboard.readText())),we("Global state pasted from clipboard.")}catch(e){if(z0(e))return;we("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(e)}}async function wC(r){try{R0(new Blob([JSON.stringify(r.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(e){we("Failed to export the state as JSON. Check the console for more details.","error"),console.error(e)}}let Jt;function vC(){Jt||(Jt=document.createElement("input"),Jt.type="file",Jt.accept=".json");function r(){return new Promise((e,t)=>{Jt.onchange=async()=>{const o=Jt.files;if(!o)return e(null);const n=o.item(0);return e(n?{text:await n.text(),file:n}:null)},Jt.oncancel=()=>e(null),Jt.onerror=t,Jt.click()})}return r}async function kC(r){try{const t=await vC()();if(!t)return;const{text:o,file:n}=t;F0(r,JSON.parse(o)),we(`Global state imported from "${n.name}".`)}catch(e){we("Failed to import the state from JSON. Check the console for more details.","error"),console.error(e)}}function F0(r,e){for(const t in e){const o=r.state.value[t];o?Object.assign(o,e[t]):r.state.value[t]=e[t]}}function xt(r){return{_custom:{display:r}}}const j0="🍍 Pinia (root)",pa="_root";function SC(r){return Cl(r)?{id:pa,label:j0}:{id:r.$id,label:r.$id}}function CC(r){if(Cl(r)){const t=Array.from(r._s.keys()),o=r._s;return{state:t.map(a=>({editable:!0,key:a,value:r.state.value[a]})),getters:t.filter(a=>o.get(a)._getters).map(a=>{const s=o.get(a);return{editable:!1,key:a,value:s._getters.reduce((l,p)=>(l[p]=s[p],l),{})}})}}const e={state:Object.keys(r.$state).map(t=>({editable:!0,key:t,value:r.$state[t]}))};return r._getters&&r._getters.length&&(e.getters=r._getters.map(t=>({editable:!1,key:t,value:r[t]}))),r._customProperties.size&&(e.customProperties=Array.from(r._customProperties).map(t=>({editable:!0,key:t,value:r[t]}))),e}function EC(r){return r?Array.isArray(r)?r.reduce((e,t)=>(e.keys.push(t.key),e.operations.push(t.type),e.oldValue[t.key]=t.oldValue,e.newValue[t.key]=t.newValue,e),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:xt(r.type),key:xt(r.key),oldValue:r.oldValue,newValue:r.newValue}:{}}function TC(r){switch(r){case Ot.direct:return"mutation";case Ot.patchFunction:return"$patch";case Ot.patchObject:return"$patch";default:return"unknown"}}let Do=!0;const da=[],Yr="pinia:mutations",Ae="pinia",{assign:MC}=Object,ca=r=>"🍍 "+r;function BC(r,e){A0({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:da,app:r},t=>{typeof t.now!="function"&&we("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),t.addTimelineLayer({id:Yr,label:"Pinia 🍍",color:15064968}),t.addInspector({id:Ae,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{hC(e)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await yC(e),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{wC(e)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kC(e),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:'Reset the state (with "$reset")',action:o=>{const n=e._s.get(o);n?typeof n.$reset!="function"?we(`Cannot reset "${o}" store because it doesn't have a "$reset" method implemented.`,"warn"):(n.$reset(),we(`Store "${o}" reset.`)):we(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),t.on.inspectComponent((o,n)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const s=o.componentInstance.proxy._pStores;Object.values(s).forEach(l=>{o.instanceData.state.push({type:ca(l.$id),key:"state",editable:!0,value:l._isOptionsAPI?{_custom:{value:i.toRaw(l.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>l.$reset()}]}}:Object.keys(l.$state).reduce((p,d)=>(p[d]=l.$state[d],p),{})}),l._getters&&l._getters.length&&o.instanceData.state.push({type:ca(l.$id),key:"getters",editable:!1,value:l._getters.reduce((p,d)=>{try{p[d]=l[d]}catch(c){p[d]=c}return p},{})})})}}),t.on.getInspectorTree(o=>{if(o.app===r&&o.inspectorId===Ae){let n=[e];n=n.concat(Array.from(e._s.values())),o.rootNodes=(o.filter?n.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):j0.toLowerCase().includes(o.filter.toLowerCase())):n).map(SC)}}),globalThis.$pinia=e,t.on.getInspectorState(o=>{if(o.app===r&&o.inspectorId===Ae){const n=o.nodeId===pa?e:e._s.get(o.nodeId);if(!n)return;n&&(o.nodeId!==pa&&(globalThis.$store=i.toRaw(n)),o.state=CC(n))}}),t.on.editInspectorState((o,n)=>{if(o.app===r&&o.inspectorId===Ae){const a=o.nodeId===pa?e:e._s.get(o.nodeId);if(!a)return we(`store "${o.nodeId}" not found`,"error");const{path:s}=o;Cl(a)?s.unshift("state"):(s.length!==1||!a._customProperties.has(s[0])||s[0]in a.$state)&&s.unshift("$state"),Do=!1,o.set(a,s,o.state.value),Do=!0}}),t.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const n=o.type.replace(/^🍍\s*/,""),a=e._s.get(n);if(!a)return we(`store "${n}" not found`,"error");const{path:s}=o;if(s[0]!=="state")return we(`Invalid path for store "${n}":
128
128
  ${s}
129
- Only state can be modified.`);s[0]="$state",Do=!1,o.set(a,s,o.state.value),Do=!0}})})}function yC(r,e){da.includes(ca(e.$id))||da.push(ca(e.$id)),$m({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:da,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:s,onError:l,name:p,args:d})=>{const c=pb++;t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🛫 "+p,subtitle:"start",data:{store:xt(e.$id),action:xt(p),args:d},groupId:c}}),s(m=>{vr=void 0,t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🛬 "+p,subtitle:"end",data:{store:xt(e.$id),action:xt(p),args:d,result:m},groupId:c}})}),l(m=>{vr=void 0,t.addTimelineEvent({layerId:Yr,event:{time:o(),logType:"error",title:"💥 "+p,subtitle:"end",data:{store:xt(e.$id),action:xt(p),args:d,error:m},groupId:c}})})},!0),e._customProperties.forEach(s=>{i.watch(()=>i.unref(e[s]),(l,p)=>{t.notifyComponentUpdate(),t.sendInspectorState(Ae),Do&&t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"Change",subtitle:s,data:{newValue:l,oldValue:p},groupId:vr}})},{deep:!0})}),e.$subscribe(({events:s,type:l},p)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Ae),!Do)return;const d={time:o(),title:xC(l),data:fC({store:xt(e.$id)},gC(s)),groupId:vr};l===Ot.patchFunction?d.subtitle="⤵️":l===Ot.patchObject?d.subtitle="🧩":s&&!Array.isArray(s)&&(d.subtitle=s.type),s&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:s}}),t.addTimelineEvent({layerId:Yr,event:d})},{detached:!0,flush:"sync"});const n=e._hotUpdate;e._hotUpdate=i.markRaw(s=>{n(s),t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:xt(e.$id),info:xt("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)});const{$dispose:a}=e;e.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae),t.getSettings().logStoreChanges&&we(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae),t.getSettings().logStoreChanges&&we(`"${e.$id}" store installed 🆕`)})}let pb=0,vr;function db(r,e,t){const o=e.reduce((n,a)=>(n[a]=i.toRaw(r)[a],n),{});for(const n in o)r[n]=function(){const a=pb,s=t?new Proxy(r,{get(...p){return vr=a,Reflect.get(...p)},set(...p){return vr=a,Reflect.set(...p)}}):r;vr=a;const l=o[n].apply(s,arguments);return vr=void 0,l}}function wC({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){db(e,Object.keys(t.actions),e._isOptionsAPI);const o=e._hotUpdate;i.toRaw(e)._hotUpdate=function(n){o.apply(this,arguments),db(e,Object.keys(n._hmrPayload.actions),!!e._isOptionsAPI)}}yC(r,e)}}function cb(){const r=i.effectScope(!0),e=r.run(()=>i.ref({}));let t=[],o=[];const n=i.markRaw({install(a){Tn(n),n._a=a,a.provide(eb,n),a.config.globalProperties.$pinia=n,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr&&hC(a,n),o.forEach(s=>t.push(s)),o=[]},use(a){return this._a?t.push(a):o.push(a),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr&&typeof Proxy<"u"&&n.use(wC),n}function mb(r,e){for(const t in e){const o=e[t];if(!(t in r))continue;const n=r[t];Jr(n)&&Jr(o)&&!i.isRef(o)&&!i.isReactive(o)?r[t]=mb(n,o):r[t]=o}return r}const bb=()=>{};function ub(r,e,t,o=bb){r.push(e);const n=()=>{const a=r.indexOf(e);a>-1&&(r.splice(a,1),o())};return!t&&i.getCurrentScope()&&i.onScopeDispose(n),n}function Lo(r,...e){r.slice().forEach(t=>{t(...e)})}const vC=r=>r(),gb=Symbol(),El=Symbol();function Tl(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,o)=>r.set(o,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const o=e[t],n=r[t];Jr(n)&&Jr(o)&&r.hasOwnProperty(t)&&!i.isRef(o)&&!i.isReactive(o)?r[t]=Tl(n,o):r[t]=o}return r}const kC=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function SC(r){return!Jr(r)||!r.hasOwnProperty(kC)}const{assign:dt}=Object;function xb(r){return!!(i.isRef(r)&&r.effect)}function fb(r,e,t,o){const{state:n,actions:a,getters:s}=e,l=t.state.value[r];let p;function d(){!l&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[r]=n?n():{});const c=process.env.NODE_ENV!=="production"&&o?i.toRefs(i.ref(n?n():{}).value):i.toRefs(t.state.value[r]);return dt(c,a,Object.keys(s||{}).reduce((m,b)=>(process.env.NODE_ENV!=="production"&&b in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${r}".`),m[b]=i.markRaw(i.computed(()=>{Tn(t);const u=t._s.get(r);return s[b].call(u,u)})),m),{}))}return p=Ml(r,d,e,t,o,!0),p}function Ml(r,e,t={},o,n,a){let s;const l=dt({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const p={deep:!0};process.env.NODE_ENV!=="production"&&(p.onTrigger=M=>{d?u=M:d==!1&&!C._hotUpdating&&(Array.isArray(u)?u.push(M):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,c,m=[],b=[],u;const g=o.state.value[r];!a&&!g&&(process.env.NODE_ENV==="production"||!n)&&(o.state.value[r]={});const f=i.ref({});let x;function y(M){let B;d=c=!1,process.env.NODE_ENV!=="production"&&(u=[]),typeof M=="function"?(M(o.state.value[r]),B={type:Ot.patchFunction,storeId:r,events:u}):(Tl(o.state.value[r],M),B={type:Ot.patchObject,payload:M,storeId:r,events:u});const D=x=Symbol();i.nextTick().then(()=>{x===D&&(d=!0)}),c=!0,Lo(m,B,o.state.value[r])}const w=a?function(){const{state:B}=t,D=B?B():{};this.$patch(F=>{dt(F,D)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${r}" is built using the setup syntax and does not implement $reset().`)}:bb;function v(){s.stop(),m=[],b=[],o._s.delete(r)}const h=(M,B="")=>{if(gb in M)return M[El]=B,M;const D=function(){Tn(o);const F=Array.from(arguments),q=[],Y=[];function Z(G){q.push(G)}function $(G){Y.push(G)}Lo(b,{args:F,name:D[El],store:C,after:Z,onError:$});let ee;try{ee=M.apply(this&&this.$id===r?this:C,F)}catch(G){throw Lo(Y,G),G}return ee instanceof Promise?ee.then(G=>(Lo(q,G),G)).catch(G=>(Lo(Y,G),Promise.reject(G))):(Lo(q,ee),ee)};return D[gb]=!0,D[El]=B,D},S=i.markRaw({actions:{},getters:{},state:[],hotState:f}),k={_p:o,$id:r,$onAction:ub.bind(null,b),$patch:y,$reset:w,$subscribe(M,B={}){const D=ub(m,M,B.detached,()=>F()),F=s.run(()=>i.watch(()=>o.state.value[r],q=>{(B.flush==="sync"?c:d)&&M({storeId:r,type:Ot.direct,events:u},q)},dt({},p,B)));return D},$dispose:v},C=i.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr?dt({_hmrPayload:S,_customProperties:i.markRaw(new Set)},k):k);o._s.set(r,C);const V=(o._a&&o._a.runWithContext||vC)(()=>o._e.run(()=>(s=i.effectScope()).run(()=>e({action:h}))));for(const M in V){const B=V[M];if(i.isRef(B)&&!xb(B)||i.isReactive(B))process.env.NODE_ENV!=="production"&&n?aa(f.value,M,i.toRef(V,M)):a||(g&&SC(B)&&(i.isRef(B)?B.value=g[M]:Tl(B,g[M])),o.state.value[r][M]=B),process.env.NODE_ENV!=="production"&&S.state.push(M);else if(typeof B=="function"){const D=process.env.NODE_ENV!=="production"&&n?B:h(B,M);V[M]=D,process.env.NODE_ENV!=="production"&&(S.actions[M]=B),l.actions[M]=B}else process.env.NODE_ENV!=="production"&&xb(B)&&(S.getters[M]=a?t.getters[M]:B,wr&&(V._getters||(V._getters=i.markRaw([]))).push(M))}if(dt(C,V),dt(i.toRaw(C),V),Object.defineProperty(C,"$state",{get:()=>process.env.NODE_ENV!=="production"&&n?f.value:o.state.value[r],set:M=>{if(process.env.NODE_ENV!=="production"&&n)throw new Error("cannot set hotState");y(B=>{dt(B,M)})}}),process.env.NODE_ENV!=="production"&&(C._hotUpdate=i.markRaw(M=>{C._hotUpdating=!0,M._hmrPayload.state.forEach(B=>{if(B in C.$state){const D=M.$state[B],F=C.$state[B];typeof D=="object"&&Jr(D)&&Jr(F)?mb(D,F):M.$state[B]=F}aa(C,B,i.toRef(M.$state,B))}),Object.keys(C.$state).forEach(B=>{B in M.$state||vl(C,B)}),d=!1,c=!1,o.state.value[r]=i.toRef(M._hmrPayload,"hotState"),c=!0,i.nextTick().then(()=>{d=!0});for(const B in M._hmrPayload.actions){const D=M[B];aa(C,B,h(D,B))}for(const B in M._hmrPayload.getters){const D=M._hmrPayload.getters[B],F=a?i.computed(()=>(Tn(o),D.call(C,C))):D;aa(C,B,F)}Object.keys(C._hmrPayload.getters).forEach(B=>{B in M._hmrPayload.getters||vl(C,B)}),Object.keys(C._hmrPayload.actions).forEach(B=>{B in M._hmrPayload.actions||vl(C,B)}),C._hmrPayload=M._hmrPayload,C._getters=M._getters,C._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr){const M={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(B=>{Object.defineProperty(C,B,dt({value:C[B]},M))})}return o._p.forEach(M=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr){const B=s.run(()=>M({store:C,app:o._a,pinia:o,options:l}));Object.keys(B||{}).forEach(D=>C._customProperties.add(D)),dt(C,B)}else dt(C,s.run(()=>M({store:C,app:o._a,pinia:o,options:l})))}),process.env.NODE_ENV!=="production"&&C.$state&&typeof C.$state=="object"&&typeof C.$state.constructor=="function"&&!C.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
129
+ Only state can be modified.`);s[0]="$state",Do=!1,o.set(a,s,o.state.value),Do=!0}})})}function NC(r,e){da.includes(ca(e.$id))||da.push(ca(e.$id)),A0({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:da,app:r,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},t=>{const o=typeof t.now=="function"?t.now.bind(t):Date.now;e.$onAction(({after:s,onError:l,name:p,args:d})=>{const c=q0++;t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🛫 "+p,subtitle:"start",data:{store:xt(e.$id),action:xt(p),args:d},groupId:c}}),s(m=>{vr=void 0,t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🛬 "+p,subtitle:"end",data:{store:xt(e.$id),action:xt(p),args:d,result:m},groupId:c}})}),l(m=>{vr=void 0,t.addTimelineEvent({layerId:Yr,event:{time:o(),logType:"error",title:"💥 "+p,subtitle:"end",data:{store:xt(e.$id),action:xt(p),args:d,error:m},groupId:c}})})},!0),e._customProperties.forEach(s=>{i.watch(()=>i.unref(e[s]),(l,p)=>{t.notifyComponentUpdate(),t.sendInspectorState(Ae),Do&&t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"Change",subtitle:s,data:{newValue:l,oldValue:p},groupId:vr}})},{deep:!0})}),e.$subscribe(({events:s,type:l},p)=>{if(t.notifyComponentUpdate(),t.sendInspectorState(Ae),!Do)return;const d={time:o(),title:TC(l),data:MC({store:xt(e.$id)},EC(s)),groupId:vr};l===Ot.patchFunction?d.subtitle="⤵️":l===Ot.patchObject?d.subtitle="🧩":s&&!Array.isArray(s)&&(d.subtitle=s.type),s&&(d.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:s}}),t.addTimelineEvent({layerId:Yr,event:d})},{detached:!0,flush:"sync"});const n=e._hotUpdate;e._hotUpdate=i.markRaw(s=>{n(s),t.addTimelineEvent({layerId:Yr,event:{time:o(),title:"🔥 "+e.$id,subtitle:"HMR update",data:{store:xt(e.$id),info:xt("HMR update")}}}),t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae)});const{$dispose:a}=e;e.$dispose=()=>{a(),t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae),t.getSettings().logStoreChanges&&we(`Disposed "${e.$id}" store 🗑`)},t.notifyComponentUpdate(),t.sendInspectorTree(Ae),t.sendInspectorState(Ae),t.getSettings().logStoreChanges&&we(`"${e.$id}" store installed 🆕`)})}let q0=0,vr;function W0(r,e,t){const o=e.reduce((n,a)=>(n[a]=i.toRaw(r)[a],n),{});for(const n in o)r[n]=function(){const a=q0,s=t?new Proxy(r,{get(...p){return vr=a,Reflect.get(...p)},set(...p){return vr=a,Reflect.set(...p)}}):r;vr=a;const l=o[n].apply(s,arguments);return vr=void 0,l}}function PC({app:r,store:e,options:t}){if(!e.$id.startsWith("__hot:")){if(e._isOptionsAPI=!!t.state,!e._p._testing){W0(e,Object.keys(t.actions),e._isOptionsAPI);const o=e._hotUpdate;i.toRaw(e)._hotUpdate=function(n){o.apply(this,arguments),W0(e,Object.keys(n._hmrPayload.actions),!!e._isOptionsAPI)}}NC(r,e)}}function U0(){const r=i.effectScope(!0),e=r.run(()=>i.ref({}));let t=[],o=[];const n=i.markRaw({install(a){Tn(n),n._a=a,a.provide(O0,n),a.config.globalProperties.$pinia=n,process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr&&BC(a,n),o.forEach(s=>t.push(s)),o=[]},use(a){return this._a?t.push(a):o.push(a),this},_p:t,_a:null,_e:r,_s:new Map,state:e});return process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr&&typeof Proxy<"u"&&n.use(PC),n}function G0(r,e){for(const t in e){const o=e[t];if(!(t in r))continue;const n=r[t];Jr(n)&&Jr(o)&&!i.isRef(o)&&!i.isReactive(o)?r[t]=G0(n,o):r[t]=o}return r}const K0=()=>{};function J0(r,e,t,o=K0){r.push(e);const n=()=>{const a=r.indexOf(e);a>-1&&(r.splice(a,1),o())};return!t&&i.getCurrentScope()&&i.onScopeDispose(n),n}function Lo(r,...e){r.slice().forEach(t=>{t(...e)})}const DC=r=>r(),Y0=Symbol(),El=Symbol();function Tl(r,e){r instanceof Map&&e instanceof Map?e.forEach((t,o)=>r.set(o,t)):r instanceof Set&&e instanceof Set&&e.forEach(r.add,r);for(const t in e){if(!e.hasOwnProperty(t))continue;const o=e[t],n=r[t];Jr(n)&&Jr(o)&&r.hasOwnProperty(t)&&!i.isRef(o)&&!i.isReactive(o)?r[t]=Tl(n,o):r[t]=o}return r}const LC=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function AC(r){return!Jr(r)||!r.hasOwnProperty(LC)}const{assign:dt}=Object;function X0(r){return!!(i.isRef(r)&&r.effect)}function Q0(r,e,t,o){const{state:n,actions:a,getters:s}=e,l=t.state.value[r];let p;function d(){!l&&(process.env.NODE_ENV==="production"||!o)&&(t.state.value[r]=n?n():{});const c=process.env.NODE_ENV!=="production"&&o?i.toRefs(i.ref(n?n():{}).value):i.toRefs(t.state.value[r]);return dt(c,a,Object.keys(s||{}).reduce((m,b)=>(process.env.NODE_ENV!=="production"&&b in c&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${b}" in store "${r}".`),m[b]=i.markRaw(i.computed(()=>{Tn(t);const u=t._s.get(r);return s[b].call(u,u)})),m),{}))}return p=Ml(r,d,e,t,o,!0),p}function Ml(r,e,t={},o,n,a){let s;const l=dt({actions:{}},t);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const p={deep:!0};process.env.NODE_ENV!=="production"&&(p.onTrigger=M=>{d?u=M:d==!1&&!C._hotUpdating&&(Array.isArray(u)?u.push(M):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let d,c,m=[],b=[],u;const g=o.state.value[r];!a&&!g&&(process.env.NODE_ENV==="production"||!n)&&(o.state.value[r]={});const f=i.ref({});let x;function y(M){let B;d=c=!1,process.env.NODE_ENV!=="production"&&(u=[]),typeof M=="function"?(M(o.state.value[r]),B={type:Ot.patchFunction,storeId:r,events:u}):(Tl(o.state.value[r],M),B={type:Ot.patchObject,payload:M,storeId:r,events:u});const D=x=Symbol();i.nextTick().then(()=>{x===D&&(d=!0)}),c=!0,Lo(m,B,o.state.value[r])}const w=a?function(){const{state:B}=t,D=B?B():{};this.$patch(z=>{dt(z,D)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${r}" is built using the setup syntax and does not implement $reset().`)}:K0;function v(){s.stop(),m=[],b=[],o._s.delete(r)}const h=(M,B="")=>{if(Y0 in M)return M[El]=B,M;const D=function(){Tn(o);const z=Array.from(arguments),J=[],Y=[];function Z(U){J.push(U)}function $(U){Y.push(U)}Lo(b,{args:z,name:D[El],store:C,after:Z,onError:$});let ee;try{ee=M.apply(this&&this.$id===r?this:C,z)}catch(U){throw Lo(Y,U),U}return ee instanceof Promise?ee.then(U=>(Lo(J,U),U)).catch(U=>(Lo(Y,U),Promise.reject(U))):(Lo(J,ee),ee)};return D[Y0]=!0,D[El]=B,D},S=i.markRaw({actions:{},getters:{},state:[],hotState:f}),k={_p:o,$id:r,$onAction:J0.bind(null,b),$patch:y,$reset:w,$subscribe(M,B={}){const D=J0(m,M,B.detached,()=>z()),z=s.run(()=>i.watch(()=>o.state.value[r],J=>{(B.flush==="sync"?c:d)&&M({storeId:r,type:Ot.direct,events:u},J)},dt({},p,B)));return D},$dispose:v},C=i.reactive(process.env.NODE_ENV!=="production"||process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr?dt({_hmrPayload:S,_customProperties:i.markRaw(new Set)},k):k);o._s.set(r,C);const V=(o._a&&o._a.runWithContext||DC)(()=>o._e.run(()=>(s=i.effectScope()).run(()=>e({action:h}))));for(const M in V){const B=V[M];if(i.isRef(B)&&!X0(B)||i.isReactive(B))process.env.NODE_ENV!=="production"&&n?aa(f.value,M,i.toRef(V,M)):a||(g&&AC(B)&&(i.isRef(B)?B.value=g[M]:Tl(B,g[M])),o.state.value[r][M]=B),process.env.NODE_ENV!=="production"&&S.state.push(M);else if(typeof B=="function"){const D=process.env.NODE_ENV!=="production"&&n?B:h(B,M);V[M]=D,process.env.NODE_ENV!=="production"&&(S.actions[M]=B),l.actions[M]=B}else process.env.NODE_ENV!=="production"&&X0(B)&&(S.getters[M]=a?t.getters[M]:B,wr&&(V._getters||(V._getters=i.markRaw([]))).push(M))}if(dt(C,V),dt(i.toRaw(C),V),Object.defineProperty(C,"$state",{get:()=>process.env.NODE_ENV!=="production"&&n?f.value:o.state.value[r],set:M=>{if(process.env.NODE_ENV!=="production"&&n)throw new Error("cannot set hotState");y(B=>{dt(B,M)})}}),process.env.NODE_ENV!=="production"&&(C._hotUpdate=i.markRaw(M=>{C._hotUpdating=!0,M._hmrPayload.state.forEach(B=>{if(B in C.$state){const D=M.$state[B],z=C.$state[B];typeof D=="object"&&Jr(D)&&Jr(z)?G0(D,z):M.$state[B]=z}aa(C,B,i.toRef(M.$state,B))}),Object.keys(C.$state).forEach(B=>{B in M.$state||vl(C,B)}),d=!1,c=!1,o.state.value[r]=i.toRef(M._hmrPayload,"hotState"),c=!0,i.nextTick().then(()=>{d=!0});for(const B in M._hmrPayload.actions){const D=M[B];aa(C,B,h(D,B))}for(const B in M._hmrPayload.getters){const D=M._hmrPayload.getters[B],z=a?i.computed(()=>(Tn(o),D.call(C,C))):D;aa(C,B,z)}Object.keys(C._hmrPayload.getters).forEach(B=>{B in M._hmrPayload.getters||vl(C,B)}),Object.keys(C._hmrPayload.actions).forEach(B=>{B in M._hmrPayload.actions||vl(C,B)}),C._hmrPayload=M._hmrPayload,C._getters=M._getters,C._hotUpdating=!1})),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr){const M={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(B=>{Object.defineProperty(C,B,dt({value:C[B]},M))})}return o._p.forEach(M=>{if(process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&wr){const B=s.run(()=>M({store:C,app:o._a,pinia:o,options:l}));Object.keys(B||{}).forEach(D=>C._customProperties.add(D)),dt(C,B)}else dt(C,s.run(()=>M({store:C,app:o._a,pinia:o,options:l})))}),process.env.NODE_ENV!=="production"&&C.$state&&typeof C.$state=="object"&&typeof C.$state.constructor=="function"&&!C.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be
130
130
  state: () => new MyClass()
131
- Found in store "${C.$id}".`),g&&a&&t.hydrate&&t.hydrate(C.$state,g),d=!0,c=!0,C}/*! #__NO_SIDE_EFFECTS__ */function CC(r,e,t){let o,n;const a=typeof e=="function";o=r,n=a?t:e;function s(l,p){const d=i.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&En&&En._testing?null:l)||(d?i.inject(eb,null):null),l&&Tn(l),process.env.NODE_ENV!=="production"&&!En)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
131
+ Found in store "${C.$id}".`),g&&a&&t.hydrate&&t.hydrate(C.$state,g),d=!0,c=!0,C}/*! #__NO_SIDE_EFFECTS__ */function OC(r,e,t){let o,n;const a=typeof e=="function";o=r,n=a?t:e;function s(l,p){const d=i.hasInjectionContext();if(l=(process.env.NODE_ENV==="test"&&En&&En._testing?null:l)||(d?i.inject(O0,null):null),l&&Tn(l),process.env.NODE_ENV!=="production"&&!En)throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
132
132
  See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
133
- This will fail in production.`);l=En,l._s.has(o)||(a?Ml(o,e,n,l):fb(o,n,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const c=l._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const m="__hot:"+o,b=a?Ml(m,e,n,l,!0):fb(m,dt({},n),l,!0);p._hotUpdate(b),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&wr){const m=i.getCurrentInstance();if(m&&m.proxy&&!p){const b=m.proxy,u="_pStores"in b?b._pStores:b._pStores={};u[o]=c}}return c}return s.$id=o,s}const hb=CC("pageBuilderState",{state:()=>({componentArrayAddMethod:null,localStorageItemName:null,showModalTipTap:!1,menuRight:!0,borderStyle:null,borderWidth:null,borderColor:null,borderRadiusGlobal:null,borderRadiusTopLeft:null,borderRadiusTopRight:null,borderRadiusBottomleft:null,borderRadiusBottomRight:null,elementContainsHyperlink:null,hyperlinkAbility:null,hyperlinkInput:null,hyperlinkMessage:null,hyperlinkError:null,hyberlinkEnable:!1,openHyperlinkinkInNewTab:null,opacity:null,backgroundOpacity:null,textAreaVueModel:null,currentClasses:[],currentStyles:{},fontVerticalPadding:null,fontHorizontalPadding:null,fontVerticalMargin:null,fontHorizontalMargin:null,fontStyle:null,fontFamily:null,fontWeight:null,fontBase:null,fontDesktop:null,fontTablet:null,fontMobile:null,backgroundColor:null,textColor:null,element:null,component:null,components:[],basePrimaryImage:null,configPageBuilder:null,showModalHTMLEditor:!1,applyImageToSelection:{src:""},currentPreviewImage:null,builderStarted:!1,isLoadingGlobal:!0,isSaving:!1,hasLocalDraftForUpdate:!1,isResumeEditing:!1,isRestoring:!1,currentLanguage:null,historyIndex:-1,historyLength:0}),getters:{getComponentArrayAddMethod(r){return r.componentArrayAddMethod},getLocalStorageItemName(r){return r.localStorageItemName},getShowModalTipTap(r){return r.showModalTipTap},getMenuRight(r){return r.menuRight},getBorderStyle(r){return r.borderStyle},getBorderWidth(r){return r.borderWidth},getBorderColor(r){return r.borderColor},getBorderRadiusGlobal(r){return r.borderRadiusGlobal},getBorderRadiusTopLeft(r){return r.borderRadiusTopLeft},getBorderRadiusTopRight(r){return r.borderRadiusTopRight},getBorderRadiusBottomleft(r){return r.borderRadiusBottomleft},getBorderRadiusBottomRight(r){return r.borderRadiusBottomRight},getElementContainsHyperlink(r){return r.elementContainsHyperlink},getHyperlinkAbility(r){return r.hyperlinkAbility},getHyperlinkInput(r){return r.hyperlinkInput},getHyperlinkMessage(r){return r.hyperlinkMessage},getHyperlinkError(r){return r.hyperlinkError},getHyberlinkEnable(r){return r.hyberlinkEnable},getOpenHyperlinkInNewTab(r){return r.openHyperlinkinkInNewTab},getOpacity(r){return r.opacity},getBackgroundOpacity(r){return r.backgroundOpacity},getTextAreaVueModel(r){return r.textAreaVueModel},getCurrentClasses(r){return r.currentClasses},getCurrentStyles(r){return r.currentStyles},getFontStyle(r){return r.fontStyle},getFontVerticalPadding(r){return r.fontVerticalPadding},getFontHorizontalPadding(r){return r.fontHorizontalPadding},getFontVerticalMargin(r){return r.fontVerticalMargin},getFontHorizontalMargin(r){return r.fontHorizontalMargin},getFontFamily(r){return r.fontFamily},getFontWeight(r){return r.fontWeight},getFontBase(r){return r.fontBase},getFontDesktop(r){return r.fontDesktop},getFontTablet(r){return r.fontTablet},getFontMobile(r){return r.fontMobile},getBackgroundColor(r){return r.backgroundColor},getTextColor(r){return r.textColor},getElement(r){return r.element},getComponent(r){return r.component},getComponents(r){return r.components},getBasePrimaryImage(r){return r.basePrimaryImage},getPageBuilderConfig(r){return r.configPageBuilder},getShowModalHTMLEditor(r){return r.showModalHTMLEditor},getApplyImageToSelection(r){return r.applyImageToSelection},getCurrentPreviewImage(r){return r.currentPreviewImage},getBuilderStarted:r=>r.builderStarted,getIsLoadingGlobal:r=>r.isLoadingGlobal,getIsSaving:r=>r.isSaving,getHasLocalDraftForUpdate:r=>r.hasLocalDraftForUpdate,getIsLoadingResumeEditing:r=>r.isResumeEditing,getIsRestoring:r=>r.isRestoring,getCurrentLanguage:r=>r.currentLanguage,getHistoryIndex:r=>r.historyIndex,getHistoryLength:r=>r.historyLength},actions:{setComponentArrayAddMethod(r){this.componentArrayAddMethod=r},setLocalStorageItemName(r){this.localStorageItemName=r},setShowModalTipTap(r){this.showModalTipTap=r},setMenuRight(r){this.menuRight=r},setBorderStyle(r){this.borderStyle=r},setBorderWidth(r){this.borderWidth=r},setBorderColor(r){this.borderColor=r},setBorderRadiusGlobal(r){this.borderRadiusGlobal=r},setBorderRadiusTopLeft(r){this.borderRadiusTopLeft=r},setBorderRadiusTopRight(r){this.borderRadiusTopRight=r},setBorderRadiusBottomleft(r){this.borderRadiusBottomleft=r},setBorderRadiusBottomRight(r){this.borderRadiusBottomRight=r},setElementContainsHyperlink(r){this.elementContainsHyperlink=r},setHyperlinkAbility(r){this.hyperlinkAbility=r},setHyperlinkInput(r){this.hyperlinkInput=r},setHyperlinkMessage(r){this.hyperlinkMessage=r},setHyperlinkError(r){this.hyperlinkError=r},setHyberlinkEnable(r){this.hyberlinkEnable=r},setOpenHyperlinkInNewTab(r){this.openHyperlinkinkInNewTab=r},setOpacity(r){this.opacity=r},setBackgroundOpacity(r){this.backgroundOpacity=r},setTextAreaVueModel(r){this.textAreaVueModel=r},setClass(r){this.currentClasses=[...this.currentClasses,r]},removeClass(r){this.currentClasses=this.currentClasses.filter(e=>e!==r)},setCurrentClasses(r){this.currentClasses=Array.from(r)},setCurrentStyles(r){this.currentStyles=r},setFontVerticalPadding(r){this.fontVerticalPadding=r},setFontHorizontalPadding(r){this.fontHorizontalPadding=r},setFontVerticalMargin(r){this.fontVerticalMargin=r},setFontHorizontalMargin(r){this.fontHorizontalMargin=r},setFontStyle(r){this.fontStyle=r},setFontFamily(r){this.fontFamily=r},setFontWeight(r){this.fontWeight=r},setFontBase(r){this.fontBase=r},setFontDesktop(r){this.fontDesktop=r},setFontTablet(r){this.fontTablet=r},setFontMobile(r){this.fontMobile=r},setBackgroundColor(r){this.backgroundColor=r},setTextColor(r){this.textColor=r},setElement(r){this.element=null,i.nextTick(()=>{this.element=r})},setComponent(r){if(!r){this.element=null,this.component=null;return}this.component=null,i.nextTick(()=>{this.component=r})},setComponents(r){this.components=[],i.nextTick(()=>{this.components=r||[]})},setPushComponents(r){const e=r.componentArrayAddMethod??"push";e==="push"?this.components.push(r.component):e==="unshift"&&this.components.unshift(r.component)},setBasePrimaryImage(r){this.element&&(this.element.src=r??void 0),this.basePrimaryImage=r},setCurrentLayoutPreview(r){localStorage.setItem("preview",r)},setPageBuilderConfig(r){this.configPageBuilder=r},setShowModalHTMLEditor(r){this.showModalHTMLEditor=r},setApplyImageToSelection(r){this.applyImageToSelection=r},setCurrentPreviewImage(r){this.currentPreviewImage=r},setBuilderStarted(r){this.builderStarted=r},setIsLoadingGlobal(r){this.isLoadingGlobal=r},setIsSaving(r){this.isSaving=r},setHasLocalDraftForUpdate(r){this.hasLocalDraftForUpdate=r},setIsLoadingResumeEditing(r){this.isResumeEditing=r},setIsRestoring(r){this.isRestoring=r},setCurrentLanguage(r){this.currentLanguage=r},setHistoryIndex(r){this.historyIndex=r},setHistoryLength(r){this.historyLength=r}}}),Bl=cb(),ne=hb(Bl),EC={class:"pbx-myInputGroup"},TC={class:"pbx-myPrimaryInputLabel",for:"roles"},MC={key:0,class:"pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"},BC={class:"pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start"},NC={class:"pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear"},PC={key:0},DC={class:"pbx-relative pbx-rounded-lg"},LC={class:"pbx-flex pbx-justify-between pbx-myPrimaryGap pbx-items-center pbx-pb-2 pbx-mb-2 pbx-px-4 pbx-overflow-x-auto pbx-border-0 pbx-border-b pbx-border-solid pbx-border-gray-200"},AC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max pbx-p-1 pbx-rounded-full pbx-border-solid pbx-border pbx-border-gray-200 pbx-shadow-sm"},OC={class:"pbx-flex pbx-items-center pbx-p-1 pbx-rounded-full pbx-border-solid pbx-border pbx-border-gray-200 pbx-shadow-sm"},VC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},IC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},_C={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},RC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},HC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},zC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},FC={__name:"TipTapInput",setup(r){const e=ie(),{translate:t}=pe(),o=ne,n=i.ref(!1),a=i.ref(""),s=i.ref(1),l=i.ref(""),p=i.ref(""),d=i.ref(""),c=i.ref(null),m=i.ref(null),b=i.ref(null),u=i.ref(null),g=i.ref(null),f=i.computed(()=>o.getElement),x=i.ref(""),y=i.computed(()=>v.value?v.value.getHTML():null),w=i.ref(0);i.watch(f,B=>{const D=document.createElement("div");if(B){D.innerHTML=B;const F=D.textContent;w.value=F.length}});const v=ES({content:"",extensions:[E4,X4.configure({openOnClick:!1})],editorProps:{attributes:{class:"prose-sm sm:prose-sm lg:prose-sm focus:outline-none"}}});i.watch(y,async B=>{e.isSelectedElementValidText()&&f.value&&(o.setTextAreaVueModel(B),typeof B=="string"&&B!==x.value&&await e.handleTextInput(B))});const h=function(){e.isSelectedElementValidText()&&v.value&&v.value.commands.setContent(f.value.innerHTML)};i.watch(f,()=>{h()});const S=i.ref(""),k=i.ref(""),C=i.ref(null);i.watch(S,B=>{k.value=B});const L=function(){S.value=v.value.getAttributes("link").href,n.value=!0,a.value="success",s.value=2,l.value=t("Enter URL"),p.value=t("Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address."),d.value=t("Close"),c.value=S.value?"Remove url":null,m.value=t("Save"),b.value=function(){n.value=!1,C.value=null},u.value=function(){v.value.chain().focus().extendMarkRange("link").unsetLink().run(),n.value=!1},g.value=function(){const B=V();B||(B||M(),n.value=!1)}},V=function(){C.value=null;const B=/^https?:\/\//,D=i.ref(!0);return D.value=B.test(k.value),D.value===!1?(C.value="The provided URL is invalid. Please ensure that it begins with 'https://' for proper formatting and security.",!0):!1},M=function(){v.value.chain().focus().extendMarkRange("link").setLink({href:k.value}).run()};return i.onBeforeMount(()=>{var B;(B=v.value)==null||B.destroy()}),i.onMounted(()=>{h()}),(B,D)=>{const F=i.resolveComponent("editor-content");return i.openBlock(),i.createElementBlock("div",null,[i.createVNode(Zt,{maxWidth:"4xl",showDynamicModalBuilder:n.value,type:a.value,gridColumnAmount:s.value,title:l.value,description:p.value,firstButtonText:d.value,secondButtonText:c.value,thirdButtonText:m.value,onFirstModalButtonFunctionDynamicModalBuilder:b.value,onSecondModalButtonFunctionDynamicModalBuilder:u.value,onThirdModalButtonFunctionDynamicModalBuilder:g.value},{default:i.withCtx(()=>[D[7]||(D[7]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",null,[i.createElementVNode("div",EC,[i.createElementVNode("label",TC,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Enter URL")),1)]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=q=>S.value=q),class:"pbx-myPrimaryInput pbx-mt-1 pbx-w-full",type:"url",placeholder:"url"},null,512),[[i.vModelText,S.value]]),C.value?(i.openBlock(),i.createElementBlock("div",MC,[i.createElementVNode("p",BC,i.toDisplayString(C.value),1)])):i.createCommentVNode("",!0)])])]),_:1,__:[7]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",NC,[i.unref(e).isSelectedElementValidText()&&i.unref(v)?(i.openBlock(),i.createElementBlock("div",PC,[i.createElementVNode("div",DC,[i.createElementVNode("div",LC,[i.createElementVNode("div",null,[i.createElementVNode("div",null,[i.createElementVNode("div",AC,[i.createElementVNode("button",{onClick:D[1]||(D[1]=q=>i.unref(e).toggleTipTapModal(!1)),type:"button",class:"pbx-myPrimaryTag pbx-cursor-pointer"},[D[8]||(D[8]=i.createElementVNode("span",{class:"material-symbols-outlined"}," save ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Save")),1)])])])]),i.createElementVNode("div",OC,[i.createElementVNode("div",VC,[i.createElementVNode("button",{onClick:D[2]||(D[2]=q=>i.unref(v).chain().focus().setHardBreak().run()),type:"button",class:"pbx-myPrimaryTag pbx-cursor-pointer"},[D[9]||(D[9]=i.createElementVNode("span",{class:"material-symbols-outlined"}," keyboard_return ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Line break")),1)])]),i.createElementVNode("div",IC,[i.createElementVNode("button",{onClick:D[3]||(D[3]=q=>i.unref(v).chain().focus().toggleBold().run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("bold")}])},[D[10]||(D[10]=i.createElementVNode("span",{class:"material-symbols-outlined"}," format_bold ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Bold")),1)],2)]),i.createElementVNode("div",_C,[i.createElementVNode("button",{onClick:L,type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("link")}])},[D[11]||(D[11]=i.createElementVNode("span",{class:"material-symbols-outlined"}," link ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Link")),1)],2)]),i.createElementVNode("div",RC,[i.createElementVNode("button",{onClick:D[4]||(D[4]=q=>i.unref(v).chain().focus().toggleHeading({level:2}).run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("heading",{level:2})}])},[D[12]||(D[12]=i.createElementVNode("span",{class:"material-symbols-outlined"}," titlecase ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Header 2")),1)],2)]),i.createElementVNode("div",HC,[i.createElementVNode("button",{onClick:D[5]||(D[5]=q=>i.unref(v).chain().focus().toggleHeading({level:3}).run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("heading",{level:3})}])},[D[13]||(D[13]=i.createElementVNode("span",{class:"material-symbols-outlined"}," titlecase ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Header 3")),1)],2)]),i.createElementVNode("div",zC,[i.createElementVNode("button",{onClick:D[6]||(D[6]=q=>i.unref(v).chain().focus().toggleBulletList().run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("bulletList")}])},[D[14]||(D[14]=i.createElementVNode("span",{class:"material-symbols-outlined"}," list ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("List")),1)],2)])])]),i.unref(v)?(i.openBlock(),i.createBlock(F,{key:0,id:"page-builder-editor",editor:i.unref(v),class:"pbx-p-2 pbx-prounded-lg lg:pbx-min-h-[20rem] lg:pbx-max-h-[30rem] md:pbx-min-h-[20rem] md:pbx-max-h-[20rem] pbx-min-h-[20rem] pbx-max-h-[20rem] pbx-overflow-y-auto"},null,8,["editor"])):i.createCommentVNode("",!0)])])):i.createCommentVNode("",!0)])])}}},ma=(r,e)=>{const t=r.__vccOpts||r;for(const[o,n]of e)t[o]=n;return t},jC={},qC={class:"pbx-min-h-40"};function WC(r,e){return i.openBlock(),i.createElementBlock("div",qC,e[0]||(e[0]=[i.createElementVNode("p",{class:"pbx-myPrimaryParagraph"},[i.createTextVNode(" Provide your own Media Library Component to integrate a custom media picker into the Page Builder. "),i.createElementVNode("br"),i.createTextVNode(" This allows full control over how media is selected and inserted. ")],-1)]))}const UC=ma(jC,[["render",WC]]),GC={key:0,class:"pbx-w-full"},KC={key:1},yb={__name:"MediaLibraryModal",props:{title:{type:String,required:!0},description:{required:!0},firstButtonText:{type:String},secondButtonText:{type:String},thirdButtonText:{type:String},open:{required:!0},customMediaComponent:{type:Object,default:null}},emits:["firstMediaButtonFunction"],setup(r,{emit:e}){const t=e,o=function(){t("firstMediaButtonFunction")},n=()=>{o()};return i.provide("closeMediaLibraryModal",n),(a,s)=>(i.openBlock(),i.createBlock(St,{title:r.title,showModalBuilder:r.open,onCloseMainModalBuilder:o,maxWidth:"6xl"},{default:i.withCtx(()=>[r.customMediaComponent?(i.openBlock(),i.createElementBlock("div",GC,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.customMediaComponent)))])):(i.openBlock(),i.createElementBlock("div",KC,[i.createVNode(UC)]))]),_:1},8,["title","showModalBuilder"]))}};function JC(r,e,t){let o=i.ref(t==null?void 0:t.value),n=i.computed(()=>r.value!==void 0);return[i.computed(()=>n.value?r.value:o.value),function(a){return n.value||(o.value=a),e==null?void 0:e(a)}]}var wb;let YC=Symbol("headlessui.useid"),XC=0;const ba=(wb=jl.useId)!=null?wb:function(){return jl.inject(YC,()=>`${++XC}`)()};function de(r){var e;if(r==null||r.value==null)return null;let t=(e=r.value.$el)!=null?e:r.value;return t instanceof Node?t:null}function ft(r,e,...t){if(r in e){let n=e[r];return typeof n=="function"?n(...t):n}let o=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,ft),o}var QC=Object.defineProperty,ZC=(r,e,t)=>e in r?QC(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,vb=(r,e,t)=>(ZC(r,typeof e!="symbol"?e+"":e,t),t);let $C=class{constructor(){vb(this,"current",this.detect()),vb(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Nl=new $C;function eE(r){if(Nl.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty("value")){let e=de(r);if(e)return e.ownerDocument}return document}let kb=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var tE=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(tE||{}),rE=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(rE||{}),oE=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(oE||{}),Pl=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(Pl||{});function Sb(r,e=0){var t;return r===((t=eE(r))==null?void 0:t.body)?!1:ft(e,{0(){return r.matches(kb)},1(){let o=r;for(;o!==null;){if(o.matches(kb))return!0;o=o.parentElement}return!1}})}var nE=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(nE||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function iE(r,e=t=>t){return r.slice().sort((t,o)=>{let n=e(t),a=e(o);if(n===null||a===null)return 0;let s=n.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function aE(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function sE(){return/Android/gi.test(window.navigator.userAgent)}function lE(){return aE()||sE()}function ua(r,e,t){Nl.isServer||i.watchEffect(o=>{document.addEventListener(r,e,t),o(()=>document.removeEventListener(r,e,t))})}function pE(r,e,t){Nl.isServer||i.watchEffect(o=>{window.addEventListener(r,e,t),o(()=>window.removeEventListener(r,e,t))})}function dE(r,e,t=i.computed(()=>!0)){function o(a,s){if(!t.value||a.defaultPrevented)return;let l=s(a);if(l===null||!l.getRootNode().contains(l))return;let p=function d(c){return typeof c=="function"?d(c()):Array.isArray(c)||c instanceof Set?c:[c]}(r);for(let d of p){if(d===null)continue;let c=d instanceof HTMLElement?d:de(d);if(c!=null&&c.contains(l)||a.composed&&a.composedPath().includes(c))return}return!Sb(l,Pl.Loose)&&l.tabIndex!==-1&&a.preventDefault(),e(a,l)}let n=i.ref(null);ua("pointerdown",a=>{var s,l;t.value&&(n.value=((l=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:l[0])||a.target)},!0),ua("mousedown",a=>{var s,l;t.value&&(n.value=((l=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:l[0])||a.target)},!0),ua("click",a=>{lE()||n.value&&(o(a,()=>n.value),n.value=null)},!0),ua("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),pE("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Cb(r,e){if(r)return r;let t=e??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function cE(r,e){let t=i.ref(Cb(r.value.type,r.value.as));return i.onMounted(()=>{t.value=Cb(r.value.type,r.value.as)}),i.watchEffect(()=>{var o;t.value||de(e)&&de(e)instanceof HTMLButtonElement&&!((o=de(e))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function Eb(r){return[r.screenX,r.screenY]}function mE(){let r=i.ref([-1,-1]);return{wasMoved(e){let t=Eb(e);return r.value[0]===t[0]&&r.value[1]===t[1]?!1:(r.value=t,!0)},update(e){r.value=Eb(e)}}}var Dl=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Dl||{}),bE=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(bE||{});function Ao({visible:r=!0,features:e=0,ourProps:t,theirProps:o,...n}){var a;let s=Mb(o,t),l=Object.assign(n,{props:s});if(r||e&2&&s.static)return Ll(l);if(e&1){let p=(a=s.unmount)==null||a?0:1;return ft(p,{0(){return null},1(){return Ll({...n,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Ll(l)}function Ll({props:r,attrs:e,slots:t,slot:o,name:n}){var a,s;let{as:l,...p}=Bb(r,["unmount","static"]),d=(a=t.default)==null?void 0:a.call(t,o),c={};if(o){let m=!1,b=[];for(let[u,g]of Object.entries(o))typeof g=="boolean"&&(m=!0),g===!0&&b.push(u);m&&(c["data-headlessui-state"]=b.join(" "))}if(l==="template"){if(d=Tb(d??[]),Object.keys(p).length>0||Object.keys(e).length>0){let[m,...b]=d??[];if(!gE(m)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${n} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(p).concat(Object.keys(e)).map(f=>f.trim()).filter((f,x,y)=>y.indexOf(f)===x).sort((f,x)=>f.localeCompare(x)).map(f=>` - ${f}`).join(`
133
+ This will fail in production.`);l=En,l._s.has(o)||(a?Ml(o,e,n,l):Q0(o,n,l),process.env.NODE_ENV!=="production"&&(s._pinia=l));const c=l._s.get(o);if(process.env.NODE_ENV!=="production"&&p){const m="__hot:"+o,b=a?Ml(m,e,n,l,!0):Q0(m,dt({},n),l,!0);p._hotUpdate(b),delete l.state.value[m],l._s.delete(m)}if(process.env.NODE_ENV!=="production"&&wr){const m=i.getCurrentInstance();if(m&&m.proxy&&!p){const b=m.proxy,u="_pStores"in b?b._pStores:b._pStores={};u[o]=c}}return c}return s.$id=o,s}const Z0=OC("pageBuilderState",{state:()=>({componentArrayAddMethod:null,localStorageItemName:null,showModalTipTap:!1,menuRight:!0,borderStyle:null,borderWidth:null,borderColor:null,borderRadiusGlobal:null,borderRadiusTopLeft:null,borderRadiusTopRight:null,borderRadiusBottomleft:null,borderRadiusBottomRight:null,elementContainsHyperlink:null,hyperlinkAbility:null,hyperlinkInput:null,hyperlinkMessage:null,hyperlinkError:null,hyberlinkEnable:!1,openHyperlinkinkInNewTab:null,opacity:null,backgroundOpacity:null,textAreaVueModel:null,currentClasses:[],currentStyles:{},fontVerticalPadding:null,fontHorizontalPadding:null,fontVerticalMargin:null,fontHorizontalMargin:null,fontStyle:null,fontFamily:null,fontWeight:null,fontBase:null,fontDesktop:null,fontTablet:null,fontMobile:null,backgroundColor:null,textColor:null,element:null,component:null,components:[],basePrimaryImage:null,configPageBuilder:null,showModalHTMLEditor:!1,applyImageToSelection:{src:""},currentPreviewImage:null,builderStarted:!1,isLoadingGlobal:!0,isSaving:!1,hasLocalDraftForUpdate:!1,isResumeEditing:!1,isRestoring:!1,currentLanguage:null,historyIndex:-1,historyLength:0}),getters:{getComponentArrayAddMethod(r){return r.componentArrayAddMethod},getLocalStorageItemName(r){return r.localStorageItemName},getShowModalTipTap(r){return r.showModalTipTap},getMenuRight(r){return r.menuRight},getBorderStyle(r){return r.borderStyle},getBorderWidth(r){return r.borderWidth},getBorderColor(r){return r.borderColor},getBorderRadiusGlobal(r){return r.borderRadiusGlobal},getBorderRadiusTopLeft(r){return r.borderRadiusTopLeft},getBorderRadiusTopRight(r){return r.borderRadiusTopRight},getBorderRadiusBottomleft(r){return r.borderRadiusBottomleft},getBorderRadiusBottomRight(r){return r.borderRadiusBottomRight},getElementContainsHyperlink(r){return r.elementContainsHyperlink},getHyperlinkAbility(r){return r.hyperlinkAbility},getHyperlinkInput(r){return r.hyperlinkInput},getHyperlinkMessage(r){return r.hyperlinkMessage},getHyperlinkError(r){return r.hyperlinkError},getHyberlinkEnable(r){return r.hyberlinkEnable},getOpenHyperlinkInNewTab(r){return r.openHyperlinkinkInNewTab},getOpacity(r){return r.opacity},getBackgroundOpacity(r){return r.backgroundOpacity},getTextAreaVueModel(r){return r.textAreaVueModel},getCurrentClasses(r){return r.currentClasses},getCurrentStyles(r){return r.currentStyles},getFontStyle(r){return r.fontStyle},getFontVerticalPadding(r){return r.fontVerticalPadding},getFontHorizontalPadding(r){return r.fontHorizontalPadding},getFontVerticalMargin(r){return r.fontVerticalMargin},getFontHorizontalMargin(r){return r.fontHorizontalMargin},getFontFamily(r){return r.fontFamily},getFontWeight(r){return r.fontWeight},getFontBase(r){return r.fontBase},getFontDesktop(r){return r.fontDesktop},getFontTablet(r){return r.fontTablet},getFontMobile(r){return r.fontMobile},getBackgroundColor(r){return r.backgroundColor},getTextColor(r){return r.textColor},getElement(r){return r.element},getComponent(r){return r.component},getComponents(r){return r.components},getBasePrimaryImage(r){return r.basePrimaryImage},getPageBuilderConfig(r){return r.configPageBuilder},getShowModalHTMLEditor(r){return r.showModalHTMLEditor},getApplyImageToSelection(r){return r.applyImageToSelection},getCurrentPreviewImage(r){return r.currentPreviewImage},getBuilderStarted:r=>r.builderStarted,getIsLoadingGlobal:r=>r.isLoadingGlobal,getIsSaving:r=>r.isSaving,getHasLocalDraftForUpdate:r=>r.hasLocalDraftForUpdate,getIsLoadingResumeEditing:r=>r.isResumeEditing,getIsRestoring:r=>r.isRestoring,getCurrentLanguage:r=>r.currentLanguage,getHistoryIndex:r=>r.historyIndex,getHistoryLength:r=>r.historyLength},actions:{setComponentArrayAddMethod(r){this.componentArrayAddMethod=r},setLocalStorageItemName(r){this.localStorageItemName=r},setShowModalTipTap(r){this.showModalTipTap=r},setMenuRight(r){this.menuRight=r},setBorderStyle(r){this.borderStyle=r},setBorderWidth(r){this.borderWidth=r},setBorderColor(r){this.borderColor=r},setBorderRadiusGlobal(r){this.borderRadiusGlobal=r},setBorderRadiusTopLeft(r){this.borderRadiusTopLeft=r},setBorderRadiusTopRight(r){this.borderRadiusTopRight=r},setBorderRadiusBottomleft(r){this.borderRadiusBottomleft=r},setBorderRadiusBottomRight(r){this.borderRadiusBottomRight=r},setElementContainsHyperlink(r){this.elementContainsHyperlink=r},setHyperlinkAbility(r){this.hyperlinkAbility=r},setHyperlinkInput(r){this.hyperlinkInput=r},setHyperlinkMessage(r){this.hyperlinkMessage=r},setHyperlinkError(r){this.hyperlinkError=r},setHyberlinkEnable(r){this.hyberlinkEnable=r},setOpenHyperlinkInNewTab(r){this.openHyperlinkinkInNewTab=r},setOpacity(r){this.opacity=r},setBackgroundOpacity(r){this.backgroundOpacity=r},setTextAreaVueModel(r){this.textAreaVueModel=r},setClass(r){this.currentClasses=[...this.currentClasses,r]},removeClass(r){this.currentClasses=this.currentClasses.filter(e=>e!==r)},setCurrentClasses(r){this.currentClasses=Array.from(r)},setCurrentStyles(r){this.currentStyles=r},setFontVerticalPadding(r){this.fontVerticalPadding=r},setFontHorizontalPadding(r){this.fontHorizontalPadding=r},setFontVerticalMargin(r){this.fontVerticalMargin=r},setFontHorizontalMargin(r){this.fontHorizontalMargin=r},setFontStyle(r){this.fontStyle=r},setFontFamily(r){this.fontFamily=r},setFontWeight(r){this.fontWeight=r},setFontBase(r){this.fontBase=r},setFontDesktop(r){this.fontDesktop=r},setFontTablet(r){this.fontTablet=r},setFontMobile(r){this.fontMobile=r},setBackgroundColor(r){this.backgroundColor=r},setTextColor(r){this.textColor=r},setElement(r){this.element=null,i.nextTick(()=>{this.element=r})},setComponent(r){if(!r){this.element=null,this.component=null;return}this.component=null,i.nextTick(()=>{this.component=r})},setComponents(r){this.components=[],i.nextTick(()=>{this.components=r||[]})},setPushComponents(r){const e=r.componentArrayAddMethod??"push";e==="push"?this.components.push(r.component):e==="unshift"&&this.components.unshift(r.component)},setBasePrimaryImage(r){this.element&&(this.element.src=r??void 0),this.basePrimaryImage=r},setCurrentLayoutPreview(r){localStorage.setItem("preview",r)},setPageBuilderConfig(r){this.configPageBuilder=r},setShowModalHTMLEditor(r){this.showModalHTMLEditor=r},setApplyImageToSelection(r){this.applyImageToSelection=r},setCurrentPreviewImage(r){this.currentPreviewImage=r},setBuilderStarted(r){this.builderStarted=r},setIsLoadingGlobal(r){this.isLoadingGlobal=r},setIsSaving(r){this.isSaving=r},setHasLocalDraftForUpdate(r){this.hasLocalDraftForUpdate=r},setIsLoadingResumeEditing(r){this.isResumeEditing=r},setIsRestoring(r){this.isRestoring=r},setCurrentLanguage(r){this.currentLanguage=r},setHistoryIndex(r){this.historyIndex=r},setHistoryLength(r){this.historyLength=r}}}),Bl=U0(),ne=Z0(Bl),VC={class:"pbx-myInputGroup"},IC={class:"pbx-myPrimaryInputLabel",for:"roles"},_C={key:0,class:"pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"},RC={class:"pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start"},HC={class:"pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear"},zC={key:0},FC={class:"pbx-relative pbx-rounded-lg"},jC={class:"pbx-flex pbx-justify-between pbx-myPrimaryGap pbx-items-center pbx-pb-2 pbx-mb-2 pbx-px-4 pbx-overflow-x-auto pbx-border-0 pbx-border-b pbx-border-solid pbx-border-gray-200"},qC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max pbx-p-1 pbx-rounded-full pbx-border-solid pbx-border pbx-border-gray-200 pbx-shadow-sm"},WC={class:"pbx-flex pbx-items-center pbx-p-1 pbx-rounded-full pbx-border-solid pbx-border pbx-border-gray-200 pbx-shadow-sm"},UC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},GC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},KC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},JC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},YC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},XC={class:"pbx-px-2 pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},QC={__name:"TipTapInput",setup(r){const e=ie(),{translate:t}=pe(),o=ne,n=i.ref(!1),a=i.ref(""),s=i.ref(1),l=i.ref(""),p=i.ref(""),d=i.ref(""),c=i.ref(null),m=i.ref(null),b=i.ref(null),u=i.ref(null),g=i.ref(null),f=i.computed(()=>o.getElement),x=i.ref(""),y=i.computed(()=>v.value?v.value.getHTML():null),w=i.ref(0);i.watch(f,B=>{const D=document.createElement("div");if(B){D.innerHTML=B;const z=D.textContent;w.value=z.length}});const v=VS({content:"",extensions:[V4,aC.configure({openOnClick:!1})],editorProps:{attributes:{class:"prose-sm sm:prose-sm lg:prose-sm focus:outline-none"}}});i.watch(y,async B=>{e.isSelectedElementValidText()&&f.value&&(o.setTextAreaVueModel(B),typeof B=="string"&&B!==x.value&&await e.handleTextInput(B))});const h=function(){e.isSelectedElementValidText()&&v.value&&v.value.commands.setContent(f.value.innerHTML)};i.watch(f,()=>{h()});const S=i.ref(""),k=i.ref(""),C=i.ref(null);i.watch(S,B=>{k.value=B});const L=function(){S.value=v.value.getAttributes("link").href,n.value=!0,a.value="success",s.value=2,l.value=t("Enter URL"),p.value=t("Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address."),d.value=t("Close"),c.value=S.value?"Remove url":null,m.value=t("Save"),b.value=function(){n.value=!1,C.value=null},u.value=function(){v.value.chain().focus().extendMarkRange("link").unsetLink().run(),n.value=!1},g.value=function(){const B=V();B||(B||M(),n.value=!1)}},V=function(){C.value=null;const B=/^https?:\/\//,D=i.ref(!0);return D.value=B.test(k.value),D.value===!1?(C.value="The provided URL is invalid. Please ensure that it begins with 'https://' for proper formatting and security.",!0):!1},M=function(){v.value.chain().focus().extendMarkRange("link").setLink({href:k.value}).run()};return i.onBeforeMount(()=>{var B;(B=v.value)==null||B.destroy()}),i.onMounted(()=>{h()}),(B,D)=>(i.openBlock(),i.createElementBlock("div",null,[i.createVNode(Zt,{maxWidth:"4xl",showDynamicModalBuilder:n.value,type:a.value,gridColumnAmount:s.value,title:l.value,description:p.value,firstButtonText:d.value,secondButtonText:c.value,thirdButtonText:m.value,onFirstModalButtonFunctionDynamicModalBuilder:b.value,onSecondModalButtonFunctionDynamicModalBuilder:u.value,onThirdModalButtonFunctionDynamicModalBuilder:g.value},{default:i.withCtx(()=>[D[7]||(D[7]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",null,[i.createElementVNode("div",VC,[i.createElementVNode("label",IC,[i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Enter URL")),1)]),i.withDirectives(i.createElementVNode("input",{"onUpdate:modelValue":D[0]||(D[0]=z=>S.value=z),class:"pbx-myPrimaryInput pbx-mt-1 pbx-w-full",type:"url",placeholder:"url"},null,512),[[i.vModelText,S.value]]),C.value?(i.openBlock(),i.createElementBlock("div",_C,[i.createElementVNode("p",RC,i.toDisplayString(C.value),1)])):i.createCommentVNode("",!0)])])]),_:1,__:[7]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",HC,[i.unref(e).isSelectedElementValidText()&&i.unref(v)?(i.openBlock(),i.createElementBlock("div",zC,[i.createElementVNode("div",FC,[i.createElementVNode("div",jC,[i.createElementVNode("div",null,[i.createElementVNode("div",null,[i.createElementVNode("div",qC,[i.createElementVNode("button",{onClick:D[1]||(D[1]=z=>i.unref(e).toggleTipTapModal(!1)),type:"button",class:"pbx-myPrimaryTag pbx-cursor-pointer"},[D[8]||(D[8]=i.createElementVNode("span",{class:"material-symbols-outlined"}," save ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Save")),1)])])])]),i.createElementVNode("div",WC,[i.createElementVNode("div",UC,[i.createElementVNode("button",{onClick:D[2]||(D[2]=z=>i.unref(v).chain().focus().setHardBreak().run()),type:"button",class:"pbx-myPrimaryTag pbx-cursor-pointer"},[D[9]||(D[9]=i.createElementVNode("span",{class:"material-symbols-outlined"}," keyboard_return ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Line break")),1)])]),i.createElementVNode("div",GC,[i.createElementVNode("button",{onClick:D[3]||(D[3]=z=>i.unref(v).chain().focus().toggleBold().run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("bold")}])},[D[10]||(D[10]=i.createElementVNode("span",{class:"material-symbols-outlined"}," format_bold ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Bold")),1)],2)]),i.createElementVNode("div",KC,[i.createElementVNode("button",{onClick:L,type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("link")}])},[D[11]||(D[11]=i.createElementVNode("span",{class:"material-symbols-outlined"}," link ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Link")),1)],2)]),i.createElementVNode("div",JC,[i.createElementVNode("button",{onClick:D[4]||(D[4]=z=>i.unref(v).chain().focus().toggleHeading({level:2}).run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("heading",{level:2})}])},[D[12]||(D[12]=i.createElementVNode("span",{class:"material-symbols-outlined"}," titlecase ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Header 2")),1)],2)]),i.createElementVNode("div",YC,[i.createElementVNode("button",{onClick:D[5]||(D[5]=z=>i.unref(v).chain().focus().toggleHeading({level:3}).run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("heading",{level:3})}])},[D[13]||(D[13]=i.createElementVNode("span",{class:"material-symbols-outlined"}," titlecase ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("Header 3")),1)],2)]),i.createElementVNode("div",XC,[i.createElementVNode("button",{onClick:D[6]||(D[6]=z=>i.unref(v).chain().focus().toggleBulletList().run()),type:"button",class:i.normalizeClass(["pbx-myPrimaryTag pbx-cursor-pointer",{"pbx-bg-myPrimaryLinkColor pbx-text-white":i.unref(v).isActive("bulletList")}])},[D[14]||(D[14]=i.createElementVNode("span",{class:"material-symbols-outlined"}," list ",-1)),i.createElementVNode("span",null,i.toDisplayString(i.unref(t)("List")),1)],2)])])]),i.unref(v)?(i.openBlock(),i.createBlock(i.unref(OS),{key:0,id:"page-builder-editor",editor:i.unref(v),class:"pbx-p-2 pbx-prounded-lg lg:pbx-min-h-[20rem] lg:pbx-max-h-[30rem] md:pbx-min-h-[20rem] md:pbx-max-h-[20rem] pbx-min-h-[20rem] pbx-max-h-[20rem] pbx-overflow-y-auto"},null,8,["editor"])):i.createCommentVNode("",!0)])])):i.createCommentVNode("",!0)])]))}},ma=(r,e)=>{const t=r.__vccOpts||r;for(const[o,n]of e)t[o]=n;return t},ZC={},$C={class:"pbx-min-h-40"};function eE(r,e){return i.openBlock(),i.createElementBlock("div",$C,e[0]||(e[0]=[i.createElementVNode("p",{class:"pbx-myPrimaryParagraph"},[i.createTextVNode(" Provide your own Media Library Component to integrate a custom media picker into the Page Builder. "),i.createElementVNode("br"),i.createTextVNode(" This allows full control over how media is selected and inserted. ")],-1)]))}const tE=ma(ZC,[["render",eE]]),rE={key:0,class:"pbx-w-full"},oE={key:1},$0={__name:"MediaLibraryModal",props:{title:{type:String,required:!0},description:{required:!0},firstButtonText:{type:String},secondButtonText:{type:String},thirdButtonText:{type:String},open:{required:!0},customMediaComponent:{type:Object,default:null}},emits:["firstMediaButtonFunction"],setup(r,{emit:e}){const t=e,o=function(){t("firstMediaButtonFunction")},n=()=>{o()};return i.provide("closeMediaLibraryModal",n),(a,s)=>(i.openBlock(),i.createBlock(St,{title:r.title,showModalBuilder:r.open,onCloseMainModalBuilder:o,maxWidth:"6xl"},{default:i.withCtx(()=>[r.customMediaComponent?(i.openBlock(),i.createElementBlock("div",rE,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.customMediaComponent)))])):(i.openBlock(),i.createElementBlock("div",oE,[i.createVNode(tE)]))]),_:1},8,["title","showModalBuilder"]))}};function nE(r,e,t){let o=i.ref(t==null?void 0:t.value),n=i.computed(()=>r.value!==void 0);return[i.computed(()=>n.value?r.value:o.value),function(a){return n.value||(o.value=a),e==null?void 0:e(a)}]}var ew;let iE=Symbol("headlessui.useid"),aE=0;const ba=(ew=jl.useId)!=null?ew:function(){return jl.inject(iE,()=>`${++aE}`)()};function de(r){var e;if(r==null||r.value==null)return null;let t=(e=r.value.$el)!=null?e:r.value;return t instanceof Node?t:null}function ft(r,e,...t){if(r in e){let n=e[r];return typeof n=="function"?n(...t):n}let o=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(n=>`"${n}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,ft),o}var sE=Object.defineProperty,lE=(r,e,t)=>e in r?sE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,tw=(r,e,t)=>(lE(r,typeof e!="symbol"?e+"":e,t),t);let pE=class{constructor(){tw(this,"current",this.detect()),tw(this,"currentId",0)}set(e){this.current!==e&&(this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},Nl=new pE;function dE(r){if(Nl.isServer)return null;if(r instanceof Node)return r.ownerDocument;if(r!=null&&r.hasOwnProperty("value")){let e=de(r);if(e)return e.ownerDocument}return document}let rw=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var cE=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r))(cE||{}),mE=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(mE||{}),bE=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(bE||{}),Pl=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(Pl||{});function ow(r,e=0){var t;return r===((t=dE(r))==null?void 0:t.body)?!1:ft(e,{0(){return r.matches(rw)},1(){let o=r;for(;o!==null;){if(o.matches(rw))return!0;o=o.parentElement}return!1}})}var uE=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(uE||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function gE(r,e=t=>t){return r.slice().sort((t,o)=>{let n=e(t),a=e(o);if(n===null||a===null)return 0;let s=n.compareDocumentPosition(a);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function xE(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function fE(){return/Android/gi.test(window.navigator.userAgent)}function hE(){return xE()||fE()}function ua(r,e,t){Nl.isServer||i.watchEffect(o=>{document.addEventListener(r,e,t),o(()=>document.removeEventListener(r,e,t))})}function yE(r,e,t){Nl.isServer||i.watchEffect(o=>{window.addEventListener(r,e,t),o(()=>window.removeEventListener(r,e,t))})}function wE(r,e,t=i.computed(()=>!0)){function o(a,s){if(!t.value||a.defaultPrevented)return;let l=s(a);if(l===null||!l.getRootNode().contains(l))return;let p=function d(c){return typeof c=="function"?d(c()):Array.isArray(c)||c instanceof Set?c:[c]}(r);for(let d of p){if(d===null)continue;let c=d instanceof HTMLElement?d:de(d);if(c!=null&&c.contains(l)||a.composed&&a.composedPath().includes(c))return}return!ow(l,Pl.Loose)&&l.tabIndex!==-1&&a.preventDefault(),e(a,l)}let n=i.ref(null);ua("pointerdown",a=>{var s,l;t.value&&(n.value=((l=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:l[0])||a.target)},!0),ua("mousedown",a=>{var s,l;t.value&&(n.value=((l=(s=a.composedPath)==null?void 0:s.call(a))==null?void 0:l[0])||a.target)},!0),ua("click",a=>{hE()||n.value&&(o(a,()=>n.value),n.value=null)},!0),ua("touchend",a=>o(a,()=>a.target instanceof HTMLElement?a.target:null),!0),yE("blur",a=>o(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function nw(r,e){if(r)return r;let t=e??"button";if(typeof t=="string"&&t.toLowerCase()==="button")return"button"}function vE(r,e){let t=i.ref(nw(r.value.type,r.value.as));return i.onMounted(()=>{t.value=nw(r.value.type,r.value.as)}),i.watchEffect(()=>{var o;t.value||de(e)&&de(e)instanceof HTMLButtonElement&&!((o=de(e))!=null&&o.hasAttribute("type"))&&(t.value="button")}),t}function iw(r){return[r.screenX,r.screenY]}function kE(){let r=i.ref([-1,-1]);return{wasMoved(e){let t=iw(e);return r.value[0]===t[0]&&r.value[1]===t[1]?!1:(r.value=t,!0)},update(e){r.value=iw(e)}}}var Dl=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Dl||{}),SE=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(SE||{});function Ao({visible:r=!0,features:e=0,ourProps:t,theirProps:o,...n}){var a;let s=sw(o,t),l=Object.assign(n,{props:s});if(r||e&2&&s.static)return Ll(l);if(e&1){let p=(a=s.unmount)==null||a?0:1;return ft(p,{0(){return null},1(){return Ll({...n,props:{...s,hidden:!0,style:{display:"none"}}})}})}return Ll(l)}function Ll({props:r,attrs:e,slots:t,slot:o,name:n}){var a,s;let{as:l,...p}=lw(r,["unmount","static"]),d=(a=t.default)==null?void 0:a.call(t,o),c={};if(o){let m=!1,b=[];for(let[u,g]of Object.entries(o))typeof g=="boolean"&&(m=!0),g===!0&&b.push(u);m&&(c["data-headlessui-state"]=b.join(" "))}if(l==="template"){if(d=aw(d??[]),Object.keys(p).length>0||Object.keys(e).length>0){let[m,...b]=d??[];if(!EE(m)||b.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${n} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(p).concat(Object.keys(e)).map(f=>f.trim()).filter((f,x,y)=>y.indexOf(f)===x).sort((f,x)=>f.localeCompare(x)).map(f=>` - ${f}`).join(`
134
134
  `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(`
135
135
  `)].join(`
136
- `));let u=Mb((s=m.props)!=null?s:{},p,c),g=i.cloneVNode(m,u,!0);for(let f in u)f.startsWith("on")&&(g.props||(g.props={}),g.props[f]=u[f]);return g}return Array.isArray(d)&&d.length===1?d[0]:d}return i.h(l,Object.assign({},p,c),{default:()=>d})}function Tb(r){return r.flatMap(e=>e.type===i.Fragment?Tb(e.children):[e])}function Mb(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let o of r)for(let n in o)n.startsWith("on")&&typeof o[n]=="function"?(t[n]!=null||(t[n]=[]),t[n].push(o[n])):e[n]=o[n];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(e,{[o](n,...a){let s=t[o];for(let l of s){if(n instanceof Event&&n.defaultPrevented)return;l(n,...a)}}});return e}function uE(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function Bb(r,e=[]){let t=Object.assign({},r);for(let o of e)o in t&&delete t[o];return t}function gE(r){return r==null?!1:typeof r.type=="string"||typeof r.type=="object"||typeof r.type=="function"}var Nb=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Nb||{});let xE=i.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(r,{slots:e,attrs:t}){return()=>{var o;let{features:n,...a}=r,s={"aria-hidden":(n&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ao({ourProps:s,theirProps:a,slot:{},attrs:t,slots:e,name:"Hidden"})}}}),Pb=Symbol("Context");var Mn=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(Mn||{});function fE(){return i.inject(Pb,null)}function hE(r){i.provide(Pb,r)}var ve=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(ve||{});function yE(r){throw new Error("Unexpected object: "+r)}var ze=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(ze||{});function wE(r,e){let t=e.resolveItems();if(t.length<=0)return null;let o=e.resolveActiveIndex(),n=o??-1;switch(r.focus){case 0:{for(let a=0;a<t.length;++a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 1:{n===-1&&(n=t.length);for(let a=n-1;a>=0;--a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=n+1;a<t.length;++a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(e.resolveId(t[a],a,t)===r.id)return a;return o}case 5:return null;default:yE(r)}}function Db(r={},e=null,t=[]){for(let[o,n]of Object.entries(r))Ab(t,Lb(e,o),n);return t}function Lb(r,e){return r?r+"["+e+"]":e}function Ab(r,e,t){if(Array.isArray(t))for(let[o,n]of t.entries())Ab(r,Lb(e,o.toString()),n);else t instanceof Date?r.push([e,t.toISOString()]):typeof t=="boolean"?r.push([e,t?"1":"0"]):typeof t=="string"?r.push([e,t]):typeof t=="number"?r.push([e,`${t}`]):t==null?r.push([e,""]):Db(t,e,r)}let Ob=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function Vb(r){var e,t;let o=(e=r.innerText)!=null?e:"",n=r.cloneNode(!0);if(!(n instanceof HTMLElement))return o;let a=!1;for(let l of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),a=!0;let s=a?(t=n.innerText)!=null?t:"":o;return Ob.test(s)&&(s=s.replace(Ob,"")),s}function vE(r){let e=r.getAttribute("aria-label");if(typeof e=="string")return e.trim();let t=r.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(n=>{let a=document.getElementById(n);if(a){let s=a.getAttribute("aria-label");return typeof s=="string"?s.trim():Vb(a).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return Vb(r).trim()}function kE(r){let e=i.ref(""),t=i.ref("");return()=>{let o=de(r);if(!o)return"";let n=o.innerText;if(e.value===n)return t.value;let a=vE(o).trim().toLowerCase();return e.value=n,t.value=a,a}}function SE(r,e){return r===e}var CE=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(CE||{}),EE=(r=>(r[r.Single=0]="Single",r[r.Multi=1]="Multi",r))(EE||{}),TE=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(TE||{});function ME(r){requestAnimationFrame(()=>requestAnimationFrame(r))}let Ib=Symbol("ListboxContext");function Bn(r){let e=i.inject(Ib,null);if(e===null){let t=new Error(`<${r} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Bn),t}return e}let Nn=i.defineComponent({name:"Listbox",emits:{"update:modelValue":r=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>SE},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(r,{slots:e,attrs:t,emit:o}){let n=i.ref(1),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref([]),d=i.ref(""),c=i.ref(null),m=i.ref(1);function b(v=h=>h){let h=c.value!==null?p.value[c.value]:null,S=iE(v(p.value.slice()),C=>de(C.dataRef.domRef)),k=h?S.indexOf(h):null;return k===-1&&(k=null),{options:S,activeOptionIndex:k}}let u=i.computed(()=>r.multiple?1:0),[g,f]=JC(i.computed(()=>r.modelValue),v=>o("update:modelValue",v),i.computed(()=>r.defaultValue)),x=i.computed(()=>g.value===void 0?ft(u.value,{1:[],0:void 0}):g.value),y={listboxState:n,value:x,mode:u,compare(v,h){if(typeof r.by=="string"){let S=r.by;return(v==null?void 0:v[S])===(h==null?void 0:h[S])}return r.by(v,h)},orientation:i.computed(()=>r.horizontal?"horizontal":"vertical"),labelRef:a,buttonRef:s,optionsRef:l,disabled:i.computed(()=>r.disabled),options:p,searchQuery:d,activeOptionIndex:c,activationTrigger:m,closeListbox(){r.disabled||n.value!==1&&(n.value=1,c.value=null)},openListbox(){r.disabled||n.value!==0&&(n.value=0)},goToOption(v,h,S){if(r.disabled||n.value===1)return;let k=b(),C=wE(v===ze.Specific?{focus:ze.Specific,id:h}:{focus:v},{resolveItems:()=>k.options,resolveActiveIndex:()=>k.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});d.value="",c.value=C,m.value=S??1,p.value=k.options},search(v){if(r.disabled||n.value===1)return;let h=d.value!==""?0:1;d.value+=v.toLowerCase();let S=(c.value!==null?p.value.slice(c.value+h).concat(p.value.slice(0,c.value+h)):p.value).find(C=>C.dataRef.textValue.startsWith(d.value)&&!C.dataRef.disabled),k=S?p.value.indexOf(S):-1;k===-1||k===c.value||(c.value=k,m.value=1)},clearSearch(){r.disabled||n.value!==1&&d.value!==""&&(d.value="")},registerOption(v,h){let S=b(k=>[...k,{id:v,dataRef:h}]);p.value=S.options,c.value=S.activeOptionIndex},unregisterOption(v){let h=b(S=>{let k=S.findIndex(C=>C.id===v);return k!==-1&&S.splice(k,1),S});p.value=h.options,c.value=h.activeOptionIndex,m.value=1},theirOnChange(v){r.disabled||f(v)},select(v){r.disabled||f(ft(u.value,{0:()=>v,1:()=>{let h=i.toRaw(y.value.value).slice(),S=i.toRaw(v),k=h.findIndex(C=>y.compare(S,i.toRaw(C)));return k===-1?h.push(S):h.splice(k,1),h}}))}};dE([s,l],(v,h)=>{var S;y.closeListbox(),Sb(h,Pl.Loose)||(v.preventDefault(),(S=de(s))==null||S.focus())},i.computed(()=>n.value===0)),i.provide(Ib,y),hE(i.computed(()=>ft(n.value,{0:Mn.Open,1:Mn.Closed})));let w=i.computed(()=>{var v;return(v=de(s))==null?void 0:v.closest("form")});return i.onMounted(()=>{i.watch([w],()=>{if(!w.value||r.defaultValue===void 0)return;function v(){y.theirOnChange(r.defaultValue)}return w.value.addEventListener("reset",v),()=>{var h;(h=w.value)==null||h.removeEventListener("reset",v)}},{immediate:!0})}),()=>{let{name:v,modelValue:h,disabled:S,form:k,...C}=r,L={open:n.value===0,disabled:S,value:x.value};return i.h(i.Fragment,[...v!=null&&x.value!=null?Db({[v]:x.value}).map(([V,M])=>i.h(xE,uE({features:Nb.Hidden,key:V,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:k,disabled:S,name:V,value:M}))):[],Ao({ourProps:{},theirProps:{...t,...Bb(C,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:L,slots:e,attrs:t,name:"Listbox"})])}}});i.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(r,{attrs:e,slots:t}){var o;let n=(o=r.id)!=null?o:`headlessui-listbox-label-${ba()}`,a=Bn("ListboxLabel");function s(){var l;(l=de(a.buttonRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:a.listboxState.value===0,disabled:a.disabled.value},{...p}=r,d={id:n,ref:a.labelRef,onClick:s};return Ao({ourProps:d,theirProps:p,slot:l,attrs:e,slots:t,name:"ListboxLabel"})}}});let Xr=i.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(r,{attrs:e,slots:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-button-${ba()}`,s=Bn("ListboxButton");o({el:s.buttonRef,$el:s.buttonRef});function l(m){switch(m.key){case ve.Space:case ve.Enter:case ve.ArrowDown:m.preventDefault(),s.openListbox(),i.nextTick(()=>{var b;(b=de(s.optionsRef))==null||b.focus({preventScroll:!0}),s.value.value||s.goToOption(ze.First)});break;case ve.ArrowUp:m.preventDefault(),s.openListbox(),i.nextTick(()=>{var b;(b=de(s.optionsRef))==null||b.focus({preventScroll:!0}),s.value.value||s.goToOption(ze.Last)});break}}function p(m){switch(m.key){case ve.Space:m.preventDefault();break}}function d(m){s.disabled.value||(s.listboxState.value===0?(s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})})):(m.preventDefault(),s.openListbox(),ME(()=>{var b;return(b=de(s.optionsRef))==null?void 0:b.focus({preventScroll:!0})})))}let c=cE(i.computed(()=>({as:r.as,type:e.type})),s.buttonRef);return()=>{var m,b;let u={open:s.listboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...g}=r,f={ref:s.buttonRef,id:a,type:c.value,"aria-haspopup":"listbox","aria-controls":(m=de(s.optionsRef))==null?void 0:m.id,"aria-expanded":s.listboxState.value===0,"aria-labelledby":s.labelRef.value?[(b=de(s.labelRef))==null?void 0:b.id,a].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:p,onClick:d};return Ao({ourProps:f,theirProps:g,slot:u,attrs:e,slots:t,name:"ListboxButton"})}}}),Pn=i.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(r,{attrs:e,slots:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-options-${ba()}`,s=Bn("ListboxOptions"),l=i.ref(null);o({el:s.optionsRef,$el:s.optionsRef});function p(m){switch(l.value&&clearTimeout(l.value),m.key){case ve.Space:if(s.searchQuery.value!=="")return m.preventDefault(),m.stopPropagation(),s.search(m.key);case ve.Enter:if(m.preventDefault(),m.stopPropagation(),s.activeOptionIndex.value!==null){let b=s.options.value[s.activeOptionIndex.value];s.select(b.dataRef.value)}s.mode.value===0&&(s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})}));break;case ft(s.orientation.value,{vertical:ve.ArrowDown,horizontal:ve.ArrowRight}):return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Next);case ft(s.orientation.value,{vertical:ve.ArrowUp,horizontal:ve.ArrowLeft}):return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Previous);case ve.Home:case ve.PageUp:return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.First);case ve.End:case ve.PageDown:return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Last);case ve.Escape:m.preventDefault(),m.stopPropagation(),s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})});break;case ve.Tab:m.preventDefault(),m.stopPropagation();break;default:m.key.length===1&&(s.search(m.key),l.value=setTimeout(()=>s.clearSearch(),350));break}}let d=fE(),c=i.computed(()=>d!==null?(d.value&Mn.Open)===Mn.Open:s.listboxState.value===0);return()=>{var m,b;let u={open:s.listboxState.value===0},{...g}=r,f={"aria-activedescendant":s.activeOptionIndex.value===null||(m=s.options.value[s.activeOptionIndex.value])==null?void 0:m.id,"aria-multiselectable":s.mode.value===1?!0:void 0,"aria-labelledby":(b=de(s.buttonRef))==null?void 0:b.id,"aria-orientation":s.orientation.value,id:a,onKeydown:p,role:"listbox",tabIndex:0,ref:s.optionsRef};return Ao({ourProps:f,theirProps:g,slot:u,attrs:e,slots:t,features:Dl.RenderStrategy|Dl.Static,visible:c.value,name:"ListboxOptions"})}}}),Dn=i.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(r,{slots:e,attrs:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-option-${ba()}`,s=Bn("ListboxOption"),l=i.ref(null);o({el:l,$el:l});let p=i.computed(()=>s.activeOptionIndex.value!==null?s.options.value[s.activeOptionIndex.value].id===a:!1),d=i.computed(()=>ft(s.mode.value,{0:()=>s.compare(i.toRaw(s.value.value),i.toRaw(r.value)),1:()=>i.toRaw(s.value.value).some(v=>s.compare(i.toRaw(v),i.toRaw(r.value)))})),c=i.computed(()=>ft(s.mode.value,{1:()=>{var v;let h=i.toRaw(s.value.value);return((v=s.options.value.find(S=>h.some(k=>s.compare(i.toRaw(k),i.toRaw(S.dataRef.value)))))==null?void 0:v.id)===a},0:()=>d.value})),m=kE(l),b=i.computed(()=>({disabled:r.disabled,value:r.value,get textValue(){return m()},domRef:l}));i.onMounted(()=>s.registerOption(a,b)),i.onUnmounted(()=>s.unregisterOption(a)),i.onMounted(()=>{i.watch([s.listboxState,d],()=>{s.listboxState.value===0&&d.value&&ft(s.mode.value,{1:()=>{c.value&&s.goToOption(ze.Specific,a)},0:()=>{s.goToOption(ze.Specific,a)}})},{immediate:!0})}),i.watchEffect(()=>{s.listboxState.value===0&&p.value&&s.activationTrigger.value!==0&&i.nextTick(()=>{var v,h;return(h=(v=de(l))==null?void 0:v.scrollIntoView)==null?void 0:h.call(v,{block:"nearest"})})});function u(v){if(r.disabled)return v.preventDefault();s.select(r.value),s.mode.value===0&&(s.closeListbox(),i.nextTick(()=>{var h;return(h=de(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})}))}function g(){if(r.disabled)return s.goToOption(ze.Nothing);s.goToOption(ze.Specific,a)}let f=mE();function x(v){f.update(v)}function y(v){f.wasMoved(v)&&(r.disabled||p.value||s.goToOption(ze.Specific,a,0))}function w(v){f.wasMoved(v)&&(r.disabled||p.value&&s.goToOption(ze.Nothing))}return()=>{let{disabled:v}=r,h={active:p.value,selected:d.value,disabled:v},{value:S,disabled:k,...C}=r,L={id:a,ref:l,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onClick:u,onFocus:g,onPointerenter:x,onMouseenter:x,onPointermove:y,onMousemove:y,onPointerleave:w,onMouseleave:w};return Ao({ourProps:L,theirProps:C,slot:h,attrs:t,slots:e,name:"ListboxOption"})}}});const BE={class:"pbx-relative"},NE={class:"pbx-flex pbx-justify-start pbx-items-center pbx-gap-2"},PE={key:0,class:"material-symbols-outlined"},DE={class:"pbx-flex pbx-flex-col"},LE={class:"pbx-flex pbx-gap-2 pbx-items-center"},AE={key:0,class:"pbx-flex pbx-items-center"},OE={key:1,class:"pbx-flex pbx-items-center"},VE={class:"pbx-ml-3"},_b={__name:"TextColorEditor",props:{globalPageLayout:{Type:Boolean}},setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getTextColor);return i.watch(a,async s=>{n.value=s,await t.initializeElementStyles()},{immediate:!0}),(s,l)=>(i.openBlock(),i.createBlock(i.unref(Nn),{as:"div",modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},{default:i.withCtx(()=>[i.createElementVNode("div",BE,[i.createElementVNode("div",{class:i.normalizeClass([r.globalPageLayout?"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400":"pbx-flex pbx-gap-2 pbx-items-center"])},[r.globalPageLayout?(i.openBlock(),i.createBlock(i.unref(Xr),{key:0,class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white hover:pbx-text-black pbx-text-black pbx-font-sans pbx-font-medium pbx-border-0"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",NE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-600 pbx-rounded-sm pbx-bg-none pbx-border-solid",`pbx-bg-${(p=n.value)==null?void 0:p.replace("pbx-text-","")}`])},null,2),i.createElementVNode("div",null,[i.createElementVNode("div",null,i.toDisplayString(i.unref(e)("Text Color")),1)])]),r.globalPageLayout?(i.openBlock(),i.createElementBlock("span",PE," chevron_right ")):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0),r.globalPageLayout?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xr),{key:1,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",DE,[i.createElementVNode("div",LE,[i.createElementVNode("span",{class:i.normalizeClass(["material-symbols-outlined",`pbx-text-${(p=n.value)==null?void 0:p.replace("pbx-text-","")}`]),style:{"text-shadow":"rgb(0 0 0 / 10%) 1.5px 1.5px 0px"}}," format_color_text ",2)])])]}),_:1}))],2),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-headless-dropdown pbx-absolute pbx-min-w-[12rem] pbx-z-40 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-gray-50 pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(On).textColorVariables,p=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:l[0]||(l[0]=d=>i.unref(t).handleTextColor(n.value)),key:p,value:p},{default:i.withCtx(({active:d,textColor:c})=>[i.createElementVNode("li",{class:i.normalizeClass([d?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[p==="none"?(i.openBlock(),i.createElementBlock("div",AE,l[2]||(l[2]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," invert_colors ",-1),i.createElementVNode("span",{class:"pbx-ml-3"},"Default black",-1)]))):i.createCommentVNode("",!0),p!=="none"?(i.openBlock(),i.createElementBlock("div",OE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${p.replace("pbx-text-","")}`])},null,2),i.createElementVNode("span",VE,i.toDisplayString(p),1)])):i.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}},IE={class:"pbx-relative"},_E={class:"pbx-flex pbx-justify-start pbx-items-center pbx-gap-2"},RE={key:0,class:"material-symbols-outlined"},HE={class:"pbx-flex pbx-flex-col"},zE={class:"pbx-flex pbx-gap-2 pbx-items-center"},FE={key:0,class:"pbx-flex pbx-items-center"},jE={class:"pbx-ml-3"},qE={key:1,class:"pbx-flex pbx-items-center"},WE={class:"pbx-ml-3"},Rb={__name:"BackgroundColorEditor",props:{globalPageLayout:{Type:Boolean}},setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getBackgroundColor);return i.watch(a,async s=>{n.value=s,await t.initializeElementStyles()},{immediate:!0}),(s,l)=>(i.openBlock(),i.createBlock(i.unref(Nn),{as:"div",modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},{default:i.withCtx(()=>[i.createElementVNode("div",IE,[i.createElementVNode("div",{class:i.normalizeClass([r.globalPageLayout?"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400":"pbx-flex pbx-gap-2 pbx-items-center"])},[r.globalPageLayout?(i.openBlock(),i.createBlock(i.unref(Xr),{key:0,class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white hover:pbx-text-black pbx-text-black pbx-font-sans pbx-font-medium pbx-border-0"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",_E,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-600 pbx-rounded-sm pbx-bg-none pbx-border-solid",`pbx-bg-${(p=n.value)==null?void 0:p.replace("pbx-bg-","")}`])},null,2),i.createElementVNode("div",null,i.toDisplayString(i.unref(e)("Background Color")),1)]),r.globalPageLayout?(i.openBlock(),i.createElementBlock("span",RE," chevron_right ")):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0),r.globalPageLayout?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xr),{key:1,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",HE,[i.createElementVNode("div",zE,[i.createElementVNode("span",{class:i.normalizeClass(["material-symbols-outlined",`pbx-text-${(p=n.value)==null?void 0:p.replace("pbx-bg-","")}`]),style:{"text-shadow":"rgb(0 0 0 / 10%) 1.5px 1.5px 0px"}}," format_color_fill ",2)])])]}),_:1}))],2),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-headless-dropdown pbx-absolute pbx-min-w-[12rem] pbx-z-40 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-gray-50 pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(On).backgroundColorVariables,p=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:l[0]||(l[0]=d=>i.unref(t).handleBackgroundColor(n.value)),key:p,value:p},{default:i.withCtx(({active:d,backgroundColor:c})=>[i.createElementVNode("li",{class:i.normalizeClass([d?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[p==="none"?(i.openBlock(),i.createElementBlock("div",FE,[l[2]||(l[2]=i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ",-1)),i.createElementVNode("span",jE,i.toDisplayString(i.unref(e)("Transparent")),1)])):i.createCommentVNode("",!0),p!=="none"?(i.openBlock(),i.createElementBlock("div",qE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${p.replace("pbx-bg-","")}`])},null,2),i.createElementVNode("span",WE,i.toDisplayString(p),1)])):i.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}},UE={class:"pbx-myInputGroup"},GE={class:"pbx-myPrimaryFormOrganizationHeaderDescriptionSection"},KE={class:"pbx-myPrimaryFormOrganizationHeader"},JE={key:0,class:"pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"},YE={class:"pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start"},XE={class:"pbx-overflow-y-auto"},QE={class:"pbx-select-none"},ZE={key:0,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},$E={key:2,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},eT={key:0,class:"pbx-fixed pbx-z-40 pbx-top-10 pbx-right-0 lg:pbx-w-72 md:pbx-w-72 pbx-w-full pbx-select-none"},tT={class:"pbx-rounded-3xl pbx-border pbx-border-gray-100 pbx-bg-white pbx-shadow-lg pbx-pt-4 pbx-pb-4 pbx-flex pbx-flex-col pbx-overflow-y-auto pbx-max-h-[80vh] pbx-mx-4 pbx-px-2"},rT={class:"pbx-flex pbx-flex-col"},oT=["disabled"],nT=["disabled"],iT={class:"pbx-text-sm"},aT={__name:"EditGetElement",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.inject("CustomMediaComponent"),a=i.computed(()=>o.getElement);i.computed(()=>{var ue;return(ue=a.value)==null?void 0:ue.tagName});const s=i.computed(()=>t.canMoveUp()),l=i.computed(()=>t.canMoveDown()),p=i.computed(()=>{const ue=o.getShowModalTipTap;return ue&&h(),ue}),d=i.computed(()=>o.getComponent),c=i.ref(""),m=i.ref(1),b=i.ref(""),u=i.ref(""),g=i.ref(""),f=i.ref(null),x=i.ref(null),y=i.ref(null),w=i.ref(null),v=i.ref(null),h=function(){t.toggleTipTapModal(!0),c.value="success",m.value=2,b.value=e("Manage Content"),u.value=null,g.value=null,f.value=null,x.value="Save",y.value=function(){t.toggleTipTapModal(!1)},v.value=function(){t.toggleTipTapModal(!0)}},S=i.computed(()=>o.getBasePrimaryImage),k=i.ref(!1),C=i.ref(""),L=i.ref(""),V=i.ref(""),M=i.ref(null),B=i.ref(null),D=i.ref(null),F=function(){k.value=!0,C.value=e("Media Library"),L.value=null,V.value=e("Close"),M.value=e(" Select image"),D.value=function(){k.value=!1}},q=i.ref(null),Y=i.ref(""),Z=i.ref(!1),$=function(){q.value=null;const ue=/^https?:\/\//,I=i.ref(!0);return I.value=ue.test(Y.value),I.value===!1?(q.value="The provided URL is invalid. Please ensure that it begins with 'https://' for proper formatting and security.",!0):!1},ee=function(){var I;q.value=null;const ue=a.value&&((I=a.value.firstElementChild)==null?void 0:I.tagName)==="IFRAME"&&a.value.firstElementChild.hasAttribute("src")&&a.value.firstElementChild.getAttribute("src").trim()!==""?a.value.firstElementChild.src:"";Y.value=ue,Z.value=!0,c.value="success",m.value=2,b.value="Add video url",u.value=null,g.value=e("Close"),f.value="Save",x.value=null,y.value=function(){Z.value=!1},w.value=function(){$()||(a.value&&a.value.firstElementChild&&a.value.firstElementChild.tagName==="IFRAME"&&(Y.value=Y.value.replace("watch?v=","embed/"),Y.value=Y.value.replace(/&ab_channel=[^&]*/,"").replace(/&list=[^&]*/,"").replace(/&start_radio=[^&]*/,"").replace(/&t=[^&]*/,""),a.value.firstElementChild.src=Y.value),Z.value=!1)}},G=i.ref(!1),Ge=async()=>{G.value=!1,o.setShowModalHTMLEditor(!0)},Ke=i.ref(!1),Fe=i.ref(""),ct=i.ref(1),Je=i.ref(""),Oe=i.ref(""),Ve=i.ref(""),yt=i.ref(null),Be=i.ref(null),wt=i.ref(null),et=i.ref(null),Ye=i.ref(null),Xt=function(){Ke.value=!0,Fe.value="delete",ct.value=2,Je.value=e("Remove Component?"),Oe.value=e("Are you sure you want to remove this Component?"),Ve.value=e("Close"),yt.value=null,Be.value=e("Delete"),wt.value=function(){Ke.value=!1},Ye.value=async function(){await t.deleteComponentFromDOM(),Ke.value=!1}};return(ue,I)=>(i.openBlock(),i.createElementBlock("div",null,[i.createVNode(Zt,{showDynamicModalBuilder:Z.value,maxWidth:"2xl",type:c.value,gridColumnAmount:m.value,title:b.value,description:u.value,firstButtonText:g.value,secondButtonText:f.value,thirdButtonText:x.value,onFirstModalButtonFunctionDynamicModalBuilder:y.value,onSecondModalButtonFunctionDynamicModalBuilder:w.value,onThirdModalButtonFunctionDynamicModalBuilder:v.value},{default:i.withCtx(()=>[I[9]||(I[9]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",null,[i.createElementVNode("div",UE,[i.createElementVNode("div",GE,[i.createElementVNode("div",KE,[I[8]||(I[8]=i.createElementVNode("label",{for:"youtube-video",class:"pbx-myPrimaryInputLabel"},"Video url:",-1)),i.withDirectives(i.createElementVNode("input",{id:"youtube-video","onUpdate:modelValue":I[0]||(I[0]=Ne=>Y.value=Ne),type:"text",class:"pbx-myPrimaryInput",name:"video"},null,512),[[i.vModelText,Y.value]]),q.value?(i.openBlock(),i.createElementBlock("div",JE,[i.createElementVNode("p",YE,i.toDisplayString(q.value),1)])):i.createCommentVNode("",!0)])])])])]),_:1,__:[9]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{simpleModal:!0,showDynamicModalBuilder:p.value,maxWidth:"6xl",type:c.value,gridColumnAmount:m.value,title:b.value,description:u.value,firstButtonText:g.value,secondButtonText:f.value,thirdButtonText:x.value,onFirstModalButtonFunctionDynamicModalBuilder:y.value,onSecondModalButtonFunctionDynamicModalBuilder:w.value,onThirdModalButtonFunctionDynamicModalBuilder:v.value},{default:i.withCtx(()=>[I[10]||(I[10]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",XE,[i.createVNode(FC)])]),_:1,__:[10]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:Ke.value,type:Fe.value,gridColumnAmount:ct.value,title:Je.value,description:Oe.value,firstButtonText:Ve.value,secondButtonText:yt.value,thirdButtonText:Be.value,onFirstModalButtonFunctionDynamicModalBuilder:wt.value,onSecondModalButtonFunctionDynamicModalBuilder:et.value,onThirdModalButtonFunctionDynamicModalBuilder:Ye.value},{default:i.withCtx(()=>I[11]||(I[11]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[11]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(yb,{open:k.value,title:C.value,description:L.value,firstButtonText:V.value,secondButtonText:M.value,thirdButtonText:B.value,customMediaComponent:i.unref(n),onFirstMediaButtonFunction:D.value},null,8,["open","title","description","firstButtonText","secondButtonText","thirdButtonText","customMediaComponent","onFirstMediaButtonFunction"]),i.createElementVNode("div",QE,[i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["pbx-flex pbx-items-center pbx-justify-center pbx-gap-2",{"":a.value}])},[i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock("div",ZE,[i.createElementVNode("button",{onClick:ee,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[13]||(I[13]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," play_circle ",-1)]))])):i.createCommentVNode("",!0),i.unref(t).isSelectedElementValidText()&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},[i.createElementVNode("button",{onClick:h,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[14]||(I[14]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," edit ",-1)]))]),i.createVNode(_b)],64)):i.createCommentVNode("",!0),a.value&&d.value&&S.value&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock("div",$E,[i.createElementVNode("button",{onClick:F,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[15]||(I[15]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," add_photo_alternate ",-1)]))])):i.createCommentVNode("",!0),a.value&&a.value.nodeType===1&&!S.value&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createBlock(Rb,{key:3})):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("button",{key:4,onClick:I[1]||(I[1]=(...Ne)=>i.unref(t).deleteElementFromDOM&&i.unref(t).deleteElementFromDOM(...Ne)),type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[16]||(I[16]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete ",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:5,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",onClick:I[2]||(I[2]=Ne=>G.value=!G.value)},I[17]||(I[17]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," more_horiz ",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:6,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",onClick:I[3]||(I[3]=Ne=>i.unref(t).clearHtmlSelection())},I[18]||(I[18]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close_small",-1)]))):i.createCommentVNode("",!0)],2)]),i.createVNode(i.Transition,{name:"popup-fade"},{default:i.withCtx(()=>[G.value?(i.openBlock(),i.createElementBlock("div",eT,[i.createElementVNode("div",tT,[i.createElementVNode("div",rT,[a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:I[4]||(I[4]=Ne=>i.unref(t).reorderComponent(-1)),disabled:!s.value,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[i.createElementVNode("div",{class:i.normalizeClass(["pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",[s.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},I[19]||(I[19]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_up ",-1)]),2),I[20]||(I[20]=i.createElementVNode("div",{class:"pbx-text-sm"},"Move up",-1))],8,oT)):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:1,onClick:I[5]||(I[5]=Ne=>i.unref(t).reorderComponent(1)),disabled:!l.value,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[i.createElementVNode("div",{class:i.normalizeClass(["pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",[l.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},I[21]||(I[21]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_down ",-1)]),2),I[22]||(I[22]=i.createElementVNode("div",{class:"pbx-text-sm"},"Move down",-1))],8,nT)):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:2,onClick:I[6]||(I[6]=Ne=>Xt()),class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},I[23]||(I[23]=[i.createElementVNode("div",{class:"pbx-h- pbx-w-8 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ")],-1),i.createElementVNode("div",{class:"pbx-text-sm"},"Delete component",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:3,onClick:I[7]||(I[7]=()=>{G.value=!G.value,i.unref(t).duplicateComponent()}),class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},I[24]||(I[24]=[i.createElementVNode("div",{class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," control_point_duplicate ")],-1),i.createElementVNode("div",{class:"pbx-text-sm"},"Duplicate component",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:Ge,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[I[25]||(I[25]=i.createElementVNode("div",{class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," deployed_code ")],-1)),i.createElementVNode("div",iT,i.toDisplayString(i.unref(e)("HTML Editor")),1)])):i.createCommentVNode("",!0)])])])):i.createCommentVNode("",!0)]),_:1})]))}},sT=[{html_code:`
136
+ `));let u=sw((s=m.props)!=null?s:{},p,c),g=i.cloneVNode(m,u,!0);for(let f in u)f.startsWith("on")&&(g.props||(g.props={}),g.props[f]=u[f]);return g}return Array.isArray(d)&&d.length===1?d[0]:d}return i.h(l,Object.assign({},p,c),{default:()=>d})}function aw(r){return r.flatMap(e=>e.type===i.Fragment?aw(e.children):[e])}function sw(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let o of r)for(let n in o)n.startsWith("on")&&typeof o[n]=="function"?(t[n]!=null||(t[n]=[]),t[n].push(o[n])):e[n]=o[n];if(e.disabled||e["aria-disabled"])return Object.assign(e,Object.fromEntries(Object.keys(t).map(o=>[o,void 0])));for(let o in t)Object.assign(e,{[o](n,...a){let s=t[o];for(let l of s){if(n instanceof Event&&n.defaultPrevented)return;l(n,...a)}}});return e}function CE(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function lw(r,e=[]){let t=Object.assign({},r);for(let o of e)o in t&&delete t[o];return t}function EE(r){return r==null?!1:typeof r.type=="string"||typeof r.type=="object"||typeof r.type=="function"}var pw=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(pw||{});let TE=i.defineComponent({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(r,{slots:e,attrs:t}){return()=>{var o;let{features:n,...a}=r,s={"aria-hidden":(n&2)===2?!0:(o=a["aria-hidden"])!=null?o:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ao({ourProps:s,theirProps:a,slot:{},attrs:t,slots:e,name:"Hidden"})}}}),dw=Symbol("Context");var Mn=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(Mn||{});function ME(){return i.inject(dw,null)}function BE(r){i.provide(dw,r)}var ve=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(ve||{});function NE(r){throw new Error("Unexpected object: "+r)}var ze=(r=>(r[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r))(ze||{});function PE(r,e){let t=e.resolveItems();if(t.length<=0)return null;let o=e.resolveActiveIndex(),n=o??-1;switch(r.focus){case 0:{for(let a=0;a<t.length;++a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 1:{n===-1&&(n=t.length);for(let a=n-1;a>=0;--a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 2:{for(let a=n+1;a<t.length;++a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 3:{for(let a=t.length-1;a>=0;--a)if(!e.resolveDisabled(t[a],a,t))return a;return o}case 4:{for(let a=0;a<t.length;++a)if(e.resolveId(t[a],a,t)===r.id)return a;return o}case 5:return null;default:NE(r)}}function cw(r={},e=null,t=[]){for(let[o,n]of Object.entries(r))bw(t,mw(e,o),n);return t}function mw(r,e){return r?r+"["+e+"]":e}function bw(r,e,t){if(Array.isArray(t))for(let[o,n]of t.entries())bw(r,mw(e,o.toString()),n);else t instanceof Date?r.push([e,t.toISOString()]):typeof t=="boolean"?r.push([e,t?"1":"0"]):typeof t=="string"?r.push([e,t]):typeof t=="number"?r.push([e,`${t}`]):t==null?r.push([e,""]):cw(t,e,r)}let uw=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function gw(r){var e,t;let o=(e=r.innerText)!=null?e:"",n=r.cloneNode(!0);if(!(n instanceof HTMLElement))return o;let a=!1;for(let l of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),a=!0;let s=a?(t=n.innerText)!=null?t:"":o;return uw.test(s)&&(s=s.replace(uw,"")),s}function DE(r){let e=r.getAttribute("aria-label");if(typeof e=="string")return e.trim();let t=r.getAttribute("aria-labelledby");if(t){let o=t.split(" ").map(n=>{let a=document.getElementById(n);if(a){let s=a.getAttribute("aria-label");return typeof s=="string"?s.trim():gw(a).trim()}return null}).filter(Boolean);if(o.length>0)return o.join(", ")}return gw(r).trim()}function LE(r){let e=i.ref(""),t=i.ref("");return()=>{let o=de(r);if(!o)return"";let n=o.innerText;if(e.value===n)return t.value;let a=DE(o).trim().toLowerCase();return e.value=n,t.value=a,a}}function AE(r,e){return r===e}var OE=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(OE||{}),VE=(r=>(r[r.Single=0]="Single",r[r.Multi=1]="Multi",r))(VE||{}),IE=(r=>(r[r.Pointer=0]="Pointer",r[r.Other=1]="Other",r))(IE||{});function _E(r){requestAnimationFrame(()=>requestAnimationFrame(r))}let xw=Symbol("ListboxContext");function Bn(r){let e=i.inject(xw,null);if(e===null){let t=new Error(`<${r} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Bn),t}return e}let Nn=i.defineComponent({name:"Listbox",emits:{"update:modelValue":r=>!0},props:{as:{type:[Object,String],default:"template"},disabled:{type:[Boolean],default:!1},by:{type:[String,Function],default:()=>AE},horizontal:{type:[Boolean],default:!1},modelValue:{type:[Object,String,Number,Boolean],default:void 0},defaultValue:{type:[Object,String,Number,Boolean],default:void 0},form:{type:String,optional:!0},name:{type:String,optional:!0},multiple:{type:[Boolean],default:!1}},inheritAttrs:!1,setup(r,{slots:e,attrs:t,emit:o}){let n=i.ref(1),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref([]),d=i.ref(""),c=i.ref(null),m=i.ref(1);function b(v=h=>h){let h=c.value!==null?p.value[c.value]:null,S=gE(v(p.value.slice()),C=>de(C.dataRef.domRef)),k=h?S.indexOf(h):null;return k===-1&&(k=null),{options:S,activeOptionIndex:k}}let u=i.computed(()=>r.multiple?1:0),[g,f]=nE(i.computed(()=>r.modelValue),v=>o("update:modelValue",v),i.computed(()=>r.defaultValue)),x=i.computed(()=>g.value===void 0?ft(u.value,{1:[],0:void 0}):g.value),y={listboxState:n,value:x,mode:u,compare(v,h){if(typeof r.by=="string"){let S=r.by;return(v==null?void 0:v[S])===(h==null?void 0:h[S])}return r.by(v,h)},orientation:i.computed(()=>r.horizontal?"horizontal":"vertical"),labelRef:a,buttonRef:s,optionsRef:l,disabled:i.computed(()=>r.disabled),options:p,searchQuery:d,activeOptionIndex:c,activationTrigger:m,closeListbox(){r.disabled||n.value!==1&&(n.value=1,c.value=null)},openListbox(){r.disabled||n.value!==0&&(n.value=0)},goToOption(v,h,S){if(r.disabled||n.value===1)return;let k=b(),C=PE(v===ze.Specific?{focus:ze.Specific,id:h}:{focus:v},{resolveItems:()=>k.options,resolveActiveIndex:()=>k.activeOptionIndex,resolveId:L=>L.id,resolveDisabled:L=>L.dataRef.disabled});d.value="",c.value=C,m.value=S??1,p.value=k.options},search(v){if(r.disabled||n.value===1)return;let h=d.value!==""?0:1;d.value+=v.toLowerCase();let S=(c.value!==null?p.value.slice(c.value+h).concat(p.value.slice(0,c.value+h)):p.value).find(C=>C.dataRef.textValue.startsWith(d.value)&&!C.dataRef.disabled),k=S?p.value.indexOf(S):-1;k===-1||k===c.value||(c.value=k,m.value=1)},clearSearch(){r.disabled||n.value!==1&&d.value!==""&&(d.value="")},registerOption(v,h){let S=b(k=>[...k,{id:v,dataRef:h}]);p.value=S.options,c.value=S.activeOptionIndex},unregisterOption(v){let h=b(S=>{let k=S.findIndex(C=>C.id===v);return k!==-1&&S.splice(k,1),S});p.value=h.options,c.value=h.activeOptionIndex,m.value=1},theirOnChange(v){r.disabled||f(v)},select(v){r.disabled||f(ft(u.value,{0:()=>v,1:()=>{let h=i.toRaw(y.value.value).slice(),S=i.toRaw(v),k=h.findIndex(C=>y.compare(S,i.toRaw(C)));return k===-1?h.push(S):h.splice(k,1),h}}))}};wE([s,l],(v,h)=>{var S;y.closeListbox(),ow(h,Pl.Loose)||(v.preventDefault(),(S=de(s))==null||S.focus())},i.computed(()=>n.value===0)),i.provide(xw,y),BE(i.computed(()=>ft(n.value,{0:Mn.Open,1:Mn.Closed})));let w=i.computed(()=>{var v;return(v=de(s))==null?void 0:v.closest("form")});return i.onMounted(()=>{i.watch([w],()=>{if(!w.value||r.defaultValue===void 0)return;function v(){y.theirOnChange(r.defaultValue)}return w.value.addEventListener("reset",v),()=>{var h;(h=w.value)==null||h.removeEventListener("reset",v)}},{immediate:!0})}),()=>{let{name:v,modelValue:h,disabled:S,form:k,...C}=r,L={open:n.value===0,disabled:S,value:x.value};return i.h(i.Fragment,[...v!=null&&x.value!=null?cw({[v]:x.value}).map(([V,M])=>i.h(TE,CE({features:pw.Hidden,key:V,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:k,disabled:S,name:V,value:M}))):[],Ao({ourProps:{},theirProps:{...t,...lw(C,["defaultValue","onUpdate:modelValue","horizontal","multiple","by"])},slot:L,slots:e,attrs:t,name:"Listbox"})])}}});i.defineComponent({name:"ListboxLabel",props:{as:{type:[Object,String],default:"label"},id:{type:String,default:null}},setup(r,{attrs:e,slots:t}){var o;let n=(o=r.id)!=null?o:`headlessui-listbox-label-${ba()}`,a=Bn("ListboxLabel");function s(){var l;(l=de(a.buttonRef))==null||l.focus({preventScroll:!0})}return()=>{let l={open:a.listboxState.value===0,disabled:a.disabled.value},{...p}=r,d={id:n,ref:a.labelRef,onClick:s};return Ao({ourProps:d,theirProps:p,slot:l,attrs:e,slots:t,name:"ListboxLabel"})}}});let Xr=i.defineComponent({name:"ListboxButton",props:{as:{type:[Object,String],default:"button"},id:{type:String,default:null}},setup(r,{attrs:e,slots:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-button-${ba()}`,s=Bn("ListboxButton");o({el:s.buttonRef,$el:s.buttonRef});function l(m){switch(m.key){case ve.Space:case ve.Enter:case ve.ArrowDown:m.preventDefault(),s.openListbox(),i.nextTick(()=>{var b;(b=de(s.optionsRef))==null||b.focus({preventScroll:!0}),s.value.value||s.goToOption(ze.First)});break;case ve.ArrowUp:m.preventDefault(),s.openListbox(),i.nextTick(()=>{var b;(b=de(s.optionsRef))==null||b.focus({preventScroll:!0}),s.value.value||s.goToOption(ze.Last)});break}}function p(m){switch(m.key){case ve.Space:m.preventDefault();break}}function d(m){s.disabled.value||(s.listboxState.value===0?(s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})})):(m.preventDefault(),s.openListbox(),_E(()=>{var b;return(b=de(s.optionsRef))==null?void 0:b.focus({preventScroll:!0})})))}let c=vE(i.computed(()=>({as:r.as,type:e.type})),s.buttonRef);return()=>{var m,b;let u={open:s.listboxState.value===0,disabled:s.disabled.value,value:s.value.value},{...g}=r,f={ref:s.buttonRef,id:a,type:c.value,"aria-haspopup":"listbox","aria-controls":(m=de(s.optionsRef))==null?void 0:m.id,"aria-expanded":s.listboxState.value===0,"aria-labelledby":s.labelRef.value?[(b=de(s.labelRef))==null?void 0:b.id,a].join(" "):void 0,disabled:s.disabled.value===!0?!0:void 0,onKeydown:l,onKeyup:p,onClick:d};return Ao({ourProps:f,theirProps:g,slot:u,attrs:e,slots:t,name:"ListboxButton"})}}}),Pn=i.defineComponent({name:"ListboxOptions",props:{as:{type:[Object,String],default:"ul"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},id:{type:String,default:null}},setup(r,{attrs:e,slots:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-options-${ba()}`,s=Bn("ListboxOptions"),l=i.ref(null);o({el:s.optionsRef,$el:s.optionsRef});function p(m){switch(l.value&&clearTimeout(l.value),m.key){case ve.Space:if(s.searchQuery.value!=="")return m.preventDefault(),m.stopPropagation(),s.search(m.key);case ve.Enter:if(m.preventDefault(),m.stopPropagation(),s.activeOptionIndex.value!==null){let b=s.options.value[s.activeOptionIndex.value];s.select(b.dataRef.value)}s.mode.value===0&&(s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})}));break;case ft(s.orientation.value,{vertical:ve.ArrowDown,horizontal:ve.ArrowRight}):return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Next);case ft(s.orientation.value,{vertical:ve.ArrowUp,horizontal:ve.ArrowLeft}):return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Previous);case ve.Home:case ve.PageUp:return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.First);case ve.End:case ve.PageDown:return m.preventDefault(),m.stopPropagation(),s.goToOption(ze.Last);case ve.Escape:m.preventDefault(),m.stopPropagation(),s.closeListbox(),i.nextTick(()=>{var b;return(b=de(s.buttonRef))==null?void 0:b.focus({preventScroll:!0})});break;case ve.Tab:m.preventDefault(),m.stopPropagation();break;default:m.key.length===1&&(s.search(m.key),l.value=setTimeout(()=>s.clearSearch(),350));break}}let d=ME(),c=i.computed(()=>d!==null?(d.value&Mn.Open)===Mn.Open:s.listboxState.value===0);return()=>{var m,b;let u={open:s.listboxState.value===0},{...g}=r,f={"aria-activedescendant":s.activeOptionIndex.value===null||(m=s.options.value[s.activeOptionIndex.value])==null?void 0:m.id,"aria-multiselectable":s.mode.value===1?!0:void 0,"aria-labelledby":(b=de(s.buttonRef))==null?void 0:b.id,"aria-orientation":s.orientation.value,id:a,onKeydown:p,role:"listbox",tabIndex:0,ref:s.optionsRef};return Ao({ourProps:f,theirProps:g,slot:u,attrs:e,slots:t,features:Dl.RenderStrategy|Dl.Static,visible:c.value,name:"ListboxOptions"})}}}),Dn=i.defineComponent({name:"ListboxOption",props:{as:{type:[Object,String],default:"li"},value:{type:[Object,String,Number,Boolean]},disabled:{type:Boolean,default:!1},id:{type:String,default:null}},setup(r,{slots:e,attrs:t,expose:o}){var n;let a=(n=r.id)!=null?n:`headlessui-listbox-option-${ba()}`,s=Bn("ListboxOption"),l=i.ref(null);o({el:l,$el:l});let p=i.computed(()=>s.activeOptionIndex.value!==null?s.options.value[s.activeOptionIndex.value].id===a:!1),d=i.computed(()=>ft(s.mode.value,{0:()=>s.compare(i.toRaw(s.value.value),i.toRaw(r.value)),1:()=>i.toRaw(s.value.value).some(v=>s.compare(i.toRaw(v),i.toRaw(r.value)))})),c=i.computed(()=>ft(s.mode.value,{1:()=>{var v;let h=i.toRaw(s.value.value);return((v=s.options.value.find(S=>h.some(k=>s.compare(i.toRaw(k),i.toRaw(S.dataRef.value)))))==null?void 0:v.id)===a},0:()=>d.value})),m=LE(l),b=i.computed(()=>({disabled:r.disabled,value:r.value,get textValue(){return m()},domRef:l}));i.onMounted(()=>s.registerOption(a,b)),i.onUnmounted(()=>s.unregisterOption(a)),i.onMounted(()=>{i.watch([s.listboxState,d],()=>{s.listboxState.value===0&&d.value&&ft(s.mode.value,{1:()=>{c.value&&s.goToOption(ze.Specific,a)},0:()=>{s.goToOption(ze.Specific,a)}})},{immediate:!0})}),i.watchEffect(()=>{s.listboxState.value===0&&p.value&&s.activationTrigger.value!==0&&i.nextTick(()=>{var v,h;return(h=(v=de(l))==null?void 0:v.scrollIntoView)==null?void 0:h.call(v,{block:"nearest"})})});function u(v){if(r.disabled)return v.preventDefault();s.select(r.value),s.mode.value===0&&(s.closeListbox(),i.nextTick(()=>{var h;return(h=de(s.buttonRef))==null?void 0:h.focus({preventScroll:!0})}))}function g(){if(r.disabled)return s.goToOption(ze.Nothing);s.goToOption(ze.Specific,a)}let f=kE();function x(v){f.update(v)}function y(v){f.wasMoved(v)&&(r.disabled||p.value||s.goToOption(ze.Specific,a,0))}function w(v){f.wasMoved(v)&&(r.disabled||p.value&&s.goToOption(ze.Nothing))}return()=>{let{disabled:v}=r,h={active:p.value,selected:d.value,disabled:v},{value:S,disabled:k,...C}=r,L={id:a,ref:l,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":d.value,disabled:void 0,onClick:u,onFocus:g,onPointerenter:x,onMouseenter:x,onPointermove:y,onMousemove:y,onPointerleave:w,onMouseleave:w};return Ao({ourProps:L,theirProps:C,slot:h,attrs:t,slots:e,name:"ListboxOption"})}}});const RE={class:"pbx-relative"},HE={class:"pbx-flex pbx-justify-start pbx-items-center pbx-gap-2"},zE={key:0,class:"material-symbols-outlined"},FE={class:"pbx-flex pbx-flex-col"},jE={class:"pbx-flex pbx-gap-2 pbx-items-center"},qE={key:0,class:"pbx-flex pbx-items-center"},WE={key:1,class:"pbx-flex pbx-items-center"},UE={class:"pbx-ml-3"},fw={__name:"TextColorEditor",props:{globalPageLayout:{Type:Boolean}},setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getTextColor);return i.watch(a,async s=>{n.value=s,await t.initializeElementStyles()},{immediate:!0}),(s,l)=>(i.openBlock(),i.createBlock(i.unref(Nn),{as:"div",modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},{default:i.withCtx(()=>[i.createElementVNode("div",RE,[i.createElementVNode("div",{class:i.normalizeClass([r.globalPageLayout?"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400":"pbx-flex pbx-gap-2 pbx-items-center"])},[r.globalPageLayout?(i.openBlock(),i.createBlock(i.unref(Xr),{key:0,class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white hover:pbx-text-black pbx-text-black pbx-font-sans pbx-font-medium pbx-border-0"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",HE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-600 pbx-rounded-sm pbx-bg-none pbx-border-solid",`pbx-bg-${(p=n.value)==null?void 0:p.replace("pbx-text-","")}`])},null,2),i.createElementVNode("div",null,[i.createElementVNode("div",null,i.toDisplayString(i.unref(e)("Text Color")),1)])]),r.globalPageLayout?(i.openBlock(),i.createElementBlock("span",zE," chevron_right ")):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0),r.globalPageLayout?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xr),{key:1,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",FE,[i.createElementVNode("div",jE,[i.createElementVNode("span",{class:i.normalizeClass(["material-symbols-outlined",`pbx-text-${(p=n.value)==null?void 0:p.replace("pbx-text-","")}`]),style:{"text-shadow":"rgb(0 0 0 / 10%) 1.5px 1.5px 0px"}}," format_color_text ",2)])])]}),_:1}))],2),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-headless-dropdown pbx-absolute pbx-min-w-[12rem] pbx-z-40 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-gray-50 pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(On).textColorVariables,p=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:l[0]||(l[0]=d=>i.unref(t).handleTextColor(n.value)),key:p,value:p},{default:i.withCtx(({active:d,textColor:c})=>[i.createElementVNode("li",{class:i.normalizeClass([d?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[p==="none"?(i.openBlock(),i.createElementBlock("div",qE,l[2]||(l[2]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," invert_colors ",-1),i.createElementVNode("span",{class:"pbx-ml-3"},"Default black",-1)]))):i.createCommentVNode("",!0),p!=="none"?(i.openBlock(),i.createElementBlock("div",WE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${p.replace("pbx-text-","")}`])},null,2),i.createElementVNode("span",UE,i.toDisplayString(p),1)])):i.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}},GE={class:"pbx-relative"},KE={class:"pbx-flex pbx-justify-start pbx-items-center pbx-gap-2"},JE={key:0,class:"material-symbols-outlined"},YE={class:"pbx-flex pbx-flex-col"},XE={class:"pbx-flex pbx-gap-2 pbx-items-center"},QE={key:0,class:"pbx-flex pbx-items-center"},ZE={class:"pbx-ml-3"},$E={key:1,class:"pbx-flex pbx-items-center"},eT={class:"pbx-ml-3"},hw={__name:"BackgroundColorEditor",props:{globalPageLayout:{Type:Boolean}},setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getBackgroundColor);return i.watch(a,async s=>{n.value=s,await t.initializeElementStyles()},{immediate:!0}),(s,l)=>(i.openBlock(),i.createBlock(i.unref(Nn),{as:"div",modelValue:n.value,"onUpdate:modelValue":l[1]||(l[1]=p=>n.value=p)},{default:i.withCtx(()=>[i.createElementVNode("div",GE,[i.createElementVNode("div",{class:i.normalizeClass([r.globalPageLayout?"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400":"pbx-flex pbx-gap-2 pbx-items-center"])},[r.globalPageLayout?(i.openBlock(),i.createBlock(i.unref(Xr),{key:0,class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white hover:pbx-text-black pbx-text-black pbx-font-sans pbx-font-medium pbx-border-0"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",KE,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border pbx-border-gray-600 pbx-rounded-sm pbx-bg-none pbx-border-solid",`pbx-bg-${(p=n.value)==null?void 0:p.replace("pbx-bg-","")}`])},null,2),i.createElementVNode("div",null,i.toDisplayString(i.unref(e)("Background Color")),1)]),r.globalPageLayout?(i.openBlock(),i.createElementBlock("span",JE," chevron_right ")):i.createCommentVNode("",!0)]}),_:1})):i.createCommentVNode("",!0),r.globalPageLayout?i.createCommentVNode("",!0):(i.openBlock(),i.createBlock(i.unref(Xr),{key:1,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},{default:i.withCtx(()=>{var p;return[i.createElementVNode("div",YE,[i.createElementVNode("div",XE,[i.createElementVNode("span",{class:i.normalizeClass(["material-symbols-outlined",`pbx-text-${(p=n.value)==null?void 0:p.replace("pbx-bg-","")}`]),style:{"text-shadow":"rgb(0 0 0 / 10%) 1.5px 1.5px 0px"}}," format_color_fill ",2)])])]}),_:1}))],2),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-headless-dropdown pbx-absolute pbx-min-w-[12rem] pbx-z-40 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-gray-50 pbx-py-1 pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(On).backgroundColorVariables,p=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:l[0]||(l[0]=d=>i.unref(t).handleBackgroundColor(n.value)),key:p,value:p},{default:i.withCtx(({active:d,backgroundColor:c})=>[i.createElementVNode("li",{class:i.normalizeClass([d?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[p==="none"?(i.openBlock(),i.createElementBlock("div",QE,[l[2]||(l[2]=i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ",-1)),i.createElementVNode("span",ZE,i.toDisplayString(i.unref(e)("Transparent")),1)])):i.createCommentVNode("",!0),p!=="none"?(i.openBlock(),i.createElementBlock("div",$E,[i.createElementVNode("div",{class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${p.replace("pbx-bg-","")}`])},null,2),i.createElementVNode("span",eT,i.toDisplayString(p),1)])):i.createCommentVNode("",!0)],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"]))}},tT={class:"pbx-myInputGroup"},rT={class:"pbx-myPrimaryFormOrganizationHeaderDescriptionSection"},oT={class:"pbx-myPrimaryFormOrganizationHeader"},nT={key:0,class:"pbx-min-h-[2.5rem] pbx-flex pbx-items-center pbx-justify-start"},iT={class:"pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start"},aT={class:"pbx-overflow-y-auto"},sT={class:"pbx-select-none"},lT={key:0,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},pT={key:2,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},dT={key:0,class:"pbx-fixed pbx-z-40 pbx-top-10 pbx-right-0 lg:pbx-w-72 md:pbx-w-72 pbx-w-full pbx-select-none"},cT={class:"pbx-rounded-3xl pbx-border pbx-border-gray-100 pbx-bg-white pbx-shadow-lg pbx-pt-4 pbx-pb-4 pbx-flex pbx-flex-col pbx-overflow-y-auto pbx-max-h-[80vh] pbx-mx-4 pbx-px-2"},mT={class:"pbx-flex pbx-flex-col"},bT=["disabled"],uT=["disabled"],gT={class:"pbx-text-sm"},xT={__name:"EditGetElement",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.inject("CustomMediaComponent"),a=i.computed(()=>o.getElement);i.computed(()=>{var ue;return(ue=a.value)==null?void 0:ue.tagName});const s=i.computed(()=>t.canMoveUp()),l=i.computed(()=>t.canMoveDown()),p=i.computed(()=>{const ue=o.getShowModalTipTap;return ue&&h(),ue}),d=i.computed(()=>o.getComponent),c=i.ref(""),m=i.ref(1),b=i.ref(""),u=i.ref(""),g=i.ref(""),f=i.ref(null),x=i.ref(null),y=i.ref(null),w=i.ref(null),v=i.ref(null),h=function(){t.toggleTipTapModal(!0),c.value="success",m.value=2,b.value=e("Manage Content"),u.value=null,g.value=null,f.value=null,x.value="Save",y.value=function(){t.toggleTipTapModal(!1)},v.value=function(){t.toggleTipTapModal(!0)}},S=i.computed(()=>o.getBasePrimaryImage),k=i.ref(!1),C=i.ref(""),L=i.ref(""),V=i.ref(""),M=i.ref(null),B=i.ref(null),D=i.ref(null),z=function(){k.value=!0,C.value=e("Media Library"),L.value=null,V.value=e("Close"),M.value=e(" Select image"),D.value=function(){k.value=!1}},J=i.ref(null),Y=i.ref(""),Z=i.ref(!1),$=function(){J.value=null;const ue=/^https?:\/\//,I=i.ref(!0);return I.value=ue.test(Y.value),I.value===!1?(J.value="The provided URL is invalid. Please ensure that it begins with 'https://' for proper formatting and security.",!0):!1},ee=function(){var I;J.value=null;const ue=a.value&&((I=a.value.firstElementChild)==null?void 0:I.tagName)==="IFRAME"&&a.value.firstElementChild.hasAttribute("src")&&a.value.firstElementChild.getAttribute("src").trim()!==""?a.value.firstElementChild.src:"";Y.value=ue,Z.value=!0,c.value="success",m.value=2,b.value="Add video url",u.value=null,g.value=e("Close"),f.value="Save",x.value=null,y.value=function(){Z.value=!1},w.value=function(){$()||(a.value&&a.value.firstElementChild&&a.value.firstElementChild.tagName==="IFRAME"&&(Y.value=Y.value.replace("watch?v=","embed/"),Y.value=Y.value.replace(/&ab_channel=[^&]*/,"").replace(/&list=[^&]*/,"").replace(/&start_radio=[^&]*/,"").replace(/&t=[^&]*/,""),a.value.firstElementChild.src=Y.value),Z.value=!1)}},U=i.ref(!1),Ge=async()=>{U.value=!1,o.setShowModalHTMLEditor(!0)},Ke=i.ref(!1),Fe=i.ref(""),ct=i.ref(1),Je=i.ref(""),Oe=i.ref(""),Ve=i.ref(""),yt=i.ref(null),Be=i.ref(null),wt=i.ref(null),et=i.ref(null),Ye=i.ref(null),Xt=function(){Ke.value=!0,Fe.value="delete",ct.value=2,Je.value=e("Remove Component?"),Oe.value=e("Are you sure you want to remove this Component?"),Ve.value=e("Close"),yt.value=null,Be.value=e("Delete"),wt.value=function(){Ke.value=!1},Ye.value=async function(){await t.deleteComponentFromDOM(),Ke.value=!1}};return(ue,I)=>(i.openBlock(),i.createElementBlock("div",null,[i.createVNode(Zt,{showDynamicModalBuilder:Z.value,maxWidth:"2xl",type:c.value,gridColumnAmount:m.value,title:b.value,description:u.value,firstButtonText:g.value,secondButtonText:f.value,thirdButtonText:x.value,onFirstModalButtonFunctionDynamicModalBuilder:y.value,onSecondModalButtonFunctionDynamicModalBuilder:w.value,onThirdModalButtonFunctionDynamicModalBuilder:v.value},{default:i.withCtx(()=>[I[9]||(I[9]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",null,[i.createElementVNode("div",tT,[i.createElementVNode("div",rT,[i.createElementVNode("div",oT,[I[8]||(I[8]=i.createElementVNode("label",{for:"youtube-video",class:"pbx-myPrimaryInputLabel"},"Video url:",-1)),i.withDirectives(i.createElementVNode("input",{id:"youtube-video","onUpdate:modelValue":I[0]||(I[0]=Ne=>Y.value=Ne),type:"text",class:"pbx-myPrimaryInput",name:"video"},null,512),[[i.vModelText,Y.value]]),J.value?(i.openBlock(),i.createElementBlock("div",nT,[i.createElementVNode("p",iT,i.toDisplayString(J.value),1)])):i.createCommentVNode("",!0)])])])])]),_:1,__:[9]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{simpleModal:!0,showDynamicModalBuilder:p.value,maxWidth:"6xl",type:c.value,gridColumnAmount:m.value,title:b.value,description:u.value,firstButtonText:g.value,secondButtonText:f.value,thirdButtonText:x.value,onFirstModalButtonFunctionDynamicModalBuilder:y.value,onSecondModalButtonFunctionDynamicModalBuilder:w.value,onThirdModalButtonFunctionDynamicModalBuilder:v.value},{default:i.withCtx(()=>[I[10]||(I[10]=i.createElementVNode("header",null,null,-1)),i.createElementVNode("main",aT,[i.createVNode(QC)])]),_:1,__:[10]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:Ke.value,type:Fe.value,gridColumnAmount:ct.value,title:Je.value,description:Oe.value,firstButtonText:Ve.value,secondButtonText:yt.value,thirdButtonText:Be.value,onFirstModalButtonFunctionDynamicModalBuilder:wt.value,onSecondModalButtonFunctionDynamicModalBuilder:et.value,onThirdModalButtonFunctionDynamicModalBuilder:Ye.value},{default:i.withCtx(()=>I[11]||(I[11]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[11]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode($0,{open:k.value,title:C.value,description:L.value,firstButtonText:V.value,secondButtonText:M.value,thirdButtonText:B.value,customMediaComponent:i.unref(n),onFirstMediaButtonFunction:D.value},null,8,["open","title","description","firstButtonText","secondButtonText","thirdButtonText","customMediaComponent","onFirstMediaButtonFunction"]),i.createElementVNode("div",sT,[i.createCommentVNode("",!0),i.createElementVNode("div",{class:i.normalizeClass(["pbx-flex pbx-items-center pbx-justify-center pbx-gap-2",{"":a.value}])},[i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock("div",lT,[i.createElementVNode("button",{onClick:ee,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[13]||(I[13]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," play_circle ",-1)]))])):i.createCommentVNode("",!0),i.unref(t).isSelectedElementValidText()&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-w-max"},[i.createElementVNode("button",{onClick:h,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[14]||(I[14]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," edit ",-1)]))]),i.createVNode(fw)],64)):i.createCommentVNode("",!0),a.value&&d.value&&S.value&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createElementBlock("div",pT,[i.createElementVNode("button",{onClick:z,type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[15]||(I[15]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," add_photo_alternate ",-1)]))])):i.createCommentVNode("",!0),a.value&&a.value.nodeType===1&&!S.value&&!i.unref(t).ElOrFirstChildIsIframe()?(i.openBlock(),i.createBlock(hw,{key:3})):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("button",{key:4,onClick:I[1]||(I[1]=(...Ne)=>i.unref(t).deleteElementFromDOM&&i.unref(t).deleteElementFromDOM(...Ne)),type:"button",class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},I[16]||(I[16]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete ",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:5,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",onClick:I[2]||(I[2]=Ne=>U.value=!U.value)},I[17]||(I[17]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," more_horiz ",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:6,class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",onClick:I[3]||(I[3]=Ne=>i.unref(t).clearHtmlSelection())},I[18]||(I[18]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close_small",-1)]))):i.createCommentVNode("",!0)],2)]),i.createVNode(i.Transition,{name:"popup-fade"},{default:i.withCtx(()=>[U.value?(i.openBlock(),i.createElementBlock("div",dT,[i.createElementVNode("div",cT,[i.createElementVNode("div",mT,[a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:I[4]||(I[4]=Ne=>i.unref(t).reorderComponent(-1)),disabled:!s.value,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[i.createElementVNode("div",{class:i.normalizeClass(["pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",[s.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},I[19]||(I[19]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_up ",-1)]),2),I[20]||(I[20]=i.createElementVNode("div",{class:"pbx-text-sm"},"Move up",-1))],8,bT)):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:1,onClick:I[5]||(I[5]=Ne=>i.unref(t).reorderComponent(1)),disabled:!l.value,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[i.createElementVNode("div",{class:i.normalizeClass(["pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor",[l.value?"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-cursor-pointer":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},I[21]||(I[21]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," move_down ",-1)]),2),I[22]||(I[22]=i.createElementVNode("div",{class:"pbx-text-sm"},"Move down",-1))],8,uT)):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:2,onClick:I[6]||(I[6]=Ne=>Xt()),class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},I[23]||(I[23]=[i.createElementVNode("div",{class:"pbx-h- pbx-w-8 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-myPrimaryErrorColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," delete_forever ")],-1),i.createElementVNode("div",{class:"pbx-text-sm"},"Delete component",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:3,onClick:I[7]||(I[7]=()=>{U.value=!U.value,i.unref(t).duplicateComponent()}),class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},I[24]||(I[24]=[i.createElementVNode("div",{class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," control_point_duplicate ")],-1),i.createElementVNode("div",{class:"pbx-text-sm"},"Duplicate component",-1)]))):i.createCommentVNode("",!0),a.value&&d.value?(i.openBlock(),i.createElementBlock("div",{key:4,onClick:Ge,class:"pbx-flex pbx-items-center pbx-justify-start pbx-gap-2 pbx-cursor-pointer hover:pbx-bg-red-50 pbx-py-2 pbx-px-2 pbx-rounded-full"},[I[25]||(I[25]=i.createElementVNode("div",{class:"pbx-h-8 pbx-w-8 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-200 pbx-aspect-square hover:pbx-bg-gray-100 hover:pbx-fill-white focus-visible:pbx-ring-0 pbx-text-myPrimaryDarkGrayColor"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," deployed_code ")],-1)),i.createElementVNode("div",gT,i.toDisplayString(i.unref(e)("HTML Editor")),1)])):i.createCommentVNode("",!0)])])])):i.createCommentVNode("",!0)]),_:1})]))}},fT=[{html_code:`
137
137
  <section>
138
138
  <div class="relative py-4">
139
139
  <div class="mx-auto max-w-7xl lg:px-4 px-2">
@@ -194,7 +194,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
194
194
  <span class="material-symbols-outlined">
195
195
  link
196
196
  </span>
197
- `}],J=()=>`data:image/svg+xml,${encodeURIComponent(`
197
+ `}],K=()=>`data:image/svg+xml,${encodeURIComponent(`
198
198
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 150">
199
199
  <defs>
200
200
  <style>
@@ -208,7 +208,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
208
208
  <circle class="fg" cx="122.5" cy="64.15" r="4.16"/>
209
209
  </svg>
210
210
  `.trim())}`,Al=[{components:{data:[{title:"Single Image",html_code:`<section>
211
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div></div></div></div>
211
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-1"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div></div></div></div>
212
212
  </section>`,category:"Images",cover_image:`
213
213
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="125.5201 272.4783 227.6296 170.7227" width="227.63px" height="170.723px">
214
214
  <g transform="matrix(2.0564050674438477, 0, 0, 2.0564050674438477, -299.93572998046875, 191.27296447753906)" style="">
@@ -219,7 +219,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
219
219
  </g>
220
220
  </svg>
221
221
  `},{title:"Two Vertical Images",html_code:`<section>
222
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${J()}" alt="provider"> </div> </div> </div> </div>
222
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${K()}" alt="provider"> </div> </div> </div> </div>
223
223
  </section>`,category:"Images",cover_image:`
224
224
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="77.1285 230.6534 251.166 229.0848" width="251.166px" height="229.085px">
225
225
  <g transform="matrix(1.876052975654602, 0, 0, 1.876052975654602, 77.12846374511719, 230.65336608886716)" style="">
@@ -240,7 +240,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
240
240
  </g>
241
241
  </svg>
242
242
  `},{title:"Two Square Images",html_code:`<section>
243
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div></div> </div></div>
243
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div></div> </div></div>
244
244
  </section>`,category:"Images",cover_image:`
245
245
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120.18 57.68">
246
246
  <defs>
@@ -272,7 +272,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
272
272
  </g>
273
273
  </svg>
274
274
  `},{title:"Three Square Images",html_code:`<section>
275
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div></div> </div></div>
275
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div></div> </div></div>
276
276
  </section>`,category:"Images",cover_image:`
277
277
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 177.28 53.92">
278
278
  <defs>
@@ -295,7 +295,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
295
295
  <circle class="fg" cx="162.38" cy="21.15" r="2.23"/>
296
296
  </svg>
297
297
  `},{title:"Four Square Images",html_code:`<section>
298
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"> <div class="mx-auto max-w-7xl"> <div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4"> <div><img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"></div> </div> </div> </div>
298
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"> <div class="mx-auto max-w-7xl"> <div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4"> <div><img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div> <div><img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"></div> </div> </div> </div>
299
299
  </section>`,category:"Images",cover_image:`
300
300
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190.34 42.55">
301
301
  <defs>
@@ -332,27 +332,27 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
332
332
  <div class="grid grid-cols-2 md:grid-cols-3 myPrimaryGap">
333
333
 
334
334
  <div>
335
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
335
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
336
336
  </div>
337
337
 
338
338
  <div>
339
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
339
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
340
340
  </div>
341
341
 
342
342
  <div>
343
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
343
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
344
344
  </div>
345
345
 
346
346
  <div>
347
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
347
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
348
348
  </div>
349
349
 
350
350
  <div>
351
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
351
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
352
352
  </div>
353
353
 
354
354
  <div>
355
- <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="image">
355
+ <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="image">
356
356
  </div>
357
357
 
358
358
  </div>
@@ -394,7 +394,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
394
394
  `},{title:"Two Square Images With Text",html_code:`<section>
395
395
  <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl">
396
396
  <div class="myPrimaryGap lg:flex lg:justify-center"><div class="flex-1 py-2">
397
- <div class="grid myPrimaryGap grid-cols-1 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> </div> </div> </div>
397
+ <div class="grid myPrimaryGap grid-cols-1 lg:grid-cols-2"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> </div> </div> </div>
398
398
 
399
399
  <div class="flex-1 py-2"> <div class="break-words py-2"><p>Start customizing by editing this default text directly in the editor.</p></div></div>
400
400
  </div></div></div>
@@ -421,7 +421,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
421
421
  <rect class="bg" x="126.07" y="15.99" width="53.92" height="2.93"/>
422
422
  </svg>
423
423
  `},{title:"Three Vertical Images",html_code:`<section>
424
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${J()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${J()}" alt="provider"></div></div> </div></div>
424
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${K()}" alt="provider"> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-[9/16] " src="${K()}" alt="provider"></div></div> </div></div>
425
425
  </section>`,category:"Images",cover_image:`
426
426
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 179.84 110.72">
427
427
  <defs>
@@ -444,7 +444,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
444
444
  <circle class="fg" cx="165.41" cy="49.23" r="2.35"/>
445
445
  </svg>
446
446
  `},{title:"Four Square Images With Text",html_code:`<section>
447
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"><div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
447
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-2 sm:grid-cols-2 lg:grid-cols-4"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"><div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
448
448
  </section>`,category:"Images & Text",cover_image:`
449
449
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 190.33 55.9">
450
450
  <defs>
@@ -483,7 +483,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
483
483
  <rect class="bg" x="147.79" y="53.59" width="42.55" height="2.31"/>
484
484
  </svg>
485
485
  `},{title:"Three Square Images With Text",html_code:`<section>
486
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
486
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
487
487
  </section>`,category:"Images & Text",cover_image:`
488
488
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 177.28 70.84">
489
489
  <defs>
@@ -514,7 +514,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
514
514
  <rect class="bg" x="123.37" y="63.91" width="53.92" height="2.93"/>
515
515
  <rect class="bg" x="123.37" y="67.91" width="53.92" height="2.93"/>
516
516
  </svg>
517
- `},{title:"Stats Split with image",html_code:`<section> <div class="md:pbx-pt-12 md:pbx-pb-12 pbx-pt-4 pbx-pb-4 lg:pbx-px-4 pbx-px-2"><div class="pbx-mx-auto pbx-max-w-7xl"><div class="pbx-myPrimaryGap pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 lg:pbx-grid-cols-2"> <div class="pbx-flex-1 pbx-py-2"> <img class="pbx-object-cover pbx-w-full pbx-object-top pbx-aspect-square " src="${J()}" alt="provider"> </div> <div> <div class=""> <p class="pbx-font-semibold">Our track record</p> </div> <div class="pbx-font-medium pbx-text-2xl lg:pbx-text-4xl"><p>Trusted by thousands of creators worldwide</p></div> <div><p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Maiores impedit perferendis suscipit eaque, iste dolor cupiditate blanditiis ratione.</p></div> <div class="pbx-mt-16 pbx-grid pbx-max-w-xl pbx-grid-cols-1 pbx-gap-8 sm:pbx-mt-20 sm:pbx-grid-cols-2 xl:pbx-mt-16"> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div><p>Creators on the platform</p></div> <div class="pbx-font-medium pbx-text-lg lg:pbx-text-2xl"><p>8,000+</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Flat platform fee</p> </div> <div class="pbx-font-medium pbx-text-lg lg:pbx-text-2xl"><p>3%</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Uptime guarantee</p> </div> <div class="pbx-text-lg lg:pbx-text-2xl pbx-font-medium"><p>99.9%</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Paid out to creators</p> </div> <div class="pbx-text-lg lg:pbx-text-2xl pbx-font-medium"><p>$70M</p></div> </div> </div> </div></div> </div></div> </section>`,category:"Marketing",cover_image:`
517
+ `},{title:"Stats Split with image",html_code:`<section> <div class="md:pbx-pt-12 md:pbx-pb-12 pbx-pt-4 pbx-pb-4 lg:pbx-px-4 pbx-px-2"><div class="pbx-mx-auto pbx-max-w-7xl"><div class="pbx-myPrimaryGap pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 lg:pbx-grid-cols-2"> <div class="pbx-flex-1 pbx-py-2"> <img class="pbx-object-cover pbx-w-full pbx-object-top pbx-aspect-square " src="${K()}" alt="provider"> </div> <div> <div class=""> <p class="pbx-font-semibold">Our track record</p> </div> <div class="pbx-font-medium pbx-text-2xl lg:pbx-text-4xl"><p>Trusted by thousands of creators worldwide</p></div> <div><p>Lorem ipsum, dolor sit amet consectetur adipisicing elit. Maiores impedit perferendis suscipit eaque, iste dolor cupiditate blanditiis ratione.</p></div> <div class="pbx-mt-16 pbx-grid pbx-max-w-xl pbx-grid-cols-1 pbx-gap-8 sm:pbx-mt-20 sm:pbx-grid-cols-2 xl:pbx-mt-16"> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div><p>Creators on the platform</p></div> <div class="pbx-font-medium pbx-text-lg lg:pbx-text-2xl"><p>8,000+</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Flat platform fee</p> </div> <div class="pbx-font-medium pbx-text-lg lg:pbx-text-2xl"><p>3%</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Uptime guarantee</p> </div> <div class="pbx-text-lg lg:pbx-text-2xl pbx-font-medium"><p>99.9%</p></div> </div> <div class="pbx-flex pbx-flex-col pbx-gap-y-3 pbx-border-l pbx-border-gray-900/10 pbx-pl-6"> <div> <p class="pbx-text-sm/6 pbx-text-gray-600">Paid out to creators</p> </div> <div class="pbx-text-lg lg:pbx-text-2xl pbx-font-medium"><p>$70M</p></div> </div> </div> </div></div> </div></div> </section>`,category:"Marketing",cover_image:`
518
518
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="103.953 200.017 225.995 103.408" width="225.995px" height="103.408px">
519
519
  <rect class="bg" x="103.953" width="103.408" height="103.408" style="fill: rgb(56, 65, 82); stroke-width: 1;" y="200.017"/>
520
520
  <polygon class="fg" points="119.698 267.14 145.377 236.302 171.076 267.14" style="fill: rgb(113, 128, 150); stroke-width: 1;"/>
@@ -566,7 +566,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
566
566
  <rect class="bg" x="226.54" y="238.291" width="103.408" height="5.619" style="fill: rgb(56, 65, 82); stroke-width: 1;"/>
567
567
  <rect class="bg" x="226.54" y="215.499" width="103.408" height="5.619" style="fill: rgb(56, 65, 82); stroke-width: 1;"/>
568
568
  </svg>
569
- `},{title:"Show Single Product",html_code:`<section> <div class="md:pbx-pt-12 md:pbx-pb-12 pbx-pt-4 pbx-pb-4 lg:pbx-px-4 pbx-px-2"><div class="pbx-mx-auto pbx-max-w-7xl"><div class="pbx-myPrimaryGap"> <div class="pbx-flex-1 pbx-py-2"> <img class="pbx-object-cover pbx-w-full pbx-object-top pbx-aspect-square " src="${J()}" alt="provider"> <div class="pbx-break-words pbx-py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div> </section>`,category:"Products",cover_image:`
569
+ `},{title:"Show Single Product",html_code:`<section> <div class="md:pbx-pt-12 md:pbx-pb-12 pbx-pt-4 pbx-pb-4 lg:pbx-px-4 pbx-px-2"><div class="pbx-mx-auto pbx-max-w-7xl"><div class="pbx-myPrimaryGap"> <div class="pbx-flex-1 pbx-py-2"> <img class="pbx-object-cover pbx-w-full pbx-object-top pbx-aspect-square " src="${K()}" alt="provider"> <div class="pbx-break-words pbx-py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div> </section>`,category:"Products",cover_image:`
570
570
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="122.319 300.3 122.364 160.763" width="122.364px" height="160.763px">
571
571
  <rect class="bg" width="122.364" height="122.364" style="fill: rgb(56, 65, 82); stroke-width: 1;" x="122.319" y="300.3"/>
572
572
  <polygon class="fg" points="140.928 379.728 171.337 343.237 201.747 379.728" style="fill: rgb(113, 128, 150); stroke-width: 1;"/>
@@ -577,7 +577,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
577
577
  <rect class="bg" y="454.413" width="122.364" height="6.65" style="fill: rgb(56, 65, 82); stroke-width: 1;" x="122.319"/>
578
578
  </svg>
579
579
  `},{title:"Show Multiple Products",html_code:`<section>
580
- <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${J()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
580
+ <div class="md:pt-12 md:pb-12 pt-4 pb-4 lg:px-4 px-2"><div class="mx-auto max-w-7xl"><div class="myPrimaryGap grid grid-cols-1 sm:grid-cols-3 lg:grid-cols-3"> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> <div class="flex-1 py-2"> <img class="object-cover w-full object-top aspect-square " src="${K()}" alt="provider"> <div class="break-words py-2"><p>Layouts and visual.</p><p>Start customizing by editing this default text directly in the editor.</p></div> </div> </div> </div> </div>
581
581
  </section>`,category:"Products",cover_image:`
582
582
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 177.28 70.84">
583
583
  <defs>
@@ -643,7 +643,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
643
643
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
644
644
  <path fill="#4e4e50" d="M32 4H0V0h32v4zM20 12H0V8h20v4zM32 24H0v-4h32v4zM24 32H0v-4h24v4zM32 30a2.001 2.001 0 0 1-4.004 0A2.001 2.001 0 0 1 32 30z"/>
645
645
  </svg>
646
- `}]}}];function Hb(){const r=i.inject("closeAddComponentModal",null),e=i.inject("closeMediaLibraryModal",null);return{closeAddComponentModal:r||(()=>{console.warn("closeAddComponentModal function not available. Make sure you are using this within a PageBuilder context.")}),closeMediaLibraryModal:e||(()=>{console.warn("closeMediaLibraryModal function not available. Make sure you are using this within a MediaLibraryModal context.")})}}const lT={key:0,class:"pbx-min-h-[90vh] pbx-h-[90vh]"},pT={class:"pbx-flex pbx-items-center pbx-justify-center"},dT={class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},cT={class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},mT={key:1},bT={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},uT=["onClick"],gT={key:0,class:"pbx-mb-8"},xT={class:"pbx-myQuaternaryHeader pbx-mb-4"},fT={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},hT=["onClick"],yT={class:"pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4 pbx-pb-4 pbx-min-h-[96rem]"},wT=["onClick"],vT={class:"pbx-overflow-hidden pbx-whitespace-pre-line pbx-flex-1 pbx-h-auto pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 lg:pbx-py-10 pbx-py-8 pbx-px-2"},kT=["innerHTML"],ST={class:"pbx-p-3"},CT={class:"pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal"},ET={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},TT={class:"pbx-mb-8"},MT={class:"pbx-myQuaternaryHeader pbx-mb-4"},BT={class:"pbx-px-2 pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 lg:pbx-grid-cols-4 pbx-gap-4"},NT=["onClick"],PT={class:"pbx-max-h-72 pbx-cursor-pointer pbx-object-contain pbx-bg-white pbx-mx-auto"},DT={class:"pbx-myPrimaryParagraph pbx-text-base pbx-font-medium"},LT={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},AT={key:0,class:"pbx-px-2"},OT={class:"pbx-myQuaternaryHeader pbx-mb-4"},VT={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},IT=["onClick"],_T={class:"pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4 pbx-pb-4 pbx-min-h-[96rem]"},RT=["onClick"],HT={class:"pbx-overflow-hidden pbx-whitespace-pre-line pbx-flex-1 pbx-h-auto pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 lg:pbx-py-10 pbx-py-8 pbx-px-2"},zT=["innerHTML"],FT={class:"pbx-p-3"},jT={class:"pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal"},qT={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},WT=ma(i.defineComponent({__name:"DefaultBuilderComponents",props:{customMediaComponent:{type:Object,default:null}},setup(r){const{translate:e}=pe(),t=ie(),o=i.ref(!1),n=i.ref("Components"),a=["Components","Themes"],s=i.ref("All"),l=i.computed(()=>{const x=Al[0].components.data.map(y=>y.category);return["All",...new Set(x)]}),p=i.computed(()=>s.value==="All"?Al[0].components.data:Al[0].components.data.filter(x=>x.category===s.value)),d=i.ref("All"),c=i.computed(()=>{const x=Ol[0].themes.data.map(y=>y.category);return["All",...new Set(x)]}),m=i.computed(()=>d.value==="All"?Ol[0].themes.data:Ol[0].themes.data.filter(x=>x.category===d.value)),{closeAddComponentModal:b}=Hb(),u=async function(x){o.value=!0,await t.addTheme(x),b(),o.value=!1},g=async function(x){o.value=!0;const y=x.html_code.replace(/Layouts and visual\./g,e("Layouts and visual.")).replace(/Start customizing by editing this default text directly in the editor\./g,e("Start customizing by editing this default text directly in the editor.")),w={...x,html_code:y,title:x.title};await t.addComponent(w),b(),o.value=!1},f=function(x){return{id:null,html_code:x.html_code,title:x.title}};return(x,y)=>(i.openBlock(),i.createElementBlock("div",null,[o.value?(i.openBlock(),i.createElementBlock("div",lT,[i.createElementVNode("div",pT,[i.createElementVNode("div",dT,[i.createElementVNode("span",cT,i.toDisplayString(i.unref(e)("Loading...")),1)])])])):i.createCommentVNode("",!0),o.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",mT,[i.createElementVNode("div",bT,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,w=>i.createElementVNode("button",{key:w,onClick:v=>n.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[n.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,uT)),64))]),n.value==="Themes"?(i.openBlock(),i.createElementBlock("div",gT,[i.createElementVNode("h3",xT,i.toDisplayString(i.unref(e)("Themes")),1),i.createElementVNode("div",fT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,w=>(i.openBlock(),i.createElementBlock("button",{key:w,onClick:v=>d.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[d.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,hT))),128))]),i.createElementVNode("div",yT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96",onClick:v=>u(w.html_code)},[i.createElementVNode("div",vT,[i.createElementVNode("div",{class:"pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center",innerHTML:w.cover_image},null,8,kT)]),i.createElementVNode("div",ST,[i.createElementVNode("h4",CT,i.toDisplayString(i.unref(e)(w.title)),1),i.createElementVNode("div",ET,i.toDisplayString(i.unref(e)("Click to add theme")),1)])],8,wT))),128))])])):i.createCommentVNode("",!0),n.value==="Components"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",TT,[i.createElementVNode("h3",MT,i.toDisplayString(i.unref(e)("Helper Components")),1),i.createElementVNode("div",BT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(sT),w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96 pbx-p-4",onClick:v=>g(w)},[i.createElementVNode("div",PT,[i.createCommentVNode("",!0),i.createElementVNode("h4",DT,i.toDisplayString(i.unref(e)(w.title)),1)]),i.createElementVNode("div",LT,i.toDisplayString(i.unref(e)("Click to add"))+" "+i.toDisplayString(w.title.toLowerCase())+" "+i.toDisplayString(i.unref(e)("component")),1)],8,NT))),128))])]),r.customMediaComponent?(i.openBlock(),i.createElementBlock("div",AT,[i.createElementVNode("h3",OT,i.toDisplayString(i.unref(e)("Layout Components")),1),i.createElementVNode("div",VT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,w=>(i.openBlock(),i.createElementBlock("button",{key:w,onClick:v=>s.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[s.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,IT))),128))]),i.createElementVNode("div",_T,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.value,w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96",onClick:v=>g(f(w))},[i.createElementVNode("div",HT,[i.createElementVNode("div",{class:"pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center",innerHTML:w.cover_image},null,8,zT)]),i.createElementVNode("div",FT,[i.createElementVNode("h4",jT,i.toDisplayString(i.unref(e)(w.title)),1),i.createElementVNode("div",qT,i.toDisplayString(i.unref(e)("Click to add component")),1)])],8,RT))),128))])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),y[0]||(y[0]=i.createElementVNode("div",null,[i.createElementVNode("button",{class:"pbx-sr-only"},"Focusable fallback")],-1))]))]))}}),[["__scopeId","data-v-9dc83d45"]]),UT={class:"pbx-w-full pbx-inset-x-0 pbx-bg-white pbx-overflow-x-auto lg:pbx-pt-2 pbx-pt-2"},GT={key:0},KT={key:1},JT={__name:"BuilderComponents",props:{firstButtonText:{required:!0},title:{required:!0},show:{type:Boolean,default:!1,required:!0},CustomBuilderComponents:{type:Object,default:null}},emits:["firstModalButtonSearchComponentsFunction"],setup(r,{emit:e}){const t=i.inject("CustomMediaComponent"),o=e,n=function(){o("firstModalButtonSearchComponentsFunction")};return(a,s)=>(i.openBlock(),i.createBlock(St,{title:r.title,maxWidth:"6xl",showModalBuilder:r.show,onCloseMainModalBuilder:n,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createElementVNode("div",UT,[i.createElementVNode("div",null,[r.CustomBuilderComponents?(i.openBlock(),i.createElementBlock("div",GT,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.CustomBuilderComponents)))])):(i.openBlock(),i.createElementBlock("div",KT,[i.createVNode(WT,{customMediaComponent:i.unref(t)},null,8,["customMediaComponent"])]))])])]),_:1},8,["title","showModalBuilder"]))}},YT={setup(){return{expanded:i.ref(!1)}}},XT={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0"},QT={key:0,class:"material-symbols-outlined"},ZT={key:1,class:"material-symbols-outlined"};function $T(r,e,t,o,n,a){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400",{"":o.expanded}])},[i.createElementVNode("div",{class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 pbx-bg-white hover:pbx-bg-myPrimaryLightGrayColor pbx-select-none",onClick:e[0]||(e[0]=s=>o.expanded=!o.expanded)},[i.createElementVNode("p",XT,[i.renderSlot(r.$slots,"title")]),o.expanded?(i.openBlock(),i.createElementBlock("span",QT," keyboard_arrow_down ")):i.createCommentVNode("",!0),o.expanded?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",ZT," chevron_right "))]),i.createElementVNode("div",{class:i.normalizeClass([[o.expanded?"pbx-block pbx-bg-indigo-50 pbx-border-0 pbx-border-solid pbx-border-t pbx-border-red-50":"pbx-hidden"],"pbx-px-4 pbx-ease-linear pbx-duration-75 pbx-pb-8"])},[i.renderSlot(r.$slots,"content")],2)],2)}const ht=ma(YT,[["render",$T]]),e6={class:"pbx-myPrimaryInputLabel pbx-my-4"},t6={class:"pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4"},r6=["onClick"],o6={class:"pbx-flex pbx-items-center pbx-gap-1"},n6={class:"pbx-mr-1"},i6={class:"pbx-my-2 pbx-py-2"},a6={for:"custom-css",class:"pbx-myPrimaryInputLabel"},s6={class:"pbx-flex pbx-gap-2 pbx-item-center"},l6=["placeholder"],p6={key:0,class:"pbx-myPrimaryInputError"},zb={__name:"ClassEditor",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getCurrentClasses);i.watch(a,d=>{n.value=d},{immediate:!0});const s=i.ref(""),l=i.ref(""),p=async()=>{var m;const d=s.value.trim();if(!d){l.value="Please enter a class name.";return}const c=d.startsWith("pbx-")?d:"pbx-"+d;if((m=n.value)!=null&&m.includes(c)){l.value=`Class "${c}" is already added.`;return}l.value="",t.handleAddClasses(d),await t.initializeElementStyles(),s.value=""};return(d,c)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Generated CSS")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",e6,i.toDisplayString(i.unref(e)("This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.")),1),i.createElementVNode("div",t6,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,m=>(i.openBlock(),i.createElementBlock("div",{key:m,class:"pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium",onClick:async()=>{i.unref(t).handleRemoveClasses(m),await i.unref(t).initializeElementStyles()}},[i.createElementVNode("div",o6,[i.createElementVNode("span",n6,i.toDisplayString(m),1)])],8,r6))),128))]),c[3]||(c[3]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",i6,[i.createElementVNode("label",a6,[i.createTextVNode(i.toDisplayString(i.unref(e)("Add your CSS."))+" ",1),c[2]||(c[2]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(" "+i.toDisplayString(i.unref(e)("The pbx- prefix is added automatically.")),1)]),i.createElementVNode("div",s6,[i.withDirectives(i.createElementVNode("input",{id:"custom-css","onUpdate:modelValue":c[0]||(c[0]=m=>s.value=m),type:"text",placeholder:i.unref(e)("Type class"),onKeydown:c[1]||(c[1]=i.withKeys(m=>p(),["enter"])),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,l6),[[i.vModelText,s.value]]),i.createElementVNode("button",{onClick:p,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Add")),1)])]),l.value?(i.openBlock(),i.createElementBlock("p",p6,i.toDisplayString(l.value),1)):i.createCommentVNode("",!0)]),_:1}))}},d6={class:"pbx-myPrimaryInputLabel pbx-my-4"},c6={class:"pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4"},m6=["onClick"],b6={class:"pbx-flex pbx-items-center pbx-gap-1"},u6={class:"pbx-mr-1"},g6={class:"pbx-my-2 pbx-py-2"},x6={for:"custom-style-property",class:"pbx-myPrimaryInputLabel"},f6={class:"pbx-flex pbx-gap-2 pbx-flex-col pbx-item-center"},h6=["placeholder","onKeydown"],y6=["placeholder"],w6={key:0,class:"pbx-myPrimaryInputError"},Fb={__name:"StyleEditor",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getCurrentStyles);i.watch(a,b=>{n.value=b},{immediate:!0});const s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=()=>{d.value&&d.value.focus()},m=async()=>{const b=s.value.trim(),u=l.value.trim();if(!b||!u){p.value="Please enter a property and a value.";return}if(n.value&&n.value[b]){p.value=`Property "${b}" already exists. Remove it first to add a new one.`;return}p.value="",t.handleAddStyle(b,u),await t.initializeElementStyles(),s.value="",l.value=""};return(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Inline Styles")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",d6,i.toDisplayString(i.unref(e)("These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.")),1),i.createElementVNode("div",c6,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(g,f)=>(i.openBlock(),i.createElementBlock("div",{key:f,class:"pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium",onClick:async()=>{i.unref(t).handleRemoveStyle(f),await i.unref(t).initializeElementStyles()}},[i.createElementVNode("div",b6,[i.createElementVNode("span",u6,i.toDisplayString(f)+": "+i.toDisplayString(g)+"; ",1)])],8,m6))),128))]),u[2]||(u[2]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",g6,[i.createElementVNode("label",x6,i.toDisplayString(i.unref(e)("Add your own style.")),1),i.createElementVNode("div",f6,[i.withDirectives(i.createElementVNode("input",{id:"custom-style-property","onUpdate:modelValue":u[0]||(u[0]=g=>s.value=g),type:"text",placeholder:i.unref(e)("property"),onKeydown:i.withKeys(i.withModifiers(c,["prevent"]),["enter"]),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,h6),[[i.vModelText,s.value]]),i.withDirectives(i.createElementVNode("input",{id:"custom-style-value",ref_key:"valueInputRef",ref:d,"onUpdate:modelValue":u[1]||(u[1]=g=>l.value=g),type:"text",placeholder:i.unref(e)("value"),onKeydown:i.withKeys(m,["enter"]),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,y6),[[i.vModelText,l.value]]),i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Add")),1)])]),p.value?(i.openBlock(),i.createElementBlock("p",w6,i.toDisplayString(p.value),1)):i.createCommentVNode("",!0)]),_:1}))}};function v6(r){return new Promise((e,t)=>{const o=new window.Image;o.onload=e,o.onerror=t,o.src=r})}const k6=["src"],S6={__name:"ImageEditor",setup(r){const{translate:e}=pe(),t=ne,o=i.inject("CustomMediaComponent"),n=i.ref(!1),a=i.ref(!1),s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=i.ref(null),m=i.ref(null),b=i.computed(()=>(t.getBasePrimaryImage&&g(t.getBasePrimaryImage),t.getBasePrimaryImage)),u=function(){a.value=!0,s.value=e("Media Library"),l.value=null,p.value=e("Close"),d.value=e(" Select image"),m.value=function(){a.value=!1}},g=async function(f){n.value=!0,f&&typeof f=="string"&&f.length>2&&(await v6(f),await ge(200),n.value=!1)};return(f,x)=>(i.openBlock(),i.createElementBlock("div",null,[i.withDirectives(i.createElementVNode("div",null,x[0]||(x[0]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-mt-4 pbx-min-h-80"},[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")])],-1)]),512),[[i.vShow,n.value]]),i.withDirectives(i.createElementVNode("div",null,[i.createElementVNode("img",{class:"pbx-object-cover pbx-object-center pbx-w-full pbx-cursor-pointer",src:b.value,onClick:u,alt:"image"},null,8,k6)],512),[[i.vShow,b.value&&!n.value]]),i.createVNode(yb,{open:a.value,title:s.value,description:l.value,firstButtonText:p.value,secondButtonText:d.value,thirdButtonText:c.value,customMediaComponent:i.unref(o),onFirstMediaButtonFunction:m.value},null,8,["open","title","description","firstButtonText","secondButtonText","thirdButtonText","customMediaComponent","onFirstMediaButtonFunction"])]))}},C6={class:"pbx-my-2 pbx-py-2"},E6={class:"pbx-relative"},T6={class:"pbx-flex pbx-items-center pbx-gap-2"},M6={key:0},B6={class:"pbx-flex pbx-items-center"},N6={key:0},P6={key:2,class:"pbx-ml-3"},D6={key:3,class:"pbx-ml-3"},L6={__name:"ManageBackgroundOpacity",setup(r){const e=ie(),t=ne,o=i.ref(null),n=i.computed(()=>t.getBackgroundOpacity);return i.watch(n,async a=>{o.value=a,await e.initializeElementStyles()},{immediate:!0}),(a,s)=>(i.openBlock(),i.createElementBlock("div",C6,[s[3]||(s[3]=i.createElementVNode("label",{for:"bg-opacity",class:"pbx-myPrimaryInputLabel"}," Background Opacity",-1)),i.createVNode(i.unref(Nn),{as:"div",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l)},{default:i.withCtx(()=>[i.createElementVNode("div",E6,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"bg-opacity"},{default:i.withCtx(()=>[i.createElementVNode("span",T6,[o.value==="none"?(i.openBlock(),i.createElementBlock("div",M6,s[1]||(s[1]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),o.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${o.value}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["pbx-block pbx-truncate",[(o.value!=="none","")]])},i.toDisplayString(o.value==="none"?"Transparent":o.value),3)])]),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vn).backgroundOpacities,l=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:p=>i.unref(e).handleBackgroundOpacity(l),key:l,value:l},{default:i.withCtx(({active:p})=>[i.createElementVNode("li",{class:i.normalizeClass([p?"pbx-bg-myPrimaryLinkColor text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",B6,[l==="none"?(i.openBlock(),i.createElementBlock("div",N6,s[2]||(s[2]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${l}`])},null,2)):i.createCommentVNode("",!0),l==="none"?(i.openBlock(),i.createElementBlock("span",P6,"Transparent")):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("span",D6,i.toDisplayString(l),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["onClick","value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])]))}},A6={class:"pbx-my-2 pbx-py-2"},O6={class:"pbx-relative"},V6={class:"pbx-flex pbx-items-center pbx-gap-2"},I6={key:0},_6={class:"pbx-flex pbx-items-center"},R6={key:0},H6={key:2,class:"pbx-ml-3"},z6={key:3,class:"pbx-ml-3"},F6={__name:"ManageOpacity",setup(r){const e=ie(),t=ne,o=i.ref(null),n=i.computed(()=>t.getOpacity);return i.watch(n,async a=>{o.value=a,await e.initializeElementStyles()},{immediate:!0}),(a,s)=>(i.openBlock(),i.createElementBlock("div",A6,[s[3]||(s[3]=i.createElementVNode("label",{for:"default-opacity",class:"pbx-myPrimaryInputLabel"}," Opacity",-1)),i.createVNode(i.unref(Nn),{as:"div",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l)},{default:i.withCtx(()=>[i.createElementVNode("div",O6,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"default-opacity"},{default:i.withCtx(()=>[i.createElementVNode("span",V6,[o.value==="none"?(i.openBlock(),i.createElementBlock("div",I6,s[1]||(s[1]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),o.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${o.value}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["pbx-block pbx-truncate",[(o.value!=="none","")]])},i.toDisplayString(o.value==="none"?"Transparent":o.value),3)])]),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vn).opacities,l=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:p=>i.unref(e).handleOpacity(l),key:l,value:l},{default:i.withCtx(({active:p})=>[i.createElementVNode("li",{class:i.normalizeClass([p?"pbx-bg-myPrimaryLinkColor text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",_6,[l==="none"?(i.openBlock(),i.createElementBlock("div",R6,s[2]||(s[2]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${l}`])},null,2)):i.createCommentVNode("",!0),l==="none"?(i.openBlock(),i.createElementBlock("span",H6,"Transparent")):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("span",z6,i.toDisplayString(l),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["onClick","value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])]))}},j6={__name:"OpacityEditor",setup(r){const{translate:e}=pe();return(t,o)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Opacity & Transparency")),1)]),content:i.withCtx(()=>[i.createVNode(F6),o[0]||(o[0]=i.createElementVNode("hr",null,null,-1)),i.createVNode(L6)]),_:1}))}},q6={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},W6={class:"pbx-my-2 pbx-py-2"},U6={for:"font-desktop",class:"pbx-myPrimaryInputLabel"},G6={disabled:"",value:""},K6={class:"pbx-my-2 pbx-py-2"},J6={for:"font-weight",class:"pbx-myPrimaryInputLabel"},Y6={disabled:"",value:""},X6={class:"pbx-my-2 pbx-py-2"},Q6={for:"font-family",class:"pbx-myPrimaryInputLabel"},Z6={disabled:"",value:""},$6={class:"pbx-my-2 pbx-py-2"},eM={for:"font-style",class:"pbx-myPrimaryInputLabel"},tM={disabled:"",value:""},jb={__name:"Typography",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref(null),d=i.ref(null),c=i.ref(null),m=i.computed(()=>o.getFontBase),b=i.computed(()=>o.getFontDesktop),u=i.computed(()=>o.getFontTablet),g=i.computed(()=>o.getFontMobile),f=i.computed(()=>o.getFontWeight),x=i.computed(()=>o.getFontFamily),y=i.computed(()=>o.getFontStyle);return i.watch(m,async w=>{n.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(b,async w=>{a.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(u,async w=>{s.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(g,async w=>{l.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(f,async w=>{p.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(x,async w=>{d.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(y,async w=>{c.value=w,await t.initializeElementStyles()},{immediate:!0}),(w,v)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Typographies")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",q6,i.toDisplayString(i.unref(e)("Font Appearance")),1),i.createCommentVNode("",!0),i.createElementVNode("div",W6,[i.createElementVNode("label",U6,i.toDisplayString(i.unref(e)("Font size")),1),i.withDirectives(i.createElementVNode("select",{id:"font-desktop","onUpdate:modelValue":v[2]||(v[2]=h=>a.value=h),class:"pbx-myPrimarySelect",onChange:v[3]||(v[3]=h=>i.unref(t).handleFontSizeDesktop(a.value))},[i.createElementVNode("option",G6,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vo).fontDesktop,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,a.value]])]),i.createCommentVNode("",!0),v[14]||(v[14]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",K6,[i.createElementVNode("label",J6,i.toDisplayString(i.unref(e)("Font weight")),1),i.withDirectives(i.createElementVNode("select",{id:"font-weight","onUpdate:modelValue":v[8]||(v[8]=h=>p.value=h),class:"pbx-myPrimarySelect",onChange:v[9]||(v[9]=h=>i.unref(t).handleFontWeight(p.value))},[i.createElementVNode("option",Y6,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontWeight,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,p.value]])]),v[15]||(v[15]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",X6,[i.createElementVNode("label",Q6,i.toDisplayString(i.unref(e)("Font family")),1),i.withDirectives(i.createElementVNode("select",{id:"font-family","onUpdate:modelValue":v[10]||(v[10]=h=>d.value=h),class:"pbx-myPrimarySelect",onChange:v[11]||(v[11]=h=>i.unref(t).handleFontFamily(d.value))},[i.createElementVNode("option",Z6,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontFamily,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,d.value]])]),v[16]||(v[16]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",$6,[i.createElementVNode("label",eM,i.toDisplayString(i.unref(e)("Font Style")),1),i.withDirectives(i.createElementVNode("select",{id:"font-style","onUpdate:modelValue":v[12]||(v[12]=h=>c.value=h),class:"pbx-myPrimarySelect",onChange:v[13]||(v[13]=h=>i.unref(t).handleFontStyle(c.value))},[i.createElementVNode("option",tM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontStyle,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,c.value]])])]),_:1}))}},rM={class:"pbx-my-2 pbx-py-2"},oM={class:"pbx-pt-4 pbx-pb-2 pbx-mb-4"},nM={class:"pbx-myPrimaryInputLabel pbx-font-medium pbx-italic"},iM={for:"vertical-padding",class:"pbx-myPrimaryInputLabel"},aM={disabled:"",value:""},sM={class:"pbx-my-2 pbx-py-2"},lM={for:"horizontal-padding",class:"pbx-myPrimaryInputLabel"},pM={disabled:"",value:""},qb={__name:"Padding",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.computed(()=>o.getFontVerticalPadding),d=i.computed(()=>o.getFontHorizontalPadding),c=i.computed(()=>o.getFontVerticalMargin),m=i.computed(()=>o.getFontHorizontalMargin);return i.watch(p,async b=>{n.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async b=>{a.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async b=>{s.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async b=>{l.value=b,await t.initializeElementStyles()},{immediate:!0}),(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Padding")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",rM,[i.createElementVNode("div",oM,[i.createElementVNode("p",nM,i.toDisplayString(i.unref(e)("Large Screens Only")),1),u[4]||(u[4]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("label",iM,i.toDisplayString(i.unref(e)("Vertical Padding")),1),i.withDirectives(i.createElementVNode("select",{id:"vertical-padding","onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),class:"pbx-myPrimarySelect",onChange:u[1]||(u[1]=g=>i.unref(t).handleVerticalPadding(n.value))},[i.createElementVNode("option",aM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).verticalPadding,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,n.value]])]),u[5]||(u[5]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",sM,[i.createElementVNode("label",lM,i.toDisplayString(i.unref(e)("Horizontal Padding")),1),i.withDirectives(i.createElementVNode("select",{id:"horizontal-padding","onUpdate:modelValue":u[2]||(u[2]=g=>a.value=g),class:"pbx-myPrimarySelect",onChange:u[3]||(u[3]=g=>i.unref(t).handleHorizontalPadding(a.value))},[i.createElementVNode("option",pM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).horizontalPadding,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,a.value]])])]),_:1}))}},dM={class:"pbx-my-2 pbx-py-2"},cM={class:"pbx-pt-4 pbx-pb-2 pbx-mb-4"},mM={class:"pbx-myPrimaryInputLabel pbx-font-medium pbx-italic"},bM={for:"vertical-margin",class:"pbx-myPrimaryInputLabel"},uM={disabled:"",value:""},gM={class:"pbx-my-2 pbx-py-2"},xM={for:"horizontal-margin",class:"pbx-myPrimaryInputLabel"},fM={disabled:"",value:""},Wb={__name:"Margin",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.computed(()=>o.getFontVerticalPadding),d=i.computed(()=>o.getFontHorizontalPadding),c=i.computed(()=>o.getFontVerticalMargin),m=i.computed(()=>o.getFontHorizontalMargin);return i.watch(p,async b=>{n.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async b=>{a.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async b=>{s.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async b=>{l.value=b,await t.initializeElementStyles()},{immediate:!0}),(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Margin")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",dM,[i.createElementVNode("div",cM,[i.createElementVNode("p",mM,i.toDisplayString(i.unref(e)("Large Screens Only")),1),u[4]||(u[4]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("label",bM,i.toDisplayString(i.unref(e)("Vertical Margin")),1),i.withDirectives(i.createElementVNode("select",{id:"vertical-margin","onUpdate:modelValue":u[0]||(u[0]=g=>s.value=g),class:"pbx-myPrimarySelect",onChange:u[1]||(u[1]=g=>i.unref(t).handleVerticalMargin(s.value))},[i.createElementVNode("option",uM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).verticalMargin,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,s.value]])]),u[5]||(u[5]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",gM,[i.createElementVNode("label",xM,i.toDisplayString(i.unref(e)("Horizontal Margin")),1),i.withDirectives(i.createElementVNode("select",{id:"horizontal-margin","onUpdate:modelValue":u[2]||(u[2]=g=>l.value=g),class:"pbx-myPrimarySelect",onChange:u[3]||(u[3]=g=>i.unref(t).handleHorizontalMargin(l.value))},[i.createElementVNode("option",fM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).horizontalMargin,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,l.value]])])]),_:1}))}},hM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},yM={class:"pbx-my-2 pbx-py-2"},wM={for:"global-border-radius",class:"pbx-myPrimaryInputLabel"},vM={disabled:"",value:""},kM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},SM={class:"pbx-my-2 pbx-py-2"},CM={for:"border-radius-top-left",class:"pbx-myPrimaryInputLabel"},EM={disabled:"",value:""},TM={class:"pbx-my-2 pbx-py-2"},MM={for:"border-radius-top-right",class:"pbx-myPrimaryInputLabel"},BM={disabled:"",value:""},NM={class:"pbx-my-2 pbx-py-2"},PM={for:"border-radius-bottom-left",class:"pbx-myPrimaryInputLabel"},DM={disabled:"",value:""},LM={class:"pbx-my-2 pbx-py-2"},AM={for:"border-radius-bottom-right",class:"pbx-myPrimaryInputLabel"},OM={disabled:"",value:""},Ub={__name:"BorderRadius",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref(null),d=i.computed(()=>o.getBorderRadiusGlobal),c=i.computed(()=>o.getBorderRadiusTopLeft),m=i.computed(()=>o.getBorderRadiusTopRight),b=i.computed(()=>o.getBorderRadiusBottomleft),u=i.computed(()=>o.getBorderRadiusBottomRight);return i.watch(d,async g=>{n.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async g=>{a.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async g=>{s.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(b,async g=>{l.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(u,async g=>{p.value=g,await t.initializeElementStyles()},{immediate:!0}),(g,f)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Border Radius")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",hM,i.toDisplayString(i.unref(e)("Global")),1),i.createElementVNode("div",yM,[i.createElementVNode("label",wM,i.toDisplayString(i.unref(e)("Border Radius")),1),i.withDirectives(i.createElementVNode("select",{id:"global-border-radius","onUpdate:modelValue":f[0]||(f[0]=x=>n.value=x),class:"pbx-myPrimarySelect",onChange:f[1]||(f[1]=x=>i.unref(t).handleBorderRadiusGlobal(n.value))},[i.createElementVNode("option",vM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedGlobal,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,n.value]])]),f[10]||(f[10]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("p",kM,i.toDisplayString(i.unref(e)("Specific")),1),i.createElementVNode("div",SM,[i.createElementVNode("label",CM,i.toDisplayString(i.unref(e)("Border Radius top left")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-top-left","onUpdate:modelValue":f[2]||(f[2]=x=>a.value=x),class:"pbx-myPrimarySelect",onChange:f[3]||(f[3]=x=>i.unref(t).handleBorderRadiusTopLeft(a.value))},[i.createElementVNode("option",EM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedTopLeft,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,a.value]])]),f[11]||(f[11]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",TM,[i.createElementVNode("label",MM,i.toDisplayString(i.unref(e)("Border Radius top right")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-top-right","onUpdate:modelValue":f[4]||(f[4]=x=>s.value=x),class:"pbx-myPrimarySelect",onChange:f[5]||(f[5]=x=>i.unref(t).handleBorderRadiusTopRight(s.value))},[i.createElementVNode("option",BM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedTopRight,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,s.value]])]),f[12]||(f[12]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",NM,[i.createElementVNode("label",PM,i.toDisplayString(i.unref(e)("Border Radius bottom left")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-bottom-left","onUpdate:modelValue":f[6]||(f[6]=x=>l.value=x),class:"pbx-myPrimarySelect",onChange:f[7]||(f[7]=x=>i.unref(t).handleBorderRadiusBottomleft(l.value))},[i.createElementVNode("option",DM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedBottomLeft,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,l.value]])]),f[13]||(f[13]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",LM,[i.createElementVNode("label",AM,i.toDisplayString(i.unref(e)("Border Radius bottom right")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-bottom-right","onUpdate:modelValue":f[8]||(f[8]=x=>p.value=x),class:"pbx-myPrimarySelect",onChange:f[9]||(f[9]=x=>i.unref(t).handleBorderRadiusBottomRight(p.value))},[i.createElementVNode("option",OM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedBottomRight,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,p.value]])])]),_:1}))}},VM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},IM={class:"pbx-my-2 pbx-py-2"},_M={for:"border-style",class:"pbx-myPrimaryInputLabel"},RM={disabled:"",value:""},HM={class:"pbx-my-2 pbx-py-2"},zM={for:"border-width",class:"pbx-myPrimaryInputLabel"},FM={disabled:"",value:""},jM={class:"pbx-my-2 pbx-py-2"},qM={for:"border-color",class:"pbx-myPrimaryInputLabel"},WM={class:"pbx-relative pbx-mt-2"},UM={class:"pbx-flex pbx-items-center pbx-gap-2"},GM={key:0},KM={class:"pbx-block pbx-truncate"},JM={class:"pbx-flex pbx-items-center"},YM={key:0},XM={key:2,class:"pbx-ml-3"},QM={key:3,class:"pbx-ml-3"},Gb={__name:"Borders",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.computed(()=>o.getBorderStyle),p=i.computed(()=>o.getBorderWidth),d=i.computed(()=>o.getBorderColor);return i.watch(l,async c=>{n.value=c,await t.initializeElementStyles()},{immediate:!0}),i.watch(p,async c=>{a.value=c,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async c=>{s.value=c,await t.initializeElementStyles()},{immediate:!0}),(c,m)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Border Style, Width & Color")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",VM,i.toDisplayString(i.unref(e)("Border")),1),i.createElementVNode("div",IM,[i.createElementVNode("label",_M,i.toDisplayString(i.unref(e)("Border Style")),1),i.withDirectives(i.createElementVNode("select",{id:"border-style","onUpdate:modelValue":m[0]||(m[0]=b=>n.value=b),class:"pbx-myPrimarySelect",onChange:m[1]||(m[1]=b=>i.unref(t).handleBorderStyle(n.value))},[i.createElementVNode("option",RM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderStyle,b=>(i.openBlock(),i.createElementBlock("option",{key:b},i.toDisplayString(b),1))),128))],544),[[i.vModelSelect,n.value]])]),m[8]||(m[8]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",HM,[i.createElementVNode("label",zM,i.toDisplayString(i.unref(e)("Border Width")),1),i.withDirectives(i.createElementVNode("select",{id:"border-width","onUpdate:modelValue":m[2]||(m[2]=b=>a.value=b),class:"pbx-myPrimarySelect",onChange:m[3]||(m[3]=b=>i.unref(t).handleBorderWidth(a.value))},[i.createElementVNode("option",FM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderWidth,b=>(i.openBlock(),i.createElementBlock("option",{key:b},i.toDisplayString(b),1))),128))],544),[[i.vModelSelect,a.value]])]),m[9]||(m[9]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",jM,[i.createElementVNode("label",qM,i.toDisplayString(i.unref(e)("Border Color")),1),i.createVNode(i.unref(Nn),{as:"div",modelValue:s.value,"onUpdate:modelValue":m[5]||(m[5]=b=>s.value=b)},{default:i.withCtx(()=>[i.createElementVNode("div",WM,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"border-color"},{default:i.withCtx(()=>{var b;return[i.createElementVNode("span",UM,[d.value==="none"?(i.openBlock(),i.createElementBlock("div",GM,m[6]||(m[6]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),s.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${(b=s.value)==null?void 0:b.replace("pbx-border-","")}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",KM,i.toDisplayString(s.value),1)])]}),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderColor,b=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:m[4]||(m[4]=u=>i.unref(t).handleBorderColor(s.value)),key:b,value:b},{default:i.withCtx(({active:u,borderColor:g})=>[i.createElementVNode("li",{class:i.normalizeClass([u?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",JM,[b==="none"?(i.openBlock(),i.createElementBlock("div",YM,m[7]||(m[7]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),b!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`pbx-bg-${b.replace("pbx-border-","")}`])},null,2)):i.createCommentVNode("",!0),b==="none"?(i.openBlock(),i.createElementBlock("span",XM,i.toDisplayString(i.unref(e)("Transparent")),1)):i.createCommentVNode("",!0),b!=="none"?(i.openBlock(),i.createElementBlock("span",QM,i.toDisplayString(b),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])])]),_:1}))}},ZM={key:0,class:"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400"},$M={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0"},eB=i.defineComponent({__name:"TipTap",setup(r){const{translate:e}=pe(),t=ie();return(o,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.unref(t).isSelectedElementValidText()?(i.openBlock(),i.createElementBlock("div",ZM,[i.createElementVNode("div",{onClick:n[0]||(n[0]=a=>i.unref(t).toggleTipTapModal(!0)),class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white"},[i.createElementVNode("p",$M,i.toDisplayString(i.unref(e)("Text")),1),n[1]||(n[1]=i.createElementVNode("span",{class:"material-symbols-outlined"}," chevron_right ",-1))])])):i.createCommentVNode("",!0)]))}}),tB={class:"pbx-my-2 pbx-py-2"},rB={for:"vertical-margin",class:"pbx-myPrimaryInputLabel"},oB={class:"pbx-flex pbx-justify-end pbx-min-h-6"},nB={key:0,class:"pbx-myPrimaryParagraphError"},iB={class:"pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"},aB={class:"pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center"},sB={class:"sm:pbx-grid-cols-2 sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"},lB={key:1,class:"pbx-flex pbx-items-center pbx-my-2 pbx-justify-end"},pB={class:"pbx-flex pbx-justify-end pbx-min-h-6"},dB={key:0,class:"pbx-myPrimaryParagraphError"},cB={class:"pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"},mB={class:"pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center"},bB={class:"sm:pbx-grid-cols-2 sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"},uB={key:1,class:"pbx-flex pbx-items-center pbx-my-2 pbx-justify-end"},Kb={__name:"HTMLEditor",props:{globalPage:{type:Boolean}},setup(r){const e=ie(),t=ne,{translate:o}=pe(),n=r,a=i.computed(()=>t.getElement),s=i.computed(()=>t.getShowModalHTMLEditor),l=i.computed(()=>!a.value||!(a.value instanceof HTMLElement)?"":a.value.outerHTML),p=i.ref(""),d=i.ref("");i.watch(s,async x=>{if(x){if(!n.globalPage){p.value=l.value;return}d.value=await e.generateHtmlFromComponents()}});const c=async()=>{t.setShowModalHTMLEditor(!0)},m=()=>{t.setShowModalHTMLEditor(!1)},b=i.ref(!1),u=i.ref(null),g=async()=>{u.value=null,b.value=!0,await ge(300);const x=await e.applyModifiedHTML(p.value);if(x){u.value=x,b.value=!1;return}t.setShowModalHTMLEditor(!1),b.value=!1},f=async()=>{u.value=null,b.value=!0,u.value=null,await ge(300);const x=await e.applyModifiedComponents(d.value);if(x){u.value=x,b.value=!1;return}t.setShowModalHTMLEditor(!1),b.value=!1};return(x,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("HTML Editor")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",tB,[i.createElementVNode("label",rB,i.toDisplayString(i.unref(o)("Gain full control over components by editing the raw HTML.")),1),y[2]||(y[2]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("button",{onClick:c,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("HTML Editor")),1)]),_:1}),i.createVNode(St,{maxWidth:"7xl",showModalBuilder:s.value,title:i.unref(o)("HTML Editor"),onCloseMainModalBuilder:m},{default:i.withCtx(()=>[r.globalPage?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.withDirectives(i.createElementVNode("textarea",{id:"html-editor","onUpdate:modelValue":y[0]||(y[0]=w=>p.value=w),class:"pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full",style:{overflow:"auto","min-height":"400px"}},null,512),[[i.vModelText,p.value]]),i.createElementVNode("div",oB,[u.value?(i.openBlock(),i.createElementBlock("p",nB," Error: "+i.toDisplayString(u.value),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",iB,[i.createElementVNode("div",aB,[i.createElementVNode("div",sB,[b.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-mySecondaryButton"},i.toDisplayString(i.unref(o)("Close")),1),i.createElementVNode("button",{onClick:g,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("Save")),1)],64)),b.value?(i.openBlock(),i.createElementBlock("div",lB,y[3]||(y[3]=[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")],-1)]))):i.createCommentVNode("",!0)])])])],64)),r.globalPage?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.withDirectives(i.createElementVNode("textarea",{id:"html-editor","onUpdate:modelValue":y[1]||(y[1]=w=>d.value=w),class:"pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full",style:{overflow:"auto","min-height":"400px"}},null,512),[[i.vModelText,d.value]]),i.createElementVNode("div",pB,[u.value?(i.openBlock(),i.createElementBlock("p",dB," Error: "+i.toDisplayString(u.value),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",cB,[i.createElementVNode("div",mB,[i.createElementVNode("div",bB,[b.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-mySecondaryButton"},i.toDisplayString(i.unref(o)("Close")),1),i.createElementVNode("button",{onClick:f,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("Save")),1)],64)),b.value?(i.openBlock(),i.createElementBlock("div",uB,y[4]||(y[4]=[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")],-1)]))):i.createCommentVNode("",!0)])])])],64)):i.createCommentVNode("",!0)]),_:1},8,["showModalBuilder","title"])],64))}},gB={class:"pbx-flex pbx-h-full pbx-flex-col"},xB={class:"pbx-flex pbx-flex-row pbx-justify-between pbx-pt-7 pbx-pr-4 pbx-pl-4 pbx-items-center pbx-mb-3"},fB={class:"pbx-font-medium pbx-text-sm"},hB={class:"pbx-lowercase"},yB={class:"pbx-mb-1"},wB={class:"pbx-mb-1"},vB={class:"pbx-my-1"},kB={class:"pbx-my-1"},SB={class:"pbx-my-1"},CB={class:"pbx-my-1"},EB={class:"pbx-my-1"},TB={class:"pbx-my-1"},MB={class:"pbx-my-1"},BB={class:"pbx-my-1"},NB={class:"pbx-my-1"},PB={class:"pbx-my-1"},DB={class:"pbx-myPrimaryInputLabel pbx-my-4"},LB={class:"pbx-my-2 pbx-py-2"},AB={key:0,class:"pbx-my-1"},OB={class:"pbx-myPrimaryInputLabel pbx-my-4"},VB={class:"pbx-my-2 pbx-py-2"},IB={id:"pagebuilder-right-menu",class:"pbx-flex pbx-flex-col pbx-gap-2 pbx-pt-4 pbx-pb-2"},_B={key:0},RB={class:"pbx-flex pbx-items-center pbx-my-2 pbx-py-4 pbx-px-2 pbx-justify-center"},HB={class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},zB={class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},FB={key:1,class:"pbx-pb-12"},jB={class:"pbx-myPrimaryParagraph"},qB={class:"pbx-my-1"},WB={class:"pbx-my-1"},UB={class:"pbx-my-1"},GB={class:"pbx-my-1"},KB={class:"pbx-my-1"},JB={class:"pbx-my-1"},YB={class:"pbx-my-1"},XB={class:"pbx-my-1"},QB={class:"pbx-my-1"},ZB={class:"pbx-my-1"},$B={__name:"RightSidebarEditor",emits:["closeEditor"],setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getComponents),s=i.computed(()=>o.getElement),l=i.computed(()=>{var x;return(x=s.value)==null?void 0:x.tagName});i.computed(()=>s.value instanceof HTMLElement&&s.value.innerText.trim()!==" "||s.value instanceof HTMLImageElement);const p=i.ref(null);let d=0;i.watch(()=>o.getElement,()=>{i.nextTick(()=>{p.value&&(p.value.scrollTop=d)})});function c(){p.value&&(d=p.value.scrollTop)}const m=function(x,y){const S=`
646
+ `}]}}];function yw(){const r=i.inject("closeAddComponentModal",null),e=i.inject("closeMediaLibraryModal",null);return{closeAddComponentModal:r||(()=>{console.warn("closeAddComponentModal function not available. Make sure you are using this within a PageBuilder context.")}),closeMediaLibraryModal:e||(()=>{console.warn("closeMediaLibraryModal function not available. Make sure you are using this within a MediaLibraryModal context.")})}}const hT={key:0,class:"pbx-min-h-[90vh] pbx-h-[90vh]"},yT={class:"pbx-flex pbx-items-center pbx-justify-center"},wT={class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},vT={class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},kT={key:1},ST={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},CT=["onClick"],ET={key:0,class:"pbx-mb-8"},TT={class:"pbx-myQuaternaryHeader pbx-mb-4"},MT={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},BT=["onClick"],NT={class:"pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4 pbx-pb-4 pbx-min-h-[96rem]"},PT=["onClick"],DT={class:"pbx-overflow-hidden pbx-whitespace-pre-line pbx-flex-1 pbx-h-auto pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 lg:pbx-py-10 pbx-py-8 pbx-px-2"},LT=["innerHTML"],AT={class:"pbx-p-3"},OT={class:"pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal"},VT={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},IT={class:"pbx-mb-8"},_T={class:"pbx-myQuaternaryHeader pbx-mb-4"},RT={class:"pbx-px-2 pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 lg:pbx-grid-cols-4 pbx-gap-4"},HT=["onClick"],zT={class:"pbx-max-h-72 pbx-cursor-pointer pbx-object-contain pbx-bg-white pbx-mx-auto"},FT={class:"pbx-myPrimaryParagraph pbx-text-base pbx-font-medium"},jT={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},qT={key:0,class:"pbx-px-2"},WT={class:"pbx-myQuaternaryHeader pbx-mb-4"},UT={class:"pbx-mb-4 pbx-flex pbx-jusitify-left pbx-items-center pbx-gap-2"},GT=["onClick"],KT={class:"pbx-grid pbx-grid-cols-1 sm:pbx-grid-cols-2 md:pbx-grid-cols-3 pbx-gap-4 pbx-pb-4 pbx-min-h-[96rem]"},JT=["onClick"],YT={class:"pbx-overflow-hidden pbx-whitespace-pre-line pbx-flex-1 pbx-h-auto pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 lg:pbx-py-10 pbx-py-8 pbx-px-2"},XT=["innerHTML"],QT={class:"pbx-p-3"},ZT={class:"pbx-myPrimaryParagraph pbx-text-sm pbx-font-normal"},$T={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-font-normal pbx-pt-2"},e6=ma(i.defineComponent({__name:"DefaultBuilderComponents",props:{customMediaComponent:{type:Object,default:null}},setup(r){const{translate:e}=pe(),t=ie(),o=i.ref(!1),n=i.ref("Components"),a=["Components","Themes"],s=i.ref("All"),l=i.computed(()=>{const x=Al[0].components.data.map(y=>y.category);return["All",...new Set(x)]}),p=i.computed(()=>s.value==="All"?Al[0].components.data:Al[0].components.data.filter(x=>x.category===s.value)),d=i.ref("All"),c=i.computed(()=>{const x=Ol[0].themes.data.map(y=>y.category);return["All",...new Set(x)]}),m=i.computed(()=>d.value==="All"?Ol[0].themes.data:Ol[0].themes.data.filter(x=>x.category===d.value)),{closeAddComponentModal:b}=yw(),u=async function(x){o.value=!0,await t.addTheme(x),b(),o.value=!1},g=async function(x){o.value=!0;const y=x.html_code.replace(/Layouts and visual\./g,e("Layouts and visual.")).replace(/Start customizing by editing this default text directly in the editor\./g,e("Start customizing by editing this default text directly in the editor.")),w={...x,html_code:y,title:x.title};await t.addComponent(w),b(),o.value=!1},f=function(x){return{id:null,html_code:x.html_code,title:x.title}};return(x,y)=>(i.openBlock(),i.createElementBlock("div",null,[o.value?(i.openBlock(),i.createElementBlock("div",hT,[i.createElementVNode("div",yT,[i.createElementVNode("div",wT,[i.createElementVNode("span",vT,i.toDisplayString(i.unref(e)("Loading...")),1)])])])):i.createCommentVNode("",!0),o.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",kT,[i.createElementVNode("div",ST,[(i.openBlock(),i.createElementBlock(i.Fragment,null,i.renderList(a,w=>i.createElementVNode("button",{key:w,onClick:v=>n.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[n.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,CT)),64))]),n.value==="Themes"?(i.openBlock(),i.createElementBlock("div",ET,[i.createElementVNode("h3",TT,i.toDisplayString(i.unref(e)("Themes")),1),i.createElementVNode("div",MT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(c.value,w=>(i.openBlock(),i.createElementBlock("button",{key:w,onClick:v=>d.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[d.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,BT))),128))]),i.createElementVNode("div",NT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(m.value,w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96",onClick:v=>u(w.html_code)},[i.createElementVNode("div",DT,[i.createElementVNode("div",{class:"pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center",innerHTML:w.cover_image},null,8,LT)]),i.createElementVNode("div",AT,[i.createElementVNode("h4",OT,i.toDisplayString(i.unref(e)(w.title)),1),i.createElementVNode("div",VT,i.toDisplayString(i.unref(e)("Click to add theme")),1)])],8,PT))),128))])])):i.createCommentVNode("",!0),n.value==="Components"?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.createElementVNode("div",IT,[i.createElementVNode("h3",_T,i.toDisplayString(i.unref(e)("Helper Components")),1),i.createElementVNode("div",RT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(fT),w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96 pbx-p-4",onClick:v=>g(w)},[i.createElementVNode("div",zT,[i.createCommentVNode("",!0),i.createElementVNode("h4",FT,i.toDisplayString(i.unref(e)(w.title)),1)]),i.createElementVNode("div",jT,i.toDisplayString(i.unref(e)("Click to add"))+" "+i.toDisplayString(w.title.toLowerCase())+" "+i.toDisplayString(i.unref(e)("component")),1)],8,HT))),128))])]),r.customMediaComponent?(i.openBlock(),i.createElementBlock("div",qT,[i.createElementVNode("h3",WT,i.toDisplayString(i.unref(e)("Layout Components")),1),i.createElementVNode("div",UT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(l.value,w=>(i.openBlock(),i.createElementBlock("button",{key:w,onClick:v=>s.value=w,class:i.normalizeClass(["pbx-mySecondaryButton pbx-text-xs pbx-px-4",[s.value===w?"pbx-bg-myPrimaryLinkColor pbx-text-white hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white":"hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"]])},i.toDisplayString(i.unref(e)(w)),11,GT))),128))]),i.createElementVNode("div",KT,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(p.value,w=>(i.openBlock(),i.createElementBlock("div",{key:w.title,class:"pbx-border-solid pbx-border pbx-border-gray-400 pbx-overflow-hidden hover:pbx-border-myPrimaryLinkColor pbx-duration-100 pbx-cursor-pointer pbx-max-h-96",onClick:v=>g(f(w))},[i.createElementVNode("div",YT,[i.createElementVNode("div",{class:"pbx-max-h-72 pbx-cursor-pointer pbx-bg-white pbx-mx-auto pbx-flex pbx-items-center pbx-justify-center",innerHTML:w.cover_image},null,8,XT)]),i.createElementVNode("div",QT,[i.createElementVNode("h4",ZT,i.toDisplayString(i.unref(e)(w.title)),1),i.createElementVNode("div",$T,i.toDisplayString(i.unref(e)("Click to add component")),1)])],8,JT))),128))])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),y[0]||(y[0]=i.createElementVNode("div",null,[i.createElementVNode("button",{class:"pbx-sr-only"},"Focusable fallback")],-1))]))]))}}),[["__scopeId","data-v-9dc83d45"]]),t6={class:"pbx-w-full pbx-inset-x-0 pbx-bg-white pbx-overflow-x-auto lg:pbx-pt-2 pbx-pt-2"},r6={key:0},o6={key:1},n6={__name:"BuilderComponents",props:{firstButtonText:{required:!0},title:{required:!0},show:{type:Boolean,default:!1,required:!0},CustomBuilderComponents:{type:Object,default:null}},emits:["firstModalButtonSearchComponentsFunction"],setup(r,{emit:e}){const t=i.inject("CustomMediaComponent"),o=e,n=function(){o("firstModalButtonSearchComponentsFunction")};return(a,s)=>(i.openBlock(),i.createBlock(St,{title:r.title,maxWidth:"6xl",showModalBuilder:r.show,onCloseMainModalBuilder:n,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createElementVNode("div",t6,[i.createElementVNode("div",null,[r.CustomBuilderComponents?(i.openBlock(),i.createElementBlock("div",r6,[(i.openBlock(),i.createBlock(i.resolveDynamicComponent(r.CustomBuilderComponents)))])):(i.openBlock(),i.createElementBlock("div",o6,[i.createVNode(e6,{customMediaComponent:i.unref(t)},null,8,["customMediaComponent"])]))])])]),_:1},8,["title","showModalBuilder"]))}},i6={setup(){return{expanded:i.ref(!1)}}},a6={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0"},s6={key:0,class:"material-symbols-outlined"},l6={key:1,class:"material-symbols-outlined"};function p6(r,e,t,o,n,a){return i.openBlock(),i.createElementBlock("div",{class:i.normalizeClass(["pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400",{"":o.expanded}])},[i.createElementVNode("div",{class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 pbx-bg-white hover:pbx-bg-myPrimaryLightGrayColor pbx-select-none",onClick:e[0]||(e[0]=s=>o.expanded=!o.expanded)},[i.createElementVNode("p",a6,[i.renderSlot(r.$slots,"title")]),o.expanded?(i.openBlock(),i.createElementBlock("span",s6," keyboard_arrow_down ")):i.createCommentVNode("",!0),o.expanded?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("span",l6," chevron_right "))]),i.createElementVNode("div",{class:i.normalizeClass([[o.expanded?"pbx-block pbx-bg-indigo-50 pbx-border-0 pbx-border-solid pbx-border-t pbx-border-red-50":"pbx-hidden"],"pbx-px-4 pbx-ease-linear pbx-duration-75 pbx-pb-8"])},[i.renderSlot(r.$slots,"content")],2)],2)}const ht=ma(i6,[["render",p6]]),d6={class:"pbx-myPrimaryInputLabel pbx-my-4"},c6={class:"pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4"},m6=["onClick"],b6={class:"pbx-flex pbx-items-center pbx-gap-1"},u6={class:"pbx-mr-1"},g6={class:"pbx-my-2 pbx-py-2"},x6={for:"custom-css",class:"pbx-myPrimaryInputLabel"},f6={class:"pbx-flex pbx-gap-2 pbx-item-center"},h6=["placeholder"],y6={key:0,class:"pbx-myPrimaryInputError"},ww={__name:"ClassEditor",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getCurrentClasses);i.watch(a,d=>{n.value=d},{immediate:!0});const s=i.ref(""),l=i.ref(""),p=async()=>{var m;const d=s.value.trim();if(!d){l.value="Please enter a class name.";return}const c=d.startsWith("pbx-")?d:"pbx-"+d;if((m=n.value)!=null&&m.includes(c)){l.value=`Class "${c}" is already added.`;return}l.value="",t.handleAddClasses(d),await t.initializeElementStyles(),s.value=""};return(d,c)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Generated CSS")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",d6,i.toDisplayString(i.unref(e)("This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.")),1),i.createElementVNode("div",c6,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,m=>(i.openBlock(),i.createElementBlock("div",{key:m,class:"pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium",onClick:async()=>{i.unref(t).handleRemoveClasses(m),await i.unref(t).initializeElementStyles()}},[i.createElementVNode("div",b6,[i.createElementVNode("span",u6,i.toDisplayString(m),1)])],8,m6))),128))]),c[3]||(c[3]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",g6,[i.createElementVNode("label",x6,[i.createTextVNode(i.toDisplayString(i.unref(e)("Add your CSS."))+" ",1),c[2]||(c[2]=i.createElementVNode("br",null,null,-1)),i.createTextVNode(" "+i.toDisplayString(i.unref(e)("The pbx- prefix is added automatically.")),1)]),i.createElementVNode("div",f6,[i.withDirectives(i.createElementVNode("input",{id:"custom-css","onUpdate:modelValue":c[0]||(c[0]=m=>s.value=m),type:"text",placeholder:i.unref(e)("Type class"),onKeydown:c[1]||(c[1]=i.withKeys(m=>p(),["enter"])),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,h6),[[i.vModelText,s.value]]),i.createElementVNode("button",{onClick:p,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Add")),1)])]),l.value?(i.openBlock(),i.createElementBlock("p",y6,i.toDisplayString(l.value),1)):i.createCommentVNode("",!0)]),_:1}))}},w6={class:"pbx-myPrimaryInputLabel pbx-my-4"},v6={class:"pbx-flex pbx-flex-row pbx-flex-wrap pbx-gap-2 pbx-mt-2 pbx-mb-4"},k6=["onClick"],S6={class:"pbx-flex pbx-items-center pbx-gap-1"},C6={class:"pbx-mr-1"},E6={class:"pbx-my-2 pbx-py-2"},T6={for:"custom-style-property",class:"pbx-myPrimaryInputLabel"},M6={class:"pbx-flex pbx-gap-2 pbx-flex-col pbx-item-center"},B6=["placeholder","onKeydown"],N6=["placeholder"],P6={key:0,class:"pbx-myPrimaryInputError"},vw={__name:"StyleEditor",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getCurrentStyles);i.watch(a,b=>{n.value=b},{immediate:!0});const s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=()=>{d.value&&d.value.focus()},m=async()=>{const b=s.value.trim(),u=l.value.trim();if(!b||!u){p.value="Please enter a property and a value.";return}if(n.value&&n.value[b]){p.value=`Property "${b}" already exists. Remove it first to add a new one.`;return}p.value="",t.handleAddStyle(b,u),await t.initializeElementStyles(),s.value="",l.value=""};return(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Inline Styles")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",w6,i.toDisplayString(i.unref(e)("These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.")),1),i.createElementVNode("div",v6,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(n.value,(g,f)=>(i.openBlock(),i.createElementBlock("div",{key:f,class:"pbx-myPrimaryTag pbx-cursor-pointer hover:pbx-bg-myPrimaryErrorColor hover:pbx-text-white pbx-text-xs pbx-py-2 pbx-font-medium",onClick:async()=>{i.unref(t).handleRemoveStyle(f),await i.unref(t).initializeElementStyles()}},[i.createElementVNode("div",S6,[i.createElementVNode("span",C6,i.toDisplayString(f)+": "+i.toDisplayString(g)+"; ",1)])],8,k6))),128))]),u[2]||(u[2]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",E6,[i.createElementVNode("label",T6,i.toDisplayString(i.unref(e)("Add your own style.")),1),i.createElementVNode("div",M6,[i.withDirectives(i.createElementVNode("input",{id:"custom-style-property","onUpdate:modelValue":u[0]||(u[0]=g=>s.value=g),type:"text",placeholder:i.unref(e)("property"),onKeydown:i.withKeys(i.withModifiers(c,["prevent"]),["enter"]),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,B6),[[i.vModelText,s.value]]),i.withDirectives(i.createElementVNode("input",{id:"custom-style-value",ref_key:"valueInputRef",ref:d,"onUpdate:modelValue":u[1]||(u[1]=g=>l.value=g),type:"text",placeholder:i.unref(e)("value"),onKeydown:i.withKeys(m,["enter"]),autocomplete:"off",class:"pbx-myPrimaryInput"},null,40,N6),[[i.vModelText,l.value]]),i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Add")),1)])]),p.value?(i.openBlock(),i.createElementBlock("p",P6,i.toDisplayString(p.value),1)):i.createCommentVNode("",!0)]),_:1}))}};function D6(r){return new Promise((e,t)=>{const o=new window.Image;o.onload=e,o.onerror=t,o.src=r})}const L6=["src"],A6={__name:"ImageEditor",setup(r){const{translate:e}=pe(),t=ne,o=i.inject("CustomMediaComponent"),n=i.ref(!1),a=i.ref(!1),s=i.ref(""),l=i.ref(""),p=i.ref(""),d=i.ref(null),c=i.ref(null),m=i.ref(null),b=i.computed(()=>(t.getBasePrimaryImage&&g(t.getBasePrimaryImage),t.getBasePrimaryImage)),u=function(){a.value=!0,s.value=e("Media Library"),l.value=null,p.value=e("Close"),d.value=e(" Select image"),m.value=function(){a.value=!1}},g=async function(f){n.value=!0,f&&typeof f=="string"&&f.length>2&&(await D6(f),await ge(200),n.value=!1)};return(f,x)=>(i.openBlock(),i.createElementBlock("div",null,[i.withDirectives(i.createElementVNode("div",null,x[0]||(x[0]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-mt-4 pbx-min-h-80"},[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")])],-1)]),512),[[i.vShow,n.value]]),i.withDirectives(i.createElementVNode("div",null,[i.createElementVNode("img",{class:"pbx-object-cover pbx-object-center pbx-w-full pbx-cursor-pointer",src:b.value,onClick:u,alt:"image"},null,8,L6)],512),[[i.vShow,b.value&&!n.value]]),i.createVNode($0,{open:a.value,title:s.value,description:l.value,firstButtonText:p.value,secondButtonText:d.value,thirdButtonText:c.value,customMediaComponent:i.unref(o),onFirstMediaButtonFunction:m.value},null,8,["open","title","description","firstButtonText","secondButtonText","thirdButtonText","customMediaComponent","onFirstMediaButtonFunction"])]))}},O6={class:"pbx-my-2 pbx-py-2"},V6={class:"pbx-relative"},I6={class:"pbx-flex pbx-items-center pbx-gap-2"},_6={key:0},R6={class:"pbx-flex pbx-items-center"},H6={key:0},z6={key:2,class:"pbx-ml-3"},F6={key:3,class:"pbx-ml-3"},j6={__name:"ManageBackgroundOpacity",setup(r){const e=ie(),t=ne,o=i.ref(null),n=i.computed(()=>t.getBackgroundOpacity);return i.watch(n,async a=>{o.value=a,await e.initializeElementStyles()},{immediate:!0}),(a,s)=>(i.openBlock(),i.createElementBlock("div",O6,[s[3]||(s[3]=i.createElementVNode("label",{for:"bg-opacity",class:"pbx-myPrimaryInputLabel"}," Background Opacity",-1)),i.createVNode(i.unref(Nn),{as:"div",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l)},{default:i.withCtx(()=>[i.createElementVNode("div",V6,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"bg-opacity"},{default:i.withCtx(()=>[i.createElementVNode("span",I6,[o.value==="none"?(i.openBlock(),i.createElementBlock("div",_6,s[1]||(s[1]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),o.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${o.value}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["pbx-block pbx-truncate",[(o.value!=="none","")]])},i.toDisplayString(o.value==="none"?"Transparent":o.value),3)])]),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vn).backgroundOpacities,l=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:p=>i.unref(e).handleBackgroundOpacity(l),key:l,value:l},{default:i.withCtx(({active:p})=>[i.createElementVNode("li",{class:i.normalizeClass([p?"pbx-bg-myPrimaryLinkColor text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",R6,[l==="none"?(i.openBlock(),i.createElementBlock("div",H6,s[2]||(s[2]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${l}`])},null,2)):i.createCommentVNode("",!0),l==="none"?(i.openBlock(),i.createElementBlock("span",z6,"Transparent")):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("span",F6,i.toDisplayString(l),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["onClick","value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])]))}},q6={class:"pbx-my-2 pbx-py-2"},W6={class:"pbx-relative"},U6={class:"pbx-flex pbx-items-center pbx-gap-2"},G6={key:0},K6={class:"pbx-flex pbx-items-center"},J6={key:0},Y6={key:2,class:"pbx-ml-3"},X6={key:3,class:"pbx-ml-3"},Q6={__name:"ManageOpacity",setup(r){const e=ie(),t=ne,o=i.ref(null),n=i.computed(()=>t.getOpacity);return i.watch(n,async a=>{o.value=a,await e.initializeElementStyles()},{immediate:!0}),(a,s)=>(i.openBlock(),i.createElementBlock("div",q6,[s[3]||(s[3]=i.createElementVNode("label",{for:"default-opacity",class:"pbx-myPrimaryInputLabel"}," Opacity",-1)),i.createVNode(i.unref(Nn),{as:"div",modelValue:o.value,"onUpdate:modelValue":s[0]||(s[0]=l=>o.value=l)},{default:i.withCtx(()=>[i.createElementVNode("div",W6,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"default-opacity"},{default:i.withCtx(()=>[i.createElementVNode("span",U6,[o.value==="none"?(i.openBlock(),i.createElementBlock("div",G6,s[1]||(s[1]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),o.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${o.value}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",{class:i.normalizeClass(["pbx-block pbx-truncate",[(o.value!=="none","")]])},i.toDisplayString(o.value==="none"?"Transparent":o.value),3)])]),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vn).opacities,l=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:p=>i.unref(e).handleOpacity(l),key:l,value:l},{default:i.withCtx(({active:p})=>[i.createElementVNode("li",{class:i.normalizeClass([p?"pbx-bg-myPrimaryLinkColor text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",K6,[l==="none"?(i.openBlock(),i.createElementBlock("div",J6,s[2]||(s[2]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`${l}`])},null,2)):i.createCommentVNode("",!0),l==="none"?(i.openBlock(),i.createElementBlock("span",Y6,"Transparent")):i.createCommentVNode("",!0),l!=="none"?(i.openBlock(),i.createElementBlock("span",X6,i.toDisplayString(l),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["onClick","value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])]))}},Z6={__name:"OpacityEditor",setup(r){const{translate:e}=pe();return(t,o)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Opacity & Transparency")),1)]),content:i.withCtx(()=>[i.createVNode(Q6),o[0]||(o[0]=i.createElementVNode("hr",null,null,-1)),i.createVNode(j6)]),_:1}))}},$6={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},eM={class:"pbx-my-2 pbx-py-2"},tM={for:"font-desktop",class:"pbx-myPrimaryInputLabel"},rM={disabled:"",value:""},oM={class:"pbx-my-2 pbx-py-2"},nM={for:"font-weight",class:"pbx-myPrimaryInputLabel"},iM={disabled:"",value:""},aM={class:"pbx-my-2 pbx-py-2"},sM={for:"font-family",class:"pbx-myPrimaryInputLabel"},lM={disabled:"",value:""},pM={class:"pbx-my-2 pbx-py-2"},dM={for:"font-style",class:"pbx-myPrimaryInputLabel"},cM={disabled:"",value:""},kw={__name:"Typography",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref(null),d=i.ref(null),c=i.ref(null),m=i.computed(()=>o.getFontBase),b=i.computed(()=>o.getFontDesktop),u=i.computed(()=>o.getFontTablet),g=i.computed(()=>o.getFontMobile),f=i.computed(()=>o.getFontWeight),x=i.computed(()=>o.getFontFamily),y=i.computed(()=>o.getFontStyle);return i.watch(m,async w=>{n.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(b,async w=>{a.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(u,async w=>{s.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(g,async w=>{l.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(f,async w=>{p.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(x,async w=>{d.value=w,await t.initializeElementStyles()},{immediate:!0}),i.watch(y,async w=>{c.value=w,await t.initializeElementStyles()},{immediate:!0}),(w,v)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Typographies")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",$6,i.toDisplayString(i.unref(e)("Font Appearance")),1),i.createCommentVNode("",!0),i.createElementVNode("div",eM,[i.createElementVNode("label",tM,i.toDisplayString(i.unref(e)("Font size")),1),i.withDirectives(i.createElementVNode("select",{id:"font-desktop","onUpdate:modelValue":v[2]||(v[2]=h=>a.value=h),class:"pbx-myPrimarySelect",onChange:v[3]||(v[3]=h=>i.unref(t).handleFontSizeDesktop(a.value))},[i.createElementVNode("option",rM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Vo).fontDesktop,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,a.value]])]),i.createCommentVNode("",!0),v[14]||(v[14]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",oM,[i.createElementVNode("label",nM,i.toDisplayString(i.unref(e)("Font weight")),1),i.withDirectives(i.createElementVNode("select",{id:"font-weight","onUpdate:modelValue":v[8]||(v[8]=h=>p.value=h),class:"pbx-myPrimarySelect",onChange:v[9]||(v[9]=h=>i.unref(t).handleFontWeight(p.value))},[i.createElementVNode("option",iM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontWeight,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,p.value]])]),v[15]||(v[15]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",aM,[i.createElementVNode("label",sM,i.toDisplayString(i.unref(e)("Font family")),1),i.withDirectives(i.createElementVNode("select",{id:"font-family","onUpdate:modelValue":v[10]||(v[10]=h=>d.value=h),class:"pbx-myPrimarySelect",onChange:v[11]||(v[11]=h=>i.unref(t).handleFontFamily(d.value))},[i.createElementVNode("option",lM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontFamily,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,d.value]])]),v[16]||(v[16]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",pM,[i.createElementVNode("label",dM,i.toDisplayString(i.unref(e)("Font Style")),1),i.withDirectives(i.createElementVNode("select",{id:"font-style","onUpdate:modelValue":v[12]||(v[12]=h=>c.value=h),class:"pbx-myPrimarySelect",onChange:v[13]||(v[13]=h=>i.unref(t).handleFontStyle(c.value))},[i.createElementVNode("option",cM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(no).fontStyle,h=>(i.openBlock(),i.createElementBlock("option",{key:h},i.toDisplayString(h),1))),128))],544),[[i.vModelSelect,c.value]])])]),_:1}))}},mM={class:"pbx-my-2 pbx-py-2"},bM={class:"pbx-pt-4 pbx-pb-2 pbx-mb-4"},uM={class:"pbx-myPrimaryInputLabel pbx-font-medium pbx-italic"},gM={for:"vertical-padding",class:"pbx-myPrimaryInputLabel"},xM={disabled:"",value:""},fM={class:"pbx-my-2 pbx-py-2"},hM={for:"horizontal-padding",class:"pbx-myPrimaryInputLabel"},yM={disabled:"",value:""},Sw={__name:"Padding",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.computed(()=>o.getFontVerticalPadding),d=i.computed(()=>o.getFontHorizontalPadding),c=i.computed(()=>o.getFontVerticalMargin),m=i.computed(()=>o.getFontHorizontalMargin);return i.watch(p,async b=>{n.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async b=>{a.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async b=>{s.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async b=>{l.value=b,await t.initializeElementStyles()},{immediate:!0}),(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Padding")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",mM,[i.createElementVNode("div",bM,[i.createElementVNode("p",uM,i.toDisplayString(i.unref(e)("Large Screens Only")),1),u[4]||(u[4]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("label",gM,i.toDisplayString(i.unref(e)("Vertical Padding")),1),i.withDirectives(i.createElementVNode("select",{id:"vertical-padding","onUpdate:modelValue":u[0]||(u[0]=g=>n.value=g),class:"pbx-myPrimarySelect",onChange:u[1]||(u[1]=g=>i.unref(t).handleVerticalPadding(n.value))},[i.createElementVNode("option",xM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).verticalPadding,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,n.value]])]),u[5]||(u[5]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",fM,[i.createElementVNode("label",hM,i.toDisplayString(i.unref(e)("Horizontal Padding")),1),i.withDirectives(i.createElementVNode("select",{id:"horizontal-padding","onUpdate:modelValue":u[2]||(u[2]=g=>a.value=g),class:"pbx-myPrimarySelect",onChange:u[3]||(u[3]=g=>i.unref(t).handleHorizontalPadding(a.value))},[i.createElementVNode("option",yM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).horizontalPadding,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,a.value]])])]),_:1}))}},wM={class:"pbx-my-2 pbx-py-2"},vM={class:"pbx-pt-4 pbx-pb-2 pbx-mb-4"},kM={class:"pbx-myPrimaryInputLabel pbx-font-medium pbx-italic"},SM={for:"vertical-margin",class:"pbx-myPrimaryInputLabel"},CM={disabled:"",value:""},EM={class:"pbx-my-2 pbx-py-2"},TM={for:"horizontal-margin",class:"pbx-myPrimaryInputLabel"},MM={disabled:"",value:""},Cw={__name:"Margin",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.computed(()=>o.getFontVerticalPadding),d=i.computed(()=>o.getFontHorizontalPadding),c=i.computed(()=>o.getFontVerticalMargin),m=i.computed(()=>o.getFontHorizontalMargin);return i.watch(p,async b=>{n.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async b=>{a.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async b=>{s.value=b,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async b=>{l.value=b,await t.initializeElementStyles()},{immediate:!0}),(b,u)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Margin")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",wM,[i.createElementVNode("div",vM,[i.createElementVNode("p",kM,i.toDisplayString(i.unref(e)("Large Screens Only")),1),u[4]||(u[4]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("label",SM,i.toDisplayString(i.unref(e)("Vertical Margin")),1),i.withDirectives(i.createElementVNode("select",{id:"vertical-margin","onUpdate:modelValue":u[0]||(u[0]=g=>s.value=g),class:"pbx-myPrimarySelect",onChange:u[1]||(u[1]=g=>i.unref(t).handleVerticalMargin(s.value))},[i.createElementVNode("option",CM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).verticalMargin,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,s.value]])]),u[5]||(u[5]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",EM,[i.createElementVNode("label",TM,i.toDisplayString(i.unref(e)("Horizontal Margin")),1),i.withDirectives(i.createElementVNode("select",{id:"horizontal-margin","onUpdate:modelValue":u[2]||(u[2]=g=>l.value=g),class:"pbx-myPrimarySelect",onChange:u[3]||(u[3]=g=>i.unref(t).handleHorizontalMargin(l.value))},[i.createElementVNode("option",MM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref($t).horizontalMargin,g=>(i.openBlock(),i.createElementBlock("option",{key:g},i.toDisplayString(g),1))),128))],544),[[i.vModelSelect,l.value]])])]),_:1}))}},BM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},NM={class:"pbx-my-2 pbx-py-2"},PM={for:"global-border-radius",class:"pbx-myPrimaryInputLabel"},DM={disabled:"",value:""},LM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},AM={class:"pbx-my-2 pbx-py-2"},OM={for:"border-radius-top-left",class:"pbx-myPrimaryInputLabel"},VM={disabled:"",value:""},IM={class:"pbx-my-2 pbx-py-2"},_M={for:"border-radius-top-right",class:"pbx-myPrimaryInputLabel"},RM={disabled:"",value:""},HM={class:"pbx-my-2 pbx-py-2"},zM={for:"border-radius-bottom-left",class:"pbx-myPrimaryInputLabel"},FM={disabled:"",value:""},jM={class:"pbx-my-2 pbx-py-2"},qM={for:"border-radius-bottom-right",class:"pbx-myPrimaryInputLabel"},WM={disabled:"",value:""},Ew={__name:"BorderRadius",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.ref(null),p=i.ref(null),d=i.computed(()=>o.getBorderRadiusGlobal),c=i.computed(()=>o.getBorderRadiusTopLeft),m=i.computed(()=>o.getBorderRadiusTopRight),b=i.computed(()=>o.getBorderRadiusBottomleft),u=i.computed(()=>o.getBorderRadiusBottomRight);return i.watch(d,async g=>{n.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(c,async g=>{a.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(m,async g=>{s.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(b,async g=>{l.value=g,await t.initializeElementStyles()},{immediate:!0}),i.watch(u,async g=>{p.value=g,await t.initializeElementStyles()},{immediate:!0}),(g,f)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Border Radius")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",BM,i.toDisplayString(i.unref(e)("Global")),1),i.createElementVNode("div",NM,[i.createElementVNode("label",PM,i.toDisplayString(i.unref(e)("Border Radius")),1),i.withDirectives(i.createElementVNode("select",{id:"global-border-radius","onUpdate:modelValue":f[0]||(f[0]=x=>n.value=x),class:"pbx-myPrimarySelect",onChange:f[1]||(f[1]=x=>i.unref(t).handleBorderRadiusGlobal(n.value))},[i.createElementVNode("option",DM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedGlobal,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,n.value]])]),f[10]||(f[10]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("p",LM,i.toDisplayString(i.unref(e)("Specific")),1),i.createElementVNode("div",AM,[i.createElementVNode("label",OM,i.toDisplayString(i.unref(e)("Border Radius top left")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-top-left","onUpdate:modelValue":f[2]||(f[2]=x=>a.value=x),class:"pbx-myPrimarySelect",onChange:f[3]||(f[3]=x=>i.unref(t).handleBorderRadiusTopLeft(a.value))},[i.createElementVNode("option",VM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedTopLeft,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,a.value]])]),f[11]||(f[11]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",IM,[i.createElementVNode("label",_M,i.toDisplayString(i.unref(e)("Border Radius top right")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-top-right","onUpdate:modelValue":f[4]||(f[4]=x=>s.value=x),class:"pbx-myPrimarySelect",onChange:f[5]||(f[5]=x=>i.unref(t).handleBorderRadiusTopRight(s.value))},[i.createElementVNode("option",RM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedTopRight,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,s.value]])]),f[12]||(f[12]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",HM,[i.createElementVNode("label",zM,i.toDisplayString(i.unref(e)("Border Radius bottom left")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-bottom-left","onUpdate:modelValue":f[6]||(f[6]=x=>l.value=x),class:"pbx-myPrimarySelect",onChange:f[7]||(f[7]=x=>i.unref(t).handleBorderRadiusBottomleft(l.value))},[i.createElementVNode("option",FM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedBottomLeft,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,l.value]])]),f[13]||(f[13]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",jM,[i.createElementVNode("label",qM,i.toDisplayString(i.unref(e)("Border Radius bottom right")),1),i.withDirectives(i.createElementVNode("select",{id:"border-radius-bottom-right","onUpdate:modelValue":f[8]||(f[8]=x=>p.value=x),class:"pbx-myPrimarySelect",onChange:f[9]||(f[9]=x=>i.unref(t).handleBorderRadiusBottomRight(p.value))},[i.createElementVNode("option",WM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(Ct).roundedBottomRight,x=>(i.openBlock(),i.createElementBlock("option",{key:x},i.toDisplayString(x),1))),128))],544),[[i.vModelSelect,p.value]])])]),_:1}))}},UM={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-py-0 pbx-my-4"},GM={class:"pbx-my-2 pbx-py-2"},KM={for:"border-style",class:"pbx-myPrimaryInputLabel"},JM={disabled:"",value:""},YM={class:"pbx-my-2 pbx-py-2"},XM={for:"border-width",class:"pbx-myPrimaryInputLabel"},QM={disabled:"",value:""},ZM={class:"pbx-my-2 pbx-py-2"},$M={for:"border-color",class:"pbx-myPrimaryInputLabel"},eB={class:"pbx-relative pbx-mt-2"},tB={class:"pbx-flex pbx-items-center pbx-gap-2"},rB={key:0},oB={class:"pbx-block pbx-truncate"},nB={class:"pbx-flex pbx-items-center"},iB={key:0},aB={key:2,class:"pbx-ml-3"},sB={key:3,class:"pbx-ml-3"},Tw={__name:"Borders",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.ref(null),s=i.ref(null),l=i.computed(()=>o.getBorderStyle),p=i.computed(()=>o.getBorderWidth),d=i.computed(()=>o.getBorderColor);return i.watch(l,async c=>{n.value=c,await t.initializeElementStyles()},{immediate:!0}),i.watch(p,async c=>{a.value=c,await t.initializeElementStyles()},{immediate:!0}),i.watch(d,async c=>{s.value=c,await t.initializeElementStyles()},{immediate:!0}),(c,m)=>(i.openBlock(),i.createBlock(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Border Style, Width & Color")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",UM,i.toDisplayString(i.unref(e)("Border")),1),i.createElementVNode("div",GM,[i.createElementVNode("label",KM,i.toDisplayString(i.unref(e)("Border Style")),1),i.withDirectives(i.createElementVNode("select",{id:"border-style","onUpdate:modelValue":m[0]||(m[0]=b=>n.value=b),class:"pbx-myPrimarySelect",onChange:m[1]||(m[1]=b=>i.unref(t).handleBorderStyle(n.value))},[i.createElementVNode("option",JM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderStyle,b=>(i.openBlock(),i.createElementBlock("option",{key:b},i.toDisplayString(b),1))),128))],544),[[i.vModelSelect,n.value]])]),m[8]||(m[8]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",YM,[i.createElementVNode("label",XM,i.toDisplayString(i.unref(e)("Border Width")),1),i.withDirectives(i.createElementVNode("select",{id:"border-width","onUpdate:modelValue":m[2]||(m[2]=b=>a.value=b),class:"pbx-myPrimarySelect",onChange:m[3]||(m[3]=b=>i.unref(t).handleBorderWidth(a.value))},[i.createElementVNode("option",QM,i.toDisplayString(i.unref(e)("Select")),1),(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderWidth,b=>(i.openBlock(),i.createElementBlock("option",{key:b},i.toDisplayString(b),1))),128))],544),[[i.vModelSelect,a.value]])]),m[9]||(m[9]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",ZM,[i.createElementVNode("label",$M,i.toDisplayString(i.unref(e)("Border Color")),1),i.createVNode(i.unref(Nn),{as:"div",modelValue:s.value,"onUpdate:modelValue":m[5]||(m[5]=b=>s.value=b)},{default:i.withCtx(()=>[i.createElementVNode("div",eB,[i.createVNode(i.unref(Xr),{class:"pbx-myPrimarySelect",id:"border-color"},{default:i.withCtx(()=>{var b;return[i.createElementVNode("span",tB,[d.value==="none"?(i.openBlock(),i.createElementBlock("div",rB,m[6]||(m[6]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),s.value!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm",`pbx-bg-${(b=s.value)==null?void 0:b.replace("pbx-border-","")}`])},null,2)):i.createCommentVNode("",!0),i.createElementVNode("span",oB,i.toDisplayString(s.value),1)])]}),_:1}),i.createVNode(i.Transition,{"leave-active-class":"pbx-transition pbx-ease-in pbx-duration-100","leave-from-class":"pbx-opacity-100","leave-to-class":"pbx-opacity-0"},{default:i.withCtx(()=>[i.createVNode(i.unref(Pn),{class:"pbx-absolute pbx-z-10 pbx-mt-1 pbx-max-h-56 pbx-w-full pbx-overflow-auto pbx-rounded-md pbx-bg-white pbx-text-base pbx-shadow-lg pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 focus:pbx-outline-none sm:pbx-text-sm pbx-list-none pbx-p-0 pbx-m-0"},{default:i.withCtx(()=>[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(i.unref(io).borderColor,b=>(i.openBlock(),i.createBlock(i.unref(Dn),{as:"template",onClick:m[4]||(m[4]=u=>i.unref(t).handleBorderColor(s.value)),key:b,value:b},{default:i.withCtx(({active:u,borderColor:g})=>[i.createElementVNode("li",{class:i.normalizeClass([u?"pbx-bg-myPrimaryLinkColor pbx-text-white":"pbx-text-myPrimaryDarkGrayColor","pbx-relative pbx-cursor-default pbx-select-none pbx-py-2 pbx-pl-3 pbx-pr-9"])},[i.createElementVNode("div",nB,[b==="none"?(i.openBlock(),i.createElementBlock("div",iB,m[7]||(m[7]=[i.createElementVNode("div",{class:"pbx-myPrimaryColorPreview pbx-border-none"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," ev_shadow ")],-1)]))):i.createCommentVNode("",!0),b!=="none"?(i.openBlock(),i.createElementBlock("div",{key:1,class:i.normalizeClass(["pbx-aspect-square pbx-w-6 pbx-h-6 pbx-bg-gray-950",`pbx-bg-${b.replace("pbx-border-","")}`])},null,2)):i.createCommentVNode("",!0),b==="none"?(i.openBlock(),i.createElementBlock("span",aB,i.toDisplayString(i.unref(e)("Transparent")),1)):i.createCommentVNode("",!0),b!=="none"?(i.openBlock(),i.createElementBlock("span",sB,i.toDisplayString(b),1)):i.createCommentVNode("",!0)])],2)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})])]),_:1},8,["modelValue"])])]),_:1}))}},lB={key:0,class:"pbx-flex pbx-flex-col pbx-border-solid pbx-border pbx-border-gray-400"},pB={class:"pbx-myPrimaryParagraph pbx-font-medium pbx-my-0 pbx-py-0"},dB=i.defineComponent({__name:"TipTap",setup(r){const{translate:e}=pe(),t=ie();return(o,n)=>(i.openBlock(),i.createElementBlock("div",null,[i.unref(t).isSelectedElementValidText()?(i.openBlock(),i.createElementBlock("div",lB,[i.createElementVNode("div",{onClick:n[0]||(n[0]=a=>i.unref(t).toggleTipTapModal(!0)),class:"pbx-flex pbx-flex-row pbx-justify-between pbx-items-center pbx-pl-3 pbx-pr-3 pbx-py-5 pbx-cursor-pointer pbx-duration-200 hover:pbx-bg-myPrimaryLightGrayColor pbx-bg-white"},[i.createElementVNode("p",pB,i.toDisplayString(i.unref(e)("Text")),1),n[1]||(n[1]=i.createElementVNode("span",{class:"material-symbols-outlined"}," chevron_right ",-1))])])):i.createCommentVNode("",!0)]))}}),cB={class:"pbx-my-2 pbx-py-2"},mB={for:"vertical-margin",class:"pbx-myPrimaryInputLabel"},bB={class:"pbx-flex pbx-justify-end pbx-min-h-6"},uB={key:0,class:"pbx-myPrimaryParagraphError"},gB={class:"pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"},xB={class:"pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center"},fB={class:"sm:pbx-grid-cols-2 sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"},hB={key:1,class:"pbx-flex pbx-items-center pbx-my-2 pbx-justify-end"},yB={class:"pbx-flex pbx-justify-end pbx-min-h-6"},wB={key:0,class:"pbx-myPrimaryParagraphError"},vB={class:"pbx-border-0 pbx-border-solid pbx-border-t pbx-border-gray-200 pbx-flex pbx-items-center pbx-justify-end"},kB={class:"pbx-py-4 pbx-flex sm:pbx-justify-end pbx-justify-center"},SB={class:"sm:pbx-grid-cols-2 sm:pbx-items-end sm:pbx-justify-end pbx-flex sm:pbx-flex-row pbx-flex-col pbx-myPrimaryGap sm:pbx-w-5/6 pbx-w-full"},CB={key:1,class:"pbx-flex pbx-items-center pbx-my-2 pbx-justify-end"},Mw={__name:"HTMLEditor",props:{globalPage:{type:Boolean}},setup(r){const e=ie(),t=ne,{translate:o}=pe(),n=r,a=i.computed(()=>t.getElement),s=i.computed(()=>t.getShowModalHTMLEditor),l=i.computed(()=>!a.value||!(a.value instanceof HTMLElement)?"":a.value.outerHTML),p=i.ref(""),d=i.ref("");i.watch(s,async x=>{if(x){if(!n.globalPage){p.value=l.value;return}d.value=await e.generateHtmlFromComponents()}});const c=async()=>{t.setShowModalHTMLEditor(!0)},m=()=>{t.setShowModalHTMLEditor(!1)},b=i.ref(!1),u=i.ref(null),g=async()=>{u.value=null,b.value=!0,await ge(300);const x=await e.applyModifiedHTML(p.value);if(x){u.value=x,b.value=!1;return}t.setShowModalHTMLEditor(!1),b.value=!1},f=async()=>{u.value=null,b.value=!0,u.value=null,await ge(300);const x=await e.applyModifiedComponents(d.value);if(x){u.value=x,b.value=!1;return}t.setShowModalHTMLEditor(!1),b.value=!1};return(x,y)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(o)("HTML Editor")),1)]),content:i.withCtx(()=>[i.createElementVNode("div",cB,[i.createElementVNode("label",mB,i.toDisplayString(i.unref(o)("Gain full control over components by editing the raw HTML.")),1),y[2]||(y[2]=i.createElementVNode("hr",null,null,-1))]),i.createElementVNode("button",{onClick:c,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("HTML Editor")),1)]),_:1}),i.createVNode(St,{maxWidth:"7xl",showModalBuilder:s.value,title:i.unref(o)("HTML Editor"),onCloseMainModalBuilder:m},{default:i.withCtx(()=>[r.globalPage?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.withDirectives(i.createElementVNode("textarea",{id:"html-editor","onUpdate:modelValue":y[0]||(y[0]=w=>p.value=w),class:"pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full",style:{overflow:"auto","min-height":"400px"}},null,512),[[i.vModelText,p.value]]),i.createElementVNode("div",bB,[u.value?(i.openBlock(),i.createElementBlock("p",uB," Error: "+i.toDisplayString(u.value),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",gB,[i.createElementVNode("div",xB,[i.createElementVNode("div",fB,[b.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-mySecondaryButton"},i.toDisplayString(i.unref(o)("Close")),1),i.createElementVNode("button",{onClick:g,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("Save")),1)],64)),b.value?(i.openBlock(),i.createElementBlock("div",hB,y[3]||(y[3]=[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")],-1)]))):i.createCommentVNode("",!0)])])])],64)),r.globalPage?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[i.withDirectives(i.createElementVNode("textarea",{id:"html-editor","onUpdate:modelValue":y[1]||(y[1]=w=>d.value=w),class:"pbx-h-full pbx-font-sans pbx-bg-gray-900 pbx-text-white pbx-w-full",style:{overflow:"auto","min-height":"400px"}},null,512),[[i.vModelText,d.value]]),i.createElementVNode("div",yB,[u.value?(i.openBlock(),i.createElementBlock("p",wB," Error: "+i.toDisplayString(u.value),1)):i.createCommentVNode("",!0)]),i.createElementVNode("div",vB,[i.createElementVNode("div",kB,[i.createElementVNode("div",SB,[b.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock(i.Fragment,{key:0},[i.createElementVNode("button",{onClick:m,type:"button",class:"pbx-mySecondaryButton"},i.toDisplayString(i.unref(o)("Close")),1),i.createElementVNode("button",{onClick:f,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(o)("Save")),1)],64)),b.value?(i.openBlock(),i.createElementBlock("div",CB,y[4]||(y[4]=[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")],-1)]))):i.createCommentVNode("",!0)])])])],64)):i.createCommentVNode("",!0)]),_:1},8,["showModalBuilder","title"])],64))}},EB={class:"pbx-flex pbx-h-full pbx-flex-col"},TB={class:"pbx-flex pbx-flex-row pbx-justify-between pbx-pt-7 pbx-pr-4 pbx-pl-4 pbx-items-center pbx-mb-3"},MB={class:"pbx-font-medium pbx-text-sm"},BB={class:"pbx-lowercase"},NB={class:"pbx-mb-1"},PB={class:"pbx-mb-1"},DB={class:"pbx-my-1"},LB={class:"pbx-my-1"},AB={class:"pbx-my-1"},OB={class:"pbx-my-1"},VB={class:"pbx-my-1"},IB={class:"pbx-my-1"},_B={class:"pbx-my-1"},RB={class:"pbx-my-1"},HB={class:"pbx-my-1"},zB={class:"pbx-my-1"},FB={class:"pbx-myPrimaryInputLabel pbx-my-4"},jB={class:"pbx-my-2 pbx-py-2"},qB={key:0,class:"pbx-my-1"},WB={class:"pbx-myPrimaryInputLabel pbx-my-4"},UB={class:"pbx-my-2 pbx-py-2"},GB={id:"pagebuilder-right-menu",class:"pbx-flex pbx-flex-col pbx-gap-2 pbx-pt-4 pbx-pb-2"},KB={key:0},JB={class:"pbx-flex pbx-items-center pbx-my-2 pbx-py-4 pbx-px-2 pbx-justify-center"},YB={class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},XB={class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},QB={key:1,class:"pbx-pb-12"},ZB={class:"pbx-myPrimaryParagraph"},$B={class:"pbx-my-1"},eN={class:"pbx-my-1"},tN={class:"pbx-my-1"},rN={class:"pbx-my-1"},oN={class:"pbx-my-1"},nN={class:"pbx-my-1"},iN={class:"pbx-my-1"},aN={class:"pbx-my-1"},sN={class:"pbx-my-1"},lN={class:"pbx-my-1"},pN={__name:"RightSidebarEditor",emits:["closeEditor"],setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.ref(null),a=i.computed(()=>o.getComponents),s=i.computed(()=>o.getElement),l=i.computed(()=>{var x;return(x=s.value)==null?void 0:x.tagName});i.computed(()=>s.value instanceof HTMLElement&&s.value.innerText.trim()!==" "||s.value instanceof HTMLImageElement);const p=i.ref(null);let d=0;i.watch(()=>o.getElement,()=>{i.nextTick(()=>{p.value&&(p.value.scrollTop=d)})});function c(){p.value&&(d=p.value.scrollTop)}const m=function(x,y){const S=`
647
647
  <!DOCTYPE html>
648
648
  <html lang="en">
649
649
  <head>
@@ -682,7 +682,7 @@ class="flex items-centre justify-start font-medium text-black bg-gray-200">
682
682
  </div>
683
683
  </body>
684
684
  </html>
685
- `,k=document.createElement("a");k.setAttribute("href","data:text/html;charset=utf-8,"+encodeURIComponent(S)),k.setAttribute("download",x),k.style.display="none",document.body.appendChild(k),k.click(),document.body.removeChild(k)},b=function(){const x=document.getElementById("pagebuilder");if(!x)return;let y=Ul(x);const w=document.createElement("div");w.innerHTML=y,w.querySelectorAll("[hovered], [selected]").forEach(v=>{v.removeAttribute("hovered"),v.removeAttribute("selected")}),y=w.innerHTML,m("downloaded_html.html",y)},u=i.ref(null),g=async function(){u.value=!0,await t.globalPageStyles()},f=async function(){n.value=!0,await t.handleManualSave();const x=document.querySelector("#pagebuilder");x&&x.removeAttribute("data-global-selected"),u.value=!1,n.value=!1};return(x,y)=>(i.openBlock(),i.createElementBlock("div",gB,[i.createElementVNode("div",xB,[i.createElementVNode("button",{type:"button",onClick:y[0]||(y[0]=w=>x.$emit("closeEditor")),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},y[1]||(y[1]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ",-1)])),i.createElementVNode("p",fB,[i.createTextVNode(i.toDisplayString(i.unref(e)("Editing"))+" ",1),i.createElementVNode("span",hB,"<"+i.toDisplayString(l.value)+">",1)])]),u.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"scrollContainer",ref:p,onScroll:c,class:"pbx-pl-3 pbx-pr-3 pbx-mb-4 pbx-overflow-y-scroll"},[i.withDirectives(i.createElementVNode("div",null,[i.createElementVNode("article",yB,[i.createVNode(S6)]),i.createElementVNode("article",wB,[i.createVNode(eB)]),i.createElementVNode("article",vB,[i.createVNode(jb)]),i.createElementVNode("article",kB,[i.createVNode(j6)]),i.createElementVNode("article",SB,[i.createVNode(qb)]),i.createElementVNode("article",CB,[i.createVNode(Wb)]),i.createElementVNode("article",EB,[i.createVNode(Ub)]),i.createElementVNode("article",TB,[i.createVNode(Gb)]),i.createElementVNode("article",MB,[i.createVNode(zb)]),i.createElementVNode("article",BB,[i.createVNode(Fb)]),i.createElementVNode("article",NB,[i.createVNode(Kb)])],512),[[i.vShow,s.value&&i.unref(t).isEditableElement(s.value)]]),i.createElementVNode("article",PB,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Global Page Styles")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",DB,i.toDisplayString(i.unref(e)("Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.")),1),y[2]||(y[2]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",LB,[i.createElementVNode("button",{onClick:g,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Update Page Styles")),1)])]),_:1})]),Array.isArray(a.value)&&a.value.length>=1?(i.openBlock(),i.createElementBlock("article",AB,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Download HTML")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",OB,i.toDisplayString(i.unref(e)("Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.")),1),y[3]||(y[3]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",VB,[i.createElementVNode("button",{onClick:b,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Download HTML file")),1)])]),_:1})])):i.createCommentVNode("",!0)],544)),i.createVNode(St,{maxWidth:"md",minHeight:"pbx-min-h-[65vh] pbx-max-h-[65vh]",showModalBuilder:u.value,title:i.unref(e)("Global Page Styles"),onCloseMainModalBuilder:f},{default:i.withCtx(()=>[i.createElementVNode("div",IB,[n.value?(i.openBlock(),i.createElementBlock("div",_B,[i.createElementVNode("div",RB,[i.createElementVNode("div",HB,[i.createElementVNode("span",zB,i.toDisplayString(i.unref(e)("Loading...")),1)])])])):i.createCommentVNode("",!0),!n.value&&u.value?(i.openBlock(),i.createElementBlock("div",FB,[i.createElementVNode("div",null,[i.createElementVNode("p",jB,i.toDisplayString(i.unref(e)("Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.")),1),i.createElementVNode("article",qB,[i.createVNode(jb)]),i.createElementVNode("article",WB,[i.createVNode(_b,{globalPageLayout:!0})]),i.createElementVNode("article",UB,[i.createVNode(Rb,{globalPageLayout:!0})]),i.createElementVNode("article",GB,[i.createVNode(qb)]),i.createElementVNode("article",KB,[i.createVNode(Wb)]),i.createElementVNode("article",JB,[i.createVNode(Ub)]),i.createElementVNode("article",YB,[i.createVNode(Gb)]),i.createElementVNode("article",XB,[i.createVNode(zb)]),i.createElementVNode("article",QB,[i.createVNode(Fb)]),i.createElementVNode("article",ZB,[i.createVNode(Kb,{globalPage:!0})])])])):i.createCommentVNode("",!0)])]),_:1},8,["showModalBuilder","title"])]))}},eN={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},tN={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},rN={class:"pbx-px-2"},oN={class:"pbx-mt-8"},nN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},iN={class:"pbx-overflow-x-auto"},aN={class:"pbx-min-w-full"},sN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},lN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},pN={class:"pbx-min-w-[30rem] pbx-w-max"},dN={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium pbx-bg-blue-100 pbx-text-blue-800"},cN={key:0,class:"pbx-mt-4"},mN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},bN={class:"pbx-overflow-x-auto"},uN={class:"pbx-min-w-full"},gN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},xN={key:0},fN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},hN={class:"pbx-min-w-[30rem] pbx-w-max"},yN={key:1},wN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},vN={class:"pbx-min-w-[30rem] pbx-w-max"},kN={key:1,class:"pbx-mt-8"},SN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},CN={class:"pbx-overflow-x-auto"},EN={class:"pbx-min-w-full"},TN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},MN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},BN={class:"pbx-min-w-[30rem] pbx-w-max"},NN={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},PN={class:"pbx-min-w-[30rem] pbx-w-max"},DN={class:"pbx-flex pbx-items-center pbx-space-x-3"},LN=["src"],AN={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},ON={class:"pbx-min-w-[30rem] pbx-w-max"},VN={key:2,class:"pbx-mt-8"},IN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},_N={class:"pbx-overflow-x-auto"},RN={class:"pbx-min-w-full"},HN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},zN={key:0},FN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},jN={class:"pbx-min-w-[30rem] pbx-w-max"},qN={key:1},WN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},UN={class:"pbx-min-w-[30rem] pbx-w-max"},GN={key:2},KN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},JN={class:"pbx-min-w-[30rem] pbx-w-max"},YN={key:3},XN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},QN={class:"pbx-min-w-[30rem] pbx-w-max"},ZN={key:3,class:"pbx-mt-8"},$N={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},e8={class:"pbx-overflow-x-auto"},t8={class:"pbx-min-w-full"},r8={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},o8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},n8={class:"pbx-min-w-[30rem] pbx-w-max"},i8={class:"pbx-flex pbx-items-center pbx-space-x-3"},a8=["src"],s8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},l8={class:"pbx-min-w-[30rem] pbx-w-max"},p8={class:"pbx-flex pbx-items-center pbx-space-x-3"},d8={class:"pbx-pr-6"},c8={class:"pbx-flex pbx-items-center pbx-space-x-3"},m8={class:"pbx-whitespace-nowrap"},b8={key:4,class:"pbx-mt-8"},u8={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},g8={class:"pbx-overflow-x-auto"},x8={class:"pbx-w-max"},f8={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},h8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},y8={class:"pbx-min-w-[30rem] pbx-w-max"},w8={key:0},v8={key:1},k8={key:0},S8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},C8={class:"pbx-min-w-[30rem] pbx-w-max"},E8={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium"},T8={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},M8={class:"pbx-mt-4 pbx-whitespace-pre-wrap pbx-text-white pbx-overflow-hidden pbx-bg-gray-900"},B8={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-white pbx-text-xs pbx-break-all"},N8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-text-white"},P8={__name:"PageBuilderSettings",setup(r){const e="3.4.27",t=ne,o=i.computed(()=>t.getPageBuilderConfig);return(n,a)=>{var s,l,p,d,c,m,b,u,g,f,x,y,w,v,h,S;return i.openBlock(),i.createElementBlock("div",eN,[i.createElementVNode("div",tN,[i.createElementVNode("div",null,[a[26]||(a[26]=i.createElementVNode("div",{class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},[i.createElementVNode("h3",{class:"pbx-myQuaternaryHeader"},"Configuration Overview"),i.createElementVNode("p",{class:"pbx-myPrimaryParagraph pbx-text-xs"}," A summary of current user preferences, application settings, and system metadata including UI theme, language, saved components, and logo configuration. ")],-1)),i.createElementVNode("div",rN,[i.createElementVNode("div",oN,[a[2]||(a[2]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Version Information",-1)),i.createElementVNode("div",nN,[i.createElementVNode("div",iN,[i.createElementVNode("table",aN,[a[1]||(a[1]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," App "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Version ")])],-1)),i.createElementVNode("tbody",sN,[i.createElementVNode("tr",null,[a[0]||(a[0]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Page Builder")],-1)),i.createElementVNode("td",lN,[i.createElementVNode("div",pN,[i.createElementVNode("span",dN,i.toDisplayString(i.unref(e)),1)])])])])])])])]),(s=o.value)!=null&&s.resourceData&&!i.unref(er)(o.value.resourceData)?(i.openBlock(),i.createElementBlock("div",cN,[a[6]||(a[6]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Resource Data",-1)),i.createElementVNode("div",mN,[i.createElementVNode("div",bN,[i.createElementVNode("table",uN,[a[5]||(a[5]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",gN,[(p=(l=o.value)==null?void 0:l.resourceData)!=null&&p.title?(i.openBlock(),i.createElementBlock("tr",xN,[a[3]||(a[3]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Title")],-1)),i.createElementVNode("td",fN,[i.createElementVNode("div",hN,i.toDisplayString(o.value.resourceData.title),1)])])):i.createCommentVNode("",!0),(c=(d=o.value)==null?void 0:d.resourceData)!=null&&c.id?(i.openBlock(),i.createElementBlock("tr",yN,[a[4]||(a[4]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"ID")],-1)),i.createElementVNode("td",wN,[i.createElementVNode("div",vN,i.toDisplayString(o.value.resourceData.id),1)])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),(m=o.value)!=null&&m.userForPageBuilder&&!i.unref(er)(o.value.userForPageBuilder)?(i.openBlock(),i.createElementBlock("div",kN,[a[11]||(a[11]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"User Information",-1)),i.createElementVNode("div",SN,[i.createElementVNode("div",CN,[i.createElementVNode("table",EN,[a[10]||(a[10]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",TN,[i.createElementVNode("tr",null,[a[7]||(a[7]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"User Name")],-1)),i.createElementVNode("td",MN,[i.createElementVNode("div",BN,i.toDisplayString(o.value.userForPageBuilder.name),1)])]),i.createElementVNode("tr",null,[a[8]||(a[8]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Image")],-1)),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",NN,[i.createElementVNode("div",PN,[i.createElementVNode("div",DN,[i.createElementVNode("img",{class:"pbx-block pbx-inset-0 pbx-object-top pbx-h-10 pbx-min-h-10 pbx-max-h-10 pbx-w-10 pbx-min-w-10 pbx-max-w-10 pbx-object-cover pbx-rounded-full",src:o.value.userForPageBuilder.image,alt:"image"},null,8,LN)])])])):i.createCommentVNode("",!0)]),i.createElementVNode("tr",null,[a[9]||(a[9]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Image URL")],-1)),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",AN,[i.createElementVNode("div",ON,i.toDisplayString(o.value.userForPageBuilder.image),1)])):i.createCommentVNode("",!0)])])])])])])):i.createCommentVNode("",!0),(b=o.value)!=null&&b.userSettings&&!i.unref(er)(o.value.userSettings)?(i.openBlock(),i.createElementBlock("div",VN,[a[17]||(a[17]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"User Settings",-1)),i.createElementVNode("div",IN,[i.createElementVNode("div",_N,[i.createElementVNode("table",RN,[a[16]||(a[16]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Setting "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",HN,[(g=(u=o.value)==null?void 0:u.userSettings)!=null&&g.theme?(i.openBlock(),i.createElementBlock("tr",zN,[a[12]||(a[12]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Theme")],-1)),i.createElementVNode("td",FN,[i.createElementVNode("div",jN,i.toDisplayString(o.value.userSettings.theme),1)])])):i.createCommentVNode("",!0),(x=(f=o.value)==null?void 0:f.userSettings)!=null&&x.language?(i.openBlock(),i.createElementBlock("tr",qN,[a[13]||(a[13]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Language")],-1)),i.createElementVNode("td",WN,[i.createElementVNode("div",UN,i.toDisplayString(o.value.userSettings.language),1)])])):i.createCommentVNode("",!0),((w=(y=o.value)==null?void 0:y.userSettings)==null?void 0:w.autoSave)!==void 0?(i.openBlock(),i.createElementBlock("tr",GN,[a[14]||(a[14]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Auto Save")],-1)),i.createElementVNode("td",KN,[i.createElementVNode("div",JN,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.autoSave?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.autoSave?"Enabled":"Disabled"),3)])])])):i.createCommentVNode("",!0),((h=(v=o.value)==null?void 0:v.userSettings)==null?void 0:h.notifications)!==void 0?(i.openBlock(),i.createElementBlock("tr",YN,[a[15]||(a[15]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Notifications")],-1)),i.createElementVNode("td",XN,[i.createElementVNode("div",QN,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.notifications?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.notifications?"Enabled":"Disabled"),3)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),o.value&&o.value.pageBuilderLogo&&!i.unref(er)(o.value.pageBuilderLogo)?(i.openBlock(),i.createElementBlock("div",ZN,[a[21]||(a[21]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Logo Configuration",-1)),i.createElementVNode("div",$N,[i.createElementVNode("div",e8,[i.createElementVNode("table",t8,[a[20]||(a[20]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",r8,[i.createElementVNode("tr",null,[a[18]||(a[18]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Logo")],-1)),i.createElementVNode("td",o8,[i.createElementVNode("div",n8,[i.createElementVNode("div",i8,[i.createElementVNode("img",{class:"pbx-h-4",src:o.value.pageBuilderLogo.src,alt:"Logo"},null,8,a8)])])])]),i.createElementVNode("tr",null,[a[19]||(a[19]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Logo URL")],-1)),i.createElementVNode("td",s8,[i.createElementVNode("div",l8,[i.createElementVNode("div",p8,[i.createElementVNode("div",d8,[i.createElementVNode("div",c8,[i.createElementVNode("span",m8,i.toDisplayString(o.value.pageBuilderLogo.src),1)])])])])])])])])])])])):i.createCommentVNode("",!0),(S=o.value)!=null&&S.updateOrCreate&&!i.unref(er)(o.value.updateOrCreate)?(i.openBlock(),i.createElementBlock("div",b8,[a[25]||(a[25]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Form Type",-1)),i.createElementVNode("div",u8,[i.createElementVNode("div",g8,[i.createElementVNode("table",x8,[a[24]||(a[24]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Mode "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Description ")])],-1)),i.createElementVNode("tbody",f8,[i.createElementVNode("tr",null,[a[22]||(a[22]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Form Type")],-1)),i.createElementVNode("td",h8,[i.createElementVNode("div",y8,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.updateOrCreate==="create"?"bg-green-100 text-green-800":"bg-blue-100 text-blue-800"])},[o.value&&o.value.updateOrCreate.formType==="create"?(i.openBlock(),i.createElementBlock("span",w8,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0),o.value&&o.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("span",v8,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0)],2)])])]),o.value.updateOrCreate.formName&&o.value.updateOrCreate.formName.length>0?(i.openBlock(),i.createElementBlock("tr",k8,[a[23]||(a[23]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Form Name")],-1)),i.createElementVNode("td",S8,[i.createElementVNode("div",C8,[i.createElementVNode("span",E8,i.toDisplayString(o.value.updateOrCreate.formName),1)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0)])])]),i.createElementVNode("div",T8,[a[28]||(a[28]=i.createElementVNode("div",{class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},[i.createElementVNode("h3",{class:"pbx-myQuaternaryHeader"},"Complete Configuration Overview"),i.createElementVNode("p",{class:"pbx-myPrimaryParagraph pbx-text-xs"}," Complete configuration object currently used by the Page Builder. Includes user information, branding settings, and other context-specific data needed for rendering and managing the builder environment. ")],-1)),i.createElementVNode("div",M8,[a[27]||(a[27]=i.createElementVNode("div",{class:"pbx-flex bg-gray-800/40 pbx-ring-1 ring-white/5"},[i.createElementVNode("div",{class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},[i.createElementVNode("div",{class:"pbx-px-4 pbx-py-4 pbx-text-white"},"Configuration")])],-1)),i.createElementVNode("div",B8,[i.createElementVNode("p",N8," config: "+i.toDisplayString(JSON.stringify(o.value,null,4)),1)])])])])}}},D8={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},L8={class:"pbx-flex pbx-items-left pbx-flex-col pbx-myPrimaryGap pbx-border-myPrimaryMediumGrayColor"},A8={class:"pbx-myPrimaryParagraph"},O8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-pb-2"},V8={class:"pbx-text-gray-100 pbx-overflow-hidden pbx-bg-gray-900"},I8={class:"pbx-flex pbx-bg-gray-900 pbx-ring-1 ring-white/5"},_8={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},R8={class:"pbx-px-4 pbx-py-4 pbx-text-gray-100"},H8={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-gray-100 pbx-text-xs"},z8={class:"pbx-text-xs pbx-pb-2"},F8={class:"pbx-text-xs pbx-pb-2"},j8={class:"pbx-text-xs pbx-pb-2"},q8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-pb-2"},W8={class:"pbx-overflow-hidden pbx-bg-gray-900"},U8={class:"pbx-flex pbx-bg-gray-900 pbx-ring-1 ring-white/5"},G8={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},K8={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-gray-100 pbx-text-xs pbx-break-all"},J8={key:0},Y8={key:0},X8={class:"pbx-pb-2 pbx-text-xs"},Q8={key:1,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},Z8={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},$8={class:"pbx-overflow-x-auto"},e7={class:"pbx-min-w-full"},t7={class:"pbx-bg-gray-900"},r7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},o7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},n7={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-b"},i7={class:"pbx-overflow-x-auto"},a7={class:"pbx-min-w-full"},s7={class:"pbx-bg-gray-900"},l7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},p7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},d7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},c7={class:"pbx-overflow-x-auto"},m7={class:"pbx-min-w-full"},b7={class:"pbx-bg-gray-900"},u7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},g7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},x7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},f7={key:1},h7={key:0},y7={class:"pbx-pb-2 pbx-text-xs"},w7={key:1,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},v7={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},k7={class:"pbx-overflow-x-auto"},S7={class:"pbx-min-w-full"},C7={class:"pbx-bg-gray-900"},E7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},T7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},M7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},B7={class:"pbx-overflow-x-auto"},N7={class:"pbx-min-w-full"},P7={class:"pbx-bg-gray-900"},D7={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-t pbx-border-gray-200"},L7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},A7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},O7={class:"pbx-overflow-x-auto"},V7={class:"pbx-min-w-full"},I7={class:"pbx-bg-gray-900"},_7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},R7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},H7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},z7={class:"pbx-text-xs pbx-text-gray-100 pbx-whitespace-pre-wrap pbx-font-sans pbx-flex pbx-items-start pbx-justify-left"},F7=["innerHTML"],j7={key:2},q7={key:0},W7={class:"pbx-pb-2 pbx-text-xs"},U7={key:1},G7={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},K7={class:"pbx-overflow-x-auto"},J7={class:"pbx-min-w-full"},Y7={class:"pbx-bg-gray-900"},X7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},Q7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},Z7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},$7={class:"pbx-overflow-x-auto"},eP={class:"pbx-min-w-full"},tP={class:"pbx-bg-gray-900"},rP={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-t pbx-border-gray-200"},oP={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},nP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},iP={class:"pbx-overflow-x-auto"},aP={class:"pbx-min-w-full"},sP={class:"pbx-bg-gray-900"},lP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},pP={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},dP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},cP={class:"pbx-text-xs pbx-text-gray-100 pbx-whitespace-pre-wrap pbx-font-sans pbx-flex pbx-items-start pbx-justify-left"},mP=["innerHTML"],bP={__name:"AdvancedPageBuilderSettings",setup(r){const{translate:e}=pe(),t=ne,o=i.computed(()=>t.getElement),n=i.computed(()=>t.getComponent),a=i.computed(()=>t.getComponents),s=i.ref("element"),l=function(d){s.value=d};function p(d){if(!d)return"";const c=" ";let m=0,b="";const g=d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").split(/(&lt;[^&gt;]+&gt;)/g),f=["&lt;area","&lt;base","&lt;br","&lt;col","&lt;embed","&lt;hr","&lt;img","&lt;input","&lt;link","&lt;meta","&lt;param","&lt;source","&lt;track","&lt;wbr"];return g.forEach(x=>{const y=x.trim();if(!y)return;const w=y.startsWith("&lt;")&&y.endsWith("&gt;"),v=w&&y.startsWith("&lt;/");v&&(m=Math.max(0,m-1));let h=c.repeat(m)+y;w&&(h=h.replace(/(&lt;\/?[[\w\s="/.':;#-\/\?]+&gt;)/g,S=>{var L;const k=(L=S.match(/&lt;\/?([\w-]+)/))==null?void 0:L[1];let C=S.replace(/(&lt;\/?[\w-]+)/g,`<span class="html-tag-symbol">&lt;</span><span class="html-tag-name">${k}</span>`);return C=C.replace(/([\w-]+)=(&quot;[^&quot;]*&quot;)/g,'<span class="html-attribute-name">$1</span><span class="html-operator">=</span><span class="html-attribute-value">$2</span>'),C+'<span class="html-tag-symbol">&gt;</span>'})),b+=h+`
686
- `,w&&!v&&(y.endsWith("/&gt;")||f.some(k=>y.startsWith(k))||m++)}),b}return(d,c)=>{var m,b,u,g,f,x,y,w,v,h;return i.openBlock(),i.createElementBlock("div",D8,[i.createElementVNode("div",L8,[i.createElementVNode("p",A8,i.toDisplayString(i.unref(e)("Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.")),1),i.createElementVNode("div",null,[i.createElementVNode("h4",O8,i.toDisplayString(i.unref(e)("Types")),1),i.createElementVNode("div",V8,[i.createElementVNode("div",I8,[i.createElementVNode("div",_8,[i.createElementVNode("div",R8,i.toDisplayString(i.unref(e)("Types")),1)])]),i.createElementVNode("div",H8,[i.createElementVNode("p",z8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Element type:")),1),i.createElementVNode("span",null,i.toDisplayString(typeof o.value),1)]),i.createElementVNode("p",F8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Component type:")),1),i.createTextVNode(" "+i.toDisplayString(typeof n.value),1)]),i.createElementVNode("p",j8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Components:")),1),i.createElementVNode("span",null,i.toDisplayString(Array.isArray(a.value)===!0?i.unref(e)("array"):typeof a.value),1)])])])]),i.createElementVNode("div",null,[i.createElementVNode("h4",q8,i.toDisplayString(i.unref(e)("Content")),1),i.createElementVNode("div",W8,[i.createElementVNode("div",U8,[i.createElementVNode("div",G8,[i.createElementVNode("div",{onClick:c[0]||(c[0]=S=>l("element")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="element"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Element")),3),i.createElementVNode("div",{onClick:c[1]||(c[1]=S=>l("component")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="component"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Component")),3),i.createElementVNode("div",{onClick:c[2]||(c[2]=S=>l("components")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="components"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Components added"))+" "+i.toDisplayString(Array.isArray(a.value)&&a.value.length),3)])]),i.createElementVNode("div",K8,[s.value==="element"?(i.openBlock(),i.createElementBlock("div",J8,[n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",Y8,[i.createElementVNode("p",X8,i.toDisplayString(n.value===null?i.unref(e)("No Element selected"):typeof n.value),1)])),o.value?(i.openBlock(),i.createElementBlock("div",Q8,[i.createElementVNode("div",Z8,[i.createElementVNode("div",$8,[i.createElementVNode("table",e7,[i.createElementVNode("thead",t7,[i.createElementVNode("tr",null,[i.createElementVNode("th",r7,i.toDisplayString(i.unref(e)("Selected HTML:")),1)])]),i.createElementVNode("tbody",o7,[i.createElementVNode("tr",null,[i.createElementVNode("td",n7,i.toDisplayString((m=o.value)==null?void 0:m.outerHTML),1)])])])]),i.createElementVNode("div",i7,[i.createElementVNode("table",a7,[i.createElementVNode("thead",s7,[i.createElementVNode("tr",null,[i.createElementVNode("th",l7,i.toDisplayString(i.unref(e)("Element src:")),1)])]),i.createElementVNode("tbody",p7,[i.createElementVNode("tr",null,[i.createElementVNode("td",d7,i.toDisplayString((b=o.value)!=null&&b.src?(u=o.value)==null?void 0:u.src:typeof((g=o.value)==null?void 0:g.src)),1)])])])])]),i.createElementVNode("div",c7,[i.createElementVNode("table",m7,[i.createElementVNode("thead",b7,[i.createElementVNode("tr",null,[i.createElementVNode("th",u7,i.toDisplayString(i.unref(e)("Element classes:")),1)])]),i.createElementVNode("tbody",g7,[i.createElementVNode("tr",null,[i.createElementVNode("td",x7,i.toDisplayString((f=o.value)!=null&&f.classList?(x=o.value)==null?void 0:x.classList:typeof((y=o.value)==null?void 0:y.classList)),1)])])])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),s.value==="component"?(i.openBlock(),i.createElementBlock("div",f7,[n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",h7,[i.createElementVNode("p",y7,i.toDisplayString(n.value===null?i.unref(e)("No Component selected"):typeof n.value),1)])),n.value?(i.openBlock(),i.createElementBlock("div",w7,[i.createElementVNode("div",v7,[i.createElementVNode("div",k7,[i.createElementVNode("table",S7,[i.createElementVNode("thead",C7,[i.createElementVNode("tr",null,[i.createElementVNode("th",E7,i.toDisplayString(i.unref(e)("ID:")),1)])]),i.createElementVNode("tbody",T7,[i.createElementVNode("tr",null,[i.createElementVNode("td",M7,i.toDisplayString((w=n.value)==null?void 0:w.id),1)])])])]),i.createElementVNode("div",B7,[i.createElementVNode("table",N7,[i.createElementVNode("thead",P7,[i.createElementVNode("tr",null,[i.createElementVNode("th",D7,i.toDisplayString(i.unref(e)("Title:")),1)])]),i.createElementVNode("tbody",L7,[i.createElementVNode("tr",null,[i.createElementVNode("td",A7,i.toDisplayString((v=n.value)==null?void 0:v.title),1)])])])])]),i.createElementVNode("div",O7,[i.createElementVNode("table",V7,[i.createElementVNode("thead",I7,[i.createElementVNode("tr",null,[i.createElementVNode("th",_7,i.toDisplayString(i.unref(e)("HTML Code:")),1)])]),i.createElementVNode("tbody",R7,[i.createElementVNode("tr",null,[i.createElementVNode("td",H7,[i.createElementVNode("pre",z7,[c[3]||(c[3]=i.createTextVNode(" ")),i.createElementVNode("code",{class:"pbx-font-sans pbx-bg-gray-800 pbx-p-4 pbx-rounded-md pbx-block pbx-w-full",innerHTML:p((h=n.value)==null?void 0:h.html_code)},null,8,F7),c[4]||(c[4]=i.createTextVNode(`
687
- `))])])])])])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),s.value==="components"?(i.openBlock(),i.createElementBlock("div",j7,[Array.isArray(a.value)&&a.value.length===0?(i.openBlock(),i.createElementBlock("div",q7,[i.createElementVNode("p",W7,i.toDisplayString(i.unref(e)("No Components added yet")),1)])):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("div",U7,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,S=>(i.openBlock(),i.createElementBlock("div",{key:S.id,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},[i.createElementVNode("div",G7,[i.createElementVNode("div",K7,[i.createElementVNode("table",J7,[i.createElementVNode("thead",Y7,[i.createElementVNode("tr",null,[i.createElementVNode("th",X7,i.toDisplayString(i.unref(e)("ID:")),1)])]),i.createElementVNode("tbody",Q7,[i.createElementVNode("tr",null,[i.createElementVNode("td",Z7,i.toDisplayString(S.id),1)])])])]),i.createElementVNode("div",$7,[i.createElementVNode("table",eP,[i.createElementVNode("thead",tP,[i.createElementVNode("tr",null,[i.createElementVNode("th",rP,i.toDisplayString(i.unref(e)("Title:")),1)])]),i.createElementVNode("tbody",oP,[i.createElementVNode("tr",null,[i.createElementVNode("td",nP,i.toDisplayString(S.title),1)])])])])]),i.createElementVNode("div",iP,[i.createElementVNode("table",aP,[i.createElementVNode("thead",sP,[i.createElementVNode("tr",null,[i.createElementVNode("th",lP,i.toDisplayString(i.unref(e)("HTML Code:")),1)])]),i.createElementVNode("tbody",pP,[i.createElementVNode("tr",null,[i.createElementVNode("td",dP,[i.createElementVNode("pre",cP,[c[5]||(c[5]=i.createTextVNode(" ")),i.createElementVNode("code",{class:"pbx-font-sans pbx-w-full",innerHTML:p(S.html_code)},null,8,mP),c[6]||(c[6]=i.createTextVNode(`
688
- `))])])])])])])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])])])])])}}},uP={class:"pbx-flex pbx-items-center pbx-justify-center"},gP={class:"pbx-mr-2"},xP={key:0,class:"pbx-flex pbx-items-center pbx-myPrimaryTag pbx-whitespace-nowrap pbx-py-0 pbx-gap-2"},fP={class:"pbx-text-white pbx-rounded-full pbx-bg-myPrimaryBrandColor pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-d pbx-min-d pbx-max-d lg:pbx-w-8 lg:pbx-h-8 lg:pbx-min-w-8 lg:pbx-max-w-8 pbx-w-8 pbx-h-8 pbx-min-w-8 pbx-max-w-8 pbx-font-normal"},hP={class:"pbx-hidden pbx-text-xs pbx-d lg:pbx-flex pbx-items-center pbx-font-normal pbx-w-max pbx-break-keep"},yP={key:1,class:"pbx-flex pbx-items-center lg:pbx-myPrimaryTag pbx-whitespace-nowrap pbx-py-0 pbx-gap-4 pbx-w-max pbx-h-12 pbx-ml-2"},wP={class:"pbx-text-white pbx-flex-shrink-0 pbx-d pbx-w-10 pbx-h-10 pbx-rounded-full pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-rounded-l-full"},vP=["src"],kP={class:"pbx-hidden pbx-text-xs pbx-d lg:pbx-flex pbx-items-center pbx-font-normal pbx-w-max pbx-break-keep"},SP={class:"pbx-hidden lg:pbx-block"},CP={class:"pbx-relative pbx-group"},EP={type:"button",class:"pbx-mySecondaryButton pbx-font-normal pbx-text-xs"},TP={class:"pbx-absolute pbx-left-0 -pbx-ml-16 -pbx-mt-2 pbx-flex pbx-flex-col pbx-gap-3 pbx-shadow-lg pbx-bg-white pbx-w-max pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-2xl pbx-transition-all pbx-duration-200 pbx-ease-out pbx-pt-4 pbx-pr-4 pbx-pb-4 pbx-pl-2 pbx-z-30 pbx-opacity-0 pbx-pointer-events-none pbx-translate-y-2 group-hover:pbx-opacity-100 group-hover:pbx-pointer-events-auto group-hover:pbx-translate-y-0"},MP={__name:"ToolbarOption",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.computed(()=>o.getPageBuilderConfig),a=i.ref(!1),s=i.ref(!1),l=i.ref(""),p=i.ref(1),d=i.ref(""),c=i.ref(""),m=i.ref(""),b=i.ref(null),u=i.ref(null),g=i.ref(null),f=i.ref(null),x=i.ref(null),y=function(){s.value=!0,l.value="delete",p.value=2,d.value=e("Remove all Components"),c.value=e("Are you sure you want to remove all Components?"),m.value=e("Close"),b.value=null,u.value=e("Delete"),g.value=function(){s.value=!1},x.value=async function(){a.value=!0,await t.clearHtmlSelection(),await t.handleFormSubmission(),await ge(500),s.value=!1,a.value=!1}},w=i.ref(!1),v=function(){w.value=!1},h=function(){w.value=!0},S=i.ref(!1),k=function(){S.value=!1},C=async function(){await t.generateHtmlFromComponents(),S.value=!0};return(L,V)=>{var M;return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",uP,[i.createElementVNode("div",gP,[n.value&&n.value.userForPageBuilder&&n.value.userForPageBuilder.name&&(!n.value.userForPageBuilder.image||typeof n.value.userForPageBuilder.image=="string"&&((M=n.value.userForPageBuilder.image)==null?void 0:M.length)<2)?(i.openBlock(),i.createElementBlock("div",xP,[i.createElementVNode("div",fP,i.toDisplayString(typeof n.value.userForPageBuilder.name=="string"&&n.value.userForPageBuilder.name[0]),1),i.createElementVNode("div",hP,i.toDisplayString(n.value.userForPageBuilder.name),1)])):i.createCommentVNode("",!0),n.value&&n.value.userForPageBuilder&&n.value.userForPageBuilder.name&&n.value.userForPageBuilder.image&&typeof n.value.userForPageBuilder.image=="string"&&n.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("div",yP,[i.createElementVNode("div",wP,[i.createElementVNode("img",{alt:"Avatar",src:`${n.value.userForPageBuilder.image}`,class:"pbx-block pbx-inset-0 pbx-object-top pbx-d pbx-min-d pbx-max-d lg:pbx-w-8 lg:pbx-h-8 lg:pbx-min-w-8 lg:pbx-max-w-8 pbx-w-8 pbx-h-8 pbx-min-w-8 pbx-max-w-8 pbx-object-cover pbx-rounded-full"},null,8,vP)]),i.createElementVNode("div",kP,i.toDisplayString(n.value.userForPageBuilder.name),1)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",SP,[i.createElementVNode("div",CP,[i.createElementVNode("button",EP,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Options")),1)]),i.createElementVNode("div",TP,[i.createElementVNode("button",{onClick:V[0]||(V[0]=async()=>{await i.unref(t).clearHtmlSelection(),h()}),class:"pbx-mySecondaryButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("Config Overview")),1),i.createElementVNode("button",{onClick:C,class:"pbx-mySecondaryButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("HTML Overview")),1),i.createElementVNode("button",{onClick:y,class:"pbx-myPrimaryDeleteButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("Delete Layout")),1)])])])]),i.createVNode(St,{maxWidth:"5xl",showModalBuilder:w.value,title:"Main Settings",onCloseMainModalBuilder:v,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(P8)]),_:1},8,["showModalBuilder"]),i.createVNode(St,{maxWidth:"5xl",showModalBuilder:S.value,title:i.unref(e)("Selected HTML"),onCloseMainModalBuilder:k,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(bP)]),_:1},8,["showModalBuilder","title"]),i.createVNode(Zt,{showDynamicModalBuilder:s.value,type:l.value,gridColumnAmount:p.value,title:d.value,description:c.value,isLoading:a.value,firstButtonText:m.value,secondButtonText:b.value,thirdButtonText:u.value,onFirstModalButtonFunctionDynamicModalBuilder:g.value,onSecondModalButtonFunctionDynamicModalBuilder:f.value,onThirdModalButtonFunctionDynamicModalBuilder:x.value},{default:i.withCtx(()=>V[1]||(V[1]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[1]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","isLoading","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"])])}}};let Vl=null;function BP(){return(r,e=300)=>{Vl&&clearTimeout(Vl),Vl=setTimeout(r,e)}}const NP={},PP={class:"pbx-bg-white pbx-flex pbx-justify-center pbx-items-center min-pbx-h-screen pbx-h-screen pbx-w-screen pbx-fixed pbx-inset-0 pbx-z-[10000]"};function DP(r,e){return i.openBlock(),i.createElementBlock("div",PP,e[0]||(e[0]=[i.createElementVNode("div",{class:"pbx-absolute pbx-top-1/3"},[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-mt-4"},[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")])])],-1)]))}const Jb=ma(NP,[["render",DP]]),LP={class:"pbx-text-xs pbx-text-gray-600 pbx-mx-2 pbx-py-3 pbx-px-2 pbx-border-solid pbx-border pbx-border-gray-200 pbx-rounded-full"},AP=i.defineComponent({__name:"UndoRedo",emits:["toolbar-hide-request"],setup(r,{emit:e}){const t=ie(),o=e,n=ne,a=i.computed(()=>n.getIsLoadingGlobal),s=i.computed(()=>n.getHistoryIndex),l=i.computed(()=>n.getHistoryLength),p=i.computed(()=>s.value>0),d=i.computed(()=>s.value<l.value-1),c=async function(){p.value&&(o("toolbar-hide-request"),await t.undo(),await t.clearHtmlSelection())},m=async function(){d.value&&(o("toolbar-hide-request"),await t.redo(),await t.clearHtmlSelection())};return(b,u)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[a.value?(i.openBlock(),i.createBlock(Jb,{key:0})):i.createCommentVNode("",!0),i.createElementVNode("div",{onClick:u[0]||(u[0]=async()=>{await i.unref(t).clearHtmlSelection()}),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full gap-1"},[i.createElementVNode("div",{onClick:c,type:"button",class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black hover:pbx-text-white",[p.value?"pbx-cursor-pointer hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},u[1]||(u[1]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," undo ",-1)]),2),i.createElementVNode("div",LP,i.toDisplayString(s.value+1)+"/"+i.toDisplayString(l.value),1),i.createElementVNode("div",{onClick:m,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black hover:pbx-text-white",[d.value?"pbx-cursor-pointer hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},u[2]||(u[2]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," redo ",-1)]),2)])],64))}}),OP={class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-auto pbx-flex pbx-flex-col pbx-font-sans pbx-text-black pbx-border-solid pbx-border pbx-border-gray-400 pbx-inset-x-0 pbx-z-10 pbx-bg-white pbx-overflow-x-auto pbx-h-full"},VP={id:"pagebuilder-navbar",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-bg-myPrimaryLightGrayColor pbx-flex pbx-items-center pbx-justify-between pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 pbx-mb-2 pbx-font-sans pbx-min-h-20"},IP=["src"],_P={class:"pbx-flex pbx-items-center pbx-justify-center"},RP=["disabled"],HP={key:0,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},zP={key:1,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},FP=["disabled"],jP={key:0,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},qP={key:1,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},WP={class:"lg:pbx-block pbx-hidden"},UP={class:"lg:pbx-hidden pbx-block"},GP={class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-border-gray-200"},KP={class:"lg:pbx-block pbx-hidden"},JP={class:"pbx-whitespace-nowrap pbx-cursor-pointer"},YP={class:"pbx-flex pbx-items-center pbx-justify-center pbx-mr-2"},XP={class:"lg:pbx-flex pbx-hidden pbx-items-center pbx-justify-center"},QP={class:"pbx-flex-1 pbx-flex gap-2 pbx-items-center pbx-justify-end"},ZP={key:0,class:"pbx-flex-1 pbx-ml-2"},$P={key:0,class:"pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2 lg:pbx-mr-4 pbx-mr-2"},eD=["value"],tD=["value"],rD={key:2,class:"pbx-flex-1 pbx-ml-2 pbx-mr-2"},oD={id:"pagebuilder-main",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2"},nD={class:"pbx-mx-2 pbx-flex pbx-flex-col pbx-myPrimaryGap pbx-items-stretch"},iD={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},aD={id:"pbxEditToolbar",class:"pbx-z-30 lg:pbx-mx-20 pbx-flex pbx-gap-2 pbx-justify-center pbx-items-center pbx-rounded-full pbx-px-4 pbx-h-0"},sD={id:"pagebuilder",class:"pbx-text-black pbx-font-sans"},lD=["innerHTML","onMouseup"],pD={id:"pagebuilder-footer",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-flex pbx-items-center pbx-justify-center pbx-border-0 pbx-border-t pbx-border-t-gray-200 pbx-border-solid pbx-bg-myPrimaryLightGrayColor pbx-py-4"},dD={class:"lg:pbx-block pbx-hidden"},cD={class:"pbx-whitespace-nowrap"},mD={__name:"PageBuilder",props:{CustomMediaLibraryComponent:{type:Object,default:null},CustomBuilderComponents:{type:Object,default:null},showCloseButton:{type:Boolean,default:!1},showPublishButton:{type:Boolean,default:!1}},emits:["handleClosePageBuilder","handlePublishPageBuilder"],setup(r,{emit:e}){const t=ie(),o=r,{translate:n,loadTranslations:a}=pe(),s=Bl,l=ne;i.provide("pageBuilderStateStore",l),i.provide("internalPinia",s),i.provide("CustomMediaComponent",o.CustomMediaLibraryComponent),i.provide("CustomBuilderComponents",o.CustomBuilderComponents);const p=e,d=function(){p("handleClosePageBuilder")},c=async function(){l.setIsLoadingGlobal(!0),await t.handleManualSave(),l.setIsLoadingGlobal(!1),p("handlePublishPageBuilder")},m=()=>{q.value=!1};i.provide("closeAddComponentModal",m);const b=i.ref("en");let u=!0;const g=i.ref(!1);i.watch(b,async A=>{if(A&&!u){g.value=!0,await ge(200),await a(A),t.changeLanguage(A);const T=JSON.parse(localStorage.getItem("userSettingsPageBuilder"))||{};T.lang=A,localStorage.setItem("userSettingsPageBuilder",JSON.stringify(T)),g.value=!1}});const f=i.computed(()=>l.getBuilderStarted),x=i.computed(()=>l.getPageBuilderConfig),y=i.computed(()=>l.getMenuRight),w=i.ref(!1),v=i.ref(""),h=i.ref(""),S=function(){t.previewCurrentDesign()},k=function(){v.value=n("Preview"),S(),w.value=!0},C=i.ref(!1),L=function(){t.previewCurrentDesign()},V=function(){h.value=n("Mobile"),L(),C.value=!0},M=i.ref(!1),B=function(){M.value=!1},D=function(){w.value=!1},F=function(){C.value=!1},q=i.ref(!1),Y=i.ref(""),Z=i.ref(""),$=i.ref(null),ee=async function(){await t.clearHtmlSelection(),Y.value=n("Add Components to Page"),Z.value=n("Close"),q.value=!0,$.value=function(){q.value=!1}},G=i.computed(()=>l.getElement),Ge=i.computed(()=>l.getComponents),Ke=i.computed(()=>l.getHasLocalDraftForUpdate);i.watch(Ke,A=>{A&&vt()});const Fe=i.computed(()=>!G.value||!(G.value instanceof HTMLElement)?"":{src:G.value.getAttribute("src"),href:G.value.getAttribute("href"),style:G.value.getAttribute("style"),class:G.value.getAttribute("class"),dataImage:G.value.getAttribute("data-image")}),ct=BP();i.watch(Fe,async(A,T)=>{((A==null?void 0:A.src)!==(T==null?void 0:T.src)||(A==null?void 0:A.href)!==(T==null?void 0:T.href)||(A==null?void 0:A.style)!==(T==null?void 0:T.style)||(A==null?void 0:A.class)!==(T==null?void 0:T.class)||(A==null?void 0:A.dataImage)!==(T==null?void 0:T.dataImage))&&ct(async()=>{await t.initializeElementStyles()},200)});const Je=function(A){l.setComponent(A)},Oe=i.computed(()=>l.getIsLoadingGlobal),Ve=i.computed(()=>l.getIsSaving),yt=i.computed(()=>l.getIsLoadingResumeEditing),Be=i.computed(()=>l.getIsRestoring),wt=i.ref(1),et=i.ref(""),Ye=i.ref(!1),Xt=i.ref(""),ue=i.ref(""),I=i.ref(""),Ne=i.ref(null),kr=i.ref(null),Sr=i.ref(null),Qr=i.ref(null),Zr=i.ref(null),vt=async function(){et.value="warning",Ye.value=!0,Xt.value=n("Continue Your Work?"),ue.value=n("We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?"),I.value=n("Use Saved Version"),Ne.value=null,kr.value=n("Continue Where I Left Off"),Sr.value=async function(){l.setHasLocalDraftForUpdate(!1),Ye.value=!1},Qr.value=function(){},Zr.value=async function(){await t.resumeEditingFromDraft(),l.setHasLocalDraftForUpdate(!1),Ye.value=!1}},Vt=i.ref(1),Cr=i.ref(""),mt=i.ref(!1),Er=i.ref(""),$r=i.ref(""),eo=i.ref(""),to=i.ref(null),ro=i.ref(null),ga=i.ref(null),xa=i.ref(null),fa=i.ref(null),Il=async function(){await t.clearHtmlSelection(),Cr.value="success",mt.value=!0,Er.value=n("Do you want to reset this page?"),$r.value=n("Are you sure you want to reset this page? This will overwrite your current changes."),eo.value=n("Close"),to.value=null,ro.value=n("Reset changes"),ga.value=function(){mt.value=!1},xa.value=async function(){},fa.value=async function(){await t.restoreOriginalContent(),mt.value=!1}},Ln=function(){f.value||(M.value=!0)},E=i.ref(null),R=function(){const A=document.querySelector("#pbxEditToolbar");A&&(A.classList.remove("is-visible"),A.removeAttribute("style"))};function z(){const A=E.value,T=A&&A.querySelector("#pbxEditToolbar");if(!A||!T)return;const Q=A.querySelector("[selected]");if(Q&&typeof Q.getBoundingClientRect=="function"){const kt=Q.getBoundingClientRect(),An=A.getBoundingClientRect(),Qt=kt.left-An.left+kt.width/2-T.offsetWidth/2,Oo=kt.top-An.top+A.scrollTop-T.offsetHeight-20,Tr=Math.max(0,Oo);T.style.position="absolute",T.style.left=`${Qt}px`,T.style.top=`${Tr}px`,T.classList.add("is-visible")}else T.classList.remove("is-visible"),T.removeAttribute("style")}const X=JSON.parse(localStorage.getItem("userSettingsPageBuilder"));return i.onMounted(async()=>{await t.completeBuilderInitialization(void 0,!0),X&&X.lang&&(b.value=X.lang),x.value&&x.value.userSettings&&x.value.userSettings.language&&x.value.userSettings.language.default&&(!X||!X.lang)&&(b.value=x.value.userSettings.language.default),await a(b.value),u=!1,z();const A=E.value;if(!A)return;new MutationObserver(z).observe(A,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selected"]}),window.addEventListener("scroll",z),window.addEventListener("resize",z),await ge(1e4),Ln(),await ge(1e4),Ln(),await ge(1e4),Ln()}),(A,T)=>(i.openBlock(),i.createElementBlock("div",OP,[Oe.value&&!M.value||g.value?(i.openBlock(),i.createBlock(Jb,{key:0})):i.createCommentVNode("",!0),i.createVNode(St,{title:"The builder hasn’t started yet",showModalBuilder:M.value,onCloseMainModalBuilder:B,type:"delete",maxWidth:"2xl",noBackgroundOpacity:!0},{default:i.withCtx(()=>T[21]||(T[21]=[i.createTextVNode(" The builder hasn’t started yet. If this screen doesn’t go away soon, it may just need a little setup in the background. You can safely contact support and ask them to initialize the builder by running the startBuilder method for this resource. ")])),_:1,__:[21]},8,["showModalBuilder"]),q.value?(i.openBlock(),i.createBlock(JT,{key:1,show:q.value,firstButtonText:Z.value,title:Y.value,CustomBuilderComponents:o.CustomBuilderComponents,onFirstModalButtonSearchComponentsFunction:$.value},null,8,["show","firstButtonText","title","CustomBuilderComponents","onFirstModalButtonSearchComponentsFunction"])):i.createCommentVNode("",!0),i.createVNode(St,{title:v.value,showModalBuilder:w.value,onCloseMainModalBuilder:D,maxWidth:"screen"},{default:i.withCtx(()=>[i.createVNode(wa)]),_:1},8,["title","showModalBuilder"]),i.createVNode(St,{title:h.value,showModalBuilder:C.value,onCloseMainModalBuilder:F,maxWidth:"lg"},{default:i.withCtx(()=>[i.createVNode(wa,{mobile:!0})]),_:1},8,["title","showModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:Ye.value,isLoading:yt.value,type:et.value,gridColumnAmount:wt.value,title:Xt.value,description:ue.value,firstButtonText:I.value,secondButtonText:Ne.value,thirdButtonText:kr.value,onFirstModalButtonFunctionDynamicModalBuilder:Sr.value,onSecondModalButtonFunctionDynamicModalBuilder:Qr.value,onThirdModalButtonFunctionDynamicModalBuilder:Zr.value},{default:i.withCtx(()=>T[22]||(T[22]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[22]},8,["showDynamicModalBuilder","isLoading","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:mt.value,isLoading:Be.value,type:Cr.value,gridColumnAmount:Vt.value,title:Er.value,description:$r.value,firstButtonText:eo.value,secondButtonText:to.value,thirdButtonText:ro.value,onFirstModalButtonFunctionDynamicModalBuilder:ga.value,onSecondModalButtonFunctionDynamicModalBuilder:xa.value,onThirdModalButtonFunctionDynamicModalBuilder:fa.value},{default:i.withCtx(()=>T[23]||(T[23]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[23]},8,["showDynamicModalBuilder","isLoading","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",VP,[x.value&&x.value.pageBuilderLogo&&x.value.pageBuilderLogo.src?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:T[0]||(T[0]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-justify-start pbx-py-2 lg:pbx-ml-4 pbx-ml-2"},[i.createElementVNode("img",{class:"pbx-h-6",src:x.value.pageBuilderLogo.src,alt:"Logo"},null,8,IP)])):i.createCommentVNode("",!0),i.createVNode(AP,{onToolbarHideRequest:R}),i.createElementVNode("div",{onClick:T[3]||(T[3]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"},[i.createElementVNode("div",_P,[i.createElementVNode("button",{class:"pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 pbx-mr-2",onClick:T[1]||(T[1]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection(),await i.unref(t).handleManualSave()},["stop"])),type:"button",disabled:Ve.value},[Ve.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",HP,T[24]||(T[24]=[i.createElementVNode("span",{class:"material-symbols-outlined"},"save",-1)]))),Ve.value?(i.openBlock(),i.createElementBlock("div",zP,T[25]||(T[25]=[i.createElementVNode("span",{class:"pbx-relative pbx-flex pbx-size-3"},[i.createElementVNode("span",{class:"pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"}),i.createElementVNode("span",{class:"pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"})],-1)]))):i.createCommentVNode("",!0),i.createElementVNode("div",null,i.toDisplayString(i.unref(n)("Save")),1)],8,RP),x.value&&x.value.updateOrCreate&&x.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("button",{key:0,class:"pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 lg:pbx-mr-2 pbx-mr-2",onClick:T[2]||(T[2]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection(),await Il()},["stop"])),type:"button",disabled:Be.value},[Be.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",jP,T[26]||(T[26]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," settings_backup_restore ",-1)]))),Be.value?(i.openBlock(),i.createElementBlock("div",qP,T[27]||(T[27]=[i.createElementVNode("span",{class:"pbx-relative pbx-flex pbx-size-3"},[i.createElementVNode("span",{class:"pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"}),i.createElementVNode("span",{class:"pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"})],-1)]))):i.createCommentVNode("",!0),i.createElementVNode("div",WP,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Reset Page")),1)]),i.createElementVNode("div",UP,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Reset")),1)])],8,FP)):i.createCommentVNode("",!0)])]),i.createElementVNode("div",{onClick:T[8]||(T[8]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"},[i.createElementVNode("div",{onClick:T[7]||(T[7]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-items-center pbx-justify-center"},[i.createElementVNode("div",{class:"pbx-mr-2",onClick:T[4]||(T[4]=()=>{i.unref(l).setComponentArrayAddMethod("unshift"),ee()})},[i.createElementVNode("div",GP,[i.createElementVNode("span",KP,[i.createElementVNode("div",JP,i.toDisplayString(i.unref(n)("Add new Components")),1)]),T[28]||(T[28]=i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ")],-1))])]),i.createElementVNode("div",YP,[i.createElementVNode("div",{onClick:T[5]||(T[5]=async()=>{i.unref(l).setMenuRight(!1),i.unref(l).setElement(null),await i.unref(t).clearHtmlSelection(),k()})},T[29]||(T[29]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},[i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," visibility ")])],-1)]))]),i.createElementVNode("div",XP,[i.createElementVNode("div",{onClick:T[6]||(T[6]=async()=>{i.unref(l).setMenuRight(!1),i.unref(l).setElement(null),await i.unref(t).clearHtmlSelection(),V()})},T[30]||(T[30]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},[i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," phone_iphone ")])],-1)]))])])]),i.createElementVNode("div",QP,[i.createElementVNode("div",{onClick:T[9]||(T[9]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:i.normalizeClass(["pbx-flex pbx-items-center pbx-py-2 pbx-w-full",[r.showCloseButton?"pbx-justify-between":"pbx-justify-end"]])},[i.createVNode(MP)],2),r.showPublishButton?(i.openBlock(),i.createElementBlock("div",ZP,[i.createElementVNode("button",{class:"pbx-myPrimaryButton",onClick:T[10]||(T[10]=async()=>{c()})},i.toDisplayString(i.unref(n)("Publish")),1)])):i.createCommentVNode("",!0),i.unref(t)&&x.value&&x.value.userSettings&&x.value.userSettings.language&&!x.value.userSettings.language.disableLanguageDropDown?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[x.value&&x.value.userSettings&&x.value.userSettings.language?(i.openBlock(),i.createElementBlock("div",$P,[i.withDirectives(i.createElementVNode("select",{id:"pbx-lang",class:"pbx-myPrimarySelect pbx-min-w-20","onUpdate:modelValue":T[11]||(T[11]=Q=>b.value=Q)},[Array.isArray(x.value.userSettings.language.enable)&&x.value.userSettings.language.enable.length>=1?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(i.unref(t).availableLanguage().filter(Q=>x.value.userSettings.language.enable.includes(Q)),Q=>(i.openBlock(),i.createElementBlock("option",{key:Q,value:Q},i.toDisplayString(Q),9,eD))),128)):i.createCommentVNode("",!0),!x.value.userSettings.language.enable||Array.isArray(x.value.userSettings.language.enable)&&x.value.userSettings.language.enable.length===0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(i.unref(t).availableLanguage(),Q=>(i.openBlock(),i.createElementBlock("option",{key:Q,value:Q},i.toDisplayString(Q),9,tD))),128)):i.createCommentVNode("",!0)],512),[[i.vModelSelect,b.value]])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),r.showCloseButton?(i.openBlock(),i.createElementBlock("div",rD,[i.createElementVNode("button",{class:"pbx-h-10 pbx-w-10 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white hover:pbx-fill-white focus-visible:pbx-ring-0",onClick:T[12]||(T[12]=async()=>{d(),await i.unref(t).clearHtmlSelection()})},T[31]||(T[31]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ",-1)]))])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",oD,[i.createElementVNode("div",{onClick:T[15]||(T[15]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),id:"pagebuilder-left-menu",class:"pbx-w-16 pbx-pt-7 pbx-pb-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-r-2xl pbx-shadow-sm"},[i.createElementVNode("div",nD,[i.createElementVNode("div",iD,[i.createElementVNode("button",{type:"button",onClick:T[13]||(T[13]=()=>{i.unref(l).setComponentArrayAddMethod("unshift"),ee()}),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},T[32]||(T[32]=[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ",-1)]))]),i.createElementVNode("div",{onClick:T[14]||(T[14]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"]))},[G.value?(i.openBlock(),i.createBlock(tv,{key:0})):i.createCommentVNode("",!0)])])]),i.createElementVNode("main",{ref_key:"pbxBuilderWrapper",ref:E,id:"page-builder-wrapper",class:i.normalizeClass(["pbx-transition-all pbx-duration-300 pbx-font-sans pbx-p-1 pbx-flex pbx-flex-col pbx-grow pbx-rounded-tr-2xl pbx-rounded-tl-2xl pbx-border-solid pbx-border pbx-border-gray-200 pbx-items-stretch pbx-text-black pbx-h-[100vh] pbx-overflow-y-scroll pbx-relative pbx-pt-16",[(y.value,"pbx-w-full")]])},[i.createElementVNode("div",aD,[G.value?(i.openBlock(),i.createBlock(aT,{key:0})):i.createCommentVNode("",!0)]),i.createElementVNode("div",sD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Ge.value,Q=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:Q.id},[Q.html_code?(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:Q.html_code,onMouseup:kt=>Je(Q)},null,40,lD)):i.createCommentVNode("",!0)],64))),128))])],2),i.createVNode(i.Transition,{name:"slide-right",appear:"",mode:"out-in"},{default:i.withCtx(()=>[y.value?(i.openBlock(),i.createElementBlock("aside",{key:0,"aria-label":"menu",id:"pagebuilder-right-menu",class:i.normalizeClass(["pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2",[y.value?"pbx-w-80 pbx-bg-myPrimaryLightGrayColor pbx-items-stretch":"bpx-w-0 pbx-mr-0"]])},[i.createVNode($B,{onCloseEditor:T[16]||(T[16]=Q=>i.unref(l).setMenuRight(!1))})],2)):(i.openBlock(),i.createElementBlock("div",{key:1,onClick:T[19]||(T[19]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-w-18 pbx-bg-myPrimaryLightGrayColor pbx-pt-5 pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2 pbx-pr-2"},[i.createElementVNode("div",{onClick:T[18]||(T[18]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-gap-2"},[y.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,onClick:T[17]||(T[17]=Q=>i.unref(l).setMenuRight(!0)),type:"button",class:"pbx-mySecondaryButton pbx-px-2 pbx-text-xs"},[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Styles")),1)]))])]))]),_:1})]),i.createElementVNode("div",pD,[i.createElementVNode("div",{onClick:T[20]||(T[20]=()=>{i.unref(l).setComponentArrayAddMethod("push"),ee()}),class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-cursor-pointer"},[i.createElementVNode("span",dD,[i.createElementVNode("div",cD,i.toDisplayString(i.unref(n)("Add to the bottom")),1)]),T[33]||(T[33]=i.createElementVNode("div",{class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},[i.createElementVNode("button",{type:"button",class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ")])],-1))])])]))}},bD={install:r=>{if(!r.config.globalProperties.$pageBuilder){const e=ne,t=new Jw(e);Yw(t),r.config.globalProperties.$pageBuilder=t}}},Yb="حفظ",Xb="خيارات",Qb="الصورة الرمزية",Zb="نشر",$b="إغلاق",eu="مكون",tu="أنماط",ru="الطباعة",ou="اختر",nu="الحشو",iu="الهامش",au="عالمي",su="محدد",lu="الحدود",pu="شفاف",du="إضافة",cu="خاصية",mu="قيمة",bu="تحرير",uu="حذف",gu="معاينة",xu="جوال",fu="غامق",hu="قائمة",yu="بحث",wu="أفقي",vu="عمودي",ku="مربع الشكل",Su="صور",Cu="السابق",Eu="التالي",Tu="معلومات",Mu="نص",Bu="رابط",Nu="أنواع",Pu="مصفوفة",Du="المحتوى",Lu="عنصر",Au="مكون",Ou="الكل",Vu="صورة",uD=Object.freeze(Object.defineProperty({__proto__:null,Add:du,All:Ou,Bold:fu,Border:lu,Close:$b,Component:Au,Content:Du,Delete:uu,Editing:bu,Element:Lu,Global:au,Image:Vu,Images:Su,Information:Tu,Landscape:wu,Link:Bu,List:hu,Margin:iu,Mobile:xu,Next:Eu,Options:Xb,Padding:nu,Portrait:vu,Prev:Cu,Preview:gu,Publish:Zb,Save:Yb,Search:yu,Select:ou,Specific:su,Squarish:ku,Styles:tu,Text:Mu,Transparent:pu,Types:Nu,Typographies:ru,array:Pu,avatar:Qb,component:eu,default:{"Reset Page":"إعادة تعيين الصفحة","Global Page Styles":"أنماط الصفحة العامة","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"جرب منشئ الصفحات القوي Click & Drop - المصمم للمطورين والمبدعين الذين يريدون التحكم الكامل دون عناء. قم بتخصيص التخطيطات والخطوط والألوان. قم بتحرير المحتوى بصريًا في الوقت الفعلي. أضف الوسائط، قم بتضمين مقاطع فيديو YouTube، أو قم بتصدير كل شيء كـ HTML نظيف. مع التحرير المتجاوب، الحفظ التلقائي المحلي، دعم Tailwind، وحتى تكامل Unsplash، إنه كل ما تحتاجه - ملفوف في منشئ واحد سلس. قم ببناء صفحات مذهلة في دقائق.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"منشئ صفحات مصمم للنمو. قم ببناء صفحات موقعك الإلكتروني باستخدام مكونات جاهزة قابلة للتخصيص بالكامل ومتجاوبة دائمًا، مصممة لتلبية كل احتياجاتك. منشئ صفحات قوي للتجار والعلامات التجارية والوكالات المتنامية.","Everything you need. Break free from design limitations":"كل ما تحتاجه. تحرر من قيود التصميم","Bring your vision to life and create impressive pages using a click & drop Page Builder":"حقق رؤيتك واصنع صفحات رائعة باستخدام منشئ الصفحات السحب والإفلات","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"منشئ الويب لصفحات مذهلة. يمكن المستخدمين من تصميم ونشر صفحات حديثة على أي نطاق. قم ببناء صفحات متجاوبة مثل القوائم، الوظائف أو منشورات المدونات وأدر المحتوى بسهولة باستخدام منشئ الصفحات السحب والإفلات المجاني. تم تطويره باستخدام TypeScript، Vue 3، Composition API، Pinia، CSS، Tailwind CSS و HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"قم بتنزيل أو تثبيت منشئ الصفحات المجاني Vue 3 القوي والمرن وسهل الاستخدام عبر",Save:Yb,"Add new Components":"إضافة مكونات جديدة",Options:Xb,"Config Overview":"نظرة عامة على التكوين","HTML Overview":"نظرة عامة على HTML","Delete Layout":"حذف التخطيط",avatar:Qb,Publish:Zb,"Add Components to Page":"إضافة مكونات إلى الصفحة",Close:$b,"Helper Components":"مكونات المساعدة","Click to add":"انقر للإضافة",component:eu,"Layout Components":"مكونات التخطيط","Click to add component":"انقر لإضافة مكون","Remove all Components":"إزالة جميع المكونات","Are you sure you want to remove all Components?":"هل أنت متأكد أنك تريد إزالة جميع المكونات؟",Styles:tu,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"قم بتطبيق الأنماط التي تؤثر على الصفحة بأكملها. تتضمن هذه الإعدادات عائلة الخطوط العامة، ولون النص، ولون الخلفية، والأنماط العامة الأخرى التي تنطبق على جميع الأقسام.","Update Page Styles":"تحديث أنماط الصفحة","Download HTML":"تنزيل HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"قم بتصدير الصفحة بأكملها كملف HTML مستقل. يتضمن ذلك جميع الأقسام والمحتوى والأنماط المطبقة، مما يجعلها جاهزة للاستخدام أو التكامل في مكان آخر.","Download HTML file":"تنزيل ملف HTML",Typographies:ru,"Font Appearance":"مظهر الخط","Font Size":"حجم الخط",Select:ou,"Font tablet size":"حجم الخط للجهاز اللوحي","Font small screens":"حجم الخط للشاشات الصغيرة","Font weight":"وزن الخط","Font family":"عائلة الخط","Font Style":"نمط الخط","Opacity & Transparency":"الشفافية والعتامة",Padding:nu,"Vertical Padding":"الحشو العمودي","Horizontal Padding":"الحشو الأفقي",Margin:iu,"Vertical Margin":"الهامش العمودي","Horizontal Margin":"الهامش الأفقي","Border Radius":"نصف القطر الحدودي",Global:au,Specific:su,"Border Radius top left":"نصف القطر الحدودي العلوي الأيسر","Border Radius top right":"نصف القطر الحدودي العلوي الأيمن","Border Radius bottom left":"نصف القطر الحدودي السفلي الأيسر","Border Radius bottom right":"نصف القطر الحدودي السفلي الأيمن","Border Style, Width & Color":"نمط الحدود والعرض واللون",Border:lu,"Border Style":"نمط الحدود","Border Width":"عرض الحدود","Border Color":"لون الحدود",Transparent:pu,"Generated CSS":"CSS المُنشأ","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"هذا هو CSS الذي يطبقه المنشئ. أضف CSS الخاص بك واضغط Enter لتطبيقه على العنصر المحدد.","Add your CSS.":"أضف CSS الخاص بك.","The pbx- prefix is added automatically.":"يتم إضافة البادئة pbx- تلقائيًا.","Type class":"اكتب الفئة",Add:du,"Inline Styles":"أنماط مضمنة","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"هذه هي الأنماط المضمنة التي يطبقها المنشئ. أضف أنماطك الخاصة واضغط على Enter لتطبيقها على العنصر المحدد.","Add your own style.":"أضف نمطك الخاص.",property:cu,value:mu,Editing:bu,"Loading...":"جار التحميل...","Background Color":"لون الخلفية","Text Color":"لون النص","Default black":"أسود افتراضي","Remove Component?":"إزالة المكون؟","Are you sure you want to remove this Component?":"هل أنت متأكد أنك تريد إزالة هذا المكون؟",Delete:uu,"Add to the bottom":"أضف إلى الأسفل",Preview:gu,Mobile:xu,"Demo Content":"معاينة","Demo Description":"تعرف على منشئ الصفحات الخفيف والمجاني Vue Click & Drop. قم بإنشاء وتعزيز التجارب الرقمية بسهولة باستخدام Vue. ليس كل شيء قوي يجب أن يكون معقدًا. يوفر هذا المنشئ البسيط والخفيف واجهة أنيقة وبديهية تركز على البساطة والسرعة. قم ببناء صفحات متجاوبة بالكامل مثل القوائم، لوحات الوظائف، أو منشورات المدونة - وأدر محتواك بسهولة باستخدام منشئ الصفحات المجاني Click & Drop.","Demo Description Two":"منشئ صفحات مصمم للنمو. قم ببناء صفحات موقعك الإلكتروني باستخدام مكونات جاهزة قابلة للتخصيص بالكامل ومتجاوبة دائمًا، مصممة لتلبية كل احتياجاتك. منشئ صفحات قوي للتجار والعلامات التجارية والوكالات المتنامية.","Demo Description Three":"منشئ مواقع الويب الذي يعشقه المصممون. يمكنك بسهولة تصميم وتخطيطات المعاينة والضبط لكل حجم شاشة. نظيف. سريع. بديهي. ليس كل شيء قوي يجب أن يبدو معقدًا.","Demo Description Four":"تأكد من أن موقعك يبدو رائعًا على جميع الأجهزة. قم بتحرير محتوى النص مباشرة وفي الوقت الفعلي. اختر الخطوط المثالية التي تناسب أسلوبك. جرب بثقة مع القدرة على التراجع عن التغييرات. أنماط مسبوقة. لا يوجد خطر من تعارض الأنماط بين المنشئ وتطبيقك.","Demo Title":"منشئ الويب لصفحات مذهلة","Demo Title Two":"فقط انشره مع Vue","Demo Title Three":"تحرير متجاوب","Edit text and links":"تحرير النصوص والروابط","Enter URL":"أدخل عنوان URL","Line break":"فاصل سطر",Bold:fu,"Header 2":"عنوان 2","Header 3":"عنوان 3",List:hu,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"أضف عنوان URL صالحًا لتحويل النص المحدد إلى ارتباط تشعبي قابل للنقر يوجه المستخدمين إلى عنوان الويب المحدد.","Select image":"اختر صورة","Manage Content":"إدارة المحتوى","Media Library":"مكتبة الوسائط","Reset changes":"إعادة التغييرات","Do you want to reset this page?":"هل تريد إعادة تعيين هذه الصفحة؟","Are you sure you want to reset this page? This will overwrite your current changes.":"هل أنت متأكد أنك تريد إعادة تعيين هذه الصفحة؟ سيؤدي هذا إلى الكتابة فوق التغييرات الحالية.",Search:yu,"Search...":"ابحث...",Landscape:wu,Portrait:vu,Squarish:ku,"Total pages":"إجمالي الصفحات",Images:Su,"First page":"الصفحة الأولى",Prev:Cu,Next:Eu,"By:":"بواسطة:","We did not find any images. Make a new search.":"لم نجد أي صور. قم ببحث جديد.","No results on current page. Navigate to First Page.":"لا توجد نتائج في الصفحة الحالية. انتقل إلى الصفحة الأولى.",Information:Tu,"From:":"من:"," Select image":" اختر صورة","Layouts and visual.":"التخطيطات والمرئيات.","Start customizing by editing this default text directly in the editor.":"ابدأ التخصيص عن طريق تحرير هذا النص الافتراضي مباشرة في المحرر.","Single Image":"صورة واحدة","Two Vertical Images":"صورتان عموديتان","Two Square Images":"صورتان مربعتان","Three Square Images":"ثلاث صور مربعة","Six Square Images Grid":"شبكة من ست صور مربعة","Three Vertical Images":"ثلاث صور عمودية","Three Square Images With Text":"ثلاث صور مربعة مع نص","Two Square Images With Text":"صورتان مربعتان مع نص",Text:Mu,"Header H2":"رأس H2","Header H3":"رأس H3","YouTube Video":"فيديو يوتيوب","Break Divider":"فاصل",Link:Bu,"Selected HTML":"HTML المحدد","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"نظرة عامة على العنصر المحدد والمكون والمكونات. يوفر هذا القسم تحديثات في الوقت الفعلي بناءً على اختيار HTML الخاص بك.",Types:Nu,"Element type:":"نوع العنصر:","Component type:":"نوع المكون:","Components:":"المكونات:",array:Pu,Content:Du,Element:Lu,Component:Au,"Components added":"تمت إضافة المكونات","No Element selected":"لم يتم تحديد عنصر","Selected HTML:":"HTML المحدد:","Element src:":"مصدر العنصر:","Element classes:":"فئات العنصر:","No Component selected":"لم يتم تحديد مكون","ID:":"المعرف:","Title:":"العنوان:","HTML Code:":"كود HTML:","No Components added yet":"لم تتم إضافة مكونات بعد",All:Ou,Image:Vu,"Image & Text":"صورة ونص","Four Square Images With Text":"أربع صور مربعة مع نص","Four Square Images":"أربع صور مربعة","Continue Your Work?":"أترغب في متابعة عملك؟","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"لاحظنا وجود بعض التغييرات التي لم تُحفظ في المرة السابقة. هل ترغب في المتابعة من حيث توقفت، أم استخدام الإصدار المُحمّل حاليًا من قاعدة البيانات؟","Use Saved Version":"استخدام النسخة المحفوظة","Continue Where I Left Off":"المتابعة من حيث توقفت","HTML Editor":"محرر HTML","Gain full control over components by editing the raw HTML.":"احصل على التحكم الكامل في المكونات عن طريق تحرير HTML الخام.","Large Screens Only":"الشاشات الكبيرة فقط"},property:cu,value:mu},Symbol.toStringTag,{value:"Module"})),Iu="Speichern",_u="Optionen",Ru="Avatar",Hu="Veröffentlichen",zu="Schließen",Fu="Komponente",ju="Stile",qu="Typografien",Wu="Auswählen",Uu="Abstand",Gu="Rand",Ku="Global",Ju="Spezifisch",Yu="Rand",Xu="Transparent",Qu="Hinzufügen",Zu="Eigenschaft",$u="Wert",eg="schließen",tg="Bearbeiten",rg="Löschen",og="Vorschau",ng="Mobil",ig="Fett",ag="Liste",sg="Suche",lg="Querformat",pg="Hochformat",dg="Quadratisch",cg="Bilder",mg="Zurück",bg="Weiter",ug="Informationen",gg="Text",xg="Link",fg="Typen",hg="Array",yg="Inhalt",wg="Element",vg="Komponente",kg="Alle",Sg="Bild",gD=Object.freeze(Object.defineProperty({__proto__:null,Add:Qu,All:kg,Bold:ig,Border:Yu,Close:zu,Component:vg,Content:yg,Delete:rg,Editing:tg,Element:wg,Global:Ku,Image:Sg,Images:cg,Information:ug,Landscape:lg,Link:xg,List:ag,Margin:Gu,Mobile:ng,Next:bg,Options:_u,Padding:Uu,Portrait:pg,Prev:mg,Preview:og,Publish:Hu,Save:Iu,Search:sg,Select:Wu,Specific:Ju,Squarish:dg,Styles:ju,Text:gg,Transparent:Xu,Types:fg,Typographies:qu,array:hg,avatar:Ru,close:eg,component:Fu,default:{"Reset Page":"Seite zurücksetzen","Global Page Styles":"Globale Seitenstile","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Probieren Sie den leistungsstarken Click & Drop Page Builder aus – entwickelt für Entwickler und Kreative, die volle Kontrolle ohne Aufwand wünschen. Passen Sie Layouts, Schriftarten und Farben an. Bearbeiten Sie Inhalte visuell in Echtzeit. Fügen Sie Medien hinzu, betten Sie YouTube-Videos ein oder exportieren Sie alles als sauberes HTML. Mit responsiver Bearbeitung, lokalem automatischen Speichern, Tailwind-Unterstützung und sogar Unsplash-Integration ist es alles, was Sie brauchen – verpackt in einem nahtlosen Builder. Erstellen Sie beeindruckende Seiten in Minuten.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Ein Seiten-Builder, der für Wachstum entwickelt wurde. Erstellen Sie Ihre Website-Seiten mit vorgefertigten Komponenten, die vollständig anpassbar und immer reaktionsschnell sind, um alle Anforderungen zu erfüllen. Ein leistungsstarker Seiten-Builder für wachsende Händler, Marken und Agenturen.","Everything you need. Break free from design limitations":"Alles, was Sie brauchen. Befreien Sie sich von Designbeschränkungen","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Verwirklichen Sie Ihre Vision und erstellen Sie beeindruckende Seiten mit einem Click & Drop Page Builder","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Der Web-Builder für atemberaubende Seiten. Ermöglichen Sie Benutzern, moderne Seiten in jeder Größenordnung zu entwerfen und zu veröffentlichen. Erstellen Sie responsive Seiten wie Listen, Jobs oder Blog-Posts und verwalten Sie Inhalte einfach mit dem kostenlosen Click & Drop Page Builder. Entwickelt mit TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS und HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Laden Sie den leistungsstarken, flexiblen und benutzerfreundlichen kostenlosen Vue 3 Page Builder herunter oder installieren Sie ihn über",Save:Iu,"Add new Components":"Neue Komponenten hinzufügen",Options:_u,"Config Overview":"Konfigurationsübersicht","HTML Overview":"HTML-Übersicht","Delete Layout":"Layout löschen",avatar:Ru,Publish:Hu,"Add Components to Page":"Komponenten zur Seite hinzufügen",Close:zu,"Helper Components":"Hilfskomponenten","Click to add":"Klicken, um hinzuzufügen",component:Fu,"Layout Components":"Layout-Komponenten","Click to add component":"Klicken, um Komponente hinzuzufügen","Remove all Components":"Alle Komponenten entfernen","Are you sure you want to remove all Components?":"Sind Sie sicher, dass Sie alle Komponenten entfernen möchten?",Styles:ju,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Wenden Sie Stile an, die die gesamte Seite betreffen. Diese Einstellungen umfassen globale Schriftfamilie, Textfarbe, Hintergrundfarbe und andere universelle Stile, die auf alle Abschnitte angewendet werden.","Update Page Styles":"Seitenstile aktualisieren","Download HTML":"HTML herunterladen","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportieren Sie die gesamte Seite als eigenständige HTML-Datei. Dies umfasst alle Abschnitte, Inhalte und angewendeten Stile, sodass sie bereit für die Verwendung oder Integration an anderer Stelle ist.","Download HTML file":"HTML-Datei herunterladen",Typographies:qu,"Font Appearance":"Schriftbild","Font Size":"Schriftgröße",Select:Wu,"Font size":"Schriftgröße","Font tablet size":"Schriftgröße für Tablets","Font small screens":"Schriftgröße für kleine Bildschirme","Font weight":"Schriftgewicht","Font family":"Schriftfamilie","Font Style":"Schriftstil","Opacity & Transparency":"Deckkraft & Transparenz",Padding:Uu,"Vertical Padding":"Vertikaler Abstand","Horizontal Padding":"Horizontaler Abstand",Margin:Gu,"Vertical Margin":"Vertikaler Rand","Horizontal Margin":"Horizontaler Rand","Border Radius":"Randradius",Global:Ku,Specific:Ju,"Border Radius top left":"Randradius oben links","Border Radius top right":"Randradius oben rechts","Border Radius bottom left":"Randradius unten links","Border Radius bottom right":"Randradius unten rechts","Border Style, Width & Color":"Randstil, Breite & Farbe",Border:Yu,"Border Style":"Randstil","Border Width":"Randbreite","Border Color":"Randfarbe",Transparent:Xu,"Generated CSS":"Generiertes CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Dies ist das vom Builder angewendete CSS. Fügen Sie Ihr eigenes CSS hinzu und drücken Sie Enter, um es auf das ausgewählte Element anzuwenden.","Add your CSS.":"Fügen Sie Ihr CSS hinzu.","The pbx- prefix is added automatically.":"Das pbx- Präfix wird automatisch hinzugefügt.","Type class":"Klasse eingeben",Add:Qu,"Inline Styles":"Inline-Stile","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Dies sind die vom Builder angewendeten Inline-Stile. Fügen Sie Ihre eigenen Stile hinzu und drücken Sie die Eingabetaste, um sie auf das ausgewählte Element anzuwenden.","Add your own style.":"Fügen Sie Ihren eigenen Stil hinzu.",property:Zu,value:$u,close:eg,Editing:tg,"Loading...":"Wird geladen...","Background Color":"Hintergrundfarbe","Text Color":"Textfarbe","Default black":"Standard Schwarz","Remove Component?":"Komponente entfernen?","Are you sure you want to remove this Component?":"Sind Sie sicher, dass Sie diese Komponente entfernen möchten?",Delete:rg,"Add to the bottom":"Zum Ende hinzufügen",Preview:og,Mobile:ng,"Demo Content":"Demo-Inhalt","Demo Description":"Entdecken Sie den leichten und kostenlosen Vue Click & Drop Page Builder. Erstellen und verbessern Sie digitale Erlebnisse mühelos mit Vue. Nicht alles, was leistungsstark ist, muss komplex sein. Dieser minimalistische und leichte Page Builder bietet eine elegante, intuitive Oberfläche, die auf Einfachheit und Geschwindigkeit ausgelegt ist. Erstellen Sie vollständig responsive Seiten wie Listen, Jobbörsen oder Blogbeiträge – und verwalten Sie Ihre Inhalte mühelos mit dem kostenlosen Click & Drop Page Builder.","Demo Description Two":"Ein Seiten-Builder, der für Wachstum entwickelt wurde. Erstellen Sie Ihre Website-Seiten mit vorgefertigten Komponenten, die vollständig anpassbar und immer reaktionsschnell sind, um alle Anforderungen zu erfüllen. Ein leistungsstarker Seiten-Builder für wachsende Händler, Marken und Agenturen.","Demo Description Three":"Der Website-Builder, den Designer lieben. Entwerfen, prüfen und passen Sie Layouts für jede Bildschirmgröße einfach an. Sauber. Schnell. Intuitiv. Nicht alles, was leistungsstark ist, muss kompliziert aussehen.","Demo Description Four":"Stellen Sie sicher, dass Ihre Website auf allen Geräten gut aussieht. Bearbeiten Sie Textinhalte live und in Echtzeit. Wählen Sie die perfekten Schriftarten, die zu Ihrem Stil passen. Experimentieren Sie selbstbewusst mit der Möglichkeit, Änderungen rückgängig zu machen. Stile mit Präfix. Kein Risiko von Stilkonflikten zwischen dem Builder und Ihrer App.","Demo Title":"Der Web-Builder für atemberaubende Seiten","Demo Title Two":"Veröffentlichen Sie es einfach mit Vue","Demo Title Three":"Responsive Bearbeitung","Edit text and links":"Text und Links bearbeiten","Enter URL":"URL eingeben","Line break":"Zeilenumbruch",Bold:ig,"Header 2":"Überschrift 2","Header 3":"Überschrift 3",List:ag,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Fügen Sie eine gültige URL hinzu, um den ausgewählten Text in einen anklickbaren Hyperlink zu verwandeln, der Benutzer zur angegebenen Webadresse führt.","Select image":"Bild auswählen","Manage Content":"Inhalte verwalten","Media Library":"Medienbibliothek","Reset changes":"Änderungen zurücksetzen","Do you want to reset this page?":"Möchten Sie diese Seite zurücksetzen?","Are you sure you want to reset this page? This will overwrite your current changes.":"Sind Sie sicher, dass Sie diese Seite zurücksetzen möchten? Dadurch werden Ihre aktuellen Änderungen überschrieben.",Search:sg,"Search...":"Suchen...",Landscape:lg,Portrait:pg,Squarish:dg,"Total pages":"Gesamtseiten",Images:cg,"First page":"Erste Seite",Prev:mg,Next:bg,"By:":"Von:","We did not find any images. Make a new search.":"Wir haben keine Bilder gefunden. Machen Sie eine neue Suche.","No results on current page. Navigate to First Page.":"Keine Ergebnisse auf der aktuellen Seite. Zur ersten Seite navigieren.",Information:ug,"From:":"Von:"," Select image":" Bild auswählen","Layouts and visual.":"Layouts und visuell.","Start customizing by editing this default text directly in the editor.":"Beginnen Sie mit der Anpassung, indem Sie diesen Standardtext direkt im Editor bearbeiten.","Single Image":"Einzelnes Bild","Two Vertical Images":"Zwei vertikale Bilder","Two Square Images":"Zwei quadratische Bilder","Three Square Images":"Drei quadratische Bilder","Six Square Images Grid":"Sechs quadratische Bilder im Raster","Three Square Images With Text":"Drei quadratische Bilder mit Text","Three Vertical Images":"Zwei quadratische Bilder mit Text",Text:gg,"Header H2":"Überschrift H2","Header H3":"Überschrift H3","YouTube Video":"YouTube-Video","Break Divider":"Trennlinie",Link:xg,"Selected HTML":"Ausgewähltes HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Übersicht über ausgewähltes Element, Komponente und Komponenten. Dieser Abschnitt bietet Echtzeit-Updates basierend auf Ihrer HTML-Auswahl.",Types:fg,"Element type:":"Elementtyp:","Component type:":"Komponententyp:","Components:":"Komponenten:",array:hg,Content:yg,Element:wg,Component:vg,"Components added":"Komponenten hinzugefügt","No Element selected":"Kein Element ausgewählt","Selected HTML:":"Ausgewähltes HTML:","Element src:":"Elementquelle:","Element classes:":"Elementklassen:","No Component selected":"Keine Komponente ausgewählt","ID:":"ID:","Title:":"Titel:","HTML Code:":"HTML-Code:","No Components added yet":"Noch keine Komponenten hinzugefügt",All:kg,Image:Sg,"Image & Text":"Bild & Text","Four Square Images With Text":"Vier quadratische Bilder mit Text","Four Square Images":"Vier quadratische Bilder","Continue Your Work?":"Möchten Sie Ihre Arbeit fortsetzen?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Wir haben festgestellt, dass Sie beim letzten Mal einige Änderungen nicht gespeichert haben. Möchten Sie dort weitermachen, wo Sie aufgehört haben, oder die aktuell aus der Datenbank geladene Version verwenden?","Use Saved Version":"Gespeicherte Version verwenden","Continue Where I Left Off":"Dort weitermachen, wo ich aufgehört habe","HTML Editor":"HTML-Editor","Gain full control over components by editing the raw HTML.":"Erhalten Sie die vollständige Kontrolle über Komponenten, indem Sie das reine HTML bearbeiten.","Large Screens Only":"Nur große Bildschirme"},property:Zu,value:$u},Symbol.toStringTag,{value:"Module"})),Cg="Save",Eg="Options",Tg="avatar",Mg="Publish",Bg="component",Ng="Styles",Pg="Typographies",Dg="Select",Lg="Padding",Ag="Margin",Og="Global",Vg="Specific",Ig="Border",_g="Transparent",Rg="Add",Hg="property",zg="value",Fg="Close",jg="Editing",qg="Delete",Wg="Preview",Ug="Mobile",Gg="Bold",Kg="Link",Jg="List",Yg="Search",Xg="Landscape",Qg="Portrait",Zg="Squarish",$g="Images",ex="Prev",tx="Next",rx="Information",ox="Text",nx="Types",ix="array",ax="Content",sx="Element",lx="Component",px="All",dx="Image",xD=Object.freeze(Object.defineProperty({__proto__:null,Add:Rg,All:px,Bold:Gg,Border:Ig,Close:Fg,Component:lx,Content:ax,Delete:qg,Editing:jg,Element:sx,Global:Og,Image:dx,Images:$g,Information:rx,Landscape:Xg,Link:Kg,List:Jg,Margin:Ag,Mobile:Ug,Next:tx,Options:Eg,Padding:Lg,Portrait:Qg,Prev:ex,Preview:Wg,Publish:Mg,Save:Cg,Search:Yg,Select:Dg,Specific:Vg,Squarish:Zg,Styles:Ng,Text:ox,Transparent:_g,Types:nx,Typographies:Pg,array:ix,avatar:Tg,component:Bg,default:{"Reset Page":"Reset Page","Global Page Styles":"Global Page Styles","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.","Everything you need. Break free from design limitations":"Everything you need. Break free from design limitations","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Bring your vision to life and create impressive pages using a click & drop Page Builder","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via",Save:Cg,"Add new Components":"Add new Components",Options:Eg,"Config Overview":"Config Overview","HTML Overview":"HTML Overview","Delete Layout":"Delete Layout",avatar:Tg,Publish:Mg,"Add Components to Page":"Add Components to Page","Helper Components":"Helper Components","Click to add":"Click to add",component:Bg,"Layout Components":"Layout Components","Click to add component":"Click to add component","Remove all Components":"Remove all Components","Are you sure you want to remove all Components?":"Are you sure you want to remove all Components?",Styles:Ng,Typographies:Pg,"Font Appearance":"Font Appearance","Font Size":"Font Size",Select:Dg,"Font size":"Font size","Font tablet size":"Font tablet size","Font small screens":"Font small screens","Font weight":"Font weight","Font family":"Font family","Font Style":"Font Style","Opacity & Transparency":"Opacity & Transparency",Padding:Lg,"Vertical Padding":"Vertical Padding","Horizontal Padding":"Horizontal Padding",Margin:Ag,"Vertical Margin":"Vertical Margin","Horizontal Margin":"Horizontal Margin","Border Radius":"Border Radius",Global:Og,Specific:Vg,"Border Radius top left":"Border Radius top left","Border Radius top right":"Border Radius top right","Border Radius bottom left":"Border Radius bottom left","Border Radius bottom right":"Border Radius bottom right","Border Style, Width & Color":"Border Style, Width & Color",Border:Ig,"Border Style":"Border Style","Border Width":"Border Width","Border Color":"Border Color",Transparent:_g,"Generated CSS":"Generated CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.","Add your CSS.":"Add your CSS.","The pbx- prefix is added automatically.":"The pbx- prefix is added automatically.","Type class":"Type class",Add:Rg,"Inline Styles":"Inline Styles","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.","Add your own style.":"Add your own style.",property:Hg,value:zg,Close:Fg,Editing:jg,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.","Update Page Styles":"Update Page Styles","Download HTML":"Download HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.","Download HTML file":"Download HTML file","Loading...":"Loading...","Background Color":"Background Color","Text Color":"Text Color","Default black":"Default black","Remove Component?":"Remove Component?","Are you sure you want to remove this Component?":"Are you sure you want to remove this Component?",Delete:qg,"Add to the bottom":"Add to the bottom",Preview:Wg,Mobile:Ug,"Demo Content":"Demo Content","Demo Title":"The web builder for stunning pages","Demo Title Two":"Just publish it with Vue","Demo Title Three":"Responsive Editing","Demo Description":"Introducing the Lightweight & Free Vue Click & Drop Page Builder Create and enhance digital experiences effortlessly with Vue. Not everything powerful needs to be complex. This minimalist and lightweight page builder offers an elegant, intuitive interface focused on simplicity and speed. Build fully responsive pages such as listings, job boards, or blog posts—and manage your content with ease using the free Click & Drop Page Builder.","Demo Description Two":"A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.","Demo Description Three":"The website builder loved by designers. Easily design, preview, and adjust layouts for every screen size. Clean. Fast. Intuitive. Not everything powerful has to look complicated.","Demo Description Four":"Ensure your site looks great on all devices. Edit text content live and in real-time. Choose the perfect fonts to match your style. Experiment confidently with the ability to revert changes. Styles Prefixed. No risk of style conflicts between the builder and your app.","Edit text and links":"Edit text and links","Enter URL":"Enter URL","Line break":"Line break",Bold:Gg,Link:Kg,"Header 2":"Header 2","Header 3":"Header 3",List:Jg,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.","Select image":"Select image","Manage Content":"Manage Content","Media Library":"Media Library","Reset changes":"Reset changes","Do you want to reset this page?":"Do you want to reset this page?","Are you sure you want to reset this page? This will overwrite your current changes.":"Are you sure you want to reset this page? This will overwrite your current changes.",Search:Yg,"Search...":"Search...",Landscape:Xg,Portrait:Qg,Squarish:Zg,"Total pages":"Total pages",Images:$g,"First page":"First page",Prev:ex,Next:tx,"By:":"By:","We did not find any images. Make a new search.":"We did not find any images. Make a new search.","No results on current page. Navigate to First Page.":"No results on current page. Navigate to First Page.",Information:rx,"From:":"From:"," Select image":" Select image","Layouts and visual.":"Layouts and visual.","Start customizing by editing this default text directly in the editor.":"Start customizing by editing this default text directly in the editor.","Single Image":"Single Image","Two Vertical Images":"Two Vertical Images","Two Square Images":"Two Square Images","Two Square Images With Text":"Two Square Images With Text","Three Square Images":"Three Square Images","Six Square Images Grid":"Six Square Images Grid","Four Square Images With Text":"Four Square Images With Text","Three Square Images With Text":"Three Square Images With Text","Three Vertical Images":"Three Vertical Images",Text:ox,"Header H2":"Header H2","Header H3":"Header H3","YouTube Video":"YouTube Video","Break Divider":"Break Divider","Selected HTML":"Selected HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.",Types:nx,"Element type:":"Element type:","Component type:":"Component type:","Components:":"Components:",array:ix,Content:ax,Element:sx,Component:lx,"Components added":"Components added","No Element selected":"No Element selected","Selected HTML:":"Selected HTML:","Element src:":"Element src:","Element classes:":"Element classes:","No Component selected":"No Component selected","ID:":"ID:","Title:":"Title:","HTML Code:":"HTML Code:","No Components added yet":"No Components added yet",All:px,Image:dx,"Image & Text":"Image & Text","Four Square Images":"Four Square Images","Continue Your Work?":"Continue Your Work?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?","Use Saved Version":"Use Saved Version","Continue Where I Left Off":"Continue Where I Left Off","HTML Editor":"HTML Editor","Gain full control over components by editing the raw HTML.":"Gain full control over components by editing the raw HTML.","Large Screens Only":"Large Screens Only"},property:Hg,value:zg},Symbol.toStringTag,{value:"Module"})),cx="Guardar",mx="Opciones",bx="avatar",ux="Publicar",gx="Cerrar",xx="componente",fx="Estilos",hx="Tipografías",yx="Seleccionar",wx="Relleno",vx="Margen",kx="Global",Sx="Específico",Cx="Borde",Ex="Transparente",Tx="Agregar",Mx="propiedad",Bx="valor",Nx="Editando",Px="Eliminar",Dx="Vista previa",Lx="Móvil",Ax="Negrita",Ox="Lista",Vx="Buscar",Ix="Horizontal",_x="Vertical",Rx="Cuadrado",Hx="Imágenes",zx="Anterior",Fx="Siguiente",jx="Información",qx="Texto",Wx="Enlace",Ux="Tipos",Gx="matriz",Kx="Contenido",Jx="Elemento",Yx="Componente",Xx="Todos",Qx="Imagen",fD=Object.freeze(Object.defineProperty({__proto__:null,Add:Tx,All:Xx,Bold:Ax,Border:Cx,Close:gx,Component:Yx,Content:Kx,Delete:Px,Editing:Nx,Element:Jx,Global:kx,Image:Qx,Images:Hx,Information:jx,Landscape:Ix,Link:Wx,List:Ox,Margin:vx,Mobile:Lx,Next:Fx,Options:mx,Padding:wx,Portrait:_x,Prev:zx,Preview:Dx,Publish:ux,Save:cx,Search:Vx,Select:yx,Specific:Sx,Squarish:Rx,Styles:fx,Text:qx,Transparent:Ex,Types:Ux,Typographies:hx,array:Gx,avatar:bx,component:xx,default:{"Reset Page":"Restablecer página","Global Page Styles":"Estilos de página globales","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Pruebe el poderoso Click & Drop Page Builder, diseñado para desarrolladores y creadores que desean un control total sin complicaciones. Personalice diseños, fuentes y colores. Edite contenido visualmente en tiempo real. Agregue medios, incruste videos de YouTube o exporte todo como HTML limpio. Con edición receptiva, guardado automático local, soporte de Tailwind e incluso integración con Unsplash, es todo lo que necesita, envuelto en un constructor perfecto. Cree páginas impresionantes en minutos.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Un constructor de páginas diseñado para el crecimiento. Cree las páginas de su sitio web con componentes listos para usar que son totalmente personalizables y siempre receptivos, diseñados para satisfacer todas las necesidades. Un poderoso constructor de páginas para comerciantes, marcas y agencias en crecimiento.","Everything you need. Break free from design limitations":"Todo lo que necesitas. Libérate de las limitaciones de diseño","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Haz realidad tu visión y crea páginas impresionantes usando un constructor de páginas de arrastrar y soltar","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"El constructor web para páginas impresionantes. Permita a los usuarios diseñar y publicar páginas modernas a cualquier escala. Cree páginas receptivas como listados, trabajos o publicaciones de blog y gestione el contenido fácilmente utilizando el Page Builder gratuito de arrastrar y soltar. Desarrollado con TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS y HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Descargue o instale nuestro potente, flexible y fácil de usar constructor de páginas Vue 3 gratuito a través de",Save:cx,"Add new Components":"Agregar nuevos componentes",Options:mx,"Config Overview":"Resumen de configuración","HTML Overview":"Resumen de HTML","Delete Layout":"Eliminar diseño",avatar:bx,Publish:ux,"Add Components to Page":"Agregar componentes a la página",Close:gx,"Helper Components":"Componentes de ayuda","Click to add":"Haga clic para agregar",component:xx,"Layout Components":"Componentes de diseño","Click to add component":"Haga clic para agregar componente","Remove all Components":"Eliminar todos los componentes","Are you sure you want to remove all Components?":"¿Está seguro de que desea eliminar todos los componentes?",Styles:fx,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Aplicar estilos que afectan a toda la página. Estas configuraciones incluyen familia de fuentes global, color de texto, color de fondo y otros estilos universales que se aplican a todas las secciones.","Update Page Styles":"Actualizar estilos de página","Download HTML":"Descargar HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportar toda la página como un archivo HTML independiente. Esto incluye todas las secciones, contenido y estilos aplicados, haciéndolo listo para usar o integrar en otro lugar.","Download HTML file":"Descargar archivo HTML",Typographies:hx,"Font Appearance":"Apariencia de fuente","Font Size":"Tamaño de fuente",Select:yx,"Font size":"Tamaño de fuente","Font tablet size":"Tamaño de fuente para tabletas","Font small screens":"Tamaño de fuente para pantallas pequeñas","Font weight":"Peso de fuente","Font family":"Familia de fuente","Font Style":"Estilo de fuente","Opacity & Transparency":"Opacidad y Transparencia",Padding:wx,"Vertical Padding":"Relleno Vertical","Horizontal Padding":"Relleno Horizontal",Margin:vx,"Vertical Margin":"Margen Vertical","Horizontal Margin":"Margen Horizontal","Border Radius":"Radio del borde",Global:kx,Specific:Sx,"Border Radius top left":"Radio del borde superior izquierdo","Border Radius top right":"Radio del borde superior derecho","Border Radius bottom left":"Radio del borde inferior izquierdo","Border Radius bottom right":"Radio del borde inferior derecho","Border Style, Width & Color":"Estilo, ancho y color del borde",Border:Cx,"Border Style":"Estilo del borde","Border Width":"Ancho del borde","Border Color":"Color del borde",Transparent:Ex,"Generated CSS":"CSS Generado","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Este es el CSS aplicado por el constructor. Agregue su propio CSS y presione Enter para aplicarlo al elemento seleccionado.","Add your CSS.":"Agregue su CSS.","The pbx- prefix is added automatically.":"El prefijo pbx- se agrega automáticamente.","Type class":"Escriba clase",Add:Tx,"Inline Styles":"Estilos en línea","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Estos son los estilos en línea aplicados por el constructor. Agregue sus propios estilos y presione Enter para aplicarlos al elemento seleccionado.","Add your own style.":"Agregue su propio estilo.",property:Mx,value:Bx,Editing:Nx,"Loading...":"Cargando...","Background Color":"Color de fondo","Text Color":"Color de texto","Default black":"Negro predeterminado","Remove Component?":"¿Eliminar componente?","Are you sure you want to remove this Component?":"¿Estás seguro de que deseas eliminar este componente?",Delete:Px,"Add to the bottom":"Agregar al final",Preview:Dx,Mobile:Lx,"Demo Content":"Contenido de demostración","Demo Description":"Descubra el constructor de páginas ligero y gratuito Vue Click & Drop. Cree y mejore experiencias digitales sin esfuerzo con Vue. No todo lo poderoso tiene que ser complejo. Este constructor de páginas minimalista y ligero ofrece una interfaz elegante e intuitiva centrada en la simplicidad y la velocidad. Cree páginas completamente receptivas como listados, tableros de trabajo o publicaciones de blog, y gestione su contenido fácilmente con el constructor de páginas gratuito Click & Drop.","Demo Description Two":"Un constructor de páginas diseñado para el crecimiento. Cree las páginas de su sitio web con componentes listos para usar que son totalmente personalizables y siempre receptivos, diseñados para satisfacer todas las necesidades. Un poderoso constructor de páginas para comerciantes, marcas и agencias en crecimiento.","Demo Description Three":"El constructor de sitios web amado por los diseñadores. Diseñe, obtenga una vista previa y ajuste fácilmente los diseños para cada tamaño de pantalla. Limpio. Rápido. Intuitivo. No todo lo poderoso tiene que parecer complicado.","Demo Description Four":"Asegúrese de que su sitio se vea genial en todos los dispositivos. Edite el contenido de texto en vivo y en tiempo real. Elija las fuentes perfectas que coincidan con su estilo. Experimente con confianza con la capacidad de revertir los cambios. Estilos con prefijo. No hay riesgo de conflictos de estilo entre el constructor y su aplicación.","Demo Title":"El constructor web para páginas impresionantes","Demo Title Two":"Simplemente publícalo con Vue","Demo Title Three":"Edición receptiva","Edit text and links":"Editar texto y enlaces","Enter URL":"Introducir URL","Line break":"Salto de línea",Bold:Ax,"Header 2":"Encabezado 2","Header 3":"Encabezado 3",List:Ox,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Agregue una URL válida para transformar el texto seleccionado en un hipervínculo clicable que dirija a los usuarios a la dirección web especificada.","Select image":"Seleccionar imagen","Manage Content":"Gestionar contenido","Media Library":"Biblioteca de medios","Reset changes":"Restablecer cambios","Do you want to reset this page?":"¿Quieres restablecer esta página?","Are you sure you want to reset this page? This will overwrite your current changes.":"¿Estás seguro de que deseas restablecer esta página? Esto sobrescribirá tus cambios actuales.",Search:Vx,"Search...":"Buscar...",Landscape:Ix,Portrait:_x,Squarish:Rx,"Total pages":"Páginas totales",Images:Hx,"First page":"Primera página",Prev:zx,Next:Fx,"By:":"Por:","We did not find any images. Make a new search.":"No encontramos imágenes. Realiza una nueva búsqueda.","No results on current page. Navigate to First Page.":"No hay resultados en la página actual. Navega a la primera página.",Information:jx,"From:":"De:"," Select image":" Seleccionar imagen","Layouts and visual.":"Diseños y visuales.","Start customizing by editing this default text directly in the editor.":"Comience a personalizar editando este texto predeterminado directamente en el editor.","Single Image":"Imagen única","Two Vertical Images":"Dos imágenes verticales","Two Square Images":"Dos imágenes cuadradas","Three Square Images":"Tres imágenes cuadradas","Six Square Images Grid":"Cuadrícula de seis imágenes cuadradas","Three Square Images With Text":"Tres imágenes cuadradas con texto","Two Square Images With Text":"Dos imágenes cuadradas con texto","Three Vertical Images":"Dos imágenes cuadradas con texto",Text:qx,"Header H2":"Encabezado H2","Header H3":"Encabezado H3","YouTube Video":"Video de YouTube","Break Divider":"Divisor",Link:Wx,"Selected HTML":"HTML seleccionado","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Descripción general del elemento seleccionado, componente y componentes. Esta sección proporciona actualizaciones en tiempo real basadas en su selección de HTML.",Types:Ux,"Element type:":"Tipo de elemento:","Component type:":"Tipo de componente:","Components:":"Componentes:",array:Gx,Content:Kx,Element:Jx,Component:Yx,"Components added":"Componentes añadidos","No Element selected":"Ningún elemento seleccionado","Selected HTML:":"HTML seleccionado:","Element src:":"Fuente del elemento:","Element classes:":"Clases de elemento:","No Component selected":"Ningún componente seleccionado","ID:":"ID:","Title:":"Título:","HTML Code:":"Código HTML:","No Components added yet":"Aún no se han añadido componentes",All:Xx,Image:Qx,"Image & Text":"Imagen y texto","Four Square Images With Text":"Cuatro imágenes cuadradas con texto","Four Square Images":"Cuatro imágenes cuadradas","Continue Your Work?":"¿Desea continuar su trabajo?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Notamos que tiene algunos cambios que no se guardaron la última vez. ¿Le gustaría continuar donde lo dejó o usar la versión que está cargada actualmente desde la base de datos?","Use Saved Version":"Usar la versión guardada","Continue Where I Left Off":"Continuar donde lo dejé","HTML Editor":"Editor HTML","Gain full control over components by editing the raw HTML.":"Obtenga control total sobre los componentes editando el HTML sin formato.","Large Screens Only":"Solo pantallas grandes"},property:Mx,value:Bx},Symbol.toStringTag,{value:"Module"})),Zx="Enregistrer",$x="Options",ef="avatar",tf="Publier",rf="Fermer",of="composant",nf="Styles",af="Typographies",sf="Sélectionner",lf="Marge intérieure",pf="Marge",df="Global",cf="Spécifique",mf="Bordure",bf="Transparent",uf="Ajouter",gf="propriété",xf="valeur",ff="Édition",hf="Supprimer",yf="Aperçu",wf="Mobile",vf="Gras",kf="Liste",Sf="Rechercher",Cf="Paysage",Ef="Portrait",Tf="Carré",Mf="Images",Bf="Précédent",Nf="Suivant",Pf="Information",Df="Texte",Lf="Lien",Af="Types",Of="tableau",Vf="Contenu",If="Élément",_f="Composant",Rf="Tous",Hf="Image",hD=Object.freeze(Object.defineProperty({__proto__:null,Add:uf,All:Rf,Bold:vf,Border:mf,Close:rf,Component:_f,Content:Vf,Delete:hf,Editing:ff,Element:If,Global:df,Image:Hf,Images:Mf,Information:Pf,Landscape:Cf,Link:Lf,List:kf,Margin:pf,Mobile:wf,Next:Nf,Options:$x,Padding:lf,Portrait:Ef,Prev:Bf,Preview:yf,Publish:tf,Save:Zx,Search:Sf,Select:sf,Specific:cf,Squarish:Tf,Styles:nf,Text:Df,Transparent:bf,Types:Af,Typographies:af,array:Of,avatar:ef,component:of,default:{"Reset Page":"Réinitialiser la page","Global Page Styles":"Styles de page globaux","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Essayez le puissant Click & Drop Page Builder, conçu pour les développeurs et les créateurs qui souhaitent un contrôle total sans tracas. Personnalisez les mises en page, les polices et les couleurs. Modifiez le contenu visuellement en temps réel. Ajoutez des médias, intégrez des vidéos YouTube ou exportez tout en HTML propre. Avec l'édition réactive, la sauvegarde automatique locale, la prise en charge de Tailwind et même l'intégration Unsplash, c'est tout ce dont vous avez besoin, enveloppé dans un seul constructeur transparent. Créez des pages impressionnantes en quelques minutes.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Un constructeur de pages conçu pour la croissance. Créez les pages de votre site Web avec des composants prêts à l'emploi qui sont entièrement personnalisables et toujours réactifs, conçus pour répondre à tous les besoins. Un puissant constructeur de pages pour les commerçants, les marques et les agences en pleine croissance.","Everything you need. Break free from design limitations":"Tout ce dont vous avez besoin. Libérez-vous des limitations de conception","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Donnez vie à votre vision et créez des pages impressionnantes à l'aide d'un constructeur de pages par glisser-déposer","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Le constructeur web pour des pages époustouflantes. Permettez aux utilisateurs de concevoir et de publier des pages modernes à n'importe quelle échelle. Créez des pages réactives comme des listes, des emplois ou des articles de blog et gérez facilement le contenu en utilisant le Page Builder gratuit de glisser-déposer. Développé avec TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS et HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Téléchargez ou installez notre puissant, flexible et facile à utiliser constructeur de pages Vue 3 gratuit via",Save:Zx,"Add new Components":"Ajouter de nouveaux composants",Options:$x,"Config Overview":"Aperçu de la configuration","HTML Overview":"Aperçu HTML","Delete Layout":"Supprimer la mise en page",avatar:ef,Publish:tf,"Add Components to Page":"Ajouter des composants à la page",Close:rf,"Helper Components":"Composants d'aide","Click to add":"Cliquez pour ajouter",component:of,"Layout Components":"Composants de mise en page","Click to add component":"Cliquez pour ajouter un composant","Remove all Components":"Supprimer tous les composants","Are you sure you want to remove all Components?":"Êtes-vous sûr de vouloir supprimer tous les composants ?",Styles:nf,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Appliquez des styles qui affectent toute la page. Ces paramètres incluent la famille de polices globale, la couleur du texte, la couleur de fond et d'autres styles universels qui s'appliquent à toutes les sections.","Update Page Styles":"Mettre à jour les styles de page","Download HTML":"Télécharger HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exportez toute la page en tant que fichier HTML autonome. Cela inclut toutes les sections, le contenu et les styles appliqués, ce qui le rend prêt à être utilisé ou intégré ailleurs.","Download HTML file":"Télécharger le fichier HTML",Typographies:af,"Font Appearance":"Apparence de la police","Font Size":"Taille de la police",Select:sf,"Font size":"Taille de la police","Font tablet size":"Taille de la police pour tablette","Font small screens":"Taille de la police pour petits écrans","Font weight":"Poids de la police","Font family":"Famille de police","Font Style":"Style de police","Opacity & Transparency":"Opacité et Transparence",Padding:lf,"Vertical Padding":"Marge intérieure verticale","Horizontal Padding":"Marge intérieure horizontale",Margin:pf,"Vertical Margin":"Marge verticale","Horizontal Margin":"Marge horizontale","Border Radius":"Rayon de bordure",Global:df,Specific:cf,"Border Radius top left":"Rayon de bordure en haut à gauche","Border Radius top right":"Rayon de bordure en haut à droite","Border Radius bottom left":"Rayon de bordure en bas à gauche","Border Radius bottom right":"Rayon de bordure en bas à droite","Border Style, Width & Color":"Style, largeur et couleur de la bordure",Border:mf,"Border Style":"Style de bordure","Border Width":"Largeur de bordure","Border Color":"Couleur de bordure",Transparent:bf,"Generated CSS":"CSS Généré","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Ceci est le CSS appliqué par le constructeur. Ajoutez votre propre CSS et appuyez sur Entrée pour l'appliquer à l'élément sélectionné.","Add your CSS.":"Ajoutez votre CSS.","The pbx- prefix is added automatically.":"Le préfixe pbx- est ajouté automatiquement.","Type class":"Tapez la classe",Add:uf,"Inline Styles":"Styles en ligne","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Ce sont les styles en ligne appliqués par le constructeur. Ajoutez vos propres styles et appuyez sur Entrée pour les appliquer à l'élément sélectionné.","Add your own style.":"Ajoutez votre propre style.",property:gf,value:xf,Editing:ff,"Loading...":"Chargement...","Background Color":"Couleur de fond","Text Color":"Couleur du texte","Default black":"Noir par défaut","Remove Component?":"Supprimer le composant ?","Are you sure you want to remove this Component?":"Êtes-vous sûr de vouloir supprimer ce composant ?",Delete:hf,"Add to the bottom":"Ajouter en bas",Preview:yf,Mobile:wf,"Demo Content":"Contenu de démonstration","Demo Description":"Découvrez le constructeur de pages léger et gratuit Vue Click & Drop. Créez et améliorez des expériences numériques sans effort avec Vue. Tout ce qui est puissant n'a pas besoin d'être complexe. Ce constructeur de pages minimaliste et léger offre une interface élégante et intuitive axée sur la simplicité et la rapidité. Créez des pages entièrement réactives telles que des listes, des tableaux d'offres d'emploi ou des articles de blog, et gérez votre contenu facilement avec le constructeur de pages gratuit Click & Drop.","Demo Description Two":"Un constructeur de pages conçu pour la croissance. Créez les pages de votre site Web avec des composants prêts à l'emploi qui sont entièrement personnalisables et toujours réactifs, conçus pour répondre à tous les besoins. Un puissant constructeur de pages pour les commerçants, les marques et les agences en pleine croissance.","Demo Description Three":"Le constructeur de sites Web adoré des designers. Concevez, prévisualisez et ajustez facilement les mises en page pour chaque taille d'écran. Propre. Rapide. Intuitif. Tout ce qui est puissant n'a pas à paraître compliqué.","Demo Description Four":"Assurez-vous que votre site est superbe sur tous les appareils. Modifiez le contenu textuel en direct et en temps réel. Choisissez les polices parfaites pour correspondre à votre style. Expérimentez en toute confiance avec la possibilité d'annuler les modifications. Styles préfixés. Aucun risque de conflits de style entre le constructeur et votre application.","Demo Title":"Le constructeur de sites Web pour des pages époustouflantes","Demo Title Two":"Publiez-le simplement avec Vue","Demo Title Three":"Édition réactive","Edit text and links":"Modifier le texte et les liens","Enter URL":"Entrer l'URL","Line break":"Saut de ligne",Bold:vf,"Header 2":"Titre 2","Header 3":"Titre 3",List:kf,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Ajoutez une URL valide pour transformer le texte sélectionné en un lien hypertexte cliquable qui dirige les utilisateurs vers l'adresse Web spécifiée.","Select image":"Sélectionner une image","Manage Content":"Gérer le contenu","Media Library":"Bibliothèque multimédia","Reset changes":"Réinitialiser les modifications","Do you want to reset this page?":"Voulez-vous réinitialiser cette page ?","Are you sure you want to reset this page? This will overwrite your current changes.":"Êtes-vous sûr de vouloir réinitialiser cette page ? Cela écrasera vos modifications actuelles.",Search:Sf,"Search...":"Rechercher...",Landscape:Cf,Portrait:Ef,Squarish:Tf,"Total pages":"Pages totales",Images:Mf,"First page":"Première page",Prev:Bf,Next:Nf,"By:":"Par:","We did not find any images. Make a new search.":"Nous n'avons trouvé aucune image. Faites une nouvelle recherche.","No results on current page. Navigate to First Page.":"Aucun résultat sur la page actuelle. Naviguez vers la première page.",Information:Pf,"From:":"De:"," Select image":" Sélectionner une image","Layouts and visual.":"Mises en page et visuel.","Start customizing by editing this default text directly in the editor.":"Commencez à personnaliser en modifiant ce texte par défaut directement dans l'éditeur.","Single Image":"Image unique","Two Vertical Images":"Deux images verticales","Two Square Images":"Deux images carrées","Three Square Images":"Trois images carrées","Six Square Images Grid":"Grille de six images carrées","Three Square Images With Text":"Trois images carrées avec texte","Two Square Images With Text":"Deux images carrées avec texte","Three Vertical Images":"Deux images carrées avec texte",Text:Df,"Header H2":"En-tête H2","Header H3":"En-tête H3","YouTube Video":"Vidéo YouTube","Break Divider":"Séparateur",Link:Lf,"Selected HTML":"HTML sélectionné","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Aperçu de l'élément sélectionné, du composant et des composants. Cette section fournit des mises à jour en temps réel en fonction de votre sélection HTML.",Types:Af,"Element type:":"Type d'élément:","Component type:":"Type de composant:","Components:":"Composants:",array:Of,Content:Vf,Element:If,Component:_f,"Components added":"Composants ajoutés","No Element selected":"Aucun élément sélectionné","Selected HTML:":"HTML sélectionné:","Element src:":"Source de l'élément:","Element classes:":"Classes d'élément:","No Component selected":"Aucun composant sélectionné","ID:":"ID:","Title:":"Titre:","HTML Code:":"Code HTML:","No Components added yet":"Aucun composant ajouté pour le moment",All:Rf,Image:Hf,"Image & Text":"Image et texte","Four Square Images With Text":"Quatre images carrées avec texte","Four Square Images":"Quatre images carrées","Continue Your Work?":"Continuer votre travail ?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Nous avons remarqué que vous avez des modifications qui n'ont pas été enregistrées la dernière fois. Souhaitez-vous reprendre là où vous vous êtes arrêté, ou utiliser la version actuellement chargée depuis la base de données ?","Use Saved Version":"Utiliser la version enregistrée","Continue Where I Left Off":"Continuer là où je me suis arrêté","HTML Editor":"Éditeur HTML","Gain full control over components by editing the raw HTML.":"Obtenez un contrôle total sur les composants en modifiant le code HTML brut.","Large Screens Only":"Grands écrans uniquement"},property:gf,value:xf},Symbol.toStringTag,{value:"Module"})),zf="सहेजें",Ff="विकल्प",jf="अवतार",qf="प्रकाशित करें",Wf="बंद करें",Uf="घटक",Gf="शैलियाँ",Kf="टाइपोग्राफ़ी",Jf="चुनें",Yf="पैडिंग",Xf="मार्जिन",Qf="वैश्विक",Zf="विशिष्ट",$f="बॉर्डर",eh="पारदर्शी",th="जोड़ें",rh="गुण",oh="मूल्य",nh="संपादन",ih="हटाएं",ah="पूर्वावलोकन",sh="मोबाइल",lh="बोल्ड",ph="सूची",dh="खोजें",ch="लैंडस्केप",mh="पोर्ट्रेट",bh="चौकोर",uh="छवियां",gh="पिछला",xh="अगला",fh="जानकारी",hh="पाठ",yh="लिंक",wh="प्रकार",vh="सरणी",kh="सामग्री",Sh="तत्व",Ch="घटक",Eh="सभी",Th="छवि",yD=Object.freeze(Object.defineProperty({__proto__:null,Add:th,All:Eh,Bold:lh,Border:$f,Close:Wf,Component:Ch,Content:kh,Delete:ih,Editing:nh,Element:Sh,Global:Qf,Image:Th,Images:uh,Information:fh,Landscape:ch,Link:yh,List:ph,Margin:Xf,Mobile:sh,Next:xh,Options:Ff,Padding:Yf,Portrait:mh,Prev:gh,Preview:ah,Publish:qf,Save:zf,Search:dh,Select:Jf,Specific:Zf,Squarish:bh,Styles:Gf,Text:hh,Transparent:eh,Types:wh,Typographies:Kf,array:vh,avatar:jf,component:Uf,default:{"Reset Page":"पृष्ठ रीसेट करें","Global Page Styles":"वैश्विक पृष्ठ शैलियाँ","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"पावरफुल Click & Drop Page Builder आज़माएं—डेवलपर्स और क्रिएटर्स के लिए डिज़ाइन किया गया जो बिना किसी परेशानी के पूर्ण नियंत्रण चाहते हैं। लेआउट, फोंट और रंगों को कस्टमाइज़ करें। सामग्री को वास्तविक समय में विज़ुअली संपादित करें। मीडिया जोड़ें, YouTube वीडियो एम्बेड करें, या सब कुछ साफ HTML के रूप में निर्यात करें। उत्तरदायी संपादन, स्थानीय ऑटो-सेव, टेलविंड समर्थन, और यहां तक कि Unsplash एकीकरण के साथ, यह सब कुछ है जिसकी आपको आवश्यकता है—एक सहज बिल्डर में लपेटा गया। मिनटों में शानदार पेज बनाएं।","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"विकास के लिए डिज़ाइन किया गया एक पेज बिल्डर। रेडीमेड घटकों के साथ अपनी वेबसाइट पेज बनाएं जो पूरी तरह से अनुकूलन योग्य और हमेशा उत्तरदायी हैं, हर आवश्यकता को पूरा करने के लिए डिज़ाइन किया गया है। बढ़ते व्यापारियों, ब्रांडों और एजेंसियों के लिए एक शक्तिशाली पेज बिल्डर।","Everything you need. Break free from design limitations":"आपको जो कुछ भी चाहिए। डिज़ाइन सीमाओं से मुक्त हों","Bring your vision to life and create impressive pages using a click & drop Page Builder":"अपनी दृष्टि को साकार करें और एक क्लिक और ड्रॉप पेज बिल्डर का उपयोग करके प्रभावशाली पृष्ठ बनाएं","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"शानदार पृष्ठों के लिए वेब बिल्डर। उपयोगकर्ताओं को किसी भी पैमाने पर आधुनिक पृष्ठों को डिज़ाइन और प्रकाशित करने में सक्षम बनाएं। लिस्टिंग, नौकरियों या ब्लॉग पोस्ट जैसे उत्तरदायी पृष्ठ बनाएं और मुफ्त क्लिक और ड्रॉप पेज बिल्डर का उपयोग करके सामग्री को आसानी से प्रबंधित करें। TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS और HTML के साथ विकसित।","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"हमारे शक्तिशाली, लचीले और उपयोग में आसान मुफ्त Vue 3 पेज बिल्डर को डाउनलोड या इंस्टॉल करें",Save:zf,"Add new Components":"नए घटक जोड़ें",Options:Ff,"Config Overview":"कॉन्फ़िगरेशन अवलोकन","HTML Overview":"HTML अवलोकन","Delete Layout":"लेआउट हटाएं",avatar:jf,Publish:qf,"Add Components to Page":"पृष्ठ में घटक जोड़ें",Close:Wf,"Helper Components":"सहायक घटक","Click to add":"जोड़ने के लिए क्लिक करें",component:Uf,"Layout Components":"लेआउट घटक","Click to add component":"घटक जोड़ने के लिए क्लिक करें","Remove all Components":"सभी घटकों को हटाएं","Are you sure you want to remove all Components?":"क्या आप वाकई सभी घटकों को हटाना चाहते हैं?",Styles:Gf,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"ऐसे शैलियाँ लागू करें जो पूरे पृष्ठ को प्रभावित करती हैं। इन सेटिंग्स में वैश्विक फ़ॉन्ट परिवार, पाठ का रंग, पृष्ठभूमि का रंग और अन्य सार्वभौमिक शैलियाँ शामिल हैं जो सभी अनुभागों पर लागू होती हैं।","Update Page Styles":"पृष्ठ शैलियाँ अपडेट करें","Download HTML":"HTML डाउनलोड करें","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"पूरे पृष्ठ को एक स्टैंडअलोन HTML फ़ाइल के रूप में निर्यात करें। इसमें सभी अनुभाग, सामग्री और लागू शैलियाँ शामिल हैं, जिससे यह उपयोग या अन्यत्र एकीकरण के लिए तैयार हो जाता है।","Download HTML file":"HTML फ़ाइल डाउनलोड करें",Typographies:Kf,"Font Appearance":"फ़ॉन्ट उपस्थिति","Font Size":"फ़ॉन्ट आकार",Select:Jf,"Font size":"फ़ॉन्ट आकार","Font tablet size":"टैबलेट के लिए फ़ॉन्ट आकार","Font small screens":"छोटी स्क्रीन के लिए फ़ॉन्ट आकार","Font weight":"फ़ॉन्ट वजन","Font family":"फ़ॉन्ट परिवार","Font Style":"फ़ॉन्ट शैली","Opacity & Transparency":"अस्पष्टता और पारदर्शिता",Padding:Yf,"Vertical Padding":"वर्टिकल पैडिंग","Horizontal Padding":"हॉरिजॉन्टल पैडिंग",Margin:Xf,"Vertical Margin":"वर्टिकल मार्जिन","Horizontal Margin":"हॉरिजॉन्टल मार्जिन","Border Radius":"बॉर्डर रेडियस",Global:Qf,Specific:Zf,"Border Radius top left":"बॉर्डर रेडियस ऊपर बायां","Border Radius top right":"बॉर्डर रेडियस ऊपर दायां","Border Radius bottom left":"बॉर्डर रेडियस नीचे बायां","Border Radius bottom right":"बॉर्डर रेडियस नीचे दायां","Border Style, Width & Color":"बॉर्डर शैली, चौड़ाई और रंग",Border:$f,"Border Style":"बॉर्डर शैली","Border Width":"बॉर्डर चौड़ाई","Border Color":"बॉर्डर रंग",Transparent:eh,"Generated CSS":"जनरेट किया गया CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"यह वह CSS है जिसे बिल्डर द्वारा लागू किया गया है। अपना CSS जोड़ें और इसे चयनित तत्व पर लागू करने के लिए Enter दबाएं।","Add your CSS.":"अपना CSS जोड़ें।","The pbx- prefix is added automatically.":"pbx- उपसर्ग स्वचालित रूप से जोड़ा जाता है।","Type class":"क्लास टाइप करें",Add:th,"Inline Styles":"इनलाइन शैलियाँ","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"ये बिल्डर द्वारा लागू की गई इनलाइन शैलियाँ हैं। अपनी खुद की शैलियाँ जोड़ें और चयनित तत्व पर लागू करने के लिए Enter दबाएं।","Add your own style.":"अपनी खुद की शैली जोड़ें।",property:rh,value:oh,Editing:nh,"Loading...":"लोड हो रहा है...","Background Color":"पृष्ठभूमि का रंग","Text Color":"पाठ का रंग","Default black":"डिफ़ॉल्ट काला","Remove Component?":"घटक हटाएं?","Are you sure you want to remove this Component?":"क्या आप वाकई इस घटक को हटाना चाहते हैं?",Delete:ih,"Add to the bottom":"नीचे जोड़ें",Preview:ah,Mobile:sh,"Demo Content":"डेमो सामग्री","Demo Description":"लाइटवेट और मुफ्त Vue Click & Drop पेज बिल्डर का परिचय। Vue के साथ डिजिटल अनुभवों को आसानी से बनाएं और बढ़ाएं। हर शक्तिशाली चीज़ को जटिल होने की आवश्यकता नहीं है। यह न्यूनतम और हल्का पेज बिल्डर एक सुरुचिपूर्ण, सहज इंटरफ़ेस प्रदान करता है जो सादगी और गति पर केंद्रित है। पूरी तरह से उत्तरदायी पृष्ठ बनाएं जैसे लिस्टिंग, जॉब बोर्ड, या ब्लॉग पोस्ट - और अपने सामग्री को आसानी से प्रबंधित करें मुफ्त Click & Drop पेज बिल्डर का उपयोग करके।","Demo Description Two":"विकास के लिए डिज़ाइन किया गया एक पेज बिल्डर। रेडीमेड घटकों के साथ अपनी वेबसाइट पेज बनाएं जो पूरी तरह से अनुकूलन योग्य और हमेशा उत्तरदायी हैं, हर आवश्यकता को पूरा करने के लिए डिज़ाइन किया गया है। बढ़ते व्यापारियों, ब्रांडों और एजेंसियों के लिए एक शक्तिशाली पेज बिल्डर।","Demo Description Three":"डिजाइनरों द्वारा पसंद किया जाने वाला वेबसाइट बिल्डर। हर स्क्रीन आकार के लिए आसानी से लेआउट डिजाइन, पूर्वावलोकन और समायोजित करें। स्वच्छ। तेज। सहज। हर शक्तिशाली चीज को जटिल दिखने की जरूरत नहीं है।","Demo Description Four":"सुनिश्चित करें कि आपकी साइट सभी उपकरणों पर बहुत अच्छी लगती है। पाठ्य सामग्री को लाइव और वास्तविक समय में संपादित करें। अपनी शैली से मेल खाने वाले सही फोंट चुनें। परिवर्तनों को वापस करने की क्षमता के साथ आत्मविश्वास से प्रयोग करें। शैलियाँ उपसर्ग। बिल्डर और आपके ऐप के बीच शैली संघर्ष का कोई खतरा नहीं है।","Demo Title":"शानदार पृष्ठों के लिए वेब बिल्डर","Demo Title Two":"बस इसे Vue के साथ प्रकाशित करें","Demo Title Three":"उत्तरदायी संपादन","Edit text and links":"पाठ और लिंक संपादित करें","Enter URL":"URL दर्ज करें","Line break":"लाइन ब्रेक",Bold:lh,"Header 2":"हेडर 2","Header 3":"हेडर 3",List:ph,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"चयनित पाठ को एक क्लिक करने योग्य हाइपरलिंक में बदलने के लिए एक मान्य URL जोड़ें जो उपयोगकर्ताओं को निर्दिष्ट वेब पते पर निर्देशित करता है।","Select image":"छवि चुनें","Manage Content":"सामग्री प्रबंधित करें","Media Library":"मीडिया लाइब्रेरी","Reset changes":"परिवर्तन रीसेट करें","Do you want to reset this page?":"क्या आप इस पृष्ठ को रीसेट करना चाहते हैं?","Are you sure you want to reset this page? This will overwrite your current changes.":"क्या आप वाकई इस पृष्ठ को रीसेट करना चाहते हैं? यह आपके वर्तमान परिवर्तनों को अधिलेखित कर देगा।",Search:dh,"Search...":"खोजें...",Landscape:ch,Portrait:mh,Squarish:bh,"Total pages":"कुल पृष्ठ",Images:uh,"First page":"पहला पृष्ठ",Prev:gh,Next:xh,"By:":"द्वारा:","We did not find any images. Make a new search.":"हमें कोई छवि नहीं मिली। एक नई खोज करें।","No results on current page. Navigate to First Page.":"वर्तमान पृष्ठ पर कोई परिणाम नहीं। पहले पृष्ठ पर जाएं।",Information:fh,"From:":"से:"," Select image":" छवि चुनें","Layouts and visual.":"लेआउट और दृश्य।","Start customizing by editing this default text directly in the editor.":"संपादक में इस डिफ़ॉल्ट पाठ को संपादित करके अनुकूलन शुरू करें।","Single Image":"एकल छवि","Two Vertical Images":"दो लंबवत छवियां","Two Square Images":"दो वर्ग छवियां","Three Square Images":"तीन वर्ग छवियां","Six Square Images Grid":"छह वर्ग छवियों की ग्रिड","Three Square Images With Text":"तीन वर्ग छवियां और पाठ","Three Vertical Images":"दो वर्ग छवियां और पाठ",Text:hh,"Header H2":"हेडर H2","Header H3":"हेडर H3","YouTube Video":"यूट्यूब वीडियो","Break Divider":"विभाजक",Link:yh,"Two Square Images With Text":"दो वर्ग छवियां और पाठ","Selected HTML":"चयनित HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"चयनित तत्व, घटक और घटकों का अवलोकन। यह अनुभाग आपके HTML चयन के आधार पर वास्तविक समय अपडेट प्रदान करता है।",Types:wh,"Element type:":"तत्व प्रकार:","Component type:":"घटक प्रकार:","Components:":"घटक:",array:vh,Content:kh,Element:Sh,Component:Ch,"Components added":"घटक जोड़े गए","No Element selected":"कोई तत्व चयनित नहीं","Selected HTML:":"चयनित HTML:","Element src:":"तत्व स्रोत:","Element classes:":"तत्व वर्ग:","No Component selected":"कोई घटक चयनित नहीं","ID:":"आईडी:","Title:":"शीर्षक:","HTML Code:":"HTML कोड:","No Components added yet":"अभी तक कोई घटक नहीं जोड़ा गया",All:Eh,Image:Th,"Image & Text":"छवि और पाठ","Four Square Images With Text":"चार वर्गाकार चित्र पाठ के साथ","Four Square Images":"चार वर्गाकार छवियाँ","Continue Your Work?":"अपना काम जारी रखें?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"हमने देखा कि आपके पास कुछ बदलाव हैं जो पिछली बार सहेजे नहीं गए थे। क्या आप वहीं से शुरू करना चाहेंगे जहां आपने छोड़ा था, या डेटाबेस से वर्तमान में लोड किए गए संस्करण का उपयोग करना चाहेंगे?","Use Saved Version":"सहेजा गया संस्करण उपयोग करें","Continue Where I Left Off":"वहीं से शुरु करो जहाँ मैने छोड़ा था","HTML Editor":"HTML संपादक","Gain full control over components by editing the raw HTML.":"कच्चे HTML को संपादित करके घटकों पर पूर्ण नियंत्रण प्राप्त करें।","Large Screens Only":"केवल बड़ी स्क्रीन"},property:rh,value:oh},Symbol.toStringTag,{value:"Module"})),Mh="保存",Bh="オプション",Nh="アバター",Ph="公開する",Dh="閉じる",Lh="コンポーネント",Ah="スタイル",Oh="タイポグラフィ",Vh="選択",Ih="パディング",_h="マージン",Rh="グローバル",Hh="特定",zh="ボーダー",Fh="透明",jh="追加",qh="プロパティ",Wh="値",Uh="編集",Gh="削除",Kh="プレビュー",Jh="モバイル",Yh="太字",Xh="リンク",Qh="リスト",Zh="検索",$h="横向き",ey="縦向き",ty="正方形",ry="画像",oy="前へ",ny="次へ",iy="情報",ay="テキスト",sy="タイプ",ly="配列",py="コンテンツ",dy="要素",cy="コンポーネント",my="すべて",by="画像",wD=Object.freeze(Object.defineProperty({__proto__:null,Add:jh,All:my,Bold:Yh,Border:zh,Close:Dh,Component:cy,Content:py,Delete:Gh,Editing:Uh,Element:dy,Global:Rh,Image:by,Images:ry,Information:iy,Landscape:$h,Link:Xh,List:Qh,Margin:_h,Mobile:Jh,Next:ny,Options:Bh,Padding:Ih,Portrait:ey,Prev:oy,Preview:Kh,Publish:Ph,Save:Mh,Search:Zh,Select:Vh,Specific:Hh,Squarish:ty,Styles:Ah,Text:ay,Transparent:Fh,Types:sy,Typographies:Oh,array:ly,avatar:Nh,component:Lh,default:{"Reset Page":"ページをリセット","Global Page Styles":"グローバルページスタイル","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"強力なClick & Drop Page Builderを試してみてください。開発者やクリエイター向けに設計されており、手間をかけずに完全なコントロールを実現します。レイアウト、フォント、色をカスタマイズします。リアルタイムで視覚的にコンテンツを編集します。メディアを追加し、YouTube動画を埋め込み、すべてをクリーンなHTMLとしてエクスポートします。レスポンシブ編集、ローカル自動保存、Tailwindサポート、さらにはUnsplash統合を備えた、必要なすべてが1つのシームレスなビルダーにまとめられています。数分で素晴らしいページを作成します。","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"成長のために設計されたページビルダー。完全にカスタマイズ可能で常に応答性があり、あらゆるニーズに対応するように設計された既製のコンポーネントを使用して、ウェブサイトのページを作成します。成長中の商人、ブランド、代理店のための強力なページビルダー。","Everything you need. Break free from design limitations":"必要なものはすべて揃っています。デザインの制約から解放されましょう","Bring your vision to life and create impressive pages using a click & drop Page Builder":"クリック&ドロップページビルダーを使用して、ビジョンを実現し、印象的なページを作成しましょう","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"素晴らしいページのためのウェブビルダー。ユーザーがあらゆる規模でモダンなページを設計および公開できるようにします。リスト、求人、またはブログ投稿のようなレスポンシブページを作成し、無料のクリック&ドロップページビルダーを使用してコンテンツを簡単に管理します。TypeScript、Vue 3、Composition API、Pinia、CSS、Tailwind CSS、およびHTMLで開発されました。","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"強力で柔軟性があり、使いやすい無料の Vue 3 ページビルダーをダウンロードまたはインストールしてください",Save:Mh,"Add new Components":"新しいコンポーネントを追加",Options:Bh,"Config Overview":"設定概要","HTML Overview":"HTML概要","Delete Layout":"レイアウトを削除",avatar:Nh,Publish:Ph,"Add Components to Page":"ページにコンポーネントを追加",Close:Dh,"Helper Components":"ヘルパーコンポーネント","Click to add":"追加するにはクリック",component:Lh,"Layout Components":"レイアウトコンポーネント","Click to add component":"コンポーネントを追加するにはクリック","Remove all Components":"すべてのコンポーネントを削除","Are you sure you want to remove all Components?":"すべてのコンポーネントを削除してもよろしいですか?",Styles:Ah,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"ページ全体に適用されるスタイルを適用します。これらの設定には、グローバルフォントファミリー、テキストカラー、背景色、その他すべてのセクションに適用されるユニバーサルスタイルが含まれます。","Update Page Styles":"ページスタイルを更新","Download HTML":"HTMLをダウンロード","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"ページ全体をスタンドアロンのHTMLファイルとしてエクスポートします。これには、すべてのセクション、コンテンツ、および適用されたスタイルが含まれ、他の場所での使用または統合の準備が整います。","Download HTML file":"HTMLファイルをダウンロード",Typographies:Oh,"Font Appearance":"フォントの外観","Font Size":"フォントサイズ",Select:Vh,"Font size":"フォントサイズ","Font tablet size":"タブレット用フォントサイズ","Font small screens":"小さい画面用フォントサイズ","Font weight":"フォントの太さ","Font family":"フォントファミリー","Font Style":"フォントスタイル","Opacity & Transparency":"不透明度と透明度",Padding:Ih,"Vertical Padding":"垂直パディング","Horizontal Padding":"水平パディング",Margin:_h,"Vertical Margin":"垂直マージン","Horizontal Margin":"水平マージン","Border Radius":"ボーダー半径",Global:Rh,Specific:Hh,"Border Radius top left":"ボーダー半径 左上","Border Radius top right":"ボーダー半径 右上","Border Radius bottom left":"ボーダー半径 左下","Border Radius bottom right":"ボーダー半径 右下","Border Style, Width & Color":"ボーダースタイル、幅、色",Border:zh,"Border Style":"ボーダースタイル","Border Width":"ボーダー幅","Border Color":"ボーダー色",Transparent:Fh,"Generated CSS":"生成されたCSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"これはビルダーによって適用されたCSSです。独自のCSSを追加し、Enterキーを押して選択した要素に適用します。","Add your CSS.":"CSSを追加してください。","The pbx- prefix is added automatically.":"pbx-プレフィックスは自動的に追加されます。","Type class":"クラスを入力",Add:jh,"Inline Styles":"インラインスタイル","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"これらはビルダーによって適用されるインラインスタイルです。独自のスタイルを追加し、Enterキーを押して選択した要素に適用します。","Add your own style.":"独自のスタイルを追加します。",property:qh,value:Wh,Editing:Uh,"Loading...":"読み込み中...","Background Color":"背景色","Text Color":"テキストの色","Default black":"デフォルトの黒","Remove Component?":"コンポーネントを削除しますか?","Are you sure you want to remove this Component?":"このコンポーネントを削除してもよろしいですか?",Delete:Gh,"Add to the bottom":"一番下に追加",Preview:Kh,Mobile:Jh,"Demo Content":"デモコンテンツ","Demo Description":"軽量で無料のVue Click & Dropページビルダーをご紹介します。Vueを使用してデジタル体験を簡単に作成および強化します。強力なものすべてが複雑である必要はありません。このミニマリストで軽量なページビルダーは、シンプルさとスピードに焦点を当てたエレガントで直感的なインターフェイスを提供します。リスト、求人ボード、またはブログ投稿など、完全にレスポンシブなページを作成し、無料のClick & Dropページビルダーを使用してコンテンツを簡単に管理します。","Demo Description Two":"成長のために設計されたページビルダー。完全にカスタマイズ可能で常に応答性があり、あらゆるニーズに対応するように設計された既製のコンポーネントを使用して、ウェブサイトのページを作成します。成長中の商人、ブランド、代理店のための強力なページビルダー。","Demo Description Three":"デザイナーに愛されるウェブサイトビルダー。あらゆる画面サイズに合わせてレイアウトを簡単にデザイン、プレビュー、調整できます。シンプルで使いやすく、高速で、直感的です。パワフルなデザインは必ずしも複雑に見えなくても構いません。","Demo Description Four":"すべてのデバイスでサイトが見栄えよく表示されるようにします。テキストコンテンツをライブおよびリアルタイムで編集します。あなたのスタイルに合った完璧なフォントを選択してください。変更を元に戻す機能で自信を持って実験してください。プレフィックス付きのスタイル。ビルダーとアプリの間でスタイルの競合のリスクはありません。","Demo Title":"素晴らしいページのためのウェブビルダー","Demo Title Two":"Vueで公開するだけ","Demo Title Three":"レスポンシブ編集","Edit text and links":"テキストとリンクを編集","Enter URL":"URLを入力","Line break":"改行",Bold:Yh,Link:Xh,"Header 2":"ヘッダー2","Header 3":"ヘッダー3",List:Qh,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"選択したテキストをクリック可能なハイパーリンクに変換するために有効なURLを追加してください。","Select image":"画像を選択","Manage Content":"コンテンツを管理する","Media Library":"メディアライブラリ","Reset changes":"変更をリセット","Do you want to reset this page?":"このページをリセットしますか?","Are you sure you want to reset this page? This will overwrite your current changes.":"このページをリセットしてもよろしいですか?これにより、現在の変更が上書きされます。",Search:Zh,"Search...":"検索...",Landscape:$h,Portrait:ey,Squarish:ty,"Total pages":"総ページ数",Images:ry,"First page":"最初のページ",Prev:oy,Next:ny,"By:":"作成者:","We did not find any images. Make a new search.":"画像が見つかりませんでした。新しい検索をしてください。","No results on current page. Navigate to First Page.":"現在のページに結果がありません。最初のページに移動してください。",Information:iy,"From:":"提供元:"," Select image":" 画像を選択","Layouts and visual.":"レイアウトとビジュアル。","Start customizing by editing this default text directly in the editor.":"エディターでこのデフォルトテキストを直接編集してカスタマイズを開始します。","Single Image":"単一画像","Two Vertical Images":"縦長の画像2枚","Two Square Images":"正方形の画像2枚","Three Square Images":"正方形の画像3枚","Six Square Images Grid":"正方形の画像6枚のグリッド","Three Square Images With Text":"テキスト付き正方形の画像3枚","Three Vertical Images":"テキスト付き正方形の画像2枚",Text:ay,"Header H2":"ヘッダー H2","Header H3":"ヘッダー H3","YouTube Video":"YouTube ビデオ","Break Divider":"区切り","Two Square Images With Text":"テキスト付き正方形の画像2枚","Selected HTML":"選択されたHTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"選択された要素、コンポーネント、およびコンポーネントの概要。このセクションは、HTML選択に基づいてリアルタイムの更新を提供します。",Types:sy,"Element type:":"要素タイプ:","Component type:":"コンポーネントタイプ:","Components:":"コンポーネント:",array:ly,Content:py,Element:dy,Component:cy,"Components added":"追加されたコンポーネント","No Element selected":"選択された要素はありません","Selected HTML:":"選択されたHTML:","Element src:":"要素ソース:","Element classes:":"要素クラス:","No Component selected":"選択されたコンポーネントはありません","ID:":"ID:","Title:":"タイトル:","HTML Code:":"HTMLコード:","No Components added yet":"まだコンポーネントが追加されていません",All:my,Image:by,"Image & Text":"画像とテキスト","Four Square Images With Text":"テキスト付きの4つの正方形の画像","Four Square Images":"4つの正方形の画像","Continue Your Work?":"作業を続行しますか?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"前回保存されなかった変更がいくつかあるようです。中断したところから再開しますか、それともデータベースから現在読み込まれているバージョンを使用しますか","Use Saved Version":"保存されたバージョンを使用","Continue Where I Left Off":"中断したところから続行","HTML Editor":"HTMLエディター","Gain full control over components by editing the raw HTML.":"生の HTML を編集することで、コンポーネントを完全に制御できます。","Large Screens Only":"大型スクリーンのみ"},property:qh,value:Wh},Symbol.toStringTag,{value:"Module"})),uy="Salvar",gy="Opções",xy="avatar",fy="Publicar",hy="Fechar",yy="componente",wy="Estilos",vy="Tipografias",ky="Selecionar",Sy="Preenchimento",Cy="Margem",Ey="Global",Ty="Específico",My="Borda",By="Transparente",Ny="Adicionar",Py="propriedade",Dy="valor",Ly="Editando",Ay="Excluir",Oy="Pré-visualização",Vy="Celular",Iy="Negrito",_y="Lista",Ry="Pesquisar",Hy="Paisagem",zy="Retrato",Fy="Quadrado",jy="Imagens",qy="Anterior",Wy="Próximo",Uy="Informação",Gy="Texto",Ky="Link",Jy="Tipos",Yy="array",Xy="Conteúdo",Qy="Elemento",Zy="Componente",$y="Todos",e0="Imagem",vD=Object.freeze(Object.defineProperty({__proto__:null,Add:Ny,All:$y,Bold:Iy,Border:My,Close:hy,Component:Zy,Content:Xy,Delete:Ay,Editing:Ly,Element:Qy,Global:Ey,Image:e0,Images:jy,Information:Uy,Landscape:Hy,Link:Ky,List:_y,Margin:Cy,Mobile:Vy,Next:Wy,Options:gy,Padding:Sy,Portrait:zy,Prev:qy,Preview:Oy,Publish:fy,Save:uy,Search:Ry,Select:ky,Specific:Ty,Squarish:Fy,Styles:wy,Text:Gy,Transparent:By,Types:Jy,Typographies:vy,array:Yy,avatar:xy,component:yy,default:{"Reset Page":"Redefinir página","Global Page Styles":"Estilos de página globais","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Experimente o poderoso Click & Drop Page Builder – projetado para desenvolvedores e criadores que desejam controle total sem complicações. Personalize layouts, fontes e cores. Edite conteúdo visualmente em tempo real. Adicione mídia, incorpore vídeos do YouTube ou exporte tudo como HTML limpo. Com edição responsiva, salvamento automático local, suporte ao Tailwind e até integração com o Unsplash, é tudo o que você precisa – envolvido em um único construtor perfeito. Crie páginas impressionantes em minutos.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Um construtor de páginas projetado para o crescimento. Crie as páginas do seu site com componentes prontos que são totalmente personalizáveis e sempre responsivos, projetados para atender a todas as necessidades. Um poderoso construtor de páginas para comerciantes, marcas e agências em crescimento.","Everything you need. Break free from design limitations":"Tudo o que você precisa. Liberte-se das limitações de design","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Dê vida à sua visão e crie páginas impressionantes usando um construtor de páginas de arrastar e soltar","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"O construtor da web para páginas impressionantes. Permita que os usuários projetem e publiquem páginas modernas em qualquer escala. Crie páginas responsivas como listas, empregos ou postagens de blog e gerencie o conteúdo facilmente usando o Page Builder gratuito de arrastar e soltar. Desenvolvido com TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS e HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Baixe ou instale nosso poderoso, flexível e fácil de usar construtor de páginas Vue 3 gratuito via",Save:uy,"Add new Components":"Adicionar novos componentes",Options:gy,"Config Overview":"Visão geral da configuração","HTML Overview":"Visão geral do HTML","Delete Layout":"Excluir layout",avatar:xy,Publish:fy,"Add Components to Page":"Adicionar componentes à página",Close:hy,"Helper Components":"Componentes de ajuda","Click to add":"Clique para adicionar",component:yy,"Layout Components":"Componentes de layout","Click to add component":"Clique para adicionar componente","Remove all Components":"Remover todos os componentes","Are you sure you want to remove all Components?":"Tem certeza de que deseja remover todos os componentes?",Styles:wy,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Aplicar estilos que afetam toda a página. Essas configurações incluem família de fontes global, cor do texto, cor de fundo e outros estilos universais que se aplicam a todas as seções.","Update Page Styles":"Atualizar estilos da página","Download HTML":"Baixar HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Exporte toda a página como um arquivo HTML independente. Isso inclui todas as seções, conteúdo e estilos aplicados, tornando-o pronto para uso ou integração em outro lugar.","Download HTML file":"Baixar arquivo HTML",Typographies:vy,"Font Appearance":"Aparência da fonte","Font Size":"Tamanho da fonte",Select:ky,"Font size":"Tamanho da fonte","Font tablet size":"Tamanho da fonte para tablets","Font small screens":"Tamanho da fonte para telas pequenas","Font weight":"Peso da fonte","Font family":"Família da fonte","Font Style":"Estilo da fonte","Opacity & Transparency":"Opacidade e Transparência",Padding:Sy,"Vertical Padding":"Preenchimento Vertical","Horizontal Padding":"Preenchimento Horizontal",Margin:Cy,"Vertical Margin":"Margem Vertical","Horizontal Margin":"Margem Horizontal","Border Radius":"Raio da borda",Global:Ey,Specific:Ty,"Border Radius top left":"Raio da borda superior esquerda","Border Radius top right":"Raio da borda superior direita","Border Radius bottom left":"Raio da borda inferior esquerda","Border Radius bottom right":"Raio da borda inferior direita","Border Style, Width & Color":"Estilo, largura e cor da borda",Border:My,"Border Style":"Estilo da borda","Border Width":"Largura da borda","Border Color":"Cor da borda",Transparent:By,"Generated CSS":"CSS Gerado","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Este é o CSS aplicado pelo construtor. Adicione seu próprio CSS e pressione Enter para aplicá-lo ao elemento selecionado.","Add your CSS.":"Adicione seu CSS.","The pbx- prefix is added automatically.":"O prefixo pbx- é adicionado automaticamente.","Type class":"Digite a classe",Add:Ny,"Inline Styles":"Estilos Inline","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Estes são os estilos inline aplicados pelo construtor. Adicione seus próprios estilos e pressione Enter para aplicá-los ao elemento selecionado.","Add your own style.":"Adicione seu próprio estilo.",property:Py,value:Dy,Editing:Ly,"Loading...":"Carregando...","Background Color":"Cor de fundo","Text Color":"Cor do texto","Default black":"Preto padrão","Remove Component?":"Remover componente?","Are you sure you want to remove this Component?":"Tem certeza de que deseja remover este componente?",Delete:Ay,"Add to the bottom":"Adicionar ao final",Preview:Oy,Mobile:Vy,"Demo Content":"Conteúdo de demonstração","Demo Description":"Apresentando o construtor de páginas leve e gratuito Vue Click & Drop. Crie e melhore experiências digitais sem esforço com Vue. Nem tudo que é poderoso precisa ser complexo. Este construtor de páginas minimalista e leve oferece uma interface elegante e intuitiva focada na simplicidade e velocidade. Crie páginas totalmente responsivas, como listas, quadros de empregos ou postagens de blog, e gerencie seu conteúdo com facilidade usando o construtor de páginas gratuito Click & Drop.","Demo Description Two":"Um construtor de páginas projetado para o crescimento. Crie as páginas do seu site com componentes prontos que são totalmente personalizáveis e sempre responsivos, projetados para atender a todas as necessidades. Um poderoso construtor de páginas para comerciantes, marcas e agências em crescimento.","Demo Description Three":"O construtor de sites amado pelos designers. Projete, visualize e ajuste facilmente layouts para cada tamanho de tela. Limpo. Rápido. Intuitivo. Nem tudo que é poderoso precisa parecer complicado.","Demo Description Four":"Garanta que seu site tenha uma ótima aparência em todos os dispositivos. Edite o conteúdo do texto ao vivo e em tempo real. Escolha as fontes perfeitas para combinar com seu estilo. Experimente com confiança com a capacidade de reverter as alterações. Estilos prefixados. Nenhum risco de conflitos de estilo entre o construtor e seu aplicativo.","Demo Title":"O construtor de sites para páginas impressionantes","Demo Title Two":"Basta publicá-lo com Vue","Demo Title Three":"Edição responsiva","Edit text and links":"Editar texto e links","Enter URL":"Inserir URL","Line break":"Quebra de linha",Bold:Iy,"Header 2":"Cabeçalho 2","Header 3":"Cabeçalho 3",List:_y,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Adicione um URL válido para transformar o texto selecionado em um hyperlink clicável que direciona os usuários para o endereço da web especificado.","Select image":"Selecionar imagem","Manage Content":"Gerenciar conteúdo","Media Library":"Biblioteca de mídia","Reset changes":"Redefinir alterações","Do you want to reset this page?":"Você quer redefinir esta página?","Are you sure you want to reset this page? This will overwrite your current changes.":"Tem certeza de que deseja redefinir esta página? Isso substituirá suas alterações atuais.",Search:Ry,"Search...":"Pesquisar...",Landscape:Hy,Portrait:zy,Squarish:Fy,"Total pages":"Total de páginas",Images:jy,"First page":"Primeira página",Prev:qy,Next:Wy,"By:":"Por:","We did not find any images. Make a new search.":"Não encontramos nenhuma imagem. Faça uma nova pesquisa.","No results on current page. Navigate to First Page.":"Nenhum resultado na página atual. Navegue para a primeira página.",Information:Uy,"From:":"De:"," Select image":" Selecionar imagem","Layouts and visual.":"Layouts e visuais.","Start customizing by editing this default text directly in the editor.":"Comece a personalizar editando este texto padrão diretamente no editor.","Single Image":"Imagem única","Two Vertical Images":"Duas imagens verticais","Two Square Images":"Duas imagens quadradas","Three Square Images":"Três imagens quadradas","Six Square Images Grid":"Grade de seis imagens quadradas","Three Square Images With Text":"Três imagens quadradas com texto","Three Vertical Images":"Duas imagens quadradas com texto",Text:Gy,"Header H2":"Cabeçalho H2","Header H3":"Cabeçalho H3","YouTube Video":"Vídeo do YouTube","Break Divider":"Divisor",Link:Ky,"Two Square Images With Text":"Duas imagens quadradas com texto","Selected HTML":"HTML selecionado","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Visão geral do elemento selecionado, componente e componentes. Esta seção fornece atualizações em tempo real com base na sua seleção de HTML.",Types:Jy,"Element type:":"Tipo de elemento:","Component type:":"Tipo de componente:","Components:":"Componentes:",array:Yy,Content:Xy,Element:Qy,Component:Zy,"Components added":"Componentes adicionados","No Element selected":"Nenhum elemento selecionado","Selected HTML:":"HTML selecionado:","Element src:":"Fonte do elemento:","Element classes:":"Classes de elemento:","No Component selected":"Nenhum componente selecionado","ID:":"ID:","Title:":"Título:","HTML Code:":"Código HTML:","No Components added yet":"Nenhum componente adicionado ainda",All:$y,Image:e0,"Image & Text":"Imagem e Texto","Four Square Images With Text":"Quatro imagens quadradas com texto","Four Square Images":"Quatro imagens quadradas","Continue Your Work?":"Continuar seu trabalho?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Percebemos que você tem algumas alterações que não foram salvas da última vez. Gostaria de continuar de onde parou ou usar a versão que está carregada atualmente no banco de dados?","Use Saved Version":"Usar a versão salva","Continue Where I Left Off":"Continuar de onde parei","HTML Editor":"Editor HTML","Gain full control over components by editing the raw HTML.":"Obtenha controlo total sobre os componentes editando o HTML em bruto.","Large Screens Only":"Somente telas grandes"},property:Py,value:Dy},Symbol.toStringTag,{value:"Module"})),t0="Сохранить",r0="Опции",o0="аватар",n0="Опубликовать",i0="Закрыть",a0="компонент",s0="Стили",l0="Типографии",p0="Выбрать",d0="Отступ",c0="Поле",m0="Глобальный",b0="Специфический",u0="Граница",g0="Прозрачный",x0="Добавить",f0="свойство",h0="значение",y0="Редактирование",w0="Удалить",v0="Предварительный просмотр",k0="Мобильный",S0="Жирный",C0="Ссылка",E0="Список",T0="Поиск",M0="Альбомный",B0="Портретный",N0="Квадратный",P0="Изображения",D0="Назад",L0="Вперед",A0="Информация",O0="Текст",V0="Типы",I0="массив",_0="Содержание",R0="Элемент",H0="Компонент",z0="Все",F0="Изображение",kD=Object.freeze(Object.defineProperty({__proto__:null,Add:x0,All:z0,Bold:S0,Border:u0,Close:i0,Component:H0,Content:_0,Delete:w0,Editing:y0,Element:R0,Global:m0,Image:F0,Images:P0,Information:A0,Landscape:M0,Link:C0,List:E0,Margin:c0,Mobile:k0,Next:L0,Options:r0,Padding:d0,Portrait:B0,Prev:D0,Preview:v0,Publish:n0,Save:t0,Search:T0,Select:p0,Specific:b0,Squarish:N0,Styles:s0,Text:O0,Transparent:g0,Types:V0,Typographies:l0,array:I0,avatar:o0,component:a0,default:{"Reset Page":"Сбросить страницу","Global Page Styles":"Глобальные стили страницы","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"Попробуйте мощный Click & Drop Page Builder — разработанный для разработчиков и создателей, которые хотят полного контроля без лишних хлопот. Настраивайте макеты, шрифты и цвета. Редактируйте контент визуально в реальном времени. Добавляйте медиа, встраивайте видео с YouTube или экспортируйте все в виде чистого HTML. С адаптивным редактированием, локальным автосохранением, поддержкой Tailwind и даже интеграцией Unsplash, это все, что вам нужно — в одном бесшовном конструкторе. Создавайте потрясающие страницы за считанные минуты.","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"Конструктор страниц, созданный для роста. Создавайте страницы вашего сайта с готовыми компонентами, которые полностью настраиваются и всегда адаптивны, разработаны для удовлетворения любых потребностей. Мощный конструктор страниц для растущих торговцев, брендов и агентств.","Everything you need. Break free from design limitations":"Все, что вам нужно. Освободитесь от ограничений дизайна","Bring your vision to life and create impressive pages using a click & drop Page Builder":"Воплотите свою мечту в жизнь и создавайте впечатляющие страницы с помощью конструктора страниц с функцией перетаскивания","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"Веб-конструктор для потрясающих страниц. Позвольте пользователям разрабатывать и публиковать современные страницы любого масштаба. Создавайте адаптивные страницы, такие как списки, вакансии или блоги, и легко управляйте контентом с помощью бесплатного конструктора страниц Click & Drop. Разработано с использованием TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS и HTML.","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"Скачайте или установите наш мощный, гибкий и удобный бесплатный Vue 3 Page Builder через",Save:t0,"Add new Components":"Добавить новые компоненты",Options:r0,"Config Overview":"Обзор конфигурации","HTML Overview":"Обзор HTML","Delete Layout":"Удалить макет",avatar:o0,Publish:n0,"Add Components to Page":"Добавить компоненты на страницу",Close:i0,"Helper Components":"Вспомогательные компоненты","Click to add":"Нажмите, чтобы добавить",component:a0,"Layout Components":"Компоненты макета","Click to add component":"Нажмите, чтобы добавить компонент","Remove all Components":"Удалить все компоненты","Are you sure you want to remove all Components?":"Вы уверены, что хотите удалить все компоненты?",Styles:s0,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"Примените стили, которые влияют на всю страницу. Эти настройки включают глобальный шрифт, цвет текста, цвет фона и другие универсальные стили, которые применяются ко всем разделам.","Update Page Styles":"Обновить стили страницы","Download HTML":"Скачать HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"Экспортируйте всю страницу как автономный HTML-файл. Это включает все разделы, содержимое и примененные стили, делая его готовым к использованию или интеграции в другом месте.","Download HTML file":"Скачать HTML файл",Typographies:l0,"Font Appearance":"Внешний вид шрифта","Font Size":"Размер шрифта",Select:p0,"Font size":"Размер шрифта","Font tablet size":"Размер шрифта для планшетов","Font small screens":"Размер шрифта для маленьких экранов","Font weight":"Толщина шрифта","Font family":"Семейство шрифтов","Font Style":"Стиль шрифта","Opacity & Transparency":"Непрозрачность и Прозрачность",Padding:d0,"Vertical Padding":"Вертикальный отступ","Horizontal Padding":"Горизонтальный отступ",Margin:c0,"Vertical Margin":"Вертикальное поле","Horizontal Margin":"Горизонтальное поле","Border Radius":"Радиус границы",Global:m0,Specific:b0,"Border Radius top left":"Радиус границы сверху слева","Border Radius top right":"Радиус границы сверху справа","Border Radius bottom left":"Радиус границы снизу слева","Border Radius bottom right":"Радиус границы снизу справа","Border Style, Width & Color":"Стиль, ширина и цвет границы",Border:u0,"Border Style":"Стиль границы","Border Width":"Ширина границы","Border Color":"Цвет границы",Transparent:g0,"Generated CSS":"Сгенерированный CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"Это CSS, применяемый конструктором. Добавьте свой CSS и нажмите Enter, чтобы применить его к выбранному элементу.","Add your CSS.":"Добавьте свой CSS.","The pbx- prefix is added automatically.":"Префикс pbx- добавляется автоматически.","Type class":"Введите класс",Add:x0,"Inline Styles":"Встроенные стили","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"Это встроенные стили, применяемые конструктором. Добавьте свои стили и нажмите Enter, чтобы применить их к выбранному элементу.","Add your own style.":"Добавьте свой стиль.",property:f0,value:h0,Editing:y0,"Loading...":"Загрузка...","Background Color":"Цвет фона","Text Color":"Цвет текста","Default black":"Черный по умолчанию","Remove Component?":"Удалить компонент?","Are you sure you want to remove this Component?":"Вы уверены, что хотите удалить этот компонент?",Delete:w0,"Add to the bottom":"Добавить в конец",Preview:v0,Mobile:k0,"Demo Content":"Демонстрационный контент","Demo Description":"Представляем легкий и бесплатный Vue Click & Drop Page Builder. Создавайте и улучшайте цифровые впечатления с помощью Vue. Не все мощное должно быть сложным. Этот минималистичный и легкий конструктор страниц предлагает элегантный, интуитивно понятный интерфейс, ориентированный на простоту и скорость. Создавайте полностью адаптивные страницы, такие как списки, доски объявлений или блоги, и легко управляйте своим контентом с помощью бесплатного Click & Drop Page Builder.","Demo Description Two":"Конструктор страниц, созданный для роста. Создавайте страницы вашего сайта с готовыми компонентами, которые полностью настраиваются и всегда адаптивны, разработаны для удовлетворения любых потребностей. Мощный конструктор страниц для растущих торговцев, брендов и агентств.","Demo Description Three":"Конструктор сайтов, любимый дизайнерами. Легко проектируйте, просматривайте и настраивайте макеты для каждого размера экрана. Чистый. Быстрый. Интуитивно понятный. Не все мощное должно выглядеть сложным.","Demo Description Four":"Убедитесь, что ваш сайт отлично выглядит на всех устройствах. Редактируйте текстовый контент вживую и в режиме реального времени. Выбирайте идеальные шрифты, соответствующие вашему стилю. Уверенно экспериментируйте с возможностью отмены изменений. Стили с префиксами. Нет риска конфликтов стилей между конструктором и вашим приложением.","Demo Title":"Веб-конструктор для потрясающих страниц","Demo Title Two":"Просто опубликуйте это с помощью Vue","Demo Title Three":"Адаптивное редактирование","Edit text and links":"Редактировать текст и ссылки","Enter URL":"Введите URL","Line break":"Разрыв строки",Bold:S0,Link:C0,"Header 2":"Заголовок 2","Header 3":"Заголовок 3",List:E0,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"Добавьте действительный URL, чтобы преобразовать выделенный текст в кликабельную гиперссылку, которая направляет пользователей на указанный веб-адрес.","Select image":"Выбрать изображение","Manage Content":"Управление контентом","Media Library":"Медиатека","Reset changes":"Сбросить изменения","Do you want to reset this page?":"Вы хотите сбросить эту страницу?","Are you sure you want to reset this page? This will overwrite your current changes.":"Вы уверены, что хотите сбросить эту страницу? Это перезапишет ваши текущие изменения.",Search:T0,"Search...":"Поиск...",Landscape:M0,Portrait:B0,Squarish:N0,"Total pages":"Всего страниц",Images:P0,"First page":"Первая страница",Prev:D0,Next:L0,"By:":"Автор:","We did not find any images. Make a new search.":"Мы не нашли изображений. Выполните новый поиск.","No results on current page. Navigate to First Page.":"На текущей странице нет результатов. Перейдите на первую страницу.",Information:A0,"From:":"От:"," Select image":" Выбрать изображение","Layouts and visual.":"Макеты и визуализация.","Start customizing by editing this default text directly in the editor.":"Начните настройку, отредактировав этот текст по умолчанию прямо в редакторе.","Single Image":"Одиночное изображение","Two Vertical Images":"Два вертикальных изображения","Two Square Images":"Два квадратных изображения","Three Square Images":"Три квадратных изображения","Six Square Images Grid":"Сетка из шести квадратных изображений","Three Square Images With Text":"Три квадратных изображения с текстом","Three Vertical Images":"Два квадратных изображения с текстом",Text:O0,"Header H2":"Заголовок H2","Header H3":"Заголовок H3","YouTube Video":"Видео YouTube","Break Divider":"Разделитель","Two Square Images With Text":"Два квадратных изображения с текстом","Selected HTML":"Выбранный HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"Обзор выбранного элемента, компонента и компонентов. Этот раздел предоставляет обновления в реальном времени на основе вашего выбора HTML.",Types:V0,"Element type:":"Тип элемента:","Component type:":"Тип компонента:","Components:":"Компоненты:",array:I0,Content:_0,Element:R0,Component:H0,"Components added":"Добавленные компоненты","No Element selected":"Элемент не выбран","Selected HTML:":"Выбранный HTML:","Element src:":"Источник элемента:","Element classes:":"Классы элемента:","No Component selected":"Компонент не выбран","ID:":"ID:","Title:":"Заголовок:","HTML Code:":"HTML-код:","No Components added yet":"Компоненты еще не добавлены",All:z0,Image:F0,"Image & Text":"Изображение и текст","Four Square Images With Text":"Четыре квадратных изображения с текстом","Four Square Images":"Четыре квадратных изображения","Continue Your Work?":"Продолжить работу?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"Мы заметили, что у вас есть несохраненные изменения с прошлого раза. Хотите продолжить с того места, где остановились, или использовать версию, загруженную из базы данных?","Use Saved Version":"Использовать сохраненную версию","Continue Where I Left Off":"Продолжить с того места, где я остановился","HTML Editor":"HTML-редактор","Gain full control over components by editing the raw HTML.":"Получите полный контроль над компонентами, редактируя необработанный HTML-код.","Large Screens Only":"Только большие экраны"},property:f0,value:h0},Symbol.toStringTag,{value:"Module"})),j0="保存",q0="选项",W0="头像",U0="发布",G0="组件",K0="样式",J0="排版",Y0="选择",X0="内边距",Q0="边距",Z0="全局",$0="具体",ew="边框",tw="透明",rw="添加",ow="属性",nw="值",iw="关闭",aw="编辑",sw="删除",lw="预览",pw="移动",dw="加粗",cw="列表",mw="搜索",bw="横向",uw="纵向",gw="方形",xw="图片",fw="上一页",hw="下一页",yw="信息",ww="文本",vw="链接",kw="类型",Sw="数组",Cw="内容",Ew="元素",Tw="组件",Mw="全部",Bw="图片",SD=Object.freeze(Object.defineProperty({__proto__:null,Add:rw,All:Mw,Bold:dw,Border:ew,Close:iw,Component:Tw,Content:Cw,Delete:sw,Editing:aw,Element:Ew,Global:Z0,Image:Bw,Images:xw,Information:yw,Landscape:bw,Link:vw,List:cw,Margin:Q0,Mobile:pw,Next:hw,Options:q0,Padding:X0,Portrait:uw,Prev:fw,Preview:lw,Publish:U0,Save:j0,Search:mw,Select:Y0,Specific:$0,Squarish:gw,Styles:K0,Text:ww,Transparent:tw,Types:kw,Typographies:J0,array:Sw,avatar:W0,component:G0,default:{"Reset Page":"重置页面","Global Page Styles":"全局页面样式","Try the powerful Click & Drop Page Builder—designed for developers and creators who want full control without the hassle. Customize layouts, fonts, and colors. Edit content visually in real time. Add media, embed YouTube videos, or export everything as clean HTML. With responsive editing, local auto-save, Tailwind support, and even Unsplash integration, it's everything you need—wrapped in one seamless builder. Build Stunning Pages in Minutes.":"试试强大的Click & Drop Page Builder——专为希望完全控制而无需麻烦的开发者和创作者设计。自定义布局、字体和颜色。实时可视化编辑内容。添加媒体、嵌入YouTube视频或将所有内容导出为干净的HTML。凭借响应式编辑、本地自动保存、Tailwind支持,甚至Unsplash集成,它是您所需的一切——集成在一个无缝的构建器中。几分钟内构建令人惊叹的页面。","A Page Builder designed for growth. Build your website pages with ready-made components that are fully customizable and always responsive, designed to fit every need. A powerful Page Builder for growing merchants, brands, and agencies.":"为增长而设计的页面构建器。使用完全可定制且始终响应的现成组件构建您的网站页面,旨在满足所有需求。为不断发展的商家、品牌和代理商提供强大的页面构建器。","Everything you need. Break free from design limitations":"您需要的一切。突破设计限制","Bring your vision to life and create impressive pages using a click & drop Page Builder":"实现您的愿景,并使用点击和拖放页面构建器创建令人印象深刻的页面","The web builder for stunning pages. Enable users to design and publish modern pages at any scale. Build responsive pages like listings, jobs or blog posts and manage content easily using the free click & drop Page Builder. Developed with TypeScript, Vue 3, Composition API, Pinia, CSS, Tailwind CSS and HTML.":"令人惊叹页面的网页构建器。使用户能够设计和发布任何规模的现代页面。创建响应式页面,例如列表、工作或博客文章,并使用免费的点击和拖放页面构建器轻松管理内容。使用 TypeScript、Vue 3、Composition API、Pinia、CSS、Tailwind CSS 和 HTML 开发。","Download or install our powerful, flexible, and easy-to-use free Vue 3 Page Builder via":"通过下载或安装我们强大、灵活且易于使用的免费 Vue 3 页面构建器",Save:j0,"Add new Components":"添加新组件",Options:q0,"Config Overview":"配置概览","HTML Overview":"HTML概览","Delete Layout":"删除布局",avatar:W0,Publish:U0,"Add Components to Page":"将组件添加到页面","Helper Components":"辅助组件","Click to add":"点击添加",component:G0,"Layout Components":"布局组件","Click to add component":"点击添加组件","Remove all Components":"删除所有组件","Are you sure you want to remove all Components?":"您确定要删除所有组件吗?",Styles:K0,"Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.":"应用影响整个页面的样式。这些设置包括全局字体系列、文本颜色、背景颜色和适用于所有部分的其他通用样式。","Update Page Styles":"更新页面样式","Download HTML":"下载HTML","Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.":"将整个页面导出为独立的HTML文件。这包括所有部分、内容和应用的样式,使其可以随时使用或集成到其他地方。","Download HTML file":"下载HTML文件",Typographies:J0,"Font Appearance":"字体外观","Font Size":"字体大小",Select:Y0,"Font size":"字体大小","Font tablet size":"平板字体大小","Font small screens":"小屏幕字体大小","Font weight":"字体粗细","Font family":"字体家族","Font Style":"字体样式","Opacity & Transparency":"不透明度和透明度",Padding:X0,"Vertical Padding":"垂直内边距","Horizontal Padding":"水平内边距",Margin:Q0,"Vertical Margin":"垂直边距","Horizontal Margin":"水平边距","Border Radius":"边框半径",Global:Z0,Specific:$0,"Border Radius top left":"边框半径 左上","Border Radius top right":"边框半径 右上","Border Radius bottom left":"边框半径 左下","Border Radius bottom right":"边框半径 右下","Border Style, Width & Color":"边框样式、宽度和颜色",Border:ew,"Border Style":"边框样式","Border Width":"边框宽度","Border Color":"边框颜色",Transparent:tw,"Generated CSS":"生成的CSS","This is the CSS applied by the builder. Add your own CSS and press Enter to apply it to the selected element.":"这是构建器应用的CSS。添加您自己的CSS并按Enter将其应用于选定的元素。","Add your CSS.":"添加您的CSS。","The pbx- prefix is added automatically.":"pbx-前缀会自动添加。","Type class":"输入类",Add:rw,"Inline Styles":"内联样式","These are the inline styles applied by the builder. Add your own styles and press Enter to apply them to the selected element.":"这些是构建器应用的内联样式。添加您自己的样式,然后按 Enter 将其应用于选定的元素。","Add your own style.":"添加您自己的样式。",property:ow,value:nw,Close:iw,Editing:aw,"Loading...":"加载中...","Background Color":"背景颜色","Text Color":"文字颜色","Default black":"默认黑色","Remove Component?":"删除组件?","Are you sure you want to remove this Component?":"您确定要删除此组件吗?",Delete:sw,"Add to the bottom":"添加到底部",Preview:lw,Mobile:pw,"Demo Content":"演示内容","Demo Description":"介绍轻量级和免费的Vue Click & Drop页面构建器。使用Vue轻松创建和增强数字体验。并非所有强大的东西都需要复杂。这款简约轻便的页面构建器提供了一个优雅直观的界面,专注于简单性和速度。创建完全响应式的页面,例如列表、职位板或博客文章,并使用免费的Click & Drop页面构建器轻松管理您的内容。","Demo Title":"令人惊叹的页面的网页构建器","Demo Description Two":"为增长而设计的页面构建器。使用完全可定制且始终响应的现成组件构建您的网站页面,旨在满足所有需求。为不断发展的商家、品牌和代理商提供强大的页面构建器。","Demo Description Three":"设计师喜爱的网站构建器。轻松设计、预览和调整每个屏幕尺寸的布局。干净。快速。直观。并非所有强大的东西都必须看起来很复杂。","Demo Description Four":"确保您的网站在所有设备上看起来都很棒。实时编辑文本内容。选择与您的风格相匹配的完美字体。自信地进行实验,并能够轻松复更改。样式前缀。构建器和您的应用程序之间没有样式冲突的风险。","Demo Title Two":"只需使用Vue发布即可","Demo Title Three":"响应式编辑","Edit text and links":"编辑文本和链接","Enter URL":"输入URL","Line break":"换行",Bold:dw,"Header 2":"标题2","Header 3":"标题3",List:cw,"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address.":"添加一个有效的URL,将选定的文本转换为可点击的超链接,指向指定的网页地址。","Select image":"选择图片","Manage Content":"管理内容","Media Library":"媒体库","Reset changes":"重置更改","Do you want to reset this page?":"您想重置此页面吗?","Are you sure you want to reset this page? This will overwrite your current changes.":"您确定要重置此页面吗?这将覆盖您当前的更改。",Search:mw,"Search...":"搜索...",Landscape:bw,Portrait:uw,Squarish:gw,"Total pages":"总页数",Images:xw,"First page":"第一页",Prev:fw,Next:hw,"By:":"作者:","We did not find any images. Make a new search.":"我们没有找到任何图片。请重新搜索。","No results on current page. Navigate to First Page.":"当前页面没有结果。导航到第一页。",Information:yw,"From:":"来自:"," Select image":" 选择图片","Layouts and visual.":"布局和视觉。","Start customizing by editing this default text directly in the editor.":"通过直接在编辑器中编辑此默认文本开始自定义。","Single Image":"单张图片","Two Vertical Images":"两张竖直图片","Two Square Images":"两张方形图片","Three Square Images":"三张方形图片","Six Square Images Grid":"六张方形图片网格","Three Vertical Images":"三张竖直图片","Three Square Images With Text":"三张方形图片和文字","Two Square Images With Text":"两张方形图片和文字",Text:ww,"Header H2":"标题 H2","Header H3":"标题 H3","YouTube Video":"YouTube 视频","Break Divider":"分隔线",Link:vw,"Selected HTML":"选定的HTML","Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.":"所选元素、组件和组件的概述。本节根据您的HTML选择提供实时更新。",Types:kw,"Element type:":"元素类型:","Component type:":"组件类型:","Components:":"组件:",array:Sw,Content:Cw,Element:Ew,Component:Tw,"Components added":"添加的组件","No Element selected":"未选择元素","Selected HTML:":"选定的HTML:","Element src:":"元素来源:","Element classes:":"元素类:","No Component selected":"未选择组件","ID:":"ID:","Title:":"标题:","HTML Code:":"HTML代码:","No Components added yet":"尚未添加组件",All:Mw,Image:Bw,"Image & Text":"图片和文字","Four Square Images With Text":"四张带文字的方形图片","Four Square Images":"四张方形图片","Continue Your Work?":"继续您的工作?","We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?":"我们注意到您上次有一些更改没有保存。您是想从上次离开的地方继续,还是使用当前从数据库加载的版本?","Use Saved Version":"使用保存的版本","Continue Where I Left Off":"从我离开的地方继续","HTML Editor":"HTML 编辑器","Gain full control over components by editing the raw HTML.":"通过编辑原始 HTML 获得对组件的完全控制。","Large Screens Only":"仅限大屏幕"},property:ow,value:nw},Symbol.toStringTag,{value:"Module"}));le.PageBuilder=mD,le.Preview=wa,le.createPinia=cb,le.getPageBuilder=ie,le.pageBuilder=bD,le.sharedPageBuilderPinia=Bl,le.sharedPageBuilderStore=ne,le.usePageBuilderModal=Hb,le.usePageBuilderStateStore=hb,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});
685
+ `,k=document.createElement("a");k.setAttribute("href","data:text/html;charset=utf-8,"+encodeURIComponent(S)),k.setAttribute("download",x),k.style.display="none",document.body.appendChild(k),k.click(),document.body.removeChild(k)},b=function(){const x=document.getElementById("pagebuilder");if(!x)return;let y=Ul(x);const w=document.createElement("div");w.innerHTML=y,w.querySelectorAll("[hovered], [selected]").forEach(v=>{v.removeAttribute("hovered"),v.removeAttribute("selected")}),y=w.innerHTML,m("downloaded_html.html",y)},u=i.ref(null),g=async function(){u.value=!0,await t.globalPageStyles()},f=async function(){n.value=!0,await t.handleManualSave();const x=document.querySelector("#pagebuilder");x&&x.removeAttribute("data-global-selected"),u.value=!1,n.value=!1};return(x,y)=>(i.openBlock(),i.createElementBlock("div",EB,[i.createElementVNode("div",TB,[i.createElementVNode("button",{type:"button",onClick:y[0]||(y[0]=w=>x.$emit("closeEditor")),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},y[1]||(y[1]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ",-1)])),i.createElementVNode("p",MB,[i.createTextVNode(i.toDisplayString(i.unref(e)("Editing"))+" ",1),i.createElementVNode("span",BB,"<"+i.toDisplayString(l.value)+">",1)])]),u.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",{key:0,ref_key:"scrollContainer",ref:p,onScroll:c,class:"pbx-pl-3 pbx-pr-3 pbx-mb-4 pbx-overflow-y-scroll"},[i.withDirectives(i.createElementVNode("div",null,[i.createElementVNode("article",NB,[i.createVNode(A6)]),i.createElementVNode("article",PB,[i.createVNode(dB)]),i.createElementVNode("article",DB,[i.createVNode(kw)]),i.createElementVNode("article",LB,[i.createVNode(Z6)]),i.createElementVNode("article",AB,[i.createVNode(Sw)]),i.createElementVNode("article",OB,[i.createVNode(Cw)]),i.createElementVNode("article",VB,[i.createVNode(Ew)]),i.createElementVNode("article",IB,[i.createVNode(Tw)]),i.createElementVNode("article",_B,[i.createVNode(ww)]),i.createElementVNode("article",RB,[i.createVNode(vw)]),i.createElementVNode("article",HB,[i.createVNode(Mw)])],512),[[i.vShow,s.value&&i.unref(t).isEditableElement(s.value)]]),i.createElementVNode("article",zB,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Global Page Styles")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",FB,i.toDisplayString(i.unref(e)("Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.")),1),y[2]||(y[2]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",jB,[i.createElementVNode("button",{onClick:g,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Update Page Styles")),1)])]),_:1})]),Array.isArray(a.value)&&a.value.length>=1?(i.openBlock(),i.createElementBlock("article",qB,[i.createVNode(ht,null,{title:i.withCtx(()=>[i.createTextVNode(i.toDisplayString(i.unref(e)("Download HTML")),1)]),content:i.withCtx(()=>[i.createElementVNode("p",WB,i.toDisplayString(i.unref(e)("Export the entire page as a standalone HTML file. This includes all sections, content, and applied styles, making it ready for use or integration elsewhere.")),1),y[3]||(y[3]=i.createElementVNode("hr",null,null,-1)),i.createElementVNode("div",UB,[i.createElementVNode("button",{onClick:b,type:"button",class:"pbx-myPrimaryButton"},i.toDisplayString(i.unref(e)("Download HTML file")),1)])]),_:1})])):i.createCommentVNode("",!0)],544)),i.createVNode(St,{maxWidth:"md",minHeight:"pbx-min-h-[65vh] pbx-max-h-[65vh]",showModalBuilder:u.value,title:i.unref(e)("Global Page Styles"),onCloseMainModalBuilder:f},{default:i.withCtx(()=>[i.createElementVNode("div",GB,[n.value?(i.openBlock(),i.createElementBlock("div",KB,[i.createElementVNode("div",JB,[i.createElementVNode("div",YB,[i.createElementVNode("span",XB,i.toDisplayString(i.unref(e)("Loading...")),1)])])])):i.createCommentVNode("",!0),!n.value&&u.value?(i.openBlock(),i.createElementBlock("div",QB,[i.createElementVNode("div",null,[i.createElementVNode("p",ZB,i.toDisplayString(i.unref(e)("Apply styles that affect the entire page. These settings include global font family, text color, background color, and other universal styles that apply to all sections.")),1),i.createElementVNode("article",$B,[i.createVNode(kw)]),i.createElementVNode("article",eN,[i.createVNode(fw,{globalPageLayout:!0})]),i.createElementVNode("article",tN,[i.createVNode(hw,{globalPageLayout:!0})]),i.createElementVNode("article",rN,[i.createVNode(Sw)]),i.createElementVNode("article",oN,[i.createVNode(Cw)]),i.createElementVNode("article",nN,[i.createVNode(Ew)]),i.createElementVNode("article",iN,[i.createVNode(Tw)]),i.createElementVNode("article",aN,[i.createVNode(ww)]),i.createElementVNode("article",sN,[i.createVNode(vw)]),i.createElementVNode("article",lN,[i.createVNode(Mw,{globalPage:!0})])])])):i.createCommentVNode("",!0)])]),_:1},8,["showModalBuilder","title"])]))}},dN={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},cN={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},mN={class:"pbx-px-2"},bN={class:"pbx-mt-8"},uN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},gN={class:"pbx-overflow-x-auto"},xN={class:"pbx-min-w-full"},fN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},hN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},yN={class:"pbx-min-w-[30rem] pbx-w-max"},wN={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium pbx-bg-blue-100 pbx-text-blue-800"},vN={key:0,class:"pbx-mt-4"},kN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},SN={class:"pbx-overflow-x-auto"},CN={class:"pbx-min-w-full"},EN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},TN={key:0},MN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},BN={class:"pbx-min-w-[30rem] pbx-w-max"},NN={key:1},PN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},DN={class:"pbx-min-w-[30rem] pbx-w-max"},LN={key:1,class:"pbx-mt-8"},AN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},ON={class:"pbx-overflow-x-auto"},VN={class:"pbx-min-w-full"},IN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},_N={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},RN={class:"pbx-min-w-[30rem] pbx-w-max"},HN={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},zN={class:"pbx-min-w-[30rem] pbx-w-max"},FN={class:"pbx-flex pbx-items-center pbx-space-x-3"},jN=["src"],qN={key:0,class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},WN={class:"pbx-min-w-[30rem] pbx-w-max"},UN={key:2,class:"pbx-mt-8"},GN={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},KN={class:"pbx-overflow-x-auto"},JN={class:"pbx-min-w-full"},YN={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},XN={key:0},QN={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},ZN={class:"pbx-min-w-[30rem] pbx-w-max"},$N={key:1},e8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},t8={class:"pbx-min-w-[30rem] pbx-w-max"},r8={key:2},o8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},n8={class:"pbx-min-w-[30rem] pbx-w-max"},i8={key:3},a8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},s8={class:"pbx-min-w-[30rem] pbx-w-max"},l8={key:3,class:"pbx-mt-8"},p8={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},d8={class:"pbx-overflow-x-auto"},c8={class:"pbx-min-w-full"},m8={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},b8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},u8={class:"pbx-min-w-[30rem] pbx-w-max"},g8={class:"pbx-flex pbx-items-center pbx-space-x-3"},x8=["src"],f8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},h8={class:"pbx-min-w-[30rem] pbx-w-max"},y8={class:"pbx-flex pbx-items-center pbx-space-x-3"},w8={class:"pbx-pr-6"},v8={class:"pbx-flex pbx-items-center pbx-space-x-3"},k8={class:"pbx-whitespace-nowrap"},S8={key:4,class:"pbx-mt-8"},C8={class:"pbx-overflow-hidden pbx-shadow pbx-ring-1 pbx-ring-black pbx-ring-opacity-5 md:pbx-rounded-lg"},E8={class:"pbx-overflow-x-auto"},T8={class:"pbx-w-max"},M8={class:"pbx-bg-white pbx-divide-y pbx-divide-gray-200"},B8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},N8={class:"pbx-min-w-[30rem] pbx-w-max"},P8={key:0},D8={key:1},L8={key:0},A8={class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-text-gray-500"},O8={class:"pbx-min-w-[30rem] pbx-w-max"},V8={class:"pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium"},I8={class:"pbx-mt-4 pbx-mb-4 pbx-py-8 pbx-px-2 pbx-border pbx-border-solid pbx-border-gray-600 pbx-rounded-xl"},_8={class:"pbx-mt-4 pbx-whitespace-pre-wrap pbx-text-white pbx-overflow-hidden pbx-bg-gray-900"},R8={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-white pbx-text-xs pbx-break-all"},H8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-text-white"},z8={__name:"PageBuilderSettings",setup(r){const e="3.4.29",t=ne,o=i.computed(()=>t.getPageBuilderConfig);return(n,a)=>{var s,l,p,d,c,m,b,u,g,f,x,y,w,v,h,S;return i.openBlock(),i.createElementBlock("div",dN,[i.createElementVNode("div",cN,[i.createElementVNode("div",null,[a[26]||(a[26]=i.createElementVNode("div",{class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},[i.createElementVNode("h3",{class:"pbx-myQuaternaryHeader"},"Configuration Overview"),i.createElementVNode("p",{class:"pbx-myPrimaryParagraph pbx-text-xs"}," A summary of current user preferences, application settings, and system metadata including UI theme, language, saved components, and logo configuration. ")],-1)),i.createElementVNode("div",mN,[i.createElementVNode("div",bN,[a[2]||(a[2]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Version Information",-1)),i.createElementVNode("div",uN,[i.createElementVNode("div",gN,[i.createElementVNode("table",xN,[a[1]||(a[1]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," App "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Version ")])],-1)),i.createElementVNode("tbody",fN,[i.createElementVNode("tr",null,[a[0]||(a[0]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Page Builder")],-1)),i.createElementVNode("td",hN,[i.createElementVNode("div",yN,[i.createElementVNode("span",wN,i.toDisplayString(i.unref(e)),1)])])])])])])])]),(s=o.value)!=null&&s.resourceData&&!i.unref(er)(o.value.resourceData)?(i.openBlock(),i.createElementBlock("div",vN,[a[6]||(a[6]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Resource Data",-1)),i.createElementVNode("div",kN,[i.createElementVNode("div",SN,[i.createElementVNode("table",CN,[a[5]||(a[5]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",EN,[(p=(l=o.value)==null?void 0:l.resourceData)!=null&&p.title?(i.openBlock(),i.createElementBlock("tr",TN,[a[3]||(a[3]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Title")],-1)),i.createElementVNode("td",MN,[i.createElementVNode("div",BN,i.toDisplayString(o.value.resourceData.title),1)])])):i.createCommentVNode("",!0),(c=(d=o.value)==null?void 0:d.resourceData)!=null&&c.id?(i.openBlock(),i.createElementBlock("tr",NN,[a[4]||(a[4]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"ID")],-1)),i.createElementVNode("td",PN,[i.createElementVNode("div",DN,i.toDisplayString(o.value.resourceData.id),1)])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),(m=o.value)!=null&&m.userForPageBuilder&&!i.unref(er)(o.value.userForPageBuilder)?(i.openBlock(),i.createElementBlock("div",LN,[a[11]||(a[11]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"User Information",-1)),i.createElementVNode("div",AN,[i.createElementVNode("div",ON,[i.createElementVNode("table",VN,[a[10]||(a[10]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",IN,[i.createElementVNode("tr",null,[a[7]||(a[7]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"User Name")],-1)),i.createElementVNode("td",_N,[i.createElementVNode("div",RN,i.toDisplayString(o.value.userForPageBuilder.name),1)])]),i.createElementVNode("tr",null,[a[8]||(a[8]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Image")],-1)),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",HN,[i.createElementVNode("div",zN,[i.createElementVNode("div",FN,[i.createElementVNode("img",{class:"pbx-block pbx-inset-0 pbx-object-top pbx-h-10 pbx-min-h-10 pbx-max-h-10 pbx-w-10 pbx-min-w-10 pbx-max-w-10 pbx-object-cover pbx-rounded-full",src:o.value.userForPageBuilder.image,alt:"image"},null,8,jN)])])])):i.createCommentVNode("",!0)]),i.createElementVNode("tr",null,[a[9]||(a[9]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Image URL")],-1)),o.value.userForPageBuilder.image&&typeof o.value.userForPageBuilder.image=="string"&&o.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("td",qN,[i.createElementVNode("div",WN,i.toDisplayString(o.value.userForPageBuilder.image),1)])):i.createCommentVNode("",!0)])])])])])])):i.createCommentVNode("",!0),(b=o.value)!=null&&b.userSettings&&!i.unref(er)(o.value.userSettings)?(i.openBlock(),i.createElementBlock("div",UN,[a[17]||(a[17]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"User Settings",-1)),i.createElementVNode("div",GN,[i.createElementVNode("div",KN,[i.createElementVNode("table",JN,[a[16]||(a[16]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Setting "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",YN,[(g=(u=o.value)==null?void 0:u.userSettings)!=null&&g.theme?(i.openBlock(),i.createElementBlock("tr",XN,[a[12]||(a[12]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Theme")],-1)),i.createElementVNode("td",QN,[i.createElementVNode("div",ZN,i.toDisplayString(o.value.userSettings.theme),1)])])):i.createCommentVNode("",!0),(x=(f=o.value)==null?void 0:f.userSettings)!=null&&x.language?(i.openBlock(),i.createElementBlock("tr",$N,[a[13]||(a[13]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Language")],-1)),i.createElementVNode("td",e8,[i.createElementVNode("div",t8,i.toDisplayString(o.value.userSettings.language),1)])])):i.createCommentVNode("",!0),((w=(y=o.value)==null?void 0:y.userSettings)==null?void 0:w.autoSave)!==void 0?(i.openBlock(),i.createElementBlock("tr",r8,[a[14]||(a[14]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Auto Save")],-1)),i.createElementVNode("td",o8,[i.createElementVNode("div",n8,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.autoSave?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.autoSave?"Enabled":"Disabled"),3)])])])):i.createCommentVNode("",!0),((h=(v=o.value)==null?void 0:v.userSettings)==null?void 0:h.notifications)!==void 0?(i.openBlock(),i.createElementBlock("tr",i8,[a[15]||(a[15]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Notifications")],-1)),i.createElementVNode("td",a8,[i.createElementVNode("div",s8,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.userSettings.notifications?"bg-green-100 text-green-800":"bg-red-100 text-red-800"])},i.toDisplayString(o.value.userSettings.notifications?"Enabled":"Disabled"),3)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0),o.value&&o.value.pageBuilderLogo&&!i.unref(er)(o.value.pageBuilderLogo)?(i.openBlock(),i.createElementBlock("div",l8,[a[21]||(a[21]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Logo Configuration",-1)),i.createElementVNode("div",p8,[i.createElementVNode("div",d8,[i.createElementVNode("table",c8,[a[20]||(a[20]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Property "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Value ")])],-1)),i.createElementVNode("tbody",m8,[i.createElementVNode("tr",null,[a[18]||(a[18]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Logo")],-1)),i.createElementVNode("td",b8,[i.createElementVNode("div",u8,[i.createElementVNode("div",g8,[i.createElementVNode("img",{class:"pbx-h-4",src:o.value.pageBuilderLogo.src,alt:"Logo"},null,8,x8)])])])]),i.createElementVNode("tr",null,[a[19]||(a[19]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Logo URL")],-1)),i.createElementVNode("td",f8,[i.createElementVNode("div",h8,[i.createElementVNode("div",y8,[i.createElementVNode("div",w8,[i.createElementVNode("div",v8,[i.createElementVNode("span",k8,i.toDisplayString(o.value.pageBuilderLogo.src),1)])])])])])])])])])])])):i.createCommentVNode("",!0),(S=o.value)!=null&&S.updateOrCreate&&!i.unref(er)(o.value.updateOrCreate)?(i.openBlock(),i.createElementBlock("div",S8,[a[25]||(a[25]=i.createElementVNode("h4",{class:"pbx-myQuaternaryHeader pbx-text-sm pbx-mb-2"},"Form Type",-1)),i.createElementVNode("div",C8,[i.createElementVNode("div",E8,[i.createElementVNode("table",T8,[a[24]||(a[24]=i.createElementVNode("thead",{class:"pbx-bg-gray-50"},[i.createElementVNode("tr",null,[i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Mode "),i.createElementVNode("th",{scope:"col",class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-font-medium pbx-text-gray-500 pbx-uppercase pbx-tracking-wider"}," Description ")])],-1)),i.createElementVNode("tbody",M8,[i.createElementVNode("tr",null,[a[22]||(a[22]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Form Type")],-1)),i.createElementVNode("td",B8,[i.createElementVNode("div",N8,[i.createElementVNode("span",{class:i.normalizeClass(["pbx-inline-flex pbx-items-center pbx-px-2.5 pbx-py-0.5 pbx-rounded-full pbx-text-xs pbx-font-medium",o.value.updateOrCreate==="create"?"bg-green-100 text-green-800":"bg-blue-100 text-blue-800"])},[o.value&&o.value.updateOrCreate.formType==="create"?(i.openBlock(),i.createElementBlock("span",P8,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0),o.value&&o.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("span",D8,i.toDisplayString(o.value.updateOrCreate.formType),1)):i.createCommentVNode("",!0)],2)])])]),o.value.updateOrCreate.formName&&o.value.updateOrCreate.formName.length>0?(i.openBlock(),i.createElementBlock("tr",L8,[a[23]||(a[23]=i.createElementVNode("td",{class:"pbx-px-6 pbx-py-4 pbx-whitespace-nowrap pbx-text-sm pbx-font-medium pbx-text-gray-900"},[i.createElementVNode("div",{class:"pbx-min-w-[30rem] pbx-w-max"},"Form Name")],-1)),i.createElementVNode("td",A8,[i.createElementVNode("div",O8,[i.createElementVNode("span",V8,i.toDisplayString(o.value.updateOrCreate.formName),1)])])])):i.createCommentVNode("",!0)])])])])])):i.createCommentVNode("",!0)])])]),i.createElementVNode("div",I8,[a[28]||(a[28]=i.createElementVNode("div",{class:"pbx-flex pbx-items-left pbx-flex-col pbx-gap-1"},[i.createElementVNode("h3",{class:"pbx-myQuaternaryHeader"},"Complete Configuration Overview"),i.createElementVNode("p",{class:"pbx-myPrimaryParagraph pbx-text-xs"}," Complete configuration object currently used by the Page Builder. Includes user information, branding settings, and other context-specific data needed for rendering and managing the builder environment. ")],-1)),i.createElementVNode("div",_8,[a[27]||(a[27]=i.createElementVNode("div",{class:"pbx-flex bg-gray-800/40 pbx-ring-1 ring-white/5"},[i.createElementVNode("div",{class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},[i.createElementVNode("div",{class:"pbx-px-4 pbx-py-4 pbx-text-white"},"Configuration")])],-1)),i.createElementVNode("div",R8,[i.createElementVNode("p",H8," config: "+i.toDisplayString(JSON.stringify(o.value,null,4)),1)])])])])}}},F8={class:"pbx-w-full pbx-inset-x-0 pbx-h-[90vh] pbx-bg-white pbx-overflow-x-scroll lg:pbx-pt-2 pbx-pt-2"},j8={class:"pbx-flex pbx-items-left pbx-flex-col pbx-myPrimaryGap pbx-border-myPrimaryMediumGrayColor"},q8={class:"pbx-myPrimaryParagraph"},W8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-pb-2"},U8={class:"pbx-text-gray-100 pbx-overflow-hidden pbx-bg-gray-900"},G8={class:"pbx-flex pbx-bg-gray-900 pbx-ring-1 ring-white/5"},K8={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},J8={class:"pbx-px-4 pbx-py-4 pbx-text-gray-100"},Y8={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-gray-100 pbx-text-xs"},X8={class:"pbx-text-xs pbx-pb-2"},Q8={class:"pbx-text-xs pbx-pb-2"},Z8={class:"pbx-text-xs pbx-pb-2"},$8={class:"pbx-myPrimaryParagraph pbx-text-xs pbx-pb-2"},e7={class:"pbx-overflow-hidden pbx-bg-gray-900"},t7={class:"pbx-flex pbx-bg-gray-900 pbx-ring-1 ring-white/5"},r7={class:"pbx-mb-px pbx-flex pbx-text-xs pbx-font-medium pbx-text-myPrimaryMediumGrayColor"},o7={class:"pbx-px-4 pbx-pb-8 pbx-pt-4 pbx-text-gray-100 pbx-text-xs pbx-break-all"},n7={key:0},i7={key:0},a7={class:"pbx-pb-2 pbx-text-xs"},s7={key:1,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},l7={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},p7={class:"pbx-overflow-x-auto"},d7={class:"pbx-min-w-full"},c7={class:"pbx-bg-gray-900"},m7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},b7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},u7={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-b"},g7={class:"pbx-overflow-x-auto"},x7={class:"pbx-min-w-full"},f7={class:"pbx-bg-gray-900"},h7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},y7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},w7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},v7={class:"pbx-overflow-x-auto"},k7={class:"pbx-min-w-full"},S7={class:"pbx-bg-gray-900"},C7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},E7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},T7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},M7={key:1},B7={key:0},N7={class:"pbx-pb-2 pbx-text-xs"},P7={key:1,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},D7={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},L7={class:"pbx-overflow-x-auto"},A7={class:"pbx-min-w-full"},O7={class:"pbx-bg-gray-900"},V7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},I7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},_7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},R7={class:"pbx-overflow-x-auto"},H7={class:"pbx-min-w-full"},z7={class:"pbx-bg-gray-900"},F7={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-t pbx-border-gray-200"},j7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},q7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},W7={class:"pbx-overflow-x-auto"},U7={class:"pbx-min-w-full"},G7={class:"pbx-bg-gray-900"},K7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},J7={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},Y7={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},X7={class:"pbx-text-xs pbx-text-gray-100 pbx-whitespace-pre-wrap pbx-font-sans pbx-flex pbx-items-start pbx-justify-left"},Q7=["innerHTML"],Z7={key:2},$7={key:0},eP={class:"pbx-pb-2 pbx-text-xs"},tP={key:1},rP={class:"pbx-border-0 pbx-bg-gray-900 pbx-pt-4 pbx-1 pbx-border-solid pbx-border-b pbx-border-gray-200"},oP={class:"pbx-overflow-x-auto"},nP={class:"pbx-min-w-full"},iP={class:"pbx-bg-gray-900"},aP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},sP={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},lP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},pP={class:"pbx-overflow-x-auto"},dP={class:"pbx-min-w-full"},cP={class:"pbx-bg-gray-900"},mP={class:"pbx-border-0 pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-border-solid pbx-border-t pbx-border-gray-200"},bP={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},uP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal pbx-whitespace-pre-line"},gP={class:"pbx-overflow-x-auto"},xP={class:"pbx-min-w-full"},fP={class:"pbx-bg-gray-900"},hP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},yP={class:"pbx-bg-gray-900 pbx-divide-y pbx-divide-gray-200"},wP={class:"pbx-px-6 pbx-py-3 pbx-text-left pbx-text-xs pbx-text-gray-100 pbx-font-normal"},vP={class:"pbx-text-xs pbx-text-gray-100 pbx-whitespace-pre-wrap pbx-font-sans pbx-flex pbx-items-start pbx-justify-left"},kP=["innerHTML"],SP={__name:"AdvancedPageBuilderSettings",setup(r){const{translate:e}=pe(),t=ne,o=i.computed(()=>t.getElement),n=i.computed(()=>t.getComponent),a=i.computed(()=>t.getComponents),s=i.ref("element"),l=function(d){s.value=d};function p(d){if(!d)return"";const c=" ";let m=0,b="";const g=d.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").split(/(&lt;[^&gt;]+&gt;)/g),f=["&lt;area","&lt;base","&lt;br","&lt;col","&lt;embed","&lt;hr","&lt;img","&lt;input","&lt;link","&lt;meta","&lt;param","&lt;source","&lt;track","&lt;wbr"];return g.forEach(x=>{const y=x.trim();if(!y)return;const w=y.startsWith("&lt;")&&y.endsWith("&gt;"),v=w&&y.startsWith("&lt;/");v&&(m=Math.max(0,m-1));let h=c.repeat(m)+y;w&&(h=h.replace(/(&lt;\/?[[\w\s="/.':;#-\/\?]+&gt;)/g,S=>{var L;const k=(L=S.match(/&lt;\/?([\w-]+)/))==null?void 0:L[1];let C=S.replace(/(&lt;\/?[\w-]+)/g,`<span class="html-tag-symbol">&lt;</span><span class="html-tag-name">${k}</span>`);return C=C.replace(/([\w-]+)=(&quot;[^&quot;]*&quot;)/g,'<span class="html-attribute-name">$1</span><span class="html-operator">=</span><span class="html-attribute-value">$2</span>'),C+'<span class="html-tag-symbol">&gt;</span>'})),b+=h+`
686
+ `,w&&!v&&(y.endsWith("/&gt;")||f.some(k=>y.startsWith(k))||m++)}),b}return(d,c)=>{var m,b,u,g,f,x,y,w,v,h;return i.openBlock(),i.createElementBlock("div",F8,[i.createElementVNode("div",j8,[i.createElementVNode("p",q8,i.toDisplayString(i.unref(e)("Overview of Selected Element, Component, and Components. This section provides real-time updates based on your HTML selection.")),1),i.createElementVNode("div",null,[i.createElementVNode("h4",W8,i.toDisplayString(i.unref(e)("Types")),1),i.createElementVNode("div",U8,[i.createElementVNode("div",G8,[i.createElementVNode("div",K8,[i.createElementVNode("div",J8,i.toDisplayString(i.unref(e)("Types")),1)])]),i.createElementVNode("div",Y8,[i.createElementVNode("p",X8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Element type:")),1),i.createElementVNode("span",null,i.toDisplayString(typeof o.value),1)]),i.createElementVNode("p",Q8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Component type:")),1),i.createTextVNode(" "+i.toDisplayString(typeof n.value),1)]),i.createElementVNode("p",Z8,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Components:")),1),i.createElementVNode("span",null,i.toDisplayString(Array.isArray(a.value)===!0?i.unref(e)("array"):typeof a.value),1)])])])]),i.createElementVNode("div",null,[i.createElementVNode("h4",$8,i.toDisplayString(i.unref(e)("Content")),1),i.createElementVNode("div",e7,[i.createElementVNode("div",t7,[i.createElementVNode("div",r7,[i.createElementVNode("div",{onClick:c[0]||(c[0]=S=>l("element")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="element"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Element")),3),i.createElementVNode("div",{onClick:c[1]||(c[1]=S=>l("component")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="component"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Component")),3),i.createElementVNode("div",{onClick:c[2]||(c[2]=S=>l("components")),class:i.normalizeClass(["pbx-px-4 pbx-py-4 pbx-cursor-pointer",[s.value==="components"?"pbx-text-gray-100":""]])},i.toDisplayString(i.unref(e)("Components added"))+" "+i.toDisplayString(Array.isArray(a.value)&&a.value.length),3)])]),i.createElementVNode("div",o7,[s.value==="element"?(i.openBlock(),i.createElementBlock("div",n7,[n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",i7,[i.createElementVNode("p",a7,i.toDisplayString(n.value===null?i.unref(e)("No Element selected"):typeof n.value),1)])),o.value?(i.openBlock(),i.createElementBlock("div",s7,[i.createElementVNode("div",l7,[i.createElementVNode("div",p7,[i.createElementVNode("table",d7,[i.createElementVNode("thead",c7,[i.createElementVNode("tr",null,[i.createElementVNode("th",m7,i.toDisplayString(i.unref(e)("Selected HTML:")),1)])]),i.createElementVNode("tbody",b7,[i.createElementVNode("tr",null,[i.createElementVNode("td",u7,i.toDisplayString((m=o.value)==null?void 0:m.outerHTML),1)])])])]),i.createElementVNode("div",g7,[i.createElementVNode("table",x7,[i.createElementVNode("thead",f7,[i.createElementVNode("tr",null,[i.createElementVNode("th",h7,i.toDisplayString(i.unref(e)("Element src:")),1)])]),i.createElementVNode("tbody",y7,[i.createElementVNode("tr",null,[i.createElementVNode("td",w7,i.toDisplayString((b=o.value)!=null&&b.src?(u=o.value)==null?void 0:u.src:typeof((g=o.value)==null?void 0:g.src)),1)])])])])]),i.createElementVNode("div",v7,[i.createElementVNode("table",k7,[i.createElementVNode("thead",S7,[i.createElementVNode("tr",null,[i.createElementVNode("th",C7,i.toDisplayString(i.unref(e)("Element classes:")),1)])]),i.createElementVNode("tbody",E7,[i.createElementVNode("tr",null,[i.createElementVNode("td",T7,i.toDisplayString((f=o.value)!=null&&f.classList?(x=o.value)==null?void 0:x.classList:typeof((y=o.value)==null?void 0:y.classList)),1)])])])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),s.value==="component"?(i.openBlock(),i.createElementBlock("div",M7,[n.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",B7,[i.createElementVNode("p",N7,i.toDisplayString(n.value===null?i.unref(e)("No Component selected"):typeof n.value),1)])),n.value?(i.openBlock(),i.createElementBlock("div",P7,[i.createElementVNode("div",D7,[i.createElementVNode("div",L7,[i.createElementVNode("table",A7,[i.createElementVNode("thead",O7,[i.createElementVNode("tr",null,[i.createElementVNode("th",V7,i.toDisplayString(i.unref(e)("ID:")),1)])]),i.createElementVNode("tbody",I7,[i.createElementVNode("tr",null,[i.createElementVNode("td",_7,i.toDisplayString((w=n.value)==null?void 0:w.id),1)])])])]),i.createElementVNode("div",R7,[i.createElementVNode("table",H7,[i.createElementVNode("thead",z7,[i.createElementVNode("tr",null,[i.createElementVNode("th",F7,i.toDisplayString(i.unref(e)("Title:")),1)])]),i.createElementVNode("tbody",j7,[i.createElementVNode("tr",null,[i.createElementVNode("td",q7,i.toDisplayString((v=n.value)==null?void 0:v.title),1)])])])])]),i.createElementVNode("div",W7,[i.createElementVNode("table",U7,[i.createElementVNode("thead",G7,[i.createElementVNode("tr",null,[i.createElementVNode("th",K7,i.toDisplayString(i.unref(e)("HTML Code:")),1)])]),i.createElementVNode("tbody",J7,[i.createElementVNode("tr",null,[i.createElementVNode("td",Y7,[i.createElementVNode("pre",X7,[c[3]||(c[3]=i.createTextVNode(" ")),i.createElementVNode("code",{class:"pbx-font-sans pbx-bg-gray-800 pbx-p-4 pbx-rounded-md pbx-block pbx-w-full",innerHTML:p((h=n.value)==null?void 0:h.html_code)},null,8,Q7),c[4]||(c[4]=i.createTextVNode(`
687
+ `))])])])])])])])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0),s.value==="components"?(i.openBlock(),i.createElementBlock("div",Z7,[Array.isArray(a.value)&&a.value.length===0?(i.openBlock(),i.createElementBlock("div",$7,[i.createElementVNode("p",eP,i.toDisplayString(i.unref(e)("No Components added yet")),1)])):i.createCommentVNode("",!0),a.value?(i.openBlock(),i.createElementBlock("div",tP,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(a.value,S=>(i.openBlock(),i.createElementBlock("div",{key:S.id,class:"pbx-overflow-hidden pbx-border-solid pbx-border pbx-border-gray-100 pbx-mb-6"},[i.createElementVNode("div",rP,[i.createElementVNode("div",oP,[i.createElementVNode("table",nP,[i.createElementVNode("thead",iP,[i.createElementVNode("tr",null,[i.createElementVNode("th",aP,i.toDisplayString(i.unref(e)("ID:")),1)])]),i.createElementVNode("tbody",sP,[i.createElementVNode("tr",null,[i.createElementVNode("td",lP,i.toDisplayString(S.id),1)])])])]),i.createElementVNode("div",pP,[i.createElementVNode("table",dP,[i.createElementVNode("thead",cP,[i.createElementVNode("tr",null,[i.createElementVNode("th",mP,i.toDisplayString(i.unref(e)("Title:")),1)])]),i.createElementVNode("tbody",bP,[i.createElementVNode("tr",null,[i.createElementVNode("td",uP,i.toDisplayString(S.title),1)])])])])]),i.createElementVNode("div",gP,[i.createElementVNode("table",xP,[i.createElementVNode("thead",fP,[i.createElementVNode("tr",null,[i.createElementVNode("th",hP,i.toDisplayString(i.unref(e)("HTML Code:")),1)])]),i.createElementVNode("tbody",yP,[i.createElementVNode("tr",null,[i.createElementVNode("td",wP,[i.createElementVNode("pre",vP,[c[5]||(c[5]=i.createTextVNode(" ")),i.createElementVNode("code",{class:"pbx-font-sans pbx-w-full",innerHTML:p(S.html_code)},null,8,kP),c[6]||(c[6]=i.createTextVNode(`
688
+ `))])])])])])])]))),128))])):i.createCommentVNode("",!0)])):i.createCommentVNode("",!0)])])])])])}}},CP={class:"pbx-flex pbx-items-center pbx-justify-center"},EP={class:"pbx-mr-2"},TP={key:0,class:"pbx-flex pbx-items-center pbx-myPrimaryTag pbx-whitespace-nowrap pbx-py-0 pbx-gap-2"},MP={class:"pbx-text-white pbx-rounded-full pbx-bg-myPrimaryBrandColor pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-d pbx-min-d pbx-max-d lg:pbx-w-8 lg:pbx-h-8 lg:pbx-min-w-8 lg:pbx-max-w-8 pbx-w-8 pbx-h-8 pbx-min-w-8 pbx-max-w-8 pbx-font-normal"},BP={class:"pbx-hidden pbx-text-xs pbx-d lg:pbx-flex pbx-items-center pbx-font-normal pbx-w-max pbx-break-keep"},NP={key:1,class:"pbx-flex pbx-items-center lg:pbx-myPrimaryTag pbx-whitespace-nowrap pbx-py-0 pbx-gap-4 pbx-w-max pbx-h-12 pbx-ml-2"},PP={class:"pbx-text-white pbx-flex-shrink-0 pbx-d pbx-w-10 pbx-h-10 pbx-rounded-full pbx-flex pbx-justify-center pbx-items-center pbx-text-xs pbx-rounded-l-full"},DP=["src"],LP={class:"pbx-hidden pbx-text-xs pbx-d lg:pbx-flex pbx-items-center pbx-font-normal pbx-w-max pbx-break-keep"},AP={class:"pbx-hidden lg:pbx-block"},OP={class:"pbx-relative pbx-group"},VP={type:"button",class:"pbx-mySecondaryButton pbx-font-normal pbx-text-xs"},IP={class:"pbx-absolute pbx-left-0 -pbx-ml-16 -pbx-mt-2 pbx-flex pbx-flex-col pbx-gap-3 pbx-shadow-lg pbx-bg-white pbx-w-max pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-2xl pbx-transition-all pbx-duration-200 pbx-ease-out pbx-pt-4 pbx-pr-4 pbx-pb-4 pbx-pl-2 pbx-z-30 pbx-opacity-0 pbx-pointer-events-none pbx-translate-y-2 group-hover:pbx-opacity-100 group-hover:pbx-pointer-events-auto group-hover:pbx-translate-y-0"},_P={__name:"ToolbarOption",setup(r){const{translate:e}=pe(),t=ie(),o=ne,n=i.computed(()=>o.getPageBuilderConfig),a=i.ref(!1),s=i.ref(!1),l=i.ref(""),p=i.ref(1),d=i.ref(""),c=i.ref(""),m=i.ref(""),b=i.ref(null),u=i.ref(null),g=i.ref(null),f=i.ref(null),x=i.ref(null),y=function(){s.value=!0,l.value="delete",p.value=2,d.value=e("Remove all Components"),c.value=e("Are you sure you want to remove all Components?"),m.value=e("Close"),b.value=null,u.value=e("Delete"),g.value=function(){s.value=!1},x.value=async function(){a.value=!0,await t.clearHtmlSelection(),await t.handleFormSubmission(),await ge(500),s.value=!1,a.value=!1}},w=i.ref(!1),v=function(){w.value=!1},h=function(){w.value=!0},S=i.ref(!1),k=function(){S.value=!1},C=async function(){await t.generateHtmlFromComponents(),S.value=!0};return(L,V)=>{var M;return i.openBlock(),i.createElementBlock("div",null,[i.createElementVNode("div",CP,[i.createElementVNode("div",EP,[n.value&&n.value.userForPageBuilder&&n.value.userForPageBuilder.name&&(!n.value.userForPageBuilder.image||typeof n.value.userForPageBuilder.image=="string"&&((M=n.value.userForPageBuilder.image)==null?void 0:M.length)<2)?(i.openBlock(),i.createElementBlock("div",TP,[i.createElementVNode("div",MP,i.toDisplayString(typeof n.value.userForPageBuilder.name=="string"&&n.value.userForPageBuilder.name[0]),1),i.createElementVNode("div",BP,i.toDisplayString(n.value.userForPageBuilder.name),1)])):i.createCommentVNode("",!0),n.value&&n.value.userForPageBuilder&&n.value.userForPageBuilder.name&&n.value.userForPageBuilder.image&&typeof n.value.userForPageBuilder.image=="string"&&n.value.userForPageBuilder.image.length>2?(i.openBlock(),i.createElementBlock("div",NP,[i.createElementVNode("div",PP,[i.createElementVNode("img",{alt:"Avatar",src:`${n.value.userForPageBuilder.image}`,class:"pbx-block pbx-inset-0 pbx-object-top pbx-d pbx-min-d pbx-max-d lg:pbx-w-8 lg:pbx-h-8 lg:pbx-min-w-8 lg:pbx-max-w-8 pbx-w-8 pbx-h-8 pbx-min-w-8 pbx-max-w-8 pbx-object-cover pbx-rounded-full"},null,8,DP)]),i.createElementVNode("div",LP,i.toDisplayString(n.value.userForPageBuilder.name),1)])):i.createCommentVNode("",!0)]),i.createElementVNode("div",AP,[i.createElementVNode("div",OP,[i.createElementVNode("button",VP,[i.createElementVNode("span",null,i.toDisplayString(i.unref(e)("Options")),1)]),i.createElementVNode("div",IP,[i.createElementVNode("button",{onClick:V[0]||(V[0]=async()=>{await i.unref(t).clearHtmlSelection(),h()}),class:"pbx-mySecondaryButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("Config Overview")),1),i.createElementVNode("button",{onClick:C,class:"pbx-mySecondaryButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("HTML Overview")),1),i.createElementVNode("button",{onClick:y,class:"pbx-myPrimaryDeleteButton pbx-text-xs pbx-font-normal",type:"button"},i.toDisplayString(i.unref(e)("Delete Layout")),1)])])])]),i.createVNode(St,{maxWidth:"5xl",showModalBuilder:w.value,title:"Main Settings",onCloseMainModalBuilder:v,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(z8)]),_:1},8,["showModalBuilder"]),i.createVNode(St,{maxWidth:"5xl",showModalBuilder:S.value,title:i.unref(e)("Selected HTML"),onCloseMainModalBuilder:k,minHeight:"",maxHeight:""},{default:i.withCtx(()=>[i.createVNode(SP)]),_:1},8,["showModalBuilder","title"]),i.createVNode(Zt,{showDynamicModalBuilder:s.value,type:l.value,gridColumnAmount:p.value,title:d.value,description:c.value,isLoading:a.value,firstButtonText:m.value,secondButtonText:b.value,thirdButtonText:u.value,onFirstModalButtonFunctionDynamicModalBuilder:g.value,onSecondModalButtonFunctionDynamicModalBuilder:f.value,onThirdModalButtonFunctionDynamicModalBuilder:x.value},{default:i.withCtx(()=>V[1]||(V[1]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[1]},8,["showDynamicModalBuilder","type","gridColumnAmount","title","description","isLoading","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"])])}}};let Vl=null;function RP(){return(r,e=300)=>{Vl&&clearTimeout(Vl),Vl=setTimeout(r,e)}}const HP={},zP={class:"pbx-bg-white pbx-flex pbx-justify-center pbx-items-center min-pbx-h-screen pbx-h-screen pbx-w-screen pbx-fixed pbx-inset-0 pbx-z-[10000]"};function FP(r,e){return i.openBlock(),i.createElementBlock("div",zP,e[0]||(e[0]=[i.createElementVNode("div",{class:"pbx-absolute pbx-top-1/3"},[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-mt-4"},[i.createElementVNode("div",{class:"pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]"},[i.createElementVNode("span",{class:"!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]"},"Loading...")])])],-1)]))}const Bw=ma(HP,[["render",FP]]),jP={class:"pbx-text-xs pbx-text-gray-600 pbx-mx-2 pbx-py-3 pbx-px-2 pbx-border-solid pbx-border pbx-border-gray-200 pbx-rounded-full"},qP=i.defineComponent({__name:"UndoRedo",emits:["toolbar-hide-request"],setup(r,{emit:e}){const t=ie(),o=e,n=ne,a=i.computed(()=>n.getIsLoadingGlobal),s=i.computed(()=>n.getHistoryIndex),l=i.computed(()=>n.getHistoryLength),p=i.computed(()=>s.value>0),d=i.computed(()=>s.value<l.value-1),c=async function(){p.value&&(o("toolbar-hide-request"),await t.undo(),await t.clearHtmlSelection())},m=async function(){d.value&&(o("toolbar-hide-request"),await t.redo(),await t.clearHtmlSelection())};return(b,u)=>(i.openBlock(),i.createElementBlock(i.Fragment,null,[a.value?(i.openBlock(),i.createBlock(Bw,{key:0})):i.createCommentVNode("",!0),i.createElementVNode("div",{onClick:u[0]||(u[0]=async()=>{await i.unref(t).clearHtmlSelection()}),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full gap-1"},[i.createElementVNode("div",{onClick:c,type:"button",class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black hover:pbx-text-white",[p.value?"pbx-cursor-pointer hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},u[1]||(u[1]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," undo ",-1)]),2),i.createElementVNode("div",jP,i.toDisplayString(s.value+1)+"/"+i.toDisplayString(l.value),1),i.createElementVNode("div",{onClick:m,class:i.normalizeClass(["pbx-h-10 pbx-w-10 pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square pbx-text-black hover:pbx-text-white",[d.value?"pbx-cursor-pointer hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0":"pbx-cursor-not-allowed pbx-bg-opacity-20 hover:pbx-bg-gray-200"]])},u[2]||(u[2]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," redo ",-1)]),2)])],64))}}),WP={class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-auto pbx-flex pbx-flex-col pbx-font-sans pbx-text-black pbx-border-solid pbx-border pbx-border-gray-400 pbx-inset-x-0 pbx-z-10 pbx-bg-white pbx-overflow-x-auto pbx-h-full"},UP={id:"pagebuilder-navbar",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-bg-myPrimaryLightGrayColor pbx-flex pbx-items-center pbx-justify-between pbx-border-0 pbx-border-solid pbx-border-b pbx-border-gray-200 pbx-mb-2 pbx-font-sans pbx-min-h-20"},GP=["src"],KP={class:"pbx-flex pbx-items-center pbx-justify-center"},JP=["disabled"],YP={key:0,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},XP={key:1,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},QP=["disabled"],ZP={key:0,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},$P={key:1,class:"pbx-h-10 pbx-w-4 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-justify-center"},eD={class:"lg:pbx-block pbx-hidden"},tD={class:"lg:pbx-hidden pbx-block"},rD={class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-border-gray-200"},oD={class:"lg:pbx-block pbx-hidden"},nD={class:"pbx-whitespace-nowrap pbx-cursor-pointer"},iD={class:"pbx-flex pbx-items-center pbx-justify-center pbx-mr-2"},aD={class:"lg:pbx-flex pbx-hidden pbx-items-center pbx-justify-center"},sD={class:"pbx-flex-1 pbx-flex gap-2 pbx-items-center pbx-justify-end"},lD={key:0,class:"pbx-flex-1 pbx-ml-2"},pD={key:0,class:"pbx-flex-1 pbx-flex pbx-justify-end pbx-items-center pbx-ml-2 lg:pbx-mr-4 pbx-mr-2"},dD=["value"],cD=["value"],mD={key:2,class:"pbx-flex-1 pbx-ml-2 pbx-mr-2"},bD={id:"pagebuilder-main",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-relative pbx-h-full pbx-flex pbx-pb-2 pbx-gap-2"},uD={class:"pbx-mx-2 pbx-flex pbx-flex-col pbx-myPrimaryGap pbx-items-stretch"},gD={class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},xD={id:"pbxEditToolbar",class:"pbx-z-30 lg:pbx-mx-20 pbx-flex pbx-gap-2 pbx-justify-center pbx-items-center pbx-rounded-full pbx-px-4 pbx-h-0"},fD={id:"pagebuilder",class:"pbx-text-black pbx-font-sans"},hD=["innerHTML","onMouseup"],yD={id:"pagebuilder-footer",class:"lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-min-w-[64rem] pbx-max-w-[64rem] pbx-w-[64rem] pbx-flex-1 pbx-flex pbx-items-center pbx-justify-center pbx-border-0 pbx-border-t pbx-border-t-gray-200 pbx-border-solid pbx-bg-myPrimaryLightGrayColor pbx-py-4"},wD={class:"lg:pbx-block pbx-hidden"},vD={class:"pbx-whitespace-nowrap"},kD={__name:"PageBuilder",props:{CustomMediaLibraryComponent:{type:Object,default:null},CustomBuilderComponents:{type:Object,default:null},showCloseButton:{type:Boolean,default:!1},showPublishButton:{type:Boolean,default:!1}},emits:["handleClosePageBuilder","handlePublishPageBuilder"],setup(r,{emit:e}){const t=ie(),o=r,{translate:n,loadTranslations:a}=pe(),s=Bl,l=ne;i.provide("pageBuilderStateStore",l),i.provide("internalPinia",s),i.provide("CustomMediaComponent",o.CustomMediaLibraryComponent),i.provide("CustomBuilderComponents",o.CustomBuilderComponents);const p=e,d=function(){p("handleClosePageBuilder")},c=async function(){l.setIsLoadingGlobal(!0),await t.handleManualSave(),l.setIsLoadingGlobal(!1),p("handlePublishPageBuilder")},m=()=>{J.value=!1};i.provide("closeAddComponentModal",m);const b=i.ref("en");let u=!0;const g=i.ref(!1);i.watch(b,async A=>{if(A&&!u){g.value=!0,await ge(200),await a(A),t.changeLanguage(A);const T=JSON.parse(localStorage.getItem("userSettingsPageBuilder"))||{};T.lang=A,localStorage.setItem("userSettingsPageBuilder",JSON.stringify(T)),g.value=!1}});const f=i.computed(()=>l.getBuilderStarted),x=i.computed(()=>l.getPageBuilderConfig),y=i.computed(()=>l.getMenuRight),w=i.ref(!1),v=i.ref(""),h=i.ref(""),S=function(){t.previewCurrentDesign()},k=function(){v.value=n("Preview"),S(),w.value=!0},C=i.ref(!1),L=function(){t.previewCurrentDesign()},V=function(){h.value=n("Mobile"),L(),C.value=!0},M=i.ref(!1),B=function(){M.value=!1},D=function(){w.value=!1},z=function(){C.value=!1},J=i.ref(!1),Y=i.ref(""),Z=i.ref(""),$=i.ref(null),ee=async function(){await t.clearHtmlSelection(),Y.value=n("Add Components to Page"),Z.value=n("Close"),J.value=!0,$.value=function(){J.value=!1}},U=i.computed(()=>l.getElement),Ge=i.computed(()=>l.getComponents),Ke=i.computed(()=>l.getHasLocalDraftForUpdate);i.watch(Ke,A=>{A&&vt()});const Fe=i.computed(()=>!U.value||!(U.value instanceof HTMLElement)?"":{src:U.value.getAttribute("src"),href:U.value.getAttribute("href"),style:U.value.getAttribute("style"),class:U.value.getAttribute("class"),dataImage:U.value.getAttribute("data-image")}),ct=RP();i.watch(Fe,async(A,T)=>{((A==null?void 0:A.src)!==(T==null?void 0:T.src)||(A==null?void 0:A.href)!==(T==null?void 0:T.href)||(A==null?void 0:A.style)!==(T==null?void 0:T.style)||(A==null?void 0:A.class)!==(T==null?void 0:T.class)||(A==null?void 0:A.dataImage)!==(T==null?void 0:T.dataImage))&&ct(async()=>{await t.initializeElementStyles()},200)});const Je=function(A){l.setComponent(A)},Oe=i.computed(()=>l.getIsLoadingGlobal),Ve=i.computed(()=>l.getIsSaving),yt=i.computed(()=>l.getIsLoadingResumeEditing),Be=i.computed(()=>l.getIsRestoring),wt=i.ref(1),et=i.ref(""),Ye=i.ref(!1),Xt=i.ref(""),ue=i.ref(""),I=i.ref(""),Ne=i.ref(null),kr=i.ref(null),Sr=i.ref(null),Qr=i.ref(null),Zr=i.ref(null),vt=async function(){et.value="warning",Ye.value=!0,Xt.value=n("Continue Your Work?"),ue.value=n("We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?"),I.value=n("Use Saved Version"),Ne.value=null,kr.value=n("Continue Where I Left Off"),Sr.value=async function(){l.setHasLocalDraftForUpdate(!1),Ye.value=!1},Qr.value=function(){},Zr.value=async function(){await t.resumeEditingFromDraft(),l.setHasLocalDraftForUpdate(!1),Ye.value=!1}},Vt=i.ref(1),Cr=i.ref(""),mt=i.ref(!1),Er=i.ref(""),$r=i.ref(""),eo=i.ref(""),to=i.ref(null),ro=i.ref(null),ga=i.ref(null),xa=i.ref(null),fa=i.ref(null),Il=async function(){await t.clearHtmlSelection(),Cr.value="success",mt.value=!0,Er.value=n("Do you want to reset this page?"),$r.value=n("Are you sure you want to reset this page? This will overwrite your current changes."),eo.value=n("Close"),to.value=null,ro.value=n("Reset changes"),ga.value=function(){mt.value=!1},xa.value=async function(){},fa.value=async function(){await t.restoreOriginalContent(),mt.value=!1}},Ln=function(){f.value||(M.value=!0)},E=i.ref(null),R=function(){const A=document.querySelector("#pbxEditToolbar");A&&(A.classList.remove("is-visible"),A.removeAttribute("style"))};function F(){const A=E.value,T=A&&A.querySelector("#pbxEditToolbar");if(!A||!T)return;const Q=A.querySelector("[selected]");if(Q&&typeof Q.getBoundingClientRect=="function"){const kt=Q.getBoundingClientRect(),An=A.getBoundingClientRect(),Qt=kt.left-An.left+kt.width/2-T.offsetWidth/2,Oo=kt.top-An.top+A.scrollTop-T.offsetHeight-20,Tr=Math.max(0,Oo);T.style.position="absolute",T.style.left=`${Qt}px`,T.style.top=`${Tr}px`,T.classList.add("is-visible")}else T.classList.remove("is-visible"),T.removeAttribute("style")}const X=JSON.parse(localStorage.getItem("userSettingsPageBuilder"));return i.onMounted(async()=>{await t.completeBuilderInitialization(void 0,!0),X&&X.lang&&(b.value=X.lang),x.value&&x.value.userSettings&&x.value.userSettings.language&&x.value.userSettings.language.default&&(!X||!X.lang)&&(b.value=x.value.userSettings.language.default),await a(b.value),u=!1,F();const A=E.value;if(!A)return;new MutationObserver(F).observe(A,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selected"]}),window.addEventListener("scroll",F),window.addEventListener("resize",F),await ge(1e4),Ln(),await ge(1e4),Ln(),await ge(1e4),Ln()}),(A,T)=>(i.openBlock(),i.createElementBlock("div",WP,[Oe.value&&!M.value||g.value?(i.openBlock(),i.createBlock(Bw,{key:0})):i.createCommentVNode("",!0),i.createVNode(St,{title:"The builder hasn’t started yet",showModalBuilder:M.value,onCloseMainModalBuilder:B,type:"delete",maxWidth:"2xl",noBackgroundOpacity:!0},{default:i.withCtx(()=>T[21]||(T[21]=[i.createTextVNode(" The builder hasn’t started yet. If this screen doesn’t go away soon, it may just need a little setup in the background. You can safely contact support and ask them to initialize the builder by running the startBuilder method for this resource. ")])),_:1,__:[21]},8,["showModalBuilder"]),J.value?(i.openBlock(),i.createBlock(n6,{key:1,show:J.value,firstButtonText:Z.value,title:Y.value,CustomBuilderComponents:o.CustomBuilderComponents,onFirstModalButtonSearchComponentsFunction:$.value},null,8,["show","firstButtonText","title","CustomBuilderComponents","onFirstModalButtonSearchComponentsFunction"])):i.createCommentVNode("",!0),i.createVNode(St,{title:v.value,showModalBuilder:w.value,onCloseMainModalBuilder:D,maxWidth:"screen"},{default:i.withCtx(()=>[i.createVNode(wa)]),_:1},8,["title","showModalBuilder"]),i.createVNode(St,{title:h.value,showModalBuilder:C.value,onCloseMainModalBuilder:z,maxWidth:"lg"},{default:i.withCtx(()=>[i.createVNode(wa,{mobile:!0})]),_:1},8,["title","showModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:Ye.value,isLoading:yt.value,type:et.value,gridColumnAmount:wt.value,title:Xt.value,description:ue.value,firstButtonText:I.value,secondButtonText:Ne.value,thirdButtonText:kr.value,onFirstModalButtonFunctionDynamicModalBuilder:Sr.value,onSecondModalButtonFunctionDynamicModalBuilder:Qr.value,onThirdModalButtonFunctionDynamicModalBuilder:Zr.value},{default:i.withCtx(()=>T[22]||(T[22]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[22]},8,["showDynamicModalBuilder","isLoading","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createVNode(Zt,{showDynamicModalBuilder:mt.value,isLoading:Be.value,type:Cr.value,gridColumnAmount:Vt.value,title:Er.value,description:$r.value,firstButtonText:eo.value,secondButtonText:to.value,thirdButtonText:ro.value,onFirstModalButtonFunctionDynamicModalBuilder:ga.value,onSecondModalButtonFunctionDynamicModalBuilder:xa.value,onThirdModalButtonFunctionDynamicModalBuilder:fa.value},{default:i.withCtx(()=>T[23]||(T[23]=[i.createElementVNode("header",null,null,-1),i.createElementVNode("main",null,null,-1)])),_:1,__:[23]},8,["showDynamicModalBuilder","isLoading","type","gridColumnAmount","title","description","firstButtonText","secondButtonText","thirdButtonText","onFirstModalButtonFunctionDynamicModalBuilder","onSecondModalButtonFunctionDynamicModalBuilder","onThirdModalButtonFunctionDynamicModalBuilder"]),i.createElementVNode("div",UP,[x.value&&x.value.pageBuilderLogo&&x.value.pageBuilderLogo.src?(i.openBlock(),i.createElementBlock("div",{key:0,onClick:T[0]||(T[0]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-justify-start pbx-py-2 lg:pbx-ml-4 pbx-ml-2"},[i.createElementVNode("img",{class:"pbx-h-6",src:x.value.pageBuilderLogo.src,alt:"Logo"},null,8,GP)])):i.createCommentVNode("",!0),i.createVNode(qP,{onToolbarHideRequest:R}),i.createElementVNode("div",{onClick:T[3]||(T[3]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"},[i.createElementVNode("div",KP,[i.createElementVNode("button",{class:"pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 pbx-mr-2",onClick:T[1]||(T[1]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection(),await i.unref(t).handleManualSave()},["stop"])),type:"button",disabled:Ve.value},[Ve.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",YP,T[24]||(T[24]=[i.createElementVNode("span",{class:"material-symbols-outlined"},"save",-1)]))),Ve.value?(i.openBlock(),i.createElementBlock("div",XP,T[25]||(T[25]=[i.createElementVNode("span",{class:"pbx-relative pbx-flex pbx-size-3"},[i.createElementVNode("span",{class:"pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"}),i.createElementVNode("span",{class:"pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"})],-1)]))):i.createCommentVNode("",!0),i.createElementVNode("div",null,i.toDisplayString(i.unref(n)("Save")),1)],8,JP),x.value&&x.value.updateOrCreate&&x.value.updateOrCreate.formType==="update"?(i.openBlock(),i.createElementBlock("button",{key:0,class:"pbx-mySecondaryButton pbx-h-6 pbx-flex pbx-gap-2 lg:pbx-mr-2 pbx-mr-2",onClick:T[2]||(T[2]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection(),await Il()},["stop"])),type:"button",disabled:Be.value},[Be.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("div",ZP,T[26]||(T[26]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," settings_backup_restore ",-1)]))),Be.value?(i.openBlock(),i.createElementBlock("div",$P,T[27]||(T[27]=[i.createElementVNode("span",{class:"pbx-relative pbx-flex pbx-size-3"},[i.createElementVNode("span",{class:"pbx-absolute pbx-inline-flex pbx-h-full pbx-w-full pbx-animate-ping pbx-rounded-full pbx-bg-gray-400 pbx-opacity-75"}),i.createElementVNode("span",{class:"pbx-relative pbx-inline-flex pbx-size-3 pbx-rounded-full pbx-bg-green-200"})],-1)]))):i.createCommentVNode("",!0),i.createElementVNode("div",eD,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Reset Page")),1)]),i.createElementVNode("div",tD,[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Reset")),1)])],8,QP)):i.createCommentVNode("",!0)])]),i.createElementVNode("div",{onClick:T[8]||(T[8]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex-1 pbx-flex pbx-justify-center pbx-items-center pbx-py-2 pbx-w-full"},[i.createElementVNode("div",{onClick:T[7]||(T[7]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-items-center pbx-justify-center"},[i.createElementVNode("div",{class:"pbx-mr-2",onClick:T[4]||(T[4]=()=>{i.unref(l).setComponentArrayAddMethod("unshift"),ee()})},[i.createElementVNode("div",rD,[i.createElementVNode("span",oD,[i.createElementVNode("div",nD,i.toDisplayString(i.unref(n)("Add new Components")),1)]),T[28]||(T[28]=i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ")],-1))])]),i.createElementVNode("div",iD,[i.createElementVNode("div",{onClick:T[5]||(T[5]=async()=>{i.unref(l).setMenuRight(!1),i.unref(l).setElement(null),await i.unref(t).clearHtmlSelection(),k()})},T[29]||(T[29]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},[i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," visibility ")])],-1)]))]),i.createElementVNode("div",aD,[i.createElementVNode("div",{onClick:T[6]||(T[6]=async()=>{i.unref(l).setMenuRight(!1),i.unref(l).setElement(null),await i.unref(t).clearHtmlSelection(),V()})},T[30]||(T[30]=[i.createElementVNode("div",{class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2"},[i.createElementVNode("span",{class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"material-symbols-outlined"}," phone_iphone ")])],-1)]))])])]),i.createElementVNode("div",sD,[i.createElementVNode("div",{onClick:T[9]||(T[9]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:i.normalizeClass(["pbx-flex pbx-items-center pbx-py-2 pbx-w-full",[r.showCloseButton?"pbx-justify-between":"pbx-justify-end"]])},[i.createVNode(_P)],2),r.showPublishButton?(i.openBlock(),i.createElementBlock("div",lD,[i.createElementVNode("button",{class:"pbx-myPrimaryButton",onClick:T[10]||(T[10]=async()=>{c()})},i.toDisplayString(i.unref(n)("Publish")),1)])):i.createCommentVNode("",!0),i.unref(t)&&x.value&&x.value.userSettings&&x.value.userSettings.language&&!x.value.userSettings.language.disableLanguageDropDown?(i.openBlock(),i.createElementBlock(i.Fragment,{key:1},[x.value&&x.value.userSettings&&x.value.userSettings.language?(i.openBlock(),i.createElementBlock("div",pD,[i.withDirectives(i.createElementVNode("select",{id:"pbx-lang",class:"pbx-myPrimarySelect pbx-min-w-20","onUpdate:modelValue":T[11]||(T[11]=Q=>b.value=Q)},[Array.isArray(x.value.userSettings.language.enable)&&x.value.userSettings.language.enable.length>=1?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:0},i.renderList(i.unref(t).availableLanguage().filter(Q=>x.value.userSettings.language.enable.includes(Q)),Q=>(i.openBlock(),i.createElementBlock("option",{key:Q,value:Q},i.toDisplayString(Q),9,dD))),128)):i.createCommentVNode("",!0),!x.value.userSettings.language.enable||Array.isArray(x.value.userSettings.language.enable)&&x.value.userSettings.language.enable.length===0?(i.openBlock(!0),i.createElementBlock(i.Fragment,{key:1},i.renderList(i.unref(t).availableLanguage(),Q=>(i.openBlock(),i.createElementBlock("option",{key:Q,value:Q},i.toDisplayString(Q),9,cD))),128)):i.createCommentVNode("",!0)],512),[[i.vModelSelect,b.value]])])):i.createCommentVNode("",!0)],64)):i.createCommentVNode("",!0),r.showCloseButton?(i.openBlock(),i.createElementBlock("div",mD,[i.createElementVNode("button",{class:"pbx-h-10 pbx-w-10 pbx-flex-end pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white hover:pbx-fill-white focus-visible:pbx-ring-0",onClick:T[12]||(T[12]=async()=>{d(),await i.unref(t).clearHtmlSelection()})},T[31]||(T[31]=[i.createElementVNode("span",{class:"material-symbols-outlined"}," close ",-1)]))])):i.createCommentVNode("",!0)])]),i.createElementVNode("div",bD,[i.createElementVNode("div",{onClick:T[15]||(T[15]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),id:"pagebuilder-left-menu",class:"pbx-w-16 pbx-pt-7 pbx-pb-2 pbx-bg-myPrimaryLightGrayColor pbx-rounded-r-2xl pbx-shadow-sm"},[i.createElementVNode("div",uD,[i.createElementVNode("div",gD,[i.createElementVNode("button",{type:"button",onClick:T[13]||(T[13]=()=>{i.unref(l).setComponentArrayAddMethod("unshift"),ee()}),class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},T[32]||(T[32]=[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ",-1)]))]),i.createElementVNode("div",{onClick:T[14]||(T[14]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"]))},[U.value?(i.openBlock(),i.createBlock(dv,{key:0})):i.createCommentVNode("",!0)])])]),i.createElementVNode("main",{ref_key:"pbxBuilderWrapper",ref:E,id:"page-builder-wrapper",class:i.normalizeClass(["pbx-transition-all pbx-duration-300 pbx-font-sans pbx-p-1 pbx-flex pbx-flex-col pbx-grow pbx-rounded-tr-2xl pbx-rounded-tl-2xl pbx-border-solid pbx-border pbx-border-gray-200 pbx-items-stretch pbx-text-black pbx-h-[100vh] pbx-overflow-y-scroll pbx-relative pbx-pt-16",[(y.value,"pbx-w-full")]])},[i.createElementVNode("div",xD,[U.value?(i.openBlock(),i.createBlock(xT,{key:0})):i.createCommentVNode("",!0)]),i.createElementVNode("div",fD,[(i.openBlock(!0),i.createElementBlock(i.Fragment,null,i.renderList(Ge.value,Q=>(i.openBlock(),i.createElementBlock(i.Fragment,{key:Q.id},[Q.html_code?(i.openBlock(),i.createElementBlock("div",{key:0,innerHTML:Q.html_code,onMouseup:kt=>Je(Q)},null,40,hD)):i.createCommentVNode("",!0)],64))),128))])],2),i.createVNode(i.Transition,{name:"slide-right",appear:"",mode:"out-in"},{default:i.withCtx(()=>[y.value?(i.openBlock(),i.createElementBlock("aside",{key:0,"aria-label":"menu",id:"pagebuilder-right-menu",class:i.normalizeClass(["pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2",[y.value?"pbx-w-80 pbx-bg-myPrimaryLightGrayColor pbx-items-stretch":"bpx-w-0 pbx-mr-0"]])},[i.createVNode(pN,{onCloseEditor:T[16]||(T[16]=Q=>i.unref(l).setMenuRight(!1))})],2)):(i.openBlock(),i.createElementBlock("div",{key:1,onClick:T[19]||(T[19]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-w-18 pbx-bg-myPrimaryLightGrayColor pbx-pt-5 pbx-z-20 pbx-flex-shrink-0 pbx-overflow-hidden pbx-border-0 pbx-border-solid pbx-border-l-0 pbx-border-l-gray-600 pbx-rounded-l-2xl pbx-h-[100vh] pbx-pl-2 pbx-pr-2"},[i.createElementVNode("div",{onClick:T[18]||(T[18]=i.withModifiers(async()=>{await i.unref(t).clearHtmlSelection()},["self"])),class:"pbx-flex pbx-flex-col pbx-items-center pbx-justify-center pbx-gap-2"},[y.value?i.createCommentVNode("",!0):(i.openBlock(),i.createElementBlock("button",{key:0,onClick:T[17]||(T[17]=Q=>i.unref(l).setMenuRight(!0)),type:"button",class:"pbx-mySecondaryButton pbx-px-2 pbx-text-xs"},[i.createElementVNode("span",null,i.toDisplayString(i.unref(n)("Styles")),1)]))])]))]),_:1})]),i.createElementVNode("div",yD,[i.createElementVNode("div",{onClick:T[20]||(T[20]=()=>{i.unref(l).setComponentArrayAddMethod("push"),ee()}),class:"pbx-flex pbx-items-center pbx-justify-center pbx-gap-2 pbx-cursor-pointer"},[i.createElementVNode("span",wD,[i.createElementVNode("div",vD,i.toDisplayString(i.unref(n)("Add to the bottom")),1)]),T[33]||(T[33]=i.createElementVNode("div",{class:"pbx-flex pbx-gap-2 pbx-items-center pbx-justify-center"},[i.createElementVNode("button",{type:"button",class:"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"},[i.createElementVNode("span",{class:"pbx-myMediumIcon material-symbols-outlined"}," interests ")])],-1))])])]))}},SD={install:r=>{if(!r.config.globalProperties.$pageBuilder){const e=ne,t=new Jw(e);Yw(t),r.config.globalProperties.$pageBuilder=t}}};le.PageBuilder=kD,le.Preview=wa,le.createPinia=U0,le.getPageBuilder=ie,le.pageBuilder=SD,le.sharedPageBuilderPinia=Bl,le.sharedPageBuilderStore=ne,le.usePageBuilderModal=yw,le.usePageBuilderStateStore=Z0,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});