vue-spear-tip 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/dist/.vite/manifest.json +32 -32
- package/dist/Button-BQORA3S3.cjs +1 -0
- package/dist/{Button-Cy7jEHLM.js → Button-DwDDnkJ2.js} +10 -9
- package/dist/{CodeHighlight-CSW79iY2.cjs → CodeHighlight-B2EtGg7D.cjs} +1 -1
- package/dist/{CodeHighlight-CuTTU4UN.js → CodeHighlight-DDBt4a2w.js} +1 -1
- package/dist/{DateField-BovgLNIo.cjs → DateField-C6NQPL5q.cjs} +1 -1
- package/dist/{DateField-B8ST8d-c.js → DateField-Ckx9ExzG.js} +2 -2
- package/dist/{FieldComponent.vue_vue_type_script_lang-NXJrzI_q.cjs → FieldComponent.vue_vue_type_script_lang-B017zNVf.cjs} +1 -1
- package/dist/{FieldComponent.vue_vue_type_script_lang-B95EQa3m.js → FieldComponent.vue_vue_type_script_lang-DUI8IzRb.js} +1 -1
- package/dist/Interfaces/IBaseVueComponent.d.ts +14 -2
- package/dist/Interfaces/IGlobalVST.d.ts +2 -0
- package/dist/Interfaces/IHammer.d.ts +21 -20
- package/dist/{SelectField-Cef8GmrK.cjs → SelectField-BB2JA4k3.cjs} +1 -1
- package/dist/{SelectField-B3oJ3ew_.js → SelectField-NtGtAdE3.js} +2 -2
- package/dist/{StringField-C_0SQJtB.cjs → StringField-BUvHLCrh.cjs} +1 -1
- package/dist/{StringField-CpJ-m5vv.js → StringField-PTRYYsgm.js} +2 -2
- package/dist/{SwitchField-Cwz6URRI.js → SwitchField-DY8gbvsa.js} +2 -2
- package/dist/{SwitchField-Bxnmn3_v.cjs → SwitchField-Dy6M3r7M.cjs} +1 -1
- package/dist/{Tabs-BjV7e7zW.cjs → Tabs-B1T_tUZm.cjs} +1 -1
- package/dist/{Tabs-Oh-CuKbc.js → Tabs-UvuD8J2A.js} +1 -1
- package/dist/{TextField-DqWsZ9jJ.js → TextField-CE_xkwuN.js} +2 -2
- package/dist/{TextField-Z-1KUVIn.cjs → TextField-CfKfflUG.cjs} +1 -1
- package/dist/{index-CwPJq1hT.js → index-6k-wx20w.js} +1708 -1668
- package/dist/index-RogxxnFA.cjs +3 -0
- package/dist/replaceable/BaseComponent.vue +78 -25
- package/dist/vue-spear-tip.cjs.js +1 -1
- package/dist/vue-spear-tip.css +1 -1
- package/dist/vue-spear-tip.es.js +1 -1
- package/docs/index.html +1 -1
- package/docs/static/Button-BhH1sSSk.js +1 -0
- package/docs/static/Button-Bz5IrKU7.css +1 -0
- package/docs/static/{CodeHighlight-B_7PLTKQ.js → CodeHighlight-CbRq55Pj.js} +1 -1
- package/docs/static/{DateField-DrDO3IrS.js → DateField-C257beyk.js} +1 -1
- package/docs/static/{FieldComponent.vue_vue_type_script_lang-DIszkOwN.js → FieldComponent.vue_vue_type_script_lang-D-Fg_wy_.js} +1 -1
- package/docs/static/{NoSymbolIcon-Ckw4IyE_.js → NoSymbolIcon-Bt8TQGfd.js} +1 -1
- package/docs/static/{SelectField-sgvmO5I7.js → SelectField-DCA_5xZp.js} +1 -1
- package/docs/static/{StringField-C70N6el3.js → StringField-Cy98DXXI.js} +1 -1
- package/docs/static/{SwitchField-Bl7ivvty.js → SwitchField-Dro4oU_U.js} +1 -1
- package/docs/static/{Tabs-DaIxLS7M.js → Tabs-BravGX2X.js} +1 -1
- package/docs/static/{TextField-CLK9ekro.js → TextField-OTKiDQDO.js} +1 -1
- package/docs/static/index-WMeaz5NS.js +2 -0
- package/docs/static/{main-BA_xYI7Q.js → main-DEBPJr9o.js} +5 -5
- package/package.json +1 -1
- package/dist/Button-DRCriWgK.cjs +0 -1
- package/dist/index-D3Eee-TB.cjs +0 -3
- package/docs/static/Button-BuXt8FG8.css +0 -1
- package/docs/static/Button-DidCmw8I.js +0 -1
- package/docs/static/index-BWUXjbQn.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});import{P as U,W as ot,V as xt,c as Dt,o as It,a as Nt,n as Et,b as Mt}from"./main-BA_xYI7Q.js";import{F as _t}from"./FieldComponent.vue_vue_type_script_lang-DIszkOwN.js";var lt="​";function Y(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Y,"e");function dt(t){return(function(e){if(Array.isArray(e))return Y(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return Y(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},q=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return at(i,e)}))},"a");function at(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(at,"o");function Z(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(Z,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function M(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(M,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(M(l[d])){M(o[d])?a(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;M(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function J(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(J,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function B(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(B,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(wt,"b");function Tt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function V(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(V,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&V(n)}}))}r(Ot,"O");var tt={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function At(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(At,"x");function Ct(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){At(t,s,i[s])}))}return t}r(Ct,"S");function kt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(kt,"I");function et(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(et,"E");function Vt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Vt,"M");function Lt(t){return(function(e){if(Array.isArray(e))return et(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return et(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Lt,"N");function Pt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Pt,"A");var $,H,jt=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Vt(t,s,i[s])}))}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then((function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),i.hooks.suggestionClick(t,{tagify:e,tagData:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var k=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(k),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}}))}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),n=this.suggestedListItems.length;n--;){if(M(e=this.suggestedListItems[n])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find((function(e){return e.getAttribute("value")===t}))},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(n),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.dropdown.refilter(),i&&i()}),100)}),{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,n,s,a,o,l,d=r(function(){var b,k,P=void 0,j=void 0;b=p[I],n=((k=Object)!=null&&typeof Symbol<"u"&&k[Symbol.hasInstance]?k[Symbol.hasInstance](b):b instanceof k)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,E){return x+" "+(n[E]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=J(a),l=J(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var E=""+(n[x]||"");return g.accentedSearch&&(E=J(E),l=J(l)),g.caseSensitive||(E=E.toLowerCase()),j=E===l,e.exact?E===l:E.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(M(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(M(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[kt(Ct({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),H=(H={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return Lt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(M(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout((function(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),setTimeout((function(){e.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.DOM.dropdown.classList.remove(a.classNames.dropdownInital)})))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",k=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,E=O.getRangeAt(0),z=E.startContainer,Q=E.startOffset;if(Q>0)return(x=document.createRange()).setStart(z,Q-1),x.setEnd(z,Q),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(z.getBoundingClientRect)return z.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=k.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?H:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(H)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(H)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(H,t))})),$),K="@yaireo/tagify/",Ft={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Rt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
1
|
+
var St=Object.defineProperty;var r=(t,e)=>St(t,"name",{value:e,configurable:!0});import{P as U,W as ot,V as xt,c as Dt,o as It,a as Nt,n as Et,b as Mt}from"./main-DEBPJr9o.js";import{F as _t}from"./FieldComponent.vue_vue_type_script_lang-D-Fg_wy_.js";var lt="​";function Y(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(Y,"e");function dt(t){return(function(e){if(Array.isArray(e))return Y(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return Y(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Y(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(dt,"i");var L={isEnabled:r(function(){var t;return(t=window.TAGIFY_DEBUG)===null||t===void 0||t},"isEnabled"),log:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).log.apply(n,["[Tagify]:"].concat(dt(e)))},"log"),warn:r(function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var n;this.isEnabled()&&(n=console).warn.apply(n,["[Tagify]:"].concat(dt(e)))},"warn")},q=r(function(t,e,i,n){return t=""+t,e=""+e,n&&(t=t.trim(),e=e.trim()),i?t==e:t.toLowerCase()==e.toLowerCase()},"s"),ut=r(function(t,e){return t&&Array.isArray(t)&&t.map((function(i){return at(i,e)}))},"a");function at(t,e){var i,n={};for(i in t)e.indexOf(i)<0&&(n[i]=t[i]);return n}r(at,"o");function Z(t){return new DOMParser().parseFromString(t.trim(),"text/html").body.firstElementChild}r(Z,"r");function ct(t,e){for(e=e||"previous";t=t[e+"Sibling"];)if(t.nodeType==3)return t}r(ct,"l");function R(t){return typeof t=="string"?t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/`|'/g,"'"):t}r(R,"d");function M(t){var e=Object.prototype.toString.call(t).split(" ")[1].slice(0,-1);return t===Object(t)&&e!="Array"&&e!="Function"&&e!="RegExp"&&e!="HTMLUnknownElement"}r(M,"c");function w(t,e,i){var n,s;function a(o,l){for(var d in l)if(l.hasOwnProperty(d)){if(M(l[d])){M(o[d])?a(o[d],l[d]):o[d]=Object.assign({},l[d]);continue}if(Array.isArray(l[d])){o[d]=Object.assign([],l[d]);continue}o[d]=l[d]}}return r(a,"a"),n=t,((s=Object)!=null&&typeof Symbol<"u"&&s[Symbol.hasInstance]?s[Symbol.hasInstance](n):n instanceof s)||(t={}),a(t,e),i&&a(t,i),t}r(w,"u");function gt(){var t=[],e={},i=!0,n=!1,s=void 0;try{for(var a,o=arguments[Symbol.iterator]();!(i=(a=o.next()).done);i=!0){var l=a.value,d=!0,u=!1,c=void 0;try{for(var g,h=l[Symbol.iterator]();!(d=(g=h.next()).done);d=!0){var f=g.value;M(f)?e[f.value]||(t.push(f),e[f.value]=1):t.includes(f)||t.push(f)}}catch(p){u=!0,c=p}finally{try{d||h.return==null||h.return()}finally{if(u)throw c}}}}catch(p){n=!0,s=p}finally{try{i||o.return==null||o.return()}finally{if(n)throw s}}return t}r(gt,"g");function J(t){return String.prototype.normalize?typeof t=="string"?t.normalize("NFD").replace(/[\u0300-\u036f]/g,""):void 0:t}r(J,"h");var ht=r(function(){return/(?=.*chrome)(?=.*android)/i.test(navigator.userAgent)},"p");function pt(){return("10000000-1000-4000-8000"+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}r(pt,"f");function B(t){var e,i=wt.call(this,t),n=t==null||(e=t.classList)===null||e===void 0?void 0:e.contains(this.settings.classNames.tag);return i&&n}r(B,"m");function ft(t){return wt.call(this,t)&&t?.closest(this.settings.classNames.tagSelector)}r(ft,"v");function wt(t){var e;return(t==null||(e=t.closest)===null||e===void 0?void 0:e.call(t,this.settings.classNames.namespaceSelector))===this.DOM.scope}r(wt,"b");function Tt(t,e){var i=window.getSelection();return e=e||i.getRangeAt(0),typeof t=="string"&&(t=document.createTextNode(t)),e&&(e.deleteContents(),e.insertNode(t)),t}r(Tt,"w");function y(t,e,i){return t?(e&&(t.__tagifyTagData=i?e:w({},t.__tagifyTagData||{},e)),t.__tagifyTagData):(L.warn("tag element doesn't exist",{tagElm:t,data:e}),e)}r(y,"y");function V(t){if(t&&t.parentNode){var e=t,i=window.getSelection(),n=i.getRangeAt(0);i.rangeCount&&(n.setStartAfter(e),n.collapse(!0),i.removeAllRanges(),i.addRange(n))}}r(V,"T");function Ot(t,e){t.forEach((function(i){if(y(i.previousSibling)||!i.previousSibling){var n=document.createTextNode("");i.before(n),e&&V(n)}}))}r(Ot,"O");var tt={delimiters:",",pattern:null,tagTextProp:"value",maxTags:1/0,callbacks:{},addTagOnBlur:!0,addTagOn:["blur","tab","enter"],onChangeAfterBlur:!0,duplicates:!1,whitelist:[],blacklist:[],enforceWhitelist:!1,userInput:!0,focusable:!0,focusInputOnRemove:!0,keepInvalidTags:!1,createInvalidTags:!0,mixTagsAllowedAfter:/,|\.|\:|\s/,mixTagsInterpolator:["[[","]]"],backspace:!0,skipInvalid:!1,pasteAsTags:!0,editTags:{clicks:2,keepInvalid:!0},transformTag:r(function(){},"transformTag"),trim:!0,a11y:{focusableTags:!1},mixMode:{insertAfterTag:" "},autoComplete:{enabled:!0,rightKey:!1,tabKey:!1},classNames:{namespace:"tagify",mixMode:"tagify--mix",selectMode:"tagify--select",input:"tagify__input",focus:"tagify--focus",tagNoAnimation:"tagify--noAnim",tagInvalid:"tagify--invalid",tagNotAllowed:"tagify--notAllowed",scopeLoading:"tagify--loading",hasMaxTags:"tagify--hasMaxTags",hasNoTags:"tagify--noTags",empty:"tagify--empty",inputInvalid:"tagify__input--invalid",dropdown:"tagify__dropdown",dropdownWrapper:"tagify__dropdown__wrapper",dropdownHeader:"tagify__dropdown__header",dropdownFooter:"tagify__dropdown__footer",dropdownItem:"tagify__dropdown__item",dropdownItemActive:"tagify__dropdown__item--active",dropdownItemHidden:"tagify__dropdown__item--hidden",dropdownItemSelected:"tagify__dropdown__item--selected",dropdownInital:"tagify__dropdown--initial",tag:"tagify__tag",tagText:"tagify__tag-text",tagX:"tagify__tag__removeBtn",tagLoading:"tagify__tag--loading",tagEditing:"tagify__tag--editable",tagFlash:"tagify__tag--flash",tagHide:"tagify__tag--hide"},dropdown:{classname:"",enabled:2,maxItems:10,searchKeys:["value","searchBy"],fuzzySearch:!0,caseSensitive:!1,accentedSearch:!0,includeSelectedTags:!1,escapeHTML:!0,highlightFirst:!0,closeOnSelect:!0,clearOnSelect:!0,position:"all",appendTarget:null},hooks:{beforeRemoveTag:r(function(){return Promise.resolve()},"beforeRemoveTag"),beforePaste:r(function(){return Promise.resolve()},"beforePaste"),suggestionClick:r(function(){return Promise.resolve()},"suggestionClick"),beforeKeyDown:r(function(){return Promise.resolve()},"beforeKeyDown")}};function At(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(At,"x");function Ct(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){At(t,s,i[s])}))}return t}r(Ct,"S");function kt(t,e){return e=e??{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):(function(i,n){var s=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);s.push.apply(s,a)}return s})(Object(e)).forEach((function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(e,i))})),t}r(kt,"I");function et(t,e){(e==null||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}r(et,"E");function Vt(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}r(Vt,"M");function Lt(t){return(function(e){if(Array.isArray(e))return et(e)})(t)||(function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)})(t)||(function(e,i){if(e){if(typeof e=="string")return et(e,i);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return et(e,i)}})(t)||(function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")})()}r(Lt,"N");function Pt(){for(var t in this.dropdown={},this._dropdown)this.dropdown[t]=typeof this._dropdown[t]=="function"?this._dropdown[t].bind(this):this._dropdown[t];this.dropdown.refs(),this.DOM.dropdown.__tagify=this}r(Pt,"A");var $,H,jt=($=(function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{},n=Object.keys(i);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(i).filter((function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})))),n.forEach((function(s){Vt(t,s,i[s])}))}return t})({},{events:{binding:r(function(){var t=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],e=this.dropdown.events.callbacks,i=this.listeners.dropdown=this.listeners.dropdown||{position:this.dropdown.position.bind(this,null),onKeyDown:e.onKeyDown.bind(this),onMouseOver:e.onMouseOver.bind(this),onMouseLeave:e.onMouseLeave.bind(this),onClick:e.onClick.bind(this),onScroll:e.onScroll.bind(this)},n=t?"addEventListener":"removeEventListener";this.settings.dropdown.position!="manual"&&(document[n]("scroll",i.position,!0),window[n]("resize",i.position),window[n]("keydown",i.onKeyDown)),this.DOM.dropdown[n]("mouseover",i.onMouseOver),this.DOM.dropdown[n]("mouseleave",i.onMouseLeave),this.DOM.dropdown[n]("mousedown",i.onClick),this.DOM.dropdown.content[n]("scroll",i.onScroll)},"binding"),callbacks:{onKeyDown:r(function(t){var e=this;if(this.state.hasFocus&&!this.state.composing){var i=this.settings,n=i.dropdown.includeSelectedTags,s=this.DOM.dropdown.querySelector(i.classNames.dropdownItemActiveSelector),a=this.dropdown.getSuggestionDataByNode(s),o=i.mode=="mix",l=i.mode=="select";i.hooks.beforeKeyDown(t,{tagify:this}).then((function(d){switch(t.key){case"ArrowDown":case"ArrowUp":case"Down":case"Up":t.preventDefault();var u=e.dropdown.getAllSuggestionsRefs(),c=t.key=="ArrowUp"||t.key=="Up";s&&(s=e.dropdown.getNextOrPrevOption(s,!c)),s&&s.matches(i.classNames.dropdownItemSelector)||(s=u[c?u.length-1:0]),e.dropdown.highlightOption(s,!0);break;case"PageUp":case"PageDown":var g;t.preventDefault();var h=e.dropdown.getAllSuggestionsRefs(),f=Math.floor(e.DOM.dropdown.content.clientHeight/((g=h[0])===null||g===void 0?void 0:g.offsetHeight))||1,p=t.key==="PageUp";if(s){var m=h.indexOf(s),v=p?Math.max(0,m-f):Math.min(h.length-1,m+f);s=h[v]}else s=h[0];e.dropdown.highlightOption(s,!0);break;case"Home":case"End":t.preventDefault();var T=e.dropdown.getAllSuggestionsRefs();s=T[t.key==="Home"?0:T.length-1],e.dropdown.highlightOption(s,!0);break;case"Escape":case"Esc":e.dropdown.hide();break;case"ArrowRight":if(e.state.actions.ArrowLeft||i.autoComplete.rightKey)return;case"Tab":var D=!i.autoComplete.rightKey||!i.autoComplete.tabKey;if(!o&&!l&&s&&D&&!e.state.editing&&a){t.preventDefault();var I=e.dropdown.getMappedValue(a);return e.state.autoCompleteData=a,e.input.autocomplete.set.call(e,I),!1}return!0;case"Enter":t.preventDefault(),e.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),i.hooks.suggestionClick(t,{tagify:e,tagData:a,suggestionElm:s}).then((function(){if(s){var b=n?s:e.dropdown.getNextOrPrevOption(s,!c);e.dropdown.selectOption(s,t,(function(){if(b){var k=b.getAttribute("value");b=e.dropdown.getSuggestionNodeByValue(k),e.dropdown.highlightOption(b)}}))}else e.dropdown.hide(),o||e.addTags(e.state.inputText.trim(),!0)})).catch((function(b){return L.warn(b)}));break;case"Backspace":if(o||e.state.editing.scope)return;var N=e.input.raw.call(e);N!=""&&N.charCodeAt(0)!=8203||(i.backspace===!0?e.removeTags():i.backspace=="edit"&&setTimeout(e.editTag.bind(e),0))}}))}},"onKeyDown"),onMouseOver:r(function(t){var e=t.target.closest(this.settings.classNames.dropdownItemSelector);this.dropdown.highlightOption(e)},"onMouseOver"),onMouseLeave:r(function(t){this.dropdown.highlightOption()},"onMouseLeave"),onClick:r(function(t){var e=this;if(t.button==0&&t.target!=this.DOM.dropdown&&t.target!=this.DOM.dropdown.content){var i=t.target.closest(this.settings.classNames.dropdownItemSelector),n=this.dropdown.getSuggestionDataByNode(i);this.state.actions.selectOption=!0,setTimeout((function(){return e.state.actions.selectOption=!1}),100),this.settings.hooks.suggestionClick(t,{tagify:this,tagData:n,suggestionElm:i}).then((function(){i?e.dropdown.selectOption(i,t):e.dropdown.hide()})).catch((function(s){return L.warn(s)}))}},"onClick"),onScroll:r(function(t){var e=t.target,i=e.scrollTop/(e.scrollHeight-e.parentNode.clientHeight)*100;this.trigger("dropdown:scroll",{percentage:Math.round(i)})},"onScroll")}},refilter:r(function(t){t=t||this.state.dropdown.query||"",this.suggestedListItems=this.dropdown.filterListItems(t),this.dropdown.fill(),this.suggestedListItems.length||this.dropdown.hide(),this.trigger("dropdown:updated",this.DOM.dropdown)},"refilter"),getSuggestionDataByNode:r(function(t){for(var e,i=t&&t.getAttribute("value"),n=this.suggestedListItems.length;n--;){if(M(e=this.suggestedListItems[n])&&e.value==i)return e;if(e==i)return{value:e}}},"getSuggestionDataByNode"),getSuggestionNodeByValue:r(function(t){return this.dropdown.getAllSuggestionsRefs().find((function(e){return e.getAttribute("value")===t}))},"getSuggestionNodeByValue"),getNextOrPrevOption:r(function(t){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.dropdown.getAllSuggestionsRefs(),n=i.findIndex((function(s){return s===t}));return e?i[n+1]:i[n-1]},"getNextOrPrevOption"),highlightOption:r(function(t,e){var i,n=this.settings.classNames.dropdownItemActive;if(this.state.ddItemElm&&(this.state.ddItemElm.classList.remove(n),this.state.ddItemElm.removeAttribute("aria-selected")),!t)return this.state.ddItemData=null,this.state.ddItemElm=null,void this.input.autocomplete.suggest.call(this);i=this.dropdown.getSuggestionDataByNode(t),this.state.ddItemData=i,this.state.ddItemElm=t,t.classList.add(n),t.setAttribute("aria-selected",!0),e&&(t.parentNode.scrollTop=t.clientHeight+t.offsetTop-t.parentNode.clientHeight),this.settings.autoComplete&&(this.input.autocomplete.suggest.call(this,i),this.dropdown.position())},"highlightOption"),selectOption:r(function(t,e,i){var n=this,s=this.settings,a=s.dropdown.includeSelectedTags,o=s.dropdown,l=o.clearOnSelect,d=o.closeOnSelect;if(!t)return this.addTags(this.state.inputText,!0),void(d&&this.dropdown.hide());e=e||{};var u=t.getAttribute("value"),c=u=="noMatch",g=s.mode=="mix",h=this.suggestedListItems.find((function(p){var m;return((m=p.value)!==null&&m!==void 0?m:p)==u}));if(this.trigger("dropdown:select",{data:h,elm:t,event:e}),h||c){if(this.state.editing){var f=this.normalizeTags([h])[0];h=s.transformTag.call(this,f)||f,this.onEditTagDone(null,w({__isValid:!0},h))}else this[g?"addMixTags":"addTags"]([h||this.input.raw.call(this)],l);(g||this.DOM.input.parentNode)&&(setTimeout((function(){n.DOM.input.focus(),n.toggleFocusClass(!0)})),d&&setTimeout(this.dropdown.hide.bind(this)),a?i&&i():(t.addEventListener("transitionend",(function(){n.dropdown.fillHeaderFooter(),setTimeout((function(){t.remove(),n.dropdown.refilter(),i&&i()}),100)}),{once:!0}),t.classList.add(this.settings.classNames.dropdownItemHidden)))}else d&&setTimeout(this.dropdown.hide.bind(this))},"selectOption"),selectAll:r(function(t){this.suggestedListItems.length=0,this.dropdown.hide(),this.dropdown.filterListItems("");var e=this.dropdown.filterListItems("");return t||(e=this.state.dropdown.suggestions),this.addTags(e,!0),this},"selectAll"),filterListItems:r(function(t,e){var i,n,s,a,o,l,d=r(function(){var b,k,P=void 0,j=void 0;b=p[I],n=((k=Object)!=null&&typeof Symbol<"u"&&k[Symbol.hasInstance]?k[Symbol.hasInstance](b):b instanceof k)?p[I]:{value:p[I]};var O,S=Object.keys(n).some((function(x){return D.includes(x)}))?D:["value"];g.fuzzySearch&&!e.exact?(a=S.reduce((function(x,E){return x+" "+(n[E]||"")}),"").toLowerCase().trim(),g.accentedSearch&&(a=J(a),l=J(l)),P=a.indexOf(l)==0,j=a===l,O=a,s=l.toLowerCase().split(" ").every((function(x){return O.includes(x.toLowerCase())}))):(P=!0,s=S.some((function(x){var E=""+(n[x]||"");return g.accentedSearch&&(E=J(E),l=J(l)),g.caseSensitive||(E=E.toLowerCase()),j=E===l,e.exact?E===l:E.indexOf(l)==0}))),o=!g.includeSelectedTags&&i.isTagDuplicate(M(n)?n.value:n),s&&!o&&(j&&P?f.push(n):g.sortby=="startsWith"&&P?h.unshift(n):h.push(n))},"l"),u=this,c=this.settings,g=c.dropdown,h=(e=e||{},[]),f=[],p=c.whitelist,m=g.maxItems>=0?g.maxItems:1/0,v=g.includeSelectedTags,T=typeof g.sortby=="function",D=g.searchKeys,I=0;if(!(t=c.mode=="select"&&this.value.length&&this.value[0][c.tagTextProp]==t?"":t)||!D.length){h=v?p:p.filter((function(b){return!u.isTagDuplicate(M(b)?b.value:b)}));var N=T?g.sortby(h,l):h.slice(0,m);return this.state.dropdown.suggestions=N,N}for(l=g.caseSensitive?""+t:(""+t).toLowerCase();I<p.length;I++)i=this,d();return this.state.dropdown.suggestions=f.concat(h),N=T?g.sortby(f.concat(h),l):f.concat(h).slice(0,m),this.state.dropdown.suggestions=N,N},"filterListItems"),getMappedValue:r(function(t){var e=this.settings.dropdown.mapValueTo;return e?typeof e=="function"?e(t):t[e]||t.value:t.value},"getMappedValue"),createListHTML:r(function(t){var e=this;return w([],t).map((function(i,n){typeof i!="string"&&typeof i!="number"||(i={value:i});var s=e.dropdown.getMappedValue(i);return s=typeof s=="string"&&e.settings.dropdown.escapeHTML?R(s):s,e.settings.templates.dropdownItem.apply(e,[kt(Ct({},i),{mappedValue:s}),e])})).join("")},"createListHTML")}),H=(H={refs:r(function(){this.DOM.dropdown=this.parseTemplate("dropdown",[this.settings]),this.DOM.dropdown.content=this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-wrapper']")},"refs"),getHeaderRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-header']")},"getHeaderRef"),getFooterRef:r(function(){return this.DOM.dropdown.querySelector("[data-selector='tagify-suggestions-footer']")},"getFooterRef"),getAllSuggestionsRefs:r(function(){return Lt(this.DOM.dropdown.content.querySelectorAll(this.settings.classNames.dropdownItemSelector))},"getAllSuggestionsRefs"),show:r(function(t){var e,i,n,s=this,a=this.settings,o=a.mode=="mix"&&!a.enforceWhitelist,l=!a.whitelist||!a.whitelist.length,d=a.dropdown.position=="manual";if(t=t===void 0?this.state.inputText:t,!(l&&!o&&!a.templates.dropdownItemNoMatch||a.dropdown.enabled===!1||this.state.isLoading||this.settings.readonly)){if(clearTimeout(this.dropdownHide__bindEventsTimeout),this.suggestedListItems=this.dropdown.filterListItems(t),t&&!this.suggestedListItems.length&&(this.trigger("dropdown:noMatch",t),a.templates.dropdownItemNoMatch&&(n=a.templates.dropdownItemNoMatch.call(this,{value:t}))),!n){if(this.suggestedListItems.length)t&&o&&!this.state.editing.scope&&!q(this.suggestedListItems[0].value,t)&&this.suggestedListItems.unshift({value:t});else{if(!t||!o||this.state.editing.scope)return this.input.autocomplete.suggest.call(this),void this.dropdown.hide();this.suggestedListItems=[{value:t}]}i=""+(M(e=this.suggestedListItems[0])?e.value:e),a.autoComplete&&i&&i.indexOf(t)==0&&this.input.autocomplete.suggest.call(this,e)}this.dropdown.fill(n),a.dropdown.highlightFirst&&this.dropdown.highlightOption(this.DOM.dropdown.content.querySelector(a.classNames.dropdownItemSelector)),this.state.dropdown.visible||setTimeout(this.dropdown.events.binding.bind(this)),this.state.dropdown.visible=t||!0,this.state.dropdown.query=t,this.setStateSelection(),d||setTimeout((function(){s.dropdown.position(),s.dropdown.render()})),setTimeout((function(){s.trigger("dropdown:show",s.DOM.dropdown)}))}},"show"),hide:r(function(t){var e=this,i=this.DOM,n=i.scope,s=i.dropdown,a=this.settings.dropdown.position=="manual"&&!t;if(s&&document.body.contains(s)&&!a)return window.removeEventListener("resize",this.dropdown.position),this.dropdown.events.binding.call(this,!1),n.setAttribute("aria-expanded",!1),s.parentNode.removeChild(s),setTimeout((function(){e.state.dropdown.visible=!1}),100),this.state.dropdown.query=this.state.ddItemData=this.state.ddItemElm=this.state.selection=null,this.state.tag&&this.state.tag.value.length&&(this.state.flaggedTags[this.state.tag.baseOffset]=this.state.tag),this.trigger("dropdown:hide",s),this},"hide"),toggle:r(function(t){this.dropdown[this.state.dropdown.visible&&!t?"hide":"show"]()},"toggle"),getAppendTarget:r(function(){var t=this.settings.dropdown;return typeof t.appendTarget=="function"?t.appendTarget():t.appendTarget},"getAppendTarget"),render:r(function(){var t,e,i,n=this,s=(t=this.DOM.dropdown,(i=t.cloneNode(!0)).style.cssText="position:fixed; top:-9999px; opacity:0",document.body.appendChild(i),e=i.clientHeight,i.parentNode.removeChild(i),e),a=this.settings,o=this.dropdown.getAppendTarget();return a.dropdown.enabled===!1||(this.DOM.scope.setAttribute("aria-expanded",!0),document.body.contains(this.DOM.dropdown)||(this.DOM.dropdown.classList.add(a.classNames.dropdownInital),this.dropdown.position(s),o.appendChild(this.DOM.dropdown),setTimeout((function(){return n.DOM.dropdown.classList.remove(a.classNames.dropdownInital)})))),this},"render"),fill:r(function(t){t=typeof t=="string"?t:this.dropdown.createListHTML(t||this.suggestedListItems);var e,i=this.settings.templates.dropdownContent.call(this,t);this.DOM.dropdown.content.innerHTML=(e=i)?e.replace(/\>[\r\n ]+\</g,"><").split(/>\s+</).join("><").trim():""},"fill"),fillHeaderFooter:r(function(){var t=this.dropdown.filterListItems(this.state.dropdown.query),e=this.parseTemplate("dropdownHeader",[t]),i=this.parseTemplate("dropdownFooter",[t]),n=this.dropdown.getHeaderRef(),s=this.dropdown.getFooterRef();e&&n?.parentNode.replaceChild(e,n),i&&s?.parentNode.replaceChild(i,s)},"fillHeaderFooter"),position:r(function(t){var e=this.settings.dropdown,i=this.dropdown.getAppendTarget();if(e.position!="manual"&&i){var n,s,a,o,l,d,u,c,g,h,f=this.DOM.dropdown,p=e.RTL,m=i===document.body,v=i===this.DOM.scope,T=m?window.pageYOffset:i.scrollTop,D=document.fullscreenElement||document.webkitFullscreenElement||document.documentElement,I=D.clientHeight,N=Math.max(D.clientWidth||0,window.innerWidth||0),b=N>480?e.position:"all",k=this.DOM[b=="input"?"input":"scope"];if(t=t||f.clientHeight,this.state.dropdown.visible){if(b=="text"?(a=(n=(function(){var O=document.getSelection();if(O.rangeCount){var S,x,E=O.getRangeAt(0),z=E.startContainer,Q=E.startOffset;if(Q>0)return(x=document.createRange()).setStart(z,Q-1),x.setEnd(z,Q),{left:(S=x.getBoundingClientRect()).right,top:S.top,bottom:S.bottom};if(z.getBoundingClientRect)return z.getBoundingClientRect()}return{left:-9999,top:-9999}})()).bottom,s=n.top,o=n.left,l="auto"):(d=(function(O){var S=0,x=0;for(O=O.parentNode;O&&O!=D;)S+=O.offsetTop||0,x+=O.offsetLeft||0,O=O.parentNode;return{top:S,left:x}})(i),n=k.getBoundingClientRect(),s=v?-1:n.top-d.top,a=(v?n.height:n.bottom-d.top)-1,o=v?-1:n.left-d.left,l=n.width+"px"),!m){var P=(function(){for(var O=0,S=e.appendTarget.parentNode;S;)O+=S.scrollTop||0,S=S.parentNode;return O})();s+=P,a+=P}var j;s=Math.floor(s),a=Math.ceil(a),c=N-o<120,g=((u=(j=e.placeAbove)!==null&&j!==void 0?j:I-n.bottom<t)?s:a)+T,h=o+(p&&n.width||0)+window.pageXOffset,h=b=="text"&&c?"right: 0;":"left: ".concat(h,"px;"),f.style.cssText="".concat(h," top: ").concat(g,"px; min-width: ").concat(l,"; max-width: ").concat(l),f.setAttribute("placement",u?"top":"bottom"),f.setAttribute("position",b)}}},"position")})!=null?H:{},Object.getOwnPropertyDescriptors?Object.defineProperties($,Object.getOwnPropertyDescriptors(H)):(function(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i.push.apply(i,n)}return i})(Object(H)).forEach((function(t){Object.defineProperty($,t,Object.getOwnPropertyDescriptor(H,t))})),$),K="@yaireo/tagify/",Ft={empty:"empty",exceed:"number of tags exceeded",pattern:"pattern mismatch",duplicate:"already exists",notAllowed:"not allowed"},Rt={wrapper:r(function(t,e){return'<tags class="'.concat(e.classNames.namespace," ").concat(e.mode?"".concat(e.classNames[e.mode+"Mode"]):""," ").concat(t.className,`"
|
|
2
2
|
`).concat(e.readonly?"readonly":"",`
|
|
3
3
|
`).concat(e.disabled?"disabled":"",`
|
|
4
4
|
`).concat(e.required?"required":"",`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Je=Object.defineProperty;var g=(C,t)=>Je(C,"name",{value:t,configurable:!0});import{c as xt,o as bt,a as gt,P as vt,C as Ee,V as Xe,r as fe,e as Qt,f as Ct,g as Gt,n as Bt,h as $e,w as de,F as ti,t as me,i as ei,j as ii,k as ri,b as ai}from"./main-
|
|
1
|
+
var Je=Object.defineProperty;var g=(C,t)=>Je(C,"name",{value:t,configurable:!0});import{c as xt,o as bt,a as gt,P as vt,C as Ee,V as Xe,r as fe,e as Qt,f as Ct,g as Gt,n as Bt,h as $e,w as de,F as ti,t as me,i as ei,j as ii,k as ri,b as ai}from"./main-DEBPJr9o.js";import{F as si}from"./FieldComponent.vue_vue_type_script_lang-D-Fg_wy_.js";import{r as ni}from"./NoSymbolIcon-Bt8TQGfd.js";function oi(C,t){return bt(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[gt("path",{"fill-rule":"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z","clip-rule":"evenodd"})])}g(oi,"render$2");function ui(C,t){return bt(),xt("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[gt("path",{"fill-rule":"evenodd",d:"M7.502 6h7.128A3.375 3.375 0 0 1 18 9.375v9.375a3 3 0 0 0 3-3V6.108c0-1.505-1.125-2.811-2.664-2.94a48.972 48.972 0 0 0-.673-.05A3 3 0 0 0 15 1.5h-1.5a3 3 0 0 0-2.663 1.618c-.225.015-.45.032-.673.05C8.662 3.295 7.554 4.542 7.502 6ZM13.5 3A1.5 1.5 0 0 0 12 4.5h4.5A1.5 1.5 0 0 0 15 3h-1.5Z","clip-rule":"evenodd"}),gt("path",{"fill-rule":"evenodd",d:"M3 9.375C3 8.339 3.84 7.5 4.875 7.5h9.75c1.036 0 1.875.84 1.875 1.875v11.25c0 1.035-.84 1.875-1.875 1.875h-9.75A1.875 1.875 0 0 1 3 20.625V9.375ZM6 12a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V12Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 15a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V15Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75ZM6 18a.75.75 0 0 1 .75-.75h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V18Zm2.25 0a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H9a.75.75 0 0 1-.75-.75Z","clip-rule":"evenodd"})])}g(ui,"render$1");(function(C,t){if(typeof exports=="object"&&typeof module=="object")module.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var e=t();for(var s in e)(typeof exports=="object"?exports:C)[s]=e[s]}})(typeof self<"u"?self:void 0,(function(){return(function(){var C={3976:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.default={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:g(function(){},"oncomplete"),onincomplete:g(function(){},"onincomplete"),oncleared:g(function(){},"oncleared"),repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:g(function(){},"onKeyDown"),onBeforeMask:null,onBeforePaste:g(function(k,E){return typeof E.onBeforeMask=="function"?E.onBeforeMask.call(this,k,E):k},"onBeforePaste"),onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:g(function(){},"onKeyValidation"),skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}}},7392:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0,c.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(k,E,I){if(I===void 0)return k.__data?k.__data[E]:null;k.__data=k.__data||{},k.__data[E]=I}},3776:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.Event=void 0,c.off=function(v,y){var n,p;return A(this[0])&&v&&(n=this[0].eventRegistry,p=this[0],v.split(" ").forEach((function(r){var u=D(r.split("."),2);(function(o,a){var i,l,h=[];if(o.length>0)if(y===void 0)for(i=0,l=n[o][a].length;i<l;i++)h.push({ev:o,namespace:a&&a.length>0?a:"global",handler:n[o][a][i]});else h.push({ev:o,namespace:a&&a.length>0?a:"global",handler:y});else if(a.length>0){for(var m in n)for(var _ in n[m])if(_===a)if(y===void 0)for(i=0,l=n[m][_].length;i<l;i++)h.push({ev:m,namespace:_,handler:n[m][_][i]});else h.push({ev:m,namespace:_,handler:y})}return h})(u[0],u[1]).forEach((function(o){var a=o.ev,i=o.handler;(function(l,h,m){if(l in n==1)if(p.removeEventListener?p.removeEventListener(l,m,!1):p.detachEvent&&p.detachEvent("on".concat(l),m),h==="global")for(var _ in n[l])n[l][_].splice(n[l][_].indexOf(m),1);else n[l][h].splice(n[l][h].indexOf(m),1)})(a,o.namespace,i)}))}))),this},c.on=function(v,y){if(A(this[0])){var n=this[0].eventRegistry,p=this[0];v.split(" ").forEach((function(r){var u=D(r.split("."),2),o=u[0],a=u[1];(function(i,l){p.addEventListener?p.addEventListener(i,y,!1):p.attachEvent&&p.attachEvent("on".concat(i),y),n[i]=n[i]||{},n[i][l]=n[i][l]||[],n[i][l].push(y)})(o,a===void 0?"global":a)}))}return this},c.trigger=function(v){var y=arguments;if(A(this[0]))for(var n=this[0].eventRegistry,p=this[0],r=typeof v=="string"?v.split(" "):[v.type],u=0;u<r.length;u++){var o=r[u].split("."),a=o[0],i=o[1]||"global";if(x!==void 0&&i==="global"){var l,h={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(x.createEvent){try{a==="input"?(h.inputType="insertText",l=new InputEvent(a,h)):l=new CustomEvent(a,h)}catch{(l=x.createEvent("CustomEvent")).initCustomEvent(a,h.bubbles,h.cancelable,h.detail)}v.type&&(0,I.default)(l,v),p.dispatchEvent(l)}else(l=x.createEventObject()).eventType=a,l.detail=arguments[1],v.type&&(0,I.default)(l,v),p.fireEvent("on"+l.eventType,l)}else if(n[a]!==void 0){arguments[0]=arguments[0].type?arguments[0]:w.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var m=n[a];(i==="global"?Object.values(m).flat():m[i]).forEach((function(_){return _.apply(p,y)}))}}return this};var E=U(k(9380)),I=U(k(600)),w=U(k(4963));function D(v,y){return(function(n){if(Array.isArray(n))return n})(v)||(function(n,p){var r=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(r!=null){var u,o,a,i,l=[],h=!0,m=!1;try{if(a=(r=r.call(n)).next,p!==0)for(;!(h=(u=a.call(r)).done)&&(l.push(u.value),l.length!==p);h=!0);}catch(_){m=!0,o=_}finally{try{if(!h&&r.return!=null&&(i=r.return(),Object(i)!==i))return}finally{if(m)throw o}}return l}})(v,y)||(function(n,p){if(n){if(typeof n=="string")return G(n,p);var r=Object.prototype.toString.call(n).slice(8,-1);if(r==="Object"&&n.constructor&&(r=n.constructor.name),r==="Map"||r==="Set")return Array.from(n);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return G(n,p)}})(v,y)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}g(D,"o");function G(v,y){(y==null||y>v.length)&&(y=v.length);for(var n=0,p=new Array(y);n<y;n++)p[n]=v[n];return p}g(G,"l");function U(v){return v&&v.__esModule?v:{default:v}}g(U,"s");var x=E.default.document;function A(v){return v instanceof Element}g(A,"u");var S=c.Event=void 0;typeof E.default.CustomEvent=="function"?c.Event=S=E.default.CustomEvent:E.default.Event&&x&&x.createEvent?(c.Event=S=g(function(v,y){y=y||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var n=x.createEvent("CustomEvent");return n.initCustomEvent(v,y.bubbles,y.cancelable,y.detail),n},"f"),S.prototype=E.default.Event.prototype):typeof Event<"u"&&(c.Event=S=Event)},600:function(d,c){function k(E){return k=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(I){return typeof I}:function(I){return I&&typeof Symbol=="function"&&I.constructor===Symbol&&I!==Symbol.prototype?"symbol":typeof I},k(E)}g(k,"n"),Object.defineProperty(c,"__esModule",{value:!0}),c.default=g(function E(){var I,w,D,G,U,x,A=arguments[0]||{},S=1,v=arguments.length,y=!1;for(typeof A=="boolean"&&(y=A,A=arguments[S]||{},S++),k(A)!=="object"&&typeof A!="function"&&(A={});S<v;S++)if((I=arguments[S])!=null)for(w in I)D=A[w],A!==(G=I[w])&&(y&&G&&(Object.prototype.toString.call(G)==="[object Object]"||(U=Array.isArray(G)))?(U?(U=!1,x=D&&Array.isArray(D)?D:[]):x=D&&Object.prototype.toString.call(D)==="[object Object]"?D:{},A[w]=E(y,x,G)):G!==void 0&&(A[w]=G));return A},"e")},4963:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.default=void 0;var E=G(k(9380)),I=G(k(253)),w=k(3776),D=G(k(600));function G(A){return A&&A.__esModule?A:{default:A}}g(G,"l");var U=E.default.document;function x(A){return A instanceof x?A:this instanceof x?void(A!=null&&A!==E.default&&(this[0]=A.nodeName?A:A[0]!==void 0&&A[0].nodeName?A[0]:U.querySelector(A),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new x(A)}g(x,"c"),x.prototype={on:w.on,off:w.off,trigger:w.trigger},x.extend=D.default,x.data=I.default,x.Event=w.Event,c.default=x},9845:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.mobile=c.iphone=c.ie=void 0;var E,I=(E=k(9380))&&E.__esModule?E:{default:E},w=I.default.navigator&&I.default.navigator.userAgent||"";c.ie=w.indexOf("MSIE ")>0||w.indexOf("Trident/")>0,c.mobile=I.default.navigator&&I.default.navigator.userAgentData&&I.default.navigator.userAgentData.mobile||I.default.navigator&&I.default.navigator.maxTouchPoints||"ontouchstart"in I.default,c.iphone=/iphone/i.test(w)},7184:function(d,c){Object.defineProperty(c,"__esModule",{value:!0}),c.default=function(E){return E.replace(k,"\\$1")};var k=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(d,c,k){function E(a){return E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},E(a)}g(E,"i"),Object.defineProperty(c,"__esModule",{value:!0}),c.EventHandlers=void 0;var I,w=k(9845),D=(I=k(9380))&&I.__esModule?I:{default:I},G=k(7760),U=k(2839),x=k(8711),A=k(7215),S=k(4713);function v(){v=g(function(){return i},"p");var a,i={},l=Object.prototype,h=l.hasOwnProperty,m=Object.defineProperty||function(Z,V,H){Z[V]=H.value},_=typeof Symbol=="function"?Symbol:{},O=_.iterator||"@@iterator",B=_.asyncIterator||"@@asyncIterator",F=_.toStringTag||"@@toStringTag";function T(Z,V,H){return Object.defineProperty(Z,V,{value:H,enumerable:!0,configurable:!0,writable:!0}),Z[V]}g(T,"u");try{T({},"")}catch{T=g(function(V,H,Q){return V[H]=Q},"u")}function j(Z,V,H,Q){var q=V&&V.prototype instanceof Y?V:Y,it=Object.create(q.prototype),ct=new mt(Q||[]);return m(it,"_invoke",{value:rt(Z,H,ct)}),it}g(j,"f");function f(Z,V,H){try{return{type:"normal",arg:Z.call(V,H)}}catch(Q){return{type:"throw",arg:Q}}}g(f,"d"),i.wrap=j;var b="suspendedStart",P="suspendedYield",M="executing",L="completed",N={};function Y(){}g(Y,"k");function W(){}g(W,"b");function R(){}g(R,"x");var $={};T($,O,(function(){return this}));var tt=Object.getPrototypeOf,z=tt&&tt(tt(_t([])));z&&z!==l&&h.call(z,O)&&($=z);var K=R.prototype=Y.prototype=Object.create($);function X(Z){["next","throw","return"].forEach((function(V){T(Z,V,(function(H){return this._invoke(V,H)}))}))}g(X,"_");function J(Z,V){function H(q,it,ct,nt){var ot=f(Z[q],Z,it);if(ot.type!=="throw"){var pt=ot.arg,Mt=pt.value;return Mt&&E(Mt)=="object"&&h.call(Mt,"__await")?V.resolve(Mt.__await).then((function(dt){H("next",dt,ct,nt)}),(function(dt){H("throw",dt,ct,nt)})):V.resolve(Mt).then((function(dt){pt.value=dt,ct(pt)}),(function(dt){return H("throw",dt,ct,nt)}))}nt(ot.arg)}g(H,"n");var Q;m(this,"_invoke",{value:g(function(q,it){function ct(){return new V((function(nt,ot){H(q,it,nt,ot)}))}return g(ct,"a"),Q=Q?Q.then(ct,ct):ct()},"value")})}g(J,"M");function rt(Z,V,H){var Q=b;return function(q,it){if(Q===M)throw new Error("Generator is already running");if(Q===L){if(q==="throw")throw it;return{value:a,done:!0}}for(H.method=q,H.arg=it;;){var ct=H.delegate;if(ct){var nt=st(ct,H);if(nt){if(nt===N)continue;return nt}}if(H.method==="next")H.sent=H._sent=H.arg;else if(H.method==="throw"){if(Q===b)throw Q=L,H.arg;H.dispatchException(H.arg)}else H.method==="return"&&H.abrupt("return",H.arg);Q=M;var ot=f(Z,V,H);if(ot.type==="normal"){if(Q=H.done?L:P,ot.arg===N)continue;return{value:ot.arg,done:H.done}}ot.type==="throw"&&(Q=L,H.method="throw",H.arg=ot.arg)}}}g(rt,"E");function st(Z,V){var H=V.method,Q=Z.iterator[H];if(Q===a)return V.delegate=null,H==="throw"&&Z.iterator.return&&(V.method="return",V.arg=a,st(Z,V),V.method==="throw")||H!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+H+"' method")),N;var q=f(Q,Z.iterator,V.arg);if(q.type==="throw")return V.method="throw",V.arg=q.arg,V.delegate=null,N;var it=q.arg;return it?it.done?(V[Z.resultName]=it.value,V.next=Z.nextLoc,V.method!=="return"&&(V.method="next",V.arg=a),V.delegate=null,N):it:(V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,N)}g(st,"j");function lt(Z){var V={tryLoc:Z[0]};1 in Z&&(V.catchLoc=Z[1]),2 in Z&&(V.finallyLoc=Z[2],V.afterLoc=Z[3]),this.tryEntries.push(V)}g(lt,"T");function kt(Z){var V=Z.completion||{};V.type="normal",delete V.arg,Z.completion=V}g(kt,"A");function mt(Z){this.tryEntries=[{tryLoc:"root"}],Z.forEach(lt,this),this.reset(!0)}g(mt,"D");function _t(Z){if(Z||Z===""){var V=Z[O];if(V)return V.call(Z);if(typeof Z.next=="function")return Z;if(!isNaN(Z.length)){var H=-1,Q=g(function q(){for(;++H<Z.length;)if(h.call(Z,H))return q.value=Z[H],q.done=!1,q;return q.value=a,q.done=!0,q},"n");return Q.next=Q}}throw new TypeError(E(Z)+" is not iterable")}return g(_t,"L"),W.prototype=R,m(K,"constructor",{value:R,configurable:!0}),m(R,"constructor",{value:W,configurable:!0}),W.displayName=T(R,F,"GeneratorFunction"),i.isGeneratorFunction=function(Z){var V=typeof Z=="function"&&Z.constructor;return!!V&&(V===W||(V.displayName||V.name)==="GeneratorFunction")},i.mark=function(Z){return Object.setPrototypeOf?Object.setPrototypeOf(Z,R):(Z.__proto__=R,T(Z,F,"GeneratorFunction")),Z.prototype=Object.create(K),Z},i.awrap=function(Z){return{__await:Z}},X(J.prototype),T(J.prototype,B,(function(){return this})),i.AsyncIterator=J,i.async=function(Z,V,H,Q,q){q===void 0&&(q=Promise);var it=new J(j(Z,V,H,Q),q);return i.isGeneratorFunction(V)?it:it.next().then((function(ct){return ct.done?ct.value:it.next()}))},X(K),T(K,F,"Generator"),T(K,O,(function(){return this})),T(K,"toString",(function(){return"[object Generator]"})),i.keys=function(Z){var V=Object(Z),H=[];for(var Q in V)H.push(Q);return H.reverse(),g(function q(){for(;H.length;){var it=H.pop();if(it in V)return q.value=it,q.done=!1,q}return q.done=!0,q},"e")},i.values=_t,mt.prototype={constructor:mt,reset:g(function(Z){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(kt),!Z)for(var V in this)V.charAt(0)==="t"&&h.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=a)},"reset"),stop:g(function(){this.done=!0;var Z=this.tryEntries[0].completion;if(Z.type==="throw")throw Z.arg;return this.rval},"stop"),dispatchException:g(function(Z){if(this.done)throw Z;var V=this;function H(ot,pt){return it.type="throw",it.arg=Z,V.next=ot,pt&&(V.method="next",V.arg=a),!!pt}g(H,"i");for(var Q=this.tryEntries.length-1;Q>=0;--Q){var q=this.tryEntries[Q],it=q.completion;if(q.tryLoc==="root")return H("end");if(q.tryLoc<=this.prev){var ct=h.call(q,"catchLoc"),nt=h.call(q,"finallyLoc");if(ct&&nt){if(this.prev<q.catchLoc)return H(q.catchLoc,!0);if(this.prev<q.finallyLoc)return H(q.finallyLoc)}else if(ct){if(this.prev<q.catchLoc)return H(q.catchLoc,!0)}else{if(!nt)throw new Error("try statement without catch or finally");if(this.prev<q.finallyLoc)return H(q.finallyLoc)}}}},"dispatchException"),abrupt:g(function(Z,V){for(var H=this.tryEntries.length-1;H>=0;--H){var Q=this.tryEntries[H];if(Q.tryLoc<=this.prev&&h.call(Q,"finallyLoc")&&this.prev<Q.finallyLoc){var q=Q;break}}q&&(Z==="break"||Z==="continue")&&q.tryLoc<=V&&V<=q.finallyLoc&&(q=null);var it=q?q.completion:{};return it.type=Z,it.arg=V,q?(this.method="next",this.next=q.finallyLoc,N):this.complete(it)},"abrupt"),complete:g(function(Z,V){if(Z.type==="throw")throw Z.arg;return Z.type==="break"||Z.type==="continue"?this.next=Z.arg:Z.type==="return"?(this.rval=this.arg=Z.arg,this.method="return",this.next="end"):Z.type==="normal"&&V&&(this.next=V),N},"complete"),finish:g(function(Z){for(var V=this.tryEntries.length-1;V>=0;--V){var H=this.tryEntries[V];if(H.finallyLoc===Z)return this.complete(H.completion,H.afterLoc),kt(H),N}},"finish"),catch:g(function(Z){for(var V=this.tryEntries.length-1;V>=0;--V){var H=this.tryEntries[V];if(H.tryLoc===Z){var Q=H.completion;if(Q.type==="throw"){var q=Q.arg;kt(H)}return q}}throw new Error("illegal catch attempt")},"catch"),delegateYield:g(function(Z,V,H){return this.delegate={iterator:_t(Z),resultName:V,nextLoc:H},this.method==="next"&&(this.arg=a),N},"delegateYield")},i}g(v,"p");function y(a,i){var l=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!l){if(Array.isArray(a)||(l=(function(F,T){if(F){if(typeof F=="string")return n(F,T);var j=Object.prototype.toString.call(F).slice(8,-1);if(j==="Object"&&F.constructor&&(j=F.constructor.name),j==="Map"||j==="Set")return Array.from(F);if(j==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j))return n(F,T)}})(a))||i){l&&(a=l);var h=0,m=g(function(){},"a");return{s:m,n:g(function(){return h>=a.length?{done:!0}:{done:!1,value:a[h++]}},"n"),e:g(function(F){throw F},"e"),f:m}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _,O=!0,B=!1;return{s:g(function(){l=l.call(a)},"s"),n:g(function(){var F=l.next();return O=F.done,F},"n"),e:g(function(F){B=!0,_=F},"e"),f:g(function(){try{O||l.return==null||l.return()}finally{if(B)throw _}},"f")}}g(y,"d");function n(a,i){(i==null||i>a.length)&&(i=a.length);for(var l=0,h=new Array(i);l<i;l++)h[l]=a[l];return h}g(n,"h");function p(a,i,l,h,m,_,O){try{var B=a[_](O),F=B.value}catch(T){return void l(T)}B.done?i(F):Promise.resolve(F).then(h,m)}g(p,"v");var r,u,o=c.EventHandlers={keyEvent:g(function(a,i,l,h,m){var _=this.inputmask,O=_.opts,B=_.dependencyLib,F=_.maskset,T=this,j=B(T),f=a.key,b=x.caret.call(_,T),P=O.onKeyDown.call(this,a,x.getBuffer.call(_),b,O);if(P!==void 0)return P;if(f===U.keys.Backspace||f===U.keys.Delete||w.iphone&&f===U.keys.BACKSPACE_SAFARI||a.ctrlKey&&f===U.keys.x&&!("oncut"in T))a.preventDefault(),A.handleRemove.call(_,T,f,b),(0,G.writeBuffer)(T,x.getBuffer.call(_,!0),F.p,a,T.inputmask._valueGet()!==x.getBuffer.call(_).join(""));else if(f===U.keys.End||f===U.keys.PageDown){a.preventDefault();var M=x.seekNext.call(_,x.getLastValidPosition.call(_));x.caret.call(_,T,a.shiftKey?b.begin:M,M,!0)}else f===U.keys.Home&&!a.shiftKey||f===U.keys.PageUp?(a.preventDefault(),x.caret.call(_,T,0,a.shiftKey?b.begin:0,!0)):O.undoOnEscape&&f===U.keys.Escape&&a.altKey!==!0?((0,G.checkVal)(T,!0,!1,_.undoValue.split("")),j.trigger("click")):f!==U.keys.Insert||a.shiftKey||a.ctrlKey||_.userOptions.insertMode!==void 0?O.tabThrough===!0&&f===U.keys.Tab?a.shiftKey===!0?(b.end=x.seekPrevious.call(_,b.end,!0),S.getTest.call(_,b.end-1).match.static===!0&&b.end--,b.begin=x.seekPrevious.call(_,b.end,!0),b.begin>=0&&b.end>0&&(a.preventDefault(),x.caret.call(_,T,b.begin,b.end))):(b.begin=x.seekNext.call(_,b.begin,!0),b.end=x.seekNext.call(_,b.begin,!0),b.end<F.maskLength&&b.end--,b.begin<=F.maskLength&&(a.preventDefault(),x.caret.call(_,T,b.begin,b.end))):a.shiftKey||(O.insertModeVisual&&O.insertMode===!1?f===U.keys.ArrowRight?setTimeout((function(){var L=x.caret.call(_,T);x.caret.call(_,T,L.begin)}),0):f===U.keys.ArrowLeft&&setTimeout((function(){var L=x.translatePosition.call(_,T.inputmask.caretPos.begin);x.translatePosition.call(_,T.inputmask.caretPos.end),_.isRTL?x.caret.call(_,T,L+(L===F.maskLength?0:1)):x.caret.call(_,T,L-(L===0?0:1))}),0):_.keyEventHook===void 0||_.keyEventHook(a)):A.isSelection.call(_,b)?O.insertMode=!O.insertMode:(O.insertMode=!O.insertMode,x.caret.call(_,T,b.begin,b.begin));return _.isComposing=f==U.keys.Process||f==U.keys.Unidentified,_.ignorable=f.length>1&&!(T.tagName.toLowerCase()==="textarea"&&f==U.keys.Enter),o.keypressEvent.call(this,a,i,l,h,m)},"keyEvent"),keypressEvent:g(function(a,i,l,h,m){var _=this.inputmask||this,O=_.opts,B=_.dependencyLib,F=_.maskset,T=_.el,j=B(T),f=a.key;if(i===!0||a.ctrlKey&&a.altKey&&!_.ignorable||!(a.ctrlKey||a.metaKey||_.ignorable)){if(f){var b,P=i?{begin:m,end:m}:x.caret.call(_,T);i||(f=O.substitutes[f]||f),F.writeOutBuffer=!0;var M=A.isValid.call(_,P,f,h,void 0,void 0,void 0,i);if(M!==!1&&(x.resetMaskSet.call(_,!0),b=M.caret!==void 0?M.caret:x.seekNext.call(_,M.pos.begin?M.pos.begin:M.pos),F.p=b),b=O.numericInput&&M.caret===void 0?x.seekPrevious.call(_,b):b,l!==!1&&(setTimeout((function(){O.onKeyValidation.call(T,f,M)}),0),F.writeOutBuffer&&M!==!1)){var L=x.getBuffer.call(_);(0,G.writeBuffer)(T,L,b,a,i!==!0)}if(a.preventDefault(),i)return M!==!1&&(M.forwardPosition=b),M}}else f===U.keys.Enter&&_.undoValue!==_._valueGet(!0)&&(_.undoValue=_._valueGet(!0),setTimeout((function(){j.trigger("change")}),0))},"keypressEvent"),pasteEvent:(r=v().mark(g((function a(i){var l,h,m,_,O,B;return v().wrap((function(F){for(;;)switch(F.prev=F.next){case 0:l=g(function(T,j,f,b,P){var M=x.caret.call(T,j,void 0,void 0,!0),L=f.substr(0,M.begin),N=f.substr(M.end,f.length);if(L==(T.isRTL?x.getBufferTemplate.call(T).slice().reverse():x.getBufferTemplate.call(T)).slice(0,M.begin).join("")&&(L=""),N==(T.isRTL?x.getBufferTemplate.call(T).slice().reverse():x.getBufferTemplate.call(T)).slice(M.end).join("")&&(N=""),b=L+b+N,T.isRTL&&_.numericInput!==!0){b=b.split("");var Y,W=y(x.getBufferTemplate.call(T));try{for(W.s();!(Y=W.n()).done;){var R=Y.value;b[0]===R&&b.shift()}}catch(tt){W.e(tt)}finally{W.f()}b=b.reverse().join("")}var $=b;if(typeof P=="function"){if(($=P.call(T,$,_))===!1)return!1;$||($=f)}(0,G.checkVal)(j,!0,!1,$.toString().split(""),i)},"n"),h=this,m=this.inputmask,_=m.opts,O=m._valueGet(!0),m.skipInputEvent=!0,i.clipboardData&&i.clipboardData.getData?B=i.clipboardData.getData("text/plain"):D.default.clipboardData&&D.default.clipboardData.getData&&(B=D.default.clipboardData.getData("Text")),l(m,h,O,B,_.onBeforePaste),i.preventDefault();case 7:case"end":return F.stop()}}),a,this)}),"e")),u=g(function(){var a=this,i=arguments;return new Promise((function(l,h){var m=r.apply(a,i);function _(B){p(m,l,h,_,O,"next",B)}g(_,"r");function O(B){p(m,l,h,_,O,"throw",B)}g(O,"o"),_(void 0)}))},"g"),function(a){return u.apply(this,arguments)}),inputFallBackEvent:g(function(a){var i=this.inputmask,l=i.opts,h=i.dependencyLib,m,_=this,O=_.inputmask._valueGet(!0),B=(i.isRTL?x.getBuffer.call(i).slice().reverse():x.getBuffer.call(i)).join(""),F=x.caret.call(i,_,void 0,void 0,!0);if(B!==O){if(m=(function(j,f,b){for(var P,M,L,N=j.substr(0,b.begin).split(""),Y=j.substr(b.begin).split(""),W=f.substr(0,b.begin).split(""),R=f.substr(b.begin).split(""),$=N.length>=W.length?N.length:W.length,tt=Y.length>=R.length?Y.length:R.length,z="",K=[],X="~";N.length<$;)N.push(X);for(;W.length<$;)W.push(X);for(;Y.length<tt;)Y.unshift(X);for(;R.length<tt;)R.unshift(X);var J=N.concat(Y),rt=W.concat(R);for(M=0,P=J.length;M<P;M++)switch(L=S.getPlaceholder.call(i,x.translatePosition.call(i,M)),z){case"insertText":rt[M-1]===J[M]&&b.begin==J.length-1&&K.push(J[M]),M=P;break;case"insertReplacementText":case"deleteContentBackward":J[M]===X?b.end++:M=P;break;default:J[M]!==rt[M]&&(J[M+1]!==X&&J[M+1]!==L&&J[M+1]!==void 0||(rt[M]!==L||rt[M+1]!==X)&&rt[M]!==X?rt[M+1]===X&&rt[M]===J[M+1]?(z="insertText",K.push(J[M]),b.begin--,b.end--):J[M]!==L&&J[M]!==X&&(J[M+1]===X||rt[M]!==J[M]&&rt[M+1]===J[M+1])?(z="insertReplacementText",K.push(J[M]),b.begin--):J[M]===X?(z="deleteContentBackward",(x.isMask.call(i,x.translatePosition.call(i,M),!0)||rt[M]===l.radixPoint)&&b.end++):M=P:(z="insertText",K.push(J[M]),b.begin--,b.end--))}return{action:z,data:K,caret:b}})(O,B,F),(_.inputmask.shadowRoot||_.ownerDocument).activeElement!==_&&_.focus(),(0,G.writeBuffer)(_,x.getBuffer.call(i)),x.caret.call(i,_,F.begin,F.end,!0),!w.mobile&&i.skipNextInsert&&a.inputType==="insertText"&&m.action==="insertText"&&i.isComposing)return!1;switch(a.inputType==="insertCompositionText"&&m.action==="insertText"&&i.isComposing?i.skipNextInsert=!0:i.skipNextInsert=!1,m.action){case"insertText":case"insertReplacementText":m.data.forEach((function(j,f){var b=new h.Event("keypress");b.key=j,i.ignorable=!1,o.keypressEvent.call(_,b)})),setTimeout((function(){i.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var T=new h.Event("keydown");T.key=U.keys.Backspace,o.keyEvent.call(_,T);break;default:(0,G.applyInputValue)(_,O),x.caret.call(i,_,F.begin,F.end,!0)}a.preventDefault()}},"inputFallBackEvent"),setValueEvent:g(function(a){var i=this.inputmask,l=i.dependencyLib,h=this,m=a&&a.detail?a.detail[0]:arguments[1];m===void 0&&(m=h.inputmask._valueGet(!0)),(0,G.applyInputValue)(h,m,new l.Event("input")),(a.detail&&a.detail[1]!==void 0||arguments[2]!==void 0)&&x.caret.call(i,h,a.detail?a.detail[1]:arguments[2])},"setValueEvent"),focusEvent:g(function(a){var i=this.inputmask,l=i.opts,h=i&&i._valueGet();l.showMaskOnFocus&&h!==x.getBuffer.call(i).join("")&&(0,G.writeBuffer)(this,x.getBuffer.call(i),x.seekNext.call(i,x.getLastValidPosition.call(i))),l.positionCaretOnTab!==!0||i.mouseEnter!==!1||A.isComplete.call(i,x.getBuffer.call(i))&&x.getLastValidPosition.call(i)!==-1||o.clickEvent.apply(this,[a,!0]),i.undoValue=i&&i._valueGet(!0)},"focusEvent"),invalidEvent:g(function(a){this.inputmask.validationEvent=!0},"invalidEvent"),mouseleaveEvent:g(function(){var a=this.inputmask,i=a.opts,l=this;a.mouseEnter=!1,i.clearMaskOnLostFocus&&(l.inputmask.shadowRoot||l.ownerDocument).activeElement!==l&&(0,G.HandleNativePlaceholder)(l,a.originalPlaceholder)},"mouseleaveEvent"),clickEvent:g(function(a,i){var l=this.inputmask;l.clicked++;var h=this;if((h.inputmask.shadowRoot||h.ownerDocument).activeElement===h){var m=x.determineNewCaretPosition.call(l,x.caret.call(l,h),i);m!==void 0&&x.caret.call(l,h,m)}},"clickEvent"),cutEvent:g(function(a){var i=this.inputmask,l=i.maskset,h=this,m=x.caret.call(i,h),_=i.isRTL?x.getBuffer.call(i).slice(m.end,m.begin):x.getBuffer.call(i).slice(m.begin,m.end),O=i.isRTL?_.reverse().join(""):_.join("");D.default.navigator&&D.default.navigator.clipboard?D.default.navigator.clipboard.writeText(O):D.default.clipboardData&&D.default.clipboardData.getData&&D.default.clipboardData.setData("Text",O),A.handleRemove.call(i,h,U.keys.Delete,m),(0,G.writeBuffer)(h,x.getBuffer.call(i),l.p,a,i.undoValue!==i._valueGet(!0))},"cutEvent"),blurEvent:g(function(a){var i=this.inputmask,l=i.opts,h=i.dependencyLib;i.clicked=0;var m=h(this),_=this;if(_.inputmask){(0,G.HandleNativePlaceholder)(_,i.originalPlaceholder);var O=_.inputmask._valueGet(),B=x.getBuffer.call(i).slice();O!==""&&(l.clearMaskOnLostFocus&&(x.getLastValidPosition.call(i)===-1&&O===x.getBufferTemplate.call(i).join("")?B=[]:G.clearOptionalTail.call(i,B)),A.isComplete.call(i,B)===!1&&(setTimeout((function(){m.trigger("incomplete")}),0),l.clearIncomplete&&(x.resetMaskSet.call(i,!1),B=l.clearMaskOnLostFocus?[]:x.getBufferTemplate.call(i).slice())),(0,G.writeBuffer)(_,B,void 0,a)),O=i._valueGet(!0),i.undoValue!==O&&(O!=""||i.undoValue!=x.getBufferTemplate.call(i).join("")||i.undoValue==x.getBufferTemplate.call(i).join("")&&i.maskset.validPositions.length>0)&&(i.undoValue=O,m.trigger("change"))}},"blurEvent"),mouseenterEvent:g(function(){var a=this.inputmask,i=a.opts.showMaskOnHover,l=this;if(a.mouseEnter=!0,(l.inputmask.shadowRoot||l.ownerDocument).activeElement!==l){var h=(a.isRTL?x.getBufferTemplate.call(a).slice().reverse():x.getBufferTemplate.call(a)).join("");i&&(0,G.HandleNativePlaceholder)(l,h)}},"mouseenterEvent"),submitEvent:g(function(){var a=this.inputmask,i=a.opts;a.undoValue!==a._valueGet(!0)&&a.$el.trigger("change"),x.getLastValidPosition.call(a)===-1&&a._valueGet&&a._valueGet()===x.getBufferTemplate.call(a).join("")&&a._valueSet(""),i.clearIncomplete&&A.isComplete.call(a,x.getBuffer.call(a))===!1&&a._valueSet(""),i.removeMaskOnSubmit&&(a._valueSet(a.unmaskedvalue(),!0),setTimeout((function(){(0,G.writeBuffer)(a.el,x.getBuffer.call(a))}),0))},"submitEvent"),resetEvent:g(function(){var a=this.inputmask;a.refreshValue=!0,setTimeout((function(){(0,G.applyInputValue)(a.el,a._valueGet(!0))}),0)},"resetEvent")}},9716:function(d,c,k){Object.defineProperty(c,"__esModule",{value:!0}),c.EventRuler=void 0;var E,I=k(7760),w=(E=k(2394))&&E.__esModule?E:{default:E},D=k(2839),G=k(8711);c.EventRuler={on:g(function(U,x,A){var S=U.inputmask.dependencyLib,v=g(function(y){y.originalEvent&&(y=y.originalEvent||y,arguments[0]=y);var n,p=this,r=p.inputmask,u=r?r.opts:void 0;if(r===void 0&&this.nodeName!=="FORM"){var o=S.data(p,"_inputmask_opts");S(p).off(),o&&new w.default(o).mask(p)}else{if(["submit","reset","setvalue"].includes(y.type)||this.nodeName==="FORM"||!(p.disabled||p.readOnly&&!(y.type==="keydown"&&y.ctrlKey&&y.key===D.keys.c||u.tabThrough===!1&&y.key===D.keys.Tab))){switch(y.type){case"input":if(r.skipInputEvent===!0)return r.skipInputEvent=!1,y.preventDefault();break;case"click":case"focus":return r.validationEvent?(r.validationEvent=!1,U.blur(),(0,I.HandleNativePlaceholder)(U,(r.isRTL?G.getBufferTemplate.call(r).slice().reverse():G.getBufferTemplate.call(r)).join("")),setTimeout((function(){U.focus()}),u.validationEventTimeOut),!1):(n=arguments,void setTimeout((function(){U.inputmask&&A.apply(p,n)}),0))}var a=A.apply(p,arguments);return a===!1&&(y.preventDefault(),y.stopPropagation()),a}y.preventDefault()}},"s");["submit","reset"].includes(x)?(v=v.bind(U),U.form!==null&&S(U.form).on(x,v)):S(U).on(x,v),U.inputmask.events[x]=U.inputmask.events[x]||[],U.inputmask.events[x].push(v)},"on"),off:g(function(U,x){if(U.inputmask&&U.inputmask.events){var A=U.inputmask.dependencyLib,S=U.inputmask.events;for(var v in x&&((S=[])[x]=U.inputmask.events[x]),S){for(var y=S[v];y.length>0;){var n=y.pop();["submit","reset"].includes(v)?U.form!==null&&A(U.form).off(v,n):A(U).off(v,n)}delete U.inputmask.events[v]}}},"off")}},219:function(d,c,k){var E=v(k(7184)),I=v(k(2394)),w=k(2839),D=k(8711),G=k(4713);function U(f,b){return(function(P){if(Array.isArray(P))return P})(f)||(function(P,M){var L=P==null?null:typeof Symbol<"u"&&P[Symbol.iterator]||P["@@iterator"];if(L!=null){var N,Y,W,R,$=[],tt=!0,z=!1;try{if(W=(L=L.call(P)).next,M!==0)for(;!(tt=(N=W.call(L)).done)&&($.push(N.value),$.length!==M);tt=!0);}catch(K){z=!0,Y=K}finally{try{if(!tt&&L.return!=null&&(R=L.return(),Object(R)!==R))return}finally{if(z)throw Y}}return $}})(f,b)||(function(P,M){if(P){if(typeof P=="string")return x(P,M);var L=Object.prototype.toString.call(P).slice(8,-1);if(L==="Object"&&P.constructor&&(L=P.constructor.name),L==="Map"||L==="Set")return Array.from(P);if(L==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(L))return x(P,M)}})(f,b)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}g(U,"s");function x(f,b){(b==null||b>f.length)&&(b=f.length);for(var P=0,M=new Array(b);P<b;P++)M[P]=f[P];return M}g(x,"c");function A(f){return A=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},A(f)}g(A,"u");function S(f,b){for(var P=0;P<b.length;P++){var M=b[P];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(f,(L=M.key,N=void 0,N=(function(Y,W){if(A(Y)!=="object"||Y===null)return Y;var R=Y[Symbol.toPrimitive];if(R!==void 0){var $=R.call(Y,W);if(A($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return(W==="string"?String:Number)(Y)})(L,"string"),A(N)==="symbol"?N:String(N)),M)}var L,N}g(S,"f");function v(f){return f&&f.__esModule?f:{default:f}}g(v,"p"),k(1313);var y=I.default.dependencyLib,n=(function(){function f(M,L,N,Y){(function(W,R){if(!(W instanceof R))throw new TypeError("Cannot call a class as a function")})(this,f),this.mask=M,this.format=L,this.opts=N,this.inputmask=Y,this._date=new Date(1,0,1),this.initDateObject(M,this.opts,this.inputmask)}g(f,"e");var b,P;return b=f,(P=[{key:"date",get:g(function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date},"get")},{key:"initDateObject",value:g(function(M,L,N){var Y;for(m(L).lastIndex=0;Y=m(L).exec(this.format);){var W=/\d+$/.exec(Y[0]),R=W?Y[0][0]+"x":Y[0],$=void 0;if(M!==void 0){if(W){var tt=m(L).lastIndex,z=j.call(N,Y.index,L,N&&N.maskset);m(L).lastIndex=tt,$=M.slice(0,M.indexOf(z.nextMatch[0]))}else{for(var K=Y[0][0],X=Y.index;N&&(L.placeholder[G.getTest.call(N,X).match.placeholder]||G.getTest.call(N,X).match.placeholder)===K;)X++;var J=X-Y.index;$=M.slice(0,J||o[R]&&o[R][4]||R.length)}M=M.slice($.length)}Object.prototype.hasOwnProperty.call(o,R)&&this.setValue(this,$,R,o[R][2],o[R][1])}},"value")},{key:"setValue",value:g(function(M,L,N,Y,W){if(L!==void 0)switch(Y){case"ampm":M[Y]=L,M["raw"+Y]=L.replace(/\s/g,"_");break;case"month":if(N==="mmm"||N==="mmmm"){M[Y]=B(N==="mmm"?r.monthNames.slice(0,12).findIndex((function($){return L.toLowerCase()===$.toLowerCase()}))+1:r.monthNames.slice(12,24).findIndex((function($){return L.toLowerCase()===$.toLowerCase()}))+1,2),M[Y]=M[Y]==="00"?"":M[Y].toString(),M["raw"+Y]=M[Y];break}default:M[Y]=L.replace(/[^0-9]/g,"0"),M["raw"+Y]=L.replace(/\s/g,"_")}if(W!==void 0){var R=M[Y];(Y==="day"&&parseInt(R)===29||Y==="month"&&parseInt(R)===2)&&(parseInt(M.day)!==29||parseInt(M.month)!==2||M.year!==""&&M.year!==void 0||M._date.setFullYear(2012,1,29)),Y==="day"&&(u=!0,parseInt(R)===0&&(R=1)),Y==="month"&&(u=!0),Y==="year"&&(u=!0,R.length<o[N][4]&&(R=B(R,o[N][4],!0))),(R!==""&&!isNaN(R)||Y==="ampm")&&W.call(M._date,R)}},"value")},{key:"reset",value:g(function(){this._date=new Date(1,0,1)},"value")},{key:"reInit",value:g(function(){this._date=void 0,this.date},"value")}])&&S(b.prototype,P),Object.defineProperty(b,"prototype",{writable:!1}),f})(),p=new Date().getFullYear(),r=I.default.prototype.i18n,u=!1,o={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return B(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(f){var b=f?parseInt(f):0;return b>0&&b--,Date.prototype.setMonth.call(this,b)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(f){var b=f?parseInt(f):0;return b>0&&b--,Date.prototype.setMonth.call(this,b)},"month",function(){return B(Date.prototype.getMonth.call(this)+1,2)}],mmm:[r.monthNames.slice(0,12).join("|"),function(f){var b=r.monthNames.slice(0,12).findIndex((function(P){return f.toLowerCase()===P.toLowerCase()}));return b!==-1&&Date.prototype.setMonth.call(this,b)},"month",function(){return r.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[r.monthNames.slice(12,24).join("|"),function(f){var b=r.monthNames.slice(12,24).findIndex((function(P){return f.toLowerCase()===P.toLowerCase()}));return b!==-1&&Date.prototype.setMonth.call(this,b)},"month",function(){return r.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(f){var b=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(b).concat(f))},"year",function(){return B(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return B(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return B(Date.prototype.getHours.call(this),2)}],hx:[function(f){return"[0-9]{".concat(f,"}")},Date.prototype.setHours,"hours",function(f){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return B(Date.prototype.getHours.call(this),2)}],Hx:[function(f){return"[0-9]{".concat(f,"}")},Date.prototype.setHours,"hours",function(f){return function(){return B(Date.prototype.getHours.call(this),f)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return B(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return B(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return B(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return B(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",i,"ampm",l,1],tt:["[ap]m",i,"ampm",l,2],T:["[AP]",i,"ampm",l,1],TT:["[AP]M",i,"ampm",l,2],Z:[".*",void 0,"Z",function(){var f=this.toString().match(/\((.+)\)/)[1];return f.includes(" ")&&(f=(f=f.replace("-"," ").toUpperCase()).split(" ").map((function(b){return U(b,1)[0]})).join("")),f}],o:[""],S:[""]},a={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function i(f){var b=this.getHours();f.toLowerCase().includes("p")?this.setHours(b+12):f.toLowerCase().includes("a")&&b>=12&&this.setHours(b-12)}g(i,"b");function l(){var f=this.getHours();return(f=f||12)>=12?"PM":"AM"}g(l,"x");function h(f){var b=/\d+$/.exec(f[0]);if(b&&b[0]!==void 0){var P=o[f[0][0]+"x"].slice("");return P[0]=P[0](b[0]),P[3]=P[3](b[0]),P}if(o[f[0]])return o[f[0]]}g(h,"w");function m(f){if(!f.tokenizer){var b=[],P=[];for(var M in o)if(/\.*x$/.test(M)){var L=M[0]+"\\d+";P.indexOf(L)===-1&&P.push(L)}else b.indexOf(M[0])===-1&&b.push(M[0]);f.tokenizer="("+(P.length>0?P.join("|")+"|":"")+b.join("+|")+")+?|.",f.tokenizer=new RegExp(f.tokenizer,"g")}return f.tokenizer}g(m,"P");function _(f,b,P){if(!u)return!0;if(f.rawday===void 0||!isFinite(f.rawday)&&new Date(f.date.getFullYear(),isFinite(f.rawmonth)?f.month:f.date.getMonth()+1,0).getDate()>=f.day||f.day=="29"&&(!isFinite(f.rawyear)||f.rawyear===void 0||f.rawyear==="")||new Date(f.date.getFullYear(),isFinite(f.rawmonth)?f.month:f.date.getMonth()+1,0).getDate()>=f.day)return b;if(f.day=="29"){var M=j.call(this,b.pos,P,this.maskset);if(M.targetMatch&&M.targetMatch[0]==="yyyy"&&b.pos-M.targetMatchIndex==2)return b.remove=b.pos+1,b}else if(f.date.getMonth()==2&&f.day=="30"&&b.c!==void 0)return f.day="03",f.date.setDate(3),f.date.setMonth(1),b.insert=[{pos:b.pos,c:"0"},{pos:b.pos+1,c:b.c}],b.caret=D.seekNext.call(this,b.pos+1),b;return!1}g(_,"S");function O(f,b,P,M){var L,N,Y="",W=0,R={};for(m(P).lastIndex=0;L=m(P).exec(f);){if(b===void 0)if(N=h(L))Y+="("+N[0]+")",P.placeholder&&P.placeholder!==""?(R[W]=P.placeholder[L.index%P.placeholder.length],R[P.placeholder[L.index%P.placeholder.length]]=L[0].charAt(0)):R[W]=L[0].charAt(0);else switch(L[0]){case"[":Y+="(";break;case"]":Y+=")?";break;default:Y+=(0,E.default)(L[0]),R[W]=L[0].charAt(0)}else(N=h(L))?M!==!0&&N[3]?Y+=N[3].call(b.date):N[2]?Y+=b["raw"+N[2]]:Y+=L[0]:Y+=L[0];W++}return b===void 0&&(P.placeholder=R),Y}g(O,"O");function B(f,b,P){for(f=String(f),b=b||2;f.length<b;)f=P?f+"0":"0"+f;return f}g(B,"_");function F(f,b,P){return typeof f=="string"?new n(f,b,P,this):f&&A(f)==="object"&&Object.prototype.hasOwnProperty.call(f,"date")?f:void 0}g(F,"M");function T(f,b){return O(b.inputFormat,{date:f},b)}g(T,"E");function j(f,b,P){var M,L,N=this,Y=P&&P.tests[f]?b.placeholder[P.tests[f][0].match.placeholder]||P.tests[f][0].match.placeholder:"",W=0,R=0;for(m(b).lastIndex=0;L=m(b).exec(b.inputFormat);){var $=/\d+$/.exec(L[0]);if($)R=parseInt($[0]);else{for(var tt=L[0][0],z=W;N&&(b.placeholder[G.getTest.call(N,z).match.placeholder]||G.getTest.call(N,z).match.placeholder)===tt;)z++;(R=z-W)===0&&(R=L[0].length)}if(W+=R,L[0].indexOf(Y)!=-1||W>=f+1){M=L,L=m(b).exec(b.inputFormat);break}}return{targetMatchIndex:W-R,nextMatch:L,targetMatch:M}}g(j,"j"),I.default.extendAliases({datetime:{mask:g(function(f){return f.numericInput=!1,o.S=r.ordinalSuffix.join("|"),f.inputFormat=a[f.inputFormat]||f.inputFormat,f.displayFormat=a[f.displayFormat]||f.displayFormat||f.inputFormat,f.outputFormat=a[f.outputFormat]||f.outputFormat||f.inputFormat,f.regex=O(f.inputFormat,void 0,f),f.min=F(f.min,f.inputFormat,f),f.max=F(f.max,f.inputFormat,f),null},"mask"),placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:g(function(f,b,P,M,L,N,Y,W){if(W)return!0;if(isNaN(P)&&f[b]!==P){var R=j.call(this,b,L,N);if(R.nextMatch&&R.nextMatch[0]===P&&R.targetMatch[0].length>1){var $=h(R.targetMatch)[0];if(new RegExp($).test("0"+f[b-1]))return f[b]=f[b-1],f[b-1]="0",{fuzzy:!0,buffer:f,refreshFromBuffer:{start:b-1,end:b+1},pos:b+1}}}return!0},"preValidation"),postValidation:g(function(f,b,P,M,L,N,Y,W){var R,$,tt=this;if(Y)return!0;if(M===!1&&(((R=j.call(tt,b+1,L,N)).targetMatch&&R.targetMatchIndex===b&&R.targetMatch[0].length>1&&o[R.targetMatch[0]]!==void 0||(R=j.call(tt,b+2,L,N)).targetMatch&&R.targetMatchIndex===b+1&&R.targetMatch[0].length>1&&o[R.targetMatch[0]]!==void 0)&&($=h(R.targetMatch)[0]),$!==void 0&&(N.validPositions[b+1]!==void 0&&new RegExp($).test(P+"0")?(f[b]=P,f[b+1]="0",M={pos:b+2,caret:b}):new RegExp($).test("0"+P)&&(f[b]="0",f[b+1]=P,M={pos:b+2})),M===!1))return M;if(M.fuzzy&&(f=M.buffer,b=M.pos),(R=j.call(tt,b,L,N)).targetMatch&&R.targetMatch[0]&&o[R.targetMatch[0]]!==void 0){var z=h(R.targetMatch);$=z[0];var K=f.slice(R.targetMatchIndex,R.targetMatchIndex+R.targetMatch[0].length);if(new RegExp($).test(K.join(""))===!1&&R.targetMatch[0].length===2&&N.validPositions[R.targetMatchIndex]&&N.validPositions[R.targetMatchIndex+1]&&(N.validPositions[R.targetMatchIndex+1].input="0"),z[2]=="year")for(var X=G.getMaskTemplate.call(tt,!1,1,void 0,!0),J=b+1;J<f.length;J++)f[J]=X[J],N.validPositions.splice(b+1,1)}var rt=M,st=F.call(tt,f.join(""),L.inputFormat,L);return rt&&!isNaN(st.date.getTime())&&(L.prefillYear&&(rt=(function(lt,kt,mt){if(lt.year!==lt.rawyear){var _t=p.toString(),Z=lt.rawyear.replace(/[^0-9]/g,""),V=_t.slice(0,Z.length),H=_t.slice(Z.length);if(Z.length===2&&Z===V){var Q=new Date(p,lt.month-1,lt.day);lt.day==Q.getDate()&&(!mt.max||mt.max.date.getTime()>=Q.getTime())&&(lt.date.setFullYear(p),lt.year=_t,kt.insert=[{pos:kt.pos+1,c:H[0]},{pos:kt.pos+2,c:H[1]}])}}return kt})(st,rt,L)),rt=(function(lt,kt,mt,_t,Z){if(!kt)return kt;if(kt&&mt.min&&!isNaN(mt.min.date.getTime())){var V;for(lt.reset(),m(mt).lastIndex=0;V=m(mt).exec(mt.inputFormat);){var H;if((H=h(V))&&H[3]){for(var Q=H[1],q=lt[H[2]],it=mt.min[H[2]],ct=mt.max?mt.max[H[2]]:it+1,nt=[],ot=!1,pt=0;pt<it.length;pt++)_t.validPositions[pt+V.index]!==void 0||ot?(nt[pt]=q[pt],ot=ot||q[pt]>it[pt]):(pt+V.index==0&&q[pt]<it[pt]?(nt[pt]=q[pt],ot=!0):nt[pt]=it[pt],H[2]==="year"&&q.length-1==pt&&it!=ct&&(nt=(parseInt(nt.join(""))+1).toString().split("")),H[2]==="ampm"&&it!=ct&&mt.min.date.getTime()>lt.date.getTime()&&(nt[pt]=ct[pt]));Q.call(lt._date,nt.join(""))}}kt=mt.min.date.getTime()<=lt.date.getTime(),lt.reInit()}return kt&&mt.max&&(isNaN(mt.max.date.getTime())||(kt=mt.max.date.getTime()>=lt.date.getTime())),kt})(st,rt=_.call(tt,st,rt,L),L,N)),b!==void 0&&rt&&M.pos!==b?{buffer:O(L.inputFormat,st,L).split(""),refreshFromBuffer:{start:b,end:M.pos},pos:M.caret||M.pos}:rt},"postValidation"),onKeyDown:g(function(f,b,P,M){f.ctrlKey&&f.key===w.keys.ArrowRight&&(this.inputmask._valueSet(T(new Date,M)),y(this).trigger("setvalue"))},"onKeyDown"),onUnMask:g(function(f,b,P){return b&&O(P.outputFormat,F.call(this,f,P.inputFormat,P),P,!0)},"onUnMask"),casing:g(function(f,b,P,M){if(b.nativeDef.indexOf("[ap]")==0)return f.toLowerCase();if(b.nativeDef.indexOf("[AP]")==0)return f.toUpperCase();var L=G.getTest.call(this,[P-1]);return L.match.def.indexOf("[AP]")==0||P===0||L&&L.input===String.fromCharCode(w.keyCode.Space)||L&&L.match.def===String.fromCharCode(w.keyCode.Space)?f.toUpperCase():f.toLowerCase()},"casing"),onBeforeMask:g(function(f,b){return Object.prototype.toString.call(f)==="[object Date]"&&(f=T(f,b)),f},"onBeforeMask"),insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(d,c,k){var E,I=(E=k(2394))&&E.__esModule?E:{default:E};I.default.dependencyLib.extend(!0,I.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(d,c,k){var E,I=(E=k(2394))&&E.__esModule?E:{default:E},w=k(8711),D=k(4713);function G(S){return(function(v){if(Array.isArray(v))return U(v)})(S)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(S)||(function(v,y){if(v){if(typeof v=="string")return U(v,y);var n=Object.prototype.toString.call(v).slice(8,-1);if(n==="Object"&&v.constructor&&(n=v.constructor.name),n==="Map"||n==="Set")return Array.from(v);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return U(v,y)}})(S)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var V=Object.defineProperty;var f=(e,l)=>V(e,"name",{value:l,configurable:!0});import{P as d,W as c,V as $,c as p,o as s,j as u,f as m,e as w,n as g,a as r,l as T,h as I,v as C,i as S,t as a,k,b as B}from"./main-
|
|
1
|
+
var V=Object.defineProperty;var f=(e,l)=>V(e,"name",{value:l,configurable:!0});import{P as d,W as c,V as $,c as p,o as s,j as u,f as m,e as w,n as g,a as r,l as T,h as I,v as C,i as S,t as a,k,b as B}from"./main-DEBPJr9o.js";import{F as N}from"./FieldComponent.vue_vue_type_script_lang-D-Fg_wy_.js";var W=Object.defineProperty,Y=Object.getOwnPropertyDescriptor,t=f((e,l,v,h)=>{for(var n=h>1?void 0:h?Y(l,v):l,y=e.length-1,i;y>=0;y--)(i=e[y])&&(n=(h?i(l,v,n):i(n))||n);return h&&n&&W(l,v,n),n},"__decorateClass"),b;let o=(b=class extends N{disabled=!1;bg="linear-gradient(330deg, #0aa86d 0%, #4eb18d 50%, #0ca86e 100%)";bgInactive="#a1a1a1";title=null;titleTheme="info";bgTogglerY="#3db37e";bgTogglerN="#FF3A19";titleTogglerY="Active";titleTogglerN="Inactive";togglerWidth="100px";togglerWidthActive="100px";togglerRevertColors=null;boxShadow="0 0 2px #1ca95e";disabledTitle="Disabled";disabledTitleTheme="grey";boxShadowHover="0 0 2px #9eeda8";labelColor="#fff";labelBoxShadow="0 0 4px #a4a4a4";type="switcher";modelValue=!1;value=!1;beforeMount(){this.value=this.modelValue||this.inputValue,this.randomId=$VST.generateRandomKey(32)}emits=["update:modelValue","change"];onValueChange(){this.$emit("update:modelValue",this.value),this.$emit("change",this.value)}randomId="";_modelValueChanged(l){this.setValue(l)}},f(b,"SwitchField"),b);t([d(Boolean)],o.prototype,"disabled",2);t([d(String)],o.prototype,"bg",2);t([d(String)],o.prototype,"bgInactive",2);t([d(String)],o.prototype,"title",2);t([d(String)],o.prototype,"titleTheme",2);t([d(String)],o.prototype,"bgTogglerY",2);t([d(String)],o.prototype,"bgTogglerN",2);t([d(String)],o.prototype,"titleTogglerY",2);t([d(String)],o.prototype,"titleTogglerN",2);t([d(String)],o.prototype,"togglerWidth",2);t([d(String)],o.prototype,"togglerWidthActive",2);t([d(Boolean)],o.prototype,"togglerRevertColors",2);t([d(String)],o.prototype,"boxShadow",2);t([d(String)],o.prototype,"disabledTitle",2);t([d(String)],o.prototype,"disabledTitleTheme",2);t([d(String)],o.prototype,"boxShadowHover",2);t([d(String)],o.prototype,"labelColor",2);t([d(String)],o.prototype,"labelBoxShadow",2);t([d(String)],o.prototype,"type",2);t([d(Boolean,null)],o.prototype,"modelValue",2);t([c("modelValue",!0)],o.prototype,"_modelValueChanged",1);o=t([$],o);const A=["title","data-theme"],D={class:"switch_box"},F=["id","disabled"],P=["for"],L=["id","disabled"],R=["data-tg-off","data-tg-on","for"],O=["id","disabled"],U=["for"];function j(e,l,v,h,n,y){return s(),p("div",{class:g(["container-switch",{"min-w64px":e.type!="checkbox"}]),title:e.disabled?e.disabledTitle:e.title,"data-theme":e.disabled?e.disabledTitleTheme:e.titleTheme,"data-offset":"[-15, 15]"},[l[6]||(l[6]=u(" ",-1)),e.type=="switcher"?(s(),p("div",{key:0,class:g(["switch",e.disabled?"disabled":""])},[r("div",D,[r("div",{class:"cursor-pointer fs-1rem mb2px",onClick:l[0]||(l[0]=i=>e.disabled?null:e.value=!e.value)},[I(e.$slots,"default")]),T(r("input",{id:"switch-"+e.randomId,type:"checkbox","onUpdate:modelValue":l[1]||(l[1]=i=>e.value=i),disabled:e.disabled},null,8,F),[[C,e.value]]),r("label",{for:"switch-"+e.randomId,class:g({disabled:e.disabled})},null,10,P)])],2)):e.type=="toggler"?(s(),p("div",{key:1,class:g(["hybrid-checkbox",{["toggler-"+e.randomId]:!0}])},[T(r("input",{class:"tgl tgl-flip",id:"toggler-"+e.randomId,type:"checkbox","onUpdate:modelValue":l[2]||(l[2]=i=>e.value=i),disabled:e.disabled},null,8,L),[[C,e.value]]),r("label",{class:"tgl-btn","data-tg-off":e.titleTogglerN,"data-tg-on":e.titleTogglerY,for:"toggler-"+e.randomId},null,8,R)],2)):e.type=="checkbox"?(s(),p("div",{key:2,class:g(["typical-checkbox",{disabled:e.disabled}])},[r("span",null,[T(r("input",{type:"checkbox",id:"checkbox-"+e.randomId,"onUpdate:modelValue":l[3]||(l[3]=i=>e.value=i),disabled:e.disabled},null,8,O),[[C,e.value]]),r("label",{class:g(["check pb3px! w20px! p0!",{"bg-white":e.value,"mt3px!":!e.value}]),for:"checkbox-"+e.randomId},[(s(),p("svg",{class:g(["w20px",{"svg-unchecked bg-white":!e.value}]),width:"20px",height:"20px",viewBox:"0 0 18 18"},[...l[5]||(l[5]=[r("path",{d:"M1,9 L1,3.5 C1,2 2,1 3.5,1 L14.5,1 C16,1 17,2 17,3.5 L17,14.5 C17,16 16,17 14.5,17 L3.5,17 C2,17 1,16 1,14.5 L1,9 Z"},null,-1),r("polyline",{points:"1 9 7 14 15 4"},null,-1)])],2))],10,U)]),e.$slots.default?(s(),p("span",{key:0,class:g(["cursor-pointer fs-1rem mx15px my2px whitespace-nowrap",{"fw-bold underline underline-black":e.value}]),onClick:l[4]||(l[4]=i=>e.disabled?null:e.value=!e.value)},[I(e.$slots,"default")],2)):m("",!0)],2)):m("",!0),e.type=="toggler"?(s(),w(k("style"),{key:3},{default:S(()=>[u(".toggler-"+a(e.randomId)+" .tgl-flip + .tgl-btn { perspective: "+a(e.value?e.togglerWidthActive:e.togglerWidth)+" !important; width: "+a(e.value?e.togglerWidthActive:e.togglerWidth)+" !important; } .toggler-"+a(e.randomId)+" .tgl-flip + .tgl-btn:before { background: "+a(e.togglerRevertColors?e.bgTogglerY:e.bgTogglerN)+" } .toggler-"+a(e.randomId)+" .tgl-flip:checked + .tgl-btn:after { background: "+a(e.togglerRevertColors?e.bgTogglerN:e.bgTogglerY)+" }",1)]),_:1})):m("",!0),e.type=="toggler"&&e.disabled?(s(),w(k("style"),{key:4},{default:S(()=>[u(".toggler-"+a(e.randomId)+" { opacity: 0.5 !important; }",1)]),_:1})):m("",!0),e.type=="checkbox"?(s(),w(k("style"),{key:5},{default:S(()=>[u("#checkbox-"+a(e.randomId)+" { display: none; visibility: hidden; } #checkbox-"+a(e.randomId)+" + label { box-sizing: content-box !important; }",1)]),_:1})):m("",!0),(s(),w(k("style"),null,{default:S(()=>[u('[for="switch-'+a(e.randomId)+'"]::before { background: '+a(e.bg)+"; box-shadow: "+a(e.boxShadow)+' !important; } [for="switch-'+a(e.randomId)+'"]:not(.disabled):hover { box-shadow: '+a(e.boxShadowHover)+'; } .switch_box [for="switch-'+a(e.randomId)+'"]::after { background: '+a(e.labelColor)+" !important; box-shadow: "+a(e.labelBoxShadow)+'; } .switch_box [for="switch-'+a(e.randomId)+'"] input { display: none !important; } .switch_box label[for="switch-'+a(e.randomId)+'"] { background: '+a(e.bgInactive)+" !important; }",1)]),_:1}))],10,A)}f(j,"render");const E=B(o,[["render",j]]);export{E as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var C=Object.defineProperty;var o=(t,a)=>C(t,"name",{value:a,configurable:!0});import{O as f,V as k,c as s,o as r,a as g,F as l,Q as b,f as _,n as $,h as v,t as y,l as m,K as w,b as B}from"./main-
|
|
1
|
+
var C=Object.defineProperty;var o=(t,a)=>C(t,"name",{value:a,configurable:!0});import{O as f,V as k,c as s,o as r,a as g,F as l,Q as b,f as _,n as $,h as v,t as y,l as m,K as w,b as B}from"./main-DEBPJr9o.js";var D=Object.getOwnPropertyDescriptor,O=o((t,a,p,c)=>{for(var i=c>1?void 0:c?D(a,p):a,d=t.length-1,u;d>=0;d--)(u=t[d])&&(i=u(i)||i);return i},"__decorateClass"),n;let h=(n=class extends f{currentTab="default";CommentT=Comment;mounted(){}setCurrentTab(a){this.currentTab=a}getTabTitle(a){return a.props?.title||"Без названия"}},o(n,"Tabs"),n);h=O([k],h);const S={class:"tabs"},V={class:"tabs__headers"},W=["onClick"],F=["onClick"],N={key:0,class:"tabs__content"};function P(t,a,p,c,i,d){return r(),s("div",S,[g("div",V,[(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[e.startsWith("$title-")?(r(),s("div",{key:0,class:$(["tabs__header",{"tabs__header--active":t.currentTab===e.split("-")[1]}]),onClick:o(T=>t.setCurrentTab(e.split("-")[1]),"onClick")},[v(t.$slots,e,{},void 0,!0)],10,W)):_("",!0)],64))),256)),(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[!e.startsWith("$title")&&!t.$slots?.[`$title-${e}`]?(r(),s("div",{key:0,class:$(["tabs__header",{"tabs__header--active":t.currentTab===e}]),onClick:o(T=>t.setCurrentTab(e),"onClick")},y(e),11,F)):_("",!0)],64))),256))]),(r(!0),s(l,null,b(t.$slots,(u,e)=>(r(),s(l,null,[e.startsWith("$")?_("",!0):m((r(),s("div",N,[v(t.$slots,e,{},void 0,!0)],512)),[[w,t.currentTab==e]])],64))),256))])}o(P,"render");const E=B(h,[["render",P],["__scopeId","data-v-f8d3de0a"]]);export{E as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var z0=Object.defineProperty;var a=(t,e)=>z0(t,"name",{value:e,configurable:!0});import{m as bf,p as yf,q as xf,s as $0,u as kf,x as H0,y as V0,z as wf,A as j0,B as q0,D as W0,E as U0,G as K0,P as ps,W as J0,V as G0,r as Ar,c as Fs,o as Mr,e as lc,f as Ls,H as De,a as G,i as qe,n as at,j as Ps,g as Z0,l as X0,I as Y0,k as Q0,b as em}from"./main-BA_xYI7Q.js";import{F as tm}from"./FieldComponent.vue_vue_type_script_lang-DIszkOwN.js";import{g as nm}from"./_commonjsHelpers-CV2jkJYL.js";import{r as rm}from"./NoSymbolIcon-Ckw4IyE_.js";function ue(t){this.content=t}a(ue,"OrderedMap");ue.prototype={constructor:ue,find:a(function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},"find"),get:a(function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},"get"),update:a(function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new ue(o)},"update"),remove:a(function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ue(n)},"remove"),addToStart:a(function(t,e){return new ue([t,e].concat(this.remove(t).content))},"addToStart"),addToEnd:a(function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ue(n)},"addToEnd"),addBefore:a(function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new ue(i)},"addBefore"),forEach:a(function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},"forEach"),prepend:a(function(t){return t=ue.from(t),t.size?new ue(t.content.concat(this.subtract(t).content)):this},"prepend"),append:a(function(t){return t=ue.from(t),t.size?new ue(this.subtract(t).content.concat(t.content)):this},"append"),subtract:a(function(t){var e=this;t=ue.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},"subtract"),toObject:a(function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},"toObject"),get size(){return this.content.length>>1}};ue.from=function(t){if(t instanceof ue)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ue(e)};function Cf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Cf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}a(Cf,"findDiffStart");function Ef(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),u=e.child(--o),l=s.nodeSize;if(s==u){n-=l,r-=l;continue}if(!s.sameMarkup(u))return{a:n,b:r};if(s.isText&&s.text!=u.text){let c=0,d=Math.min(s.text.length,u.text.length);for(;c<d&&s.text[s.text.length-c-1]==u.text[u.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||u.content.size){let c=Ef(s.content,u.content,n-1,r-1);if(c)return c}n-=l,r-=l}}a(Ef,"findDiffEnd");const se=class se{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,u=0;u<n;s++){let l=this.content[s],c=u+l.nodeSize;if(c>e&&r(l,i+u,o||null,s)!==!1&&l.content.size){let d=u+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,i+d)}u=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(u,l)=>{let c=u.isText?u.text.slice(Math.max(e,l)-l,n-l):u.isLeaf?i?typeof i=="function"?i(u):i:u.type.spec.leafText?u.type.spec.leafText(u):"":"";u.isBlock&&(u.isLeaf&&c||u.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new se(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let u=this.content[o],l=s+u.nodeSize;l>e&&((s<e||l>n)&&(u.isText?u=u.cut(Math.max(0,e-s),Math.min(u.text.length,n-s)):u=u.cut(Math.max(0,e-s-1),Math.min(u.content.size,n-s-1))),r.push(u),i+=u.nodeSize),s=l}return new se(r,i)}cutByIndex(e,n){return e==n?se.empty:e==0&&n==this.content.length?this:new se(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new se(i,o)}addToStart(e){return new se([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new se(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Cf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Ef(this,e,n,r)}findIndex(e){if(e==0)return Si(0,e);if(e==this.size)return Si(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?Si(n+1,o):Si(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return se.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return se.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new se(n||e,r)}static from(e){if(!e)return se.empty;if(e instanceof se)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new se([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};a(se,"Fragment");let A=se;A.empty=new A([],0);const Bs={index:0,offset:0};function Si(t,e){return Bs.index=t,Bs.offset=e,Bs}a(Si,"retIndex");function Ui(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Ui(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Ui(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}a(Ui,"compareDeep");var jt;let B=(jt=class{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ui(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return jt.none;if(e instanceof jt)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}},a(jt,"Mark"),jt);B.none=[];const Sa=class Sa extends Error{};a(Sa,"ReplaceError");let sr=Sa;const _t=class _t{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=vf(this.content,e+this.openStart,n);return r&&new _t(r,this.openStart,this.openEnd)}removeBetween(e,n){return new _t(Sf(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return _t.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new _t(A.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new _t(e,r,i)}};a(_t,"Slice");let M=_t;M.empty=new M(A.empty,0,0);function Sf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:u}=t.findIndex(n);if(i==e||o.isText){if(u!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Sf(o.content,e-i-1,n-i-1)))}a(Sf,"removeRange");function vf(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let u=vf(s.content,e-o-1,n,s);return u&&t.replaceChild(i,s.copy(u))}a(vf,"insertInto");function im(t,e,n){if(n.openStart>t.depth)throw new sr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new sr("Inconsistent open depths");return Af(t,e,n,0)}a(im,"replace$1");function Af(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Af(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,u=s.content;return mn(s,u.cut(0,t.parentOffset).append(n.content).append(u.cut(e.parentOffset)))}else{let{start:s,end:u}=om(n,t);return mn(o,Tf(t,s,u,e,r))}else return mn(o,Ki(t,e,r))}a(Af,"replaceOuter");function Mf(t,e){if(!e.type.compatibleContent(t.type))throw new sr("Cannot join "+e.type.name+" onto "+t.type.name)}a(Mf,"checkJoin");function wu(t,e,n){let r=t.node(n);return Mf(r,e.node(n)),r}a(wu,"joinable$1");function pn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}a(pn,"addNode");function Rr(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(pn(t.nodeAfter,r),o++));for(let u=o;u<s;u++)pn(i.child(u),r);e&&e.depth==n&&e.textOffset&&pn(e.nodeBefore,r)}a(Rr,"addRange");function mn(t,e){return t.type.checkContent(e),t.copy(e)}a(mn,"close");function Tf(t,e,n,r,i){let o=t.depth>i&&wu(t,e,i+1),s=r.depth>i&&wu(n,r,i+1),u=[];return Rr(null,t,i,u),o&&s&&e.index(i)==n.index(i)?(Mf(o,s),pn(mn(o,Tf(t,e,n,r,i+1)),u)):(o&&pn(mn(o,Ki(t,e,i+1)),u),Rr(e,n,i,u),s&&pn(mn(s,Ki(n,r,i+1)),u)),Rr(r,null,i,u),new A(u)}a(Tf,"replaceThreeWay");function Ki(t,e,n){let r=[];if(Rr(null,t,n,r),t.depth>n){let i=wu(t,e,n+1);pn(mn(i,Ki(t,e,n+1)),r)}return Rr(e,null,n,r),new A(r)}a(Ki,"replaceTwoWay");function om(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(A.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}a(om,"prepareSliceForReplace");const Wr=class Wr{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let u=r;r=i,i=u}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new ur(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:u,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,u,i+l),!c||(s=s.child(u),s.isText))break;o=c-1,i+=l+1}return new Wr(n,r,o)}static resolveCached(e,n){let r=ac.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else ac.set(e,r=new Cu);let i=r.elts[r.i]=Wr.resolve(e,n);return r.i=(r.i+1)%sm,i}};a(Wr,"ResolvedPos");let Ji=Wr;const va=class va{constructor(){this.elts=[],this.i=0}};a(va,"ResolveCache");let Cu=va;const sm=12,ac=new WeakMap,Aa=class Aa{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};a(Aa,"NodeRange");let ur=Aa;const um=Object.create(null);var qt;let zt=(qt=class{constructor(e,n,r,i=B.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Ui(this.attrs,n||e.defaultAttrs||um)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new qt(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qt(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),u=i.start(s),c=i.node(s).content.cut(i.pos-u,o.pos-u);return new M(c,i.depth-s,o.depth-s)}replace(e,n,r){return im(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Ji.resolveCached(this,e)}resolveNoCache(e){return Ji.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Df(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=A.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),u=s&&s.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=B.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=A.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}},a(qt,"Node"),qt);zt.prototype.text=void 0;const Ur=class Ur extends zt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Df(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ur(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ur(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};a(Ur,"TextNode");let Eu=Ur;function Df(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}a(Df,"wrapMarks");const ns=class ns{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Su(e,n);if(r.next==null)return ns.empty;let i=Of(r);r.next&&r.err("Unexpected trailing text");let o=pm(hm(i));return mm(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,u){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return A.from(u.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,u.concat(d));if(p)return p}}return null}return a(o,"search"),o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let u=i;u.type;u=u.via)s.push(u.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:u,next:l}=o.next[s];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||l.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return a(n,"scan"),n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
1
|
+
var z0=Object.defineProperty;var a=(t,e)=>z0(t,"name",{value:e,configurable:!0});import{m as bf,p as yf,q as xf,s as $0,u as kf,x as H0,y as V0,z as wf,A as j0,B as q0,D as W0,E as U0,G as K0,P as ps,W as J0,V as G0,r as Ar,c as Fs,o as Mr,e as lc,f as Ls,H as De,a as G,i as qe,n as at,j as Ps,g as Z0,l as X0,I as Y0,k as Q0,b as em}from"./main-DEBPJr9o.js";import{F as tm}from"./FieldComponent.vue_vue_type_script_lang-D-Fg_wy_.js";import{g as nm}from"./_commonjsHelpers-CV2jkJYL.js";import{r as rm}from"./NoSymbolIcon-Bt8TQGfd.js";function ue(t){this.content=t}a(ue,"OrderedMap");ue.prototype={constructor:ue,find:a(function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},"find"),get:a(function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},"get"),update:a(function(t,e,n){var r=n&&n!=t?this.remove(n):this,i=r.find(t),o=r.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new ue(o)},"update"),remove:a(function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new ue(n)},"remove"),addToStart:a(function(t,e){return new ue([t,e].concat(this.remove(t).content))},"addToStart"),addToEnd:a(function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new ue(n)},"addToEnd"),addBefore:a(function(t,e,n){var r=this.remove(e),i=r.content.slice(),o=r.find(t);return i.splice(o==-1?i.length:o,0,e,n),new ue(i)},"addBefore"),forEach:a(function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},"forEach"),prepend:a(function(t){return t=ue.from(t),t.size?new ue(t.content.concat(this.subtract(t).content)):this},"prepend"),append:a(function(t){return t=ue.from(t),t.size?new ue(this.subtract(t).content.concat(t.content)):this},"append"),subtract:a(function(t){var e=this;t=ue.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},"subtract"),toObject:a(function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},"toObject"),get size(){return this.content.length>>1}};ue.from=function(t){if(t instanceof ue)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new ue(e)};function Cf(t,e,n){for(let r=0;;r++){if(r==t.childCount||r==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(r),o=e.child(r);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Cf(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}}a(Cf,"findDiffStart");function Ef(t,e,n,r){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=t.child(--i),u=e.child(--o),l=s.nodeSize;if(s==u){n-=l,r-=l;continue}if(!s.sameMarkup(u))return{a:n,b:r};if(s.isText&&s.text!=u.text){let c=0,d=Math.min(s.text.length,u.text.length);for(;c<d&&s.text[s.text.length-c-1]==u.text[u.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||u.content.size){let c=Ef(s.content,u.content,n-1,r-1);if(c)return c}n-=l,r-=l}}a(Ef,"findDiffEnd");const se=class se{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,n,r,i=0,o){for(let s=0,u=0;u<n;s++){let l=this.content[s],c=u+l.nodeSize;if(c>e&&r(l,i+u,o||null,s)!==!1&&l.content.size){let d=u+1;l.nodesBetween(Math.max(0,e-d),Math.min(l.content.size,n-d),r,i+d)}u=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,r,i){let o="",s=!0;return this.nodesBetween(e,n,(u,l)=>{let c=u.isText?u.text.slice(Math.max(e,l)-l,n-l):u.isLeaf?i?typeof i=="function"?i(u):i:u.type.spec.leafText?u.type.spec.leafText(u):"":"";u.isBlock&&(u.isLeaf&&c||u.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,r=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new se(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let r=[],i=0;if(n>e)for(let o=0,s=0;s<n;o++){let u=this.content[o],l=s+u.nodeSize;l>e&&((s<e||l>n)&&(u.isText?u=u.cut(Math.max(0,e-s),Math.min(u.text.length,n-s)):u=u.cut(Math.max(0,e-s-1),Math.min(u.content.size,n-s-1))),r.push(u),i+=u.nodeSize),s=l}return new se(r,i)}cutByIndex(e,n){return e==n?se.empty:e==0&&n==this.content.length?this:new se(this.content.slice(e,n))}replaceChild(e,n){let r=this.content[e];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[e]=n,new se(i,o)}addToStart(e){return new se([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new se(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];e(i,r,n),r+=i.nodeSize}}findDiffStart(e,n=0){return Cf(this,e,n)}findDiffEnd(e,n=this.size,r=e.size){return Ef(this,e,n,r)}findIndex(e){if(e==0)return Si(0,e);if(e==this.size)return Si(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=this.child(n),o=r+i.nodeSize;if(o>=e)return o==e?Si(n+1,o):Si(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return se.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new se(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return se.empty;let n,r=0;for(let i=0;i<e.length;i++){let o=e[i];r+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new se(n||e,r)}static from(e){if(!e)return se.empty;if(e instanceof se)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new se([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};a(se,"Fragment");let A=se;A.empty=new A([],0);const Bs={index:0,offset:0};function Si(t,e){return Bs.index=t,Bs.offset=e,Bs}a(Si,"retIndex");function Ui(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let r=0;r<t.length;r++)if(!Ui(t[r],e[r]))return!1}else{for(let r in t)if(!(r in e)||!Ui(t[r],e[r]))return!1;for(let r in e)if(!(r in t))return!1}return!0}a(Ui,"compareDeep");var jt;let B=(jt=class{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,r=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!r&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=e.slice()),r||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Ui(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(n[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return jt.none;if(e instanceof jt)return[e];let n=e.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}},a(jt,"Mark"),jt);B.none=[];const Sa=class Sa extends Error{};a(Sa,"ReplaceError");let sr=Sa;const _t=class _t{constructor(e,n,r){this.content=e,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let r=vf(this.content,e+this.openStart,n);return r&&new _t(r,this.openStart,this.openEnd)}removeBetween(e,n){return new _t(Sf(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return _t.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new _t(A.fromJSON(e,n.content),r,i)}static maxOpen(e,n=!0){let r=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new _t(e,r,i)}};a(_t,"Slice");let M=_t;M.empty=new M(A.empty,0,0);function Sf(t,e,n){let{index:r,offset:i}=t.findIndex(e),o=t.maybeChild(r),{index:s,offset:u}=t.findIndex(n);if(i==e||o.isText){if(u!=n&&!t.child(s).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return t.replaceChild(r,o.copy(Sf(o.content,e-i-1,n-i-1)))}a(Sf,"removeRange");function vf(t,e,n,r){let{index:i,offset:o}=t.findIndex(e),s=t.maybeChild(i);if(o==e||s.isText)return r&&!r.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let u=vf(s.content,e-o-1,n,s);return u&&t.replaceChild(i,s.copy(u))}a(vf,"insertInto");function im(t,e,n){if(n.openStart>t.depth)throw new sr("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new sr("Inconsistent open depths");return Af(t,e,n,0)}a(im,"replace$1");function Af(t,e,n,r){let i=t.index(r),o=t.node(r);if(i==e.index(r)&&r<t.depth-n.openStart){let s=Af(t,e,n,r+1);return o.copy(o.content.replaceChild(i,s))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==r&&e.depth==r){let s=t.parent,u=s.content;return mn(s,u.cut(0,t.parentOffset).append(n.content).append(u.cut(e.parentOffset)))}else{let{start:s,end:u}=om(n,t);return mn(o,Tf(t,s,u,e,r))}else return mn(o,Ki(t,e,r))}a(Af,"replaceOuter");function Mf(t,e){if(!e.type.compatibleContent(t.type))throw new sr("Cannot join "+e.type.name+" onto "+t.type.name)}a(Mf,"checkJoin");function wu(t,e,n){let r=t.node(n);return Mf(r,e.node(n)),r}a(wu,"joinable$1");function pn(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}a(pn,"addNode");function Rr(t,e,n,r){let i=(e||t).node(n),o=0,s=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(pn(t.nodeAfter,r),o++));for(let u=o;u<s;u++)pn(i.child(u),r);e&&e.depth==n&&e.textOffset&&pn(e.nodeBefore,r)}a(Rr,"addRange");function mn(t,e){return t.type.checkContent(e),t.copy(e)}a(mn,"close");function Tf(t,e,n,r,i){let o=t.depth>i&&wu(t,e,i+1),s=r.depth>i&&wu(n,r,i+1),u=[];return Rr(null,t,i,u),o&&s&&e.index(i)==n.index(i)?(Mf(o,s),pn(mn(o,Tf(t,e,n,r,i+1)),u)):(o&&pn(mn(o,Ki(t,e,i+1)),u),Rr(e,n,i,u),s&&pn(mn(s,Ki(n,r,i+1)),u)),Rr(r,null,i,u),new A(u)}a(Tf,"replaceThreeWay");function Ki(t,e,n){let r=[];if(Rr(null,t,n,r),t.depth>n){let i=wu(t,e,n+1);pn(mn(i,Ki(t,e,n+1)),r)}return Rr(e,null,n,r),new A(r)}a(Ki,"replaceTwoWay");function om(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(A.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}a(om,"prepareSliceForReplace");const Wr=class Wr{constructor(e,n,r){this.pos=e,this.path=n,this.parentOffset=r,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(n);return r?e.child(n).cut(r):i}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let r=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=r.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return B.none;if(this.textOffset)return e.child(n).marks;let r=e.maybeChild(n-1),i=e.maybeChild(n);if(!r){let u=r;r=i,i=u}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive===!1&&(!i||!o[s].isInSet(i.marks))&&(o=o[s--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<r.length;o++)r[o].type.spec.inclusive===!1&&(!i||!r[o].isInSet(i.marks))&&(r=r[o--].removeFromSet(r));return r}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!n||n(this.node(r))))return new ur(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=e;;){let{index:u,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,u,i+l),!c||(s=s.child(u),s.isText))break;o=c-1,i+=l+1}return new Wr(n,r,o)}static resolveCached(e,n){let r=ac.get(e);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else ac.set(e,r=new Cu);let i=r.elts[r.i]=Wr.resolve(e,n);return r.i=(r.i+1)%sm,i}};a(Wr,"ResolvedPos");let Ji=Wr;const va=class va{constructor(){this.elts=[],this.i=0}};a(va,"ResolveCache");let Cu=va;const sm=12,ac=new WeakMap,Aa=class Aa{constructor(e,n,r){this.$from=e,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}};a(Aa,"NodeRange");let ur=Aa;const um=Object.create(null);var qt;let zt=(qt=class{constructor(e,n,r,i=B.none){this.type=e,this.attrs=n,this.marks=i,this.content=r||A.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,r,i=0){this.content.nodesBetween(e,n,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,r,i){return this.content.textBetween(e,n,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,r){return this.type==e&&Ui(this.attrs,n||e.defaultAttrs||um)&&B.sameSet(this.marks,r||B.none)}copy(e=null){return e==this.content?this:new qt(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new qt(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,r=!1){if(e==n)return M.empty;let i=this.resolve(e),o=this.resolve(n),s=r?0:i.sharedDepth(n),u=i.start(s),c=i.node(s).content.cut(i.pos-u,o.pos-u);return new M(c,i.depth-s,o.depth-s)}replace(e,n,r){return im(this.resolve(e),this.resolve(n),r)}nodeAt(e){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(r),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(e){return Ji.resolveCached(this,e)}resolveNoCache(e){return Ji.resolve(this,e)}rangeHasMark(e,n,r){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),Df(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,r=A.empty,i=0,o=r.childCount){let s=this.contentMatchAt(e).matchFragment(r,i,o),u=s&&s.matchFragment(this.content,n);if(!u||!u.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(e,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(r),s=o&&o.matchFragment(this.content,n);return s?s.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=B.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),e=r.addToSet(e)}if(!B.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,r)}let i=A.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}},a(qt,"Node"),qt);zt.prototype.text=void 0;const Ur=class Ur extends zt{constructor(e,n,r,i){if(super(e,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Df(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new Ur(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Ur(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};a(Ur,"TextNode");let Eu=Ur;function Df(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}a(Df,"wrapMarks");const ns=class ns{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let r=new Su(e,n);if(r.next==null)return ns.empty;let i=Of(r);r.next&&r.err("Unexpected trailing text");let o=pm(hm(i));return mm(o,r),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,r=e.childCount){let i=this;for(let o=n;i&&o<r;o++)i=i.matchType(e.child(o).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let r=0;r<e.next.length;r++)if(this.next[n].type==e.next[r].type)return!0;return!1}fillBefore(e,n=!1,r=0){let i=[this];function o(s,u){let l=s.matchFragment(e,r);if(l&&(!n||l.validEnd))return A.from(u.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:d,next:f}=s.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(f)==-1){i.push(f);let p=o(f,u.concat(d));if(p)return p}}return null}return a(o,"search"),o(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(e)){let s=[];for(let u=i;u.type;u=u.via)s.push(u.type);return s.reverse()}for(let s=0;s<o.next.length;s++){let{type:u,next:l}=o.next[s];!u.isLeaf&&!u.hasRequiredAttrs()&&!(u.name in n)&&(!i.type||l.validEnd)&&(r.push({match:u.contentMatch,type:u,via:i}),n[u.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}return a(n,"scan"),n(this),e.map((r,i)=>{let o=i+(r.validEnd?"*":" ")+" ";for(let s=0;s<r.next.length;s++)o+=(s?", ":"")+r.next[s].type.name+"->"+e.indexOf(r.next[s].next);return o}).join(`
|
|
2
2
|
`)}};a(ns,"ContentMatch");let An=ns;An.empty=new An(!0);const Ma=class Ma{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}};a(Ma,"TokenStream");let Su=Ma;function Of(t){let e=[];do e.push(lm(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}a(Of,"parseExpr");function lm(t){let e=[];do e.push(am(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}a(lm,"parseExprSeq");function am(t){let e=fm(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=cm(t,e);else break;return e}a(am,"parseExprSubscript");function cc(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}a(cc,"parseNum");function cm(t,e){let n=cc(t),r=n;return t.eat(",")&&(t.next!="}"?r=cc(t):r=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:e}}a(cm,"parseExprRange");function dm(t,e){let n=t.nodeTypes,r=n[e];if(r)return[r];let i=[];for(let o in n){let s=n[o];s.isInGroup(e)&&i.push(s)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}a(dm,"resolveName");function fm(t){if(t.eat("(")){let e=Of(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=dm(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}a(fm,"parseExprAtom");function hm(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}a(n,"node");function r(s,u,l){let c={term:l,to:u};return e[s].push(c),c}a(r,"edge");function i(s,u){s.forEach(l=>l.to=u)}a(i,"connect");function o(s,u){if(s.type=="choice")return s.exprs.reduce((l,c)=>l.concat(o(c,u)),[]);if(s.type=="seq")for(let l=0;;l++){let c=o(s.exprs[l],u);if(l==s.exprs.length-1)return c;i(c,u=n())}else if(s.type=="star"){let l=n();return r(u,l),i(o(s.expr,l),l),[r(l)]}else if(s.type=="plus"){let l=n();return i(o(s.expr,u),l),i(o(s.expr,l),l),[r(l)]}else{if(s.type=="opt")return[r(u)].concat(o(s.expr,u));if(s.type=="range"){let l=u;for(let c=0;c<s.min;c++){let d=n();i(o(s.expr,l),d),l=d}if(s.max==-1)i(o(s.expr,l),l);else for(let c=s.min;c<s.max;c++){let d=n();r(l,d),i(o(s.expr,l),d),l=d}return[r(l)]}else{if(s.type=="name")return[r(u,void 0,s.value)];throw new Error("Unknown expr type")}}}a(o,"compile")}a(hm,"nfa");function _f(t,e){return e-t}a(_f,"cmp");function dc(t,e){let n=[];return r(e),n.sort(_f);function r(i){let o=t[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:u,to:l}=o[s];!u&&n.indexOf(l)==-1&&r(l)}}a(r,"scan")}a(dc,"nullFrom");function pm(t){let e=Object.create(null);return n(dc(t,0));function n(r){let i=[];r.forEach(s=>{t[s].forEach(({term:u,to:l})=>{if(!u)return;let c;for(let d=0;d<i.length;d++)i[d][0]==u&&(c=i[d][1]);dc(t,l).forEach(d=>{c||i.push([u,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let o=e[r.join(",")]=new An(r.indexOf(t.length-1)>-1);for(let s=0;s<i.length;s++){let u=i[s][1].sort(_f);o.next.push({type:i[s][0],next:e[u.join(",")]||n(u)})}return o}}a(pm,"dfa");function mm(t,e){for(let n=0,r=[t];n<r.length;n++){let i=r[n],o=!i.validEnd,s=[];for(let u=0;u<i.next.length;u++){let{type:l,next:c}=i.next[u];s.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),r.indexOf(c)==-1&&r.push(c)}o&&e.err("Only non-generatable nodes ("+s.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}a(mm,"checkForDeadEnds");function Nf(t){let e=Object.create(null);for(let n in t){let r=t[n];if(!r.hasDefault)return null;e[n]=r.default}return e}a(Nf,"defaultAttrs");function If(t,e){let n=Object.create(null);for(let r in t){let i=e&&e[r];if(i===void 0){let o=t[r];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+r)}n[r]=i}return n}a(If,"computeAttrs");function Rf(t,e,n,r){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}a(Rf,"checkAttrs");function Ff(t,e){let n=Object.create(null);if(e)for(let r in e)n[r]=new vu(t,r,e[r]);return n}a(Ff,"initAttrs");var kn;let fc=(kn=class{constructor(e,n,r){this.name=e,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Ff(e,r.attrs),this.defaultAttrs=Nf(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==An.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:If(this.attrs,e)}create(e=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new zt(this,this.computeAttrs(e),A.from(n),B.setFrom(r))}createChecked(e=null,n,r){return n=A.from(n),this.checkContent(n),new zt(this,this.computeAttrs(e),n,B.setFrom(r))}createAndFill(e=null,n,r){if(e=this.computeAttrs(e),n=A.from(n),n.size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(A.empty,!0);return o?new zt(this,e,n.append(o),B.setFrom(r)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){Rf(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?n&&n.push(e[r]):n||(n=e.slice(0,r));return n?n.length?n:B.none:e}static compile(e,n){let r=Object.create(null);e.forEach((o,s)=>r[o]=new kn(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}},a(kn,"NodeType"),kn);function gm(t,e,n){let r=n.split("|");return i=>{let o=i===null?"null":typeof i;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${e} on type ${t}, got ${o}`)}}a(gm,"validateType");const Ta=class Ta{constructor(e,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?gm(e,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}};a(Ta,"Attribute");let vu=Ta;const rs=class rs{constructor(e,n,r,i){this.name=e,this.rank=n,this.schema=r,this.spec=i,this.attrs=Ff(e,i.attrs),this.excluded=null;let o=Nf(this.attrs);this.instance=o?new B(this,o):null}create(e=null){return!e&&this.instance?this.instance:new B(this,If(this.attrs,e))}static compile(e,n){let r=Object.create(null),i=0;return e.forEach((o,s)=>r[o]=new rs(o,i++,n,s)),r}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){Rf(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}};a(rs,"MarkType");let Gi=rs;const Da=class Da{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=ue.from(e.nodes),n.marks=ue.from(e.marks||{}),this.nodes=fc.compile(this.spec.nodes,this),this.marks=Gi.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],s=o.spec.content||"",u=o.spec.marks;if(o.contentMatch=r[s]||(r[s]=An.parse(s,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=u=="_"?null:u?hc(this,u.split(" ")):u==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],s=o.spec.excludes;o.excluded=s==null?[o]:s==""?[]:hc(this,s.split(" "))}this.nodeFromJSON=i=>zt.fromJSON(this,i),this.markFromJSON=i=>B.fromJSON(this,i),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof fc){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,r,i)}text(e,n){let r=this.nodes.text;return new Eu(r,r.defaultAttrs,e,B.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}};a(Da,"Schema");let Qr=Da;function hc(t,e){let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t.marks[i],s=o;if(o)n.push(o);else for(let u in t.marks){let l=t.marks[u];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return n}a(hc,"gatherMarks");function bm(t){return t.tag!=null}a(bm,"isTagRule");function ym(t){return t.style!=null}a(ym,"isStyleRule");const Kr=class Kr{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(bm(i))this.tags.push(i);else if(ym(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let r=new Zi(this,n,!1);return r.addAll(e,B.none,n.from,n.to),r.finish()}parseSlice(e,n={}){let r=new Zi(this,n,!0);return r.addAll(e,B.none,n.from,n.to),M.maxOpen(r.finish())}matchTag(e,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(wm(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(e);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(e,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],u=s.style;if(!(u.indexOf(e)!=0||s.context&&!r.matchesContext(s.context)||u.length>e.length&&(u.charCodeAt(e.length)!=61||u.slice(e.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(e){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let u=n[s];if((u.priority==null?50:u.priority)<o)break}n.splice(s,0,i)}a(r,"insert");for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=mc(s)),s.mark||s.ignore||s.clearMark||(s.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(s=>{r(s=mc(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Kr(e,Kr.schemaRules(e)))}};a(Kr,"DOMParser");let $t=Kr;const Lf={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},xm={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Pf={ol:!0,ul:!0},ei=1,Au=2,Fr=4;function pc(t,e,n){return e!=null?(e?ei:0)|(e==="full"?Au:0):t&&t.whitespace=="pre"?ei|Au:n&~Fr}a(pc,"wsOptionsFor");const Oa=class Oa{constructor(e,n,r,i,o,s){this.type=e,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=B.none,this.match=o||(s&Fr?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(A.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&ei)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let o=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=A.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(A.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Lf.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}};a(Oa,"NodeContext");let Bn=Oa;const _a=class _a{constructor(e,n,r){this.parser=e,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i=n.topNode,o,s=pc(null,n.preserveWhitespace,0)|(r?Fr:0);i?o=new Bn(i.type,i.attrs,B.none,!0,n.topMatch||i.type.contentMatch,s):r?o=new Bn(null,null,B.none,!0,null,s):o=new Bn(e.schema.topNodeType,null,B.none,!0,null,s),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let r=e.nodeValue,i=this.top,o=i.options&Au?"full":this.localPreserveWS||(i.options&ei)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
3
3
|
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let u=r.split(/\r?\n|\r/);for(let l=0;l<u.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),u[l]&&this.insertNode(s.text(u[l]),n,!/\S/.test(u[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let u=i.content[i.content.length-1],l=e.previousSibling;(!u||l&&l.nodeName=="BR"||u.isText&&/[ \t\r\n\u000c]$/.test(u.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(e)}else this.findInside(e)}addElement(e,n,r){let i=this.localPreserveWS,o=this.top;(e.tagName=="PRE"||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let s=e.nodeName.toLowerCase(),u;Pf.hasOwnProperty(s)&&this.parser.normalizeLists&&km(e);let l=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(u=this.parser.matchTag(e,this,r));e:if(l?l.ignore:xm.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(e=l.skip);let c,d=this.needsBlock;if(Lf.hasOwnProperty(s))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);break e}let f=l&&l.skip?n:this.readStyles(e,n);f&&this.addAll(e,f),c&&this.sync(o),this.needsBlock=d}else{let c=this.readStyles(e,n);c&&this.addElementByRule(e,l,c,l.consuming===!1?u:void 0)}this.localPreserveWS=i}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
4
4
|
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(e,n){let r=e.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let u=void 0;;){let l=this.parser.matchStyle(o,s,this,u);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)u=l;else break}}return n}addElementByRule(e,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,e.nodeName=="BR")||this.leafFallback(e,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let u=this.top;if(s&&s.isLeaf)this.findInside(e);else if(i)this.addElement(e,r,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,r),this.findAround(e,l,!1)}o&&this.sync(u)&&this.open--}addAll(e,n,r,i){let o=r||0;for(let s=r?e.childNodes[r]:e.firstChild,u=i==null?null:e.childNodes[i];s!=u;s=s.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(s,n);this.findAtPoint(e,o)}findPlace(e,n,r){let i,o;for(let s=this.open,u=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(e);if(c&&(!i||i.length>c.length+u)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;u+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(e,n,r){if(e.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(e,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(e.type));let s=B.none;for(let u of i.concat(e.marks))(o.type?o.type.allowsMarkType(u.type):gc(u.type,e.type))&&(s=u.addToSet(s));return o.content.push(e.mark(s)),!0}return!1}enter(e,n,r,i){let o=this.findPlace(e.create(n),r,!1);return o&&(o=this.enterInner(e,n,r,!0,i)),o}enterInner(e,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(e);let u=pc(e,o,s.options);s.options&Fr&&s.content.length==0&&(u|=Fr);let l=B.none;return r=r.filter(c=>(s.type?s.type.allowsMarkType(c.type):gc(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new Bn(e,n,l,i,null,u)),this.open++,r}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let n=this.open;n>=0;n--){if(this.nodes[n]==e)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=ei)}return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)e+=r[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==e&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,r){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),r=this.options.context,i=!this.isOpen&&(!r||r.parent.type==this.nodes[0].type),o=-(r?r.depth+1:0)+(i?0:1),s=a((u,l)=>{for(;u>=0;u--){let c=n[u];if(c==""){if(u==n.length-1||u==0)continue;for(;l>=o;l--)if(s(u-1,l))return!0;return!1}else{let d=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!d||d.name!=c&&!d.isInGroup(c))return!1;l--}}return!0},"match");return s(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let r=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}};a(_a,"ParseContext");let Zi=_a;function km(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let r=e.nodeType==1?e.nodeName.toLowerCase():null;r&&Pf.hasOwnProperty(r)&&n?(n.appendChild(e),e=n):r=="li"?n=e:r&&(n=null)}}a(km,"normalizeList");function wm(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}a(wm,"matches");function mc(t){let e={};for(let n in t)e[n]=t[n];return e}a(mc,"copy");function gc(t,e){let n=e.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(t))continue;let o=[],s=a(u=>{o.push(u);for(let l=0;l<u.edgeCount;l++){let{type:c,next:d}=u.edge(l);if(c==e||o.indexOf(d)<0&&s(d))return!0}},"scan");if(s(i.contentMatch))return!0}}a(gc,"markMayApply");const is=class is{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},r){r||(r=zs(n).createDocumentFragment());let i=r,o=[];return e.forEach(s=>{if(o.length||s.marks.length){let u=0,l=0;for(;u<o.length&&l<s.marks.length;){let c=s.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[u][0])||c.type.spec.spanning===!1)break;u++,l++}for(;u<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],d=this.serializeMark(c,s.isInline,n);d&&(o.push([c,i]),i.appendChild(d.dom),i=d.contentDOM||d.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(e,n){let{dom:r,contentDOM:i}=$i(zs(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return r}serializeNode(e,n={}){let r=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(e,n,r={}){let i=this.marks[e.type.name];return i&&$i(zs(r),i(e,n),null,e.attrs)}static renderSpec(e,n,r=null,i){return $i(e,n,r,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new is(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=bc(e.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(e){return bc(e.marks)}};a(is,"DOMSerializer");let Mn=is;function bc(t){let e={};for(let n in t){let r=t[n].spec.toDOM;r&&(e[n]=r)}return e}a(bc,"gatherToDOM");function zs(t){return t.document||window.document}a(zs,"doc$1");const yc=new WeakMap;function Cm(t){let e=yc.get(t);return e===void 0&&yc.set(t,e=Em(t)),e}a(Cm,"suspiciousAttributes");function Em(t){let e=null;function n(r){if(r&&typeof r=="object")if(Array.isArray(r))if(typeof r[0]=="string")e||(e=[]),e.push(r);else for(let i=0;i<r.length;i++)n(r[i]);else for(let i in r)n(r[i])}return a(n,"scan"),n(t),e}a(Em,"suspiciousAttributesInner");function $i(t,e,n,r){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Cm(r))&&o.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=i.indexOf(" ");s>0&&(n=i.slice(0,s),i=i.slice(s+1));let u,l=n?t.createElementNS(n,i):t.createElement(i),c=e[1],d=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){d=2;for(let f in c)if(c[f]!=null){let p=f.indexOf(" ");p>0?l.setAttributeNS(f.slice(0,p),f.slice(p+1),c[f]):f=="style"&&l.style?l.style.cssText=c[f]:l.setAttribute(f,c[f])}}for(let f=d;f<e.length;f++){let p=e[f];if(p===0){if(f<e.length-1||f>d)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:h,contentDOM:m}=$i(t,p,n,r);if(l.appendChild(h),m){if(u)throw new RangeError("Multiple content holes");u=m}}}return{dom:l,contentDOM:u}}a($i,"renderSpec");const Bf=65535,zf=Math.pow(2,16);function Sm(t,e){return t+e*zf}a(Sm,"makeRecover");function xc(t){return t&Bf}a(xc,"recoverIndex");function vm(t){return(t-(t&Bf))/zf}a(vm,"recoverOffset");const $f=1,Hf=2,Hi=4,Vf=8,Na=class Na{constructor(e,n,r){this.pos=e,this.delInfo=n,this.recover=r}get deleted(){return(this.delInfo&Vf)>0}get deletedBefore(){return(this.delInfo&($f|Hi))>0}get deletedAfter(){return(this.delInfo&(Hf|Hi))>0}get deletedAcross(){return(this.delInfo&Hi)>0}};a(Na,"MapResult");let ti=Na;const Nt=class Nt{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Nt.empty)return Nt.empty}recover(e){let n=0,r=xc(e);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[r*3]+n+vm(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let l=this.ranges[u]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[u+o],d=this.ranges[u+s],f=l+c;if(e<=f){let p=c?e==l?-1:e==f?1:n:n,h=l+i+(p<0?0:d);if(r)return h;let m=e==(n<0?l:f)?null:Sm(u/3,e-l),g=e==l?Hf:e==f?$f:Hi;return(n<0?e!=l:e!=f)&&(g|=Vf),new ti(h,g,m)}i+=d-c}return r?e+i:new ti(e+i,0,null)}touches(e,n){let r=0,i=xc(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let u=0;u<this.ranges.length;u+=3){let l=this.ranges[u]-(this.inverted?r:0);if(l>e)break;let c=this.ranges[u+o],d=l+c;if(e<=d&&u==i*3)return!0;r+=this.ranges[u+s]-c}return!1}forEach(e){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],u=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],d=this.ranges[i+r];e(u,u+c,l,l+d),o+=d-c}}invert(){return new Nt(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Nt.empty:new Nt(e<0?[0,-e,0]:[0,0,e])}};a(Nt,"StepMap");let wt=Nt;wt.empty=new wt([]);const Jr=class Jr{constructor(e,n,r=0,i=e?e.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=e||[],this.ownData=!(e||n)}get maps(){return this._maps}slice(e=0,n=this.maps.length){return new Jr(this._maps,this.mirror,e,n)}appendMap(e,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(e),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(e){for(let n=0,r=this._maps.length;n<e._maps.length;n++){let i=e.getMirror(n);this.appendMap(e._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,r=this._maps.length+e._maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let e=new Jr;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let r=this.from;r<this.to;r++)e=this._maps[r].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o],u=s.mapResult(e,n);if(u.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this._maps[l].recover(u.recover);continue}}i|=u.delInfo,e=u.pos}return r?e:new ti(e,i,null)}};a(Jr,"Mapping");let Xi=Jr;const $s=Object.create(null),Ia=class Ia{getMap(){return wt.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=$s[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(e,n)}static jsonID(e,n){if(e in $s)throw new RangeError("Duplicate use of step JSON ID "+e);return $s[e]=n,n.prototype.jsonID=e,n}};a(Ia,"Step");let oe=Ia;const tn=class tn{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new tn(e,null)}static fail(e){return new tn(null,e)}static fromReplace(e,n,r,i){try{return tn.ok(e.replace(n,r,i))}catch(o){if(o instanceof sr)return tn.fail(o.message);throw o}}};a(tn,"StepResult");let ce=tn;function Sl(t,e,n){let r=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(Sl(o.content,e,o))),o.isInline&&(o=e(o,n,i)),r.push(o)}return A.fromArray(r)}a(Sl,"mapFragment");const nn=class nn extends oe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=e.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new M(Sl(n.content,(s,u)=>!s.isAtom||!u.type.allowsMarkType(this.mark.type)?s:s.mark(this.mark.addToSet(s.marks)),i),n.openStart,n.openEnd);return ce.fromReplace(e,this.from,this.to,o)}invert(){return new Wt(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new nn(n.pos,r.pos,this.mark)}merge(e){return e instanceof nn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new nn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new nn(n.from,n.to,e.markFromJSON(n.mark))}};a(nn,"AddMarkStep");let ni=nn;oe.jsonID("addMark",ni);const rn=class rn extends oe{constructor(e,n,r){super(),this.from=e,this.to=n,this.mark=r}apply(e){let n=e.slice(this.from,this.to),r=new M(Sl(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return ce.fromReplace(e,this.from,this.to,r)}invert(){return new ni(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new rn(n.pos,r.pos,this.mark)}merge(e){return e instanceof rn&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new rn(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new rn(n.from,n.to,e.markFromJSON(n.mark))}};a(rn,"RemoveMarkStep");let Wt=rn;oe.jsonID("removeMark",Wt);const on=class on extends oe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ce.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return ce.fromReplace(e,this.pos,this.pos+1,new M(A.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new on(this.pos,n.marks[i]);return new on(this.pos,this.mark)}}return new lr(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new on(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new on(n.pos,e.markFromJSON(n.mark))}};a(on,"AddNodeMarkStep");let ri=on;oe.jsonID("addNodeMark",ri);const Gr=class Gr extends oe{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return ce.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return ce.fromReplace(e,this.pos,this.pos+1,new M(A.from(r),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ri(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Gr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Gr(n.pos,e.markFromJSON(n.mark))}};a(Gr,"RemoveNodeMarkStep");let lr=Gr;oe.jsonID("removeNodeMark",lr);const mt=class mt extends oe{constructor(e,n,r,i=!1){super(),this.from=e,this.to=n,this.slice=r,this.structure=i}apply(e){return this.structure&&Mu(e,this.from,this.to)?ce.fail("Structure replace would overwrite content"):ce.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new wt([this.from,this.to-this.from,this.slice.size])}invert(e){return new mt(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new mt(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(e){if(!(e instanceof mt)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?M.empty:new M(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new mt(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?M.empty:new M(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new mt(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new mt(n.from,n.to,M.fromJSON(e,n.slice),!!n.structure)}};a(mt,"ReplaceStep");let Ae=mt;oe.jsonID("replace",Ae);const zn=class zn extends oe{constructor(e,n,r,i,o,s,u=!1){super(),this.from=e,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=u}apply(e){if(this.structure&&(Mu(e,this.from,this.gapFrom)||Mu(e,this.gapTo,this.to)))return ce.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return ce.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?ce.fromReplace(e,this.from,this.to,r):ce.fail("Content does not fit in gap")}getMap(){return new wt([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new zn(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:e.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new zn(n.pos,r.pos,i,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new zn(n.from,n.to,n.gapFrom,n.gapTo,M.fromJSON(e,n.slice),n.insert,!!n.structure)}};a(zn,"ReplaceAroundStep");let he=zn;oe.jsonID("replaceAround",he);function Mu(t,e,n){let r=t.resolve(e),i=n-e,o=r.depth;for(;i>0&&o>0&&r.indexAfter(o)==r.node(o).childCount;)o--,i--;if(i>0){let s=r.node(o).maybeChild(r.indexAfter(o));for(;i>0;){if(!s||s.isLeaf)return!0;s=s.firstChild,i--}}return!1}a(Mu,"contentBetween");function Am(t,e,n,r){let i=[],o=[],s,u;t.doc.nodesBetween(e,n,(l,c,d)=>{if(!l.isInline)return;let f=l.marks;if(!r.isInSet(f)&&d.type.allowsMarkType(r.type)){let p=Math.max(c,e),h=Math.min(c+l.nodeSize,n),m=r.addToSet(f);for(let g=0;g<f.length;g++)f[g].isInSet(m)||(s&&s.to==p&&s.mark.eq(f[g])?s.to=h:i.push(s=new Wt(p,h,f[g])));u&&u.to==p?u.to=h:o.push(u=new ni(p,h,r))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}a(Am,"addMark");function Mm(t,e,n,r){let i=[],o=0;t.doc.nodesBetween(e,n,(s,u)=>{if(!s.isInline)return;o++;let l=null;if(r instanceof Gi){let c=s.marks,d;for(;d=r.isInSet(c);)(l||(l=[])).push(d),c=d.removeFromSet(c)}else r?r.isInSet(s.marks)&&(l=[r]):l=s.marks;if(l&&l.length){let c=Math.min(u+s.nodeSize,n);for(let d=0;d<l.length;d++){let f=l[d],p;for(let h=0;h<i.length;h++){let m=i[h];m.step==o-1&&f.eq(i[h].style)&&(p=m)}p?(p.to=c,p.step=o):i.push({style:f,from:Math.max(u,e),to:c,step:o})}}}),i.forEach(s=>t.step(new Wt(s.from,s.to,s.style)))}a(Mm,"removeMark");function vl(t,e,n,r=n.contentMatch,i=!0){let o=t.doc.nodeAt(e),s=[],u=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),d=u+c.nodeSize,f=r.matchType(c.type);if(!f)s.push(new Ae(u,d,M.empty));else{r=f;for(let p=0;p<c.marks.length;p++)n.allowsMarkType(c.marks[p].type)||t.step(new Wt(u,d,c.marks[p]));if(i&&c.isText&&n.whitespace!="pre"){let p,h=/\r?\n|\r/g,m;for(;p=h.exec(c.text);)m||(m=new M(A.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new Ae(u+p.index,u+p.index+p[0].length,m))}}u=d}if(!r.validEnd){let l=r.fillBefore(A.empty,!0);t.replace(u,u,new M(l,0,0))}for(let l=s.length-1;l>=0;l--)t.step(s[l])}a(vl,"clearIncompatible");function Tm(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}a(Tm,"canCut");function Cr(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let r=t.depth,i=0,o=0;;--r){let s=t.$from.node(r),u=t.$from.index(r)+i,l=t.$to.indexAfter(r)-o;if(r<t.depth&&s.canReplace(u,l,n))return r;if(r==0||s.type.spec.isolating||!Tm(s,u,l))break;u&&(i=1),l<s.childCount&&(o=1)}return null}a(Cr,"liftTarget");function Dm(t,e,n){let{$from:r,$to:i,depth:o}=e,s=r.before(o+1),u=i.after(o+1),l=s,c=u,d=A.empty,f=0;for(let m=o,g=!1;m>n;m--)g||r.index(m)>0?(g=!0,d=A.from(r.node(m).copy(d)),f++):l--;let p=A.empty,h=0;for(let m=o,g=!1;m>n;m--)g||i.after(m+1)<i.end(m)?(g=!0,p=A.from(i.node(m).copy(p)),h++):c++;t.step(new he(l,c,s,u,new M(d.append(p),f,h),d.size-f,!0))}a(Dm,"lift$2");function Al(t,e,n=null,r=t){let i=Om(t,e),o=i&&_m(r,e);return o?i.map(kc).concat({type:e,attrs:n}).concat(o.map(kc)):null}a(Al,"findWrapping");function kc(t){return{type:t,attrs:null}}a(kc,"withAttrs");function Om(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.contentMatchAt(r).findWrapping(e);if(!o)return null;let s=o.length?o[0]:e;return n.canReplaceWith(r,i,s)?o:null}a(Om,"findWrappingOutside");function _m(t,e){let{parent:n,startIndex:r,endIndex:i}=t,o=n.child(r),s=e.contentMatch.findWrapping(o.type);if(!s)return null;let l=(s.length?s[s.length-1]:e).contentMatch;for(let c=r;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:s}a(_m,"findWrappingInside");function Nm(t,e,n){let r=A.empty;for(let s=n.length-1;s>=0;s--){if(r.size){let u=n[s].type.contentMatch.matchFragment(r);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=A.from(n[s].type.create(n[s].attrs,r))}let i=e.start,o=e.end;t.step(new he(i,o,i,o,new M(r,0,0),n.length,!0))}a(Nm,"wrap");function Im(t,e,n,r,i){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(s,u)=>{let l=typeof i=="function"?i(s):i;if(s.isTextblock&&!s.hasMarkup(r,l)&&Rm(t.doc,t.mapping.slice(o).map(u),r)){let c=null;if(r.schema.linebreakReplacement){let h=r.whitespace=="pre",m=!!r.contentMatch.matchType(r.schema.linebreakReplacement);h&&!m?c=!1:!h&&m&&(c=!0)}c===!1&&qf(t,s,u,o),vl(t,t.mapping.slice(o).map(u,1),r,void 0,c===null);let d=t.mapping.slice(o),f=d.map(u,1),p=d.map(u+s.nodeSize,1);return t.step(new he(f,p,f+1,p-1,new M(A.from(r.create(l,null,s.marks)),0,0),1,!0)),c===!0&&jf(t,s,u,o),!1}})}a(Im,"setBlockType$1");function jf(t,e,n,r){e.forEach((i,o)=>{if(i.isText){let s,u=/\r?\n|\r/g;for(;s=u.exec(i.text);){let l=t.mapping.slice(r).map(n+1+o+s.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}a(jf,"replaceNewlines");function qf(t,e,n,r){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=t.mapping.slice(r).map(n+1+o);t.replaceWith(s,s+1,e.type.schema.text(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["static/CodeHighlight-CbRq55Pj.js","static/main-DEBPJr9o.js","static/main-hpuWh67r.css","static/CodeHighlight-CGrGqjhz.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{d as e,_ as o}from"./main-DEBPJr9o.js";const _=e(()=>o(()=>import("./CodeHighlight-CbRq55Pj.js"),__vite__mapDeps([0,1,2,3])));export{_ as default};
|